@event4u/agent-config 1.18.0 → 1.20.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 (181) hide show
  1. package/.agent-src/commands/agent-handoff.md +14 -10
  2. package/.agent-src/commands/chat-history/import.md +170 -0
  3. package/.agent-src/commands/chat-history/learn.md +178 -0
  4. package/.agent-src/commands/chat-history/show.md +17 -18
  5. package/.agent-src/commands/chat-history.md +26 -25
  6. package/.agent-src/commands/council/default.md +77 -82
  7. package/.agent-src/commands/create-pr.md +28 -8
  8. package/.agent-src/commands/feature/roadmap.md +22 -0
  9. package/.agent-src/commands/roadmap/create.md +38 -6
  10. package/.agent-src/commands/roadmap/execute.md +36 -9
  11. package/.agent-src/commands/sync-gitignore.md +1 -1
  12. package/.agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +76 -0
  13. package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +3 -3
  14. package/.agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +5 -12
  15. package/.agent-src/rules/agent-authority.md +1 -0
  16. package/.agent-src/rules/agent-docs.md +1 -0
  17. package/.agent-src/rules/analysis-skill-routing.md +1 -0
  18. package/.agent-src/rules/architecture.md +1 -0
  19. package/.agent-src/rules/artifact-drafting-protocol.md +1 -0
  20. package/.agent-src/rules/artifact-engagement-recording.md +1 -0
  21. package/.agent-src/rules/ask-when-uncertain.md +1 -0
  22. package/.agent-src/rules/augment-portability.md +1 -0
  23. package/.agent-src/rules/augment-source-of-truth.md +1 -0
  24. package/.agent-src/rules/autonomous-execution.md +1 -0
  25. package/.agent-src/rules/capture-learnings.md +1 -0
  26. package/.agent-src/rules/cli-output-handling.md +2 -2
  27. package/.agent-src/rules/command-suggestion-policy.md +1 -0
  28. package/.agent-src/rules/commit-conventions.md +1 -0
  29. package/.agent-src/rules/commit-policy.md +1 -0
  30. package/.agent-src/rules/context-hygiene.md +22 -0
  31. package/.agent-src/rules/direct-answers.md +11 -2
  32. package/.agent-src/rules/docker-commands.md +1 -0
  33. package/.agent-src/rules/docs-sync.md +1 -0
  34. package/.agent-src/rules/downstream-changes.md +1 -0
  35. package/.agent-src/rules/e2e-testing.md +1 -0
  36. package/.agent-src/rules/guidelines.md +1 -0
  37. package/.agent-src/rules/improve-before-implement.md +1 -0
  38. package/.agent-src/rules/language-and-tone.md +38 -6
  39. package/.agent-src/rules/laravel-translations.md +1 -0
  40. package/.agent-src/rules/markdown-safe-codeblocks.md +1 -0
  41. package/.agent-src/rules/minimal-safe-diff.md +1 -0
  42. package/.agent-src/rules/missing-tool-handling.md +1 -0
  43. package/.agent-src/rules/model-recommendation.md +1 -0
  44. package/.agent-src/rules/no-attribution-footers.md +48 -0
  45. package/.agent-src/rules/no-cheap-questions.md +1 -0
  46. package/.agent-src/rules/no-roadmap-references.md +2 -1
  47. package/.agent-src/rules/non-destructive-by-default.md +1 -0
  48. package/.agent-src/rules/onboarding-gate.md +26 -0
  49. package/.agent-src/rules/package-ci-checks.md +1 -0
  50. package/.agent-src/rules/php-coding.md +1 -0
  51. package/.agent-src/rules/preservation-guard.md +1 -0
  52. package/.agent-src/rules/review-routing-awareness.md +1 -0
  53. package/.agent-src/rules/reviewer-awareness.md +1 -0
  54. package/.agent-src/rules/roadmap-progress-sync.md +22 -0
  55. package/.agent-src/rules/role-mode-adherence.md +2 -2
  56. package/.agent-src/rules/rule-type-governance.md +1 -0
  57. package/.agent-src/rules/runtime-safety.md +1 -0
  58. package/.agent-src/rules/scope-control.md +1 -0
  59. package/.agent-src/rules/security-sensitive-stop.md +1 -0
  60. package/.agent-src/rules/size-enforcement.md +1 -0
  61. package/.agent-src/rules/skill-improvement-trigger.md +1 -0
  62. package/.agent-src/rules/skill-quality.md +50 -0
  63. package/.agent-src/rules/slash-command-routing-policy.md +39 -0
  64. package/.agent-src/rules/think-before-action.md +1 -0
  65. package/.agent-src/rules/token-efficiency.md +1 -0
  66. package/.agent-src/rules/tool-safety.md +1 -0
  67. package/.agent-src/rules/ui-audit-gate.md +1 -0
  68. package/.agent-src/rules/upstream-proposal.md +1 -0
  69. package/.agent-src/rules/user-interaction.md +22 -5
  70. package/.agent-src/rules/verify-before-complete.md +1 -0
  71. package/.agent-src/skills/ai-council/SKILL.md +4 -5
  72. package/.agent-src/skills/dcf-modeling/SKILL.md +89 -0
  73. package/.agent-src/skills/funnel-analysis/SKILL.md +100 -0
  74. package/.agent-src/skills/md-language-check/SKILL.md +1 -1
  75. package/.agent-src/skills/okr-tree-modeling/SKILL.md +93 -0
  76. package/.agent-src/skills/rice-prioritization/SKILL.md +100 -0
  77. package/.agent-src/skills/roadmap-management/SKILL.md +29 -4
  78. package/.agent-src/skills/subagent-orchestration/SKILL.md +34 -2
  79. package/.agent-src/skills/unit-economics-modeling/SKILL.md +104 -0
  80. package/.agent-src/skills/using-git-worktrees/SKILL.md +1 -0
  81. package/.agent-src/skills/verify-completion-evidence/SKILL.md +8 -1
  82. package/.agent-src/templates/agent-settings.md +21 -26
  83. package/.agent-src/templates/roadmaps.md +8 -3
  84. package/.agent-src/templates/scripts/work_engine/hook_bootstrap.py +16 -5
  85. package/.agent-src/templates/scripts/work_engine/hooks/__init__.py +4 -4
  86. package/.agent-src/templates/scripts/work_engine/hooks/builtin/__init__.py +4 -4
  87. package/.agent-src/templates/scripts/work_engine/hooks/builtin/_chat_history_base.py +7 -51
  88. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_append.py +1 -2
  89. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_halt_append.py +1 -2
  90. package/.agent-src/templates/scripts/work_engine/hooks/builtin/decision_trace.py +163 -0
  91. package/.agent-src/templates/scripts/work_engine/hooks/builtin/memory_visibility.py +110 -0
  92. package/.agent-src/templates/scripts/work_engine/hooks/settings.py +36 -0
  93. package/.agent-src/templates/scripts/work_engine/scoring/decision_trace.py +141 -0
  94. package/.agent-src/templates/scripts/work_engine/scoring/memory_visibility.py +125 -0
  95. package/.agent-src/templates/skill.md +30 -1
  96. package/.claude-plugin/marketplace.json +8 -4
  97. package/AGENTS.md +44 -3
  98. package/CHANGELOG.md +173 -0
  99. package/README.md +22 -22
  100. package/config/agent-settings.template.yml +42 -13
  101. package/config/gitignore-block.txt +4 -4
  102. package/docs/architecture.md +3 -3
  103. package/docs/catalog.md +18 -13
  104. package/docs/contracts/adr-chat-history-split.md +10 -1
  105. package/docs/contracts/adr-settings-sync-engine.md +127 -0
  106. package/docs/contracts/command-clusters.md +1 -1
  107. package/docs/contracts/cross-wing-handoff.md +133 -0
  108. package/docs/contracts/decision-trace-v1.md +146 -0
  109. package/docs/contracts/file-ownership-matrix.json +348 -126
  110. package/docs/contracts/hook-architecture-v1.md +220 -0
  111. package/docs/contracts/memory-visibility-v1.md +122 -0
  112. package/docs/contracts/one-off-script-lifecycle.md +109 -0
  113. package/docs/contracts/rule-interactions.yml +22 -0
  114. package/docs/customization.md +2 -1
  115. package/docs/development.md +4 -1
  116. package/docs/getting-started.md +21 -29
  117. package/docs/guidelines/agent-infra/ask-when-uncertain-demos.md +1 -1
  118. package/docs/guidelines/agent-infra/layered-settings.md +32 -13
  119. package/docs/hook-payload-capture.md +221 -0
  120. package/docs/migrations/commands-1.15.0.md +17 -12
  121. package/docs/skills-catalog.md +5 -4
  122. package/llms.txt +4 -3
  123. package/package.json +1 -1
  124. package/scripts/agent-config +45 -1
  125. package/scripts/ai_council/_default_prices.py +4 -4
  126. package/scripts/ai_council/bundler.py +3 -3
  127. package/scripts/ai_council/clients.py +25 -9
  128. package/scripts/ai_council/modes.py +3 -4
  129. package/scripts/ai_council/one_off_archive/2026-05/README.md +22 -0
  130. package/scripts/ai_council/one_off_archive/2026-05/_one_off_roundtrip.py +13 -8
  131. package/scripts/ai_council/one_off_archive/2026-05/_one_off_tier_retrofit.py +180 -0
  132. package/scripts/ai_council/pricing.py +10 -9
  133. package/scripts/ai_council/session.py +92 -0
  134. package/scripts/build_rule_trigger_matrix.py +1 -9
  135. package/scripts/capture_showcase_session.py +361 -0
  136. package/scripts/chat_history.py +963 -597
  137. package/scripts/check_always_budget.py +7 -2
  138. package/scripts/check_references.py +12 -2
  139. package/scripts/context_hygiene_hook.py +14 -6
  140. package/scripts/council_cli.py +407 -0
  141. package/scripts/hook_manifest.yaml +217 -0
  142. package/scripts/hooks/__init__.py +1 -0
  143. package/scripts/hooks/augment-chat-history.sh +10 -0
  144. package/scripts/hooks/augment-dispatcher.sh +72 -0
  145. package/scripts/hooks/cline-dispatcher.sh +86 -0
  146. package/scripts/hooks/cowork-dispatcher.sh +98 -0
  147. package/scripts/hooks/cursor-dispatcher.sh +76 -0
  148. package/scripts/hooks/dispatch_hook.py +383 -0
  149. package/scripts/hooks/envelope.py +98 -0
  150. package/scripts/hooks/gemini-dispatcher.sh +117 -0
  151. package/scripts/hooks/state_io.py +122 -0
  152. package/scripts/hooks/windsurf-dispatcher.sh +123 -0
  153. package/scripts/hooks_status.py +157 -0
  154. package/scripts/install-hooks.sh +2 -2
  155. package/scripts/install.py +725 -87
  156. package/scripts/install.sh +38 -1
  157. package/scripts/lint_handoffs.py +214 -0
  158. package/scripts/lint_hook_manifest.py +217 -0
  159. package/scripts/lint_one_off_age.py +184 -0
  160. package/scripts/lint_rule_tiers.py +78 -0
  161. package/scripts/lint_showcase_sessions.py +148 -0
  162. package/scripts/minimal_safe_diff_hook.py +245 -0
  163. package/scripts/onboarding_gate_hook.py +13 -8
  164. package/scripts/readme_linter.py +12 -3
  165. package/scripts/redact_hook_capture.py +148 -0
  166. package/scripts/roadmap_progress_hook.py +5 -0
  167. package/scripts/schemas/skill.schema.json +5 -0
  168. package/scripts/skill_linter.py +163 -1
  169. package/scripts/sync_agent_settings.py +32 -129
  170. package/scripts/sync_yaml_rt.py +734 -0
  171. package/scripts/update_prices.py +3 -3
  172. package/scripts/verify_before_complete_hook.py +216 -0
  173. package/.agent-src/commands/chat-history/checkpoint.md +0 -126
  174. package/.agent-src/commands/chat-history/clear.md +0 -103
  175. package/.agent-src/commands/chat-history/resume.md +0 -183
  176. package/.agent-src/rules/chat-history-cadence.md +0 -109
  177. package/.agent-src/rules/chat-history-ownership.md +0 -123
  178. package/.agent-src/rules/chat-history-visibility.md +0 -96
  179. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_heartbeat.py +0 -50
  180. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_turn_check.py +0 -49
  181. package/scripts/check_phase_coupling.py +0 -148
