@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
@@ -70,7 +70,7 @@ Do NOT create a skill or rule for:
70
70
 
71
71
  ### Size and structure hints
72
72
 
73
- → See `guidelines/agent-infra/size-and-scope.md` for full limits.
73
+ → See `docs/guidelines/agent-infra/size-and-scope.md` for full limits.
74
74
 
75
75
  * Target: 300–900 words. Review for split above 1200 words. Strongly consider split above 1500 words.
76
76
  * If multiple workflows exist → split into multiple skills
@@ -173,9 +173,9 @@ Present the stub as a numbered-options prompt (per `user-interaction`):
173
173
  ```
174
174
 
175
175
  Nothing is committed without the user's pick. If the user picks *skip*,
176
- record it in the commit message (`Eval stub: deferred`). Peer examples:
177
- `php-coder/evals/triggers.json`, `eloquent/evals/triggers.json`,
178
- `skill-writing/evals/triggers.json`.
176
+ record it in the commit message (`Eval stub: deferred`). Peer examples
177
+ for the expected format: `php-coder/evals/triggers.json`,
178
+ `eloquent/evals/triggers.json`, `skill-writing/evals/triggers.json`.
179
179
 
180
180
  Rules / commands / guidelines do **not** get eval stubs — only skills
181
181
  route through the top-level catalogue.
@@ -262,7 +262,7 @@ Example:
262
262
 
263
263
  Skills may declare an `execution` frontmatter block (`type`, `handler`,
264
264
  `timeout_seconds`, `safety_mode`, `allowed_tools`). Default is `manual`
265
- (instructional only). See `guidelines/agent-infra/runtime-layer.md` for
265
+ (instructional only). See `docs/guidelines/agent-infra/runtime-layer.md` for
266
266
  the full specification and `assisted` / `automated` semantics.
267
267
 
268
268
  ### When to create a `project-analysis-*` skill
@@ -285,5 +285,5 @@ utility libs, or simple state managers.
285
285
 
286
286
  * Write documentation-style, pointer-only, or too-broad skills ("Laravel skill")
287
287
  * Skip Procedure or use vague validation
288
- * Exceed size limits (see `guidelines/agent-infra/size-and-scope.md`)
288
+ * Exceed size limits (see `docs/guidelines/agent-infra/size-and-scope.md`)
289
289
  * Duplicate rules
@@ -187,4 +187,5 @@ the judge verdict.
187
187
  | Do-and-judge loop | [`/do-and-judge`](../../commands/do-and-judge.md) |
188
188
  | Stepwise plan with judge gates | [`/do-in-steps`](../../commands/do-in-steps.md) |
189
189
  | Standalone judge on an existing diff | [`/judge`](../../commands/judge.md) |
190
+ | External / networked second opinion | [`ai-council`](../ai-council/SKILL.md) |
190
191
  | Verifying completeness | [`verify-before-complete`](../verify-before-complete/SKILL.md) |
@@ -72,7 +72,7 @@ Goal: locate the failure in a single component, layer, or call site.
72
72
  3. Check recent changes: `git log`, `git blame` on the failing line,
73
73
  recent dependency updates, config edits, infra changes.
74
74
  4. **Consult memory for prior matches.** Via
75
- [`memory-access`](../../guidelines/agent-infra/memory-access.md):
75
+ [`memory-access`](../../../docs/guidelines/agent-infra/memory-access.md):
76
76
  ```python
77
77
  from scripts.memory_lookup import retrieve
78
78
  priors = retrieve(
@@ -178,14 +178,14 @@ If not in the package repo, note that these checks will run in CI after the PR i
178
178
 
179
179
  If the contribution originates from a proposal under `agents/proposals/`
180
180
  (produced by `learning-to-rule-or-skill` via the pipeline in
181
- [`self-improvement-pipeline`](../../guidelines/agent-infra/self-improvement-pipeline.md)),
181
+ [`self-improvement-pipeline`](../../../docs/guidelines/agent-infra/self-improvement-pipeline.md)),
182
182
  run the Stage-4 gate before opening the PR:
183
183
 
