@event4u/agent-config 8.13.0 → 9.1.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 (316) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +183 -0
  3. package/MIGRATION.md +14 -0
  4. package/README.md +2 -2
  5. package/dist/agent-src/commands/agent-handoff.md +35 -0
  6. package/dist/agent-src/commands/agents/init.md +1 -0
  7. package/dist/agent-src/commands/agents/optimize.md +1 -0
  8. package/dist/agent-src/commands/agents/user/accept.md +3 -2
  9. package/dist/agent-src/commands/agents/user/init.md +5 -4
  10. package/dist/agent-src/commands/agents/user/update.md +3 -2
  11. package/dist/agent-src/commands/agents/user.md +1 -0
  12. package/dist/agent-src/commands/agents.md +1 -0
  13. package/dist/agent-src/commands/analytics/show.md +1 -0
  14. package/dist/agent-src/commands/analytics.md +1 -0
  15. package/dist/agent-src/commands/analyze/decision.md +1 -0
  16. package/dist/agent-src/commands/analyze/incident.md +1 -0
  17. package/dist/agent-src/commands/analyze/near-miss.md +1 -0
  18. package/dist/agent-src/commands/analyze/postmortem.md +1 -0
  19. package/dist/agent-src/commands/analyze/premortem.md +1 -0
  20. package/dist/agent-src/commands/analyze/reference-repo.md +1 -0
  21. package/dist/agent-src/commands/analyze.md +3 -2
  22. package/dist/agent-src/commands/brand/identity.md +6 -5
  23. package/dist/agent-src/commands/brand/review.md +6 -5
  24. package/dist/agent-src/commands/brand/strategy.md +6 -4
  25. package/dist/agent-src/commands/brand/tokens.md +7 -6
  26. package/dist/agent-src/commands/brand/voice.md +5 -4
  27. package/dist/agent-src/commands/brand.md +9 -7
  28. package/dist/agent-src/commands/bug/fix.md +1 -0
  29. package/dist/agent-src/commands/bug/investigate.md +1 -0
  30. package/dist/agent-src/commands/bug.md +2 -1
  31. package/dist/agent-src/commands/challenge-me/vision.md +1 -0
  32. package/dist/agent-src/commands/challenge-me/with-docs.md +1 -0
  33. package/dist/agent-src/commands/challenge-me.md +28 -6
  34. package/dist/agent-src/commands/chat-history.md +1 -0
  35. package/dist/agent-src/commands/check-current-md.md +1 -0
  36. package/dist/agent-src/commands/commit.md +1 -0
  37. package/dist/agent-src/commands/context/create.md +3 -2
  38. package/dist/agent-src/commands/context.md +1 -0
  39. package/dist/agent-src/commands/cost/profile.md +1 -0
  40. package/dist/agent-src/commands/cost.md +2 -1
  41. package/dist/agent-src/commands/council/analysis.md +1 -0
  42. package/dist/agent-src/commands/council/debate.md +1 -0
  43. package/dist/agent-src/commands/council/default.md +21 -20
  44. package/dist/agent-src/commands/council/design.md +1 -0
  45. package/dist/agent-src/commands/council/optimize.md +1 -0
  46. package/dist/agent-src/commands/council/pr.md +1 -0
  47. package/dist/agent-src/commands/council.md +1 -0
  48. package/dist/agent-src/commands/estimate-ticket.md +1 -0
  49. package/dist/agent-src/commands/explain-run.md +88 -0
  50. package/dist/agent-src/commands/feature/dev.md +1 -0
  51. package/dist/agent-src/commands/feature/explore.md +1 -0
  52. package/dist/agent-src/commands/feature/plan.md +1 -0
  53. package/dist/agent-src/commands/feature/refactor.md +1 -0
  54. package/dist/agent-src/commands/feature/roadmap.md +1 -0
  55. package/dist/agent-src/commands/feature.md +2 -1
  56. package/dist/agent-src/commands/fix/pr-comments.md +19 -0
  57. package/dist/agent-src/commands/fix.md +2 -1
  58. package/dist/agent-src/commands/ghostwriter/delete.md +1 -0
  59. package/dist/agent-src/commands/ghostwriter/fetch.md +1 -0
  60. package/dist/agent-src/commands/ghostwriter/show.md +1 -0
  61. package/dist/agent-src/commands/ghostwriter/write.md +1 -0
  62. package/dist/agent-src/commands/ghostwriter.md +1 -0
  63. package/dist/agent-src/commands/grill-me.md +17 -12
  64. package/dist/agent-src/commands/humanize.md +1 -0
  65. package/dist/agent-src/commands/image/analyse.md +2 -1
  66. package/dist/agent-src/commands/image/create.md +1 -0
  67. package/dist/agent-src/commands/image/verify.md +1 -0
  68. package/dist/agent-src/commands/image.md +16 -12
  69. package/dist/agent-src/commands/implement-ticket.md +1 -0
  70. package/dist/agent-src/commands/judge/on-diff.md +1 -0
  71. package/dist/agent-src/commands/judge/solo.md +1 -0
  72. package/dist/agent-src/commands/judge/steps.md +1 -0
  73. package/dist/agent-src/commands/judge.md +1 -0
  74. package/dist/agent-src/commands/knowledge/cross-repo.md +1 -0
  75. package/dist/agent-src/commands/knowledge/forget.md +1 -0
  76. package/dist/agent-src/commands/knowledge/ingest.md +1 -0
  77. package/dist/agent-src/commands/knowledge/list.md +10 -0
  78. package/dist/agent-src/commands/knowledge.md +1 -0
  79. package/dist/agent-src/commands/memory/learn-low-impact.md +1 -0
  80. package/dist/agent-src/commands/memory/mine-session.md +1 -0
  81. package/dist/agent-src/commands/memory/promote.md +3 -2
  82. package/dist/agent-src/commands/memory.md +1 -0
  83. package/dist/agent-src/commands/mission/upgrade.md +45 -24
  84. package/dist/agent-src/commands/mode.md +1 -0
  85. package/dist/agent-src/commands/module/create.md +1 -0
  86. package/dist/agent-src/commands/module/explore.md +1 -0
  87. package/dist/agent-src/commands/module.md +1 -0
  88. package/dist/agent-src/commands/optimize/agents-dir.md +1 -0
  89. package/dist/agent-src/commands/optimize/project.md +1 -0
  90. package/dist/agent-src/commands/optimize/prompt.md +1 -0
  91. package/dist/agent-src/commands/optimize.md +2 -1
  92. package/dist/agent-src/commands/orchestrate.md +1 -0
  93. package/dist/agent-src/commands/override.md +1 -0
  94. package/dist/agent-src/commands/package.md +2 -1
  95. package/dist/agent-src/commands/post-as/ghostwriter.md +1 -0
  96. package/dist/agent-src/commands/post-as/me.md +1 -0
  97. package/dist/agent-src/commands/post-as.md +1 -0
  98. package/dist/agent-src/commands/pr/create/description-only.md +139 -8
  99. package/dist/agent-src/commands/pr/create.md +35 -22
  100. package/dist/agent-src/commands/prediction-pool.md +7 -6
  101. package/dist/agent-src/commands/prepare-for-review.md +1 -0
  102. package/dist/agent-src/commands/profile/activate.md +1 -0
  103. package/dist/agent-src/commands/profile/deactivate.md +1 -0
  104. package/dist/agent-src/commands/profile.md +1 -0
  105. package/dist/agent-src/commands/project.md +2 -1
  106. package/dist/agent-src/commands/refine-ticket.md +7 -0
  107. package/dist/agent-src/commands/research/deep.md +1 -0
  108. package/dist/agent-src/commands/research.md +1 -0
  109. package/dist/agent-src/commands/review/routing.md +1 -0
  110. package/dist/agent-src/commands/review.md +2 -1
  111. package/dist/agent-src/commands/roadmap/ai-council.md +1 -0
  112. package/dist/agent-src/commands/roadmap/materialize.md +1 -0
  113. package/dist/agent-src/commands/roadmap/process-full.md +1 -0
  114. package/dist/agent-src/commands/roadmap/process-phase.md +1 -0
  115. package/dist/agent-src/commands/roadmap/process-step.md +1 -0
  116. package/dist/agent-src/commands/roadmap.md +1 -0
  117. package/dist/agent-src/commands/security-audit-config.md +2 -1
  118. package/dist/agent-src/commands/skill/preview.md +1 -0
  119. package/dist/agent-src/commands/skill.md +1 -0
  120. package/dist/agent-src/commands/skills/discover.md +1 -0
  121. package/dist/agent-src/commands/skills.md +1 -0
  122. package/dist/agent-src/commands/sync/agent-settings.md +1 -0
  123. package/dist/agent-src/commands/sync.md +2 -1
  124. package/dist/agent-src/commands/team/adversarial.md +3 -2
  125. package/dist/agent-src/commands/team/delegate.md +3 -2
  126. package/dist/agent-src/commands/team/review.md +3 -2
  127. package/dist/agent-src/commands/team/status.md +49 -18
  128. package/dist/agent-src/commands/team-knowledge.md +8 -6
  129. package/dist/agent-src/commands/team.md +21 -16
  130. package/dist/agent-src/commands/tests/e2e-heal.md +1 -0
  131. package/dist/agent-src/commands/tests/e2e-plan.md +1 -0
  132. package/dist/agent-src/commands/tests/execute.md +1 -0
  133. package/dist/agent-src/commands/tests.md +2 -1
  134. package/dist/agent-src/commands/update-form-request-messages.md +1 -0
  135. package/dist/agent-src/commands/upstream-contribute.md +1 -0
  136. package/dist/agent-src/commands/video/from-script.md +3 -2
  137. package/dist/agent-src/commands/video/from-song.md +22 -21
  138. package/dist/agent-src/commands/video/scene.md +1 -0
  139. package/dist/agent-src/commands/video/stitch.md +2 -1
  140. package/dist/agent-src/commands/video/storyboard.md +1 -0
  141. package/dist/agent-src/commands/video.md +1 -0
  142. package/dist/agent-src/commands/work.md +1 -0
  143. package/dist/agent-src/commands/worktree/cleanup.md +8 -7
  144. package/dist/agent-src/commands/worktree/create.md +1 -0
  145. package/dist/agent-src/commands/worktree/verify.md +1 -0
  146. package/dist/agent-src/commands/worktree.md +1 -0
  147. package/dist/agent-src/rules/active-remediation.md +12 -36
  148. package/dist/agent-src/rules/artifact-drafting-protocol.md +7 -64
  149. package/dist/agent-src/rules/context-hygiene.md +19 -113
  150. package/dist/agent-src/rules/design-fidelity.md +4 -60
  151. package/dist/agent-src/rules/domain-adoption-policy.md +10 -106
  152. package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +12 -60
  153. package/dist/agent-src/rules/improve-before-implement.md +4 -0
  154. package/dist/agent-src/rules/minimal-safe-diff.md +6 -86
  155. package/dist/agent-src/rules/size-enforcement.md +10 -0
  156. package/dist/agent-src/rules/tool-safety.md +17 -3
  157. package/dist/agent-src/skills/agent-security-review/SKILL.md +12 -1
  158. package/dist/agent-src/skills/ai-council/SKILL.md +11 -0
  159. package/dist/agent-src/skills/bug-analyzer/SKILL.md +24 -2
  160. package/dist/agent-src/skills/code-review/SKILL.md +105 -93
  161. package/dist/agent-src/skills/code-review/checklists/backend.md +50 -0
  162. package/dist/agent-src/skills/code-review/checklists/database.md +19 -0
  163. package/dist/agent-src/skills/code-review/checklists/dependency.md +18 -0
  164. package/dist/agent-src/skills/code-review/checklists/docs.md +14 -0
  165. package/dist/agent-src/skills/code-review/checklists/frontend.md +19 -0
  166. package/dist/agent-src/skills/code-review/checklists/infra.md +17 -0
  167. package/dist/agent-src/skills/code-review/checklists/producing-the-review.md +62 -0
  168. package/dist/agent-src/skills/code-review/checklists/test-only.md +13 -0
  169. package/dist/agent-src/skills/code-review/evals/evals.json +53 -15
  170. package/dist/agent-src/skills/condense-memory/SKILL.md +3 -2
  171. package/dist/agent-src/skills/conventional-commits-writing/evals/evals.json +15 -0
  172. package/dist/agent-src/skills/docker/SKILL.md +10 -0
  173. package/dist/agent-src/skills/docx-authoring/SKILL.md +102 -0
  174. package/dist/agent-src/skills/github-ci/evals/evals.json +25 -0
  175. package/dist/agent-src/skills/humanizer/SKILL.md +79 -3
  176. package/dist/agent-src/skills/humanizer/references/anti-aiisms.md +112 -0
  177. package/dist/agent-src/skills/humanizer/references/fixtures.md +70 -0
  178. package/dist/agent-src/skills/judge-bug-hunter/SKILL.md +7 -1
  179. package/dist/agent-src/skills/laravel/SKILL.md +10 -0
  180. package/dist/agent-src/skills/launch-readiness/SKILL.md +35 -0
  181. package/dist/agent-src/skills/llm-provider-knowledge/SKILL.md +146 -0
  182. package/dist/agent-src/skills/llm-provider-knowledge/evals/triggers.json +20 -0
  183. package/dist/agent-src/skills/merge-conflicts/SKILL.md +30 -0
  184. package/dist/agent-src/skills/pdf-tools/SKILL.md +101 -0
  185. package/dist/agent-src/skills/quality-tools/evals/evals.json +15 -0
  186. package/dist/agent-src/skills/security-audit/SKILL.md +29 -0
  187. package/dist/agent-src/skills/security-maturity-assessment/SKILL.md +90 -0
  188. package/dist/agent-src/skills/security-maturity-assessment/evals/triggers.json +52 -0
  189. package/dist/agent-src/skills/skill-writing/SKILL.md +79 -0
  190. package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +11 -3
  191. package/dist/agent-src/skills/subagent-orchestration/prompts/README.md +11 -0
  192. package/dist/agent-src/skills/subagent-orchestration/schemas/team-review-status.json +103 -0
  193. package/dist/agent-src/skills/terraform/SKILL.md +10 -0
  194. package/dist/agent-src/skills/test-driven-development/SKILL.md +31 -0
  195. package/dist/agent-src/skills/threat-modeling/SKILL.md +15 -0
  196. package/dist/agent-src/skills/token-optimizer/SKILL.md +10 -4
  197. package/dist/agent-src/templates/agent-settings.md +28 -0
  198. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  199. package/dist/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
  200. package/dist/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
  201. package/dist/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
  202. package/dist/agent-src/templates/scripts/telemetry_record.ts +5 -0
  203. package/dist/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +4 -1
  204. package/dist/discovery/deprecation-report.md +1 -1
  205. package/dist/discovery/discovery-manifest.json +314 -194
  206. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  207. package/dist/discovery/discovery-manifest.summary.md +5 -5
  208. package/dist/discovery/orphan-report.md +1 -1
  209. package/dist/discovery/packs.json +23 -18
  210. package/dist/discovery/trust-report.md +8 -8
  211. package/dist/discovery/workspaces.json +18 -13
  212. package/dist/install/install.mjs +48 -33
  213. package/dist/mcp/registry-manifest.json +3 -3
  214. package/dist/router.json +1 -1
  215. package/dist/scripts/_lib/agent_settings.js +4 -1
  216. package/dist/scripts/_lib/agent_settings.js.map +1 -1
  217. package/dist/scripts/condense.js +5 -0
  218. package/dist/scripts/condense.js.map +1 -1
  219. package/dist/server/schemas/settings.js +10 -1
  220. package/dist/server/schemas/settings.js.map +1 -1
  221. package/docs/CLAIMS.md +9 -2
  222. package/docs/MIGRATION.md +20 -0
  223. package/docs/SKILL_CENSUS.md +8 -0
  224. package/docs/architecture.md +3 -3
  225. package/docs/benchmark.md +67 -2
  226. package/docs/catalog.md +2 -2
  227. package/docs/command-flows.md +1 -1
  228. package/docs/contracts/agents-layout.md +1 -1
  229. package/docs/contracts/ai-council-config.md +9 -2
  230. package/docs/contracts/ai-team-config.md +37 -4
  231. package/docs/contracts/consumer-bridge.md +55 -63
  232. package/docs/contracts/install-layout.md +1 -1
  233. package/docs/contracts/migrate-command.md +1 -1
  234. package/docs/contracts/prelaunch-diagnostics.md +151 -0
  235. package/docs/contracts/release-pr-gating.md +1 -0
  236. package/docs/customization.md +22 -1
  237. package/docs/decisions/ADR-020-global-only-consumer-scope.md +34 -0
  238. package/docs/decisions/ADR-049-configuration-trust-boundary.md +9 -1
  239. package/docs/featured-skills.md +2 -2
  240. package/docs/getting-started-by-role.md +1 -1
  241. package/docs/getting-started.md +17 -6
  242. package/docs/governance-advantage.md +1 -1
  243. package/docs/guidelines/agent-infra/active-remediation-mechanics.md +45 -0
  244. package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +28 -0
  245. package/docs/guidelines/agent-infra/api-cost-levers.md +126 -0
  246. package/docs/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md +76 -0
  247. package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +90 -0
  248. package/docs/guidelines/agent-infra/domain-adoption-gates.md +112 -0
  249. package/docs/guidelines/agent-infra/framework-neutrality-patterns.md +66 -0
  250. package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +99 -0
  251. package/docs/guidelines/agent-infra/skill-quality-checklist.md +13 -0
  252. package/docs/guidelines/design-fidelity-mechanics.md +76 -0
  253. package/docs/installation.md +2 -1
  254. package/docs/maintainers/dev-mode.md +3 -2
  255. package/docs/parity/command-frontmatter.md +60 -0
  256. package/docs/proof.md +7 -6
  257. package/package.json +1 -1
  258. package/src/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
  259. package/src/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
  260. package/src/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
  261. package/src/agent-src/templates/scripts/telemetry_record.ts +5 -0
  262. package/src/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +4 -1
  263. package/src/config/agent-settings.template.yml +73 -10
  264. package/src/config/gitignore-block.txt +16 -6
  265. package/src/config/prelaunch-areas.yml +36 -0
  266. package/src/scripts/_cli/cmd_conformance.ts +2 -2
  267. package/src/scripts/_cli/cmd_doctor.ts +280 -39
  268. package/src/scripts/_cli/cmd_refresh.ts +35 -118
  269. package/src/scripts/_lib/agent_settings.ts +4 -1
  270. package/src/scripts/_lib/claude_plugin.ts +77 -2
  271. package/src/scripts/_lib/orchestration_record.ts +5 -0
  272. package/src/scripts/_lib/tool_adapter_registry.ts +120 -0
  273. package/src/scripts/ai_council/clients.ts +68 -6
  274. package/src/scripts/ai_council/pricing.ts +62 -0
  275. package/src/scripts/ai_team/config.ts +73 -1
  276. package/src/scripts/ai_team/review_gate.ts +636 -0
  277. package/src/scripts/ai_team/team_dispatch.ts +612 -0
  278. package/src/scripts/bench_ab_task_runner.ts +11 -1
  279. package/src/scripts/bench_parity_count.ts +279 -0
  280. package/src/scripts/build_linear_digest.ts +3 -1
  281. package/src/scripts/check_bridge_derivation.ts +172 -0
  282. package/src/scripts/check_consumer_scope_flip.ts +179 -0
  283. package/src/scripts/check_council_config_location.ts +115 -15
  284. package/src/scripts/check_host_loadability.ts +81 -0
  285. package/src/scripts/condense.ts +5 -0
  286. package/src/scripts/council_cli.ts +19 -3
  287. package/src/scripts/hook_manifest.yaml +12 -1
  288. package/src/scripts/install.ts +44 -45
  289. package/src/scripts/lint_agents_layout.ts +10 -4
  290. package/src/scripts/lint_breaking_changes_index.ts +303 -0
  291. package/src/scripts/lint_handoffs.ts +42 -0
  292. package/src/scripts/lint_skill_descriptions.ts +228 -0
  293. package/src/scripts/lint_skill_descriptions_allowlist.json +1 -0
  294. package/src/scripts/lint_skill_scripts_readonly.ts +145 -0
  295. package/src/scripts/lint_skill_scripts_readonly_allowlist.json +8 -0
  296. package/src/scripts/lint_supported_tools_matrix.ts +35 -0
  297. package/src/scripts/mcp_server/tools.ts +1 -3
  298. package/src/scripts/optimize_skill_description.ts +144 -0
  299. package/src/scripts/orchestration_record.ts +2 -1
  300. package/src/scripts/prelaunch_diagnostics.ts +248 -0
  301. package/src/scripts/run_skill_evals.ts +70 -4
  302. package/src/scripts/schemas/agent-settings.schema.json +17 -0
  303. package/src/scripts/schemas/command.schema.json +7 -0
  304. package/src/scripts/schemas/evals.schema.json +105 -14
  305. package/src/scripts/schemas/prelaunch-report.schema.json +107 -0
  306. package/src/scripts/schemas/skill.schema.json +18 -1
  307. package/src/scripts/schemas/subagent.schema.json +6 -0
  308. package/src/scripts/self_review_gate.test.ts +11 -0
  309. package/src/scripts/self_review_gate.ts +7 -1
  310. package/src/scripts/skill_eval_coverage.ts +4 -1
  311. package/src/scripts/skill_linter.ts +43 -3
  312. package/src/scripts/smoke_host_loadability.sh +73 -0
  313. package/src/scripts/team_review_gate_hook.ts +115 -0
  314. package/src/scripts/trigger_eval_grandfather.json +1 -2
  315. package/src/scripts/utilization_report.ts +225 -0
  316. package/src/server/schemas/settings.ts +24 -1