@@ -28,8 +28,7 @@ The user invoked `/council default` on exactly one input mode:
28
28
  - `files:<path>,<path>` — a comma-separated file list
29
29
 
30
30
  Optional invocation flag: `mode:api|manual` overrides the per-member
31
- and global mode for this call only (see Step 2.5). `mode:playwright`
32
- is reserved for Phase 2c — refuse politely if invoked.
31
+ and global mode for this call only (see Step 2.5).
33
32
 
34
33
  Optional **rounds**: `rounds:N` (1-3) enables multi-round debate. Round
35
34
  1 sees the artefact alone. Round 2+ sees the artefact plus anonymised
@@ -71,7 +70,7 @@ Read `.agent-settings.yml` → `ai_council`:
71
70
  to env vars. Ever.
72
71
 
73
72
  Load the price table via `scripts.ai_council.pricing.load_prices()`
74
- (auto-bootstraps `.agent-prices.md` from defaults if missing). Run
73
+ (auto-bootstraps `agents/.agent-prices.md` from defaults if missing). Run
75
74
  `pricing.is_stale(table)` and, if stale, surface the staleness gate
76
75
  from the `ai-council` skill (§ Stale price-table gate) before
77
76
  continuing.
@@ -81,15 +80,13 @@ continuing.
81
80
  For each enabled member, resolve its mode via
