@event4u/agent-config 8.8.0 → 8.10.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/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +139 -263
- package/README.md +5 -5
- package/dist/agent-src/commands/agent-handoff.md +39 -2
- package/dist/agent-src/commands/cost/report.md +13 -3
- package/dist/agent-src/commands/research/deep.md +8 -0
- package/dist/agent-src/commands/research/report.md +7 -0
- package/dist/agent-src/commands/roadmap/create.md +12 -0
- package/dist/agent-src/commands/roadmap/process-full.md +31 -5
- package/dist/agent-src/commands/tests/create.md +28 -6
- package/dist/agent-src/commands/work.md +33 -0
- package/dist/agent-src/commands/worktree/cleanup.md +78 -0
- package/dist/agent-src/commands/worktree/create.md +62 -0
- package/dist/agent-src/commands/worktree/status.md +63 -0
- package/dist/agent-src/commands/worktree/verify.md +70 -0
- package/dist/agent-src/commands/worktree.md +85 -0
- package/dist/agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +30 -1
- package/dist/agent-src/contexts/execution/orchestration-telemetry.md +60 -31
- package/dist/agent-src/contexts/execution/roadmap-process-loop.md +37 -0
- package/dist/agent-src/contexts/execution/subagent-topologies.md +34 -0
- package/dist/agent-src/contexts/execution/verification-mechanics.md +9 -9
- package/dist/agent-src/rules/agent-authority.md +1 -1
- package/dist/agent-src/rules/communication-through-line.md +1 -1
- package/dist/agent-src/rules/delegation-policy.md +5 -0
- package/dist/agent-src/rules/design-fidelity.md +40 -0
- package/dist/agent-src/rules/direct-answers.md +1 -1
- package/dist/agent-src/rules/downstream-changes.md +1 -0
- package/dist/agent-src/rules/external-code-graph-interop.md +65 -0
- package/dist/agent-src/rules/git-history-discipline.md +18 -0
- package/dist/agent-src/rules/lethal-trifecta-guard.md +6 -1
- package/dist/agent-src/rules/minimal-safe-diff.md +58 -10
- package/dist/agent-src/rules/non-destructive-by-default.md +3 -0
- package/dist/agent-src/rules/question-not-instruction.md +76 -0
- package/dist/agent-src/rules/senior-engineering-discipline.md +1 -1
- package/dist/agent-src/rules/spreadsheet-source-quality.md +61 -0
- package/dist/agent-src/rules/think-before-action.md +1 -0
- package/dist/agent-src/rules/tool-safety.md +8 -0
- package/dist/agent-src/rules/untrusted-input-defense.md +87 -22
- package/dist/agent-src/scripts/update_roadmap_progress.ts +2 -1
- package/dist/agent-src/skills/accessibility-auditor/SKILL.md +19 -0
- package/dist/agent-src/skills/accessibility-auditor/evals/evals.json +15 -0
- package/dist/agent-src/skills/ai-code-blindspots/SKILL.md +10 -3
- package/dist/agent-src/skills/analysis-skill-router/evals/evals.json +13 -0
- package/dist/agent-src/skills/api-testing/SKILL.md +15 -1
- package/dist/agent-src/skills/character-consistency/evals/evals.json +16 -0
- package/dist/agent-src/skills/code-review/SKILL.md +2 -0
- package/dist/agent-src/skills/command-routing/evals/evals.json +14 -0
- package/dist/agent-src/skills/command-writing/SKILL.md +53 -40
- package/dist/agent-src/skills/dashboard-design/evals/evals.json +16 -0
- package/dist/agent-src/skills/dcf-modeling/evals/domain-truth.json +29 -0
- package/dist/agent-src/skills/dcf-modeling/evals/evals.json +20 -0
- package/dist/agent-src/skills/decision-record/evals/evals.json +20 -0
- package/dist/agent-src/skills/deep-reading-analyst/SKILL.md +1 -0
- package/dist/agent-src/skills/design-intelligence/SKILL.md +49 -12
- package/dist/agent-src/skills/design-intelligence/evals/evals.json +14 -0
- package/dist/agent-src/skills/design-review/SKILL.md +35 -15
- package/dist/agent-src/skills/design-system-capture/SKILL.md +84 -24
- package/dist/agent-src/skills/design-system-capture/evals/evals.json +15 -0
- package/dist/agent-src/skills/developer-like-execution/evals/evals.json +16 -0
- package/dist/agent-src/skills/doc-coauthoring/SKILL.md +27 -0
- package/dist/agent-src/skills/doc-coauthoring/evals/evals.json +16 -0
- package/dist/agent-src/skills/editorial-calendar/evals/domain-truth.json +16 -0
- package/dist/agent-src/skills/editorial-calendar/evals/evals.json +16 -0
- package/dist/agent-src/skills/estimate-ticket/evals/evals.json +16 -0
- package/dist/agent-src/skills/existing-ui-audit/SKILL.md +30 -0
- package/dist/agent-src/skills/existing-ui-audit/evals/triggers.json +47 -0
- package/dist/agent-src/skills/fe-design/SKILL.md +36 -5
- package/dist/agent-src/skills/fe-design/evals/triggers.json +47 -0
- package/dist/agent-src/skills/forecasting/evals/domain-truth.json +29 -0
- package/dist/agent-src/skills/forecasting/evals/evals.json +20 -0
- package/dist/agent-src/skills/frontend-render-security/SKILL.md +2 -2
- package/dist/agent-src/skills/fundraising-narrative/evals/domain-truth.json +16 -0
- package/dist/agent-src/skills/fundraising-narrative/evals/evals.json +16 -0
- package/dist/agent-src/skills/html-deck/SKILL.md +27 -0
- package/dist/agent-src/skills/iconography/SKILL.md +24 -0
- package/dist/agent-src/skills/incident-commander/evals/domain-truth.json +16 -0
- package/dist/agent-src/skills/incident-commander/evals/evals.json +20 -0
- package/dist/agent-src/skills/launch-readiness/evals/evals.json +21 -0
- package/dist/agent-src/skills/logging-monitoring/evals/evals.json +16 -0
- package/dist/agent-src/skills/markitdown/SKILL.md +1 -0
- package/dist/agent-src/skills/mcp/SKILL.md +24 -0
- package/dist/agent-src/skills/mcp-builder/SKILL.md +9 -1
- package/dist/agent-src/skills/memory-consolidation/SKILL.md +55 -4
- package/dist/agent-src/skills/messaging-architecture/evals/domain-truth.json +16 -0
- package/dist/agent-src/skills/messaging-architecture/evals/evals.json +16 -0
- package/dist/agent-src/skills/perf-feedback-craft/evals/evals.json +16 -0
- package/dist/agent-src/skills/pest-testing/SKILL.md +1 -1
- package/dist/agent-src/skills/playwright-testing/SKILL.md +16 -0
- package/dist/agent-src/skills/prompt-engineering-patterns/evals/evals.json +16 -0
- package/dist/agent-src/skills/refine-prompt/evals/evals.json +16 -0
- package/dist/agent-src/skills/refine-ticket/evals/evals.json +16 -0
- package/dist/agent-src/skills/release-comms/evals/evals.json +16 -0
- package/dist/agent-src/skills/rice-prioritization/evals/evals.json +20 -0
- package/dist/agent-src/skills/roadmap-writing/SKILL.md +39 -5
- package/dist/agent-src/skills/runway-cognition/evals/domain-truth.json +29 -0
- package/dist/agent-src/skills/runway-cognition/evals/evals.json +20 -0
- package/dist/agent-src/skills/scenario-modeling/evals/domain-truth.json +29 -0
- package/dist/agent-src/skills/scenario-modeling/evals/evals.json +20 -0
- package/dist/agent-src/skills/secrets-management/SKILL.md +7 -0
- package/dist/agent-src/skills/skill-writing/SKILL.md +12 -3
- package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +98 -0
- package/dist/agent-src/skills/spreadsheet-authoring/evals/triggers.json +47 -0
- package/dist/agent-src/skills/subagent-orchestration/SKILL.md +27 -33
- package/dist/agent-src/skills/supply-chain-intake/SKILL.md +12 -0
- package/dist/agent-src/skills/systematic-debugging/evals/evals.json +20 -0
- package/dist/agent-src/skills/test-case-discovery/SKILL.md +118 -0
- package/dist/agent-src/skills/test-case-discovery/evals/triggers.json +52 -0
- package/dist/agent-src/skills/test-driven-development/SKILL.md +32 -6
- package/dist/agent-src/skills/test-driven-development/evals/evals.json +16 -0
- package/dist/agent-src/skills/testing-anti-patterns/SKILL.md +34 -4
- package/dist/agent-src/skills/threat-modeling/evals/evals.json +21 -0
- package/dist/agent-src/skills/typography-system/evals/evals.json +14 -0
- package/dist/agent-src/skills/ui-component-architect/SKILL.md +9 -0
- package/dist/agent-src/skills/unit-economics-modeling/evals/domain-truth.json +40 -0
- package/dist/agent-src/skills/unit-economics-modeling/evals/evals.json +24 -0
- package/dist/agent-src/skills/verify-completion-evidence/evals/evals.json +16 -0
- package/dist/agent-src/skills/vision-articulation/evals/evals.json +16 -0
- package/dist/agent-src/skills/voice-and-tone-design/evals/evals.json +16 -0
- package/dist/agent-src/skills/worktree-lifecycle/SKILL.md +180 -0
- package/dist/agent-src/skills/worktree-lifecycle/evals/triggers.json +52 -0
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/roadmaps.md +36 -0
- package/dist/cli/registry.js +3 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +326 -67
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +6 -6
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +25 -14
- package/dist/discovery/trust-report.md +4 -4
- package/dist/discovery/workspaces.json +25 -12
- package/dist/install/install.mjs +136 -1
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/router.json +1 -1
- package/dist/scripts/_lib/claude_builtin_names.js +145 -0
- package/dist/scripts/_lib/claude_builtin_names.js.map +1 -0
- package/dist/scripts/condense.js +14 -0
- package/dist/scripts/condense.js.map +1 -1
- package/docs/CLAIMS.md +36 -8
- package/docs/architecture.md +4 -4
- package/docs/archive/CHANGELOG-pre-8.9.0.md +306 -0
- package/docs/benchmark.md +113 -0
- package/docs/catalog.md +32 -8
- package/docs/command-flows.md +6 -1
- package/docs/contracts/CHANGELOG-conventions.md +6 -0
- package/docs/contracts/command-clusters.md +18 -0
- package/docs/contracts/design-artifact-lifecycle.md +93 -0
- package/docs/contracts/design-artifact-verification.md +153 -0
- package/docs/contracts/injected-block-authenticity-model.md +66 -0
- package/docs/contracts/mcp-tool-inventory.md +28 -28
- package/docs/contracts/release-pr-gating.md +26 -0
- package/docs/contracts/release-sizing.md +85 -0
- package/docs/contracts/surface-agent-contracts.md +153 -0
- package/docs/decisions/ADR-061-corpus-grounding-layer.md +13 -0
- package/docs/decisions/ADR-115-command-cluster-consolidation-phase-4.md +1 -1
- package/docs/decisions/ADR-116-memory-tripwire-activation-path.md +9 -0
- package/docs/distribution/consumer-matrix.md +96 -0
- package/docs/featured-skills.md +2 -2
- package/docs/getting-started-by-role.md +1 -1
- package/docs/getting-started.md +2 -2
- package/docs/governance-advantage.md +1 -1
- package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +27 -0
- package/docs/guidelines/agent-infra/emphasis-budget.md +45 -0
- package/docs/guidelines/agent-infra/simplicity-and-goal-demos.md +151 -0
- package/docs/guidelines/agent-infra/tool-description-as-policy.md +35 -0
- package/docs/guidelines/design-canon.md +1 -0
- package/docs/proof.md +38 -23
- package/docs/release-runbook.md +3 -0
- package/docs/second-brain-scope.md +69 -26
- package/docs/self-review-gate.md +51 -0
- package/package.json +1 -1
- package/src/agent-src/scripts/update_roadmap_progress.ts +2 -1
- package/src/scripts/_dispatch.bash +27 -0
- package/src/scripts/_lib/claude_builtin_names.ts +148 -0
- package/src/scripts/_lib/file_slicer.ts +117 -0
- package/src/scripts/_lib/lexical_index.ts +155 -0
- package/src/scripts/_lib/orchestration_record.ts +183 -0
- package/src/scripts/_lib/orchestration_savings.ts +114 -9
- package/src/scripts/_lib/retrieval_sanitize.ts +71 -0
- package/src/scripts/_lib/security_lint.ts +1 -0
- package/src/scripts/_lib/stat_index.ts +98 -0
- package/src/scripts/benchmark.ts +122 -0
- package/src/scripts/build_proof.ts +30 -17
- package/src/scripts/check_memory.ts +2 -0
- package/src/scripts/check_quality_regression.ts +51 -0
- package/src/scripts/check_release_adjacent_health.ts +121 -0
- package/src/scripts/check_roadmap_trackable.ts +3 -2
- package/src/scripts/check_rule_invariants.ts +275 -0
- package/src/scripts/condense.ts +14 -0
- package/src/scripts/consumer_matrix.ts +353 -0
- package/src/scripts/discovery_graph.ts +0 -0
- package/src/scripts/external_sources_denylist.json +4 -1
- package/src/scripts/generate_index.ts +6 -2
- package/src/scripts/install-hooks.sh +25 -0
- package/src/scripts/install.ts +35 -2
- package/src/scripts/learning_sidecar.ts +0 -0
- package/src/scripts/lint_agent_skill_names.ts +29 -0
- package/src/scripts/lint_changelog_rollback.ts +293 -0
- package/src/scripts/lint_knowledge_scale.ts +4 -3
- package/src/scripts/lint_roadmap_complexity.ts +124 -0
- package/src/scripts/lint_versioned_cache.ts +195 -0
- package/src/scripts/mcp_server/consumer_tool_catalog.json +2 -1
- package/src/scripts/mcp_server/tools.ts +24 -1
- package/src/scripts/measure_lexical_ranking.ts +173 -0
- package/src/scripts/memory_lookup.ts +0 -0
- package/src/scripts/orchestration_record.ts +156 -0
- package/src/scripts/orchestration_savings_report.ts +65 -8
- package/src/scripts/schemas/skill.schema.json +4 -0
- package/src/scripts/score_domain_truth.ts +192 -0
- package/src/scripts/second_brain_retrieval.ts +320 -0
- package/src/scripts/second_brain_run.ts +341 -0
- package/src/scripts/self_review_gate.test.ts +65 -0
- package/src/scripts/self_review_gate.ts +272 -0
- package/src/scripts/trigger_eval_grandfather.json +223 -224
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
model_tier: medium
|
|
3
|
+
name: worktree
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
pack: engineering-base
|
|
6
|
+
tier: 2
|
|
7
|
+
visibility: internal
|
|
8
|
+
description: Worktree orchestrator — routes to create, status, verify, cleanup
|
|
9
|
+
cluster: worktree
|
|
10
|
+
type: orchestrator
|
|
11
|
+
auto_detect: true
|
|
12
|
+
suggestion:
|
|
13
|
+
eligible: true
|
|
14
|
+
trigger_description: "isolate this in a worktree, which worktrees are active, is the worktree merge-ready, clean up finished worktrees"
|
|
15
|
+
trigger_context: "parallel work needs an isolated working directory, or existing worktrees need status/verification/removal"
|
|
16
|
+
workspaces:
|
|
17
|
+
- agent-config-maintainer
|
|
18
|
+
packs:
|
|
19
|
+
- meta
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# /worktree
|
|
23
|
+
|
|
24
|
+
Top-level orchestrator for the governed-worktree family — a THIN layer
|
|
25
|
+
over host-native primitives (Claude Code `EnterWorktree`/`ExitWorktree`,
|
|
26
|
+
subagent `isolation: "worktree"`) and plain `git worktree` elsewhere.
|
|
27
|
+
Explicitly OUT of scope: auto-merge, daemons, background watchers,
|
|
28
|
+
dispatch beyond the existing subagent worktree isolation.
|
|
29
|
+
|
|
30
|
+
## Sub-commands
|
|
31
|
+
|
|
32
|
+
| Sub-command | Routes to | Purpose |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `/worktree create` | `commands/worktree/create.md` | Create a governed worktree + write the scope-lock note (propose-once branch naming) |
|
|
35
|
+
| `/worktree status` | `commands/worktree/status.md` | List active worktrees — ownership, dirty state, ahead/behind, merge-readiness incl. verification evidence |
|
|
36
|
+
| `/worktree verify` | `commands/worktree/verify.md` | Run the scoped verification for the worktree's declared change — narrow probes, not full CI |
|
|
37
|
+
| `/worktree cleanup` | `commands/worktree/cleanup.md` | Safe removal gate — refuses while the branch has commits on no other ref |
|
|
38
|
+
|
|
39
|
+
All four route through the
|
|
40
|
+
[`worktree-lifecycle`](../../skills/worktree-lifecycle/SKILL.md) skill;
|
|
41
|
+
creation mechanics live in
|
|
42
|
+
[`using-git-worktrees`](../../skills/using-git-worktrees/SKILL.md).
|
|
43
|
+
|
|
44
|
+
## Non-interactive & auto-detection
|
|
45
|
+
|
|
46
|
+
`/worktree` honors the [`non-interactive-contract`](../contexts/execution/non-interactive-contract.md)
|
|
47
|
+
(surface detection, confidence tiers, `--yes`/`--json`, abort schemas,
|
|
48
|
+
the `auto_detect` kill-switch). Detection table:
|
|
49
|
+
|
|
50
|
+
| Basis (signal) | Sub-command | Confidence |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| Explicit sub given (`/worktree status`) | that one | — (detection skipped) |
|
|
53
|
+
| "isolate / do this on the side / new worktree for X" | `worktree/create` | HIGH |
|
|
54
|
+
| "which worktrees / what's active / merge-ready?" | `worktree/status` | HIGH |
|
|
55
|
+
| "verify the worktree change", scoped probe intent | `worktree/verify` | MEDIUM |
|
|
56
|
+
| "remove / clean up the worktree(s)" | `worktree/cleanup` | HIGH |
|
|
57
|
+
| No clear signal | — | LOW → menu (interactive) / `ambiguous_routing` (CI) |
|
|
58
|
+
|
|
59
|
+
`cleanup` is the only destructive sub-command — on MEDIUM-or-lower
|
|
60
|
+
confidence it is never auto-selected; show the menu instead.
|
|
61
|
+
|
|
62
|
+
## Dispatch
|
|
63
|
+
|
|
64
|
+
1. Parse the user's argument: `/worktree <sub-command> [args]`.
|
|
65
|
+
2. **Explicit sub** → look it up and route. Otherwise run the detection
|
|
66
|
+
table above per the non-interactive-contract.
|
|
67
|
+
3. Load the body of the routed file and follow its `## Instructions`
|
|
68
|
+
section verbatim with the remaining args.
|
|
69
|
+
4. On **LOW** confidence (or `--no-auto-detect`): interactive → print
|
|
70
|
+
the menu and ask; non-interactive → emit `ambiguous_routing` and stop.
|
|
71
|
+
|
|
72
|
+
> 1. create — new governed worktree + scope-lock note
|
|
73
|
+
> 2. status — list worktrees with merge-readiness
|
|
74
|
+
> 3. verify — run the scoped verification for a worktree
|
|
75
|
+
> 4. cleanup — safely remove finished worktrees
|
|
76
|
+
|
|
77
|
+
## Rules
|
|
78
|
+
|
|
79
|
+
- **Do NOT commit, push, or open a PR** unless the sub-command
|
|
80
|
+
explicitly authorizes it.
|
|
81
|
+
- **Do NOT chain sub-commands.** One `/worktree <sub>` per turn.
|
|
82
|
+
- **No auto-merge, no watchers.** The cluster reports and gates; the
|
|
83
|
+
user (or an explicitly invoked command) merges.
|
|
84
|
+
- Auto-detection never guesses past LOW, and never auto-selects
|
|
85
|
+
`cleanup` below HIGH confidence.
|
|
@@ -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`](
|
|
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,8 +23,12 @@ 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
|
-
"verify_result_by_tier": null
|
|
29
|
+
"verify_result_by_tier": null,
|
|
30
|
+
"first_pass_success": null,
|
|
31
|
+
"escalated": null
|
|
28
32
|
}
|
|
29
33
|
```
|
|
30
34
|
|
|
@@ -32,22 +36,26 @@ v1 forward-compat rule on unknown fields).
|
|
|
32
36
|
|
|
33
37
|
| Field | Type | Meaning |
|
|
34
38
|
|---|---|---|
|
|
35
|
-
| `task_size_estimate` | int | Pre-dispatch estimate of the task's size (orchestrator's sizing heuristic). Counts only, no body. |
|
|
36
|
-
| `spawn_count` | int |
|
|
37
|
-
| `tiers` | string[] | Model tiers dispatched to, one per spawn class (e.g. `["sonnet","opus"]`). Tier names only, no prompts. |
|
|
38
|
-
| `token_delta` | int | Net token cost
|
|
39
|
-
| `token_delta_provenance` | enum | `"measured"` from host-reported `usage` metadata (preferred); `"estimated"` when self-estimated from response length (mark always when host usage unavailable). |
|
|
40
|
-
| `wall_clock_ms` | int |
|
|
39
|
+
| `task_size_estimate` | int | Pre-dispatch estimate of the task's size (the orchestrator's sizing heuristic). Counts only, no body. |
|
|
40
|
+
| `spawn_count` | int | Number of subagents dispatched for this task. `0` → handled in-session. |
|
|
41
|
+
| `tiers` | string[] | Model tiers dispatched to, one entry per spawn class (e.g. `["sonnet","opus"]`). Tier names only, no prompts. |
|
|
42
|
+
| `token_delta` | int | Net token cost of the dispatch versus the in-session baseline. Positive = orchestration cost more; negative = saved tokens. Counts only. |
|
|
43
|
+
| `token_delta_provenance` | enum | `"measured"` when sourced from host-reported `usage` metadata (preferred); `"estimated"` when self-estimated from response length (mark always when host usage is unavailable). |
|
|
44
|
+
| `wall_clock_ms` | int | Wall-clock duration of the dispatch, milliseconds. |
|
|
41
45
|
| `outcome` | enum | One of `DONE` · `DONE_WITH_CONCERNS` · `NEEDS_CONTEXT` · `BLOCKED` · `killed`. |
|
|
42
|
-
| `verify_mode` | enum | How output was verified: `deterministic` · `judge` · `none`. |
|
|
43
|
-
| `verdict_changed_outcome` | bool \| null | **A3 extension (ADR-109 Track A).** For a review/verdict subagent (e.g. `production-validator`): did the verdict change the outcome
|
|
46
|
+
| `verify_mode` | enum | How the dispatch's output was verified: `deterministic` · `judge` · `none`. |
|
|
47
|
+
| `verdict_changed_outcome` | bool \| null | **A3 extension (ADR-109 Track A).** For a review/verdict subagent (e.g. `production-validator`): did the subagent's verdict actually change the outcome versus the in-session baseline? `true` = it caught a real issue the baseline missed or flipped a false `READY`→`NOT READY`; `false` = same outcome as baseline (no lift); `null` = not a verdict dispatch / not measured. **Negative-control tasks (a clean single-file task) MUST record `false`** — a subagent that reports `true` on a control is producing spurious findings and fails Gate A. This is an additive field on THIS object, not a second schema. Counts/boolean only, no bodies. |
|
|
44
48
|
| `task_class` | string \| null | **Routing extension (road-to-cost-aware-model-routing Phase 0).** Category id of the dispatched slice (e.g. `read-only-fanout`, `mechanical-edit`, `implementation`, `review-synthesis`). Enum-style id only, never free-form task text. `null` = pre-extension line / unclassified. |
|
|
45
49
|
| `tier_chosen` | string \| null | Tier the slice was dispatched on (`lite` \| `medium` \| `high`). `null` = pre-extension line. |
|
|
46
50
|
| `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
|
-
| `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
|
-
| `verify_result_by_tier` | object \| null | Map tier → verification result
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
| `escalated_from` | string \| null | When the slice was re-dispatched after a verification failure: the tier of the FAILED attempt (e.g. `lite` when a lite return failed verify and the slice re-ran on `medium`). `null` = no escalation. |
|
|
52
|
+
| `verify_result_by_tier` | object \| null | Map of tier → verification result for every 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. |
|
|
53
|
+
| `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. |
|
|
54
|
+
| `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. |
|
|
55
|
+
| `first_pass_success` | bool \| null | **QUALITY extension (council verdict: quality × cost paired).** `true` = the subagent return was adopted without parent rework; `false` = the parent had to rework the return before adopting. `null` = pre-extension line / not measured. Boolean only, no bodies. |
|
|
56
|
+
| `escalated` | bool \| null | **QUALITY extension (council verdict: quality × cost paired).** `true` = the slice was retried on a higher tier after a verification failure; `false` = no escalation. `null` = pre-extension line / not measured. Boolean only, no bodies. |
|
|
57
|
+
|
|
58
|
+
These routing + cost fields are additive and optional — a line without them is
|
|
51
59
|
still a valid orchestration line; readers ignore unknown fields per the v1
|
|
52
60
|
forward-compat rule.
|
|
53
61
|
|
|
@@ -70,37 +78,58 @@ object is an additive extension on an otherwise standard audit-log-v1 line:
|
|
|
70
78
|
|
|
71
79
|
After every auto-dispatched orchestration run, the orchestrating agent writes one
|
|
72
80
|
telemetry line to `agents/runtime/state/audit/YYYY-MM.jsonl` (the existing
|
|
73
|
-
audit-log-v1 path
|
|
74
|
-
audit-log-v1 object with `input_kind: "orchestration"` and an
|
|
75
|
-
sub-object carrying this shape.
|
|
81
|
+
audit-log-v1 path, where `YYYY-MM` is the current UTC month). The line is a
|
|
82
|
+
standard audit-log-v1 object with `input_kind: "orchestration"` and an
|
|
83
|
+
`orchestration` sub-object carrying this shape.
|
|
84
|
+
|
|
85
|
+
**No hook or daemon required.** The agent writes the line directly — the
|
|
86
|
+
no-runtime-compatible capture path (decided 2026-06-30, maintainer decision;
|
|
87
|
+
see `road-to-subagent-value-realization.md § Council notes`). Do NOT
|
|
88
|
+
hand-author the JSON: run the recorder, which validates the inputs and builds a
|
|
89
|
+
conformant audit-log-v1 line from the counts you already have:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
./scripts-run src/scripts/orchestration_record --spawn-count <n> \
|
|
93
|
+
--token-delta <±n> --provenance measured|estimated \
|
|
94
|
+
[--tier-chosen lite|medium|high] [--tier-source static|inferred|inherit] \
|
|
95
|
+
[--task-class <id>] [--tiers a,b] [--dispatch-outcome DONE|BLOCKED|…] \
|
|
96
|
+
[--first-pass-success true|false] [--escalated true|false]
|
|
97
|
+
```
|
|
76
98
|
|
|
77
|
-
**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
`
|
|
99
|
+
A capture **hook** is the wrong tool here: the PostToolUse payload carries no
|
|
100
|
+
subagent token usage — only the orchestrator sees it (via the run result) — and
|
|
101
|
+
a hook would reverse the 2026-06-30 no-hook decision. Reader:
|
|
102
|
+
`src/scripts/orchestration_savings_report.ts`.
|
|
81
103
|
|
|
82
104
|
**`token_delta` sourcing priority:**
|
|
83
105
|
1. Host-reported: read `usage.output_tokens` (and `usage.input_tokens` if
|
|
84
|
-
available) from each subagent call
|
|
85
|
-
estimated single-agent baseline. Set `token_delta_provenance:
|
|
86
|
-
|
|
106
|
+
available) from the response metadata of each subagent call. Use the sum
|
|
107
|
+
minus the estimated single-agent baseline. Set `token_delta_provenance:
|
|
108
|
+
"measured"`.
|
|
109
|
+
2. Self-estimate fallback: if host usage metadata is unavailable, estimate from
|
|
87
110
|
response length (chars / 4 ≈ tokens). Set `token_delta_provenance:
|
|
88
|
-
"estimated"`.
|
|
111
|
+
"estimated"`. This estimate is lossy; measured is always preferred.
|
|
89
112
|
|
|
90
113
|
## Savings report
|
|
91
114
|
|
|
92
|
-
Aggregate accumulated telemetry into a token-savings report:
|
|
115
|
+
Aggregate the accumulated telemetry into a token-savings report:
|
|
93
116
|
|
|
94
117
|
```bash
|
|
95
118
|
./scripts-run src/scripts/orchestration_savings_report [--dir <path>] [--format text|json]
|
|
96
119
|
```
|
|
97
120
|
|
|
98
|
-
|
|
99
|
-
provenance (measured vs estimated), `tier_chosen`, `task_class`.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
121
|
+
It sums `token_delta` across dispatches (negative = net saved) and splits by
|
|
122
|
+
provenance (measured vs estimated), `tier_chosen`, and `task_class`. **Quality
|
|
123
|
+
and cost render as PAIRED columns** (council verdict — never savings alone):
|
|
124
|
+
`first_pass_success_rate` and `escalation_rate` aggregate over the lines that
|
|
125
|
+
carry the quality booleans; with ≥ 20 such lines in the window the real rates
|
|
126
|
+
render beside the savings figures, below 20 the quality columns render as
|
|
127
|
+
`n/a (n=<count>)`. It reports
|
|
128
|
+
**ABSOLUTE net tokens saved, never a percentage**: the telemetry records net
|
|
129
|
+
delta, not the absolute in-session baseline, so a "% of session saved" is not
|
|
130
|
+
derivable from this data. A percentage would require an additive
|
|
131
|
+
absolute-baseline field on this object (deferred follow-up). Reader:
|
|
132
|
+
[`src/scripts/_lib/orchestration_savings.ts`](../../../../src/scripts/_lib/orchestration_savings.ts).
|
|
104
133
|
|
|
105
134
|
## Related
|
|
106
135
|
|
|
@@ -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
|
|
15
|
-
proactively — never ask
|
|
16
|
-
|
|
17
|
-
(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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: [
|
|
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
|
|
|
@@ -88,6 +88,46 @@ redesign.
|
|
|
88
88
|
- Treating an internal "honesty gate" or "stub" concern as licence to redesign the UI.
|
|
89
89
|
- Re-running a redesign after the user already said "match the prototype".
|
|
90
90
|
|
|
91
|
+
## Surgical visual edits
|
|
92
|
+
|
|
93
|
+
A request to change one visual thing — a colour, a label, a single element — is
|
|
94
|
+
a **targeted edit**, not a redesign licence. Apply the same
|
|
95
|
+
[`minimal-safe-diff`](minimal-safe-diff.md) discipline to design work that
|
|
96
|
+
backend edits have always owed.
|
|
97
|
+
|
|
98
|
+
- **Change only the semantic target.** Preserve the surrounding layout,
|
|
99
|
+
spacing, typography, dimensions, content, animation, and interaction states.
|
|
100
|
+
Do not rewrite the component, reflow the section, or "modernise" neighbours
|
|
101
|
+
while you are in there. (fixtures: `daf-edit-preservation`, `daf-unwanted-variations`.)
|
|
102
|
+
- **A broader redesign needs an explicit trigger.** Only phrases like *"new
|
|
103
|
+
direction"*, *"from scratch"*, *"make it feel premium"*, *"rework the flow"*,
|
|
104
|
+
or *"give me variations / options"* license a from-scratch rework. Absent such
|
|
105
|
+
a phrase, a "fix / change / update the X" request is surgical — when unsure
|
|
106
|
+
which, ask ([`ask-when-uncertain`](ask-when-uncertain.md)). (fixture: `daf-redesign-trigger`.)
|
|
107
|
+
- **Preserve stable anchors.** Where the host exposes DOM/comment metadata, keep
|
|
108
|
+
comment anchors and screen labels intact so the edit stays locatable. Where
|
|
109
|
+
the host has no such surface, preserve stable semantic anchors already present
|
|
110
|
+
in source comments / `data-*` attributes — never strip them, and do not invent
|
|
111
|
+
new ones.
|
|
112
|
+
|
|
113
|
+
## Asset & imagery discipline
|
|
114
|
+
|
|
115
|
+
Visual artifacts carry **real assets or honest placeholders — never fabricated
|
|
116
|
+
brand evidence**. The design-surface instance of the no-invented-facts floor.
|
|
117
|
+
|
|
118
|
+
- **Copy owned assets through the project's accepted path.** Reference or copy
|
|
119
|
+
project-owned assets (logos, icons, fonts, images) via the target project's
|
|
120
|
+
asset directory/pipeline — never hotlink a design-system's internal URL, never
|
|
121
|
+
bulk-copy a huge source folder. (fixtures: `daf-missing-asset`, `daf-external-asset-url`.)
|
|
122
|
+
- **Real imagery where inspection matters.** On visual pages/decks, use actual
|
|
123
|
+
product / place / object / state imagery where the image IS the proof (a
|
|
124
|
+
product screenshot, a real dashboard state). Decorative atmosphere is not proof
|
|
125
|
+
— never pass a stock-like or invented image off as the real product. An
|
|
126
|
+
invented product screenshot is fabricated evidence. (fixture: `daf-invented-screenshot`.)
|
|
127
|
+
- **Icons follow the iconography floor** — no emoji-as-icon in serious UI, no
|
|
128
|
+
hand-rolled icon when a set exists; see
|
|
129
|
+
[`iconography`](../skills/iconography/SKILL.md) § Iconography floor.
|
|
130
|
+
|
|
91
131
|
## See also
|
|
92
132
|
|
|
93
133
|
- [`brand-source-of-truth`](brand-source-of-truth.md) / [`brand-consistency`](brand-consistency.md) — same precedence shape, for registered brand tokens.
|
|
@@ -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
|
|
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.
|