@event4u/agent-config 1.14.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 (293) hide show
  1. package/.agent-src/commands/agent-handoff.md +1 -1
  2. package/.agent-src/commands/bug-fix.md +3 -3
  3. package/.agent-src/commands/bug-investigate.md +2 -2
  4. package/.agent-src/commands/chat-history-checkpoint.md +3 -3
  5. package/.agent-src/commands/chat-history-clear.md +2 -2
  6. package/.agent-src/commands/chat-history-resume.md +2 -2
  7. package/.agent-src/commands/chat-history.md +3 -3
  8. package/.agent-src/commands/check-current-md.md +44 -33
  9. package/.agent-src/commands/commit-in-chunks.md +43 -23
  10. package/.agent-src/commands/compress.md +34 -2
  11. package/.agent-src/commands/council-design.md +96 -0
  12. package/.agent-src/commands/council-optimize.md +115 -0
  13. package/.agent-src/commands/council-pr.md +123 -0
  14. package/.agent-src/commands/council.md +219 -0
  15. package/.agent-src/commands/create-pr.md +23 -0
  16. package/.agent-src/commands/do-and-judge.md +3 -3
  17. package/.agent-src/commands/do-in-steps.md +4 -4
  18. package/.agent-src/commands/e2e-heal.md +1 -1
  19. package/.agent-src/commands/e2e-plan.md +1 -1
  20. package/.agent-src/commands/feature-dev.md +8 -0
  21. package/.agent-src/commands/feature-explore.md +6 -1
  22. package/.agent-src/commands/feature-plan.md +33 -2
  23. package/.agent-src/commands/feature-refactor.md +5 -0
  24. package/.agent-src/commands/feature-roadmap.md +8 -3
  25. package/.agent-src/commands/feature.md +58 -0
  26. package/.agent-src/commands/fix-ci.md +5 -0
  27. package/.agent-src/commands/fix-portability.md +7 -2
  28. package/.agent-src/commands/fix-pr-bot-comments.md +5 -0
  29. package/.agent-src/commands/fix-pr-comments.md +5 -0
  30. package/.agent-src/commands/fix-pr-developer-comments.md +5 -0
  31. package/.agent-src/commands/fix-references.md +5 -0
  32. package/.agent-src/commands/fix-seeder.md +5 -0
  33. package/.agent-src/commands/fix.md +60 -0
  34. package/.agent-src/commands/jira-ticket.md +1 -1
  35. package/.agent-src/commands/judge.md +1 -1
  36. package/.agent-src/commands/memory-add.md +3 -3
  37. package/.agent-src/commands/memory-full.md +2 -2
  38. package/.agent-src/commands/memory-promote.md +2 -2
  39. package/.agent-src/commands/mode.md +5 -5
  40. package/.agent-src/commands/onboard.md +17 -8
  41. package/.agent-src/commands/optimize-agents.md +6 -1
  42. package/.agent-src/commands/optimize-augmentignore.md +14 -0
  43. package/.agent-src/commands/optimize-rtk-filters.md +5 -0
  44. package/.agent-src/commands/optimize-skills.md +6 -1
  45. package/.agent-src/commands/optimize.md +54 -0
  46. package/.agent-src/commands/propose-memory.md +2 -2
  47. package/.agent-src/commands/refine-ticket.md +9 -7
  48. package/.agent-src/commands/review-changes.md +61 -9
  49. package/.agent-src/commands/review-routing.md +1 -1
  50. package/.agent-src/commands/roadmap-create.md +42 -4
  51. package/.agent-src/commands/roadmap-execute.md +9 -7
  52. package/.agent-src/commands/set-cost-profile.md +11 -3
  53. package/.agent-src/commands/sync-agent-settings.md +11 -2
  54. package/.agent-src/commands/tests-create.md +1 -1
  55. package/.agent-src/commands/tests-execute.md +2 -3
  56. package/.agent-src/commands/upstream-contribute.md +1 -1
  57. package/.agent-src/contexts/authority/commit-mechanics.md +57 -0
  58. package/.agent-src/contexts/authority/destructive-mechanics.md +66 -0
  59. package/.agent-src/contexts/authority/scope-mechanics.md +87 -0
  60. package/.agent-src/contexts/execution/autonomy-detection.md +54 -0
  61. package/.agent-src/contexts/execution/autonomy-examples.md +90 -0
  62. package/.agent-src/contexts/execution/autonomy-mechanics.md +29 -0
  63. package/.agent-src/contexts/execution/verification-mechanics.md +80 -0
  64. package/.agent-src/personas/README.md +1 -1
  65. package/.agent-src/rules/agent-authority.md +24 -0
  66. package/.agent-src/rules/architecture.md +1 -1
  67. package/.agent-src/rules/artifact-drafting-protocol.md +1 -1
  68. package/.agent-src/rules/artifact-engagement-recording.md +2 -2
  69. package/.agent-src/rules/ask-when-uncertain.md +1 -1
  70. package/.agent-src/rules/augment-portability.md +56 -37
  71. package/.agent-src/rules/autonomous-execution.md +78 -114
  72. package/.agent-src/rules/capture-learnings.md +1 -1
  73. package/.agent-src/rules/chat-history-cadence.md +109 -0
  74. package/.agent-src/rules/chat-history-ownership.md +123 -0
  75. package/.agent-src/rules/chat-history-visibility.md +96 -0
  76. package/.agent-src/rules/cli-output-handling.md +1 -1
  77. package/.agent-src/rules/{command-suggestion.md → command-suggestion-policy.md} +10 -9
  78. package/.agent-src/rules/commit-conventions.md +1 -1
  79. package/.agent-src/rules/commit-policy.md +43 -61
  80. package/.agent-src/rules/context-hygiene.md +3 -3
  81. package/.agent-src/rules/direct-answers.md +2 -2
  82. package/.agent-src/rules/docs-sync.md +1 -1
  83. package/.agent-src/rules/e2e-testing.md +1 -1
  84. package/.agent-src/rules/guidelines.md +4 -4
  85. package/.agent-src/rules/improve-before-implement.md +2 -2
  86. package/.agent-src/rules/language-and-tone.md +41 -96
  87. package/.agent-src/rules/minimal-safe-diff.md +3 -3
  88. package/.agent-src/rules/model-recommendation.md +4 -4
  89. package/.agent-src/rules/no-cheap-questions.md +89 -0
  90. package/.agent-src/rules/non-destructive-by-default.md +25 -59
  91. package/.agent-src/rules/onboarding-gate.md +5 -5
  92. package/.agent-src/rules/review-routing-awareness.md +9 -9
  93. package/.agent-src/rules/roadmap-progress-sync.md +132 -80
  94. package/.agent-src/rules/role-mode-adherence.md +3 -3
  95. package/.agent-src/rules/scope-control.md +65 -46
  96. package/.agent-src/rules/security-sensitive-stop.md +2 -2
  97. package/.agent-src/rules/size-enforcement.md +3 -2
  98. package/.agent-src/rules/think-before-action.md +5 -5
  99. package/.agent-src/rules/token-efficiency.md +4 -4
  100. package/.agent-src/rules/{ui-audit-before-build.md → ui-audit-gate.md} +3 -3
  101. package/.agent-src/rules/user-interaction.md +31 -7
  102. package/.agent-src/rules/verify-before-complete.md +12 -67
  103. package/.agent-src/scripts/update_roadmap_progress.py +65 -8
  104. package/.agent-src/skills/ai-council/SKILL.md +333 -0
  105. package/.agent-src/skills/api-endpoint/SKILL.md +2 -2
  106. package/.agent-src/skills/blade-ui/SKILL.md +30 -11
  107. package/.agent-src/skills/blast-radius-analyzer/SKILL.md +1 -1
  108. package/.agent-src/skills/bug-analyzer/SKILL.md +1 -1
  109. package/.agent-src/skills/command-routing/SKILL.md +1 -1
  110. package/.agent-src/skills/command-writing/SKILL.md +16 -5
  111. package/.agent-src/skills/conventional-commits-writing/SKILL.md +1 -1
  112. package/.agent-src/skills/copilot-agents-optimization/SKILL.md +2 -2
  113. package/.agent-src/skills/developer-like-execution/SKILL.md +2 -2
  114. package/.agent-src/skills/existing-ui-audit/SKILL.md +24 -9
  115. package/.agent-src/skills/fe-design/SKILL.md +20 -15
  116. package/.agent-src/skills/file-editor/SKILL.md +9 -0
  117. package/.agent-src/skills/flux/SKILL.md +1 -1
  118. package/.agent-src/skills/git-workflow/SKILL.md +1 -1
  119. package/.agent-src/skills/guideline-writing/SKILL.md +11 -11
  120. package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +4 -4
  121. package/.agent-src/skills/livewire/SKILL.md +27 -8
  122. package/.agent-src/skills/override-management/SKILL.md +2 -2
  123. package/.agent-src/skills/php-coder/SKILL.md +1 -1
  124. package/.agent-src/skills/playwright-testing/SKILL.md +2 -2
  125. package/.agent-src/skills/readme-reviewer/SKILL.md +1 -1
  126. package/.agent-src/skills/readme-writing/SKILL.md +1 -1
  127. package/.agent-src/skills/readme-writing-package/SKILL.md +1 -1
  128. package/.agent-src/skills/receiving-code-review/SKILL.md +1 -1
  129. package/.agent-src/skills/refine-ticket/SKILL.md +30 -24
  130. package/.agent-src/skills/review-routing/SKILL.md +2 -2
  131. package/.agent-src/skills/roadmap-management/SKILL.md +22 -16
  132. package/.agent-src/skills/rule-writing/SKILL.md +1 -1
  133. package/.agent-src/skills/skill-reviewer/SKILL.md +1 -1
  134. package/.agent-src/skills/skill-writing/SKILL.md +6 -6
  135. package/.agent-src/skills/subagent-orchestration/SKILL.md +1 -0
  136. package/.agent-src/skills/systematic-debugging/SKILL.md +1 -1
  137. package/.agent-src/skills/upstream-contribute/SKILL.md +3 -3
  138. package/.agent-src/skills/validate-feature-fit/SKILL.md +2 -2
  139. package/.agent-src/skills/{verify-before-complete → verify-completion-evidence}/SKILL.md +2 -2
  140. package/.agent-src/templates/agent-settings.md +9 -9
  141. package/.agent-src/templates/contexts/auth-model.md +1 -1
  142. package/.agent-src/templates/roadmaps.md +9 -8
  143. package/.agent-src/templates/scripts/README.md +2 -2
  144. package/.agent-src/templates/scripts/memory_lookup.py +1 -1
  145. package/.agent-src/templates/scripts/telemetry/aggregator.py +16 -1
  146. package/.agent-src/templates/scripts/telemetry/engagement.py +59 -0
  147. package/.agent-src/templates/scripts/telemetry/report_renderer.py +28 -1
  148. package/.agent-src/templates/scripts/telemetry_record.py +14 -1
  149. package/.agent-src/templates/scripts/work_engine/__init__.py +2 -2
  150. package/.agent-src/templates/scripts/work_engine/cli.py +64 -461
  151. package/.agent-src/templates/scripts/work_engine/cli_args.py +116 -0
  152. package/.agent-src/templates/scripts/work_engine/delivery_state.py +3 -3
  153. package/.agent-src/templates/scripts/work_engine/directives/backend/__init__.py +1 -1
  154. package/.agent-src/templates/scripts/work_engine/directives/backend/implement.py +1 -1
  155. package/.agent-src/templates/scripts/work_engine/directives/backend/memory.py +1 -1
  156. package/.agent-src/templates/scripts/work_engine/directives/backend/plan.py +1 -1
  157. package/.agent-src/templates/scripts/work_engine/directives/backend/report.py +1 -1
  158. package/.agent-src/templates/scripts/work_engine/dispatcher.py +1 -1
  159. package/.agent-src/templates/scripts/work_engine/emitters.py +43 -0
  160. package/.agent-src/templates/scripts/work_engine/errors.py +19 -0
  161. package/.agent-src/templates/scripts/work_engine/hook_bootstrap.py +76 -0
  162. package/.agent-src/templates/scripts/work_engine/input_builders.py +163 -0
  163. package/.agent-src/templates/scripts/work_engine/migration/v0_to_v1.py +34 -2
  164. package/.agent-src/templates/scripts/work_engine/persona_policy.py +1 -1
  165. package/.agent-src/templates/scripts/work_engine/resolvers/prompt.py +1 -1
  166. package/.agent-src/templates/scripts/work_engine/state_io.py +202 -0
  167. package/.claude-plugin/marketplace.json +10 -2
  168. package/AGENTS.md +16 -12
  169. package/CHANGELOG.md +206 -9
  170. package/README.md +51 -52
  171. package/config/agent-settings.template.yml +58 -1
  172. package/config/gitignore-block.txt +3 -0
  173. package/docs/MIGRATION.md +122 -0
  174. package/docs/architecture.md +83 -34
  175. package/docs/catalog.md +331 -0
  176. package/docs/contracts/STABILITY.md +134 -0
  177. package/docs/contracts/adr-chat-history-split.md +132 -0
  178. package/docs/contracts/adr-command-suggestion.md +146 -0
  179. package/docs/contracts/adr-implement-ticket-runtime.md +122 -0
  180. package/docs/contracts/adr-product-ui-track.md +384 -0
  181. package/docs/contracts/adr-prompt-driven-execution.md +187 -0
  182. package/docs/contracts/agent-memory-contract.md +149 -0
  183. package/docs/contracts/artifact-engagement-flow.md +262 -0
  184. package/docs/contracts/command-clusters.md +126 -0
  185. package/docs/contracts/command-suggestion-flow.md +148 -0
  186. package/docs/contracts/implement-ticket-flow.md +628 -0
  187. package/docs/contracts/linear-ai-rules-inclusion.md +143 -0
  188. package/docs/contracts/linear-ai-three-layers.md +131 -0
  189. package/docs/contracts/load-context-schema.md +186 -0
  190. package/docs/contracts/rule-interactions.md +107 -0
  191. package/docs/contracts/rule-interactions.yml +238 -0
  192. package/docs/contracts/rule-priority-hierarchy.md +87 -0
  193. package/docs/contracts/ui-stack-extension.md +236 -0
  194. package/docs/contracts/ui-track-flow.md +338 -0
  195. package/docs/customization.md +14 -0
  196. package/docs/end-to-end-walkthroughs.md +165 -0
  197. package/docs/getting-started.md +27 -9
  198. package/docs/github-topics.md +12 -3
  199. package/docs/guidelines/agent-infra/language-and-tone-examples.md +79 -0
  200. package/{.agent-src → docs}/guidelines/docs/readme-size-and-splitting.md +26 -25
  201. package/docs/guidelines/php/git.md +164 -0
  202. package/docs/installation.md +42 -6
  203. package/docs/migrations/commands-1.15.0.md +112 -0
  204. package/docs/showcase.md +9 -4
  205. package/docs/skills-catalog.md +14 -8
  206. package/docs/ui-track-mental-model.md +121 -0
  207. package/llms.txt +13 -7
  208. package/package.json +1 -1
  209. package/scripts/agent-config +23 -0
  210. package/scripts/ai_council/__init__.py +39 -0
  211. package/scripts/ai_council/_default_prices.py +41 -0
  212. package/scripts/ai_council/_one_off_rebalancing_audit.py +149 -0
  213. package/scripts/ai_council/_one_off_roundtrip.py +106 -0
  214. package/scripts/ai_council/budget_guard.py +172 -0
  215. package/scripts/ai_council/bundler.py +261 -0
  216. package/scripts/ai_council/clients.py +381 -0
  217. package/scripts/ai_council/modes.py +127 -0
  218. package/scripts/ai_council/orchestrator.py +350 -0
  219. package/scripts/ai_council/pricing.py +213 -0
  220. package/scripts/ai_council/project_context.py +159 -0
  221. package/scripts/ai_council/prompts.py +232 -0
  222. package/scripts/ai_council/session.py +144 -0
  223. package/scripts/build_linear_digest.py +4 -4
  224. package/scripts/check_always_budget.py +126 -0
  225. package/scripts/check_augmentignore.py +69 -0
  226. package/scripts/check_command_count_messaging.py +120 -0
  227. package/scripts/check_portability.py +57 -0
  228. package/scripts/check_public_catalog_links.py +122 -0
  229. package/scripts/check_public_links.py +185 -0
  230. package/scripts/check_references.py +5 -1
  231. package/scripts/check_roadmap_trackable.py +111 -0
  232. package/scripts/command_suggester/cooldown.py +1 -1
  233. package/scripts/generate_index.py +266 -0
  234. package/scripts/install_anthropic_key.sh +5 -0
  235. package/scripts/install_openai_key.sh +106 -0
  236. package/scripts/lint_load_context.py +163 -0
  237. package/scripts/lint_no_new_atomic_commands.py +179 -0
  238. package/scripts/lint_rule_interactions.py +149 -0
  239. package/scripts/memory_lookup.py +1 -1
  240. package/scripts/release.py +297 -64
  241. package/scripts/schemas/command.schema.json +20 -0
  242. package/scripts/schemas/rule.schema.json +10 -0
  243. package/scripts/skill_linter.py +26 -4
  244. package/scripts/sync_agent_settings.py +1 -1
  245. package/scripts/update_counts.py +19 -4
  246. package/scripts/update_prices.py +124 -0
  247. package/.agent-src/guidelines/php/git.md +0 -96
  248. package/.agent-src/rules/chat-history.md +0 -200
  249. /package/.agent-src/rules/{slash-commands.md → slash-command-routing-policy.md} +0 -0
  250. /package/{.agent-src → docs}/guidelines/agent-infra/agent-interaction-and-decision-quality.md +0 -0
  251. /package/{.agent-src → docs}/guidelines/agent-infra/break-glass-usage.md +0 -0
  252. /package/{.agent-src → docs}/guidelines/agent-infra/developer-judgment.md +0 -0
  253. /package/{.agent-src → docs}/guidelines/agent-infra/engineering-memory-data-format.md +0 -0
  254. /package/{.agent-src → docs}/guidelines/agent-infra/layered-settings.md +0 -0
  255. /package/{.agent-src → docs}/guidelines/agent-infra/memory-access.md +0 -0
  256. /package/{.agent-src → docs}/guidelines/agent-infra/naming.md +0 -0
  257. /package/{.agent-src → docs}/guidelines/agent-infra/output-patterns.md +0 -0
  258. /package/{.agent-src → docs}/guidelines/agent-infra/review-routing-data-format.md +0 -0
  259. /package/{.agent-src → docs}/guidelines/agent-infra/role-contracts.md +0 -0
  260. /package/{.agent-src → docs}/guidelines/agent-infra/role-mode-router.md +0 -0
  261. /package/{.agent-src → docs}/guidelines/agent-infra/runtime-layer.md +0 -0
  262. /package/{.agent-src → docs}/guidelines/agent-infra/self-improvement-pipeline.md +0 -0
  263. /package/{.agent-src → docs}/guidelines/agent-infra/size-and-scope.md +0 -0
  264. /package/{.agent-src → docs}/guidelines/agent-infra/tool-integration.md +0 -0
  265. /package/{.agent-src → docs}/guidelines/e2e/playwright.md +0 -0
  266. /package/{.agent-src → docs}/guidelines/php/api-design.md +0 -0
  267. /package/{.agent-src → docs}/guidelines/php/artisan-commands.md +0 -0
  268. /package/{.agent-src → docs}/guidelines/php/blade-ui.md +0 -0
  269. /package/{.agent-src → docs}/guidelines/php/controllers.md +0 -0
  270. /package/{.agent-src → docs}/guidelines/php/database.md +0 -0
  271. /package/{.agent-src → docs}/guidelines/php/eloquent.md +0 -0
  272. /package/{.agent-src → docs}/guidelines/php/flux.md +0 -0
  273. /package/{.agent-src → docs}/guidelines/php/general.md +0 -0
  274. /package/{.agent-src → docs}/guidelines/php/jobs.md +0 -0
  275. /package/{.agent-src → docs}/guidelines/php/livewire.md +0 -0
  276. /package/{.agent-src → docs}/guidelines/php/logging.md +0 -0
  277. /package/{.agent-src → docs}/guidelines/php/naming.md +0 -0
  278. /package/{.agent-src → docs}/guidelines/php/patterns/dependency-injection.md +0 -0
  279. /package/{.agent-src → docs}/guidelines/php/patterns/dtos.md +0 -0
  280. /package/{.agent-src → docs}/guidelines/php/patterns/events.md +0 -0
  281. /package/{.agent-src → docs}/guidelines/php/patterns/factory.md +0 -0
  282. /package/{.agent-src → docs}/guidelines/php/patterns/pipelines.md +0 -0
  283. /package/{.agent-src → docs}/guidelines/php/patterns/policies.md +0 -0
  284. /package/{.agent-src → docs}/guidelines/php/patterns/repositories.md +0 -0
  285. /package/{.agent-src → docs}/guidelines/php/patterns/service-layer.md +0 -0
  286. /package/{.agent-src → docs}/guidelines/php/patterns/strategy.md +0 -0
  287. /package/{.agent-src → docs}/guidelines/php/patterns.md +0 -0
  288. /package/{.agent-src → docs}/guidelines/php/performance.md +0 -0
  289. /package/{.agent-src → docs}/guidelines/php/resources.md +0 -0
  290. /package/{.agent-src → docs}/guidelines/php/security.md +0 -0
  291. /package/{.agent-src → docs}/guidelines/php/sql.md +0 -0
  292. /package/{.agent-src → docs}/guidelines/php/validations.md +0 -0
  293. /package/{.agent-src → docs}/guidelines/php/websocket.md +0 -0
