@event4u/agent-config 1.20.0 → 1.21.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 (238) hide show
  1. package/.agent-src/commands/agents.md +1 -1
  2. package/.agent-src/commands/bug-fix.md +1 -1
  3. package/.agent-src/commands/bug-investigate.md +2 -2
  4. package/.agent-src/commands/chat-history/import.md +60 -64
  5. package/.agent-src/commands/compress.md +12 -0
  6. package/.agent-src/commands/context/create.md +2 -2
  7. package/.agent-src/commands/context.md +1 -1
  8. package/.agent-src/commands/copilot-agents.md +1 -1
  9. package/.agent-src/commands/council/default.md +17 -5
  10. package/.agent-src/commands/council.md +1 -1
  11. package/.agent-src/commands/e2e-heal.md +1 -1
  12. package/.agent-src/commands/e2e-plan.md +1 -1
  13. package/.agent-src/commands/feature/dev.md +3 -3
  14. package/.agent-src/commands/feature.md +1 -1
  15. package/.agent-src/commands/fix/seeder.md +2 -2
  16. package/.agent-src/commands/fix.md +1 -1
  17. package/.agent-src/commands/jira-ticket.md +1 -1
  18. package/.agent-src/commands/judge.md +2 -2
  19. package/.agent-src/commands/memory.md +1 -1
  20. package/.agent-src/commands/mode.md +5 -5
  21. package/.agent-src/commands/module.md +1 -1
  22. package/.agent-src/commands/onboard.md +4 -4
  23. package/.agent-src/commands/optimize/augmentignore.md +1 -1
  24. package/.agent-src/commands/optimize-prompt.md +61 -0
  25. package/.agent-src/commands/optimize.md +1 -1
  26. package/.agent-src/commands/override.md +1 -1
  27. package/.agent-src/commands/review-changes.md +1 -1
  28. package/.agent-src/commands/review-routing.md +1 -1
  29. package/.agent-src/commands/roadmap.md +1 -1
  30. package/.agent-src/commands/set-cost-profile.md +3 -3
  31. package/.agent-src/commands/sync-agent-settings.md +2 -2
  32. package/.agent-src/commands/tests/create.md +2 -2
  33. package/.agent-src/commands/tests.md +1 -1
  34. package/.agent-src/commands/threat-model.md +4 -4
  35. package/.agent-src/contexts/authority/commit-mechanics.md +14 -1
  36. package/.agent-src/contexts/authority/destructive-mechanics.md +14 -1
  37. package/.agent-src/contexts/authority/scope-mechanics.md +5 -0
  38. package/.agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +76 -0
  39. package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +1 -1
  40. package/.agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +98 -0
  41. package/.agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +93 -0
  42. package/.agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +128 -5
  43. package/.agent-src/contexts/execution/autonomy-mechanics.md +44 -0
  44. package/.agent-src/contexts/model-recommendations.md +2 -2
  45. package/.agent-src/contexts/override-system.md +1 -1
  46. package/.agent-src/personas/product-owner.md +2 -2
  47. package/.agent-src/personas/qa.md +1 -1
  48. package/.agent-src/rules/agent-authority.md +5 -6
  49. package/.agent-src/rules/agent-docs.md +11 -53
  50. package/.agent-src/rules/analysis-skill-routing.md +10 -40
  51. package/.agent-src/rules/architecture.md +6 -1
  52. package/.agent-src/rules/artifact-drafting-protocol.md +5 -0
  53. package/.agent-src/rules/artifact-engagement-recording.md +23 -59
  54. package/.agent-src/rules/ask-when-uncertain.md +24 -47
  55. package/.agent-src/rules/augment-portability.md +14 -62
  56. package/.agent-src/rules/augment-source-of-truth.md +10 -1
  57. package/.agent-src/rules/autonomous-execution.md +17 -98
  58. package/.agent-src/rules/capture-learnings.md +9 -80
  59. package/.agent-src/rules/cli-output-handling.md +12 -42
  60. package/.agent-src/rules/command-suggestion-policy.md +25 -73
  61. package/.agent-src/rules/commit-conventions.md +9 -58
  62. package/.agent-src/rules/commit-policy.md +16 -47
  63. package/.agent-src/rules/context-hygiene.md +5 -0
  64. package/.agent-src/rules/direct-answers.md +21 -50
  65. package/.agent-src/rules/docker-commands.md +11 -45
  66. package/.agent-src/rules/docs-sync.md +10 -56
  67. package/.agent-src/rules/downstream-changes.md +5 -0
  68. package/.agent-src/rules/e2e-testing.md +9 -44
  69. package/.agent-src/rules/guidelines.md +13 -75
  70. package/.agent-src/rules/improve-before-implement.md +10 -2
  71. package/.agent-src/rules/language-and-tone.md +41 -106
  72. package/.agent-src/rules/laravel-translations.md +11 -40
  73. package/.agent-src/rules/markdown-safe-codeblocks.md +4 -0
  74. package/.agent-src/rules/minimal-safe-diff.md +4 -0
  75. package/.agent-src/rules/missing-tool-handling.md +4 -0
  76. package/.agent-src/rules/model-recommendation.md +9 -61
  77. package/.agent-src/rules/no-attribution-footers.md +5 -0
  78. package/.agent-src/rules/no-cheap-questions.md +11 -27
  79. package/.agent-src/rules/no-council-references.md +76 -0
  80. package/.agent-src/rules/no-roadmap-references.md +7 -0
  81. package/.agent-src/rules/non-destructive-by-default.md +13 -43
  82. package/.agent-src/rules/onboarding-gate.md +9 -117
  83. package/.agent-src/rules/package-ci-checks.md +10 -37
  84. package/.agent-src/rules/php-coding.md +10 -55
  85. package/.agent-src/rules/preservation-guard.md +9 -0
  86. package/.agent-src/rules/review-routing-awareness.md +9 -97
  87. package/.agent-src/rules/reviewer-awareness.md +8 -83
  88. package/.agent-src/rules/roadmap-progress-sync.md +7 -170
  89. package/.agent-src/rules/role-mode-adherence.md +6 -2
  90. package/.agent-src/rules/rule-type-governance.md +8 -66
  91. package/.agent-src/rules/runtime-safety.md +5 -0
  92. package/.agent-src/rules/scope-control.md +17 -62
  93. package/.agent-src/rules/security-sensitive-stop.md +7 -1
  94. package/.agent-src/rules/size-enforcement.md +6 -1
  95. package/.agent-src/rules/skill-improvement-trigger.md +9 -49
  96. package/.agent-src/rules/skill-quality.md +7 -113
  97. package/.agent-src/rules/slash-command-routing-policy.md +11 -63
  98. package/.agent-src/rules/think-before-action.md +22 -87
  99. package/.agent-src/rules/token-efficiency.md +10 -74
  100. package/.agent-src/rules/token-optimizer-maintenance.md +68 -0
  101. package/.agent-src/rules/tool-safety.md +4 -0
  102. package/.agent-src/rules/ui-audit-gate.md +25 -61
  103. package/.agent-src/rules/upstream-proposal.md +9 -67
  104. package/.agent-src/rules/user-interaction.md +22 -108
  105. package/.agent-src/rules/verify-before-complete.md +1 -1
  106. package/.agent-src/skills/agent-docs-writing/SKILL.md +1 -1
  107. package/.agent-src/skills/ai-council/SKILL.md +65 -0
  108. package/.agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -1
  109. package/.agent-src/skills/analysis-skill-router/SKILL.md +3 -3
  110. package/.agent-src/skills/artisan-commands/SKILL.md +2 -2
  111. package/.agent-src/skills/authz-review/SKILL.md +1 -1
  112. package/.agent-src/skills/aws-infrastructure/SKILL.md +5 -5
  113. package/.agent-src/skills/blast-radius-analyzer/SKILL.md +8 -8
  114. package/.agent-src/skills/bug-analyzer/SKILL.md +5 -5
  115. package/.agent-src/skills/code-refactoring/SKILL.md +4 -4
  116. package/.agent-src/skills/code-review/SKILL.md +2 -2
  117. package/.agent-src/skills/command-writing/SKILL.md +11 -0
  118. package/.agent-src/skills/composer-packages/SKILL.md +2 -2
  119. package/.agent-src/skills/context-authoring/SKILL.md +11 -0
  120. package/.agent-src/skills/context-document/SKILL.md +1 -1
  121. package/.agent-src/skills/copilot-agents-optimization/SKILL.md +23 -0
  122. package/.agent-src/skills/copilot-config/SKILL.md +1 -1
  123. package/.agent-src/skills/dependency-upgrade/SKILL.md +2 -2
  124. package/.agent-src/skills/devcontainer/SKILL.md +2 -2
  125. package/.agent-src/skills/developer-like-execution/SKILL.md +1 -1
  126. package/.agent-src/skills/docker/SKILL.md +1 -1
  127. package/.agent-src/skills/dto-creator/SKILL.md +1 -1
  128. package/.agent-src/skills/estimate-ticket/SKILL.md +2 -2
  129. package/.agent-src/skills/fe-design/SKILL.md +4 -4
  130. package/.agent-src/skills/feature-planning/SKILL.md +5 -5
  131. package/.agent-src/skills/funnel-analysis/SKILL.md +1 -1
  132. package/.agent-src/skills/laravel/SKILL.md +1 -1
  133. package/.agent-src/skills/laravel-notifications/SKILL.md +5 -5
  134. package/.agent-src/skills/laravel-pennant/SKILL.md +1 -1
  135. package/.agent-src/skills/laravel-pulse/SKILL.md +4 -4
  136. package/.agent-src/skills/laravel-reverb/SKILL.md +2 -2
  137. package/.agent-src/skills/laravel-scheduling/SKILL.md +1 -1
  138. package/.agent-src/skills/migration-creator/SKILL.md +7 -7
  139. package/.agent-src/skills/multi-tenancy/SKILL.md +8 -8
  140. package/.agent-src/skills/performance-analysis/SKILL.md +3 -3
  141. package/.agent-src/skills/pest-testing/SKILL.md +6 -6
  142. package/.agent-src/skills/php-service/SKILL.md +2 -2
  143. package/.agent-src/skills/project-analysis-hypothesis-driven/SKILL.md +3 -3
  144. package/.agent-src/skills/project-analysis-react/SKILL.md +1 -1
  145. package/.agent-src/skills/project-analysis-symfony/SKILL.md +1 -1
  146. package/.agent-src/skills/project-analysis-zend-laminas/SKILL.md +2 -2
  147. package/.agent-src/skills/project-analyzer/SKILL.md +4 -4
  148. package/.agent-src/skills/prompt-optimizer/SKILL.md +108 -0
  149. package/.agent-src/skills/readme-reviewer/SKILL.md +1 -1
  150. package/.agent-src/skills/rule-writing/SKILL.md +33 -0
  151. package/.agent-src/skills/sentry-integration/SKILL.md +1 -1
  152. package/.agent-src/skills/skill-writing/SKILL.md +14 -0
  153. package/.agent-src/skills/terraform/SKILL.md +2 -2
  154. package/.agent-src/skills/terragrunt/SKILL.md +8 -8
  155. package/.agent-src/skills/test-performance/SKILL.md +5 -5
  156. package/.agent-src/skills/threat-modeling/SKILL.md +2 -2
  157. package/.agent-src/skills/token-optimizer/SKILL.md +110 -0
  158. package/.agent-src/skills/universal-project-analysis/SKILL.md +1 -1
  159. package/.agent-src/templates/AGENTS.md +1 -1
  160. package/.agent-src/templates/agent-settings.md +21 -16
  161. package/.agent-src/templates/contexts/tenant-boundaries.md +2 -2
  162. package/.agent-src/templates/contexts.md +1 -1
  163. package/.agent-src/templates/copilot-instructions.md +21 -0
  164. package/.agent-src/templates/copilot-review-instructions.md +76 -0
  165. package/.agent-src/templates/features.md +1 -1
  166. package/.agent-src/templates/rule.md +127 -0
  167. package/.claude-plugin/marketplace.json +4 -1
  168. package/AGENTS.md +32 -5
  169. package/CHANGELOG.md +69 -3
  170. package/README.md +22 -21
  171. package/config/agent-settings.template.yml +44 -10
  172. package/config/gitignore-block.txt +7 -0
  173. package/docs/architecture.md +86 -5
  174. package/docs/catalog.md +16 -6
  175. package/docs/contracts/agent-memory-contract.md +1 -1
  176. package/docs/contracts/context-paths.md +2 -1
  177. package/docs/contracts/file-ownership-matrix.json +354 -500
  178. package/docs/contracts/iron-law-overrides.txt +25 -0
  179. package/docs/contracts/kernel-membership.md +273 -0
  180. package/docs/contracts/load-context-schema.md +26 -11
  181. package/docs/contracts/pilot/agent-authority.md +24 -0
  182. package/docs/contracts/pilot/direct-answers.md +70 -0
  183. package/docs/contracts/pilot/language-and-tone.md +63 -0
  184. package/docs/contracts/rule-classification.md +170 -0
  185. package/docs/contracts/rule-router.md +153 -0
  186. package/docs/customization.md +17 -6
  187. package/docs/decisions/ADR-001-kernel-swap-deferred.md +109 -0
  188. package/docs/decisions/ADR-002-kernel-bucket-overrides.md +124 -0
  189. package/docs/decisions/ADR-rule-kernel-and-router.md +122 -0
  190. package/docs/getting-started.md +2 -2
  191. package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +176 -0
  192. package/docs/guidelines/agent-infra/rule-type-governance.md +73 -0
  193. package/docs/guidelines/agent-infra/size-and-scope.md +13 -2
  194. package/docs/guidelines/agent-infra/skill-quality-checklist.md +119 -0
  195. package/docs/guidelines/augment-portability-patterns.md +68 -0
  196. package/docs/guidelines/php/php-coding-patterns.md +62 -0
  197. package/package.json +1 -1
  198. package/scripts/_p43_bodies.py +235 -0
  199. package/scripts/_p43_compress.py +118 -0
  200. package/scripts/_p4_migrate.py +199 -0
  201. package/scripts/_pilot_council_question.py +57 -0
  202. package/scripts/_pilot_measure.py +53 -0
  203. package/scripts/ai_council/session.py +107 -5
  204. package/scripts/build_linear_digest.py +3 -5
  205. package/scripts/check_always_budget.py +39 -6
  206. package/scripts/check_compressed_paths.py +213 -0
  207. package/scripts/check_compression.py +15 -0
  208. package/scripts/check_context_paths.py +1 -0
  209. package/scripts/check_council_layout.py +105 -0
  210. package/scripts/check_council_references.py +145 -0
  211. package/scripts/check_portability.py +2 -0
  212. package/scripts/check_references.py +2 -0
  213. package/scripts/check_token_optimizer_freshness.py +131 -0
  214. package/scripts/compile_router.py +148 -0
  215. package/scripts/compress.py +219 -11
  216. package/scripts/council_cli.py +9 -5
  217. package/scripts/council_prune.py +81 -0
  218. package/scripts/count_token_optimizer_usage.sh +54 -0
  219. package/scripts/install.sh +44 -2
  220. package/scripts/iron_law_sha.py +98 -0
  221. package/scripts/lint_load_context.py +35 -5
  222. package/scripts/measure_rule_budget.py +314 -0
  223. package/scripts/prototype_lint_contradictions.py +150 -0
  224. package/scripts/schemas/rule.schema.json +55 -6
  225. package/scripts/skill_linter.py +196 -6
  226. package/scripts/smoke_path_resolution.py +93 -0
  227. package/scripts/validate_frontmatter.py +41 -1
  228. package/.agent-src/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md +0 -72
  229. package/.agent-src/contexts/communication/rules-auto/augment-portability-mechanics.md +0 -79
  230. package/.agent-src/contexts/communication/rules-auto/cli-output-handling-mechanics.md +0 -87
  231. package/.agent-src/contexts/communication/rules-auto/command-suggestion-policy-mechanics.md +0 -62
  232. package/.agent-src/contexts/communication/rules-auto/docs-sync-mechanics.md +0 -78
  233. package/.agent-src/contexts/communication/rules-auto/package-ci-checks-mechanics.md +0 -85
  234. package/.agent-src/contexts/communication/rules-auto/review-routing-awareness-mechanics.md +0 -65
  235. package/.agent-src/contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md +0 -78
  236. package/.agent-src/contexts/communication/rules-auto/ui-audit-gate-mechanics.md +0 -53
  237. /package/{docs → .agent-src/contexts}/contracts/artifact-engagement-flow.md +0 -0
  238. /package/{docs → .agent-src/contexts}/contracts/command-suggestion-flow.md +0 -0
