@event4u/agent-config 8.8.0 → 8.9.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 (131) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +109 -274
  3. package/README.md +2 -2
  4. package/dist/agent-src/commands/agent-handoff.md +39 -2
  5. package/dist/agent-src/commands/research/deep.md +8 -0
  6. package/dist/agent-src/commands/research/report.md +7 -0
  7. package/dist/agent-src/commands/roadmap/create.md +12 -0
  8. package/dist/agent-src/commands/roadmap/process-full.md +31 -5
  9. package/dist/agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +30 -1
  10. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +21 -5
  11. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +37 -0
  12. package/dist/agent-src/contexts/execution/subagent-topologies.md +34 -0
  13. package/dist/agent-src/contexts/execution/verification-mechanics.md +9 -9
  14. package/dist/agent-src/rules/agent-authority.md +1 -1
  15. package/dist/agent-src/rules/communication-through-line.md +1 -1
  16. package/dist/agent-src/rules/delegation-policy.md +5 -0
  17. package/dist/agent-src/rules/direct-answers.md +1 -1
  18. package/dist/agent-src/rules/downstream-changes.md +1 -0
  19. package/dist/agent-src/rules/external-code-graph-interop.md +65 -0
  20. package/dist/agent-src/rules/git-history-discipline.md +18 -0
  21. package/dist/agent-src/rules/lethal-trifecta-guard.md +6 -1
  22. package/dist/agent-src/rules/minimal-safe-diff.md +58 -10
  23. package/dist/agent-src/rules/non-destructive-by-default.md +3 -0
  24. package/dist/agent-src/rules/question-not-instruction.md +76 -0
  25. package/dist/agent-src/rules/senior-engineering-discipline.md +1 -1
  26. package/dist/agent-src/rules/think-before-action.md +1 -0
  27. package/dist/agent-src/rules/tool-safety.md +8 -0
  28. package/dist/agent-src/rules/untrusted-input-defense.md +87 -22
  29. package/dist/agent-src/scripts/update_roadmap_progress.ts +2 -1
  30. package/dist/agent-src/skills/accessibility-auditor/SKILL.md +19 -0
  31. package/dist/agent-src/skills/ai-code-blindspots/SKILL.md +10 -3
  32. package/dist/agent-src/skills/code-review/SKILL.md +2 -0
  33. package/dist/agent-src/skills/command-writing/SKILL.md +53 -40
  34. package/dist/agent-src/skills/dcf-modeling/evals/domain-truth.json +29 -0
  35. package/dist/agent-src/skills/deep-reading-analyst/SKILL.md +1 -0
  36. package/dist/agent-src/skills/design-intelligence/SKILL.md +49 -12
  37. package/dist/agent-src/skills/design-review/SKILL.md +29 -15
  38. package/dist/agent-src/skills/design-system-capture/SKILL.md +63 -24
  39. package/dist/agent-src/skills/forecasting/evals/domain-truth.json +29 -0
  40. package/dist/agent-src/skills/frontend-render-security/SKILL.md +2 -2
  41. package/dist/agent-src/skills/markitdown/SKILL.md +1 -0
  42. package/dist/agent-src/skills/mcp/SKILL.md +24 -0
  43. package/dist/agent-src/skills/mcp-builder/SKILL.md +9 -1
  44. package/dist/agent-src/skills/memory-consolidation/SKILL.md +55 -4
  45. package/dist/agent-src/skills/roadmap-writing/SKILL.md +39 -5
  46. package/dist/agent-src/skills/runway-cognition/evals/domain-truth.json +29 -0
  47. package/dist/agent-src/skills/scenario-modeling/evals/domain-truth.json +29 -0
  48. package/dist/agent-src/skills/secrets-management/SKILL.md +7 -0
  49. package/dist/agent-src/skills/skill-writing/SKILL.md +12 -3
  50. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +27 -33
  51. package/dist/agent-src/skills/supply-chain-intake/SKILL.md +12 -0
  52. package/dist/agent-src/skills/testing-anti-patterns/SKILL.md +29 -0
  53. package/dist/agent-src/skills/ui-component-architect/SKILL.md +9 -0
  54. package/dist/agent-src/skills/unit-economics-modeling/evals/domain-truth.json +40 -0
  55. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  56. package/dist/agent-src/templates/roadmaps.md +36 -0
  57. package/dist/cli/registry.js +3 -0
  58. package/dist/cli/registry.js.map +1 -1
  59. package/dist/discovery/deprecation-report.md +1 -1
  60. package/dist/discovery/discovery-manifest.json +90 -48
  61. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  62. package/dist/discovery/discovery-manifest.summary.md +4 -4
  63. package/dist/discovery/orphan-report.md +1 -1
  64. package/dist/discovery/packs.json +11 -9
  65. package/dist/discovery/trust-report.md +2 -2
  66. package/dist/discovery/workspaces.json +9 -7
  67. package/dist/install/install.mjs +136 -1
  68. package/dist/mcp/registry-manifest.json +3 -3
  69. package/dist/router.json +1 -1
  70. package/dist/scripts/_lib/claude_builtin_names.js +145 -0
  71. package/dist/scripts/_lib/claude_builtin_names.js.map +1 -0
  72. package/dist/scripts/condense.js +14 -0
  73. package/dist/scripts/condense.js.map +1 -1
  74. package/docs/CLAIMS.md +34 -6
  75. package/docs/architecture.md +2 -2
  76. package/docs/archive/CHANGELOG-pre-8.9.0.md +306 -0
  77. package/docs/benchmark.md +113 -0
  78. package/docs/catalog.md +20 -7
  79. package/docs/contracts/command-clusters.md +18 -0
  80. package/docs/contracts/design-artifact-verification.md +124 -0
  81. package/docs/contracts/injected-block-authenticity-model.md +66 -0
  82. package/docs/contracts/mcp-tool-inventory.md +28 -28
  83. package/docs/decisions/ADR-061-corpus-grounding-layer.md +13 -0
  84. package/docs/decisions/ADR-116-memory-tripwire-activation-path.md +9 -0
  85. package/docs/getting-started-by-role.md +1 -1
  86. package/docs/getting-started.md +1 -1
  87. package/docs/governance-advantage.md +1 -1
  88. package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +27 -0
  89. package/docs/guidelines/agent-infra/emphasis-budget.md +45 -0
  90. package/docs/guidelines/agent-infra/simplicity-and-goal-demos.md +151 -0
  91. package/docs/guidelines/agent-infra/tool-description-as-policy.md +35 -0
  92. package/docs/guidelines/design-canon.md +1 -0
  93. package/docs/proof.md +36 -21
  94. package/docs/second-brain-scope.md +69 -26
  95. package/package.json +1 -1
  96. package/src/agent-src/scripts/update_roadmap_progress.ts +2 -1
  97. package/src/scripts/_dispatch.bash +27 -0
  98. package/src/scripts/_lib/claude_builtin_names.ts +148 -0
  99. package/src/scripts/_lib/file_slicer.ts +117 -0
  100. package/src/scripts/_lib/lexical_index.ts +155 -0
  101. package/src/scripts/_lib/orchestration_record.ts +170 -0
  102. package/src/scripts/_lib/orchestration_savings.ts +62 -9
  103. package/src/scripts/_lib/retrieval_sanitize.ts +71 -0
  104. package/src/scripts/_lib/security_lint.ts +1 -0
  105. package/src/scripts/_lib/stat_index.ts +98 -0
  106. package/src/scripts/benchmark.ts +122 -0
  107. package/src/scripts/build_proof.ts +30 -17
  108. package/src/scripts/check_memory.ts +2 -0
  109. package/src/scripts/check_quality_regression.ts +51 -0
  110. package/src/scripts/check_roadmap_trackable.ts +3 -2
  111. package/src/scripts/condense.ts +14 -0
  112. package/src/scripts/discovery_graph.ts +0 -0
  113. package/src/scripts/external_sources_denylist.json +4 -1
  114. package/src/scripts/generate_index.ts +5 -2
  115. package/src/scripts/install-hooks.sh +25 -0
  116. package/src/scripts/install.ts +35 -2
  117. package/src/scripts/learning_sidecar.ts +0 -0
  118. package/src/scripts/lint_agent_skill_names.ts +29 -0
  119. package/src/scripts/lint_knowledge_scale.ts +4 -3
  120. package/src/scripts/lint_roadmap_complexity.ts +124 -0
  121. package/src/scripts/lint_versioned_cache.ts +195 -0
  122. package/src/scripts/mcp_server/consumer_tool_catalog.json +2 -1
  123. package/src/scripts/mcp_server/tools.ts +24 -1
  124. package/src/scripts/measure_lexical_ranking.ts +173 -0
  125. package/src/scripts/memory_lookup.ts +0 -0
  126. package/src/scripts/orchestration_record.ts +140 -0
  127. package/src/scripts/orchestration_savings_report.ts +29 -5
  128. package/src/scripts/schemas/skill.schema.json +4 -0
  129. package/src/scripts/score_domain_truth.ts +192 -0
  130. package/src/scripts/second_brain_retrieval.ts +278 -0
  131. package/src/scripts/second_brain_run.ts +341 -0
