@orchestrator-claude/definitions 3.30.1 → 3.31.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 (32) hide show
  1. package/agents/adversarial-reviewer.md +217 -0
  2. package/agents/azure-devops-engineer.md +805 -0
  3. package/agents/methodology-researcher.md +190 -0
  4. package/agents/operational-artifact-builder.md +173 -0
  5. package/agents/presentation-engineer.md +605 -0
  6. package/dist/scripts/generate-manifest.js +3 -3
  7. package/dist/scripts/generate-manifest.js.map +1 -1
  8. package/hooks/mailbox-listener.ts +246 -0
  9. package/hooks/pre-agent-dispatch.ts +57 -0
  10. package/hooks/sprint-registry.ts +85 -0
  11. package/hooks/verification-before-completion.ts +97 -0
  12. package/manifest.json +276 -3
  13. package/package.json +1 -1
  14. package/skills/artifact-generator/SKILL.md +385 -0
  15. package/skills/brainstorm-formalize/SKILL.md +272 -0
  16. package/skills/brainstorming/SKILL.md +167 -0
  17. package/skills/brainstorming/scripts/frame-template.html +214 -0
  18. package/skills/brainstorming/scripts/helper.js +88 -0
  19. package/skills/brainstorming/scripts/server.cjs +354 -0
  20. package/skills/brainstorming/scripts/start-server.sh +148 -0
  21. package/skills/brainstorming/scripts/stop-server.sh +56 -0
  22. package/skills/brainstorming/visual-companion.md +139 -0
  23. package/skills/compositional-intelligence/SKILL.md +93 -0
  24. package/skills/design-system-validated-loop/SKILL.md +366 -0
  25. package/skills/finishing-branch/SKILL.md +184 -0
  26. package/skills/orchestrator/SKILL.md +141 -0
  27. package/skills/persona-library/SKILL.md +365 -0
  28. package/skills/project-management-enterprise/SKILL.md +304 -0
  29. package/skills/receiving-code-review/SKILL.md +186 -0
  30. package/skills/sprint-launch/SKILL.md +176 -0
  31. package/skills/sprint-teammate/sprint-teammate.md +107 -0
  32. package/skills/systematic-debugging/SKILL.md +262 -0
