@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,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
model_tier: medium
|
|
3
|
+
name: storybook-workshop
|
|
4
|
+
description: "Use when a component library needs a workshop — one story per concept, JSDoc summaries the manifest can carry, stories run as tests, and an opt-in MCP channel that replaces guessing with querying."
|
|
5
|
+
domain: engineering
|
|
6
|
+
workspaces:
|
|
7
|
+
- engineering
|
|
8
|
+
packs:
|
|
9
|
+
- engineering-base
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# storybook-workshop
|
|
13
|
+
|
|
14
|
+
A story is not a demo. It is the component's **executable documentation**: the artefact an
|
|
15
|
+
agent reads to learn what the component accepts, and the harness that catches a contrast or
|
|
16
|
+
focus defect while the component is still in isolation. Stack-agnostic — the tool is
|
|
17
|
+
Storybook, the discipline is not.
|
|
18
|
+
|
|
19
|
+
Lifted out of [`react-shadcn-ui`](../react-shadcn-ui/SKILL.md) § Component workshop, which
|
|
20
|
+
keeps a pointer here rather than a copy.
|
|
21
|
+
|
|
22
|
+
## The Iron Law
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
ONE CONCEPT PER STORY. NEVER A "SizesAndVariants" STORY.
|
|
26
|
+
EVERY COMPONENT EXPORT AND EVERY STORY CARRIES A JSDoc @summary.
|
|
27
|
+
A STORY THAT SHOWS AN ANTI-PATTERN IS TAGGED `!manifest` OR THE AGENT LEARNS FROM IT.
|
|
28
|
+
STORIES RUN. A STORY NOBODY RUNS IS A SCREENSHOT WITH EXTRA STEPS.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## When to use
|
|
32
|
+
|
|
33
|
+
A shared component library exists or is being started, and one of: stories are being added,
|
|
34
|
+
an agent needs an inventory of what the library already offers, an a11y regression should be
|
|
35
|
+
caught in isolation rather than on a screen, or a Storybook MCP channel is available and
|
|
36
|
+
nobody has decided whether to use it.
|
|
37
|
+
|
|
38
|
+
**Skip it** for a handful of one-off components with a single consumer — the setup and
|
|
39
|
+
upkeep outweigh the return, and that judgement belongs to the reader rather than to this
|
|
40
|
+
skill.
|
|
41
|
+
|
|
42
|
+
## The story set — one concept per story
|
|
43
|
+
|
|
44
|
+
The state-coverage rows every reusable component owes become **story names**:
|
|
45
|
+
`Default`, `Loading`, `Empty`, `Error`, `Disabled`, `Dark`. One concept each.
|
|
46
|
+
|
|
47
|
+
A combined story — the canonical anti-pattern is `SizesAndVariants` — fails at both jobs it
|
|
48
|
+
has: a human cannot tell which knob caused what, and an agent reading it cannot learn a
|
|
49
|
+
single prop's effect because every value is co-present. Split it, one axis per story
|
|
50
|
+
(Storybook's own guidance on writing effective stories).
|
|
51
|
+
|
|
52
|
+
Stories render under the **same semantic tokens** as the app and the `.dark` class; a
|
|
53
|
+
hardcoded preview theme makes the workshop lie about what the component looks like in place.
|
|
54
|
+
|
|
55
|
+
## JSDoc `@summary` is required, and the reason is mechanical
|
|
56
|
+
|
|
57
|
+
The manifest an agent reads **truncates descriptions**. A component whose summary is a
|
|
58
|
+
paragraph arrives as a fragment, and the agent then infers the rest. So:
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
/** @summary A single-action button. Owns its own focus ring; never wrap in an anchor. */
|
|
62
|
+
export const Button = …
|
|
63
|
+
|
|
64
|
+
/** @summary Disabled — the click handler is not attached, not merely ignored. */
|
|
65
|
+
export const Disabled: StoryObj<typeof Button> = …
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
One sentence, front-loaded with the fact that changes a caller's decision.
|
|
69
|
+
|
|
70
|
+
## Before authoring — review what the library already has
|
|
71
|
+
|
|
72
|
+
The first step is not a story, it is an inventory. A library large enough to want a workshop
|
|
73
|
+
is large enough that the component being asked for already exists under another name, and a
|
|
74
|
+
second `Badge` is the failure this skill's own § Do NOT is trying to prevent elsewhere.
|
|
75
|
+
|
|
76
|
+
Read the existing stories — via the MCP channel below when it is available, by reading the
|
|
77
|
+
files otherwise — and only then decide whether anything needs writing.
|
|
78
|
+
|
|
79
|
+
## Procedure
|
|
80
|
+
|
|
81
|
+
1. **Inspect the existing story set before authoring anything.** Read what the library
|
|
82
|
+
already has — via the MCP channel below when it is available, otherwise by reading the
|
|
83
|
+
story files — and check the component against it by name and by shape.
|
|
84
|
+
- **Source of truth:** the story files, or `list-all-documentation` over a running Storybook.
|
|
85
|
+
- **Verify:** the component you are about to write does not already exist under another name.
|
|
86
|
+
2. **One story per concept**, named from the state set above.
|
|
87
|
+
- **Verify:** no story name joins two axes with `And`.
|
|
88
|
+
3. **Write the `@summary` on the export and on each story.**
|
|
89
|
+
- **Verify:** every export in the file has one, and each is a single sentence.
|
|
90
|
+
4. **Tag what must not be learned from** — see § Do NOT.
|
|
91
|
+
- **Verify:** every anti-pattern or deprecated story carries `tags: ['!manifest']`.
|
|
92
|
+
5. **Run them** — § Validate.
|
|
93
|
+
- **Verify:** the run reports pass/fail per story, and a11y findings land in the shape below.
|
|
94
|
+
|
|
95
|
+
## Validate — stories are tests
|
|
96
|
+
|
|
97
|
+
Run the project's story test command (the Vitest addon's `storybook test`, or whatever
|
|
98
|
+
`package.json` declares — read it, do not assume a name), then read the a11y result.
|
|
99
|
+
|
|
100
|
+
Write findings into `state.ui_review.a11y` in the shape
|
|
101
|
+
[`react-shadcn-ui`](../react-shadcn-ui/SKILL.md) § Review pass already defines:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
{violations: [{rule, selector, severity}, …], severity_floor?, accepted_violations?}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Use that shape exactly.** The engine de-duplicates on it, so a finding written in a
|
|
108
|
+
different shape is not a differently-formatted finding — it is a finding the engine counts
|
|
109
|
+
twice.
|
|
110
|
+
|
|
111
|
+
Browser tooling stays a **consumer dependency**, the same posture as `react-shadcn-ui`: this
|
|
112
|
+
package installs no browser and runs none. Absent the tooling, say the a11y half did not run
|
|
113
|
+
rather than reporting zero violations — an unrun check and a clean check produce the same
|
|
114
|
+
number and mean opposite things.
|
|
115
|
+
|
|
116
|
+
**One finding is decidable without a browser**, and it ships beside this skill:
|
|
117
|
+
`scripts/story_contrast_floor.ts` computes the WCAG 2.1 contrast ratio between two colours a
|
|
118
|
+
story *declares in its own args* and emits the same `(rule, selector, severity)` shape. It is
|
|
119
|
+
**not axe** and not a substitute for § Validate — it sees no rendered page, so role, focus,
|
|
120
|
+
and computed-style defects are all outside it, and a colour arriving through a token
|
|
121
|
+
indirection is invisible to it. It exists because "we cannot run axe here" is not a reason to
|
|
122
|
+
check nothing, and a declared colour pair is decidable from the file.
|
|
123
|
+
|
|
124
|
+
## Security constraints
|
|
125
|
+
|
|
126
|
+
`scripts/story_contrast_floor.ts` reads story files and computes arithmetic. No network, no
|
|
127
|
+
subprocess, no writes, and it never evaluates the story it reads — it matches declared literals
|
|
128
|
+
with a regex rather than importing the module, so running it over an untrusted repository
|
|
129
|
+
executes none of that repository's code. Importing a story to inspect its args would run
|
|
130
|
+
that file, which is the one thing a static checker must not start doing.
|
|
131
|
+
|
|
132
|
+
## MCP path — opt-in channel, never a dependency
|
|
133
|
+
|
|
134
|
+
When the project has `@storybook/addon-mcp` **and** a running Storybook,
|
|
135
|
+
[`existing-ui-audit`](../existing-ui-audit/SKILL.md) prefers the live tools —
|
|
136
|
+
`list-all-documentation`, then `get-documentation` for the components that matter — over the
|
|
137
|
+
hand-read inventory. **The live read wins; the file read is the fallback**, and the fallback
|
|
138
|
+
is never removed: an agent that cannot reach a running Storybook must still be able to
|
|
139
|
+
inventory the library.
|
|
140
|
+
|
|
141
|
+
**React-only while in preview.** Storybook's own MCP FAQ (docs 10.5) states the documentation
|
|
142
|
+
toolset supports React only during preview, so Vue, Angular, and Web Components take the
|
|
143
|
+
file-read path. Stated here rather than discovered at runtime.
|
|
144
|
+
|
|
145
|
+
Two operative rules, restated from Storybook's suggested agent instructions rather than
|
|
146
|
+
copied verbatim:
|
|
147
|
+
|
|
148
|
+
- **Never use an undocumented prop.** If the manifest does not carry it, it is not part of
|
|
149
|
+
the component's surface — reading it out of the implementation is how a private prop
|
|
150
|
+
becomes a de-facto API.
|
|
151
|
+
- **Fetch the story instructions before writing a story.** The project's own conventions
|
|
152
|
+
live there; writing first and reconciling later produces a story that matches nothing.
|
|
153
|
+
|
|
154
|
+
## Output format
|
|
155
|
+
|
|
156
|
+
1. Name the inventory source used — MCP or file read — and why.
|
|
157
|
+
2. List the stories authored or changed, one line each, with their concept.
|
|
158
|
+
3. Report the story-test result, and the a11y findings in the `(rule, selector, severity)`
|
|
159
|
+
shape.
|
|
160
|
+
4. State explicitly what did not run (no browser tooling, no running Storybook, non-React
|
|
161
|
+
renderer).
|
|
162
|
+
|
|
163
|
+
## Gotchas
|
|
164
|
+
|
|
165
|
+
- **`SizesAndVariants` looks efficient and destroys both jobs** — a human cannot attribute
|
|
166
|
+
the effect, and an agent cannot learn a single prop from it.
|
|
167
|
+
- **A truncated description reads as a complete one.** The manifest cuts the tail without
|
|
168
|
+
marking it, so a paragraph-long summary arrives as a confident fragment.
|
|
169
|
+
- **A stale story is worse than no story.** It props-drills values the component no longer
|
|
170
|
+
accepts and documents an API that does not exist; keep stories beside the component and
|
|
171
|
+
change them in the same commit.
|
|
172
|
+
- **An unrun a11y check reports zero violations** — the same number a clean run reports.
|
|
173
|
+
Say which one happened.
|
|
174
|
+
- **The MCP channel disappearing is normal**, not an error: no running Storybook is the
|
|
175
|
+
fallback's whole purpose.
|
|
176
|
+
|
|
177
|
+
## Do NOT
|
|
178
|
+
|
|
179
|
+
- Do NOT combine two axes in one story.
|
|
180
|
+
- Do NOT ship a component export or a story without a `@summary`.
|
|
181
|
+
- Do NOT leave an anti-pattern or deprecated story untagged: it carries
|
|
182
|
+
`tags: ['!manifest']` so it is excluded from the manifest and the agent never learns from
|
|
183
|
+
it (Storybook's own tag mechanism for curating what the manifest exposes).
|
|
184
|
+
- Do NOT hardcode a preview theme in a story.
|
|
185
|
+
- Do NOT make the MCP channel required, and do NOT remove the file-read fallback.
|
|
186
|
+
- Do NOT report zero a11y violations when the a11y tooling did not run.
|
|
187
|
+
|
|
188
|
+
## See also
|
|
189
|
+
|
|
190
|
+
- [`react-shadcn-ui`](../react-shadcn-ui/SKILL.md) — the React stack lane, and the `(rule, selector, severity)` shape § Validate writes into.
|
|
191
|
+
- [`existing-ui-audit`](../existing-ui-audit/SKILL.md) — the inventory the MCP path accelerates.
|
|
192
|
+
- [`js-library-packaging`](../js-library-packaging/SKILL.md) — the package around the workshop.
|
|
193
|
+
- [`accessibility-auditor`](../accessibility-auditor/SKILL.md) — the WCAG depth behind the a11y half.
|
|
194
|
+
- [`fe-design`](../fe-design/SKILL.md) § Component Architecture — the stack-agnostic isolate-and-document principle.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "storybook-workshop",
|
|
3
|
+
"last_eval": "2026-08-23",
|
|
4
|
+
"description": "5 should-trigger + 5 should-not-trigger. Should-trigger covers the named authoring ask, the inventory ask, the story-as-test ask, the MCP-channel question, and a DE phrasing. Should-not-trigger covers the near-misses this skill sits between: authoring the component itself (ui-component-architect), a full WCAG audit of a shipped page (accessibility-auditor), an E2E flow test, the package surface (js-library-packaging), and a visual-design question.",
|
|
5
|
+
"queries": [
|
|
6
|
+
{ "q": "add stories for the card", "trigger": true },
|
|
7
|
+
{ "q": "what components does our library already have?", "trigger": true },
|
|
8
|
+
{ "q": "can the stories run as tests in CI?", "trigger": true },
|
|
9
|
+
{ "q": "should we wire up the storybook mcp addon?", "trigger": true },
|
|
10
|
+
{ "q": "schreib Stories für die neuen Primitives", "trigger": true },
|
|
11
|
+
{ "q": "build me a Card component with a footer slot", "trigger": false },
|
|
12
|
+
{ "q": "run a full WCAG audit on the checkout page", "trigger": false },
|
|
13
|
+
{ "q": "write a playwright test for the signup flow", "trigger": false },
|
|
14
|
+
{ "q": "why does my hook say invalid hook call", "trigger": false },
|
|
15
|
+
{ "q": "pick a colour palette for the dashboard", "trigger": false }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* story_contrast_floor — the one a11y finding a story can yield WITHOUT a browser.
|
|
3
|
+
*
|
|
4
|
+
* Scope, stated first because overclaiming here would be the whole defect: this is **not**
|
|
5
|
+
* axe and it is not the § Validate path. It computes the WCAG 2.1 contrast ratio between two
|
|
6
|
+
* colours a story DECLARES in its own args, and emits a finding in the
|
|
7
|
+
* `(rule, selector, severity)` shape the engine de-duplicates on. It sees no rendered page,
|
|
8
|
+
* so it cannot find a role, focus, or computed-style defect — which is most of what axe finds.
|
|
9
|
+
*
|
|
10
|
+
* It exists because the browser tooling is a consumer dependency this package does not
|
|
11
|
+
* install, and "we cannot run axe" is not a reason to check nothing. A declared colour pair
|
|
12
|
+
* is decidable from the file.
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* story_contrast_floor <story-file> [<story-file> …]
|
|
16
|
+
* story_contrast_floor --self-test
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import * as fs from 'node:fs';
|
|
20
|
+
|
|
21
|
+
/** WCAG AA floor for normal-size body text. */
|
|
22
|
+
export const AA_NORMAL = 4.5;
|
|
23
|
+
/** WCAG AA floor for large text (>= 18.66px bold, or >= 24px). */
|
|
24
|
+
export const AA_LARGE = 3;
|
|
25
|
+
|
|
26
|
+
export interface Violation {
|
|
27
|
+
readonly rule: string;
|
|
28
|
+
readonly selector: string;
|
|
29
|
+
readonly severity: 'error' | 'warning';
|
|
30
|
+
/** The measured ratio, so a reader can see how far off it is rather than only that it failed. */
|
|
31
|
+
readonly ratio: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const clamp01 = (n: number): number => (n < 0 ? 0 : n > 1 ? 1 : n);
|
|
35
|
+
|
|
36
|
+
/** sRGB → relative luminance, per WCAG 2.1 § relative luminance. */
|
|
37
|
+
export const luminance = (hex: string): number | null => {
|
|
38
|
+
const m = /^#?([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(hex.trim());
|
|
39
|
+
if (m === null) return null;
|
|
40
|
+
let h = m[1] as string;
|
|
41
|
+
if (h.length === 3) h = h.split('').map((c) => `${c}${c}`).join('');
|
|
42
|
+
const channel = (pair: string): number => {
|
|
43
|
+
const v = clamp01(parseInt(pair, 16) / 255);
|
|
44
|
+
return v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;
|
|
45
|
+
};
|
|
46
|
+
const r = channel(h.slice(0, 2));
|
|
47
|
+
const g = channel(h.slice(2, 4));
|
|
48
|
+
const b = channel(h.slice(4, 6));
|
|
49
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** WCAG contrast ratio. Returns null when either colour is unreadable. */
|
|
53
|
+
export const contrastRatio = (fg: string, bg: string): number | null => {
|
|
54
|
+
const a = luminance(fg);
|
|
55
|
+
const b = luminance(bg);
|
|
56
|
+
if (a === null || b === null) return null;
|
|
57
|
+
const [hi, lo] = a >= b ? [a, b] : [b, a];
|
|
58
|
+
return (hi + 0.05) / (lo + 0.05);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Colour pairs a story declares in its args, as `(storyName, fg, bg)`.
|
|
63
|
+
*
|
|
64
|
+
* Reads only DECLARED literals. A colour arriving through a token indirection is invisible
|
|
65
|
+
* here, and pretending otherwise would be worse than the gap: the caller would believe the
|
|
66
|
+
* story was checked.
|
|
67
|
+
*/
|
|
68
|
+
export const declaredPairs = (source: string): Array<{ story: string; fg: string; bg: string }> => {
|
|
69
|
+
const out: Array<{ story: string; fg: string; bg: string }> = [];
|
|
70
|
+
// `export const Name: StoryObj<…> = { args: { … } }` — one story per export.
|
|
71
|
+
const exportRe = /export\s+const\s+([A-Za-z0-9_]+)\s*:[^=]*=\s*\{([\s\S]*?)\n\};/g;
|
|
72
|
+
for (const m of source.matchAll(exportRe)) {
|
|
73
|
+
const story = m[1] as string;
|
|
74
|
+
const body = m[2] as string;
|
|
75
|
+
const fg = /(?:color|fg|foreground)\s*:\s*['"](#[0-9a-fA-F]{3,6})['"]/.exec(body);
|
|
76
|
+
const bg = /(?:background|bg|backgroundColor)\s*:\s*['"](#[0-9a-fA-F]{3,6})['"]/.exec(body);
|
|
77
|
+
if (fg?.[1] !== undefined && bg?.[1] !== undefined) {
|
|
78
|
+
out.push({ story, fg: fg[1], bg: bg[1] });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return out;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const checkStoryFile = (file: string, floor: number = AA_NORMAL): Violation[] => {
|
|
85
|
+
let source = '';
|
|
86
|
+
try {
|
|
87
|
+
source = fs.readFileSync(file, 'utf8');
|
|
88
|
+
} catch {
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
const out: Violation[] = [];
|
|
92
|
+
for (const { story, fg, bg } of declaredPairs(source)) {
|
|
93
|
+
const ratio = contrastRatio(fg, bg);
|
|
94
|
+
if (ratio === null || ratio >= floor) continue;
|
|
95
|
+
out.push({
|
|
96
|
+
rule: 'color-contrast',
|
|
97
|
+
// The story is the addressable unit here — there is no DOM to select into.
|
|
98
|
+
selector: `story:${story}`,
|
|
99
|
+
severity: 'error',
|
|
100
|
+
ratio: Math.round(ratio * 100) / 100,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return out;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const selfTest = (): number => {
|
|
107
|
+
let failed = 0;
|
|
108
|
+
const check = (label: string, cond: boolean): void => {
|
|
109
|
+
if (!cond) {
|
|
110
|
+
process.stderr.write(`❌ ${label}\n`);
|
|
111
|
+
failed += 1;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const r = contrastRatio('#000000', '#ffffff');
|
|
115
|
+
check('black on white is the maximum 21:1', r !== null && Math.abs(r - 21) < 0.01);
|
|
116
|
+
check('a colour on itself is 1:1', Math.abs((contrastRatio('#777777', '#777777') ?? 0) - 1) < 0.01);
|
|
117
|
+
check('an unreadable colour is null, not 0', contrastRatio('nope', '#fff') === null);
|
|
118
|
+
check('shorthand hex is expanded', contrastRatio('#000', '#fff') !== null);
|
|
119
|
+
process.stdout.write(failed === 0 ? '✅ story_contrast_floor: self-test passed\n' : `❌ ${String(failed)} failure(s)\n`);
|
|
120
|
+
return failed === 0 ? 0 : 1;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const main = (): number => {
|
|
124
|
+
const argv = process.argv.slice(2);
|
|
125
|
+
if (argv.includes('--self-test')) return selfTest();
|
|
126
|
+
const files = argv.filter((a) => !a.startsWith('--'));
|
|
127
|
+
const violations = files.flatMap((f) => checkStoryFile(f));
|
|
128
|
+
process.stdout.write(`${JSON.stringify({ violations }, null, 2)}\n`);
|
|
129
|
+
return violations.length > 0 ? 1 : 0;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
if (process.argv[1] !== undefined && process.argv[1].includes('story_contrast_floor')) {
|
|
133
|
+
process.exit(main());
|
|
134
|
+
}
|
|
@@ -385,5 +385,5 @@ Skip emit when `emergency.orchestration_halt` is set or `spawn_count == 0`
|
|
|
385
385
|
| Standalone judge on an existing diff | Inline — see judge prompt in [`prompts/do-and-judge.md`](prompts/do-and-judge.md) |
|
|
386
386
|
| External / networked second opinion | [`ai-council`](../ai-council/SKILL.md) |
|
|
387
387
|
| Cross-model review WITH repo access | [`/team`](../../domains/meta/team/command.md) (collaborative; subagents are in-session same-weights) |
|
|
388
|
-
| Verifying completeness | [`verify-
|
|
388
|
+
| Verifying completeness | [`verify-completion-evidence`](../verify-completion-evidence/SKILL.md) |
|
|
389
389
|
| What a subagent owns vs never owns | [`subagent-boundary`](../../../docs/contracts/subagent-boundary.md) |
|
|
@@ -106,3 +106,28 @@ Every dispatchable mode named in `SKILL.md` § *The nine modes* maps to a
|
|
|
106
106
|
prompt file in the table above (mode 8 is gated/experimental — its
|
|
107
107
|
live-app rubric lives in the `subagent-modes-detail` context, not here);
|
|
108
108
|
each prompt mentions all four status enum values.
|
|
109
|
+
|
|
110
|
+
## The implementer envelope: hand it to a judge, never to a fresh reviewer
|
|
111
|
+
|
|
112
|
+
Several templates here carry an `IMPLEMENTER ENVELOPE:` line — `do-and-judge.md:70` and
|
|
113
|
+
`do-and-judge-two-stage.md:72` among them. **That is correct, and it is correct for a
|
|
114
|
+
specific reason:** a judge is validating a *claim*. It needs to know what the implementer
|
|
115
|
+
said it did, because the question is whether the diff supports the claim. Withholding the
|
|
116
|
+
envelope from a judge makes it guess at the claim it is meant to test.
|
|
117
|
+
|
|
118
|
+
**It is wrong for a fresh reviewer**, and the asymmetry is the whole point of that role. A
|
|
119
|
+
fresh reviewer's value is a negative property: it has **no implementation context**, so it
|
|
120
|
+
cannot inherit the author's framing of what the change is for or what counts as done.
|
|
121
|
+
Handing it the envelope destroys exactly the property it was dispatched for — and it does
|
|
122
|
+
so invisibly, because the output still looks like a review.
|
|
123
|
+
|
|
124
|
+
So, for the next author of a template in this directory:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
COPYING THE ENVELOPE LINE INTO A FRESH-REVIEWER TEMPLATE SILENTLY REMOVES
|
|
128
|
+
THE ONE PROPERTY THAT MADE IT WORTH A SEPARATE DISPATCH.
|
|
129
|
+
JUDGE -> ENVELOPE. FRESH REVIEWER -> DIFF AND SCOPE ONLY.
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Recorded here rather than only in the route that consumes it (`/review:changes` § 4b-fresh)
|
|
133
|
+
because the line is copied from *these* files, so this is where a reader meets it.
|
|
@@ -97,6 +97,18 @@ rg -n 'curl[^|]*\|\s*(bash|sh)|wget[^|]*\|\s*(bash|sh)' .
|
|
|
97
97
|
- A package that exists but was published this week with 12 downloads is a slopsquat candidate, not a safe dep — weigh age + usage, not just existence.
|
|
98
98
|
- Lockfile integrity is part of the threat model: an unhashed or floating entry can pull a freshly-poisoned release even when a lockfile is "present".
|
|
99
99
|
|
|
100
|
+
## Known pitfalls
|
|
101
|
+
|
|
102
|
+
- **Name-similarity is not provenance.** An organisation whose name is
|
|
103
|
+
near-identical to a widely used tool's, whose site ranks for that tool's
|
|
104
|
+
queries, and whose "download" button points at a third-party page is not that
|
|
105
|
+
tool — and may ship no code at all. Observed while harvesting an external
|
|
106
|
+
reference on 2026-08-22: the lookalike existed only as an SEO surface. The
|
|
107
|
+
registry entry, the repository URL and the publisher are the provenance; the
|
|
108
|
+
name, the ranking and the visual resemblance are not. Resolve the package
|
|
109
|
+
through the registry and follow the declared repository, never through a search
|
|
110
|
+
result that merely looks right.
|
|
111
|
+
|
|
100
112
|
## Do NOT
|
|
101
113
|
|
|
102
114
|
- Do NOT run an install command for a package you have not existence-checked this session.
|
|
@@ -352,7 +352,7 @@ emit the `context_stale` event above it for the consolidation pass.
|
|
|
352
352
|
* Playwright / E2E test failures → [`playwright-testing`](../playwright-testing/SKILL.md)
|
|
353
353
|
* PHPStan / Rector / ECS output → [`quality-tools`](../quality-tools/SKILL.md)
|
|
354
354
|
* Verifying the fix is complete before claiming done →
|
|
355
|
-
[`verify-
|
|
355
|
+
[`verify-completion-evidence`](../verify-completion-evidence/SKILL.md)
|
|
356
356
|
|
|
357
357
|
## Validation checklist
|
|
358
358
|
|
|
@@ -329,7 +329,7 @@ wait for their own failing tests.
|
|
|
329
329
|
subagent cross-check) → [`test-case-discovery`](../test-case-discovery/SKILL.md)
|
|
330
330
|
* Project type-checker / linter / formatter (PHPStan, ECS, Rector for PHP — tsc / eslint / prettier for TS — ruff / mypy for Python) → [`quality-tools`](../quality-tools/SKILL.md)
|
|
331
331
|
* Full Pest conventions and Laravel test helpers → [`pest-testing`](../pest-testing/SKILL.md)
|
|
332
|
-
* Running tests inside Docker → [
|
|
332
|
+
* Running tests inside Docker → [`/tests:execute`](../../domains/engineering-base/tests/execute/command.md)
|
|
333
333
|
* Investigating why a test is failing for non-obvious reasons →
|
|
334
334
|
[`systematic-debugging`](../systematic-debugging/SKILL.md)
|
|
335
335
|
|
|
@@ -54,8 +54,6 @@ Do NOT use when:
|
|
|
54
54
|
[`security-audit`](../security-audit/SKILL.md)
|
|
55
55
|
* The concern is end-to-end authorization enforcement — route to
|
|
56
56
|
[`authz-review`](../authz-review/SKILL.md)
|
|
57
|
-
* The concern is output/log leakage on an existing API — route to
|
|
58
|
-
[`data-exposure-review`](../data-exposure-review/SKILL.md)
|
|
59
57
|
* The concern is implementing the controls once identified — route to
|
|
60
58
|
[`security`](../security/SKILL.md)
|
|
61
59
|
|
|
@@ -224,7 +222,6 @@ run tests**.
|
|
|
224
222
|
A05 Security Misconfiguration — cross-reference when naming abuse cases.
|
|
225
223
|
[owasp.org/Top10/](https://owasp.org/Top10/)
|
|
226
224
|
- [`authz-review`](../authz-review/SKILL.md),
|
|
227
|
-
[`data-exposure-review`](../data-exposure-review/SKILL.md),
|
|
228
225
|
[`security`](../security/SKILL.md),
|
|
229
226
|
[`security-audit`](../security-audit/SKILL.md) — sibling review / implementation skills.
|
|
230
227
|
- Prompt-injection / agent-config defense: [`untrusted-input-defense`](../../rules/untrusted-input-defense.md),
|
|
@@ -3,6 +3,9 @@ model_tier: medium
|
|
|
3
3
|
name: token-optimizer
|
|
4
4
|
description: "Use BEFORE any verbose CLI run, large file read, doc conversion, or near-context handoff — decision tree keyed by intent citing the canonical token-saving asset."
|
|
5
5
|
domain: process
|
|
6
|
+
scope:
|
|
7
|
+
write: []
|
|
8
|
+
verification_reason: "an index-and-routing skill — it names other artefacts to load and writes nothing. Absence of a write is not something a command can prove."
|
|
6
9
|
execution:
|
|
7
10
|
type: assisted
|
|
8
11
|
handler: shell
|
|
@@ -13,6 +13,9 @@ trust:
|
|
|
13
13
|
level: professional
|
|
14
14
|
install:
|
|
15
15
|
removable: true
|
|
16
|
+
scope:
|
|
17
|
+
write: []
|
|
18
|
+
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."
|
|
16
19
|
execution:
|
|
17
20
|
type: manual
|
|
18
21
|
---
|
|
@@ -58,7 +58,15 @@ than under-splitting. Meet BOTH conditions before you extract.
|
|
|
58
58
|
|
|
59
59
|
### 1. Inspect prior art, state the responsibility in one sentence
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
**Read `DESIGN.md` § Owned components first** — it is the project's own inventory of what
|
|
62
|
+
it already owns (component, status, story file, registry item), filled from the story files
|
|
63
|
+
rather than from memory by
|
|
64
|
+
[`design-system-capture`](../design-system-capture/SKILL.md). It is the cheapest possible
|
|
65
|
+
prior-art check: one table, and a `deprecated` row tells you not to reach for something that
|
|
66
|
+
still exists in the tree. Absent or empty → fall through to
|
|
67
|
+
[`existing-ui-audit`](../existing-ui-audit/SKILL.md), which reads the codebase itself.
|
|
68
|
+
|
|
69
|
+
Then review existing components in the codebase for the same
|
|
62
70
|
responsibility — extend rather than rebuild when a match is found.
|
|
63
71
|
If none exists, write the new component's purpose: *"Renders a
|
|
64
72
|
labelled input with inline error and hint."* If the sentence has an
|
|
@@ -3,6 +3,9 @@ model_tier: inherit
|
|
|
3
3
|
name: upstream-contribute
|
|
4
4
|
description: "Use when a learning, new skill, rule improvement, or bug fix from a consumer project should be contributed back to the shared agent-config package."
|
|
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
|
|
@@ -3,6 +3,9 @@ model_tier: medium
|
|
|
3
3
|
name: "validate-feature-fit"
|
|
4
4
|
description: "Validate whether a feature request fits the existing codebase — check for duplicates, contradictions, scope creep, and architectural misfit"
|
|
5
5
|
domain: quality
|
|
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
|
|
@@ -66,7 +66,7 @@ mapping before running anything:
|
|
|
66
66
|
### 2. Run the command fresh
|
|
67
67
|
|
|
68
68
|
* Run against the current working tree, not a cached summary.
|
|
69
|
-
* If the project runs commands inside a container or VM (Docker, Devcontainer, Vagrant), run them there — not on the host. See [`docker`](../docker/SKILL.md) and [
|
|
69
|
+
* If the project runs commands inside a container or VM (Docker, Devcontainer, Vagrant), run them there — not on the host. See [`docker`](../docker/SKILL.md) and [`/tests:execute`](../../domains/engineering-base/tests/execute/command.md).
|
|
70
70
|
* Use targeted runs during iteration (`--filter=`, `--testNamePattern`).
|
|
71
71
|
Run the full suite only in the final verification pass.
|
|
72
72
|
|
|
@@ -189,7 +189,7 @@ When reporting completion to the user:
|
|
|
189
189
|
## When to hand over to another skill
|
|
190
190
|
|
|
191
191
|
* Exact PHP quality commands (PHPStan / Rector / ECS) → [`quality-tools`](../quality-tools/SKILL.md)
|
|
192
|
-
* Running tests inside a container / VM → [
|
|
192
|
+
* Running tests inside a container / VM → [`/tests:execute`](../../domains/engineering-base/tests/execute/command.md)
|
|
193
193
|
* Writing the regression test that the gate requires →
|
|
194
194
|
[`test-driven-development`](../test-driven-development/SKILL.md)
|
|
195
195
|
* Diagnosing why the gate failed → [`systematic-debugging`](../systematic-debugging/SKILL.md)
|
|
@@ -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
|
---
|