@@ -2,10 +2,10 @@
2
2
  model_tier: inherit
3
3
  name: team-status
4
4
  disable-model-invocation: true
5
- pack: product-reasoning
5
+ pack: meta
6
6
  tier: 2
7
7
  visibility: internal
8
- description: Thin wrapper — plugin job status via /codex:status plus a ledger line with today's cli_call_budget openai count. Gated on ai_team.enabled; fails closed when the plugin is absent.
8
+ description: Thin wrapper — plugin job status via /codex:status plus a quota block (shared openai counter vs team + council ceilings). Gated on ai_team.enabled; fails closed without the plugin.
9
9
  cluster: team
10
10
  sub: status
11
11
  suggestion:
@@ -14,7 +14,7 @@ suggestion:
14
14
  workspaces:
15
15
  - agent-config-maintainer
16
16
  packs:
17
- - product-reasoning
17
+ - meta
18
18
  ---
19
19
 
20
20
  # /team status
@@ -22,7 +22,7 @@ packs:
22
22
  ## Instructions
23
23
 
24
24
  Thin wrapper: team-mode status. On Claude Code hosts it delegates to the
25
- official plugin's `/codex:status` and appends **our** quota ledger line —
25
+ official plugin's `/codex:status` and appends **our** quota block —
26
26
  the one piece of state the plugin does not know about.
