@event4u/agent-config 1.15.0 → 1.16.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 (244) hide show
  1. package/.agent-src/commands/bug-fix.md +1 -1
  2. package/.agent-src/commands/bug-investigate.md +2 -2
  3. package/.agent-src/commands/chat-history-checkpoint.md +1 -1
  4. package/.agent-src/commands/chat-history-clear.md +1 -1
  5. package/.agent-src/commands/chat-history.md +1 -1
  6. package/.agent-src/commands/check-current-md.md +1 -1
  7. package/.agent-src/commands/council-design.md +96 -0
  8. package/.agent-src/commands/council-optimize.md +115 -0
  9. package/.agent-src/commands/council-pr.md +123 -0
  10. package/.agent-src/commands/council.md +219 -0
  11. package/.agent-src/commands/create-pr.md +23 -0
  12. package/.agent-src/commands/do-and-judge.md +3 -3
  13. package/.agent-src/commands/do-in-steps.md +4 -4
  14. package/.agent-src/commands/e2e-heal.md +1 -1
  15. package/.agent-src/commands/e2e-plan.md +1 -1
  16. package/.agent-src/commands/feature-dev.md +8 -0
  17. package/.agent-src/commands/feature-explore.md +6 -1
  18. package/.agent-src/commands/feature-plan.md +33 -2
  19. package/.agent-src/commands/feature-refactor.md +5 -0
  20. package/.agent-src/commands/feature-roadmap.md +6 -1
  21. package/.agent-src/commands/feature.md +58 -0
  22. package/.agent-src/commands/fix-ci.md +5 -0
  23. package/.agent-src/commands/fix-portability.md +5 -0
  24. package/.agent-src/commands/fix-pr-bot-comments.md +5 -0
  25. package/.agent-src/commands/fix-pr-comments.md +5 -0
  26. package/.agent-src/commands/fix-pr-developer-comments.md +5 -0
  27. package/.agent-src/commands/fix-references.md +5 -0
  28. package/.agent-src/commands/fix-seeder.md +5 -0
  29. package/.agent-src/commands/fix.md +60 -0
  30. package/.agent-src/commands/jira-ticket.md +1 -1
  31. package/.agent-src/commands/judge.md +1 -1
  32. package/.agent-src/commands/memory-add.md +3 -3
  33. package/.agent-src/commands/memory-full.md +2 -2
  34. package/.agent-src/commands/memory-promote.md +2 -2
  35. package/.agent-src/commands/mode.md +5 -5
  36. package/.agent-src/commands/onboard.md +3 -3
  37. package/.agent-src/commands/optimize-agents.md +6 -1
  38. package/.agent-src/commands/optimize-augmentignore.md +5 -0
  39. package/.agent-src/commands/optimize-rtk-filters.md +5 -0
  40. package/.agent-src/commands/optimize-skills.md +6 -1
  41. package/.agent-src/commands/optimize.md +54 -0
  42. package/.agent-src/commands/propose-memory.md +2 -2
  43. package/.agent-src/commands/review-changes.md +26 -1
  44. package/.agent-src/commands/review-routing.md +1 -1
  45. package/.agent-src/commands/roadmap-create.md +29 -2
  46. package/.agent-src/commands/set-cost-profile.md +3 -3
  47. package/.agent-src/commands/sync-agent-settings.md +2 -2
  48. package/.agent-src/commands/tests-create.md +1 -1
  49. package/.agent-src/commands/upstream-contribute.md +1 -1
  50. package/.agent-src/contexts/authority/commit-mechanics.md +57 -0
  51. package/.agent-src/contexts/authority/destructive-mechanics.md +66 -0
  52. package/.agent-src/contexts/authority/scope-mechanics.md +87 -0
  53. package/.agent-src/contexts/execution/autonomy-detection.md +54 -0
  54. package/.agent-src/contexts/execution/autonomy-examples.md +90 -0
  55. package/.agent-src/contexts/execution/autonomy-mechanics.md +29 -0
  56. package/.agent-src/contexts/execution/verification-mechanics.md +80 -0
  57. package/.agent-src/personas/README.md +1 -1
  58. package/.agent-src/rules/agent-authority.md +24 -0
  59. package/.agent-src/rules/architecture.md +1 -1
  60. package/.agent-src/rules/artifact-drafting-protocol.md +1 -1
  61. package/.agent-src/rules/artifact-engagement-recording.md +1 -1
  62. package/.agent-src/rules/ask-when-uncertain.md +1 -1
  63. package/.agent-src/rules/autonomous-execution.md +78 -114
  64. package/.agent-src/rules/capture-learnings.md +1 -1
  65. package/.agent-src/rules/chat-history-cadence.md +3 -3
  66. package/.agent-src/rules/chat-history-ownership.md +3 -3
  67. package/.agent-src/rules/chat-history-visibility.md +3 -3
  68. package/.agent-src/rules/{command-suggestion.md → command-suggestion-policy.md} +7 -7
  69. package/.agent-src/rules/commit-conventions.md +1 -1
  70. package/.agent-src/rules/commit-policy.md +14 -42
  71. package/.agent-src/rules/context-hygiene.md +3 -3
  72. package/.agent-src/rules/direct-answers.md +1 -1
  73. package/.agent-src/rules/docs-sync.md +1 -1
  74. package/.agent-src/rules/e2e-testing.md +1 -1
  75. package/.agent-src/rules/guidelines.md +4 -4
  76. package/.agent-src/rules/improve-before-implement.md +2 -2
  77. package/.agent-src/rules/language-and-tone.md +37 -96
  78. package/.agent-src/rules/minimal-safe-diff.md +3 -3
  79. package/.agent-src/rules/model-recommendation.md +4 -4
  80. package/.agent-src/rules/no-cheap-questions.md +89 -0
  81. package/.agent-src/rules/non-destructive-by-default.md +15 -49
  82. package/.agent-src/rules/onboarding-gate.md +5 -5
  83. package/.agent-src/rules/review-routing-awareness.md +9 -9
  84. package/.agent-src/rules/roadmap-progress-sync.md +26 -33
  85. package/.agent-src/rules/role-mode-adherence.md +2 -2
  86. package/.agent-src/rules/scope-control.md +65 -46
  87. package/.agent-src/rules/security-sensitive-stop.md +2 -2
  88. package/.agent-src/rules/size-enforcement.md +1 -1
  89. package/.agent-src/rules/think-before-action.md +5 -5
  90. package/.agent-src/rules/token-efficiency.md +4 -4
  91. package/.agent-src/rules/{ui-audit-before-build.md → ui-audit-gate.md} +3 -3
  92. package/.agent-src/rules/user-interaction.md +3 -3
  93. package/.agent-src/rules/verify-before-complete.md +12 -67
  94. package/.agent-src/scripts/update_roadmap_progress.py +9 -4
  95. package/.agent-src/skills/ai-council/SKILL.md +333 -0
  96. package/.agent-src/skills/api-endpoint/SKILL.md +2 -2
  97. package/.agent-src/skills/blade-ui/SKILL.md +1 -1
  98. package/.agent-src/skills/blast-radius-analyzer/SKILL.md +1 -1
  99. package/.agent-src/skills/bug-analyzer/SKILL.md +1 -1
  100. package/.agent-src/skills/command-routing/SKILL.md +1 -1
  101. package/.agent-src/skills/command-writing/SKILL.md +1 -1
  102. package/.agent-src/skills/conventional-commits-writing/SKILL.md +1 -1
  103. package/.agent-src/skills/copilot-agents-optimization/SKILL.md +2 -2
  104. package/.agent-src/skills/developer-like-execution/SKILL.md +2 -2
  105. package/.agent-src/skills/flux/SKILL.md +1 -1
  106. package/.agent-src/skills/git-workflow/SKILL.md +1 -1
  107. package/.agent-src/skills/guideline-writing/SKILL.md +11 -11
  108. package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +4 -4
  109. package/.agent-src/skills/livewire/SKILL.md +1 -1
  110. package/.agent-src/skills/override-management/SKILL.md +2 -2
  111. package/.agent-src/skills/php-coder/SKILL.md +1 -1
  112. package/.agent-src/skills/playwright-testing/SKILL.md +2 -2
  113. package/.agent-src/skills/readme-reviewer/SKILL.md +1 -1
  114. package/.agent-src/skills/readme-writing/SKILL.md +1 -1
  115. package/.agent-src/skills/readme-writing-package/SKILL.md +1 -1
  116. package/.agent-src/skills/receiving-code-review/SKILL.md +1 -1
  117. package/.agent-src/skills/review-routing/SKILL.md +2 -2
  118. package/.agent-src/skills/rule-writing/SKILL.md +1 -1
  119. package/.agent-src/skills/skill-reviewer/SKILL.md +1 -1
  120. package/.agent-src/skills/skill-writing/SKILL.md +3 -3
  121. package/.agent-src/skills/subagent-orchestration/SKILL.md +1 -0
  122. package/.agent-src/skills/systematic-debugging/SKILL.md +1 -1
  123. package/.agent-src/skills/upstream-contribute/SKILL.md +1 -1
  124. package/.agent-src/skills/validate-feature-fit/SKILL.md +2 -2
  125. package/.agent-src/skills/{verify-before-complete → verify-completion-evidence}/SKILL.md +2 -2
  126. package/.agent-src/templates/agent-settings.md +8 -8
  127. package/.agent-src/templates/contexts/auth-model.md +1 -1
  128. package/.agent-src/templates/scripts/README.md +2 -2
  129. package/.agent-src/templates/scripts/telemetry/aggregator.py +16 -1
  130. package/.agent-src/templates/scripts/telemetry/engagement.py +59 -0
  131. package/.agent-src/templates/scripts/telemetry/report_renderer.py +28 -1
  132. package/.agent-src/templates/scripts/telemetry_record.py +14 -1
  133. package/.claude-plugin/marketplace.json +10 -2
  134. package/AGENTS.md +11 -9
  135. package/CHANGELOG.md +123 -1
  136. package/README.md +28 -30
  137. package/config/agent-settings.template.yml +58 -1
  138. package/config/gitignore-block.txt +3 -0
  139. package/docs/architecture.md +4 -4
  140. package/docs/catalog.md +331 -0
  141. package/docs/contracts/STABILITY.md +39 -0
  142. package/docs/contracts/adr-command-suggestion.md +3 -3
  143. package/docs/contracts/adr-product-ui-track.md +2 -2
  144. package/docs/contracts/agent-memory-contract.md +2 -2
  145. package/docs/contracts/artifact-engagement-flow.md +1 -1
  146. package/docs/contracts/command-clusters.md +2 -2
  147. package/docs/contracts/command-suggestion-flow.md +3 -3
  148. package/docs/contracts/implement-ticket-flow.md +2 -2
  149. package/docs/contracts/linear-ai-rules-inclusion.md +1 -1
  150. package/docs/contracts/load-context-schema.md +186 -0
  151. package/docs/contracts/rule-interactions.yml +96 -0
  152. package/docs/contracts/rule-priority-hierarchy.md +87 -0
  153. package/docs/contracts/ui-track-flow.md +1 -1
  154. package/docs/customization.md +14 -0
  155. package/docs/end-to-end-walkthroughs.md +165 -0
  156. package/docs/getting-started.md +26 -8
  157. package/docs/github-topics.md +12 -3
  158. package/docs/guidelines/agent-infra/language-and-tone-examples.md +79 -0
  159. package/{.agent-src → docs}/guidelines/docs/readme-size-and-splitting.md +26 -25
  160. package/docs/guidelines/php/git.md +164 -0
  161. package/docs/migrations/commands-1.15.0.md +1 -1
  162. package/docs/showcase.md +9 -4
  163. package/docs/skills-catalog.md +14 -8
  164. package/docs/ui-track-mental-model.md +2 -2
  165. package/llms.txt +13 -7
  166. package/package.json +1 -1
  167. package/scripts/agent-config +23 -0
  168. package/scripts/ai_council/__init__.py +39 -0
  169. package/scripts/ai_council/_default_prices.py +41 -0
  170. package/scripts/ai_council/_one_off_rebalancing_audit.py +149 -0
  171. package/scripts/ai_council/_one_off_roundtrip.py +106 -0
  172. package/scripts/ai_council/budget_guard.py +172 -0
  173. package/scripts/ai_council/bundler.py +261 -0
  174. package/scripts/ai_council/clients.py +381 -0
  175. package/scripts/ai_council/modes.py +127 -0
  176. package/scripts/ai_council/orchestrator.py +350 -0
  177. package/scripts/ai_council/pricing.py +213 -0
  178. package/scripts/ai_council/project_context.py +159 -0
  179. package/scripts/ai_council/prompts.py +232 -0
  180. package/scripts/ai_council/session.py +144 -0
  181. package/scripts/check_always_budget.py +126 -0
  182. package/scripts/check_augmentignore.py +69 -0
  183. package/scripts/check_command_count_messaging.py +120 -0
  184. package/scripts/check_portability.py +55 -0
  185. package/scripts/check_public_catalog_links.py +122 -0
  186. package/scripts/check_references.py +4 -1
  187. package/scripts/check_roadmap_trackable.py +111 -0
  188. package/scripts/command_suggester/cooldown.py +1 -1
  189. package/scripts/generate_index.py +266 -0
  190. package/scripts/install_anthropic_key.sh +5 -0
  191. package/scripts/install_openai_key.sh +106 -0
  192. package/scripts/lint_load_context.py +163 -0
  193. package/scripts/schemas/command.schema.json +20 -0
  194. package/scripts/schemas/rule.schema.json +10 -0
  195. package/scripts/skill_linter.py +12 -4
  196. package/scripts/sync_agent_settings.py +1 -1
  197. package/scripts/update_counts.py +9 -4
  198. package/scripts/update_prices.py +124 -0
  199. package/.agent-src/guidelines/php/git.md +0 -96
  200. /package/.agent-src/rules/{slash-commands.md → slash-command-routing-policy.md} +0 -0
  201. /package/{.agent-src → docs}/guidelines/agent-infra/agent-interaction-and-decision-quality.md +0 -0
  202. /package/{.agent-src → docs}/guidelines/agent-infra/break-glass-usage.md +0 -0
  203. /package/{.agent-src → docs}/guidelines/agent-infra/developer-judgment.md +0 -0
  204. /package/{.agent-src → docs}/guidelines/agent-infra/engineering-memory-data-format.md +0 -0
  205. /package/{.agent-src → docs}/guidelines/agent-infra/layered-settings.md +0 -0
  206. /package/{.agent-src → docs}/guidelines/agent-infra/memory-access.md +0 -0
  207. /package/{.agent-src → docs}/guidelines/agent-infra/naming.md +0 -0
  208. /package/{.agent-src → docs}/guidelines/agent-infra/output-patterns.md +0 -0
  209. /package/{.agent-src → docs}/guidelines/agent-infra/review-routing-data-format.md +0 -0
  210. /package/{.agent-src → docs}/guidelines/agent-infra/role-contracts.md +0 -0
  211. /package/{.agent-src → docs}/guidelines/agent-infra/role-mode-router.md +0 -0
  212. /package/{.agent-src → docs}/guidelines/agent-infra/runtime-layer.md +0 -0
  213. /package/{.agent-src → docs}/guidelines/agent-infra/self-improvement-pipeline.md +0 -0
  214. /package/{.agent-src → docs}/guidelines/agent-infra/size-and-scope.md +0 -0
  215. /package/{.agent-src → docs}/guidelines/agent-infra/tool-integration.md +0 -0
  216. /package/{.agent-src → docs}/guidelines/e2e/playwright.md +0 -0
  217. /package/{.agent-src → docs}/guidelines/php/api-design.md +0 -0
  218. /package/{.agent-src → docs}/guidelines/php/artisan-commands.md +0 -0
  219. /package/{.agent-src → docs}/guidelines/php/blade-ui.md +0 -0
  220. /package/{.agent-src → docs}/guidelines/php/controllers.md +0 -0
  221. /package/{.agent-src → docs}/guidelines/php/database.md +0 -0
  222. /package/{.agent-src → docs}/guidelines/php/eloquent.md +0 -0
  223. /package/{.agent-src → docs}/guidelines/php/flux.md +0 -0
  224. /package/{.agent-src → docs}/guidelines/php/general.md +0 -0
  225. /package/{.agent-src → docs}/guidelines/php/jobs.md +0 -0
  226. /package/{.agent-src → docs}/guidelines/php/livewire.md +0 -0
  227. /package/{.agent-src → docs}/guidelines/php/logging.md +0 -0
  228. /package/{.agent-src → docs}/guidelines/php/naming.md +0 -0
  229. /package/{.agent-src → docs}/guidelines/php/patterns/dependency-injection.md +0 -0
  230. /package/{.agent-src → docs}/guidelines/php/patterns/dtos.md +0 -0
  231. /package/{.agent-src → docs}/guidelines/php/patterns/events.md +0 -0
  232. /package/{.agent-src → docs}/guidelines/php/patterns/factory.md +0 -0
  233. /package/{.agent-src → docs}/guidelines/php/patterns/pipelines.md +0 -0
  234. /package/{.agent-src → docs}/guidelines/php/patterns/policies.md +0 -0
  235. /package/{.agent-src → docs}/guidelines/php/patterns/repositories.md +0 -0
  236. /package/{.agent-src → docs}/guidelines/php/patterns/service-layer.md +0 -0
  237. /package/{.agent-src → docs}/guidelines/php/patterns/strategy.md +0 -0
  238. /package/{.agent-src → docs}/guidelines/php/patterns.md +0 -0
  239. /package/{.agent-src → docs}/guidelines/php/performance.md +0 -0
  240. /package/{.agent-src → docs}/guidelines/php/resources.md +0 -0
  241. /package/{.agent-src → docs}/guidelines/php/security.md +0 -0
  242. /package/{.agent-src → docs}/guidelines/php/sql.md +0 -0
  243. /package/{.agent-src → docs}/guidelines/php/validations.md +0 -0
  244. /package/{.agent-src → docs}/guidelines/php/websocket.md +0 -0
