@orchestrator-claude/definitions 3.30.2 → 3.31.1

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 (34) 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/agents/reviewer.md +3 -1
  7. package/dist/scripts/generate-manifest.js +3 -3
  8. package/dist/scripts/generate-manifest.js.map +1 -1
  9. package/hooks/mailbox-listener.ts +246 -0
  10. package/hooks/pre-agent-dispatch.ts +57 -0
  11. package/hooks/sprint-registry.ts +85 -0
  12. package/hooks/verification-before-completion.ts +97 -0
  13. package/manifest.json +278 -5
  14. package/package.json +1 -1
  15. package/skills/artifact-generator/SKILL.md +385 -0
  16. package/skills/brainstorm-formalize/SKILL.md +272 -0
  17. package/skills/brainstorming/SKILL.md +167 -0
  18. package/skills/brainstorming/scripts/frame-template.html +214 -0
  19. package/skills/brainstorming/scripts/helper.js +88 -0
  20. package/skills/brainstorming/scripts/server.cjs +354 -0
  21. package/skills/brainstorming/scripts/start-server.sh +148 -0
  22. package/skills/brainstorming/scripts/stop-server.sh +56 -0
  23. package/skills/brainstorming/visual-companion.md +139 -0
  24. package/skills/compositional-intelligence/SKILL.md +93 -0
  25. package/skills/design-system-validated-loop/SKILL.md +366 -0
  26. package/skills/finishing-branch/SKILL.md +184 -0
  27. package/skills/orchestrator/SKILL.md +158 -0
  28. package/skills/persona-library/SKILL.md +365 -0
  29. package/skills/project-management-enterprise/SKILL.md +304 -0
  30. package/skills/receiving-code-review/SKILL.md +186 -0
  31. package/skills/release/SKILL.md +41 -0
  32. package/skills/sprint-launch/SKILL.md +176 -0
  33. package/skills/sprint-teammate/sprint-teammate.md +107 -0
  34. 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.
@@ -250,6 +250,46 @@ git commit -m "chore: sync definitions manifest checksums"
250
250
 
251
251
  **REGRA:** Nunca faca release com definitions alteradas sem manifest actualizado. Isso causa uma release extra desnecessaria (como aconteceu no v3.9.3 -> v3.9.4).
252
252
 
253
+ ## Secret Audit (Quarterly — TD-S188-003)
254
+
255
+ Release CI/CD depende de 3 secrets em `.github/workflows/release.yml`:
256
+
257
+ | Secret | Purpose | Notas |
258
+ |---|---|---|
259
+ | `NPM_TOKEN` | Publica `@orchestrator-claude/*` packages | type=Automation (bypassa 2FA em CI). 404 PUT durante publish = token issue, NÃO scope-missing (S186 hard rule). |
260
+ | `DOCKER_PASSWORD` | Login Docker Hub (user `cmac01`) | NÃO confundir com `DOCKER_TOKEN`. S186 release quebrou porque release.yml linhas 40+83 referenciavam o nome errado. Cross-reference `grep DOCKER_ release.yml` antes de instruir user a regerar secret. |
261
+ | `DOCKER_USERNAME` | Docker Hub user identifier | Raramente roda; muda só se conta migrar. |
262
+
263
+ **Hard rule:** Antes de QUALQUER release, audite idade dos 3 secrets críticos. Se algum > 90 dias, **bloqueie release** e rotacione primeiro.
264
+
265
+ ### Comando de audit
266
+
267
+ ```bash
268
+ # Lista timestamp + idade em dias dos 3 secrets críticos do release.yml
269
+ gh secret list --json name,updatedAt | jq -r \
270
+ '.[] | select(.name | IN("NPM_TOKEN","DOCKER_PASSWORD","DOCKER_USERNAME")) |
271
+ "\(.name)\tupdated \(.updatedAt)\tage \(((now - (.updatedAt | fromdateiso8601)) / 86400 | floor))d"'
272
+ ```
273
+
274
+ Output esperado (idade < 90d em todos):
275
+ ```
276
+ DOCKER_PASSWORD updated 2026-02-10T... age 92d ← ROTACIONAR
277
+ DOCKER_USERNAME updated 2025-08-15T... age 271d ← stable, mas confirme válido
278
+ NPM_TOKEN updated 2026-04-20T... age 23d ← OK
279
+ ```
280
+
281
+ ### Rotação de secret expirante
282
+
283
+ 1. **Pause release** — NÃO execute `release.sh`.
284
+ 2. Regere o secret na origem:
285
+ - `NPM_TOKEN`: https://www.npmjs.com/settings/<user>/tokens (Generate New → Automation type)
286
+ - `DOCKER_PASSWORD`: Docker Hub → Account Settings → Security → New Access Token
287
+ 3. Atualize no GitHub: `gh secret set <NAME> --body "<new-value>"` (executar do CWD repo)
288
+ 4. Re-rode comando de audit acima — confirmar `updatedAt` fresco (idade < 1d).
289
+ 5. Proceda com release.
290
+
291
+ **Histórico:** S186 release pipeline broke porque DOCKER_PASSWORD estava ausente (incorretamente referenciado como `DOCKER_TOKEN` em `release.yml` linhas 40+83). Aprendizagem capturada em hard rules S185→S188 carryover (BACKLOG).
292
+
253
293
  ## Checklist Pre-Release
254
294
 
255
295
  - [ ] CHANGELOG.md atualizado com todas as mudancas
@@ -259,3 +299,4 @@ git commit -m "chore: sync definitions manifest checksums"
259
299
  - [ ] Na branch main
260
300
  - [ ] Dry-run executado e revisado
261
301
  - [ ] Definitions manifest sincronizado (se houve alteracao em definitions)
302
+ - [ ] **Secret audit executado** — nenhum dos 3 secrets críticos (`NPM_TOKEN`, `DOCKER_PASSWORD`, `DOCKER_USERNAME`) > 90 dias (ver seção "Secret Audit")