@@ -232,6 +232,18 @@ Write the pick to frontmatter as `execution.mode:`
232
232
  and expensive as a mid-run ambiguity halt; pre-existing `[~]` items
233
233
  guarantee the archival gate interrupts the run.
234
234
  `lint_roadmap_complexity` warns on the same patterns as a backstop.
235
+ - **Human-gate scan (ALL picks):** scan drafted steps for human-gate
236
+ patterns (`user verifies/reviews/approves`, `manually check`,
237
+ `sign-off`, `wait for approval`, `ask the user`, "Review / Sign-off"
238
+ phases). Human checkpoints default to **zero** (template rule 22) —
239
+ rewrite each hit as agent-verifiable check (command, targeted test)
240
+ **before saving**, or promote to structured `## Blockers` entry:
241
+ **human gate** only when only a human can decide/authorize
242
+ (Hard-Floor authorization, billable spend, contested decision);
243
+ **external dependency** becomes a blocker whose `Resolved when:`
244
+ names an agent-checkable status probe — never a human gate. Do not
245
+ author safety floors as steps — they fire at run time on their own.
246
+ `lint_roadmap_complexity` warns on the same patterns as a backstop.
235
247
 
236
248
  ### 11. Hand back — HARD STOP, never auto-offer execution
237
249
 
@@ -57,7 +57,11 @@ with the **scope delta below**.
57
57
  (`false` / missing) the pipeline never runs locally; remote CI is
58
58
  the gate. On red → stop, surface, do **not** silently roll into
59
59
  the next phase. Under `mode: phase-checkpoints`, additionally emit
