claude-code-workflow 7.2.23 → 7.2.24

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 (181) hide show
  1. package/.codex/skills/team-arch-opt/SKILL.md +242 -175
  2. package/.codex/skills/team-arch-opt/roles/analyzer/role.md +78 -78
  3. package/.codex/skills/team-arch-opt/roles/coordinator/commands/analyze.md +57 -57
  4. package/.codex/skills/team-arch-opt/roles/coordinator/commands/monitor.md +246 -204
  5. package/.codex/skills/team-arch-opt/roles/coordinator/role.md +196 -184
  6. package/.codex/skills/team-arch-opt/roles/designer/role.md +115 -115
  7. package/.codex/skills/team-arch-opt/roles/refactorer/role.md +102 -102
  8. package/.codex/skills/team-arch-opt/roles/reviewer/role.md +111 -111
  9. package/.codex/skills/team-arch-opt/roles/validator/role.md +115 -115
  10. package/.codex/skills/team-arch-opt/specs/pipelines.md +102 -102
  11. package/.codex/skills/team-brainstorm/SKILL.md +72 -4
  12. package/.codex/skills/team-brainstorm/roles/challenger/role.md +61 -61
  13. package/.codex/skills/team-brainstorm/roles/coordinator/commands/analyze.md +58 -58
  14. package/.codex/skills/team-brainstorm/roles/coordinator/commands/monitor.md +212 -171
  15. package/.codex/skills/team-brainstorm/roles/coordinator/role.md +172 -160
  16. package/.codex/skills/team-brainstorm/roles/evaluator/role.md +56 -56
  17. package/.codex/skills/team-brainstorm/roles/ideator/role.md +69 -69
  18. package/.codex/skills/team-brainstorm/roles/synthesizer/role.md +57 -57
  19. package/.codex/skills/team-brainstorm/specs/pipelines.md +72 -72
  20. package/.codex/skills/team-coordinate/SKILL.md +71 -3
  21. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +45 -5
  22. package/.codex/skills/team-coordinate/roles/coordinator/role.md +402 -389
  23. package/.codex/skills/team-coordinate/specs/knowledge-transfer.md +111 -111
  24. package/.codex/skills/team-coordinate/specs/pipelines.md +97 -97
  25. package/.codex/skills/team-coordinate/specs/quality-gates.md +112 -112
  26. package/.codex/skills/team-designer/SKILL.md +153 -153
  27. package/.codex/skills/team-designer/phases/01-requirements-analysis.md +250 -250
  28. package/.codex/skills/team-designer/phases/02-scaffold-generation.md +228 -228
  29. package/.codex/skills/team-designer/phases/03-content-generation.md +330 -330
  30. package/.codex/skills/team-designer/phases/04-validation.md +320 -320
  31. package/.codex/skills/team-executor/SKILL.md +29 -2
  32. package/.codex/skills/team-executor/roles/executor/commands/monitor.md +23 -15
  33. package/.codex/skills/team-frontend/SKILL.md +77 -3
  34. package/.codex/skills/team-frontend/roles/analyst/role.md +92 -92
  35. package/.codex/skills/team-frontend/roles/architect/role.md +86 -86
  36. package/.codex/skills/team-frontend/roles/coordinator/commands/analyze.md +52 -52
  37. package/.codex/skills/team-frontend/roles/coordinator/commands/monitor.md +222 -188
  38. package/.codex/skills/team-frontend/roles/coordinator/role.md +189 -177
  39. package/.codex/skills/team-frontend/roles/developer/role.md +93 -93
  40. package/.codex/skills/team-frontend/roles/qa/role.md +79 -79
  41. package/.codex/skills/team-frontend/specs/pipelines.md +76 -76
  42. package/.codex/skills/team-frontend-debug/SKILL.md +66 -3
  43. package/.codex/skills/team-frontend-debug/roles/analyzer/role.md +208 -208
  44. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +174 -174
  45. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/dispatch.md +198 -198
  46. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/monitor.md +177 -143
  47. package/.codex/skills/team-frontend-debug/roles/coordinator/role.md +164 -152
  48. package/.codex/skills/team-frontend-debug/roles/fixer/role.md +147 -147
  49. package/.codex/skills/team-frontend-debug/roles/reproducer/role.md +147 -147
  50. package/.codex/skills/team-frontend-debug/roles/tester/role.md +231 -231
  51. package/.codex/skills/team-frontend-debug/roles/verifier/role.md +172 -172
  52. package/.codex/skills/team-frontend-debug/specs/debug-tools.md +215 -215
  53. package/.codex/skills/team-frontend-debug/specs/pipelines.md +94 -94
  54. package/.codex/skills/team-issue/SKILL.md +83 -4
  55. package/.codex/skills/team-issue/roles/coordinator/commands/analyze.md +64 -64
  56. package/.codex/skills/team-issue/roles/coordinator/commands/dispatch.md +273 -273
  57. package/.codex/skills/team-issue/roles/coordinator/commands/monitor.md +235 -194
  58. package/.codex/skills/team-issue/roles/coordinator/role.md +206 -194
  59. package/.codex/skills/team-issue/roles/explorer/role.md +94 -94
  60. package/.codex/skills/team-issue/roles/implementer/role.md +87 -87
  61. package/.codex/skills/team-issue/roles/integrator/role.md +84 -84
  62. package/.codex/skills/team-issue/roles/planner/role.md +81 -81
  63. package/.codex/skills/team-issue/roles/reviewer/role.md +86 -86
  64. package/.codex/skills/team-issue/specs/pipelines.md +124 -124
  65. package/.codex/skills/team-iterdev/SKILL.md +64 -3
  66. package/.codex/skills/team-iterdev/roles/architect/role.md +65 -65
  67. package/.codex/skills/team-iterdev/roles/coordinator/commands/analyze.md +62 -62
  68. package/.codex/skills/team-iterdev/roles/coordinator/commands/monitor.md +227 -186
  69. package/.codex/skills/team-iterdev/roles/coordinator/role.md +193 -181
  70. package/.codex/skills/team-iterdev/roles/developer/role.md +74 -74
  71. package/.codex/skills/team-iterdev/roles/reviewer/role.md +66 -66
  72. package/.codex/skills/team-iterdev/roles/tester/role.md +88 -88
  73. package/.codex/skills/team-iterdev/specs/pipelines.md +94 -94
  74. package/.codex/skills/team-lifecycle-v4/MIGRATION-PLAN.md +6 -6
  75. package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -242
  76. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +1 -1
  77. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +66 -24
  78. package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +13 -1
  79. package/.codex/skills/team-lifecycle-v4/roles/supervisor/role.md +1 -1
  80. package/.codex/skills/team-lifecycle-v4/templates/architecture.md +254 -254
  81. package/.codex/skills/team-lifecycle-v4/templates/epics.md +196 -196
  82. package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +133 -133
  83. package/.codex/skills/team-lifecycle-v4/templates/requirements.md +224 -224
  84. package/.codex/skills/team-perf-opt/SKILL.md +68 -3
  85. package/.codex/skills/team-perf-opt/roles/benchmarker/role.md +89 -89
  86. package/.codex/skills/team-perf-opt/roles/coordinator/commands/analyze.md +61 -61
  87. package/.codex/skills/team-perf-opt/roles/coordinator/commands/monitor.md +35 -1
  88. package/.codex/skills/team-perf-opt/roles/coordinator/role.md +179 -167
  89. package/.codex/skills/team-perf-opt/roles/optimizer/role.md +97 -97
  90. package/.codex/skills/team-perf-opt/roles/profiler/role.md +73 -73
  91. package/.codex/skills/team-perf-opt/roles/reviewer/role.md +75 -75
  92. package/.codex/skills/team-perf-opt/roles/strategist/role.md +94 -94
  93. package/.codex/skills/team-perf-opt/specs/pipelines.md +65 -65
  94. package/.codex/skills/team-planex/SKILL.md +65 -3
  95. package/.codex/skills/team-planex/roles/coordinator/commands/analyze.md +52 -52
  96. package/.codex/skills/team-planex/roles/coordinator/commands/monitor.md +210 -164
  97. package/.codex/skills/team-planex/roles/coordinator/role.md +171 -159
  98. package/.codex/skills/team-planex/roles/executor/role.md +91 -91
  99. package/.codex/skills/team-planex/roles/planner/role.md +112 -112
  100. package/.codex/skills/team-planex/specs/pipelines.md +93 -93
  101. package/.codex/skills/team-quality-assurance/SKILL.md +60 -3
  102. package/.codex/skills/team-quality-assurance/roles/analyst/role.md +80 -80
  103. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -72
  104. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +108 -108
  105. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +243 -209
  106. package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +176 -164
  107. package/.codex/skills/team-quality-assurance/roles/executor/role.md +66 -66
  108. package/.codex/skills/team-quality-assurance/roles/generator/role.md +68 -68
  109. package/.codex/skills/team-quality-assurance/roles/scout/role.md +67 -67
  110. package/.codex/skills/team-quality-assurance/roles/strategist/role.md +71 -71
  111. package/.codex/skills/team-quality-assurance/specs/pipelines.md +115 -115
  112. package/.codex/skills/team-review/SKILL.md +58 -3
  113. package/.codex/skills/team-review/roles/coordinator/commands/analyze.md +71 -71
  114. package/.codex/skills/team-review/roles/coordinator/commands/dispatch.md +90 -90
  115. package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +225 -185
  116. package/.codex/skills/team-review/roles/coordinator/role.md +175 -163
  117. package/.codex/skills/team-review/roles/fixer/role.md +76 -76
  118. package/.codex/skills/team-review/roles/reviewer/role.md +68 -68
  119. package/.codex/skills/team-review/roles/scanner/role.md +71 -71
  120. package/.codex/skills/team-review/specs/pipelines.md +102 -102
  121. package/.codex/skills/team-roadmap-dev/SKILL.md +55 -3
  122. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/analyze.md +61 -61
  123. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md +502 -468
  124. package/.codex/skills/team-roadmap-dev/roles/coordinator/role.md +335 -322
  125. package/.codex/skills/team-roadmap-dev/roles/executor/role.md +71 -71
  126. package/.codex/skills/team-roadmap-dev/roles/planner/role.md +76 -76
  127. package/.codex/skills/team-roadmap-dev/roles/verifier/role.md +74 -74
  128. package/.codex/skills/team-roadmap-dev/specs/pipelines.md +93 -93
  129. package/.codex/skills/team-tech-debt/SKILL.md +56 -3
  130. package/.codex/skills/team-tech-debt/roles/assessor/role.md +69 -69
  131. package/.codex/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -47
  132. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +272 -231
  133. package/.codex/skills/team-tech-debt/roles/coordinator/role.md +172 -160
  134. package/.codex/skills/team-tech-debt/roles/executor/role.md +76 -76
  135. package/.codex/skills/team-tech-debt/roles/planner/role.md +69 -69
  136. package/.codex/skills/team-tech-debt/roles/scanner/role.md +82 -82
  137. package/.codex/skills/team-tech-debt/roles/validator/role.md +75 -75
  138. package/.codex/skills/team-tech-debt/specs/pipelines.md +47 -47
  139. package/.codex/skills/team-testing/SKILL.md +72 -3
  140. package/.codex/skills/team-testing/roles/analyst/role.md +95 -95
  141. package/.codex/skills/team-testing/roles/coordinator/commands/analyze.md +70 -70
  142. package/.codex/skills/team-testing/roles/coordinator/commands/dispatch.md +106 -106
  143. package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +283 -242
  144. package/.codex/skills/team-testing/roles/coordinator/role.md +184 -172
  145. package/.codex/skills/team-testing/roles/executor/role.md +96 -96
  146. package/.codex/skills/team-testing/roles/generator/role.md +95 -95
  147. package/.codex/skills/team-testing/roles/strategist/role.md +83 -83
  148. package/.codex/skills/team-testing/specs/pipelines.md +101 -101
  149. package/.codex/skills/team-uidesign/SKILL.md +65 -3
  150. package/.codex/skills/team-uidesign/roles/coordinator/commands/analyze.md +59 -59
  151. package/.codex/skills/team-uidesign/roles/coordinator/commands/dispatch.md +156 -156
  152. package/.codex/skills/team-uidesign/roles/coordinator/commands/monitor.md +234 -194
  153. package/.codex/skills/team-uidesign/roles/coordinator/role.md +211 -199
  154. package/.codex/skills/team-uidesign/roles/designer/role.md +69 -69
  155. package/.codex/skills/team-uidesign/roles/implementer/role.md +72 -72
  156. package/.codex/skills/team-uidesign/roles/researcher/role.md +82 -82
  157. package/.codex/skills/team-uidesign/roles/reviewer/role.md +67 -67
  158. package/.codex/skills/team-uidesign/specs/pipelines.md +76 -76
  159. package/.codex/skills/team-ultra-analyze/SKILL.md +73 -3
  160. package/.codex/skills/team-ultra-analyze/roles/analyst/role.md +90 -90
  161. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/analyze.md +73 -73
  162. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +50 -9
  163. package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +255 -243
  164. package/.codex/skills/team-ultra-analyze/roles/discussant/role.md +104 -104
  165. package/.codex/skills/team-ultra-analyze/roles/explorer/role.md +74 -74
  166. package/.codex/skills/team-ultra-analyze/roles/synthesizer/role.md +78 -78
  167. package/.codex/skills/team-ultra-analyze/specs/pipelines.md +64 -64
  168. package/.codex/skills/team-ux-improve/SKILL.md +64 -3
  169. package/.codex/skills/team-ux-improve/roles/coordinator/commands/analyze.md +62 -62
  170. package/.codex/skills/team-ux-improve/roles/coordinator/commands/dispatch.md +233 -233
  171. package/.codex/skills/team-ux-improve/roles/coordinator/commands/monitor.md +195 -160
  172. package/.codex/skills/team-ux-improve/roles/coordinator/role.md +170 -158
  173. package/.codex/skills/team-ux-improve/roles/designer/role.md +122 -122
  174. package/.codex/skills/team-ux-improve/roles/diagnoser/role.md +93 -93
  175. package/.codex/skills/team-ux-improve/roles/explorer/role.md +77 -77
  176. package/.codex/skills/team-ux-improve/roles/implementer/role.md +102 -102
  177. package/.codex/skills/team-ux-improve/roles/scanner/role.md +93 -93
  178. package/.codex/skills/team-ux-improve/roles/tester/role.md +84 -84
  179. package/.codex/skills/team-ux-improve/specs/pipelines.md +54 -54
  180. package/README.md +1 -0
  181. package/package.json +1 -1
