@event4u/agent-config 1.16.0 → 1.18.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.
- package/.agent-src/commands/{agents-audit.md → agents/audit.md} +4 -3
- package/.agent-src/commands/{agents-cleanup.md → agents/cleanup.md} +12 -6
- package/.agent-src/commands/{agents-prepare.md → agents/prepare.md} +4 -3
- package/.agent-src/commands/agents.md +46 -0
- package/.agent-src/commands/{chat-history-checkpoint.md → chat-history/checkpoint.md} +4 -4
- package/.agent-src/commands/{chat-history-clear.md → chat-history/clear.md} +4 -4
- package/.agent-src/commands/{chat-history-resume.md → chat-history/resume.md} +4 -4
- package/.agent-src/commands/chat-history/show.md +107 -0
- package/.agent-src/commands/chat-history.md +33 -89
- package/.agent-src/commands/{commit-in-chunks.md → commit/in-chunks.md} +15 -13
- package/.agent-src/commands/commit.md +22 -2
- package/.agent-src/commands/{context-create.md → context/create.md} +4 -3
- package/.agent-src/commands/{context-refactor.md → context/refactor.md} +4 -3
- package/.agent-src/commands/context.md +44 -0
- package/.agent-src/commands/{copilot-agents-init.md → copilot-agents/init.md} +4 -3
- package/.agent-src/commands/{copilot-agents-optimize.md → copilot-agents/optimize.md} +4 -3
- package/.agent-src/commands/copilot-agents.md +44 -0
- package/.agent-src/commands/council/default.md +221 -0
- package/.agent-src/commands/{council-design.md → council/design.md} +6 -5
- package/.agent-src/commands/{council-optimize.md → council/optimize.md} +7 -6
- package/.agent-src/commands/{council-pr.md → council/pr.md} +6 -5
- package/.agent-src/commands/council.md +47 -212
- package/.agent-src/commands/{create-pr-description.md → create-pr/description-only.md} +4 -2
- package/.agent-src/commands/create-pr.md +26 -5
- package/.agent-src/commands/{feature-dev.md → feature/dev.md} +5 -10
- package/.agent-src/commands/{feature-explore.md → feature/explore.md} +4 -8
- package/.agent-src/commands/{feature-plan.md → feature/plan.md} +4 -8
- package/.agent-src/commands/{feature-refactor.md → feature/refactor.md} +4 -8
- package/.agent-src/commands/{feature-roadmap.md → feature/roadmap.md} +6 -10
- package/.agent-src/commands/feature.md +6 -12
- package/.agent-src/commands/{fix-ci.md → fix/ci.md} +4 -8
- package/.agent-src/commands/{fix-portability.md → fix/portability.md} +4 -8
- package/.agent-src/commands/{fix-pr-bot-comments.md → fix/pr-bots.md} +4 -8
- package/.agent-src/commands/{fix-pr-developer-comments.md → fix/pr-developers.md} +4 -8
- package/.agent-src/commands/{fix-pr-comments.md → fix/pr.md} +7 -11
- package/.agent-src/commands/{fix-references.md → fix/refs.md} +4 -8
- package/.agent-src/commands/{fix-seeder.md → fix/seeder.md} +4 -8
- package/.agent-src/commands/fix.md +7 -13
- package/.agent-src/commands/{do-and-judge.md → judge/on-diff.md} +4 -3
- package/.agent-src/commands/judge/solo.md +90 -0
- package/.agent-src/commands/{do-in-steps.md → judge/steps.md} +4 -3
- package/.agent-src/commands/judge.md +35 -70
- package/.agent-src/commands/{memory-add.md → memory/add.md} +4 -3
- package/.agent-src/commands/{memory-full.md → memory/load.md} +4 -3
- package/.agent-src/commands/{memory-promote.md → memory/promote.md} +4 -3
- package/.agent-src/commands/{propose-memory.md → memory/propose.md} +4 -3
- package/.agent-src/commands/memory.md +48 -0
- package/.agent-src/commands/{module-create.md → module/create.md} +4 -3
- package/.agent-src/commands/{module-explore.md → module/explore.md} +4 -3
- package/.agent-src/commands/module.md +44 -0
- package/.agent-src/commands/{optimize-agents.md → optimize/agents.md} +4 -8
- package/.agent-src/commands/{optimize-augmentignore.md → optimize/augmentignore.md} +4 -9
- package/.agent-src/commands/{optimize-rtk-filters.md → optimize/rtk.md} +4 -8
- package/.agent-src/commands/{optimize-skills.md → optimize/skills.md} +4 -8
- package/.agent-src/commands/optimize.md +4 -10
- package/.agent-src/commands/{override-create.md → override/create.md} +4 -3
- package/.agent-src/commands/{override-manage.md → override/manage.md} +4 -3
- package/.agent-src/commands/override.md +44 -0
- package/.agent-src/commands/{roadmap-create.md → roadmap/create.md} +4 -3
- package/.agent-src/commands/{roadmap-execute.md → roadmap/execute.md} +4 -3
- package/.agent-src/commands/roadmap.md +44 -0
- package/.agent-src/commands/{tests-create.md → tests/create.md} +4 -3
- package/.agent-src/commands/{tests-execute.md → tests/execute.md} +4 -3
- package/.agent-src/commands/tests.md +44 -0
- package/.agent-src/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md +72 -0
- package/.agent-src/contexts/communication/rules-auto/augment-portability-mechanics.md +79 -0
- package/.agent-src/contexts/communication/rules-auto/augment-source-of-truth-mechanics.md +98 -0
- package/.agent-src/contexts/communication/rules-auto/cli-output-handling-mechanics.md +87 -0
- package/.agent-src/contexts/communication/rules-auto/command-suggestion-policy-mechanics.md +62 -0
- package/.agent-src/contexts/communication/rules-auto/docs-sync-mechanics.md +78 -0
- package/.agent-src/contexts/communication/rules-auto/package-ci-checks-mechanics.md +85 -0
- package/.agent-src/contexts/communication/rules-auto/review-routing-awareness-mechanics.md +65 -0
- package/.agent-src/contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md +78 -0
- package/.agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +62 -0
- package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +55 -0
- package/.agent-src/contexts/communication/rules-auto/ui-audit-gate-mechanics.md +53 -0
- package/.agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +77 -0
- package/.agent-src/contexts/judges/no-consolidate-rationale.md +102 -0
- package/.agent-src/contexts/judges/persona-voice-rubric.md +140 -0
- package/.agent-src/rules/artifact-engagement-recording.md +13 -69
- package/.agent-src/rules/ask-when-uncertain.md +27 -42
- package/.agent-src/rules/augment-portability.md +15 -61
- package/.agent-src/rules/augment-source-of-truth.md +27 -93
- package/.agent-src/rules/cli-output-handling.md +10 -76
- package/.agent-src/rules/command-suggestion-policy.md +18 -59
- package/.agent-src/rules/commit-conventions.md +17 -14
- package/.agent-src/rules/context-hygiene.md +6 -0
- package/.agent-src/rules/direct-answers.md +35 -59
- package/.agent-src/rules/docker-commands.md +5 -5
- package/.agent-src/rules/docs-sync.md +15 -69
- package/.agent-src/rules/language-and-tone.md +48 -72
- package/.agent-src/rules/missing-tool-handling.md +28 -22
- package/.agent-src/rules/no-cheap-questions.md +39 -53
- package/.agent-src/rules/no-roadmap-references.md +73 -0
- package/.agent-src/rules/onboarding-gate.md +7 -0
- package/.agent-src/rules/package-ci-checks.md +21 -61
- package/.agent-src/rules/preservation-guard.md +64 -29
- package/.agent-src/rules/review-routing-awareness.md +24 -43
- package/.agent-src/rules/roadmap-progress-sync.md +31 -65
- package/.agent-src/rules/rule-type-governance.md +28 -0
- package/.agent-src/rules/security-sensitive-stop.md +8 -8
- package/.agent-src/rules/skill-quality.md +16 -48
- package/.agent-src/rules/slash-command-routing-policy.md +7 -4
- package/.agent-src/rules/think-before-action.md +52 -42
- package/.agent-src/rules/tool-safety.md +19 -16
- package/.agent-src/rules/ui-audit-gate.md +24 -38
- package/.agent-src/rules/user-interaction.md +13 -68
- package/.agent-src/skills/ai-council/SKILL.md +2 -0
- package/.agent-src/skills/api-testing/SKILL.md +1 -1
- package/.agent-src/skills/check-refs/SKILL.md +59 -40
- package/.agent-src/skills/conventional-commits-writing/SKILL.md +86 -28
- package/.agent-src/skills/copilot-agents-optimization/SKILL.md +5 -5
- package/.agent-src/skills/developer-like-execution/SKILL.md +4 -4
- package/.agent-src/skills/finishing-a-development-branch/SKILL.md +101 -65
- package/.agent-src/skills/flux/SKILL.md +30 -10
- package/.agent-src/skills/github-ci/SKILL.md +2 -2
- package/.agent-src/skills/judge-code-quality/SKILL.md +7 -8
- package/.agent-src/skills/judge-security-auditor/SKILL.md +4 -5
- package/.agent-src/skills/judge-test-coverage/SKILL.md +3 -4
- package/.agent-src/skills/lint-skills/SKILL.md +57 -39
- package/.agent-src/skills/md-language-check/SKILL.md +61 -39
- package/.agent-src/skills/override-management/SKILL.md +5 -5
- package/.agent-src/skills/quality-tools/SKILL.md +2 -2
- package/.agent-src/skills/react-shadcn-ui/SKILL.md +116 -43
- package/.agent-src/skills/readme-reviewer/SKILL.md +30 -29
- package/.agent-src/skills/readme-writing/SKILL.md +78 -53
- package/.agent-src/skills/readme-writing-package/SKILL.md +50 -47
- package/.agent-src/skills/receiving-code-review/SKILL.md +52 -47
- package/.agent-src/skills/refine-prompt/SKILL.md +0 -1
- package/.agent-src/skills/requesting-code-review/SKILL.md +35 -30
- package/.agent-src/skills/security/SKILL.md +7 -2
- package/.agent-src/skills/security-audit/SKILL.md +7 -3
- package/.agent-src/skills/systematic-debugging/SKILL.md +68 -60
- package/.agent-src/skills/test-driven-development/SKILL.md +59 -57
- package/.agent-src/skills/test-performance/SKILL.md +0 -1
- package/.agent-src/skills/traefik/SKILL.md +4 -4
- package/.agent-src/skills/verify-completion-evidence/SKILL.md +28 -26
- package/.agent-src/templates/roadmaps.md +4 -0
- package/.claude-plugin/marketplace.json +22 -11
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +125 -1
- package/README.md +18 -17
- package/docs/architecture.md +4 -6
- package/docs/catalog.md +67 -39
- package/docs/contracts/STABILITY.md +13 -7
- package/docs/contracts/adr-chat-history-split.md +1 -3
- package/docs/contracts/adr-command-suggestion.md +0 -2
- package/docs/contracts/adr-implement-ticket-runtime.md +1 -2
- package/docs/contracts/adr-product-ui-track.md +3 -6
- package/docs/contracts/adr-prompt-driven-execution.md +3 -4
- package/docs/contracts/agent-memory-contract.md +6 -11
- package/docs/contracts/artifact-engagement-flow.md +6 -9
- package/docs/contracts/command-clusters.md +56 -46
- package/docs/contracts/command-suggestion-flow.md +1 -3
- package/docs/contracts/context-paths.md +99 -0
- package/docs/contracts/file-ownership-matrix.json +6722 -0
- package/docs/contracts/file-ownership-matrix.md +134 -0
- package/docs/contracts/implement-ticket-flow.md +6 -9
- package/docs/contracts/linear-ai-rules-inclusion.md +0 -1
- package/docs/contracts/linear-ai-three-layers.md +0 -2
- package/docs/contracts/load-context-budget-model.md +258 -0
- package/docs/contracts/load-context-schema.md +21 -3
- package/docs/contracts/roadmap-complexity-standard.md +137 -0
- package/docs/contracts/rule-interactions.md +0 -1
- package/docs/contracts/rule-priority-hierarchy.md +1 -1
- package/docs/contracts/ui-track-flow.md +7 -17
- package/docs/customization.md +2 -0
- package/docs/getting-started.md +5 -4
- package/docs/guidelines/agent-infra/ask-when-uncertain-demos.md +134 -0
- package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +100 -0
- package/docs/guidelines/agent-infra/direct-answers-demos.md +145 -0
- package/docs/guidelines/agent-infra/verify-before-complete-demos.md +128 -0
- package/package.json +1 -1
- package/scripts/_phase2_shim_helper.py +109 -0
- package/scripts/agent-config +30 -0
- package/scripts/ai_council/one_off_archive/2026-05/README.md +45 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_2a4_acceptance.py +208 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_budget_v2_audit.py +206 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_context_layer_v1_estimate.py +67 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_context_layer_v1_review.py +292 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_followups_review.py +259 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_nondestructive_inline_audit.py +209 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase4_dispatch_latency.py +108 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase6_trigger_jaccard.py +92 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase_2a_budget_rebalance.py +257 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase_2a_post_revert.py +197 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_rule_hardening_v1.py +251 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_open_questions.py +232 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_optimization.py +144 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_v3_gaps.py +252 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_v3_review.py +240 -0
- package/scripts/build_rule_trigger_matrix.py +360 -0
- package/scripts/check_always_budget.py +402 -45
- package/scripts/check_cluster_patterns.py +159 -0
- package/scripts/check_command_count_messaging.py +14 -7
- package/scripts/check_context_paths.py +201 -0
- package/scripts/check_no_roadmap_refs.py +155 -0
- package/scripts/check_one_off_location.py +81 -0
- package/scripts/check_phase_coupling.py +148 -0
- package/scripts/check_portability.py +2 -0
- package/scripts/check_references.py +35 -2
- package/scripts/check_safety_floor_untouched.py +125 -0
- package/scripts/command_suggester/loader.py +4 -1
- package/scripts/compress.py +64 -15
- package/scripts/context_hygiene_hook.py +173 -0
- package/scripts/generate_index.py +6 -2
- package/scripts/generate_ownership_matrix.py +323 -0
- package/scripts/hooks/augment-context-hygiene.sh +55 -0
- package/scripts/hooks/augment-onboarding-gate.sh +55 -0
- package/scripts/hooks/augment-roadmap-progress.sh +57 -0
- package/scripts/install.py +105 -45
- package/scripts/lint_examples.py +98 -0
- package/scripts/lint_no_new_atomic_commands.py +12 -11
- package/scripts/lint_roadmap_complexity.py +127 -0
- package/scripts/onboarding_gate_hook.py +137 -0
- package/scripts/requirements-evals.txt +1 -0
- package/scripts/roadmap_progress_hook.py +159 -0
- package/scripts/schemas/command.schema.json +4 -3
- package/scripts/schemas/rule.schema.json +5 -0
- package/scripts/skill_linter.py +1 -0
- package/scripts/sync_agent_settings.py +25 -2
- package/scripts/update_counts.py +7 -0
- /package/scripts/ai_council/{_one_off_rebalancing_audit.py → one_off_archive/2026-05/_one_off_rebalancing_audit.py} +0 -0
- /package/scripts/ai_council/{_one_off_roundtrip.py → one_off_archive/2026-05/_one_off_roundtrip.py} +0 -0
|
@@ -3,6 +3,8 @@ type: "auto"
|
|
|
3
3
|
description: "Any touch to agents/roadmaps/ — create/rename/delete/move, edit checkboxes ([x]/[~]/[-]), add/rename/remove phases — must regenerate dashboard and archive if 0 open items, same response"
|
|
4
4
|
alwaysApply: false
|
|
5
5
|
source: package
|
|
6
|
+
load_context:
|
|
7
|
+
- .agent-src.uncompressed/contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
<!-- cloud_safe: degrade -->
|
|
@@ -10,6 +12,11 @@ source: package
|
|
|
10
12
|
|
|
11
13
|
# Roadmap Progress Sync
|
|
12
14
|
|
|
15
|
+
> **Enforced by:** [`scripts/roadmap_progress_hook.py`](../../scripts/roadmap_progress_hook.py)
|
|
16
|
+
> on Augment + Claude Code (`PostToolUse`). Hook is primary; the prose
|
|
17
|
+
> below is the specification the hook implements and the fallback when
|
|
18
|
+
> the platform has no hook surface.
|
|
19
|
+
|
|
13
20
|
## Iron Law — dashboard sync
|
|
14
21
|
|
|
15
22
|
```
|
|
@@ -88,32 +95,27 @@ roadmap left under `agents/roadmaps/` is a rule violation, not an
|
|
|
88
95
|
optional cleanup. See `roadmap-management` skill for the archive vs
|
|
89
96
|
skipped decision table.
|
|
90
97
|
|
|
91
|
-
##
|
|
98
|
+
## Agent-authored roadmaps — placement is mandatory
|
|
92
99
|
|
|
93
|
-
```
|
|
94
|
-
|
|
100
|
+
```
|
|
101
|
+
A FILE THE AGENT DROPS INTO agents/roadmaps/ MUST EITHER
|
|
102
|
+
(a) PASS check_roadmap_trackable.py AND LAND IN THE DASHBOARD, OR
|
|
103
|
+
(b) NOT BE IN agents/roadmaps/ AT ALL.
|
|
104
|
+
NO "DECISION MATRIX" / "DESIGN NOTE" SHORTCUT.
|
|
95
105
|
```
|
|
96
106
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
`node_modules/@event4u/agent-config/` or `vendor/event4u/agent-config/`.
|
|
100
|
-
No global tooling required.
|
|
101
|
-
|
|
102
|
-
## Triggers
|
|
107
|
+
When the agent autonomously creates a roadmap, it owns the placement
|
|
108
|
+
in the **same response**:
|
|
103
109
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
| **Rename or delete a roadmap file** | regenerate dashboard |
|
|
108
|
-
| Mark step `[x]`, `[~]`, `[-]`, or unmark back to `[ ]` | regenerate dashboard |
|
|
109
|
-
| Add, rename, or remove a phase | regenerate dashboard |
|
|
110
|
-
| **Last `[ ]` flips** — roadmap reaches `count_open == 0` | `git mv` → `archive/` (or `skipped/`) **then** regenerate dashboard |
|
|
111
|
-
| Move roadmap between `roadmaps/` ↔ `archive/` ↔ `skipped/` | regenerate dashboard |
|
|
110
|
+
- **Phase plan** (checkboxes, multi-turn execution) → `agents/roadmaps/<name>.md`, `status: ready` (default), regen dashboard.
|
|
111
|
+
- **Decision matrix / ADR / pattern / lookup** (no `Phase N`, durable rationale) → `agents/contexts/<name>.md`.
|
|
112
|
+
- **Completed work snapshot** → `agents/roadmaps/archive/<name>.md`.
|
|
112
113
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
A non-trackable file in `agents/roadmaps/` is a rule violation — the
|
|
115
|
+
trackable CI fails it, the dashboard hides it. The agent that
|
|
116
|
+
created it moves it the same response. If the autonomous run also
|
|
117
|
+
**finishes** the roadmap within the session (every box `[x]`/`[~]`/`[-]`),
|
|
118
|
+
the completion-archival rule above fires too — same response.
|
|
117
119
|
|
|
118
120
|
## Autonomous execution — checkbox cadence
|
|
119
121
|
|
|
@@ -146,47 +148,11 @@ user sees one row move from `[ ]` to `[~]` to `[x]` instead of
|
|
|
146
148
|
silent rows. `[~]` is treated as open for `count_open` but moves
|
|
147
149
|
the phase percentage forward in the dashboard.
|
|
148
150
|
|
|
149
|
-
##
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
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.
|
|
158
|
-
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.
|
|
159
|
-
|
|
160
|
-
Any "yes" + no regen run = rule violation. Rerun before sending.
|
|
161
|
-
|
|
162
|
-
## Failure modes
|
|
163
|
-
|
|
164
|
-
- **Created the roadmap, marked Phase 1 done across multiple turns,
|
|
165
|
-
never regenerated** — dashboard silently lies "this roadmap does
|
|
166
|
-
not exist" to the next reader. Canonical failure of this rule;
|
|
167
|
-
the rule was hardened in response to it.
|
|
168
|
-
- **Regenerated yesterday, edited today, "I'll regen at session
|
|
169
|
-
end"** — session ends from a crash, regen never lands.
|
|
170
|
-
- **Closed a roadmap (last `[ ]` → `[x]`) and regenerated before
|
|
171
|
-
`git mv`** — the closed roadmap reappears in "Open roadmaps".
|
|
172
|
-
- **Edited the dashboard by hand to "fix it quickly"** — next regen
|
|
173
|
-
overwrites the manual edit; no audit trail of why.
|
|
174
|
-
- **Autonomous run, four steps shipped across four turns, dashboard
|
|
175
|
-
flat the whole time, single regen at the end** — user lost
|
|
176
|
-
progress visibility for the entire run. Each completed step must
|
|
177
|
-
flip its checkbox in the reply that ships it.
|
|
178
|
-
- **Decision-only roadmap shipped without checkboxes** — file
|
|
179
|
-
contains decisions / ICE / block-sequencing but zero `- [ ]`,
|
|
180
|
-
dashboard shows `0/0` or omits it. Pair with a `## Phase N`
|
|
181
|
-
section or mark `status: draft` (CI catches this now).
|
|
182
|
-
- **Headings off-canon (`### P0 #N`, `## Block A`, `### Sequencing
|
|
183
|
-
— Phase 1`)** — `PHASE_RE` skips them, roadmap invisible to the
|
|
184
|
-
dashboard. Rename to `## Phase <id>` or mark `status: draft`.
|
|
185
|
-
|
|
186
|
-
## Do NOT
|
|
187
|
-
|
|
188
|
-
- Do NOT edit `agents/roadmaps-progress.md` by hand — always regenerate.
|
|
189
|
-
- Do NOT defer the regen to "next commit" or "before push" — same response.
|
|
190
|
-
- Do NOT rely on CI (`--check` mode) as the first line of defence — CI is last-line, not real-time.
|
|
191
|
-
- Do NOT skip the regen because "only one checkbox changed" — the dashboard aggregates counts and phase percentages that shift on single edits.
|
|
192
|
-
- Do NOT leave a 100%-complete roadmap in `agents/roadmaps/` "for review" — `git mv` to archive **before** regenerating, otherwise it reappears in "Open roadmaps".
|
|
151
|
+
## Mechanics — triggers, regen command, self-check, failures
|
|
152
|
+
|
|
153
|
+
The triggers table, the regen command (`./agent-config roadmap:progress`),
|
|
154
|
+
the mandatory pre-send self-check, the failure-mode catalog, and the
|
|
155
|
+
`Do NOT` list live in
|
|
156
|
+
[`contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md`](../contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md).
|
|
157
|
+
Pull it whenever a trigger fires — the rule above is the obligation
|
|
158
|
+
surface; the mechanics file is the lookup material.
|
|
@@ -44,3 +44,31 @@ The `description` field IS the trigger. It must describe **when** the rule appli
|
|
|
44
44
|
- Default to `auto`. Justify `always`.
|
|
45
45
|
- If >50% of conversations don't need a rule → it must be `auto`.
|
|
46
46
|
- `optimize-agents` command checks this and suggests changes.
|
|
47
|
+
|
|
48
|
+
## Hardening tier — required on new or edited rules
|
|
49
|
+
|
|
50
|
+
Every new rule, and every edited rule whose body changes the trigger
|
|
51
|
+
or the obligation, MUST classify itself against the hardening tiers
|
|
52
|
+
documented in [`rule-trigger-matrix.md`](../../agents/contexts/rule-trigger-matrix.md):
|
|
53
|
+
|
|
54
|
+
| Tier | Meaning |
|
|
55
|
+
|---|---|
|
|
56
|
+
| `1` | Mechanically enforceable — hook acts, rule body stays minimal. |
|
|
57
|
+
| `2a` | Marker nudge — hook injects signal, agent acts on it. |
|
|
58
|
+
| `2b` | Structured injection / tool-call gate — hook reads/writes state, may deny. |
|
|
59
|
+
| `3` | Soft, judgment-bound — no platform surface; self-check rule. |
|
|
60
|
+
| `safety-floor` | Iron-Law subset, never modified. |
|
|
61
|
+
| `mechanical-already` | Precedent — script enforces, rule body documents. |
|
|
62
|
+
|
|
63
|
+
Classification surface: the optional `tier:` frontmatter field
|
|
64
|
+
(declared in `scripts/schemas/rule.schema.json`). Recommended for new
|
|
65
|
+
rules; bulk-retrofit of existing rules is tracked separately.
|
|
66
|
+
|
|
67
|
+
Tier 3 dispositions are recorded centrally in
|
|
68
|
+
[`agents/contexts/tier-3-dispositions.md`](../../agents/contexts/tier-3-dispositions.md)
|
|
69
|
+
with a 6-month re-audit clock. New Tier 3 rules append to that list
|
|
70
|
+
on landing.
|
|
71
|
+
|
|
72
|
+
The `optimize-agents` command checks the tier alongside `type`/`source`
|
|
73
|
+
and suggests escalations when a rule's trigger matches a hardening
|
|
74
|
+
opportunity that has shipped since the rule was authored.
|
|
@@ -41,8 +41,8 @@ STOP writing code. Run the matching analysis skill first:
|
|
|
41
41
|
| Data flows to logs / API / external | `data-flow-mapper` |
|
|
42
42
|
| Wide refactor of security-sensitive code | `blast-radius-analyzer` |
|
|
43
43
|
|
|
44
|
-
**Before the analysis, consult memory for prior incidents** on
|
|
45
|
-
surface. Via [`memory-access`](../../docs/guidelines/agent-infra/memory-access.md):
|
|
44
|
+
**Before running the analysis, consult memory for prior incidents** on
|
|
45
|
+
this surface. Via [`memory-access`](../../docs/guidelines/agent-infra/memory-access.md):
|
|
46
46
|
|
|
47
47
|
```python
|
|
48
48
|
from scripts.memory_lookup import retrieve
|
|
@@ -53,14 +53,14 @@ priors = retrieve(
|
|
|
53
53
|
)
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
A prior security incident on the same path is the cheapest
|
|
57
|
-
threat pass — cite any matching `id`
|
|
58
|
-
regression test ships with the fix.
|
|
56
|
+
A prior security incident on the same path is the cheapest possible
|
|
57
|
+
input to a threat pass — cite any matching `id` in the analysis output
|
|
58
|
+
so the required control or regression test ships with the fix.
|
|
59
59
|
|
|
60
60
|
Capture the analysis output (abuse cases, missing controls, required
|
|
61
|
-
negative tests) — implement against that list, not your first
|
|
62
|
-
Never silently fall back to editing without the analysis; if
|
|
63
|
-
ask the user.
|
|
61
|
+
negative tests) — implement against that list, not against your first
|
|
62
|
+
instinct. Never silently fall back to editing without the analysis; if
|
|
63
|
+
it is blocked, ask the user.
|
|
64
64
|
|
|
65
65
|
## When NOT to fire
|
|
66
66
|
|
|
@@ -3,6 +3,8 @@ type: "auto"
|
|
|
3
3
|
description: "Creating, editing, or reviewing skills — minimum quality standard, every skill must be executable, validated, and self-contained"
|
|
4
4
|
alwaysApply: false
|
|
5
5
|
source: package
|
|
6
|
+
load_context:
|
|
7
|
+
- .agent-src.uncompressed/contexts/communication/rules-auto/skill-quality-mechanics.md
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
# Skill Quality
|
|
@@ -30,26 +32,13 @@ and fail `python3 scripts/validate_frontmatter.py` and the full CI pipeline.
|
|
|
30
32
|
|
|
31
33
|
## Description Triggering
|
|
32
34
|
|
|
33
|
-
Claude routes skills by
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- Name 2+ concrete triggers — domains, symptoms, file types, user phrasing.
|
|
41
|
-
- End with: `... even if they don't explicitly ask for \`<skill-name>\`.`
|
|
42
|
-
- Avoid hedges: `may help with`, `can be useful for`, `covers various`.
|
|
43
|
-
- **Keep it ≤ 200 characters.** `scripts/skill_linter.py` warns at
|
|
44
|
-
`description_too_long` above this. If the pushy tail pushes you over, cut
|
|
45
|
-
adjectives, drop the second example phrasing, or collapse a list — do
|
|
46
|
-
**not** drop the trigger vocabulary or the `even if ...` tail.
|
|
47
|
-
|
|
48
|
-
Source: [`skills/skill-creator` in `anthropics/skills`](https://github.com/anthropics/skills/blob/main/skills/skill-creator/SKILL.md).
|
|
49
|
-
|
|
50
|
-
**Litmus test:** Read the description cold, without the skill's body. If you
|
|
51
|
-
cannot name at least two phrasings a user would realistically type that should
|
|
52
|
-
route to this skill, the description is too polite. Rewrite it.
|
|
35
|
+
Claude routes skills by their frontmatter `description`. Pushy,
|
|
36
|
+
trigger-rich descriptions are required — polite or hedged ones cause
|
|
37
|
+
undertriggering. The full recipe (concrete verb phrase, ≥2 triggers,
|
|
38
|
+
`even if they don't explicitly ask for …` tail, ≤200 chars,
|
|
39
|
+
litmus test) lives in
|
|
40
|
+
[`contexts/communication/rules-auto/skill-quality-mechanics.md`](../contexts/communication/rules-auto/skill-quality-mechanics.md)
|
|
41
|
+
§ Description Triggering.
|
|
53
42
|
|
|
54
43
|
## Skill Independence
|
|
55
44
|
|
|
@@ -64,35 +53,14 @@ If a skill is not executable without opening a guideline, it is broken.
|
|
|
64
53
|
**Litmus test:** Cover all guideline references in the Procedure. Is it still executable?
|
|
65
54
|
If not → the skill needs more own steps, decisions, and validation — not more guideline links.
|
|
66
55
|
|
|
67
|
-
## Merge Preservation
|
|
68
|
-
|
|
69
|
-
When merging or refactoring skills, the merged result MUST preserve:
|
|
70
|
-
|
|
71
|
-
1. **Strongest validation** from each source skill
|
|
72
|
-
2. **Strongest example** (good/bad contrast) from each source
|
|
73
|
-
3. **Strongest anti-pattern** from each source
|
|
74
|
-
4. **All concrete decision criteria** that differ between sources
|
|
75
|
-
|
|
76
|
-
A merge is invalid if:
|
|
77
|
-
- Validation got weaker than the strongest source
|
|
78
|
-
- Examples were lost without replacement
|
|
79
|
-
- Anti-pattern coverage decreased
|
|
80
|
-
- The merged skill became a generic umbrella doc
|
|
81
|
-
|
|
82
|
-
## Compression Preservation
|
|
83
|
-
|
|
84
|
-
When compressing a skill, the compressed version MUST preserve:
|
|
85
|
-
|
|
86
|
-
- Trigger quality (description + When to use)
|
|
87
|
-
- All procedure steps that contain decisions
|
|
88
|
-
- All concrete validation checks
|
|
89
|
-
- All gotchas and anti-patterns
|
|
90
|
-
- Strongest example (at minimum one good/bad contrast)
|
|
56
|
+
## Merge & Compression Preservation
|
|
91
57
|
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
58
|
+
When merging or compressing skills, the result MUST preserve the
|
|
59
|
+
strongest validation, strongest examples, all anti-patterns, all
|
|
60
|
+
decision criteria, and trigger quality. Full preservation invariants
|
|
61
|
+
and "merge is invalid if …" / "compression may remove …" lists in
|
|
62
|
+
[`contexts/communication/rules-auto/skill-quality-mechanics.md`](../contexts/communication/rules-auto/skill-quality-mechanics.md)
|
|
63
|
+
§ Merge Preservation and § Compression Preservation.
|
|
96
64
|
|
|
97
65
|
## Refactor Safety
|
|
98
66
|
|
|
@@ -3,6 +3,8 @@ type: "auto"
|
|
|
3
3
|
description: "When user types a slash command like /create-pr, /commit, or pastes command file content"
|
|
4
4
|
alwaysApply: false
|
|
5
5
|
source: package
|
|
6
|
+
load_context:
|
|
7
|
+
- .agent-src.uncompressed/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
# Commands
|
|
@@ -22,9 +24,10 @@ When the user types a command (`/create-pr`, `# create-pr`, or pastes a command
|
|
|
22
24
|
|
|
23
25
|
## Open files are irrelevant for command detection
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
The editor may report that the user has a file open (e.g., "The user has file `compress.md` open").
|
|
28
|
+
This is **irrelevant** for command detection.
|
|
26
29
|
|
|
27
|
-
- `/compress
|
|
28
|
-
-
|
|
30
|
+
- If the user types `/compress`, they want to **run** the compress command — even if `compress.md` is open in the editor.
|
|
31
|
+
- If command file content appears in the context alongside an open file, the **command invocation takes priority**.
|
|
29
32
|
- Do NOT confuse "file is open" with "user wants to discuss this file".
|
|
30
|
-
-
|
|
33
|
+
- The user's typed message determines intent — not editor state.
|
|
@@ -16,77 +16,87 @@ source: package
|
|
|
16
16
|
- If requirements are unclear, ask a precise clarification question instead of making hidden assumptions
|
|
17
17
|
- Refactors must preserve behavior, validation, examples, and anti-failure guidance unless there is an explicit reason to change them
|
|
18
18
|
- Do NOT modify code you do not fully understand — read it first, trace the flow, then change it
|
|
19
|
-
-
|
|
19
|
+
- When multiple valid frameworks/patterns already exist in the codebase (e.g. Tailwind + Flux, multiple form libraries, competing state stores), do NOT pick one silently — ask which to use. See [`no blind implementation`](../../docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md#2-no-blind-implementation)
|
|
20
20
|
|
|
21
21
|
## The Developer Workflow
|
|
22
22
|
|
|
23
|
-
Work like a real developer. Follow this order strictly:
|
|
23
|
+
Work like a real developer — not a text generator. Follow this order strictly:
|
|
24
24
|
|
|
25
|
-
1. **Understand** — Read task, ticket, acceptance criteria.
|
|
26
|
-
2. **Analyze** — Read affected code, trace data flow, compare with requirements.
|
|
27
|
-
3. **Plan** —
|
|
28
|
-
4. **Implement** —
|
|
29
|
-
5. **Verify** — Run tests, hit endpoint, check UI. Real execution, not "should work".
|
|
25
|
+
1. **Understand** — Read the task, ticket, acceptance criteria. If unclear: ask, don't assume.
|
|
26
|
+
2. **Analyze** — Read affected code, trace data flow, compare with requirements and existing patterns.
|
|
27
|
+
3. **Plan** — Decide what to change, what NOT to change, and how to verify success.
|
|
28
|
+
4. **Implement** — Make focused changes. Follow existing patterns. No unrelated rewrites.
|
|
29
|
+
5. **Verify** — Run tests, hit the endpoint, check the UI. Real execution, not "should work".
|
|
30
30
|
|
|
31
|
-
Skipping steps 1-3
|
|
31
|
+
Skipping steps 1-3 is the #1 cause of wrong implementations and wasted retries.
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Minimum read set — read before you write
|
|
34
34
|
|
|
35
|
-
Before
|
|
36
|
-
[`memory-access`](../../docs/guidelines/agent-infra/memory-access.md):
|
|
35
|
+
Before editing code, read the minimum set that defines its behavior:
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
limit=3,
|
|
44
|
-
)
|
|
45
|
-
```
|
|
37
|
+
1. **Symbol under edit** — full method/function body, not just the planned line.
|
|
38
|
+
2. **Direct callers** — one level up (`grep -rn "<symbol>"` + open the matches).
|
|
39
|
+
3. **Tests** — if a test file exists, it encodes the contract.
|
|
40
|
+
4. **One layer of related abstractions** — interface, parent class, or trait (one hop, not the full hierarchy).
|
|
41
|
+
5. **Data changes:** the migration that created the column + any seeder/factory that references it.
|
|
46
42
|
|
|
43
|
+
Stop expanding once you can explain, in your own words, what the symbol does, who calls
|
|
44
|
+
it, and what breaks if you change its behavior. If you cannot → read more. Never write
|
|
45
|
+
code based on guessed behavior.
|
|
46
|
+
|
|
47
|
+
### Consult memory before editing
|
|
48
|
+
|
|
49
|
+
Prior decisions and invariants live in the memory layer. Via
|
|
50
|
+
[`memory-access`](../../docs/guidelines/agent-infra/memory-access.md), call
|
|
51
|
+
`retrieve(types=["architecture-decisions", "domain-invariants"], keys=<touched paths>, limit=3)`.
|
|
47
52
|
A matching `architecture-decision` explains *why* the current shape
|
|
48
53
|
exists; a matching `domain-invariant` is a hard constraint you cannot
|
|
49
|
-
violate. Cite the `id` if a match influences the plan.
|
|
50
|
-
overhead; proceed.
|
|
54
|
+
violate. Cite the `id` if a match influences the plan.
|
|
51
55
|
|
|
52
56
|
## Verify with real tools
|
|
53
57
|
|
|
58
|
+
Always verify changes with actual execution — not by reading code and assuming it works.
|
|
59
|
+
|
|
54
60
|
| What changed | How to verify |
|
|
55
61
|
|---|---|
|
|
56
|
-
| **Backend/API** | `curl`, Postman (or Postman MCP), test endpoint |
|
|
57
|
-
| **Frontend/UI** | Playwright MCP or browser — rendered state, interactions |
|
|
58
|
-
| **Logic/flow** | Xdebug (or Xdebug MCP) — trace execution, inspect variables |
|
|
59
|
-
| **CLI/Jobs** | Run command, check side effects, exit code |
|
|
60
|
-
| **Database** | Query result, check migrations |
|
|
62
|
+
| **Backend/API** | `curl`, Postman (or Postman MCP if available), test endpoint |
|
|
63
|
+
| **Frontend/UI** | Playwright MCP or browser — check rendered state, interactions |
|
|
64
|
+
| **Logic/flow** | Xdebug (or Xdebug MCP if available) — trace execution, inspect variables |
|
|
65
|
+
| **CLI/Jobs** | Run the command, check side effects, verify exit code |
|
|
66
|
+
| **Database** | Query the result, check migrations ran correctly |
|
|
61
67
|
|
|
62
|
-
If debugging/testing tool available as MCP server — prefer it.
|
|
68
|
+
If a debugging/testing tool is available as MCP server — prefer it over manual alternatives.
|
|
63
69
|
|
|
64
|
-
If verification not possible
|
|
70
|
+
If verification is not possible (no endpoint, no UI, no test): explicitly state what is missing
|
|
71
|
+
and explain how the change should be tested.
|
|
65
72
|
|
|
66
73
|
## Reduce output — targeted tools over full dumps
|
|
67
74
|
|
|
68
75
|
Never load full datasets into context. Extract what you need:
|
|
69
76
|
|
|
70
|
-
- `jq` for JSON: `curl -s /api/users | jq '.[0] | {id, email}'`
|
|
71
|
-
- `rg` / `grep` for text
|
|
72
|
-
- `head`, `tail`, `cut`, `sort`, `uniq`
|
|
73
|
-
- `--filter`, `--json`, `--format` flags on CLI tools
|
|
74
|
-
-
|
|
77
|
+
- `jq` for JSON: `curl -s /api/users | jq '.[0] | {id, email}'` — not the full response
|
|
78
|
+
- `rg` / `grep` for text: search specific patterns, not full files
|
|
79
|
+
- `head`, `tail`, `cut`, `sort`, `uniq` for narrowing results
|
|
80
|
+
- `--filter`, `--json`, `--format` flags on CLI tools — use them
|
|
81
|
+
- Laravel: `route:list --json | jq` over raw `route:list` dump
|
|
82
|
+
- Logs: filter by request ID, timestamp, or error type — not full log files
|
|
75
83
|
|
|
76
84
|
## No blind retries
|
|
77
85
|
|
|
78
|
-
-
|
|
79
|
-
- Do NOT retry same approach hoping for different result
|
|
80
|
-
- Do NOT loop trial-and-error when one inspection
|
|
81
|
-
- Max 2 retries same approach — then stop and rethink
|
|
86
|
+
- If something fails: **read the error**, analyze the cause, then fix it
|
|
87
|
+
- Do NOT retry the same approach hoping for a different result
|
|
88
|
+
- Do NOT loop through trial-and-error when one targeted inspection would reveal the cause
|
|
89
|
+
- Max 2 retries for the same approach — then stop and rethink
|
|
82
90
|
|
|
83
91
|
## Open files are context, not intent
|
|
84
92
|
|
|
85
|
-
The editor may report
|
|
93
|
+
The editor may report that the user has a file open. This is **background context only** —
|
|
94
|
+
it does NOT mean the user's message is about that file.
|
|
86
95
|
|
|
87
|
-
- **
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
- Only treat open file as relevant when the user explicitly references it
|
|
96
|
+
- **The user's message determines intent** — not which file is open.
|
|
97
|
+
- A user can have `README.md` open and type `/compress` — the intent is to compress, not to discuss the README.
|
|
98
|
+
- A user can have `UserController.php` open and ask "how do tests work?" — the intent is testing, not the controller.
|
|
99
|
+
- Only treat the open file as relevant when the user's message explicitly references it
|
|
100
|
+
(e.g., "fix this file", "what does this do?", "update the open file").
|
|
91
101
|
|
|
92
102
|
If analysis is skipped → results are unreliable.
|
|
@@ -6,31 +6,34 @@ description: "When a skill uses external tools — enforce allowlist, deny-by-de
|
|
|
6
6
|
|
|
7
7
|
# Tool Safety
|
|
8
8
|
|
|
9
|
+
## Core principle
|
|
10
|
+
|
|
9
11
|
Tools are permissions, not abilities. Every tool access must be declared and reviewable.
|
|
10
12
|
|
|
11
13
|
## Constraints
|
|
12
14
|
|
|
13
|
-
- **Deny by default** — no access unless in `allowed_tools`
|
|
14
|
-
- **Allowlist only** — names must match tool registry
|
|
15
|
-
- **Read-first** — write requires explicit approval
|
|
16
|
-
- **No hidden credentials** —
|
|
17
|
-
- **No arbitrary execution** — adapters have fixed interfaces
|
|
18
|
-
- **Audit trail** — tool usage
|
|
15
|
+
- **Deny by default** — no tool access unless explicitly listed in `allowed_tools`
|
|
16
|
+
- **Allowlist only** — tool names must match the tool registry
|
|
17
|
+
- **Read-first** — prefer read-only actions; write requires explicit approval
|
|
18
|
+
- **No hidden credentials** — tools must not embed API keys or tokens in skill files
|
|
19
|
+
- **No arbitrary execution** — tool adapters have fixed interfaces, not free-form calls
|
|
20
|
+
- **Audit trail** — tool usage should be observable and logged
|
|
19
21
|
|
|
20
22
|
## When this applies
|
|
21
23
|
|
|
22
|
-
- Skills
|
|
23
|
-
- Skills
|
|
24
|
-
-
|
|
24
|
+
- Skills that declare `allowed_tools` in their execution block
|
|
25
|
+
- Skills that reference external APIs (GitHub, Jira, etc.)
|
|
26
|
+
- Any runtime execution that accesses external services
|
|
25
27
|
|
|
26
28
|
## Escalation
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
If a skill needs a tool that is not in the registry:
|
|
31
|
+
1. Do NOT use the tool
|
|
32
|
+
2. Flag it as a suggestion for registry extension
|
|
33
|
+
3. The tool must be added to the registry before use
|
|
31
34
|
|
|
32
|
-
##
|
|
35
|
+
## What this rule does NOT cover
|
|
33
36
|
|
|
34
|
-
- Internal agent capabilities (not external tools
|
|
35
|
-
- MCP server configuration
|
|
36
|
-
- Credential management
|
|
37
|
+
- Internal agent capabilities (file reading, code analysis) — these are not external tools
|
|
38
|
+
- MCP server configuration — handled by the `mcp` skill
|
|
39
|
+
- Credential management — handled by environment configuration
|
|
@@ -3,6 +3,8 @@ type: "auto"
|
|
|
3
3
|
description: "Writing or editing UI — components, screens, partials, layouts, design tokens — require existing-ui-audit findings in state.ui_audit before non-trivial UI change; gate, not suggestion"
|
|
4
4
|
alwaysApply: false
|
|
5
5
|
source: package
|
|
6
|
+
load_context:
|
|
7
|
+
- .agent-src.uncompressed/contexts/communication/rules-auto/ui-audit-gate-mechanics.md
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
# UI-Audit Before Build
|
|
@@ -50,19 +52,6 @@ Any precondition fails at edit time → stop, reclassify as
|
|
|
50
52
|
`ui-improve`, re-enter the gate. Backend-only edits and
|
|
51
53
|
documentation work were never in scope for this rule.
|
|
52
54
|
|
|
53
|
-
## What "audit findings" means
|
|
54
|
-
|
|
55
|
-
`state.ui_audit` is a non-empty dict carrying at least one of:
|
|
56
|
-
|
|
57
|
-
- `components_found` — `{path, name, kind, similarity?}` inventory
|
|
58
|
-
entries from [`existing-ui-audit`](../skills/existing-ui-audit/SKILL.md).
|
|
59
|
-
- `greenfield: true` plus `greenfield_decision` ∈
|
|
60
|
-
`{scaffold, bare, external_reference}`.
|
|
61
|
-
- Legacy `components` alias — back-compat for the same shape.
|
|
62
|
-
|
|
63
|
-
`null`, `{}`, or a dict without those keys is **not** findings;
|
|
64
|
-
emit `@agent-directive: existing-ui-audit` instead of writing code.
|
|
65
|
-
|
|
66
55
|
## What to do when the gate fires
|
|
67
56
|
|
|
68
57
|
1. Stop. Do not open an editor on a component file.
|
|
@@ -74,33 +63,30 @@ emit `@agent-directive: existing-ui-audit` instead of writing code.
|
|
|
74
63
|
external-reference halt **before** code; record the pick in
|
|
75
64
|
`state.ui_audit.greenfield_decision`.
|
|
76
65
|
|
|
66
|
+
## What "audit findings" means
|
|
67
|
+
|
|
68
|
+
`state.ui_audit` is a non-empty dict carrying at least one of:
|
|
69
|
+
|
|
70
|
+
- `components_found` — inventory entries from `existing-ui-audit`.
|
|
71
|
+
- `greenfield: true` plus `greenfield_decision` ∈
|
|
72
|
+
`{scaffold, bare, external_reference}`.
|
|
73
|
+
- Legacy `components` alias — back-compat for the same shape.
|
|
74
|
+
|
|
75
|
+
`null`, `{}`, or a dict without those keys is **not** findings —
|
|
76
|
+
the empty dict is rejected on purpose. An audit that finds nothing
|
|
77
|
+
must record either ≥1 `components_found` or the greenfield branch.
|
|
78
|
+
|
|
77
79
|
## Failure modes
|
|
78
80
|
|
|
79
81
|
- Writing the component first and "thinking about reuse later".
|
|
80
|
-
- Citing a similar-looking component from memory without verifying
|
|
81
|
-
|
|
82
|
-
- Treating `state.ui_audit = {}` as "audit ran, found nothing" —
|
|
83
|
-
empty dict is rejected on purpose; an audit that finds nothing
|
|
84
|
-
must record either ≥1 `components_found` or the greenfield branch.
|
|
82
|
+
- Citing a similar-looking component from memory without verifying.
|
|
83
|
+
- Treating `state.ui_audit = {}` as "audit ran, found nothing".
|
|
85
84
|
- Bypassing the gate for "just one tile".
|
|
86
85
|
|
|
87
|
-
##
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
— code-layer twin; this rule covers the cases where the engine
|
|
95
|
-
is not in the loop.
|
|
96
|
-
- [`existing-ui-audit`](../skills/existing-ui-audit/SKILL.md) — the
|
|
97
|
-
skill that produces the findings.
|
|
98
|
-
|
|
99
|
-
## Cloud Behavior
|
|
100
|
-
|
|
101
|
-
On cloud surfaces the engine is not shipped, so `state.ui_audit`
|
|
102
|
-
does not exist. The Iron Law still applies: take the visible
|
|
103
|
-
inventory of files in conversation context as the audit, and
|
|
104
|
-
surface a one-line audit summary in the reply before writing the
|
|
105
|
-
component. The gate is satisfied by an explicit summary, not by
|
|
106
|
-
silently skipping.
|
|
86
|
+
## Lookup material — see mechanics
|
|
87
|
+
|
|
88
|
+
The full failure-mode catalog, cross-rule interactions, and the
|
|
89
|
+
cloud-surface adaptation live in
|
|
90
|
+
[`contexts/communication/rules-auto/ui-audit-gate-mechanics.md`](../contexts/communication/rules-auto/ui-audit-gate-mechanics.md).
|
|
91
|
+
Pull it whenever the gate fires or the agent is unsure whether a
|
|
92
|
+
recorded `state.ui_audit` qualifies.
|