@@ -182,4 +182,4 @@ What next?
182
182
 
183
183
  ## See also
184
184
 
185
- - [`role-contracts`](../guidelines/agent-infra/role-contracts.md#developer) — Developer mode output contract (Goal / Plan / Changes / Tests / Open questions)
185
+ - [`role-contracts`](../../docs/guidelines/agent-infra/role-contracts.md#developer) — Developer mode output contract (Goal / Plan / Changes / Tests / Open questions)
@@ -175,5 +175,5 @@ What's next?
175
175
 
176
176
  ## See also
177
177
 
178
- - [`role-contracts`](../guidelines/agent-infra/role-contracts.md#incident) — Incident mode output contract (Symptom / Reproduction / Minimal reversible change / Deferred verification / Follow-up commitment) — use when the bug is a live production issue with `break-glass: true`
179
- - [`role-contracts`](../guidelines/agent-infra/role-contracts.md#developer) — Developer mode output contract for non-incident bugs
178
+ - [`role-contracts`](../../docs/guidelines/agent-infra/role-contracts.md#incident) — Incident mode output contract (Symptom / Reproduction / Minimal reversible change / Deferred verification / Follow-up commitment) — use when the bug is a live production issue with `break-glass: true`
179
+ - [`role-contracts`](../../docs/guidelines/agent-infra/role-contracts.md#developer) — Developer mode output contract for non-incident bugs
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: chat-history-checkpoint
3
- description: Append a phase-boundary entry to .agent-chat-history — the CHECKPOINT fallback for platforms without a native hook surface (Augment Code IDE plugin, Cursor non-1.7+, Cline non-Mac/Linux). Cooperative gate, ~1 second to run.
3
+ description: Append a phase-boundary entry to .agent-chat-history — CHECKPOINT fallback for platforms without a native hook (Augment IDE, Cursor pre-1.7, Cline non-Mac/Linux). ~1s.
4
4
  disable-model-invocation: true
5
5
  suggestion:
6
6
  eligible: true
@@ -24,7 +24,7 @@ touching the file, unless the file does not exist in the first place.
24
24
  - Keep the entries but re-point the header → [`/chat-history-resume`](chat-history-resume.md).
25
25
  - Disable logging entirely → set `chat_history.enabled: false` in
26
26
  `.agent-settings.yml`; see
27
- [`layered-settings`](../guidelines/agent-infra/layered-settings.md#section-aware-merge-rules).
27
+ [`layered-settings`](../../docs/guidelines/agent-infra/layered-settings.md#section-aware-merge-rules).
28
28
  Disabling does not delete the existing file; run this command
29
29
  afterwards if you also want it gone.
30
30
 
@@ -31,7 +31,7 @@ Read-only — this command never writes to the file.
31
31
  - Wipe the file → [`/chat-history-clear`](chat-history-clear.md).
32
32
  - Configure logging behavior → edit `.agent-settings.yml` directly
33
33
  (`chat_history.*`); see
34
- [`layered-settings`](../guidelines/agent-infra/layered-settings.md#section-aware-merge-rules).
34
+ [`layered-settings`](../../docs/guidelines/agent-infra/layered-settings.md#section-aware-merge-rules).
35
35
 
36
36
  ## Steps
37
37
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: check-current-md
3
- description: Check the currently open .md file (or a path you pass) for German content outside DE:/EN: anchor blocks — umlauts, German function words, untranslated quoted phrases. Reports findings and offers fixes.
3
+ description: Check the open .md file (or a passed path) for German outside DE:/EN: anchor blocks — umlauts, function words, untranslated quotes. Reports and offers fixes.
4
4
  disable-model-invocation: true
5
5
  suggestion:
6
6
  eligible: false
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: council-design
3
+ cluster: optimize
4
+ skills: [ai-council]
5
+ description: Run the council on a design document, ADR, or architecture proposal — surfaces hidden coupling, missing rollback, and sequencing risk before commitment.
6
+ disable-model-invocation: true
7
+ suggestion:
8
+ eligible: true
9
+ trigger_description: "council on this design, second opinion on the ADR, external review of architecture proposal"
10
+ trigger_context: "user has a design doc / ADR / architecture proposal and wants an external review before commitment"
11
+ ---
12
+
13
+ # council-design
14
+
15
+ ## Instructions
16
+
17
+ Specialised council mode for **design documents, ADRs, and
18
+ architecture proposals**. Wraps `/council files:<paths>` (or
19
+ `/council prompt:"…"`) with the `design` mode neutrality preamble that
20
+ focuses members on architectural risk rather than line-level
21
+ correctness.
22
+
23
+ ### 1. Resolve the artefact
24
+
25
+ The user invoked `/council-design <path>` or `/council-design`. If no
26
+ path was supplied, ask (one question per turn):
27
+
28
+ > Which design artefact should the council review?
29
+ >
30
+ > 1. A file path (ADR, design doc, RFC)
31
+ > 2. Multiple files / a directory (the bundler will gather them)
32
+ > 3. A free-form proposal in the chat — paste it now
33
+
34
+ Pick **1** or **2** → use `files:` mode of `/council`.
35
+ Pick **3** → use `prompt:` mode of `/council`.
36
+
37
+ ### 2. Capture the originating ask
38
+
39
+ Look for the artefact's stated goal — the first paragraph after the
40
+ title, or a `## Goal` / `## Problem` section if present. That goal is
41
+ the `original_ask` for the handoff preamble. If the artefact has no
42
+ goal section, ask the user (one question per turn):
43
+
44
+ > What is the goal of this design? (one sentence — used as neutral
45
+ > framing for the council, not their analysis)
46
+
47
+ ### 3. Run /council with the design mode preamble
48
+
49
+ Invoke the matching `/council` form:
50
+
51
+ - `files:` → `/council files:<paths>` with `mode_override=design`.
52
+ - `prompt:` → `/council prompt:"<artefact text>"` with
53
+ `mode_override=design`.
54
+
55
+ The `design` mode addendum from `scripts/ai_council/prompts.py`
56
+ focuses council members on:
57
+
58
+ - Trust-boundary and module-coupling risk.
59
+ - Rollback / kill-switch criteria the design omits.
60
+ - Sequencing risk (does step N really not block step N+1?).
61
+ - Open questions disguised as decisions.
62
+
63
+ The cost gate from `/council` Step 3 still applies.
64
+
65
+ ### 4. Render the report
66
+
67
+ Use the standard stacked + Convergence/Divergence layout. Add a
68
+ one-line header at the top so reviewers know the lens:
69
+
70
+ ```
71
+ ## Council on <artefact path or "free-form proposal"> — design lens
72
+ ```
73
+
74
+ ### 5. Hand back to the user
75
+
76
+ The council is **advisory**. Do **not** rewrite the design based on
77
+ findings. Surface convergent + divergent points and let the user
78
+ decide which to fold in via `/feature plan` or `/feature refactor`.
79
+
80
+ ### Hard floor (restated)
81
+
82
+ `/council-design` produces **text only**. It does NOT edit the
83
+ design file, open ADR PRs, or modify the codebase.
84
+
85
+ ## Failure modes
86
+
87
+ - **No artefact resolvable** → ask once; if still empty, stop.
88
+ - **Artefact too large** → bundler raises `BundleTooLarge`; suggest
89
+ splitting (`/council files:<single-file>` per section).
90
+
91
+ ## See also
92
+
93
+ - `/council` — base orchestration entry point.
94
+ - `/feature plan` / `/feature refactor` — where design changes get
95
+ written, after the council surfaces issues.
96
+ - `ai-council` skill — neutrality guidelines.
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: council-optimize
3
+ cluster: optimize
4
+ skills: [ai-council]
5
+ description: Run the council on an optimization target — perf hot path, memory pattern, query, or an /optimize-* output — for ranked, evidence-based suggestions instead of generic advice.
6
+ disable-model-invocation: true
7
+ suggestion:
8
+ eligible: true
9
+ trigger_description: "council on this perf hot path, second opinion on this optimization, external review of /optimize output"
10
+ trigger_context: "user has an optimization target (code path, query, profile result, /optimize-* output) and wants a ranked external opinion"
11
+ ---
12
+
13
+ # council-optimize
14
+
15
+ ## Instructions
16
+
17
+ Specialised council mode for **optimization targets**: hot paths,
18
+ slow queries, allocation profiles, or the output of an `/optimize-*`
19
+ command (`/optimize-skills`, `/optimize-agents`,
20
+ `/optimize-augmentignore`, `/optimize-rtk-filters`). Wraps
21
+ `/council` with the `optimize` neutrality preamble, which focuses
22
+ members on **ranked**, **evidence-based** suggestions instead of
23
+ generic "you should profile" advice.
24
+
25
+ ### 1. Resolve the target
26
+
27
+ The user invoked `/council-optimize <target>` or `/council-optimize`.
28
+ If nothing was supplied, ask (one question per turn):
29
+
30
+ > What should the council optimize?
31
+ >
32
+ > 1. A file or directory of code (perf hot path)
33
+ > 2. A query / SQL / DB call (paste it now)
34
+ > 3. The output of an `/optimize-*` command — re-run it now and feed
35
+ > the report to the council
36
+ > 4. A free-form description of the bottleneck
37
+
38
+ Pick **1** → `/council files:<paths>` with `mode_override=optimize`.
39
+ Pick **2** → `/council prompt:"<query + context>"` with
40
+ `mode_override=optimize`.
41
+ Pick **3** → run the chosen `/optimize-*` command first, then feed
42
+ its report file to `/council files:<report>` with
43
+ `mode_override=optimize`.
44
+ Pick **4** → `/council prompt:"<description>"` with
45
+ `mode_override=optimize`.
46
+
47
+ ### 2. Capture the constraint
48
+
49
+ Optimization is meaningless without a target metric. Ask **once**
50
+ (one question per turn) before invoking `/council`:
51
+
52
+ > What does "better" mean here?
53
+ >
54
+ > 1. Latency (p50 / p95 / p99 — pick which)
55
+ > 2. Throughput (req/s)
56
+ > 3. Memory footprint
57
+ > 4. Cost ($ / 1M ops)
58
+ > 5. Token count (for LLM workflows)
59
+ > 6. Other — describe in one line
60
+
61
+ The chosen metric becomes the `original_ask` for the handoff preamble:
62
+ `Optimize for <metric>: <one-line scope>`.
63
+
64
+ ### 3. Run /council with the optimize mode preamble
65
+
66
+ Invoke the matching `/council` form (`files:` / `prompt:`) with
67
+ `mode_override=optimize`. The `optimize` mode addendum from
68
+ `scripts/ai_council/prompts.py` requires members to:
69
+
70
+ - Rank suggestions by expected impact on the chosen metric, not by
71
+ effort or cleverness.
72
+ - Cite the evidence (line, query plan, profile entry) for each
73
+ suggestion. No hand-wave "this is probably slow".
74
+ - State at least one suggestion the member explicitly **rejects** as
75
+ low-leverage, so the user does not over-engineer.
76
+ - Mark at least one suggestion that requires measurement before
77
+ committing — i.e. flag what is hypothesis vs. confirmed.
78
+
79
+ The cost gate from `/council` Step 3 still applies.
80
+
81
+ ### 4. Render the report
82
+
83
+ Use the standard stacked + Convergence/Divergence layout. Add a
84
+ one-line header at the top so the optimization metric is visible:
85
+
86
+ ```
87
+ ## Council on <target> — optimize for <metric>
88
+ ```
89
+
90
+ ### 5. Hand back to the user
91
+
92
+ The council is **advisory**. Do **not** apply optimizations
93
+ autonomously. Surface ranked suggestions and let the user pick which
94
+ to drive into a normal `/work` / `/implement-ticket` flow.
95
+
96
+ ### Hard floor (restated)
97
+
98
+ `/council-optimize` produces **text only**. It does NOT edit code,
99
+ run benchmarks, or change configuration.
100
+
101
+ ## Failure modes
102
+
103
+ - **No measurable metric** → if the user picks "Other" without a
104
+ unit, ask once for clarification; if still vague, stop. Generic
105
+ "make it better" is exactly what this command refuses to enable.
106
+ - **Target too large** → bundler raises `BundleTooLarge`; suggest
107
+ narrowing to the hot path (`/council files:<single-file>`).
108
+
109
+ ## See also
110
+
111
+ - `/council` — base orchestration entry point.
112
+ - `/optimize-skills`, `/optimize-agents`, `/optimize-augmentignore`,
113
+ `/optimize-rtk-filters` — internal optimization commands; their
114
+ output can be fed to `/council-optimize` for an external ranking.
115
+ - `ai-council` skill — neutrality guidelines.
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: council-pr
3
+ cluster: optimize
4
+ skills: [ai-council]
5
+ description: Pull a GitHub PR via gh CLI and run the council on the diff with a PR-specific neutrality preamble — read-only by default; comment posting is opt-in.
6
+ disable-model-invocation: true
7
+ suggestion:
8
+ eligible: true
9
+ trigger_description: "council on PR #N, external review of pull request, second opinion on a PR"
10
+ trigger_context: "user has a PR number / URL and wants an external review before approve/merge"
11
+ ---
12
+
13
+ # council-pr
14
+
15
+ ## Instructions
16
+
17
+ Specialised council mode for **GitHub PRs**. Wraps `/council diff:<base>..<head>`
18
+ with a PR-aware neutrality preamble (the `pr` mode) and an opt-in
19
+ "post a comment summary on the PR" step at the end.
20
+
21
+ ### 1. Resolve the PR target
22
+
23
+ The user invoked `/council-pr <number>` or `/council-pr <url>`. If
24
+ neither was supplied, ask (one question per turn, per
25
+ `ask-when-uncertain`):
26
+
27
+ > Which PR should the council review?
28
+ >
29
+ > 1. PR number on the current repo (e.g. `#123`)
30
+ > 2. Full GitHub URL
31
+ > 3. Cancel
32
+
33
+ ### 2. Pull PR metadata via gh CLI
34
+
35
+ Run:
36
+
37
+ ```bash
38
+ gh pr view <number> --json number,title,body,headRefName,baseRefName,author,url
39
+ ```
40
+
41
+ Capture: title, body, head ref, base ref. The **PR title + body** is
42
+ the user's `original_ask` for the handoff preamble — verbatim, after
43
+ `_strip_host_identity()` cleansing in `prompts.py`. Do **not** add the
44
+ agent's framing.
45
+
46
+ ### 3. Fetch the diff range locally
47
+
48
+ ```bash
49
+ git fetch origin <base>:<base>
50
+ git fetch origin <head>:<head>
51
+ ```
52
+
53
+ Compute the diff range as `origin/<base>..origin/<head>` (or the local
54
+ refs if already fetched).
55
+
56
+ ### 4. Run /council with the pr mode preamble
57
+
58
+ Invoke `/council diff:<base>..<head>` with:
59
+
60
+ - `original_ask` = PR title + body (capped per
61
+ `bundler.size_guard`; warn if truncated).
62
+ - The neutrality preamble uses the `pr` mode addendum from
63
+ `scripts/ai_council/prompts.py` — focuses members on
64
+ PR-specific risks (shipping risk, reviewer fatigue, scope creep)
65
+ on top of the generic diff focus (correctness, security, tests,
66
+ maintainability).
67
+
68
+ The cost gate from `/council` Step 3 still applies. Council is
69
+ billable; suppress the question only when the resolved members are
70
+ all-manual.
71
+
72
+ ### 5. Render the report
73
+
74
+ Use the standard stacked + Convergence/Divergence layout from
75
+ `/council` Step 6. Add a one-line PR header at the top:
76
+
77
+ ```
78
+ ## Council on PR #<number> — <title>
79
+
80
+ Base: <base> · Head: <head> · Author: <author>
81
+ ```
82
+
83
+ ### 6. Offer to post a comment summary (opt-in)
84
+
85
+ After the report renders, ask (in the user's language):
86
+
87
+ > 1. Post a one-paragraph summary as a PR comment? (read-only otherwise)
88
+ > 2. Skip — keep the council output local
89
+
90
+ If picked **1**:
91
+
92
+ - Build a short summary: convergent points, divergent points, suggested
93
+ actions. Keep it ≤ 800 chars.
94
+ - Run `gh pr comment <number> --body "<summary>"`.
95
+ - **Never** request changes, approve, or merge — comment only.
96
+
97
+ Suppress the comment offer when `personal.autonomy: on` (posting to a
98
+ public PR is a write operation that should always be explicit).
99
+
100
+ ### Hard floor (restated)
101
+
102
+ `/council-pr` produces **text** and (on user opt-in) a **single PR
103
+ comment**. It does **NOT**:
104
+
105
+ - Approve, request changes, or merge a PR.
106
+ - Edit project files.
107
+ - Open new issues or PRs.
108
+ - Post comments without explicit user opt-in.
109
+
110
+ ## Failure modes
111
+
112
+ - **`gh` not installed / not authed** → state the install command
113
+ (`brew install gh && gh auth login`) and stop.
114
+ - **PR is closed / merged** → ask whether to proceed (council on a
115
+ closed PR is fine for retrospectives) or cancel.
116
+ - **Diff too large** → bundler raises `BundleTooLarge`; suggest
117
+ `/council files:<paths>` for a narrower review.
118
+
119
+ ## See also
120
+
121
+ - `/council` — base orchestration entry point.
122
+ - `ai-council` skill — neutrality guidelines.
123
+ - `/review-changes` — internal four-judge variant for local diffs.
@@ -0,0 +1,219 @@
1
+ ---
2
+ name: council
3
+ cluster: optimize
4
+ skills: [ai-council]
5
+ description: Consult external AIs (OpenAI, Anthropic) for an independent second opinion on a prompt, roadmap, diff, or file set — neutral framing, redacted context, advisory output only.
6
+ disable-model-invocation: true
7
+ suggestion:
8
+ eligible: true
9
+ trigger_description: "external second opinion, cross-AI review, devil's advocate on a plan/roadmap/diff, polling another model"
10
+ trigger_context: "user wants an outside critique on an artefact (roadmap, diff, prompt, files) without polluting the reviewer with the host agent's framing"
11
+ ---
12
+
13
+ # council
14
+
15
+ ## Instructions
16
+
17
+ ### 1. Resolve the target + capture the original ask
18
+
19
+ The user invoked `/council` on exactly one input mode:
20
+
21
+ - `prompt:"<text>"` — a free-form question or proposal
22
+ - `roadmap:<path>` — a roadmap file under `agents/roadmaps/`
23
+ - `diff:<base>..<head>` — a git diff range
24
+ - `files:<path>,<path>` — a comma-separated file list
25
+
26
+ Optional invocation flag: `mode:api|manual` overrides the per-member
27
+ and global mode for this call only (see Step 2.5). `mode:playwright`
28
+ is reserved for Phase 2c — refuse politely if invoked.
29
+
30
+ Optional **rounds**: `rounds:N` (1-3) enables multi-round debate. Round
31
+ 1 sees the artefact alone. Round 2+ sees the artefact plus anonymised
32
+ critiques from the previous round (provider/model identity stripped).
33
+ Total spend = N × single-round cost; surface this in the cost gate.
34
+ Default `rounds:1` (single round, v1 behaviour).
35
+
36
+ Optional **mode_override**: `mode_override=pr|design|optimize` swaps
37
+ the system-prompt addendum for one of the specialised lenses
38
+ (see `prompts.py` `_MODE_TABLE`). The bundle mode (`prompt:` /
39
+ `roadmap:` / `diff:` / `files:`) is unchanged; only the per-mode
40
+ neutrality addendum is replaced. Routed by `/council-pr`,
41
+ `/council-design`, `/council-optimize` — surface to the user as
42
+ "council on <target> — <lens> lens" so the report header is
43
+ unambiguous.
44
+
45
+ If none was supplied, ask the user which mode + target. **One question
46
+ per turn** (per `ask-when-uncertain`). Do not assume the working-tree
47
+ diff.
48
+
49
+ Also capture the user's **original ask** verbatim — the free-form
50
+ sentence that triggered the council, distinct from the bundled
51
+ artefact. For `prompt:"…"` mode the ask and the artefact are the
52
+ same string. For `roadmap` / `diff` / `files` modes, the ask is the
53
+ user's framing sentence ("review this roadmap before I execute it",
54
+ "is this diff safe to merge?"). This string flows into
55
+ `consult(..., original_ask=…)` in Step 5 so council members receive
56
+ the neutral handoff preamble alongside the artefact (per
57
+ `ai-council` skill § Neutrality — context-handoff).
58
+
59
+ ### 2. Check the council is configured + price table fresh
60
+
61
+ Read `.agent-settings.yml` → `ai_council`:
62
+
63
+ - If `ai_council.enabled` is false → state that and offer to flip it
64
+ on. Do not flip it autonomously.
65
+ - If no member has `enabled: true` → list the install commands
66
+ (`./agent-config keys:install-anthropic`, `./agent-config keys:install-openai`)
67
+ and stop.
68
+ - If a member is enabled but its `*.key` file is missing or has the
69
+ wrong mode → tell the user which key to install. Do not fall back to
70
+ env vars. Ever.
71
+
72
+ Load the price table via `scripts.ai_council.pricing.load_prices()`
73
+ (auto-bootstraps `.agent-prices.md` from defaults if missing). Run
74
+ `pricing.is_stale(table)` and, if stale, surface the staleness gate
75
+ from the `ai-council` skill (§ Stale price-table gate) before
76
+ continuing.
77
+
78
+ ### 2.5. Resolve per-member execution mode
79
+
80
+ For each enabled member, resolve its mode via
81
+ `scripts.ai_council.modes.resolve_mode(name, invocation_mode,
82
+ member_settings, global_mode)`. Precedence: invocation flag >
83
+ per-member setting > global setting > default (`api`).
84
+
85
+ Construct each member from the resolved mode:
86
+
87
+ - `api` → `AnthropicClient` / `OpenAIClient` (billable, cost-gated).
88
+ - `manual` → `ManualClient` from `scripts.ai_council.clients`
89
+ (`billable=False`, no API key, no SDK call).
90
+ - `playwright` → reserved for Phase 2c. If a settings/invocation
91
+ resolves to it, refuse with a one-line note.
92
+
93
+ ### 3. Cost confirmation — ALWAYS ASK for billable members
94
+
95
+ Council calls to billable members spend money. Even under
96
+ `personal.autonomy: on`, the agent **must** ask before invoking any
97
+ billable member.
98
+
99
+ Compute `orchestrator.estimate(question, members, table)` over the
100
+ **billable** subset only (`getattr(m, "billable", True)`). Manual
101
+ members contribute `$0` and skip the estimate.
102
+
103
+ Render the cost-confirmation numbered-options block per the
104
+ `ai-council` skill (§ Pre-call estimate format) — per-member tokens
105
+ + USD, projected total, budget caps, then `1. Run / 2. Cancel`. If
106
+ the resolved member set is **all-manual**, skip the gate entirely
107
+ (spend = $0) and proceed directly to Step 4.
108
+
109
+ Wait for the user's pick. `1` proceeds; anything else aborts.
110
+
111
+ ### 4. Bundle the context
112
+
113
+ Use `scripts.ai_council.bundler`:
114
+
115
+ - `prompt` mode → `bundle_prompt(text)`
116
+ - `roadmap` mode → `bundle_roadmap(path)`
117
+ - `diff` mode → `bundle_diff(base, head)`
118
+ - `files` mode → `bundle_files(paths)`
119
+
120
+ The bundler runs redaction + size guard. If `BundleTooLarge` raises,
121
+ surface the byte count and ask the user to narrow scope. Do **not**
122
+ truncate silently.
123
+
124
+ Print the manifest (what was included) and the excluded list before
125
+ sending — gives the user a chance to abort if scope is wrong.
126
+
127
+ ### 5. Run the orchestrator
128
+
129
+ Members are constructed from the settings file plus
130
+ `load_anthropic_key()` / `load_openai_key()`. Cost budget comes from
131
+ `ai_council.cost_budget`.
132
+
133
+ Detect project context once via
134
+ `scripts.ai_council.project_context.detect_project_context()` (reads
135
+ `composer.json`, `package.json`, root `README.md` — never raises;
136
+ empty-fields fall back to bare neutrality preamble).
137
+
138
+ Call:
139
+
140
+ ```python
141
+ consult(
142
+ members, question, budget,
143
+ table=table,
144
+ on_overrun=_handle_overrun,
145
+ project=project,
146
+ original_ask=original_ask,
147
+ rounds=rounds, # 1 by default; 2-3 enables multi-round debate
148
+ )
149
+ ```
150
+
151
+ `project` + `original_ask` flow into `handoff_preamble()` so each
152
+ member receives a neutral context-handoff alongside the artefact
153
+ (see `ai-council` skill § Neutrality — context-handoff). Members run
154
+ **sequentially**; per-member errors are normalised — one failure
155
+ does not abort the others. Define `_handle_overrun(event)` per the
156
+ `ai-council` skill (§ Mid-flow overrun callback) to surface the user
157
+ prompt before each breaching member.
158
+
159
+ ### 6. Render the report
160
+
161
+ Use `scripts.ai_council.orchestrator.render(responses)` for the
162
+ per-member sections (stacked, not side-by-side — narrow terminals).
163
+ Then write the **Convergence / Divergence** section yourself:
164
+
165
+ - **Agreements** — points all members made (or did not contradict).
166
+ - **Disagreements** — points where members took opposing positions.
167
+ - **Unique insights** — points raised by exactly one member.
168
+ - **Suggested next actions** — translated into concrete options for
169
+ the user.
170
+
171
+ End with a numbered-options block asking the user how to proceed
172
+ (e.g. update the roadmap, request a second round, ignore the
173
+ critique).
174
+
175
+ ### 7. Hard floor — text only
176
+
177
+ `/council` produces **text**. It does **NOT**:
178
+
179
+ - Edit any file in the project.
180
+ - Open, comment on, or merge any PR.
181
+ - Run `git` commands beyond `git diff` (read-only).
182
+ - Persist API responses outside the current chat unless the user
183
+ explicitly asks (Phase 4 — out of scope for v1).
184
+
185
+ This is restated in step 7 deliberately. The neutrality framing
186
+ loses meaning if the council can act on the project directly.
187
+
188
+ ## Failure modes
189
+
190
+ - **Member SDK not installed** → tell the user exactly which `pip
191
+ install` runs (`pip install anthropic` / `pip install openai`).
192
+ Do not fall back to mocks.
193
+ - **Key file mode drift** → refuse and point at the install script.
194
+ The 0600 contract is non-negotiable.
195
+ - **Manual mode + non-interactive stdin** → `ManualClient` reads
196
+ pasted replies from stdin terminated by a line containing only
197
+ `END`. If stdin is closed before any reply lands, the member
198
+ returns empty text with `error="manual_aborted"`; render the
199
+ partial result and ask the user.
200
+ - **Invalid mode value** → `resolve_mode()` raises
201
+ `InvalidModeError` with the exact settings path. Surface verbatim
202
+ and stop.
203
+ - **Cost budget exceeded mid-fan-out** → render the partial
204
+ responses and clearly mark the unfinished members with their
205
+ `cost_budget_exceeded` error. Do not silently retry.
206
+ - **Stale price table, refresher fails (offline)** → state the
207
+ failure, re-offer "continue with stale table / cancel", do not
208
+ proceed silently.
209
+ - **`.agent-prices.md` corrupt (missing frontmatter or columns)** →
210
+ surface the parse error, suggest deleting the file to bootstrap
211
+ fresh from defaults; never silently fall back.
212
+ - **All members error** → render the errors and ask the user
213
+ whether to fix and retry, or abort.
214
+
215
+ ## See also
216
+
217
+ - `ai-council` skill — neutrality guidelines, anti-patterns, redaction expectations.
218
+ - `subagent-orchestration` skill — internal multi-agent variant (no network calls).
219
+ - `docs/customization.md` § Available settings → `ai_council.*`.
@@ -33,6 +33,29 @@ fallback structure defined in `/create-pr-description`. NEVER invent a custom bo
33
33
 
34
34
  The user reviews and adjusts the content in that step.
35
35
 
36
+ ### 2b. Offer council review (B2 hook)
37
+
38
+ If `.agent-settings.yml` has `ai_council.enabled: true` **and** at least
39
+ one member is enabled, ask (in the user's language):
40
+
41
+ > 1. Run the council on this diff before opening the PR? (billable)
42
+ > 2. Skip council review
43
+
44
+ Suppress when `personal.autonomy: on` (council is billable; autonomy
45
+ must not silently spend — see `road-to-ai-council.md` Decision 3).
46
+
47
+ If picked **1**:
48
+
49
+ - Compute the diff range — `origin/<default>..HEAD` from step 1.
50
+ - Run `/council diff:<base>..<head>` with `original_ask` set to the
51
+ PR title from step 2 (the user's framing of the change).
52
+ - Surface findings to the user before step 3. **Do not** auto-edit
53
+ the PR body or block PR creation — output is advisory.
54
+ - Optional: offer to append a one-paragraph "Council notes" section
55
+ to the PR description for reviewer transparency. Default: skip.
56
+
57
+ If picked **2** → continue.
58
+
36
59
  ### 3. Create the PR
37
60
 
38
61
  Once the user approves the content from step 2:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: do-and-judge
3
- skills: [subagent-orchestration, verify-before-complete]
3
+ skills: [subagent-orchestration, verify-completion-evidence]
4
4
  description: Run a single change through an implementer→judge loop with a two-revision ceiling, then hand back to the user
5
5
  disable-model-invocation: true
6
6
  suggestion:
@@ -90,7 +90,7 @@ Next step: <commit / open PR / abandon>
90
90
  - No apply without the judge's `apply` verdict
91
91
  - No silent model fallback — unknown alias = stop and ask
92
92
  - No more than two revisions without user consent
93
- - No skipping of `verify-before-complete` on the final apply
93
+ - No skipping of `verify-completion-evidence` on the final apply
94
94
 
95
95
  ## When to stop and ask
96
96
 
@@ -113,5 +113,5 @@ weaker verdicts.
113
113
  ## See also
114
114
 
115
115
  - [`subagent-orchestration`](../skills/subagent-orchestration/SKILL.md)
116
- - [`verify-before-complete`](../skills/verify-before-complete/SKILL.md)
116
+ - [`verify-completion-evidence`](../skills/verify-completion-evidence/SKILL.md)
117
117
  - [`subagent-configuration`](../contexts/subagent-configuration.md)