@@ -1,62 +0,0 @@
1
- # Command Suggestion — mechanics
2
-
3
- Output format, anti-noise specifics, and "what this rule does NOT do"
4
- catalog for the
5
- [`command-suggestion-policy`](../../../rules/command-suggestion-policy.md)
6
- rule. The Iron Law (suggest, never invoke), the six-condition fire
7
- gate, and the subordination list live in the rule; this file is the
8
- lookup material for the rendered output and engine behavior.
9
-
10
- ## What to emit — exact format
11
-
12
- Render exactly one numbered-options block conforming to
13
- `user-interaction`:
14
-
15
- ```
16
- > 💡 Your request matches a command. Pick one or run the prompt as-is:
17
- >
18
- > 1. /implement-ticket — drive ticket end-to-end through refine → plan → implement → test
19
- > 2. /refine-ticket — tighten the AC and risks on a ticket before planning
20
- > 3. Just run the prompt as-is, no command
21
-
22
- **Recommendation: 1 — /implement-ticket** — the request matches its trigger description (`setze ticket abc-123 um`). Pick the last option to skip the command and run the prompt as written.
23
- ```
24
-
25
- Rules — non-negotiable:
26
-
27
- - The "run as-is" option is **always present**, **always last**, never removed.
28
- - At most `commands.suggestion.max_options` command suggestions
29
- precede the as-is option (default 4 → 5 total).
30
- - Exactly **one** `Recommendation:` line follows the block, naming
31
- the highest-scoring command — or no recommendation when the top
32
- two scores are within 0.05 of each other (single-source-of-truth
33
- Iron Law from `user-interaction`).
34
- - Free-text replies count as the as-is option unless they
35
- unambiguously name one of the listed commands.
36
-
37
- ## Anti-noise — silent when uncertain
38
-
39
- The engine's `rank.py` already drops:
40
-
41
- - Matches below the `confidence_floor` (default 0.6, per-command
42
- override in frontmatter).
43
- - Single matches scoring `< floor + 0.1` with no structural bonus
44
- (high uncertainty isn't worth interrupting for).
45
- - Short prompts (< 6 words) hitting > 2 commands with no structural
46
- bonus (ticket key, file path) — too vague to disambiguate.
47
- - Pure-continuation messages (`ok`, `weiter`, `mach weiter`, `go on`,
48
- …) — no new intent signal, no structural bonus → silent.
49
- - Suggestions that fired for the same `(command, evidence)` pair
50
- within the cooldown window (default 10m, per-command override).
51
-
52
- If the engine returns an empty list → emit nothing. The user's
53
- prompt runs exactly as it would without this rule.
54
-
55
- ## What this rule does NOT do
56
-
57
- - Invoke any command. Picking option N is what triggers `slash-command-routing-policy`.
58
- - Stack with other questions. One numbered-options block per turn.
59
- - Re-trigger on its own output. Command names emitted in the
60
- suggestion block are excluded from the next-turn matcher input.
61
- - Override `enabled: false`, blocklist entries, or per-conversation opt-out.
62
- - Suggest commands that are not in the locked eligibility table.
@@ -1,78 +0,0 @@
1
- # Docs Sync — mechanics
2
-
3
- Update tables, distribution manifests, hook registries, and content
4
- consistency check details for the
5
- [`docs-sync`](../../../rules/docs-sync.md) rule. The Iron Rule, the
6
- mandatory sequence, the two modes (reactive/proactive), the
7
- settings-template sync, and the "Do NOT" list live in the rule; this
8
- file is the lookup material when a sync trigger fires.
9
-
10
- ## What to update — count and category tables
11
-
12
- When a file is **added, removed, or renamed**:
13
-
14
- | Change | Files to update |
15
- |---|---|
16
- | Skill/command/rule count changes | `contexts/augment-infrastructure.md` (count + category table) |
17
- | New skill category | `contexts/augment-infrastructure.md` + `contexts/skills-and-commands.md` |
18
- | New workflow chain | `contexts/skills-and-commands.md` (workflow chains section) |
19
-
20
- ## Cross-reference updates
21
-
22
- When a skill is **added or its scope changes**, check and update:
23
-
24
- | What | Where to check |
25
- |---|---|
26
- | Inline routing hints | "see X skill" or "use X instead" references in other skills |
27
- | Guideline cross-references | Guidelines that reference the changed skill |
28
- | Command skill references | Commands that use the changed skill |
29
-
30
- ## Distribution manifests and hook registries
31
-
32
- `.augment/`-internal sync (counts, contexts, cross-refs) is one half. The
33
- other half is **distribution manifests** that ship the package to consumers
34
- and **hook registries** that wire engine code into platform lifecycles.
35
- These are not auto-derived — they drift silently until CI catches them, and
36
- on cooperative platforms (no pre-commit) they can sit broken in a branch
37
- for hours.
38
-
39
- When a **skill** is added, renamed, or deleted under
40
- `.agent-src.uncompressed/skills/`:
41
-
42
- | Manifest | Required update |
43
- |---|---|
44
- | `.claude-plugin/marketplace.json` | Add/remove the `./.claude/skills/<name>` entry in `plugins[0].skills[]`, alphabetical position. Caught by `scripts/lint_marketplace.py` in CI. |
45
- | `.augment-plugin/marketplace.json` | Skill-name-agnostic — no update needed. Touch only when plugin metadata (description, tags) changes. |
46
- | `.github/plugin/marketplace.json` | Same as above — metadata-only manifest. |
47
-
48
- When a **hook** is added, renamed, or deleted under
49
- `.agent-src.uncompressed/templates/scripts/work_engine/hooks/builtin/`:
50
-
51
- | Registry | Required update |
52
- |---|---|
53
- | `templates/scripts/work_engine/hooks/builtin/__init__.py` | New hook class → add the import + `__all__` entry. Single source of truth for engine-side registration. |
54
- | `templates/consumer-settings/claude-settings.json` | Only when a **new platform event** is wired (e.g. first time a hook listens on `SessionEnd`). Existing hooks reuse the `./agent-config chat-history:hook --platform claude` dispatcher — no per-hook entry needed. |
55
- | `templates/consumer-settings/augment-cli-hooks.json` | Same logic — new platform event → new `command` block; new hook on existing event → no update. |
56
-
57
- Failure mode that motivated this section: a skill on disk without its
58
- `marketplace.json` entry passes local edits, builds, and tests — only
59
- CI catches it via `lint_marketplace`. The cooperative path is
60
- "agent updates the manifest in the same response as the skill"; the
61
- structural backstop is a pre-commit hook installed by
62
- `scripts/install-hooks.sh` that runs `lint_marketplace` on every
63
- commit. Run the installer once per clone; bypass for an unrelated WIP
64
- commit is `git commit --no-verify`.
65
-
66
- ## Content consistency check
67
-
68
- When a rule, skill, or guideline's **content** is changed (not just
69
- metadata), search for all other artefacts that cover the same topic
70
- and verify they are consistent:
71
-
72
- ```bash
73
- grep -rl "TOPIC" .augment/rules/ .augment/skills/ .augment/guidelines/ --include="*.md"
74
- ```
75
-
76
- If any file contradicts or is missing the updated information →
77
- update it in the same response. Inconsistent documentation is worse
78
- than no documentation.
@@ -1,85 +0,0 @@
1
- # Package CI checks — mechanics
2
-
3
- The five required local-CI checks, the quick one-liner, and the
4
- post-edit workflow rules for the
5
- [`package-ci-checks`](../../../rules/package-ci-checks.md) rule. The
6
- Iron Law, the activation trigger, and the "Do NOT" list live in the
7
- rule; this file is the lookup material when an agent is about to
8
- push or open a PR in the `agent-config` package repo.
9
-
10
- ## Required checks (in order)
11
-
12
- Run all of these before pushing — they match the GitHub Actions workflows exactly:
13
-
14
- ### 1. Sync check
15
-
16
- ```bash
17
- bash scripts/compress.sh --check # .agent-src/ matches .agent-src.uncompressed/
18
- bash scripts/compress.sh --check-hashes # compression hashes are clean
19
- ```
20
-
21
- **Common failure:** Edited uncompressed file but forgot `bash scripts/compress.sh --mark-done {path}`.
22
-
23
- ### 2. Consistency checks
24
-
25
- ```bash
26
- python3 scripts/check_compression.py # compressed variants are valid
27
- python3 scripts/check_references.py # no broken cross-references
28
- python3 scripts/check_portability.py # no project-specific references in shared files
29
- ```
30
-
31
- **Common failure:** Changed code-blocks in uncompressed but didn't re-compress.
32
-
33
- ### 3. Linter
34
-
35
- ```bash
36
- python3 scripts/skill_linter.py --all # 0 FAIL required
37
- ```
38
-
39
- **Common failure:** New skill missing analysis/verification sections.
40
-
41
- ### 4. Tests
42
-
43
- ```bash
44
- python3 -m pytest tests/ --tb=short # all tests must pass
45
- ```
46
-
47
- **Common failure:** Changed `compress.py` behavior without updating test expectations.
48
-
49
- ### 5. README
50
-
51
- ```bash
52
- python3 scripts/readme_linter.py README.md --root .
53
- ```
54
-
55
- ## Quick one-liner
56
-
57
- Run all checks in sequence — stops on first failure:
58
-
59
- ```bash
60
- bash scripts/compress.sh --check && \
61
- bash scripts/compress.sh --check-hashes && \
62
- python3 scripts/check_compression.py && \
63
- python3 scripts/check_references.py && \
64
- python3 scripts/check_portability.py && \
65
- python3 scripts/skill_linter.py --all && \
66
- python3 -m pytest tests/ --tb=short && \
67
- python3 scripts/readme_linter.py README.md --root .
68
- ```
69
-
70
- ## After editing skills/rules
71
-
72
- When you edit a file in `.agent-src.uncompressed/`:
73
-
74
- 1. Edit the uncompressed file
75
- 2. Edit the compressed file in `.agent-src/` to match
76
- 3. Run `bash scripts/compress.sh --mark-done {relative-path}` to update the hash
77
- 4. Verify with `bash scripts/compress.sh --check-hashes`
78
-
79
- **If you skip step 3, the CI pipeline WILL fail.**
80
-
81
- ## After editing `scripts/compress.py`
82
-
83
- Changes to `compress.py` often break existing tests in `tests/test_compress.py`.
84
- Always run `python3 -m pytest tests/test_compress.py -v --tb=short` immediately
85
- after changing `compress.py` — don't wait until the end.
@@ -1,65 +0,0 @@
1
- # Review Routing Awareness — mechanics
2
-
3
- Memory-lookup snippet, "do NOT overreach" guardrails, and anti-pattern
4
- catalog for the
5
- [`review-routing-awareness`](../../../rules/review-routing-awareness.md)
6
- rule. The four required-behavior steps and the "when this rule applies"
7
- trigger live in the rule; this file is the lookup material for the
8
- fallback path and the failure-mode list.
9
-
10
- ## Memory-lookup fallback
11
-
12
- If neither `.github/ownership-map.yml` (or `agents/ownership-map.yml`)
13
- nor `.github/historical-bug-patterns.yml` (or
14
- `agents/historical-bug-patterns.yml`) exists, fall back to the
15
- engineering-memory layer via
16
- [`memory-access`](../../../../docs/guidelines/agent-infra/memory-access.md):
17
-
18
- ```python
19
- from scripts.memory_lookup import retrieve
20
- extra = retrieve(
21
- types=["ownership", "historical-patterns"],
22
- keys=<changed file paths>,
23
- limit=5,
24
- )
25
- ```
26
-
27
- Curated memory (`agents/memory/ownership.yml`,
28
- `agents/memory/historical-patterns.yml`) carries the same schema as the
29
- project-local YAMLs and is merged into the routing output alongside
30
- them. If both memory and project YAMLs are absent, skip the rule and
31
- rely on [`reviewer-awareness`](../../../rules/reviewer-awareness.md)
32
- defaults. **Do not invent owners or patterns** from context.
33
-
34
- ## Surface findings — worked examples
35
-
36
- When producing a review plan, include:
37
-
38
- - **Owner-mapped roles** — explicitly preferred over generic roles. If
39
- the ownership map says `app/Billing/**` is owned by `finance-engineering
40
- + security`, use those, not "backend + security".
41
- - **Historical-pattern warnings** — list every matched pattern with a
42
- short label and the required control, e.g. _"Pattern: N+1 on tenant
43
- listings → add an eager-load regression test"_.
44
- - **Confidence note** — if the ownership map is stale (last updated > 6
45
- months ago per the `updated` field), say so. Ownership maps rot.
46
-
47
- ## Do NOT overreach
48
-
49
- - **Never rename paths** or add ownership entries as a side effect of a
50
- code change. Ownership map edits are a separate, explicit task.
51
- - **Never mark a change safe** only because no pattern matched. Pattern
52
- absence means "no known hit", not "no risk".
53
- - **Never copy historical-pattern names into the diff** as code comments
54
- or commit messages — they are routing metadata, not commentary.
55
-
56
- ## Anti-patterns — reject them
57
-
58
- - Suggesting owners "because this looks like billing code" without
59
- consulting the ownership map when one exists.
60
- - Inventing historical patterns from general knowledge — patterns must
61
- come from the project's own registry.
62
- - Downgrading a matched high-severity pattern because "the author said
63
- it's fine" — the pattern was registered because it bit before.
64
- - Treating an out-of-date map as absent. Flag staleness; do not silently
65
- skip.
@@ -1,78 +0,0 @@
1
- # Roadmap Progress Sync — mechanics
2
-
3
- Mechanics, triggers, and failure-mode catalog for the
4
- [`roadmap-progress-sync`](../../../rules/roadmap-progress-sync.md)
5
- rule. The Iron Laws and status semantics live in the rule; this
6
- file holds the lookup material the rule pulls when a trigger fires.
7
-
8
- ## How to regenerate
9
-
10
- ```bash
11
- ./agent-config roadmap:progress
12
- ```
13
-
14
- The `./agent-config` wrapper is written into the project root by the
15
- package installer and delegates to the master CLI inside
16
- `node_modules/@event4u/agent-config/` or `vendor/event4u/agent-config/`.
17
- No global tooling required.
18
-
19
- ## Triggers
20
-
21
- | Edit | Must run, same response |
22
- |---|---|
23
- | **Create a new roadmap file** | regenerate dashboard |
24
- | **Rename or delete a roadmap file** | regenerate dashboard |
25
- | Mark step `[x]`, `[~]`, `[-]`, or unmark back to `[ ]` | regenerate dashboard |
26
- | Add, rename, or remove a phase | regenerate dashboard |
27
- | **Last `[ ]` flips** — roadmap reaches `count_open == 0` | `git mv` → `archive/` (or `skipped/`) **then** regenerate dashboard |
28
- | Move roadmap between `roadmaps/` ↔ `archive/` ↔ `skipped/` | regenerate dashboard |
29
-
30
- **Batching rule:** if you edit multiple checkboxes in one response, a
31
- **single** regeneration at the end of that response is enough — but
32
- the response must not end without it. If one of those edits closes a
33
- roadmap, archive it first, then run the single regen.
34
-
35
- ## Pre-send self-check — MANDATORY
36
-
37
- Before sending any reply that touched `agents/roadmaps/`, run this
38
- silent gate:
39
-
40
- 1. Did this turn create, rename, delete, or move a roadmap file? → regen MUST be in the reply.
41
- 2. Did this turn flip any checkbox in a roadmap file? → regen MUST be in the reply.
42
- 3. Did the regen output (`✅ Wrote agents/roadmaps-progress.md · …`) actually appear this turn? → if no, run it now before sending.
43
- 4. **Autonomous roadmap execution gate** — did this turn complete a roadmap step (code saved + verification passed) without flipping its checkbox? → flip `[x]` (or `[~]` if multi-turn) and regen before sending.
44
- 5. **Trackable-roadmap gate** — did this turn create or substantially edit a roadmap file? → does it now contain at least one `- [ ]` per non-intro phase, **or** carry `status: draft` in frontmatter? → if neither, add the checklist or the draft flag before sending.
45
-
46
- Any "yes" + no regen run = rule violation. Rerun before sending.
47
-
48
- ## Failure modes
49
-
50
- - **Created the roadmap, marked Phase 1 done across multiple turns,
51
- never regenerated** — dashboard silently lies "this roadmap does
52
- not exist" to the next reader. Canonical failure of this rule;
53
- the rule was hardened in response to it.
54
- - **Regenerated yesterday, edited today, "I'll regen at session
55
- end"** — session ends from a crash, regen never lands.
56
- - **Closed a roadmap (last `[ ]` → `[x]`) and regenerated before
57
- `git mv`** — the closed roadmap reappears in "Open roadmaps".
58
- - **Edited the dashboard by hand to "fix it quickly"** — next regen
59
- overwrites the manual edit; no audit trail of why.
60
- - **Autonomous run, four steps shipped across four turns, dashboard
61
- flat the whole time, single regen at the end** — user lost
62
- progress visibility for the entire run. Each completed step must
63
- flip its checkbox in the reply that ships it.
64
- - **Decision-only roadmap shipped without checkboxes** — file
65
- contains decisions / ICE / block-sequencing but zero `- [ ]`,
66
- dashboard shows `0/0` or omits it. Pair with a `## Phase N`
67
- section or mark `status: draft` (CI catches this now).
68
- - **Headings off-canon (`### P0 #N`, `## Block A`, `### Sequencing
69
- — Phase 1`)** — `PHASE_RE` skips them, roadmap invisible to the
70
- dashboard. Rename to `## Phase <id>` or mark `status: draft`.
71
-
72
- ## Do NOT
73
-
74
- - Do NOT edit `agents/roadmaps-progress.md` by hand — always regenerate.
75
- - Do NOT defer the regen to "next commit" or "before push" — same response.
76
- - Do NOT rely on CI (`--check` mode) as the first line of defence — CI is last-line, not real-time.
77
- - Do NOT skip the regen because "only one checkbox changed" — the dashboard aggregates counts and phase percentages that shift on single edits.
78
- - Do NOT leave a 100%-complete roadmap in `agents/roadmaps/` "for review" — `git mv` to archive **before** regenerating, otherwise it reappears in "Open roadmaps".
@@ -1,53 +0,0 @@
1
- # UI-audit gate — mechanics
2
-
3
- Findings-shape spec, failure-mode catalog, and cloud-surface
4
- adaptation for the
5
- [`ui-audit-gate`](../../../rules/ui-audit-gate.md) rule. The Iron
6
- Law, the activation triggers, the allow-list, and the action sequence
7
- when the gate fires live in the rule; this file is the lookup
8
- material when an agent has to verify what counts as findings or
9
- recognise a failure mode.
10
-
11
- ## What "audit findings" means
12
-
13
- `state.ui_audit` is a non-empty dict carrying at least one of:
14
-
15
- - `components_found` — `{path, name, kind, similarity?}` inventory
16
- entries from [`existing-ui-audit`](../../../skills/existing-ui-audit/SKILL.md).
17
- - `greenfield: true` plus `greenfield_decision` ∈
18
- `{scaffold, bare, external_reference}`.
19
- - Legacy `components` alias — back-compat for the same shape.
20
-
21
- `null`, `{}`, or a dict without those keys is **not** findings;
22
- emit `@agent-directive: existing-ui-audit` instead of writing code.
23
-
24
- ## Failure modes
25
-
26
- - Writing the component first and "thinking about reuse later".
27
- - Citing a similar-looking component from memory without verifying
28
- it via the audit.
29
- - Treating `state.ui_audit = {}` as "audit ran, found nothing" —
30
- empty dict is rejected on purpose; an audit that finds nothing
31
- must record either ≥1 `components_found` or the greenfield branch.
32
- - Bypassing the gate for "just one tile".
33
-
34
- ## Interactions
35
-
36
- - [`improve-before-implement`](../../../rules/improve-before-implement.md) — runs
37
- first when the request is ambiguous; this rule is the next gate.
38
- - [`ask-when-uncertain`](../../../rules/ask-when-uncertain.md) — "just build it"
39
- does **not** drop the audit; acknowledge, run audit, continue.
40
- - [`directives/ui/audit.py`](../../../templates/scripts/work_engine/directives/ui/audit.py)
41
- — code-layer twin; this rule covers the cases where the engine
42
- is not in the loop.
43
- - [`existing-ui-audit`](../../../skills/existing-ui-audit/SKILL.md) — the
44
- skill that produces the findings.
45
-
46
- ## Cloud Behavior
47
-
48
- On cloud surfaces the engine is not shipped, so `state.ui_audit`
49
- does not exist. The Iron Law still applies: take the visible
50
- inventory of files in conversation context as the audit, and
51
- surface a one-line audit summary in the reply before writing the
52
- component. The gate is satisfied by an explicit summary, not by
53
- silently skipping.