@@ -0,0 +1,333 @@
1
+ ---
2
+ name: ai-council
3
+ description: "Use when polling external AIs (OpenAI, Anthropic) outside the host session for a neutral second opinion on a roadmap, diff, prompt, or file set — or 'cross-check with another model'."
4
+ source: package
5
+ ---
6
+
7
+ # ai-council
8
+
9
+ ## When to use
10
+
11
+ * The host agent has drafted a roadmap, plan, or design and wants an
12
+ **external** critique that is not biased by its own framing.
13
+ * The user asks "what would Claude / GPT say about this?" or invokes
14
+ `/council`.
15
+ * A PR diff or commit range needs a second-opinion review beyond the
16
+ internal four-judge pass.
17
+ * A free-form proposal benefits from being challenged by an outside
18
+ reviewer before it calcifies into work.
19
+
20
+ Do NOT use when:
21
+
22
+ * The decision is internal-only and budget matters more than diversity
23
+ of opinion → use `subagent-orchestration` (in-session, no network,
24
+ no money).
25
+ * The artefact contains secrets that cannot be redacted with the
26
+ bundler's pattern set → ask the user before sending.
27
+ * The user has not configured any council member → state that and stop;
28
+ do not silently fall back to anything.
29
+
30
+ ## Goal
31
+
32
+ Bring in **independent** external models to critique a project
33
+ artefact. Independent means: the council members never see the host
34
+ agent's reasoning, internal state, or framing language — only the
35
+ artefact (roadmap, diff, prompt, file set) plus a neutral system
36
+ prompt that asks them to think on their own merits.
37
+
38
+ ## Neutrality guidelines (Iron Law)
39
+
40
+ ```
41
+ THE COUNCIL DOES NOT SEE THE HOST AGENT'S ANALYSIS.
42
+ THE COUNCIL DOES NOT SEE PRIOR REPLIES.
43
+ THE COUNCIL SEES THE ARTEFACT + THE NEUTRAL SYSTEM PROMPT. NOTHING ELSE.
44
+ ```
45
+
46
+ If you find yourself wanting to "frame" the artefact for the council,
47
+ stop. Framing is exactly what kills the second-opinion value. Use the
48
+ unbiased system prompts in `scripts/ai_council/prompts.py`; do not
49
+ roll your own.
50
+
51
+ ### Neutrality — context-handoff
52
+
53
+ External reviewers do better critique when they know **what the
54
+ project is**, not just what the artefact looks like. The council
55
+ ships a neutral **handoff preamble** (modelled on `/agent-handoff`)
56
+ in front of every member's system prompt, assembled by
57
+ `prompts.handoff_preamble(project, original_ask)`:
58
+
59
+ | Carried | Forbidden |
60
+ |---|---|
61
+ | Project name (from `composer.json` / `package.json` / repo dir) | Host-agent identity (Augment, Claude Code, Cursor, Cline, Windsurf, Copilot agent) — stripped line-by-line before send |
62
+ | Stack one-liner inferred from manifest files | Host-agent reasoning, prior turns, internal analysis |
63
+ | One paragraph of repo purpose from `README.md` (max 400 chars) | Host-agent framing language ("I think this looks weak", "the user probably wants…") |
64
+ | The user's **original ask** verbatim (the free-form sentence that triggered `/council`) | Anything the host agent generated about the artefact |
65
+
66
+ `detect_project_context()` in `scripts/ai_council/project_context.py`
67
+ reads only the manifest files + root README; missing fields collapse
68
+ to `None` and the preamble silently omits the line. With both
69
+ `project=None` and `original_ask=""`, the preamble degrades to the
70
+ bare `NEUTRALITY_PREAMBLE` (v1 shape — back-compat for callers that
71
+ have not migrated yet).
72
+
73
+ ## Execution modes
74
+
75
+ A council member can run in one of three transports. The neutrality
76
+ preamble is identical across all of them — only the path the bytes
77
+ travel changes.
78
+
79
+ | Mode | Client | Billable | Transport | Status |
80
+ |---|---|---|---|---|
81
+ | `api` | `AnthropicClient` / `OpenAIClient` | yes | provider SDK + key from `~/.config/agent-config/<provider>.key` | shipped |
82
+ | `manual` | `ManualClient` | no | `stdout` (prompt block) + `stdin` (user pastes the web-UI reply, terminated by a line containing only `END`) | shipped (Phase 2b) |
83
+ | `playwright` | `PlaywrightClient` | no | persistent-profile browser at the provider's chat URL via DOM adapter | reserved (Phase 2c — capture-only) |
84
+
85
+ Resolution lives in `scripts/ai_council/modes.py`:
86
+ `resolve_mode(name, invocation_mode, member_settings, global_mode)`
87
+ with precedence **invocation flag > per-member setting > global
88
+ setting > default (`api`)**. Whitespace-and-case insensitive; empty
89
+ strings fall through; unknown values raise `InvalidModeError` with
90
+ the offending settings path (`ai_council.mode`,
91
+ `ai_council.members.<name>.mode`, or `/council mode=`).
92
+
93
+ ### Manual-mode UX
94
+
95
+ `ManualClient` is the user-as-transport variant: the agent prints
96
+ one Markdown block per member (system prompt + handoff preamble +
97
+ artefact between two `═` rules), the user pastes it into a web
98
+ chat (Claude.ai, ChatGPT, Gemini), then pastes the reply back
99
+ ending with a line containing only `END`. After each reply, a 1/2/3
100
+ menu surfaces:
101
+
102
+ 1. More feedback for this member (continue this thread)
103
+ 2. Done with this member, move to the next
104
+ 3. Abort the council run
105
+
106
+ `1` re-emits a follow-up block addressed to the **same chat
107
+ thread** (no system prompt repetition). `2` records the round and
108
+ moves to the next member. `3` returns `error="manual_aborted"` for
109
+ that member and the orchestrator stops the fan-out.
110
+
111
+ ### Cost-gate bypass for non-billable members
112
+
113
+ `ExternalAIClient.billable` is the contract. Clients with
114
+ `billable=False` (today: `ManualClient`; future: `PlaywrightClient`)
115
+ bypass the cost gate entirely — the orchestrator skips the
116
+ projection check, the `on_overrun` callback, and the USD-budget
117
+ short-circuit for that member, but still records the response's
118
+ token counts (from the manual-paste length heuristic or the
119
+ provider's reply, when available) for observability. Mixed runs
120
+ (one manual + one api) gate only the api members.
121
+
122
+ ## Procedure
123
+
124
+ 1. **Resolve target.** Identify the artefact mode (`prompt`, `roadmap`,
125
+ `diff`, `files`) and locate the source. Refuse to proceed if the
126
+ target is ambiguous.
127
+ 2. **Bundle + redact.** Call `scripts/ai_council/bundler.py` to produce
128
+ a redacted artefact bundle. If `BundleTooLarge` fires, surface the
129
+ size and ask the user to narrow scope — do NOT truncate silently.
130
+ 3. **Confirm spend.** Before any network call, surface members + cost
131
+ ceiling and require an explicit user `1` to proceed. Autonomy
132
+ settings do not override this gate.
133
+ 4. **Fan out.** Dispatch the bundle to each enabled council member via
134
+ `scripts/ai_council/orchestrator.py`. Each member receives the
135
+ neutrality preamble from `prompts.py` plus the artefact — nothing
136
+ from the host agent's prior reasoning.
137
+ 5. **Render results.** Stack each member's response under its own
138
+ provider-attributed heading. Never merge or paraphrase responses
139
+ into the host agent's voice.
140
+ 6. **Summarise.** Write a `Convergence / Divergence` block listing
141
+ agreements, disagreements, and unique insights — provider-attributed.
142
+ 7. **Translate to options.** Convert actionable council suggestions
143
+ into concrete numbered options for the user. The user decides;
144
+ the council advises.
145
+
146
+ ## Output format
147
+
148
+ Every council reply MUST contain, in this order:
149
+
150
+ 1. **Header line** with mode, member count, and total token cost.
151
+ 2. **One section per member**, titled `### <provider> · <model>`,
152
+ containing the member's verbatim output.
153
+ 3. **Convergence / Divergence summary** — bullet list, every claim
154
+ attributed by provider name.
155
+ 4. **User-facing options** — numbered block per `user-interaction`,
156
+ with "discard council input" always present as an option.
157
+
158
+ The host agent NEVER ships council output as its own reasoning.
159
+ Provider attribution stays visible in every render.
160
+
161
+ ## Do NOT
162
+
163
+ - Do NOT paraphrase council output into the host agent's voice — strip
164
+ attribution and you've stripped the value.
165
+ - Do NOT pre-warm the council with the host agent's analysis or
166
+ identity — that primes the reviewer and collapses diversity.
167
+ - Do NOT silently truncate a too-large bundle — surface the size and
168
+ ask for narrower scope.
169
+ - Do NOT auto-spend tokens under `personal.autonomy: on` — the cost
170
+ gate fires every time, no exceptions.
171
+ - Do NOT reuse SDK clients across invocations — re-load keys via
172
+ `load_*_key()` each call.
173
+
174
+ ## Gotchas
175
+
176
+ Real failure modes seen in the wild:
177
+
178
+ - **Bias-by-framing:** agent pastes "I think X is the right answer,
179
+ what do you think?" → council rubber-stamps. Symptom: 100%
180
+ convergence, zero unique insight. Fix: send artefact only, neutral
181
+ preamble, no host reasoning.
182
+ - **Silent budget overrun:** `cost_budget_exceeded` mid-fan-out, agent
183
+ retries one member to "complete" the council. Result: skewed sample,
184
+ hidden spend. Fix: surface partial result, stop, ask user.
185
+ - **Identity leak:** roadmap text contains "the agent decided…" —
186
+ reviewer infers host model and mirrors it. Fix: redact host-agent
187
+ identity strings before bundling.
188
+
189
+ | Anti-pattern | Why it's wrong | Correct approach |
190
+ |---|---|---|
191
+ | "Pre-warm" the council with the agent's own analysis. | Bias attack — collapses the reviewer to a yes-man. | Send the artefact text only. |
192
+ | Paste the host-agent identity ("I am Augment / Claude Code…") | Identity primes the reviewer's model. | Neutrality preamble in `prompts.py` already handles this. |
193
+ | Silently truncate a too-large bundle. | Misleads the reviewer into thinking they saw the whole thing. | Bundler raises `BundleTooLarge`; surface and ask for narrower scope. |
194
+ | Reuse the same SDK client across calls without re-loading the key. | Leaks the key in long-lived process state. | Each invocation builds fresh clients from `load_*_key()`. |
195
+ | Auto-spend tokens under `personal.autonomy: on`. | Autonomy ≠ permission to spend money. | Always ask before consultation, even under autonomy. |
196
+
197
+ ## Redaction expectations
198
+
199
+ The bundler's redaction pass strips:
200
+
201
+ - Paths matching `~/.config/agent-config/*.key`.
202
+ - Lines starting with `Authorization:`.
203
+ - `key = …`, `secret = …`, `token = …`, `password = …` assignments.
204
+ - `sk-ant-…` and `sk-…` token-like strings.
205
+
206
+ If your artefact contains other sensitive data (customer names,
207
+ internal hostnames, contractual prose) you are responsible for
208
+ scrubbing it before bundling. The redaction pass is a **floor**, not
209
+ a ceiling.
210
+
211
+ ## Cost awareness
212
+
213
+ Every consultation hits a paid API. The orchestrator enforces
214
+ per-invocation caps from `ai_council.cost_budget`:
215
+
216
+ - `max_input_tokens` / `max_output_tokens` — token caps across all members.
217
+ - `max_total_usd` — per-invocation USD ceiling. `0` disables the USD ceiling (token caps still apply).
218
+ - `max_calls` — maximum number of council members per invocation.
219
+ - `daily_limit_usd` — rolling 24h spend cap across all `/council`
220
+ invocations. `0` disables. Persists in
221
+ `~/.config/agent-config/council-spend.jsonl` (mode 0600). Breach
222
+ fires `on_overrun(event)` with `event.breach_kind == "daily"` and,
223
+ if the callback returns False or is absent, tags the member
224
+ `daily_budget_exceeded` instead of `cost_budget_exceeded`.
225
+
226
+ Prices come from `.agent-prices.md` (gitignored, refreshed weekly).
227
+ The pricing module bootstraps it from `_default_prices.py` on first
228
+ use and flags it stale when older than the most recent Monday 00:00
229
+ UTC.
230
+
231
+ ### Pre-call estimate format
232
+
233
+ Before the cost gate, compute `orchestrator.estimate(question, members,
234
+ table)` and render a per-member table. Heuristic: `len(text) / 4` for
235
+ input, member's `max_tokens` ceiling for output (actual spend is
236
+ usually lower).
237
+
238
+ > External council call — billable
239
+ >
240
+ > Mode: roadmap · Target: `agents/roadmaps/<name>.md` (~3 KB after redaction)
241
+ >
242
+ > | member | est. in / out tokens | est. USD |
243
+ > |---------------------------------|---------------------:|---------:|
244
+ > | anthropic / claude-sonnet-4-5 | ~750 / 1024 | $0.0176 |
245
+ > | openai / gpt-4o | ~750 / 1024 | $0.0121 |
246
+ > | **total** | | **$0.0297** |
247
+ >
248
+ > Budget: 50k in / 20k out tokens · USD ceiling: $0.50
249
+ >
250
+ > 1. Run the consultation
251
+ > 2. Cancel
252
+
253
+ ### Stale price-table gate
254
+
255
+ If `pricing.is_stale(table)` returns true, ask before proceeding:
256
+
257
+ > Price table is stale (last_updated: YYYY-MM-DD)
258
+ > 1. Refresh now (`python3 scripts/update_prices.py`)
259
+ > 2. Continue with the stale table
260
+ > 3. Cancel
261
+
262
+ Do not silently auto-refresh — the user keeps control.
263
+
264
+ ### Mid-flow overrun callback (`on_overrun`)
265
+
266
+ The orchestrator runs members **sequentially**. Before each member
267
+ whose projected spend would breach a cap, it invokes the
268
+ `on_overrun(event)` callback. The callback returns `True` to proceed
269
+ with that member (raises the effective ceiling for THIS call only)
270
+ or `False` to skip and record `cost_budget_exceeded`. The callback
271
+ fires again for every subsequent breaching member — the user keeps
272
+ control on each step.
273
+
274
+ > Cost budget overrun — pausing before next member
275
+ >
276
+ > Member: openai / gpt-4o (member 2 of 2)
277
+ > Already spent: ~620 in / ~480 out tokens · $0.0094
278
+ > Next call estimate: ~750 in / 1024 out tokens · $0.0121
279
+ > **Projected total after this call: $0.0215** (ceiling: $0.0150)
280
+ >
281
+ > 1. Continue with this member
282
+ > 2. Skip this member (records `cost_budget_exceeded`, continues with the rest)
283
+
284
+ Without `on_overrun`, breaching short-circuits all remaining members
285
+ (v1 fallback). Do not retry silently. Surface the partial result and
286
+ ask the user.
287
+
288
+ ## Multi-round debate (`rounds:N`)
289
+
290
+ `consult(..., rounds=N)` enables 2-3 round critique loops. Round 1
291
+ runs the standard single-round flow. Round 2+ rebuilds the user
292
+ prompt as `<original artefact> + <prior round, anonymised>` so each
293
+ member can refine, agree, or push back on the previous critique
294
+ without seeing which provider produced which point.
295
+
296
+ | Property | Behaviour |
297
+ |---|---|
298
+ | Anonymisation | Provider/model identity is stripped. Reviewers are labelled `Reviewer A / B / C…` in input order. |
299
+ | Errored prior responses | Skipped — they reveal nothing useful and can leak provider error formats. |
300
+ | Cost budget | Accumulates across rounds. A round-2 call that breaches the cap fires `on_overrun` exactly like a round-1 breach. |
301
+ | Daily limit | Same — every billable round-2 call records spend in the rolling 24h ledger. |
302
+ | Return value | Final round only. Use `on_round_complete(round_idx, responses)` to capture intermediate rounds for rendering. |
303
+
304
+ > Iron Law: anonymisation is non-negotiable. If you ever need to
305
+ > surface "which model said what" between rounds, that is a different
306
+ > feature — debug-only, off by default, never enabled in user-facing
307
+ > output. The neutrality contract dies the moment a member learns it
308
+ > is talking to Claude vs GPT in round 2.
309
+
310
+ Pre-call estimate must surface the round count: total = `N × single-round cost`. Render inline:
311
+
312
+ ```
313
+ External council call — billable · 2 rounds
314
+ Round 1: artefact only
315
+ Round 2: artefact + anonymised round 1 critiques
316
+
317
+ | member | per-round | × 2 |
318
+ |--------------------|----------:|--------:|
319
+ | anthropic/sonnet | $0.0176 | $0.0352 |
320
+ | openai/gpt-4o | $0.0121 | $0.0242 |
321
+ | **total** | | $0.0594 |
322
+ ```
323
+
324
+ ## See also
325
+
326
+ - `/council` command — the user-facing entry point.
327
+ - `subagent-orchestration` skill — internal multi-agent variant (no
328
+ network, no spend, but no diversity of weights either).
329
+ - `scripts/ai_council/prompts.py` — neutrality preamble + per-mode
330
+ system prompts.
331
+ - `scripts/ai_council/bundler.py` — redaction pattern set + size
332
+ guard.
333
+ - `docs/customization.md` § `ai_council.*` — settings reference.
@@ -28,8 +28,8 @@ Do NOT use when:
28
28
 