27
27
 
28
28
  ### 1. Gate — `ai_team.enabled`
@@ -38,7 +38,7 @@ print the fail-closed block from `/team` (master) § "Fail-closed contract"
38
38
  (`agent-config doctor --check team`) and **STOP** — never a silent no-op.
39
39
 
40
40
  On a non-Claude-Code host: state that plugin job status requires the Claude
41
- Code plugin, then still print the ledger line (Step 4) — the quota counter
41
+ Code plugin, then still print the quota block (Step 4) — the quota counter
42
42
  is ours and host-independent.
43
43
 
44
44
  ### 3. Delegate
@@ -49,28 +49,59 @@ Invoke the plugin:
49
49
 
50
50
  Render its job/status output verbatim.
51
51
 
52
- ### 4. Append the quota ledger line
52
+ ### 4. Append the quota block — two ceilings, one counter
53
53
 
54
- Read today's openai CLI-call count from the shared counter state at
55
- `~/.event4u/agent-config/cli-calls.json` (daily UTC reset — the same file
56
- the council's CLI transport maintains for
57
- `cli_call_budget.max_calls_per_day.openai`). Append one line:
54
+ Team mode and the council share **one** daily counter but enforce **two
55
+ independent ceilings** against it. The status output must show all three
56
+ live numbers and say which path — if any — is currently blocked:
57
+
58
+ 1. **Counter** — today's openai CLI-call count from the shared counter
59
+ state at `~/.event4u/agent-config/cli-calls.json` (daily UTC reset —
60
+ the same file the council's CLI transport maintains). `0` when the
61
+ file or today's entry is absent.
62
+ 2. **Team ceiling** — `ai_team.max_calls_per_day` from
63
+ `.agent-settings.yml` (`unset` when absent).
64
+ 3. **Council ceiling** — `cli_call_budget.max_calls_per_day.openai` from
65
+ the council config (`unset` when absent).
66
+
67
+ Render:
58
68
 
59
69
  ```
60
- Ledger: <N> openai CLI calls today (UTC) · cap: <max_calls_per_day or "unset">
70
+ Quota: <N> openai CLI calls today (UTC) — one shared counter
71
+ team ceiling (ai_team.max_calls_per_day): <T or "unset"> → <OPEN | BLOCKED>
72
+ council ceiling (cli_call_budget.max_calls_per_day.openai): <C or "unset"> → <OPEN | BLOCKED>
61
73
  ```
62
74
 
63
- - `<N>` = today's openai count from the counter file; `0` when the file or
64
- today's entry is absent.
65
- - `<cap>` = `ai_team.max_calls_per_day` when set; fall back to
66
- `cli_call_budget.max_calls_per_day.openai`; `unset` when neither exists.
75
+ - A path is `BLOCKED` when the counter has reached its ceiling
76
+ (`N >= ceiling`); an `unset` ceiling is `OPEN`.
77
+ - The two paths block **independently** — always name WHICH path is
78
+ blocked, never a bare "quota exhausted".
67
79
  - One counter, one subscription — never introduce a parallel team-only
68
80
  counting file.
69
81
 
82
+ **Worked example.** Council ceiling 100, team ceiling 50, counter at 45:
83
+ both paths are open. Five team calls later the shared counter reads 50 —
84
+ team calls are now `BLOCKED` (50 >= 50) while council CLI calls continue
85
+ until the counter reaches 100. Whichever path fires a call, the same
86
+ counter moves; each surface only enforces its own ceiling against that
87
+ shared count.
88
+
89
+ ### 5. Review-gate ledger lines (when present)
90
+
91
+ When the council events ledger contains review-gate lines of the form
92
+ `team.gate: BLOCK n/N`, render them verbatim after the quota block — they
93
+ record how often the plugin's Stop-hook Review Gate blocked, out of N gate
94
+ evaluations. Absent lines are not an error: print nothing (the review-gate
95
+ envelope is a later team-mode phase; this step is read-only forward
96
+ compatibility).
97
+
70
98
  ## Output format
71
99
 
72
100
  - The plugin's status output, verbatim.
73
- - Exactly one trailing `Ledger:` line in the format above.
101
+ - Exactly one trailing `Quota:` block in the format above (counter + both
102
+ ceilings + per-path OPEN/BLOCKED verdict).
103
+ - Any `team.gate: BLOCK n/N` ledger lines, verbatim, after the quota
104
+ block — only when present.
74
105
  - Gate failures print exactly one block (enable pointer or fail-closed
75
106
  block) and stop.
76
107
 
@@ -78,11 +109,11 @@ Ledger: <N> openai CLI calls today (UTC) · cap: <max_calls_per_day or "unset">
78
109
 
79
110
  - Do NOT run when `ai_team.enabled` is false — enable pointer, stop.
80
111
  - Do NOT fabricate a count when the counter file is unreadable — print
81
- `Ledger: unavailable (<reason>)` instead of a guessed number.
112
+ `Quota: unavailable (<reason>)` instead of a guessed number.
82
113
  - Do NOT write to `cli-calls.json` — the transport owns the counter; this
83
114
  wrapper is read-only.
84
115
  - Do NOT reimplement job tracking inline when the plugin is absent — fail
85
- closed with the doctor pointer (the ledger line alone is still printed on
116
+ closed with the doctor pointer (the quota block alone is still printed on
86
117
  non-Claude-Code hosts, per Step 2).
87
118
 
88
119
  ## See also
@@ -2,6 +2,7 @@
2
2
  model_tier: medium
3
3
  name: team-knowledge
4
4
  disable-model-invocation: true
5
+ argument-hint: "[consolidate|bootstrap]"
5
6
  pack: meta
6
7
  intent: "Manage the repo-tracked team-knowledge layer — consolidate typed observation events into agents/knowledge/ pages, bootstrap a project baseline"
7
8
  routes_to: [team-knowledge-consolidate, team-knowledge-bootstrap]
@@ -26,13 +27,14 @@ packs:
26
27
  Top-level orchestrator for the `/team-knowledge` family — the
27
28
  consolidation gate over the typed knowledge-observation events
28
29
  captured during normal task work (see
29
- [`knowledge-pages`](../templates/contexts/knowledge-pages.md) and the
30
- event schema in `src/scripts/_lib/knowledge_events.ts`).
30
+ [`knowledge-pages`](../../agent-src/templates/contexts/knowledge-pages.md)
31
+ and the event schema in `src/scripts/_lib/knowledge_events.ts`).
31
32
 
32
- Not to be confused with the pre-existing `/knowledge` cluster (local
33
- file ingestion into `agents/memory/knowledge/`) — different concern
34
- (arbitrary local documents), unrelated to this repo-tracked,
35
- lifecycle-typed team-knowledge layer under `agents/knowledge/`.
33
+ Not to be confused with the pre-existing [`/knowledge`](../../product-discovery/knowledge/command.md)
34
+ cluster (local file ingestion into `agents/memory/knowledge/`) — that
35
+ is a different concern (arbitrary local documents), unrelated to this
36
+ repo-tracked, lifecycle-typed team-knowledge layer under
37
+ `agents/knowledge/`.
36
38
 
37
39
  ## Sub-commands
38
40
 
@@ -2,13 +2,14 @@
2
2
  model_tier: inherit
3
3
  name: team
4
4
  disable-model-invocation: true
5
- pack: product-reasoning
5
+ argument-hint: "[review|adversarial|delegate|status] [args]"
6
+ pack: meta
6
7
  intent: "Route a cross-model team-mode request (review, adversarial, delegate, status) to the official plugin under ai_team governance"
7
8
  routes_to: [team-review, team-adversarial, team-delegate, team-status]
8
9
  replaces: []
9
10
  tier: 2
10
11
  visibility: internal
11
- description: Team orchestrator — cross-model depth review (one strong model builds, a second reviews the real diff); routes to review, adversarial, delegate, status
12
+ description: Team orchestrator — governed cross-model access layer (a second strong model reviews the real diff; read-only multi-host fallback); routes to review, adversarial, delegate, status
12
13
  cluster: team
13
14
  type: orchestrator
14
15
  suggestion:
@@ -18,25 +19,27 @@ suggestion:
18
19
  workspaces:
19
20
  - agent-config-maintainer
20
21
  packs:
21
- - product-reasoning
22
+ - meta
22
23
  ---
23
24
 
24
25
  # /team
25
26
 
26
- Top-level orchestrator for the `/team` family — governed **team mode**: the
27
- depth complement to the council. One strong model builds; a second strong
28
- model reviews the **real diff with repo access** and iterates. On Claude Code
29
- hosts every sub-command is a **thin delegation** to the official
27
+ Top-level orchestrator for the `/team` family — governed **team mode**: a
28
+ governed access layer with a read-only multi-host fallback, the depth
29
+ complement to the council. A second strong model reviews the **real diff
30
+ with repo access** and returns its findings. On Claude Code hosts every
31
+ sub-command is a **thin delegation** to the official
30
32
  `openai/codex-plugin-cc` plugin (`/codex:*`) — this family adds governance
31
33
  (default-off gate, delegate opt-in, quota visibility, fail-closed setup
32
- checks), never a reimplementation.
34
+ checks), never a reimplementation. An iterated build → review → fix loop is
35
+ **gated future work** — it unlocks only with a positive verdict from the
36
+ pre-registered benchmark (§ No-claims note).
33
37
 
