code-ai-installer 4.0.1-b → 4.0.1-c

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 (128) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +5 -5
  3. package/dist/catalog.js +1 -1
  4. package/dist/contentTransformer.d.ts +1 -1
  5. package/dist/contentTransformer.js +39 -0
  6. package/dist/index.js +10 -5
  7. package/dist/mcp/cli.js +4 -4
  8. package/dist/mcp/scorecard.d.ts +2 -2
  9. package/dist/mcp/task_state.d.ts +2 -2
  10. package/dist/mcp/tools/advance_gate.js +1 -1
  11. package/dist/mcp/tools/classify_gate.d.ts +2 -2
  12. package/dist/mcp/tools/classify_gate.js +2 -2
  13. package/dist/mcp/tools/load_role.d.ts +2 -2
  14. package/dist/mcp/tools/load_role.js +2 -2
  15. package/dist/mcp/tools/report_exception.d.ts +3 -3
  16. package/dist/mcp/tools/report_exception.js +4 -4
  17. package/dist/mcp/tools/request_decision.d.ts +3 -3
  18. package/dist/mcp/tools/request_decision.js +5 -5
  19. package/dist/mcp/tools/review_proposal.d.ts +1 -1
  20. package/dist/mcp/tools/review_proposal.js +6 -6
  21. package/dist/mcp/tools/sign_off.d.ts +2 -2
  22. package/dist/mcp/tools/sign_off.js +7 -7
  23. package/dist/mcp/tools/verify_claim.d.ts +1 -1
  24. package/dist/mcp/tools/verify_claim.js +1 -1
  25. package/dist/mcp_setup.d.ts +84 -31
  26. package/dist/mcp_setup.js +182 -66
  27. package/dist/platforms/adapters.js +54 -19
  28. package/dist/shared/frontmatter.js +1 -1
  29. package/dist/shared/persona.d.ts +1 -1
  30. package/dist/shared/persona.js +1 -1
  31. package/dist/shared/pipeline.d.ts +10 -10
  32. package/dist/shared/pipeline.js +7 -7
  33. package/dist/shared/tools.d.ts +15 -15
  34. package/dist/shared/tools.js +3 -3
  35. package/dist/shared/vocabulary.d.ts +4 -4
  36. package/dist/shared/vocabulary.js +4 -4
  37. package/dist/types.d.ts +1 -1
  38. package/domains/analytics/.agents/workflows/analytics-pipeline-rules.md +13 -3
  39. package/domains/analytics/.agents/workflows/analyze.md +1 -0
  40. package/domains/analytics/.agents/workflows/quick-insight.md +1 -0
  41. package/domains/analytics/locales/en/.agents/workflows/analytics-pipeline-rules.md +13 -3
  42. package/domains/analytics/locales/en/.agents/workflows/analyze.md +1 -0
  43. package/domains/analytics/locales/en/.agents/workflows/quick-insight.md +1 -0
  44. package/domains/analytics/locales/en/agents/interviewer.md +2 -1
  45. package/domains/analytics/locales/en/agents/layouter.md +2 -1
  46. package/domains/analytics/locales/en/agents/mediator.md +2 -1
  47. package/domains/analytics/locales/en/agents/researcher.md +2 -1
  48. package/domains/analytics/locales/en/agents/strategist.md +2 -1
  49. package/domains/analytics/pipeline.yaml +10 -10
  50. package/domains/content/.agents/skills/content-release-gate/SKILL.md +3 -5
  51. package/domains/content/.agents/workflows/content-pipeline-rules.md +14 -11
  52. package/domains/content/.agents/workflows/edit-content.md +0 -1
  53. package/domains/content/.agents/workflows/quick-post.md +0 -1
  54. package/domains/content/.agents/workflows/start-content.md +0 -1
  55. package/domains/content/agents/conductor.md +1 -2
  56. package/domains/content/locales/en/.agents/skills/content-release-gate/SKILL.md +3 -5
  57. package/domains/content/locales/en/.agents/workflows/content-pipeline-rules.md +14 -11
  58. package/domains/content/locales/en/.agents/workflows/edit-content.md +0 -1
  59. package/domains/content/locales/en/.agents/workflows/quick-post.md +0 -1
  60. package/domains/content/locales/en/.agents/workflows/start-content.md +0 -1
  61. package/domains/content/locales/en/agents/conductor.md +1 -2
  62. package/domains/content/pipeline.yaml +8 -8
  63. package/domains/development/.agents/skills/handoff/SKILL.md +276 -276
  64. package/domains/development/.agents/skills/lava-flow-legacy-detection/SKILL.md +197 -197
  65. package/domains/development/.agents/skills/mcp-integration/SKILL.md +211 -211
  66. package/domains/development/.agents/skills/qa-test-data-management/SKILL.md +250 -250
  67. package/domains/development/.agents/workflows/bugfix.md +16 -82
  68. package/domains/development/.agents/workflows/hotfix.md +16 -66
  69. package/domains/development/.agents/workflows/pipeline-rules.md +49 -132
  70. package/domains/development/.agents/workflows/start-task.md +17 -121
  71. package/domains/development/AGENTS.md +8 -3
  72. package/domains/development/agents/architect.md +247 -247
  73. package/domains/development/agents/conductor.md +363 -363
  74. package/domains/development/agents/devops.md +297 -297
  75. package/domains/development/agents/reviewer.md +293 -293
  76. package/domains/development/agents/senior_full_stack.md +295 -295
  77. package/domains/development/agents/tester.md +395 -395
  78. package/domains/development/locales/en/.agents/skills/handoff/SKILL.md +276 -276
  79. package/domains/development/locales/en/.agents/skills/lava-flow-legacy-detection/SKILL.md +197 -197
  80. package/domains/development/locales/en/.agents/skills/mcp-integration/SKILL.md +211 -211
  81. package/domains/development/locales/en/.agents/skills/qa-test-data-management/SKILL.md +250 -250
  82. package/domains/development/locales/en/.agents/workflows/bugfix.md +16 -82
  83. package/domains/development/locales/en/.agents/workflows/hotfix.md +15 -65
  84. package/domains/development/locales/en/.agents/workflows/pipeline-rules.md +48 -131
  85. package/domains/development/locales/en/.agents/workflows/start-task.md +17 -121
  86. package/domains/development/locales/en/AGENTS.md +15 -0
  87. package/domains/development/locales/en/agents/architect.md +247 -247
  88. package/domains/development/locales/en/agents/conductor.md +363 -363
  89. package/domains/development/locales/en/agents/devops.md +297 -297
  90. package/domains/development/locales/en/agents/reviewer.md +293 -293
  91. package/domains/development/locales/en/agents/senior_full_stack.md +295 -295
  92. package/domains/development/locales/en/agents/tester.md +395 -395
  93. package/domains/development/locales/en/prompt-examples.md +34 -120
  94. package/domains/development/pipeline.yaml +150 -135
  95. package/domains/development/prompt-examples.md +33 -119
  96. package/domains/product/.agents/workflows/product-pipeline-rules.md +13 -2
  97. package/domains/product/.agents/workflows/quick-pm.md +1 -1
  98. package/domains/product/.agents/workflows/shape-prioritize.md +1 -0
  99. package/domains/product/.agents/workflows/ship-right-thing.md +1 -0
  100. package/domains/product/.agents/workflows/spec.md +1 -0
  101. package/domains/product/agents/tech_lead.md +1 -1
  102. package/domains/product/locales/en/.agents/workflows/product-pipeline-rules.md +13 -2
  103. package/domains/product/locales/en/.agents/workflows/quick-pm.md +1 -1
  104. package/domains/product/locales/en/.agents/workflows/shape-prioritize.md +1 -0
  105. package/domains/product/locales/en/.agents/workflows/ship-right-thing.md +1 -0
  106. package/domains/product/locales/en/.agents/workflows/spec.md +1 -0
  107. package/domains/product/locales/en/agents/conductor.md +2 -2
  108. package/domains/product/locales/en/agents/data_analyst.md +2 -1
  109. package/domains/product/locales/en/agents/designer.md +2 -1
  110. package/domains/product/locales/en/agents/discovery.md +2 -1
  111. package/domains/product/locales/en/agents/layouter.md +2 -1
  112. package/domains/product/locales/en/agents/mediator.md +2 -1
  113. package/domains/product/locales/en/agents/pm.md +2 -1
  114. package/domains/product/locales/en/agents/product_strategist.md +2 -1
  115. package/domains/product/locales/en/agents/tech_lead.md +3 -2
  116. package/domains/product/locales/en/agents/ux_designer.md +2 -1
  117. package/domains/product/pipeline.yaml +12 -12
  118. package/package.json +5 -5
  119. package/domains/analytics/CONTEXT.md +0 -25
  120. package/domains/analytics/locales/en/CONTEXT.md +0 -25
  121. package/domains/content/CONTEXT.md +0 -19
  122. package/domains/content/locales/en/CONTEXT.md +0 -19
  123. package/domains/development/.agents/workflows/auto-restart-containers.md +0 -56
  124. package/domains/development/CONTEXT.md +0 -62
  125. package/domains/development/locales/en/.agents/workflows/auto-restart-containers.md +0 -24
  126. package/domains/development/locales/en/CONTEXT.md +0 -62
  127. package/domains/product/CONTEXT.md +0 -40
  128. package/domains/product/locales/en/CONTEXT.md +0 -40