60
- the compact status + continue prompt at every boundary; under
60
+ a compact status LINE at every boundary — but under `process-full`
61
+ this is a NON-BLOCKING status, NOT a stop-and-wait: the run continues
62
+ to the next phase immediately. `phase-checkpoints` narrows to a
63
+ stop-and-wait only under `/roadmap:process-phase`, never here (a
64
+ process-full invocation overrides the mode's boundary-wait). Under
61
65
  `autonomous`, boundaries are silent (quality pipeline aside).
62
66
  - **Final archival:** when the roadmap is fully closed, run the
63
67
  archival check from
@@ -66,10 +70,32 @@ with the **scope delta below**.
66
70
  ## Iron Law — Full is Full
67
71
 
68
72
  ```
69
- /roadmap:process-full PROCESSES EVERY OPEN STEP IN THE FILE.
70
- PHASE-INTERNAL "(DEFERRED)" / "(OPTIONAL)" / "GATED ON PHASE X"
71
- NOTES DO NOT NARROW THE WORKING SET. ONLY THE FIVE HALT CONDITIONS
72
- STOP THE RUN.
73
+ /roadmap:process-full IS LAW: IT PROCESSES EVERY OPEN STEP IN THE FILE,
74
+ TO COMPLETION, ACROSS EVERY PHASE. ONLY THE FIVE HALT CONDITIONS STOP IT.
75
+ PHASE-INTERNAL "(DEFERRED)" / "(OPTIONAL)" / "GATED ON PHASE X" NOTES DO
76
+ NOT NARROW THE WORKING SET. A PHASE BOUNDARY IS NOT A STOP.
77
+ ```
78
+
79
+ The **five — and only five — halt conditions** (exhaustive; nothing else
80
+ stops the run):
81
+
82
+ 1. **Hard-Floor** trigger ([`non-destructive-by-default`](../../rules/non-destructive-by-default.md)).
83
+ 2. **Council-off + genuine ambiguity** (only outside an accepted contract with council available).
84
+ 3. **Security-sensitive** surface reached.
85
+ 4. **Scope-out-of-roadmap** work discovered.
86
+ 5. **Test / quality red** that cannot be cleared within the N=3 budget.
87
+
88
+ ```
89
+ FORBIDDEN NON-HALT REASONS — NEVER STOP THE RUN FOR ANY OF THESE:
90
+ · "running low on context / token budget"
91
+ · "quality would degrade / deserves a fresh focused run later"
92
+ · "avoid a PR pile-up" / "let the open PRs merge first"
93
+ · "this phase is large / touches a deep subsystem"
94
+ · "phase-checkpoints mode, so I'll checkpoint and wait"
95
+ · any agent-invented caution not in the five halt conditions above.
96
+ INVENTING A HALT REASON IS A VIOLATION OF THE COMMAND AND THE USER'S WILL.
97
+ IF CONTEXT RUNS OUT MID-RUN, KEEP LANDING COMPLETE STEPS UNTIL IT DOES —
98
+ NEVER ANNOUNCE A BOUNDARY-STOP BY CHOICE.
73
99
  ```
74
100
 
75
101
  Phase-internal `(deferred)` / `(optional)` / `gated on Phase N` tags are
@@ -43,7 +43,7 @@ behavior. Cannot → read more.
43
43
  ## Consult memory before editing
44
44
 
45
45
  Invariants live in the memory layer; architectural rationale lives in ADRs.
46
- Via [`memory-access`](../../../../../docs/guidelines/agent-infra/memory-access.md),
46
+ Via [`memory-access`](../../../../../../docs/guidelines/agent-infra/memory-access.md),
47
47
  call `retrieve(types=["domain-invariants"], keys=<touched paths>, limit=3)` —
48
48
  a matching `domain-invariant` is a hard constraint. For *why* the current
49
49
  shape exists, check the ADR index `docs/decisions/INDEX.md`. Cite the `id` /
@@ -96,3 +96,32 @@ context only — does NOT mean the user's message is about that file.
96
96
  - Treat the open file as relevant only when the user's message
97
97
  explicitly references it (e.g. "fix this file", "what does this
98
98
  do?", "update the open file").
99
+
100
+ ## Goal-driven execution — vague ask → verifiable goal
101
+
102
+ Before executing a multi-step task, transform it into criteria a tool can
103
+ check. Strong criteria let the loop run independently; weak criteria ("make it
104
+ work") guarantee rework.
105
+
106
+ | Vague ask | Verifiable goal |
107
+ |---|---|
108
+ | "Add validation" | Write tests for the invalid inputs, then make them pass |
109
+ | "Fix the bug" | Write a test that reproduces it (fails), then make it pass |
110
+ | "Refactor X" | Tests green before AND after; diff shows no behavior change |
111
+ | "Make it faster" | Name the metric + target (p95 < 200ms); measure before/after |
112
+ | "Clean this up" | Clarification trigger — no checkable success state exists yet |
113
+
114
+ For multi-step tasks, state the plan with a verify per step:
115
+
116
+ ```
117
+ 1. [step] → verify: [check]
118
+ 2. [step] → verify: [check]
119
+ 3. [step] → verify: [check]
120
+ ```
121
+
122
+ A step without a `verify:` is not a step — it is an assumption. A task whose
123
+ success cannot be checked is a clarification trigger, not an execution
124
+ trigger (route to `ask-when-uncertain`).
125
+
126
+ Wrong/right demos:
127
+ [`simplicity-and-goal-demos`](../../../../../../docs/guidelines/agent-infra/simplicity-and-goal-demos.md).
@@ -23,6 +23,8 @@ v1 forward-compat rule on unknown fields).
23
23
  "task_class": null,
24
24
  "tier_chosen": null,
25
25
  "tier_source": null,
26
+ "dispatch_tokens": null,
27
+ "session_tier": null,
26
28
  "escalated_from": null,
27
29
  "verify_result_by_tier": null
28
30
  }
@@ -46,8 +48,10 @@ v1 forward-compat rule on unknown fields).
46
48
  | `tier_source` | enum \| null | Where `tier_chosen` came from: `static` (frontmatter/category pin) · `inferred` (deterministic per-slice inference) · `inherit` (session tier — no downshift decision). Lets the evidence gate score inferred routing separately from static pinning. |
47
49
  | `escalated_from` | string \| null | When the slice re-dispatched after a verification failure: tier of the FAILED attempt (e.g. `lite` when a lite return failed verify and the slice re-ran on `medium`). `null` = no escalation. |
48
50
  | `verify_result_by_tier` | object \| null | Map tier → verification result per attempt of this slice (e.g. `{"lite":"fail","medium":"pass"}`). Values: `pass` \| `fail` \| `skipped`. Feeds the per-tier verify-pass-rate tripwire. Enums only, no verdict bodies. |
51
+ | `dispatch_tokens` | int \| null | **Cost-% extension.** Absolute tokens the dispatched slice consumed (measured subagent usage). Feeds the MODELED cost-% in `orchestration_savings_report`, which needs an absolute base the token-count delta lacks. `null` = not recorded. Counts only. |
52
+ | `session_tier` | string \| null | **Cost-% extension.** The orchestrator's OWN tier — the baseline the downshift cost-% measures `tier_chosen` against (a `high`→`lite` downshift is a rate win the token count can't see). `null` = not recorded. |
49
53
 
50
- All five routing fields are additive and optional — a line without them is
54
+ These routing + cost fields are additive and optional — a line without them is
51
55
  still a valid orchestration line; readers ignore unknown fields per the v1
52
56
  forward-compat rule.
53
57
 
@@ -74,10 +78,22 @@ audit-log-v1 path; `YYYY-MM` = current UTC month). The line is a standard
74
78
  audit-log-v1 object with `input_kind: "orchestration"` and an `orchestration`
75
79
  sub-object carrying this shape.
76
80
 
