@event4u/agent-config 11.0.0 → 12.1.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 +173 -229
- package/agents/templates/.ai-council.yml.example +46 -3
- package/dist/agent-src/commands/agent-handoff.md +0 -1
- package/dist/agent-src/commands/agent-status.md +0 -1
- package/dist/agent-src/commands/agents/audit.md +0 -1
- package/dist/agent-src/commands/agents/init.md +0 -1
- package/dist/agent-src/commands/agents/optimize.md +0 -1
- package/dist/agent-src/commands/agents/user/accept.md +0 -1
- package/dist/agent-src/commands/agents/user/delete.md +0 -1
- package/dist/agent-src/commands/agents/user/init.md +0 -1
- package/dist/agent-src/commands/agents/user/review.md +0 -1
- package/dist/agent-src/commands/agents/user/show.md +0 -1
- package/dist/agent-src/commands/agents/user/update.md +0 -1
- package/dist/agent-src/commands/agents/user.md +0 -1
- package/dist/agent-src/commands/agents.md +0 -1
- package/dist/agent-src/commands/analytics/prune.md +0 -1
- package/dist/agent-src/commands/analytics/show.md +0 -1
- package/dist/agent-src/commands/analytics.md +0 -1
- package/dist/agent-src/commands/analyze/conformance.md +0 -1
- package/dist/agent-src/commands/analyze/decision.md +0 -1
- package/dist/agent-src/commands/analyze/inbox.md +0 -1
- package/dist/agent-src/commands/analyze/incident.md +0 -1
- package/dist/agent-src/commands/analyze/near-miss.md +0 -1
- package/dist/agent-src/commands/analyze/postmortem.md +0 -1
- package/dist/agent-src/commands/analyze/premortem.md +0 -1
- package/dist/agent-src/commands/analyze/reference-repo.md +0 -1
- package/dist/agent-src/commands/analyze.md +0 -1
- package/dist/agent-src/commands/brand/identity.md +0 -1
- package/dist/agent-src/commands/brand/review.md +0 -1
- package/dist/agent-src/commands/brand/strategy.md +0 -1
- package/dist/agent-src/commands/brand/tokens.md +0 -1
- package/dist/agent-src/commands/brand/voice.md +0 -1
- package/dist/agent-src/commands/brand.md +0 -1
- package/dist/agent-src/commands/bug/fix.md +0 -1
- package/dist/agent-src/commands/bug/investigate.md +0 -1
- package/dist/agent-src/commands/bug.md +0 -1
- package/dist/agent-src/commands/challenge-me/vision.md +0 -1
- package/dist/agent-src/commands/challenge-me/with-docs.md +0 -1
- package/dist/agent-src/commands/challenge-me.md +0 -1
- package/dist/agent-src/commands/chat-history/import.md +0 -1
- package/dist/agent-src/commands/chat-history.md +0 -1
- package/dist/agent-src/commands/check-current-md.md +0 -1
- package/dist/agent-src/commands/commit/in-chunks.md +0 -1
- package/dist/agent-src/commands/commit.md +0 -1
- package/dist/agent-src/commands/condense.md +0 -1
- package/dist/agent-src/commands/context/create.md +0 -1
- package/dist/agent-src/commands/context/refactor.md +0 -1
- package/dist/agent-src/commands/context.md +0 -1
- package/dist/agent-src/commands/contribution-precheck.md +0 -1
- package/dist/agent-src/commands/cost/profile.md +0 -1
- package/dist/agent-src/commands/cost/report.md +0 -1
- package/dist/agent-src/commands/cost.md +0 -1
- package/dist/agent-src/commands/council/analysis.md +0 -1
- package/dist/agent-src/commands/council/debate.md +0 -1
- package/dist/agent-src/commands/council/default.md +0 -1
- package/dist/agent-src/commands/council/design.md +0 -1
- package/dist/agent-src/commands/council/optimize.md +0 -1
- package/dist/agent-src/commands/council/pr.md +0 -1
- package/dist/agent-src/commands/council.md +0 -1
- package/dist/agent-src/commands/design-system/capture.md +0 -1
- package/dist/agent-src/commands/design-system/generate.md +0 -1
- package/dist/agent-src/commands/design-system/import.md +0 -1
- package/dist/agent-src/commands/design-system.md +0 -1
- package/dist/agent-src/commands/estimate-ticket.md +0 -1
- package/dist/agent-src/commands/explain-run.md +0 -1
- package/dist/agent-src/commands/feature/dev.md +0 -1
- package/dist/agent-src/commands/feature/explore.md +0 -1
- package/dist/agent-src/commands/feature/plan.md +0 -1
- package/dist/agent-src/commands/feature/refactor.md +0 -1
- package/dist/agent-src/commands/feature/roadmap.md +0 -1
- package/dist/agent-src/commands/feature.md +0 -1
- package/dist/agent-src/commands/fix/ci.md +0 -1
- package/dist/agent-src/commands/fix/comments.md +0 -1
- package/dist/agent-src/commands/fix/portability.md +0 -1
- package/dist/agent-src/commands/fix/pr-comments-loop.md +0 -1
- package/dist/agent-src/commands/fix/pr-comments.md +0 -1
- package/dist/agent-src/commands/fix/quality.md +0 -1
- package/dist/agent-src/commands/fix/refs.md +0 -1
- package/dist/agent-src/commands/fix/route.md +0 -1
- package/dist/agent-src/commands/fix/seeder.md +0 -1
- package/dist/agent-src/commands/fix.md +0 -1
- package/dist/agent-src/commands/ghostwriter/delete.md +0 -1
- package/dist/agent-src/commands/ghostwriter/fetch.md +0 -1
- package/dist/agent-src/commands/ghostwriter/list.md +0 -1
- package/dist/agent-src/commands/ghostwriter/show.md +0 -1
- package/dist/agent-src/commands/ghostwriter/write.md +0 -1
- package/dist/agent-src/commands/ghostwriter.md +0 -1
- package/dist/agent-src/commands/grill-me.md +0 -1
- package/dist/agent-src/commands/humanize.md +0 -1
- package/dist/agent-src/commands/image/analyse.md +0 -1
- package/dist/agent-src/commands/image/create.md +0 -1
- package/dist/agent-src/commands/image/verify.md +0 -1
- package/dist/agent-src/commands/image.md +0 -1
- package/dist/agent-src/commands/implement-ticket.md +0 -1
- package/dist/agent-src/commands/jira-ticket.md +0 -1
- package/dist/agent-src/commands/judge/on-diff.md +0 -1
- package/dist/agent-src/commands/judge/solo.md +0 -1
- package/dist/agent-src/commands/judge/steps.md +0 -1
- package/dist/agent-src/commands/judge.md +0 -1
- package/dist/agent-src/commands/knowledge/cross-repo.md +0 -1
- package/dist/agent-src/commands/knowledge/forget.md +0 -1
- package/dist/agent-src/commands/knowledge/ingest.md +0 -1
- package/dist/agent-src/commands/knowledge/list.md +0 -1
- package/dist/agent-src/commands/knowledge.md +0 -1
- package/dist/agent-src/commands/memory/add.md +0 -1
- package/dist/agent-src/commands/memory/learn-low-impact.md +0 -1
- package/dist/agent-src/commands/memory/load.md +0 -1
- package/dist/agent-src/commands/memory/mine-session.md +0 -1
- package/dist/agent-src/commands/memory/promote.md +0 -1
- package/dist/agent-src/commands/memory/propose.md +0 -1
- package/dist/agent-src/commands/memory.md +0 -1
- package/dist/agent-src/commands/mission/upgrade.md +0 -1
- package/dist/agent-src/commands/mode.md +0 -1
- package/dist/agent-src/commands/module/create.md +0 -1
- package/dist/agent-src/commands/module/explore.md +0 -1
- package/dist/agent-src/commands/module.md +0 -1
- package/dist/agent-src/commands/optimize/agents-dir.md +0 -1
- package/dist/agent-src/commands/optimize/augmentignore.md +0 -1
- package/dist/agent-src/commands/optimize/deep.md +0 -1
- package/dist/agent-src/commands/optimize/project.md +0 -1
- package/dist/agent-src/commands/optimize/prompt.md +0 -1
- package/dist/agent-src/commands/optimize/rtk.md +0 -1
- package/dist/agent-src/commands/optimize/skills.md +0 -1
- package/dist/agent-src/commands/optimize.md +0 -1
- package/dist/agent-src/commands/orchestrate.md +0 -1
- package/dist/agent-src/commands/override/create.md +0 -1
- package/dist/agent-src/commands/override/manage.md +0 -1
- package/dist/agent-src/commands/override.md +0 -1
- package/dist/agent-src/commands/package/reset.md +0 -1
- package/dist/agent-src/commands/package/test.md +0 -1
- package/dist/agent-src/commands/package.md +0 -1
- package/dist/agent-src/commands/post-as/ghostwriter.md +0 -1
- package/dist/agent-src/commands/post-as/me.md +0 -1
- package/dist/agent-src/commands/post-as.md +0 -1
- package/dist/agent-src/commands/pr/create/description-only.md +0 -1
- package/dist/agent-src/commands/pr/create.md +23 -9
- package/dist/agent-src/commands/prediction-pool.md +0 -1
- package/dist/agent-src/commands/prepare-for-review.md +0 -1
- package/dist/agent-src/commands/profile/activate.md +0 -1
- package/dist/agent-src/commands/profile/deactivate.md +0 -1
- package/dist/agent-src/commands/profile/show.md +0 -1
- package/dist/agent-src/commands/profile.md +0 -1
- package/dist/agent-src/commands/project/analyze.md +0 -1
- package/dist/agent-src/commands/project/health.md +0 -1
- package/dist/agent-src/commands/project.md +0 -1
- package/dist/agent-src/commands/refine-ticket.md +0 -1
- package/dist/agent-src/commands/research/deep.md +0 -1
- package/dist/agent-src/commands/research/report.md +0 -1
- package/dist/agent-src/commands/research.md +0 -1
- package/dist/agent-src/commands/review/changes.md +0 -1
- package/dist/agent-src/commands/review/routing.md +0 -1
- package/dist/agent-src/commands/review.md +0 -1
- package/dist/agent-src/commands/roadmap/ai-council.md +0 -1
- package/dist/agent-src/commands/roadmap/create.md +0 -1
- package/dist/agent-src/commands/roadmap/materialize.md +0 -1
- package/dist/agent-src/commands/roadmap/next.md +0 -1
- package/dist/agent-src/commands/roadmap/process-full.md +0 -1
- package/dist/agent-src/commands/roadmap/process-phase.md +0 -1
- package/dist/agent-src/commands/roadmap/process-step.md +0 -1
- package/dist/agent-src/commands/roadmap.md +0 -1
- package/dist/agent-src/commands/rule-compliance-audit.md +0 -1
- package/dist/agent-src/commands/security-audit-config.md +0 -1
- package/dist/agent-src/commands/skill/preview.md +0 -1
- package/dist/agent-src/commands/skill.md +0 -1
- package/dist/agent-src/commands/skills/discover.md +0 -1
- package/dist/agent-src/commands/skills.md +0 -1
- package/dist/agent-src/commands/sync/agent-settings.md +0 -1
- package/dist/agent-src/commands/sync/gitignore/fix.md +0 -1
- package/dist/agent-src/commands/sync/gitignore.md +0 -1
- package/dist/agent-src/commands/sync.md +0 -1
- package/dist/agent-src/commands/tdd/green.md +0 -1
- package/dist/agent-src/commands/tdd/red.md +0 -1
- package/dist/agent-src/commands/tdd/refactor.md +0 -1
- package/dist/agent-src/commands/tdd.md +0 -1
- package/dist/agent-src/commands/team/adversarial.md +0 -1
- package/dist/agent-src/commands/team/delegate.md +0 -1
- package/dist/agent-src/commands/team/review.md +0 -1
- package/dist/agent-src/commands/team/status.md +0 -1
- package/dist/agent-src/commands/team-knowledge/bootstrap.md +0 -1
- package/dist/agent-src/commands/team-knowledge/consolidate.md +0 -1
- package/dist/agent-src/commands/team-knowledge.md +0 -1
- package/dist/agent-src/commands/team.md +0 -1
- package/dist/agent-src/commands/tests/create.md +0 -1
- package/dist/agent-src/commands/tests/e2e-heal.md +0 -1
- package/dist/agent-src/commands/tests/e2e-plan.md +0 -1
- package/dist/agent-src/commands/tests/execute.md +0 -1
- package/dist/agent-src/commands/tests.md +0 -1
- package/dist/agent-src/commands/threat-model.md +0 -1
- package/dist/agent-src/commands/update-form-request-messages.md +0 -1
- package/dist/agent-src/commands/upstream-contribute.md +0 -1
- package/dist/agent-src/commands/video/from-script.md +0 -1
- package/dist/agent-src/commands/video/from-song.md +0 -1
- package/dist/agent-src/commands/video/scene.md +0 -1
- package/dist/agent-src/commands/video/stitch.md +0 -1
- package/dist/agent-src/commands/video/storyboard.md +0 -1
- package/dist/agent-src/commands/video.md +0 -1
- package/dist/agent-src/commands/work.md +0 -1
- package/dist/agent-src/commands/worktree/cleanup.md +0 -1
- package/dist/agent-src/commands/worktree/create.md +0 -1
- package/dist/agent-src/commands/worktree/status.md +0 -1
- package/dist/agent-src/commands/worktree/verify.md +0 -1
- package/dist/agent-src/commands/worktree.md +0 -1
- package/dist/agent-src/contexts/model-recommendations.md +6 -4
- package/dist/agent-src/rules/low-impact-corpus-privacy-floor.md +1 -0
- package/dist/agent-src/scripts/roadmap_gates.ts +30 -2
- package/dist/agent-src/scripts/update_roadmap_progress.ts +32 -1
- package/dist/agent-src/skills/docx-authoring/SKILL.md +1 -0
- package/dist/agent-src/skills/git-workflow/SKILL.md +9 -1
- package/dist/agent-src/skills/pdf-tools/SKILL.md +1 -0
- package/dist/agent-src/skills/roadmap-writing/SKILL.md +7 -7
- package/dist/agent-src/skills/skill-writing/SKILL.md +35 -0
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/roadmaps.md +41 -3
- package/dist/cli/commands/commands.candidates.test.js +1 -1
- package/dist/cli/commands/commands.candidates.test.js.map +1 -1
- package/dist/cli/commands/commands.js +9 -15
- package/dist/cli/commands/commands.js.map +1 -1
- package/dist/cli/commands/profiles.test.js +7 -7
- package/dist/cli/commands/profiles.test.js.map +1 -1
- package/dist/cli/discovery/loadManifest.js.map +1 -1
- package/dist/cli/main.js +2 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/registry.js +1 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli-delegate/chunk-K34QTSD5.js +3895 -0
- package/dist/cli-delegate/{chunk-L565YFXH.js → chunk-LKZ5DOYW.js} +557 -297
- package/dist/cli-delegate/{chunk-NN4KW4HZ.js → chunk-O52B4F5S.js} +123 -2338
- package/dist/cli-delegate/cmd_conformance.js +18 -6
- package/dist/cli-delegate/cmd_doctor.js +2 -2
- package/dist/cli-delegate/cmd_export.js +1 -1
- package/dist/cli-delegate/cmd_handoff.js +1 -1
- package/dist/cli-delegate/cmd_prune.js +1 -1
- package/dist/cli-delegate/cmd_settings_migrate.js +1 -1
- package/dist/cli-delegate/cmd_sync.js +1 -1
- package/dist/cli-delegate/cmd_uninstall.js +1 -1
- package/dist/cli-delegate/cmd_validate.js +1 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +213 -412
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +2 -2
- package/dist/discovery/dormancy-report.md +1 -1
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +3 -3
- package/dist/discovery/trust-report.md +1 -1
- package/dist/discovery/workspaces.json +3 -3
- package/dist/hooks/dispatch.js +2588 -1082
- package/dist/install/install.mjs +744 -482
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +159 -15
- package/dist/router.json +1 -1
- package/dist/scripts/_lib/model_tier.js +9 -0
- package/dist/scripts/_lib/model_tier.js.map +1 -1
- package/dist/scripts/condense.js +50 -0
- package/dist/scripts/condense.js.map +1 -1
- package/docs/MIGRATION.md +21 -1
- package/docs/contracts/settings-classes.md +41 -0
- package/package.json +1 -1
- package/src/agent-src/scripts/roadmap_gates.ts +30 -2
- package/src/agent-src/scripts/update_roadmap_progress.ts +32 -1
- package/src/config/agent-settings.template.yml +34 -0
- package/src/config/evaluator-budgets.json +4 -4
- package/src/config/gate-coverage.yml +39 -9
- package/src/config/gate-violation-baselines.json +9 -3
- package/src/config/hook-token-budget.json +7 -1
- package/src/config/preamble-payload-budget.json +28 -0
- package/src/scripts/_dispatch.bash +52 -5
- package/src/scripts/_lib/git_common_dir.ts +173 -0
- package/src/scripts/_lib/model_tier.ts +9 -0
- package/src/scripts/_lib/release_highlights.ts +108 -7
- package/src/scripts/_lib/skill_catalogue.ts +862 -0
- package/src/scripts/ai_council/clients.ts +182 -3
- package/src/scripts/ai_council/config.ts +16 -1
- package/src/scripts/ai_council/low_impact.ts +14 -1
- package/src/scripts/ai_council/orchestrator.ts +14 -1
- package/src/scripts/ai_council/transport_resolver.ts +32 -2
- package/src/scripts/audit_command_surface.ts +21 -15
- package/src/scripts/build_catalog_index.ts +1 -1
- package/src/scripts/build_discovery_manifest.ts +30 -34
- package/src/scripts/capture_skill_catalogue.ts +185 -328
- package/src/scripts/check_branch_freshness.ts +217 -62
- package/src/scripts/check_release_published.ts +6 -2
- package/src/scripts/check_release_trunk_sync.ts +18 -2
- package/src/scripts/condense.ts +50 -1
- package/src/scripts/dispatch_r2_reviewer.ts +15 -5
- package/src/scripts/evidence_report.ts +15 -4
- package/src/scripts/gen_discovery_baseline.ts +3 -3
- package/src/scripts/hook_manifest.yaml +67 -13
- package/src/scripts/hooks/concern_registry.ts +2 -0
- package/src/scripts/hooks/orchestration_record_hook.ts +21 -0
- package/src/scripts/hooks/subagent_ledger_hook.ts +17 -4
- package/src/scripts/hooks/tool_result_bytes_hook.ts +219 -0
- package/src/scripts/hot_context_hook.ts +13 -1
- package/src/scripts/install.ts +129 -0
- package/src/scripts/janitor.ts +77 -2
- package/src/scripts/lint_command_tiers.ts +29 -75
- package/src/scripts/lint_originality.ts +101 -14
- package/src/scripts/lint_plan_risk_register.ts +22 -9
- package/src/scripts/lint_roadmap_blockers.ts +109 -6
- package/src/scripts/lint_scheduled_deprecations.ts +738 -0
- package/src/scripts/migration_status.ts +17 -1
- package/src/scripts/probe_review_binding_drift.ts +731 -0
- package/src/scripts/release.ts +95 -1
- package/src/scripts/schemas/command.schema.json +6 -11
- package/src/scripts/schemas/skill.schema.json +12 -2
- package/src/scripts/schemas/subagent.schema.json +2 -2
- package/src/scripts/session_eol_report.ts +81 -0
- package/src/scripts/skill_linter.ts +82 -2
- package/src/scripts/workspace_doctor.ts +464 -0
- package/src/scripts/worktree_cleanup_check.ts +113 -8
- package/dist/cli-delegate/chunk-AYKQGIBG.js +0 -1594
|
@@ -76,6 +76,91 @@ const _PUBLIC_SURFACE_PREFIXES = [
|
|
|
76
76
|
|
|
77
77
|
const _RULE_OR_SCHEMA_PREFIXES = ['src/rules/', 'src/scripts/schemas/'];
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Paths whose repair is a correctness fix to shipped *behaviour* rather than a
|
|
81
|
+
* record of one. The distinction is load-bearing: 43 % of `fix(...)` commits
|
|
82
|
+
* over the six spans measured in
|
|
83
|
+
* `agents/evidence/analysis/release-head-derivation-recall.md` touch no
|
|
84
|
+
* executable file at all — `52d7fe1 fix(worktrees): the inventory
|
|
85
|
+
* misclassifies from inside a worktree, totally` changes two markdown files and
|
|
86
|
+
* repairs nothing. Keying on the touched surface is what separates a bug fix
|
|
87
|
+
* from a bug report, and it moves hand-judged precision from 54 % to 96 %.
|
|
88
|
+
*/
|
|
89
|
+
const _EXECUTABLE_SUFFIX = /\.(?:ts|tsx|js|mjs|cjs|sh|py)$/u;
|
|
90
|
+
const _EXECUTABLE_PREFIXES = ['.github/workflows/', '.github/actions/'];
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Shebang entry points with no extension, which a suffix test cannot see. An
|
|
94
|
+
* exact set rather than a heuristic: the alternative is reading file contents,
|
|
95
|
+
* which a span commit does not carry.
|
|
96
|
+
*
|
|
97
|
+
* The recall limit that remains, named rather than left for a reader to
|
|
98
|
+
* discover: a NEW extensionless entry point is invisible until it is added
|
|
99
|
+
* here. Precision was measured over six spans; this predicate's recall was not,
|
|
100
|
+
* and adding to this set is the maintenance that follows a new entry point.
|
|
101
|
+
*/
|
|
102
|
+
const _EXECUTABLE_EXACT: ReadonlySet<string> = new Set([
|
|
103
|
+
'scripts-run',
|
|
104
|
+
'src/scripts/agent-config',
|
|
105
|
+
]);
|
|
106
|
+
|
|
107
|
+
function _touches_executable(files: SpanCommit['files']): boolean {
|
|
108
|
+
return files.some(
|
|
109
|
+
(f) =>
|
|
110
|
+
_EXECUTABLE_SUFFIX.test(f.path) ||
|
|
111
|
+
_EXECUTABLE_EXACT.has(f.path) ||
|
|
112
|
+
_EXECUTABLE_PREFIXES.some((p) => f.path.startsWith(p)),
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Conventional-commit type, lower-cased, or `''` when the subject carries no
|
|
118
|
+
* conventional prefix.
|
|
119
|
+
*
|
|
120
|
+
* Two things this deliberately does, both of which an earlier version got
|
|
121
|
+
* wrong. It requires the conventional `:` separator, so `fix the flaky runner`
|
|
122
|
+
* is not classified as type `fix` — otherwise this function disagrees with the
|
|
123
|
+
* scope regex three lines below it and with every prose description of the
|
|
124
|
+
* rule. And it recognises `Revert "<subject>"`, the form `git revert` writes by
|
|
125
|
+
* default, which is not conventional at all: without it the documented revert
|
|
126
|
+
* half only ever applied to a hand-written `revert(scope):`, and a revert of
|
|
127
|
+
* shipped behaviour is the commit class most likely to be a correctness repair.
|
|
128
|
+
*/
|
|
129
|
+
function _commit_type(subject: string): string {
|
|
130
|
+
if (/^Revert\s+"/u.test(subject)) {
|
|
131
|
+
return 'revert';
|
|
132
|
+
}
|
|
133
|
+
const m = /^(\w+)(?:\([^)]*\))?!?:/u.exec(subject);
|
|
134
|
+
return m ? m[1]!.toLowerCase() : '';
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Recorded-null forms beyond the literal marker, taken from real subjects and
|
|
139
|
+
* bodies over the six measured spans rather than invented: a waived-rather-than-
|
|
140
|
+
* met condition, a published or recorded null, an archival on a roadmap's own
|
|
141
|
+
* falsifier. All six commits these add across the six spans are true positives.
|
|
142
|
+
*/
|
|
143
|
+
const _NULL_FORMS: readonly RegExp[] = [
|
|
144
|
+
/honest[ -]null/iu,
|
|
145
|
+
/\bwaived,? (?:rather than|not) met\b/iu,
|
|
146
|
+
/\bsoak was waived\b/iu,
|
|
147
|
+
// The trailing lookahead keeps a recorded *result* apart from a field that
|
|
148
|
+
// merely holds null. This pattern is applied to the body as well as the
|
|
149
|
+
// subject, and a body is where "records null token_delta" appears — a
|
|
150
|
+
// telemetry field, not a null result. Excluding an identifier-shaped token
|
|
151
|
+
// after `null` costs nothing real: "records the null result" and "closed as
|
|
152
|
+
// a published null" both still derive. The lookahead is deliberately
|
|
153
|
+
// SAME-LINE (`[ \t]`, never `\s`): the first version used `\s+` and dropped
|
|
154
|
+
// a true positive, because 92f9b9a ends its subject on "closed as a
|
|
155
|
+
// published null" and its body then opens with `count_open reached 0` — an
|
|
156
|
+
// identifier on the NEXT line, which `\s+` happily crossed. The residual
|
|
157
|
+
// limit, named rather than left to be discovered: a field name with no
|
|
158
|
+
// underscore ("records null delta") is still caught.
|
|
159
|
+
/\b(?:publish(?:es|ed|ing)?|record(?:s|ed|ing)?|report(?:s|ed|ing)?) (?:the |an |a |its )?(?:honest )?null\b(?![ \t]+`?[a-z][a-z0-9]*_[a-z0-9_]*)/iu,
|
|
160
|
+
/\bnull(?: result)? (?:stands|is the answer)\b/iu,
|
|
161
|
+
/\bon (?:its|the) own falsifier\b/iu,
|
|
162
|
+
];
|
|
163
|
+
|
|
79
164
|
/**
|
|
80
165
|
* Why a label fired, in generator-facing prose. Keyed by label; a label absent
|
|
81
166
|
* here is never derived (`Known limitations` is pure prose, not checkable).
|
|
@@ -83,25 +168,37 @@ const _RULE_OR_SCHEMA_PREFIXES = ['src/rules/', 'src/scripts/schemas/'];
|
|
|
83
168
|
const _DERIVED_REASON: Readonly<Record<string, string>> = {
|
|
84
169
|
'Behaviour changes': 'rule/schema diffs, breaking commits or removed public surface',
|
|
85
170
|
'Default changes + migration': 'commits naming a default, migration or migrate',
|
|
86
|
-
'Security and correctness': 'security-scoped commits',
|
|
87
|
-
'Honest nulls': 'commits
|
|
171
|
+
'Security and correctness': 'security-scoped commits or fixes to executable surface',
|
|
172
|
+
'Honest nulls': 'commits recording a null, waived or falsified result',
|
|
88
173
|
};
|
|
89
174
|
|
|
90
175
|
/**
|
|
91
176
|
* Derive evidence per curated label from the span. Rules per label:
|
|
92
177
|
*
|
|
93
178
|
* - Security and correctness: conventional scope matching /secur/i, or the
|
|
94
|
-
* whole word "security" in the subject
|
|
179
|
+
* whole word "security" in the subject — plus the *correctness* half the
|
|
180
|
+
* label names: a `fix` or `revert` commit touching executable surface.
|
|
95
181
|
* - Behaviour changes: breaking (`!` / BREAKING CHANGE) commits, diffs
|
|
96
182
|
* touching `src/rules/` or `src/scripts/schemas/`, and deletions under the
|
|
97
183
|
* public artefact trees (removed public surface).
|
|
98
184
|
* - Default changes + migration: subject carrying the whole word "default",
|
|
99
185
|
* "migration", or "migrate".
|
|
100
|
-
* - Honest nulls: subject or body carrying
|
|
186
|
+
* - Honest nulls: subject or body carrying one of the recorded-null forms —
|
|
187
|
+
* the literal marker, a waived-rather-than-met condition, a published or
|
|
188
|
+
* recorded null, an archival on a roadmap's own falsifier.
|
|
101
189
|
* - Known limitations: never derived — pure prose, not gate-checkable.
|
|
102
190
|
*
|
|
103
191
|
* Derivation is deliberately conservative: a false red makes every release
|
|
104
|
-
* annoying, a miss only returns the head to the pre-gate state.
|
|
192
|
+
* annoying, a miss only returns the head to the pre-gate state. Conservative
|
|
193
|
+
* is not the same as silent, and two labels had crossed that line: measured
|
|
194
|
+
* over the six spans in
|
|
195
|
+
* `agents/evidence/analysis/release-head-derivation-recall.md`, `Security and
|
|
196
|
+
* correctness` fired **1 of 45** hand-confirmed in-category commits and
|
|
197
|
+
* `Honest nulls` **3 of 9**, so the
|
|
198
|
+
* curated `_none_` shipped uncontested where the span carried the evidence.
|
|
199
|
+
* The widening is aimed at those two and measured before it landed; the naive
|
|
200
|
+
* "any `fix(` counts" alternative was rejected on data (54 % precision against
|
|
201
|
+
* 96 %), not on taste.
|
|
105
202
|
*/
|
|
106
203
|
export function derive_category_hits(
|
|
107
204
|
commits: readonly SpanCommit[],
|
|
@@ -113,7 +210,10 @@ export function derive_category_hits(
|
|
|
113
210
|
for (const c of commits) {
|
|
114
211
|
const scopeMatch = /^\w+\(([^)]*)\)!?:/u.exec(c.subject);
|
|
115
212
|
const scope = scopeMatch ? scopeMatch[1]! : '';
|
|
116
|
-
|
|
213
|
+
const type = _commit_type(c.subject);
|
|
214
|
+
const correctnessFix =
|
|
215
|
+
(type === 'fix' || type === 'revert') && _touches_executable(c.files);
|
|
216
|
+
if (/secur/iu.test(scope) || /\bsecurity\b/iu.test(c.subject) || correctnessFix) {
|
|
117
217
|
out['Security and correctness']!.push({ sha: c.sha, text: c.subject });
|
|
118
218
|
}
|
|
119
219
|
const removedPublic = c.files.filter(
|
|
@@ -134,7 +234,8 @@ export function derive_category_hits(
|
|
|
134
234
|
if (/\b(default|migration|migrate)\b/iu.test(c.subject)) {
|
|
135
235
|
out['Default changes + migration']!.push({ sha: c.sha, text: c.subject });
|
|
136
236
|
}
|
|
137
|
-
|
|
237
|
+
const subjectAndBody = `${c.subject}\n${c.body}`;
|
|
238
|
+
if (_NULL_FORMS.some((re) => re.test(subjectAndBody))) {
|
|
138
239
|
out['Honest nulls']!.push({ sha: c.sha, text: c.subject });
|
|
139
240
|
}
|
|
140
241
|
}
|