@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,151 @@
|
|
|
1
|
+
# Simplicity and Goal Discipline — wrong/right demos
|
|
2
|
+
|
|
3
|
+
Recognition surface for [`minimal-safe-diff § Anti-over-engineering`](../../src/rules/minimal-safe-diff.md)
|
|
4
|
+
(own-orphan cleanup, speculative-complexity bans) and the goal-driven
|
|
5
|
+
execution clause in `think-before-action`. Per council convergence
|
|
6
|
+
(2026-07-10): the demos ARE the enforcement — an agent that has never seen
|
|
7
|
+
the violation cannot recognize it, no matter how crisp the checklist question.
|
|
8
|
+
Match your diff against the *right* column before presenting.
|
|
9
|
+
|
|
10
|
+
## 1. Over-abstraction vs. one function
|
|
11
|
+
|
|
12
|
+
**Ask:** "Add a function to calculate a percentage discount."
|
|
13
|
+
|
|
14
|
+
**Wrong — Strategy pattern for a single caller (PHP):**
|
|
15
|
+
|
|
16
|
+
```php
|
|
17
|
+
interface DiscountStrategy { public function calculate(float $amount): float; }
|
|
18
|
+
final class PercentageDiscount implements DiscountStrategy { /* … */ }
|
|
19
|
+
final class FixedDiscount implements DiscountStrategy { /* … */ }
|
|
20
|
+
final readonly class DiscountConfig { /* strategy, minPurchase, maxDiscount */ }
|
|
21
|
+
final class DiscountCalculator { /* 30+ lines of orchestration */ }
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Right — one function until the second discount type is real:**
|
|
25
|
+
|
|
26
|
+
```php
|
|
27
|
+
function calculateDiscount(float $amount, float $percent): float
|
|
28
|
+
{
|
|
29
|
+
return $amount * ($percent / 100);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Why:** No second caller, no second strategy → no abstraction. When the
|
|
34
|
+
second type genuinely arrives, refactor then (`prefer-enums-over-literals` /
|
|
35
|
+
Strategy sniff test governs that moment). The wrong version is not "bad
|
|
36
|
+
code" — it is *premature* code: harder to read, more surface to test, and
|
|
37
|
+
speculative until the requirement exists.
|
|
38
|
+
|
|
39
|
+
## 2. Speculative features vs. just-what-was-asked
|
|
40
|
+
|
|
41
|
+
**Ask:** "Save user preferences to the database."
|
|
42
|
+
|
|
43
|
+
**Wrong — options nobody requested (TypeScript):**
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
class PreferenceManager {
|
|
47
|
+
constructor(db: Db, cache?: Cache, validator?: Validator) { /* … */ }
|
|
48
|
+
save(userId: number, prefs: Prefs,
|
|
49
|
+
opts: { merge?: boolean; validate?: boolean; notify?: boolean } = {}) {
|
|
50
|
+
// merging, validation, cache write, notification fan-out — all unasked
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Right — the ask, nothing else:**
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
async function savePreferences(db: Db, userId: number, prefs: Prefs) {
|
|
59
|
+
await db.query('UPDATE users SET preferences = $1 WHERE id = $2',
|
|
60
|
+
[JSON.stringify(prefs), userId]);
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Why:** Every optional parameter with one call site, every "flexibility"
|
|
65
|
+
flag, and every handler for a scenario that cannot occur is speculative
|
|
66
|
+
complexity. Add caching when performance data demands it, validation when bad
|
|
67
|
+
data appears, merging when the requirement lands.
|
|
68
|
+
|
|
69
|
+
## 3. Drive-by refactor vs. surgical diff
|
|
70
|
+
|
|
71
|
+
**Ask:** "Fix the bug where an empty email crashes the validator."
|
|
72
|
+
|
|
73
|
+
**Wrong:** the fix PLUS improved email regex, new username length checks,
|
|
74
|
+
rewritten comments, and a fresh docstring — four changes, one was asked.
|
|
75
|
+
|
|
76
|
+
**Right:** only the lines that make the empty-email case safe change; every
|
|
77
|
+
other line of the function is byte-identical.
|
|
78
|
+
|
|
79
|
+
**Why:** Every changed line must trace to the stated task
|
|
80
|
+
(`minimal-safe-diff`). The "improvements" belong in a follow-up proposed via
|
|
81
|
+
`active-remediation`'s note-and-ask ladder — not smuggled into the bug fix.
|
|
82
|
+
|
|
83
|
+
## 4. Style drift vs. match-existing-style
|
|
84
|
+
|
|
85
|
+
**Ask:** "Add logging to the upload function."
|
|
86
|
+
|
|
87
|
+
**Wrong:** the diff adds logging AND flips quote style, adds type hints,
|
|
88
|
+
reshapes the boolean return, reflows whitespace — the reviewer can no longer
|
|
89
|
+
see the logging change.
|
|
90
|
+
|
|
91
|
+
**Right:** logger import + three log lines, inserted in the file's existing
|
|
92
|
+
style (its quoting, its spacing, its return pattern), even where you would
|
|
93
|
+
personally write it differently.
|
|
94
|
+
|
|
95
|
+
**Why:** Style consistency is a repo property, not a per-diff taste decision.
|
|
96
|
+
A diff that reformats while changing behavior hides the behavior change.
|
|
97
|
+
|
|
98
|
+
## 5. Own-orphan vs. pre-existing dead code
|
|
99
|
+
|
|
100
|
+
**Ask:** "Replace the legacy formatter call in `processA` with the new one."
|
|
101
|
+
|
|
102
|
+
**Wrong (too little):** `processA` no longer calls `legacyFormat()`, but the
|
|
103
|
+
now-unused import and the helper it alone referenced stay behind — the diff
|
|
104
|
+
shipped its own litter.
|
|
105
|
+
|
|
106
|
+
**Wrong (too much):** while in the file, the agent also deletes
|
|
107
|
+
`oldHelper()`, which `processB` — untouched by this diff — still references
|
|
108
|
+
in another module, or which was already orphaned *before* this task.
|
|
109
|
+
|
|
110
|
+
**Right:** remove exactly the imports/variables/functions whose **last
|
|
111
|
+
reference disappeared in a file this diff touched**; anything still
|
|
112
|
+
referenced from untouched files — or orphaned before the task — is
|
|
113
|
+
pre-existing debt: mention it, don't delete it.
|
|
114
|
+
|
|
115
|
+
**Why:** The boundary is mechanical (grep after editing), so there is no
|
|
116
|
+
judgment call to rationalize — see
|
|
117
|
+
[`minimal-safe-diff § Own-orphan cleanup`](../../src/rules/minimal-safe-diff.md#own-orphan-cleanup).
|
|
118
|
+
|
|
119
|
+
## 6. Vague plan vs. verifiable per-step plan
|
|
120
|
+
|
|
121
|
+
**Ask:** "Add rate limiting to the API."
|
|
122
|
+
|
|
123
|
+
**Wrong — unverifiable narration:**
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
1. Review the code
|
|
127
|
+
2. Identify issues
|
|
128
|
+
3. Implement rate limiting
|
|
129
|
+
4. Test the changes
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Right — every step carries its check:**
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
1. In-memory limit on one endpoint → verify: 11th request in a minute → 429 (test)
|
|
136
|
+
2. Extract to middleware, all endpoints → verify: limit fires on /users AND /posts; existing endpoint tests stay green
|
|
137
|
+
3. Shared store backend → verify: counter survives app restart; two instances share the count
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Why:** A step without a `verify:` is an assumption. Strong criteria let the
|
|
141
|
+
loop run independently (`verify-before-complete` then has something to
|
|
142
|
+
check); "make it work" guarantees clarification churn after the fact instead
|
|
143
|
+
of before.
|
|
144
|
+
|
|
145
|
+
## Key insight
|
|
146
|
+
|
|
147
|
+
The wrong versions are not obviously wrong — they follow known patterns and
|
|
148
|
+
"best practices". The failure is **timing**: complexity added before the
|
|
149
|
+
requirement exists costs comprehension, bugs, and test surface today for a
|
|
150
|
+
tomorrow that may never come. Solve today's problem simply; refactor when the
|
|
151
|
+
second requirement is real.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Tool description as policy
|
|
2
|
+
|
|
3
|
+
Authoring guideline for skills, commands, and MCP tools. Shared block — cited
|
|
4
|
+
from [`skill-writing`](../../../src/skills/skill-writing/SKILL.md),
|
|
5
|
+
[`command-writing`](../../../src/skills/command-writing/SKILL.md), and
|
|
6
|
+
[`mcp-builder`](../../../src/skills/mcp-builder/SKILL.md).
|
|
7
|
+
|
|
8
|
+
## The principle
|
|
9
|
+
|
|
10
|
+
Policy that governs *how a tool is used* belongs **inside the tool's own
|
|
11
|
+
description**, where it fires at the decision point the model is already
|
|
12
|
+
reading — not in always-on prose the model may not have loaded when it reaches
|
|
13
|
+
for the tool. The description is the highest-signal, best-timed place to encode
|
|
14
|
+
usage policy.
|
|
15
|
+
|
|
16
|
+
## What to encode in the description
|
|
17
|
+
|
|
18
|
+
- **Workflow sequencing.** If tool B must follow tool A ("call `memory_lookup`
|
|
19
|
+
with `detail:index` FIRST, then `memory_get` the ids"), say so in B's
|
|
20
|
+
description, not in a separate rule.
|
|
21
|
+
- **Preconditions.** What must be true before the tool is called (a built
|
|
22
|
+
artifact present, a prior step run) — stated where the model chooses to call.
|
|
23
|
+
- **ID / output provenance.** When the tool returns handles (ids, paths, PR
|
|
24
|
+
numbers), instruct: **copy them verbatim from the tool result, never from
|
|
25
|
+
memory** — context decay silently corrupts a remembered id.
|
|
26
|
+
- **A mandatory "why" intent field.** Require the caller to state the intent of
|
|
27
|
+
the call; a tool that forces "why am I calling this" cuts reflexive misuse.
|
|
28
|
+
- **Turn-end contracts.** If the tool ends the turn or hands off, the
|
|
29
|
+
description says so — the caller does not discover it after the fact.
|
|
30
|
+
|
|
31
|
+
## Why here, not as an always-on rule
|
|
32
|
+
|
|
33
|
+
An always-on rule pays context cost on every turn and may be evicted before the
|
|
34
|
+
decision; the description is loaded exactly when the tool is under
|
|
35
|
+
consideration. Encode the policy at the point of use.
|
|
@@ -60,3 +60,4 @@ Pull when: choosing or auditing an icon library.
|
|
|
60
60
|
- `docs/guidelines/design-antipatterns.md` — the anti-slop catalog (T7 default-font tell, C1/C5 palette tells) this canon helps you escape.
|
|
61
61
|
- `brand-source-of-truth` / `brand-consistency` — the precedence this index obeys.
|
|
62
62
|
- `design-intelligence` — the consumer that surfaces these on a brief signal.
|
|
63
|
+
- **Reference, don't vendor** (`domain-adoption-policy`): palette hex tables, font-width CSVs, easing/motion constant libraries, print-CSS recipes, and device-frame recipes are **referenced from maintained upstreams, never forked** into this suite — a vendored data table rots, fork-drifts, and couples the suite to one aesthetic. Corpus assets (palettes, easing tables, device frames) stay upstream references, not forks.
|
package/docs/proof.md
CHANGED
|
@@ -27,19 +27,23 @@ evidence pointer, or `task check-claims` fails the build.
|
|
|
27
27
|
| Claim | Kind | Evidence | Resolves |
|
|
28
28
|
|---|---|---|---|
|
|
29
29
|
| The release process is documented as an inheritable runbook + succession doc, and the project's bus-factor (trailing-90-day distinct human reviewers) is tracked and reported truthfully — currently 1, not implied to be more. | qual | `docs/succession.md#trailing 90 days` | ✅ |
|
|
30
|
-
|
|
|
30
|
+
| 177 commands. | quant | `src/scripts/check_artefact_count_messaging.ts#Artefact-count messaging gate` | ✅ |
|
|
31
|
+
| The retrieval economy cuts always-loaded context tokens ~65.6% measured against the FULL always-loaded projection — 98,529 → 33,897 tokens (eager rule load + skill/command descriptions + MCP schemas, thin-flipped). Method: `agent-config benchmark` over the pinned token baseline; the baseline is the honest "what the user pays if everything loads eagerly", NOT a synthetic full-corpus strawman (council Q4). | quant | `internal/bench/reports/token-baseline.json#eager_rule_load` | ✅ |
|
|
31
32
|
| On a weak host (claude-haiku-4-5) the package produces a significant, placebo-controlled discipline lift on scope/downstream traps; on a strong host the same measurement is a published null — the package transplants discipline a weak model lacks, not model intelligence. | quant | `docs/benchmark.md#weak-host-specific` | ✅ |
|
|
32
33
|
| The non-coding domain skills (finance/founder/ops/content) are forged on TS/PHP and labeled unvalidated until they pass a sourced domain-truth fixture; no public prose implies proven domain correctness, and the validated count is CI-ratcheted. | qual | `src/scripts/domain_soundness_status.ts#checkRatchet` | ✅ |
|
|
33
34
|
| On the READ-ONLY FAN-OUT slice family, tier-downshifted subagent dispatch (lite/haiku vs session-tier-proxy sonnet) nets a ≥30% USD-weighted token-cost reduction at held quality — measured 2026-07-08 (n=10 paired live dispatches, 20 telemetry lines): 10/10 exact-match on BOTH arms, 29.4% fewer raw tokens, 76.5% USD-weighted cost reduction at the 3x haiku↔sonnet price ratio. FAMILY-SCOPED — the mechanical-edit family is unmeasured and its downshift (incl. the deferred tier downgrades of existing units) stays gated. Negative control held: an open-ended synthesis/unknown slice never resolves below the session tier (inferSliceTier → medium/inherit, never lite). | quant | `internal/bench/routing-downshift/results-2026-07-08.md#FAMILY-SCOPED PROVE` | ✅ |
|
|
34
35
|
| The lift-carrying essential cut (kernel + downstream-changes) keeps a significant weak-host discipline lift at a fraction of the full load's tokens, and the lift is FAMILY- and HOST-SCOPED — measured on three hosts: claude-haiku-4-5 (weak) shows the family-scoped lift (trapE 0.533→1.000, 7/7 discordant, corpus cost 1.71x); claude-sonnet-4-6 (strong) is a ceiling null; gpt-5-mini (non-Claude weak, codex prompt-prepend surface) FAILED replication with headroom (corpus Δ=+0.024 p=0.70, capability trend n.s. — no harm claimed, injection-surface confound documented). Therefore discipline_profile: auto enables the lift only where measured (vendor-granular unknown_defaults). Non-claims — the balanced router profile was removed after a NULL measurement (p=0.81, n=24); no full-tier recommendation exists; no cross-vendor lift is claimed. | quant | `docs/benchmark.md#REPLICATION FAILED` | ✅ |
|
|
35
36
|
| Behavioural-eval coverage is measured per tier and CI-ratcheted so it can only rise; the current coverage and its gap are published, never implied as "264 evaluated skills". | qual | `src/scripts/skill_eval_coverage.ts#checkRatchet` | ✅ |
|
|
37
|
+
| A hand-rolled, dependency-free BM25 + trigram lexical index resolves the "recalls but does not rank" gap: on the retrieval-precision corpus (9 keyword-overlapping-confuser tasks) it drives the mean top tie-set from 3.333 (the `_score` bucket scorer) to 1.0 — every needed decision uniquely top-ranked — with precision@1 and precision@5 unchanged at 1.0. Method: deterministic, model-free re-ranking of the SAME retrieved entry set; both scorers measured over the identical store via `measure_lexical_ranking.ts`. | quant | `internal/bench/reports/lexical-ranking.json` | ✅ |
|
|
36
38
|
| The whole layer is compiled into host agents with zero runtime daemon. | qual | `docs/contracts/no-runtime-boundary.md#file-first, no-runtime suite` | ✅ |
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
39
|
+
| 103 governed rules. | quant | `src/scripts/check_artefact_count_messaging.ts#Artefact-count messaging gate` | ✅ |
|
|
40
|
+
| On a deterministic multi-session recall corpus, the memory substrate produces a measured, placebo-controlled recall lift — memory-on 27/27 vs no-memory 10/27 and vs equal-byte placebo 9/27 (claude-haiku-4-5, n=9 tasks x 3 seeds, sign test p=0.031 for BOTH pairings). Scoped honestly: this is the context-value upper bound (perfect retrieval on a one-fact-per-task corpus), not retrieval precision under a large store. | quant | `internal/bench/reports/second-brain-delta.json` | ✅ |
|
|
41
|
+
| Removing the perfect-retrieval assumption, the substrate's REAL keyword retrieval recalls the needed decision into the top-5 under keyword-overlapping confusers (precision@5 9/9) and the model disambiguates it from the co-injected confusers — retrieval-on 27/27 vs no-memory 5/27 and vs equal-count placebo 5/27 (claude-haiku-4-5, 9 tasks x 3 seeds, sign test p=0.008 both). Named limit: retrieval RECALLS but does not RANK (mean tie-set 3.3, ties broken by store order, not relevance) — the discrimination gap that motivates the SQLite-FTS5 activation path (ADR-116) at larger scale. | quant | `internal/bench/reports/second-brain-retrieval.json` | ✅ |
|
|
42
|
+
| Every artifact the package ships — source AND the condensed projection that reaches consumers — is machine-scanned in CI for hidden-Unicode, mixed-script-confusable, and instruction-smuggling payloads (the rules-file-backdoor class); a finding blocks the release before `npm publish`, not just the merge. | qual | `.github/workflows/publish-npm.yml#lint_agent_security` | ✅ |
|
|
43
|
+
| 270 skills (README hero + feature list). | quant | `src/scripts/check_artefact_count_messaging.ts#Artefact-count messaging gate` | ✅ |
|
|
40
44
|
| Removes only its own keys from a shared host config (matched by JSON-pointer + SHA-256), never a neighbour tool's entries. | qual | `docs/contracts/install-layout.md#JSON-pointer` | ✅ |
|
|
41
45
|
|
|
42
|
-
**
|
|
46
|
+
**16 backed claim(s)** — all evidence pointers resolve in CI.
|
|
43
47
|
|
|
44
48
|
Artefact counts in public prose (skills, commands, governed rules,
|
|
45
49
|
guidelines, personas) are **generated from source and CI-drift-checked**:
|
|
@@ -74,25 +78,36 @@ deliberately, not overnight.
|
|
|
74
78
|
runway, RICE, incident command, messaging), but the skills are forged on
|
|
75
79
|
TS/PHP — "promising, not proven" off those stacks. A disclaimer floor
|
|
76
80
|
bounds *liability*, not *correctness*: a skill can be format-correct,
|
|
77
|
-
disclaimered, and still embed a wrong domain assumption. Today **
|
|
81
|
+
disclaimered, and still embed a wrong domain assumption. Today **9 of 20**
|
|
78
82
|
default-surface domain skills carry a sourced `domain-truth` fixture
|
|
79
|
-
(`./scripts-run src/scripts/domain_soundness_status`);
|
|
80
|
-
`unvalidated` and the validated count is CI-ratcheted.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
(`./scripts-run src/scripts/domain_soundness_status`); the rest are labeled
|
|
84
|
+
`unvalidated` and the validated count is CI-ratcheted. The fixtures landed
|
|
85
|
+
so far are the **deterministic** targets (runway, unit-economics, DCF,
|
|
86
|
+
forecasting, scenario band/sensitivity), whose answer keys are computed
|
|
87
|
+
from cited standard formulas — never the skill's own output; the
|
|
88
|
+
**rubric** targets (incident command, messaging, fundraising, editorial)
|
|
89
|
+
need domain-competent grounding and remain unvalidated, so validation
|
|
90
|
+
lands deliberately — the gap is published, never implied away.
|
|
91
|
+
|
|
92
|
+
**Second-brain substrate — measured recall lift, honestly bounded.** On a
|
|
93
|
+
deterministic multi-session recall corpus, the memory substrate beats a
|
|
94
|
+
no-memory baseline AND an equal-byte placebo: memory-on **27/27** vs
|
|
95
|
+
no-memory **10/27** vs placebo **9/27** (claude-haiku-4-5, 9 tasks × 3
|
|
96
|
+
seeds, sign test **p = 0.031** for both pairings) — a real,
|
|
97
|
+
placebo-controlled lift (`internal/bench/reports/second-brain-delta.json`).
|
|
98
|
+
Scoped, not oversold: this is the context-value upper bound (perfect
|
|
99
|
+
retrieval on a one-fact-per-task corpus), NOT retrieval precision under a
|
|
100
|
+
large store; the lift concentrates exactly where memory is the only source
|
|
101
|
+
and ties where the prompt self-contains the fact. Boundary vs a human PKM,
|
|
102
|
+
and why the Obsidian export stays declined, are in
|
|
103
|
+
[`docs/second-brain-scope.md`](second-brain-scope.md).
|
|
104
|
+
|
|
105
|
+
A follow-up removed the perfect-retrieval assumption: against a store of
|
|
106
|
+
keyword-overlapping confusers the REAL retrieval recalls the needed
|
|
107
|
+
decision into the top-5 (9/9) and the model disambiguates it — retrieval-on
|
|
108
|
+
**27/27** vs no-memory **5/27** and vs placebo **5/27** (p=0.008 both). The
|
|
109
|
+
honest limit: the keyword scorer recalls but does not rank (mean tie-set
|
|
110
|
+
3.3), which is the SQLite-FTS5 activation signal (ADR-116) at scale.
|
|
96
111
|
|
|
97
112
|
## 3. Known limits (published, witness-tested)
|
|
98
113
|
|
package/docs/release-runbook.md
CHANGED
|
@@ -37,6 +37,9 @@ the **workflow_dispatch** on `release.yml` (inputs: `bump`, `version`,
|
|
|
37
37
|
to recover a partial run — see § 5).
|
|
38
38
|
- [ ] You have read [`succession.md`](succession.md) if any secret-gated
|
|
39
39
|
downstream (npm publish, cloud deploy) must succeed this release.
|
|
40
|
+
- [ ] The release satisfies [`release-sizing.md`](contracts/release-sizing.md) —
|
|
41
|
+
one primary product goal, and a `Rollback:` line for every new /
|
|
42
|
+
substantially reworked subsystem (gate: `src/scripts/lint_changelog_rollback.ts`).
|
|
40
43
|
|
|
41
44
|
## 2. The pipeline — what `release.ts` does (9 steps)
|
|
42
45
|
|
|
@@ -9,35 +9,70 @@
|
|
|
9
9
|
> Roadmap: `road-to-second-brain-delta-proof`. Verdict of record:
|
|
10
10
|
> `agents/settings/contexts/second-brain-delta-verdict.md` (council 2026-07-07).
|
|
11
11
|
|
|
12
|
-
## The honest status (2026-07-
|
|
12
|
+
## The honest status (2026-07-09 — measured PASS, bounded)
|
|
13
13
|
|
|
14
14
|
The substrate is **built** (typed knowledge dirs, INDEX generator, retrieval
|
|
15
15
|
protocol, `hot_context_hook` working-memory continuity across compaction,
|
|
16
|
-
`fold_intake`, contradiction surfacing)
|
|
17
|
-
|
|
18
|
-
reproducible multi-session task.
|
|
16
|
+
`fold_intake`, contradiction surfacing), and the cross-session recall *delta*
|
|
17
|
+
is now **measured** — a real, placebo-controlled lift, honestly scoped.
|
|
19
18
|
|
|
20
|
-
- **The measurement rig
|
|
19
|
+
- **The measurement rig** — a deterministic multi-session recall corpus
|
|
21
20
|
(`internal/bench/second-brain/corpus/`) + a scorer
|
|
22
|
-
(`src/scripts/second_brain_score.ts`) with no model-in-the-loop grading.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
(`src/scripts/second_brain_score.ts`) with no model-in-the-loop grading.
|
|
22
|
+
- **The paired run (Phase 2)** — `memory-on` / `memory-off` / `placebo` on a
|
|
23
|
+
fixed host (claude-haiku-4-5), 9 tasks × 3 seeds (81 calls). Result:
|
|
24
|
+
memory-on **27/27**, no-memory **10/27**, equal-byte placebo **9/27**;
|
|
25
|
+
memory-on beats BOTH, sign test **p = 0.031** for each pairing → **PASS**.
|
|
26
|
+
Full report: `internal/bench/reports/second-brain-delta.json`
|
|
27
|
+
(claim `second-brain-recall-lift`).
|
|
28
|
+
- **Where the lift lives** — it concentrates on the retrieval-accuracy tasks
|
|
29
|
+
where the prior fact is available ONLY from memory (memory-on 3/3, baseline
|
|
30
|
+
0/3). It **ties** on the three tasks whose k+1 prompt already self-contains
|
|
31
|
+
the signal (a correction stated in-prompt, or a contradiction the prompt
|
|
32
|
+
names) — exactly where memory is not the only source. memory-on never loses.
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
convenience** — it carries working memory across sessions and compaction — not
|
|
32
|
-
a proven task-accuracy multiplier.
|
|
34
|
+
### The scoping caveat (stated, not buried)
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
The Phase-2 delta is the **context-value upper bound**: the corpus is
|
|
37
|
+
one-fact-per-task, so memory-on injects the exact fact (perfect retrieval). It
|
|
38
|
+
shows that **the right prior fact, surfaced, lets the model answer — and that
|
|
39
|
+
this beats both no memory and equal-byte noise** (the placebo isolates mechanism
|
|
40
|
+
from mere extra context).
|
|
41
|
+
|
|
42
|
+
**The retrieval-precision follow-up removed the perfect-retrieval assumption**
|
|
43
|
+
(2026-07-09, claim `second-brain-retrieval-precision`,
|
|
44
|
+
`internal/bench/reports/second-brain-retrieval.json`). Against a populated store
|
|
45
|
+
whose distractors deliberately share query keywords with the needed decision,
|
|
46
|
+
the REAL `memory_lookup` retrieval recalls the needed decision into the top-5 in
|
|
47
|
+
**9/9** cases, and the model disambiguates it from the co-injected confusers —
|
|
48
|
+
**retrieval-on 27/27 vs no-memory 5/27 and vs equal-count placebo 5/27**
|
|
49
|
+
(sign test p=0.008 both). **Named limit (honest):** the keyword scorer
|
|
50
|
+
**recalls but does not rank** — mean tie-set 3.3 entries share the top score,
|
|
51
|
+
ties broken by store order, not relevance. So recall into the top-k holds *at
|
|
52
|
+
this scale*; once more than k entries share a keyword it would degrade — which
|
|
53
|
+
is exactly the discrimination gap the SQLite-FTS5 activation path (ADR-116)
|
|
54
|
+
exists to close. The public claims are scoped to exactly this.
|
|
55
|
+
|
|
56
|
+
**Second named limit (separator recall, found 2026-07-10 in a labelled replay
|
|
57
|
+
of real maintainer queries):** `_score()` matches raw substrings, so a query
|
|
58
|
+
key whose token separator differs from the stored field misses entirely —
|
|
59
|
+
`ai_council`, `roadmap-progress`, `force-push` score 0 against space-normalized
|
|
60
|
+
`key` fields that spaced variants (`ai council`) hit at 0.8. The precision
|
|
61
|
+
measurement above did not probe this class (its confusers share exact
|
|
62
|
+
keywords), so it is scoped OUT of the precision claim. Deliberately not
|
|
63
|
+
hot-fixed: naive scoring is locked until the scale tripwire (the archived
|
|
64
|
+
retrieval-economy roadmap's D5), and the FTS5 unicode61 tokenizer splits on
|
|
65
|
+
separators, closing this structurally at activation time. Reproduce:
|
|
66
|
+
`memory_lookup --types product-rules --key "ai_council"` vs `--key "ai council"`
|
|
67
|
+
against any populated store.
|
|
68
|
+
|
|
69
|
+
## What it IS (measured lift, bounded as above)
|
|
35
70
|
|
|
36
71
|
| Capability | What it does | Evidence status |
|
|
37
72
|
|---|---|---|
|
|
38
|
-
| Working-memory continuity | `hot_context_hook` re-injects a bounded, deterministic cache across session boundaries and Claude Code compaction | mechanism shipped;
|
|
39
|
-
| Promotable knowledge cards/pages | typed dirs + INDEX + retrieval protocol, with redaction + team-share gate | mechanism shipped;
|
|
40
|
-
| Contradiction surfacing | a session that contradicts a prior decision is flagged on promote | mechanism shipped;
|
|
73
|
+
| Working-memory continuity | `hot_context_hook` re-injects a bounded, deterministic cache across session boundaries and Claude Code compaction | mechanism shipped; recall lift **measured (bounded PASS)** |
|
|
74
|
+
| Promotable knowledge cards/pages | typed dirs + INDEX + retrieval protocol, with redaction + team-share gate | mechanism shipped; recall lift **measured (bounded PASS)** |
|
|
75
|
+
| Contradiction surfacing | a session that contradicts a prior decision is flagged on promote | mechanism shipped; ties in-prompt, lift where memory is the only source |
|
|
41
76
|
|
|
42
77
|
## What it is NOT
|
|
43
78
|
|
|
@@ -52,15 +87,23 @@ a proven task-accuracy multiplier.
|
|
|
52
87
|
link-density, hybrid human-facing retrieval — is a *different product* for a
|
|
53
88
|
*different consumer* (a person, not an agent). This package writes
|
|
54
89
|
agent-facing memory; it does not serve a human graph browser.
|
|
55
|
-
- **Not
|
|
90
|
+
- **Not an unbounded accuracy multiplier** — the recall lift is measured but
|
|
91
|
+
scoped to the context-value upper bound (see honest status), not proven
|
|
92
|
+
retrieval precision under a large store.
|
|
56
93
|
|
|
57
|
-
## Interop, not competition (
|
|
94
|
+
## Interop, not competition (export declined, on the record)
|
|
58
95
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
the
|
|
96
|
+
The Phase-2 paired run did show a real (bounded) lift, which unlocks the
|
|
97
|
+
optional one-way export (promoted cards → Obsidian-compatible Markdown). It is
|
|
98
|
+
**deliberately not built**: the delta-verdict of record
|
|
99
|
+
(`agents/settings/contexts/second-brain-delta-verdict.md`, council 2026-07-07)
|
|
100
|
+
**rejected** Obsidian compatibility — the dual-write hazard (an external edit
|
|
101
|
+
that never commits silently diverges the INDEX + recurrence counters) outweighs
|
|
102
|
+
the browsing convenience, and the measured lift is a bounded context-value
|
|
103
|
+
result, not a retrieval-precision proof that would justify a new external
|
|
104
|
+
surface. If a human-PKM bridge is ever wanted, the sanctioned path is a
|
|
105
|
+
read-only static render, not an editable vault. Positioning stays: agent-config
|
|
106
|
+
writes agent-facing memory; it does not replace a human PKM.
|
|
64
107
|
|
|
65
108
|
## Verify
|
|
66
109
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Self-review gate (dogfooded PR review)
|
|
2
|
+
|
|
3
|
+
The package reviews its own PRs with the exact machinery it ships —
|
|
4
|
+
[`adversarial-review`](../src/skills/adversarial-review/SKILL.md) +
|
|
5
|
+
[`agent-security-review`](../src/skills/agent-security-review/SKILL.md) — via
|
|
6
|
+
[`.github/workflows/self-review-gate.yml`](../.github/workflows/self-review-gate.yml)
|
|
7
|
+
and [`src/scripts/self_review_gate.ts`](../src/scripts/self_review_gate.ts).
|
|
8
|
+
|
|
9
|
+
`road-to-maintainer-bus-factor` Phase 1.
|
|
10
|
+
|
|
11
|
+
## Current status — ADVISORY, inert without a secret
|
|
12
|
+
|
|
13
|
+
This is an **honest floor, not independent human review**, and today it is
|
|
14
|
+
**advisory + inert-without-secret**. Do not read it as "every PR is
|
|
15
|
+
AI-reviewed" — that is only true once the maintainer arms it (below).
|
|
16
|
+
|
|
17
|
+
| Job | Runs | Spend | Blocks merge |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| `gate-dry-run` | every PR | none (no API) | never — prints the review plan only |
|
|
20
|
+
| `live-advisory` | every PR **iff** `ANTHROPIC_API_KEY` is set | one review call | never — posts findings, records what *would* block |
|
|
21
|
+
|
|
22
|
+
Without the `ANTHROPIC_API_KEY` repo secret, `live-advisory` is a **logged
|
|
23
|
+
no-op** (never a failing check) — exactly the `cross-model-canary.yml` pattern.
|
|
24
|
+
|
|
25
|
+
## The teeth (defined + wired, not yet armed)
|
|
26
|
+
|
|
27
|
+
`self_review_gate.ts` exposes pure, unit-tested:
|
|
28
|
+
|
|
29
|
+
- `classifyBlocking(finding)` — a finding is merge-blocking **iff**
|
|
30
|
+
`kind ∈ {security, claim}` **and** `severity ∈ {critical, high}`. Style and
|
|
31
|
+
correctness findings, and low/medium security findings, advise only. (Council
|
|
32
|
+
2026-07-08, claude-sonnet-4-5 + gpt-4o: a 100 %-blocking gate at
|
|
33
|
+
solo-maintainer token cost gets ignored or gamed — block only on the narrow
|
|
34
|
+
security/claim × high+ intersection.)
|
|
35
|
+
- `gateVerdict(findings, {enforce})` — mirrors
|
|
36
|
+
`check_quality_regression.gateVerdict`: `0` pass / `2` block. Shipped
|
|
37
|
+
`enforce: false` (advisory always returns `0` and reports the would-block
|
|
38
|
+
set).
|
|
39
|
+
|
|
40
|
+
## Arming it (maintainer, one flip)
|
|
41
|
+
|
|
42
|
+
1. Add the `ANTHROPIC_API_KEY` repo secret (per-PR budget sign-off) — turns
|
|
43
|
+
`live-advisory` from no-op into a real dogfooded review.
|
|
44
|
+
2. Pass `--enforce` in the live job to arm the teeth (block on
|
|
45
|
+
security/claim × high+).
|
|
46
|
+
3. Require the `Self-review gate` check in branch protection
|
|
47
|
+
(`road-to-maintainer-bus-factor` Phase 2) so even solo merges pass the gate.
|
|
48
|
+
4. Record the floor CLAIM on the proof page **once it is live** — not before
|
|
49
|
+
(an inert gate is not a passed gate).
|
|
50
|
+
|
|
51
|
+
Blocker `self-review-gate-cost` (maintainer-owned) gates steps 1–2.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@event4u/agent-config",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.0",
|
|
4
4
|
"description": "Universal AI Agent OS — audited skills, governance rules, commands, and templates for AI coding tools (Claude Code, Cursor, Windsurf, Copilot).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -67,8 +67,9 @@ const _require = createRequire(import.meta.url);
|
|
|
67
67
|
// CHECKBOX_RE = re.compile(r"^\s*[-*]\s+\[([ xX~\-])\]\s", re.MULTILINE)
|
|
68
68
|
const CHECKBOX_RE = /^[ \t\n\r\f\v]*[-*][ \t\n\r\f\v]+\[([ xX~\-])\][ \t\n\r\f\v]/gm;
|
|
69
69
|
// PHASE_RE (MULTILINE) — H2/H3 "Phase <id>" with optional separator + name.
|
|
70
|
+
// Numeric ids accept dotted sub-phases ("1.0", "4.1", "2.3.1").
|
|
70
71
|
const PHASE_RE =
|
|
71
|
-
/^(#{2,3})[ \t\n\r\f\v]+Phase[ \t\n\r\f\v]+(\d+[a-z]?|[IVX]+|[A-Z](?:\d+)?)(?:[\s:—\-]+([\s\S]*?))?[ \t\f\v\r]*$/gm;
|
|
72
|
+
/^(#{2,3})[ \t\n\r\f\v]+Phase[ \t\n\r\f\v]+(\d+(?:\.\d+)*[a-z]?|[IVX]+|[A-Z](?:\d+)?)(?:[\s:—\-]+([\s\S]*?))?[ \t\f\v\r]*$/gm;
|
|
72
73
|
// TITLE_RE = re.compile(r"^#\s+(?:Roadmap:\s*)?(.+?)\s*$", re.MULTILINE)
|
|
73
74
|
const TITLE_RE = /^#[ \t\n\r\f\v]+(?:Roadmap:[ \t\n\r\f\v]*)?(.+?)[ \t\f\v\r]*$/m;
|
|
74
75
|
const EXCLUDE_NAMES: ReadonlySet<string> = new Set([
|
|
@@ -167,6 +167,12 @@ Tier 2 — maintenance / internal (hooks, MCP, memory, telemetry):
|
|
|
167
167
|
mcp:run Run the built-in MCP server over stdio
|
|
168
168
|
(requires `mcp:setup` first; see docs/mcp-server.md)
|
|
169
169
|
(experimental — beta gates: docs/contracts/mcp-beta-criteria.md)
|
|
170
|
+
affected Show artefacts related to <artefact> via the discovery
|
|
171
|
+
relation-graph (relation-filtered BFS). Flags: --depth N
|
|
172
|
+
graph-explain Seed on a <concept>, expand 2 hops over the discovery
|
|
173
|
+
relation-graph with a node budget. Flags: --budget N
|
|
174
|
+
benchmark Report context-token reduction vs the full always-loaded
|
|
175
|
+
projection (from the pinned token baseline). Flags: --format
|
|
170
176
|
roadmap:progress Regenerate agents/roadmaps-progress.md from open roadmaps
|
|
171
177
|
roadmap:progress-check Fail if agents/roadmaps-progress.md is stale (for CI)
|
|
172
178
|
roadmap:archive Archive completed roadmaps (branch-touched by default;
|
|
@@ -431,6 +437,24 @@ cmd_mcp_render() {
|
|
|
431
437
|
exec_ts "$script" "$@"
|
|
432
438
|
}
|
|
433
439
|
|
|
440
|
+
cmd_affected() {
|
|
441
|
+
local script
|
|
442
|
+
script="$(resolve_script "src/scripts/discovery_graph.ts")"
|
|
443
|
+
exec_ts "$script" affected "$@"
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
cmd_graph_explain() {
|
|
447
|
+
local script
|
|
448
|
+
script="$(resolve_script "src/scripts/discovery_graph.ts")"
|
|
449
|
+
exec_ts "$script" explain "$@"
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
cmd_benchmark() {
|
|
453
|
+
local script
|
|
454
|
+
script="$(resolve_script "src/scripts/benchmark.ts")"
|
|
455
|
+
exec_ts "$script" "$@"
|
|
456
|
+
}
|
|
457
|
+
|
|
434
458
|
cmd_mcp_check() {
|
|
435
459
|
local script
|
|
436
460
|
script="$(resolve_script "src/scripts/mcp_render.ts")"
|
|
@@ -1031,6 +1055,9 @@ main() {
|
|
|
1031
1055
|
mcp:setup) cmd_mcp_setup "$@" ;;
|
|
1032
1056
|
mcp:run) cmd_mcp_run "$@" ;;
|
|
1033
1057
|
use) cmd_use "$@" ;;
|
|
1058
|
+
affected) cmd_affected "$@" ;;
|
|
1059
|
+
graph-explain) cmd_graph_explain "$@" ;;
|
|
1060
|
+
benchmark) cmd_benchmark "$@" ;;
|
|
1034
1061
|
roadmap:progress) cmd_roadmap_progress "$@" ;;
|
|
1035
1062
|
roadmap:progress-check) cmd_roadmap_progress_check "$@" ;;
|
|
1036
1063
|
roadmap:archive) cmd_roadmap_archive "$@" ;;
|