34
38
  ## What team mode is — and is not
35
39
 
36
40
  - **Is:** a single strong reviewer running inside the working tree via the
37
- Codex CLI under the user's subscription. It reads git state itself,
38
- iterates build → review → fix, and returns an opinionated review of the
39
- actual change.
41
+ Codex CLI under the user's subscription. It reads git state itself and
42
+ returns an opinionated review of the actual change.
40
43
  - **Is not:** the council. The council is breadth under a neutrality
41
44
  contract — N members see the artefact text only, never the repo, never the
42
45
  host's framing. Team mode is the inverse on every axis (table below). The
@@ -46,7 +49,7 @@ checks), never a reimplementation.
46
49
 
47
50
  | Axis | `/council` | `/team` |
48
51
  |---|---|---|
49
- | Shape | Breadth — N members, one round by default | Depth — one strong reviewer, iterated |
52
+ | Shape | Breadth — N members, one round by default | Depth — one strong reviewer on the real diff |
50
53
  | Context | Artefact text only; never the repo, never host framing (neutrality contract) | Full repo access — the reviewer reads git state itself |
51
54
  | Cost model | Billable API members by default; USD cost gate | Subscription-authed Codex CLI; daily call quota (`cli_call_budget.max_calls_per_day.openai`) |
52
55
  | Model choice | Mid-tier default (cost decision) | Strongest available — `ai_team.model: 'auto'` defers to the CLI default |