29
29
  ### What to generate
30
30
 
31
- 1. **Controller** — Single Action (invokable). Read `agents/docs/controller.md` and `.augment/guidelines/php/controllers.md`.
32
- 2. **FormRequest** — Validation rules, `authorize()` via policies. Read `.augment/guidelines/php/validations.md`.
31
+ 1. **Controller** — Single Action (invokable). Read `agents/docs/controller.md` and `../../../docs/guidelines/php/controllers.md`.
32
+ 2. **FormRequest** — Validation rules, `authorize()` via policies. Read `../../../docs/guidelines/php/validations.md`.
33
33
  3. **Resource** — JSON response transformation. Read `agents/docs/api-resources.md`.
34
34
  4. **Route** — Add to the correct versioned route file.
35
35
  5. **Policy** — If authorization is needed.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: blade-ui
3
- description: "Stack-implementation skill for Laravel Blade — dispatched by `directives/ui/apply.py` (and `review.py` / `polish.py`) when the project's frontend stack is Blade. Covers views, components, partials, layouts, and view logic."
3
+ description: "Use when the project's frontend stack is Blade — dispatched by `directives/ui/{apply,review,polish}.py`. Covers views, components, partials, layouts, and view logic."
4
4
  source: package
5
5
  ---
6
6
 