@@ -1,74 +1,24 @@
1
1
  ---
2
- description: Launch the minimal 2-gate pipeline for trivial fixes (hotfix). Use for trivial fixes with blast radius ≈ 0.
2
+ description: Launch the minimal hotfix pipeline (DEV fix+test RG).
3
3
  ---
4
4
 
5
- # /hotfix — Launch Hotfix Pipeline (2 gates)
5
+ # /hotfix — hotfix pipeline (2 gates)
6
6
 
7
- > 🟡 **Mode:** Hotfix for trivial fixes with minimal risk.
8
- > Full pipeline: `/start-task`. Bugfix (more serious): `/bugfix`.
7
+ > 🟡 For trivial fixes, blast radius 0. More serious — `/bugfix`, full — `/start-task`.
8
+ > Absolute rules in `pipeline-rules`.
9
9
 
10
- ## When to use
10
+ ## When
11
+ - Typos, CSS fixes (color/padding/size), single-line logic, copy-paste error.
12
+ - 1–2 files, contracts unchanged.
11
13
 
12
- - Typos in text/code
13
- - CSS fixes (color, padding, font size)
14
- - Single-line logic fix
15
- - Copy-paste error
16
- - Blast radius ≈ 0 (affects 1–2 files, does not change contracts)
14
+ ## Do NOT use
15
+ - > 2 files `/bugfix`; changes an API contract → `/bugfix` or `/start-task`; changes UI layout/screens → `/start-task`; unsure → ask the user.
17
16
 