@@ -0,0 +1,304 @@
1
+ ---
2
+ name: project-management-enterprise
3
+ description: PME workflow runtime playbook. Load when: "PME workflow", "consultoria", "consultoria externa", "consultoria interna", "software handoff", "cirurgico", "variant=consultoria-externa", or when starting/advancing a project_management_enterprise workflow. Provides variant selection guide, gate intensity tuning, persona pairing strategy, adversarial review iteration playbook, and phase lifecycle reference.
4
+ allowed-tools: Read
5
+ ---
6
+
7
+ # Skill: /project-management-enterprise (PME Workflow Runtime Playbook)
8
+
9
+ > **Scope:** this skill is loaded by the orchestrator when a `project_management_enterprise` workflow is being started, advanced, or evaluated. It covers variant selection, gate intensity, persona pairing, and adversarial review iteration. Orchestrator runtime call signatures live in `/orchestrator`. Universal invariants live in `CLAUDE.md`. The variant mechanic is governed by **ADR-020** and implemented in **RFC-031**; this skill is the operator guide for the PME consumer defined in **RFC-032**.
10
+
11
+ ---
12
+
13
+ ## When to Use This Skill
14
+
15
+ Load this skill when **any** of the following apply:
16
+
17
+ - User requests a "PME workflow", "consultoria", "consultoria externa", "consultoria interna", or "engajamento externo"
18
+ - User says "software handoff", "cirurgico", or "intervencao cirurgica"
19
+ - A `startWorkflow` call includes `type: "project_management_enterprise"`
20
+ - The prompt contains `variant=consultoria-externa`, `variant=consultoria-interna`, `variant=software-handoff`, or `variant=cirurgico`
21
+ - The orchestrator is advancing any of the five PME phases: DISCOVERY, RESEARCH, FRAMEWORK, OPERATIONAL, DELIVER
22
+ - The adversarial gate fires on the RESEARCH phase exit and guidance is needed on iteration protocol
23
+
24
+ **Do NOT load for:**
25
+
26
+ - `feature_development` workflows — use `/orchestrator` alone
27
+ - `bug_fix`, `refactoring`, or `emergency_debug` workflows
28
+ - Deliverable file generation — use `/artifact-generator` for xlsx/pdf/csv/docx output
29
+ - Markdown spec/plan/task authoring — use `/artifact-production`
30
+
31
+ ---
32
+
33
+ ## Variant Selection Guide
34
+
35
+ Use this section to choose the correct variant at `startWorkflow` time. The variant is immutable once set; pre-flight validation rejects unknown or empty variant names (RFC-032 §9 error code `VARIANT_NOT_FOUND` / `EMPTY_VARIANT_NAME`).
36
+
37
+ ### Variant Matrix
38
+
39
+ | Situation | Variant | Why |
40
+ |---|---|---|
41
+ | External client, full consultoria engagement, all phases, adversarial gate mandatory | `consultoria-externa` | Gate cell `REQ` — defends against methodology defects before framework is built; appropriate where methodology errors have reputational or contractual consequences |
42
+ | Internal team, methodology research EXECUTES (AMENDED S183 — research gate decision), adversarial gate optional | `consultoria-interna` | Research phase `EXEC`; gate cell `OPT` (default OFF); lighter path for teams with existing domain knowledge |
43
+ | Existing project handed to a vendor or software team, needs structured handoff package | `software-handoff` | All phases `EXEC`; gate cell `OPT`; `deliver` phase fires a transition rule that seeds a `feature_development` workflow with `framework_doc` and `deliverables_list` as inherited artifacts |
44
+ | Surgical scope fix, upstream framework already established, minimal artifact set | `cirurgico` | Discovery `EXEC`, Framework `SKIP`, Research `SKIP`, Operational `PARTIAL` (scope_brief + patch_summary), Deliver `EXEC`; gate `SKIP`; requires `framework` artifact_ref and `scope` file_ref at pre-flight |
45
+
46
+ ### Decision Tree
47
+
48
+ Answer these four questions in order:
49
+
50
+ ```
51
+ Q1. Is the primary audience external (client, regulator, board)?
52
+ YES --> Q2
53
+ NO --> consultoria-interna [lighter gate, research EXEC per S183]
54
+
55
+ Q2. Is there an existing framework / prior PME run that covers the research layer?
56
+ YES --> Q3
57
+ NO --> consultoria-externa [full run, gate REQ]
58
+
59
+ Q3. Will the final deliverable be handed off to a software team as a spec?
60
+ YES --> software-handoff [all phases EXEC, transition rule fires after deliver]
61
+ NO --> Q4
62
+
63
+ Q4. Is the scope narrow enough to fit a single targeted patch/intervention?
64
+ YES --> cirurgico [PARTIAL discovery + deliver, research SKIP, gate SKIP]
65
+ NO --> consultoria-externa [full run, gate REQ]
66
+ ```
67
+
68
+ ### Required Inputs by Variant
69
+
70
+ | Variant | Required at startWorkflow |
71
+ |---|---|
72
+ | `consultoria-externa` | `client_name` (string), `project_brief` (string) |
73
+ | `consultoria-interna` | `client_name` (string) |
74
+ | `software-handoff` | `client_name` (string), `repo_url` (string) |
75
+ | `cirurgico` | `framework` (artifact_ref), `scope` (file_ref) |
76
+
77
+ Missing any required input raises `MISSING_REQUIRED_INPUT` at pre-flight before the first phase dispatches (RFC-032 §9).
78
+
79
+ ---
80
+
81
+ ## Gate Intensity Tuning
82
+
83
+ The adversarial gate on the RESEARCH phase exit converges when `severity:high == 0` on the latest review artifact. This is the v1.0 default per **ADR-021 §3.2**. Adjust intensity by industry context:
84
+
85
+ ### Convergence Thresholds by Industry
86
+
87
+ | Industry | Convergence Criterion | Notes |
88
+ |---|---|---|
89
+ | Default (all industries) | `severity:high == 0` after <= 3 iterations | Baseline per ADR-021 |
90
+ | Finance / auditing | `severity:high == 0` AND `severity:medium == 0` | Tighter: regulatory standards require zero medium findings too |
91
+ | Healthcare / compliance-heavy | `severity:high == 0` AND `severity:medium == 0` | Same as finance; compliance audit trail must be clean |
92
+ | Marketing / brand | `severity:high <= 2` acceptable | Looser: subjective taste findings classified as high are common; threshold softened to avoid gate churn |
93
+ | Technology / SaaS internal | `severity:high == 0` (default) | Standard threshold applies |
94
+
95
+ **Architectural reference:** ADR-021 governs the gate-as-gate-not-phase principle. Per-gate configurability is a post-S183 follow-up (ADR-021 §3.2); these tuning rules are operator guidance until that follow-up lands.
96
+
97
+ ### Force-Pass Escape Hatch
98
+
99
+ If `severity:high > 0` remains after 3 iterations, the workflow escalates to the user:
100
+
101
+ - `--force-pass` — bypass gate, log the override in the `adversarial-review-log.md` artifact; workflow proceeds to FRAMEWORK
102
+ - `--abort` — cancel the workflow; no further phases dispatch
103
+
104
+ Force-pass is always logged. Never bypass silently. The 3-iteration HARD CAP is enforced by the gate runner; see Adversarial Review Iteration Playbook section below.
105
+
106
+ ---
107
+
108
+ ## Persona Pairing Strategy
109
+
110
+ The adversarial-reviewer agent receives a `persona_id` from the persona library (see `.claude/personas/INDEX.md` for the full catalog; current seed: `cfo-conservador`, `diretor-cetico-fmcg`, `designer-perfeccionista`, `auditor-compliance`). Select the persona that matches the primary stakeholder who will scrutinise the phase output.
111
+
112
+ ### Pairing Guide by Phase
113
+
114
+ **DISCOVERY phase**
115
+
116
+ Match persona to the client's seniority and domain:
117
+
118
+ | Client profile | Recommended persona |
119
+ |---|---|
120
+ | CFO / CEO / board-level | `cfo-conservador` or `diretor-cetico-fmcg` |
121
+ | Brand / creative director | `designer-perfeccionista` |
122
+ | Compliance / legal officer | `auditor-compliance` |
123
+ | Engineering / CTO | `engenheiro-cetico-construcao` (if seeded) |
124
+
125
+ **RESEARCH gate (adversarial-reviewer dispatch)**
126
+
127
+ - Primary: same persona selected for DISCOVERY (continuity of lens)
128
+ - Secondary (compliance-heavy industries): add `auditor-compliance` as a secondary reviewer in a second iteration pass to cover regulatory blind spots
129
+
130
+ **DELIVER gate**
131
+
132
+ Use the persona that matches the **actual stakeholder who signs off** on the deliverable, not the internal sponsor:
133
+
134
+ - External board / investor sign-off: `cfo-conservador`
135
+ - Brand committee sign-off: `designer-perfeccionista`
136
+ - Regulatory sign-off: `auditor-compliance`
137
+
138
+ ### Persona Override
139
+
140
+ The user may override persona selection at any phase via `--persona=<id>`. Record the override and rationale in `persona-selection-log.md` (operational phase artifact). Never silently ignore a user-specified persona.
141
+
142
+ ---
143
+
144
+ ## Adversarial Review Iteration Playbook
145
+
146
+ The adversarial gate fires at the RESEARCH to FRAMEWORK boundary when the variant gate cell is `REQ` or `OPT` (with `--adversarial=true`). The gate runner dispatches the `adversarial-reviewer` agent in a loop with a HARD CAP of 3 iterations per **ADR-021**.
147
+
148
+ ### Iteration Protocol
149
+
150
+ **Iteration 1 — Full critique**
151
+
152
+ - Dispatch `adversarial-reviewer` with `persona_id` and the `research-report.md` artifact
153
+ - Expect 5-10 findings across severity levels (`high`, `medium`, `low`)
154
+ - Store iteration artifacts: `methodology-research-v1.md`, `adversarial-review-{persona}-v1.md`
155
+ - If `severity:high == 0` on iteration 1 output, gate passes immediately (early exit)
156
+
157
+ **Iteration 2 — Revised artifact, focused critique**
158
+
159
+ - `methodology-researcher` revises research report addressing all `high` and `medium` findings
160
+ - Re-dispatch `adversarial-reviewer` with revised artifact (`methodology-research-v2.md`)
161
+ - Expect 1-3 findings remaining, concentrated on edge cases
162
+ - Store: `methodology-research-v2.md`, `adversarial-review-{persona}-v2.md`
163
+ - If `severity:high == 0`, gate passes (common exit point)
164
+
165
+ **Iteration 3 — Final critique**
166
+
167
+ - Second revision from `methodology-researcher` addressing remaining findings
168
+ - Re-dispatch `adversarial-reviewer` for final pass
169
+ - Store: `methodology-research-v3.md`, `adversarial-review-{persona}-v3.md`
170
+ - If `severity:high > 0` after iteration 3: BLOCKED — do not proceed silently
171
+
172
+ **BLOCKED state**
173
+
174
+ Present user escalation:
175
+
176
+ ```
177
+ Gate BLOCKED after 3 iterations.
178
+ Remaining high-severity findings:
179
+ {list findings from adversarial-review-v3.md}
180
+
181
+ Options:
182
+ --force-pass Accept research report as-is; override logged in audit trail
183
+ --abort Cancel workflow; no further phases dispatch
184
+ ```
185
+
186
+ Wait for explicit user response. Never auto-select `--force-pass`.
187
+
188
+ ### Artifact Audit Trail
189
+
190
+ Every iteration artifact is persisted in MinIO via `mcp__orchestrator-extended__artifactStore` before the next iteration begins:
191
+
192
+ | Artifact | artifact_kind | When stored |
193
+ |---|---|---|
194
+ | `methodology-research-v{n}.md` | `phase-artifact` | After each revision |
195
+ | `adversarial-review-{persona}-v{n}.md` | `adversarial_review` | After each reviewer dispatch |
196
+ | `adversarial-review-log.md` | `gate-log` | At gate resolution (pass or force-pass) |
197
+
198
+ The `adversarial-review-log.md` records all iterations, each finding's resolution, and the convergence outcome. It is omitted from the artifact set when the gate cell is `SKIP`.
199
+
200
+ ---
201
+
202
+ ## Workflow Lifecycle Reference
203
+
204
+ PME executes five phases in strict order. No phase may be skipped outside a declared variant cell of `SKIP` or `PARTIAL`. Checkpoints are written at every phase exit to support multi-session resumption (RFC-032 §3.5).
205
+
206
+ ### Phase Sequence
207
+
208
+ ```
209
+ DISCOVERY --> RESEARCH [+adversarial gate] --> FRAMEWORK --> OPERATIONAL --> DELIVER
210
+ ```
211
+
212
+ ### Per-Variant Phase Matrix (RFC-032 §5)
213
+
214
+ | Phase / Gate | consultoria-externa | consultoria-interna | software-handoff | cirurgico |
215
+ |---|---|---|---|---|
216
+ | DISCOVERY | EXEC | EXEC | EXEC | EXEC |
217
+ | RESEARCH | EXEC | EXEC <!-- AMENDED 2026-05-12 (S183) --> | EXEC | SKIP |
218
+ | Gate: adversarial | REQ | OPT | OPT | SKIP |
219
+ | FRAMEWORK | EXEC | EXEC | EXEC | SKIP |
220
+ | OPERATIONAL | EXEC | EXEC | EXEC | PARTIAL (scope_brief + patch_summary) |
221
+ | DELIVER | EXEC | EXEC | EXEC | EXEC |
222
+
223
+ `REQ` = gate always runs; `OPT` = opt-in via `--adversarial=true` (default OFF); `SKIP` = gate bypassed.
224
+ Source: RFC-032 §5 matrix. Variant mechanic: ADR-020 + RFC-031.
225
+
226
+ ### Canonical Artifacts by Phase (RFC-032 §8)
227
+
228
+ | Phase | Primary artifacts |
229
+ |---|---|
230
+ | DISCOVERY | `discovery-brief.md`, `stakeholder-map.md`, `discovery-inputs.json` |
231
+ | RESEARCH | `methodology-research.md`, `evidence-pack.md`, `sources.bib`, `adversarial-review-log.md` (when gate not SKIP) |
232
+ | FRAMEWORK | `framework-doc.md`, `playbook.md`, `framework-summary.md`, `framework-exhibits/` |
233
+ | OPERATIONAL | `operational-runbook.md`, `kpi-set.md`, `risk-register.md`, `implementation-checklist.md`, `persona-selection-log.md` |
234
+ | DELIVER | `deliverables-list.md`, `final-deck.pdf`, `closure-report.md`, `handoff-brief.md` (software-handoff only) |
235
+
236
+ All artifacts travel through `mcp__orchestrator-extended__artifactStore` / `artifactRetrieve`. Direct access to `.orchestrator/artifacts/*` is forbidden per Universal Charter §4.
237
+
238
+ ### Multi-Session Resumption
239
+
240
+ PME workflows are long-lived by design. On session resume:
241
+
242
+ 1. Call `getStatus({ workflowId })` to read current phase, variant, and stored artifacts
243
+ 2. Retrieve previous phase artifacts via `artifactRetrieve` — do not require user to re-specify
244
+ 3. Continue from the current phase; the variant is immutable (do not re-run pre-flight)
245
+
246
+ ---
247
+
248
+ ## Common Pitfalls
249
+
250
+ | Pitfall | Symptom | Fix |
251
+ |---|---|---|
252
+ | Choosing `consultoria-externa` for internal teams | Adversarial gate `REQ` creates unnecessary friction for teams with existing domain knowledge | Use `consultoria-interna`; gate is `OPT` and defaults OFF |
253
+ | Skipping persona consultation | Research critique is generic, not stakeholder-lens-calibrated; findings lack specificity | Select persona from `.claude/personas/INDEX.md` before dispatching `adversarial-reviewer`; log selection in `persona-selection-log.md` |
254
+ | Treating iteration 3 BLOCKED as failure | Operator abandons gate or bypasses silently | BLOCKED is a feature: it surfaces high-signal escalation points. Present user options (`--force-pass` or `--abort`), log the outcome, never auto-bypass |
255
+ | Forgetting `cirurgico` PARTIAL artifact declarations | `PreFlightValidator` raises `PARTIAL_MISSING_ARTIFACTS` (RFC-032 §9); workflow does not start | `cirurgico` discovery produces only `scope_brief.md`; deliver produces only `patch_summary.md` — ensure variant definition lists these slugs in the `artifacts` cell |
256
+ | Advancing FRAMEWORK before gate resolves | Research defects propagate into framework; methodology errors compound | Gate runner must receive explicit pass (convergence or `--force-pass`) before `advancePhase` is called on RESEARCH |
257
+ | Re-running pre-flight on session resume | Fails because `framework` artifact_ref required by `cirurgico` was resolved in prior session | On resume, read current phase from `getStatus` and skip pre-flight; variant and inputs are stored in PostgreSQL |
258
+
259
+ ---
260
+
261
+ ## Audit Trail Requirements
262
+
263
+ Every PME phase and gate interaction MUST be persisted. Missing MinIO records are not recoverable at container restart and break the workflow audit graph.
264
+
265
+ ### Required artifact_kind values
266
+
267
+ | Event | artifact_kind | artifactStore call |
268
+ |---|---|---|
269
+ | Phase output (any phase) | `phase-artifact` | After phase agent completes, before `advancePhase` |
270
+ | Adversarial reviewer dispatch | `adversarial_review` | After each reviewer iteration |
271
+ | Gate resolution (pass or force-pass) | `gate-log` | At gate exit |
272
+ | Final deliverable pack | `deliverable` | At DELIVER phase completion |
273
+
274
+ ### Call pattern (deferred-load, TD-098)
275
+
276
+ ```
277
+ # Step 1: load schema if not yet available
278
+ ToolSearch("select:mcp__orchestrator-extended__artifactStore")
279
+
280
+ # Step 2: store artifact
281
+ mcp__orchestrator-extended__artifactStore({
282
+ workflowId: "<workflow-id>",
283
+ phase: "<pme-phase-name>", # discovery | research | framework | operational | deliver
284
+ type: "<artifact_kind>",
285
+ content: "<artifact content>",
286
+ metadata: {
287
+ artifact_kind: "<phase-artifact|adversarial_review|gate-log|deliverable>",
288
+ variant: "<active-variant>",
289
+ persona_id: "<persona if applicable>",
290
+ iteration: <iteration-number if applicable>
291
+ }
292
+ })
293
+ ```
294
+
295
+ ---
296
+
297
+ ## Architectural References
298
+
299
+ This skill operationalises three architectural decisions. When in doubt, consult the source:
300
+
301
+ - **ADR-020** (`project-guidelines/adrs/ADR-020-WORKFLOW-MODE-PARAMETER-AS-UNIVERSAL-PATTERN.md`) — establishes `variant` as a first-class, universal workflow parameter; defines `EXEC / SKIP / PARTIAL / REQ / OPT` vocabulary
302
+ - **ADR-021** (`project-guidelines/adrs/ADR-021-ADVERSARIAL-REVIEW-AS-GATE-NOT-PHASE.md`) — mandates adversarial review as a gate row (not a phase), defines the 3-iteration cap and `REQ / OPT / SKIP` gate cell semantics, and reserves the `--force-pass` escape hatch
303
+ - **RFC-032** (`project-guidelines/rfcs/RFC-032-PROJECT-MANAGEMENT-ENTERPRISE-WORKFLOW.md`) — full PME workflow definition: 5 phases, 4 variants, variant matrix (§5), adversarial gate protocol (§6), agent stubs (§7), artifact lifecycle (§8), error codes (§9), and testing strategy (§10)
304
+ - **RFC-031** (`project-guidelines/rfcs/RFC-031-WORKFLOW-MODE-PARAMETER-CONDITIONAL-PHASE-EXECUTION.md`) — framework-wide variant mechanic implementation (JSON Schema, runtime resolution, pre-flight validation, phase-skip enforcement) that PME consumes as a first-class consumer
@@ -0,0 +1,186 @@
1
+ ---
2
+ name: receiving-code-review
3
+ description: "Use when receiving code review feedback, before implementing suggestions — requires technical rigor and verification, not performative agreement or blind implementation."
4
+ triggers:
5
+ - "When a PR reviewer leaves comments"
6
+ - "When the user asks you to address review feedback"
7
+ - "When external review feedback arrives"
8
+ - "Before implementing any review suggestion"
9
+ ---
10
+
11
+ # Code Review Reception
12
+
13
+ ## Overview
14
+
15
+ Code review requires technical evaluation, not emotional performance.
16
+
17
+ **Core principle:** Verify before implementing. Ask before assuming. Technical correctness over social comfort.
18
+
19
+ ## The Response Pattern
20
+
21
+ ```
22
+ WHEN receiving code review feedback:
23
+
24
+ 1. READ: Complete feedback without reacting
25
+ 2. UNDERSTAND: Restate requirement in own words (or ask)
26
+ 3. VERIFY: Check against codebase reality
27
+ 4. EVALUATE: Technically sound for THIS codebase?
28
+ 5. RESPOND: Technical acknowledgment or reasoned pushback
29
+ 6. IMPLEMENT: One item at a time, test each
30
+ ```
31
+
32
+ ## Forbidden Responses
33
+
34
+ **NEVER:**
35
+ - "You're absolutely right!" (explicit CLAUDE.md violation)
36
+ - "Great point!" / "Excellent feedback!" (performative)
37
+ - "Let me implement that now" (before verification)
38
+
39
+ **INSTEAD:**
40
+ - Restate the technical requirement
41
+ - Ask clarifying questions
42
+ - Push back with technical reasoning if wrong
43
+ - Just start working (actions > words)
44
+
45
+ ## Handling Unclear Feedback
46
+
47
+ ```
48
+ IF any item is unclear:
49
+ STOP - do not implement anything yet
50
+ ASK for clarification on unclear items
51
+
52
+ WHY: Items may be related. Partial understanding = wrong implementation.
53
+ ```
54
+
55
+ **Example:**
56
+ ```
57
+ User: "Fix 1-6"
58
+ You understand 1,2,3,6. Unclear on 4,5.
59
+
60
+ WRONG: Implement 1,2,3,6 now, ask about 4,5 later
61
+ RIGHT: "I understand items 1,2,3,6. Need clarification on 4 and 5 before proceeding."
62
+ ```
63
+
64
+ ## Source-Specific Handling
65
+
66
+ ### From the User (trusted)
67
+ - **Trusted** — implement after understanding
68
+ - **Still ask** if scope unclear
69
+ - **No performative agreement**
70
+ - **Skip to action** or technical acknowledgment
71
+
72
+ ### From External Reviewers
73
+ ```
74
+ BEFORE implementing:
75
+ 1. Check: Technically correct for THIS codebase?
76
+ 2. Check: Breaks existing functionality?
77
+ 3. Check: Reason for current implementation?
78
+ 4. Check: Works on all platforms/versions?
79
+ 5. Check: Does reviewer understand full context?
80
+
81
+ IF suggestion seems wrong:
82
+ Push back with technical reasoning
83
+
84
+ IF can't easily verify:
85
+ Say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"
86
+
87
+ IF conflicts with the user's prior architectural decisions:
88
+ Stop and discuss with the user first
89
+ ```
90
+
91
+ **Rule:** "External feedback — be skeptical, but check carefully"
92
+
93
+ ## YAGNI Check for "Professional" Features
94
+
95
+ ```
96
+ IF reviewer suggests "implementing properly":
97
+ grep codebase for actual usage
98
+
99
+ IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
100
+ IF used: Then implement properly
101
+ ```
102
+
103
+ **Rule:** "You and reviewer both report to me. If we don't need this feature, don't add it."
104
+
105
+ ## Implementation Order
106
+
107
+ ```
108
+ FOR multi-item feedback:
109
+ 1. Clarify anything unclear FIRST
110
+ 2. Then implement in this order:
111
+ - Blocking issues (breaks, security)
112
+ - Simple fixes (typos, imports)
113
+ - Complex fixes (refactoring, logic)
114
+ 3. Test each fix individually
115
+ 4. Verify no regressions
116
+ ```
117
+
118
+ ## When To Push Back
119
+
120
+ Push back when:
121
+ - Suggestion breaks existing functionality
122
+ - Reviewer lacks full context
123
+ - Violates YAGNI (unused feature)
124
+ - Technically incorrect for this stack
125
+ - Legacy/compatibility reasons exist
126
+ - Conflicts with the user's architectural decisions
127
+
128
+ **How to push back:**
129
+ - Use technical reasoning, not defensiveness
130
+ - Ask specific questions
131
+ - Reference working tests/code
132
+ - Involve the user if architectural
133
+
134
+ ## Acknowledging Correct Feedback
135
+
136
+ When feedback IS correct:
137
+ ```
138
+ "Fixed. [Brief description of what changed]"
139
+ "Good catch — [specific issue]. Fixed in [location]."
140
+ [Just fix it and show in the code]
141
+
142
+ NOT: "You're absolutely right!"
143
+ NOT: "Great point!"
144
+ NOT: "Thanks for catching that!"
145
+ NOT: ANY gratitude expression
146
+ ```
147
+
148
+ **Why no thanks:** Actions speak. Just fix it. The code itself shows you heard the feedback.
149
+
150
+ ## Gracefully Correcting Your Pushback
151
+
152
+ If you pushed back and were wrong:
153
+ ```
154
+ "You were right — I checked [X] and it does [Y]. Implementing now."
155
+ "Verified this and you're correct. My initial understanding was wrong because [reason]. Fixing."
156
+
157
+ NOT: Long apology
158
+ NOT: Defending why you pushed back
159
+ NOT: Over-explaining
160
+ ```
161
+
162
+ State the correction factually and move on.
163
+
164
+ ## Common Mistakes
165
+
166
+ | Mistake | Fix |
167
+ |---------|-----|
168
+ | Performative agreement | State requirement or just act |
169
+ | Blind implementation | Verify against codebase first |
170
+ | Batch without testing | One at a time, test each |
171
+ | Assuming reviewer is right | Check if breaks things |
172
+ | Avoiding pushback | Technical correctness > comfort |
173
+ | Partial implementation | Clarify all items first |
174
+ | Can't verify, proceed anyway | State limitation, ask for direction |
175
+
176
+ ## GitHub Thread Replies
177
+
178
+ When replying to inline review comments on GitHub, reply in the comment thread (`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`), not as a top-level PR comment.
179
+
180
+ ## The Bottom Line
181
+
182
+ **External feedback = suggestions to evaluate, not orders to follow.**
183
+
184
+ Verify. Question. Then implement.
185
+
186
+ No performative agreement. Technical rigor always.
@@ -0,0 +1,176 @@
1
+ ---
2
+ name: sprint-launch
3
+ description: >
4
+ Launch parallel Claude sessions in tmux for sprint execution.
5
+ Use when starting a sprint with independent tasks that benefit from parallel panes.
6
+ Supports duo, duo-doc, squad, squad-review, platoon, and platoon-full presets
7
+ covering 2 to 5+ pane configurations.
8
+ argument-hint: <preset> [workflow-id]
9
+ ---
10
+
11
+ # Sprint Launcher — RFC-025 v2
12
+
13
+ Launch parallel Claude sessions in tmux panes, each isolated in a git worktree, to execute sprint tasks concurrently.
14
+
15
+ ## When to Use
16
+
17
+ - Starting a sprint with 1-5 independent task tracks
18
+ - You want parallel agent sessions with worktree isolation
19
+ - RFC-021 Sprints, ADR-017 phases, or any feature work with clear task separation
20
+
21
+ ## Prerequisites
22
+
23
+ Before launching, verify:
24
+ 1. **tmux** is installed and on PATH (`tmux -V`)
25
+ 2. **claude** CLI is on PATH (`claude --version`)
26
+ 3. **git** repo is clean (no uncommitted changes that could conflict with worktrees)
27
+ 4. An active workflow exists (or you have a workflowId)
28
+
29
+ ## Presets
30
+
31
+ | Preset | Panes | Composition | Use When |
32
+ |--------|-------|-------------|----------|
33
+ | `duo` | 1 | 1 implementer | Simple sprint, 1 task track |
34
+ | `duo-doc` | 2 | 1 implementer + 1 doc-sidecar | Documentation-heavy work |
35
+ | `squad` | 3 | 2 implementers + 1 debug-sidecar | 2 parallel tracks with review |
36
+ | `squad-review` | 3 | 1 implementer + 1 debug-sidecar + 1 doc-sidecar | Quality-critical single track |
37
+ | `platoon` | 5 | 3 implementers + 1 reviewer + 1 debug-sidecar | 3 parallel tracks with review |
38
+ | `platoon-full` | 7 | 2 implementers + 2 doc-sidecars + 1 debug-sidecar + 1 test-sidecar + 1 reviewer | Complex sprint with full observability |
39
+
40
+ ## Protocol
41
+
42
+ **IMPORTANT: Always confirm with the user before launching.**
43
+
44
+ ### Step 1: Gather Parameters
45
+
46
+ Parse from user input or active workflow context:
47
+ - **preset**: one of the 6 presets above (required)
48
+ - **workflowId**: from active workflow or user input (optional — script generates one if missing)
49
+
50
+ ### Step 2: Confirm via AskUserQuestion
51
+
52
+ Before executing anything, present the launch plan:
53
+
54
+ ```
55
+ AskUserQuestion({
56
+ question: "Sprint Launch: {preset} preset\n\nSession: sprint-{wfId:0:8}\nPanes: {pane descriptions}\nWorktrees: ../wt-sprint-{wfId:0:8}-{0,1,...}\n\nProceed?",
57
+ options: ["Launch", "Change preset", "Cancel"]
58
+ })
59
+ ```
60
+
61
+ ### Step 3: Execute
62
+
63
+ On user approval, run via TypeScript launcher:
64
+
65
+ ```bash
66
+ npx tsx scripts/sprint-launch.ts {preset} {workflowId}
67
+
68
+ # With task distribution (--task is repeatable, round-robin to implementer panes):
69
+ npx tsx scripts/sprint-launch.ts {preset} {workflowId} --mailbox \
70
+ --task "TASK-001: Implement auth endpoint" \
71
+ --task "TASK-002: Write integration tests"
72
+
73
+ # With tasks fetched from REST API (graceful fallback if API unavailable):
74
+ npx tsx scripts/sprint-launch.ts {preset} {workflowId} --mailbox --fetch-tasks
75
+ ```
76
+
77
+ ### Step 4: Auto-attach
78
+
79
+ The script automatically attaches after launching panes and injecting startup prompts:
80
+
81
+ - **Inside tmux**: opens a horizontal split pointing at the new session — zero user action required
82
+ - **Outside tmux**: prints the attach command to console, e.g. `tmux attach -t sprint-{prefix}`
83
+
84
+ Startup prompts are injected into each pane automatically. If a pane fails to receive its prompt, auto-attach still proceeds.
85
+
86
+ ## Task Distribution
87
+
88
+ When launching with tasks, the launcher distributes them **round-robin to implementer panes only**.
89
+ Sidecar agents (doc-sidecar, debug-sidecar, test-sidecar) react to implementer progress via mailbox
90
+ and do not receive direct task_assignment messages from the launcher.
91
+
92
+ ### --task flag (repeatable)
93
+
94
+ ```bash
95
+ --task "TASK-001: Title"
96
+ ```
97
+
98
+ - Parses `TASK-001` as `taskId` and `Title` as `title`
99
+ - Produces a `task_assignment` mailbox message with `description: ''` and `acceptanceCriteria: []`
100
+ - Tasks are distributed round-robin: task[0] → implementer[0], task[1] → implementer[1], task[2] → implementer[0], etc.
101
+ - The task title is also injected into the pane's CLAUDE.md as a hint (via WorktreeIsolator)
102
+
103
+ ### --fetch-tasks flag
104
+
105
+ ```bash
106
+ --fetch-tasks
107
+ ```
108
+
109
+ - Calls `GET /api/workflows/{workflowId}/tasks` on the configured REST API (`ORCHESTRATOR_API_URL` env var, default `http://localhost:3000`)
110
+ - Appends fetched tasks to any `--task` CLI tasks
111
+ - Graceful fallback: if the API is unreachable or returns an error, prints a warning and continues with CLI tasks only
112
+
113
+ ### Agent Protocol
114
+
115
+ Agents receive tasks via the sprint-teammate skill. See `.claude/skills/sprint-teammate/sprint-teammate.md`.
116
+
117
+ ## Critical Rules
118
+
119
+ 1. **NEVER use `--bare` for implementer panes** — `--bare` suppresses hooks, skills, and MCP tools. Implementers MUST have access to these. The script uses `claude -p` (without `--bare`).
120
+ 2. **Always confirm before launching** — never auto-launch panes.
121
+ 3. **Worktrees are cleaned up on exit** — the script traps EXIT/SIGINT/SIGTERM and removes worktrees if interrupted.
122
+ 4. **ANTHROPIC_API_KEY warning** — if unset, script warns but continues (Max OAuth mode assumed).
123
+
124
+ ## Monitoring
125
+
126
+ After launch, check pane health:
127
+
128
+ ```bash
129
+ # Single check
130
+ ./scripts/sprint-status.sh sprint-{prefix} --once
131
+
132
+ # Continuous monitoring (10s interval)
133
+ ./scripts/sprint-status.sh sprint-{prefix}
134
+
135
+ # Custom interval
136
+ POLL_INTERVAL=5 ./scripts/sprint-status.sh sprint-{prefix}
137
+ ```
138
+
139
+ Output shows ALIVE (green) or DEAD (red) per pane.
140
+
141
+ ## Cleanup
142
+
143
+ Worktrees are auto-cleaned on script exit. If a crash leaves orphans:
144
+
145
+ ```bash
146
+ git worktree prune
147
+ git worktree list # verify no wt-sprint-* remain
148
+ ```
149
+
150
+ To kill a running sprint session:
151
+
152
+ ```bash
153
+ tmux kill-session -t sprint-{prefix}
154
+ ```
155
+
156
+ ## Examples
157
+
158
+ ```bash
159
+ # Simple sprint with 1 implementer (auto-attaches)
160
+ /sprint-launch duo
161
+
162
+ # Documentation-heavy sprint
163
+ /sprint-launch duo-doc adaaa9a4-ef49-4e26-af14-2b239f62b40c
164
+
165
+ # 2 parallel tracks
166
+ /sprint-launch squad
167
+
168
+ # 2 tracks with reviewer sidecar
169
+ /sprint-launch squad-review adaaa9a4-ef49-4e26-af14-2b239f62b40c
170
+
171
+ # 3 parallel tracks
172
+ /sprint-launch platoon
173
+
174
+ # 3 tracks with reviewer sidecar
175
+ /sprint-launch platoon-full adaaa9a4-ef49-4e26-af14-2b239f62b40c
176
+ ```