@event4u/agent-config 2.24.0 → 2.26.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 (161) hide show
  1. package/.agent-src/commands/bug-fix.md +1 -0
  2. package/.agent-src/commands/create-pr/description-only.md +39 -11
  3. package/.agent-src/commands/create-pr.md +59 -5
  4. package/.agent-src/commands/feature/roadmap.md +2 -2
  5. package/.agent-src/commands/fix/seeder.md +3 -2
  6. package/.agent-src/commands/memory/add.md +3 -3
  7. package/.agent-src/commands/module/create.md +1 -0
  8. package/.agent-src/commands/module/explore.md +10 -6
  9. package/.agent-src/commands/onboard.md +9 -1
  10. package/.agent-src/commands/optimize/augmentignore.md +52 -20
  11. package/.agent-src/commands/optimize/rtk.md +56 -30
  12. package/.agent-src/commands/package-test.md +86 -10
  13. package/.agent-src/commands/quality-fix.md +49 -27
  14. package/.agent-src/commands/update-form-request-messages.md +2 -1
  15. package/.agent-src/commands/video/from-script.md +5 -5
  16. package/.agent-src/commands/video/storyboard.md +1 -1
  17. package/.agent-src/contexts/augment-infrastructure.md +4 -7
  18. package/.agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +1 -1
  19. package/.agent-src/contexts/contracts/research-schema.md +1 -1
  20. package/.agent-src/contexts/execution/interrupt-examples.md +34 -0
  21. package/.agent-src/contexts/execution/roadmap-process-loop.md +69 -14
  22. package/.agent-src/contexts/skills-and-commands.md +2 -2
  23. package/.agent-src/personas/README.md +3 -2
  24. package/.agent-src/personas/ai-video-technical-director.md +2 -2
  25. package/.agent-src/personas/hollywood-director.md +3 -3
  26. package/.agent-src/profiles/content_creator.yml +5 -0
  27. package/.agent-src/rules/architecture.md +24 -10
  28. package/.agent-src/rules/artifact-drafting-protocol.md +6 -0
  29. package/.agent-src/rules/augment-edit-discipline.md +28 -0
  30. package/.agent-src/rules/augment-source-of-truth.md +2 -2
  31. package/.agent-src/rules/autonomous-execution.md +31 -0
  32. package/.agent-src/rules/context-hygiene.md +1 -1
  33. package/.agent-src/rules/domain-adoption-policy.md +4 -5
  34. package/.agent-src/rules/domain-safety-disclaimer.md +114 -0
  35. package/.agent-src/rules/domain-safety-pii.md +142 -0
  36. package/.agent-src/rules/domain-safety-retention.md +86 -0
  37. package/.agent-src/rules/downstream-changes.md +4 -4
  38. package/.agent-src/rules/framework-neutrality-in-generic-skills.md +130 -0
  39. package/.agent-src/rules/git-history-discipline.md +99 -0
  40. package/.agent-src/rules/media-governance-routing.md +82 -0
  41. package/.agent-src/rules/minimal-safe-diff.md +6 -0
  42. package/.agent-src/rules/no-roadmap-references.md +4 -2
  43. package/.agent-src/rules/persona-governance.md +90 -0
  44. package/.agent-src/rules/provider-lifecycle-discipline.md +75 -0
  45. package/.agent-src/rules/roadmap-ci-steps-policy.md +145 -0
  46. package/.agent-src/rules/roadmap-progress-sync.md +11 -5
  47. package/.agent-src/rules/user-interrupt-priority.md +46 -0
  48. package/.agent-src/rules/verify-before-complete.md +11 -2
  49. package/.agent-src/skills/adversarial-review/SKILL.md +1 -1
  50. package/.agent-src/skills/ai-council/SKILL.md +1 -0
  51. package/.agent-src/skills/api-endpoint/SKILL.md +58 -154
  52. package/.agent-src/skills/api-testing/SKILL.md +11 -0
  53. package/.agent-src/skills/character-consistency/SKILL.md +12 -1
  54. package/.agent-src/skills/code-refactoring/SKILL.md +36 -30
  55. package/.agent-src/skills/code-review/SKILL.md +41 -36
  56. package/.agent-src/skills/context-authoring/SKILL.md +1 -1
  57. package/.agent-src/skills/dashboard-design/SKILL.md +1 -2
  58. package/.agent-src/skills/database/SKILL.md +8 -3
  59. package/.agent-src/skills/dependency-upgrade/SKILL.md +65 -19
  60. package/.agent-src/skills/developer-like-execution/SKILL.md +25 -14
  61. package/.agent-src/skills/eloquent/SKILL.md +1 -1
  62. package/.agent-src/skills/feature-planning/SKILL.md +1 -1
  63. package/.agent-src/skills/file-editor/SKILL.md +45 -19
  64. package/.agent-src/skills/finishing-a-development-branch/SKILL.md +2 -2
  65. package/.agent-src/skills/git-workflow/SKILL.md +135 -2
  66. package/.agent-src/skills/laravel-api-endpoint/SKILL.md +187 -0
  67. package/.agent-src/skills/{dto-creator → laravel-dto}/SKILL.md +5 -4
  68. package/.agent-src/skills/{migration-creator → laravel-migration}/SKILL.md +11 -10
  69. package/.agent-src/skills/laravel-reverb/SKILL.md +3 -3
  70. package/.agent-src/skills/{websocket → laravel-websocket}/SKILL.md +4 -3
  71. package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +1 -1
  72. package/.agent-src/skills/merge-conflicts/SKILL.md +49 -17
  73. package/.agent-src/skills/migration-architect/SKILL.md +6 -6
  74. package/.agent-src/skills/module-management/SKILL.md +1 -0
  75. package/.agent-src/skills/motion-choreographer/SKILL.md +12 -0
  76. package/.agent-src/skills/multi-tenancy/SKILL.md +15 -8
  77. package/.agent-src/skills/pest-testing/SKILL.md +18 -0
  78. package/.agent-src/skills/php-debugging/SKILL.md +28 -0
  79. package/.agent-src/skills/php-service/SKILL.md +3 -3
  80. package/.agent-src/skills/pixar-storyteller/SKILL.md +19 -6
  81. package/.agent-src/skills/playwright-testing/SKILL.md +16 -1
  82. package/.agent-src/skills/project-analyzer/SKILL.md +68 -42
  83. package/.agent-src/skills/readme-writing-package/SKILL.md +94 -23
  84. package/.agent-src/skills/roadmap-management/SKILL.md +1 -1
  85. package/.agent-src/skills/roadmap-writing/SKILL.md +10 -0
  86. package/.agent-src/skills/rtk-output-filtering/SKILL.md +23 -8
  87. package/.agent-src/skills/rule-refactor/SKILL.md +145 -0
  88. package/.agent-src/skills/rule-writing/SKILL.md +34 -8
  89. package/.agent-src/skills/scene-expander/SKILL.md +22 -7
  90. package/.agent-src/skills/security/SKILL.md +38 -29
  91. package/.agent-src/skills/skill-reviewer/SKILL.md +1 -1
  92. package/.agent-src/skills/test-driven-development/SKILL.md +4 -4
  93. package/.agent-src/skills/test-performance/SKILL.md +6 -5
  94. package/.agent-src/skills/verify-completion-evidence/SKILL.md +24 -27
  95. package/.agent-src/skills/video-director/SKILL.md +13 -0
  96. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  97. package/.agent-src/templates/copilot-instructions.md +2 -2
  98. package/.agent-src/templates/roadmaps.md +16 -0
  99. package/.agent-src/templates/rule.md +2 -2
  100. package/.claude-plugin/marketplace.json +6 -4
  101. package/AGENTS.md +1 -1
  102. package/CHANGELOG.md +80 -133
  103. package/README.md +6 -4
  104. package/config/agent-settings.template.yml +26 -0
  105. package/docs/architecture.md +2 -2
  106. package/docs/archive/CHANGELOG-pre-2.25.0.md +191 -0
  107. package/docs/catalog.md +20 -12
  108. package/docs/contracts/file-ownership-matrix.json +588 -90
  109. package/docs/contracts/kernel-membership.md +17 -0
  110. package/docs/contracts/provider-lifecycle.md +122 -0
  111. package/docs/contracts/smoke-contracts.md +8 -8
  112. package/docs/decisions/ADR-011-domain-pack-readiness.md +213 -0
  113. package/docs/decisions/INDEX.md +1 -0
  114. package/docs/getting-started-by-role.md +10 -0
  115. package/docs/getting-started.md +1 -1
  116. package/docs/guidelines/php/api-design.md +1 -1
  117. package/docs/guidelines/php/controllers.md +1 -1
  118. package/docs/guidelines/php/resources.md +1 -1
  119. package/docs/guidelines/php/validations.md +1 -1
  120. package/docs/personas.md +73 -26
  121. package/docs/profiles.md +9 -4
  122. package/package.json +1 -1
  123. package/scripts/_tmp_scan_framework_leakage.py +119 -0
  124. package/scripts/ai-video/adapters/gemini-veo.sh +5 -0
  125. package/scripts/ai-video/adapters/higgsfield.sh +6 -0
  126. package/scripts/ai-video/adapters/kling.sh +5 -0
  127. package/scripts/ai-video/adapters/openai-images.sh +5 -0
  128. package/scripts/ai-video/adapters/sora.sh +6 -0
  129. package/scripts/build_linear_digest.py +0 -1
  130. package/scripts/check_portability.py +6 -0
  131. package/scripts/lint_framework_leakage.py +348 -0
  132. package/scripts/lint_framework_leakage_allowlist.json +476 -0
  133. package/scripts/lint_media_policy_linkage.py +140 -0
  134. package/scripts/lint_persona_governance.py +164 -0
  135. package/scripts/lint_roadmap_ci_steps.py +182 -0
  136. package/scripts/measure_augment_budget.py +6 -0
  137. package/scripts/schemas/command.schema.json +5 -0
  138. package/scripts/schemas/skill.schema.json +5 -0
  139. package/scripts/skill_linter.py +60 -7
  140. package/scripts/smoke/kernel.sh +4 -4
  141. package/scripts/smoke/router.sh +2 -2
  142. package/scripts/smoke/schema.sh +1 -1
  143. package/.agent-src/personas/pixar-storyboard-artist.md +0 -98
  144. package/.agent-src/rules/agent-docs.md +0 -20
  145. package/.agent-src/rules/augment-portability.md +0 -23
  146. package/.agent-src/rules/capture-learnings.md +0 -19
  147. package/.agent-src/rules/docs-sync.md +0 -20
  148. package/.agent-src/rules/domain-safety-disclaimer-consulting.md +0 -52
  149. package/.agent-src/rules/domain-safety-disclaimer-financial.md +0 -54
  150. package/.agent-src/rules/domain-safety-disclaimer-legal.md +0 -49
  151. package/.agent-src/rules/domain-safety-disclaimer-medical.md +0 -56
  152. package/.agent-src/rules/domain-safety-export-redact.md +0 -65
  153. package/.agent-src/rules/domain-safety-logging-pii-floor.md +0 -55
  154. package/.agent-src/rules/domain-safety-pii-finance.md +0 -57
  155. package/.agent-src/rules/domain-safety-pii-marketing.md +0 -60
  156. package/.agent-src/rules/domain-safety-pii-recruiting.md +0 -56
  157. package/.agent-src/rules/domain-safety-pii-support.md +0 -57
  158. package/.agent-src/rules/domain-safety-retention-finance.md +0 -48
  159. package/.agent-src/rules/domain-safety-retention-support.md +0 -55
  160. package/.agent-src/rules/e2e-testing.md +0 -19
  161. package/.agent-src/rules/no-unsolicited-rebase.md +0 -107