77
- **No hook or daemon required.** The agent writes directly via its file-write
78
- tool — same mechanism as any other agent-written artifact. No-runtime-compatible
79
- capture path (decided 2026-06-30, maintainer decision; see
80
- `road-to-subagent-value-realization.md § Council notes`).
81
+ **No hook or daemon required.** The agent writes the line directly —
82
+ no-runtime-compatible capture path (decided 2026-06-30, maintainer decision; see
83
+ `road-to-subagent-value-realization.md § Council notes`). Do NOT hand-author the
84
+ JSON: run the recorder, which validates + builds a conformant line from the
85
+ counts you already have:
86
+
87
+ ```bash
88
+ ./scripts-run src/scripts/orchestration_record --spawn-count <n> \
89
+ --token-delta <±n> --provenance measured|estimated \
90
+ [--tier-chosen lite|medium|high] [--tier-source static|inferred|inherit] \
91
+ [--task-class <id>] [--tiers a,b] [--dispatch-outcome DONE|BLOCKED|…]
92
+ ```
93
+
94
+ A capture **hook** is the wrong tool: the PostToolUse payload carries no subagent
95
+ token usage (only the orchestrator sees it) and a hook reverses the 2026-06-30
96
+ no-hook decision. Reader: `src/scripts/orchestration_savings_report.ts`.
81
97
 
82
98
  **`token_delta` sourcing priority:**
83
99
  1. Host-reported: read `usage.output_tokens` (and `usage.input_tokens` if
@@ -28,6 +28,25 @@ roadmaps with open work that is blocked-for-later — parked, not active).
28
28
  surface alternatives in the pre-run summary.
29
29
  - None active → tell the user; suggest [`/roadmap:create`](../../commands/roadmap/create.md).
30
30
 
31
+ ### Live merge-state before any "in-flight / merged / handled" claim
32
+
33
+ Selection reasoning that **excludes** a roadmap — or a pre-run summary,
34
+ decision, or user-facing message that **describes** one — as *in-flight*,
35
+ *handled by an open PR*, *already merged*, or *not yet merged* → verify **live
36
+ at claim time** (`gh pr view <n> --json state,mergedAt` / `gh pr list --search
37
+ "<slug>"`). Never infer merge state from:
38
+
39
+ - **dashboard open-count** — lags: a completed roadmap archives in the
40
+ **merging** PR, so it can read "open" on `main` while its PR is already
41
+ merged, or read "open" seconds before a merge you never re-checked;
42
+ - **session memory** ("opened a PR for this earlier") or an **earlier fetch** —
43
+ a merge can land between fetch and message.
44
+
45
+ Stale merge-state claim ships an unnecessary message about work already done —
46
+ the failure this prevents. The [`direct-answers`](../../rules/direct-answers.md)
47
+ Iron-Law-2 live-state rule (git/PR state never from memory), applied to
48
+ roadmap selection.
49
+
31
50
  ## 2. Pre-run summary — gate or inline note
32
51
 
33
52
  Read `roadmap.skip_pre_run_gate` from `.agent-settings.yml` (default
@@ -259,6 +278,24 @@ drafting, council enablement), not safety.
259
278
 
260
279
  On halt: stop, surface state, do **not** auto-fix outside the failing step.
261
280
 
281
+ ### Forbidden non-halt reasons — agent-invented cautions
282
+
283
+ Halt list above is exhaustive. Never stop a `process-full` (or any wrapper) run
284
+ for an invented reason not on it. NOT halt conditions — stopping for them
285
+ violates the command + user's will:
286
+
287
+ - "low context / token budget" — keep landing complete steps until context
288
+ actually runs out; never announce a boundary-stop by choice.
289
+ - "quality would degrade / deserves a fresh focused run later"
290
+ - "avoid a PR pile-up" / "let open PRs merge first"
291
+ - "this phase is large / deep subsystem"
292
+ - "phase-checkpoints, so I'll checkpoint and wait" — under `process-full` a
293
+ phase boundary emits a non-blocking status line and the run continues; the
294
+ stop-and-wait reading applies only to `process-phase`.
295
+
296
+ Genuine inability to continue = one of the five real halt conditions fired —
297
+ surface THAT, not a manufactured caution.
298
+
262
299
  ### Non-halt — gating notes, "optional" tags
263
300
 
264
301
  The following are **authoring annotations**, never halt conditions. Do
@@ -0,0 +1,34 @@
1
+ # Subagent Topologies — per-mode communication shape
2
+
3
+ Descriptive, not enforced. Documents the **expected agent-to-agent
4
+ communication topology** for each [`subagent-orchestration`](../../skills/subagent-orchestration/SKILL.md)
5
+ mode so consumers can predict latency, failure modes, and where consensus
6
+ is required. Cited from
7
+ an internal findings note (local-only) <!-- council-ref-allowed: ADR decision trace for topology anti-drift defaults -->
8
+ row 7 (the external runtime's `hierarchical, 6–8 agents, raft consensus` anti-drift
9
+ default).
10
+
11
+ | Mode | Topology | Anti-drift default | Notes |
12
+ |---|---|---|---|
13
+ | do-and-judge | `hierarchical` | 1 implementer · 1 judge · session-orchestrated | Two-node hub-and-spoke; orchestrator owns the loop. |
14
+ | do-and-judge-two-stage | `hierarchical` | 1 implementer · 2 sequential judges | Stages are serialized; spec-judge gates quality-judge. |
15
+ | do-in-steps | `ring` | N steps · 1 judge between each | Step N output → judge → step N+1 input; cycle on revise. |
16
+ | do-in-parallel | `star` | 6–8 implementers · 1 judge · session-hub | Capped by `subagents.max_parallel`; judge runs once on union. |
17
+ | do-competitively | `mesh` | 2–4 implementers · 1 judge | Implementers do not see each other; judge sees all candidates. |
18
+ | judge-with-debate | `hierarchical-mesh` | 2 judges · 1 meta-judge | Judges debate (mesh edge); meta-judge reconciles (hierarchical). |
19
+ | do-in-worktrees | `adaptive` | per-step topology of the underlying mode | Each worktree picks its own shape; chain is hierarchical. |
20
+
21
+ **Anti-drift default** (the external runtime convention, descriptive only):
22
+ `hierarchical, 6–8 agents, raft consensus`. Consumers free to
23
+ override per orchestration — the table is the **starting point**,
24
+ not a constraint. Topology is metadata for capacity planning, not
25
+ runtime-enforced.
26
+
27
+ **Glossary:**
28
+
29
+ - `hierarchical` — orchestrator hub; agents reply to hub only.
30
+ - `mesh` — agents see each other's outputs (e.g. competing diffs).
31
+ - `hierarchical-mesh` — peer debate followed by hub reconciliation.
32
+ - `ring` — output of step N feeds input of step N+1 in order.
33
+ - `star` — N agents fan out from a single hub; no peer comms.
34
+ - `adaptive` — topology shifts per step; outer chain remains hub.
@@ -11,15 +11,15 @@ incidents.
11
11
 