18
- ## Do NOT use if
19
-
20
- - Affects > 2 files`/bugfix`
21
- - Changes API contract `/bugfix` or `/start-task`
22
- - Changes UI layout / adds screens `/start-task`
23
- - Unsure → ask the user
24
-
25
- ## Step 0: Load rules
26
-
27
- Execute `/pipeline-rules` — read the rules BEFORE starting work.
28
-
29
- ## Step 1: CONDUCTOR — Classification
30
-
31
- 1. Execute `view_file` on `agents/conductor.md`
32
- 2. Confirm the task = hotfix (per Decision Tree: blast radius ≈ 0, 1–2 files)
33
- 3. Create Mini Checklist:
34
- ```
35
- [ ] HF-DEV-01 Fix + test + service restart (if applicable)
36
- [ ] HF-VERIFY Self-check + GO/NO-GO
37
- ```
38
- 4. `notify_user` → wait for **Approved**
39
-
40
- ## Step 2: DEV+TEST — Fix and self-verification
41
-
42
- 1. Execute `view_file` on `agents/senior_full_stack.md`
43
- 2. TDD:
44
- - RED: test reproducing the issue (if applicable)
45
- - GREEN: minimal fix
46
- - REFACTOR: if necessary
47
- 3. JSDoc on modified functions
48
- 4. Restart affected services if applicable
49
- 5. Self-verification:
50
- - Does the fix work?
51
- - Do tests pass?
52
- - No regressions?
53
- 6. Verdict: **GO ✅ / NO-GO ❌**
54
- 7. `notify_user` → wait for **Approved**
55
-
56
- ---
17
+ ## Flow
18
+ The Conductor confirms hotfix. A combined **DEV (fix+test)** gate via the MCP flow:
19
+ - TDD where applicable (REDGREEN → REFACTOR), JSDoc; self-check.
20
+ - Auto-pass on a green `run_tests`; signed `mcp` (tester co-signs).
21
+ - **RG** final release, signed by **the user** (`user`).
57
22
 
58
23
  ## When in doubt
59
-
60
- If during work it becomes clear that the task is more complex than a hotfix:
61
- > ⚠️ "Task turned out to be more complex than a hotfix. Recommend switching to /bugfix."
62
-
63
- Switching — only with user Approved.
64
-
65
- ---
66
-
67
- ## Prompt template
68
-
69
- ```
70
- @AGENTS.md /hotfix
71
-
72
- What to fix: [description, 1 sentence].
73
- File: [specific file].
74
- ```
24
+ If it turns out bigger than a hotfix mid-work: "Task is more complex than a hotfix → recommend `/bugfix`." Switching is the user's decision.
@@ -1,163 +1,80 @@
1
1
  ---