@@ -79,7 +82,7 @@ a wrapper is invoked directly.
79
82
  | `/team review [--background]` | `/codex:review` | Cross-model review of the current working-tree / staged diff |
80
83
  | `/team adversarial <focus>` | `/codex:adversarial-review` | Adversarial cross-model review on a named focus — the escalation rung above the single-model `adversarial-review` skill |
81
84
  | `/team delegate <task>` | `/codex:rescue` | Hand a task to the second model as a native worker — the only write-access wrapper; gated behind `ai_team.allow_delegate` |
82
- | `/team status` | `/codex:status` + ledger line | Plugin job status plus today's `cli_call_budget` openai count |
85
+ | `/team status` | `/codex:status` + quota block | Plugin job status plus the shared openai counter against both ceilings (team + council), naming any blocked path |
83
86
 
84
87
  ## Dispatch
85
88
 
@@ -110,9 +113,11 @@ never an inline reimplementation of the plugin:
110
113
  > agent-config doctor --check team
111
114
  > ```
112
115
 
113
- On non-Claude-Code hosts the fallback transport (repo-diff bundle via the
114
- council's `OpenAICliClient`) is a later phase; until it lands, wrappers state
115
- that plainly and stop — same fail-closed principle.
116
+ On non-Claude-Code hosts the wrappers fall back to a **read-only** transport
117
+ (repo-diff bundle via the council's `OpenAICliClient`) — no plugin job
118
+ control, no background jobs, no delegate write path; the capability delta
119
+ vs. the native plugin is stated in the output. When the codex CLI itself is
120
+ absent, the same fail-closed principle applies: state it plainly and stop.
116
121
 
117
122
  ## No-claims note
118
123
 
@@ -9,6 +9,7 @@ sub: e2e-heal
9
9
  cluster: tests
10
10
  skills: [playwright-testing]
11
11
  description: Find, debug, and fix failing Playwright E2E tests
12
+ argument-hint: "[test-file | ci-run-url]"
12
13
  suggestion:
13
14
  eligible: true
14
15
  trigger_description: "fix the failing E2E tests, playwright tests are red"
@@ -9,6 +9,7 @@ sub: e2e-plan
9
9
  cluster: tests
10
10
  skills: [playwright-testing]
11
11
  description: Explore the application and create a structured E2E test plan in Markdown
12
+ argument-hint: "[url | feature-area]"
12
13
  suggestion:
13
14
  eligible: true
14
15
  trigger_description: "plan E2E tests for this feature, what should we cover in playwright"
@@ -8,6 +8,7 @@ cluster: tests
8
8
  sub: execute
9
9
  skills: [pest-testing, quality-tools]
10
10
  description: Run the project's test suite — stack-adaptive (pest / phpunit / vitest / jest / pytest / …)
11
+ argument-hint: "[file | filter] [--include-e2e] [--include-slow] [--php]"
11
12
  suggestion:
12
13
  eligible: true
13
14
  trigger_description: "run the tests, execute the test suite"
@@ -2,6 +2,7 @@
2
2
  model_tier: medium
3
3
  name: tests
4
4
  disable-model-invocation: true
5
+ argument-hint: "[create|execute|e2e-plan|e2e-heal] [args]"
5
6
  pack: engineering-base
6
7
  tier: 2
7
8
  visibility: internal
@@ -34,7 +35,7 @@ commands with a single entry point + sub-command dispatch.
34
35
  | `/tests e2e-heal` | `commands/tests/e2e-heal.md` | Find, debug, and fix failing Playwright E2E tests |
35
36
 
36
37
  Sub-command names match the locked contract in
37
- [`docs/contracts/command-clusters.md`](../../docs/contracts/command-clusters.md).
38
+ [`docs/contracts/command-clusters.md`](../docs/contracts/command-clusters.md).
38
39
  Both sub-commands resolve the runner via the
39
40
  [`toolchain-resolver`](../contexts/execution/toolchain-resolver.md) — they
40
41
  adapt to the consumer's stack instead of assuming one.
@@ -7,6 +7,7 @@ visibility: internal
7
7
  framework: laravel
8
8
  skills: [laravel-validation]
9
9
  description: "Sync the messages() method of a FormRequest class — add missing entries, link them to language keys, and clean up stale ones."
10
+ argument-hint: "[ClassName | file-path]"
10
11
  suggestion:
11
12
  eligible: true
12
13
  trigger_description: "sync the form request messages, update the validation messages"
@@ -6,6 +6,7 @@ tier: 2
6
6
  visibility: internal
7
7
  skills: [upstream-contribute, skill-writing, learning-to-rule-or-skill]
8
8
  description: Contribute a learning, skill, rule, or fix from a consumer project back to the shared agent-config package
9
+ argument-hint: "[path | description]"
9
10
  suggestion:
10
11
  eligible: true
11
12
  trigger_description: "contribute this back to agent-config, upstream this learning"
@@ -7,6 +7,7 @@ visibility: internal
7
7
  cluster: video
8
8
  sub: from-script
9
9
  description: Drive a script end-to-end through the AI video pipeline — scenes → blueprint → image → operator pick → motion → video → stitch. Preview default; --mode commit spends behind the cost gate.
10
+ argument-hint: "<path-to-script.md> [--mode preview|commit] [--max-spend-usd <usd>] [--image-provider <id>] [--video-provider <id>]"
10
11
  personas: [hollywood-director, ai-video-technical-director]
11
12
  skills: [scene-expander, video-director, pixar-storyteller, character-consistency, motion-choreographer]
12
13
  suggestion:
@@ -146,8 +147,8 @@ cost (commit) or summed modeled `cost_estimate` labeled *modeled*
146
147
  - **One project per invocation.** Re-running on the same project
147
148
  resumes from existing artefacts (skips completed scenes) via the
148
149
  ADR-059 resume scan: `scripts/ai-video/lib/resume-scan.sh scan