@@ -8,7 +8,11 @@ source: package
8
8
 
9
9
  ## Positioning — dispatched, not standalone
10
10
 
11
- `blade-ui` is the **apply-step executor** for the Blade stack. Invoked by [`directives/ui/apply.py`](../../templates/scripts/work_engine/directives/ui/apply.py) once the design brief is locked, and revisited by `review.py` / `polish.py` during the design-review loop. Does **not** own the flow, drive the audit, or lock the design.
11
+ `blade-ui` is the **apply-step executor** for the Blade stack. It is
12
+ invoked by [`directives/ui/apply.py`](../../templates/scripts/work_engine/directives/ui/apply.py)
13
+ once the design brief is locked, and revisited by `review.py` /
14
+ `polish.py` during the design-review loop. It does **not** own the
15
+ flow, does **not** drive the audit, and does **not** lock the design.
12
16
 
13
17
  | Concern | Owner |
14
18
  |---|---|
@@ -27,7 +31,7 @@ Cite this skill when:
27
31
  Do NOT use when:
28
32
 
29
33
  - API-only endpoints (use `api-endpoint` skill)
30
- - Livewire components (use `livewire` skill — composes Blade views internally)
34
+ - Livewire components (use `livewire` skill — it composes Blade views internally)
31
35
  - Flux UI components (use `flux` skill)