2
- description: Absolute development pipeline rules. MUST NOT be violated.
2
+ description: Absolute development pipeline rules. The code-ai MCP gate machine.
3
3
  ---
4
4
 
5
- # 🔴 ABSOLUTE RULE: Pipeline must not be skipped
5
+ # 🔴 ABSOLUTE RULE: pipeline must not be skipped
6
6
 
7
- **This rule has no exceptions. Violation = blocker.**
7
+ **No exceptions. Violation = blocker.** The pipeline runs on the `code-ai` MCP state machine: the source of truth is `pipeline.yaml`, transitions go through MCP tools (below).
8
8
 
9
9
  ## Pipeline — 3 Modes
10
10
 
11
11
  ### 🔵 Full Pipeline (8 gates) — `/start-task`
12
- CONDUCTOR → PM → UX → ARCH → DEV → REV → OPS → TEST → RG
12
+ PM → UX → ARCH → DEV → REV → OPS → TEST → RG
13
13
 
14
- ### 🟢 Bugfix Pipeline (4 gates) — `/bugfix`
15
- CONDUCTOR → DEV → REV → TEST
14
+ ### 🟢 Bugfix Pipeline (3 gates) — `/bugfix`
15
+ DEV → REV → TEST
16
16
 
17
17
  ### 🟡 Hotfix Pipeline (2 gates) — `/hotfix`
18
- CONDUCTORDEV+TEST
18
+ DEV (fix+test) RG
19
+
20
+ > CONDUCTOR is not a gate but the orchestrator role: it classifies the task, picks the mode (Decision Tree below), and receives no new skills (uses `$board`, `$handoff`, `$gates`).
19
21
 
20
22
  ### Decision Tree (mode selection)
21
23
  ```
22
24
  User task
23
-
24
- ├─ New feature / refactoring / new API / new screen?
25
- │ └─ 🔵 Full Pipeline
26
-
25
+ ├─ New feature / refactoring / new API / screen? → 🔵 Full
27
26
  ├─ Bug in existing functionality?
28
- │ ├─ Affects > 2 files or changes API contract?
29
- │ └─ 🟢 Bugfix (4 gates)
30
- │ ├─ Affects 1–2 files, blast radius ≈ 0?
31
- │ │ └─ 🟡 Hotfix (2 gates)
27
+ │ ├─ > 2 files or changes the API contract? → 🟢 Bugfix
28
+ ├─ 1–2 files, blast radius ≈ 0? → 🟡 Hotfix
32
29
  │ └─ Unsure → ask the user
33
-
34
- └─ User explicitly specified mode (/bugfix, /hotfix)?
35
- └─ Use the specified mode
30
+ └─ User specified the mode explicitly (/bugfix, /hotfix) → use it
36
31
  ```
37
32
 
38
- > Conductor **does not receive new skills** — uses existing `$board`, `$handoff`, `$gates`.
33
+ ## How a gate is passed (MCP flow)
39
34
 
40
- ## Mandatory actions on EVERY gate (all modes)
35
+ On every gate, in order:
36
+ 1. `current_gate` — confirm the current gate and its requirements.
37
+ 2. `classify_gate` — classify the outcome: `auto_resolve` (safe to move), `fork` (needs a user decision → `request_decision`), `exception` (failure → `report_exception`).
38
+ 3. `load_role` on the gate's owner role → pass its protocol step by step; load required skills via `get_skill`.
39
+ 4. Produce the deliverable + `submit_artifact`.
40
+ 5. `sign_off` — sign the gate per its policy (see the sign-off model).
41
+ 6. `advance_gate` — move to the next gate.
41
42
 
42
- 1. `view_file` on `agents/<role>.md`read the agent protocol
43
- 2. Follow **its** instructions, use **its** skills
44
- 3. Produce deliverable + Handoff Envelope
45
- 4. Present the result to the user via `notify_user`
46
- 5. **Wait for explicit "Approved" from the user** before moving to the next gate
43
+ ## 🟢 Sign-off modelsilent-by-default (reduced intervention)
47
44
 
48
- ---
45
+ The machine flows silently; the user is pulled in only for judgment decisions.
49
46
 