149
- <project> --plan <project>/plan.json` — `green` reused, `stale` /
150
- `missing` re-render, `failed` surfaces its `error.json`. State =
150
+ <project> --plan <project>/plan.json` — `green` is reused, `stale` /
151
+ `missing` re-render, `failed` surfaces its `error.json`. State is the
151
152
  per-scene sentinel set (`prompt.json` with `input_sha256`, the clip,
152
153
  `error.json`, `cost.json`) — no central checkpoint file.
153
154
 
@@ -7,6 +7,7 @@ visibility: internal
7
7
  cluster: video
8
8
  sub: from-song
9
9
  description: Music-video from a song + reference images — accept or derive a timed scene script, optional character-lock, render, stitch, mux song as master track. Preview default; --mode commit gates the spend.
10
+ argument-hint: "<images-dir> <song-file> [--mode preview|commit] [--brief <text>|--auto-script] [--max-spend-usd <usd>]"
10
11
  personas: [hollywood-director, ai-video-technical-director]
11
12
  skills: [song-to-script, scene-expander, video-director, character-consistency, motion-choreographer, prompt-validator]
12
13
  suggestion:
@@ -61,7 +62,7 @@ silent best-guess.
61
62
  | Input | Required | Meaning |
62
63
  |---|---|---|
63
64
  | `<images-dir>` | yes | Folder of reference stills (`.png` / `.jpg`). When they contain a consistent human subject the on-screen identity is locked from them; otherwise the run is style-only (Step 6). |
64
- | `<song-file>` | yes | Audio track (`.mp3` / `.wav` / `.m4a`) — or an `https://` song link (Suno / Udio / YouTube / any yt-dlp-supported page): ingested to a local file first via `scripts/ai-video/lib/ingest-song.sh <url> <project>` (operator-installed `yt-dlp` + `ffmpeg`; rights note surfaced; size-capped; never a silent overwrite); pipeline continues on `<project>/song.m4a`. Defines total duration and, in `--auto-script` mode, the scene structure. |
65
+ | `<song-file>` | yes | Audio track (`.mp3` / `.wav` / `.m4a`) — or an `https://` song link (Suno / Udio / YouTube / any yt-dlp-supported page): the link is ingested to a local file first via `scripts/ai-video/lib/ingest-song.sh <url> <project>` (operator-installed `yt-dlp` + `ffmpeg`; rights note surfaced; size-capped; never a silent overwrite) and the pipeline continues on `<project>/song.m4a`. Defines total duration and, in `--auto-script` mode, the scene structure. |
65
66
  | `--brief "<text>"` | one of brief/auto | Operator-written description of the video (mood, story, settings). |
66
67
  | `--auto-script` | one of brief/auto | Derive the script from the song via the `song-to-script` skill. |
67
68
  | `--scene-durations <list>` | no | Manual cut points (e.g. `0:00-0:15,0:15-0:30,…`). Overrides probe timing — the honest path when the track is flat (probe `method: interval`). |
@@ -95,28 +96,28 @@ with usage, never a deadlocked prompt.
95
96
 
96
97
  - `<images-dir>` exists and holds ≥1 `.png`/`.jpg`. Empty or missing →
97
98
  halt, list what was found.
98
- - `<song-file>` given as an `https://` link → ingest first:
99
+ - `<song-file>` given as an `https://` link → ingest it first:
99
100
  `scripts/ai-video/lib/ingest-song.sh <url> <project>` (exit 3 names
100
- the missing tool; exit 75 = retryable download failure). The ingested
101
- local file replaces the URL for every later step — ground truth stays
102
- the real bytes, and the media-governance gate below runs on the
103
- ingested file (a platform link is *more* likely a recognisable
104
- commercial song — check `voice-cloning` deliberately).
101
+ the missing tool; exit 75 is a retryable download failure). The
102
+ ingested local file replaces the URL for every later step — ground
103
+ truth stays the real bytes, and the media-governance gate below runs
104
+ on the ingested file (a platform link is *more* likely to be a
105
+ recognisable commercial song — check `voice-cloning` deliberately).
105
106
  - `<song-file>` exists and is a readable audio container (`ffprobe`
106
107
  returns an audio stream). Derive its length + structure now,
107
108
  **adapter-first with the probe as the floor** (fallback semantics per
108
109
  [`audio-adapter-contract.md § Fallback`](../../../scripts/ai-video/lib/audio-adapter-contract.md)):
109
- 1. An `audio-analysis` provider configured in `agents/.ai-video.xml`
110
+ 1. An `audio-analysis` provider is configured in `agents/.ai-video.xml`
110
111
  **and** `scripts/ai-video/audio-adapters/<id>.sh` exists → run
111
112
  ```bash
112
113
  echo '{"audio_path":"<song-file>"}' | scripts/ai-video/audio-adapters/<id>.sh analyze
113
114
  ```
114
115
  Real `{bpm, beats, downbeats, sections:[{start,end,label}]}` drives
115
- the cut; report names the `source`. **Transient** failure (exit 75)
116
- → retry once, then fall back to the probe with ONE warning line.
117
- **Config** failure (exit 3/6/7 — CLI missing, disabled, bad key) →
118
- **halt with the actionable message** — a configured adapter never
119
- silently degrades.
116
+ the cut; the report names the `source`. On a **transient** failure
117
+ (exit 75) retry once, then fall back to the probe with ONE warning
118
+ line. On a **config** failure (exit 3/6/7 — CLI missing, disabled,
119
+ bad key) **halt with the actionable message** — a configured
120
+ adapter never silently degrades.
120
121
  2. No audio-analysis provider configured → run the zero-dependency
121
122
  probe (the normal path, not a degradation):
122
123
  ```bash
@@ -224,7 +225,7 @@ When the track has vocals **and** the run assigns singers / lip-sync:
224
225
  scripts/ai-video/lib/validate-vocal-map.sh <project>/vocal-map.json \
225
226
  <project>/transcript.json --roster "<cast>"
226
227
  ```
227
- — mechanically rejects re-timed lines, lyrics absent from the
228
+ — it mechanically rejects re-timed lines, lyrics absent from the
228
229
  transcript, and missing singers (exit 7 with the offending line). A
229
230
  skeleton-derived map cannot reach the operator, let alone a render.
230
231
  3. **Each vocal line maps to its OWN singer.** Never put one character's
@@ -363,20 +364,20 @@ Before rendering, run the mechanical scan:
363
364
  scripts/ai-video/lib/resume-scan.sh scan <project> --plan <project>/plan.json
