@event4u/agent-config 1.16.0 → 1.17.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/direct-answers.md +34 -49
- 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 +45 -52
- package/.agent-src/rules/no-roadmap-references.md +73 -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 +10 -71
- 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/.claude-plugin/marketplace.json +22 -11
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +90 -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 +178 -0
- package/docs/contracts/load-context-schema.md +1 -3
- 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/asking-and-brevity-examples.md +100 -0
- package/package.json +1 -1
- package/scripts/_one_off_phase4_dispatch_latency.py +108 -0
- package/scripts/_one_off_phase6_trigger_jaccard.py +92 -0
- package/scripts/_phase2_shim_helper.py +109 -0
- package/scripts/agent-config +10 -0
- package/scripts/ai_council/_one_off_2a4_acceptance.py +208 -0
- package/scripts/ai_council/_one_off_context_layer_v1_estimate.py +67 -0
- package/scripts/ai_council/_one_off_context_layer_v1_review.py +292 -0
- package/scripts/ai_council/_one_off_followups_review.py +259 -0
- package/scripts/ai_council/_one_off_nondestructive_inline_audit.py +209 -0
- package/scripts/ai_council/_one_off_phase_2a_budget_rebalance.py +257 -0
- package/scripts/ai_council/_one_off_phase_2a_post_revert.py +197 -0
- package/scripts/ai_council/_one_off_rule_hardening_v1.py +251 -0
- package/scripts/ai_council/_one_off_structural_open_questions.py +232 -0
- package/scripts/ai_council/_one_off_structural_optimization.py +144 -0
- package/scripts/ai_council/_one_off_structural_v3_gaps.py +252 -0
- package/scripts/ai_council/_one_off_structural_v3_review.py +240 -0
- package/scripts/check_always_budget.py +363 -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_phase_coupling.py +148 -0
- package/scripts/check_portability.py +2 -0
- package/scripts/check_references.py +29 -2
- package/scripts/check_safety_floor_untouched.py +125 -0
- package/scripts/command_suggester/loader.py +4 -1
- package/scripts/compress.py +59 -13
- package/scripts/generate_index.py +6 -2
- package/scripts/generate_ownership_matrix.py +323 -0
- package/scripts/hooks/augment-roadmap-progress.sh +57 -0
- package/scripts/install.py +49 -28
- package/scripts/lint_no_new_atomic_commands.py +12 -11
- 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/skill_linter.py +1 -0
- package/scripts/sync_agent_settings.py +25 -2
- package/scripts/update_counts.py +7 -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 -->
|
|
@@ -88,33 +90,6 @@ roadmap left under `agents/roadmaps/` is a rule violation, not an
|
|
|
88
90
|
optional cleanup. See `roadmap-management` skill for the archive vs
|
|
89
91
|
skipped decision table.
|
|
90
92
|
|
|
91
|
-
## How to regenerate
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
./agent-config roadmap:progress
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
The `./agent-config` wrapper is written into the project root by the
|
|
98
|
-
package installer and delegates to the master CLI inside
|
|
99
|
-
`node_modules/@event4u/agent-config/` or `vendor/event4u/agent-config/`.
|
|
100
|
-
No global tooling required.
|
|
101
|
-
|
|
102
|
-
## Triggers
|
|
103
|
-
|
|
104
|
-
| Edit | Must run, same response |
|
|
105
|
-
|---|---|
|
|
106
|
-
| **Create a new roadmap file** | regenerate dashboard |
|
|
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 |
|
|
112
|
-
|
|
113
|
-
**Batching rule:** if you edit multiple checkboxes in one response, a
|
|
114
|
-
**single** regeneration at the end of that response is enough — but
|
|
115
|
-
the response must not end without it. If one of those edits closes a
|
|
116
|
-
roadmap, archive it first, then run the single regen.
|
|
117
|
-
|
|
118
93
|
## Autonomous execution — checkbox cadence
|
|
119
94
|
|
|
120
95
|
When executing a roadmap autonomously (multi-turn, no per-step user
|
|
@@ -146,47 +121,11 @@ user sees one row move from `[ ]` to `[~]` to `[x]` instead of
|
|
|
146
121
|
silent rows. `[~]` is treated as open for `count_open` but moves
|
|
147
122
|
the phase percentage forward in the dashboard.
|
|
148
123
|
|
|
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".
|
|
124
|
+
## Mechanics — triggers, regen command, self-check, failures
|
|
125
|
+
|
|
126
|
+
The triggers table, the regen command (`./agent-config roadmap:progress`),
|
|
127
|
+
the mandatory pre-send self-check, the failure-mode catalog, and the
|
|
128
|
+
`Do NOT` list live in
|
|
129
|
+
[`contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md`](../contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md).
|
|
130
|
+
Pull it whenever a trigger fires — the rule above is the obligation
|
|
131
|
+
surface; the mechanics file is the lookup material.
|
|
@@ -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.
|
|
@@ -3,6 +3,8 @@ type: "auto"
|
|
|
3
3
|
description: "Asking the user a question, presenting options, or summarizing progress — numbered-options Iron Law, single-recommendation rule, progress indicators"
|
|
4
4
|
alwaysApply: false
|
|
5
5
|
source: package
|
|
6
|
+
load_context:
|
|
7
|
+
- .agent-src.uncompressed/contexts/communication/rules-auto/user-interaction-mechanics.md
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
# User Interaction
|
|
@@ -55,7 +57,7 @@ recommendation line is mandatory.
|
|
|
55
57
|
- Hiding behind "you know the project better"
|
|
56
58
|
- Inline `(recommended)` tag with no follow-up `Recommendation: N` line
|
|
57
59
|
|
|
58
|
-
**Slip handling — same protocol as [`language-and-tone`](language-and-tone.md#
|
|
60
|
+
**Slip handling — same protocol as [`language-and-tone`](language-and-tone.md#slip-handling).**
|
|
59
61
|
User calls out a missing or wrong recommendation → acknowledge once
|
|
60
62
|
in the user's language, rewrite the reply with a recommendation,
|
|
61
63
|
ship. No "from now on" promises — only the next reply proves
|
|
@@ -84,12 +86,11 @@ Mechanical backstop: `python3 scripts/check_reply_consistency.py --stdin < draft
|
|
|
84
86
|
(non-zero exit on any rule above). Self-scan is the primary gate; the
|
|
85
87
|
script is the deterministic safety net for ambiguous cases.
|
|
86
88
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
- **Multi-block reply with one recommendation.** Two options blocks but only one `Empfehlung:` line — the second block is unguarded. Rule 5 above closes this.
|
|
89
|
+
Common failure modes (end-of-turn menu skipped, "no preference"
|
|
90
|
+
hedges, multi-block reply with one recommendation) and the named
|
|
91
|
+
slip catalog live in
|
|
92
|
+
[`contexts/communication/rules-auto/user-interaction-mechanics.md`](../contexts/communication/rules-auto/user-interaction-mechanics.md)
|
|
93
|
+
§ Common failure modes.
|
|
93
94
|
|
|
94
95
|
## Numbered Options — Always
|
|
95
96
|
|
|
@@ -117,65 +118,9 @@ just a number (e.g., `1`) instead of typing a sentence.
|
|
|
117
118
|
- **Use the user's language** for the question and options.
|
|
118
119
|
- **Accept both** the number and a natural language answer (e.g., "1" or "the first one").
|
|
119
120
|
|
|
120
|
-
### Examples
|
|
121
|
-
|
|
122
|
-
**Binary choice:**
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
> 1. Interactive — ask before each comment
|
|
126
|
-
> 2. Automatic — handle all independently
|
|
127
|
-
|
|
128
|
-
**Recommendation: 1 — Interactive** — the comments touch security-sensitive code,
|
|
129
|
-
so a wrong auto-fix is more expensive than approving each one. Caveat: flip to 2
|
|
130
|
-
if the comments turn out to be pure formatting.
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
**Multiple choice with skip:**
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
> 1. Fix the code
|
|
137
|
-
> 2. Fix the test
|
|
138
|
-
> 3. Skip
|
|
139
|
-
|
|
140
|
-
**Recommendation: 1 — Fix the code** — the test asserts the documented behaviour;
|
|
141
|
-
the production code drifted from the contract. Caveat: pick 2 only if the contract
|
|
142
|
-
itself is wrong.
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**Confirmation with context:**
|
|
146
|
-
|
|
147
|
-
```
|
|
148
|
-
> Found PR #1399 on branch `chore/refactor-agent-setup-2`.
|
|
149
|
-
>
|
|
150
|
-
> 1. Yes, that's the right PR
|
|
151
|
-
> 2. No, different PR — I'll provide the URL
|
|
121
|
+
### Examples and "when NOT to use" — see mechanics
|
|
152
122
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
### When NOT to use numbered options
|
|
158
|
-
|
|
159
|
-
- **Open-ended questions** where the answer is free text (e.g., "What should the class be named?").
|
|
160
|
-
- **Simple yes/no** can use numbered options OR accept "ja"/"nein" directly.
|
|
161
|
-
Even for yes/no, prefer numbered options if there's additional context to show.
|
|
162
|
-
|
|
163
|
-
## Progress Indicators
|
|
164
|
-
|
|
165
|
-
When processing multiple items (e.g., review comments, test failures), show progress:
|
|
166
|
-
|
|
167
|
-
```
|
|
168
|
-
**Comment 3/7** — `filename.php:42`
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
## Summaries
|
|
172
|
-
|
|
173
|
-
After completing a batch of actions, provide a summary table:
|
|
174
|
-
|
|
175
|
-
```
|
|
176
|
-
| # | File | Action |
|
|
177
|
-
|---|---|---|
|
|
178
|
-
| 1 | `file.php` | Fixed null check |
|
|
179
|
-
| 2 | `test.php` | Updated assertion |
|
|
180
|
-
| 3 | `config.php` | Skipped (intentional) |
|
|
181
|
-
```
|
|
123
|
+
Worked examples (binary choice, multiple choice with skip,
|
|
124
|
+
confirmation with context), the "when NOT to use numbered options"
|
|
125
|
+
catalog, progress indicators, and summary-table patterns live in
|
|
126
|
+
[`contexts/communication/rules-auto/user-interaction-mechanics.md`](../contexts/communication/rules-auto/user-interaction-mechanics.md).
|
|
@@ -13,7 +13,7 @@ contract validation, response structure checks, or external service mocking.
|
|
|
13
13
|
|
|
14
14
|
## Procedure: Write API tests
|
|
15
15
|
|
|
16
|
-
1. **Understand the endpoint** — Read controller, form request, existing tests. Understand expected behavior
|
|
16
|
+
1. **Understand the endpoint** — Read the controller, form request, and existing tests. Understand expected behavior, edge cases, and auth requirements before writing anything.
|
|
17
17
|
2. **Set up test data** — Use seeders (preferred) or factories. Mock external services with `Http::fake()`.
|
|
18
18
|
3. **Write test cases** — Cover success, validation errors, authorization failures, edge cases.
|
|
19
19
|
4. **Assert response** — Check status code, JSON structure, data values. Use `assertJsonStructure()`.
|