50
- ## 🛑 STOP RULES (before any code action)
51
-
52
- ### Rule 1: Agent protocol step by step, no collapsing
53
- Each paragraph (§) in the agent file = **a separate step**.
54
- - Agent MUST pass ALL paragraphs in the order specified in the file
55
- - Collapsing multiple §§ into a single response is forbidden
56
- - If agent skips a §, it MUST state the reason: "§X skipped: [reason]"
57
-
58
- ### Rule 2: Code is applied ONLY after full protocol pass
59
- - ❌ Must not: write code first → then write the report
60
- - ✅ Must: pass all §§ of the protocol → present plan → Approved → apply code
61
-
62
- ### Rule 3: Full response format — no shortcuts
63
- - Use **"Agent Response Format (strict)"** from the agent file
64
- - Every section of the format is MANDATORY — skipping = violation
65
- - If a section is not applicable, explicitly write: "N/A — [reason]"
66
-
67
- ### Rule 4: Fix Cycle — full pass through agents
68
- On FAIL at any gate:
69
- 1. Current agent (e.g. Tester) produces FAIL Report + HANDOFF Envelope → DEV
70
- 2. DEV reads `agents/senior_full_stack.md` and passes FULL protocol (§0–§7)
71
- 3. DEV HANDOFF → REV → OPS → TEST (each gate with view_file + protocol + Approved)
72
- 4. No "quick fixes" without passing through agents
73
-
74
- ### Rule 5: Self-check before notify_user
75
- Before each `notify_user` the agent MUST internally verify:
76
- - [ ] Did I read the agent file (`view_file` on `agents/<role>.md`)?
77
- - [ ] Did I pass ALL paragraphs of the protocol?
78
- - [ ] Am I using the FULL response format?
79
- - [ ] Is there a HANDOFF Envelope with ALL mandatory fields?
80
- - [ ] Did I NOT apply code before receiving Approved?
47
+ | Gate | Signed by | How |
48
+ |------|-----------|-----|
49
+ | PM / UX / ARCH | **User** (`user`) | judgment decision: what & why we build |
50
+ | DEV / REV | Claude (`mcp`) | by agent judgment (development / review) |
51
+ | OPS / TEST | Claude (`mcp`) | after a green auto-check: `build` (OPS), `run_tests` (TEST) |
52
+ | RG | **User** (`user`) | final release |
81
53
 
82
- ---
54
+ - The user sees only: judgment gates (PM/UX/ARCH/RG) and an explicit escalation via `request_decision` (a `fork` classification).
55
+ - Routine passes are not confirmed by the user.
83
56
 
84
- ## Prohibited
57
+ ## 🔁 Red, Fix Cycle and Circuit Breaker
85
58
 
86
- - "Fast-tracking" gates (skipping multiple gates at once)
87
- - Interpreting "Confirmed" as permission to skip gates
88
- - Starting the pipeline without explicit user permission
89
- - ❌ Moving to the next gate without "Approved" from the user
90
- - ❌ Writing code (DEV gate) before passing prior gates
91
- - ❌ Applying code before completing the full agent protocol
92
- - ❌ Shortening the response format (every section is mandatory)
93
- - ❌ Ignoring protocol paragraphs, considering the task "trivial"
94
- - ❌ Lying about reading the protocol (if no `view_file` — it was not read)
59
+ - A **red auto-check** (OPS/TEST) or a review/test FAIL → rollback to **DEV** (Fix Cycle), not to the user. DEV fixes → forward along the band again.
60
+ - **Circuit Breaker:** 2 rollbacks to DEV across the DEV/OPS/REV/TEST band (`dev_rollback_threshold`) → the machine refuses to advance and requires an **architect deep audit in a FRESH session** (clean context: the same Claude that hit the wall reproduces the blind spot). Audit skills: `system-design-checklist`, `current-state-analysis`, `design-patterns-reference`.
61
+ - **Counter reset:** on passing RG or on a new ARCH ADR (`record_decision` at the ARCH gate).
95
62
 
96
- ---
63
+ ## ✅ What is mandatory (kept)
97
64
 
98
- ## 🔒 MECHANICAL BLOCKS
65
+ - Gates must not be skipped, merged, or reordered without an explicit user decision.
66
+ - Every gate has a concrete deliverable; without it the gate is not closed (`$gates` check).
67
+ - The role protocol is passed step by step, no collapsing; a skipped step needs an explicit reason.
68
+ - TDD at DEV: RED → GREEN → REFACTOR.
69
+ - Decisions affecting architecture/contracts are recorded as an ADR via `record_decision`.
99
70
 