82
81
  `scripts.ai_council.modes.resolve_mode(name, invocation_mode,
83
82
  member_settings, global_mode)`. Precedence: invocation flag >
84
- per-member setting > global setting > default (`api`).
83
+ per-member setting > global setting > default (`manual`).
85
84
 
86
85
  Construct each member from the resolved mode:
87
86
 
88
87
  - `api` → `AnthropicClient` / `OpenAIClient` (billable, cost-gated).
89
88
  - `manual` → `ManualClient` from `scripts.ai_council.clients`
90
89
  (`billable=False`, no API key, no SDK call).
91
- - `playwright` → reserved for Phase 2c. If a settings/invocation
92
- resolves to it, refuse with a one-line note.
93
90
 
94
91
  ### 3. Cost confirmation — ALWAYS ASK for billable members
95
92
 
@@ -97,71 +94,65 @@ Council calls to billable members spend money. Even under
97
94
  `personal.autonomy: on`, the agent **must** ask before invoking any
98
95
  billable member.
99
96
 
100
- Compute `orchestrator.estimate(question, members, table)` over the
101
- **billable** subset only (`getattr(m, "billable", True)`). Manual
102
- members contribute `$0` and skip the estimate.
97
+ Run the CLI in **estimate** mode first it bundles the artefact, runs
98
+ redaction, and prints the per-member preview without spending:
103
99
 
104
- Render the cost-confirmation numbered-options block per the
105
- `ai-council` skill (§ Pre-call estimate format) — per-member tokens
106
- + USD, projected total, budget caps, then `1. Run / 2. Cancel`. If
107
- the resolved member set is **all-manual**, skip the gate entirely
108
- (spend = $0) and proceed directly to Step 4.
109
-
110
- Wait for the user's pick. `1` proceeds; anything else aborts.
111
-
112
- ### 4. Bundle the context
113
-
114
- Use `scripts.ai_council.bundler`:
100
+ ```bash
101
+ ./agent-config council:estimate <question-file> \
102
+ [--input-mode prompt|roadmap] \
103
+ [--max-tokens N] \
104
+ [--mode-override api|manual] \
105
+ [--original-ask "<framing sentence>"]
106
+ ```
115
107
 
116
- - `prompt` mode `bundle_prompt(text)`
117
- - `roadmap` mode `bundle_roadmap(path)`
118
- - `diff` mode `bundle_diff(base, head)`
119
- - `files` mode `bundle_files(paths)`
108
+ For `prompt:"<text>"` mode, write the text to a temp file first
109
+ (`mktemp` is fine) and pass that path. For `roadmap:<path>`, pass the
110
+ roadmap file with `--input-mode roadmap`. `diff` and `files` modes
111
+ remain Phase 4 for now ask the user to convert into a `prompt`.
120
112
 
121
- The bundler runs redaction + size guard. If `BundleTooLarge` raises,
122
- surface the byte count and ask the user to narrow scope. Do **not**
123
- truncate silently.
113
+ The CLI prints a `council:estimate · members=N (billable=M)` line
114
+ followed by per-member projected USD and a TOTAL. Render that to the
115
+ user inside the cost-confirmation numbered-options block per the
116
+ `ai-council` skill (§ Pre-call estimate format) — then `1. Run /
117
+ 2. Cancel`. If the billable count is `0`, skip the gate entirely
118
+ (spend = $0) and proceed directly to Step 4.
124
119
 
125
- Print the manifest (what was included) and the excluded list before
126
- sending — gives the user a chance to abort if scope is wrong.
120
+ Wait for the user's pick. `1` proceeds; anything else aborts.
127
121
 