12
12
  ## Gate zero — `quality.local_auto_run` (default `false`)
13
13
 
14
- `false` or missing → **never run quality tools or full test suites
15
- proactively — never ask**. User runs them manually; **remote CI is the
16
- authoritative gate.** Run one ONLY on: (1) explicit ask this turn,
17
- (2) concrete CI failure — run exactly that failing check, (3) new-gate
18
- carve-out (a NEW gate/test this change introduces runs once to be
19
- proven). Completion wording: *"quality gates delegated to remote CI"* —
20
- never a pass claim for tools that did not run. Narrow probes proving
21
- the specific change (one `--filter` test, `curl`, syntax check on the
22
- edited file) stay allowed. Everything below applies when `true`.
14
+ `false`/missing → **never run the full quality pipeline or full test
15
+ suites proactively — never ask**; remote CI is the gate. Run one ONLY on:
16
+ (1) explicit ask this turn, (2) concrete CI failure — run exactly that
17
+ check, (3) new-gate carve-out (a NEW gate/test this change adds, run once).
18
+ Completion wording: *"quality gates delegated to remote CI"* — never a pass
19
+ claim for tools that did not run. Narrow probes stay allowed (one `--filter`
20
+ test, `curl`); a type-check + lint **scoped to the changed files** is
21
+ REQUIRED before a source push/PR — NOT the full pipeline. Everything below
22
+ applies when `true`.
23
23
 
24
24
  ## When to run what — timing matters (`local_auto_run: true`)
25
25
 
@@ -13,7 +13,7 @@ Four rules answer **"may the agent do this autonomously?"** Higher band wins.
13
13
 
14
14
  | Band | Trigger | Canonical rule |
15
15
  |---|---|---|
16
- | **1. Hard Floor** | Prod-trunk merge · deploy · push · prod data/infra · whimsical bulk deletion · bulk-deletion or infra commit | [`non-destructive-by-default`](non-destructive-by-default.md) |
16
+ | **1. Hard Floor** | Prod-trunk merge · deploy · push · prod data/infra · whimsical bulk deletion · bulk-deletion or infra commit · irreversible external action (send · publish · post · purchase · submit) | [`non-destructive-by-default`](non-destructive-by-default.md) |
17
17
  | **2. Permission Gate** | Git op · branch / PR / tag · architectural or library change · scope expansion | [`scope-control`](scope-control.md) |
18
18
  | **3. Commit Default** | About to commit — never, unless one of four exceptions fires | [`commit-policy`](commit-policy.md) |
19
19
  | **4. Trivial-vs-Blocking** | Routine workflow question — act or ask | [`autonomous-execution`](autonomous-execution.md) |
@@ -7,7 +7,7 @@ triggers:
7
7
  - intent: "producing a multi-step or continuation reply"
8
8
  - intent: "reporting progress on ongoing work"
9
9
  workspaces: [agent-config-maintainer, construction, engineering, finance, founder, gtm, legal-review-prep, ops, product, small-business]
10
- packs: [engineering-base]
10
+ packs: [meta]
11
11
  ---
12
12
 
13
13
  # Communication Through-Line
@@ -72,6 +72,11 @@ primitive → run in-session (clean no-op).
72
72
  session (an application of the N=3 budget, no new mechanism); an ordered
73
73
  slice never dispatches before its declared parent's return is verified.
74
74
  Both per [`subagent-steering`](../contexts/execution/subagent-steering.md).
75
+ 6. **Record** telemetry after each dispatch — run `orchestration_record`
76
+ (one validated line: spawn_count, token_delta + provenance, tier, task_class)
77
+ per [`orchestration-telemetry`](../contexts/execution/orchestration-telemetry.md)
78
+ § Emit. Agent-behavioral capture the savings report reads; skipping it leaves
79
+ the value-of-orchestration question unmeasured.
75
80
 
76
81
  ## Scope — does NOT
77
82
 
@@ -30,7 +30,7 @@ THE MORE LOAD-BEARING THE CLAIM, THE HARDER YOU VERIFY.
30
30
  WHEN VERIFICATION IS NOT WORTH THE COST → ASK.
