6 UrRhb

sdlc-stop Skill

优雅地关闭 AgentFlow 流水线。在插件模式下,还会清理 agent 团队,并使用 SendMessage 实现更快的关闭信号传递。

安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。

查看源码

技能指令原文(SKILL.md)

/sdlc-stop

Gracefully shut down the AgentFlow pipeline.

Plugin Mode Additions

In plugin mode, also:

  1. Call TeamDelete("sprint-team") to clean up the agent team
  2. Workers receive shutdown signal via SendMessage (faster than Asana read)
  3. No need to instruct user about crontab — plugin handles scheduling

Process

Step 1: Signal pausing

Find the pinned Status task across all [SDLC] projects.

Post comment: [SYSTEM:PAUSING] Graceful shutdown initiated. Active workers will finish their current stage. No new tasks will be dispatched.

Step 2: Drain active work

Check all tasks in Research/Build/Review/Test/Integrate stages:

For tasks with [BUILD:STARTED] and recent heartbeat (< 10 min):

  • Leave them alone — the worker is still active
  • Report: "Waiting for to finish (worker )"

For tasks in Research or Build WITHOUT [BUILD:STARTED] (not started yet):

  • Move back to "1 - Backlog"
  • Clear slot: [SLOT:T] → [SLOT:--]
  • Reset stage: [STAGE:X] → [STAGE:Backlog]
  • Clean up git worktree if it exists: git worktree remove feat/- --force

For tasks in Review/Test that are waiting (no worker actively processing):

  • Move back to "1 - Backlog"
  • Clear slot
  • Reset stage
  • Clean up git worktree if it exists: git worktree remove feat/- --force

Step 3: Wait for active workers

Report which tasks are still being worked on.

Tell the user: "Active workers are finishing. The system will be fully paused when all active work completes. You can check your Kanban board for current status."

Step 4: Post paused status

Update the Status task:

[SYSTEM:PAUSED]

Graceful shutdown complete — <timestamp>
Tasks returned to Backlog: <N>
Tasks still completing: <N> (if any workers were mid-build)

To resume: run /sdlc-orchestrate

Step 5: Disable crontab (instruct user)

Tell the user:

To fully stop the orchestrator, comment out or remove the crontab entry:

  crontab -e
  # Comment out: */15 * * * * /usr/local/bin/claude -p "Run /sdlc-orchestrate" ...

To resume later, uncomment it and run /sdlc-orchestrate once to kick things off.

Notes

  • This does NOT kill running Claude Code sessions — it only signals via the Kanban board
  • Workers will see the [SYSTEM:PAUSING] status on their next board read and should stop picking up new work
  • If a worker finishes mid-shutdown, its task will remain in the completed stage (Review-Complete, Test, etc.) and the orchestrator will process it on resume
  • /sdlc-stop is idempotent — running it twice is harmless