@@ -0,0 +1,130 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "2a"
4
+ description: "When editing a generic skill/rule/command — block single-stack mandates; use language-agnostic procedures with carve-out pointers."
5
+ source: package
6
+ triggers:
7
+ - path_prefix: ".agent-src.uncompressed/skills/"
8
+ - path_prefix: ".agent-src.uncompressed/rules/"
9
+ - path_prefix: ".agent-src.uncompressed/commands/"
10
+ - keyword: "FormRequest"
11
+ - keyword: "PHPStan"
12
+ - keyword: "php artisan"
13
+ - keyword: "composer.json"
14
+ - keyword: "Eloquent"
15
+ - keyword: "Pest"
16
+ - keyword: "Blade"
17
+ - keyword: "vendor/bin"
18
+ - keyword: "Artisan"
19
+ - keyword: "Rector"
20
+ - phrase: "every controller"
21
+ - phrase: "all controllers"
22
+ - phrase: "generic skill"
23
+ applies_to_user_types:
24
+ - "maintainer"
25
+ validator_ignore:
26
+ - type: "substring"
27
+ pattern: ".agent-src.uncompressed/"
28
+ reason: "Rule's subject is generic artifacts under .agent-src.uncompressed/; every body link points there by design."
29
+ - type: "substring"
30
+ pattern: "scripts/lint_framework_leakage"
31
+ reason: "Rule cites the enforcing linter script by name in body and enforcement section."
32
+ ---
33
+
34
+ # framework-neutrality-in-generic-skills
35
+
36
+ ## The Iron Law
37
+
38
+ ```
39
+ NO GENERIC ARTIFACT MAY MANDATE A SPECIFIC FRAMEWORK.
40
+ SPECIFICS BELONG IN CARVE-OUT ARTIFACTS (laravel-*, symfony-*,
41
+ nextjs-*, pest-*, eloquent, quality-tools).
42
+ ```
43
+
44
+ A generic skill, rule, or command names a *procedure* — what to do.
45
+ A carve-out artifact names a *stack* — how that procedure looks in
46
+ Laravel, Next.js, Pest, etc. Mixing the two leaks framework assumptions
47
+ into surfaces the agent must trigger on regardless of project stack.
48
+
49
+ ## Scope
50
+
51
+ This rule fires on edits under:
52
+
53
+ - `.agent-src.uncompressed/skills/`
54
+ - `.agent-src.uncompressed/rules/`
55
+ - `.agent-src.uncompressed/commands/`
56
+
57
+ **Exempt** (file or directory name matches — these are correctly
58
+ framework-specific): `laravel*`, `symfony*`, `nextjs*`, `react-*`,
59
+ `^php-*`, `^pest-*`, `^eloquent`, `^blade*`, `^livewire`, `^flux`,
60
+ `^artisan-*`, `^composer-*`, `^docker*`, `^aws-*`, `^grafana`,
61
+ `^openapi$`, `^quality-tools`, `^sql-writing`, `^tailwind*`,
62
+ `^terraform*`, `^terragrunt*`, `^traefik`, `^mobile-e2e`,
63
+ `-routing$`, `project-analysis-(laravel|symfony|nextjs|react|node-express|zend-laminas)`.
64
+
65
+ ## Forbidden patterns in generic artifacts
66
+
67
+ | Pattern | Why it leaks | Fix |
68
+ |---|---|---|
69
+ | `FormRequest` as a mandate | Laravel-only validation class | Say "request-validation primitive (FormRequest in Laravel, zod in Next.js, pydantic in FastAPI)" or move to `laravel-validation` carve-out |
70
+ | `php artisan …` as a canonical command | Laravel CLI | Generalize to "the framework's CLI" or move to `artisan-commands` carve-out |
71
+ | `PHPStan` as the only example | PHP-only static analyser | List peers (`mypy` for Python, `tsc` for TypeScript) or move to `quality-tools` carve-out |
72
+ | `composer.json` mentioned alone | PHP package manifest | Add `package.json` / `pyproject.toml` peers, or move to a PHP-scoped carve-out |
73
+ | `Eloquent` / `Model::…` | Laravel ORM | Generalize to "the project's ORM/data layer" or move to `eloquent` carve-out |
74
+ | `Pest` as the only test runner | PHP/Laravel test framework | List peers (`pytest`, `vitest`, `jest`) or move to `pest-testing` carve-out |
75
+ | `Blade` / `Livewire` / `Flux` as default UI | Laravel view stack | Generalize to "the project's UI layer" or move to `blade-ui` / `livewire` / `flux` carve-outs |
76
+ | `vendor/bin/<tool>` as a canonical path | PHP/Composer-specific binary path | Say "the project's quality CLI" or carve-out it |
77
+ | `Rector` as the only refactor tool | PHP-only refactorer | List peers (`ts-morph`, `libcst`) or carve-out it |
78
+ | "every controller" / "all controllers" | Assumes MVC PHP framework | Generalize to "every request handler" / "every endpoint" |
79
+
80
+ ## Allowed: cross-stack documentation
81
+
82
+ Multi-stack tables or detection maps with **at least two ecosystems
83
+ side-by-side** are documentation, not leakage. The linter's
84
+ auto-detect heuristic (Step 0.5 of the audit roadmap) skips a hit when
85
+ its ±2-line window contains patterns from a different ecosystem family
86
+ (`php_family` vs `js_family` vs `python_family`).
87
+
88
+ Example (allowed):
89
+
90
+ ```
91
+ - PHP/Composer project → `composer.json` present
92
+ - Node project → `package.json` present
93
+ - Python project → `pyproject.toml` present
94
+ ```
95
+
96
+ ## Allowed: carve-out pointers
97
+
98
+ A generic artifact may end a section with a one-line handoff to its
99
+ framework-specific peers. Canonical shape:
100
+
101
+ ```
102
+ → Laravel-specific: see [laravel-validation](../skills/laravel-validation/SKILL.md)
103
+ → Next.js-specific: see [nextjs-patterns](../skills/nextjs-patterns/SKILL.md)
104
+ ```
105
+
106
+ The pointer is a link, not a procedure — the generic artifact never
107
+ inlines stack-specific code.
108
+
109
+ ## Enforcement
110
+
111
+ `scripts/lint_framework_leakage.py` runs in the package CI pipeline.
112
+ Exit codes:
113
+
114
+ - `0` — no hits, or every hit is auto-detected as cross-stack, or
115
+ every hit is allowlisted in
116
+ `scripts/lint_framework_leakage_allowlist.json` with a `reason`.
117
+ - `1` — at least one hit in a generic artifact (non-carve-out) that
118
+ is neither cross-stack nor allowlisted.
119
+
120
+ The linter is intentionally noisy on first introduction — the audit
121
+ roadmap drives hits to zero phase by phase.
122
+
123
+ ## See also
124
+
125
+ - [`roadmap-ci-steps-policy`](roadmap-ci-steps-policy.md) — sibling
126
+ Tier-2a rule that drove this pattern.
127
+ - [`skill-quality`](skill-quality.md) — every skill must remain
128
+ executable; carve-outs must still pass skill-quality.
129
+ - [`scope-control`](scope-control.md) — neutralizing a skill is not
130
+ a refactor pretext; only touch the leaking sentences.
@@ -0,0 +1,99 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "2a"
4
+ alwaysApply: false
5
+ description: "Git history operations — never rebase/squash/amend without explicit request; once pushed, rewrites must pair with immediate re-push in same turn"
6
+ source: package
7
+ triggers:
8
+ - intent: "rebase the branch"
9
+ - intent: "squash commits"
10
+ - intent: "clean up commit history"
11
+ - intent: "fold this into the previous commit"
12
+ - intent: "tidy history after pushing"
13
+ - keyword: "git rebase"
14
+ - keyword: "fixup"
15
+ - keyword: "--amend"
16
+ - keyword: "force-push"
17
+ - keyword: "--force-with-lease"
18
+ - keyword: "squash-merge"
19
+ - phrase: "branch diverged"
20
+ - phrase: "pull --rebase failed"
21
+ - phrase: "ahead and behind"
22
+ routes_to:
23
+ - "skill:git-workflow"
24
+ ---
25
+
26
+ # Git History Discipline
27
+
28
+ ## Iron Law — Gate (no unsolicited rewrites)
29
+
30
+ ```
31
+ NEVER REBASE, SQUASH, FIXUP, OR AMEND PUBLISHED OR LOCAL HISTORY
32
+ WITHOUT THE USER ASKING FOR IT THIS TURN.
33
+ LINEAR HISTORY IS A PREFERENCE, NOT A DEFAULT.
34
+ COMMIT-CHUNK ORDER IS NOT A CORRECTNESS GOAL.
35
+ ```
36
+
37
+ Add the next commit on top. Never reorder, fold, drop, or rewrite earlier
38
+ commits to make the log "look right".
39
+
40
+ ## Iron Law — Protocol (once authorized)
41
+
42
+ ```
43
+ ONCE PUSHED, A COMMIT IS PUBLISHED.
44
+ ANY REWRITE OF PUSHED HISTORY MUST PAIR WITH AN IMMEDIATE RE-PUSH
45
+ IN THE SAME TURN — OR DON'T REWRITE.
46
+ NEVER END A SESSION WITH REWRITTEN-BUT-UNPUSHED LOCAL HISTORY.
47
+ ```
48
+
49
+ ## When rewrite is allowed
50
+
51
+ Exactly three:
52
+
53
+ 1. **User says so this turn** — "rebase onto main", "squash these two", "amend that". This operation only, not a standing rule.
54
+ 2. **Standing instruction not yet revoked** — the user said earlier in the conversation "always squash before pushing"; honor it.
55
+ 3. **Conflict resolution forced by `git pull --rebase`** — the user already invoked the rebase via pull; finish it.
56
+
57
+ Anything else — chunk-tidiness, "logical order", folding a follow-up fix into its parent — **forbidden**. The follow-up ships as its own commit (`fix: …`, `chore: …`).
58
+
59
+ ## Two protective stops (for the protocol phase)
60
+
61
+ 1. **Pre-rewrite stop.** Before any squash / amend / rebase on a branch that is on origin: `git fetch && git rev-list --left-right --count HEAD...@{u}`. If **either** side is non-zero — STOP and route to `skill:git-workflow § Divergent-State Recovery`. A blind `git pull --rebase` in this state is the documented failure mode.
62
+
63
+ 2. **Post-rewrite stop.** After the rewrite, push in the **same turn** with `--force-with-lease=<branch>:<fetched-sha>` and verify `git rev-parse origin/<branch>` equals `git rev-parse HEAD`. If the push fails (hook, network, token budget) — fix the cause and re-push **before** ending the session, committing new work, or handing off.
64
+
65
+ If either stop fires and resolution is not immediate → tag the state (`git tag local-rewritten-tip-<ISO-date>`) and hand control back to the user. Do not let a new session inherit a dirty divergence.
66
+
67
+ ## Equivalents that are also forbidden by default
68
+
69
+ - `git rebase -i` (interactive)
70
+ - `git rebase --autosquash`
71
+ - `git commit --fixup` / `--squash` (helpers that feed autosquash)
72
+ - `git commit --amend` on already-pushed commits
73
+ - `git push --force` / `--force-with-lease` (unless paired with the protocol)
74
+ - `git reset --hard` past unpushed work the user might want
75
+ - Squash-merge of a PR via API or CLI when the user has not picked the merge strategy
76
+ - Cherry-pick rewriting that drops or reorders commits
77
+
78
+ `--amend` on the *current local* commit before the first push is the narrow exception (treated as continuing to compose the commit, not rewriting history).
79
+
80
+ ## Why this rule exists
81
+
82
+ Interactive rebase + fixup loops generate disproportionate token cost on every iteration: re-running CI per replayed commit, resolving the same content conflict in three derived files (`.compression-hashes.json`, `router.json`, `.windsurfrules`), losing the working tree to a stash that silently re-introduces older state. A single conflict can burn the budget of an entire feature.
83
+
84
+ A previous session squashed a pushed branch, the push hook failed at the token boundary, the session ended — and the next session saw local and origin pointing at different SHAs for the same logical work. A blind `git pull --rebase` cascaded into conflicts across every derived file. Recovery required forensic SHA-archaeology. The pre/post-rewrite stops make that sequence structurally impossible.
85
+
86
+ ## When you'd be tempted
87
+
88
+ - "I want commit 3 to come before commit 2 because the topic flows better." → don't. Reviewers read the PR diff.
89
+ - "There are two `chore: regenerate` commits, ugly." → don't. They are honest checkpoints.
90
+ - "A linter caught an issue in commit 2 — let me fold the fix in." → don't. Add `fix(scope): …` on top.
91
+ - "I want to drop the WIP commit before pushing." → ask the user first.
92
+ - "Squash-merge when I open the PR will clean it anyway." → also true, also irrelevant — let the merge strategy do that work, not you.
93
+
94
+ ## See also
95
+
96
+ - [`scope-control`](scope-control.md) — git-ops permission gate ("rebase" already named in the canonical list).
97
+ - [`commit-policy`](commit-policy.md) — commits are the user's call; rewriting them is a stronger version of the same restriction.
98
+ - [`token-efficiency`](token-efficiency.md) — Iron Law on burning the user's tokens for cosmetic gain.
99
+ - [`skill:git-workflow`](../skills/git-workflow/SKILL.md) — Safe Squash-After-Push protocol and Divergent-State Recovery decision tree.
@@ -0,0 +1,82 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "2a"
4
+ description: "When generating AI video/image/voice — surface project-local media policies (likeness, style, public-figures, voice-cloning, disclosure)"
5
+ source: package
6
+ triggers:
7
+ - keyword: "/video:"
8
+ - keyword: "/image:"
9
+ - keyword: "/audio:"
10
+ - keyword: "deepfake"
11
+ - keyword: "voice clone"
12
+ - keyword: "voice cloning"
13
+ - keyword: "likeness"
14
+ - keyword: "brand impersonation"
15
+ - phrase: "in the style of"
16
+ - phrase: "in the voice of"
17
+ - phrase: "as [public figure]"
18
+ - phrase: "impersonate"
19
+ applies_to_user_types:
20
+ - "creator"
21
+ - "marketing"
22
+ - "gtm"
23
+ validator_ignore:
24
+ - type: "substring"
25
+ pattern: "../../agents/"
26
+ reason: "Routing rule whose subject matter is the project-local agents/policies/media/ tree; every body link points there by design."
27
+ - type: "substring"
28
+ pattern: ".agent-src.uncompressed/"
29
+ reason: "Rule contrasts project-local placement with the .agent-src.uncompressed/rules/ alternative — mentioning the path is the argument."
30
+ ---
31
+
32
+ # Media Governance Routing
33
+
34
+ ## Iron Law
35
+
36
+ ```
37
+ WHEN AI VIDEO, IMAGE, OR VOICE GENERATION FIRES, CONSULT THE PROJECT-LOCAL
38
+ MEDIA POLICIES IN agents/policies/media/ BEFORE EMITTING THE PROMPT TO
39
+ THE PROVIDER. REFUSE-AND-SURFACE OVER GUESS-AND-RENDER.
40
+ ```
41
+
42
+ Routes agent to project-local media governance policy layer at [`agents/policies/media/`](../../agents/policies/media/) when video / image / voice surface fires. Policies are LLM-readable decision frameworks consulted in-session, not Python-enforced gates — see [`agents/policies/media/README.md § Enforcement model`](../../agents/policies/media/README.md) for full agent-in-the-loop contract.
43
+
44
+ ## What this rule surfaces
45
+
46
+ Any trigger match → agent loads into context:
47
+
48
+ - [`agents/policies/media/likeness.md`](../../agents/policies/media/likeness.md) — real person's visual likeness.
49
+ - [`agents/policies/media/style.md`](../../agents/policies/media/style.md) — named living artist's distinctive style.
50
+ - [`agents/policies/media/public-figures.md`](../../agents/policies/media/public-figures.md) — recognised public figures.
51
+ - [`agents/policies/media/voice-cloning.md`](../../agents/policies/media/voice-cloning.md) — vocal likeness.
52
+ - [`agents/policies/media/disclosure.md`](../../agents/policies/media/disclosure.md) — mandatory non-removable AI-generation disclosure.
53
+ - [`agents/policies/media/brand-impersonation.md`](../../agents/policies/media/brand-impersonation.md) — brand / broadcaster identity imitation.
54
+ - [`agents/policies/media/transparency.md`](../../agents/policies/media/transparency.md) — provenance metadata (C2PA, SynthID).
55
+
56
+ Each policy carries own trigger block → within active context agent narrows from superset to policies whose specific patterns actually fired (e.g. prompt naming public figure → `public-figures.md` + `disclosure.md`; `--no-disclosure` → `disclosure.md` standalone).
57
+
58
+ ## Why project-local, not `.agent-src.uncompressed/rules/`
59
+
60
+ Seven media policies live under [`agents/policies/media/`](../../agents/policies/media/), not as `.agent-src.uncompressed/rules/domain-safety-media-*.md`, for three reasons:
61
+
62
+ 1. **Consumed by skills + adapters**, not surfaced as standalone always-loaded prose. Cost non-trivial (7 × ~80 lines = ~560 lines always-context if hoisted to rules), and most sessions never touch video / image / voice surface.
63
+ 2. **Enforcement model project-local** — working precedent (`/ghostwriter:*` mandatory footer in `write-engine.md`) + audit log (session transcripts) are project artifacts. Rules under `.agent-src.uncompressed/` are tool-portable governance; these policies are domain-specific bindings.
64
+ 3. **Extraction to reusable domain pack explicitly deferred** until second non-video domain (audio, image, docs, exports) lands with overlapping execution surfaces. Until then, one-domain abstraction structurally premature — policies stay project-local, routing rule on-demand bridge.
65
+
66
+ This routing rule is the bridge: sits in always-loaded rule set so trigger keywords surface project-local policies into context on demand, without paying full always-loaded cost.
67
+
68
+ ## CI reachability guarantee
69
+
70
+ [`scripts/lint_media_policy_linkage.py`](../../scripts/lint_media_policy_linkage.py) fails build if any policy file under `agents/policies/media/` not linked from:
71
+
72
+ - this routing rule, **or**
73
+ - a skill's `## Policies` see-also block, **or**
74
+ - another policy file's `## See also` block.
75
+
76
+ Policy that no skill, rule, or sibling policy references → silent policy. CI check is structural reachability guarantee that agent-in-the-loop model rests on.
77
+
78
+ ## See also
79
+
80
+ - [`agents/policies/media/README.md`](../../agents/policies/media/README.md) — full enforcement-model contract.
81
+ - [`.augment/rules/ask-when-uncertain.md`](../../.augment/rules/ask-when-uncertain.md) — single-question refusal-path discipline every policy depends on.
82
+ - [`docs/contracts/write-engine.md`](../docs/contracts/write-engine.md) — prose-disclosure precedent extended to media by [`disclosure.md`](../../agents/policies/media/disclosure.md).
@@ -12,6 +12,12 @@ triggers:
12
12
 