100
- > These rules were introduced after an incident where the agent ignored the pipeline,
101
- > auto-approved the ARCH gate, ignored an open user question,
102
- > wrote code without TDD, and delivered a broken preview.
71
+ ## 📊 Touchpoint budget (health signal)
103
72
 
104
- ### Block 1: ShouldAutoProceed = false ALWAYS
105
- ```
106
- notify_user → ShouldAutoProceed: false
107
- ```
108
- No exceptions. On EVERY notify_user. Even on "trivial" gates.
109
- Even if the agent is "confident". The user ALWAYS decides.
110
-
111
- ### Block 2: Pre-flight check before ANY write_to_file / replace_file_content
112
- Before every code-writing tool call the agent MUST:
113
- 1. Quote the LAST user message containing the word "Approved"
114
- 2. If there is no quote — CODE MUST NOT BE WRITTEN
115
- 3. System-generated messages are NOT considered "Approved"
116
- 4. Auto-proceeded artifacts are NOT considered "Approved"
117
-
118
- ### Block 3: Answering a question — quoting is mandatory
119
- If the agent asked the user a question:
120
- 1. The agent's next response MUST start with: `> Your answer: [exact quote]`
121
- 2. If there is no quote — no answer was given — STOP, repeat the question
122
- 3. Guessing the answer for the user is forbidden
123
- 4. Accepting a system-generated message as an answer is forbidden
124
-
125
- ### Block 4: Strict TDD (DEV gate)
126
- 1. RED: write FAILING tests FIRST
127
- 2. GREEN: minimal code to make tests pass
128
- 3. REFACTOR: improve code without changing behavior
129
- 4. Writing code before tests = violation = blocker
130
-
131
- ### Block 5: Skills — mandatory reading via view_file
132
- Each agent (`agents/<role>.md`) references skills in `.agents/skills/`.
133
- 1. Agent MUST execute `view_file` on `SKILL.md` of EVERY skill referenced in the agent protocol
134
- 2. If there was no `view_file` — the skill is NOT considered applied
135
- 3. Patterns, anti-patterns, code examples, best practices from skills — mandatory for application
136
- 4. In the deliverable the agent MUST state: `Skills applied: [list]` with `view_file` confirmation
137
- 5. Formal checkmarks without actual reading = violation = blocker
73
+ Expected number of user touchpoints per task type (from `pipeline.yaml`): hotfix 1; bugfix 1–2; backend feature 1–3; UI feature with an ARCH fork 3–5; complex (3+ Fix Cycles) 3–6. Going over is a reason to revisit scope, not to "push through".
138
74
 
139
- ---
75
+ ## ❌ Prohibited
140
76
 
141
- ## Mandatory artifacts
142
-
143
- ### task.md (Antigravity brain automatic)
144
- - **Created by:** Conductor at Gate 0
145
- - **Updated by:** EVERY agent after completing their gate
146
- - **Contains:** Master Checklist + Handoff Envelopes Status + Fix Cycle tracking
147
- - **Rule:** If task.md is not updated after a gate — the gate is not considered complete
148
-
149
- ### implementation_plan.md
150
- - **Created by:** Architect at Gate 3 (ARCH) — or Conductor, if the task does not require ARCH
151
- - **Saved to:** `docs/reports/architect/plan-<task-name>.md` (in the project)
152
- - **Contains:** Proposed Changes + files + Verification Plan
153
- - **Rule:** DEV must read the plan before starting implementation. Reviewer references it during code review.
154
-
155
- ### walkthrough.md (Antigravity brain — automatic)
156
- - **Created by:** Tester at Gate 7 (TEST) — or Release Gate
157
- - **Contains:** what was done, what was verified, validation results
158
- - **Rule:** update on each Fix Cycle and before Release Gate
159
-
160
- ### docs/architecture.md + docs/ADR-log.md (in the project)
161
- - **Updated by:** Architect on any architectural decision
162
- - **Referenced by:** Reviewer and Architect on each gate
163
- - **Rule:** New ADRs are added to ADR-log.md. Architecture.md is updated when the stack, patterns, or constraints change
77
+ - Skipping gates or "fast-tracking" several at once.
78
+ - Advancing a gate without `sign_off` per its policy.
79
+ - Writing code (DEV) before passing the prior gates and before a plan.
80
+ - Silently bypassing the rollback/breaker: 2 rollbacks → an ARCH audit, not "one more try" in the same context.
@@ -1,130 +1,26 @@
1
1
  ---
