code-ai-installer 1.5.1 → 1.5.2

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.
@@ -1,121 +1,130 @@
1
- ---
2
- description: Шаблон запуска задачи через 8-агентный пайплайн. Используй в начале КАЖДОЙ сессии.
3
- ---
4
-
5
- # /start-task — Запуск задачи через пайплайн
6
-
7
- ## Шаг 1: Загрузить правила пайплайна
8
-
9
- Выполни `/pipeline-rules` прочитай и подтверди ВСЕ правила ПЕРЕД началом работы.
10
-
11
- ## Шаг 2: Инициализировать агентов
12
- Выполни `view_file` на `AGENTS.md` подтверди список агентов и skills.
13
-
14
- ## Шаг 3: Запустить Дирижёра
15
- Выполни `view_file` на `agents/conductor.md` — прочитай протокол и создай Master Checklist в `task.md`.
16
-
17
- ## Шаг 4: Пройти каждый гейт СТРОГО по протоколу
18
-
19
- На КАЖДОМ гейте обязательно:
20
- 1. `view_file` на `agents/<role>.md` — прочитать протокол агента
21
- 2. Пройти КАЖДУЮ секцию протокола по порядку (не «схлопывать»)
22
- 3. Использовать **полный** «Формат ответа агента (строго)» из файла агента
23
- 4. Если секция не применима — явно написать: «N/A — [причина]»
24
- 5. Сформировать deliverable + Handoff Envelope со ВСЕМИ обязательными полями
25
- 6. Представить результат через `notify_user`
26
- 7. **Ждать явный "Approved"** перед переходом к следующему гейту
27
-
28
- ## Шаг 5: Код — ТОЛЬКО после DEV gate + Approved
29
-
30
- - Сначала DEV-агент проходит ВСЕ секции протокола (§0–§7)
31
- - Потом предлагает план изменений
32
- - Пользователь одобряет
33
- - ТОЛЬКО ПОТОМ агент применяет код
34
-
35
- ## Шаг 6: Fix Cycle (при FAIL)
36
-
37
- Если тестер или ревьюер нашёл баг:
38
- 1. Текущий агент выдаёт FAIL Report + HANDOFF Envelope → DEV
39
- 2. Пользователь одобряет FAIL HANDOFF
40
- 3. DEV читает `agents/senior_full_stack.md` и проходит ПОЛНЫЙ протокол
41
- 4. DEV HANDOFF → REV → OPS → TEST (каждый гейт с полным протоколом)
42
- 5. Никаких «быстрых фиксов» без прохода через агентов
43
-
44
- ---
45
-
46
- ## Шаблон первого промпта (копируй и заполни)
47
-
48
- ```
49
- @AGENTS.md /pipeline-rules
50
-
51
- Задача: [что сделать, 1-2 предложения].
52
- Файлы: [конкретные файлы, если известны].
53
-
54
- Правила:
55
- 1. Начинай с Дирижёра (agents/conductor.md)
56
- 2. Каждый гейт: view_file → ВСЕ секции протокола → полный формат → Approved
57
- 3. Код не применять до DEV gate + мой Approved
58
- 4. Fix Cycle = полный проход через агентов
59
- ```
60
-
61
- ---
62
-
63
- ## Рекомендации по сессиям
64
-
65
- - **Одна сессия = 3-4 гейта максимум** (контекст не теряется)
66
- - **Approved даётся на КАЖДОМ гейте**, не на сессию
67
- - **Сессия 1:** Conductor Approved PM → Approved → UX → Approved
68
- - **Сессия 2:** ARCH → Approved → DEV → Approved → REV → Approved
69
- - **Сессия 3:** OPS → Approved → TEST → Approved → RG → Approved
70
- - Каждая новая сессия — начинай с `/start-task`
71
-
72
- ## Обязательные вопросы от агентов
73
-
74
- Каждый агент, у которого в протоколе есть Clarification/Questions секция, ОБЯЗАН:
75
- 1. Задать вопросы пользователю ПЕРЕД выполнением работы
76
- 2. Минимум вопросов (из протокола агента): PM 5+, ARCH 5-10, DEV — по необходимости, Tester — 5+
77
- 3. Если задача кажется «очевидной» всё равно задать минимум 2-3 уточняющих вопроса
78
- 4. Ждать ответы пользователя ПЕРЕД продолжением
79
- 5. Единственное исключение: пользователь явно написал «вопросов не задавай»
80
-
81
- ## При «срезании углов» — одна фраза
82
-
83
- Если модель сокращает, скажи:
84
- > «Стоп. Секция [X] протокола agents/<role>.md. Перечитай и выполни.»
85
-
86
- ---
87
-
88
- ## Протокол обратной связи (обязательно)
89
-
90
- Модель ОБЯЗАНА предоставлять обратную связь пользователю на каждом этапе:
91
-
92
- ### 1. Предупреждение при соблазне срезать
93
- Если задача выглядит «тривиальной», модель ОБЯЗАНА написать:
94
- ```
95
- ⚠️ Задача выглядит тривиальной. Мой инстинкт — сделать быстро.
96
- Но по протоколу прохожу полный цикл. Секции: [список].
97
- ```
98
-
99
- ### 2. Оценка промпта пользователя
100
- В начале каждой задачи модель оценивает промпт:
101
- ```
102
- 📊 Оценка промпта:
103
- - Чёткость: [высокая/средняя/низкая]
104
- - Что хорошо: [что помогло]
105
- - Чего не хватает: [что добавить для эффективности]
106
- ```
107
-
108
- ### 3. Подсказки в Handoff Envelope
109
- В каждом Handoff добавлять секцию:
110
- ```
111
- 💡 Feedback: [совет для пользователя, если есть]
112
- ```
113
-
114
- ### 4. Ретроспектива в конце сессии
115
- Перед завершением работы:
116
- ```
117
- 🔄 Ретроспектива:
118
- - Гейтов пройдено: X
119
- - Нарушений протокола: X
120
- - Что улучшить в следующей сессии: [рекомендация]
1
+ ---
2
+ description: Шаблон запуска задачи через 8-агентный пайплайн. Используй в начале КАЖДОЙ сессии.
3
+ ---
4
+
5
+ # /start-task — Запуск задачи через пайплайн
6
+
7
+ ## Шаг 0: Выбрать режим пайплайна
8
+
9
+ Определи тип задачи и выбери workflow:
10
+ - 🔵 **Новая фича / рефакторинг** → продолжай по `/start-task` (этот файл)
11
+ - 🟢 **Багфикс** (> 2 файлов, нетривиальный) → переключись на `/bugfix`
12
+ - 🟡 **Hotfix** (1–2 файла, blast radius 0) → переключись на `/hotfix`
13
+
14
+ > Если выбран `/bugfix` или `/hotfix` — прекрати чтение этого файла и следуй выбранному workflow.
15
+
16
+ ## Шаг 1: Загрузить правила пайплайна
17
+
18
+ Выполни `/pipeline-rules` — прочитай и подтверди ВСЕ правила ПЕРЕД началом работы.
19
+
20
+ ## Шаг 2: Инициализировать агентов
21
+ Выполни `view_file` на `AGENTS.md` подтверди список агентов и skills.
22
+
23
+ ## Шаг 3: Запустить Дирижёра
24
+ Выполни `view_file` на `agents/conductor.md` прочитай протокол и создай Master Checklist в `task.md`.
25
+
26
+ ## Шаг 4: Пройти каждый гейт СТРОГО по протоколу
27
+
28
+ На КАЖДОМ гейте обязательно:
29
+ 1. `view_file` на `agents/<role>.md` — прочитать протокол агента
30
+ 2. Пройти КАЖДУЮ секцию протокола по порядку (не «схлопывать»)
31
+ 3. Использовать **полный** «Формат ответа агента (строго)» из файла агента
32
+ 4. Если секция не применима — явно написать: «N/A — [причина]»
33
+ 5. Сформировать deliverable + Handoff Envelope со ВСЕМИ обязательными полями
34
+ 6. Представить результат через `notify_user`
35
+ 7. **Ждать явный "Approved"** перед переходом к следующему гейту
36
+
37
+ ## Шаг 5: Код ТОЛЬКО после DEV gate + Approved
38
+
39
+ - Сначала DEV-агент проходит ВСЕ секции протокола (§0–§7)
40
+ - Потом предлагает план изменений
41
+ - Пользователь одобряет
42
+ - ТОЛЬКО ПОТОМ агент применяет код
43
+
44
+ ## Шаг 6: Fix Cycle (при FAIL)
45
+
46
+ Если тестер или ревьюер нашёл баг:
47
+ 1. Текущий агент выдаёт FAIL Report + HANDOFF Envelope → DEV
48
+ 2. Пользователь одобряет FAIL HANDOFF
49
+ 3. DEV читает `agents/senior_full_stack.md` и проходит ПОЛНЫЙ протокол
50
+ 4. DEV HANDOFF → REV → OPS → TEST (каждый гейт с полным протоколом)
51
+ 5. Никаких «быстрых фиксов» без прохода через агентов
52
+
53
+ ---
54
+
55
+ ## Шаблон первого промпта (копируй и заполни)
56
+
57
+ ```
58
+ @AGENTS.md /pipeline-rules
59
+
60
+ Задача: [что сделать, 1-2 предложения].
61
+ Файлы: [конкретные файлы, если известны].
62
+
63
+ Правила:
64
+ 1. Начинай с Дирижёра (agents/conductor.md)
65
+ 2. Каждый гейт: view_file ВСЕ секции протокола полный формат → Approved
66
+ 3. Код не применять до DEV gate + мой Approved
67
+ 4. Fix Cycle = полный проход через агентов
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Рекомендации по сессиям
73
+
74
+ - **Одна сессия = 3-4 гейта максимум** (контекст не теряется)
75
+ - **Approved даётся на КАЖДОМ гейте**, не на сессию
76
+ - **Сессия 1:** Conductor Approved PM Approved UX Approved
77
+ - **Сессия 2:** ARCH Approved DEV Approved REV → Approved
78
+ - **Сессия 3:** OPS Approved → TEST → Approved → RG → Approved
79
+ - Каждая новая сессия начинай с `/start-task`
80
+
81
+ ## Обязательные вопросы от агентов
82
+
83
+ Каждый агент, у которого в протоколе есть Clarification/Questions секция, ОБЯЗАН:
84
+ 1. Задать вопросы пользователю ПЕРЕД выполнением работы
85
+ 2. Минимум вопросов (из протокола агента): PM — 5+, ARCH — 5-10, DEV — по необходимости, Tester — 5+
86
+ 3. Если задача кажется «очевидной» — всё равно задать минимум 2-3 уточняющих вопроса
87
+ 4. Ждать ответы пользователя ПЕРЕД продолжением
88
+ 5. Единственное исключение: пользователь явно написал «вопросов не задавай»
89
+
90
+ ## При «срезании углов» одна фраза
91
+
92
+ Если модель сокращает, скажи:
93
+ > «Стоп. Секция [X] протокола agents/<role>.md. Перечитай и выполни.»
94
+
95
+ ---
96
+
97
+ ## Протокол обратной связи (обязательно)
98
+
99
+ Модель ОБЯЗАНА предоставлять обратную связь пользователю на каждом этапе:
100
+
101
+ ### 1. Предупреждение при соблазне срезать
102
+ Если задача выглядит «тривиальной», модель ОБЯЗАНА написать:
103
+ ```
104
+ ⚠️ Задача выглядит тривиальной. Мой инстинкт — сделать быстро.
105
+ Но по протоколу прохожу полный цикл. Секции: [список].
106
+ ```
107
+
108
+ ### 2. Оценка промпта пользователя
109
+ В начале каждой задачи модель оценивает промпт:
110
+ ```
111
+ 📊 Оценка промпта:
112
+ - Чёткость: [высокая/средняя/низкая]
113
+ - Что хорошо: [что помогло]
114
+ - Чего не хватает: [что добавить для эффективности]
115
+ ```
116
+
117
+ ### 3. Подсказки в Handoff Envelope
118
+ В каждом Handoff добавлять секцию:
119
+ ```
120
+ 💡 Feedback: [совет для пользователя, если есть]
121
+ ```
122
+
123
+ ### 4. Ретроспектива в конце сессии
124
+ Перед завершением работы:
125
+ ```
126
+ 🔄 Ретроспектива:
127
+ - Гейтов пройдено: X
128
+ - Нарушений протокола: X
129
+ - Что улучшить в следующей сессии: [рекомендация]
121
130
  ```