184
184
  ```bash
185
185
  ./agent-config proposal:check agents/proposals/{slug}.md
186
186
  ```
187
187
 
188
- **Hard refusal rule:** if `check_proposal.py` exits non-zero, STOP —
188
+ **Hard refusal rule:** if `./agent-config proposal:check` exits non-zero, STOP —
189
189
  do not create the branch, do not push, do not open the PR. Surface the
190
190
  findings to the user, ask them to fix the proposal (add evidence,
191
191
  remove TODO markers, complete required sections), then rerun.
@@ -247,7 +247,7 @@ The shared version now replaces the local override.
247
247
  ## Do NOT
248
248
 
249
249
  - **Do NOT create any upstream artifact without explicit user consent** — this is the #1 rule
250
- - **Do NOT open a PR if `check_proposal.py` blocks** — fix the proposal first (step 6b)
250
+ - **Do NOT open a PR if `./agent-config proposal:check` blocks** — fix the proposal first (step 6b)
251
251
  - Do NOT edit `.augment/` in the consumer project — it's managed by the package
252
252
  - Do NOT submit project-specific content without generalizing it first
253
253
  - Do NOT skip the compressed version — both files are mandatory
@@ -45,7 +45,7 @@ Verify the request doesn't conflict with:
45
45
  - Data flow (does it bypass existing services or repositories?)
46
46
  - **Product rules and domain invariants** — pull active rules via the
47
47
  shared abstraction (see
48
- [`memory-access`](../../guidelines/agent-infra/memory-access.md)):
48
+ [`memory-access`](../../../docs/guidelines/agent-infra/memory-access.md)):
49
49
 
50
50
  ```python
51
51
  from scripts.memory_lookup import retrieve
@@ -60,7 +60,7 @@ Verify the request doesn't conflict with:
60
60
  (e.g., "free plan caps at 3 users"); the feature must either respect
61
61
  it or explicitly propose to retire it. Cite the matching `id:` in
62
62
  the findings. Schema:
63
- [`engineering-memory-data-format`](../../guidelines/agent-infra/engineering-memory-data-format.md).
63
+ [`engineering-memory-data-format`](../../../docs/guidelines/agent-infra/engineering-memory-data-format.md).
64
64
 
65
65
  **If contradiction found** → show the existing pattern, explain why it matters.
66
66
 
@@ -1,10 +1,10 @@
1
1
  ---
2
- name: verify-before-complete
2
+ name: verify-completion-evidence
3
3
  description: "Use when claiming 'done', suggesting a commit, push, or PR — runs the evidence gate so completion claims come from fresh output in this message, not memory or earlier runs."
4
4
  source: package
5
5
  ---
6
6
 
7
- # verify-before-complete
7
+ # verify-completion-evidence
8
8
 
9
9
  ## When to use
10
10
 
@@ -14,7 +14,7 @@ Keep the format regular — 2-space indent, no tabs, no lists, one nesting
14
14
  level only. The installer's YAML handler is a restricted stdlib parser, not
15
15
  a full YAML engine. Ask the agent to normalize after manual edits — it
16
16
  follows the merge rules in
17
- [`layered-settings`](../guidelines/agent-infra/layered-settings.md#section-aware-merge-rules).
17
+ [`layered-settings`](../../docs/guidelines/agent-infra/layered-settings.md#section-aware-merge-rules).
18
18
 
19
19
  ### Migration from the legacy `.agent-settings` (key=value)
20
20
 
@@ -36,7 +36,7 @@ This block defines the personal and project-level settings that
36
36
  `scripts/install.py` (via `config/agent-settings.template.yml`)
37
37
  writes to `.agent-settings.yml` on first install. Subsequent edits are
38
38
  made by the user directly or by the agent on request, following the
39
- [section-aware merge rules](../guidelines/agent-infra/layered-settings.md#section-aware-merge-rules).
39
+ [section-aware merge rules](../../docs/guidelines/agent-infra/layered-settings.md#section-aware-merge-rules).
40
40
 
41
41
  ```yaml
42
42
  # Agent Settings
@@ -276,7 +276,7 @@ onboarding:
276
276
  # When the user's free-form prompt matches an eligible slash command,