31
31
  ```
32
32
 
33
- Severity tiers (High = load-bearing · Medium = project-shape · Low = idioms), per-tier verification actions, and "just guess" override: [`asking-and-brevity-examples`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md).
33
+ Severity tiers, per-tier verification actions, "just guess" override, **no duration estimates**, and **never cite the rule** when declining: [`asking-and-brevity-examples`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md).
34
34
 
35
35
  **Live-state facts — never from memory.** Git/PR merge/branch/sync/existence state is High-severity and decays silently (branch already merged, PR already closed, `main` already ahead). NEVER assert "merged / not merged / pending / still open / already in `main` / out of scope" — or any branch/sync/existence claim — from memory, a roadmap note, an earlier turn, or a recalled memory. Run the live check FIRST (`git log --first-parent origin/main`, `git branch -r --contains <ref>`, `gh pr view <n> --json state,mergedAt,baseRefName`); a state question is self-answering (per [`git-workflow`](../skills/git-workflow/SKILL.md)). Same for any external system that changes behind you (CI run, deploy, remote queue).
36
36
 
@@ -77,3 +77,4 @@ After completing all downstream changes:
77
77
  2. **No broken tests** — run the project test suite (Pest / PHPUnit, Jest / Vitest, pytest, `go test ./...`, `cargo test`).
78
78
  3. **No broken types / signatures** — project's type-checker (PHPStan / Psalm, TypeScript, mypy / pyright, `go vet`, `cargo check`).
79
79
  4. **No stale references** — grep for the old name / namespace / import path to confirm zero results.
80
+ 5. **No own-orphans** — the same sweep applied to the new diff: identifiers whose last reference disappeared in a file this diff touched are removed in the same diff (see [`minimal-safe-diff § Own-orphan cleanup`](minimal-safe-diff.md#own-orphan-cleanup)); pre-existing dead code stays.
@@ -0,0 +1,65 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "2a"
4
+ description: "When the repo ships an external code-graph index (a graph.json-shaped artifact or a SCIP index), query IT first for codebase-structure questions — do not grep from scratch"
5
+ triggers:
6
+ - keyword: "scip"
7
+ - keyword: "code-graph"
8
+ - keyword: "code graph"
9
+ - phrase: "graph.json"
10
+ - phrase: "who calls"
11
+ - phrase: "call graph"
12
+ - phrase: "find references"
13
+ - phrase: "where is this used"
14
+ applies_to_user_types:
15
+ - "developer"
16
+ - "maintainer"
17
+ workspaces: [engineering]
18
+ packs: [meta]
19
+ ---
20
+
21
+ # External Code-Graph Interop
22
+
23
+ Some repos commit a pre-built code-intelligence index — a `graph.json`-shaped
24
+ artifact or a SCIP index (`index.scip`, `*.scip`). When one exists, it already
25
+ answers "who calls X", "where is Y used", "what does this import" far more
26
+ precisely than a fresh `grep`. This suite is an **orchestrator, not a
27
+ competitor**: query the existing index first.
28
+
29
+ ## The rule
30
+
31
+ ```
32
+ REPO SHIPS A CODE-GRAPH INDEX (graph.json-shaped OR a SCIP index)
33
+ → QUERY IT FIRST FOR CODEBASE-STRUCTURE QUESTIONS. GREP IS THE FALLBACK,
34
+ NOT THE FIRST MOVE. NEVER REBUILD WHAT THE INDEX ALREADY ANSWERS.
35
+ ```
36
+
37
+ ## When it fires
38
+
39
+ A codebase-structure question (call graph, references, usages, import graph)
40
+ AND the repo contains a detectable index:
41
+
42
+ - a SCIP index — `index.scip` or any `*.scip` at the repo root or a conventional
43
+ index directory;
44
+ - a `graph.json`-shaped artifact (a committed code-graph export).
45
+
46
+ ## What to do
47
+
48
+ 1. **Detect** the index (its path is the concrete pointer; the specific tool
49
+ that produced it is named in the repo's own docs, not here).
50
+ 2. **Query it** for the relationship the user asked about.
51
+ 3. **Fall back to `grep`/read** only for what the index does not cover, and say
52
+ so ("the index has no entry for X, so I grepped").
53
+
54
+ ## When NOT to fire
55
+
56
+ - No such index in the repo — normal `grep`/read is the right first move.
57
+ - The question is about content/semantics, not code structure.
58
+
59
+ ## See also
60
+
61
+ - [`discovery_graph`](../scripts/discovery_graph.ts) — this suite's OWN artefact
62
+ relation-graph (`affected`/`explain`); the external code-graph is the
63
+ *source-code* analogue this rule defers to for code questions.
64
+ - [`think-before-action`](think-before-action.md) — analyze with the best
65
+ available tool before grepping blind.
@@ -120,6 +120,24 @@ If either stop fires and resolution is not immediate → tag the state (`git tag
120
120
 
121
121
  `--amend` on the *current local* commit before the first push is the narrow exception (treated as continuing to compose the commit, not rewriting history).
122
122
 
123
+ ## Amend-after-hook-failure trap (data-loss)
124
+
125
+ When a **pre-commit hook fails, the commit did NOT happen** — no new commit
126
+ object was created. A reflexive `git commit --amend` at that point does not
127
+ "retry the commit"; it rewrites the **previous, already-good** commit,
128
+ destroying that work. This is the one place the narrow `--amend` exception
129
+ above turns into data loss.
130
+
131
+ Recovery — never amend after a hook failure:
132
+
133
+ 1. Read the hook output and **fix the cause** (the lint/test/format failure).
134
+ 2. **Re-stage** the fix (`git add`).
135
+ 3. Create a **NEW commit** (`git commit`, not `--amend`) — the prior commit was
136
+ never overwritten and must stay intact.
137
+
138
+ Recovery procedures live next to this mechanism in
139
+ [`skill:git-workflow`](../skills/git-workflow/SKILL.md).
140
+
123
141
  ## Why this rule exists
124
142
 
125
143
  Interactive rebase + fixup loops generate disproportionate token cost on every iteration: re-running CI per replayed commit, resolving the same content conflict in three derived files (`.condensation-hashes.json`, `dist/router.json`, `.windsurfrules`), losing the working tree to a stash that silently re-introduces older state. A single conflict can burn the budget of an entire feature.
@@ -21,7 +21,11 @@ packs: [engineering-base]
21
21
  Prompt injection is not solvable at the model layer (OWASP LLM01). It is
22
22
  contained **architecturally**: a tool/skill/command becomes dangerous only when
23
23
  it combines all three legs of the *lethal trifecta*. Remove one leg and an
24
- injected instruction can do no consequential harm.
24
+ injected instruction can do no consequential harm. This is the agentic attack
25
+ surface OWASP's Agentic Security Initiative (ASI Top 10) catalogues — excessive
26
+ agency, tool misuse, confused-deputy data exfiltration; the Least-Agency
27
+ discipline in [`tool-safety`](tool-safety.md) is the same defence applied to the
28
+ tool grant.
25
29
 
26
30
  ## The Iron Law
27
31
 
@@ -75,6 +79,7 @@ backstop.
75
79
  ## See also
76
80
 
77
81
  - [`untrusted-input-defense`](untrusted-input-defense.md) — data/instruction separation, spotlighting.
82
+ - [`tool-safety`](tool-safety.md) — Least Agency: the narrowest tool grant breaks the egress leg by construction (OWASP ASI excessive-agency).
78
83
  - [`security-sensitive-stop`](security-sensitive-stop.md) — threat-model before editing a sensitive surface.
79
84
  - [`non-destructive-by-default`](non-destructive-by-default.md) — the human-in-the-loop egress floor.
80
85
  - [`threat-modeling`](../skills/threat-modeling/SKILL.md) — abuse-case enumeration.
@@ -74,6 +74,54 @@ task scope · dependency bumps "because it was close to the cache".
74
74
  Ask. A minimal diff plus one follow-up is cheaper than a sprawling diff the
75
75
  reviewer has to untangle.
76
76
 