128
- ### 5. Run the orchestrator
122
+ ### 4. Run the CLI
129
123
 
130
- Members are constructed from the settings file plus
131
- `load_anthropic_key()` / `load_openai_key()`. Cost budget comes from
132
- `ai_council.cost_budget`.
124
+ Once the user picks `1`, invoke the same arguments with `run` plus
125
+ `--confirm` and an output path under `agents/council-sessions/`:
133
126
 
134
- Detect project context once via
135
- `scripts.ai_council.project_context.detect_project_context()` (reads
136
- `composer.json`, `package.json`, root `README.md` — never raises;
137
- empty-fields fall back to bare neutrality preamble).
127
+ ```bash
128
+ ./agent-config council:run <question-file> \
129
+ --output agents/council-sessions/<UTC-timestamp>.json \
130
+ --confirm \
131
+ [--rounds 1|2|3] \
132
+ [--input-mode …] [--max-tokens …] [--mode-override …] \
133
+ [--original-ask "<framing sentence>"]
134
+ ```
138
135
 
139
- Call:
136
+ The CLI:
140
137
 
141
- ```python
142
- consult(
143
- members, question, budget,
144
- table=table,
145
- on_overrun=_handle_overrun,
146
- project=project,
147
- original_ask=original_ask,
148
- rounds=rounds, # 1 by default; 2-3 enables multi-round debate
149
- )
150
- ```
138
+ - bundles the artefact via `scripts.ai_council.bundler` (redaction +
139
+ size guard — `BundleTooLarge` exits 2 with the byte count),
140
+ - builds members from `.agent-settings.yml` (refusing if
141
+ `ai_council.enabled` is false or no member is wired up),
142
+ - detects project context via `detect_project_context()`,
143
+ - calls `orchestrator.consult(...)` with the `cost_budget` from
144
+ settings,
145
+ - writes the responses JSON to `--output`.
151
146
 
152
- `project` + `original_ask` flow into `handoff_preamble()` so each
153
- member receives a neutral context-handoff alongside the artefact
154
- (see `ai-council` skill § Neutrality context-handoff). Members run
155
- **sequentially**; per-member errors are normalised — one failure
156
- does not abort the others. Define `_handle_overrun(event)` per the
157
- `ai-council` skill (§ Mid-flow overrun callback) to surface the user
158
- prompt before each breaching member.
147
+ Per-member errors are normalised one failure does not abort the
148
+ others. Exit code `1` means **all** members errored; `0` means at
149
+ least one succeeded; `2` means the gate refused before any spend.
159
150
 
160
- ### 6. Render the report
151
+ ### 5. Render the report
161
152
 
162
- Use `scripts.ai_council.orchestrator.render(responses)` for the
163
- per-member sections (stacked, not side-by-side — narrow terminals).
164
- Then write the **Convergence / Divergence** section yourself:
153
+ Use `./agent-config council:render <output.json>` for the per-member
154
+ sections (stacked, not side-by-side — narrow terminals). Then write
155
+ the **Convergence / Divergence** section yourself:
165
156
 
166
157
  - **Agreements** — points all members made (or did not contradict).
167
158
  - **Disagreements** — points where members took opposing positions.
@@ -173,49 +164,53 @@ End with a numbered-options block asking the user how to proceed
173
164
  (e.g. update the roadmap, request a second round, ignore the
174
165
  critique).
175
166
 
176
- ### 7. Hard floor — text only
167
+ ### 6. Hard floor — text only
177
168
 
178
169
  `/council` produces **text**. It does **NOT**:
179
170
 
180
171
  - Edit any file in the project.
181
172
  - Open, comment on, or merge any PR.
182
173
  - Run `git` commands beyond `git diff` (read-only).
183
- - Persist API responses outside the current chat unless the user
184
- explicitly asks (Phase 4 — out of scope for v1).
185
174
 
186
- This is restated in step 7 deliberately. The neutrality framing
187
- loses meaning if the council can act on the project directly.
175
+ The CLI persists the responses JSON under `agents/council-sessions/`
176
+ for traceability, but the agent never edits other project files on
177
+ the user's behalf. The neutrality framing loses meaning if the
178
+ council can act on the project directly.
188
179
 
189
180
  ## Failure modes
190
181
 
191
- - **Member SDK not installed** → tell the user exactly which `pip
192
- install` runs (`pip install anthropic` / `pip install openai`).
193
- Do not fall back to mocks.
194
- - **Key file mode drift** → refuse and point at the install script.
182
+ - **CLI exits 2, "ai_council.enabled is false"** → tell the user how
183
+ to flip it on; do not flip it autonomously.
184
+ - **CLI exits 2, "no council member has `enabled: true`"** → list the
185
+ install commands (`./agent-config keys:install-anthropic`,
186
+ `./agent-config keys:install-openai`) and stop.
187
+ - **CLI raises `BundleTooLarge`** → surface the byte count and ask the
188
+ user to narrow scope. Do not truncate silently.
189
+ - **Member SDK not installed** → CLI prints the missing-package
190
+ message; tell the user exactly which `pip install` runs
191
+ (`pip install anthropic` / `pip install openai`). Do not fall back
192
+ to mocks.
193
+ - **Key file mode drift** → CLI refuses; point at the install script.
195
194
  The 0600 contract is non-negotiable.
196
- - **Manual mode + non-interactive stdin** → `ManualClient` reads
197
- pasted replies from stdin terminated by a line containing only
198
- `END`. If stdin is closed before any reply lands, the member
199
- returns empty text with `error="manual_aborted"`; render the
200
- partial result and ask the user.
201
- - **Invalid mode value** → `resolve_mode()` raises
202
- `InvalidModeError` with the exact settings path. Surface verbatim
203
- and stop.
204
- - **Cost budget exceeded mid-fan-out** → render the partial
205
- responses and clearly mark the unfinished members with their
206
- `cost_budget_exceeded` error. Do not silently retry.
195
+ - **Invalid mode value** → CLI surfaces `InvalidModeError` with the
196
+ exact settings path. Surface verbatim and stop.
197
+ - **Cost budget exceeded mid-fan-out** render the partial responses
198
+ and clearly mark unfinished members with `cost_budget_exceeded`. Do
199
+ not silently retry.
207
200
  - **Stale price table, refresher fails (offline)** → state the