32
36
  - Driving the full UI flow yourself — that is the `directives/ui/` orchestrator
33
37
 
@@ -39,11 +43,11 @@ Do NOT use when:
39
43
  2. Inspect existing UI patterns — layouts, partials, component naming, CSS conventions.
40
44
  3. Check form handling style — old input, validation errors, session flashes, reusable field partials.
41
45
  4. Inspect neighboring templates — match indentation, directives, slot usage, classes.
42
- 5. Determine data flow — controller/view model vs. template.
46
+ 5. Determine data flow — what belongs in controller/view model vs. template.
43
47
 
44
48
  ### Step 1: Create the template
45
49
 
46
- 1. Use project's existing layout system.
50
+ 1. Use the project's existing layout system.
47
51
  2. Keep template presentation-focused — no business logic, no DB queries.
48
52
  3. Extract repeated sections into partials or components.
49
53
 
@@ -72,12 +76,27 @@ Do NOT use when:
72
76
 
73
77
  ### Review pass — a11y findings + preview envelope
74
78
 
75
- When dispatched by `directives/ui/review.py` (test slot) or `directives/ui/polish.py` (verify slot) — review/polish run, not initial apply — also emits:
76
-
77
- - `state.ui_review.a11y` `{violations: [{rule, selector, severity}, ...], severity_floor?, accepted_violations?}`. Use same `(rule, selector)` shape as `state.ui_audit.a11y_baseline` so engine's de-dup matches pre-existing entries on replay. Omit envelope on apply passes; engine's `_apply_a11y_gate` only fires when baseline present.
78
- - `state.ui_review.preview` — `{render_ok: bool, screenshot_path?, dom_dump_path?, error?, skipped?}`. `render_ok: false` with `error` populated triggers `preview_render_failed` halt; `render_ok: true` with `screenshot_path` threads screenshot into delivery report's `artifacts` list. Browser tooling (Playwright/Cypress/…) is consumer-project dependency — package does not ship one.
79
-
80
- Polish dispatch: when dispatcher skips `review` because previous review pass returned `SUCCESS`, this skill MUST itself synthesise updated `state.ui_review.findings` (including remaining `a11y_violation` entries) so engine's gate sees current state on next polish round.
79
+ When this skill is dispatched by `directives/ui/review.py` (test slot)
80
+ or `directives/ui/polish.py` (verify slot) — i.e. a review/polish run,
81
+ not the initial apply it also emits:
82
+
83
+ - `state.ui_review.a11y` — `{violations: [{rule, selector, severity}, ...],
84
+ severity_floor?, accepted_violations?}`. Use the same `(rule, selector)`
85
+ shape as `state.ui_audit.a11y_baseline` so the engine's de-dup matches
86
+ pre-existing entries on replay. Omit the envelope on apply passes; the
87
+ engine's `_apply_a11y_gate` only fires when a baseline is present.
88
+ - `state.ui_review.preview` — `{render_ok: bool, screenshot_path?,
89
+ dom_dump_path?, error?, skipped?}`. `render_ok: false` with `error`
90
+ populated triggers the `preview_render_failed` halt; `render_ok: true`
91
+ with `screenshot_path` threads the screenshot into the delivery
92
+ report's `artifacts` list. Browser tooling (Playwright/Cypress/…) is
93
+ a consumer-project dependency — this package does not ship one.
94
+
95
+ Polish dispatch: when the dispatcher skips `review` because a previous
96
+ review pass already returned `SUCCESS`, this skill MUST itself
97
+ synthesise the updated `state.ui_review.findings` (including any
98
+ remaining `a11y_violation` entries) so the engine's gate sees the
99
+ current state on the next polish round.
81
100
 
