@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,338 @@
1
+ ---
2
+ stability: beta
3
+ ---
4
+
5
+ # UI Track — Flow Contract
6
+
7
+ > Technical contracts for the UI directive sets shipped under
8
+ > [`road-to-product-ui-track.md`](../../agents/roadmaps/road-to-product-ui-track.md).
9
+ > Sibling of [`implement-ticket-flow.md`](implement-ticket-flow.md) — that
10
+ > doc covers `backend`; this one covers `ui`, `ui-trivial`, and the
11
+ > `mixed` set that stitches both.
12
+ >
13
+ > - **Created:** 2026-05-01
14
+ > - **Status:** Phase 1–6 shipped — audit / design / apply / review /
15
+ > polish handlers live under
16
+ > [`.agent-src.uncompressed/templates/scripts/work_engine/directives/ui/`](../../.agent-src.uncompressed/templates/scripts/work_engine/directives/ui/).
17
+ > Mixed (Phase 4) under `directives/mixed/`. `ui-trivial` (Phase 2 Step 6)
18
+ > under `directives/ui_trivial/`. R4 (Visual Review Loop) added the
19
+ > a11y gate, the preview envelope, and a polish-termination rewrite
20
+ > that splits subjective ceilings from objective a11y blocks — see
21
+ > [`road-to-visual-review-loop.md`](../../agents/roadmaps/road-to-visual-review-loop.md).
22
+ > Golden Transcripts GT-U1..U4, U7, U8, U9..U12 plus GT-U5 (mixed
23
+ > flow), GT-U6A/B (stack dispatch), and R4's GT-U13..U15 (a11y polish,
24
+ > a11y ceiling, preview render failure) pin happy-path, ambiguity,
25
+ > mixed orchestration, stack dispatch, trivial happy path, and the
26
+ > visual-review gates.
27
+ > - **Runtime:** Python 3.10+. Same `DeliveryState` envelope, same
28
+ > eight-slot dispatcher as the backend track — only the slot handlers
29
+ > differ.
30
+
31
+ ## What this doc is
32
+
33
+ The **shape** of the four UI-related directive sets: which slot runs
34
+ which handler, what each handler reads / writes on `DeliveryState`, the
35
+ hard thresholds (similarity, polish ceiling, trivial limits), and the
36
+ sentinels that release each gate.
37
+
38
+ ## What this doc is *not*
39
+
40
+ - A skill spec — `existing-ui-audit`, `ui-design-brief`, the stack
41
+ apply / review / polish skills are documented in their own
42
+ `SKILL.md` files.
43
+ - A migration guide for the schema — see
44
+ [`implement-ticket-flow.md`](implement-ticket-flow.md#state-schema-v1).
45
+ - A roadmap — phased delivery lives in
46
+ [`road-to-product-ui-track.md`](../../agents/roadmaps/road-to-product-ui-track.md).
47
+
48
+ ## The four directive sets
49
+
50
+ | Set | When picked | Slot 1–8 |
51
+ |---|---|---|
52
+ | `backend` | Default — no UI keywords, no UI envelope | `refine → memory → analyze → plan → implement → test → verify → report` (see sibling doc) |
53
+ | `ui` | UI keywords, `improve` envelope, or refine routing to UI | `audit → ⊘ → design → ⊘ → apply → review → polish → report` |
54
+ | `ui-trivial` | Phase-1 classifier hits "single-line tweak" pattern | `refine → ⊘ → ⊘ → ⊘ → apply → test → ⊘ → report` |
55
+ | `mixed` | Backend + UI in one input | `refine → memory → analyze → contract → ui → stitch → verify → report` |
56
+
57
+ `⊘` = `_passthrough.run` (or `_skipped.run` in `ui-trivial`). The slot
58
+ exists so the dispatcher's completeness check is satisfied; no logic
59
+ runs and no state is touched.
60
+
61
+ Source of truth for slot wiring:
62
+ [`directives/ui/__init__.py`](../../.agent-src.uncompressed/templates/scripts/work_engine/directives/ui/__init__.py),
63
+ [`directives/mixed/__init__.py`](../../.agent-src.uncompressed/templates/scripts/work_engine/directives/mixed/__init__.py),
64
+ [`directives/ui_trivial/__init__.py`](../../.agent-src.uncompressed/templates/scripts/work_engine/directives/ui_trivial/__init__.py).
65
+
66
+ ## The `ui` set — slot-by-slot
67
+
68
+ ### `refine` → audit
69
+
70
+ Mandatory pre-step. Routes on `state.ui_audit` shape:
71
+
72
+ | State | Outcome | Handler |
73
+ |---|---|---|
74
+ | `None` / empty / non-dict | `BLOCKED` + `@agent-directive: existing-ui-audit` | First-pass delegation |
75
+ | `greenfield=True`, no `greenfield_decision` | `BLOCKED` numbered options | User picks `scaffold` / `bare` / `external_reference` |
76
+ | `shadcn_inventory.version` major ≠ `TESTED_AGAINST_SHADCN_MAJOR` (`2`) and no `version_mismatch_decision` | `BLOCKED` soft halt | "Cautious composition / abort" |
77
+ | Confidence `high` + ≥1 match with similarity ≥ `STRONG_SIMILARITY` (`0.7`) and no runner-up within `TIE_GAP` (`0.05`) | `SUCCESS`, `audit_path = "high_confidence"` | Design folds findings into brief |
78
+ | Anything else populated | `BLOCKED` numbered options | User picks candidate to extend (or "build new"); records `audit_path = "ambiguous"` + `candidate_pick` |
79
+
80
+ Constants live in
81
+ [`directives/ui/audit.py`](../../.agent-src.uncompressed/templates/scripts/work_engine/directives/ui/audit.py):
82
+ `STRONG_SIMILARITY = 0.7`, `TIE_GAP = 0.05`,
83
+ `TESTED_AGAINST_SHADCN_MAJOR = 2`. Idempotent re-entry: once
84
+ `audit_path` is set the step round-trips through `SUCCESS` without
85
+ re-emitting.
86
+
87
+ ### `analyze` → design
88
+
89
+ Produces the **locked design brief**. `apply` consumes microcopy
90
+ verbatim — that's the lock.
91
+
92
+ Required brief keys (`REQUIRED_BRIEF_KEYS`): `layout`, `components`,
93
+ `states`, `microcopy`, `a11y`. Required state coverage
94
+ (`REQUIRED_STATE_KEYS`): `empty`, `loading`, `error`, `success`,
95
+ `disabled`.
96
+
97
+ Microcopy is rejected when any string matches `PLACEHOLDER_PATTERNS`:
98
+ `<placeholder>`, `lorem`, `todo:`, `tbd`, `xxx` (case-insensitive
99
+ substring). The same tuple is re-imported by `apply` so the rejection
100
+ fires at the producer first, at the consumer as defense-in-depth.
101
+
102
+ Sentinel: `state.ui_design.design_confirmed`. Without it the brief
103
+ halt fires every pass; with it the step round-trips through `SUCCESS`.
104
+
105
+ ### `implement` → apply
106
+
107
+ Stack-dispatched. Routes on `state.stack.frontend`:
108
+
109
+ | `state.stack.frontend` | Directive | Skill bundle |
110
+ |---|---|---|
111
+ | `blade-livewire-flux` | `ui-apply-blade-livewire-flux` | `flux` + `livewire` + `blade-ui` |
112
+ | `react-shadcn` | `ui-apply-react-shadcn` | `react-shadcn-ui` |
113
+ | `vue` | `ui-apply-vue` | `ui-apply-vue` |
114
+ | `plain` (or unknown — `DEFAULT_DIRECTIVE`) | `ui-apply-plain` | `blade-ui` + Tailwind base |
115
+
116
+ Apply does **not** re-validate the brief — it validates *output* against
117
+ `PLACEHOLDER_PATTERNS`. A hallucinated `<placeholder>` string in the
118
+ rendered envelope triggers
119
+ `apply_placeholders_in_output` and forces re-render with the locked
120
+ microcopy. Once `state.ticket["ui_apply"]` is well-formed, apply records
121
+ changes and returns `SUCCESS`.
122
+
123
+ ### `test` → review
124
+
125
+ Stack-dispatched design-review pass. Same dispatch table shape as
126
+ apply, prefix `ui-design-review-`. Writes
127
+ `state.ui_review.findings` (list) + `state.ui_review.review_clean`
128
+ (bool). The step does **not** enforce
129
+ `review_clean == (len(findings) == 0)` — that would block the
130
+ legitimate "ship as-is with open findings" replay path. Honesty of the
131
+ flag is the producer's contract; review only validates shape.
132
+
133
+ **R4 — a11y gate** (after the basic clean/findings gates pass).
134
+ `_apply_a11y_gate` reads `state.ui_review.a11y.violations`, filters
135
+ out entries already in `state.ui_audit.a11y_baseline` (pre-existing
136
+ violations stay informational, never block), drops anything below
137
+ `severity_floor` (default `moderate`; unknown severities default to
138
+ `moderate` so a malformed envelope cannot weaken the gate), and
139
+ filters entries listed in `state.ui_review.a11y.accepted_violations`
140
+ (idempotent re-entry after the polish-ceiling Accept choice).
141
+ Surviving violations are synthesised as
142
+ `{kind: "a11y_violation", rule, selector, severity}` findings (deduped
143
+ by `(rule, selector)`) and `review_clean` is forced to `False`
144
+ engine-side. Opt-in: when `state.ui_audit.a11y_baseline` exists but
145
+ `state.ui_review.a11y` is missing, the step halts with
146
+ `review_a11y_pending` so the skill writes the envelope on the next
147
+ pass; pre-R4 envelopes without a baseline bypass the gate entirely.
148
+
149
+ **R4 — preview envelope** (the engine never renders).
150
+ `_apply_preview_gate` reads `state.ui_review.preview`. Shape:
151
+ `render_ok: bool`, optional `screenshot_path`, `dom_dump_path`,
152
+ `error`, `skipped`. `render_ok: False` halts with
153
+ `preview_render_failed` so the user picks retry / skip / abort; Skip
154
+ flips `state.ui_review.preview.skipped = true` and the gate becomes a
155
+ no-op on re-entry. `render_ok: True` with `screenshot_path` set
156
+ threads the path into the delivery report's `artifacts` list. The
157
+ gate is independent of the a11y gate; both can fire on the same pass.
158
+
159
+ ### `verify` → polish
160
+
161
+ Bounded fix loop. Base ceiling: `POLISH_CEILING = 2` rounds. R4
162
+ splits termination into **subjective** and **objective** branches:
163
+ the subjective `polish_ceiling_reached` halt only fires when the
164
+ remaining findings are non-a11y; objective a11y violations take the
165
+ explicit `polish_a11y_blocking` branch with its own option set.
166
+
167
+ | `review_clean` | `rounds` | Remaining findings | Behaviour |
168
+ |---|---|---|---|
169
+ | `True` | any | — | `SUCCESS` — advance to report |
170
+ | `False` | `< effective_ceiling` | any | `BLOCKED` + `@agent-directive: ui-polish-<stack>`; skill applies fixes, re-runs review, increments `rounds` |
171
+ | `False` | `== effective_ceiling` | contains `a11y_violation` | `BLOCKED` numbered options: extend (one extra round, sets `extension_used = True`; option disappears once spent) / accept (appends rule ids to `state.ui_review.a11y.accepted_violations`, then continues) / abort |
172
+ | `False` | `== effective_ceiling` | non-a11y only | `BLOCKED` numbered options: ship as-is / abort / hand off |
173
+
174
+ `effective_ceiling = POLISH_CEILING + 1` once
175
+ `state.ui_polish.extension_used` is set; the schema validator widens
176
+ the upper bound from `[0, 2]` to `[0, 3]` only when the flag is
177
+ `True`, so the ceiling holds across in-memory state, on-disk state,
178
+ and the dispatcher. `rounds > 3` is rejected unconditionally, even
179
+ with the extension flag.
180
+
181
+ **Idempotent re-entry on Accept.** A `state.ui_review.a11y.accepted_violations`
182
+ list with rule ids matching the remaining a11y findings round-trips
183
+ through `SUCCESS` because the review gate's `_apply_a11y_gate`
184
+ filters accepted entries before synthesising `a11y_violation`
185
+ findings. The Accept branch and the Ship-as-is branch are therefore
186
+ asymmetric: Ship-as-is flips `review_clean` directly; Accept records
187
+ explicit rule ids so replay reproduces the same gate decision.
188
+
189
+ **Token-violation extraction.** Findings with
190
+ `kind == "token_violation"` carry `category` and `value`. Polish
191
+ classifies them against `state.ui_audit.design_tokens`:
192
+
193
+ - Matched value → fix uses the named token; counted as a regular round.
194
+ - Unmatched value repeated `> TOKEN_REPEAT_THRESHOLD` (`2`) times →
195
+ emits `polish_token_extraction_pending`: extract the value to a new
196
+ token before the next round runs. One-off unmatched values stay
197
+ inline.
198
+
199
+ Stack-directive table mirrors apply / review with prefix
200
+ `ui-polish-`. `DEFAULT_DIRECTIVE = "ui-polish-plain"`.
201
+
202
+ ### `report` → backend renderer
203
+
204
+ Re-export of
205
+ [`directives.backend.report.run`](../../.agent-src.uncompressed/templates/scripts/work_engine/directives/backend/report.py).
206
+ The renderer is pure and state-driven; the same Markdown contract
207
+ serves both tracks.
208
+
209
+ ## Halt budget — happy path
210
+
211
+ `ui` set, fresh state, audit + design pass cleanly:
212
+
213
+ 1. **Audit pick** — first-pass `existing-ui-audit` directive halt.
214
+ 2. **Design sign-off** — `design_confirmed` numbered-options halt.
215
+
216
+ Two user halts. Apply / review / polish all run silently when their
217
+ producers write clean envelopes on the first attempt. GT-U1..U4 pin
218
+ this budget.
219
+
220
+ Additional halts surface only on real ambiguity:
221
+ greenfield-undecided (+1), shadcn-version-mismatch (+1), audit-ambiguous
222
+ (+1), placeholder rejection (+N until microcopy is fixed),
223
+ polish round (+1 per dirty review, capped at the effective ceiling),
224
+ polish ceiling — subjective (+1 when both rounds fail and remaining
225
+ findings are non-a11y) **or** a11y-blocking (+1 when remaining
226
+ findings include `a11y_violation` entries; the Extend option grants
227
+ one extra round, then disappears),
228
+ preview render failure (+1 when `state.ui_review.preview.render_ok`
229
+ is `False`; user picks retry / skip / abort),
230
+ review a11y pending (+1 when an `a11y_baseline` exists but the review
231
+ skill has not yet written `state.ui_review.a11y`).
232
+
233
+ ## The `ui-trivial` set — short-circuit path
234
+
235
+ For provably bounded edits (single class swap, copy tweak, one-prop
236
+ adjustment). Phase-1 intent classifier writes
237
+ `directive_set = "ui-trivial"`.
238
+
239
+ Hard preconditions in
240
+ [`directives/ui_trivial/apply.py`](../../.agent-src.uncompressed/templates/scripts/work_engine/directives/ui_trivial/apply.py):
241
+
242
+ - `MAX_FILES = 1` — exactly one file touched.
243
+ - `MAX_LINES_CHANGED = 5` — diff stays under five changed lines.
244
+
245
+ Violation flips `state.directive_set` to `ui` (the full audit gate)
246
+ and the dispatcher restarts. The trivial path **never** silently
247
+ swallows scope creep.
248
+
249
+ Skipped slots (`memory`, `analyze`, `plan`, `verify`) share
250
+ `_skipped.run` — they record `success` without work so the dispatcher
251
+ completeness check is satisfied. `report` renders a one-line summary
252
+ instead of the full delivery report.
253
+
254
+ ## The `mixed` set — contract + UI + stitch
255
+
256
+ Used when a single input touches both layers. Slot mapping:
257
+
258
+ | Slot | Handler | Purpose |
259
+ |---|---|---|
260
+ | `refine`, `memory`, `analyze`, `verify`, `report` | reused from `backend` | Same handlers, by reference |
261
+ | `plan` | `mixed.contract` | Lock `data_model` + `api_surface` |
262
+ | `implement` | `mixed.ui` | Delegate to UI sub-flow |
263
+ | `test` | `mixed.stitch` | End-to-end smoke scenarios |
264
+
265
+ **Sentinels** that release each mixed gate:
266
+
267
+ - `state.contract.contract_confirmed = True` — UI sub-flow refuses to
268
+ start without it (defense-in-depth even if `outcomes["plan"] ==
269
+ "success"`). Required keys: `data_model`, `api_surface`
270
+ (`REQUIRED_CONTRACT_KEYS`).
271
+ - `state.ui_review.review_clean = True` — mixed `ui` step's success
272
+ condition. Polish-ceiling semantics live in the UI track; if the
273
+ user reaches mixed.ui's "ship as-is / hand off / abort" halt, the
274
+ UI track has already given up.
275
+ - `state.stitch.verdict = "success"` — stitch's success condition.
276
+ `blocked` / `partial` halts with three numbered options unless
277
+ `state.stitch.integration_confirmed = True` (explicit user override).
278
+
279
+ `stitch` emits `@agent-directive: integration-test` so an
280
+ agent-side handler runs the end-to-end smokes; `mixed.ui` emits
281
+ `@agent-directive: ui-track` to delegate the visible-surface work
282
+ back into the full UI directive set.
283
+
284
+ ## Idempotency and replay
285
+
286
+ Every UI step is idempotent on its sentinel:
287
+
288
+ | Step | Sentinel | Effect on replay |
289
+ |---|---|---|
290
+ | audit | `audit_path` ∈ `{"high_confidence", "ambiguous", "greenfield"}` | `SUCCESS` without halt |
291
+ | design | `design_confirmed = True` | `SUCCESS` without halt |
292
+ | apply | `state.ticket["ui_apply"]` well-formed, no placeholders | `SUCCESS`, changes recorded once |
293
+ | review | well-formed envelope (`findings` list + `review_clean` bool) | `SUCCESS` |
294
+ | polish | `review_clean = True` (any round count) | `SUCCESS` |
295
+ | contract | `contract_confirmed = True` | `SUCCESS` |
296
+ | stitch | `verdict = "success"` OR `integration_confirmed = True` | `SUCCESS` |
297
+
298
+ The dispatcher walks the same eight slots on every replay; sentinels
299
+ are the only thing keeping a re-run from re-asking a question the
300
+ user already answered. Replay coverage is locked by the
301
+ Golden-Transcript suite under `tests/golden/baseline/GT-U*/`.
302
+
303
+ ## Declared ambiguity surfaces
304
+
305
+ Each step re-exports an `AMBIGUITIES: tuple[dict[str, str], ...]`
306
+ constant. The
307
+ [`test_ambiguity_coverage.py`](../../tests/implement_ticket/test_ambiguity_coverage.py)
308
+ suite asserts every `BLOCKED` path has a matching declaration.
309
+
310
+ | Step | Codes |
311
+ |---|---|
312
+ | `audit` | `audit_missing`, `greenfield_undecided`, `shadcn_version_mismatch`, `audit_ambiguous` |
313
+ | `design` | `design_missing`, `design_placeholders`, `design_unconfirmed` |
314
+ | `apply` | `apply_envelope_missing`, `apply_placeholders_in_output` |
315
+ | `review` | `review_envelope_missing`, `review_findings_missing`, `review_clean_missing`, `review_a11y_pending`, `preview_render_failed` |
316
+ | `polish` | `polish_round_pending`, `polish_ceiling_reached`, `polish_a11y_blocking`, `polish_token_extraction_pending` |
317
+ | `contract` (mixed) | `upstream_analyze_failed`, `contract_missing`, `contract_incomplete`, `contract_unconfirmed` |
318
+ | `mixed.ui` | `contract_sentinel_missing`, `ui_subflow_missing`, `ui_subflow_dirty` |
319
+ | `stitch` | `upstream_ui_failed`, `stitch_missing`, `stitch_malformed`, `stitch_verdict_unsuccessful` |
320
+
321
+ ## See also
322
+
323
+ - [`implement-ticket-flow.md`](implement-ticket-flow.md) — sibling
324
+ contract for the `backend` set; covers `DeliveryState`, schema v1,
325
+ hooks, persona policies, replay protocol.
326
+ - [`road-to-product-ui-track.md`](../../agents/roadmaps/road-to-product-ui-track.md)
327
+ — phased delivery and Golden-Transcript matrix.
328
+ - [`road-to-product-ui-track-followup.md`](../../agents/roadmaps/archive/road-to-product-ui-track-followup.md)
329
+ — pinned GT-U5 (mixed flow), GT-U6A/B (stack dispatch), GT-U7
330
+ (trivial happy path), GT-U8 (trivial reclassification).
331
+ - [`road-to-visual-review-loop.md`](../../agents/roadmaps/road-to-visual-review-loop.md)
332
+ — R4 contract: a11y gate, preview envelope, polish-termination
333
+ rewrite. Pinned by GT-U13 (a11y polish), GT-U14 (a11y ceiling),
334
+ GT-U15 (preview render failure).
335
+ - [`existing-ui-audit` SKILL](../../.agent-src.uncompressed/skills/existing-ui-audit/SKILL.md)
336
+ — producer of `state.ui_audit`.
337
+ - [`ui-audit-gate` rule](../../.agent-src.uncompressed/rules/ui-audit-gate.md)
338
+ — the always-on rule that mirrors the audit gate at the agent layer.
@@ -58,6 +58,20 @@ those sections.
58
58
  | `chat_history.max_size_kb` | per profile | Max file size before overflow handling (see matrix below). |
59
59
  | `chat_history.on_overflow` | per profile | `rotate` drops oldest, `compress` marks for summarization (see matrix below). |
60
60
  | `onboarding.onboarded` | `false` | Whether `/onboard` has run. The `onboarding-gate` rule prompts for `/onboard` while this is `false`. |
61
+ | `ai_council.enabled` | `false` | Master switch for the `/council` command. Even when enabled, every consultation asks before spending tokens. |
62
+ | `ai_council.members.<provider>.enabled` | `false` | Per-provider opt-in (`anthropic`, `openai`). Tokens live in `~/.config/agent-config/<provider>.key` (mode 0600), never in this file. |
63
+ | `ai_council.members.<provider>.model` | per provider | Which model the provider sends the query to (e.g. `claude-sonnet-4-5`, `gpt-4o`). |
64
+ | `ai_council.cost_budget.max_input_tokens` | `50000` | Hard cap on summed input tokens per `/council` invocation. |
65
+ | `ai_council.cost_budget.max_output_tokens` | `20000` | Hard cap on summed output tokens per `/council` invocation. |
66
+ | `ai_council.cost_budget.max_calls` | `10` | Maximum council members per invocation. |
67
+ | `ai_council.cost_budget.max_total_usd` | `0.0` | Per-invocation USD ceiling. `0` disables (token caps still apply). |
68
+ | `ai_council.cost_budget.daily_limit_usd` | `0.0` | Rolling 24h USD ceiling across all `/council` calls. `0` disables. Ledger lives at `~/.config/agent-config/council-spend.jsonl` (mode 0600). |
69
+
70
+ Council API tokens are installed via `./agent-config keys:install-anthropic`
71
+ and `./agent-config keys:install-openai` — they prompt on `/dev/tty`, write to
72
+ `~/.config/agent-config/<provider>.key` with mode `0600`, and never accept env
73
+ vars. The `/council` command refuses to run if the key file's permissions
74
+ drift.
61
75
 
62
76
  ### Cost profiles
63
77
 
@@ -0,0 +1,165 @@
1
+ # End-to-end walkthroughs
2
+
3
+ Four cycle-by-cycle traces of the engine commands — backend ticket,
4
+ free-form prompt, UI track, and a blocked path. Each walkthrough cites
5
+ a checked-in **golden transcript** under [`tests/golden/baseline/`](../tests/golden/baseline/);
6
+ the transcripts are regenerated by `python3 -m tests.golden.capture` and
7
+ diffed in CI, so the cycle counts and directive names below stay
8
+ in sync with the engine's actual behavior.
9
+
10
+ > Behavior demos (autonomy, commit policy, hard floor, verification)
11
+ > live in [`showcase.md`](showcase.md). This file is the cycle-trace
12
+ > companion: input → directives → outcome.
13
+
14
+ ---
15
+
16
+ ## 1. Backend ticket → ship — `/implement-ticket`
17
+
18
+ **Anchor:** [`tests/golden/baseline/GT-1/`](../tests/golden/baseline/GT-1/) ·
19
+ [`tickets/gt-1-happy.json`](../tests/golden/sandbox/tickets/gt-1-happy.json)
20
+
21
+ **Input** — a ticket payload with three concrete acceptance criteria:
22
+
23
+ ```text
24
+ GT-1-MULT — Add multiply(a, b) to the toy calculator
25
+ AC: signature multiply(a: int, b: int) -> int returning the product;
26
+ edge cases multiply(0, n)=0, multiply(-2, 3)=-6;
27
+ pytest test_multiply_returns_product in tests/test_calculator.py.
28
+ ```
29
+
30
+ **Trace** — five cycles, exit code `0` on the last:
31
+
32
+ | Cycle | Directive | What the agent does |
33
+ |---|---|---|
34
+ | c1 | `create-plan` | Builds the three-step plan (impl, test, run) |
35
+ | c2 | `apply-plan` | Edits `src/calculator.py` and `tests/test_calculator.py` |
36
+ | c3 | `run-tests` | `pytest` — `4 passed` (targeted scope) |
37
+ | c4 | `review-changes` | Four judges (bug, security, test-coverage, code-quality) — `success` |
38
+ | c5 | _(none)_ | Engine emits the delivery report, exits `0` |
39
+
40
+ **Outcome** — verified delivery report at
41
+ [`GT-1/delivery-report.md`](../tests/golden/baseline/GT-1/delivery-report.md):
42
+ plan, changes, test verdict, judge findings, suggested next command
43
+ (`/commit`).
44
+
45
+ **Anchored in:** [`commands/implement-ticket.md`](../.agent-src/commands/implement-ticket.md)
46
+ (eight-step contract) · [`work_engine/dispatcher.py`](../.agent-src/templates/scripts/work_engine/dispatcher.py)
47
+ (`STEP_ORDER`).
48
+
49
+ ---
50
+
51
+ ## 2. Free-form prompt → ship — `/work`
52
+
53
+ **Anchor:** [`tests/golden/baseline/GT-P1/`](../tests/golden/baseline/GT-P1/) ·
54
+ [`prompts/gt-p1-high.txt`](../tests/golden/sandbox/prompts/gt-p1-high.txt)
55
+
56
+ **Input** — one line, no AC, no ticket:
57
+
58
+ ```text
59
+ Add modulo(a, b) to src/calculator.py — return a % b for ints
60
+ ```
61
+
62
+ **Trace** — six cycles. The extra cycle vs. GT-1 is the
63
+ `refine-prompt` step that reconstructs the prompt into AC + assumptions
64
+ + confidence band before any plan runs:
65
+
66
+ | Cycle | Directive | Effect |
67
+ |---|---|---|
68
+ | c1 | `refine-prompt` | High confidence — AC reconstructed, no halt |
69
+ | c2 | `create-plan` | Two-step plan |
70
+ | c3 | `apply-plan` | Edits `src/calculator.py` |
71
+ | c4 | `run-tests` | targeted pass |
72
+ | c5 | `review-changes` | judges green |
73
+ | c6 | _(none)_ | delivery report, exit `0` |
74
+
75
+ **Outcome** — `success`. The same dispatcher and judges as GT-1; only
76
+ the input envelope (`input.kind="prompt"` vs `"ticket"`) differs.
77
+
78
+ **Anchored in:** [`commands/work.md`](../.agent-src/commands/work.md) ·
79
+ [`skills/refine-prompt/SKILL.md`](../.agent-src/skills/refine-prompt/SKILL.md)
80
+ · [`docs/contracts/adr-prompt-driven-execution.md`](contracts/adr-prompt-driven-execution.md).
81
+
82
+ ---
83
+
84
+ ## 3. UI improvement → review-loop ship — `/work` (UI track)
85
+
86
+ **Anchor:** [`tests/golden/baseline/GT-U2/`](../tests/golden/baseline/GT-U2/) ·
87
+ [`diffs/gt-u2-improve-diff.diff`](../tests/golden/sandbox/diffs/gt-u2-improve-diff.diff)
88
+
89
+ **Input** — a Blade diff that adds a `<label>` and a heading change to
90
+ `resources/views/contact.blade.php`. The input shape (a diff, not a
91
+ prompt) routes the engine onto the **UI track** instead of the
92
+ generic implement loop.
93
+
94
+ **Trace** — six cycles, none of them `create-plan` / `apply-plan` /
95
+ `run-tests`. The UI track has its own directive set:
96
+
97
+ | Cycle | Directive | Effect |
98
+ |---|---|---|
99
+ | c1 | `existing-ui-audit` | Inventory existing components / tokens before any new design |
100
+ | c2 | `ui-design-brief` | Brief for the proposed change |
101
+ | c3 | _(none — `_no_directive`)_ | Engine threads forward to the apply step |
102
+ | c4 | `ui-apply-plain` | Apply the diff |
103
+ | c5 | `ui-design-review-plain` | Design review judge |
104
+ | c6 | _(none)_ | delivery report, exit `0` |
105
+
106
+ **Outcome** — `success`. The audit-first ordering is enforced by the
107
+ [`ui-audit-gate`](../.agent-src/rules/ui-audit-gate.md) rule: any
108
+ non-trivial UI change without `state.ui_audit` halts before design.
109
+
110
+ **Anchored in:** [`docs/ui-track-mental-model.md`](ui-track-mental-model.md) ·
111
+ [`rules/ui-audit-gate.md`](../.agent-src/rules/ui-audit-gate.md) ·
112
+ [`skills/existing-ui-audit/SKILL.md`](../.agent-src/skills/existing-ui-audit/SKILL.md).
113
+
114
+ ---
115
+
116
+ ## 4. Blocked on ambiguity — `/implement-ticket` halts
117
+
118
+ **Anchor:** [`tests/golden/baseline/GT-2/`](../tests/golden/baseline/GT-2/) ·
119
+ [`tickets/gt-2-ambiguity.json`](../tests/golden/sandbox/tickets/gt-2-ambiguity.json)
120
+
121
+ **Input** — a ticket whose AC list contains a vague entry:
122
+
123
+ ```text
124
+ GT-2-DIV — divide(a, b)
125
+ AC: ... vague acceptance criteria at position(s) 2 ...
126
+ ```
127
+
128
+ **Trace** — one cycle, exit code `1`:
129
+
130
+ | Cycle | Directive | Effect |
131
+ |---|---|---|
132
+ | c1 | _(none)_ | Engine refuses to plan; surfaces refine prompt |
133
+
134
+ **Halt surface** — the engine does not write a plan, does not edit any
135
+ file, and emits a numbered-options block (verbatim from
136
+ [`GT-2/halt-markers.json`](../tests/golden/baseline/GT-2/halt-markers.json)):
137
+
138
+ ```text
139
+ > Ticket GT-2-DIV is missing: vague acceptance criteria at position(s) 2.
140
+ > 1. Run `/refine-ticket GT-2-DIV` and re-invoke `/implement-ticket`
141
+ > 2. Provide the missing details in chat — I'll merge them into the ticket
142
+ > 3. Abandon this ticket — too vague to implement
143
+ ```
144
+
145
+ **Outcome** — `halt_unhandled`; the run is recorded as **blocked** in
146
+ the outcome-aware telemetry (`outcomes: ["blocked"]`, see
147
+ [P2 #9](../agents/roadmaps/road-to-1-15-followups.md#phase-9--outcome-aware-telemetry-p2-9)).
148
+ No work is committed, no auto-guess is taken.
149
+
150
+ **Anchored in:** [`rules/ask-when-uncertain.md`](../.agent-src/rules/ask-when-uncertain.md)
151
+ · [`rules/non-destructive-by-default.md`](../.agent-src/rules/non-destructive-by-default.md)
152
+ · [`skills/refine-ticket/SKILL.md`](../.agent-src/skills/refine-ticket/SKILL.md).
153
+
154
+ ---
155
+
156
+ ## Reproducing these locally
157
+
158
+ ```bash
159
+ python3 -m tests.golden.capture --scenarios GT-1 GT-P1 GT-U2 GT-2
160
+ ```
161
+
162
+ Each scenario writes a fresh `transcript.json`, `delivery-report.md`,
163
+ and `halt-markers.json` under `tests/golden/baseline/<id>/`. CI diffs
164
+ the regenerated output against the committed baseline; drift fails the
165
+ build via the `roadmap-progress-check` and `golden-replay` tasks.
@@ -1,23 +1,39 @@
1
1
  # Getting Started
2
2
 
3
+ `agent-config` is a stack-agnostic orchestration contract for coding
4
+ agents. The installer detects the project shape (Composer / npm / both /
5
+ neither) and wires the matching glue. **Pick the entrypoint that
6
+ matches the project**, not the language you happen to prefer.
7
+
3
8
  ## Installation
4
9
 
10
+ The installer is the same orchestrator across stacks — it reads
11
+ `composer.json` and/or `package.json`, syncs the payload, and generates
12
+ the tool-specific glue. Pick one entrypoint:
13
+
5
14
  ```bash
6
- # Composer (PHP) two steps: install, then run the orchestrator
15
+ # Composer-based projects (PHP / Laravel / Symfony / Zend / Laminas)
7
16
  composer require --dev event4u/agent-config
8
17
  php vendor/bin/install.php
9
18
  # Equivalent: bash vendor/event4u/agent-config/scripts/install
10
19
 
11
- # npm (JavaScript/TypeScript) the orchestrator runs via postinstall
20
+ # npm-based projects (Next.js / React / Node / Vue / plain JS/TS)
12
21
  npm install --save-dev @event4u/agent-config
13
- # Re-run or pick a profile:
22
+ # Postinstall runs the orchestrator. Re-run or pick a profile:
14
23
  # bash node_modules/@event4u/agent-config/scripts/install --profile=balanced
24
+
25
+ # Mixed Composer + npm projects (Laravel + Inertia, Symfony + Vue, …)
26
+ # Run both — the orchestrator merges results, no double-write.
27
+
28
+ # Stack-less or polyglot repos (no Composer, no npm)
29
+ git clone https://github.com/event4u-app/agent-config /tmp/agent-config
30
+ bash /tmp/agent-config/scripts/install --target "$PWD"
15
31
  ```
16
32
 
17
33
  That's it. Your agent now follows your team's standards. The orchestrator
18
34
  runs a bash payload sync and a Python bridge generator (Python 3 is
19
35
  recommended; without it the payload sync still runs). No Task or Make
20
- required for end users.
36
+ required for end users — those are contributor-only.
21
37
 
22
38
  ## Project CLI — `./agent-config`
23
39
 
@@ -99,7 +115,7 @@ Your agent is now:
99
115
  - **Respecting your codebase** — no conflicting patterns
100
116
  - **Following standards** — consistent code quality
101
117
 
102
- This is enforced automatically by 53 rules. No configuration needed.
118
+ This is enforced automatically by 57 rules. No configuration needed.
103
119
 
104
120
  ---
105
121
 
@@ -131,13 +147,15 @@ Your agent now understands slash commands:
131
147
  |---|---|
132
148
  | `/commit` | Stage and commit with Conventional Commits |
133
149
  | `/create-pr` | Create PR with Jira-linked description |
134
- | `/fix-ci` | Fetch and fix GitHub Actions failures |
150
+ | `/fix ci` | Fetch and fix GitHub Actions failures |
151
+ | `/optimize skills` | Audit skills, find duplicates, run linter |
152
+ | `/feature plan` | Interactively plan a feature |
135
153
  | `/quality-fix` | Run and fix all quality checks |
136
154
  | `/chat-history` | Inspect the persistent chat-history log |
137
155
  | `/chat-history-resume` | Recover context after a crashed or switched session |
138
156
  | `/chat-history-clear` | Wipe the chat-history log (with confirmation) |
139
157
 
140
- → [Browse all 77 commands](../.agent-src/commands/)
158
+ → [Browse all 69 active commands](../.agent-src/commands/)
141
159
 
142
160
  ---
143
161
 
@@ -165,7 +183,7 @@ Run `/chat-history-resume` to walk through the prompts explicitly, or
165
183
  let the agent ask on the first turn of a new chat. All merge/replace/
166
184
  resume paths read the on-disk entries into context before any write.
167
185
 
168
- See the [`chat-history` rule](../.agent-src/rules/chat-history.md) and
186
+ See the [`chat-history` rule](../.agent-src/rules/chat-history-ownership.md) and
169
187
  [`scripts/chat_history.py`](../scripts/chat_history.py) for the mechanics.
170
188
 
171
189
  ---
@@ -173,7 +191,7 @@ See the [`chat-history` rule](../.agent-src/rules/chat-history.md) and
173
191
  ## Next steps
174
192
 
175
193
  1. **Stay on `minimal`** — use it for a few days, see if the difference is noticeable
176
- 2. **Try commands** — `/commit`, `/create-pr`, `/fix-ci` are great starting points
194
+ 2. **Try commands** — `/commit`, `/create-pr`, `/fix ci` are great starting points
177
195
  3. **Upgrade when ready** — switch to `balanced` to let the runtime dispatcher execute skills that declare a shell command
178
196
  4. **Customize** — add [project overrides](customization.md) for your team's specific patterns
179
197
 
@@ -13,8 +13,12 @@ ai-coding
13
13
  agent-skills
14
14
  agent-rules
15
15
  governance
16
+ orchestration
16
17
  laravel
17
18
  php
19
+ nextjs
20
+ nodejs
21
+ typescript
18
22
  devcontainer
19
23
  augment-agent
20
24
  claude-code
@@ -30,8 +34,9 @@ agentskills-standard
30
34
  | `agent-skills` | Aligns with the [Agent Skills](https://agentskills.io) community spec |
31
35
  | `agent-rules` | Complementary — rules govern behavior, skills provide expertise |
32
36
  | `governance` | Differentiates from prompt collections |
33
- | `laravel` | Primary domainLaravel projects are the main audience |
34
- | `php` | Broader PHP audience |
37
+ | `orchestration` | Captures the core identity a deterministic orchestration contract / state machine |
38
+ | `laravel`, `php` | Reference-implementation stack currently the deepest skill density |
39
+ | `nextjs`, `nodejs`, `typescript` | Parallel skill sets for JS/TS surfaces (project-analysis, UI directives) |
35
40
  | `devcontainer` | One of our 4 core concerns |
36
41
  | `augment-agent`, `claude-code`, `copilot` | Tool-specific discovery |
37
42
  | `agentskills-standard` | SKILL.md format is compatible with the agentskills.io spec |
@@ -53,8 +58,12 @@ gh repo edit event4u-app/agent-config \
53
58
  --add-topic agent-skills \
54
59
  --add-topic agent-rules \
55
60
  --add-topic governance \
61
+ --add-topic orchestration \
56
62
  --add-topic laravel \
57
63
  --add-topic php \
64
+ --add-topic nextjs \
65
+ --add-topic nodejs \
66
+ --add-topic typescript \
58
67
  --add-topic devcontainer \
59
68
  --add-topic augment-agent \
60
69
  --add-topic claude-code \
@@ -69,7 +78,7 @@ curl -X PUT \
69
78
  -H "Authorization: Bearer $GITHUB_TOKEN" \
70
79
  -H "Accept: application/vnd.github+json" \
71
80
  https://api.github.com/repos/event4u-app/agent-config/topics \
72
- -d '{"names":["ai-coding","agent-skills","agent-rules","governance","laravel","php","devcontainer","augment-agent","claude-code","copilot","agentskills-standard"]}'
81
+ -d '{"names":["ai-coding","agent-skills","agent-rules","governance","orchestration","laravel","php","nextjs","nodejs","typescript","devcontainer","augment-agent","claude-code","copilot","agentskills-standard"]}'
73
82
  ```
74
83
 
75
84
  ## Verify