364
365
  ```
365
366
 
366
- `plan.json` holds each scene's current `input_sha256`
367
+ where `plan.json` holds each scene's current `input_sha256`
367
368
  (`resume-scan.sh hash < scenes/<id>/prompt.json` — same canonicalization
368
- the render path stamps). `green` scenes skipped verbatim; `stale`
369
- (prompt edited, provider/model switched, hash tampered) + `missing`
370
- re-render; `failed` surfaces its `error.json` reason. After each live
371
- scene completes, write `scenes/<id>/cost.json`
369
+ the render path stamps). `green` scenes are skipped verbatim; `stale`
370
+ (prompt edited, provider/model switched, hash tampered) and `missing`
371
+ scenes re-render; `failed` scenes surface their `error.json` reason.
372
+ After each live scene completes, write `scenes/<id>/cost.json`
372
373
  (`{charged_usd, adapter, model}`, atomic `tmp`+`mv`) — the scan sums it
373
374
  as `spent_usd` and the batch loop re-checks `--max-spend-usd` against it
374
375
  before **every** live submit, not only at the upfront gate. Per-scene
375
376
  kill-switch (ADR-059 §6): max one surfaced auto-retry on
376
- `retryable: true`; content-policy refusals always halt. Rollback =
377
+ `retryable: true`, content-policy refusals always halt. Rollback is
377
378
  deletion (`rm -rf scenes/<id>/` → re-render); `--clean`
378
379
  (`resume-scan.sh clean <project>`) removes failed-scene residue only —
379
- green artifacts never auto-deleted.
380
+ green artifacts are never auto-deleted.
380
381
 
381
382
  ### 9. Stitch + master-audio mux + duration reconciliation
382
383
 
@@ -7,6 +7,7 @@ visibility: internal
7
7
  cluster: video
8
8
  sub: scene
9
9
  description: Render a single scene from a one-line idea — scene-expander → blueprint → image → operator pick → motion → video. Preview mode default (no spend); --mode commit renders live behind the cost gate.
10
+ argument-hint: "<idea> [--mode preview|commit] [--image-provider <id>] [--video-provider <id>] [--project <slug>]"
10
11
  personas: [hollywood-director, ai-video-technical-director]
11
12
  skills: [scene-expander, video-director, character-consistency, motion-choreographer]
12
13
  suggestion:
@@ -7,6 +7,7 @@ visibility: internal
7
7
  cluster: video
8
8
  sub: stitch
9
9
  description: Re-stitch existing clips in `<project>/scenes/*/` after operator edits — no re-render. ffmpeg concat driven by manifest.json.
10
+ argument-hint: "<project-slug> [--skip-scene <id>] [--continue]"
10
11
  personas: [ai-video-technical-director]
11
12
  skills: []
12
13
  suggestion:
@@ -86,4 +87,4 @@ No live cost (no network calls happened). No commit. No push.
86
87
  - [`/video:from-script`](from-script.md) — full pipeline including
87
88
  initial stitch
88
89
  - [`/video:scene`](scene.md) — render one scene
89
- - [`scripts/ai-video/stitch.sh`](../../scripts/ai-video/stitch.sh) — the underlying tool
90
+ - [`scripts/ai-video/stitch.sh`](../../../scripts/ai-video/stitch.sh) — the underlying tool
@@ -7,6 +7,7 @@ visibility: internal
7
7
  cluster: video
8
8
  sub: storyboard
9
9
  description: Image-only storyboard — script → scenes → blueprint → image render → contact-sheet PNG via ffmpeg montage. No video calls.
10
+ argument-hint: "<path-to-script.md> [--image-provider <id>]"
10
11
  personas: [hollywood-director]
11
12
  skills: [scene-expander, video-director, character-consistency]
12
13
  suggestion:
@@ -6,6 +6,7 @@ tier: 2
6
6
  visibility: internal
7
7
  cluster: video
8
8
  description: Video-creation orchestrator — Hollywood-level AI video pipeline. Routes to from-script, from-song, scene, storyboard, stitch.
9
+ argument-hint: "[from-script|from-song|scene|storyboard|stitch] [args]"
9
10
  type: orchestrator
10
11
  suggestion:
11
12
  eligible: true
@@ -9,6 +9,7 @@ tier: 0
9
9
  visibility: visible
10
10
  skills: [refine-prompt, command-routing]
11
11
  description: Drive a free-form prompt end-to-end through refine → score → plan → implement → test → verify → report — Option-A loop over the `work_engine` engine, confidence-band gated, no auto-git.
12
+ argument-hint: "[prompt]"
12
13
  suggestion:
13
14
  eligible: true
14
15
  trigger_description: "build this, implement this, drive this end-to-end"
@@ -8,6 +8,7 @@ cluster: worktree
8
8
  sub: cleanup
9
9
  skills: [worktree-lifecycle, git-workflow]
10
10
  description: Safe worktree removal gate — refuses while the branch holds commits on no other ref; never force-deletes
11
+ argument-hint: "[worktree-path]"
11
12
  suggestion:
12
13
  eligible: true
13
14
  trigger_description: "clean up the worktrees, remove the finished worktree"
@@ -41,8 +42,8 @@ untracked files, paths with spaces — `tests/scripts/worktree_cleanup_check.tes
41
42
  ./scripts-run src/scripts/worktree_cleanup_check check <worktree-path>
42
43
  ```
43
44
 
44
- Exit `0` → removal allowed. Exit `1` → **refuse** that candidate; output
45
- names the exact gate:
45
+ Exit `0` → removal allowed. Exit `1` → **refuse** that candidate; the
46
+ output names the exact gate:
46
47
 
47
48
  1. **Detached HEAD** — no branch to judge reachability for; resolve the
48
49
  state manually first.
@@ -50,11 +51,11 @@ names the exact gate:
50
51
  files count as work). Never `git worktree remove --force`.
51
52
  3. **Unique commits** — commits reachable from the worktree branch but
52
53
  from no other ref (branches, remotes, AND tags — a tag counts as
53
- reachability). Branch holds work that exists nowhere else: surface
54
- the commit list and hand the decision back — dropping commits the
55
- session did not author is forbidden by the `git-history-discipline`
56
- rule (shared-branch Iron Law); merging or preserving them is the
57
- user's call.
54
+ reachability). The branch holds work that exists nowhere else:
55
+ surface the commit list and hand the decision back — dropping
56
+ commits the session did not author is forbidden by the
57
+ `git-history-discipline` rule (shared-branch Iron Law); merging or
58
+ preserving them is the user's call.
58
59
 
59
60
  ### 3. Remove the allowed candidates
60
61
 
@@ -8,6 +8,7 @@ cluster: worktree
8
8
  sub: create
9
9
  skills: [worktree-lifecycle, using-git-worktrees]
10
10
  description: Create a governed worktree and write its scope-lock note — propose-once branch naming, host-native primitive preferred
11
+ argument-hint: "[task] [branch-name]"
11
12
  suggestion:
12
13
  eligible: true
13
14
  trigger_description: "do this in a worktree, isolate this task, spawn a worktree for X"
@@ -8,6 +8,7 @@ cluster: worktree
8
8
  sub: verify
9
9
  skills: [worktree-lifecycle, verify-completion-evidence]
10
10
  description: Run the scoped verification for a worktree's declared change — narrow probes matched to the diff, never the full CI pipeline
11
+ argument-hint: "[worktree-path | branch]"
11
12
  suggestion:
12
13
  eligible: true
13
14
  trigger_description: "verify the worktree change, prove this worktree is ready"
@@ -2,6 +2,7 @@
2
2
  model_tier: medium
3
3
  name: worktree
4
4
  disable-model-invocation: true
5
+ argument-hint: "[create|status|verify|cleanup] [args]"
5
6
  pack: engineering-base
6
7
  tier: 2
7
8
  visibility: internal
@@ -14,13 +14,15 @@ triggers:
14
14
  - keyword: "upgrade"
15
15
  - keyword: "cleanup"
16
16
  - keyword: "technical debt"
17
+ routes_to:
18
+ - "guideline:agent-infra/active-remediation-mechanics"
17
19
  workspaces: [engineering]
18
20
  packs: [engineering-base]
19
21
  ---
20
22
 
21
23
  # Active Remediation
22
24
 
23
- The user doesn't see the code at the spot you're editing — you do. So this package guides the agent to **actively improve** what it touches: don't accept legacy, debt, security gaps, or duplication as given. But active improvement is bounded — never the scope creep `minimal-safe-diff` exists to stop. The rule is a **ladder**: act by size and alignment, and **never silently ignore** a real issue.
25
+ The user does not see the code at the spot you are editing — you do. So this package guides the agent to **actively improve** what it touches: don't accept legacy, debt, security gaps, or duplication as given. But active improvement is bounded — it must never become the scope creep `minimal-safe-diff` exists to stop. The rule is a **ladder**: act by size and alignment, and **never silently ignore** a real issue.
24
26
 
25
27
  ## The Iron Law
26
28
 
@@ -34,44 +36,15 @@ A LIVE SECURITY / DATA-EXPOSURE GAP IS NEVER MERELY "NOTED FOR LATER".
34
36
 
35
37
  ## What to remediate
36
38
 
37
- Security gaps (broken access control, injection, secrets, missing authz — see `broken-access-control`) · missing/weak test coverage · bad code (dead code, silent error-swallow, unguarded edge cases) · **duplication** (same/near-same logic repeated instead of one method/abstraction) · **stale version-idioms** (code for an older language/framework version than the project runs).
39
+ Security gaps (broken access control, injection, secrets, missing authz — see `broken-access-control`) · missing/weak test coverage · bad code (dead code, silent error-swallow, unguarded edge cases) · **duplication** (the same or near-same logic repeated instead of one method/abstraction) · **stale version-idioms** (code written for an older language/framework version than the project actually runs).
38
40
 
39
- ## The ladder — classify, then act
41
+ ## The ladder — three tiers
40
42
 
41
- ### Fix now (autonomous, inline) — a bounded amendment to `minimal-safe-diff`
42
-
43
- Allowed **only** when ALL hold — the testable "small + task-aligned" definition:
44
- - **Same request path / module** as the current task (not an unrelated feature).
45
- - **≤ ~10 changed lines** in one production file plus its test file — no wider cross-file ripple.
46
- - **No public-API / response-shape change**, no new parameter.
47
- - **No dependency bump, no migration, no data change.**
48
- - **Its verification ships in the same commit** — the security fix's negative test, the correctness fix's case.
49
-
50
- Under those constraints the fix is auditable in the same diff and is *not* scope creep — it corrects a boundary the agent touched. Anything outside them → **note + ask**, never auto. (`minimal-safe-diff` still governs the rest: no reformatting, no opportunistic refactor, no drive-by rename.)
51
-
52
- ### Note + ask (batched)
53
-
54
- Bigger, or diverges from the task → do **not** refactor inline, do **not** interrupt the flow. Note the site (file:line + issue). Surface the batch as **one** numbered-options prompt (`user-interaction`, one recommendation line) **after the task is delivered** — or mid-work only when the flow makes it natural. Each option carries a real trade-off (`no-cheap-questions`). Refactor only on an explicit yes, as a separate scoped change (`scope-control`, `downstream-changes`).
55
-
56
- ### Propose a follow-up PR (many spots)
57
-
58
- Too many to fold in without blowing the current diff's scope → propose **one or more separate follow-up PRs** (or a roadmap under `agents/roadmaps/`, using the shared-prefix convention) so the user reviews before merge. Creating the PR/roadmap is **permission-gated** — propose, get a yes, then create (`scope-control`, `commit-policy`).
59
-
60
- ## Version-gated modernization
61
-
62
- Update stale idioms to the version the project **actually runs** — only when that version is **verified**:
63
- - **Establish the version first** from the manifest constraint (`composer.json` `require`, `package.json` `engines`, `.tool-versions`, lockfile) — use the **lowest** bound; on an ambiguous/monorepo range, ask once. **Unknown version → do not touch** (must fit the project structure — the `source-discovery` gate).
64
- - **Syntax-only, behavior-preserving idioms** (e.g. `array()` → `[]`, `isset($x)?$x:$d` → `$x ?? $d`, concat → template) provably equivalent → treat as a small fix (auto per the ladder).
65
- - **Behavioral changes** (`readonly`/typed properties, new semantics) and **any dependency/version bump** → **ask only**, never auto (a version bump stays under `minimal-safe-diff`'s no-dependency-bump prohibition; a pure syntax idiom is categorically different).
43
+ **Fix now** — small + task-aligned; ALL five conditions hold: same request path/module · ≤ ~10 changed lines in one production file (plus its test file) · no public-API / response-shape change · no dependency bump, no migration · verification ships in the same commit. Anything outside → next tier. · **Note + ask** (batched, one numbered-options prompt after delivery) · **Follow-up PR** (many spots; creation stays permission-gated). Per-tier criteria + version-gated modernization + guardrails: the mechanics guideline below.
66
44
 
67
45
  ## Live-security carve-out (priority)
68
46
 
69
- A **live cross-user / cross-tenant data exposure** (`broken-access-control`) is not "note for later": a potential GDPR-notifiable breach (Art. 33, 72 h from discovery). Meets the fix-now bar → fix now with its negative test. Otherwise → **stop and surface it immediately** (a safety surface, visible even under an autonomous mandate — like the `no-pr-progress-comments` safety carve-out). Never defer silently, never look away.
70
-
71
- ## Guardrails — don't become a nagging machine
72
-
73
- - Subordinate to `no-cheap-questions` (self-check items 3 & 14 — real trade-off, not a disguised continuation/commit ask), `autonomous-execution` (the end-of-session batch must not read as "shall I continue?"), `user-interaction`, `ask-when-uncertain` (one batched prompt = one question).
74
- - Threshold to surface at all: a **real, nameable** improvement with concrete benefit. Cosmetic nitpicks with no trade-off → drop silently. The live-security carve-out is the only case that interrupts or overrides autonomy.
47
+ A **live cross-user / cross-tenant data exposure** (per `broken-access-control`) is not a "note for later": it is a potential GDPR-notifiable breach (Art. 33, 72 h from discovery). If it meets the fix-now bar → fix it now with its negative test. If not → **stop and surface it immediately** (a safety surface, visible even under an autonomous mandate — like the `no-pr-progress-comments` safety carve-out). Never defer it silently, never look away.
75
48
 
76
49
  ## When it fires
77
50
 
@@ -79,12 +52,15 @@ While implementing/modifying code you pass an issue outside the literal task. Al
79
52
 
80
53
  ## When NOT to fire
81
54
 
82
- - No issue spotted. Prose/docs-only. User fenced the scope ("just this one line").
55
+ - No issue spotted. Prose/docs-only. The user fenced the scope ("just this one line").
83
56
  - The issue is the task itself — then it's just the task (no ladder needed).
84
57
 
58
+ Body migrated to [`guideline:agent-infra/active-remediation-mechanics`](../docs/guidelines/agent-infra/active-remediation-mechanics.md) (per P4 of `road-to-kernel-and-router.md`) — per-tier fix-now/note+ask/follow-up-PR criteria, version-gated modernization, anti-nagging guardrails.
59
+ Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
60
+
85
61
  ## See also
86
62
 
87
- - [`minimal-safe-diff`](minimal-safe-diff.md) — the carve-out above is bounded by it; everything outside the five conditions stays note+ask.
63
+ - [`minimal-safe-diff`](minimal-safe-diff.md) — the fix-now carve-out is bounded by it; everything outside the five conditions stays note+ask.
88
64
  - [`broken-access-control`](broken-access-control.md) — the security category + the live-exposure carve-out.
89
65
  - [`prefer-enums-over-literals`](prefer-enums-over-literals.md) — an instance of this ladder (enum literals).
90
66
  - [`source-discovery-gate`](source-discovery-gate.md) — establishing the verified project version before modernizing.