@event4u/agent-config 14.9.0 → 14.11.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 +384 -0
- 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/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/alerting-doctrine/evals/triggers.json +17 -0
- package/dist/agent-src/skills/async-python-patterns/SKILL.md +1 -1
- 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 +1 -1
- package/dist/agent-src/skills/code-review/SKILL.md +11 -0
- package/dist/agent-src/skills/command-routing/SKILL.md +6 -0
- package/dist/agent-src/skills/condense-memory/SKILL.md +4 -1
- package/dist/agent-src/skills/context-authoring/SKILL.md +1 -1
- package/dist/agent-src/skills/conventional-commits-writing/SKILL.md +4 -1
- 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 +80 -2
- 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/discovery-interview/SKILL.md +1 -1
- package/dist/agent-src/skills/doc-coauthoring/SKILL.md +1 -1
- package/dist/agent-src/skills/docx-authoring/SKILL.md +1 -1
- package/dist/agent-src/skills/editorial-calendar/SKILL.md +1 -1
- package/dist/agent-src/skills/estimate-ticket/SKILL.md +3 -0
- package/dist/agent-src/skills/existing-ui-audit/SKILL.md +20 -3
- package/dist/agent-src/skills/fe-design/SKILL.md +74 -41
- package/dist/agent-src/skills/fe-design/evals/triggers.json +65 -53
- 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/github-ci/SKILL.md +1 -1
- 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/evals/triggers.json +17 -0
- package/dist/agent-src/skills/js-library-packaging/scripts/check_package_surface.ts +270 -0
- package/dist/agent-src/skills/judge-artifact-completeness/SKILL.md +1 -1
- package/dist/agent-src/skills/judge-injection-defense/SKILL.md +1 -1
- package/dist/agent-src/skills/laravel-migration/SKILL.md +3 -0
- package/dist/agent-src/skills/laravel-validation/SKILL.md +1 -1
- package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +3 -0
- package/dist/agent-src/skills/legal-intake-triage/SKILL.md +1 -1
- package/dist/agent-src/skills/legal-practice-profile/SKILL.md +1 -1
- 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/messaging-architecture/SKILL.md +1 -1
- package/dist/agent-src/skills/migration-architect/SKILL.md +1 -1
- package/dist/agent-src/skills/module-detect-on-the-fly/SKILL.md +1 -1
- package/dist/agent-src/skills/module-management/SKILL.md +1 -1
- package/dist/agent-src/skills/monorepo-workspace/SKILL.md +149 -0
- package/dist/agent-src/skills/monorepo-workspace/evals/triggers.json +17 -0
- package/dist/agent-src/skills/motion-choreographer/SKILL.md +7 -1
- package/dist/agent-src/skills/multi-tenancy/SKILL.md +4 -0
- package/dist/agent-src/skills/onboarding-program/SKILL.md +1 -1
- package/dist/agent-src/skills/operational-readiness/SKILL.md +184 -0
- package/dist/agent-src/skills/operational-readiness/evals/triggers.json +17 -0
- package/dist/agent-src/skills/override-management/SKILL.md +3 -0
- package/dist/agent-src/skills/perf-feedback-craft/SKILL.md +1 -1
- 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/prompt-engineering-image/SKILL.md +3 -0
- package/dist/agent-src/skills/prompt-optimizer/SKILL.md +1 -1
- package/dist/agent-src/skills/quality-tools/SKILL.md +5 -0
- package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +52 -21
- 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 +3 -3
- 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/SKILL.md +1 -1
- package/dist/agent-src/skills/scene-expander/scene-blueprint.schema.yaml +26 -0
- package/dist/agent-src/skills/secrets-management/SKILL.md +5 -1
- package/dist/agent-src/skills/server-hardening/SKILL.md +159 -0
- package/dist/agent-src/skills/server-hardening/evals/triggers.json +17 -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/spreadsheet-authoring/SKILL.md +3 -0
- package/dist/agent-src/skills/storybook-workshop/SKILL.md +194 -0
- package/dist/agent-src/skills/storybook-workshop/evals/triggers.json +17 -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 +9 -1
- package/dist/agent-src/skills/upstream-contribute/SKILL.md +3 -0
- package/dist/agent-src/skills/using-git-worktrees/SKILL.md +1 -1
- 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/skills/workspace-link/evals/triggers.json +17 -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/uiAudit.js.map +1 -0
- package/dist/cli/commands/uiRender.js +206 -0
- package/dist/cli/commands/uiRender.js.map +1 -0
- package/dist/cli/main.js +22 -1
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/mcp/content.js +64 -1
- package/dist/cli/mcp/content.js.map +1 -1
- package/dist/cli/mcp/dispatch.js +175 -10
- package/dist/cli/mcp/dispatch.js.map +1 -1
- package/dist/cli/registry.js +3 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli-delegate/{chunk-H4VIVD4C.js → chunk-236PNQZK.js} +413 -391
- 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-PLSG6UL5.js → chunk-K4FFODTS.js} +341 -204
- package/dist/cli-delegate/{chunk-YM4GZDJG.js → chunk-L43NCYPB.js} +5 -0
- 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 +380 -145
- 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 +2337 -1436
- package/dist/install/install.mjs +795 -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/lean_projection_mode.js.map +1 -0
- package/dist/scripts/_lib/scoped_projection.js +84 -0
- package/dist/scripts/_lib/scoped_projection.js.map +1 -1
- package/dist/scripts/_lib/ui_surface.js +89 -0
- package/dist/scripts/_lib/ui_surface.js.map +1 -0
- package/dist/scripts/condense.js +6 -10
- package/dist/scripts/condense.js.map +1 -1
- package/dist/scripts/project_thin_rules.js +40 -2
- package/dist/scripts/project_thin_rules.js.map +1 -1
- package/dist/server/schemas/settings.js +3 -0
- package/dist/server/schemas/settings.js.map +1 -1
- package/dist/shared/skillRanking.js +159 -0
- package/dist/shared/skillRanking.js.map +1 -0
- package/docs/contracts/provider-lifecycle.md +47 -18
- package/docs/contracts/settings-classes.md +14 -4
- package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +49 -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/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/llms.txt +50 -39
- package/package.json +1 -1
- 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 +28 -0
- package/src/config/assurance-capability-registry.json +223 -0
- package/src/config/assurance-threshold-budget.json +65 -0
- package/src/config/ci-local-parity.yml +14 -0
- package/src/config/discovery/unassigned-artefacts.yml +2 -0
- package/src/config/dispatch-economy-metrics.json +4 -2
- package/src/config/evaluator-budgets.json +14 -14
- package/src/config/gate-coverage.yml +227 -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 +4 -2
- package/src/config/preamble-payload-budget.json +71 -67
- package/src/config/quorum-attendance-budget.json +12 -4
- 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/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/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/transcript_reads.ts +207 -0
- package/src/scripts/_lib/ui_authority.test.ts +251 -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/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/seating.ts +211 -0
- 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_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_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_pack_passport_reconciliation.ts +274 -0
- 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_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/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/design_slop_rules.test.ts +7 -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/generate_pack_manifests.ts +78 -0
- package/src/scripts/grade_target_readiness.ts +478 -0
- package/src/scripts/hook_manifest.json +1 -1
- package/src/scripts/hook_manifest.yaml +97 -16
- package/src/scripts/hooks/concern_registry.ts +4 -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/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 +2 -1
- 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_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/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/roadmap_context.ts +778 -0
- package/src/scripts/schemas/fidelity-measurement-sheet.schema.json +169 -0
- package/src/scripts/schemas/pack.schema.json +62 -4
- package/src/scripts/schemas/rule.schema.json +24 -2
- package/src/scripts/schemas/skill.schema.json +41 -2
- package/src/scripts/schemas/ui-authority.schema.json +114 -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/tighten_skill_descriptions.ts +264 -0
- 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 +5 -0
- package/src/shared/skillRanking.ts +183 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Do the per-pack passports add up to the census the tree already runs?
|
|
4
|
+
*
|
|
5
|
+
* A per-pack number published beside a tree-wide number it contradicts is worse
|
|
6
|
+
* than no per-pack number: both get quoted, and nobody can say which is wrong.
|
|
7
|
+
* This is the check that says so out loud.
|
|
8
|
+
*
|
|
9
|
+
* THE ±10 % BAND THIS WAS SPECIFIED WITH RESTED ON A FALSE PREMISE, and the
|
|
10
|
+
* measurement is what refuted it. The band assumed packs roughly PARTITION the
|
|
11
|
+
* tree, so per-pack sums should approach the tree-wide census. Measured on
|
|
12
|
+
* 2026-08-22: across all 17 packs, `dependencies` claims **4 skills and 0
|
|
13
|
+
* rules**, against **291 skills and 118 rules** in the projection. Packs claim
|
|
14
|
+
* ~1 % of the artefacts the census counts.
|
|
15
|
+
*
|
|
16
|
+
* So the two numbers are not a reconciliation pair at all:
|
|
17
|
+
*
|
|
18
|
+
* census — the PROJECTED tree (`dist/agent-src/`), everything that ships
|
|
19
|
+
* passport — what a pack CLAIMS, which is a small, deliberate subset
|
|
20
|
+
*
|
|
21
|
+
* A gate failing on an 84 % gap would be failing on a property of the tree, not
|
|
22
|
+
* on a defect — and a gate that is red by construction gets disabled rather
|
|
23
|
+
* than fixed. So this REPORTS coverage as a first-class number and exits 0.
|
|
24
|
+
* That is exactly what the step behind it asked for: a passport that does not
|
|
25
|
+
* reconcile "must say what, in-band, rather than being published alongside a
|
|
26
|
+
* number it contradicts."
|
|
27
|
+
*
|
|
28
|
+
* What would make it a gate: pack coverage approaching the tree. Then the band
|
|
29
|
+
* becomes meaningful and the exit code can follow it. Until then the useful
|
|
30
|
+
* output is the RANKING plus the coverage figure.
|
|
31
|
+
*
|
|
32
|
+
* Both sides are `chars/4` — the basis `preamble-payload-budget.json` declares
|
|
33
|
+
* for itself. Mixing an exact tokenizer into one side would make the gap
|
|
34
|
+
* between two METHODS read as a discrepancy in the packs.
|
|
35
|
+
*
|
|
36
|
+
* Also emits the RANKING, because the useful output is not the numbers but
|
|
37
|
+
* which packs carry the weight: a per-pack table sorted by cost turns "the
|
|
38
|
+
* estate grew" into "this pack grew".
|
|
39
|
+
*
|
|
40
|
+
* Exit: 0 always (it is a REPORT, not a gate), 2 on a dead scan scope. See the
|
|
41
|
+
* band note above for why the exit code does not follow the gap.
|
|
42
|
+
*/
|
|
43
|
+
import * as fs from 'node:fs';
|
|
44
|
+
import * as path from 'node:path';
|
|
45
|
+
import { fileURLToPath } from 'node:url';
|
|
46
|
+
|
|
47
|
+
import { assertScanned, DeadScopeError } from './_lib/scan_scope.js';
|
|
48
|
+
import { runSelfTest } from './_lib/gate_self_test.js';
|
|
49
|
+
import { censusRuleDir, censusSkillsCatalog } from './preamble_byte_census.js';
|
|
50
|
+
|
|
51
|
+
const _HERE = fileURLToPath(import.meta.url);
|
|
52
|
+
export const REPO_ROOT = path.resolve(path.dirname(_HERE), '..', '..');
|
|
53
|
+
export const PACKS_DIR = path.join(REPO_ROOT, 'src/packs');
|
|
54
|
+
export const RANKING = path.join(REPO_ROOT, 'agents/evidence/reports/pack-token-ranking.md');
|
|
55
|
+
|
|
56
|
+
/** ±10 %. See the module docstring for why a band exists at all. */
|
|
57
|
+
export const TOLERANCE = 0.1;
|
|
58
|
+
|
|
59
|
+
export interface Passport {
|
|
60
|
+
pack: string;
|
|
61
|
+
rules_tokens: number;
|
|
62
|
+
catalog_tokens: number;
|
|
63
|
+
commands_tokens: number;
|
|
64
|
+
other_tokens: number;
|
|
65
|
+
total_tokens: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** Read `token_passport:` out of a generated pack.yaml — no YAML dependency. */
|
|
69
|
+
export function readPassport(pack: string, text: string): Passport | null {
|
|
70
|
+
const start = text.indexOf('token_passport:');
|
|
71
|
+
if (start < 0) return null;
|
|
72
|
+
const num = (key: string): number => {
|
|
73
|
+
const m = new RegExp(`^\\s+${key}:\\s*(\\d+)\\s*$`, 'm').exec(text.slice(start));
|
|
74
|
+
return m === null ? 0 : Number(m[1]);
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
pack,
|
|
78
|
+
rules_tokens: num('rules_tokens'),
|
|
79
|
+
catalog_tokens: num('catalog_tokens'),
|
|
80
|
+
commands_tokens: num('commands_tokens'),
|
|
81
|
+
other_tokens: num('other_tokens'),
|
|
82
|
+
total_tokens: num('total_tokens'),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function collectPassports(dir: string = PACKS_DIR): Passport[] {
|
|
87
|
+
if (!fs.existsSync(dir)) return [];
|
|
88
|
+
const out: Passport[] = [];
|
|
89
|
+
for (const e of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
90
|
+
if (!e.isDirectory()) continue;
|
|
91
|
+
const f = path.join(dir, e.name, 'pack.yaml');
|
|
92
|
+
if (!fs.existsSync(f)) continue;
|
|
93
|
+
const p = readPassport(e.name, fs.readFileSync(f, 'utf-8'));
|
|
94
|
+
if (p !== null) out.push(p);
|
|
95
|
+
}
|
|
96
|
+
return out;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface Reconciliation {
|
|
100
|
+
bucket: string;
|
|
101
|
+
packSum: number;
|
|
102
|
+
censusTotal: number;
|
|
103
|
+
gapPct: number;
|
|
104
|
+
inBand: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function reconcile(packSum: number, censusTotal: number, bucket: string): Reconciliation {
|
|
108
|
+
// Denominator is the CENSUS, which is the side with the independent
|
|
109
|
+
// measurement. Dividing by the pack sum would let a passport that measured
|
|
110
|
+
// almost nothing report a small gap.
|
|
111
|
+
const gapPct = censusTotal === 0 ? (packSum === 0 ? 0 : 1) : Math.abs(packSum - censusTotal) / censusTotal;
|
|
112
|
+
return { bucket, packSum, censusTotal, gapPct, inBand: gapPct <= TOLERANCE };
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function renderRanking(ps: readonly Passport[]): string {
|
|
116
|
+
const sorted = [...ps].sort((a, b) => b.total_tokens - a.total_tokens);
|
|
117
|
+
const total = sorted.reduce((a, p) => a + p.total_tokens, 0);
|
|
118
|
+
const lines = [
|
|
119
|
+
'<!-- evidence-type: analysis -->',
|
|
120
|
+
'# Pack token ranking — which packs carry the weight',
|
|
121
|
+
'',
|
|
122
|
+
'GENERATED by `./scripts-run src/scripts/check_pack_passport_reconciliation --write-ranking`.',
|
|
123
|
+
'Do not hand-edit. Basis `chars/4`, per `docs/contracts/pack-token-passport.md`.',
|
|
124
|
+
'',
|
|
125
|
+
'The numbers are each pack\'s STANDING contribution — what is paid whether or',
|
|
126
|
+
'not the pack is used. A skill body loaded on invocation is a runtime cost and',
|
|
127
|
+
'is not here, and the residual bucket (tool definitions + dispatch prompt) is',
|
|
128
|
+
'not attributable to a pack at all.',
|
|
129
|
+
'',
|
|
130
|
+
`**${String(sorted.length)} packs, ${String(total)} tokens total.**`,
|
|
131
|
+
'',
|
|
132
|
+
'| rank | pack | total | rules | catalog | commands | other | share |',
|
|
133
|
+
'|---:|---|---:|---:|---:|---:|---:|---:|',
|
|
134
|
+
];
|
|
135
|
+
sorted.forEach((p, i) => {
|
|
136
|
+
const share = total === 0 ? 0 : (p.total_tokens / total) * 100;
|
|
137
|
+
lines.push(
|
|
138
|
+
`| ${String(i + 1)} | \`${p.pack}\` | ${String(p.total_tokens)} | ${String(p.rules_tokens)} | ` +
|
|
139
|
+
`${String(p.catalog_tokens)} | ${String(p.commands_tokens)} | ${String(p.other_tokens)} | ${share.toFixed(1)} % |`,
|
|
140
|
+
);
|
|
141
|
+
});
|
|
142
|
+
return `${lines.join('\n')}\n`;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Discrimination over the two pure units — the parser and the ratio.
|
|
147
|
+
*
|
|
148
|
+
* This script exits 0 on every path by design (it is a report, not a gate), so
|
|
149
|
+
* no planted file can make it red and the canary harness cannot prove anything
|
|
150
|
+
* about it. The `scanned:` floor is the one thing about it that CAN break, and
|
|
151
|
+
* a self-test is what proves the two functions behind the number actually
|
|
152
|
+
* discriminate rather than returning something shaped like an answer.
|
|
153
|
+
*/
|
|
154
|
+
function selfTest(): number {
|
|
155
|
+
const yaml = [
|
|
156
|
+
'artefact_count: 3',
|
|
157
|
+
'token_passport:',
|
|
158
|
+
' basis: chars/4',
|
|
159
|
+
' catalog_tokens: 20',
|
|
160
|
+
' commands_tokens: 5',
|
|
161
|
+
' other_tokens: 1',
|
|
162
|
+
' rules_tokens: 10',
|
|
163
|
+
' total_tokens: 36',
|
|
164
|
+
].join('\n');
|
|
165
|
+
return runSelfTest({
|
|
166
|
+
gate: 'check_pack_passport_reconciliation',
|
|
167
|
+
minCases: 6,
|
|
168
|
+
minRejectCases: 3,
|
|
169
|
+
cases: [
|
|
170
|
+
{
|
|
171
|
+
name: 'a manifest with a passport parses every field',
|
|
172
|
+
expect: 'reject',
|
|
173
|
+
run: () => {
|
|
174
|
+
const p = readPassport('x', yaml);
|
|
175
|
+
return p !== null && p.rules_tokens === 10 && p.total_tokens === 36 ? 1 : 0;
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: 'a manifest with NO passport returns null, not a zero passport',
|
|
180
|
+
expect: 'accept',
|
|
181
|
+
run: () => (readPassport('x', 'artefact_count: 3\n') === null ? 0 : 1),
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: 'an exact match is in band',
|
|
185
|
+
expect: 'accept',
|
|
186
|
+
run: () => (reconcile(100, 100, 'b').inBand ? 0 : 1),
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: 'a 9 % gap is in band and an 11 % gap is not',
|
|
190
|
+
expect: 'reject',
|
|
191
|
+
run: () => (reconcile(109, 100, 'b').inBand && !reconcile(111, 100, 'b').inBand ? 1 : 0),
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
// The denominator is the CENSUS, the side with the independent
|
|
195
|
+
// measurement. Dividing by the pack sum would let a passport
|
|
196
|
+
// that measured almost nothing report a small gap — which is
|
|
197
|
+
// exactly the failure this repo's own measurement produced.
|
|
198
|
+
name: 'the denominator is the census, not the pack sum',
|
|
199
|
+
expect: 'reject',
|
|
200
|
+
run: () => (Math.abs(reconcile(1, 100, 'b').gapPct - 0.99) < 1e-9 ? 1 : 0),
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: 'both sides zero is in band; a sum against a zero census is not',
|
|
204
|
+
expect: 'accept',
|
|
205
|
+
run: () => (reconcile(0, 0, 'b').inBand && !reconcile(5, 0, 'b').inBand ? 0 : 1),
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export function main(argv: readonly string[] = process.argv.slice(2)): number {
|
|
212
|
+
if (argv.includes('--self-test')) return selfTest();
|
|
213
|
+
const passports = collectPassports();
|
|
214
|
+
try {
|
|
215
|
+
assertScanned({
|
|
216
|
+
gate: 'check_pack_passport_reconciliation',
|
|
217
|
+
scanned: passports.length,
|
|
218
|
+
units: 'pack passport(s)',
|
|
219
|
+
roots: ['src/packs/*/pack.yaml'],
|
|
220
|
+
});
|
|
221
|
+
} catch (err) {
|
|
222
|
+
if (err instanceof DeadScopeError) {
|
|
223
|
+
process.stderr.write(`❌ passport reconciliation: ${err.message}\n`);
|
|
224
|
+
return 2;
|
|
225
|
+
}
|
|
226
|
+
throw err;
|
|
227
|
+
}
|
|
228
|
+
process.stdout.write(`scanned: ${String(passports.length)}\n`);
|
|
229
|
+
|
|
230
|
+
if (argv.includes('--write-ranking')) {
|
|
231
|
+
fs.mkdirSync(path.dirname(RANKING), { recursive: true });
|
|
232
|
+
fs.writeFileSync(RANKING, renderRanking(passports));
|
|
233
|
+
process.stdout.write(`✅ ranking written to ${path.relative(REPO_ROOT, RANKING)}\n`);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const rules = censusRuleDir(path.join(REPO_ROOT, 'dist', 'agent-src', 'rules'));
|
|
237
|
+
const catalog = censusSkillsCatalog(path.join(REPO_ROOT, 'dist', 'agent-src', 'skills'));
|
|
238
|
+
const tok = (chars: number): number => Math.round(chars / 4);
|
|
239
|
+
const recs = [
|
|
240
|
+
reconcile(
|
|
241
|
+
passports.reduce((a, p) => a + p.rules_tokens, 0),
|
|
242
|
+
tok(rules.chars),
|
|
243
|
+
'project-scope rules',
|
|
244
|
+
),
|
|
245
|
+
reconcile(
|
|
246
|
+
passports.reduce((a, p) => a + p.catalog_tokens, 0),
|
|
247
|
+
tok(catalog.chars),
|
|
248
|
+
'preloaded skills catalog',
|
|
249
|
+
),
|
|
250
|
+
];
|
|
251
|
+
for (const r of recs) {
|
|
252
|
+
process.stdout.write(
|
|
253
|
+
` ${r.inBand ? '✅' : '❌'} ${r.bucket.padEnd(26)} packs ${String(r.packSum).padStart(7)} · ` +
|
|
254
|
+
`census ${String(r.censusTotal).padStart(7)} · gap ${(r.gapPct * 100).toFixed(1)} %\n`,
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
const covered = recs.filter((r) => r.inBand).length;
|
|
258
|
+
process.stdout.write(
|
|
259
|
+
`\ncoverage: packs account for ${String(covered)} of ${String(recs.length)} census bucket(s) within ±${String(
|
|
260
|
+
TOLERANCE * 100,
|
|
261
|
+
)} %.\n` +
|
|
262
|
+
' A gap here is a PROPERTY OF THE TREE, not a defect: pack `dependencies` claim a\n' +
|
|
263
|
+
' small deliberate subset of what ships, so the two numbers are not a reconciliation\n' +
|
|
264
|
+
' pair. Failing on that would be failing by construction, and a gate that is red by\n' +
|
|
265
|
+
' construction gets disabled rather than fixed.\n' +
|
|
266
|
+
' The useful output is the ranking above plus this figure. See\n' +
|
|
267
|
+
' docs/contracts/pack-token-passport.md § Reconciliation for what would make it a gate.\n',
|
|
268
|
+
);
|
|
269
|
+
return 0;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (process.argv[1] !== undefined && process.argv[1].includes('check_pack_passport_reconciliation')) {
|
|
273
|
+
process.exit(main(process.argv.slice(2)));
|
|
274
|
+
}
|
|
@@ -37,6 +37,7 @@ import process from 'node:process';
|
|
|
37
37
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
38
38
|
import { parse as parseYaml } from 'yaml';
|
|
39
39
|
|
|
40
|
+
import { asOf } from './_lib/as_of.js';
|
|
40
41
|
import { assertScanned, DeadScopeError } from './_lib/scan_scope.js';
|
|
41
42
|
|
|
42
43
|
type Severity = 'error' | 'warning';
|
|
@@ -364,7 +365,7 @@ function _dateFromIso(s: string): Ymd | null {
|
|
|
364
365
|
}
|
|
365
366
|
|
|
366
367
|
function _todayMinusDays(days: number): Ymd {
|
|
367
|
-
const now =
|
|
368
|
+
const now = asOf();
|
|
368
369
|
const base = Date.UTC(now.getFullYear(), now.getMonth(), now.getDate());
|
|
369
370
|
const d = new Date(base - days * 86_400_000);
|
|
370
371
|
return { year: d.getUTCFullYear(), month: d.getUTCMonth() + 1, day: d.getUTCDate() };
|
|
@@ -51,6 +51,7 @@ import * as path from 'node:path';
|
|
|
51
51
|
import process from 'node:process';
|
|
52
52
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
53
53
|
|
|
54
|
+
import { asOf } from './_lib/as_of.js';
|
|
54
55
|
import { assertScanned, DeadScopeError } from './_lib/scan_scope.js';
|
|
55
56
|
import { RegistryLoadError, load_registry } from './check_reach_channels.js';
|
|
56
57
|
|
|
@@ -108,7 +109,7 @@ export function days_between(fromStamp: number, toStamp: number): number {
|
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
/** Today as `YYYY-MM-DD` in UTC — the only place the clock is read. */
|
|
111
|
-
export function today_iso(now: Date =
|
|
112
|
+
export function today_iso(now: Date = asOf()): string {
|
|
112
113
|
return now.toISOString().slice(0, 10);
|
|
113
114
|
}
|
|
114
115
|
|
|
@@ -22,6 +22,7 @@ import * as path from 'node:path';
|
|
|
22
22
|
import { argv, env, exit } from 'node:process';
|
|
23
23
|
import { fileURLToPath } from 'node:url';
|
|
24
24
|
|
|
25
|
+
import { asOfMs } from './_lib/as_of.js';
|
|
25
26
|
import { assertWatchlistResolves, DeadScopeError } from './_lib/scan_scope.js';
|
|
26
27
|
|
|
27
28
|
// src/scripts/check_release_adjacent_health.ts → two levels up is the repo root.
|
|
@@ -119,7 +120,7 @@ async function main(): Promise<number> {
|
|
|
119
120
|
process.stderr.write(`✅ ${wf}: last completed run green\n`);
|
|
120
121
|
continue;
|
|
121
122
|
}
|
|
122
|
-
const ageHours = (
|
|
123
|
+
const ageHours = (asOfMs() - Date.parse(run.updated_at)) / 3_600_000;
|
|
123
124
|
if (ageHours >= maxRedHours) {
|
|
124
125
|
process.stdout.write(
|
|
125
126
|
`::error::release-adjacent workflow durably red: ${wf} — last completed run ` +
|
|
@@ -31,6 +31,11 @@ const ALLOWLIST_GLOBS = [
|
|
|
31
31
|
'package-lock.json',
|
|
32
32
|
'CHANGELOG.md',
|
|
33
33
|
'.claude-plugin/marketplace.json',
|
|
34
|
+
// Augment twins — version-synced to package.json by release.ts
|
|
35
|
+
// set_augment_manifest_version, enforced by lint_marketplace. Both ship in
|
|
36
|
+
// the tarball (publish-surface.json roots), so a release PR must carry them.
|
|
37
|
+
'.augment-plugin/plugin.json',
|
|
38
|
+
'.augment-plugin/marketplace.json',
|
|
34
39
|
'src/packs/*/pack.yaml',
|
|
35
40
|
'src/packs/*/README.md',
|
|
36
41
|
'src/domains/*/pack.yaml',
|
|
@@ -152,8 +152,41 @@ function main(argv?: readonly string[]): number {
|
|
|
152
152
|
else ledger.complete(name);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
// SECOND SURFACE — step 2.2 of road-to-review-independence. Until it existed, this
|
|
156
|
+
// gate scanned one directory with one producer in it, so `scanned: 1` meant "the only
|
|
157
|
+
// producer of this record agrees with itself". `dispatch_r2_reviewer` now emits the
|
|
158
|
+
// same record into its findings artefact, and those are checked here on the same
|
|
159
|
+
// terms: the independence pair must be internally consistent wherever it is written,
|
|
160
|
+
// or the derivation rule is advice rather than a contract.
|
|
161
|
+
//
|
|
162
|
+
// Only the independence check runs over this surface, not the release-findings schema
|
|
163
|
+
// — an R2 artefact is a different document and validating it against the ledger
|
|
164
|
+
// schema would report violations that are not violations.
|
|
165
|
+
const REVIEWS_DIR = path.join(process.cwd(), 'agents', 'evidence', 'reviews');
|
|
166
|
+
let reviewScanned = 0;
|
|
167
|
+
if (fs.existsSync(REVIEWS_DIR)) {
|
|
168
|
+
for (const name of fs.readdirSync(REVIEWS_DIR).filter((n) => n.endsWith('.md')).sort()) {
|
|
169
|
+
const text = fs.readFileSync(path.join(REVIEWS_DIR, name), 'utf-8');
|
|
170
|
+
const m = /<!--\s*(\{"review-independence".*?\})\s*-->/su.exec(text);
|
|
171
|
+
if (m === null) continue;
|
|
172
|
+
reviewScanned += 1;
|
|
173
|
+
let rec: Record<string, unknown>;
|
|
174
|
+
try {
|
|
175
|
+
rec = (JSON.parse(m[1]!) as { 'review-independence': Record<string, unknown> })[
|
|
176
|
+
'review-independence'
|
|
177
|
+
];
|
|
178
|
+
} catch (exc) {
|
|
179
|
+
problems.push(`${name}: unparseable review-independence block — ${String(exc)}`);
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
for (const v of independenceViolations(rec)) {
|
|
183
|
+
problems.push(`${name}: independence — ${v}`);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
155
188
|
ledger.finalize();
|
|
156
|
-
process.stderr.write(`scanned: ${files.length}\n`);
|
|
189
|
+
process.stderr.write(`scanned: ${String(files.length + reviewScanned)}\n`);
|
|
157
190
|
|
|
158
191
|
if (problems.length > 0) {
|
|
159
192
|
process.stdout.write(
|
|
@@ -29,11 +29,13 @@ import * as fs from 'node:fs';
|
|
|
29
29
|
import * as path from 'node:path';
|
|
30
30
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
31
31
|
|
|
32
|
+
import { checkRatchet } from './_lib/gate_baseline.js';
|
|
32
33
|
import { assertScanned, DeadScopeError } from './_lib/scan_scope.js';
|
|
33
34
|
|
|
34
35
|
const QUIET = process.argv.slice(2).includes('--quiet');
|
|
35
36
|
|
|
36
37
|
const ROADMAP_ROOT = 'agents/roadmaps';
|
|
38
|
+
const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
|
|
37
39
|
|
|
38
40
|
// --- Replicated from .augment/scripts/update_roadmap_progress.py ------------
|
|
39
41
|
// CHECKBOX_RE = re.compile(r"^\s*[-*]\s+\[([ xX~\-])\]\s", re.MULTILINE)
|
|
@@ -221,6 +223,25 @@ function violations_for(p: string): string[] {
|
|
|
221
223
|
return out;
|
|
222
224
|
}
|
|
223
225
|
|
|
226
|
+
/**
|
|
227
|
+
* Does this roadmap declare a `relates:` block?
|
|
228
|
+
*
|
|
229
|
+
* `road-to-roadmap-situational-awareness` § 4.2. `depends:` was defined in the
|
|
230
|
+
* template and its measured adoption was **0** — a field nothing requires is a
|
|
231
|
+
* field nobody writes. So the wider relation field is required, but RATCHETED:
|
|
232
|
+
* the roadmaps that predate the check are held at their measured count and a
|
|
233
|
+
* NEW one without the block pushes the count above it.
|
|
234
|
+
*
|
|
235
|
+
* Presence only. Whether the declared relations are legal is
|
|
236
|
+
* `lint_roadmap_complexity`'s `_check_relates`, and whether an empty list is
|
|
237
|
+
* honest is the pre-save self-check in `roadmap-writing` — a gate cannot tell a
|
|
238
|
+
* genuinely-empty `relates: []` from a reflex one, and pretending otherwise
|
|
239
|
+
* would be the worse failure.
|
|
240
|
+
*/
|
|
241
|
+
export function declares_relates(p: string): boolean {
|
|
242
|
+
return parse_frontmatter(fs.readFileSync(p, 'utf-8')).has('relates');
|
|
243
|
+
}
|
|
244
|
+
|
|
224
245
|
function main(): number {
|
|
225
246
|
if (!_isDir(ROADMAP_ROOT)) {
|
|
226
247
|
process.stderr.write(`❌ ${ROADMAP_ROOT} not found — run from project root.\n`);
|
|
@@ -244,8 +265,9 @@ function main(): number {
|
|
|
244
265
|
}
|
|
245
266
|
throw exc;
|
|
246
267
|
}
|
|
268
|
+
const active = find_active_roadmaps(ROADMAP_ROOT);
|
|
247
269
|
const findings: string[] = [];
|
|
248
|
-
for (const p of
|
|
270
|
+
for (const p of active) {
|
|
249
271
|
findings.push(...violations_for(p));
|
|
250
272
|
}
|
|
251
273
|
if (findings.length > 0) {
|
|
@@ -259,11 +281,33 @@ function main(): number {
|
|
|
259
281
|
);
|
|
260
282
|
return 1;
|
|
261
283
|
}
|
|
262
|
-
|
|
284
|
+
// The `relates:` ratchet. Reported separately from trackability because the
|
|
285
|
+
// two are different obligations: one keeps a roadmap visible to the
|
|
286
|
+
// dashboard, this one keeps its relations to sibling work declared.
|
|
287
|
+
const no_relates = active.filter((p) => !declares_relates(p));
|
|
288
|
+
const verdict = checkRatchet({
|
|
289
|
+
gate: 'check_roadmap_trackable:relates',
|
|
290
|
+
actual: no_relates.length,
|
|
291
|
+
repoRoot: REPO_ROOT,
|
|
292
|
+
});
|
|
293
|
+
if (!verdict.ok) {
|
|
294
|
+
process.stderr.write(`❌ ${verdict.message}\n`);
|
|
295
|
+
for (const p of no_relates) {
|
|
296
|
+
process.stderr.write(` ${p}: no \`relates:\` block in the frontmatter\n`);
|
|
297
|
+
}
|
|
298
|
+
process.stderr.write(
|
|
299
|
+
'\n Run `agent-config roadmap:context` and write one row per hit\n' +
|
|
300
|
+
" ({slug, relation: extends|supersedes|depends|disjoint, note}), or an\n" +
|
|
301
|
+
" explicit `relates: []` carrying the probe's `scanned:` line as its\n" +
|
|
302
|
+
' justification. See templates/roadmaps.md rule 18.\n',
|
|
303
|
+
);
|
|
304
|
+
return 1;
|
|
305
|
+
}
|
|
263
306
|
if (!QUIET) {
|
|
264
307
|
process.stdout.write(
|
|
265
|
-
`✅ ${
|
|
308
|
+
`✅ ${active.length} active roadmap(s) — all parseable, all phases have checkboxes.\n`,
|
|
266
309
|
);
|
|
310
|
+
process.stdout.write(`✅ ${verdict.message}\n`);
|
|
267
311
|
}
|
|
268
312
|
return 0;
|
|
269
313
|
}
|
|
@@ -296,6 +340,7 @@ if (_isCliEntry() || process.argv[1] === _HERE) {
|
|
|
296
340
|
}
|
|
297
341
|
|
|
298
342
|
export {
|
|
343
|
+
REPO_ROOT,
|
|
299
344
|
ROADMAP_ROOT,
|
|
300
345
|
CHECKBOX_RE,
|
|
301
346
|
PHASE_RE,
|
|
@@ -66,6 +66,7 @@ import * as os from 'node:os';
|
|
|
66
66
|
import * as path from 'node:path';
|
|
67
67
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
68
68
|
|
|
69
|
+
import { asOf } from './_lib/as_of.js';
|
|
69
70
|
import { checkRatchet } from './_lib/gate_baseline.js';
|
|
70
71
|
import { GateLedger } from './_lib/gate_ledger.js';
|
|
71
72
|
import { runGateCli, runSelfTest } from './_lib/gate_self_test.js';
|
|
@@ -216,7 +217,7 @@ export function selfTest(): number {
|
|
|
216
217
|
: {
|
|
217
218
|
check_source_size_budget: {
|
|
218
219
|
count: baseline,
|
|
219
|
-
landed:
|
|
220
|
+
landed: asOf().toISOString().slice(0, 10),
|
|
220
221
|
note: 'self-test fixture',
|
|
221
222
|
},
|
|
222
223
|
};
|