@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,36 @@
|
|
|
1
|
+
# Source-led port — adopt the mechanics, do not re-derive them
|
|
2
|
+
|
|
3
|
+
Pulled when `ui_authority.reference_maturity` is `runnable-artifact`. Contract:
|
|
4
|
+
[`ui-authority`](../../../../../docs/contracts/ui-authority.md).
|
|
5
|
+
|
|
6
|
+
When `reference_maturity` is `runnable-artifact`, the artifact's own markup, CSS
|
|
7
|
+
and JS is the data basis and adapting it is the DEFAULT. A from-scratch
|
|
8
|
+
re-derivation is a deviation and needs the same confirmation as a swapped
|
|
9
|
+
control (per [`design-fidelity`](../../rules/design-fidelity.md)).
|
|
10
|
+
|
|
11
|
+
Account for every mechanic the source carries, in the engine's own vocabulary
|
|
12
|
+
(`COVERAGE_BUCKETS`, shared rather than copied — `agent-config ui:audit`
|
|
13
|
+
re-exports it):
|
|
14
|
+
|
|
15
|
+
- **`honoured`** — carried across intact.
|
|
16
|
+
- **`translated`** — expressed differently in the target stack, same observable
|
|
17
|
+
behaviour. Name the substitution.
|
|
18
|
+
- **`flagged`** — cannot be carried; say so explicitly.
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
A MECHANIC THAT IS PRESENT IN THE SOURCE AND ABSENT FROM THE OUTPUT WITH NO
|
|
22
|
+
`flagged` ENTRY IS A SILENT DROP. TARGET: ZERO.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`container-type` / `@container`, `clamp()` type scales, `:has()` state
|
|
26
|
+
selectors, `IntersectionObserver` reveals and view transitions are the classes
|
|
27
|
+
that vanish most often, because each one *looks* like decoration and is
|
|
28
|
+
actually behaviour. `tests/eval/frontend-corpus/near-miss/artifact-source-not-rederived`
|
|
29
|
+
is the pinned case: three mechanics, and an output that silently becomes a plain
|
|
30
|
+
media-query grid fails it.
|
|
31
|
+
|
|
32
|
+
**Maturity itself is not decided here.** `reference_maturity` arrives on the
|
|
33
|
+
authority object, and per-value provenance for a comp belongs to
|
|
34
|
+
`road-to-frontend-fidelity-calibration` Phases 0 and 2. This skill adds no
|
|
35
|
+
second maturity discriminator.
|
|
36
|
+
|
|
@@ -3,6 +3,11 @@ model_tier: lite
|
|
|
3
3
|
name: file-editor
|
|
4
4
|
description: "Use when opening edited files in the user's IDE. Reads settings from .agent-settings.yml to determine IDE and whether auto-open is enabled."
|
|
5
5
|
domain: process
|
|
6
|
+
scope:
|
|
7
|
+
write:
|
|
8
|
+
- pattern: "**"
|
|
9
|
+
access: "write"
|
|
10
|
+
verification_reason: "the write target IS the caller's argument — this skill edits whatever path it is pointed at, so its scope is the tree by construction. A narrower glob would be false, not tighter."
|
|
6
11
|
execution:
|
|
7
12
|
type: assisted
|
|
8
13
|
handler: shell
|
|
@@ -61,7 +61,7 @@ or [`fix-pr-comments`](../../commands/fix-pr-comments.md) instead.
|
|
|
61
61
|
### 2. Verify readiness
|
|
62
62
|
|
|
63
63
|
Run the end-of-work gate before presenting any options — see
|
|
64
|
-
[`verify-
|
|
64
|
+
[`verify-completion-evidence`](../verify-completion-evidence/SKILL.md).
|
|
65
65
|
Steps 1–3 run only when `quality.local_auto_run: true`; under the
|
|
66
66
|
default (`false` / missing) skip them without asking — the user runs
|
|
67
67
|
quality tools manually, remote CI on the PR is the authoritative gate,
|
|
@@ -226,7 +226,7 @@ After the chosen option completes, report:
|
|
|
226
226
|
|
|
227
227
|
## When to hand over to another skill / command
|
|
228
228
|
|
|
229
|
-
* Final pre-merge verification → [`verify-
|
|
229
|
+
* Final pre-merge verification → [`verify-completion-evidence`](../verify-completion-evidence/SKILL.md)
|
|
230
230
|
* Rebasing the stack before PR → [`prepare-for-review`](../../commands/prepare-for-review.md)
|
|
231
231
|
* Writing the commit for any last-minute tweaks →
|
|
232
232
|
[`commit`](../../commands/commit.md),
|
|
@@ -3,6 +3,9 @@ model_tier: medium
|
|
|
3
3
|
name: git-workflow
|
|
4
4
|
description: "Use when working with Git — branch naming, commit messages, PR creation, rebasing, or the code review process — even when the user says 'push this' or 'merge the branch' without naming Git."
|
|
5
5
|
domain: process
|
|
6
|
+
scope:
|
|
7
|
+
write: []
|
|
8
|
+
verification_reason: "execution.handler is internal, so this skill spawns no subprocess — writes happen through the agent's declared allowed_tools. No command can prove a scope the skill never executes."
|
|
6
9
|
execution:
|
|
7
10
|
type: assisted
|
|
8
11
|
handler: internal
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
model_tier: medium
|
|
3
3
|
name: github-ci
|
|
4
|
-
description: "
|
|
4
|
+
description: "When working with GitHub Actions — workflow YAML, quality gates, test matrices, deployment triggers, reusable workflows — even when the user just says 'my CI is failing' or 'add a check'."
|
|
5
5
|
domain: devops
|
|
6
6
|
workspaces:
|
|
7
7
|
- engineering
|
|
@@ -12,6 +12,9 @@ trust:
|
|
|
12
12
|
level: professional
|
|
13
13
|
install:
|
|
14
14
|
removable: true
|
|
15
|
+
scope:
|
|
16
|
+
write: []
|
|
17
|
+
verification_reason: "execution declares no handler, so this skill runs nothing of its own — every write is the calling agent's, under the rules that govern it. No command can prove a scope the skill never executes."
|
|
15
18
|
execution:
|
|
16
19
|
type: manual
|
|
17
20
|
---
|
|
@@ -12,6 +12,9 @@ trust:
|
|
|
12
12
|
level: professional
|
|
13
13
|
install:
|
|
14
14
|
removable: true
|
|
15
|
+
scope:
|
|
16
|
+
write: []
|
|
17
|
+
verification_reason: "execution declares no handler, so this skill runs nothing of its own — every write is the calling agent's, under the rules that govern it. No command can prove a scope the skill never executes."
|
|
15
18
|
execution:
|
|
16
19
|
type: manual
|
|
17
20
|
---
|
|
@@ -12,6 +12,9 @@ trust:
|
|
|
12
12
|
level: experimental
|
|
13
13
|
install:
|
|
14
14
|
removable: true
|
|
15
|
+
scope:
|
|
16
|
+
write: []
|
|
17
|
+
verification_reason: "execution declares no handler, so this skill runs nothing of its own — every write is the calling agent's, under the rules that govern it. No command can prove a scope the skill never executes."
|
|
15
18
|
execution:
|
|
16
19
|
type: manual
|
|
17
20
|
---
|
|
@@ -12,6 +12,9 @@ trust:
|
|
|
12
12
|
level: experimental
|
|
13
13
|
install:
|
|
14
14
|
removable: true
|
|
15
|
+
scope:
|
|
16
|
+
write: []
|
|
17
|
+
verification_reason: "execution declares no handler, so this skill runs nothing of its own — every write is the calling agent's, under the rules that govern it. No command can prove a scope the skill never executes."
|
|
15
18
|
execution:
|
|
16
19
|
type: manual
|
|
17
20
|
---
|
|
@@ -12,6 +12,9 @@ trust:
|
|
|
12
12
|
level: experimental
|
|
13
13
|
install:
|
|
14
14
|
removable: true
|
|
15
|
+
scope:
|
|
16
|
+
write: []
|
|
17
|
+
verification_reason: "execution declares no handler, so this skill runs nothing of its own — every write is the calling agent's, under the rules that govern it. No command can prove a scope the skill never executes."
|
|
15
18
|
execution:
|
|
16
19
|
type: manual
|
|
17
20
|
---
|
|
@@ -143,3 +143,13 @@ Post-mortem owner: <role>
|
|
|
143
143
|
- Do NOT close an incident without a post-mortem owner assigned.
|
|
144
144
|
- Do NOT edit the timeline after the fact; corrections are new
|
|
145
145
|
entries.
|
|
146
|
+
|
|
147
|
+
## See also
|
|
148
|
+
|
|
149
|
+
- [`alerting-doctrine`](../alerting-doctrine/SKILL.md) — what earned the page
|
|
150
|
+
that opened this incident, and the runbook contract the first responder reads.
|
|
151
|
+
A page arrives with an owner, a runbook and a first diagnostic step; if it did
|
|
152
|
+
not, that is a configuration defect to record in the post-mortem.
|
|
153
|
+
- [`logging-monitoring`](../logging-monitoring/SKILL.md) — the signal posture the
|
|
154
|
+
incident is being diagnosed through, and why a `proposed` threshold is not a
|
|
155
|
+
breach.
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
---
|
|
2
|
+
model_tier: medium
|
|
3
|
+
name: js-library-packaging
|
|
4
|
+
description: "Use when a JavaScript/TypeScript package is consumed by another package — exports map, peer vs. direct dependencies, files allow-list, and whether it should be built at all."
|
|
5
|
+
domain: engineering
|
|
6
|
+
workspaces:
|
|
7
|
+
- engineering
|
|
8
|
+
packs:
|
|
9
|
+
- engineering-base
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# js-library-packaging
|
|
13
|
+
|
|
14
|
+
> **Pack placement.** `engineering-base`. The step asked for it to be *suggested by* the
|
|
15
|
+
> `react` and `typescript` packs, and the skill schema carries no `suggested_by` key — so the
|
|
16
|
+
> intent is recorded here rather than expressed in frontmatter that would fail validation.
|
|
17
|
+
> A React or TypeScript consumer receives this skill through `engineering-base`, which both
|
|
18
|
+
> of those packs require.
|
|
19
|
+
|
|
20
|
+
The JavaScript twin of [`composer-packages`](../composer-packages/SKILL.md). A component is
|
|
21
|
+
a file; a **library** is a package with a public surface, and that surface is declared in
|
|
22
|
+
`package.json` rather than inferred. Most of the failures below are silent at author time
|
|
23
|
+
and loud at the consumer's — which is why the surface is read, not assumed.
|
|
24
|
+
|
|
25
|
+
## The Iron Law
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
`react` AND `react-dom` ARE peerDependencies. NEVER dependencies.
|
|
29
|
+
`types` IS THE FIRST KEY OF EVERY CONDITIONS OBJECT.
|
|
30
|
+
DECIDE buildable-VS-source-consumed BEFORE WRITING THE EXPORTS MAP.
|
|
31
|
+
NEVER HAND-BUMP A VERSION.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## When to use
|
|
35
|
+
|
|
36
|
+
A package in the repository is imported by another package, or is about to be published:
|
|
37
|
+
an `exports` map is being written or changed, a hook fails at runtime with *"invalid hook
|
|
38
|
+
call"*, an install fails on a `workspace:` range, a release needs cutting, or the
|
|
39
|
+
buildable-vs-source question has not been answered yet.
|
|
40
|
+
|
|
41
|
+
## Procedure
|
|
42
|
+
|
|
43
|
+
1. **Answer buildable-vs-source-consumed FIRST.** It determines the exports map, the `files`
|
|
44
|
+
list, and whether a build step exists at all — deciding it after writing the map means
|
|
45
|
+
rewriting the map.
|
|
46
|
+
- **Source of truth:** is the package published to a registry, or only consumed inside
|
|
47
|
+
this workspace?
|
|
48
|
+
- **Verify:** the exports targets all point into one of the two worlds (`src/` or the
|
|
49
|
+
build directory), never a mix.
|
|
50
|
+
2. **Read the surface rather than asserting it.** Run the check below over the package root.
|
|
51
|
+
- **Source of truth:** `package.json` — `exports`, `dependencies`, `peerDependencies`,
|
|
52
|
+
`files`, `private`, `publishConfig`.
|
|
53
|
+
- **Verify:** zero `error`-severity findings.
|
|
54
|
+
3. **Fix peer placement before anything else.** A library carrying `react` in
|
|
55
|
+
`dependencies` gives the consumer a second copy of React.
|
|
56
|
+
- **Verify:** `react` and `react-dom` appear under `peerDependencies` only.
|
|
57
|
+
4. **Order the conditions.** `types` first, then `import` / `require`.
|
|
58
|
+
- **Verify:** the check reports no `types-not-first`.
|
|
59
|
+
5. **Cut the release through the repository's own mechanism** — never by editing a version
|
|
60
|
+
field. See § Release.
|
|
61
|
+
- **Verify:** the version change is produced by the tool the repository already carries.
|
|
62
|
+
|
|
63
|
+
## Read the surface
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
check_package_surface <library-root> [<library-root> …]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`scripts/check_package_surface.ts` beside this skill. Deterministic, JSON on stdout, no
|
|
70
|
+
network and no subprocess. It reports:
|
|
71
|
+
|
|
72
|
+
| Code | Severity | Why |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| `peer-as-dependency` | error | two copies of React in one tree break hooks at runtime, with a message that names neither package |
|
|
75
|
+
| `export-target-missing` | error | the manifest promises a file the package does not ship |
|
|
76
|
+
| `no-exports-map` | warn | `main`/`module` without `exports` — the entry point resolves by bundler convention, not by declaration |
|
|
77
|
+
| `types-not-first` | warn | conditions match in declaration order, so a later `types` is never seen and the package silently ships untyped |
|
|
78
|
+
| `workspace-range-publishable` | warn | a `workspace:` range does not resolve outside the workspace; published, the consumer's install fails |
|
|
79
|
+
|
|
80
|
+
**It classifies from the declared export targets, never from a directory name.** A package
|
|
81
|
+
directory called `ui-lib-vite` is not evidence about Vite, and one called `buildable` is not
|
|
82
|
+
evidence that anything builds. A **mixed** declaration is reported as `undeclared` rather
|
|
83
|
+
than resolved to a guess — declaring both is the ambiguity worth surfacing.
|
|
84
|
+
|
|
85
|
+
**What it does not do:** it never compiles and never runs a bundler, so it cannot tell you
|
|
86
|
+
the declared layout is producible. A checker that grew a parser would report compile errors
|
|
87
|
+
as packaging errors, and the two have different fixes.
|
|
88
|
+
|
|
89
|
+
## Buildable vs. source-consumed
|
|
90
|
+
|
|
91
|
+
| | source-consumed | buildable |
|
|
92
|
+
|---|---|---|
|
|
93
|
+
| exports point at | `src/` | the build directory |
|
|
94
|
+
| build step | none | one, and it must run before publish |
|
|
95
|
+
| `files` | not needed (nothing published) | the build directory, as an allow-list |
|
|
96
|
+
| `private` | `true` on a workspace-only package | absent; `publishConfig.access` set instead |
|
|
97
|
+
| cost | consumer compiles it | a build to maintain, and output that can go stale |
|
|
98
|
+
|
|
99
|
+
**Default to source-consumed inside a workspace.** A build step exists to serve publication;
|
|
100
|
+
adding one for a package nobody publishes is a maintenance cost with no consumer.
|
|
101
|
+
|
|
102
|
+
## Release
|
|
103
|
+
|
|
104
|
+
Read the repository, then take exactly one branch — **Class A**, per
|
|
105
|
+
[`standards-from-config`](../standards-from-config/SKILL.md): the config *is* the answer.
|
|
106
|
+
|
|
107
|
+
1. **`.changeset/` present → changesets.** Add a changeset describing the change and let the
|
|
108
|
+
release job bump and publish. Never edit `version` by hand.
|
|
109
|
+
2. **A task runner with a release command (e.g. `nx release`) → that command.** It owns
|
|
110
|
+
version, tag, and changelog together; splitting them by hand desynchronises them.
|
|
111
|
+
3. **Neither present → none configured.** **Propose** a mechanism and stop. Do not hand-bump:
|
|
112
|
+
a manually edited version has no changelog entry and no tag, so the next release cannot
|
|
113
|
+
tell what shipped.
|
|
114
|
+
|
|
115
|
+
A breaking change carries the `!` marker and the footer — see
|
|
116
|
+
[`conventional-commits-writing`](../conventional-commits-writing/SKILL.md). The marker is
|
|
117
|
+
what a release tool reads to decide the major bump, so omitting it publishes a breaking
|
|
118
|
+
change as a patch.
|
|
119
|
+
|
|
120
|
+
## Output format
|
|
121
|
+
|
|
122
|
+
1. State the classification (source-consumed / built surface / undeclared) and where it was
|
|
123
|
+
read from.
|
|
124
|
+
2. List every `error` finding with its fix, then the warnings.
|
|
125
|
+
3. Name the release branch taken and the evidence in the repository for it.
|
|
126
|
+
4. Say explicitly what was not checked — buildability, types, runtime behaviour.
|
|
127
|
+
|
|
128
|
+
## Gotchas
|
|
129
|
+
|
|
130
|
+
- **"Invalid hook call" names neither package.** The developer sees a React error and looks
|
|
131
|
+
at their component; the cause is a library shipping its own React. This is why peer
|
|
132
|
+
placement is an error and not a warning.
|
|
133
|
+
- **Condition order is silent.** `{ "import": …, "types": … }` type-checks fine at author
|
|
134
|
+
time and ships untyped to the consumer.
|
|
135
|
+
- **A stale build directory passes every metadata check.** The manifest points at files that
|
|
136
|
+
exist; nothing says they match `src/`. Only a real build proves that.
|
|
137
|
+
- **`files` is an allow-list, not a deny-list.** Adding a directory to the package means
|
|
138
|
+
adding it here, and forgetting is invisible until a consumer imports a missing path.
|
|
139
|
+
- **A `workspace:` range is not a version.** It resolves in the workspace and nowhere else.
|
|
140
|
+
|
|
141
|
+
## Do NOT
|
|
142
|
+
|
|
143
|
+
- Do NOT put `react` or `react-dom` in `dependencies`.
|
|
144
|
+
- Do NOT write an exports map before answering buildable-vs-source-consumed.
|
|
145
|
+
- Do NOT place `types` after `import` or `require`.
|
|
146
|
+
- Do NOT edit a `version` field by hand, in any of the three release branches.
|
|
147
|
+
- Do NOT claim the package builds because the check passed — it never ran a build.
|
|
148
|
+
|
|
149
|
+
## Security constraints
|
|
150
|
+
|
|
151
|
+
`scripts/check_package_surface.ts` is **read-only and offline by construction**, and the
|
|
152
|
+
constraint is worth stating because a packaging tool is a tempting place to lose it:
|
|
153
|
+
|
|
154
|
+
- **No network.** It never resolves a version, queries a registry, or checks whether a name
|
|
155
|
+
is taken. Every verdict comes from the manifest in front of it.
|
|
156
|
+
- **No subprocess.** No package manager, no bundler, no compiler. It cannot install, build,
|
|
157
|
+
or publish, so running it on an untrusted repository executes none of that repository's code
|
|
158
|
+
— which a package manager's lifecycle scripts would.
|
|
159
|
+
- **No writes.** It reads `package.json` and tests path existence. It never edits a manifest,
|
|
160
|
+
so it can never "fix" a version field, which is the one thing § Release forbids.
|
|
161
|
+
- **Paths come from the caller, targets from the manifest.** Export targets are resolved
|
|
162
|
+
relative to the given root and used only for an existence test; nothing is read from them.
|
|
163
|
+
|
|
164
|
+
Widening any of these turns a metadata reader into something that runs a third party's code.
|
|
165
|
+
If a future check needs a build, it belongs in a separate integration test with its own
|
|
166
|
+
declared cost — never here.
|
|
167
|
+
|
|
168
|
+
## See also
|
|
169
|
+
|
|
170
|
+
- [`composer-packages`](../composer-packages/SKILL.md) — the PHP twin; same surface discipline, different manifest.
|
|
171
|
+
- [`standards-from-config`](../standards-from-config/SKILL.md) — the Class-A rule the § Release branch follows.
|
|
172
|
+
- [`conventional-commits-writing`](../conventional-commits-writing/SKILL.md) — the `!` marker a release tool reads.
|
|
173
|
+
- [`ui-component-architect`](../ui-component-architect/SKILL.md) — the component inside the library; this skill is the package around it.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "js-library-packaging",
|
|
3
|
+
"last_eval": "2026-08-23",
|
|
4
|
+
"description": "5 should-trigger + 5 should-not-trigger. Should-trigger covers the publish ask, the runtime symptom whose cause is packaging (invalid hook call), the exports-map question, the workspace-range install failure, and a DE phrasing. Should-not-trigger covers the near-miss neighbours this skill is one word away from: authoring the component itself (ui-component-architect), the PHP twin (composer-packages), a commit-message question (conventional-commits-writing), a monorepo task-graph question, and a bundler performance question — none of which are package-surface work.",
|
|
5
|
+
"queries": [
|
|
6
|
+
{ "q": "publish our ui package", "trigger": true },
|
|
7
|
+
{ "q": "why does my hook say invalid hook call", "trigger": true },
|
|
8
|
+
{ "q": "what should the exports map for this library look like?", "trigger": true },
|
|
9
|
+
{ "q": "the install fails on a workspace: range after publishing", "trigger": true },
|
|
10
|
+
{ "q": "wie veröffentliche ich unser Komponenten-Paket richtig?", "trigger": true },
|
|
11
|
+
{ "q": "build me a Button component with a loading state", "trigger": false },
|
|
12
|
+
{ "q": "how do I publish a composer package?", "trigger": false },
|
|
13
|
+
{ "q": "write the commit message for this breaking change", "trigger": false },
|
|
14
|
+
{ "q": "why is turbo rebuilding everything on every commit?", "trigger": false },
|
|
15
|
+
{ "q": "our bundle is 400kb, what should I lazy-load?", "trigger": false }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* check_package_surface — read a JavaScript library's PACKAGE SURFACE and report what its
|
|
3
|
+
* own `package.json` says, without compiling anything.
|
|
4
|
+
*
|
|
5
|
+
* Scope, stated because the boundary is what keeps this useful: the subject is
|
|
6
|
+
* `package.json` **semantics** — the exports map, peer-dependency placement, the files
|
|
7
|
+
* allow-list, publish intent. It is NOT a build, not a type-check, and not proof that any
|
|
8
|
+
* bundler can produce the declared layout. A checker that grew a parser would start
|
|
9
|
+
* reporting compile errors as packaging errors, and the two have different fixes.
|
|
10
|
+
*
|
|
11
|
+
* The classification (`source-consumed` vs `built-surface`) is read from the DECLARED
|
|
12
|
+
* EXPORT TARGETS, never from the directory name. A fixture called `ui-lib-vite` is not
|
|
13
|
+
* evidence about Vite, and a directory called `buildable` is not evidence that anything
|
|
14
|
+
* builds — both council reviewers named that inference as the thing to avoid.
|
|
15
|
+
*
|
|
16
|
+
* Output is JSON on stdout. No network, no subprocess.
|
|
17
|
+
*
|
|
18
|
+
* Usage:
|
|
19
|
+
* check_package_surface <library-root> [<library-root> …]
|
|
20
|
+
* check_package_surface --self-test
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import * as fs from 'node:fs';
|
|
24
|
+
import * as path from 'node:path';
|
|
25
|
+
|
|
26
|
+
export type Severity = 'error' | 'warn';
|
|
27
|
+
|
|
28
|
+
export interface Finding {
|
|
29
|
+
readonly code: string;
|
|
30
|
+
readonly severity: Severity;
|
|
31
|
+
readonly message: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type Classification = 'source-consumed' | 'built-surface' | 'undeclared';
|
|
35
|
+
|
|
36
|
+
export interface SurfaceReport {
|
|
37
|
+
readonly root: string;
|
|
38
|
+
readonly name: string | null;
|
|
39
|
+
readonly classification: Classification;
|
|
40
|
+
readonly findings: readonly Finding[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Peer-only packages: a library that bundles these ships a second copy of them. */
|
|
44
|
+
const PEER_ONLY = ['react', 'react-dom'] as const;
|
|
45
|
+
|
|
46
|
+
const asRecord = (v: unknown): Record<string, unknown> =>
|
|
47
|
+
v !== null && typeof v === 'object' && !Array.isArray(v) ? (v as Record<string, unknown>) : {};
|
|
48
|
+
|
|
49
|
+
/** Every string target reachable in an exports map, at any nesting depth. */
|
|
50
|
+
export const exportTargets = (exportsField: unknown): string[] => {
|
|
51
|
+
const out: string[] = [];
|
|
52
|
+
const walk = (node: unknown): void => {
|
|
53
|
+
if (typeof node === 'string') {
|
|
54
|
+
out.push(node);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (Array.isArray(node)) {
|
|
58
|
+
for (const n of node) walk(n);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
for (const v of Object.values(asRecord(node))) walk(v);
|
|
62
|
+
};
|
|
63
|
+
walk(exportsField);
|
|
64
|
+
return out;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Classify from the declared targets.
|
|
69
|
+
*
|
|
70
|
+
* A package whose targets all point into a source directory is source-consumed; one whose
|
|
71
|
+
* targets point at build output is a built surface. **Mixed is `undeclared`, not a guess** —
|
|
72
|
+
* a package that declares both is making a statement this check cannot resolve, and picking
|
|
73
|
+
* one silently would hide exactly the ambiguity worth reporting.
|
|
74
|
+
*/
|
|
75
|
+
export const classify = (targets: readonly string[]): Classification => {
|
|
76
|
+
if (targets.length === 0) return 'undeclared';
|
|
77
|
+
const built = targets.filter((t) => /(^|\/)(dist|build|lib|out)\//.test(t));
|
|
78
|
+
if (built.length === targets.length) return 'built-surface';
|
|
79
|
+
if (built.length === 0) return 'source-consumed';
|
|
80
|
+
return 'undeclared';
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const checkPackage = (root: string): SurfaceReport => {
|
|
84
|
+
const manifestPath = path.join(root, 'package.json');
|
|
85
|
+
let manifest: Record<string, unknown> = {};
|
|
86
|
+
try {
|
|
87
|
+
manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8')) as Record<string, unknown>;
|
|
88
|
+
} catch {
|
|
89
|
+
return {
|
|
90
|
+
root,
|
|
91
|
+
name: null,
|
|
92
|
+
classification: 'undeclared',
|
|
93
|
+
findings: [{ code: 'no-manifest', severity: 'error', message: `no readable package.json at ${manifestPath}` }],
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const findings: Finding[] = [];
|
|
98
|
+
const deps = asRecord(manifest['dependencies']);
|
|
99
|
+
const peers = asRecord(manifest['peerDependencies']);
|
|
100
|
+
const exportsField = manifest['exports'];
|
|
101
|
+
const targets = exportTargets(exportsField);
|
|
102
|
+
|
|
103
|
+
// (a) — the "invalid hook call" failure. Two copies of React in one tree break hooks at
|
|
104
|
+
// runtime with an error that names neither package, which is why this is an error and
|
|
105
|
+
// not a warning.
|
|
106
|
+
for (const p of PEER_ONLY) {
|
|
107
|
+
if (Object.prototype.hasOwnProperty.call(deps, p)) {
|
|
108
|
+
findings.push({
|
|
109
|
+
code: 'peer-as-dependency',
|
|
110
|
+
severity: 'error',
|
|
111
|
+
message: `\`${p}\` is in dependencies; a library must declare it as a peerDependency or the consumer gets two copies (the "invalid hook call" failure)`,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// (b) — legacy entry fields with no exports map: the resolution the consumer gets then
|
|
117
|
+
// depends on their bundler rather than on this manifest.
|
|
118
|
+
const hasLegacy = ['main', 'module', 'browser'].some((k) => typeof manifest[k] === 'string');
|
|
119
|
+
if (exportsField === undefined && hasLegacy) {
|
|
120
|
+
findings.push({
|
|
121
|
+
code: 'no-exports-map',
|
|
122
|
+
severity: 'warn',
|
|
123
|
+
message: 'main/module present without an exports map — the entry point resolves by bundler convention, not by declaration',
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// (c) — `types` must be the FIRST key of a conditions object. Conditional exports are
|
|
128
|
+
// matched in declaration order, so a `types` key placed after `import` is skipped by
|
|
129
|
+
// resolvers that match `import` first, and the package silently ships untyped.
|
|
130
|
+
const walkConditions = (node: unknown, at: string): void => {
|
|
131
|
+
const rec = asRecord(node);
|
|
132
|
+
const keys = Object.keys(rec);
|
|
133
|
+
if (keys.includes('types') && keys[0] !== 'types') {
|
|
134
|
+
findings.push({
|
|
135
|
+
code: 'types-not-first',
|
|
136
|
+
severity: 'warn',
|
|
137
|
+
message: `\`types\` is not the first condition at \`${at}\` (order matters: a resolver matching \`${keys[0] ?? ''}\` first never sees it)`,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
for (const [k, v] of Object.entries(rec)) {
|
|
141
|
+
if (typeof v === 'object' && v !== null) walkConditions(v, `${at}${k}/`);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
if (exportsField !== undefined) walkConditions(exportsField, 'exports.');
|
|
145
|
+
|
|
146
|
+
// (d) — a `workspace:` range only resolves inside the workspace. Published with no
|
|
147
|
+
// `private: true` and no publishConfig, the consumer's install fails on a protocol
|
|
148
|
+
// their registry has never heard of.
|
|
149
|
+
const allDeps = { ...deps, ...asRecord(manifest['devDependencies']), ...peers };
|
|
150
|
+
const workspaceRanges = Object.entries(allDeps).filter(([, v]) => typeof v === 'string' && v.startsWith('workspace:'));
|
|
151
|
+
if (
|
|
152
|
+
workspaceRanges.length > 0 &&
|
|
153
|
+
manifest['private'] !== true &&
|
|
154
|
+
manifest['publishConfig'] === undefined
|
|
155
|
+
) {
|
|
156
|
+
findings.push({
|
|
157
|
+
code: 'workspace-range-publishable',
|
|
158
|
+
severity: 'warn',
|
|
159
|
+
message: `${String(workspaceRanges.length)} \`workspace:\` range(s) in a package that is neither private nor carrying publishConfig — the protocol does not resolve outside the workspace`,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// A declared target that is not in the tree is the drift the whole surface rests on.
|
|
164
|
+
for (const t of targets) {
|
|
165
|
+
if (!t.startsWith('.')) continue;
|
|
166
|
+
if (!fs.existsSync(path.join(root, t))) {
|
|
167
|
+
findings.push({
|
|
168
|
+
code: 'export-target-missing',
|
|
169
|
+
severity: 'error',
|
|
170
|
+
message: `exports target \`${t}\` does not exist in the package`,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const name = typeof manifest['name'] === 'string' ? manifest['name'] : null;
|
|
176
|
+
return { root, name, classification: classify(targets), findings };
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/** Registry item types deprecated in v4 — writing one produces an item the CLI cannot read. */
|
|
180
|
+
const DEPRECATED_ITEM_TYPES = ['registry:build', 'registry:mcp'] as const;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Check a `registry.json` (or a single `registry-item.json`) published by a library.
|
|
184
|
+
*
|
|
185
|
+
* Same subject as the manifest checks: what the file DECLARES. A registry item that lists
|
|
186
|
+
* `react` in `dependencies` reproduces the two-copies-of-React failure one layer up — the
|
|
187
|
+
* consumer's app already has React, and the item installs a second.
|
|
188
|
+
*/
|
|
189
|
+
export const checkRegistry = (file: string): Finding[] => {
|
|
190
|
+
let doc: Record<string, unknown> = {};
|
|
191
|
+
try {
|
|
192
|
+
doc = JSON.parse(fs.readFileSync(file, 'utf8')) as Record<string, unknown>;
|
|
193
|
+
} catch {
|
|
194
|
+
return [{ code: 'no-registry', severity: 'error', message: `no readable registry JSON at ${file}` }];
|
|
195
|
+
}
|
|
196
|
+
// Both shapes are legal: an index with `items`, or a single item.
|
|
197
|
+
const items = Array.isArray(doc['items']) ? (doc['items'] as unknown[]) : [doc];
|
|
198
|
+
const findings: Finding[] = [];
|
|
199
|
+
for (const raw of items) {
|
|
200
|
+
const item = asRecord(raw);
|
|
201
|
+
const name = typeof item['name'] === 'string' ? item['name'] : '(unnamed)';
|
|
202
|
+
const deps = Array.isArray(item['dependencies']) ? (item['dependencies'] as unknown[]) : [];
|
|
203
|
+
for (const d of deps) {
|
|
204
|
+
const dep = String(d).split('@')[0];
|
|
205
|
+
if (PEER_ONLY.includes(dep as (typeof PEER_ONLY)[number])) {
|
|
206
|
+
findings.push({
|
|
207
|
+
code: 'registry-item-bundles-peer',
|
|
208
|
+
severity: 'error',
|
|
209
|
+
message: `registry item \`${name}\` lists \`${dep}\` in dependencies; the consuming app already has it, and installing a second copy is the same "invalid hook call" failure one layer up`,
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
const type = typeof item['type'] === 'string' ? item['type'] : '';
|
|
214
|
+
if (DEPRECATED_ITEM_TYPES.includes(type as (typeof DEPRECATED_ITEM_TYPES)[number])) {
|
|
215
|
+
findings.push({
|
|
216
|
+
code: 'registry-item-deprecated-type',
|
|
217
|
+
severity: 'error',
|
|
218
|
+
message: `registry item \`${name}\` uses \`${type}\`, deprecated in v4 — use \`registry:base\` or \`registry:font\``,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return findings;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
const selfTest = (): number => {
|
|
226
|
+
let failed = 0;
|
|
227
|
+
const check = (label: string, cond: boolean): void => {
|
|
228
|
+
if (!cond) {
|
|
229
|
+
process.stderr.write(`❌ ${label}\n`);
|
|
230
|
+
failed += 1;
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
check('a source target classifies as source-consumed', classify(['./src/index.ts']) === 'source-consumed');
|
|
235
|
+
check('a dist target classifies as built-surface', classify(['./dist/index.js']) === 'built-surface');
|
|
236
|
+
check('a MIXED declaration is undeclared, never guessed', classify(['./src/index.ts', './dist/index.js']) === 'undeclared');
|
|
237
|
+
check('no targets is undeclared', classify([]) === 'undeclared');
|
|
238
|
+
check(
|
|
239
|
+
'nested conditions are all collected',
|
|
240
|
+
exportTargets({ '.': { types: './a.d.ts', import: './b.js' } }).length === 2,
|
|
241
|
+
);
|
|
242
|
+
|
|
243
|
+
process.stdout.write(
|
|
244
|
+
failed === 0 ? '✅ check_package_surface: self-test passed\n' : `❌ ${String(failed)} failure(s)\n`,
|
|
245
|
+
);
|
|
246
|
+
return failed === 0 ? 0 : 1;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
const main = (): number => {
|
|
250
|
+
const argv = process.argv.slice(2);
|
|
251
|
+
if (argv.includes('--self-test')) return selfTest();
|
|
252
|
+
const roots = argv.filter((a) => !a.startsWith('--'));
|
|
253
|
+
if (roots.length === 0) {
|
|
254
|
+
process.stderr.write('usage: check_package_surface <library-root> [...]\n');
|
|
255
|
+
return 2;
|
|
256
|
+
}
|
|
257
|
+
// A path ending in a registry file is checked as a registry, not as a package root —
|
|
258
|
+
// otherwise the caller has to know which of two checkers to reach for.
|
|
259
|
+
const reports = roots.map((r) =>
|
|
260
|
+
/registry(-item)?\.json$/.test(r)
|
|
261
|
+
? { root: r, name: null, classification: 'undeclared' as Classification, findings: checkRegistry(r) }
|
|
262
|
+
: checkPackage(r),
|
|
263
|
+
);
|
|
264
|
+
process.stdout.write(`${JSON.stringify({ reports }, null, 2)}\n`);
|
|
265
|
+
return reports.some((r) => r.findings.some((f) => f.severity === 'error')) ? 1 : 0;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
if (process.argv[1] !== undefined && process.argv[1].includes('check_package_surface')) {
|
|
269
|
+
process.exit(main());
|
|
270
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
model_tier: high
|
|
3
3
|
name: judge-artifact-completeness
|
|
4
|
-
description: "
|
|
4
|
+
description: "When scoring a roadmap, PR review, ADR, or ticket for completeness — risk, tests, migration, maintainability. Dispatched by /refine-ticket, /adr-create, /review-changes; never auto-gates."
|
|
5
5
|
domain: quality
|
|
6
6
|
workspaces:
|
|
7
7
|
- agent-config-maintainer
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
model_tier: high
|
|
3
3
|
name: judge-injection-defense
|
|
4
|
-
description: "
|
|
4
|
+
description: "When scoring whether an agent response defended against an injection — treated untrusted content as data, refused role-takeover, ignored fake boundaries. Inverted axis; never auto-gates."
|
|
5
5
|
domain: quality
|
|
6
6
|
workspaces:
|
|
7
7
|
- agent-config-maintainer
|