77
+ ## Anti-over-engineering
78
+
79
+ The smallest change is also the least *abstract* and least *speculative* one:
80
+
81
+ - **Three similar lines beat a premature abstraction.** Do not extract a helper
82
+ / generic / config layer to dedupe two or three call sites — inline
83
+ repetition is cheaper to read and change than the wrong abstraction. Per new
84
+ abstraction: **cite the second caller — or inline it.**
85
+ - **No speculative features.** Nothing beyond what was asked: no
86
+ configurability or "flexibility" nobody requested, no parameters with one
87
+ call site, no error handling for scenarios that cannot occur in this
88
+ codebase.
89
+ - **The rewrite trigger.** If the change could be half the size without losing
90
+ behavior, rewrite before presenting. Self-check: *"Would a senior engineer
91
+ call this overcomplicated?"* — if yes, simplify.
92
+ - **No tombstones.** Delete removed code completely — no `_oldName` renames,
93
+ no `// removed X` / `// no longer used` markers, no dead re-export shims kept
94
+ "for safety". Git history is the tombstone.
95
+ - **No docstrings/comments on untouched code.** Do not annotate code the diff
96
+ does not change.
97
+
98
+ Wrong/right pairs for each ban:
99
+ [`simplicity-and-goal-demos`](../docs/guidelines/agent-infra/simplicity-and-goal-demos.md)
100
+ — the demos are the recognition surface; match your diff against the *right*
101
+ column before presenting.
102
+
103
+ **Not adopted (council):** the source's "validate only at system boundaries /
104
+ trust internal code" clause is **rejected** — internal code can be wrong, and
105
+ "trust" is not a testing strategy. Keep validating internal invariants; this
106
+ fold is about *diff shape*, not about dropping internal checks.
107
+
108
+ ## Own-orphan cleanup
109
+
110
+ Your diff cleans up exactly the mess it made — nothing more:
111
+
112
+ - An identifier (import, variable, function, parameter) is an **own-orphan**
113
+ iff its **last reference disappeared in a file THIS diff touched**. Remove
114
+ it in the same diff — it traces to the task; leaving it is an incomplete
115
+ change, not restraint.
116
+ - If **any reference survives in a file the diff did not touch**, the
117
+ identifier is **pre-existing debt** — leave it untouched and surface it via
118
+ [`active-remediation`](active-remediation.md)'s note-and-ask ladder, never
119
+ delete drive-by.
120
+ - The check is mechanical: after editing, grep each identifier your hunks
121
+ stopped referencing; zero remaining references and the last one was yours →
122
+ own-orphan (delete); otherwise → note. (`downstream-changes` runs the same
123
+ sweep for renames — this is that sweep applied to the new diff.)
124
+
77
125
  ## Break-glass exception
78
126
 
79
127
  This rule stays in force during production incidents. "Break-glass mode"
@@ -103,16 +151,16 @@ description.
103
151
  The default stands: no drive-by edits, no opportunistic refactors. The one
104
152
  bounded exception — a **small, task-aligned security/correctness fix in code
105
153
  the current task already touches** — is governed by
106
- [`active-remediation`](active-remediation.md). Permitted inline **only** when
107
- ALL hold: same request path / module, ≤ ~10 changed lines in one production file (plus its test file),
108
- no public-API / response-shape change, no dependency bump or migration, and
109
- its verification (e.g. the negative test) ships in the same commit. Anything
110
- outside those five conditions is **not** this carve-out — it is note + ask per
111
- `active-remediation`. This never licenses reformatting, renames, dependency
112
- bumps, or version upgrades (a syntax-idiom modernization is allowed only under
113
- `active-remediation`'s version-gated, behavior-preserving clause; a
114
- dependency/version bump stays ask-only). The sole case that may interrupt is a
115
- **live cross-user/tenant data exposure** ([`broken-access-control`](broken-access-control.md)) —
154
+ [`active-remediation`](active-remediation.md). It is permitted inline **only**
155
+ when ALL hold: same request path / module, ≤ ~10 changed lines in one
156
+ production file (plus its test file), no public-API / response-shape change, no dependency bump or migration,
157
+ and its verification (e.g. the negative test) ships in the same commit.
158
+ Anything outside those five conditions is **not** this carve-out — it is
159
+ note + ask per `active-remediation`. This never licenses reformatting,
160
+ renames, dependency bumps, or version upgrades (a syntax-idiom modernization
161
+ is allowed only under `active-remediation`'s version-gated, behavior-preserving
162
+ clause; a dependency/version bump stays ask-only). The sole case that may
163
+ interrupt is a **live cross-user/tenant data exposure** ([`broken-access-control`](broken-access-control.md)) —
116
164
  fix-now-if-small, else stop and surface; never defer it silently.
117
165
 
118
166
  See also: `scope-control` · `downstream-changes` · `think-before-action` · `preservation-guard` · `verify-before-complete` · [`active-remediation`](active-remediation.md) · [`broken-access-control`](broken-access-control.md).
@@ -32,9 +32,12 @@ Triggers below require explicit user confirmation **on this turn** — not from
32
32
  | **Production data / infra** | prod DB writes / migrations, prod config, secrets rotation, IAM / role / policy, DNS, anything in a `prod`-scoped path or pipeline |
33
33
  | **Whimsical / unscoped bulk deletion** | `rm -rf <dir>`, `git rm -r`, glob deletes, `DROP TABLE`, `TRUNCATE`, `git reset --hard` past unpushed work — when **not required** by the task (task-aligned WIP deletions allowed, below) |
34
34
  | **Commit containing bulk deletions or infra changes** | diff removes a directory, deletes ≥5 unrelated files, or touches Terraform/Pulumi/k8s/Ansible/cloud-config — surface the diff + confirm even when [`commit-policy`](commit-policy.md) authorizes |
35
+ | **Irreversible external action** | **send** / **publish** / **post** / **purchase** / **submit** — an outbound, externally-visible, or money-moving action the user cannot un-see: send an email/message, publish or post content, submit a form, place an order or payment. Also gated by [`scope-control`](scope-control.md) external-comms; named here so the Hard Floor lists the actual buttons |
35
36
 
36
37
  Standing "just keep going" + next step crosses the floor → STOP, surface it (one numbered-options block per [`user-interaction`](user-interaction.md)), wait.
37
38
 
39
+ **Never act while asking.** The ask and the action are strictly sequential: surface the confirmation, then WAIT for the answer. Never fire the action in the same turn you ask for it — no do-then-ask race, no "I went ahead and…". **The approval names the exact object** so the user confirms the real thing, not a category: a download names filename + size + source; a purchase names amount + card-last4 + total; a send names recipient + subject. Shape per [`user-interaction`](user-interaction.md) numbered-options.
40
+
38
41
  ## Not in scope — deterministic regeneration
39
42
 