82
101
  ## Gotcha
83
102
 
@@ -81,7 +81,7 @@ For every dependency, mark:
81
81
 
82
82
  ### 5. Consult engineering memory
83
83
 
84
- Via [`memory-access`](../../guidelines/agent-infra/memory-access.md) call
84
+ Via [`memory-access`](../../../docs/guidelines/agent-infra/memory-access.md) call
85
85
  `retrieve(types=["architecture-decisions", "ownership"],
86
86
  keys=<changed paths + changed symbol>, limit=5)`. Surface:
87
87
 
@@ -84,7 +84,7 @@ Gather all available evidence before forming any hypothesis:
84
84
  - Read each file in the call chain to understand the data flow.
85
85
  - Check existing context docs (`agents/contexts/`) for the affected area.
86
86
  - **Consult engineering memory.** Via
87
- [`memory-access`](../../guidelines/agent-infra/memory-access.md) call
87
+ [`memory-access`](../../../docs/guidelines/agent-infra/memory-access.md) call
88
88
  `retrieve(types=["historical-patterns", "incident-learnings"],
89
89
  keys=[<error class>, <affected file paths>], limit=3)`. A prior
90
90
  matching pattern or incident is the single most reliable accelerator
@@ -12,7 +12,7 @@ execution:
12
12
 
