@event4u/agent-config 14.10.0 → 14.12.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/.augment-plugin/marketplace.json +3 -3
- package/.augment-plugin/plugin.json +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +161 -208
- package/README.md +1 -1
- package/dist/agent-src/commands/design.md +88 -0
- package/dist/agent-src/commands/project/analyze.md +47 -0
- package/dist/agent-src/commands/review/changes.md +67 -6
- package/dist/agent-src/commands/roadmap/create.md +49 -0
- package/dist/agent-src/commands/roadmap/next.md +27 -11
- package/dist/agent-src/commands/roadmap/process-full.md +14 -0
- package/dist/agent-src/commands/video/from-script.md +60 -3
- package/dist/agent-src/commands/video/stitch.md +14 -0
- package/dist/agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +1 -0
- package/dist/agent-src/contexts/execution/evidence-discipline.md +26 -0
- package/dist/agent-src/contexts/execution/roadmap-process-loop.md +154 -2
- package/dist/agent-src/rules/active-remediation.md +3 -3
- package/dist/agent-src/rules/code-provenance.md +2 -2
- package/dist/agent-src/rules/context-hygiene.md +13 -33
- package/dist/agent-src/rules/council-availability.md +2 -2
- package/dist/agent-src/rules/decision-revisit-gate.md +3 -1
- package/dist/agent-src/rules/design-fidelity.md +18 -0
- package/dist/agent-src/rules/design-review-after-ui-write.md +2 -2
- package/dist/agent-src/rules/evaluator-independence.md +56 -44
- package/dist/agent-src/rules/fix-what-you-see.md +9 -1
- package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +1 -1
- package/dist/agent-src/rules/minimal-safe-diff.md +14 -20
- package/dist/agent-src/rules/missing-skill-recovery.md +13 -1
- package/dist/agent-src/rules/playbook-precedence.md +105 -0
- package/dist/agent-src/rules/recurring-criticism.md +3 -1
- package/dist/agent-src/rules/roadmap-progress-sync.md +14 -13
- package/dist/agent-src/rules/scale-discipline.md +24 -0
- package/dist/agent-src/rules/security-sensitive-stop.md +2 -2
- package/dist/agent-src/rules/settings-ask-protocol.md +2 -2
- package/dist/agent-src/rules/ui-audit-gate.md +27 -15
- package/dist/agent-src/rules/untrusted-input-defense.md +2 -2
- package/dist/agent-src/skills/accessibility-auditor/SKILL.md +19 -0
- package/dist/agent-src/skills/adr-create/SKILL.md +7 -0
- package/dist/agent-src/skills/agents-md-thin-root/SKILL.md +33 -0
- package/dist/agent-src/skills/ai-council/references/advanced-modes.md +17 -3
- package/dist/agent-src/skills/ai-council/references/output-and-synthesis.md +31 -0
- package/dist/agent-src/skills/ai-council/references/procedure.md +19 -0
- package/dist/agent-src/skills/alerting-doctrine/SKILL.md +225 -0
- package/dist/agent-src/skills/authz-review/SKILL.md +0 -1
- package/dist/agent-src/skills/blast-radius-analyzer/SKILL.md +32 -0
- package/dist/agent-src/skills/brand/SKILL.md +3 -0
- package/dist/agent-src/skills/brand-asset-generation/SKILL.md +3 -0
- package/dist/agent-src/skills/brand-audit/SKILL.md +3 -0
- package/dist/agent-src/skills/brand-identity/SKILL.md +3 -0
- package/dist/agent-src/skills/brand-strategy/SKILL.md +3 -0
- package/dist/agent-src/skills/brand-to-tokens/SKILL.md +3 -0
- package/dist/agent-src/skills/check-refs/SKILL.md +3 -0
- package/dist/agent-src/skills/code-refactoring/SKILL.md +45 -1
- package/dist/agent-src/skills/code-review/SKILL.md +75 -5
- package/dist/agent-src/skills/command-routing/SKILL.md +6 -0
- package/dist/agent-src/skills/command-writing/SKILL.md +35 -0
- package/dist/agent-src/skills/condense-memory/SKILL.md +3 -0
- package/dist/agent-src/skills/context-authoring/SKILL.md +1 -1
- package/dist/agent-src/skills/conventional-commits-writing/SKILL.md +3 -0
- package/dist/agent-src/skills/copilot-agents-optimization/SKILL.md +10 -0
- package/dist/agent-src/skills/corpus-grounding/SKILL.md +3 -0
- package/dist/agent-src/skills/design-intelligence/SKILL.md +3 -0
- package/dist/agent-src/skills/design-intelligence/data/landing.csv +36 -35
- package/dist/agent-src/skills/design-intelligence/data/stacks/threejs.csv +1 -0
- package/dist/agent-src/skills/design-review/SKILL.md +79 -1
- package/dist/agent-src/skills/design-review/references/verification-automation.md +41 -0
- package/dist/agent-src/skills/design-system-capture/SKILL.md +35 -40
- package/dist/agent-src/skills/design-system-capture/references/import-procedure.md +50 -0
- package/dist/agent-src/skills/design-tokens/SKILL.md +3 -0
- package/dist/agent-src/skills/design-variations/SKILL.md +3 -0
- package/dist/agent-src/skills/developer-like-execution/SKILL.md +3 -0
- package/dist/agent-src/skills/estimate-ticket/SKILL.md +3 -0
- package/dist/agent-src/skills/existing-ui-audit/SKILL.md +28 -4
- package/dist/agent-src/skills/fe-design/SKILL.md +74 -41
- package/dist/agent-src/skills/fe-design/references/craft-floor.md +52 -0
- package/dist/agent-src/skills/fe-design/references/source-led-port.md +36 -0
- package/dist/agent-src/skills/file-editor/SKILL.md +5 -0
- package/dist/agent-src/skills/finishing-a-development-branch/SKILL.md +2 -2
- package/dist/agent-src/skills/git-workflow/SKILL.md +3 -0
- package/dist/agent-src/skills/html-deck/SKILL.md +3 -0
- package/dist/agent-src/skills/iconography/SKILL.md +3 -0
- package/dist/agent-src/skills/image-editing/SKILL.md +3 -0
- package/dist/agent-src/skills/image-generation/SKILL.md +3 -0
- package/dist/agent-src/skills/image-provider-routing/SKILL.md +3 -0
- package/dist/agent-src/skills/incident-commander/SKILL.md +10 -0
- package/dist/agent-src/skills/js-library-packaging/SKILL.md +173 -0
- package/dist/agent-src/skills/js-library-packaging/scripts/check_package_surface.ts +270 -0
- package/dist/agent-src/skills/laravel-migration/SKILL.md +3 -0
- package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +3 -0
- package/dist/agent-src/skills/lint-skills/SKILL.md +3 -0
- package/dist/agent-src/skills/llm-provider-knowledge/SKILL.md +3 -0
- package/dist/agent-src/skills/logging-monitoring/SKILL.md +234 -51
- package/dist/agent-src/skills/logo-generation/SKILL.md +3 -0
- package/dist/agent-src/skills/md-language-check/SKILL.md +3 -0
- package/dist/agent-src/skills/monorepo-workspace/SKILL.md +149 -0
- package/dist/agent-src/skills/motion-choreographer/SKILL.md +6 -0
- package/dist/agent-src/skills/multi-tenancy/SKILL.md +4 -0
- package/dist/agent-src/skills/operational-readiness/SKILL.md +184 -0
- package/dist/agent-src/skills/override-management/SKILL.md +3 -0
- package/dist/agent-src/skills/persona-improvement/SKILL.md +3 -0
- package/dist/agent-src/skills/pest-testing/SKILL.md +3 -0
- package/dist/agent-src/skills/playbook-authoring/SKILL.md +162 -0
- package/dist/agent-src/skills/playwright-testing/SKILL.md +3 -0
- package/dist/agent-src/skills/privacy-review/SKILL.md +3 -0
- package/dist/agent-src/skills/project-analysis-core/SKILL.md +23 -0
- package/dist/agent-src/skills/prompt-engineering-image/SKILL.md +3 -0
- package/dist/agent-src/skills/quality-tools/SKILL.md +5 -0
- package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +81 -33
- package/dist/agent-src/skills/readme-reviewer/SKILL.md +3 -0
- package/dist/agent-src/skills/readme-writing/SKILL.md +3 -0
- package/dist/agent-src/skills/readme-writing-package/SKILL.md +3 -0
- package/dist/agent-src/skills/receiving-code-review/SKILL.md +2 -2
- package/dist/agent-src/skills/refine-prompt/SKILL.md +3 -0
- package/dist/agent-src/skills/refine-ticket/SKILL.md +3 -0
- package/dist/agent-src/skills/requesting-code-review/SKILL.md +2 -2
- package/dist/agent-src/skills/review-routing/SKILL.md +2 -2
- package/dist/agent-src/skills/roadmap-writing/SKILL.md +23 -41
- package/dist/agent-src/skills/roadmap-writing/references/follow-up-roadmap-shape.md +47 -0
- package/dist/agent-src/skills/rtk-output-filtering/SKILL.md +22 -6
- package/dist/agent-src/skills/runway-cognition/SKILL.md +3 -0
- package/dist/agent-src/skills/scene-expander/scene-blueprint.schema.yaml +26 -0
- package/dist/agent-src/skills/secrets-management/SKILL.md +4 -0
- package/dist/agent-src/skills/server-hardening/SKILL.md +159 -0
- package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +3 -0
- package/dist/agent-src/skills/skill-management/SKILL.md +3 -0
- package/dist/agent-src/skills/skill-reviewer/SKILL.md +3 -0
- package/dist/agent-src/skills/skill-writing/SKILL.md +6 -0
- package/dist/agent-src/skills/skill-writing/references/procedure.md +24 -2
- package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +3 -0
- package/dist/agent-src/skills/storybook-workshop/SKILL.md +203 -0
- package/dist/agent-src/skills/storybook-workshop/scripts/story_contrast_floor.ts +134 -0
- package/dist/agent-src/skills/subagent-orchestration/SKILL.md +1 -1
- package/dist/agent-src/skills/subagent-orchestration/prompts/README.md +25 -0
- package/dist/agent-src/skills/supply-chain-intake/SKILL.md +12 -0
- package/dist/agent-src/skills/systematic-debugging/SKILL.md +1 -1
- package/dist/agent-src/skills/terraform/SKILL.md +3 -0
- package/dist/agent-src/skills/test-driven-development/SKILL.md +1 -1
- package/dist/agent-src/skills/threat-modeling/SKILL.md +0 -3
- package/dist/agent-src/skills/token-optimizer/SKILL.md +3 -0
- package/dist/agent-src/skills/typography-system/SKILL.md +3 -0
- package/dist/agent-src/skills/ui-component-architect/SKILL.md +17 -1
- package/dist/agent-src/skills/upstream-contribute/SKILL.md +3 -0
- package/dist/agent-src/skills/validate-feature-fit/SKILL.md +3 -0
- package/dist/agent-src/skills/verify-completion-evidence/SKILL.md +2 -2
- package/dist/agent-src/skills/wireframe/SKILL.md +3 -0
- package/dist/agent-src/skills/wireframe/references/story-beat-ledger.schema.json +115 -0
- package/dist/agent-src/skills/workspace-link/SKILL.md +131 -0
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/playbook.md +75 -0
- package/dist/agent-src/templates/roadmaps.md +37 -0
- package/dist/agent-src/templates/scripts/check_playbook_invokes.ts +231 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +24 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +2 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/review.ts +216 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +159 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +73 -4
- package/dist/agent-src/templates/scripts/work_engine/stack/detect.ts +325 -40
- package/dist/cli/commands/uiAudit.js +221 -0
- package/dist/cli/commands/uiRender.js +206 -0
- package/dist/cli/main.js +22 -1
- package/dist/cli/mcp/content.js +64 -1
- package/dist/cli/mcp/dispatch.js +175 -10
- package/dist/cli/registry.js +3 -0
- package/dist/cli-delegate/{chunk-G23AT6GD.js → chunk-DMSZHXZS.js} +57 -1
- package/dist/cli-delegate/{chunk-77GR3VD4.js → chunk-FF7WAFMR.js} +58 -3
- package/dist/cli-delegate/{chunk-YM4GZDJG.js → chunk-JCW7ZLHK.js} +10 -0
- package/dist/cli-delegate/{chunk-H4VIVD4C.js → chunk-JJA2QEWA.js} +413 -391
- package/dist/cli-delegate/{chunk-PLSG6UL5.js → chunk-K4FFODTS.js} +341 -204
- package/dist/cli-delegate/{chunk-B2ERU2VA.js → chunk-WOKWX5PL.js} +1 -1
- package/dist/cli-delegate/cmd_brand_status.js +8 -6
- package/dist/cli-delegate/cmd_conformance.js +3 -3
- package/dist/cli-delegate/cmd_doctor.js +3 -3
- package/dist/cli-delegate/cmd_export.js +4 -4
- package/dist/cli-delegate/cmd_handoff.js +1 -1
- package/dist/cli-delegate/cmd_preflight.js +2 -2
- package/dist/cli-delegate/cmd_prune.js +4 -4
- package/dist/cli-delegate/cmd_session_recycle.js +70 -9
- package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
- package/dist/cli-delegate/cmd_settings_set.js +1 -1
- package/dist/cli-delegate/cmd_sync.js +4 -4
- package/dist/cli-delegate/cmd_uninstall.js +4 -4
- package/dist/cli-delegate/cmd_validate.js +4 -4
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +362 -127
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +4 -4
- package/dist/discovery/dormancy-report.md +1 -1
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +18 -8
- package/dist/discovery/trust-report.md +3 -3
- package/dist/discovery/workspaces.json +16 -6
- package/dist/hooks/dispatch.js +2575 -1472
- package/dist/install/install.mjs +800 -708
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +1685 -1250
- package/dist/router.json +1 -1
- package/dist/scripts/_lib/lean_projection_mode.js +40 -0
- package/dist/scripts/_lib/scoped_projection.js +84 -0
- package/dist/scripts/_lib/ui_surface.js +89 -0
- package/dist/scripts/condense.js +6 -10
- package/dist/scripts/project_thin_rules.js +40 -2
- package/dist/server/schemas/settings.js +6 -0
- package/dist/shared/skillRanking.js +159 -0
- package/docs/contracts/provider-lifecycle.md +47 -18
- package/docs/contracts/settings-classes.md +35 -5
- package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +49 -0
- package/docs/guidelines/agent-infra/downstream-changes-mechanics.md +91 -0
- package/docs/guidelines/agent-infra/evaluator-independence-mechanics.md +92 -0
- package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +45 -1
- package/docs/guidelines/agent-infra/roadmap-deferred-resolution-provenance.md +54 -0
- package/docs/guidelines/code-clarity.md +21 -0
- package/docs/guidelines/design-antipatterns.md +4 -2
- package/docs/guidelines/design-asset-discipline.md +38 -0
- package/docs/guidelines/design-fidelity-mechanics.md +45 -29
- package/docs/guidelines/design-handover-extraction.md +35 -5
- package/docs/guidelines/design-modes.md +41 -1
- package/docs/guidelines/monorepo-antipatterns.md +141 -0
- package/docs/guidelines/redundancy-taxonomy.md +180 -0
- package/llms.txt +50 -39
- package/package.json +6 -2
- package/src/agent-src/templates/scripts/check_playbook_invokes.ts +231 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +24 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +2 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/review.ts +216 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +159 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +73 -4
- package/src/agent-src/templates/scripts/work_engine/stack/detect.ts +325 -40
- package/src/config/agent-settings.template.yml +44 -0
- package/src/config/assurance-capability-registry.json +223 -0
- package/src/config/assurance-threshold-budget.json +65 -0
- package/src/config/budgets.yml +19 -0
- package/src/config/ci-local-parity.yml +29 -0
- package/src/config/discovery/prompt-patterns.yml +56 -0
- package/src/config/discovery/unassigned-artefacts.yml +2 -0
- package/src/config/dispatch-economy-metrics.json +4 -2
- package/src/config/estate-count-budget.json +8 -3
- package/src/config/evaluator-budgets.json +14 -14
- package/src/config/gate-coverage.yml +392 -8
- package/src/config/gate-violation-baselines.json +76 -72
- package/src/config/hook-latency-budget.json +1 -0
- package/src/config/hook-token-budget.json +137 -125
- package/src/config/pack-size-budget.json +39 -10
- package/src/config/preamble-payload-budget.json +97 -71
- package/src/config/quorum-attendance-budget.json +12 -4
- package/src/config/routing-coverage-seed.json +29 -0
- package/src/config/rule-activation-census.json +7 -3
- package/src/config/rule-enforcement-baseline.json +0 -1
- package/src/config/rule-stub-ceilings.json +112 -91
- package/src/config/suggestion-capture.json +28 -0
- package/src/config/surface-matrix.yml +21 -2
- package/src/config/web-launch-readiness.json +188 -0
- package/src/scripts/_cli/cmd_doctor.ts +15 -16
- package/src/scripts/_cli/doctor_install_mode.ts +49 -0
- package/src/scripts/_cli/doctor_overrides.ts +154 -0
- package/src/scripts/_dispatch.bash +17 -0
- package/src/scripts/_lib/as_of.ts +412 -0
- package/src/scripts/_lib/exec_evidence.ts +7 -0
- package/src/scripts/_lib/gate_baseline.ts +150 -1
- package/src/scripts/_lib/hook_settings.ts +33 -0
- package/src/scripts/_lib/host_listing_model.ts +192 -0
- package/src/scripts/_lib/lean_projection_mode.ts +44 -0
- package/src/scripts/_lib/mcp_bridge.ts +199 -0
- package/src/scripts/_lib/review_independence.ts +62 -10
- package/src/scripts/_lib/rule_injection.ts +239 -0
- package/src/scripts/_lib/run_checkpoint.ts +54 -1
- package/src/scripts/_lib/scoped_projection.ts +96 -0
- package/src/scripts/_lib/session_register.ts +44 -2
- package/src/scripts/_lib/skill_catalogue.ts +38 -2
- package/src/scripts/_lib/skill_estate.ts +115 -0
- package/src/scripts/_lib/transcript_reads.ts +207 -0
- package/src/scripts/_lib/ui_authority.ts +343 -0
- package/src/scripts/ai-video/adapters/fal.sh +8 -3
- package/src/scripts/ai-video/adapters/gemini-veo.sh +10 -0
- package/src/scripts/ai-video/adapters/higgsfield.sh +10 -2
- package/src/scripts/ai-video/adapters/kling.sh +10 -0
- package/src/scripts/ai-video/adapters/sora.sh +10 -0
- package/src/scripts/ai-video/lib/calibrate-cost.sh +145 -0
- package/src/scripts/ai-video/lib/model-capabilities/README.md +53 -7
- package/src/scripts/ai-video/lib/model-capabilities/comfyui.json +15 -3
- package/src/scripts/ai-video/lib/model-capabilities/fal.json +36 -6
- package/src/scripts/ai-video/lib/model-capabilities/gemini-veo.json +23 -0
- package/src/scripts/ai-video/lib/model-capabilities/higgsfield.json +23 -0
- package/src/scripts/ai-video/lib/model-capabilities/kling.json +23 -0
- package/src/scripts/ai-video/lib/model-capabilities/musetalk.json +8 -2
- package/src/scripts/ai-video/lib/model-capabilities/replicate.json +36 -6
- package/src/scripts/ai-video/lib/model-capabilities/sora.json +45 -0
- package/src/scripts/ai-video/lib/model-capabilities/syncso.json +8 -2
- package/src/scripts/ai-video/lib/parse-blueprint.sh +52 -5
- package/src/scripts/ai-video/lib/resume-scan.sh +92 -3
- package/src/scripts/ai-video/lib/seam-plan.sh +212 -0
- package/src/scripts/ai-video/smoke-trace.sh +450 -2
- package/src/scripts/ai-video/stitch.sh +191 -10
- package/src/scripts/ai-video/test-pipeline.sh +84 -6
- package/src/scripts/ai_council/argument_exhaustion.ts +130 -0
- package/src/scripts/ai_council/cli_agency_bounds.ts +139 -0
- package/src/scripts/ai_council/cli_least_agency_canary.ts +347 -0
- package/src/scripts/ai_council/clients.ts +3 -2
- package/src/scripts/ai_council/consensus.ts +63 -6
- package/src/scripts/ai_council/events_log.ts +46 -1
- package/src/scripts/ai_council/orchestrator.ts +103 -108
- package/src/scripts/ai_council/orchestrator_results.ts +166 -0
- package/src/scripts/ai_council/prompts.ts +12 -5
- package/src/scripts/ai_council/quorum.ts +82 -1
- package/src/scripts/ai_council/quorum_wiring.ts +82 -5
- package/src/scripts/ai_council/stance_tally.ts +22 -0
- package/src/scripts/bench_hook_latency.ts +62 -0
- package/src/scripts/build_proof.ts +12 -1
- package/src/scripts/capture_skill_catalogue.ts +21 -0
- package/src/scripts/check_always_budget.ts +2 -1
- package/src/scripts/check_augmentignore.ts +2 -1
- package/src/scripts/check_beta_review_markers.ts +2 -1
- package/src/scripts/check_bundle_path_leakage.ts +162 -7
- package/src/scripts/check_command_examples.ts +557 -0
- package/src/scripts/check_composite_arming.ts +364 -0
- package/src/scripts/check_corpus_staleness.ts +2 -1
- package/src/scripts/check_council_pin_staleness.ts +3 -1
- package/src/scripts/check_enforcement_coverage.ts +116 -3
- package/src/scripts/check_enforcement_denominator.ts +365 -0
- package/src/scripts/check_estate_count.ts +122 -3
- package/src/scripts/check_gate_coverage.ts +2 -1
- package/src/scripts/check_hook_bundle_freshness.ts +13 -1
- package/src/scripts/check_knowledge_cards.ts +2 -1
- package/src/scripts/check_knowledge_pages.ts +3 -2
- package/src/scripts/check_memory.ts +2 -1
- package/src/scripts/check_no_automerge_key.ts +287 -0
- package/src/scripts/check_pack_conformance_fixture.ts +565 -0
- package/src/scripts/check_preamble_payload_budget.ts +30 -3
- package/src/scripts/check_proposal.ts +2 -1
- package/src/scripts/check_reach_staleness.ts +2 -1
- package/src/scripts/check_release_adjacent_health.ts +2 -1
- package/src/scripts/check_release_pr_shape.ts +5 -0
- package/src/scripts/check_review_schema.ts +34 -1
- package/src/scripts/check_roadmap_trackable.ts +48 -3
- package/src/scripts/check_routing_coverage.ts +352 -0
- package/src/scripts/check_score_contract.ts +505 -0
- package/src/scripts/check_skill_admissions.ts +514 -0
- package/src/scripts/check_source_size_budget.ts +2 -1
- package/src/scripts/check_standing_payload_delta.ts +505 -0
- package/src/scripts/check_trigger_evals.ts +2 -1
- package/src/scripts/check_web_launch_readiness.ts +705 -0
- package/src/scripts/classify_change_risk.ts +281 -0
- package/src/scripts/compute_skill_tiers.ts +186 -0
- package/src/scripts/condense.ts +8 -13
- package/src/scripts/council_attendance_metrics.ts +183 -0
- package/src/scripts/council_cli.ts +10 -8
- package/src/scripts/council_parse_rate.ts +116 -0
- package/src/scripts/derive_playbooks.ts +406 -0
- package/src/scripts/description_route_check.ts +494 -0
- package/src/scripts/design_slop_rules.ts +56 -2
- package/src/scripts/dispatch_r2_reviewer.ts +16 -0
- package/src/scripts/frontend_corpus_hash.ts +116 -0
- package/src/scripts/grade_target_readiness.ts +478 -0
- package/src/scripts/hook_manifest.json +1 -1
- package/src/scripts/hook_manifest.yaml +124 -16
- package/src/scripts/hooks/concern_registry.ts +6 -0
- package/src/scripts/hooks/design_pass_hook.ts +356 -0
- package/src/scripts/hooks/rtk_wrap_hook.ts +30 -7
- package/src/scripts/hooks/rule_inject_hook.ts +318 -0
- package/src/scripts/hooks/suggestion_capture_hook.ts +368 -0
- package/src/scripts/hot_context_hook.ts +74 -7
- package/src/scripts/install.ts +40 -89
- package/src/scripts/lint_adapter_tier.ts +663 -0
- package/src/scripts/lint_archived_skills.ts +93 -0
- package/src/scripts/lint_budget_ownership.ts +56 -5
- package/src/scripts/lint_deterministic_time.ts +470 -0
- package/src/scripts/lint_framework_leakage.ts +5 -0
- package/src/scripts/lint_handoffs.ts +525 -1
- package/src/scripts/lint_judge_prompt_expectation.ts +155 -0
- package/src/scripts/lint_marketplace.ts +88 -0
- package/src/scripts/lint_media_policy_linkage.ts +140 -1
- package/src/scripts/lint_one_off_age.ts +6 -1
- package/src/scripts/lint_override_kernel_guard.ts +87 -5
- package/src/scripts/lint_roadmap_complexity.ts +56 -0
- package/src/scripts/lint_rule_enforcement_declaration.ts +24 -7
- package/src/scripts/lint_rule_norm_pin.ts +321 -0
- package/src/scripts/lint_skill_trigger_corpus.ts +349 -0
- package/src/scripts/lint_spawn_payload.ts +42 -5
- package/src/scripts/lint_symptom_intake.ts +2 -1
- package/src/scripts/mcp_parity_smoke.ts +30 -4
- package/src/scripts/mcp_render.ts +66 -1
- package/src/scripts/mcp_tool_fingerprint.ts +241 -0
- package/src/scripts/measure_risk_class_drift.ts +140 -0
- package/src/scripts/measure_skill_ranker_baseline.ts +212 -0
- package/src/scripts/media/lib/adapter-common.sh +211 -1
- package/src/scripts/media/lib/adapter-contract.md +74 -6
- package/src/scripts/model_rule_injection.ts +907 -0
- package/src/scripts/pack_install_smoke.ts +363 -0
- package/src/scripts/pr_conflict_census.ts +187 -0
- package/src/scripts/project_thin_rules.ts +45 -2
- package/src/scripts/release.ts +66 -860
- package/src/scripts/release_drill.ts +59 -3
- package/src/scripts/release_env.ts +298 -0
- package/src/scripts/release_publication.ts +720 -0
- package/src/scripts/report_pack_delta.ts +204 -0
- package/src/scripts/roadmap_context.ts +778 -0
- package/src/scripts/schemas/fidelity-measurement-sheet.schema.json +169 -0
- package/src/scripts/schemas/rule.schema.json +24 -2
- package/src/scripts/schemas/skill.schema.json +39 -0
- package/src/scripts/schemas/ui-authority.schema.json +114 -0
- package/src/scripts/select_analysis_mode.ts +112 -0
- package/src/scripts/session_register_hook.ts +29 -3
- package/src/scripts/sessions_cli.ts +67 -3
- package/src/scripts/skill_tools/score_skill_relevance.ts +36 -53
- package/src/scripts/sync_pr_branch.ts +40 -1
- package/src/scripts/token_sink_report.ts +239 -0
- package/src/scripts/trigger_coverage.ts +122 -3
- package/src/scripts/update_counts.ts +7 -3
- package/src/scripts/validate_frontmatter.ts +66 -0
- package/src/server/schemas/settings.ts +10 -0
- package/src/shared/skillRanking.ts +183 -0
- package/dist/agent-src/skills/accessibility-auditor/evals/evals.json +0 -15
- package/dist/agent-src/skills/agent-security-review/evals/triggers.json +0 -52
- package/dist/agent-src/skills/ai-code-blindspots/evals/triggers.json +0 -52
- package/dist/agent-src/skills/analysis-skill-router/evals/evals.json +0 -13
- package/dist/agent-src/skills/brand/evals/triggers.json +0 -17
- package/dist/agent-src/skills/brand-asset-generation/evals/triggers.json +0 -17
- package/dist/agent-src/skills/brand-audit/evals/triggers.json +0 -17
- package/dist/agent-src/skills/brand-identity/evals/triggers.json +0 -17
- package/dist/agent-src/skills/brand-strategy/evals/triggers.json +0 -17
- package/dist/agent-src/skills/brand-to-tokens/evals/triggers.json +0 -17
- package/dist/agent-src/skills/bug-analyzer/evals/evals.json +0 -13
- package/dist/agent-src/skills/canvas-design/evals/triggers.json +0 -17
- package/dist/agent-src/skills/character-consistency/evals/evals.json +0 -16
- package/dist/agent-src/skills/code-intelligence/evals/triggers.json +0 -52
- package/dist/agent-src/skills/code-review/evals/evals.json +0 -100
- package/dist/agent-src/skills/command-routing/evals/evals.json +0 -14
- package/dist/agent-src/skills/complexity-first-planning/evals/triggers.json +0 -17
- package/dist/agent-src/skills/contract-review/evals/triggers.json +0 -17
- package/dist/agent-src/skills/conventional-commits-writing/evals/evals.json +0 -15
- package/dist/agent-src/skills/corpus-grounding/evals/triggers.json +0 -17
- package/dist/agent-src/skills/dashboard-design/evals/evals.json +0 -16
- package/dist/agent-src/skills/dcf-modeling/evals/domain-truth.json +0 -29
- package/dist/agent-src/skills/dcf-modeling/evals/evals.json +0 -20
- package/dist/agent-src/skills/decision-record/evals/evals.json +0 -20
- package/dist/agent-src/skills/decision-record/evals/triggers.json +0 -87
- package/dist/agent-src/skills/design-intelligence/evals/evals.json +0 -14
- package/dist/agent-src/skills/design-intelligence/evals/triggers.json +0 -17
- package/dist/agent-src/skills/design-system-capture/evals/evals.json +0 -15
- package/dist/agent-src/skills/design-tokens/evals/triggers.json +0 -17
- package/dist/agent-src/skills/design-variations/evals/triggers.json +0 -17
- package/dist/agent-src/skills/developer-like-execution/evals/evals.json +0 -16
- package/dist/agent-src/skills/doc-coauthoring/evals/evals.json +0 -16
- package/dist/agent-src/skills/doc-coauthoring/evals/triggers.json +0 -17
- package/dist/agent-src/skills/docx-authoring/evals/triggers.json +0 -52
- package/dist/agent-src/skills/dpa-review/evals/triggers.json +0 -17
- package/dist/agent-src/skills/editorial-calendar/evals/domain-truth.json +0 -16
- package/dist/agent-src/skills/editorial-calendar/evals/evals.json +0 -16
- package/dist/agent-src/skills/eloquent/evals/triggers.json +0 -17
- package/dist/agent-src/skills/estimate-ticket/evals/evals.json +0 -16
- package/dist/agent-src/skills/estimate-ticket/evals/output-schema.yml +0 -20
- package/dist/agent-src/skills/estimate-ticket/evals/triggers.json +0 -19
- package/dist/agent-src/skills/evaluate-llm-feature/evals/triggers.json +0 -52
- package/dist/agent-src/skills/existing-ui-audit/evals/triggers.json +0 -47
- package/dist/agent-src/skills/experiment-loop/evals/output-schema.yml +0 -27
- package/dist/agent-src/skills/experiment-loop/evals/triggers.json +0 -17
- package/dist/agent-src/skills/fe-design/evals/triggers.json +0 -55
- package/dist/agent-src/skills/forecasting/evals/domain-truth.json +0 -29
- package/dist/agent-src/skills/forecasting/evals/evals.json +0 -20
- package/dist/agent-src/skills/forensics-report/evals/triggers.json +0 -17
- package/dist/agent-src/skills/frontend-render-security/evals/triggers.json +0 -52
- package/dist/agent-src/skills/fundraising-narrative/evals/domain-truth.json +0 -16
- package/dist/agent-src/skills/fundraising-narrative/evals/evals.json +0 -16
- package/dist/agent-src/skills/gated-reach/evals/triggers.json +0 -72
- package/dist/agent-src/skills/github-ci/evals/evals.json +0 -25
- package/dist/agent-src/skills/history-design/evals/triggers.json +0 -17
- package/dist/agent-src/skills/html-deck/evals/triggers.json +0 -17
- package/dist/agent-src/skills/humanizer/evals/strip_fixtures.json +0 -57
- package/dist/agent-src/skills/humanizer/evals/triggers.json +0 -17
- package/dist/agent-src/skills/iconography/evals/triggers.json +0 -17
- package/dist/agent-src/skills/image-analyser/evals/triggers.json +0 -17
- package/dist/agent-src/skills/image-creator/evals/triggers.json +0 -17
- package/dist/agent-src/skills/image-editing/evals/triggers.json +0 -17
- package/dist/agent-src/skills/image-generation/evals/triggers.json +0 -17
- package/dist/agent-src/skills/image-provider-routing/evals/triggers.json +0 -17
- package/dist/agent-src/skills/incident-commander/evals/domain-truth.json +0 -16
- package/dist/agent-src/skills/incident-commander/evals/evals.json +0 -20
- package/dist/agent-src/skills/judge-artifact-completeness/evals/triggers.json +0 -17
- package/dist/agent-src/skills/judge-injection-defense/evals/triggers.json +0 -17
- package/dist/agent-src/skills/judge-synthesis/evals/triggers.json +0 -17
- package/dist/agent-src/skills/launch-readiness/evals/evals.json +0 -21
- package/dist/agent-src/skills/learning-tutor/evals/triggers.json +0 -52
- package/dist/agent-src/skills/legal-intake-triage/evals/triggers.json +0 -17
- package/dist/agent-src/skills/legal-practice-profile/evals/triggers.json +0 -17
- package/dist/agent-src/skills/license-compliance-audit/evals/triggers.json +0 -52
- package/dist/agent-src/skills/license-compliance-borrow-check/evals/triggers.json +0 -52
- package/dist/agent-src/skills/license-compliance-credits/evals/triggers.json +0 -52
- package/dist/agent-src/skills/llm-provider-knowledge/evals/triggers.json +0 -20
- package/dist/agent-src/skills/logging-monitoring/evals/evals.json +0 -16
- package/dist/agent-src/skills/logo-generation/evals/triggers.json +0 -17
- package/dist/agent-src/skills/messaging-architecture/evals/domain-truth.json +0 -16
- package/dist/agent-src/skills/messaging-architecture/evals/evals.json +0 -16
- package/dist/agent-src/skills/nda-triage/evals/triggers.json +0 -17
- package/dist/agent-src/skills/pdf-tools/evals/triggers.json +0 -52
- package/dist/agent-src/skills/perf-feedback-craft/evals/evals.json +0 -16
- package/dist/agent-src/skills/persona-improvement/evals/triggers.json +0 -52
- package/dist/agent-src/skills/php-coder/evals/triggers.json +0 -17
- package/dist/agent-src/skills/prediction-pool-optimizer/evals/triggers.json +0 -21
- package/dist/agent-src/skills/prompt-engineering-image/evals/triggers.json +0 -17
- package/dist/agent-src/skills/prompt-engineering-patterns/evals/evals.json +0 -16
- package/dist/agent-src/skills/prompt-validator/evals/triggers.json +0 -17
- package/dist/agent-src/skills/quality-tools/evals/evals.json +0 -15
- package/dist/agent-src/skills/reasoning-orchestrator/evals/triggers.json +0 -17
- package/dist/agent-src/skills/refine-prompt/evals/evals.json +0 -16
- package/dist/agent-src/skills/refine-ticket/evals/evals.json +0 -16
- package/dist/agent-src/skills/refine-ticket/evals/output-schema.yml +0 -16
- package/dist/agent-src/skills/refine-ticket/evals/triggers.json +0 -17
- package/dist/agent-src/skills/release-comms/evals/evals.json +0 -16
- package/dist/agent-src/skills/rice-prioritization/evals/evals.json +0 -20
- package/dist/agent-src/skills/runway-cognition/evals/domain-truth.json +0 -29
- package/dist/agent-src/skills/runway-cognition/evals/evals.json +0 -20
- package/dist/agent-src/skills/scenario-modeling/evals/domain-truth.json +0 -29
- package/dist/agent-src/skills/scenario-modeling/evals/evals.json +0 -20
- package/dist/agent-src/skills/schema-review/evals/triggers.json +0 -17
- package/dist/agent-src/skills/screenshot-hygiene/evals/triggers.json +0 -52
- package/dist/agent-src/skills/security-maturity-assessment/evals/triggers.json +0 -52
- package/dist/agent-src/skills/skill-writing/evals/triggers.json +0 -17
- package/dist/agent-src/skills/spreadsheet-authoring/evals/triggers.json +0 -47
- package/dist/agent-src/skills/subagent-orchestration/evals/evals.json +0 -60
- package/dist/agent-src/skills/supply-chain-intake/evals/triggers.json +0 -52
- package/dist/agent-src/skills/systematic-debugging/evals/evals.json +0 -20
- package/dist/agent-src/skills/test-case-discovery/evals/triggers.json +0 -52
- package/dist/agent-src/skills/test-driven-development/evals/evals.json +0 -16
- package/dist/agent-src/skills/threat-modeling/evals/evals.json +0 -21
- package/dist/agent-src/skills/typography-system/evals/evals.json +0 -14
- package/dist/agent-src/skills/typography-system/evals/triggers.json +0 -17
- package/dist/agent-src/skills/unit-economics-modeling/evals/domain-truth.json +0 -40
- package/dist/agent-src/skills/unit-economics-modeling/evals/evals.json +0 -24
- package/dist/agent-src/skills/verify-completion-evidence/evals/evals.json +0 -16
- package/dist/agent-src/skills/verify-repair-loop/evals/output-schema.yml +0 -20
- package/dist/agent-src/skills/verify-repair-loop/evals/triggers.json +0 -17
- package/dist/agent-src/skills/vision-articulation/evals/evals.json +0 -16
- package/dist/agent-src/skills/voice-and-tone-design/evals/evals.json +0 -16
- package/dist/agent-src/skills/wireframe/evals/triggers.json +0 -17
- package/dist/agent-src/skills/worktree-lifecycle/evals/evals.json +0 -38
- package/dist/agent-src/skills/worktree-lifecycle/evals/triggers.json +0 -52
- package/dist/cli/agent-config.js.map +0 -1
- package/dist/cli/bash/runBash.js.map +0 -1
- package/dist/cli/commands/commands.js.map +0 -1
- package/dist/cli/commands/config.js.map +0 -1
- package/dist/cli/commands/doctorShell.js.map +0 -1
- package/dist/cli/commands/mcpServer.js.map +0 -1
- package/dist/cli/commands/packs.js.map +0 -1
- package/dist/cli/commands/profiles.js.map +0 -1
- package/dist/cli/commands/recordTriggerEval.js.map +0 -1
- package/dist/cli/commands/rtkDetect.js.map +0 -1
- package/dist/cli/commands/settings.js.map +0 -1
- package/dist/cli/commands/uiServe.js.map +0 -1
- package/dist/cli/commands/versions.js.map +0 -1
- package/dist/cli/commands/workspaces.js.map +0 -1
- package/dist/cli/configRoot.js.map +0 -1
- package/dist/cli/discovery/loadManifest.js.map +0 -1
- package/dist/cli/firstRunNotice.js.map +0 -1
- package/dist/cli/help.js.map +0 -1
- package/dist/cli/initRouting.js.map +0 -1
- package/dist/cli/log/logger.js.map +0 -1
- package/dist/cli/main.js.map +0 -1
- package/dist/cli/mcp/content.js.map +0 -1
- package/dist/cli/mcp/dispatch.js.map +0 -1
- package/dist/cli/mcp/stdio.js.map +0 -1
- package/dist/cli/paths.js.map +0 -1
- package/dist/cli/python/knowledge_ingest.js.map +0 -1
- package/dist/cli/python/workspace_analytics.js.map +0 -1
- package/dist/cli/python/workspace_crypto.js.map +0 -1
- package/dist/cli/python/workspace_documents.js.map +0 -1
- package/dist/cli/python/workspace_drive.js.map +0 -1
- package/dist/cli/python/workspace_drive_health.js.map +0 -1
- package/dist/cli/python/workspace_explain.js.map +0 -1
- package/dist/cli/python/workspace_hosts.js.map +0 -1
- package/dist/cli/python/workspace_inbox.js.map +0 -1
- package/dist/cli/python/workspace_render.js.map +0 -1
- package/dist/cli/python/workspace_roles.js.map +0 -1
- package/dist/cli/python/workspace_secrets.js.map +0 -1
- package/dist/cli/python/workspace_sessions.js.map +0 -1
- package/dist/cli/python/workspace_skills.js.map +0 -1
- package/dist/cli/registry.js.map +0 -1
- package/dist/install/agentSwitchDetection.js.map +0 -1
- package/dist/install/agentSwitchProfile.js.map +0 -1
- package/dist/install/atomic.js.map +0 -1
- package/dist/install/claudePathsPlan.js.map +0 -1
- package/dist/install/conflict.js.map +0 -1
- package/dist/install/detect.js.map +0 -1
- package/dist/install/emit_host_rules_cli.js.map +0 -1
- package/dist/install/globalRuleLayers.js.map +0 -1
- package/dist/install/hostLayerFingerprint.js.map +0 -1
- package/dist/install/partitionEligibility.js.map +0 -1
- package/dist/install/paths.js.map +0 -1
- package/dist/install/plan.js.map +0 -1
- package/dist/install/preflight.js.map +0 -1
- package/dist/install/rtkDetection.js.map +0 -1
- package/dist/install/ruleInScope.js.map +0 -1
- package/dist/install/ruleLayerPartition.js.map +0 -1
- package/dist/install/rule_scope.js.map +0 -1
- package/dist/install/rule_scope_cli.js.map +0 -1
- package/dist/install/selectedTools.js.map +0 -1
- package/dist/install/toolDetection.js.map +0 -1
- package/dist/install/txlog.js.map +0 -1
- package/dist/install/types.js.map +0 -1
- package/dist/install/wizard-plan.js.map +0 -1
- package/dist/install/wizardDismissals.js.map +0 -1
- package/dist/scripts/_lib/agent_settings.js.map +0 -1
- package/dist/scripts/_lib/agent_src.js.map +0 -1
- package/dist/scripts/_lib/claude_builtin_names.js.map +0 -1
- package/dist/scripts/_lib/claude_plugin.js.map +0 -1
- package/dist/scripts/_lib/claude_settings_hooks.js.map +0 -1
- package/dist/scripts/_lib/compile_time_toggles.js.map +0 -1
- package/dist/scripts/_lib/environment_detector.js.map +0 -1
- package/dist/scripts/_lib/host_launch.js.map +0 -1
- package/dist/scripts/_lib/install_layout.js.map +0 -1
- package/dist/scripts/_lib/installed_lock.js.map +0 -1
- package/dist/scripts/_lib/model_tier.js.map +0 -1
- package/dist/scripts/_lib/prune_empty_dirs.js.map +0 -1
- package/dist/scripts/_lib/scoped_projection.js.map +0 -1
- package/dist/scripts/_lib/script_output.js.map +0 -1
- package/dist/scripts/_lib/spawn_env.js.map +0 -1
- package/dist/scripts/_lib/surface_tiers.js.map +0 -1
- package/dist/scripts/_lib/token_count.js.map +0 -1
- package/dist/scripts/_lib/trigger_eval_floors.js.map +0 -1
- package/dist/scripts/_lib/user_global_paths.js.map +0 -1
- package/dist/scripts/ai_council/modes.js.map +0 -1
- package/dist/scripts/ai_council/transport_resolver.js.map +0 -1
- package/dist/scripts/condense.js.map +0 -1
- package/dist/scripts/project_thin_rules.js.map +0 -1
- package/dist/server/app.js.map +0 -1
- package/dist/server/io/atomicMultiWrite.js.map +0 -1
- package/dist/server/io/atomicWrite.js.map +0 -1
- package/dist/server/io/sharedWriteCheck.js.map +0 -1
- package/dist/server/io/substituteTemplate.js.map +0 -1
- package/dist/server/io/yamlIO.js.map +0 -1
- package/dist/server/nicknameResolver.js.map +0 -1
- package/dist/server/port.js.map +0 -1
- package/dist/server/routes/discovery.js.map +0 -1
- package/dist/server/routes/install.js.map +0 -1
- package/dist/server/routes/ping.js.map +0 -1
- package/dist/server/routes/schema.js.map +0 -1
- package/dist/server/routes/settings.js.map +0 -1
- package/dist/server/routes/settingsChanges.js.map +0 -1
- package/dist/server/routes/userMd.js.map +0 -1
- package/dist/server/routes/wizard.js.map +0 -1
- package/dist/server/routes/workspace.js.map +0 -1
- package/dist/server/schemas/settings.js.map +0 -1
- package/dist/server/serverInfo.js.map +0 -1
- package/dist/server/token.js.map +0 -1
- package/dist/server/writeRoot.js.map +0 -1
- package/dist/shared/capabilities.js.map +0 -1
- package/dist/shared/interactiveContext.js.map +0 -1
- package/dist/shared/nicknamePrefill.js.map +0 -1
- package/dist/shared/settingsAsks.js.map +0 -1
- package/dist/shared/settingsCarveOut.js.map +0 -1
- package/dist/shared/settingsClasses.js.map +0 -1
- package/dist/shared/settingsConsent.js.map +0 -1
- package/dist/shared/settingsSurface.js.map +0 -1
- package/dist/shared/userMd/formAdapter.js.map +0 -1
- package/dist/shared/userMd/schema.js.map +0 -1
- package/dist/shared/userMd/utils.js.map +0 -1
- package/dist/ui/assets/index-Cxgy63kz.js.map +0 -1
- package/src/scripts/_lib/adr_frontmatter.test.ts +0 -365
- package/src/scripts/_lib/adversarial_council_gate.test.ts +0 -112
- package/src/scripts/_lib/adversarial_reconcile.test.ts +0 -197
- package/src/scripts/_lib/auto_dispatch.corpus.test.ts +0 -150
- package/src/scripts/_lib/secret_detector.test.ts +0 -108
- package/src/scripts/_lib/secret_detector_adversarial.test.ts +0 -116
- package/src/scripts/_lib/untrusted_content.test.ts +0 -175
- package/src/scripts/check_secret_leak.test.ts +0 -90
- package/src/scripts/design_slop_rules.test.ts +0 -239
- package/src/scripts/self_review_gate.test.ts +0 -296
- package/src/shared/capabilities.test.ts +0 -43
|
@@ -63,6 +63,31 @@ export function kernel_ids() {
|
|
|
63
63
|
}
|
|
64
64
|
return new Set();
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Tier rules the router gives NO trigger at all.
|
|
68
|
+
*
|
|
69
|
+
* These cannot be delivered on a match, so thinning them would remove a body
|
|
70
|
+
* that nothing can ever put back — a silent hole rather than a saving. They
|
|
71
|
+
* project full-bodied, and `measure` reports them by name so the residue is
|
|
72
|
+
* visible instead of being absorbed into the pointer count
|
|
73
|
+
* (road-to-trigger-delivered-rule-bodies 1.3).
|
|
74
|
+
*/
|
|
75
|
+
export function no_trigger_ids() {
|
|
76
|
+
const data = JSON.parse(fs.readFileSync(ROUTER, 'utf-8'));
|
|
77
|
+
const out = new Set();
|
|
78
|
+
for (const tier of ['tier_1', 'tier_2']) {
|
|
79
|
+
const entries = data[tier];
|
|
80
|
+
if (!Array.isArray(entries))
|
|
81
|
+
continue;
|
|
82
|
+
for (const e of entries) {
|
|
83
|
+
const obj = e;
|
|
84
|
+
const t = obj.triggers;
|
|
85
|
+
if (!Array.isArray(t) || t.length === 0)
|
|
86
|
+
out.add(String(obj.id));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
66
91
|
/**
|
|
67
92
|
* id → workspaces for every non-kernel router entry (router.json schema v2,
|
|
68
93
|
* road-to-request-scoped-rule-load Phase 1). Rules absent from the map (or
|
|
@@ -168,6 +193,7 @@ export function thin_entry(rule_id, text) {
|
|
|
168
193
|
/** Map {filename: thin_or_full_text} for every rule. Kernel stays full. */
|
|
169
194
|
export function build_thin(rules_dir = RULES_SOURCE, scope = null) {
|
|
170
195
|
const kernel = kernel_ids();
|
|
196
|
+
const noTrigger = no_trigger_ids();
|
|
171
197
|
const wsMap = scope !== null ? rule_workspaces_map() : new Map();
|
|
172
198
|
const out = new Map();
|
|
173
199
|
for (const p of _globSortedMd(rules_dir)) {
|
|
@@ -176,7 +202,8 @@ export function build_thin(rules_dir = RULES_SOURCE, scope = null) {
|
|
|
176
202
|
if (!id_in_scope(stem, scope, kernel, wsMap, fm_workspaces(text))) {
|
|
177
203
|
continue; // out of workspace scope — no body, no pointer line
|
|
178
204
|
}
|
|
179
|
-
|
|
205
|
+
const full = kernel.has(stem) || noTrigger.has(stem);
|
|
206
|
+
out.set(path.basename(p), full ? text : thin_entry(stem, text));
|
|
180
207
|
}
|
|
181
208
|
return out;
|
|
182
209
|
}
|
|
@@ -215,13 +242,22 @@ export function measure(rules_dir = RULES_SOURCE, scope = null) {
|
|
|
215
242
|
kernelInDir += 1;
|
|
216
243
|
}
|
|
217
244
|
}
|
|
245
|
+
const noTrigger = no_trigger_ids();
|
|
246
|
+
const residueIds = [...noTrigger].filter((id) => stemSet.has(id)).sort();
|
|
247
|
+
const residueBlob = residueIds
|
|
248
|
+
.map((id) => fs.readFileSync(path.join(rules_dir, `${id}.md`), 'utf-8'))
|
|
249
|
+
.join('');
|
|
250
|
+
const residueGpt = residueIds.length === 0 ? 0 : token_count.measure(residueBlob).tokens_gpt;
|
|
218
251
|
const saved_pct = eager.tokens_gpt
|
|
219
252
|
? _python_round1((100 * (eager.tokens_gpt - thin.tokens_gpt)) / eager.tokens_gpt)
|
|
220
253
|
: 0.0;
|
|
221
254
|
return {
|
|
222
255
|
rules_total: n,
|
|
223
256
|
kernel_full: kernelInDir,
|
|
224
|
-
non_kernel_thinned: n - kernelInDir,
|
|
257
|
+
non_kernel_thinned: n - kernelInDir - residueIds.length,
|
|
258
|
+
no_trigger_full: residueIds.length,
|
|
259
|
+
no_trigger_ids: residueIds,
|
|
260
|
+
no_trigger_gpt: residueGpt,
|
|
225
261
|
eager_gpt: eager.tokens_gpt,
|
|
226
262
|
thin_gpt: thin.tokens_gpt,
|
|
227
263
|
saved_gpt: eager.tokens_gpt - thin.tokens_gpt,
|
|
@@ -419,6 +455,8 @@ export function main(argv = null) {
|
|
|
419
455
|
process.stdout.write(` thin: ${_rjust6(m.thin_gpt)} GPT tok (${_comma(m.thin_chars)} chars)\n`);
|
|
420
456
|
process.stdout.write(` saved: ${_rjust6(m.saved_gpt)} GPT tok (${m.saved_pct}% of the rule layer)\n`);
|
|
421
457
|
process.stdout.write(` method: ${m.token_method}\n`);
|
|
458
|
+
process.stdout.write(` no-trigger residue (kept full-bodied, ${m.no_trigger_full} rules, ` +
|
|
459
|
+
`${m.no_trigger_gpt} GPT tok): ${m.no_trigger_ids.join(', ')}\n`);
|
|
422
460
|
}
|
|
423
461
|
return 0;
|
|
424
462
|
}
|
|
@@ -266,12 +266,18 @@ export const settingsSchema = z.object({
|
|
|
266
266
|
design_slop: z.object({
|
|
267
267
|
enabled: z.boolean().default(false).describe('PreToolUse anti-slop nudge (road-to-anti-slop-detector Phase 3). Default off. When on, runs the lint_design_slop registry against about-to-be-written UI content and WARNS (never blocks) on P0/P1 aesthetic tells (side-stripe, gradient-text, magic z-index, …). Flags are rebuttable via DESIGN.md / design-slop-disable. Anti-loop: a file::rule signature surfaced 3x goes silent. Host-limited convenience layer; the universal gate is the lint_design_slop linter/CI.'),
|
|
268
268
|
}).default({}),
|
|
269
|
+
design_pass: z.object({
|
|
270
|
+
enabled: z.boolean().default(false).describe('PostToolUse + stop design pass (road-to-frontend-power E1.1/E1.2/E1.3). Default off. One concern on two slots: on post_tool_use a write to a UI surface delivers the design findings as context and never blocks; on stop the same pass runs over every UI file touched this session, deduped against what the post pass surfaced, and a P0 objective floor (contrast, font size, heading skip, focus) blocks with a continuation. P1-P3 never block. post_tool_use rather than pre_tool_use for two measured reasons: pre_tool_use is declared by three hosts and honoured by one while post_tool_use is declared by six, and _lib/ui_surface.ts is a path predicate, so a pre-write gate cannot fire on the first write of a new surface. A pass that could not fully run reports verification: degraded with a reason rather than passing silently. Does not replace design_slop: two design keys is the honest state until the tiering experiment has a number.'),
|
|
271
|
+
}).default({}),
|
|
269
272
|
ui_route_nudge: z.object({
|
|
270
273
|
enabled: z.boolean().default(false).describe('PreToolUse UI-route nudge (road-to-frontend-skill-application Phase 4). Default off. When on, a Write/Edit to a UI surface with no design consultation latched this session WARNS (never blocks) naming the route — run existing-ui-audit, then the fe-design loop. A read or search touching fe-design / existing-ui-audit / design-review / design-intelligence latches consultation and silences it for the session. Anti-loop: at most 2 nudges per session. It does not read the rules: the UI-surface decision comes from _lib/ui_surface.ts and no code parses rule frontmatter, so this runs parallel to the two UI rules rather than consuming their triggers, and a test keeps the sets from drifting. It is a nudge, so their enforced_by: none stays accurate.'),
|
|
271
274
|
}).default({}),
|
|
272
275
|
code_graph: z.object({
|
|
273
276
|
enabled: z.boolean().default(false).describe('PreToolUse code-graph nudge (ADR-124 Phase 4). Default off. When on AND a native code-graph cache or a consumer-shipped graph.json/SCIP index is present, warns once per session (never blocks) as the agent is about to Grep/Glob or Read a source file — query the graph first for who-calls/where-used/impact questions (or rebuild if stale, build if absent). Source G’s strict block-first-read mode is deliberately un-ported.'),
|
|
274
277
|
}).default({}),
|
|
278
|
+
suggestion_capture: z.object({
|
|
279
|
+
enabled: z.boolean().default(false).describe('Suggestion-block capture (road-to-suggestion-block-capture Phase 2). Default off. Two slots: `stop` reads `last_assistant_message` — a payload field, so no transcript file is read — and latches that the assistant turn carried a numbered-options block; `user_prompt_submit` CONSUMES that latch and classifies the answering turn as option_n / as_is / other / stale_block. Consume-once is the correctness guard: the latch is deleted on read, so a bare "1" three turns later meets no latch and classifies `other`, and a latch past its TTL or unparseable is `stale_block` rather than a guess. Writes COUNTS ONLY to agents/runtime/state/audit/suggestion-capture.jsonl — the record type has no field able to hold a prompt, an option label or a command name, and a test asserts the written key set against src/config/suggestion-capture.json. Off by default because this is an INSTRUMENT rather than a feature: it exists so a capture rate can be measured on a maintainer workspace over a fixed soak window, and there is nothing in it for a consumer to gain.'),
|
|
280
|
+
}).default({}),
|
|
275
281
|
// `turn_end_gate` is deliberately ABSENT. The stop-slot turn-end gate is
|
|
276
282
|
// always armed (2026-08-12) and has no settings surface: whether it
|
|
277
283
|
// fires is decided by each detector's own trigger conditions, not by a
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* skillRanking — the ONE definition of "how relevant is this skill to this task".
|
|
3
|
+
*
|
|
4
|
+
* WHY IT LIVES HERE. Two callers need the identical answer and were about to
|
|
5
|
+
* grow two implementations of it:
|
|
6
|
+
*
|
|
7
|
+
* - `src/scripts/skill_tools/score_skill_relevance.ts` — the disk-reading
|
|
8
|
+
* ranker behind the kernel MCP server's `suggest_skill_for_task` and the
|
|
9
|
+
* `skill-route` hook.
|
|
10
|
+
* - `src/cli/mcp/dispatch.ts` — the turnkey stdio server, which must stay a
|
|
11
|
+
* pure function of its in-memory content tree and therefore cannot call a
|
|
12
|
+
* module that walks the file system.
|
|
13
|
+
*
|
|
14
|
+
* `road-to-skill-delivery-over-mcp` risk 6 names that fork by name: "two
|
|
15
|
+
* implementations of `suggest_skill_for_task` diverge silently". The fix is to
|
|
16
|
+
* put the formula in one Node-free module both can import, which is what this
|
|
17
|
+
* is. `src/shared/` is the only directory in the tree that both `src/scripts/`
|
|
18
|
+
* and `src/cli/` already import from, and it is required to stay Node-free —
|
|
19
|
+
* exactly the constraint the pure dispatcher needs.
|
|
20
|
+
*
|
|
21
|
+
* THE FORMULA IS UNCHANGED. It is the Python-parity scorer ported in ADR-200,
|
|
22
|
+
* moved rather than rewritten: `score = round(term_overlap * 70 + persona_hit *
|
|
23
|
+
* 30)`, half-to-even, over tokens of the skill's `name + description`. The
|
|
24
|
+
* `score_skill_relevance` CLI's argparse-parity suite is the check that the move
|
|
25
|
+
* changed nothing.
|
|
26
|
+
*
|
|
27
|
+
* THE ONE ADDITION is `triggerTerms`, off by default. Phase 3.1 of the same
|
|
28
|
+
* roadmap indexes `triggers.keyword` / `triggers.phrase` text; it is an opt-in
|
|
29
|
+
* parameter rather than a second function so the two rankers can be measured
|
|
30
|
+
* against each other on one corpus.
|
|
31
|
+
*
|
|
32
|
+
* Pure — no imports, no I/O, no clock.
|
|
33
|
+
*/
|
|
34
|
+
// re.compile(r"[a-z][a-z0-9]+") — applied to the lowercased text.
|
|
35
|
+
const TOKEN_RE = /[a-z][a-z0-9]+/g;
|
|
36
|
+
/** Ported verbatim from the Python scorer. Order is irrelevant; membership is not. */
|
|
37
|
+
export const STOPWORDS = new Set([
|
|
38
|
+
'the', 'a', 'an', 'and', 'or', 'but', 'of', 'for', 'with', 'to', 'in',
|
|
39
|
+
'on', 'at', 'by', 'from', 'as', 'is', 'are', 'was', 'were', 'be', 'been',
|
|
40
|
+
'this', 'that', 'these', 'those', 'it', 'its', 'use', 'when', 'even',
|
|
41
|
+
'via', 'via:', 'into', 'onto', 'use:', 'skill', 'skills', 'task', 'tasks',
|
|
42
|
+
'code', 'file', 'files', 'doing', 'make', 'do', 'go', 'get', 'set',
|
|
43
|
+
'not', 'no', 'yes', 'any', 'some', 'all', 'one', 'two', 'new', 'old',
|
|
44
|
+
'user', 'users', 'our', 'your', 'their', 'they', 'we', 'you', 'i', 'me',
|
|
45
|
+
]);
|
|
46
|
+
/** Mirror Python `len(str)` — count Unicode code points, not UTF-16 units. */
|
|
47
|
+
function pyLen(s) {
|
|
48
|
+
let n = 0;
|
|
49
|
+
for (const _ of s)
|
|
50
|
+
n++;
|
|
51
|
+
return n;
|
|
52
|
+
}
|
|
53
|
+
/** Mirror Python `round(x)` — half-to-even. Exact for integral ndigits. */
|
|
54
|
+
export function roundHalfToEven(x) {
|
|
55
|
+
if (!Number.isFinite(x))
|
|
56
|
+
return x;
|
|
57
|
+
const floor = Math.floor(x);
|
|
58
|
+
const frac = x - floor;
|
|
59
|
+
if (frac < 0.5)
|
|
60
|
+
return floor;
|
|
61
|
+
if (frac > 0.5)
|
|
62
|
+
return floor + 1;
|
|
63
|
+
return floor % 2 === 0 ? floor : floor + 1;
|
|
64
|
+
}
|
|
65
|
+
/** Lowercase, extract `[a-z][a-z0-9]+`, drop stopwords and tokens of ≤2 code points. */
|
|
66
|
+
export function tokenize(text) {
|
|
67
|
+
const out = new Set();
|
|
68
|
+
const matches = text.toLowerCase().match(TOKEN_RE) ?? [];
|
|
69
|
+
for (const t of matches) {
|
|
70
|
+
if (!STOPWORDS.has(t) && pyLen(t) > 2)
|
|
71
|
+
out.add(t);
|
|
72
|
+
}
|
|
73
|
+
return out;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Which `triggers[]` keys carry INDEXABLE PROSE.
|
|
77
|
+
*
|
|
78
|
+
* `file_pattern`, `path_prefix` and `command` are match *mechanisms*, not text a
|
|
79
|
+
* prompt is compared against: folding a glob in would put tokens like `blade` and
|
|
80
|
+
* `php` on every skill that merely watches a path. `reason` documents the trigger
|
|
81
|
+
* for a human and is not part of what it matches. The policy lives here because
|
|
82
|
+
* two different readers apply it to two different input shapes — parsed YAML
|
|
83
|
+
* objects in `src/cli/mcp/content.ts`, flat `key: "value"` lines in the
|
|
84
|
+
* frontmatter reader of `score_skill_relevance.ts` — and only the DECISION is
|
|
85
|
+
* shared, not the parsing.
|
|
86
|
+
*/
|
|
87
|
+
export const INDEXED_TRIGGER_KEYS = ['keyword', 'phrase'];
|
|
88
|
+
/**
|
|
89
|
+
* Trigger prose out of flat `key: "value"` frontmatter lines.
|
|
90
|
+
*
|
|
91
|
+
* The stdlib-only frontmatter reader in `score_skill_relevance.ts` flattens
|
|
92
|
+
* triggers:
|
|
93
|
+
* - phrase: "authorization check"
|
|
94
|
+
* to the single string `phrase: "authorization check"`, so this takes that shape
|
|
95
|
+
* rather than an object. Anything whose key is not indexable is dropped.
|
|
96
|
+
*/
|
|
97
|
+
export function triggerTextFromFlatLines(lines) {
|
|
98
|
+
const out = [];
|
|
99
|
+
for (const line of lines) {
|
|
100
|
+
const m = /^([a-zA-Z_][\w-]*)\s*:\s*(.*)$/.exec(String(line).trim());
|
|
101
|
+
if (!m)
|
|
102
|
+
continue;
|
|
103
|
+
if (!INDEXED_TRIGGER_KEYS.includes(m[1]))
|
|
104
|
+
continue;
|
|
105
|
+
const value = m[2].trim().replace(/^["']|["']$/g, '');
|
|
106
|
+
if (value)
|
|
107
|
+
out.push(value);
|
|
108
|
+
}
|
|
109
|
+
return out;
|
|
110
|
+
}
|
|
111
|
+
/** The indexed term set for one skill, under the given options. */
|
|
112
|
+
export function skillTerms(skill, opts = {}) {
|
|
113
|
+
const parts = [skill.name, skill.description];
|
|
114
|
+
if (opts.includeTriggers && skill.triggerText)
|
|
115
|
+
parts.push(...skill.triggerText);
|
|
116
|
+
return tokenize(parts.join(' '));
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The score. `taskTerms` is `tokenize(task)`; `terms` is `skillTerms(skill)`.
|
|
120
|
+
*
|
|
121
|
+
* Both are passed in rather than derived here so a caller ranking N skills
|
|
122
|
+
* tokenizes the task once and each skill once, which is what makes this usable
|
|
123
|
+
* on a per-prompt hook path.
|
|
124
|
+
*/
|
|
125
|
+
export function scoreSkill(taskTerms, skill, terms) {
|
|
126
|
+
if (taskTerms.size === 0)
|
|
127
|
+
return 0;
|
|
128
|
+
let inter = 0;
|
|
129
|
+
for (const t of taskTerms)
|
|
130
|
+
if (terms.has(t))
|
|
131
|
+
inter++;
|
|
132
|
+
const overlap = inter / Math.max(taskTerms.size, 1);
|
|
133
|
+
let personaHit = 0;
|
|
134
|
+
const taskLower = [...taskTerms].join(' ');
|
|
135
|
+
for (const persona of skill.personas ?? []) {
|
|
136
|
+
const slug = String(persona).toLowerCase();
|
|
137
|
+
if (taskLower.includes(slug) || slug.split('-').some((part) => taskTerms.has(part))) {
|
|
138
|
+
personaHit = 1;
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return roundHalfToEven(overlap * 70 + personaHit * 30);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Rank an in-memory skill set. Zero scores are dropped; ties break on name, so
|
|
146
|
+
* the result is a total order and two callers with the same input agree.
|
|
147
|
+
*/
|
|
148
|
+
export function rankSkills(task, skills, opts = {}) {
|
|
149
|
+
const taskTerms = tokenize(task);
|
|
150
|
+
const rows = [];
|
|
151
|
+
for (const skill of skills) {
|
|
152
|
+
const score = scoreSkill(taskTerms, skill, skillTerms(skill, opts));
|
|
153
|
+
if (score > 0)
|
|
154
|
+
rows.push({ name: skill.name, score, personas: [...(skill.personas ?? [])] });
|
|
155
|
+
}
|
|
156
|
+
rows.sort((a, b) => (b.score - a.score) || (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));
|
|
157
|
+
return rows;
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=skillRanking.js.map
|
|
@@ -107,25 +107,54 @@ A Python pre-run gate enumerating tier-by-command rules would either be too coar
|
|
|
107
107
|
|
|
108
108
|
The CI guarantee is structural reachability — the linter would fail if a provider was declared in `agents/templates/.ai-video.xml.example` without a lifecycle tag (extension planned). It does not enforce the runtime obligation; the agent does.
|
|
109
109
|
|
|
110
|
-
## § 5 —
|
|
111
|
-
|
|
112
|
-
The
|
|
113
|
-
this contract lands
|
|
114
|
-
|
|
115
|
-
|
|
110
|
+
## § 5 — Current tier assignment (generated)
|
|
111
|
+
|
|
112
|
+
**The previous table here was scoped, not wrong.** It stated the tiers "on the
|
|
113
|
+
day this contract lands", and on that day all five shipped adapters really were
|
|
114
|
+
`experimental`. Seven adapters were promoted on 2026-06-10 and § 5b below
|
|
115
|
+
already deferred promotion to "the commit that records a trace", so the
|
|
116
|
+
snapshot became a stale *reading* of a correct sentence — which a reader still
|
|
117
|
+
trips over, because a table in a contract is read as the current state whatever
|
|
118
|
+
its preamble says. It is now generated, so it cannot drift again.
|
|
119
|
+
|
|
120
|
+
The evidence column is the reviewer-reachable one:
|
|
121
|
+
`agents/evidence/ai-video/trace-index.json` carries a five-field row per local
|
|
122
|
+
smoke trace (provider · trace_id · captured_at · model · sha256). The raw
|
|
123
|
+
traces stay local-only by the decision in `d7f5d5d3c`, reaffirmed by AI council
|
|
124
|
+
on 2026-08-23; the index is what makes a `stable` claim checkable from a clone
|
|
125
|
+
without publishing one request body. `lint_adapter_tier` fails the build when a
|
|
126
|
+
`stable` header has no row inside its 180-day window.
|
|
127
|
+
|
|
128
|
+
<!-- DO NOT EDIT BY HAND — generated by `npx tsx src/scripts/lint_adapter_tier.ts --table`.
|
|
129
|
+
Verified against the tree by `lint_adapter_tier --check-contract`. -->
|
|
130
|
+
<!-- BEGIN GENERATED: adapter-tier-table -->
|
|
131
|
+
| Adapter | Domain | Tier | Freshest reachable trace |
|
|
116
132
|
|---|---|---|---|
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `higgsfield` |
|
|
121
|
-
| `
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
`
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
133
|
+
| `comfyui` | ai-video | `experimental` | — (none in the index) |
|
|
134
|
+
| `fal` | ai-video | `stable` | `2026-06-10T14-59-22Z` (9 row(s)) |
|
|
135
|
+
| `gemini-veo` | ai-video | `stable` | `2026-06-10T20-13-26Z` (18 row(s)) |
|
|
136
|
+
| `higgsfield` | ai-video | `stable` | `2026-06-10T20-39-34Z` (6 row(s)) |
|
|
137
|
+
| `kling` | ai-video | `stable` | `2026-06-10T14-59-22Z` (3 row(s)) |
|
|
138
|
+
| `musetalk` | ai-video | `experimental` | — (none in the index) |
|
|
139
|
+
| `openai-images` | ai-video | `stable` | `2026-06-10T20-39-34Z` (4 row(s)) |
|
|
140
|
+
| `replicate` | ai-video | `stable` | `2026-06-10T14-59-22Z` (15 row(s)) |
|
|
141
|
+
| `sora` | ai-video | `stable` | `2026-06-10T20-39-34Z` (2 row(s)) |
|
|
142
|
+
| `syncso` | ai-video | `experimental` | — (none in the index) |
|
|
143
|
+
| `flux` | ai-image | `experimental` | — (none in the index) |
|
|
144
|
+
| `gemini-image` | ai-image | `experimental` | — (none in the index) |
|
|
145
|
+
| `ideogram` | ai-image | `experimental` | — (none in the index) |
|
|
146
|
+
| `recraft` | ai-image | `experimental` | — (none in the index) |
|
|
147
|
+
<!-- END GENERATED: adapter-tier-table -->
|
|
148
|
+
|
|
149
|
+
## § 5b — Promotion stays maintainer-authored
|
|
150
|
+
|
|
151
|
+
The promotion to `stable` happens per-adapter, on the commit that records the
|
|
152
|
+
first real-API smoke trace. This is conservative by construction: a `/video:*`
|
|
153
|
+
run against an `experimental` default makes the agent surface the tier and ask
|
|
154
|
+
before proceeding — the human is the policy decision point. `lint_adapter_tier`
|
|
155
|
+
checks that a claim resolves to dated evidence; it never promotes or demotes an
|
|
156
|
+
adapter, because a tier is a maintainer claim and silently rewriting one would
|
|
157
|
+
be the drift it exists to stop.
|
|
129
158
|
|
|
130
159
|
The `<default-image-provider>` and `<default-video-provider>`
|
|
131
160
|
entries in `agents/templates/.ai-video.xml.example` remain unchanged
|
|
@@ -242,8 +242,8 @@ dispatch runs, not WHETHER the layer exists, so they keep their own C rows.
|
|
|
242
242
|
|---|---|
|
|
243
243
|
| A — preference | 26 |
|
|
244
244
|
| B — consent | 3 |
|
|
245
|
-
| C — guarded |
|
|
246
|
-
| **Total** | **
|
|
245
|
+
| C — guarded | 109 |
|
|
246
|
+
| **Total** | **138** |
|
|
247
247
|
|
|
248
248
|
The total was 140 until 2026-08-12, when five of the six keys no code path read were
|
|
249
249
|
deleted, minus the one held open (§ The six unread keys, below): one A
|
|
@@ -257,6 +257,34 @@ It rose to 136 on 2026-08-20 when `road-to-gate-autonomy`'s
|
|
|
257
257
|
first keys added to this contract since the deletions above, and both are C on
|
|
258
258
|
test 1 (money).
|
|
259
259
|
|
|
260
|
+
It rose to 138 on 2026-08-24 when `road-to-suggestion-block-capture` Phase 2
|
|
261
|
+
added `hooks.suggestion_capture.enabled`. C on test 1 — it configures code that
|
|
262
|
+
runs at every turn end and every prompt — and the third `hooks.*` key here.
|
|
263
|
+
|
|
264
|
+
Its disposition is **`consent`**, and the first draft of this row said
|
|
265
|
+
`derivable`, which was wrong in the way the disposition axis exists to catch. The
|
|
266
|
+
`derivable` argument was that the sink's own line count answers whether the soak
|
|
267
|
+
window is running — true, and it answers the wrong question. What the key
|
|
268
|
+
authorises is *the package observing this operator's turns and writing a record
|
|
269
|
+
of them*, and no predicate computes whether someone consents to that. The
|
|
270
|
+
`derivable-surface` ratchet caught it immediately: it is shrink-only, so a new
|
|
271
|
+
`derivable` key reds by construction, and being unable to add one is the
|
|
272
|
+
mechanism working rather than an obstacle.
|
|
273
|
+
|
|
274
|
+
The distinction against its `design_pass` neighbour still holds and is the reason
|
|
275
|
+
this is not `policy` either: that concern can **block**, so arming it is a risk
|
|
276
|
+
preference. This one only observes and exits 0 on every path — the question is
|
|
277
|
+
not risk, it is permission.
|
|
278
|
+
|
|
279
|
+
It rose to 137 on 2026-08-23 when `road-to-frontend-power` E1.1–E1.3 added
|
|
280
|
+
`hooks.design_pass.enabled`. C on test 1 (it configures code that runs on every
|
|
281
|
+
tool call and at every turn end), and the only hook key in this contract whose
|
|
282
|
+
concern can **block** rather than warn — which is why the class matters here
|
|
283
|
+
more than for its two `hooks.*` neighbours. The disposition is `policy`, not
|
|
284
|
+
`derivable`, and the block is why: whether an operator accepts a gate that can
|
|
285
|
+
refuse a turn is a risk preference, and no predicate computes it. Its two
|
|
286
|
+
`hooks.*` neighbours are `derivable` because they only ever warn.
|
|
287
|
+
|
|
260
288
|
The total is every leaf in the template, where *leaf* means anything that is not
|
|
261
289
|
a **non-empty** map. An empty map (like the former `subagents.host_capabilities: {}`) is a real
|
|
262
290
|
configurable value with a real default, so such keys count as leaves here — one row more than
|
|
@@ -305,9 +333,9 @@ the template, which is the drift this contract exists to prevent.
|
|
|
305
333
|
|---|---|
|
|
306
334
|
| derivable | 83 |
|
|
307
335
|
| un-inferrable | 9 |
|
|
308
|
-
| consent |
|
|
309
|
-
| policy |
|
|
310
|
-
| **Total** | **
|
|
336
|
+
| consent | 40 |
|
|
337
|
+
| policy | 6 |
|
|
338
|
+
| **Total** | **138** |
|
|
311
339
|
|
|
312
340
|
First measured 2026-08-12 at 140 leaves (derivable 88 · consent 38 ·
|
|
313
341
|
un-inferrable 9 · policy 5), from the table below rather than predicted — the
|
|
@@ -523,7 +551,9 @@ Rows follow template order, so a diff against the template reads straight down.
|
|
|
523
551
|
| `hooks.rtk_wrap.enabled` | C | `false` | configures code that runs on every tool call | derivable — the live PATH and identity probe the hook already runs; silent when rtk is absent |
|
|
524
552
|
| `hooks.design_slop.enabled` | C | `false` | configures code that runs on every tool call | derivable — the rule-registry match plus the hook's own per-signature silence cap |
|
|
525
553
|
| `hooks.ui_route_nudge.enabled` | C | `false` | configures code that runs on every tool call | derivable — the UI-surface predicate plus the hook's own two-nudges-per-session cap |
|
|
554
|
+
| `hooks.design_pass.enabled` | C | `false` | C-test 1 — it configures code that runs on every tool call and at every turn end, and unlike its two `hooks.*` neighbours its stop pass can BLOCK rather than warn | policy — whether an operator accepts a gate that can refuse a turn is a risk preference, not a fact the tree can compute. The two neighbours are `derivable` because they only ever warn; the block is the discriminator. `road-to-frontend-power` transfers the default flip to the owner for the same reason |
|
|
526
555
|
| `hooks.code_graph.enabled` | C | `false` | configures code that runs on every tool call | derivable — the index-detection probe the nudge already runs; no index means silence |
|
|
556
|
+
| `hooks.suggestion_capture.enabled` | C | `false` | configures code that runs at every turn end and every prompt | consent |
|
|
527
557
|
| `decision_engine.surface_traces` | C | `false` | the decision engine’s own black box; the agent must not be able to close it | derivable — the engine's own active-gate state; there is nothing to surface when no gate fired |
|
|
528
558
|
| `decision_engine.min_confidence` | C | `"off"` | the confidence gate | derivable — the confidence band the scoring engine already computes at the plan phase |
|
|
529
559
|
| `decision_engine.block_on_risk` | C | `"off"` | the risk-class gate | derivable — the risk class the engine already computes at the implement phase; the Hard Floor covers the irreversible end unconditionally |
|
|
@@ -114,3 +114,52 @@ reply. The bug is not the sleep or the grep: **absence of the word `pending`
|
|
|
114
114
|
was treated as evidence of completion**, and an error is neither settled nor
|
|
115
115
|
pending. The exit condition is the part that is easy to get wrong, so it lives
|
|
116
116
|
in one place rather than in every agent's head.
|
|
117
|
+
|
|
118
|
+
## Waiting is one waiter — why the loop test misses it
|
|
119
|
+
|
|
120
|
+
Migrated from [`context-hygiene`](../../../src/rules/context-hygiene.md)
|
|
121
|
+
§ *Waiting is one waiter, never a fleet* under the P4 pattern
|
|
122
|
+
(`road-to-standing-payload-diet` step 1.3). The rule keeps the Iron Law, the
|
|
123
|
+
one-waiter instruction and the enforcement verdict; the argument for them is
|
|
124
|
+
here.
|
|
125
|
+
|
|
126
|
+
The loop test in that rule fails on waiting in **both** of its clauses:
|
|
127
|
+
|
|
128
|
+
- **"Same parameters" fails.** A `sleep 240` followed by `sleep 420` followed by
|
|
129
|
+
`sleep 595` are three different calls by any parameter comparison, so nothing
|
|
130
|
+
reads them as repetition.
|
|
131
|
+
- **"Repetition without new information" fails too**, and this is the subtler
|
|
132
|
+
half: the poll genuinely returns a different value each round — 31 green, then
|
|
133
|
+
34, then 36 — which *feels* like progress. It is not information unless a
|
|
134
|
+
different digit would make you act differently. It would not: the only actions
|
|
135
|
+
available were wait, or stop and report, and 34 licensed neither more than 31
|
|
136
|
+
did. **The discriminator is the decision, not the digits.**
|
|
137
|
+
|
|
138
|
+
So state it separately: pick **one** waiter for the condition and let it finish.
|
|
139
|
+
Where the harness re-invokes on completion, waiting costs nothing and polling
|
|
140
|
+
costs a turn per expiry — and every stacked waiter is a turn that arrives *after*
|
|
141
|
+
the answer already did. Where it does not, one `until <condition>` loop is still
|
|
142
|
+
one call rather than N.
|
|
143
|
+
|
|
144
|
+
**Measured once, at n=1, and worth naming for its shape rather than its
|
|
145
|
+
frequency** (2026-08-12): a CI wait started roughly 35 background commands —
|
|
146
|
+
a fresh timer *and* a fresh condition-watcher per round, none cancelled when the
|
|
147
|
+
next pair started. CI settled with about fifteen still live; each then expired
|
|
148
|
+
and produced an empty turn. Nothing was corrupted, which is exactly why it ran
|
|
149
|
+
so long: every individual step looked reasonable.
|
|
150
|
+
|
|
151
|
+
**Enforcement: none, and the reason is structural.** The `context-hygiene` hook
|
|
152
|
+
counts tool calls; a waiter is indistinguishable from any other call at that
|
|
153
|
+
layer, and nothing in the envelope says two live waiters are watching one
|
|
154
|
+
condition. This is model-carried on every host.
|
|
155
|
+
|
|
156
|
+
## The declared-protocol cap — why 8, and when it changes
|
|
157
|
+
|
|
158
|
+
Migrated from [`context-hygiene`](../../../src/rules/context-hygiene.md)
|
|
159
|
+
§ *Declared read protocol* under the same pattern. The rule keeps the cap and the
|
|
160
|
+
three-field declaration contract; the honesty note about the number is here.
|
|
161
|
+
|
|
162
|
+
> **The 8 is a guess, and specifically a LOWER BOUND.** One observed run — the coherence audit that motivated this clause — needed 8+ read turns and was legibly the protocol working, not a loop. So 8 is "the number that was enough once", not a measured optimum: n=1 says almost nothing about where the tail of the distribution sits, and nobody knows how many sessions silently hit the old 5 and should have continued. Calling this a derivation would be false advertising, which is the same failure class as the "17 rules carry absolutes" figure this rule's own roadmap refuted.
|
|
163
|
+
> **Revisit-if — whichever comes first:** (a) **≥ 10 declared-protocol sessions** have been observed, at which point set the cap from their p95 and delete this note; or (b) **90 days** elapse with fewer than 10, which is itself the answer — declared protocols are rare, the cap is not load-bearing, and it drops back to the undeclared 5. A condition like "once a distribution exists" was rejected as unfalsifiable: it is gradual, never feels urgent, and absence of complaints is indistinguishable from absence of measurement. <!-- enforcement-count-ok: not an enforcement denominator — the 10 is a revisit threshold for observed declared-protocol read sessions and the 90 a calendar deadline; neither is a count of rules, obligations, or covered platforms, so there is no resolver output to cite instead -->
|
|
164
|
+
|
|
165
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Downstream-Changes Mechanics — closed-set evolution
|
|
2
|
+
|
|
3
|
+
> The procedure behind [`downstream-changes`](../../../src/rules/downstream-changes.md)
|
|
4
|
+
> for one change class its table does not reach: a **closed set** whose member
|
|
5
|
+
> list changed. Cited by `skill:code-review` (the propagation dimension) and
|
|
6
|
+
> `skill:code-refactoring` (the reference sweep).
|
|
7
|
+
>
|
|
8
|
+
> It lives here rather than in the rule for a measured reason. Project-scope
|
|
9
|
+
> rules are a gated bucket of the per-spawn standing payload, and that payload
|
|
10
|
+
> currently measures **at** its grace ceiling
|
|
11
|
+
> (`src/config/preamble-payload-budget.json`), so the rule cannot grow by a
|
|
12
|
+
> single line without reddening `check_preamble_payload_budget`. Guidelines are
|
|
13
|
+
> an excluded bucket — read on demand, not re-sent per spawn. The obligation is
|
|
14
|
+
> therefore carried by the two skills that fire at the moment it matters, and
|
|
15
|
+
> the rule keeps its current size until a reduction lands.
|
|
16
|
+
|
|
17
|
+
## The Iron Law
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
CHANGING A MEMBER OF A CLOSED SET IS NEVER DONE WHEN THE TYPE COMPILES.
|
|
21
|
+
EVERY CONSUMER IS CLASSIFIED: EXHAUSTIVE, DELIBERATE FALLBACK, OR MISSING CASE.
|
|
22
|
+
A `default` THAT SWALLOWS THE NEW MEMBER IS A MISSING CASE WEARING A BRANCH.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Why the ordinary sweep misses it
|
|
26
|
+
|
|
27
|
+
`downstream-changes` enumerates callers, tests, imports, type definitions,
|
|
28
|
+
config bindings, routes and docs — all of which are found by searching for the
|
|
29
|
+
**identifier**. A closed set breaks that assumption: the member list changes,
|
|
30
|
+
the type still compiles, and a serializer, a badge variant, an OpenAPI schema or
|
|
31
|
+
a transition table silently keeps the old set. None of them names the type, so
|
|
32
|
+
no identifier search reaches them. This is the shotgun-surgery shape — one
|
|
33
|
+
conceptual change scattered across many small sites, where forgetting one is the
|
|
34
|
+
default outcome rather than the unlucky one.
|
|
35
|
+
|
|
36
|
+
## What counts as a closed set
|
|
37
|
+
|
|
38
|
+
PHP enums · TypeScript enums · discriminated unions · literal-union state types ·
|
|
39
|
+
Rust enums · sealed types · Python `enum` classes · DB enum and check
|
|
40
|
+
constraints · OpenAPI / JSON-Schema `enum` · state machines · role and permission
|
|
41
|
+
sets · finite component variants.
|
|
42
|
+
|
|
43
|
+
## Discover by shape, not by identifier
|
|
44
|
+
|
|
45
|
+
- the member name and its **backing value** (the wire value often differs);
|
|
46
|
+
- `match` / `switch` / if-chains over the type;
|
|
47
|
+
- `Record<Member, …>`, lookup tables and maps keyed by it;
|
|
48
|
+
- `cases()` / `values()` iteration;
|
|
49
|
+
- validators and serializers;
|
|
50
|
+
- DB constraints and migrations;
|
|
51
|
+
- API schemas;
|
|
52
|
+
- UI option sources and variant maps;
|
|
53
|
+
- translation keys;
|
|
54
|
+
- tests, factories and fixtures.
|
|
55
|
+
|
|
56
|
+
## Classify every hit — three outcomes, one defect
|
|
57
|
+
|
|
58
|
+
| Class | What it means | Action |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| Exhaustive | The compiler or the data structure forces completeness (a fully-typed `Record<Member, …>`, a `match` with no default) | nothing — this is the outcome to prefer |
|
|
61
|
+
| Deliberate fallback | The fallback is part of the contract: a forward-compatible external value, a protocol unknown, a defensive boundary parse | record why, leave it |
|
|
62
|
+
| Missing case | The new member reaches code written for the old set | fix it |
|
|
63
|
+
|
|
64
|
+
**There is deliberately no blanket rule that a `default` branch is wrong.** Such
|
|
65
|
+
a rule would be refuted by every protocol parser and boundary parse in the tree.
|
|
66
|
+
What is true is sharper and easier to miss: where an exhaustiveness check exists,
|
|
67
|
+
**a `default` clause suppresses its report entirely**, so adding one to quiet the
|
|
68
|
+
check removes exactly the signal it existed to give.
|
|
69
|
+
<!-- harvest:exhaustiveness-default-clause-masks-the-check -->
|
|
70
|
+
|
|
71
|
+
Prefer the language-native guarantee over a comment. In TypeScript a
|
|
72
|
+
`Record<Member, T>` where every member needs a value fails to compile on a new
|
|
73
|
+
member, while a partially-typed string-keyed map does not. In PHP an exhaustive
|
|
74
|
+
`match` without a masking `default` throws on an unhandled case.
|
|
75
|
+
|
|
76
|
+
## Prove the sweep, do not assert it
|
|
77
|
+
|
|
78
|
+
Add a **synthetic member** to the set, confirm the checks you are relying on go
|
|
79
|
+
red, then update the consumers and confirm they go green. A sweep never seen red
|
|
80
|
+
has unknown coverage — the same sensitivity argument
|
|
81
|
+
[`downstream-changes`](../../../src/rules/downstream-changes.md) § Verification
|
|
82
|
+
makes for tests, applied to the discovery step.
|
|
83
|
+
|
|
84
|
+
## See also
|
|
85
|
+
|
|
86
|
+
- [`downstream-changes`](../../../src/rules/downstream-changes.md) — the rule this
|
|
87
|
+
extends; its § Defect-pattern search is the sibling-occurrence half.
|
|
88
|
+
- [`redundancy-taxonomy`](../redundancy-taxonomy.md) — the naming half: one
|
|
89
|
+
concept, several terms.
|
|
90
|
+
- [`prefer-enums-over-literals`](../../../src/rules/prefer-enums-over-literals.md)
|
|
91
|
+
— how a closed set comes to exist in the first place.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Evaluator independence — enforcement reach and its correction history
|
|
2
|
+
|
|
3
|
+
> What the `evidence-independence` guard actually does per branch, per host; the
|
|
4
|
+
> limits that were measured rather than assumed; and the two corrections this
|
|
5
|
+
> material has taken. The rule keeps the verdict — this page carries the argument.
|
|
6
|
+
|
|
7
|
+
_Origin: migrated from [`evaluator-independence`](../../../src/rules/evaluator-independence.md)
|
|
8
|
+
§ *Enforcement — honest scope* under the P4 pattern
|
|
9
|
+
(`road-to-standing-payload-diet` step 1.3). Nothing here is new; the rule was
|
|
10
|
+
re-sending all of it on every session and every spawn, and only the verdict has
|
|
11
|
+
to be._
|
|
12
|
+
|
|
13
|
+
## The two branches
|
|
14
|
+
|
|
15
|
+
[`evidence_independence.ts`](../../../src/scripts/hooks/evidence_independence.ts) is a
|
|
16
|
+
`pre_tool_use` concern, and its two branches do **different** things —
|
|
17
|
+
**corrected 2026-08-23**, because this paragraph claimed both of them block:
|
|
18
|
+
|
|
19
|
+
- **Item 1 BLOCKS.** A dispatch whose prompt carries a pre-loaded verdict returns
|
|
20
|
+
`EXIT_BLOCK` (`:253`). Mechanically enforced, on the one host that honours a deny.
|
|
21
|
+
- **Item 4 WARNS and does not block.** A second self-scoped evaluation dispatch in the
|
|
22
|
+
same turn returns **`EXIT_ALLOW`** with `decision: "warn"` (`:301-317`), and so does
|
|
23
|
+
the first (`:319-324`). That is deliberate, and the code says why at `:296-300`: the
|
|
24
|
+
internal ladder's `2 = warn` is read as a hard **deny** by this host's native
|
|
25
|
+
PreToolUse contract, *"which is the defect that made an advisory guard a hard deny
|
|
26
|
+
once already"*. Exiting 2 here would have kept a legitimate fan-out blocked while
|
|
27
|
+
claiming to warn.
|
|
28
|
+
|
|
29
|
+
So the rule's own turn-budget clause is **advisory**, not enforced. It reads the prompt
|
|
30
|
+
the agent is about to send, so item 1 is mechanically enforced and item 4 is surfaced.
|
|
31
|
+
|
|
32
|
+
The manifest's `severity: blocking` for `evidence-independence`
|
|
33
|
+
(`src/scripts/hook_manifest.yaml:380-385`) is a **third** reading and it is true of the
|
|
34
|
+
item-1 path only: a severity declares the concern, never every branch inside it. A
|
|
35
|
+
reader taking it as "both branches deny" reaches the claim this paragraph used to
|
|
36
|
+
make.
|
|
37
|
+
|
|
38
|
+
Three limits, stated because they were measured. The pre-loaded-verdict list is
|
|
39
|
+
a **phrase list**, so a paraphrase evades it — it catches recurrences of known
|
|
40
|
+
steering wording, not steering as such. The turn boundary is the
|
|
41
|
+
authorization ledger's `detected_at` stamp, because the envelope carries no turn
|
|
42
|
+
id; with no ledger yet, the counter falls back to session scope. And the guard
|
|
43
|
+
does not deny everywhere it exists: `pre_tool_use` is **bound** on three hosts —
|
|
44
|
+
augment, claude, cowork — and only `claude` honours the deny. Everywhere else,
|
|
45
|
+
augment and cowork included, items 1 and 4 join 2 and 3 as model-carried.
|
|
46
|
+
`agent-config hooks:status` answers it for the host you are on right now.
|
|
47
|
+
|
|
48
|
+
**Corrected 2026-08-17 — this paragraph was wrong on both sides of the line it
|
|
49
|
+
drew.** It said `pre_tool_use` "exists on three hosts" and that the guard has
|
|
50
|
+
"nowhere to bind" on the other five. Neither half survived a re-read of the
|
|
51
|
+
tree. **Downward:** the manifest's own `native_event_aliases` table already maps
|
|
52
|
+
`preToolUse` (cursor), `PreToolUse` (cline) and `BeforeTool` (gemini) onto
|
|
53
|
+
`pre_tool_use`, so there the guard is **unbound, not unbindable**; only windsurf
|
|
54
|
+
and copilot carry no pre-tool surface at all. **Upward, and worse:**
|
|
55
|
+
`host_semantics.ts` certifies **claude alone**, and the augment and cowork
|
|
56
|
+
trampolines discard dispatcher output and `exit 0` unconditionally — so on two
|
|
57
|
+
of the three "enforcing" hosts this guard runs and is then ignored. Nor may the
|
|
58
|
+
inverse be asserted downward: nothing records whether an unbound host's
|
|
59
|
+
pre-tool event can *deny*, and `severity: blocking` is a property of the concern
|
|
60
|
+
rather than of the host. The four states are tabulated once in
|
|
61
|
+
[`hook-architecture-v1 § Which hosts carry pre_tool_use`](../../contracts/hook-architecture-v1.md).
|
|
62
|
+
|
|
63
|
+
Stated at this length because this rule exists over a case where a process that
|
|
64
|
+
*looked* followed produced fabricated evidence. An unbacked reason for a real
|
|
65
|
+
gap and an unmeasured claim of enforcement are the same failure in a smaller
|
|
66
|
+
font, and this paragraph had shipped one of each. Note also what the frequency
|
|
67
|
+
join actually reports: `check_enforcement_coverage.ts` skips `fallback_only`
|
|
68
|
+
platforms, so its gap set is **four** — cursor, cline, windsurf, gemini — never
|
|
69
|
+
copilot, which is excluded by declaration rather than measured as a gap.
|
|
70
|
+
|
|
71
|
+
**Item 2 — an honestly chosen scope — is not enforced by anything.** A narrowed scope
|
|
72
|
+
is not decidable from the prompt alone.
|
|
73
|
+
|
|
74
|
+
**Item 3 — recording the prompt with the verdict — IS enforced**, and this rule said
|
|
75
|
+
otherwise until 2026-08-23:
|
|
76
|
+
[`check_review_prompt_binding.ts`](../../../src/scripts/check_review_prompt_binding.ts)
|
|
77
|
+
binds a verdict to the prompt it was produced from. Its own header states the limit that
|
|
78
|
+
matters, so citing it does not oversell it: **omission beats substitution** — simply not
|
|
79
|
+
committing `<slug>.review-input/prompt.md` drops the round out of the checkable set with
|
|
80
|
+
**no finding and no signal**, because an artefact without a package is deliberately out
|
|
81
|
+
of scope. Measured on the corpus it shipped against, **11 of 19** artefacts already
|
|
82
|
+
carry a `prompt_hash` with no package, so the bypassed state is the historical norm and
|
|
83
|
+
is indistinguishable from it.
|
|
84
|
+
They are stated here as obligations and are model-carried. Saying so is the
|
|
85
|
+
point: this rule exists because a process that *looked* followed produced
|
|
86
|
+
fabricated evidence, and claiming coverage it does not have would repeat that.
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## See also
|
|
90
|
+
|
|
91
|
+
- [`evaluator-independence`](../../../src/rules/evaluator-independence.md) — the rule this page carries the argument for.
|
|
92
|
+
- [`hook-architecture-v1 § Which hosts carry pre_tool_use`](../../contracts/hook-architecture-v1.md) — the four host states, tabulated once.
|