2
- description: Template for launching a task through the 8-agent pipeline. Use at the start of EVERY session.
2
+ description: Launch a task through the full pipeline (8 gates). The code-ai MCP gate machine.
3
3
  ---
4
4
 
5
- # /start-task — Launch a task through the pipeline
5
+ # /start-task — launch the full pipeline
6
6
 
7
- ## Step 0: Select pipeline mode
7
+ Full mode: PM UX → ARCH → DEV → REV → OPS → TEST → RG.
8
+ Bugfix → `/bugfix`, trivial fix (blast radius ≈ 0) → `/hotfix`.
9
+ Absolute rules — in `pipeline-rules` (the code-ai MCP gate machine).
8
10
 
9
- Determine the task type and choose the workflow:
10
- - 🔵 **New feature / refactoring** continue with `/start-task` (this file)
11
- - 🟢 **Bugfix** (> 2 files, non-trivial) switch to `/bugfix`
12
- - 🟡 **Hotfix** (1–2 files, blast radius ≈ 0) → switch to `/hotfix`
11
+ ## 1. Start
12
+ - The Conductor classifies the task and confirms the mode (Decision Tree in `pipeline-rules`).
13
+ - The Conductor initializes the board (`$board`) and the initial handoff (`$handoff`). It receives no new skills.
13
14
 