@@ -0,0 +1,90 @@
1
+ ---
2
+ description: Launch the shortened 4-gate pipeline for bug fixes. Use instead of /start-task for bugfix tasks.
3
+ ---
4
+
5
+ # /bugfix — Launch Bugfix Pipeline (4 gates)
6
+
7
+ > 🟢 **Mode:** Bugfix — for fixing bugs in existing functionality.
8
+ > Full pipeline: `/start-task`. Hotfix (trivial): `/hotfix`.
9
+
10
+ ## When to use
11
+
12
+ - Bug in logic, API errors, broken validation, data issues
13
+ - Affects > 2 files or non-trivial blast radius
14
+ - Does NOT change UI layout, does NOT add new API, does NOT change data schema (otherwise → `/start-task`)
15
+
16
+ ## Step 0: Load rules
17
+
18
+ Execute `/pipeline-rules` — read the rules BEFORE starting work.
19
+
20
+ ## Step 1: CONDUCTOR — Classification
21
+
22
+ 1. Execute `view_file` on `agents/conductor.md`
23
+ 2. Confirm the task = bugfix (per Decision Tree)
24
+ 3. Create Mini Checklist:
25
+ ```
26
+ [ ] BF-DEV-01 Fix + TDD + Handoff Envelope
27
+ [ ] BF-REV-01 Code review + regression check + Handoff Envelope
28
+ [ ] BF-TEST-01 Verification + regression smoke + GO/NO-GO
29
+ ```
30
+ 4. `notify_user` → wait for **Approved**
31
+
32
+ ## Step 2: DEV — TDD Fix
33
+
34
+ 1. Execute `view_file` on `agents/senior_full_stack.md`
35
+ 2. Follow the protocol (skipping §1 UX review and §6 DEMO):
36
+ - §0: Context + read skills
37
+ - §2: Analyze bug + root cause
38
+ - §3: RED — write a failing test reproducing the bug
39
+ - §4: GREEN — minimal code to make the test pass
40
+ - §5: REFACTOR — improve without changing behavior
41
+ - §7: JSDoc on modified functions
42
+ 3. Restart affected services if applicable
43
+ 4. Form Handoff Envelope → REV
44
+ 5. `notify_user` → wait for **Approved**
45
+
46
+ ## Step 3: REV — Code Review
47
+
48
+ 1. Execute `view_file` on `agents/reviewer.md`
49
+ 2. Review focus:
50
+ - Does the test actually reproduce the bug (RED phase)?
51
+ - Does the fix create side effects?
52
+ - Is regression risk assessed?
53
+ - Is JSDoc in place?
54
+ 3. Form Handoff Envelope → TEST
55
+ 4. `notify_user` → wait for **Approved**
56
+
57
+ ## Step 4: TEST — Verification
58
+
59
+ 1. Execute `view_file` on `agents/tester.md`
60
+ 2. Verify:
61
+ - Bug is fixed (per reproduction steps)
62
+ - No regression (smoke on affected modules)
63
+ - Tests pass (CI green)
64
+ 3. Issue verdict: **GO ✅ / NO-GO ❌**
65
+ 4. `notify_user` → wait for **Approved**
66
+
67
+ ---
68
+
69
+ ## On FAIL at REV or TEST
70
+
71
+ 1. Agent produces FAIL Report + Handoff → DEV
72
+ 2. DEV fixes → Handoff → REV → TEST (cycle repeats)
73
+ 3. Approved is required at every gate
74
+
75
+ ---
76
+
77
+ ## Prompt template
78
+
79
+ ```
80
+ @AGENTS.md /bugfix
81
+
82
+ Bug: [bug description, 1-2 sentences].
83
+ Reproduction: [steps, if known].
84
+ Files: [affected files, if known].
85
+
86
+ Rules:
87
+ 1. Bugfix Pipeline: CONDUCTOR → DEV → REV → TEST
88
+ 2. TDD is mandatory (RED → GREEN → REFACTOR)
89
+ 3. Approved at every gate
90
+ ```
@@ -0,0 +1,74 @@
1
+ ---
2
+ description: Launch the minimal 2-gate pipeline for trivial fixes (hotfix). Use for trivial fixes with blast radius ≈ 0.
3
+ ---
4
+
5
+ # /hotfix — Launch Hotfix Pipeline (2 gates)
6
+
7
+ > 🟡 **Mode:** Hotfix — for trivial fixes with minimal risk.
8
+ > Full pipeline: `/start-task`. Bugfix (more serious): `/bugfix`.
9
+
10
+ ## When to use
11
+
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)
17
+
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
+ ---
57
+
58
+ ## 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
+ ```
@@ -1,24 +1,163 @@
1
- ---
2
- description: Absolute development pipeline rules. MUST NOT BE BROKEN.
3
1
  ---
2
+ description: Absolute development pipeline rules. MUST NOT be violated.
3
+ ---
4
+
5
+ # 🔴 ABSOLUTE RULE: Pipeline must not be skipped
6
+
7
+ **This rule has no exceptions. Violation = blocker.**
8
+
9
+ ## Pipeline — 3 Modes
10
+
11
+ ### 🔵 Full Pipeline (8 gates) — `/start-task`
12
+ CONDUCTOR → PM → UX → ARCH → DEV → REV → OPS → TEST → RG
4
13
 
5
- # Pipeline Rules
14
+ ### 🟢 Bugfix Pipeline (4 gates) — `/bugfix`
15
+ CONDUCTOR → DEV → REV → TEST
6
16
 
7
- The pipeline must not be skipped.
17
+ ### 🟡 Hotfix Pipeline (2 gates) — `/hotfix`
18
+ CONDUCTOR → DEV+TEST
8
19
 
9
- ## Pipeline
10
- TEST → PM → UX → ARCH → DEV → REV → OPS → TEST
20
+ ### Decision Tree (mode selection)
21
+ ```
22
+ User task
23
+
24
+ ├─ New feature / refactoring / new API / new screen?
25
+ │ └─ 🔵 Full Pipeline
26
+
27
+ ├─ 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)
32
+ │ └─ Unsure → ask the user
33
+
34
+ └─ User explicitly specified mode (/bugfix, /hotfix)?
35
+ └─ Use the specified mode
36
+ ```
11
37
 
12
- ## Mandatory actions at every gate
13
- 1. Read `agents/<role>.md`
14
- 2. Follow that role protocol and its skills
38
+ > Conductor **does not receive new skills** — uses existing `$board`, `$handoff`, `$gates`.
39
+
40
+ ## Mandatory actions on EVERY gate (all modes)
41
+
42
+ 1. `view_file` on `agents/<role>.md` — read the agent protocol
43
+ 2. Follow **its** instructions, use **its** skills
15
44
  3. Produce deliverable + Handoff Envelope
16
- 4. Present result to the user
17
- 5. Wait for explicit `Approved` before moving forward
18
-
19
- ## Forbidden
20
- - Fast-tracking gates
21
- - Writing code before the required gates are complete
22
- - Skipping mandatory protocol sections
23
- - Treating generic confirmation as permission to skip gates
24
- - Claiming a protocol was read when it was not
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
47
+
48
+ ---
49
+
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?
81
+
82
+ ---
83
+
84
+ ## Prohibited
85
+
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)
95
+
96
+ ---
97
+
98
+ ## 🔒 MECHANICAL BLOCKS
99
+
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.
103
+
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
138
+
139
+ ---
140
+
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