13
13
  # Minimal Safe Diff
14
14
 
15
+ ```
16
+ THE DIFF CONTAINS THE SMALLEST CHANGE THAT SOLVES THE STATED PROBLEM.
17
+ NEVER REFORMAT, RENAME, OR RESTRUCTURE UNTOUCHED CODE IN THE SAME DIFF.
18
+ NEVER ADD DRIVE-BY EDITS, OPPORTUNISTIC REFACTORS, OR DEPENDENCY BUMPS.
19
+ ```
20
+
15
21
  A diff is **safe** when every line in it is traceable to the stated task.
16
22
  Every other line is scope creep and must be removed or moved to a separate
17
23
  change.
@@ -126,8 +126,10 @@ Failure modes:
126
126
 
127
127
  ## See also
128
128
 
129
- - [`docs-sync`](docs-sync.md) — cross-reference sync after rename / delete
130
- - [`agent-docs`](agent-docs.md) roadmap layer conventions
129
+ - [`augment-edit-discipline`](augment-edit-discipline.md) — portability
130
+ + cross-reference sync after rename / delete
131
+ - [`skill:agent-docs-writing`](../skills/agent-docs-writing/SKILL.md) —
132
+ roadmap layer conventions
131
133
  - [`roadmap-progress-sync`](roadmap-progress-sync.md) — sync dashboard
