claude-code-workflow 7.2.30 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/.claude/commands/workflow-skill.md +130 -0
  2. package/.claude/skills/ccw-chain/SKILL.md +44 -71
  3. package/.claude/skills/ccw-chain/chains/ccw-cycle.json +13 -3
  4. package/.claude/skills/ccw-chain/chains/ccw-exploration.json +33 -22
  5. package/.claude/skills/ccw-chain/chains/ccw-issue.json +23 -12
  6. package/.claude/skills/ccw-chain/chains/ccw-lightweight.json +23 -9
  7. package/.claude/skills/ccw-chain/chains/ccw-main.json +15 -2
  8. package/.claude/skills/ccw-chain/chains/ccw-standard.json +28 -16
  9. package/.claude/skills/ccw-chain/chains/ccw-team.json +7 -2
  10. package/.claude/skills/ccw-chain/chains/ccw-with-file.json +25 -9
  11. package/.claude/skills/chain-loader/phases/01-analyze-skill.md +53 -53
  12. package/.claude/skills/chain-loader/specs/chain-schema.md +30 -3
  13. package/.claude/skills/chain-loader/templates/chain-json.md +63 -63
  14. package/.claude/skills/workflow-plan/SKILL.md +1 -0
  15. package/.claude/skills/workflow-plan/phases/01-session-discovery.md +19 -2
  16. package/.claude/skills/workflow-plan/phases/02-context-gathering.md +2 -2
  17. package/.claude/skills/workflow-plan/phases/04-task-generation.md +9 -1
  18. package/.codex/skills/analyze-with-file/SKILL.md +383 -134
  19. package/.codex/skills/brainstorm/SKILL.md +3 -3
  20. package/.codex/skills/brainstorm-with-file/SKILL.md +208 -88
  21. package/.codex/skills/clean/SKILL.md +1 -1
  22. package/.codex/skills/csv-wave-pipeline/SKILL.md +2 -2
  23. package/.codex/skills/investigate/orchestrator.md +24 -0
  24. package/.codex/skills/issue-discover/SKILL.md +374 -361
  25. package/.codex/skills/issue-discover/phases/01-issue-new.md +1 -1
  26. package/.codex/skills/issue-discover/phases/02-discover.md +2 -2
  27. package/.codex/skills/issue-discover/phases/03-discover-by-prompt.md +1 -1
  28. package/.codex/skills/issue-discover/phases/04-quick-execute.md +2 -2
  29. package/.codex/skills/parallel-dev-cycle/SKILL.md +44 -37
  30. package/.codex/skills/project-documentation-workflow/SKILL.md +1 -1
  31. package/.codex/skills/review-cycle/SKILL.md +31 -12
  32. package/.codex/skills/roadmap-with-file/SKILL.md +141 -133
  33. package/.codex/skills/security-audit/orchestrator.md +29 -0
  34. package/.codex/skills/session-sync/SKILL.md +1 -1
  35. package/.codex/skills/ship/orchestrator.md +24 -0
  36. package/.codex/skills/spec-add/SKILL.md +5 -5
  37. package/.codex/skills/spec-generator/SKILL.md +33 -2
  38. package/.codex/skills/spec-generator/phases/01-5-requirement-clarification.md +3 -3
  39. package/.codex/skills/spec-generator/phases/01-discovery.md +1 -1
  40. package/.codex/skills/spec-generator/phases/02-product-brief.md +1 -1
  41. package/.codex/skills/spec-generator/phases/03-requirements.md +1 -1
  42. package/.codex/skills/spec-generator/phases/04-architecture.md +1 -1
  43. package/.codex/skills/spec-generator/phases/05-epics-stories.md +1 -1
  44. package/.codex/skills/spec-generator/phases/06-readiness-check.md +1 -1
  45. package/.codex/skills/spec-generator/phases/07-issue-export.md +1 -1
  46. package/.codex/skills/spec-setup/SKILL.md +669 -669
  47. package/.codex/skills/team-arch-opt/specs/team-config.json +1 -1
  48. package/.codex/skills/team-brainstorm/SKILL.md +259 -259
  49. package/.codex/skills/team-coordinate/SKILL.md +359 -359
  50. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +1 -1
  51. package/.codex/skills/team-designer/SKILL.md +27 -1
  52. package/.codex/skills/team-designer/phases/01-requirements-analysis.md +2 -2
  53. package/.codex/skills/team-designer/phases/02-scaffold-generation.md +1 -1
  54. package/.codex/skills/team-designer/phases/04-validation.md +1 -1
  55. package/.codex/skills/team-executor/SKILL.md +218 -218
  56. package/.codex/skills/team-frontend/SKILL.md +227 -227
  57. package/.codex/skills/team-frontend-debug/SKILL.md +278 -278
  58. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +2 -2
  59. package/.codex/skills/team-interactive-craft/SKILL.md +220 -220
  60. package/.codex/skills/team-interactive-craft/roles/coordinator/role.md +209 -209
  61. package/.codex/skills/team-issue/SKILL.md +269 -269
  62. package/.codex/skills/team-issue/roles/coordinator/role.md +1 -1
  63. package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -305
  64. package/.codex/skills/team-motion-design/SKILL.md +222 -222
  65. package/.codex/skills/team-motion-design/roles/coordinator/role.md +210 -210
  66. package/.codex/skills/team-perf-opt/SKILL.md +258 -258
  67. package/.codex/skills/team-perf-opt/specs/team-config.json +1 -1
  68. package/.codex/skills/team-planex/SKILL.md +216 -216
  69. package/.codex/skills/team-quality-assurance/SKILL.md +229 -229
  70. package/.codex/skills/team-review/SKILL.md +227 -227
  71. package/.codex/skills/team-roadmap-dev/SKILL.md +238 -238
  72. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/roadmap-discuss.md +5 -5
  73. package/.codex/skills/team-tech-debt/SKILL.md +206 -206
  74. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
  75. package/.codex/skills/team-testing/SKILL.md +237 -237
  76. package/.codex/skills/team-ui-polish/SKILL.md +218 -218
  77. package/.codex/skills/team-ui-polish/roles/coordinator/role.md +213 -213
  78. package/.codex/skills/team-uidesign/SKILL.md +219 -219
  79. package/.codex/skills/team-uidesign/roles/coordinator/role.md +2 -2
  80. package/.codex/skills/team-ultra-analyze/SKILL.md +260 -260
  81. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +1 -1
  82. package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +1 -1
  83. package/.codex/skills/team-ux-improve/SKILL.md +227 -227
  84. package/.codex/skills/team-ux-improve/roles/coordinator/role.md +1 -1
  85. package/.codex/skills/team-ux-improve/specs/team-config.json +1 -1
  86. package/.codex/skills/team-visual-a11y/SKILL.md +319 -319
  87. package/.codex/skills/team-visual-a11y/roles/coordinator/role.md +213 -213
  88. package/.codex/skills/workflow-execute/SKILL.md +5 -5
  89. package/.codex/skills/workflow-lite-planex/SKILL.md +3 -3
  90. package/.codex/skills/workflow-plan/SKILL.md +3 -3
  91. package/.codex/skills/workflow-tdd-plan/SKILL.md +4 -4
  92. package/.codex/skills/workflow-test-fix-cycle/SKILL.md +403 -402
  93. package/ccw/dist/cli.d.ts.map +1 -1
  94. package/ccw/dist/cli.js +16 -0
  95. package/ccw/dist/cli.js.map +1 -1
  96. package/ccw/dist/commands/chain-loader.d.ts +2 -0
  97. package/ccw/dist/commands/chain-loader.d.ts.map +1 -0
  98. package/ccw/dist/commands/chain-loader.js +11 -0
  99. package/ccw/dist/commands/chain-loader.js.map +1 -0
  100. package/ccw/dist/commands/install.d.ts.map +1 -1
  101. package/ccw/dist/commands/install.js +52 -1
  102. package/ccw/dist/commands/install.js.map +1 -1
  103. package/ccw/dist/commands/launcher.d.ts +2 -0
  104. package/ccw/dist/commands/launcher.d.ts.map +1 -0
  105. package/ccw/dist/commands/launcher.js +434 -0
  106. package/ccw/dist/commands/launcher.js.map +1 -0
  107. package/ccw/dist/tools/chain-loader.d.ts.map +1 -1
  108. package/ccw/dist/tools/chain-loader.js +457 -45
  109. package/ccw/dist/tools/chain-loader.js.map +1 -1
  110. package/ccw/dist/tools/skill-context-loader.d.ts.map +1 -1
  111. package/ccw/dist/tools/skill-context-loader.js +12 -26
  112. package/ccw/dist/tools/skill-context-loader.js.map +1 -1
  113. package/ccw/dist/types/chain-types.d.ts +41 -1
  114. package/ccw/dist/types/chain-types.d.ts.map +1 -1
  115. package/ccw/dist/utils/chain-visualizer.d.ts +13 -0
  116. package/ccw/dist/utils/chain-visualizer.d.ts.map +1 -0
  117. package/ccw/dist/utils/chain-visualizer.js +164 -0
  118. package/ccw/dist/utils/chain-visualizer.js.map +1 -0
  119. package/package.json +1 -1
  120. package/.claude/commands/cli/cli-init.md +0 -441
  121. package/.claude/commands/cli/codex-review.md +0 -361
  122. package/.claude/commands/flow-create.md +0 -663
  123. package/.claude/skills/ccw-chain/phases/analyze-with-file.md +0 -788
  124. package/.claude/skills/ccw-chain/phases/brainstorm/SKILL.md +0 -408
  125. package/.claude/skills/ccw-chain/phases/brainstorm/phases/01-mode-routing.md +0 -207
  126. package/.claude/skills/ccw-chain/phases/brainstorm/phases/02-artifacts.md +0 -567
  127. package/.claude/skills/ccw-chain/phases/brainstorm/phases/03-role-analysis.md +0 -748
  128. package/.claude/skills/ccw-chain/phases/brainstorm/phases/04-synthesis.md +0 -827
  129. package/.claude/skills/ccw-chain/phases/brainstorm-with-file.md +0 -482
  130. package/.claude/skills/ccw-chain/phases/collaborative-plan-with-file.md +0 -639
  131. package/.claude/skills/ccw-chain/phases/debug-with-file.md +0 -656
  132. package/.claude/skills/ccw-chain/phases/integration-test-cycle.md +0 -936
  133. package/.claude/skills/ccw-chain/phases/issue-convert-to-plan.md +0 -720
  134. package/.claude/skills/ccw-chain/phases/issue-discover.md +0 -483
  135. package/.claude/skills/ccw-chain/phases/issue-execute.md +0 -629
  136. package/.claude/skills/ccw-chain/phases/issue-from-brainstorm.md +0 -382
  137. package/.claude/skills/ccw-chain/phases/issue-plan.md +0 -343
  138. package/.claude/skills/ccw-chain/phases/issue-queue.md +0 -464
  139. package/.claude/skills/ccw-chain/phases/refactor-cycle.md +0 -852
  140. package/.claude/skills/ccw-chain/phases/review-cycle/SKILL.md +0 -132
  141. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-fix.md +0 -760
  142. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-module.md +0 -764
  143. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-session.md +0 -775
  144. package/.claude/skills/ccw-chain/phases/roadmap-with-file.md +0 -544
  145. package/.claude/skills/ccw-chain/phases/spec-generator/SKILL.md +0 -338
  146. package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-5-requirement-clarification.md +0 -404
  147. package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-discovery.md +0 -257
  148. package/.claude/skills/ccw-chain/phases/spec-generator/phases/02-product-brief.md +0 -274
  149. package/.claude/skills/ccw-chain/phases/spec-generator/phases/03-requirements.md +0 -184
  150. package/.claude/skills/ccw-chain/phases/spec-generator/phases/04-architecture.md +0 -248
  151. package/.claude/skills/ccw-chain/phases/spec-generator/phases/05-epics-stories.md +0 -178
  152. package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-5-auto-fix.md +0 -144
  153. package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-readiness-check.md +0 -480
  154. package/.claude/skills/ccw-chain/phases/team-planex.md +0 -123
  155. package/.claude/skills/ccw-chain/phases/ui-design-explore-auto.md +0 -678
  156. package/.claude/skills/ccw-chain/phases/unified-execute-with-file.md +0 -870
  157. package/.claude/skills/ccw-chain/phases/workflow-execute/SKILL.md +0 -625
  158. package/.claude/skills/ccw-chain/phases/workflow-execute/phases/06-review.md +0 -215
  159. package/.claude/skills/ccw-chain/phases/workflow-lite-plan.md +0 -616
  160. package/.claude/skills/ccw-chain/phases/workflow-multi-cli-plan.md +0 -424
  161. package/.claude/skills/ccw-chain/phases/workflow-plan/SKILL.md +0 -466
  162. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/01-session-discovery.md +0 -99
  163. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/02-context-gathering.md +0 -338
  164. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/03-conflict-resolution.md +0 -422
  165. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/04-task-generation.md +0 -440
  166. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/05-plan-verify.md +0 -395
  167. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/06-replan.md +0 -594
  168. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/SKILL.md +0 -527
  169. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/01-session-discovery.md +0 -57
  170. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/02-context-gathering.md +0 -407
  171. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/03-test-coverage-analysis.md +0 -172
  172. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/04-conflict-resolution.md +0 -426
  173. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/05-tdd-task-generation.md +0 -473
  174. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/06-tdd-structure-validation.md +0 -189
  175. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/07-tdd-verify.md +0 -635
  176. package/.claude/skills/ccw-chain/phases/workflow-test-fix/SKILL.md +0 -482
  177. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/01-session-start.md +0 -60
  178. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/02-test-context-gather.md +0 -493
  179. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/03-test-concept-enhanced.md +0 -150
  180. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/04-test-task-generate.md +0 -346
  181. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/05-test-cycle-execute.md +0 -538
  182. package/.claude/skills/ccw-chain/specs/intent-patterns.md +0 -60
  183. package/.claude/skills/team-edict.zip +0 -0