13
13
  ## When to use
14
14
 
15
- Triggered when user invokes a slash command. The `slash-commands` rule (always loaded) handles core behavior — this skill adds context inference and GitHub API patterns.
15
+ Triggered when user invokes a slash command. The `slash-command-routing-policy` rule (always loaded) handles core behavior — this skill adds context inference and GitHub API patterns.
16
16
 
17
17
  ## Procedure: Execute a command
18
18
 
@@ -67,7 +67,7 @@ suggestion: # required (road-to-context-aware-command-suggesti
67
67
  ---
68
68
  ```
69
69
 
70
- Opt-out shape:
70
+ Or, when opting out:
71
71
 
72
72
  ```yaml
73
73
  suggestion:
@@ -75,10 +75,21 @@ suggestion:
75
75
  rationale: "one-line reason this command must be invoked deliberately"
76
76
  ```
77
77
 
78
- Linter enforces ≥10-char triggers when eligible; rationale required when
79
- ineligible. Optional `confidence_floor` (0.0–1.0) and `cooldown` (e.g. `10m`)
80
- override the global settings per command. Eligibility decisions live in
78
+ Suggestion-block rules (linter-enforced):
79
+
80
+ * `eligible` is **required** and must be `true` or `false`.
81
+ * `eligible: true` → both `trigger_description` and `trigger_context` must be
82
+ non-empty (≥ 10 chars each); the linter rejects empty or overly generic
83
+ patterns. The suggestion layer never auto-executes; the user always picks.
84
+ * `eligible: false` → `rationale` must be non-empty. Use the opt-out for
85
+ intentional-only invocations (settings mutations, destructive actions,
86
+ package-internal tools, niche maintenance).
87
+ * Optional `confidence_floor` (0.0–1.0) and `cooldown` (e.g. `10m`)
88
+ override the global settings per command.
89
+
90
+ Eligibility decisions are tracked in
81
91
  [`agents/contexts/command-suggestion-eligibility.md`](../../../agents/contexts/command-suggestion-eligibility.md).
92
+ Add or revise entries there before changing a command's `suggestion` block.
82
93
 
83
94
  When iterating on the description, delegate to the
84
95
  [`description-assist`](../description-assist/SKILL.md) skill — approval-gated,
@@ -106,7 +117,7 @@ Required sections in this order:
106
117
  ### 4. Enforce the size budget
107
118
 
108
119
  Normative source: [`size-enforcement`](../../rules/size-enforcement.md) +
109
- `guidelines/agent-infra/size-and-scope.md`.
120
+ `docs/guidelines/agent-infra/size-and-scope.md`.
110
121
 
111
122
  | Category | Target |
112
123
  |---|---|
@@ -66,5 +66,5 @@ Read all PR commits → identify net effect → write single Conventional Commit
66
66
  ## References
67
67
 
68
68
  - Rule: `commit-conventions` — format, types, scope
69
- - Guideline: `guidelines/php/git.md` — selection rules, anti-patterns, checklist
69
+ - Guideline: `docs/guidelines/php/git.md` — selection rules, anti-patterns, checklist
70
70
  - Command: `/commit` — uses this skill
@@ -57,7 +57,7 @@ Only after this analysis, proceed with optimization.
57
57
  **What does NOT belong here:**
58
58
  - Coding standards (→ `.augment/rules/` and `.augment/guidelines/`)
59
59
  - Architecture principles like SOLID, KISS, DRY (→ `.augment/rules/architecture.md`)
60
- - PHP conventions (→ `.augment/guidelines/php/`)
60
+ - PHP conventions (→ `../../../docs/guidelines/php/`)
61
61
  - Scope control rules (→ `.augment/rules/scope-control.md`)
62
62
  - Language/tone rules (→ `.augment/rules/language-and-tone.md`)
63
63
  - Detailed module documentation (→ `app/Modules/README.md`)
@@ -115,7 +115,7 @@ both. Instead, reference with a table:
115
115
  | What | Where |
116
116
  |---|---|
117
117
  | PHP coding rules | `.augment/rules/php-coding.md` |
118
- | Controller guidelines | `.augment/guidelines/php/controllers.md` |
118
+ | Controller guidelines | `../../../docs/guidelines/php/controllers.md` |
119
119
  ```
