@event4u/agent-config 14.10.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 +335 -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/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-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 +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 +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/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/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/monorepo-workspace/evals/triggers.json +17 -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/operational-readiness/evals/triggers.json +17 -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/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 +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 +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/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/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 +359 -124
- 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 +207 -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/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/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_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/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/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/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/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,169 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "fidelity-measurement-sheet.schema.json",
|
|
4
|
+
"title": "Fidelity measurement sheet",
|
|
5
|
+
"description": "The per-element artefact W3 of road-to-frontend-fidelity-calibration records as absent: a tree-wide search for `measurement-sheet` / `measurement_sheet` / `per-element measurement` across src/ and docs/ returned zero hits at 2026-08-22. One row per (selector, dimension) pair carrying the expected value, the observed value, and — the part that makes it a fidelity artefact rather than a diff — WHERE the expectation came from. A reviewer can diff two sheets and a gate can read the `status` column, neither of which is true of an agent comparing two pictures. Deliberately NOT a findings format: `review-findings.schema.json` already owns findings. A sheet is the measurement; a finding is what someone decided about it.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"dimensions",
|
|
10
|
+
"rows"
|
|
11
|
+
],
|
|
12
|
+
"additionalProperties": true,
|
|
13
|
+
"properties": {
|
|
14
|
+
"schema_version": {
|
|
15
|
+
"enum": [
|
|
16
|
+
1
|
|
17
|
+
],
|
|
18
|
+
"description": "Pinned. Spelled as a one-member `enum` rather than `const` because this repo's Draft-07 subset validator (validate_frontmatter.ts) enforces `enum` and silently ignores `const` — a `const` here would be a pin nothing checks."
|
|
19
|
+
},
|
|
20
|
+
"surface": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "What was measured — a route, a component path, or a fixture id. Free text; no gate reads it."
|
|
23
|
+
},
|
|
24
|
+
"captured_at": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "ISO-8601 timestamp of the measurement run."
|
|
27
|
+
},
|
|
28
|
+
"dimensions": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"minItems": 1,
|
|
31
|
+
"description": "Every dimension this sheet accounts for — shipped and cut alike. AC-3 is checked against this list: each entry is either measured by >=1 row or carries a `null_record`. A dimension that appears in neither is the failure the AC exists to catch.",
|
|
32
|
+
"items": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"required": [
|
|
35
|
+
"id",
|
|
36
|
+
"status"
|
|
37
|
+
],
|
|
38
|
+
"additionalProperties": true,
|
|
39
|
+
"properties": {
|
|
40
|
+
"id": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "Stable dimension id, e.g. `token-literal`. Rows reference it."
|
|
43
|
+
},
|
|
44
|
+
"status": {
|
|
45
|
+
"enum": [
|
|
46
|
+
"shipped",
|
|
47
|
+
"null"
|
|
48
|
+
],
|
|
49
|
+
"description": "`shipped` — at least one row carries a measurement for it. `null` — cut, and `null_record` says which pre-registered falsifier fired."
|
|
50
|
+
},
|
|
51
|
+
"null_record": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": [
|
|
54
|
+
"falsifier",
|
|
55
|
+
"unavailable_capability",
|
|
56
|
+
"affected_claims",
|
|
57
|
+
"reopening_condition"
|
|
58
|
+
],
|
|
59
|
+
"additionalProperties": true,
|
|
60
|
+
"description": "Required when `status` is `null`. The four parts this roadmap records for every null, so a cut dimension is distinguishable from one nobody thought of.",
|
|
61
|
+
"properties": {
|
|
62
|
+
"falsifier": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "The pre-registered falsifier id from the Phase 2.3 list that fired."
|
|
65
|
+
},
|
|
66
|
+
"unavailable_capability": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "What is missing, named as a capability rather than as an excuse."
|
|
69
|
+
},
|
|
70
|
+
"affected_claims": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"items": { "type": "string" },
|
|
73
|
+
"description": "Inventory row ids (A1..A13) this null covers. A null that enumerates nothing is indistinguishable from a matrix that never had those rows."
|
|
74
|
+
},
|
|
75
|
+
"reopening_condition": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"description": "The observable event that puts the dimension back in the matrix."
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"rows": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"description": "The measurements. May be empty only when every dimension carries `status: null`.",
|
|
87
|
+
"items": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"required": [
|
|
90
|
+
"selector",
|
|
91
|
+
"dimension",
|
|
92
|
+
"expected",
|
|
93
|
+
"observed",
|
|
94
|
+
"expectation_source",
|
|
95
|
+
"status"
|
|
96
|
+
],
|
|
97
|
+
"additionalProperties": true,
|
|
98
|
+
"properties": {
|
|
99
|
+
"selector": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"description": "What was measured — a CSS selector where a page was reached, otherwise a `file:line` anchor. Both are per-element; only one of them needs a browser."
|
|
102
|
+
},
|
|
103
|
+
"dimension": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"description": "The `dimensions[].id` this row measures."
|
|
106
|
+
},
|
|
107
|
+
"expected": {
|
|
108
|
+
"type": [
|
|
109
|
+
"string",
|
|
110
|
+
"number",
|
|
111
|
+
"null"
|
|
112
|
+
],
|
|
113
|
+
"description": "The value the expectation source calls for. `null` means the source is silent, which is a legitimate measurement — see `status: unspecified`."
|
|
114
|
+
},
|
|
115
|
+
"observed": {
|
|
116
|
+
"type": [
|
|
117
|
+
"string",
|
|
118
|
+
"number",
|
|
119
|
+
"null"
|
|
120
|
+
],
|
|
121
|
+
"description": "The value actually present."
|
|
122
|
+
},
|
|
123
|
+
"expectation_source": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"required": [
|
|
126
|
+
"kind",
|
|
127
|
+
"ref"
|
|
128
|
+
],
|
|
129
|
+
"additionalProperties": true,
|
|
130
|
+
"description": "VALUE-LEVEL provenance. `docs/guidelines/design-fidelity-mechanics.md` carries the finding-level `artifact_covered` flag; this is the finer grain that answers `where did this 16px come from`, which a per-finding boolean cannot.",
|
|
131
|
+
"properties": {
|
|
132
|
+
"kind": {
|
|
133
|
+
"enum": [
|
|
134
|
+
"provided_artifact",
|
|
135
|
+
"design_token",
|
|
136
|
+
"brand_token",
|
|
137
|
+
"house_heuristic",
|
|
138
|
+
"agent_inference"
|
|
139
|
+
],
|
|
140
|
+
"description": "Ordered by authority, highest first, mirroring the precedence chain rather than restating it. `agent_inference` is the lowest and is the one a reviewer should be able to find by filtering."
|
|
141
|
+
},
|
|
142
|
+
"ref": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"description": "Where exactly — a token name, a `file:line`, or an artefact anchor. Never a bare `true`."
|
|
145
|
+
},
|
|
146
|
+
"artifact_covered": {
|
|
147
|
+
"type": "boolean",
|
|
148
|
+
"description": "Mirrors `ARTIFACT_COVERED_KEY` for the row's own value. Optional and defaulted-absent: the coarse per-finding flag stays the default channel, and this field never replaces it."
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"status": {
|
|
153
|
+
"enum": [
|
|
154
|
+
"match",
|
|
155
|
+
"deviation",
|
|
156
|
+
"unspecified",
|
|
157
|
+
"unmeasured"
|
|
158
|
+
],
|
|
159
|
+
"description": "`match` / `deviation` — expected and observed both known. `unspecified` — the source is silent, so there is nothing to deviate from. `unmeasured` — the dimension is blocked; the row records that it was not skipped silently."
|
|
160
|
+
},
|
|
161
|
+
"blocker": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"description": "Required in practice when `status` is `unmeasured`: the blocker slug, e.g. `b-page-capture-primitive`. Not schema-required, because a sheet produced outside this roadmap has no blocker file to name."
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -55,6 +55,28 @@
|
|
|
55
55
|
},
|
|
56
56
|
"description": "Eager auto-loaded context references. Same logical-name rule as `load_context`. Counts against the per-rule char budget; enforced by scripts/lint_load_context.py."
|
|
57
57
|
},
|
|
58
|
+
"norm": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"required": ["tokens", "remainder"],
|
|
62
|
+
"description": "The rule's declared NORMATIVE budget, plus where its non-normative remainder went. Optional: a required key would red every existing rule file on the day it lands, which is the gate-that-teaches-you-to-ignore-it failure `src/config/preamble-payload-budget.json` warns about in its own `_comment`. A rule that declares this is asserting that everything left in its body is obligation or routing, and that the rationale a reader may still want is reachable at `remainder`. Measured and enforced by `lint_rule_norm_pin`.",
|
|
63
|
+
"properties": {
|
|
64
|
+
"tokens": {
|
|
65
|
+
"type": "integer",
|
|
66
|
+
"minimum": 1,
|
|
67
|
+
"description": "Exact-BPE ceiling (cl100k_base) for the rule body BELOW the frontmatter. Never a chars/4 proxy - this tree ships an exact tokenizer and a pin measured in the other unit would be enforced against a number nobody can reproduce. Derive it from a real measurement of the rule after its remainder has moved out; a pin invented at authoring time is an invented threshold and the lint would then enforce a guess."
|
|
68
|
+
},
|
|
69
|
+
"remainder": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"minItems": 1,
|
|
72
|
+
"items": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"pattern": "^((\\.\\./)*(contexts|docs|skills)/|agents/settings/contexts/|dist/agent-src/(contexts|skills)/)[^\\s]+\\.md$"
|
|
75
|
+
},
|
|
76
|
+
"description": "Where the prose this rule used to carry now lives - one or more guideline, context, or skill paths. REQUIRED alongside `tokens`, deliberately: a pin with no destination is a licence to delete, and `preservation-guard` forbids deletion during a transformation. The rule must also carry an inbound link to each entry so the relocated prose stays reachable (`check_references`)."
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
58
80
|
"tier": {
|
|
59
81
|
"type": "string",
|
|
60
82
|
"enum": ["1", "2a", "2b", "3", "safety-floor", "mechanical-already", "kernel", "tier-1", "tier-2"],
|
|
@@ -150,9 +172,9 @@
|
|
|
150
172
|
"uniqueItems": true,
|
|
151
173
|
"items": {
|
|
152
174
|
"type": "string",
|
|
153
|
-
"pattern": "^(hook:[a-z0-9_-]+|validator:[A-Za-z0-9_./-]+|test:[A-Za-z0-9_./-]+|observer:[a-z0-9 _-]+|none)$"
|
|
175
|
+
"pattern": "^(hook:[a-z0-9_-]+|validator:[A-Za-z0-9_./-]+|test:[A-Za-z0-9_./-]+|observer:[a-z0-9 _-]+|instruction-only: *[^ ].*|none)$"
|
|
154
176
|
},
|
|
155
|
-
"description": "What mechanically enforces this rule. `validator:<script>` and `test:<path>` must resolve on disk AND be wired into a taskfile, workflow, or the hook manifest — a script that exists but runs nowhere resolves to unwired, not covered. `hook:<name>` must be registered in hook_manifest.yaml with fail_closed: true; a hook that never blocks is `observer:`, not `validator:`. `
|
|
177
|
+
"description": "What mechanically enforces this rule. `validator:<script>` and `test:<path>` must resolve on disk AND be wired into a taskfile, workflow, or the hook manifest — a script that exists but runs nowhere resolves to unwired, not covered. `hook:<name>` must be registered in hook_manifest.yaml with fail_closed: true; a hook that never blocks is `observer:`, not `validator:`. `instruction-only: <reason>` declares an honestly model-carried obligation and is counted as a recorded gap — the reason is MANDATORY in the pattern, because a bare marker is a claim with no triage record behind it and resolves to `missing`, which the --check ratchet reds on. The bare `none` spelling it replaces stays legal for exactly one reason: `non-destructive-by-default` still carries it and is a kernel rule that block_kernel_rule_writes denies agent writes to, so retiring the value outright would make a CI-green tree unreachable for any agent. Resolved, not trusted, by check_enforcement_coverage.ts."
|
|
156
178
|
},
|
|
157
179
|
"obligation_frequency": {
|
|
158
180
|
"type": "string",
|
|
@@ -287,6 +287,45 @@
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
},
|
|
290
|
+
"scope": {
|
|
291
|
+
"type": "object",
|
|
292
|
+
"additionalProperties": false,
|
|
293
|
+
"description": "OPTIONAL write-scope declaration. Measured 2026-08-23: 0 of 292 SKILL.md files said WHERE a skill may write — `execution:` carries type / handler / timeout_seconds / allowed_tools and `trust:` carries level / removable / default, and none of them answers that question. This is a DECLARATION and a census, not a runtime control: nothing observes a skill's writes, `skill_linter` validates the SHAPE only, and absence stays legal. Saying so is the point — an optional field described as if it constrained anything would be exactly the coverage inflation this repository's enforcement doctrine forbids. Derive it, never guess it: for `handler: shell` the `command:` array names the script whose writes ARE the scope; for `handler: internal` and for a bare `type: manual` the skill executes nothing itself, so an empty `write` list plus a `verification_reason` is the accurate declaration rather than a placeholder.",
|
|
294
|
+
"properties": {
|
|
295
|
+
"read": {
|
|
296
|
+
"type": "array",
|
|
297
|
+
"items": {"type": "string"},
|
|
298
|
+
"description": "Repo-relative globs the skill reads. Optional — omit rather than guess; an invented read set is worse than an absent one."
|
|
299
|
+
},
|
|
300
|
+
"write": {
|
|
301
|
+
"type": "array",
|
|
302
|
+
"description": "Write paths this skill's OWN execution touches. An empty list is a real statement — \"this skill declares no write path of its own\" — and is falsified by any write its execution performs.",
|
|
303
|
+
"items": {
|
|
304
|
+
"type": "object",
|
|
305
|
+
"additionalProperties": false,
|
|
306
|
+
"required": ["pattern", "access"],
|
|
307
|
+
"properties": {
|
|
308
|
+
"pattern": {"type": "string", "minLength": 1, "description": "Repo-relative glob the skill may write."},
|
|
309
|
+
"access": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"enum": ["create", "write", "append", "delete"],
|
|
312
|
+
"description": "Closed enum. `create` = new paths only · `write` = create or overwrite · `append` = never rewrites existing bytes · `delete` = removes paths. A value outside the enum is a skill_linter error."
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"verification_command": {
|
|
318
|
+
"type": "string",
|
|
319
|
+
"minLength": 1,
|
|
320
|
+
"description": "The command that proves the declared scope is what the skill actually touches. Exactly one of `verification_command` / `verification_reason` is present when `scope:` is — enforced by skill_linter's `scope_verification` check, not by this schema, because JSON Schema cannot express \"exactly one of these two optional siblings\" in a form this repo's frontmatter validator implements."
|
|
321
|
+
},
|
|
322
|
+
"verification_reason": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"minLength": 1,
|
|
325
|
+
"description": "An HONEST NULL at declaration level: why no command can prove this scope. The pair is deliberately TWO sibling keys rather than a nested `verification: {command|reason}` map, and the reason is measured rather than stylistic: this repo's frontmatter parser reads map -> list -> map (that is how `triggers[].keyword` works) but flattens map -> map -> scalar, so a nested `verification.reason` parses as `scope.verification = \"\"` plus a stray `scope.reason` and the schema then rejects a correctly-written declaration. A field the parser cannot read is a field nothing validates."
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
},
|
|
290
329
|
"triggers": {
|
|
291
330
|
"type": "array",
|
|
292
331
|
"minItems": 1,
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://event4u.dev/schemas/ui-authority.schema.json",
|
|
4
|
+
"title": "ui_authority",
|
|
5
|
+
"description": "The ONE authority object for a UI surface. Produced once before design and read by every UI phase and by the stop gate. Contract: docs/contracts/ui-authority.md. There is deliberately no second partial decision table anywhere in src/skills/ — A1.1's verify line asserts that.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"surface_mode",
|
|
10
|
+
"register",
|
|
11
|
+
"change_intent",
|
|
12
|
+
"reference_maturity",
|
|
13
|
+
"primary_source",
|
|
14
|
+
"constraints",
|
|
15
|
+
"conflicts",
|
|
16
|
+
"provenance",
|
|
17
|
+
"verification"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"surface_mode": {
|
|
21
|
+
"description": "What the surface is FOR. Per-surface, never inherited from PRODUCT.md.",
|
|
22
|
+
"enum": ["persuade", "operate", "read", "experience"]
|
|
23
|
+
},
|
|
24
|
+
"register": {
|
|
25
|
+
"description": "The design register, unchanged from docs/guidelines/design-modes.md.",
|
|
26
|
+
"enum": ["brand", "product"]
|
|
27
|
+
},
|
|
28
|
+
"change_intent": {
|
|
29
|
+
"description": "What the run is authorised to move. `preserve` is the strongest constraint and drives the intent-aware stop gate.",
|
|
30
|
+
"enum": ["preserve", "extend", "redesign", "new-world"]
|
|
31
|
+
},
|
|
32
|
+
"reference_maturity": {
|
|
33
|
+
"description": "How finished the supplied reference is. `wireframe` declares STRUCTURE and never a pixel mandate. `null` means no reference was supplied.",
|
|
34
|
+
"enum": [
|
|
35
|
+
"wireframe",
|
|
36
|
+
"prototype",
|
|
37
|
+
"finished-comp",
|
|
38
|
+
"runnable-artifact",
|
|
39
|
+
"production-incumbent",
|
|
40
|
+
null
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"fidelity_mandate": {
|
|
44
|
+
"description": "Carried from road-to-frontend-fidelity-calibration Phase 0. NOT re-derived here — this field holds that phase's output, and null means that phase has not produced one.",
|
|
45
|
+
"type": ["string", "null"]
|
|
46
|
+
},
|
|
47
|
+
"primary_source": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"required": ["kind"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"kind": {
|
|
53
|
+
"description": "Which authority the run builds from. `incumbent` is the answer when no DESIGN.md exists but a coherent incumbent does.",
|
|
54
|
+
"enum": ["user-instruction", "artifact", "comp", "design-system", "incumbent", "brief", "none"]
|
|
55
|
+
},
|
|
56
|
+
"path": { "type": ["string", "null"] }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"constraints": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"properties": {
|
|
63
|
+
"preserve_palette": { "type": "boolean" },
|
|
64
|
+
"preserve_type_family": { "type": "boolean" },
|
|
65
|
+
"preserve_layout": { "type": "boolean" },
|
|
66
|
+
"preserve_copy": { "type": "boolean" }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"conflicts": {
|
|
70
|
+
"description": "Surfaced disagreements. A conflict is REPORTED, never silently resolved — an operation whose declared dimensions collide with a constraint appends here and performs no write.",
|
|
71
|
+
"type": "array",
|
|
72
|
+
"items": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"required": ["dimension", "wanted", "blocked_by"],
|
|
76
|
+
"properties": {
|
|
77
|
+
"dimension": { "type": "string" },
|
|
78
|
+
"wanted": { "type": "string" },
|
|
79
|
+
"blocked_by": { "type": "string" }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"provenance": {
|
|
84
|
+
"description": "Where each resolved value came from. One entry per resolved field, so a wrong resolution is traceable to its signal rather than to the resolver as a whole.",
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": ["field", "source"],
|
|
90
|
+
"properties": {
|
|
91
|
+
"field": { "type": "string" },
|
|
92
|
+
"source": {
|
|
93
|
+
"enum": ["user-instruction", "surface-brief", "design-md", "product-md", "incumbent-scan", "reference-artifact", "default"]
|
|
94
|
+
},
|
|
95
|
+
"detail": { "type": ["string", "null"] }
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"verification": {
|
|
100
|
+
"description": "Graft 2 of the parent roadmap. A pass that could not fully run says so rather than passing silently.",
|
|
101
|
+
"enum": ["verified", "degraded", "unverified"]
|
|
102
|
+
},
|
|
103
|
+
"degradation_reason": {
|
|
104
|
+
"description": "Required whenever `verification` is not `verified`. The resolver refuses to emit a degraded object without one.",
|
|
105
|
+
"type": ["string", "null"]
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"allOf": [
|
|
109
|
+
{
|
|
110
|
+
"if": { "properties": { "verification": { "enum": ["degraded", "unverified"] } }, "required": ["verification"] },
|
|
111
|
+
"then": { "properties": { "degradation_reason": { "type": "string", "minLength": 1 } }, "required": ["degradation_reason"] }
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
@@ -209,6 +209,8 @@ export interface RoadmapClaim {
|
|
|
209
209
|
slug: string;
|
|
210
210
|
written_at?: string;
|
|
211
211
|
session_id?: string | null;
|
|
212
|
+
/** Repo-relative paths the claiming session declared it owns. */
|
|
213
|
+
paths?: string[];
|
|
212
214
|
}
|
|
213
215
|
|
|
214
216
|
function _is_replay_mode(): boolean {
|
|
@@ -227,9 +229,14 @@ function _read_claim_file(file: string): RoadmapClaim | null {
|
|
|
227
229
|
return null;
|
|
228
230
|
}
|
|
229
231
|
const sid = rec['session_id'];
|
|
232
|
+
const raw_paths = rec['paths'];
|
|
233
|
+
const paths = Array.isArray(raw_paths)
|
|
234
|
+
? raw_paths.filter((x): x is string => typeof x === 'string' && x.trim() !== '')
|
|
235
|
+
: [];
|
|
230
236
|
return {
|
|
231
237
|
slug: slug.trim(),
|
|
232
238
|
...(typeof sid === 'string' && sid.trim() !== '' ? { session_id: sid.trim() } : {}),
|
|
239
|
+
...(paths.length > 0 ? { paths } : {}),
|
|
233
240
|
};
|
|
234
241
|
} catch {
|
|
235
242
|
return null;
|
|
@@ -249,6 +256,8 @@ export interface ResolvedClaim {
|
|
|
249
256
|
slug: string;
|
|
250
257
|
/** Absolute path of the claim file this read came from. */
|
|
251
258
|
path: string;
|
|
259
|
+
/** Repo-relative paths the claim declared, or absent when it declared none. */
|
|
260
|
+
paths?: string[];
|
|
252
261
|
}
|
|
253
262
|
|
|
254
263
|
/**
|
|
@@ -278,7 +287,13 @@ export function resolve_claim(
|
|
|
278
287
|
for (const p of claim_read_paths(workspace_root, session_id)) {
|
|
279
288
|
if (path.basename(p) === path.basename(ROADMAP_CLAIM_REL)) continue;
|
|
280
289
|
const mine = _read_claim_file(p);
|
|
281
|
-
if (mine !== null)
|
|
290
|
+
if (mine !== null) {
|
|
291
|
+
return {
|
|
292
|
+
slug: mine.slug,
|
|
293
|
+
path: p,
|
|
294
|
+
...(mine.paths !== undefined ? { paths: mine.paths } : {}),
|
|
295
|
+
};
|
|
296
|
+
}
|
|
282
297
|
}
|
|
283
298
|
}
|
|
284
299
|
// The legacy per-WORKTREE file, in the same two locations. Unchanged in
|
|
@@ -313,7 +328,11 @@ export function resolve_claim(
|
|
|
313
328
|
if (id !== '') {
|
|
314
329
|
return null;
|
|
315
330
|
}
|
|
316
|
-
return {
|
|
331
|
+
return {
|
|
332
|
+
slug: legacy.slug,
|
|
333
|
+
path: legacy_path,
|
|
334
|
+
...(legacy.paths !== undefined ? { paths: legacy.paths } : {}),
|
|
335
|
+
};
|
|
317
336
|
}
|
|
318
337
|
|
|
319
338
|
/**
|
|
@@ -530,12 +549,13 @@ export function build_record(
|
|
|
530
549
|
started_at: string,
|
|
531
550
|
now: Date = new Date(),
|
|
532
551
|
): SessionRecord {
|
|
552
|
+
const claim = resolve_claim(workspace_root, session_id);
|
|
533
553
|
const rec: SessionRecord = {
|
|
534
554
|
session_id,
|
|
535
555
|
platform,
|
|
536
556
|
worktree: workspace_root,
|
|
537
557
|
branch: current_branch(workspace_root),
|
|
538
|
-
roadmap_slug:
|
|
558
|
+
roadmap_slug: claim?.slug ?? null,
|
|
539
559
|
started_at,
|
|
540
560
|
last_seen: iso_now(now),
|
|
541
561
|
};
|
|
@@ -552,6 +572,12 @@ export function build_record(
|
|
|
552
572
|
}
|
|
553
573
|
if (Object.keys(nonZero).length > 0) rec.turn_end_refusals = nonZero;
|
|
554
574
|
}
|
|
575
|
+
// road-to-roadmap-situational-awareness § 3.1 — the path axis, on exactly the
|
|
576
|
+
// terms above: only ever ADDS a field, so a session that declared no paths
|
|
577
|
+
// writes the record it wrote before this existed, byte for byte.
|
|
578
|
+
if (claim?.paths !== undefined && claim.paths.length > 0) {
|
|
579
|
+
rec.owned_paths = [...claim.paths].sort();
|
|
580
|
+
}
|
|
555
581
|
return rec;
|
|
556
582
|
}
|
|
557
583
|
|
|
@@ -45,12 +45,14 @@ import { fileURLToPath } from 'node:url';
|
|
|
45
45
|
|
|
46
46
|
import { write_atomic } from './_lib/fs_atomic.js';
|
|
47
47
|
import {
|
|
48
|
+
classify_collisions,
|
|
48
49
|
iso_now,
|
|
49
50
|
read_live_records,
|
|
50
51
|
register_dir,
|
|
51
52
|
safe_stem,
|
|
52
53
|
ttl_is_measured,
|
|
53
54
|
ttl_seconds_for,
|
|
55
|
+
type SessionRecord,
|
|
54
56
|
} from './_lib/session_register.js';
|
|
55
57
|
import { claim_file, claim_is_stale, claim_read_paths } from './session_register_hook.js';
|
|
56
58
|
|
|
@@ -62,7 +64,7 @@ function usage(): number {
|
|
|
62
64
|
' live sessions, plus unmerged branches',
|
|
63
65
|
' held by other worktrees (--branches adds',
|
|
64
66
|
' that axis to the JSON form)',
|
|
65
|
-
' agent-config sessions:claim <slug> claim a roadmap for this session',
|
|
67
|
+
' agent-config sessions:claim <slug> [--paths <a,b,…>] claim a roadmap for this session',
|
|
66
68
|
' agent-config sessions:claim <slug> --force claim it even though a peer holds it',
|
|
67
69
|
' agent-config sessions:claim --release drop this session\'s roadmap claim',
|
|
68
70
|
'',
|
|
@@ -168,6 +170,30 @@ export function other_worktree_branches_detailed(
|
|
|
168
170
|
return { rows, filtered: unmerged !== null };
|
|
169
171
|
}
|
|
170
172
|
|
|
173
|
+
/**
|
|
174
|
+
* `PATH OVERLAP` lines for this session against every live peer.
|
|
175
|
+
*
|
|
176
|
+
* Kept a separate, separately-labelled line rather than folded into the slug or
|
|
177
|
+
* branch report, because the three collisions call for three different moves: a
|
|
178
|
+
* slug collision means stop, a branch collision means coordinate, a path
|
|
179
|
+
* collision means reorder — take the disjoint steps first if ordering allows,
|
|
180
|
+
* otherwise name it and continue. The register is advisory and never a lock.
|
|
181
|
+
*
|
|
182
|
+
* Pure over the record arrays so the fixture test needs no register on disk.
|
|
183
|
+
*/
|
|
184
|
+
export function path_overlap_lines(
|
|
185
|
+
others: readonly SessionRecord[],
|
|
186
|
+
here: { branch: string | null; roadmap_slug: string | null; owned_paths?: readonly string[] },
|
|
187
|
+
): string[] {
|
|
188
|
+
return classify_collisions(others, here)
|
|
189
|
+
.filter((c) => c.kind === 'path')
|
|
190
|
+
.map(
|
|
191
|
+
(c) =>
|
|
192
|
+
` PATH OVERLAP ${c.record.session_id} · ${(c.paths ?? []).length} shared path(s): ` +
|
|
193
|
+
`${(c.paths ?? []).join(', ')}`,
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
171
197
|
function cmd_list(argv: string[], root: string): number {
|
|
172
198
|
const as_json = argv.includes('--json');
|
|
173
199
|
const dir = register_dir(root);
|
|
@@ -229,6 +255,21 @@ function cmd_list(argv: string[], root: string): number {
|
|
|
229
255
|
);
|
|
230
256
|
}
|
|
231
257
|
write_held_branches(held, filtered);
|
|
258
|
+
// The path axis. Silent when this session has declared no owned paths, which
|
|
259
|
+
// is every session that has not run `sessions:claim --paths`.
|
|
260
|
+
const sid = env_session_id();
|
|
261
|
+
const mine = sid === null ? undefined : records.find((r) => r.session_id === sid);
|
|
262
|
+
const overlaps = path_overlap_lines(
|
|
263
|
+
records.filter((r) => r.session_id !== mine?.session_id),
|
|
264
|
+
{
|
|
265
|
+
branch: mine?.branch ?? null,
|
|
266
|
+
roadmap_slug: mine?.roadmap_slug ?? null,
|
|
267
|
+
...(mine?.owned_paths !== undefined ? { owned_paths: mine.owned_paths } : {}),
|
|
268
|
+
},
|
|
269
|
+
);
|
|
270
|
+
if (overlaps.length > 0) {
|
|
271
|
+
process.stdout.write(`\n${overlaps.join('\n')}\n`);
|
|
272
|
+
}
|
|
232
273
|
process.stdout.write(
|
|
233
274
|
'Advisory only — this register is not a lock, and an idle session\n' +
|
|
234
275
|
'disappears from it after its TTL although its user may return.\n',
|
|
@@ -432,7 +473,15 @@ function cmd_claim(argv: string[], root: string): number {
|
|
|
432
473
|
);
|
|
433
474
|
return 0;
|
|
434
475
|
}
|
|
435
|
-
const
|
|
476
|
+
const paths_idx = argv.indexOf('--paths');
|
|
477
|
+
const paths_arg = paths_idx >= 0 ? (argv[paths_idx + 1] ?? '') : '';
|
|
478
|
+
const owned_paths = paths_arg
|
|
479
|
+
.split(',')
|
|
480
|
+
.map((x) => x.trim())
|
|
481
|
+
.filter((x) => x !== '');
|
|
482
|
+
// The slug is the first bare token that is not the VALUE of --paths; without
|
|
483
|
+
// this the comma list would be read as the slug on `claim --paths a,b road-to-x`.
|
|
484
|
+
const slug = argv.find((a, i) => !a.startsWith('-') && i !== paths_idx + 1);
|
|
436
485
|
if (slug === undefined || slug.trim() === '') {
|
|
437
486
|
return usage();
|
|
438
487
|
}
|
|
@@ -476,7 +525,19 @@ function cmd_claim(argv: string[], root: string): number {
|
|
|
476
525
|
try {
|
|
477
526
|
write_atomic(
|
|
478
527
|
target,
|
|
479
|
-
`${JSON.stringify(
|
|
528
|
+
`${JSON.stringify(
|
|
529
|
+
{
|
|
530
|
+
slug: slug.trim(),
|
|
531
|
+
written_at: iso_now(),
|
|
532
|
+
session_id: sid,
|
|
533
|
+
// Absent, not empty, when nothing was declared: the whole
|
|
534
|
+
// additive guarantee of `owned_paths` rests on the field not
|
|
535
|
+
// being written at all in the ordinary case.
|
|
536
|
+
...(owned_paths.length > 0 ? { paths: owned_paths } : {}),
|
|
537
|
+
},
|
|
538
|
+
null,
|
|
539
|
+
2,
|
|
540
|
+
)}\n`,
|
|
480
541
|
);
|
|
481
542
|
} catch (exc) {
|
|
482
543
|
process.stderr.write(`sessions:claim: could not write the claim — ${String(exc)}\n`);
|
|
@@ -484,6 +545,9 @@ function cmd_claim(argv: string[], root: string): number {
|
|
|
484
545
|
}
|
|
485
546
|
process.stdout.write(
|
|
486
547
|
`Claimed "${slug.trim()}" for this session. It becomes visible to other\n` +
|
|
548
|
+
(owned_paths.length > 0
|
|
549
|
+
? `Declared ${owned_paths.length} owned path(s); peers sharing one are labelled PATH OVERLAP.\n`
|
|
550
|
+
: '') +
|
|
487
551
|
'sessions on the next turn, when the heartbeat lifts it into the register.\n' +
|
|
488
552
|
(sid === null
|
|
489
553
|
? 'NOTE: this host exports no session id, so the claim is scoped to this\n' +
|