beth-copilot 1.0.18 → 2.0.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/CHANGELOG.md +79 -28
- package/README.md +127 -298
- package/assets/beth-questioning.png +0 -0
- package/assets/yellowstone-beth.png +0 -0
- package/bin/cli.js +124 -715
- package/dist/__tests__/inject-skills.test.d.ts +9 -0
- package/dist/__tests__/inject-skills.test.d.ts.map +1 -0
- package/dist/__tests__/inject-skills.test.js +143 -0
- package/dist/__tests__/inject-skills.test.js.map +1 -0
- package/dist/__tests__/skills/disambiguation.test.d.ts +10 -0
- package/dist/__tests__/skills/disambiguation.test.d.ts.map +1 -0
- package/dist/__tests__/skills/disambiguation.test.js +192 -0
- package/dist/__tests__/skills/disambiguation.test.js.map +1 -0
- package/dist/__tests__/skills/hook-injection.test.d.ts +11 -0
- package/dist/__tests__/skills/hook-injection.test.d.ts.map +1 -0
- package/dist/__tests__/skills/hook-injection.test.js +173 -0
- package/dist/__tests__/skills/hook-injection.test.js.map +1 -0
- package/dist/__tests__/skills/mapping-completeness.test.d.ts +17 -0
- package/dist/__tests__/skills/mapping-completeness.test.d.ts.map +1 -0
- package/dist/__tests__/skills/mapping-completeness.test.js +281 -0
- package/dist/__tests__/skills/mapping-completeness.test.js.map +1 -0
- package/dist/__tests__/skills/pipeline-integration.test.d.ts +18 -0
- package/dist/__tests__/skills/pipeline-integration.test.d.ts.map +1 -0
- package/dist/__tests__/skills/pipeline-integration.test.js +234 -0
- package/dist/__tests__/skills/pipeline-integration.test.js.map +1 -0
- package/dist/__tests__/skills/skill-routing.test.d.ts +15 -0
- package/dist/__tests__/skills/skill-routing.test.d.ts.map +1 -0
- package/dist/__tests__/skills/skill-routing.test.js +723 -0
- package/dist/__tests__/skills/skill-routing.test.js.map +1 -0
- package/dist/__tests__/skills/trigger-coverage.test.d.ts +24 -0
- package/dist/__tests__/skills/trigger-coverage.test.d.ts.map +1 -0
- package/dist/__tests__/skills/trigger-coverage.test.js +746 -0
- package/dist/__tests__/skills/trigger-coverage.test.js.map +1 -0
- package/dist/__tests__/smoke.test.d.ts +8 -0
- package/dist/__tests__/smoke.test.d.ts.map +1 -0
- package/dist/__tests__/smoke.test.js +62 -0
- package/dist/__tests__/smoke.test.js.map +1 -0
- package/dist/__tests__/verify-skills.test.d.ts +9 -0
- package/dist/__tests__/verify-skills.test.d.ts.map +1 -0
- package/dist/__tests__/verify-skills.test.js +78 -0
- package/dist/__tests__/verify-skills.test.js.map +1 -0
- package/dist/cli/commands/beads.e2e.test.d.ts +15 -0
- package/dist/cli/commands/beads.e2e.test.d.ts.map +1 -0
- package/dist/cli/commands/beads.e2e.test.js +585 -0
- package/dist/cli/commands/beads.e2e.test.js.map +1 -0
- package/dist/cli/commands/cli-edge-cases.e2e.test.d.ts +32 -0
- package/dist/cli/commands/cli-edge-cases.e2e.test.d.ts.map +1 -0
- package/dist/cli/commands/cli-edge-cases.e2e.test.js +162 -0
- package/dist/cli/commands/cli-edge-cases.e2e.test.js.map +1 -0
- package/dist/cli/commands/close.d.ts +54 -0
- package/dist/cli/commands/close.d.ts.map +1 -0
- package/dist/cli/commands/close.e2e.test.d.ts +11 -0
- package/dist/cli/commands/close.e2e.test.d.ts.map +1 -0
- package/dist/cli/commands/close.e2e.test.js +71 -0
- package/dist/cli/commands/close.e2e.test.js.map +1 -0
- package/dist/cli/commands/close.js +95 -0
- package/dist/cli/commands/close.js.map +1 -0
- package/dist/cli/commands/close.test.d.ts +13 -0
- package/dist/cli/commands/close.test.d.ts.map +1 -0
- package/dist/cli/commands/close.test.js +254 -0
- package/dist/cli/commands/close.test.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +7 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.e2e.test.js +3 -59
- package/dist/cli/commands/doctor.e2e.test.js.map +1 -1
- package/dist/cli/commands/doctor.js +38 -18
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/doctor.test.js +32 -25
- package/dist/cli/commands/doctor.test.js.map +1 -1
- package/dist/cli/commands/framework-isolation.test.d.ts +30 -0
- package/dist/cli/commands/framework-isolation.test.d.ts.map +1 -0
- package/dist/cli/commands/framework-isolation.test.js +118 -0
- package/dist/cli/commands/framework-isolation.test.js.map +1 -0
- package/dist/cli/commands/help.e2e.test.js +5 -9
- package/dist/cli/commands/help.e2e.test.js.map +1 -1
- package/dist/cli/commands/init-logic.e2e.test.d.ts +37 -0
- package/dist/cli/commands/init-logic.e2e.test.d.ts.map +1 -0
- package/dist/cli/commands/init-logic.e2e.test.js +315 -0
- package/dist/cli/commands/init-logic.e2e.test.js.map +1 -0
- package/dist/cli/commands/init.test.js +4 -21
- package/dist/cli/commands/init.test.js.map +1 -1
- package/dist/cli/commands/land.d.ts +130 -0
- package/dist/cli/commands/land.d.ts.map +1 -0
- package/dist/cli/commands/land.js +592 -0
- package/dist/cli/commands/land.js.map +1 -0
- package/dist/cli/commands/land.test.d.ts +19 -0
- package/dist/cli/commands/land.test.d.ts.map +1 -0
- package/dist/cli/commands/land.test.js +567 -0
- package/dist/cli/commands/land.test.js.map +1 -0
- package/dist/cli/commands/mcp.e2e.test.js +24 -31
- package/dist/cli/commands/mcp.e2e.test.js.map +1 -1
- package/dist/cli/commands/pipeline.e2e.test.js +28 -31
- package/dist/cli/commands/pipeline.e2e.test.js.map +1 -1
- package/dist/cli/commands/pre-push-guard.d.ts +74 -0
- package/dist/cli/commands/pre-push-guard.d.ts.map +1 -0
- package/dist/cli/commands/pre-push-guard.e2e.test.d.ts +24 -0
- package/dist/cli/commands/pre-push-guard.e2e.test.d.ts.map +1 -0
- package/dist/cli/commands/pre-push-guard.e2e.test.js +171 -0
- package/dist/cli/commands/pre-push-guard.e2e.test.js.map +1 -0
- package/dist/cli/commands/pre-push-guard.js +212 -0
- package/dist/cli/commands/pre-push-guard.js.map +1 -0
- package/dist/cli/commands/pre-push-guard.test.d.ts +14 -0
- package/dist/cli/commands/pre-push-guard.test.d.ts.map +1 -0
- package/dist/cli/commands/pre-push-guard.test.js +314 -0
- package/dist/cli/commands/pre-push-guard.test.js.map +1 -0
- package/dist/cli/commands/quickstart-expanded.e2e.test.d.ts +23 -0
- package/dist/cli/commands/quickstart-expanded.e2e.test.d.ts.map +1 -0
- package/dist/cli/commands/quickstart-expanded.e2e.test.js +152 -0
- package/dist/cli/commands/quickstart-expanded.e2e.test.js.map +1 -0
- package/dist/cli/commands/quickstart.d.ts +0 -1
- package/dist/cli/commands/quickstart.d.ts.map +1 -1
- package/dist/cli/commands/quickstart.js +9 -83
- package/dist/cli/commands/quickstart.js.map +1 -1
- package/dist/cli/commands/quickstart.test.js +8 -129
- package/dist/cli/commands/quickstart.test.js.map +1 -1
- package/dist/cli/commands/update.d.ts +35 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.e2e.test.d.ts +24 -0
- package/dist/cli/commands/update.e2e.test.d.ts.map +1 -0
- package/dist/cli/commands/update.e2e.test.js +240 -0
- package/dist/cli/commands/update.e2e.test.js.map +1 -0
- package/dist/cli/commands/update.js +255 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/core/agents/frontmatter.test.js +1 -1
- package/dist/core/agents/frontmatter.test.js.map +1 -1
- package/dist/core/agents/handoffs.test.js +1 -1
- package/dist/core/agents/handoffs.test.js.map +1 -1
- package/dist/core/agents/loader.d.ts +4 -2
- package/dist/core/agents/loader.d.ts.map +1 -1
- package/dist/core/agents/loader.js +5 -3
- package/dist/core/agents/loader.js.map +1 -1
- package/dist/core/agents/loader.test.js +42 -4
- package/dist/core/agents/loader.test.js.map +1 -1
- package/dist/core/agents/suite.test.js +12 -9
- package/dist/core/agents/suite.test.js.map +1 -1
- package/dist/core/agents/tools.test.js +15 -9
- package/dist/core/agents/tools.test.js.map +1 -1
- package/dist/core/agents/types.test.js +1 -1
- package/dist/core/agents/types.test.js.map +1 -1
- package/dist/core/skills/loader.test.js +1 -1
- package/dist/core/skills/loader.test.js.map +1 -1
- package/dist/index.d.ts +3 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -12
- package/dist/index.js.map +1 -1
- package/dist/lib/pathValidation.d.ts +0 -5
- package/dist/lib/pathValidation.d.ts.map +1 -1
- package/dist/lib/pathValidation.js +0 -11
- package/dist/lib/pathValidation.js.map +1 -1
- package/dist/lib/pathValidation.test.js +2 -14
- package/dist/lib/pathValidation.test.js.map +1 -1
- package/package.json +13 -10
- package/sbom.json +1927 -847
- package/templates/.github/agents/beth.agent.md +331 -105
- package/templates/.github/agents/developer.agent.md +73 -102
- package/templates/.github/agents/product-manager.agent.md +24 -68
- package/templates/.github/agents/researcher.agent.md +21 -69
- package/templates/.github/agents/security-reviewer.agent.md +39 -82
- package/templates/.github/agents/tester.agent.md +44 -65
- package/templates/.github/agents/ux-designer.agent.md +25 -76
- package/templates/.github/copilot-instructions.md +246 -225
- package/templates/.github/copilot-mcp-config.json +12 -0
- package/templates/.github/dependabot.yml +68 -0
- package/templates/.github/hooks/scripts/inject-skills.mjs +139 -0
- package/templates/.github/hooks/scripts/verify-skills.mjs +47 -0
- package/templates/.github/hooks/skill-enforcement.json +18 -0
- package/templates/.github/pull_request_template.md +48 -0
- package/templates/.github/skills/framer-components/SKILL.md +0 -0
- package/templates/.github/skills/prd/SKILL.md +0 -0
- package/templates/.github/skills/security-analysis/SKILL.md +798 -798
- package/templates/.github/skills/shadcn-ui/SKILL.md +561 -561
- package/templates/.github/skills/vercel-react-best-practices/AGENTS.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/SKILL.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/advanced-use-latest.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/async-api-routes.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/async-defer-await.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/async-dependencies.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/async-parallel.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/bundle-conditional.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/bundle-preload.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/client-event-listeners.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/client-swr-dedup.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/js-cache-function-results.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/js-cache-property-access.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/js-cache-storage.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/js-combine-iterations.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/js-early-exit.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/js-index-maps.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/js-length-check-first.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/js-min-max-loop.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rendering-activity.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rerender-dependencies.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rerender-derived-state.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rerender-memo.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/rerender-transitions.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/server-auth-actions.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/server-cache-lru.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/server-cache-react.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/server-dedup-props.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -0
- package/templates/.github/skills/vercel-react-best-practices/rules/server-serialization.md +0 -0
- package/templates/.github/skills/web-design-guidelines/SKILL.md +0 -0
- package/templates/.vscode/settings.json +16 -16
- package/templates/AGENTS.md +103 -54
- package/templates/Backlog.md +80 -80
- package/templates/mcp.json.example +0 -3
- package/assets/beth-portrait-small.txt +0 -13
- package/assets/beth-portrait.txt +0 -60
- package/bin/beth-animation.sh +0 -155
- package/bin/lib/animation.js +0 -189
- package/bin/lib/pathValidation.js +0 -233
- package/bin/lib/pathValidation.test.js +0 -280
- package/dist/cli/commands/client-config.d.ts +0 -31
- package/dist/cli/commands/client-config.d.ts.map +0 -1
- package/dist/cli/commands/client-config.e2e.test.d.ts +0 -15
- package/dist/cli/commands/client-config.e2e.test.d.ts.map +0 -1
- package/dist/cli/commands/client-config.e2e.test.js +0 -556
- package/dist/cli/commands/client-config.e2e.test.js.map +0 -1
- package/dist/cli/commands/client-config.js +0 -73
- package/dist/cli/commands/client-config.js.map +0 -1
- package/dist/cli/commands/client-config.test.d.ts +0 -6
- package/dist/cli/commands/client-config.test.d.ts.map +0 -1
- package/dist/cli/commands/client-config.test.js +0 -133
- package/dist/cli/commands/client-config.test.js.map +0 -1
- package/dist/cli/commands/init-quickstart.e2e.test.d.ts +0 -11
- package/dist/cli/commands/init-quickstart.e2e.test.d.ts.map +0 -1
- package/dist/cli/commands/init-quickstart.e2e.test.js +0 -221
- package/dist/cli/commands/init-quickstart.e2e.test.js.map +0 -1
- package/dist/core/context.d.ts +0 -171
- package/dist/core/context.d.ts.map +0 -1
- package/dist/core/context.js +0 -353
- package/dist/core/context.js.map +0 -1
- package/dist/core/context.test.d.ts +0 -8
- package/dist/core/context.test.d.ts.map +0 -1
- package/dist/core/context.test.js +0 -253
- package/dist/core/context.test.js.map +0 -1
- package/dist/core/handoffs.d.ts +0 -151
- package/dist/core/handoffs.d.ts.map +0 -1
- package/dist/core/handoffs.js +0 -220
- package/dist/core/handoffs.js.map +0 -1
- package/dist/core/handoffs.test.d.ts +0 -8
- package/dist/core/handoffs.test.d.ts.map +0 -1
- package/dist/core/handoffs.test.js +0 -231
- package/dist/core/handoffs.test.js.map +0 -1
- package/dist/core/orchestrator.d.ts +0 -246
- package/dist/core/orchestrator.d.ts.map +0 -1
- package/dist/core/orchestrator.js +0 -514
- package/dist/core/orchestrator.js.map +0 -1
- package/dist/core/orchestrator.test.d.ts +0 -8
- package/dist/core/orchestrator.test.d.ts.map +0 -1
- package/dist/core/orchestrator.test.js +0 -517
- package/dist/core/orchestrator.test.js.map +0 -1
- package/dist/core/router.d.ts +0 -102
- package/dist/core/router.d.ts.map +0 -1
- package/dist/core/router.js +0 -178
- package/dist/core/router.js.map +0 -1
- package/dist/core/router.test.d.ts +0 -8
- package/dist/core/router.test.d.ts.map +0 -1
- package/dist/core/router.test.js +0 -215
- package/dist/core/router.test.js.map +0 -1
- package/dist/init.test.js +0 -288
- package/dist/providers/azure.d.ts +0 -147
- package/dist/providers/azure.d.ts.map +0 -1
- package/dist/providers/azure.js +0 -491
- package/dist/providers/azure.js.map +0 -1
- package/dist/providers/azure.test.d.ts +0 -11
- package/dist/providers/azure.test.d.ts.map +0 -1
- package/dist/providers/azure.test.js +0 -330
- package/dist/providers/azure.test.js.map +0 -1
- package/dist/providers/config.d.ts +0 -87
- package/dist/providers/config.d.ts.map +0 -1
- package/dist/providers/config.js +0 -193
- package/dist/providers/config.js.map +0 -1
- package/dist/providers/config.test.d.ts +0 -7
- package/dist/providers/config.test.d.ts.map +0 -1
- package/dist/providers/config.test.js +0 -370
- package/dist/providers/config.test.js.map +0 -1
- package/dist/providers/index.d.ts +0 -18
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/providers/index.js +0 -14
- package/dist/providers/index.js.map +0 -1
- package/dist/providers/interface.d.ts +0 -191
- package/dist/providers/interface.d.ts.map +0 -1
- package/dist/providers/interface.js +0 -94
- package/dist/providers/interface.js.map +0 -1
- package/dist/providers/retry.d.ts +0 -128
- package/dist/providers/retry.d.ts.map +0 -1
- package/dist/providers/retry.js +0 -205
- package/dist/providers/retry.js.map +0 -1
- package/dist/providers/retry.test.d.ts +0 -7
- package/dist/providers/retry.test.d.ts.map +0 -1
- package/dist/providers/retry.test.js +0 -439
- package/dist/providers/retry.test.js.map +0 -1
- package/dist/providers/streaming.d.ts +0 -157
- package/dist/providers/streaming.d.ts.map +0 -1
- package/dist/providers/streaming.js +0 -233
- package/dist/providers/streaming.js.map +0 -1
- package/dist/providers/streaming.test.d.ts +0 -7
- package/dist/providers/streaming.test.d.ts.map +0 -1
- package/dist/providers/streaming.test.js +0 -372
- package/dist/providers/streaming.test.js.map +0 -1
- package/dist/providers/types.d.ts +0 -209
- package/dist/providers/types.d.ts.map +0 -1
- package/dist/providers/types.js +0 -53
- package/dist/providers/types.js.map +0 -1
- package/dist/providers/types.test.d.ts +0 -7
- package/dist/providers/types.test.d.ts.map +0 -1
- package/dist/providers/types.test.js +0 -141
- package/dist/providers/types.test.js.map +0 -1
- package/dist/tools/cli/beads.d.ts +0 -27
- package/dist/tools/cli/beads.d.ts.map +0 -1
- package/dist/tools/cli/beads.js +0 -172
- package/dist/tools/cli/beads.js.map +0 -1
- package/dist/tools/cli/beads.test.d.ts +0 -8
- package/dist/tools/cli/beads.test.d.ts.map +0 -1
- package/dist/tools/cli/beads.test.js +0 -264
- package/dist/tools/cli/beads.test.js.map +0 -1
- package/dist/tools/cli/editFile.d.ts +0 -17
- package/dist/tools/cli/editFile.d.ts.map +0 -1
- package/dist/tools/cli/editFile.js +0 -125
- package/dist/tools/cli/editFile.js.map +0 -1
- package/dist/tools/cli/editFile.test.d.ts +0 -8
- package/dist/tools/cli/editFile.test.d.ts.map +0 -1
- package/dist/tools/cli/editFile.test.js +0 -177
- package/dist/tools/cli/editFile.test.js.map +0 -1
- package/dist/tools/cli/readFile.d.ts +0 -25
- package/dist/tools/cli/readFile.d.ts.map +0 -1
- package/dist/tools/cli/readFile.js +0 -118
- package/dist/tools/cli/readFile.js.map +0 -1
- package/dist/tools/cli/readFile.test.d.ts +0 -8
- package/dist/tools/cli/readFile.test.d.ts.map +0 -1
- package/dist/tools/cli/readFile.test.js +0 -194
- package/dist/tools/cli/readFile.test.js.map +0 -1
- package/dist/tools/cli/search.d.ts +0 -16
- package/dist/tools/cli/search.d.ts.map +0 -1
- package/dist/tools/cli/search.js +0 -261
- package/dist/tools/cli/search.js.map +0 -1
- package/dist/tools/cli/search.test.d.ts +0 -8
- package/dist/tools/cli/search.test.d.ts.map +0 -1
- package/dist/tools/cli/search.test.js +0 -172
- package/dist/tools/cli/search.test.js.map +0 -1
- package/dist/tools/cli/subagent.d.ts +0 -43
- package/dist/tools/cli/subagent.d.ts.map +0 -1
- package/dist/tools/cli/subagent.js +0 -99
- package/dist/tools/cli/subagent.js.map +0 -1
- package/dist/tools/cli/subagent.test.d.ts +0 -8
- package/dist/tools/cli/subagent.test.d.ts.map +0 -1
- package/dist/tools/cli/subagent.test.js +0 -190
- package/dist/tools/cli/subagent.test.js.map +0 -1
- package/dist/tools/cli/terminal.d.ts +0 -19
- package/dist/tools/cli/terminal.d.ts.map +0 -1
- package/dist/tools/cli/terminal.js +0 -164
- package/dist/tools/cli/terminal.js.map +0 -1
- package/dist/tools/cli/terminal.test.d.ts +0 -8
- package/dist/tools/cli/terminal.test.d.ts.map +0 -1
- package/dist/tools/cli/terminal.test.js +0 -161
- package/dist/tools/cli/terminal.test.js.map +0 -1
- package/dist/tools/index.d.ts +0 -25
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -41
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/interface.d.ts +0 -64
- package/dist/tools/interface.d.ts.map +0 -1
- package/dist/tools/interface.js +0 -37
- package/dist/tools/interface.js.map +0 -1
- package/dist/tools/interface.test.d.ts +0 -7
- package/dist/tools/interface.test.d.ts.map +0 -1
- package/dist/tools/interface.test.js +0 -179
- package/dist/tools/interface.test.js.map +0 -1
- package/dist/tools/mcp/bridge.d.ts +0 -48
- package/dist/tools/mcp/bridge.d.ts.map +0 -1
- package/dist/tools/mcp/bridge.js +0 -128
- package/dist/tools/mcp/bridge.js.map +0 -1
- package/dist/tools/mcp/bridge.test.d.ts +0 -8
- package/dist/tools/mcp/bridge.test.d.ts.map +0 -1
- package/dist/tools/mcp/bridge.test.js +0 -300
- package/dist/tools/mcp/bridge.test.js.map +0 -1
- package/dist/tools/mcp/client.d.ts +0 -135
- package/dist/tools/mcp/client.d.ts.map +0 -1
- package/dist/tools/mcp/client.js +0 -263
- package/dist/tools/mcp/client.js.map +0 -1
- package/dist/tools/mcp/client.test.d.ts +0 -8
- package/dist/tools/mcp/client.test.d.ts.map +0 -1
- package/dist/tools/mcp/client.test.js +0 -390
- package/dist/tools/mcp/client.test.js.map +0 -1
- package/dist/tools/registry.d.ts +0 -82
- package/dist/tools/registry.d.ts.map +0 -1
- package/dist/tools/registry.js +0 -99
- package/dist/tools/registry.js.map +0 -1
- package/dist/tools/registry.test.d.ts +0 -7
- package/dist/tools/registry.test.d.ts.map +0 -1
- package/dist/tools/registry.test.js +0 -199
- package/dist/tools/registry.test.js.map +0 -1
- package/dist/tools/suite.test.d.ts +0 -11
- package/dist/tools/suite.test.d.ts.map +0 -1
- package/dist/tools/suite.test.js +0 -119
- package/dist/tools/suite.test.js.map +0 -1
- package/dist/tools/types.d.ts +0 -75
- package/dist/tools/types.d.ts.map +0 -1
- package/dist/tools/types.js +0 -30
- package/dist/tools/types.js.map +0 -1
- package/dist/tools/types.test.d.ts +0 -7
- package/dist/tools/types.test.d.ts.map +0 -1
- package/dist/tools/types.test.js +0 -178
- package/dist/tools/types.test.js.map +0 -1
- package/templates/.vscode/mcp.json +0 -20
- package/templates/CLAUDE.md +0 -129
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent-Skill Mapping Completeness Tests
|
|
3
|
+
*
|
|
4
|
+
* Verifies that the skill enforcement system is complete — no orphan skills,
|
|
5
|
+
* no missing mappings, no drift between what's on disk and what's in the hooks.
|
|
6
|
+
*
|
|
7
|
+
* What these tests catch:
|
|
8
|
+
* - New skills added to .github/skills/ but not added to the test matrix
|
|
9
|
+
* - Skills removed from disk but still referenced in inject-skills.mjs
|
|
10
|
+
* - inject-skills.mjs agent map drifting from copilot-instructions.md docs
|
|
11
|
+
* - Agent definitions (.agent.md) missing from .github/agents/
|
|
12
|
+
* - Skills with no SKILL.md file inside their directory
|
|
13
|
+
*
|
|
14
|
+
* Test plan reference: docs/E2E-SKILL-TESTS.md — "Implementation Notes"
|
|
15
|
+
*/
|
|
16
|
+
import { describe, it, expect } from 'vitest';
|
|
17
|
+
import { join } from 'node:path';
|
|
18
|
+
import { readdirSync, existsSync, readFileSync, statSync } from 'node:fs';
|
|
19
|
+
import { execFileSync } from 'node:child_process';
|
|
20
|
+
const PROJECT_ROOT = process.cwd();
|
|
21
|
+
const SKILLS_DIR = join(PROJECT_ROOT, '.github/skills');
|
|
22
|
+
const AGENTS_DIR = join(PROJECT_ROOT, '.github/agents');
|
|
23
|
+
const INJECT_SCRIPT = join(PROJECT_ROOT, '.github/hooks/scripts/inject-skills.mjs');
|
|
24
|
+
// ─── Helpers ───────────────────────────────────────────────────────────────
|
|
25
|
+
/** Get all skill directory names from .github/skills/ */
|
|
26
|
+
function getAllSkillDirs() {
|
|
27
|
+
return readdirSync(SKILLS_DIR)
|
|
28
|
+
.filter((name) => statSync(join(SKILLS_DIR, name)).isDirectory());
|
|
29
|
+
}
|
|
30
|
+
/** Get all agent .md files from .github/agents/ */
|
|
31
|
+
function getAllAgentFiles() {
|
|
32
|
+
if (!existsSync(AGENTS_DIR))
|
|
33
|
+
return [];
|
|
34
|
+
return readdirSync(AGENTS_DIR)
|
|
35
|
+
.filter((name) => name.endsWith('.agent.md'));
|
|
36
|
+
}
|
|
37
|
+
/** Run inject-skills.mjs for an agent type and return the raw output */
|
|
38
|
+
function runInjectHook(agentType) {
|
|
39
|
+
const result = execFileSync('node', [INJECT_SCRIPT], {
|
|
40
|
+
input: JSON.stringify({ agent_type: agentType, cwd: PROJECT_ROOT }),
|
|
41
|
+
encoding: 'utf8',
|
|
42
|
+
cwd: PROJECT_ROOT,
|
|
43
|
+
timeout: 10000,
|
|
44
|
+
});
|
|
45
|
+
return JSON.parse(result);
|
|
46
|
+
}
|
|
47
|
+
/** Read inject-skills.mjs source to extract the AGENT_SKILLS map */
|
|
48
|
+
function getAgentSkillsMap() {
|
|
49
|
+
const source = readFileSync(INJECT_SCRIPT, 'utf8');
|
|
50
|
+
// Extract all skill paths per agent by parsing the source line by line
|
|
51
|
+
const result = {};
|
|
52
|
+
let currentAgent = '';
|
|
53
|
+
let currentSection = '';
|
|
54
|
+
for (const line of source.split('\n')) {
|
|
55
|
+
// Match agent name: 'developer': {
|
|
56
|
+
const agentMatch = line.match(/^\s*'([^']+)'\s*:\s*\{/);
|
|
57
|
+
if (agentMatch) {
|
|
58
|
+
currentAgent = agentMatch[1];
|
|
59
|
+
result[currentAgent] = { inject: [], readFile: [] };
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
// Match section: inject: [ or readFile: [
|
|
63
|
+
const sectionMatch = line.match(/^\s*(inject|readFile)\s*:\s*\[/);
|
|
64
|
+
if (sectionMatch && currentAgent) {
|
|
65
|
+
currentSection = sectionMatch[1];
|
|
66
|
+
// Check for inline single-item array: inject: ['.github/...']
|
|
67
|
+
const inlineMatch = line.match(/\[\s*'([^']+)'\s*\]/);
|
|
68
|
+
if (inlineMatch) {
|
|
69
|
+
result[currentAgent][currentSection].push(inlineMatch[1]);
|
|
70
|
+
currentSection = '';
|
|
71
|
+
}
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
// Match skill path inside array: '.github/skills/...'
|
|
75
|
+
const pathMatch = line.match(/^\s*'([^']+\.(?:md|MD))'/);
|
|
76
|
+
if (pathMatch && currentAgent && currentSection) {
|
|
77
|
+
result[currentAgent][currentSection].push(pathMatch[1]);
|
|
78
|
+
}
|
|
79
|
+
// End of array
|
|
80
|
+
if (line.match(/^\s*\]/) && currentSection) {
|
|
81
|
+
currentSection = '';
|
|
82
|
+
}
|
|
83
|
+
// End of agent object
|
|
84
|
+
if (line.match(/^\s*\},?\s*$/) && currentAgent && !currentSection) {
|
|
85
|
+
currentAgent = '';
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return result;
|
|
89
|
+
}
|
|
90
|
+
// ─── Known agents from the hook ────────────────────────────────────────────
|
|
91
|
+
const HOOKED_AGENTS = ['developer', 'ux-designer', 'product-manager', 'security-reviewer', 'tester', 'researcher'];
|
|
92
|
+
// ─── Skills covered in the E2E test plan (docs/E2E-SKILL-TESTS.md) ────────
|
|
93
|
+
// Every skill in the 72-test matrix. Used to detect orphan skills.
|
|
94
|
+
const SKILLS_IN_TEST_PLAN = new Set([
|
|
95
|
+
// Category 1 (hook-enforced)
|
|
96
|
+
'web-design-guidelines', 'framer-components', 'shadcn-ui',
|
|
97
|
+
'vercel-react-best-practices', 'prd', 'security-analysis', 'web-search',
|
|
98
|
+
// Category 2 (azure)
|
|
99
|
+
'azure-prepare', 'azure-validate', 'azure-deploy', 'azure-compute',
|
|
100
|
+
'azure-storage', 'azure-ai', 'azure-aigateway', 'azure-kusto',
|
|
101
|
+
'azure-messaging', 'azure-hosted-copilot-sdk', 'appinsights-instrumentation',
|
|
102
|
+
'microsoft-foundry', 'azure-rbac', 'azure-compliance', 'entra-app-registration',
|
|
103
|
+
'azure-cost-optimization', 'azure-cloud-migrate', 'azure-diagnostics',
|
|
104
|
+
'azure-resource-lookup', 'azure-resource-visualizer',
|
|
105
|
+
// Category 3 (design)
|
|
106
|
+
'frontend-design', 'brainstorming', 'document-review', 'every-style-editor',
|
|
107
|
+
// Category 4 (product)
|
|
108
|
+
'proof', 'changelog',
|
|
109
|
+
// Category 5 (developer workflow)
|
|
110
|
+
'create-agent-skills', 'git-worktree', 'feature-video',
|
|
111
|
+
'resolve_parallel', 'resolve_todo_parallel', 'resolve-pr-parallel',
|
|
112
|
+
'lfg', 'slfg', 'deepen-plan', 'agent-browser', 'agent-native-architecture',
|
|
113
|
+
'rclone', 'gemini-imagegen', 'generate_command',
|
|
114
|
+
// Category 6 (testing)
|
|
115
|
+
'test-browser', 'test-xcode', 'report-bug', 'reproduce-bug', 'triage',
|
|
116
|
+
// Category 7 (orchestration)
|
|
117
|
+
'orchestrating-swarms', 'setup', 'heal-skill', 'file-todos',
|
|
118
|
+
// Category 8 (CE)
|
|
119
|
+
'ce:brainstorm', 'ce:plan', 'ce:work', 'ce:review', 'ce:compound',
|
|
120
|
+
// Category 9 (language)
|
|
121
|
+
'dhh-rails-style', 'andrew-kane-gem-writer', 'dspy-ruby',
|
|
122
|
+
// Category 10 (remaining)
|
|
123
|
+
'compound-docs', 'agent-native-audit',
|
|
124
|
+
]);
|
|
125
|
+
// ─── Tests ─────────────────────────────────────────────────────────────────
|
|
126
|
+
describe('Skill Inventory: All on-disk skills accounted for', () => {
|
|
127
|
+
const allSkillDirs = getAllSkillDirs();
|
|
128
|
+
it('every skill directory has a SKILL.md file', () => {
|
|
129
|
+
const missing = [];
|
|
130
|
+
for (const dir of allSkillDirs) {
|
|
131
|
+
if (!existsSync(join(SKILLS_DIR, dir, 'SKILL.md'))) {
|
|
132
|
+
missing.push(dir);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
expect(missing).toHaveLength(0);
|
|
136
|
+
});
|
|
137
|
+
it('no empty skill directories', () => {
|
|
138
|
+
const empty = [];
|
|
139
|
+
for (const dir of allSkillDirs) {
|
|
140
|
+
const contents = readdirSync(join(SKILLS_DIR, dir));
|
|
141
|
+
if (contents.length === 0) {
|
|
142
|
+
empty.push(dir);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
expect(empty).toHaveLength(0);
|
|
146
|
+
});
|
|
147
|
+
it('reports skills NOT in the E2E test plan (potential gaps)', () => {
|
|
148
|
+
const uncovered = [];
|
|
149
|
+
for (const dir of allSkillDirs) {
|
|
150
|
+
if (!SKILLS_IN_TEST_PLAN.has(dir)) {
|
|
151
|
+
uncovered.push(dir);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// These are known skills that are intentionally NOT in the 72-test matrix.
|
|
155
|
+
// They may be aliases, deprecated, or workflow variants.
|
|
156
|
+
// This test documents them explicitly so new additions are caught.
|
|
157
|
+
const KNOWN_UNCOVERED = new Set([
|
|
158
|
+
// These are workflow: prefixed aliases of ce: skills
|
|
159
|
+
'workflows:brainstorm', 'workflows:compound', 'workflows:plan',
|
|
160
|
+
'workflows:review', 'workflows:work',
|
|
161
|
+
// Alternate/older skill names
|
|
162
|
+
'create-agent-skill', 'skill-creator',
|
|
163
|
+
// Deploy docs (documentation-only, not a routable skill)
|
|
164
|
+
'deploy-docs',
|
|
165
|
+
]);
|
|
166
|
+
const trueGaps = uncovered.filter((s) => !KNOWN_UNCOVERED.has(s));
|
|
167
|
+
// If this fails, a new skill was added but not put in the test matrix
|
|
168
|
+
expect(trueGaps).toHaveLength(0);
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
describe('inject-skills.mjs: Source-of-truth validation', () => {
|
|
172
|
+
it('covers all 6 known agent types', () => {
|
|
173
|
+
for (const agent of HOOKED_AGENTS) {
|
|
174
|
+
const output = runInjectHook(agent);
|
|
175
|
+
expect(output.hookSpecificOutput).toBeDefined();
|
|
176
|
+
expect(output.hookSpecificOutput.additionalContext).toBeTruthy();
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
it('every skill path in the hook actually exists on disk', () => {
|
|
180
|
+
const agentMap = getAgentSkillsMap();
|
|
181
|
+
const broken = [];
|
|
182
|
+
for (const [agent, config] of Object.entries(agentMap)) {
|
|
183
|
+
for (const path of [...config.inject, ...config.readFile]) {
|
|
184
|
+
const fullPath = join(PROJECT_ROOT, path);
|
|
185
|
+
if (!existsSync(fullPath)) {
|
|
186
|
+
broken.push(`${agent}: ${path}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
expect(broken).toHaveLength(0);
|
|
191
|
+
});
|
|
192
|
+
it('every skill file referenced in the hook is non-empty', () => {
|
|
193
|
+
const agentMap = getAgentSkillsMap();
|
|
194
|
+
const empty = [];
|
|
195
|
+
for (const [agent, config] of Object.entries(agentMap)) {
|
|
196
|
+
for (const path of [...config.inject, ...config.readFile]) {
|
|
197
|
+
const fullPath = join(PROJECT_ROOT, path);
|
|
198
|
+
if (existsSync(fullPath)) {
|
|
199
|
+
const content = readFileSync(fullPath, 'utf8');
|
|
200
|
+
if (content.trim().length === 0) {
|
|
201
|
+
empty.push(`${agent}: ${path}`);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
expect(empty).toHaveLength(0);
|
|
207
|
+
});
|
|
208
|
+
it('no duplicate skill paths within any single agent', () => {
|
|
209
|
+
const agentMap = getAgentSkillsMap();
|
|
210
|
+
const dupes = [];
|
|
211
|
+
for (const [agent, config] of Object.entries(agentMap)) {
|
|
212
|
+
const allPaths = [...config.inject, ...config.readFile];
|
|
213
|
+
const unique = new Set(allPaths);
|
|
214
|
+
if (unique.size !== allPaths.length) {
|
|
215
|
+
dupes.push(`${agent}: has duplicate skill paths`);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
expect(dupes).toHaveLength(0);
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
describe('Agent definitions: .agent.md files', () => {
|
|
222
|
+
const agentFiles = getAllAgentFiles();
|
|
223
|
+
it('every hooked agent has a corresponding .agent.md file', () => {
|
|
224
|
+
// Map from hook agent names to expected file names
|
|
225
|
+
const expectedFiles = HOOKED_AGENTS.map((a) => `${a}.agent.md`);
|
|
226
|
+
const missing = expectedFiles.filter((f) => !agentFiles.includes(f));
|
|
227
|
+
expect(missing).toHaveLength(0);
|
|
228
|
+
});
|
|
229
|
+
it('Beth orchestrator has an .agent.md file', () => {
|
|
230
|
+
// Beth is special — she's the orchestrator, not a hooked agent
|
|
231
|
+
const bethFile = agentFiles.find((f) => f.toLowerCase().includes('beth'));
|
|
232
|
+
expect(bethFile).toBeDefined();
|
|
233
|
+
});
|
|
234
|
+
it('every .agent.md file is non-empty', () => {
|
|
235
|
+
const empty = [];
|
|
236
|
+
for (const file of agentFiles) {
|
|
237
|
+
const content = readFileSync(join(AGENTS_DIR, file), 'utf8');
|
|
238
|
+
if (content.trim().length < 50) {
|
|
239
|
+
empty.push(file);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
expect(empty).toHaveLength(0);
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
describe('SKILL.md content quality', () => {
|
|
246
|
+
const allSkillDirs = getAllSkillDirs();
|
|
247
|
+
it('every SKILL.md has at least 100 characters of content', () => {
|
|
248
|
+
const tooShort = [];
|
|
249
|
+
for (const dir of allSkillDirs) {
|
|
250
|
+
const path = join(SKILLS_DIR, dir, 'SKILL.md');
|
|
251
|
+
if (existsSync(path)) {
|
|
252
|
+
const content = readFileSync(path, 'utf8');
|
|
253
|
+
if (content.trim().length < 100) {
|
|
254
|
+
tooShort.push(`${dir}: ${content.trim().length} chars`);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
expect(tooShort).toHaveLength(0);
|
|
259
|
+
});
|
|
260
|
+
it('every SKILL.md starts with YAML frontmatter, a markdown heading, or a code fence', () => {
|
|
261
|
+
const badStart = [];
|
|
262
|
+
for (const dir of allSkillDirs) {
|
|
263
|
+
const path = join(SKILLS_DIR, dir, 'SKILL.md');
|
|
264
|
+
if (existsSync(path)) {
|
|
265
|
+
const content = readFileSync(path, 'utf8').trimStart();
|
|
266
|
+
// SKILL.md files can start with:
|
|
267
|
+
// - YAML frontmatter (---)
|
|
268
|
+
// - Markdown heading (#)
|
|
269
|
+
// - Code fence with skill type (```skill, ```yaml, etc.)
|
|
270
|
+
const validStart = content.startsWith('#') ||
|
|
271
|
+
content.startsWith('---') ||
|
|
272
|
+
content.startsWith('```');
|
|
273
|
+
if (!validStart) {
|
|
274
|
+
badStart.push(dir);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
expect(badStart).toHaveLength(0);
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
//# sourceMappingURL=mapping-completeness.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapping-complet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zB,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;gBAC5B,IAAI,CAAC,UAAU,EAAE,CAAC;oBAChB,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrB,CAAC;YACH,CAAC;QACH,CAAC;QACD,MAAM,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pipeline Integration Tests — Full Hook Round-Trip
|
|
3
|
+
*
|
|
4
|
+
* Tests the complete enforcement pipeline:
|
|
5
|
+
* inject-skills.mjs (SubagentStart) → subagent works → verify-skills.mjs (SubagentStop)
|
|
6
|
+
*
|
|
7
|
+
* Unlike unit tests that verify each script in isolation, these tests verify
|
|
8
|
+
* that the two hooks work together correctly as an enforcement system:
|
|
9
|
+
* - inject-skills.mjs produces context that verify-skills.mjs can challenge on
|
|
10
|
+
* - The first stop attempt always blocks (compliance gate)
|
|
11
|
+
* - The retry always passes (no infinite loop)
|
|
12
|
+
* - Unknown agent types pass through both hooks cleanly
|
|
13
|
+
* - Malformed input doesn't crash either hook
|
|
14
|
+
*
|
|
15
|
+
* Test plan reference: docs/E2E-SKILL-TESTS.md — "Test Infrastructure Needed" §1
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=pipeline-integration.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-integration.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/skills/pipeline-integration.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pipeline Integration Tests — Full Hook Round-Trip
|
|
3
|
+
*
|
|
4
|
+
* Tests the complete enforcement pipeline:
|
|
5
|
+
* inject-skills.mjs (SubagentStart) → subagent works → verify-skills.mjs (SubagentStop)
|
|
6
|
+
*
|
|
7
|
+
* Unlike unit tests that verify each script in isolation, these tests verify
|
|
8
|
+
* that the two hooks work together correctly as an enforcement system:
|
|
9
|
+
* - inject-skills.mjs produces context that verify-skills.mjs can challenge on
|
|
10
|
+
* - The first stop attempt always blocks (compliance gate)
|
|
11
|
+
* - The retry always passes (no infinite loop)
|
|
12
|
+
* - Unknown agent types pass through both hooks cleanly
|
|
13
|
+
* - Malformed input doesn't crash either hook
|
|
14
|
+
*
|
|
15
|
+
* Test plan reference: docs/E2E-SKILL-TESTS.md — "Test Infrastructure Needed" §1
|
|
16
|
+
*/
|
|
17
|
+
import { describe, it, expect } from 'vitest';
|
|
18
|
+
import { execFileSync } from 'node:child_process';
|
|
19
|
+
import { join } from 'node:path';
|
|
20
|
+
const INJECT_SCRIPT = join(process.cwd(), '.github/hooks/scripts/inject-skills.mjs');
|
|
21
|
+
const VERIFY_SCRIPT = join(process.cwd(), '.github/hooks/scripts/verify-skills.mjs');
|
|
22
|
+
const PROJECT_ROOT = process.cwd();
|
|
23
|
+
/** Run a hook script with JSON input, return parsed output */
|
|
24
|
+
function runScript(scriptPath, input) {
|
|
25
|
+
const result = execFileSync('node', [scriptPath], {
|
|
26
|
+
input: JSON.stringify(input),
|
|
27
|
+
encoding: 'utf8',
|
|
28
|
+
cwd: PROJECT_ROOT,
|
|
29
|
+
timeout: 10000,
|
|
30
|
+
});
|
|
31
|
+
return JSON.parse(result);
|
|
32
|
+
}
|
|
33
|
+
/** Simulate the full pipeline: inject → (subagent work) → verify first stop → verify retry */
|
|
34
|
+
function runPipeline(agentType) {
|
|
35
|
+
// Step 1: SubagentStart — inject skills
|
|
36
|
+
const injectOutput = runScript(INJECT_SCRIPT, {
|
|
37
|
+
agent_type: agentType,
|
|
38
|
+
cwd: PROJECT_ROOT,
|
|
39
|
+
});
|
|
40
|
+
// Step 2: SubagentStop (first attempt) — should block
|
|
41
|
+
const firstStop = runScript(VERIFY_SCRIPT, {
|
|
42
|
+
agent_type: agentType,
|
|
43
|
+
});
|
|
44
|
+
// Step 3: SubagentStop (retry with stop_hook_active) — should pass
|
|
45
|
+
const retryStop = runScript(VERIFY_SCRIPT, {
|
|
46
|
+
agent_type: agentType,
|
|
47
|
+
stop_hook_active: true,
|
|
48
|
+
});
|
|
49
|
+
return { injectOutput, firstStop, retryStop };
|
|
50
|
+
}
|
|
51
|
+
// ─── Known agents ──────────────────────────────────────────────────────────
|
|
52
|
+
const KNOWN_AGENTS = [
|
|
53
|
+
'developer',
|
|
54
|
+
'ux-designer',
|
|
55
|
+
'product-manager',
|
|
56
|
+
'security-reviewer',
|
|
57
|
+
'tester',
|
|
58
|
+
'researcher',
|
|
59
|
+
];
|
|
60
|
+
// ─── Full pipeline tests ───────────────────────────────────────────────────
|
|
61
|
+
describe('Full Pipeline: inject → verify round-trip', () => {
|
|
62
|
+
describe.each(KNOWN_AGENTS)('Agent: %s', (agentType) => {
|
|
63
|
+
it('inject produces context, first stop blocks, retry passes', () => {
|
|
64
|
+
const { injectOutput, firstStop, retryStop } = runPipeline(agentType);
|
|
65
|
+
// Inject should produce context with skills
|
|
66
|
+
expect(injectOutput.continue).toBe(true);
|
|
67
|
+
expect(injectOutput.hookSpecificOutput).toBeDefined();
|
|
68
|
+
expect(injectOutput.hookSpecificOutput.additionalContext).toBeTruthy();
|
|
69
|
+
expect(injectOutput.hookSpecificOutput.additionalContext).toContain('SKILL ENFORCEMENT');
|
|
70
|
+
// First stop should block
|
|
71
|
+
expect(firstStop.hookSpecificOutput).toBeDefined();
|
|
72
|
+
expect(firstStop.hookSpecificOutput.decision).toBe('block');
|
|
73
|
+
expect(firstStop.hookSpecificOutput.reason).toContain('Skills compliance');
|
|
74
|
+
expect(firstStop.hookSpecificOutput.reason).toContain('Task tracking');
|
|
75
|
+
// Retry should pass through
|
|
76
|
+
expect(retryStop.continue).toBe(true);
|
|
77
|
+
});
|
|
78
|
+
it('inject context references the correct agent type', () => {
|
|
79
|
+
const { injectOutput } = runPipeline(agentType);
|
|
80
|
+
const ctx = injectOutput.hookSpecificOutput.additionalContext;
|
|
81
|
+
expect(ctx).toContain(`You are \`${agentType}\``);
|
|
82
|
+
});
|
|
83
|
+
it('verify challenge mentions both skill compliance and task tracking', () => {
|
|
84
|
+
const { firstStop } = runPipeline(agentType);
|
|
85
|
+
const reason = firstStop.hookSpecificOutput.reason;
|
|
86
|
+
// Must challenge on BOTH dimensions — this is the whole point of the unified hook
|
|
87
|
+
expect(reason).toContain('Skills compliance');
|
|
88
|
+
expect(reason).toContain('Task tracking');
|
|
89
|
+
expect(reason).toContain('backlog task edit');
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
// ─── Unknown agent passthrough ─────────────────────────────────────────────
|
|
94
|
+
describe('Unknown agent types pass through cleanly', () => {
|
|
95
|
+
const UNKNOWN_AGENTS = ['orchestrator', 'cto', 'intern', '', 'DEVELOPER'];
|
|
96
|
+
it.each(UNKNOWN_AGENTS)('agent type "%s" does not crash inject', (agentType) => {
|
|
97
|
+
const output = runScript(INJECT_SCRIPT, {
|
|
98
|
+
agent_type: agentType,
|
|
99
|
+
cwd: PROJECT_ROOT,
|
|
100
|
+
});
|
|
101
|
+
expect(output.continue).toBe(true);
|
|
102
|
+
// Unknown agents should NOT get additionalContext
|
|
103
|
+
expect(output.hookSpecificOutput).toBeUndefined();
|
|
104
|
+
});
|
|
105
|
+
it.each(UNKNOWN_AGENTS)('agent type "%s" still gets blocked by verify (first stop)', (agentType) => {
|
|
106
|
+
const output = runScript(VERIFY_SCRIPT, {
|
|
107
|
+
agent_type: agentType,
|
|
108
|
+
});
|
|
109
|
+
// Verify blocks ALL first stops regardless of agent type
|
|
110
|
+
expect(output.hookSpecificOutput.decision).toBe('block');
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
// ─── Malformed input resilience ────────────────────────────────────────────
|
|
114
|
+
describe('Malformed input handling', () => {
|
|
115
|
+
it('inject handles missing agent_type gracefully', () => {
|
|
116
|
+
const output = runScript(INJECT_SCRIPT, { cwd: PROJECT_ROOT });
|
|
117
|
+
expect(output.continue).toBe(true);
|
|
118
|
+
});
|
|
119
|
+
it('inject handles empty object gracefully', () => {
|
|
120
|
+
const output = runScript(INJECT_SCRIPT, {});
|
|
121
|
+
expect(output.continue).toBe(true);
|
|
122
|
+
});
|
|
123
|
+
it('verify handles empty object gracefully (blocks on first attempt)', () => {
|
|
124
|
+
const output = runScript(VERIFY_SCRIPT, {});
|
|
125
|
+
expect(output.hookSpecificOutput.decision).toBe('block');
|
|
126
|
+
});
|
|
127
|
+
it('inject handles non-string agent_type gracefully', () => {
|
|
128
|
+
const output = runScript(INJECT_SCRIPT, { agent_type: 42 });
|
|
129
|
+
expect(output.continue).toBe(true);
|
|
130
|
+
});
|
|
131
|
+
it('inject handles null agent_type gracefully', () => {
|
|
132
|
+
const output = runScript(INJECT_SCRIPT, { agent_type: null });
|
|
133
|
+
expect(output.continue).toBe(true);
|
|
134
|
+
});
|
|
135
|
+
it('both scripts handle garbage stdin without crashing', () => {
|
|
136
|
+
// inject-skills.mjs
|
|
137
|
+
const injectResult = execFileSync('node', [INJECT_SCRIPT], {
|
|
138
|
+
input: 'this is not json {{{',
|
|
139
|
+
encoding: 'utf8',
|
|
140
|
+
cwd: PROJECT_ROOT,
|
|
141
|
+
timeout: 10000,
|
|
142
|
+
});
|
|
143
|
+
const injectOutput = JSON.parse(injectResult);
|
|
144
|
+
expect(injectOutput.continue).toBe(true);
|
|
145
|
+
// verify-skills.mjs
|
|
146
|
+
const verifyResult = execFileSync('node', [VERIFY_SCRIPT], {
|
|
147
|
+
input: 'garbage input!!!',
|
|
148
|
+
encoding: 'utf8',
|
|
149
|
+
cwd: PROJECT_ROOT,
|
|
150
|
+
timeout: 10000,
|
|
151
|
+
});
|
|
152
|
+
const verifyOutput = JSON.parse(verifyResult);
|
|
153
|
+
expect(verifyOutput.continue).toBe(true);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
// ─── Skill content injection verification ──────────────────────────────────
|
|
157
|
+
describe('Injected skill content is real, not placeholders', () => {
|
|
158
|
+
it('developer context contains actual vercel-react-best-practices content', () => {
|
|
159
|
+
const output = runScript(INJECT_SCRIPT, {
|
|
160
|
+
agent_type: 'developer',
|
|
161
|
+
cwd: PROJECT_ROOT,
|
|
162
|
+
});
|
|
163
|
+
const ctx = output.hookSpecificOutput.additionalContext;
|
|
164
|
+
// The inject layer loads the actual SKILL.md file content
|
|
165
|
+
// Verify it contains real content, not just the path
|
|
166
|
+
expect(ctx).toContain('React');
|
|
167
|
+
expect(ctx.length).toBeGreaterThan(500); // Real content, not a stub
|
|
168
|
+
});
|
|
169
|
+
it('ux-designer context contains actual web-design-guidelines content', () => {
|
|
170
|
+
const output = runScript(INJECT_SCRIPT, {
|
|
171
|
+
agent_type: 'ux-designer',
|
|
172
|
+
cwd: PROJECT_ROOT,
|
|
173
|
+
});
|
|
174
|
+
const ctx = output.hookSpecificOutput.additionalContext;
|
|
175
|
+
expect(ctx.length).toBeGreaterThan(500);
|
|
176
|
+
});
|
|
177
|
+
it('tester context contains actual web-design-guidelines content', () => {
|
|
178
|
+
const output = runScript(INJECT_SCRIPT, {
|
|
179
|
+
agent_type: 'tester',
|
|
180
|
+
cwd: PROJECT_ROOT,
|
|
181
|
+
});
|
|
182
|
+
const ctx = output.hookSpecificOutput.additionalContext;
|
|
183
|
+
expect(ctx.length).toBeGreaterThan(500);
|
|
184
|
+
});
|
|
185
|
+
it('researcher context contains actual web-search content', () => {
|
|
186
|
+
const output = runScript(INJECT_SCRIPT, {
|
|
187
|
+
agent_type: 'researcher',
|
|
188
|
+
cwd: PROJECT_ROOT,
|
|
189
|
+
});
|
|
190
|
+
const ctx = output.hookSpecificOutput.additionalContext;
|
|
191
|
+
expect(ctx.length).toBeGreaterThan(200);
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
// ─── Cross-hook consistency ────────────────────────────────────────────────
|
|
195
|
+
describe('Cross-hook consistency', () => {
|
|
196
|
+
it('verify challenge text mentions skills that inject actually loaded', () => {
|
|
197
|
+
// The verify hook should challenge about skills — and inject should have provided them
|
|
198
|
+
const injectOutput = runScript(INJECT_SCRIPT, {
|
|
199
|
+
agent_type: 'developer',
|
|
200
|
+
cwd: PROJECT_ROOT,
|
|
201
|
+
});
|
|
202
|
+
const verifyOutput = runScript(VERIFY_SCRIPT, {
|
|
203
|
+
agent_type: 'developer',
|
|
204
|
+
});
|
|
205
|
+
// Inject loaded skills
|
|
206
|
+
const ctx = injectOutput.hookSpecificOutput.additionalContext;
|
|
207
|
+
expect(ctx).toContain('MANDATORY');
|
|
208
|
+
// Verify challenges about those skills
|
|
209
|
+
const reason = verifyOutput.hookSpecificOutput.reason;
|
|
210
|
+
expect(reason).toContain('MANDATORY skills');
|
|
211
|
+
});
|
|
212
|
+
it('all 6 agents produce different inject contexts', () => {
|
|
213
|
+
const contexts = KNOWN_AGENTS.map((agent) => {
|
|
214
|
+
const output = runScript(INJECT_SCRIPT, {
|
|
215
|
+
agent_type: agent,
|
|
216
|
+
cwd: PROJECT_ROOT,
|
|
217
|
+
});
|
|
218
|
+
return output.hookSpecificOutput.additionalContext;
|
|
219
|
+
});
|
|
220
|
+
// Every agent should get a unique context
|
|
221
|
+
const uniqueContexts = new Set(contexts);
|
|
222
|
+
expect(uniqueContexts.size).toBe(KNOWN_AGENTS.length);
|
|
223
|
+
});
|
|
224
|
+
it('verify produces identical challenge for all agent types', () => {
|
|
225
|
+
// The compliance gate is agent-agnostic — same challenge for everyone
|
|
226
|
+
const challenges = KNOWN_AGENTS.map((agent) => {
|
|
227
|
+
const output = runScript(VERIFY_SCRIPT, { agent_type: agent });
|
|
228
|
+
return output.hookSpecificOutput.reason;
|
|
229
|
+
});
|
|
230
|
+
const uniqueChallenges = new Set(challenges);
|
|
231
|
+
expect(uniqueChallenges.size).toBe(1);
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
//# sourceMappingURL=pipeline-integration.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-integration.test.js","sourceRoot":"","sources":["../../../src/__tests__/skills/pipeline-integration.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,yCAAyC,CAAC,CAAC;AACrF,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,yCAAyC,CAAC,CAAC;AACrF,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAEnC,8DAA8D;AAC9D,SAAS,SAAS,CAAC,UAAkB,EAAE,KAA8B;IACnE,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE;QAChD,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QAC5B,QAAQ,EAAE,MAAM;QAChB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,KAAK;KACf,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC;AAED,8FAA8F;AAC9F,SAAS,WAAW,CAAC,SAAiB;IACpC,wCAAwC;IACxC,MAAM,YAAY,GAAG,SAAS,CAAC,aAAa,EAAE;QAC5C,UAAU,EAAE,SAAS;QACrB,GAAG,EAAE,YAAY;KAClB,CAAQ,CAAC;IAEV,sDAAsD;IACtD,MAAM,SAAS,GAAG,SAAS,CAAC,aAAa,EAAE;QACzC,UAAU,EAAE,SAAS;KACtB,CAAQ,CAAC;IAEV,mEAAmE;IACnE,MAAM,SAAS,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,UAAU,EAAE,KAAK;gBACjB,GAAG,EAAE,YAAY;aAClB,CAAQ,CAAC;YACV,OAAO,MAAM,CAAC,kBAAkB,CAAC,iBAAiB,CAAC;QACrD,CAAC,CAAC,CAAC;QAEH,0CAA0C;QAC1C,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;QACzC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,sEAAsE;QACtE,MAAM,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YAC5C,MAAM,MAAM,GAAG,SAAS,CAAC,aAAa,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAQ,CAAC;YACtE,OAAO,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC;QAC1C,CAAC,CAAC,CAAC;QAEH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;QAC7C,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill Routing Tests — Categories 2–10
|
|
3
|
+
*
|
|
4
|
+
* Verifies every skill in the test matrix:
|
|
5
|
+
* 1. Has a valid SKILL.md file on disk (exists and is non-empty)
|
|
6
|
+
* 2. Is mapped to a valid agent from the Beth team
|
|
7
|
+
*
|
|
8
|
+
* These tests validate the structural integrity of the skill system.
|
|
9
|
+
* They do NOT test LLM prompt inference or enforcement mechanisms
|
|
10
|
+
* (hook injection is tested in hook-injection.test.ts).
|
|
11
|
+
*
|
|
12
|
+
* Test plan reference: docs/E2E-SKILL-TESTS.md — Categories 2–10 (tests 10–72)
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=skill-routing.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-routing.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/skills/skill-routing.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
|