14
- > If you selected `/bugfix` or `/hotfix` stop reading this file and follow the chosen workflow.
15
+ ## 2. Each gateMCP flow
16
+ `current_gate` → `classify_gate` → `load_role` (the gate's role) + `get_skill` → deliverable + `submit_artifact` → `sign_off` → `advance_gate`.
15
17
 
16
- ## Step 1: Load pipeline rules
18
+ ## 3. Sign-off silent-by-default
19
+ - **The user signs only PM / UX / ARCH / RG** (judgment decisions) and `fork` escalations via `request_decision`.
20
+ - DEV / REV — Claude (`mcp`) by judgment; OPS / TEST — auto-pass on a green `build` / `run_tests`.
17
21
 
18
- Execute `/pipeline-rules` read and acknowledge ALL rules BEFORE starting work.
22
+ ## 4. Clarifying questions
23
+ Agents with a Clarification section (PM 5+, ARCH 5–10, Tester 5+) ask questions BEFORE working and wait for the answer. Exception — the user wrote "no questions".
19
24
 
20
- ## Step 2: Initialize agents
21
- Execute `view_file` on `AGENTS.md` confirm the list of agents and skills.
22
-
23
- ## Step 3: Launch the Conductor
24
- Execute `view_file` on `agents/conductor.md` — read the protocol and create the Master Checklist in `task.md`.
25
-
26
- ## Step 4: Pass each gate STRICTLY by protocol
27
-
28
- On EVERY gate, mandatory steps:
29
- 1. `view_file` on `agents/<role>.md` — read the agent protocol
30
- 2. Pass EACH section of the protocol in order (no "collapsing")
31
- 3. Use the **full** "Agent Response Format (strict)" from the agent file
32
- 4. If a section is not applicable — explicitly write: "N/A — [reason]"
33
- 5. Produce deliverable + Handoff Envelope with ALL mandatory fields
34
- 6. Present the result via `notify_user`
35
- 7. **Wait for explicit "Approved"** before moving to the next gate
36
-
37
- ## Step 5: Code — ONLY after DEV gate + Approved
38
-
39
- - First, the DEV agent passes ALL sections of the protocol (§0–§7)
40
- - Then proposes the change plan
41
- - User approves
42
- - ONLY THEN the agent applies code
43
-
44
- ## Step 6: Fix Cycle (on FAIL)
45
-
46
- If the tester or reviewer finds a bug:
47
- 1. Current agent produces FAIL Report + HANDOFF Envelope → DEV
48
- 2. User approves FAIL HANDOFF
49
- 3. DEV reads `agents/senior_full_stack.md` and passes the FULL protocol
50
- 4. DEV HANDOFF → REV → OPS → TEST (each gate with full protocol)
51
- 5. No "quick fixes" without passing through agents
52
-
53
- ---
54
-
55
- ## First prompt template (copy and fill)
56
-
57
- ```
58
- @AGENTS.md /pipeline-rules
59
-
60
- Task: [what to do, 1-2 sentences].
61
- Files: [specific files, if known].
62
-
63
- Rules:
64
- 1. Start with the Conductor (agents/conductor.md)
65
- 2. Each gate: view_file → ALL protocol sections → full format → Approved
66
- 3. Do not apply code until DEV gate + my Approved
67
- 4. Fix Cycle = full pass through agents
68
- ```
69
-
70
- ---
71
-
72
- ## Session recommendations
73
-
74
- - **One session = 3-4 gates maximum** (context is preserved)
75
- - **Approved is given on EACH gate**, not per session
76
- - **Session 1:** Conductor → Approved → PM → Approved → UX → Approved
77
- - **Session 2:** ARCH → Approved → DEV → Approved → REV → Approved
78
- - **Session 3:** OPS → Approved → TEST → Approved → RG → Approved
79
- - Each new session — start with `/start-task`
80
-
81
- ## Mandatory questions from agents
82
-
83
- Each agent that has a Clarification/Questions section in their protocol MUST:
84
- 1. Ask questions to the user BEFORE performing work
85
- 2. Minimum questions (from agent protocol): PM — 5+, ARCH — 5-10, DEV — as needed, Tester — 5+
86
- 3. If the task seems "obvious" — still ask at minimum 2-3 clarifying questions
87
- 4. Wait for user answers BEFORE continuing
88
- 5. The only exception: the user explicitly wrote "no questions"
89
-
90
- ## When "cutting corners" — one phrase
91
-
92
- If the model shortcuts, say:
93
- > "Stop. Section [X] of protocol agents/<role>.md. Re-read and execute."
94
-
95
- ---
96
-
97
- ## Feedback protocol (mandatory)
98
-
99
- The model MUST provide feedback to the user at every stage:
100
-
101
- ### 1. Warning when tempted to shortcut
102
- If the task looks "trivial", the model MUST write:
103
- ```
104
- ⚠️ Task looks trivial. My instinct is to do it quickly.
105
- But following the protocol, I'm going through the full cycle. Sections: [list].
106
- ```
107
-
108
- ### 2. User prompt assessment
109
- At the start of each task the model assesses the prompt:
110
- ```
111
- 📊 Prompt assessment:
112
- - Clarity: [high/medium/low]
113
- - What helped: [what was useful]
114
- - What's missing: [what to add for effectiveness]
115
- ```
116
-
117
- ### 3. Tips in Handoff Envelope
118
- In each Handoff add a section:
119
- ```
120
- 💡 Feedback: [tip for the user, if any]
121
- ```
122
-
123
- ### 4. Retrospective at session end
124
- Before finishing work:
125
- ```
126
- 🔄 Retrospective:
127
- - Gates passed: X
128
- - Protocol violations: X
129
- - What to improve in the next session: [recommendation]
130
- ```
25
+ ## 5. Fix Cycle / breaker
26
+ Red (review/test FAIL, red auto-check) → rollback to DEV. 2 rollbacks across the DEV/OPS/REV/TEST band an architect deep audit in a fresh session (see `pipeline-rules`).
@@ -184,3 +184,18 @@ function add(a, b) {
184
184
  ## Mandatory TDD rule
185
185
  - Apply the TDD cycle to all development tasks: RED -> GREEN -> REFACTOR.
186
186
  - This requirement is mandatory for DEV and REV stages (same as JSDoc).
187
+
188
+ ---
189
+
190
+ ## Mandatory Docker container restart rule
191
+ - For every code change, DevOps must automatically restart the affected Docker service before handing off to REVIEW/TEST. This is an **implicit** rule — it runs as part of the task, without asking for separate permission.
192
+ - **Service resolution (do not hardcode names from a specific product):**
193
+ - Inspect the active Compose file (`docker-compose.yml`, `docker-compose.yaml`, `compose.yml`, or `compose.yaml`).
194
+ - Identify the owner of the changed path via `build.context`, bind-mounted `volumes`, and the repo's service-naming conventions.
195
+ - Restart the **Compose service** name, not the container name (container names are project-specific).
196
+ - **Commands:**
197
+ - Runtime-code-only changes: `docker compose restart <service>`.
198
+ - `Dockerfile`/dependency/build/compose-config changes: `docker compose up -d --build <service>`.
199
+ - Multiple affected services in one command: `docker compose restart <service_one> <service_two>`.
200
+ - Infrastructure-only changes (`infra/`, compose files, reverse-proxy config) and config/env-only changes do **not** trigger an app-service restart. For proxy/gateway/shared-routing changes, also restart `gateway`.
201
+ - DevOps must attach evidence to the report: which services were restarted, which commands ran, and the health/smoke result after restart.