40
43
  Output regenerated from a tracked source (condensation, code-gen, formatters, lock-files) is reversible — **not destructive** ([`autonomous-execution`](autonomous-execution.md)). Per-file diff approval is theater.
@@ -0,0 +1,76 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "1"
4
+ description: "A question is a request for an ANSWER, never authorization to act — answer first; never treat 'why…?' / 'can you…?' / 'what do you think?' as a green light to build, change, or execute"
5
+ triggers:
6
+ - phrase: "warum"
7
+ - phrase: "wieso"
8
+ - phrase: "weshalb"
9
+ - keyword: "why"
10
+ - phrase: "what do you think"
11
+ - phrase: "was denkst du"
12
+ - phrase: "was hältst du"
13
+ - phrase: "geht das"
14
+ - phrase: "kannst du"
15
+ - phrase: "sollte ich"
16
+ - phrase: "should i"
17
+ - phrase: "is it possible"
18
+ applies_to_user_types:
19
+ - "creator"
20
+ - "developer"
21
+ - "maintainer"
22
+ - "operator"
23
+ - "researcher"
24
+ workspaces: [engineering]
25
+ packs: [meta]
26
+ ---
27
+
28
+ # Question Is Not an Instruction
29
+
30
+ ```
31
+ A QUESTION ASKS FOR AN ANSWER. IT IS NOT AUTHORIZATION TO ACT.
32
+ "WARUM…?" / "WHY…?" / "WAS DENKST DU?" / "GEHT DAS?" / "KANNST DU…?"
33
+ → ANSWER FIRST. NEVER BUILD, CHANGE, COMMIT, OR EXECUTE ON A QUESTION.
34
+ RUNNING OFF ON A QUESTION IS A RULE VIOLATION, NOT INITIATIVE.
35
+ ```
36
+
37
+ The user asks two distinct kinds of turn. Confusing them is the failure this
38
+ rule exists to stop:
39
+
40
+ | Turn shape | Signal | Correct response |
41
+ |---|---|---|
42
+ | **Question** | interrogative — `warum`, `wieso`, `why`, `?`, `was denkst du`, `geht das`, `kannst du`, `sollte ich`, `is it possible` | **Answer it.** Explain, reflect, surface the trade-off. Do NOT execute. |
43
+ | **Instruction** | imperative — `mach`, `bau`, `implementiere`, `fix`, `erstelle`, `run`, `füge hinzu` | Execute per the usual authority gates. |
44
+
45
+ ## The trap
46
+
47
+ A question that expresses **frustration or challenge** — *"Warum hast du nur
48
+ eine Phase gemacht?"*, *"Wieso hast du das nicht anders gelöst?"* — is STILL a
49
+ question. It demands an explanation, not a burst of corrective action. Reading
50
+ the frustration as *"go fix everything now"* and charging off is the canonical
51
+ violation: the user loses their answer AND gets unrequested work.
52
+
53
+ ## What to do
54
+
55
+ 1. **Answer the literal question** — directly, honestly, first token.
56
+ 2. If the answer implies work *might* follow, **stop after the answer** and let
57
+ the user decide. Offer numbered options if a decision is genuinely theirs
58
+ (per [`user-interaction`](user-interaction.md)), but do not start the work.
59
+ 3. Only a subsequent **imperative** turn authorizes execution.
60
+
61
+ ## When it does NOT fire
62
+
63
+ - The turn is imperative (an instruction), even if phrased politely
64
+ (*"kannst du bitte X machen"* where X is clearly the ask + context makes it a
65
+ directive) — but when genuinely ambiguous between question and instruction,
66
+ treat it as a **question** and ask which the user meant (one line).
67
+ - A rhetorical question inside a larger instruction (*"why not just do X? do
68
+ it"*) — the trailing imperative governs.
69
+
70
+ ## See also
71
+
72
+ - [`user-interrupt-priority`](user-interrupt-priority.md) — a new *instruction*
73
+ mid-flight; this rule is its complement for a *question* mid-flight.
74
+ - [`ask-when-uncertain`](ask-when-uncertain.md) — when the agent should ask;
75
+ this rule is about honouring the user's question, not the agent's.
76
+ - [`direct-answers`](direct-answers.md) — answer the substance, no deflection.
@@ -58,7 +58,7 @@ Full surface→controls table + backstop greps: → `skill:ai-code-blindspots`.
58
58
 
59
59
  ### 3. Verify — never assert from memory
60
60
 
61
- No completion claim without exercising the real path (running endpoint / UI / test — not "the code looks right"). "Defined but not wired" (middleware written, never connected to the route) = **not done**. → `verify-before-complete`, `source-discovery-gate`.
61
+ No completion claim without exercising the real path (running endpoint / UI / test — not "the code looks right"). "Defined but not wired" (middleware written, never connected to the route) = **not done**. **Before pushing code / opening a PR, run a changed-files static pass — type-checker + linter scoped to the diff (`tsc --noEmit` on the touched project, linter on changed files) — even when `quality.local_auto_run` is false: a narrow probe of your own diff, NOT the suppressed full pipeline. Letting a compile/lint error hit remote CI = completion claim without evidence (the beginner error this guards).** → `verify-before-complete`, `source-discovery-gate`.
62
62
 
63
63
  ## When it fires
64
64
 
@@ -33,6 +33,7 @@ NO BLIND TRIAL-AND-ERROR. MAX 2 RETRIES PER APPROACH.
33
33
  - Prefer targeted inspection (jq, debugger, logs) over brute-force.
34
34
  - Always verify results after changes (API, UI, tests) using the concrete tool that exercises that surface — `curl` / Playwright / browser for HTTP and UI, debugger / `xdebug` for runtime frames, the project's test runner for behavior.
35
35
  - When behavior can be defined → prefer test-first / TDD.
36
+ - **Multi-step task → restate as verifiable success criteria first** (test that reproduces the bug, failing-then-passing check, before/after invariant) and plan `step → verify:` per step; a task whose success cannot be checked is a clarification trigger, not an execution trigger. Transformation table: [`think-before-action-mechanics § Goal-driven execution`](../contexts/communication/rules-auto/think-before-action-mechanics.md#goal-driven-execution--vague-ask--verifiable-goal).
36
37
  - Unclear requirements → precise clarification question, not hidden assumptions.
37
38
  - Refactors must preserve behavior, validation, examples, and anti-failure guidance unless explicitly changed.
38
39
  - Do NOT modify code you do not fully understand — read it, trace the flow, then change it.