132
134
  on roadmap touch
133
135
  - [`augment-source-of-truth`](augment-source-of-truth.md) — edit
@@ -0,0 +1,90 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "2a"
4
+ description: "When creating, editing, or proposing personas — enforce per-domain cap (≤ 2 specialists), ≥ 1 skill citation, and the deprecation path"
5
+ source: package
6
+ triggers:
7
+ - path_prefix: ".agent-src.uncompressed/personas/"
8
+ - path_prefix: ".agent-src/personas/"
9
+ - keyword: "persona"
10
+ - keyword: "personas"
11
+ - phrase: "new persona"
12
+ - phrase: "add a persona"
13
+ - phrase: "specialist persona"
14
+ - phrase: "review lens"
15
+ routes_to:
16
+ - "contract:persona-schema"
17
+ applies_to_user_types:
18
+ - "maintainer"
19
+ - "developer"
20
+ validator_ignore:
21
+ - type: "substring"
22
+ pattern: "../../docs/"
23
+ reason: "Rule routes to docs/contracts/persona-schema.md and docs/personas.md — the canonical persona catalog and schema live there by design."
24
+ - type: "substring"
25
+ pattern: ".agent-src.uncompressed/"
26
+ reason: "Rule documents the persona authoring tree (.agent-src.uncompressed/personas/) as the deprecation-path operand."
27
+ ---
28
+
29
+ # Persona Governance
30
+
31
+ ## Iron Law
32
+
33
+ ```
34
+ ONE PERSONA, ONE OWNER, ONE SKILL CITATION, ONE DOMAIN SLOT.
35
+ NO NEW SPECIALIST WITHOUT A DEPRECATION CANDIDATE WHEN THE DOMAIN IS FULL.
36
+ ```
37
+
38
+ Personas are review lenses, not free real estate. Every specialist persona has a maintenance cost: it must stay aligned with the schema, the cited skills must still want it, and the per-domain reasoning surface must not bloat to the point that no single persona is load-bearing. This rule routes the agent to [`docs/contracts/persona-schema.md`](../docs/contracts/persona-schema.md) and [`docs/personas.md`](../../docs/personas.md) and enforces the four discipline checks below.
39
+
40
+ ## The four checks
41
+
42
+ ### 1. Per-domain cap — ≤ 2 specialised personas per content domain
43
+
44
+ A **content domain** is a self-contained creative or technical surface that one or two specialist personas can fully cover. Current domains:
45
+
46
+ | Domain | Specialists allowed | Examples |
47
+ |---|---|---|
48
+ | ai-video / ai-image / ai-audio | ≤ 2 | one director-shaped lens + one technical-tuning lens |
49
+ | backend engineering | ≤ 2 | architect + ORM-tamer |
50
+ | frontend engineering | ≤ 2 | component / lifecycle + design / a11y |
51
+ | security | ≤ 2 | abuse-case + secrets-and-trust |
52
+ | gtm / growth | ≤ 2 | CMO + RevOps |
53
+ | money / strategy | ≤ 2 | finance-partner + strategist |
54
+ | people / org | ≤ 2 | engineering-manager + people-strategist |
55
+ | customer / discovery | ≤ 2 | discovery-lead + customer-success-lead |
56
+
57
+ **Core personas** (`developer`, `senior-engineer`, `product-owner`, `stakeholder`, `critical-challenger`, `ai-agent`) are exempt — they are always-loaded cross-cutting lenses, not domain specialists.
58
+
59
+ A new specialist into a full domain MUST come with a deprecation candidate from the same domain. The agent surfaces both, then runs an ai-council debate (per [`ai-council`](../../.agent-src/skills/ai-council/SKILL.md)) before any rename / merge / delete.
60
+
61
+ ### 2. Skill citation floor — ≥ 1 cite before merge
62
+
63
+ A specialist persona without a `personas: [<id>]` citation in at least one skill's frontmatter is dead weight. The PR adding the persona MUST also add the citation, OR the PR is rejected. Citation map lives in [`docs/personas.md § Skill citations`](../../docs/personas.md#skill-citations).
64
+
65
+ ### 3. Deprecation path — delete immediately, record in commit
66
+
67
+ A persona being removed is **deleted in the same commit** that lands its replacement. The commit message names the successor (or "merged into X") and cites the council decision (or maintainer rationale) that authorised it. No soak window — internal personas have no external consumers; a persona file kept around as a tombstone is dead weight the linter still loads. No silent deletes either: the audit trail is the commit, not a docs table.
68
+
69
+ ### 4. Schema conformance — the skill linter is the gate
70
+
71
+ Every persona file is linted against [`docs/contracts/persona-schema.md`](../docs/contracts/persona-schema.md) by the skill linter: frontmatter shape, tier enum, wing enum, required sections per tier, line budget per tier (with wing override), `Unique Questions` ≥ 3, filename / id match, description ≤ 160 chars. The agent runs `python3 scripts/skill_linter.py` before any persona PR is marked ready.
72
+
73
+ ## Failure modes — what counts as a violation
74
+
75
+ - Adding a third specialist to a full domain without naming the deprecation candidate.
76
+ - Landing a specialist with no `personas: [<id>]` cite in any skill.
77
+ - Renaming or deleting a persona file without naming the successor (or sunset reason) in the commit message.
78
+ - Editing core-tier personas in-place with breaking changes (rename, section removal) without bumping to a new id.
79
+ - Skipping the skill linter (`python3 scripts/skill_linter.py`) on a persona PR.
80
+
81
+ ## Day-one state
82
+
83
+ Resolved 2026-05-17 via two-round ai-council debate (members: anthropic/claude-sonnet-4-5, openai/gpt-4o — converged delete-and-fold): `pixar-storyboard-artist` deleted; acting / beat-decomposition lens folded into [`pixar-storyteller`](../skills/pixar-storyteller/SKILL.md) skill body. Active per-domain count for `ai-video` now 2 (`ai-video-technical-director`, `hollywood-director`), within cap. Total active personas in root cluster: 24 (plus 5 advisors in `personas/advisors/`). Full inventory + ownership in [`docs/personas.md`](../../docs/personas.md).
84
+
85
+ ## See also
86
+
87
+ - [`docs/contracts/persona-schema.md`](../docs/contracts/persona-schema.md) — schema lock, tiers, sections, size budgets, linter enforcement surface.
88
+ - [`docs/personas.md`](../../docs/personas.md) — active persona catalog, citation map, ownership column.
89
+ - [`ai-council`](../../.agent-src/skills/ai-council/SKILL.md) — neutral second-opinion mechanism used for merge / deprecation decisions.
90
+ - [`skill-quality`](skill-quality.md) — sibling discipline rule for skill files.
@@ -0,0 +1,75 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "2a"
4
+ description: "When editing an AI video/image/audio adapter — declare lifecycle tier (experimental | stable | deprecated | community); never default to non-stable"
5
+ source: package
6
+ triggers:
7
+ - keyword: "/video:"
8
+ - keyword: "/image:"
9
+ - keyword: "/audio:"
10
+ - keyword: "ai-video"
11
+ - keyword: "ai-image"
12
+ - keyword: "ai-audio"
13
+ - keyword: "adapter"
14
+ - keyword: "provider"
15
+ - path_prefix: "scripts/ai-video/adapters/"
16
+ - path_prefix: "agents/.ai-video.xml"
17
+ - phrase: "lifecycle"
18
+ - phrase: "default provider"
19
+ routes_to:
20
+ - "contract:provider-lifecycle"
21
+ applies_to_user_types:
22
+ - "creator"
23
+ - "developer"
24
+ - "maintainer"
25
+ ---
26
+
27
+ # Provider Lifecycle Discipline
28
+
29
+ ## Iron Law
30
+
31
+ ```
32
+ NEVER DEFAULT TO A NON-STABLE PROVIDER SILENTLY.
33
+ SURFACE THE LIFECYCLE TIER. ASK BEFORE RUNNING.
34
+ ```
35
+
36
+ This rule routes the agent to [`docs/contracts/provider-lifecycle.md`](../docs/contracts/provider-lifecycle.md) whenever a `/video:* / /image:* / /audio:*` surface fires, an adapter under `scripts/ai-video/adapters/` is read or edited, or `agents/.ai-video.xml.example` (or the operator's `agents/.ai-video.xml`) is in play. The contract defines four tiers — `experimental | stable | deprecated | community` — and the agent's obligations per tier.
37
+
38
+ ## What this rule enforces
39
+
40
+ 1. **Read the tier before picking.** When the agent resolves a provider (from `--provider <id>`, from `<default-video-provider>` / `<default-image-provider>`, or from a skill's default), it MUST read both:
41
+ - the `<lifecycle>` element under `<provider id="…">` in `agents/.ai-video.xml.example` (or the operator's `.ai-video.xml`), and
42
+ - the `Lifecycle:` header comment in `scripts/ai-video/adapters/<id>.sh`.
43
+ Mismatch between the two is a contract violation and MUST be surfaced before running.
44
+
45
+ 2. **Refuse-and-surface on non-stable.** If the resolved default is `experimental`, `deprecated`, or `community`, the agent surfaces the tier and the path to the contract, then emits **one** clarifying question (per [`ask-when-uncertain`](ask-when-uncertain.md)): either confirm the non-stable run, or pick a `stable` provider. No silent default. No "I'll just try it".
46
+
47
+ 3. **Refuse `deprecated` without naming the successor.** A `deprecated` adapter's header comment records the successor; the agent surfaces "X is deprecated; successor: Y" before any run, even with confirmation.
48
+
49
+ 4. **Record the tier in the run summary.** The summary line emitted after every `/video:* / /image:* / /audio:*` run names the chosen provider AND its tier. This is the audit-log entry the agent-in-the-loop enforcement model rests on.
50
+
51
+ 5. **Promotion is the maintainer's call.** The agent never auto-promotes `experimental → stable`. It MAY draft a promotion checklist (see [`docs/contracts/provider-lifecycle.md § 2`](../docs/contracts/provider-lifecycle.md#-2--promotion-path)) for maintainer review, but the tier-flip commit is human-authored.
52
+
53
+ ## Failure modes — what counts as a violation
54
+
55
+ - Running `/video:scene` against the `<default-video-provider>` without reading the lifecycle tag first → violation.
56
+ - Picking a `community` provider because it was named in the prompt, without surfacing the tier → violation.
57
+ - Editing an adapter and leaving its header `Lifecycle:` comment out of sync with `agents/.ai-video.xml.example` → violation (CI does not catch this; the agent must).
58
+ - Auto-promoting an adapter from `experimental` to `stable` because "dry-run worked" → violation. Promotion requires a maintainer-captured real-API smoke trace under `agents/ai-video/smoke-traces/`.
59
+
60
+ ## Day-one state
61
+
62
+ All five shipped adapters (`openai-images`, `gemini-veo`, `kling`, `higgsfield`, `sora`) ship as `experimental`. This means **every** default `/video:* / /image:*` run today triggers the refuse-and-surface path. That is intentional — it is the conservative-by-construction posture the contract argues for. As maintainers capture smoke traces and flip individual adapters to `stable`, the friction reduces per-adapter.
63
+
64
+ ## Why agent-in-the-loop, not Python gate
65
+
66
+ A Python pre-run gate enumerating tier-by-command rules would either be too coarse (`experimental → block`, breaking day-to-day dev iteration) or too detailed (per-command tier matrix, drifting from reality on every new provider). The agent reading the tag at run time, surfacing the tier, and asking is the correct enforcement surface: the model that picked the provider is the model that surfaces the obligation, and the human is the policy decision point.
67
+
68
+ The CI guarantee is structural reachability — the linter would fail if a provider was declared in `agents/.ai-video.xml.example` without a lifecycle tag (extension planned). It does not enforce the runtime obligation; the agent does.
69
+
70
+ ## See also
71
+
72
+ - [`docs/contracts/provider-lifecycle.md`](../docs/contracts/provider-lifecycle.md) — the full tier definitions, promotion / demotion criteria, and day-one assignment matrix.
73
+ - [`scripts/ai-video/lib/adapter-contract.md`](../../scripts/ai-video/lib/adapter-contract.md) — the four-method shell surface every adapter implements; the tier tag is read alongside this contract.
74
+ - [`media-governance-routing`](media-governance-routing.md) — sibling tier-2a rule that surfaces the prompt-side policy layer; this rule covers the provider-side discipline.
75
+ - [`ask-when-uncertain`](ask-when-uncertain.md) — the one-question-per-turn discipline the refuse-and-surface path uses.
@@ -0,0 +1,145 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "2a"
4
+ description: "When authoring or executing roadmaps — forbid task ci / make test / npm run check steps when quality.local_auto_run is false; skip inline at execution"
5
+ source: package
6
+ triggers:
7
+ - path_prefix: "agents/roadmaps/"
8
+ - path_prefix: "app/Modules/"
9
+ - keyword: "task ci"
10
+ - keyword: "make test"
11
+ - keyword: "npm run check"
12
+ - keyword: "pnpm run check"
13
+ - keyword: "yarn check"
14
+ - keyword: "composer test"
15
+ - phrase: "run the quality pipeline"
16
+ - phrase: "run task ci"
17
+ - phrase: "run the full ci"
18
+ applies_to_user_types:
19
+ - "maintainer"
20
+ - "developer"
21
+ validator_ignore:
22
+ - type: "substring"
23
+ pattern: "agents/roadmaps/"
24
+ reason: "Rule's subject is roadmap files under agents/roadmaps/; every body link points there by design."
25
+ - type: "substring"
26
+ pattern: ".agent-settings.yml"
27
+ reason: "Rule reads quality.local_auto_run from .agent-settings.yml; naming the file is the contract."
28
+ ---
29
+
30
+ # Roadmap CI-Steps Policy
31
+
32
+ ## Iron Law
33
+
34
+ ```
35
+ WHEN quality.local_auto_run IS FALSE,
36
+ ROADMAPS MUST NOT SCHEDULE FULL-PIPELINE CI STEPS,
37
+ AND EXECUTION MUST SKIP THEM INLINE WITH [-] AND A REASON.
38
+ ```
39
+
40
+ When `quality.local_auto_run: false` in `.agent-settings.yml`, every
41
+ full-pipeline gate run during roadmap work is wasted wall-clock and
42
+ tokens — remote CI on the PR is the authoritative gate. Roadmaps
43
+ must neither schedule nor execute them locally. New CI gates and
44
+ smoke/test files added by the roadmap itself are exempt — they must
45
+ run once locally to count as verified evidence per
46
+ [`verify-before-complete`](verify-before-complete.md).
47
+
48
+ ## Forbidden step patterns (authoring + execution)
49
+
50
+ A step is **CI-shaped** when its text matches any pattern below.
51
+ Case-insensitive. Line-bounded — literal must appear inside the
52
+ step's `- [ ]` line or its immediate inline `<!-- … -->` / `(…)` note.
53
+
54
+ | Pattern | Example |
55
+ |---|---|
56
+ | `task ci` | `Run task ci before the boundary` |
57
+ | `task ci-strict` | `task ci-strict release gate` |
58
+ | `task ci-fast` | `task ci-fast smoke` |
59
+ | `make test` | `Run make test on phase boundary` |
60
+ | `make ci` | `make ci pre-merge` |
61
+ | `npm run check` / `pnpm run check` / `yarn check` | `npm run check before commit` |
62
+ | `composer test` | `composer test on every phase` |
63
+ | `vendor/bin/phpunit` (whole-suite, no path arg) | `vendor/bin/phpunit` |
64
+ | `php artisan test` (no `--filter`) | `php artisan test` |
65
+
66
+ Targeted commands (`vendor/bin/phpstan analyse app/Modules/X`,
67
+ `php artisan test --filter=…`, `npm run lint -- --fix path/`) are
68
+ **not** CI-shaped — narrow verifications, allowed regardless of the
69
+ setting.
70
+
71
+ ## Carve-outs — when CI-shaped steps are still allowed
72
+
73
+ 1. **New CI gate / smoke test / test file landed by this roadmap.**
74
+ Once-locally execution is mandatory under
75
+ [`verify-before-complete`](verify-before-complete.md) carve-out
76
+ (see `templates/agent-settings.md` § `quality.local_auto_run`).
77
+ Mark the step with `<!-- carve-out: new-gate-verification -->`
78
+ on the same line; linter and execution loop honour it and let the
79
+ step run.
80
+ 2. **`quality.local_auto_run: true`.** Opt-in restores pre-policy
81
+ behaviour — linter no-ops, execution loop runs CI steps unmodified.
82
+ 3. **Acceptance-criteria block at end of roadmap.** Final-gate prose
83
+ like "All quality gates pass (`task ci`)" inside an
84
+ `## Acceptance criteria` section is documentation, not an
85
+ executable step (no `- [ ]` checkbox in front). Linter ignores;
86
+ execution loop never reaches it as a step.
87
+
88
+ ## Authoring — linter blocks at write-time
89
+
90
+ `task lint-roadmap-ci-steps` (wired into `task ci-fast` /
91
+ `lint-roadmap-complexity` cadence) scans `agents/roadmaps/*.md` and
92
+ `app/Modules/*/agents/roadmaps/*.md`. Exit code:
93
+
94
+ - `0` — no CI-shaped steps, or setting is `true`, or every match is
95
+ carve-out-marked.
96
+ - `1` — at least one CI-shaped step in an active (non-archived,
97
+ non-skipped) roadmap with `quality.local_auto_run: false` and no
98
+ carve-out marker. Linter prints file, line, matched literal, and
99
+ suggested rewording.
100
+
101
+ Archive (`agents/roadmaps/archive/`) and skipped
102
+ (`agents/roadmaps/skipped/`) are out of scope — they record history,
103
+ not future work.
104
+
105
+ ## Execution — process-loop skips inline
106
+
107
+ Wrappers `/roadmap:process-step|phase|full` honour the policy at the
108
+ top of [`roadmap-process-loop § 5`](../contexts/execution/roadmap-process-loop.md#5-step-loop):
109
+
110
+ 1. Before running a step, match its text against the patterns above.
111
+ 2. CI-shaped **and** `quality.local_auto_run: false` **and** no
112
+ carve-out marker → flip checkbox to `[-]` (cancelled), append a
113
+ one-line reason as inline note, regenerate the dashboard, continue
114
+ to next step. **Never** run the gate.
115
+ 3. CI-shaped **and** `quality.local_auto_run: true` → run normally.
116
+ 4. Carve-out-marked → run regardless of the setting.
117
+
118
+ The `[-]` reason format is fixed:
119
+ `<!-- skipped: quality.local_auto_run=false → remote CI is the gate -->`.
120
+ Per [`roadmap-progress-sync`](roadmap-progress-sync.md) the flip and
121
+ dashboard regen happen in the **same reply** that decides to skip;
122
+ saving skips for the archive commit is a rule violation.
123
+
124
+ ## Failure modes
125
+
126
+ - Authoring `- [ ] Run task ci` while `local_auto_run: false` — linter
127
+ fails the PR.
128
+ - Executing a CI-shaped step without inline-skip flip — Iron Law
129
+ violation; loop never reaches the gate.
130
+ - Carve-out marker on an *existing* pipeline run — abuse; the marker
131
+ is reserved for **new** gates introduced by the same roadmap.
132
+ - Hiding the literal inside a fenced bash block to dodge the linter —
133
+ linter matches inside fenced blocks too (see
134
+ `scripts/lint_roadmap_ci_steps.py`).
135
+
136
+ ## See also
137
+
138
+ - [`verify-before-complete`](verify-before-complete.md) — Iron Law
139
+ this rule narrows; carve-out cites it.
140
+ - [`roadmap-progress-sync`](roadmap-progress-sync.md) — inline flip +
141
+ dashboard regen contract.
142
+ - `templates/agent-settings.md` § `quality.local_auto_run` — source
143
+ of the toggle and its carve-out wording.
144
+ - [`contexts/execution/roadmap-process-loop`](../contexts/execution/roadmap-process-loop.md)
145
+ — § 5 owns the inline-skip mechanics.