@@ -1,52 +1,52 @@
1
- # Analyze Task
2
-
3
- Parse frontend task -> detect capabilities -> assess pipeline complexity -> design roles.
4
-
5
- **CONSTRAINT**: Text-level analysis only. NO source code reading, NO codebase exploration.
6
-
7
- ## Signal Detection
8
-
9
- | Keywords | Capability | Role |
10
- |----------|------------|------|
11
- | analyze, requirements, design intelligence | analyst | analyst |
12
- | design tokens, component architecture, design system | architect | architect |
13
- | implement, build, code, develop, page, component | developer | developer |
14
- | review, audit, quality, test, accessibility | qa | qa |
15
-
16
- ## Pipeline Selection
17
-
18
- | Scope Signal | Pipeline |
19
- |--------------|----------|
20
- | single page, landing, simple | page (4-beat) |
21
- | feature, multi-component, complex | feature (5-beat with arch review gate) |
22
- | full system, design system, multiple pages | system (7-beat dual-track) |
23
-
24
- Default to `feature` if ambiguous.
25
-
26
- ## Complexity Scoring
27
-
28
- | Factor | Points |
29
- |--------|--------|
30
- | ui-ux-pro-max integration needed | +1 |
31
- | Existing design system detected | +1 |
32
- | Accessibility strict mode (healthcare/finance) | +2 |
33
- | Multiple tech stacks | +2 |
34
- | Dark mode required | +1 |
35
-
36
- Results: 1-2 page, 3-4 feature, 5+ system
37
-
38
- ## Output
39
-
40
- Write <session>/task-analysis.json:
41
- ```json
42
- {
43
- "task_description": "<original>",
44
- "pipeline_type": "<page|feature|system>",
45
- "capabilities": [{ "name": "<cap>", "role": "<role>", "keywords": ["..."] }],
46
- "roles": [{ "name": "<role>", "prefix": "<PREFIX>", "inner_loop": false }],
47
- "complexity": { "score": 0, "level": "Low|Medium|High" },
48
- "industry": "<industry>",
49
- "constraints": [],
50
- "needs_ui_ux_pro_max": true
51
- }
52
- ```
1
+ # Analyze Task
2
+
3
+ Parse frontend task -> detect capabilities -> assess pipeline complexity -> design roles.
4
+
5
+ **CONSTRAINT**: Text-level analysis only. NO source code reading, NO codebase exploration.
6
+
7
+ ## Signal Detection
8
+
9
+ | Keywords | Capability | Role |
10
+ |----------|------------|------|
11
+ | analyze, requirements, design intelligence | analyst | analyst |
12
+ | design tokens, component architecture, design system | architect | architect |
13
+ | implement, build, code, develop, page, component | developer | developer |
14
+ | review, audit, quality, test, accessibility | qa | qa |
15
+
16
+ ## Pipeline Selection
17
+
18
+ | Scope Signal | Pipeline |
19
+ |--------------|----------|
20
+ | single page, landing, simple | page (4-beat) |
21
+ | feature, multi-component, complex | feature (5-beat with arch review gate) |
22
+ | full system, design system, multiple pages | system (7-beat dual-track) |
23
+
24
+ Default to `feature` if ambiguous.
25
+
26
+ ## Complexity Scoring
27
+
28
+ | Factor | Points |
29
+ |--------|--------|
30
+ | ui-ux-pro-max integration needed | +1 |
31
+ | Existing design system detected | +1 |
32
+ | Accessibility strict mode (healthcare/finance) | +2 |
33
+ | Multiple tech stacks | +2 |
34
+ | Dark mode required | +1 |
35
+
36
+ Results: 1-2 page, 3-4 feature, 5+ system
37
+
38
+ ## Output
39
+
40
+ Write <session>/task-analysis.json:
41
+ ```json
42
+ {
43
+ "task_description": "<original>",
44
+ "pipeline_type": "<page|feature|system>",
45
+ "capabilities": [{ "name": "<cap>", "role": "<role>", "keywords": ["..."] }],
46
+ "roles": [{ "name": "<role>", "prefix": "<PREFIX>", "inner_loop": false }],
47
+ "complexity": { "score": 0, "level": "Low|Medium|High" },
48
+ "industry": "<industry>",
49
+ "constraints": [],
50
+ "needs_ui_ux_pro_max": true
51
+ }
52
+ ```
@@ -1,188 +1,222 @@
1
- # Command: Monitor
2
-
3
- Event-driven pipeline coordination. Beat model: coordinator wake -> process -> spawn -> STOP.
4
-
5
- ## Constants
6
-
7
- - SPAWN_MODE: background
8
- - ONE_STEP_PER_INVOCATION: true
9
- - FAST_ADVANCE_AWARE: true
10
- - WORKER_AGENT: team-worker
11
- - MAX_GC_ROUNDS: 2
12
-
13
- ## Handler Router
14
-
15
- | Source | Handler |
16
- |--------|---------|
17
- | Message contains [analyst], [architect], [developer], [qa] | handleCallback |
18
- | "check" or "status" | handleCheck |
19
- | "resume" or "continue" | handleResume |
20
- | All tasks completed | handleComplete |
21
- | Default | handleSpawnNext |
22
-
23
- ## Phase 2: Context Loading
24
-
25
- | Input | Source | Required |
26
- |-------|--------|----------|
27
- | Session state | <session>/session.json | Yes |
28
- | Task list | Read `<session>/tasks.json` | Yes |
29
- | Trigger event | From Entry Router detection | Yes |
30
- | Pipeline definition | From SKILL.md | Yes |
31
-
32
- 1. Load session.json for current state, `pipeline_mode`, `gc_rounds`
33
- 2. Read `<session>/tasks.json` to get current task statuses
34
- 3. Identify trigger event type from Entry Router
35
-
36
- ## Phase 3: Event Handlers
37
-
38
- ### handleCallback
39
-
40
- Triggered when a worker sends completion message.
41
-
42
- 1. Parse message to identify role and task ID:
43
-
44
- | Message Pattern | Role Detection |
45
- |----------------|---------------|
46
- | `[analyst]` or task ID `ANALYZE-*` | analyst |
47
- | `[architect]` or task ID `ARCH-*` | architect |
48
- | `[developer]` or task ID `DEV-*` | developer |
49
- | `[qa]` or task ID `QA-*` | qa |
50
-
51
- 2. Mark task as completed:
52
-
53
- Read `<session>/tasks.json`, find entry by id `<task-id>`, set `"status": "completed"`, write back.
54
-
55
- 3. Record completion in session state
56
-
57
- 4. Check if checkpoint applies:
58
-
59
- | Completed Task | Pipeline Mode | Checkpoint Action |
60
- |---------------|---------------|-------------------|
61
- | ANALYZE-001 | all | Log: analysis ready |
62
- | ARCH-001 | feature/system | Log: architecture ready for review |
63
- | QA-001 (arch review) | feature/system | Gate: pause if critical issues, wait for architect revision |
64
- | QA-* (code review) | all | Check verdict for GC loop (see below) |
65
-
66
- 5. **GC Loop Check** (when QA completes with fix_required):
67
-
68
- | Condition | Action |
69
- |-----------|--------|
70
- | QA verdict = PASSED or PASSED_WITH_WARNINGS | Proceed to handleSpawnNext |
71
- | QA verdict = FIX_REQUIRED AND gc_round < 2 | Create DEV-fix + QA-recheck tasks, increment gc_round |
72
- | QA verdict = FIX_REQUIRED AND gc_round >= 2 | Escalate to user: accept current state or manual intervention |
73
-
74
- **GC Fix Task Creation** -- add new entries to `<session>/tasks.json`:
75
- ```json
76
- {
77
- "id": "DEV-fix-<round>",
78
- "subject": "DEV-fix-<round>",
79
- "description": "PURPOSE: Fix issues identified in QA audit | Success: All critical/high issues resolved\nTASK:\n - Load QA audit report with findings\n - Address critical and high severity issues\n - Re-validate fixes against coding standards\nCONTEXT:\n - Session: <session-folder>\n - Upstream artifacts: <session>/qa/audit-<NNN>.md\n - Shared memory: <session>/.msg/meta.json\nEXPECTED: Fixed source files | QA issues resolved\nCONSTRAINTS: Targeted fixes only | Do not introduce regressions",
80
- "status": "pending",
81
- "owner": "developer",
82
- "blockedBy": []
83
- }
84
- ```
85
-
86
- ```json
87
- {
88
- "id": "QA-recheck-<round>",
89
- "subject": "QA-recheck-<round>",
90
- "description": "PURPOSE: Re-audit after developer fixes | Success: Score >= 8, critical == 0\nTASK:\n - Execute 5-dimension audit on fixed code\n - Focus on previously flagged issues\n - Calculate new score\nCONTEXT:\n - Session: <session-folder>\n - Review type: code-review\n - Shared memory: <session>/.msg/meta.json\nEXPECTED: <session>/qa/audit-<NNN>.md | Improved score\nCONSTRAINTS: Read-only review",
91
- "status": "pending",
92
- "owner": "qa",
93
- "blockedBy": ["DEV-fix-<round>"]
94
- }
95
- ```
96
-
97
- 6. Proceed to handleSpawnNext
98
-
99
- ### handleSpawnNext
100
-
101
- Find and spawn the next ready tasks.
102
-
103
- 1. Scan tasks.json for tasks where:
104
- - Status is "pending"
105
- - All blockedBy tasks have status "completed"
106
-
107
- 2. For each ready task, spawn team-worker:
108
-
109
- ```
110
- spawn_agent({
111
- agent_type: "team_worker",
112
- items: [{
113
- description: "Spawn <role> worker for <task-id>",
114
- team_name: "frontend",
115
- name: "<role>",
116
- prompt: `## Role Assignment
117
- role: <role>
118
- role_spec: ~ or <project>/.codex/skills/team-frontend/roles/<role>/role.md
119
- session: <session-folder>
120
- session_id: <session-id>
121
- team_name: frontend
122
- requirement: <task-description>
123
- inner_loop: <true|false>
124
-
125
- Read role_spec file to load Phase 2-4 domain instructions.
126
- Execute built-in Phase 1 -> role-spec Phase 2-4 -> built-in Phase 5.`
127
- }]
128
- })
129
- ```
130
-
131
- 3. **Parallel spawn rules**:
132
-
133
- | Mode | Scenario | Spawn Behavior |
134
- |------|----------|---------------|
135
- | page | Each stage sequential | One worker at a time |
136
- | feature | After QA-001 arch review | Spawn DEV-001 |
137
- | system | After QA-001 arch review | Spawn ARCH-002 + DEV-001 in parallel |
138
-
139
- 4. STOP after spawning -- use `wait_agent({ ids: [<spawned-agent-ids>] })` to wait for next callback
140
-
141
- ### handleCheck
142
-
143
- Output current pipeline status.
144
-
145
- ```
146
- Pipeline Status (<mode> mode):
147
- [DONE] ANALYZE-001 (analyst) -> design-intelligence.json
148
- [DONE] ARCH-001 (architect) -> design-tokens.json
149
- [RUN] DEV-001 (developer) -> implementing...
150
- [WAIT] QA-001 (qa) -> blocked by DEV-001
151
-
152
- GC Rounds: 0/2
153
- Session: <session-id>
154
- ```
155
-
156
- Output status -- do NOT advance pipeline.
157
-
158
- ### handleResume
159
-
160
- Resume pipeline after user pause or interruption.
161
-
162
- 1. Audit tasks.json for inconsistencies:
163
- - Tasks stuck in "in_progress" -> reset to "pending"
164
- - Tasks with completed blockers but still "pending" -> include in spawn list
165
- 2. Proceed to handleSpawnNext
166
-
167
- ### handleComplete
168
-
169
- Triggered when all pipeline tasks are completed.
170
-
171
- **Completion check**:
172
-
173
- | Mode | Completion Condition |
174
- |------|---------------------|
175
- | page | All 4 tasks (+ any GC fix/recheck tasks) completed |
176
- | feature | All 5 tasks (+ any GC fix/recheck tasks) completed |
177
- | system | All 7 tasks (+ any GC fix/recheck tasks) completed |
178
-
179
- 1. If any tasks not completed, return to handleSpawnNext
180
- 2. If all completed, transition to coordinator Phase 5
181
-
182
- ## Phase 4: State Persistence
183
-
184
- After every handler execution:
185
-
186
- 1. Update session.json with current state (active tasks, gc_rounds, last event)
187
- 2. Verify tasks.json consistency
188
- 3. STOP and wait for next event
1
+ # Command: Monitor
2
+
3
+ Event-driven pipeline coordination. Beat model: coordinator wake -> process -> spawn -> STOP.
4
+
5
+ ## Constants
6
+
7
+ - SPAWN_MODE: background
8
+ - ONE_STEP_PER_INVOCATION: true
9
+ - FAST_ADVANCE_AWARE: true
10
+ - WORKER_AGENT: team-worker
11
+ - MAX_GC_ROUNDS: 2
12
+
13
+ ## Handler Router
14
+
15
+ | Source | Handler |
16
+ |--------|---------|
17
+ | Message contains [analyst], [architect], [developer], [qa] | handleCallback |
18
+ | "check" or "status" | handleCheck |
19
+ | "resume" or "continue" | handleResume |
20
+ | All tasks completed | handleComplete |
21
+ | Default | handleSpawnNext |
22
+
23
+ ## Phase 2: Context Loading
24
+
25
+ | Input | Source | Required |
26
+ |-------|--------|----------|
27
+ | Session state | <session>/session.json | Yes |
28
+ | Task list | Read `<session>/tasks.json` | Yes |
29
+ | Trigger event | From Entry Router detection | Yes |
30
+ | Pipeline definition | From SKILL.md | Yes |
31
+
32
+ 1. Load session.json for current state, `pipeline_mode`, `gc_rounds`
33
+ 2. Read `<session>/tasks.json` to get current task statuses
34
+ 3. Identify trigger event type from Entry Router
35
+
36
+ ## Phase 3: Event Handlers
37
+
38
+ ### handleCallback
39
+
40
+ Triggered when a worker sends completion message.
41
+
42
+ 1. Parse message to identify role and task ID:
43
+
44
+ | Message Pattern | Role Detection |
45
+ |----------------|---------------|
46
+ | `[analyst]` or task ID `ANALYZE-*` | analyst |
47
+ | `[architect]` or task ID `ARCH-*` | architect |
48
+ | `[developer]` or task ID `DEV-*` | developer |
49
+ | `[qa]` or task ID `QA-*` | qa |
50
+
51
+ 2. Mark task as completed:
52
+
53
+ Read `<session>/tasks.json`, find entry by id `<task-id>`, set `"status": "completed"`, write back.
54
+
55
+ 3. Record completion in session state
56
+
57
+ 4. Check if checkpoint applies:
58
+
59
+ | Completed Task | Pipeline Mode | Checkpoint Action |
60
+ |---------------|---------------|-------------------|
61
+ | ANALYZE-001 | all | Log: analysis ready |
62
+ | ARCH-001 | feature/system | Log: architecture ready for review |
63
+ | QA-001 (arch review) | feature/system | Gate: pause if critical issues, wait for architect revision |
64
+ | QA-* (code review) | all | Check verdict for GC loop (see below) |
65
+
66
+ 5. **GC Loop Check** (when QA completes with fix_required):
67
+
68
+ | Condition | Action |
69
+ |-----------|--------|
70
+ | QA verdict = PASSED or PASSED_WITH_WARNINGS | Proceed to handleSpawnNext |
71
+ | QA verdict = FIX_REQUIRED AND gc_round < 2 | Create DEV-fix + QA-recheck tasks, increment gc_round |
72
+ | QA verdict = FIX_REQUIRED AND gc_round >= 2 | Escalate to user: accept current state or manual intervention |
73
+
74
+ **GC Fix Task Creation** -- add new entries to `<session>/tasks.json`:
75
+ ```json
76
+ {
77
+ "id": "DEV-fix-<round>",
78
+ "subject": "DEV-fix-<round>",
79
+ "description": "PURPOSE: Fix issues identified in QA audit | Success: All critical/high issues resolved\nTASK:\n - Load QA audit report with findings\n - Address critical and high severity issues\n - Re-validate fixes against coding standards\nCONTEXT:\n - Session: <session-folder>\n - Upstream artifacts: <session>/qa/audit-<NNN>.md\n - Shared memory: <session>/.msg/meta.json\nEXPECTED: Fixed source files | QA issues resolved\nCONSTRAINTS: Targeted fixes only | Do not introduce regressions",
80
+ "status": "pending",
81
+ "owner": "developer",
82
+ "blockedBy": []
83
+ }
84
+ ```
85
+
86
+ ```json
87
+ {
88
+ "id": "QA-recheck-<round>",
89
+ "subject": "QA-recheck-<round>",
90
+ "description": "PURPOSE: Re-audit after developer fixes | Success: Score >= 8, critical == 0\nTASK:\n - Execute 5-dimension audit on fixed code\n - Focus on previously flagged issues\n - Calculate new score\nCONTEXT:\n - Session: <session-folder>\n - Review type: code-review\n - Shared memory: <session>/.msg/meta.json\nEXPECTED: <session>/qa/audit-<NNN>.md | Improved score\nCONSTRAINTS: Read-only review",
91
+ "status": "pending",
92
+ "owner": "qa",
93
+ "blockedBy": ["DEV-fix-<round>"]
94
+ }
95
+ ```
96
+
97
+ 6. Proceed to handleSpawnNext
98
+
99
+ ### handleSpawnNext
100
+
101
+ Find and spawn the next ready tasks.
102
+
103
+ 1. Scan tasks.json for tasks where:
104
+ - Status is "pending"
105
+ - All blockedBy tasks have status "completed"
106
+
107
+ 2. For each ready task, spawn team-worker:
108
+
109
+ ```
110
+ spawn_agent({
111
+ agent_type: "team_worker",
112
+ task_name: taskId, // e.g., "DEV-001" — enables named targeting
113
+ items: [{
114
+ description: "Spawn <role> worker for <task-id>",
115
+ team_name: "frontend",
116
+ name: "<role>",
117
+ prompt: `## Role Assignment
118
+ role: <role>
119
+ role_spec: ~ or <project>/.codex/skills/team-frontend/roles/<role>/role.md
120
+ session: <session-folder>
121
+ session_id: <session-id>
122
+ team_name: frontend
123
+ requirement: <task-description>
124
+ inner_loop: <true|false>
125
+
126
+ Read role_spec file to load Phase 2-4 domain instructions.
127
+ Execute built-in Phase 1 -> role-spec Phase 2-4 -> built-in Phase 5.`
128
+ }]
129
+ })
130
+ ```
131
+
132
+ 3. **Parallel spawn rules**:
133
+
134
+ | Mode | Scenario | Spawn Behavior |
135
+ |------|----------|---------------|
136
+ | page | Each stage sequential | One worker at a time |
137
+ | feature | After QA-001 arch review | Spawn DEV-001 |
138
+ | system | After QA-001 arch review | Spawn ARCH-002 + DEV-001 in parallel |
139
+
140
+ 4. STOP after spawning -- use `wait_agent({ targets: [<spawned-task-names>], timeout_ms: 900000 })` to wait for next callback. If `result.timed_out`, mark tasks as `timed_out` and close agents. Use `close_agent({ target: taskId })` with task_name for cleanup.
141
+
142
+ **Cross-Agent Supplementary Context** (v4):
143
+
144
+ When spawning workers in a later pipeline phase, send upstream results as supplementary context to already-running workers:
145
+
146
+ ```
147
+ // Example: Send analysis results to running developer
148
+ send_message({
149
+ target: "<running-agent-task-name>",
150
+ items: [{ type: "text", text: `## Supplementary Context\n${upstreamFindings}` }]
151
+ })
152
+ // Note: send_message queues info without interrupting the agent's current work
153
+ ```
154
+
155
+ Use `send_message` (not `assign_task`) for supplementary info that enriches but doesn't redirect the agent's current task.
156
+
157
+ ### handleCheck
158
+
159
+ Output current pipeline status.
160
+
161
+ ```
162
+ Pipeline Status (<mode> mode):
163
+ [DONE] ANALYZE-001 (analyst) -> design-intelligence.json
164
+ [DONE] ARCH-001 (architect) -> design-tokens.json
165
+ [RUN] DEV-001 (developer) -> implementing...
166
+ [WAIT] QA-001 (qa) -> blocked by DEV-001
167
+
168
+ GC Rounds: 0/2
169
+ Session: <session-id>
170
+ ```
171
+
172
+ Output status -- do NOT advance pipeline.
173
+
174
+ ### handleResume
175
+
176
+ **Agent Health Check** (v4):
177
+ ```
178
+ // Verify actual running agents match session state
179
+ const runningAgents = list_agents({})
180
+ // For each active_agent in tasks.json:
181
+ // - If agent NOT in runningAgents -> agent crashed
182
+ // - Reset that task to pending, remove from active_agents
183
+ // This prevents stale agent references from blocking the pipeline
184
+ ```
185
+
186
+ Resume pipeline after user pause or interruption.
187
+
188
+ 1. Audit tasks.json for inconsistencies:
189
+ - Tasks stuck in "in_progress" -> reset to "pending"
190
+ - Tasks with completed blockers but still "pending" -> include in spawn list
191
+ 2. Proceed to handleSpawnNext
192
+
193
+ ### handleComplete
194
+
195
+ **Cleanup Verification** (v4):
196
+ ```
197
+ // Verify all agents are properly closed
198
+ const remaining = list_agents({})
199
+ // If any team agents still running -> close_agent each
200
+ // Ensures clean session shutdown
201
+ ```
202
+
203
+ Triggered when all pipeline tasks are completed.
204
+
205
+ **Completion check**:
206
+
207
+ | Mode | Completion Condition |
208
+ |------|---------------------|
209
+ | page | All 4 tasks (+ any GC fix/recheck tasks) completed |
210
+ | feature | All 5 tasks (+ any GC fix/recheck tasks) completed |
211
+ | system | All 7 tasks (+ any GC fix/recheck tasks) completed |
212
+
213
+ 1. If any tasks not completed, return to handleSpawnNext
214
+ 2. If all completed, transition to coordinator Phase 5
215
+
216
+ ## Phase 4: State Persistence
217
+
218
+ After every handler execution:
219
+
220
+ 1. Update session.json with current state (active tasks, gc_rounds, last event)
221
+ 2. Verify tasks.json consistency
222
+ 3. STOP and wait for next event