208
201
  failure, re-offer "continue with stale table / cancel", do not
209
202
  proceed silently.
210
- - **`.agent-prices.md` corrupt (missing frontmatter or columns)** →
203
+ - **`agents/.agent-prices.md` corrupt (missing frontmatter or columns)** →
211
204
  surface the parse error, suggest deleting the file to bootstrap
212
205
  fresh from defaults; never silently fall back.
213
- - **All members error** → render the errors and ask the user
214
- whether to fix and retry, or abort.
206
+ - **All members error (CLI exit 1)** → render the errors via
207
+ `council:render` and ask the user whether to fix and retry, or
208
+ abort.
215
209
 
216
210
  ## See also
217
211
 
218
212
  - `/council` — cluster dispatcher.
219
213
  - `ai-council` skill — neutrality guidelines, anti-patterns, redaction expectations.
220
214
  - `subagent-orchestration` skill — internal multi-agent variant (no network calls).
215
+ - `scripts/council_cli.py` — the CLI entry point this command wraps.
221
216
  - `docs/customization.md` § Available settings → `ai_council.*`.
@@ -106,19 +106,39 @@ Once the user approves the content from step 2:
106
106
 
107
107
  ### 4. After creation
108
108
 
109
- - Show the PR URL.
110
- - If a Jira ticket was linked, ask:
111
- ```
112
- > Transition Jira ticket {TICKET-ID} to "In Review"?
113
- >
114
- > 1. Yes — update status
115
- > 2. Noleave as-is
116
- ```
109
+ #### 4a. Strip attribution footers (mandatory)
110
+
111
+ `github-api` may server-side-append attribution after a clean send.
112
+ Per [`no-attribution-footers`](../rules/no-attribution-footers.md),
113
+ re-check the body after creation **and after every body PATCH**:
114
+
115
+ 1. `GET /repos/{owner}/{repo}/pulls/{number}` re-fetch body.
116
+ 2. Search (case-insensitive) for: `Generated with [Augment Code]`,
117
+ `🤖 Generated with`, `Pull Request opened by [Augment Code]`,
118
+ `Co-authored by Augment Code`, unsolicited `augmentcode.com` link.
119
+ 3. If any present, strip with surrounding `---` and trailing
120
+ whitespace, then `PATCH /pulls/{number}` with cleaned body.
121
+ 4. Re-fetch to verify. If the pattern reappears, repeat once; if
122
+ still present, surface to user and stop (no strip/PATCH loop).
123
+ 5. Note in the reply how many footers were removed (or "clean").
124
+
125
+ #### 4b. Show the PR URL
126
+
127
+ #### 4c. Jira transition
128
+
129
+ If a Jira ticket was linked, ask:
130
+ ```
131
+ > Transition Jira ticket {TICKET-ID} to "In Review"?
132
+ >
133
+ > 1. Yes — update status
134
+ > 2. No — leave as-is
135
+ ```
117
136
 
118
137
  ### Rules
119
138
 
120
139
  - **Always use the PR template** from `.github/pull_request_template.md` — read it, fill its sections.
121
140
  - **Always show the PR content before creating it** — never create blindly.
122
141
  - **Push the branch first** if it hasn't been pushed (with user permission).
142
+ - **Never add attribution footers** — see [`no-attribution-footers`](../rules/no-attribution-footers.md). Strip-pass in 4a defends against tool-injected footers.
123
143
  - Only create the PR — never merge it.
124
144
  - Only commit or push with explicit user permission.
@@ -111,6 +111,28 @@ For each roadmap, work through the phases interactively:
111
111
  - Single: `agents/roadmaps/{feature-name}.md`
112
112
  - Multiple: `agents/roadmaps/{feature-name}-{aspect}.md`
113
113
 