277
277
  # the agent surfaces a numbered-options block with the recommendation
278
278
  # plus an always-present "run as-is" option. The suggestion layer
279
- # never auto-executes — the user picks. See `rules/command-suggestion.md`.
279
+ # never auto-executes — the user picks. See `rules/command-suggestion-policy.md`.
280
280
  commands:
281
281
  suggestion:
282
282
  # Master switch (true, false). `false` = the layer is silent;
@@ -299,7 +299,7 @@ commands:
299
299
  # rules, commands, guidelines, personas) the agent consulted and
300
300
  # applied. Local only, append-only JSONL, never reaches a consumer
301
301
  # repo (gitignored). Maintainer-targeted feature; consumers leave it
302
- # off. See `agents/contexts/artifact-engagement-flow.md` (once Phase 3
302
+ # off. See `docs/contracts/artifact-engagement-flow.md` (once Phase 3
303
303
  # of road-to-artifact-engagement-telemetry lands).
304
304
  telemetry:
305
305
  artifact_engagement:
@@ -328,7 +328,7 @@ telemetry:
328
328
 
329
329
  Personal and project-level settings (initial file written by
330
330
  `scripts/install.py`, edits follow the merge rules in
331
- [`layered-settings`](../guidelines/agent-infra/layered-settings.md#section-aware-merge-rules)).
331
+ [`layered-settings`](../../docs/guidelines/agent-infra/layered-settings.md#section-aware-merge-rules)).
332
332
  **Key paths use dot-notation** to denote nesting: `personal.user_name`
333
333
  lives under `personal:` in YAML.
334
334
 
@@ -365,12 +365,12 @@ lives under `personal:` in YAML.
365
365
  | `subagents.implementer_model` | model alias or empty | _(empty)_ | Model for implementer subagents. Empty = same tier as session model. See [subagent-configuration](../contexts/subagent-configuration.md). |
366
366
  | `subagents.judge_model` | model alias or empty | _(empty)_ | Model for judge subagents. Empty = one tier above implementer (opus if sonnet, sonnet if haiku). |
367
367
  | `subagents.max_parallel` | integer | `3` | Maximum parallel subagent invocations. `1` serializes. |
368
- | `roles.default_role` | `""`, `developer`, `reviewer`, `tester`, `po`, `incident`, `planner` | _(empty)_ | Role the agent defaults to at the start of a session. See [`role-contracts`](../guidelines/agent-infra/role-contracts.md). |
368
+ | `roles.default_role` | `""`, `developer`, `reviewer`, `tester`, `po`, `incident`, `planner` | _(empty)_ | Role the agent defaults to at the start of a session. See [`role-contracts`](../../docs/guidelines/agent-infra/role-contracts.md). |
369
369
  | `roles.active_role` | same as `default_role` | _(empty)_ | Role currently active; set by `/mode <name>`, cleared by `/mode none`. Enables the `role-mode-adherence` rule. |
370
- | `personas.override` | list of persona ids | `[]` | Developer-local override of the team default lens cast. Empty = inherit `personas.default` from `.agent-project-settings.yml`. See [`layered-settings`](../guidelines/agent-infra/layered-settings.md). |
370
+ | `personas.override` | list of persona ids | `[]` | Developer-local override of the team default lens cast. Empty = inherit `personas.default` from `.agent-project-settings.yml`. See [`layered-settings`](../../docs/guidelines/agent-infra/layered-settings.md). |
371
371
  | `personas.ignore` | list of persona ids | `[]` | Persona ids dropped from the default cast locally. Ignored personas stay invokable via `--personas=<id>`. |
372
372
  | `onboarding.onboarded` | `true`, `false` | `false` | Whether `/onboard` has run on this project. The `onboarding-gate` rule prompts for `/onboard` when this is `false`. Missing entirely = legacy project, treated as onboarded. |
373
- | `commands.suggestion.enabled` | `true`, `false` | `true` | Master switch for the command-suggestion layer. `false` = the layer is silent; explicit `/commands` still work. See `rules/command-suggestion.md`. |
373
+ | `commands.suggestion.enabled` | `true`, `false` | `true` | Master switch for the command-suggestion layer. `false` = the layer is silent; explicit `/commands` still work. See `rules/command-suggestion-policy.md`. |
374
374
  | `commands.suggestion.confidence_floor` | `0.0`–`1.0` | `0.6` | Minimum match score before a suggestion surfaces. Per-command frontmatter (`suggestion.confidence_floor`) overrides this global floor. |
375
375
  | `commands.suggestion.cooldown_seconds` | integer | `600` | Cooldown between re-suggestions of the same `(command, evidence)` pair. `600` = 10m. |
376
376
  | `commands.suggestion.max_options` | integer | `4` | Max number of command suggestions before the always-present "run as-is" option (total rendered = `max_options + 1`). |
@@ -432,7 +432,7 @@ they ship with a live consumer in code and get documented here, not before.
432
432
  ## Sync rules
433
433
 
434
434
  When new settings are added to this template, the
435
- [section-aware merge rules](../guidelines/agent-infra/layered-settings.md#section-aware-merge-rules)
435
+ [section-aware merge rules](../../docs/guidelines/agent-infra/layered-settings.md#section-aware-merge-rules)
436
436
  govern the update:
437
437
 
438
438
  1. Missing keys are added with their **default value** from this template,
@@ -55,5 +55,5 @@
55
55
 
56
56
  - `agents/contexts/tenant-boundaries.md` — tenancy scope, multi-tenant
57
57
  rules that sit on top of the role model
58
- - `.augment/guidelines/agent-infra/*` — reviewer skills that read this
58
+ - `../../../docs/guidelines/agent-infra/*` — reviewer skills that read this
59
59
  file
@@ -7,7 +7,8 @@ Templates for roadmap files stored in `agents/roadmaps/` or `app/Modules/{Module
7
7
  ## Rules for Roadmaps
8
8
 
9
9
  1. **Be precise and concise.** Aim for 500–1000 lines max. If larger, split into multiple files.
10
- 2. **Use checkboxes** (`- [ ]`) for every actionable step. Mark `[x]` when completed.
10
+ 2. **Checkboxes are mandatory, not decorative.** Every active roadmap MUST contain at least one `- [ ]` per non-intro phase. Decision tables, ICE matrices, and block-sequencing tables capture the *why*; checkboxes capture the *what to do next*. A roadmap without checkboxes is invisible to `agents/roadmaps-progress.md` the dashboard cannot count it, the next reader thinks no work is planned. Enforced by [`roadmap-progress-sync`](../rules/roadmap-progress-sync.md) Iron Law #2.
11
+ - **Status is binary: `ready` (default) or `draft`.** New roadmaps are created **ready** unless the user explicitly says draft — `ready` is implicit and need not be written. Drafts declare it via frontmatter at the top of the file (`---\nstatus: draft\n---`) and are hidden from the dashboard until the flag is removed or flipped to `ready`. Use `draft` while the roadmap is still being authored, while waiting for upstream decisions, or as a capture-only synthesis that has not been promoted to executable phases. There are no other status values; legacy banners like `**Status: directional**` are removed.
11
12
  3. **State the goal first.** One sentence at the top — what is the outcome?
12
13
  4. **List prerequisites** — what must exist or be running before starting.
13
14
  5. **Reference existing code** — point to files, classes, or modules.
@@ -24,17 +25,17 @@ Templates for roadmap files stored in `agents/roadmaps/` or `app/Modules/{Module
24
25
  - `agents/roadmaps/skipped/` — decision against pursuit; typically 0 items `[x]` (superseded, scope rejected)
25
26
 
26
27
  See the `roadmap-management` skill for the exact trigger matrix and user-confirmation flow.
27
-
28
28
  13. **No tags, releases, or version numbers.** Roadmaps describe work, not shipping.
29
29
  Never assign version suffixes to phases (`Phase 1 — v1.8.0`), never write
30
30
  "Target release: X.Y.Z", never plan git tags or deprecation dates. Release
31
- and tag decisions belong to the user, taken outside the roadmap. Enforced by
32
- [`scope-control`](../rules/scope-control.md#git-operations--permission-gated).
31
+ and tag decisions belong to the user and are taken outside the roadmap.
32
+ This is enforced by [`scope-control`](../rules/scope-control.md#git-operations--permission-gated).
33
33
  14. **No automatic branch switches mid-roadmap.** Roadmap work runs on the
34
- current branch. If a separate branch (spike, hotfix, experiment) would
35
- be useful, agent may propose it **once** during creation — not during
36
- execution. Default: stay on current branch. If user declines, topic is
37
- closed for this roadmap. See [`scope-control`](../rules/scope-control.md#decline--silence--no-re-asking-on-the-same-task).
34
+ branch the user is on. If a separate branch (spike, hotfix, experiment)
35
+ would be genuinely useful, the agent may propose it **once** while
36
+ creating the roadmap — not during execution. Default: stay on the
37
+ current branch. If the user declines, the topic is closed for this
38
+ roadmap. See [`scope-control`](../rules/scope-control.md#decline--silence--no-re-asking-on-the-same-task).
38
39
 
39
40
  ---
40
41
 
@@ -111,7 +111,7 @@ _Data source: ownership-map.yml + historical-bug-patterns.yml. …_
111
111
  ```
112
112
 
113
113
  Curate `ownership-map.yml` and `historical-bug-patterns.yml` over time —
114
- see `.augment/guidelines/agent-infra/review-routing-data-format.md` for
114
+ see `../../../docs/guidelines/agent-infra/review-routing-data-format.md` for
115
115
  the full schema.
116
116
 
117
117
  ## Uninstall
@@ -191,5 +191,5 @@ python3 scripts/check_memory.py --path agents/memory
191
191
  Exit `0` = clean, `1` = violations (missing required fields, duplicate
192
192
  ids, or obvious secrets — staleness alone is informational).
193
193
 
194
- Schema reference: `.augment/guidelines/agent-infra/engineering-memory-data-format.md`.
194
+ Schema reference: `../../../docs/guidelines/agent-infra/engineering-memory-data-format.md`.
195
195
  Schema examples: `.augment/templates/agents/memory/*.example.yml`.
@@ -246,7 +246,7 @@ def _apply_conflict_rule(
246
246
  # says retrieval should route through `@event4u/agent-memory`. The package
247
247
  # CLI is purely **semantic** (`memory retrieve <query> --type T …`); the
248
248
  # shared `retrieve(types, keys, …)` API is **key-based**. The hybrid
249
- # resolution agreed in `agents/contexts/agent-memory-contract.md` synthesises
249
+ # resolution agreed in `docs/contracts/agent-memory-contract.md` synthesises
250
250
  # `keys` into a single natural-language query for the package call, while
251
251
  # the file fallback continues to do glob/substring matching on the same
252
252
  # keys. Both legs land in the same `Hit` shape so the conflict rule can
@@ -26,7 +26,12 @@ from datetime import datetime, timezone
26
26
  from pathlib import Path
27
27
  from typing import Iterable, Iterator
28
28
 
29
- from .engagement import EngagementEvent, EngagementSchemaError, parse_event
29
+ from .engagement import (
30
+ ALLOWED_OUTCOMES,
31
+ EngagementEvent,
32
+ EngagementSchemaError,
33
+ parse_event,
34
+ )
30
35
 
31
36
 
32
37
  @dataclass(frozen=True)
@@ -53,6 +58,10 @@ class AggregateResult:
53
58
  earliest_ts: str | None = None
54
59
  latest_ts: str | None = None
55
60
  artefacts: dict[tuple[str, str], dict[str, object]] = field(default_factory=dict)
61
+ # Event-level outcome counts (boundary outcomes, not per-artefact).
62
+ # Initialised lazily in :func:`aggregate` so empty logs yield an
63
+ # empty dict rather than zeros across all five categories.
64
+ outcomes: dict[str, int] = field(default_factory=dict)
56
65
 
57
66
  def stats(self) -> list[ArtefactStat]:
58
67
  """Materialise the accumulated buckets as immutable stats."""
@@ -121,6 +130,12 @@ def aggregate(
121
130
  if result.latest_ts is None or event.ts > result.latest_ts:
122
131
  result.latest_ts = event.ts
123
132
  _accumulate(result.artefacts, event.consulted, event.applied, event.ts)
133
+ if event.outcomes:
134
+ for label in event.outcomes:
135
+ # Validator already restricted to ALLOWED_OUTCOMES, but
136
+ # the explicit guard documents intent and is cheap.
137
+ if label in ALLOWED_OUTCOMES:
138
+ result.outcomes[label] = result.outcomes.get(label, 0) + 1
124
139
  return result
125
140
 
126
141
 
@@ -10,9 +10,24 @@ adds the redaction validator on top. The contract here is:
10
10
  "boundary_kind": "task" | "phase-step" | "tool-call",
11
11
  "consulted": {"skills": [...], "rules": [...], ...},
12
12
  "applied": {"skills": [...], "rules": [...], ...},
13
+ "outcomes": ["blocked", "verification_failed", ...] # optional
13
14
  "tokens_estimate": {"consulted_load": <int>} # optional
14
15
  }
15
16
 
17
+ Outcomes (optional, additive in schema v1) capture *what happened*
18
+ during the boundary, not which artefacts were consulted. The five
19
+ allowed categories are scoped tightly so reports stay actionable:
20
+
21
+ - ``blocked`` — Hard-Floor / scope-control gate fired, work paused.
22
+ - ``partial`` — boundary closed without finishing the planned scope.
23
+ - ``memory_influenced_decision`` — a memory entry shaped a non-trivial decision.
24
+ - ``verification_failed`` — verify-before-complete gate rejected the result.
25
+ - ``stop_rule_triggered`` — context-hygiene 3-failure / tool-loop stop fired.
26
+
27
+ Outcomes compose: a single boundary may carry multiple. Order is
28
+ preserved as recorded; duplicates are rejected to keep reports
29
+ honest.
30
+
16
31
  Design choices:
17
32
 
18
33
  - Dataclass + manual ``validate()`` (no pydantic — keep the engine
@@ -48,6 +63,18 @@ ALLOWED_BOUNDARY_KINDS: tuple[str, ...] = (
48
63
  "tool-call",
49
64
  )
50
65
 
66
+ # Outcome categories — see module docstring for semantics. The set is
67
+ # intentionally small; widening requires an explicit follow-up roadmap
68
+ # step. Reports group by these labels, so renaming is breaking.
69
+ ALLOWED_OUTCOMES: tuple[str, ...] = (
70
+ "blocked",
71
+ "partial",
72
+ "memory_influenced_decision",
73
+ "verification_failed",
74
+ "stop_rule_triggered",
75
+ )
76
+ MAX_OUTCOMES_PER_EVENT = len(ALLOWED_OUTCOMES)
77
+
51
78
  # Phase 5 redaction validator — keep id fields from leaking paths,
52
79
  # free-text, or filenames. Repository-internal artefact ids and
53
80
  # task ids never contain these characters.
@@ -115,6 +142,7 @@ class EngagementEvent:
115
142
  boundary_kind: str
116
143
  consulted: dict[str, list[str]] = field(default_factory=dict)
117
144
  applied: dict[str, list[str]] = field(default_factory=dict)
145
+ outcomes: list[str] | None = None
118
146
  tokens_estimate: dict[str, int] | None = None
119
147
  schema_version: int = SCHEMA_VERSION
120
148
 
@@ -134,6 +162,8 @@ class EngagementEvent:
134
162
  )
135
163
  _validate_artefact_dict("consulted", self.consulted)
136
164
  _validate_artefact_dict("applied", self.applied)
165
+ if self.outcomes is not None:
166
+ _validate_outcomes(self.outcomes)
137
167
  if self.tokens_estimate is not None:
138
168
  if not isinstance(self.tokens_estimate, dict):
139
169
  raise EngagementSchemaError(
@@ -160,6 +190,8 @@ class EngagementEvent:
160
190
  "consulted": _normalise_artefact_dict(self.consulted),
161
191
  "applied": _normalise_artefact_dict(self.applied),
162
192
  }
193
+ if self.outcomes:
194
+ out["outcomes"] = list(self.outcomes)
163
195
  if self.tokens_estimate:
164
196
  out["tokens_estimate"] = dict(self.tokens_estimate)
165
197
  return out
@@ -198,6 +230,32 @@ def _normalise_artefact_dict(payload: dict[str, list[str]]) -> dict[str, list[st
198
230
  return {kind: list(payload[kind]) for kind in ALLOWED_KINDS if payload.get(kind)}
199
231
 
200
232
 
233
+ def _validate_outcomes(payload: Any) -> None:
234
+ if not isinstance(payload, list):
235
+ raise EngagementSchemaError(
236
+ "outcomes must be a list of str or None"
237
+ )
238
+ if len(payload) > MAX_OUTCOMES_PER_EVENT:
239
+ raise EngagementSchemaError(
240
+ f"outcomes exceeds {MAX_OUTCOMES_PER_EVENT} entries"
241
+ )
242
+ seen: set[str] = set()
243
+ for label in payload:
244
+ if not isinstance(label, str) or not label:
245
+ raise EngagementSchemaError(
246
+ "outcomes must contain non-empty str labels"
247
+ )
248
+ if label not in ALLOWED_OUTCOMES:
249
+ raise EngagementSchemaError(
250
+ f"outcomes contains {label!r}; allowed: {ALLOWED_OUTCOMES!r}"
251
+ )
252
+ if label in seen:
253
+ raise EngagementSchemaError(
254
+ f"outcomes contains duplicate {label!r}"
255
+ )
256
+ seen.add(label)
257
+
258
+
201
259
  def parse_event(line: str) -> EngagementEvent:
202
260
  if not isinstance(line, str) or not line.strip():
203
261
  raise EngagementSchemaError("line must be a non-empty JSONL record")
@@ -213,6 +271,7 @@ def parse_event(line: str) -> EngagementEvent:
213
271
  boundary_kind=raw.get("boundary_kind", ""),
214
272
  consulted=raw.get("consulted", {}) or {},
215
273
  applied=raw.get("applied", {}) or {},
274
+ outcomes=raw.get("outcomes"),
216
275
  tokens_estimate=raw.get("tokens_estimate"),
217
276
  schema_version=raw.get("schema_version", SCHEMA_VERSION),
218
277
  )
@@ -20,7 +20,7 @@ from dataclasses import dataclass
20
20
  from typing import Any, Sequence
21
21
 
22
22
  from .aggregator import AggregateResult, ArtefactStat, rank_artefacts
23
- from .engagement import check_id_redaction
23
+ from .engagement import ALLOWED_OUTCOMES, check_id_redaction
24
24
 
25
25
  QUARTILE_TOP_RATIO = 0.20
26
26
  QUARTILE_BOTTOM_RATIO = 0.20
@@ -93,6 +93,23 @@ def render_markdown(
93
93
  lines.append(f"- ts range: `{aggregate.earliest_ts}` → `{aggregate.latest_ts}`")
94
94
  lines.append("")
95
95
 
96
+ # Outcomes summary — one row per category, in declared order, only
97
+ # when the log carries any outcome data. Stable column order so two
98
+ # reports over the same log render byte-identical.
99
+ outcomes_total = sum(aggregate.outcomes.values())
100
+ if outcomes_total:
101
+ lines.append("## Outcomes")
102
+ lines.append("")
103
+ lines.append("| outcome | count | share |")
104
+ lines.append("|---|---:|---:|")
105
+ for label in ALLOWED_OUTCOMES:
106
+ count = aggregate.outcomes.get(label, 0)
107
+ if not count:
108
+ continue
109
+ share = count / outcomes_total
110
+ lines.append(f"| {label} | {count} | {share:.2f} |")
111
+ lines.append("")
112
+
96
113
  titles = {
97
114
  BUCKET_TOP: "Essential (top 20 %)",
98
115
  BUCKET_MID: "Useful (mid 60 %)",
@@ -136,6 +153,15 @@ def render_json(
136
153
  if top is not None:
137
154
  for bucket in grouped:
138
155
  grouped[bucket] = grouped[bucket][:top]
156
+ # Outcomes — declared order, zeros omitted, total at top so callers
157
+ # can short-circuit without iterating the dict. Empty when no event
158
+ # in the window carried outcomes.
159
+ outcomes_total = sum(aggregate.outcomes.values())
160
+ outcomes_payload: dict[str, Any] = {"total": outcomes_total, "by_category": {}}
161
+ for label in ALLOWED_OUTCOMES:
162
+ count = aggregate.outcomes.get(label, 0)
163
+ if count:
164
+ outcomes_payload["by_category"][label] = count
139
165
  payload = {
140
166
  "schema_version": 1,
141
167
  "summary": {
@@ -146,6 +172,7 @@ def render_json(
146
172
  "latest_ts": aggregate.latest_ts,
147
173
  "since_label": since_label,
148
174
  },
175
+ "outcomes": outcomes_payload,
149
176
  "buckets": grouped,
150
177
  }
151
178
  return json.dumps(payload, sort_keys=True, indent=2) + "\n"
@@ -19,7 +19,8 @@ Usage:
19
19
  ./agent-config telemetry:record \\
20
20
  --task-id ticket-PROJ-42 --boundary task \\
21
21
  --consulted skills:php-coder --consulted rules:scope-control \\
22
- --applied skills:php-coder
22
+ --applied skills:php-coder \\
23
+ --outcome verification_failed --outcome stop_rule_triggered
23
24
 
24
25
  Exit codes:
25
26
  0 success or disabled (silent)
@@ -38,6 +39,7 @@ from pathlib import Path
38
39
  # the script is dispatched from the package or from a consumer copy.
39
40
  from telemetry.boundary import record_event
40
41
  from telemetry.engagement import (
42
+ ALLOWED_OUTCOMES,
41
43
  EngagementEvent,
42
44
  EngagementSchemaError,
43
45
  now_utc_iso,
@@ -71,6 +73,7 @@ def _build_event_from_args(args: argparse.Namespace) -> EngagementEvent:
71
73
  boundary_kind=args.boundary,
72
74
  consulted=_parse_kv_list(args.consulted or []),
73
75
  applied=_parse_kv_list(args.applied or []),
76
+ outcomes=list(args.outcome) if args.outcome else None,
74
77
  )
75
78
 
76
79
 
@@ -87,6 +90,7 @@ def _build_event_from_payload(raw: str) -> EngagementEvent:
87
90
  boundary_kind=data.get("boundary_kind", ""),
88
91
  consulted=data.get("consulted", {}) or {},
89
92
  applied=data.get("applied", {}) or {},
93
+ outcomes=data.get("outcomes"),
90
94
  tokens_estimate=data.get("tokens_estimate"),
91
95
  )
92
96
 
@@ -107,6 +111,15 @@ def main(argv: list[str] | None = None) -> int:
107
111
  )
108
112
  parser.add_argument("--consulted", action="append")
109
113
  parser.add_argument("--applied", action="append")
114
+ parser.add_argument(
115
+ "--outcome",
116
+ action="append",
117
+ choices=ALLOWED_OUTCOMES,
118
+ help=(
119
+ "Boundary outcome label; repeat for multiple. "
120
+ "Allowed: " + ", ".join(ALLOWED_OUTCOMES) + "."
121
+ ),
122
+ )
110
123
  parser.add_argument("--ts", default="")
111
124
  parser.add_argument("--payload-file", type=Path)
112
125
  parser.add_argument("--stdin", action="store_true")
@@ -8,8 +8,8 @@ the dispatcher, CLI and step modules over from the legacy
8
8
  that re-exports from here with a ``DeprecationWarning``.
9
9
 
10
10
  Architectural constraints (from
11
- ``agents/contexts/adr-implement-ticket-runtime.md`` and
12
- ``agents/contexts/implement-ticket-flow.md``):
11
+ ``docs/contracts/adr-implement-ticket-runtime.md`` and
12
+ ``docs/contracts/implement-ticket-flow.md``):
13
13
 
14
14
  - Runtime is Python 3.10+.
15
15
  - The dispatcher is linear, not a DAG. Eight fixed steps, fixed order.