120
120
 
121
121
  ## Line Budget Enforcement
@@ -127,13 +127,13 @@ If important information is missing:
127
127
  - Compare with requirements, tickets, current behavior, tests, existing patterns
128
128
  - Identify likely cause and smallest correct change
129
129
  - **Consult memory — invariants and prior decisions.** Via
130
- [`memory-access`](../../guidelines/agent-infra/memory-access.md), call
130
+ [`memory-access`](../../../docs/guidelines/agent-infra/memory-access.md), call
131
131
  `retrieve(types=["domain-invariants", "architecture-decisions"], keys=<touched paths>, limit=3)`.
132
132
  A matching `domain-invariant` is a hard constraint — violating it =
133
133
  regression, surface the conflict before proceeding. A matching
134
134
  `architecture-decision` explains *why* the current shape exists; plan
135
135
  around it, do not silently overturn it. Cite matching `id`s in the plan.
136
- See [`engineering-memory-data-format`](../../guidelines/agent-infra/engineering-memory-data-format.md)
136
+ See [`engineering-memory-data-format`](../../../docs/guidelines/agent-infra/engineering-memory-data-format.md)
137
137
  for the schema.
138
138
 
139
139
  ### 4. Define expected behavior first
@@ -128,19 +128,31 @@ Record the user's pick in `state.ui_audit.greenfield_decision` (`scaffold` | `ba
128
128
 
129
129
  ### 8. (Optional) Capture an a11y baseline
130
130
 
131
- R4 visual-review-loop contract reads `state.ui_audit.a11y_baseline` when present; review gate filters incoming `state.ui_review.a11y.violations` against it so pre-existing violations stay informational and only NEW or CHANGED entries block polish loop. Without baseline gate sees every violation as actionable — fine for greenfield, noisy for legacy surfaces.
131
+ The R4 visual-review-loop contract reads `state.ui_audit.a11y_baseline`
132
+ when present; the review gate then filters incoming
133
+ `state.ui_review.a11y.violations` against it so pre-existing
134
+ violations stay informational and only NEW or CHANGED entries block
135
+ the polish loop. Without a baseline the gate sees every violation as
136
+ actionable — fine for greenfield, noisy for legacy surfaces.
132
137
 
133
- Capture baseline when:
138
+ Capture the baseline when:
134
139
 
135
- - Audit covers components with known a11y debt project does not intend to fix this run (legacy templates, third-party embeds, vendor widgets).
136
- - User says "don't block on existing a11y issues" or similar.
140
+ - The audit covers components with known a11y debt the project does
141
+ not intend to fix in this run (legacy templates, third-party
142
+ embeds, vendor widgets).
143
+ - The user says "don't block on existing a11y issues" or similar.
137
144
 
138
- Skip baseline (omit key, leave `state.ui_audit.a11y_baseline` unset) when:
145
+ Skip the baseline (omit the key, leave `state.ui_audit.a11y_baseline`
146
+ unset) when:
139
147
 
140
- - Surface is greenfield — review gate should treat every violation as new.
141
- - Project's a11y posture is "zero known violations" and any finding is by definition actionable.
148
+ - The surface is greenfield — the review gate should treat every
149
+ violation as new.
150
+ - The project's a11y posture is "zero known violations" and any
151
+ finding is by definition actionable.
142
152
 
143
- Shape (each entry MUST carry at least `rule` + `selector`; severity optional but recommended so review gate's severity-floor filter behaves same on replay):
153
+ Shape (each entry must carry at least `rule` + `selector`; severity
154
+ is optional but recommended so the review gate's severity-floor
155
+ filter behaves the same on replay):
144
156
 
145
157
  ```
146
158
  state.ui_audit.a11y_baseline = [
@@ -150,7 +162,10 @@ state.ui_audit.a11y_baseline = [
150
162
  ]
151
163
  ```
152
164
 
153
- Producer parity: review skill that writes `state.ui_review.a11y.violations` MUST use same `(rule, selector)` shape, otherwise engine's de-dup will miss matches and pre-existing violations will surface as new findings on every run.
165
+ Producer parity: the review skill that writes
166
+ `state.ui_review.a11y.violations` MUST use the same `(rule, selector)`
167
+ shape, otherwise the engine's de-dup will miss matches and pre-existing
168
+ violations will surface as new findings on every run.
154
169
 
155
170
  ### 9. Validate and write findings
156
171