114
+ **Collision check before writing.** For each planned filename, scan
115
+ the entire roadmap namespace — active, `archive/`, `skipped/`, and
116
+ nested subdirs:
117
+
118
+ ```bash
119
+ find agents/roadmaps -type f -iname "{feature-name}.md" 2>/dev/null
120
+ # Module-scoped:
121
+ find app/Modules/{Module}/agents/roadmaps -type f -iname "{feature-name}.md" 2>/dev/null
122
+ ```
123
+
124
+ If any planned name already exists anywhere under the namespace,
125
+ **STOP** and ask (in the user's language):
126
+
127
+ > Filename `{feature-name}.md` already exists at `<path>` (archived/skipped/active).
128
+ >
129
+ > 1. Pick a different name — suggest `{feature-name}-v2` or `{feature-name}-{scope}`
130
+ > 2. Open the existing roadmap first — revival or extension may fit
131
+ > 3. Abort
132
+
133
+ Re-run the check after a rename. Never silently overwrite, never
134
+ auto-suffix without the user's pick.
135
+
114
136
  ### 5. Link roadmaps in the feature plan
115
137
 
116
138
  Update the feature file's `## Roadmaps` section:
@@ -92,8 +92,40 @@ Show the complete roadmap to the user and ask (in their language) if anything sh
92
92
  ### 6. Save the file
93
93
 
94
94
  - Generate a filename from the title: kebab-case, e.g. `optimize-webhook-jobs.md`.
95
- - Save to the chosen location.
96
- - Show the final path.
95
+
96
+ **Before saving, check for filename collisions across the entire
97
+ roadmap namespace** — active, `archive/`, `skipped/`, and any nested
98
+ subdirs (e.g. `agent-memory/`). A new roadmap that shadows an
99
+ archived or skipped one silently buries history; never overwrite,
100
+ never auto-suffix without the user's pick.
101
+
102
+ ```bash
103
+ NAME="<kebab-case-name>.md"
104
+ # Project-root roadmaps:
105
+ find agents/roadmaps -type f -iname "$NAME" 2>/dev/null
106
+ # Module-scoped roadmaps (only if step 1 picked a module):
107
+ find app/Modules/<Module>/agents/roadmaps -type f -iname "$NAME" 2>/dev/null
108
+ ```
109
+
110
+ Use `-iname` (case-insensitive) so case-only differences still count
111
+ as a collision on case-sensitive filesystems.
112
+
113
+ If the search returns one or more hits → **STOP**. Show the matches
114
+ and ask (in the user's language):
115
+
116
+ > Found N existing roadmap(s) with this name:
117
+ > - `agents/roadmaps/archive/<file>.md` (archived)
118
+ > - `agents/roadmaps/skipped/<file>.md` (skipped)
119
+ >
120
+ > 1. Pick a different name — suggest `<name>-v2`, `<name>-<scope>`, or `<name>-<YYYY-MM>`
121
+ > 2. Open the existing file first — revival or extension may be the right move
122
+ > 3. Abort creation
123
+
124
+ - **1** → re-prompt for name, re-run the collision check, repeat until clean.
125
+ - **2** → read the existing roadmap, summarize state, hand back to the user.
126
+ - **3** → stop without writing anything.
127
+
128
+ Only when the search is empty: save to the chosen location and show the final path.
97
129
 
98
130
  ### 7. Update the progress dashboard
99
131
 
@@ -150,12 +182,12 @@ If yes → switch to the `roadmap-execute` command workflow with the newly creat
150
182
  violates [`roadmap-progress-sync`](../rules/roadmap-progress-sync.md)
151
183
  Iron Law #2.
152
184
  - **Status is binary: `ready` (default) or `draft`.** Create new
153
- roadmaps as **ready** — no `status:` field needed, ready is
154
- implicit. Only mark `status: draft` (in YAML frontmatter) when the
185
+ roadmaps as **ready** — no `status:` field needed.
186
+ Only mark `status: draft` (in YAML frontmatter) when the
155
187
  user explicitly says it should be hidden from the dashboard (still
156
188
  being authored, awaiting upstream decisions, capture-only synthesis
157
189
  without executable phases). If the user wants draft, ask once at
158
190
  step 3 — do not infer it.
159
- - **Write the roadmap in English** (per project convention for `.md` files).
160
- - Follow the roadmap template from `.augment/templates/roadmaps.md`.
191
+ - Follow the roadmap template from `.augment/templates/roadmaps.md`; write in English (project convention).
161
192
  - Keep the file focused: 500–1000 lines max. If larger, suggest splitting.
193
+ - **Never overwrite an existing roadmap.** Step 6 scans `active/`, `archive/`, `skipped/` (+ subdirs); on collision → STOP, present rename / open / abort. Auto-suffix requires explicit pick.
@@ -33,7 +33,26 @@ suggestion:
33
33
  > "Phase 2: {name} — noch nicht begonnen"
34
34
  > "Next open step: {step description}"
35
35
 
36
- ### 3. Execute step by step
36
+ ### 3. Resolve quality cadence (read once, before any step runs)
37
+
38
+ Read `roadmap.quality_cadence` from `.agent-settings.yml`:
39
+
40
+ | Value | When the project's quality pipeline runs |
41
+ |---|---|
42
+ | `end_of_roadmap` (default) | Once, in step 7 — before archiving |
43
+ | `per_phase` | Once after every completed phase, plus step 7 |
44
+ | `per_step` | After every completed step, plus step 7 (legacy verbose) |
45
+
46
+ Missing key, unreadable file, or unknown value → fall back to `end_of_roadmap`.
47
+ Cite the resolved cadence once in step 2's summary so the user can override it.
48
+
49
+ The Iron Law `verify-before-complete` still applies — fresh quality
50
+ output is mandatory before any "roadmap complete" claim, regardless of
51
+ cadence. Step checkboxes and `agents/roadmaps-progress.md` are ALWAYS
52
+ updated in the same response per `roadmap-progress-sync`; cadence only
53
+ gates the *quality pipeline*, not progress tracking.
54
+
55
+ ### 4. Execute step by step
37
56
 
38
57
  For each open step:
39
58
 
@@ -41,28 +60,35 @@ For each open step:
41
60
  2. **Analyze** the codebase to understand what's needed for this step.
42
61
  3. **Present a plan** — what files to change, what approach to take.
43
62
  4. **Ask for confirmation**: "Should I implement this step?"
44
- - If yes → implement, run quality checks, mark step as done in the roadmap file.
63
+ - If yes → implement, mark the step `[x]` in the roadmap file.
45
64
  - If no / skip → move to the next step.
46
65
  - If the user wants to stop → stop and summarize progress.
47
66
 
48
- ### 4. After each step
67
+ ### 5. After each step
49
68
 
50
- - Update the roadmap file: mark the completed step (e.g. `[x]` or add a completion note).
51
- - Run quality tools if code was changed (PHPStan at minimum).
69
+ - Update the roadmap file: mark the completed step `[x]` (or `[~]` / `[-]`).
52
70
  - Regenerate `agents/roadmaps-progress.md` — `./agent-config roadmap:progress`.
71
+ - **Quality pipeline** — run only when `quality_cadence: per_step`.
72
+ Otherwise skip and proceed.
53
73
  - Ask: "Continue with the next step?"
54
74
 
55
- ### 5. After all steps in a phase
75
+ ### 6. After all steps in a phase
56
76
 
57
77
  - Summarize what was accomplished in the phase.
78
+ - **Quality pipeline** — run when `quality_cadence: per_phase` (or `per_step`).
79
+ Skip when `end_of_roadmap`.
58
80
  - Ask: "Phase {N} complete. Continue with Phase {N+1}?"
59
81
 
60
- ### 6. When done (or stopped)
82
+ ### 7. When done (or stopped)
61
83
 
62
84
  - Summarize total progress: steps completed, steps remaining.
63
85
  - Update the roadmap file with the current status.
64
86
  - Regenerate the dashboard one last time so it matches the final state.
65
- - **If ALL steps are done** → trigger the completion & archiving workflow from the `roadmap-management` skill.
87
+ - **If ALL steps are done** → run the project's quality pipeline now
88
+ (this is the `verify-before-complete` evidence gate; required for
89
+ every cadence value, including `end_of_roadmap`). On green, trigger
90
+ the completion & archiving workflow from the `roadmap-management`
91
+ skill. On red, stop, surface the failures, do not archive.
66
92
 
67
93
  ### Rules
68
94
 
@@ -77,6 +103,7 @@ For each open step:
77
103
  to execute the listed commit steps, then proceed silently per the answer.
78
104
  - **Push, merge, branch, PR, tag** stay permission-gated by [`scope-control`](../rules/scope-control.md#git-operations--permission-gated).
79
105
  - **Always ask before implementing** a step — never auto-execute.
80
- - **Run quality checks** after each code change.
106
+ - **Quality cadence** is set by `roadmap.quality_cadence` (see step 3).
107
+ Step 7 always runs the pipeline before archival regardless of cadence.
81
108
  - If a step is unclear or too large, suggest breaking it down further.
82
109
  - If a step reveals a problem not covered in the roadmap, flag it to the user.
@@ -11,7 +11,7 @@ suggestion:
11
11
 
12
12
  Ensures the consumer project's `.gitignore` contains every entry the
13
13
  package expects to be ignored (symlinked `.augment/` subdirectories,
14
- `/agent-config` CLI wrapper, `.agent-settings*`, `.agent-chat-history*`).
14
+ `/agent-config` CLI wrapper, `.agent-settings*`, `agents/.agent-chat-history*`).
15
15
  Canonical list lives in `config/gitignore-block.txt`; the same file
16
16
  drives the installer, so the two cannot drift.
17
17
 
@@ -60,3 +60,79 @@ Compression may remove:
60
60
  - Verbose explanations
61
61
  - Redundant examples (keep the strongest)
62
62
  - Commentary that doesn't affect execution
63
+
64
+ ## Senior-tier patterns
65
+
66
+ Detail spec for the four blocks the [`skill-quality`](../../../rules/skill-quality.md)
67
+ rule requires on `tier: senior` skills. Each block ≤ 6-line spec + 1
68
+ reference pattern. Forward-only — applies to new senior-tier skills,
69
+ no retrofit on existing Wing-1 skills.
70
+
71
+ ### 1. Context-First lead (description)
72
+
73
+ Two-sentence frontmatter `description`. First sentence: cognition
74
+ cluster anchor — name the domain + the senior role's stance. Second
75
+ sentence: the trigger — what the user types that should fire this.
76
+
77
+ Pattern:
78
+
79
+ ```
80
+ description: "Use when {trigger paraphrase}. {Domain} cognition for the
81
+ {senior role} — produces {artifact name}."
82
+ ```
83
+
84
+ Anti-pattern: leading with the artifact ("Produces a DCF model …") —
85
+ buries the cognition cluster, undertriggers on cluster-shaped prompts.
86
+
87
+ ### 2. Related Skills (`## Related Skills`)
88
+
89
+ Two named lists, no ambiguity:
90
+
91
+ ```markdown
92
+ ## Related Skills
93
+
94
+ **WHEN to use this**
95
+ - {situation A this skill resolves better than {peer-1}}
96
+ - {situation B}
97
+
98
+ **WHEN NOT to use this**
99
+ - {situation C} — route to [`{peer-1}`](../{peer-1}/SKILL.md)
100
+ - {situation D} — route to [`{peer-2}`](../{peer-2}/SKILL.md)
101
+ ```
102
+
103
+ WHEN-NOT entries MUST name the peer and link it. Naming without a
104
+ link drifts the moment the peer renames.
105
+
106
+ ### 3. Proactive Triggers (`## When the agent should load this`)
107
+
108
+ 3–5 concrete user-prompt patterns the agent watches for. Concrete =
109
+ phrases users actually type, not abstract categories.
110
+
111
+ ```markdown
112
+ ## When the agent should load this
113
+
114
+ - "should we build feature X or Y first" → opportunity-tree shaped
115
+ - "what's the ICE / RICE on this backlog" → prioritization shaped
116
+ - "how do I split this epic into shippable slices" → INVEST shaped
117
+ ```
118
+
119
+ Anti-pattern: abstract categories ("prioritization questions",
120
+ "product-shaped requests") — the routing layer matches phrases, not
121
+ taxonomies.
122
+
123
+ ### 4. Output Artifacts (`## Output`)
124
+
125
+ 1–4 named artifacts with concrete shape. Each entry: name +
126
+ shape-hint the orchestrator can cite by name in a handoff.
127
+
128
+ ```markdown
129
+ ## Output
130
+
131
+ 1. **opportunity-tree.md** — markdown tree, root = north-star metric,
132
+ leaves = candidate solutions with hypothesis + evidence rank
133
+ 2. **prioritization-table.md** — markdown table, columns =
134
+ {opportunity, ICE score, evidence-grade, owner, next-step}
135
+ ```
136
+
137
+ Anti-pattern: prose summary ("a doc explaining the prioritization") —
138
+ no orchestrator-citable identifier, no shape contract.
@@ -15,7 +15,7 @@ this file mirrors that contract for runtime lookup. Linter:
15
15
  | `/fix` | 1 | `ci` · `pr` · `pr-bots` · `pr-developers` · `portability` · `refs` · `seeder` | `/fix-ci` · `/fix-pr-comments` · `/fix-pr-bot-comments` · `/fix-pr-developer-comments` · `/fix-portability` · `/fix-references` · `/fix-seeder` |
16
16
  | `/optimize` | 1 | `agents` · `augmentignore` · `rtk` · `skills` | `/optimize-agents` · `/optimize-augmentignore` · `/optimize-rtk-filters` · `/optimize-skills` |
17
17
  | `/feature` | 1 | `explore` · `plan` · `refactor` · `roadmap` | `/feature-explore` · `/feature-plan` · `/feature-refactor` · `/feature-roadmap` |
18
- | `/chat-history` | 2 | `show` · `resume` · `clear` · `checkpoint` | `/chat-history` (legacy status) · `/chat-history-resume` · `/chat-history-clear` · `/chat-history-checkpoint` |
18
+ | `/chat-history` | 2 | `show` | `/chat-history` (legacy status) `resume` / `clear` / `checkpoint` removed in `road-to-chat-history-hook-only` |
19
19
  | `/agents` | 2 | `audit` · `cleanup` · `prepare` | `/agents-audit` · `/agents-cleanup` · `/agents-prepare` |
20
20
  | `/memory` | 2 | `add` · `load` · `promote` · `propose` | `/memory-add` · `/memory-full` · `/memory-promote` · `/propose-memory` |
21
21
  | `/roadmap` | 2 | `create` · `execute` | `/roadmap-create` · `/roadmap-execute` |
@@ -25,8 +25,8 @@ this file mirrors that contract for runtime lookup. Linter:
25
25
  | `/override` | 2 | `create` · `manage` | `/override-create` · `/override-manage` |
26
26
  | `/copilot-agents` | 2 | `init` · `optimize` | `/copilot-agents-init` · `/copilot-agents-optimize` |
27
27
  | `/judge` | 2 | `solo` · `on-diff` · `steps` | `/judge` (legacy standalone) · `/do-and-judge` · `/do-in-steps` |
28
- | `/commit` | 2 | flag: `--in-chunks` | `/commit-in-chunks` |
29
- | `/create-pr` | 2 | flag: `--description-only` | `/create-pr-description` |
28
+ | `/commit` | 2 | flag: `--in-chunks` | `/commit:in-chunks` |
29
+ | `/create-pr` | 2 | flag: `--description-only` | `/create-pr:description-only` |
30
30
 
31
31
  ## Routing semantics
32
32
 
@@ -1,17 +1,10 @@
1
1
  # User Interaction — mechanics
2
2
 
3
- Format examples, common failure modes, progress indicators, and
4
- summary patterns for the [`user-interaction`](../../../rules/user-interaction.md)
5
- rule. Iron Law 1 (single-source recommendation) and Iron Law 2
6
- (pre-send self-check) live in the rule; this file is the lookup
7
- material for the format details.
8
-
9
- ## Common failure modes — known, named, no excuses
10
-
11
- - **End-of-turn menu skipped.** Reply answers the question fine, then ends with `> 1. Foo > 2. Bar > 3. Stop` and no `Empfehlung:`. Iron Law 1 was violated — these are numbered options, position is irrelevant.
12
- - **"Genuinely no preference" hedge.** Pick anyway. The agent has more context than the user on the trade-off; refusing to pick dumps the work back. Pick the safest option, name the flip-condition.
13
- - **"User knows the project better" hedge.** Same failure mode, different costume. The user asked for an opinion by virtue of accepting the options block; deliver it.
14
- - **Multi-block reply with one recommendation.** Two options blocks but only one `Empfehlung:` line — the second block is unguarded. Rule 5 of Iron Law 2 closes this.
3
+ Format examples, progress indicators, and summary patterns for the
4
+ [`user-interaction`](../../../rules/user-interaction.md) rule. Iron
5
+ Law 1 (single-source recommendation), Iron Law 2 (pre-send
6
+ self-check), and the named failure-mode catalog live in the rule
7
+ itself; this file is the lookup material for the format details.
15
8
 
16
9
  ## Examples
17
10
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  type: "always"
3
+ tier: "3"
3
4
  description: "Priority Index for the four authority rules — Hard Floor → Permission Gate → Commit Default → Trivial-vs-Blocking; read first, route to canonical rule"
4
5
  alwaysApply: true
5
6
  source: package
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  type: "auto"
3
+ tier: "2a"
3
4
  description: "Reading, creating, or updating agent documentation, module docs, roadmaps, or AGENTS.md"
4
5
  source: package
5
6
  ---
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  type: auto
3
+ tier: "3"
3
4
  description: "When choosing an analysis skill, route to the narrowest matching skill instead of defaulting to broad analysis"
4
5
  source: package
5
6
  ---
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  type: "auto"
3
+ tier: "3"
3
4
  alwaysApply: false
4
5
  description: "Architecture rules for creating new files, classes, controllers, modules, or making structural decisions about project organization"
5
6
  source: package
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  type: "auto"
3
+ tier: "2a"
3
4
  alwaysApply: false
4
5
  description: "Creating a new skill, rule, command, or guideline, or significantly rewriting one — runs a mandatory Understand → Research → Draft sequence before any artifact content is written."
5
6
  source: package
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  type: "auto"
3
+ tier: "mechanical-already"
3
4
  alwaysApply: false
4
5
  description: "After a /implement-ticket or /work phase-step (refine/memory/analyze/plan/implement/test/verify/report) or full task — emit one telemetry:record call with consulted+applied ids when enabled"
5
6
  source: package
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  type: "always"
3
+ tier: "3"
3
4
  description: "Ask when uncertain — don't guess, assume, or improvise"
4
5
  alwaysApply: true
5
6
  source: package