@@ -233,7 +233,7 @@ All tasks completed (no pending, no in_progress)
233
233
  +- Read session.completion_action:
234
234
  |
235
235
  +- "interactive":
236
- | request_user_input({
236
+ | functions.request_user_input({
237
237
  | questions: [{
238
238
  | question: "Team pipeline complete. What would you like to do?",
239
239
  | header: "Completion",
@@ -39,6 +39,9 @@ Generate complete team skills following the team-lifecycle-v4 architecture: SKIL
39
39
  ## Execution Flow
40
40
 
41
41
  ```
42
+ Progress Tracking Initialization:
43
+ └─ functions.update_plan([all 4 phases, Phase 1 as in_progress])
44
+
42
45
  Input Parsing:
43
46
  └─ Parse user requirements (skill name, roles, pipelines, domain)
44
47
 
@@ -46,20 +49,24 @@ Phase 1: Requirements Analysis
46
49
  └─ Ref: phases/01-requirements-analysis.md
47
50
  ├─ Tasks: Detect input → Gather roles → Define pipelines → Build teamConfig
48
51
  └─ Output: teamConfig
52
+ └─ Progress: mark phase-1 completed, phase-2 in_progress
49
53
 
50
54
  Phase 2: Scaffold Generation
51
55
  └─ Ref: phases/02-scaffold-generation.md
52
56
  ├─ Tasks: Create dirs → Generate SKILL.md router → Verify
53
57
  └─ Output: SKILL.md + directory structure
58
+ └─ Progress: mark phase-2 completed, phase-3 in_progress
54
59
 
55
60
  Phase 3: Content Generation
56
61
  └─ Ref: phases/03-content-generation.md
57
62
  ├─ Tasks: Coordinator → Workers → Specs → Templates
58
63
  └─ Output: roles/**/*.md, specs/*.md, templates/*.md
64
+ └─ Progress: mark phase-3 completed, phase-4 in_progress
59
65
 
60
66
  Phase 4: Validation
61
67
  └─ Ref: phases/04-validation.md
62
68
  └─ Output: Validation report (PASS/REVIEW/FAIL)
69
+ └─ Progress: mark phase-4 completed
63
70
 
64
71
  Return:
65
72
  └─ Summary with skill location and usage instructions
@@ -101,6 +108,25 @@ Generated skills follow the architecture of `~ or <project>/.claude/skills/team
101
108
  └── templates/ # Optional document templates
102
109
  ```
103
110
 
111
+ ## Progress Tracking
112
+
113
+ Initialize progress tracking before Phase 1 execution:
114
+
115
+ ```
116
+ functions.update_plan([
117
+ { id: "phase-1", title: "Phase 1: Requirements Analysis", status: "in_progress" },
118
+ { id: "phase-2", title: "Phase 2: Scaffold Generation", status: "pending" },
119
+ { id: "phase-3", title: "Phase 3: Content Generation", status: "pending" },
120
+ { id: "phase-4", title: "Phase 4: Validation", status: "pending" }
121
+ ])
122
+ ```
123
+
124
+ At each phase transition:
125
+ - **Phase 1 complete**: `functions.update_plan([{id: "phase-1", status: "completed"}, {id: "phase-2", status: "in_progress"}])`
126
+ - **Phase 2 complete**: `functions.update_plan([{id: "phase-2", status: "completed"}, {id: "phase-3", status: "in_progress"}])`
127
+ - **Phase 3 complete**: `functions.update_plan([{id: "phase-3", status: "completed"}, {id: "phase-4", status: "in_progress"}])`
128
+ - **Phase 4 complete**: `functions.update_plan([{id: "phase-4", status: "completed"}])`
129
+
104
130
  ## Data Flow
105
131
 
106
132
  ```
@@ -126,7 +152,7 @@ Return summary to user
126
152
 
127
153
  ## Core Rules
128
154
 
129
- 1. **Start Immediately**: First action is Phase 1 execution
155
+ 1. **Start Immediately**: First action is progress tracking initialization, second action is Phase 1 execution
130
156
  2. **Parse Every Output**: Extract teamConfig from Phase 1 for subsequent phases
131
157
  3. **Auto-Continue**: After each phase, automatically execute next phase
132
158
  4. **Progressive Phase Loading**: Read phase docs ONLY when that phase is about to execute
@@ -34,11 +34,11 @@ function detectInputSource(userInput) {
34
34
  ## Step 1.2: Gather Core Identity
35
35
 
36
36
  ```javascript
37
- const skillNameResponse = request_user_input({
37
+ const skillNameResponse = functions.request_user_input({
38
38
  prompt: `团队技能名称?(kebab-case, e.g., team-code-review)\n\nSuggested: ${suggestedName}\nOr enter a custom name.`
39
39
  });
40
40
 
41
- const prefixResponse = request_user_input({
41
+ const prefixResponse = functions.request_user_input({
42
42
  prompt: `会话前缀?(3-4字符用于任务ID, e.g., TCR)\n\nSuggested: ${suggestedPrefix}\nOr enter a custom prefix.`
43
43
  });
44
44
  ```
@@ -158,7 +158,7 @@ Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5
158
158
  When pipeline completes, coordinator presents:
159
159
 
160
160
  \```
161
- request_user_input({
161
+ functions.request_user_input({
162
162
  prompt: "Pipeline complete. What would you like to do?\n\nOptions:\n1. Archive & Clean (Recommended) - Archive session, clean up team\n2. Keep Active - Keep session for follow-up work\n3. Export Results - Export deliverables to target directory"
163
163
  })
164
164
  \```
@@ -296,7 +296,7 @@ Usage:
296
296
 
297
297
  ```javascript
298
298
  if (report.gate === 'FAIL') {
299
- const recovery = request_user_input({
299
+ const recovery = functions.request_user_input({
300
300
  prompt: `Validation found ${report.errors.length} errors. How to proceed?\n\nOptions:\n1. Auto-fix - Attempt automatic fixes (missing files, frontmatter)\n2. Regenerate - Re-run Phase 3 with fixes\n3. Accept as-is - Manual fix later`
301
301
  });
302
302
  }
@@ -1,218 +1,218 @@
1
- ---
2
- name: team-executor
3
- description: Lightweight session execution skill. Resumes existing team-coordinate sessions for pure execution via team-worker agents. No analysis, no role generation -- only loads and executes. Session path required. Triggers on "Team Executor".
4
- allowed-tools: spawn_agent(*), wait_agent(*), send_message(*), assign_task(*), close_agent(*), list_agents(*), report_agent_job_result(*), request_user_input(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*)
5
- ---
6
-
7
- # Team Executor
8
-
9
- Lightweight session execution skill: load session -> reconcile state -> spawn team-worker agents -> execute -> deliver. **No analysis, no role generation** -- only executes existing team-coordinate sessions.
10
-
11
-
12
- ## Architecture
13
-
14
- ```
15
- +---------------------------------------------------+
16
- | Skill(skill="team-executor") |
17
- | args="--session=<path>" [REQUIRED] |
18
- +-------------------+-------------------------------+
19
- | Session Validation
20
- +---- --session valid? ----+
21
- | NO | YES
22
- v v
23
- Error immediately Orchestration Mode
24
- (no session) -> executor
25
- |
26
- +-------+-------+-------+
27
- v v v v
28
- [team-worker agents loaded from session role-specs]
29
- ```
30
-
31
- ---
32
-
33
- ## Session Validation (BEFORE routing)
34
-
35
- **CRITICAL**: Session validation MUST occur before any execution.
36
-
37
- ### Parse Arguments
38
-
39
- Extract from `$ARGUMENTS`:
40
- - `--session=<path>`: Path to team-coordinate session folder (REQUIRED)
41
-
42
- ### Validation Steps
43
-
44
- 1. **Check `--session` provided**:
45
- - If missing -> **ERROR**: "Session required. Usage: --session=<path-to-TC-folder>"
46
-
47
- 2. **Validate session structure** (see specs/session-schema.md):
48
- - Directory exists at path
49
- - `team-session.json` exists and valid JSON
50
- - `task-analysis.json` exists and valid JSON
51
- - `role-specs/` directory has at least one `.md` file
52
- - Each role in `team-session.json#roles` has corresponding `.md` file in `role-specs/`
53
-
54
- 3. **Validation failure**:
55
- - Report specific missing component
56
- - Suggest re-running team-coordinate or checking path
57
-
58
- ---
59
-
60
- ## Role Router
61
-
62
- This skill is **executor-only**. Workers do NOT invoke this skill -- they are spawned as `team-worker` agents directly.
63
-
64
- ### Dispatch Logic
65
-
66
- | Scenario | Action |
67
- |----------|--------|
68
- | No `--session` | **ERROR** immediately |
69
- | `--session` invalid | **ERROR** with specific reason |
70
- | Valid session | Orchestration Mode -> executor |
71
-
72
- ### Orchestration Mode
73
-
74
- **Invocation**: `Skill(skill="team-executor", args="--session=<session-folder>")`
75
-
76
- **Lifecycle**:
77
- ```
78
- Validate session
79
- -> executor Phase 0: Reconcile state (reset interrupted, detect orphans)
80
- -> executor Phase 1: Spawn first batch team-worker agents (background) -> STOP
81
- -> Worker executes -> callback -> executor advances next step
82
- -> Loop until pipeline complete -> Phase 2 report + completion action
83
- ```
84
-
85
- **User Commands** (wake paused executor):
86
-
87
- | Command | Action |
88
- |---------|--------|
89
- | `check` / `status` | Output execution status graph, no advancement |
90
- | `resume` / `continue` | Check worker states, advance next step |
91
-
92
- ---
93
-
94
- ## Role Registry
95
-
96
- | Role | File | Type |
97
- |------|------|------|
98
- | executor | [roles/executor/role.md](roles/executor/role.md) | built-in orchestrator |
99
- | (dynamic) | `<session>/role-specs/<role-name>.md` | loaded from session |
100
-
101
- ---
102
-
103
- ## Executor Spawn Template
104
-
105
- ### v2 Worker Spawn (all roles)
106
-
107
- When executor spawns workers, use `team-worker` agent with role-spec path:
108
-
109
- ```
110
- spawn_agent({
111
- agent_type: "team_worker",
112
- task_name: "<task-id>",
113
- fork_context: false,
114
- items: [
115
- { type: "text", text: `## Role Assignment
116
- role: <role>
117
- role_spec: <session-folder>/role-specs/<role>.md
118
- session: <session-folder>
119
- session_id: <session-id>
120
- requirement: <task-description>
121
- inner_loop: <true|false>
122
-
123
- Read role_spec file to load Phase 2-4 domain instructions.` },
124
-
125
- { type: "text", text: `## Task Context
126
- task_id: <task-id>
127
- title: <task-title>
128
- description: <task-description>
129
- pipeline_phase: <pipeline-phase>` },
130
-
131
- { type: "text", text: `## Upstream Context
132
- <prev_context>` }
133
- ]
134
- })
135
- ```
136
-
137
- After spawning, use `wait_agent({ targets: [...], timeout_ms: 900000 })` to collect results, then `close_agent({ target: <name> })` each worker.
138
-
139
- ---
140
-
141
-
142
- ### Model Selection Guide
143
-
144
- team-executor loads roles dynamically from session role-specs. Use reasoning_effort based on the role type defined in the session:
145
- - Implementation/fix roles: `reasoning_effort: "high"`
146
- - Verification/test roles: `reasoning_effort: "medium"`
147
- - Default when role type is unclear: `reasoning_effort: "high"`
148
-
149
- ## v4 Agent Coordination
150
-
151
- ### State Reconciliation
152
-
153
- On resume, executor reconciles session state with actual running agents:
154
- ```
155
- const running = list_agents({})
156
- // Compare with session's task-analysis.json active tasks
157
- // Reset orphaned tasks (in_progress but agent gone) to pending
158
- ```
159
-
160
- ### Worker Communication
161
-
162
- - `send_message({ target: "<task-id>", items: [...] })` -- queue supplementary context
163
- - `assign_task({ target: "<task-id>", items: [...] })` -- assign new work to inner_loop worker
164
- - `close_agent({ target: "<task-id>" })` -- cleanup completed worker
165
-
166
- ## Completion Action
167
-
168
- When pipeline completes (all tasks done), executor presents an interactive choice:
169
-
170
- ```
171
- request_user_input({
172
- questions: [{
173
- question: "Team pipeline complete. What would you like to do?",
174
- header: "Completion",
175
- multiSelect: false,
176
- options: [
177
- { label: "Archive & Clean (Recommended)", description: "Archive session, clean up team" },
178
- { label: "Keep Active", description: "Keep session for follow-up work" },
179
- { label: "Export Results", description: "Export deliverables to target directory, then clean" }
180
- ]
181
- }]
182
- })
183
- ```
184
-
185
- ### Action Handlers
186
-
187
- | Choice | Steps |
188
- |--------|-------|
189
- | Archive & Clean | Update session status="completed" -> output final summary with artifact paths |
190
- | Keep Active | Update session status="paused" -> output: "Resume with: Skill(skill='team-executor', args='--session=<path>')" |
191
- | Export Results | request_user_input(target path) -> copy artifacts to target -> Archive & Clean |
192
-
193
- ---
194
-
195
- ## Integration with team-coordinate
196
-
197
- | Scenario | Skill |
198
- |----------|-------|
199
- | New task, no session | team-coordinate |
200
- | Existing session, resume execution | **team-executor** |
201
- | Session needs new roles | team-coordinate (with resume) |
202
- | Pure execution, no analysis | **team-executor** |
203
-
204
- ---
205
-
206
- ## Error Handling
207
-
208
- | Scenario | Resolution |
209
- |----------|------------|
210
- | No --session provided | ERROR immediately with usage message |
211
- | Session directory not found | ERROR with path, suggest checking path |
212
- | team-session.json missing | ERROR, session incomplete, suggest re-run team-coordinate |
213
- | task-analysis.json missing | ERROR, session incomplete, suggest re-run team-coordinate |
214
- | No role-specs in session | ERROR, session incomplete, suggest re-run team-coordinate |
215
- | Role-spec file not found | ERROR with expected path |
216
- | capability_gap reported | Warn only, cannot generate new role-specs |
217
- | Fast-advance spawns wrong task | Executor reconciles on next callback |
218
- | Completion action fails | Default to Keep Active, log warning |
1
+ ---
2
+ name: team-executor
3
+ description: Lightweight session execution skill. Resumes existing team-coordinate sessions for pure execution via team-worker agents. No analysis, no role generation -- only loads and executes. Session path required. Triggers on "Team Executor".
4
+ allowed-tools: spawn_agent(*), wait_agent(*), send_message(*), assign_task(*), close_agent(*), list_agents(*), report_agent_job_result(*), request_user_input(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*)
5
+ ---
6
+
7
+ # Team Executor
8
+
9
+ Lightweight session execution skill: load session -> reconcile state -> spawn team-worker agents -> execute -> deliver. **No analysis, no role generation** -- only executes existing team-coordinate sessions.
10
+
11
+
12
+ ## Architecture
13
+
14
+ ```
15
+ +---------------------------------------------------+
16
+ | Skill(skill="team-executor") |
17
+ | args="--session=<path>" [REQUIRED] |
18
+ +-------------------+-------------------------------+
19
+ | Session Validation
20
+ +---- --session valid? ----+
21
+ | NO | YES
22
+ v v
23
+ Error immediately Orchestration Mode
24
+ (no session) -> executor
25
+ |
26
+ +-------+-------+-------+
27
+ v v v v
28
+ [team-worker agents loaded from session role-specs]
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Session Validation (BEFORE routing)
34
+
35
+ **CRITICAL**: Session validation MUST occur before any execution.
36
+
37
+ ### Parse Arguments
38
+
39
+ Extract from `$ARGUMENTS`:
40
+ - `--session=<path>`: Path to team-coordinate session folder (REQUIRED)
41
+
42
+ ### Validation Steps
43
+
44
+ 1. **Check `--session` provided**:
45
+ - If missing -> **ERROR**: "Session required. Usage: --session=<path-to-TC-folder>"
46
+
47
+ 2. **Validate session structure** (see specs/session-schema.md):
48
+ - Directory exists at path
49
+ - `team-session.json` exists and valid JSON
50
+ - `task-analysis.json` exists and valid JSON
51
+ - `role-specs/` directory has at least one `.md` file
52
+ - Each role in `team-session.json#roles` has corresponding `.md` file in `role-specs/`
53
+
54
+ 3. **Validation failure**:
55
+ - Report specific missing component
56
+ - Suggest re-running team-coordinate or checking path
57
+
58
+ ---
59
+
60
+ ## Role Router
61
+
62
+ This skill is **executor-only**. Workers do NOT invoke this skill -- they are spawned as `team-worker` agents directly.
63
+
64
+ ### Dispatch Logic
65
+
66
+ | Scenario | Action |
67
+ |----------|--------|
68
+ | No `--session` | **ERROR** immediately |
69
+ | `--session` invalid | **ERROR** with specific reason |
70
+ | Valid session | Orchestration Mode -> executor |
71
+
72
+ ### Orchestration Mode
73
+
74
+ **Invocation**: `Skill(skill="team-executor", args="--session=<session-folder>")`
75
+
76
+ **Lifecycle**:
77
+ ```
78
+ Validate session
79
+ -> executor Phase 0: Reconcile state (reset interrupted, detect orphans)
80
+ -> executor Phase 1: Spawn first batch team-worker agents (background) -> STOP
81
+ -> Worker executes -> callback -> executor advances next step
82
+ -> Loop until pipeline complete -> Phase 2 report + completion action
83
+ ```
84
+
85
+ **User Commands** (wake paused executor):
86
+
87
+ | Command | Action |
88
+ |---------|--------|
89
+ | `check` / `status` | Output execution status graph, no advancement |
90
+ | `resume` / `continue` | Check worker states, advance next step |
91
+
92
+ ---
93
+
94
+ ## Role Registry
95
+
96
+ | Role | File | Type |
97
+ |------|------|------|
98
+ | executor | [roles/executor/role.md](roles/executor/role.md) | built-in orchestrator |
99
+ | (dynamic) | `<session>/role-specs/<role-name>.md` | loaded from session |
100
+
101
+ ---
102
+
103
+ ## Executor Spawn Template
104
+
105
+ ### v2 Worker Spawn (all roles)
106
+
107
+ When executor spawns workers, use `team-worker` agent with role-spec path:
108
+
109
+ ```
110
+ spawn_agent({
111
+ agent_type: "team_worker",
112
+ task_name: "<task-id>",
113
+ fork_context: false,
114
+ items: [
115
+ { type: "text", text: `## Role Assignment
116
+ role: <role>
117
+ role_spec: <session-folder>/role-specs/<role>.md
118
+ session: <session-folder>
119
+ session_id: <session-id>
120
+ requirement: <task-description>
121
+ inner_loop: <true|false>
122
+
123
+ Read role_spec file to load Phase 2-4 domain instructions.` },
124
+
125
+ { type: "text", text: `## Task Context
126
+ task_id: <task-id>
127
+ title: <task-title>
128
+ description: <task-description>
129
+ pipeline_phase: <pipeline-phase>` },
130
+
131
+ { type: "text", text: `## Upstream Context
132
+ <prev_context>` }
133
+ ]
134
+ })
135
+ ```
136
+
137
+ After spawning, use `wait_agent({ targets: [...], timeout_ms: 900000 })` to collect results, then `close_agent({ target: <name> })` each worker.
138
+
139
+ ---
140
+
141
+
142
+ ### Model Selection Guide
143
+
144
+ team-executor loads roles dynamically from session role-specs. Use reasoning_effort based on the role type defined in the session:
145
+ - Implementation/fix roles: `reasoning_effort: "high"`
146
+ - Verification/test roles: `reasoning_effort: "medium"`
147
+ - Default when role type is unclear: `reasoning_effort: "high"`
148
+
149
+ ## v4 Agent Coordination
150
+
151
+ ### State Reconciliation
152
+
153
+ On resume, executor reconciles session state with actual running agents:
154
+ ```
155
+ const running = list_agents({})
156
+ // Compare with session's task-analysis.json active tasks
157
+ // Reset orphaned tasks (in_progress but agent gone) to pending
158
+ ```
159
+
160
+ ### Worker Communication
161
+
162
+ - `send_message({ target: "<task-id>", items: [...] })` -- queue supplementary context
163
+ - `assign_task({ target: "<task-id>", items: [...] })` -- assign new work to inner_loop worker
164
+ - `close_agent({ target: "<task-id>" })` -- cleanup completed worker
165
+
166
+ ## Completion Action
167
+
168
+ When pipeline completes (all tasks done), executor presents an interactive choice:
169
+
170
+ ```
171
+ functions.request_user_input({
172
+ questions: [{
173
+ question: "Team pipeline complete. What would you like to do?",
174
+ header: "Completion",
175
+ multiSelect: false,
176
+ options: [
177
+ { label: "Archive & Clean (Recommended)", description: "Archive session, clean up team" },
178
+ { label: "Keep Active", description: "Keep session for follow-up work" },
179
+ { label: "Export Results", description: "Export deliverables to target directory, then clean" }
180
+ ]
181
+ }]
182
+ })
183
+ ```
184
+
185
+ ### Action Handlers
186
+
187
+ | Choice | Steps |
188
+ |--------|-------|
189
+ | Archive & Clean | Update session status="completed" -> output final summary with artifact paths |
190
+ | Keep Active | Update session status="paused" -> output: "Resume with: Skill(skill='team-executor', args='--session=<path>')" |
191
+ | Export Results | functions.request_user_input(target path) -> copy artifacts to target -> Archive & Clean |
192
+
193
+ ---
194
+
195
+ ## Integration with team-coordinate
196
+
197
+ | Scenario | Skill |
198
+ |----------|-------|
199
+ | New task, no session | team-coordinate |
200
+ | Existing session, resume execution | **team-executor** |
201
+ | Session needs new roles | team-coordinate (with resume) |
202
+ | Pure execution, no analysis | **team-executor** |
203
+
204
+ ---
205
+
206
+ ## Error Handling
207
+
208
+ | Scenario | Resolution |
209
+ |----------|------------|
210
+ | No --session provided | ERROR immediately with usage message |
211
+ | Session directory not found | ERROR with path, suggest checking path |
212
+ | team-session.json missing | ERROR, session incomplete, suggest re-run team-coordinate |
213
+ | task-analysis.json missing | ERROR, session incomplete, suggest re-run team-coordinate |
214
+ | No role-specs in session | ERROR, session incomplete, suggest re-run team-coordinate |
215
+ | Role-spec file not found | ERROR with expected path |
216
+ | capability_gap reported | Warn only, cannot generate new role-specs |
217
+ | Fast-advance spawns wrong task | Executor reconciles on next callback |
218
+ | Completion action fails | Default to Keep Active, log warning |