@webpresso/agent-kit 0.21.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/.claude-plugin/marketplace.json +27 -0
- package/.claude-plugin/plugin.json +73 -0
- package/LICENSE +21 -0
- package/README.md +106 -0
- package/THIRD-PARTY-NOTICES.md +60 -0
- package/bin/_run.js +201 -0
- package/bin/docs-check-internal-links.js +5 -0
- package/bin/docs-check-refs.js +5 -0
- package/bin/docs-check-stale.js +5 -0
- package/bin/docs-lint.js +5 -0
- package/bin/docs-migrate.js +5 -0
- package/bin/wp-check-dev-link.js +5 -0
- package/bin/wp-guard-switch.js +5 -0
- package/bin/wp-post-tool.js +5 -0
- package/bin/wp-pretool-guard.js +5 -0
- package/bin/wp-restore-dev-links.js +5 -0
- package/bin/wp-sessionstart-routing.js +5 -0
- package/bin/wp-stop-qa.js +5 -0
- package/bin/wp-test-quality-check.js +5 -0
- package/bin/wp.js +5 -0
- package/catalog/AGENTS.md.tpl +202 -0
- package/catalog/agent/.audit-budgets.yaml +12 -0
- package/catalog/agent/agents/README.md +22 -0
- package/catalog/agent/agents/code-reviewer.md +34 -0
- package/catalog/agent/agents/doc-writer.md +35 -0
- package/catalog/agent/agents/explorer.md +33 -0
- package/catalog/agent/agents/security-auditor.md +34 -0
- package/catalog/agent/commands/audit-duplication.md +34 -0
- package/catalog/agent/commands/audit.md +219 -0
- package/catalog/agent/commands/brainstorm.md +115 -0
- package/catalog/agent/commands/decide.md +132 -0
- package/catalog/agent/commands/fix-all.md +160 -0
- package/catalog/agent/commands/fix.md +109 -0
- package/catalog/agent/commands/plan-refine.md +103 -0
- package/catalog/agent/commands/pll.md +174 -0
- package/catalog/agent/commands/tph.md +380 -0
- package/catalog/agent/commands/verify.md +9 -0
- package/catalog/agent/correlate.allow.yaml +5 -0
- package/catalog/agent/guides/agent-guardrails.md +116 -0
- package/catalog/agent/guides/parallel-execution.md +79 -0
- package/catalog/agent/guides/plan-audit-checklist.md +189 -0
- package/catalog/agent/guides/skills.md +32 -0
- package/catalog/agent/rules/README.md +30 -0
- package/catalog/agent/rules/agent-guide.md +464 -0
- package/catalog/agent/rules/blueprint-scoping.md +69 -0
- package/catalog/agent/rules/changeset-release.md +161 -0
- package/catalog/agent/rules/cmd-execution.md +121 -0
- package/catalog/agent/rules/context-mode-routing.md +64 -0
- package/catalog/agent/rules/engineering-principles.md +42 -0
- package/catalog/agent/rules/extraction-parity.md +157 -0
- package/catalog/agent/rules/generated-code-governance.md +87 -0
- package/catalog/agent/rules/gstack-routing.md +90 -0
- package/catalog/agent/rules/no-timeout-as-fix.md +90 -0
- package/catalog/agent/rules/package-conventions.md +80 -0
- package/catalog/agent/rules/pre-implementation.md +44 -0
- package/catalog/agent/rules/public-package-safety.md +56 -0
- package/catalog/agent/rules/repo-restrictions.md +175 -0
- package/catalog/agent/rules/rtk-routing.md +50 -0
- package/catalog/agent/rules/supported-agent-clis.md +80 -0
- package/catalog/agent/rules/ts-coding-conventions.md +68 -0
- package/catalog/agent/skills/better-auth-best-practices/SKILL.md +212 -0
- package/catalog/agent/skills/deep-research/SKILL.md +240 -0
- package/catalog/agent/skills/fix/SKILL.md +120 -0
- package/catalog/agent/skills/frontend-design/LICENSE.txt +177 -0
- package/catalog/agent/skills/frontend-design/SKILL.md +189 -0
- package/catalog/agent/skills/hooks-doctor/SKILL.md +77 -0
- package/catalog/agent/skills/logging-best-practices/SKILL.md +145 -0
- package/catalog/agent/skills/logging-best-practices/rules/context.md +157 -0
- package/catalog/agent/skills/logging-best-practices/rules/pitfalls.md +118 -0
- package/catalog/agent/skills/logging-best-practices/rules/structure.md +195 -0
- package/catalog/agent/skills/logging-best-practices/rules/wide-events.md +113 -0
- package/catalog/agent/skills/lore-protocol/SKILL.md +93 -0
- package/catalog/agent/skills/monorepo-navigation/SKILL.md.tpl +57 -0
- package/catalog/agent/skills/monorepo-navigation/examples/webpresso.md +240 -0
- package/catalog/agent/skills/plan-refine/SKILL.md +645 -0
- package/catalog/agent/skills/pll/SKILL.md +85 -0
- package/catalog/agent/skills/react-doctor/SKILL.md +54 -0
- package/catalog/agent/skills/systematic-debugging/CREATION-LOG.md +133 -0
- package/catalog/agent/skills/systematic-debugging/SKILL.md +322 -0
- package/catalog/agent/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/catalog/agent/skills/systematic-debugging/condition-based-waiting.md +120 -0
- package/catalog/agent/skills/systematic-debugging/defense-in-depth.md +128 -0
- package/catalog/agent/skills/systematic-debugging/find-polluter.sh +63 -0
- package/catalog/agent/skills/systematic-debugging/root-cause-tracing.md +183 -0
- package/catalog/agent/skills/systematic-debugging/test-academic.md +14 -0
- package/catalog/agent/skills/systematic-debugging/test-pressure-1.md +65 -0
- package/catalog/agent/skills/systematic-debugging/test-pressure-2.md +75 -0
- package/catalog/agent/skills/systematic-debugging/test-pressure-3.md +75 -0
- package/catalog/agent/skills/tanstack-query/.claude-plugin/plugin.json +12 -0
- package/catalog/agent/skills/tanstack-query/README.md +59 -0
- package/catalog/agent/skills/tanstack-query/SKILL.md +175 -0
- package/catalog/agent/skills/tanstack-query/references/best-practices.md +63 -0
- package/catalog/agent/skills/tanstack-query/references/common-patterns.md +43 -0
- package/catalog/agent/skills/tanstack-query/references/testing.md +44 -0
- package/catalog/agent/skills/tanstack-query/references/top-errors.md +19 -0
- package/catalog/agent/skills/tanstack-query/references/typescript-patterns.md +36 -0
- package/catalog/agent/skills/tanstack-query/rules/tanstack-query.md +41 -0
- package/catalog/agent/skills/tanstack-query/templates/custom-hooks-pattern.tsx +26 -0
- package/catalog/agent/skills/tanstack-query/templates/devtools-setup.tsx +13 -0
- package/catalog/agent/skills/tanstack-query/templates/error-boundary.tsx +52 -0
- package/catalog/agent/skills/tanstack-query/templates/package.json +24 -0
- package/catalog/agent/skills/tanstack-query/templates/provider-setup.tsx +19 -0
- package/catalog/agent/skills/tanstack-query/templates/query-client-config.ts +43 -0
- package/catalog/agent/skills/tanstack-query/templates/use-infinite-query.tsx +61 -0
- package/catalog/agent/skills/tanstack-query/templates/use-mutation-basic.tsx +52 -0
- package/catalog/agent/skills/tanstack-query/templates/use-mutation-optimistic.tsx +48 -0
- package/catalog/agent/skills/tanstack-query/templates/use-query-basic.tsx +77 -0
- package/catalog/agent/skills/tech-debt/SKILL.md +79 -0
- package/catalog/agent/skills/test-driven-development/SKILL.md +403 -0
- package/catalog/agent/skills/test-driven-development/testing-anti-patterns.md +317 -0
- package/catalog/agent/skills/testing-philosophy/SKILL.md +530 -0
- package/catalog/agent/skills/third-party-manifest.json +30 -0
- package/catalog/agent/skills/vercel-react-best-practices/AGENTS.md +2672 -0
- package/catalog/agent/skills/vercel-react-best-practices/README.md +127 -0
- package/catalog/agent/skills/vercel-react-best-practices/SKILL.md +212 -0
- package/catalog/agent/skills/vercel-react-best-practices/metadata.json +15 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/_sections.md +46 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/_template.md +28 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/async-api-routes.md +35 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/async-dependencies.md +48 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/async-parallel.md +24 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/bundle-conditional.md +37 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +48 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +34 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/bundle-preload.md +44 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/client-event-listeners.md +78 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +74 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +110 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/js-cache-storage.md +68 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/js-length-check-first.md +50 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +38 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +32 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +36 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +72 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +77 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +56 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +36 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/catalog/agent/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/catalog/agent/skills/verify/SKILL.md +133 -0
- package/catalog/agent/skills/web-design-guidelines/SKILL.md +53 -0
- package/catalog/agent/workflows/README.md +20 -0
- package/catalog/agent/workflows/conf.md +18 -0
- package/catalog/agent/workflows/debug.md +20 -0
- package/catalog/agent/workflows/docs.md +9 -0
- package/catalog/agent/workflows/execute-plan.md +15 -0
- package/catalog/agent/workflows/fix-all-md-warnings.md +13 -0
- package/catalog/agent/workflows/test.md +14 -0
- package/catalog/agent/workflows/write-plan.md +16 -0
- package/catalog/base-kit/.actrc.tmpl +2 -0
- package/catalog/base-kit/.editorconfig.tmpl +23 -0
- package/catalog/base-kit/.github/workflows/ci.webpresso.yml.tmpl +66 -0
- package/catalog/base-kit/.gitignore.tmpl +82 -0
- package/catalog/base-kit/.husky/commit-msg.tmpl +7 -0
- package/catalog/base-kit/.husky/pre-commit.tmpl +10 -0
- package/catalog/base-kit/.secretlintrc.json.tmpl +5 -0
- package/catalog/base-kit/commitlint.config.ts.tmpl +7 -0
- package/catalog/base-kit/e2e/.gitkeep.tmpl +0 -0
- package/catalog/base-kit/pnpm-workspace.yaml.tmpl +49 -0
- package/catalog/base-kit/scripts/audit-secret-provider-quarantine.ts.tmpl +91 -0
- package/catalog/base-kit/scripts/check-no-dev-vars.ts.tmpl +56 -0
- package/catalog/base-kit/test/.gitkeep.tmpl +0 -0
- package/catalog/blueprints/archived/.gitkeep +0 -0
- package/catalog/blueprints/completed/.gitkeep +0 -0
- package/catalog/blueprints/in-progress/.gitkeep +0 -0
- package/catalog/blueprints/parked/.gitkeep +0 -0
- package/catalog/blueprints/planned/.gitkeep +0 -0
- package/catalog/docs/templates/adr.md +38 -0
- package/catalog/docs/templates/blueprint.md +149 -0
- package/catalog/docs/templates/blueprint.yaml +110 -0
- package/catalog/docs/templates/core-doc.yaml +28 -0
- package/catalog/docs/templates/guide.md +31 -0
- package/catalog/docs/templates/guide.yaml +31 -0
- package/catalog/docs/templates/postmortem.md +60 -0
- package/catalog/docs/templates/research.md +37 -0
- package/catalog/docs/templates/runbook.md +39 -0
- package/catalog/docs/templates/system.md +44 -0
- package/catalog/docs/templates/tech-debt.md +78 -0
- package/catalog/vision/VISION.md.tmpl +33 -0
- package/commands/audit.md +13 -0
- package/commands/blueprint.md +28 -0
- package/commands/qa.md +4 -0
- package/commands/test.md +4 -0
- package/dist/esm/ai-memory/checkpoint/saver.d.ts +14 -0
- package/dist/esm/ai-memory/checkpoint/saver.js +28 -0
- package/dist/esm/ai-memory/checkpoint/types.d.ts +75 -0
- package/dist/esm/ai-memory/checkpoint/types.js +2 -0
- package/dist/esm/ai-memory/facts/consolidator.d.ts +23 -0
- package/dist/esm/ai-memory/facts/consolidator.js +134 -0
- package/dist/esm/ai-memory/facts/extractor.d.ts +28 -0
- package/dist/esm/ai-memory/facts/extractor.js +119 -0
- package/dist/esm/ai-memory/facts/types.d.ts +61 -0
- package/dist/esm/ai-memory/facts/types.js +2 -0
- package/dist/esm/ai-memory/hierarchy/retriever.d.ts +47 -0
- package/dist/esm/ai-memory/hierarchy/retriever.js +139 -0
- package/dist/esm/ai-memory/index.d.ts +11 -0
- package/dist/esm/ai-memory/index.js +6 -0
- package/dist/esm/ai-memory/store/sqlite-store.d.ts +28 -0
- package/dist/esm/ai-memory/store/sqlite-store.js +213 -0
- package/dist/esm/ai-prompts/business-canvas.d.ts +52 -0
- package/dist/esm/ai-prompts/business-canvas.js +292 -0
- package/dist/esm/ai-prompts/circuit-breaker.d.ts +35 -0
- package/dist/esm/ai-prompts/circuit-breaker.js +171 -0
- package/dist/esm/ai-prompts/experiment-draft.d.ts +86 -0
- package/dist/esm/ai-prompts/experiment-draft.js +188 -0
- package/dist/esm/ai-prompts/index.d.ts +12 -0
- package/dist/esm/ai-prompts/index.js +11 -0
- package/dist/esm/ai-prompts/persona-context.d.ts +70 -0
- package/dist/esm/ai-prompts/persona-context.js +158 -0
- package/dist/esm/ai-prompts/persona-debate.d.ts +67 -0
- package/dist/esm/ai-prompts/persona-debate.js +172 -0
- package/dist/esm/ai-prompts/persona-tools.d.ts +26 -0
- package/dist/esm/ai-prompts/persona-tools.js +172 -0
- package/dist/esm/ai-prompts/personas.d.ts +16 -0
- package/dist/esm/ai-prompts/personas.js +492 -0
- package/dist/esm/ai-prompts/rachel-planning.d.ts +28 -0
- package/dist/esm/ai-prompts/rachel-planning.js +217 -0
- package/dist/esm/ai-prompts/task-analysis.d.ts +49 -0
- package/dist/esm/ai-prompts/task-analysis.js +434 -0
- package/dist/esm/ai-prompts/types.d.ts +3 -0
- package/dist/esm/ai-prompts/types.js +2 -0
- package/dist/esm/ai-tools/index.d.ts +7 -0
- package/dist/esm/ai-tools/index.js +6 -0
- package/dist/esm/ai-tools/list-files.d.ts +3 -0
- package/dist/esm/ai-tools/list-files.js +93 -0
- package/dist/esm/ai-tools/read-file.d.ts +3 -0
- package/dist/esm/ai-tools/read-file.js +108 -0
- package/dist/esm/ai-tools/search-files.d.ts +3 -0
- package/dist/esm/ai-tools/search-files.js +166 -0
- package/dist/esm/ai-tools/shared/validate-path.d.ts +11 -0
- package/dist/esm/ai-tools/shared/validate-path.js +25 -0
- package/dist/esm/ai-tools/types.d.ts +370 -0
- package/dist/esm/ai-tools/types.js +2 -0
- package/dist/esm/ai-tools/write-file.d.ts +3 -0
- package/dist/esm/ai-tools/write-file.js +165 -0
- package/dist/esm/audit/_budgets.d.ts +28 -0
- package/dist/esm/audit/_budgets.js +60 -0
- package/dist/esm/audit/absolute-path-policy.d.ts +5 -0
- package/dist/esm/audit/absolute-path-policy.js +97 -0
- package/dist/esm/audit/agent-cost.d.ts +3 -0
- package/dist/esm/audit/agent-cost.js +111 -0
- package/dist/esm/audit/agents.d.ts +3 -0
- package/dist/esm/audit/agents.js +331 -0
- package/dist/esm/audit/ai-contracts.d.ts +3 -0
- package/dist/esm/audit/ai-contracts.js +238 -0
- package/dist/esm/audit/architecture-drift.d.ts +33 -0
- package/dist/esm/audit/architecture-drift.js +364 -0
- package/dist/esm/audit/audit-mutation-score.d.ts +43 -0
- package/dist/esm/audit/audit-mutation-score.js +92 -0
- package/dist/esm/audit/audit-no-ambient-root.d.ts +29 -0
- package/dist/esm/audit/audit-no-ambient-root.js +83 -0
- package/dist/esm/audit/audit-tph-detect.d.ts +49 -0
- package/dist/esm/audit/audit-tph-detect.js +248 -0
- package/dist/esm/audit/audit-tph-e2e-detect.d.ts +27 -0
- package/dist/esm/audit/audit-tph-e2e-detect.js +84 -0
- package/dist/esm/audit/audit-tph-e2e-runner.d.ts +8 -0
- package/dist/esm/audit/audit-tph-e2e-runner.js +106 -0
- package/dist/esm/audit/audit-tph-e2e.d.ts +16 -0
- package/dist/esm/audit/audit-tph-e2e.js +17 -0
- package/dist/esm/audit/audit-tph-runner.d.ts +10 -0
- package/dist/esm/audit/audit-tph-runner.js +115 -0
- package/dist/esm/audit/audit-tph.d.ts +17 -0
- package/dist/esm/audit/audit-tph.js +38 -0
- package/dist/esm/audit/blueprint-db-consistency.d.ts +15 -0
- package/dist/esm/audit/blueprint-db-consistency.js +109 -0
- package/dist/esm/audit/blueprint-lifecycle-sql.d.ts +17 -0
- package/dist/esm/audit/blueprint-lifecycle-sql.js +136 -0
- package/dist/esm/audit/broken-refs.d.ts +26 -0
- package/dist/esm/audit/broken-refs.js +181 -0
- package/dist/esm/audit/bucket-boundary.d.ts +21 -0
- package/dist/esm/audit/bucket-boundary.js +330 -0
- package/dist/esm/audit/commit-message-lore.d.ts +41 -0
- package/dist/esm/audit/commit-message-lore.js +113 -0
- package/dist/esm/audit/compile-drift.d.ts +3 -0
- package/dist/esm/audit/compile-drift.js +42 -0
- package/dist/esm/audit/cross-repo-correlation.d.ts +14 -0
- package/dist/esm/audit/cross-repo-correlation.js +50 -0
- package/dist/esm/audit/gitignore-agent-surfaces.d.ts +3 -0
- package/dist/esm/audit/gitignore-agent-surfaces.js +68 -0
- package/dist/esm/audit/hook-surface.d.ts +82 -0
- package/dist/esm/audit/hook-surface.js +251 -0
- package/dist/esm/audit/memory-rotation.d.ts +31 -0
- package/dist/esm/audit/memory-rotation.js +137 -0
- package/dist/esm/audit/memory-unified.d.ts +3 -0
- package/dist/esm/audit/memory-unified.js +46 -0
- package/dist/esm/audit/open-source-licenses.d.ts +4 -0
- package/dist/esm/audit/open-source-licenses.js +224 -0
- package/dist/esm/audit/package-surface.d.ts +7 -0
- package/dist/esm/audit/package-surface.js +674 -0
- package/dist/esm/audit/repo-guardrails.d.ts +89 -0
- package/dist/esm/audit/repo-guardrails.js +875 -0
- package/dist/esm/audit/roadmap-links.d.ts +7 -0
- package/dist/esm/audit/roadmap-links.js +235 -0
- package/dist/esm/audit/run-stryker.d.ts +9 -0
- package/dist/esm/audit/run-stryker.js +24 -0
- package/dist/esm/audit/shell.d.ts +17 -0
- package/dist/esm/audit/shell.js +32 -0
- package/dist/esm/audit/skill-sizes.d.ts +25 -0
- package/dist/esm/audit/skill-sizes.js +153 -0
- package/dist/esm/audit/tech-debt-cadence.d.ts +16 -0
- package/dist/esm/audit/tech-debt-cadence.js +101 -0
- package/dist/esm/audit/tech-debt.d.ts +9 -0
- package/dist/esm/audit/tech-debt.js +107 -0
- package/dist/esm/audit/vision-doc.d.ts +21 -0
- package/dist/esm/audit/vision-doc.js +136 -0
- package/dist/esm/blueprint/aggregate.d.ts +146 -0
- package/dist/esm/blueprint/aggregate.js +217 -0
- package/dist/esm/blueprint/context.d.ts +70 -0
- package/dist/esm/blueprint/context.js +301 -0
- package/dist/esm/blueprint/core/parser.d.ts +53 -0
- package/dist/esm/blueprint/core/parser.js +281 -0
- package/dist/esm/blueprint/core/schema.d.ts +163 -0
- package/dist/esm/blueprint/core/schema.js +98 -0
- package/dist/esm/blueprint/core/types.d.ts +13 -0
- package/dist/esm/blueprint/core/types.js +5 -0
- package/dist/esm/blueprint/core/validation/criteria.d.ts +6 -0
- package/dist/esm/blueprint/core/validation/criteria.js +15 -0
- package/dist/esm/blueprint/core/validation/dependencies.d.ts +19 -0
- package/dist/esm/blueprint/core/validation/dependencies.js +113 -0
- package/dist/esm/blueprint/core/validation/index.d.ts +13 -0
- package/dist/esm/blueprint/core/validation/index.js +11 -0
- package/dist/esm/blueprint/core/validation/links.d.ts +18 -0
- package/dist/esm/blueprint/core/validation/links.js +47 -0
- package/dist/esm/blueprint/core/validation/phases.d.ts +12 -0
- package/dist/esm/blueprint/core/validation/phases.js +18 -0
- package/dist/esm/blueprint/core/validation/state.d.ts +9 -0
- package/dist/esm/blueprint/core/validation/state.js +123 -0
- package/dist/esm/blueprint/core/validation/task-blocks.d.ts +27 -0
- package/dist/esm/blueprint/core/validation/task-blocks.js +48 -0
- package/dist/esm/blueprint/core/validation/task-sections.d.ts +14 -0
- package/dist/esm/blueprint/core/validation/task-sections.js +60 -0
- package/dist/esm/blueprint/core/validation/template.d.ts +9 -0
- package/dist/esm/blueprint/core/validation/template.js +65 -0
- package/dist/esm/blueprint/cross-repo/allowlist.d.ts +28 -0
- package/dist/esm/blueprint/cross-repo/allowlist.js +87 -0
- package/dist/esm/blueprint/cross-repo/audit.d.ts +49 -0
- package/dist/esm/blueprint/cross-repo/audit.js +161 -0
- package/dist/esm/blueprint/cross-repo/resolver.d.ts +28 -0
- package/dist/esm/blueprint/cross-repo/resolver.js +32 -0
- package/dist/esm/blueprint/dag/cycle-detector.d.ts +12 -0
- package/dist/esm/blueprint/dag/cycle-detector.js +46 -0
- package/dist/esm/blueprint/dag/executor.d.ts +140 -0
- package/dist/esm/blueprint/dag/executor.js +292 -0
- package/dist/esm/blueprint/dag/index.d.ts +20 -0
- package/dist/esm/blueprint/dag/index.js +17 -0
- package/dist/esm/blueprint/dag/interfaces.d.ts +56 -0
- package/dist/esm/blueprint/dag/interfaces.js +13 -0
- package/dist/esm/blueprint/dag/local/independence.d.ts +107 -0
- package/dist/esm/blueprint/dag/local/independence.js +231 -0
- package/dist/esm/blueprint/dag/local/index.d.ts +14 -0
- package/dist/esm/blueprint/dag/local/index.js +14 -0
- package/dist/esm/blueprint/dag/local/package-graph.d.ts +66 -0
- package/dist/esm/blueprint/dag/local/package-graph.js +148 -0
- package/dist/esm/blueprint/dag/plan-parser.d.ts +54 -0
- package/dist/esm/blueprint/dag/plan-parser.js +236 -0
- package/dist/esm/blueprint/dag/task-graph-algorithms.d.ts +13 -0
- package/dist/esm/blueprint/dag/task-graph-algorithms.js +236 -0
- package/dist/esm/blueprint/dag/task-graph.d.ts +171 -0
- package/dist/esm/blueprint/dag/task-graph.js +370 -0
- package/dist/esm/blueprint/dag/types.d.ts +17 -0
- package/dist/esm/blueprint/dag/types.js +2 -0
- package/dist/esm/blueprint/db/cold-start.d.ts +8 -0
- package/dist/esm/blueprint/db/cold-start.js +45 -0
- package/dist/esm/blueprint/db/connection.d.ts +8 -0
- package/dist/esm/blueprint/db/connection.js +45 -0
- package/dist/esm/blueprint/db/enums.d.ts +76 -0
- package/dist/esm/blueprint/db/enums.js +37 -0
- package/dist/esm/blueprint/db/ingester.d.ts +25 -0
- package/dist/esm/blueprint/db/ingester.js +307 -0
- package/dist/esm/blueprint/db/legacy-migration.d.ts +41 -0
- package/dist/esm/blueprint/db/legacy-migration.js +122 -0
- package/dist/esm/blueprint/db/migrations/run.d.ts +3 -0
- package/dist/esm/blueprint/db/migrations/run.js +53 -0
- package/dist/esm/blueprint/db/parser/blueprint-db-parser.d.ts +69 -0
- package/dist/esm/blueprint/db/parser/blueprint-db-parser.js +408 -0
- package/dist/esm/blueprint/db/parser/tech-debt-db-parser.d.ts +33 -0
- package/dist/esm/blueprint/db/parser/tech-debt-db-parser.js +134 -0
- package/dist/esm/blueprint/db/paths.d.ts +104 -0
- package/dist/esm/blueprint/db/paths.js +192 -0
- package/dist/esm/blueprint/db/sqlite.d.ts +32 -0
- package/dist/esm/blueprint/db/sqlite.js +46 -0
- package/dist/esm/blueprint/db/template-runner.d.ts +8 -0
- package/dist/esm/blueprint/db/template-runner.js +65 -0
- package/dist/esm/blueprint/db/templates.d.ts +11 -0
- package/dist/esm/blueprint/db/templates.js +226 -0
- package/dist/esm/blueprint/db/workspace-config.d.ts +38 -0
- package/dist/esm/blueprint/db/workspace-config.js +150 -0
- package/dist/esm/blueprint/evidence.d.ts +140 -0
- package/dist/esm/blueprint/evidence.js +152 -0
- package/dist/esm/blueprint/execution/artifacts.d.ts +9 -0
- package/dist/esm/blueprint/execution/artifacts.js +45 -0
- package/dist/esm/blueprint/execution/metadata.d.ts +11 -0
- package/dist/esm/blueprint/execution/metadata.js +46 -0
- package/dist/esm/blueprint/execution/progress-bridge.d.ts +117 -0
- package/dist/esm/blueprint/execution/progress-bridge.js +302 -0
- package/dist/esm/blueprint/execution/types.d.ts +233 -0
- package/dist/esm/blueprint/execution/types.js +99 -0
- package/dist/esm/blueprint/export/spec-kit/_field-map.d.ts +12 -0
- package/dist/esm/blueprint/export/spec-kit/_field-map.js +33 -0
- package/dist/esm/blueprint/export/spec-kit/constitution.d.ts +7 -0
- package/dist/esm/blueprint/export/spec-kit/constitution.js +61 -0
- package/dist/esm/blueprint/export/spec-kit/index.d.ts +13 -0
- package/dist/esm/blueprint/export/spec-kit/index.js +17 -0
- package/dist/esm/blueprint/export/spec-kit/plan.d.ts +7 -0
- package/dist/esm/blueprint/export/spec-kit/plan.js +43 -0
- package/dist/esm/blueprint/export/spec-kit/spec.d.ts +7 -0
- package/dist/esm/blueprint/export/spec-kit/spec.js +35 -0
- package/dist/esm/blueprint/export/spec-kit/tasks.d.ts +3 -0
- package/dist/esm/blueprint/export/spec-kit/tasks.js +32 -0
- package/dist/esm/blueprint/freshness.d.ts +78 -0
- package/dist/esm/blueprint/freshness.js +127 -0
- package/dist/esm/blueprint/graph/index.d.ts +5 -0
- package/dist/esm/blueprint/graph/index.js +5 -0
- package/dist/esm/blueprint/graph/mermaid-parser.d.ts +3 -0
- package/dist/esm/blueprint/graph/mermaid-parser.js +93 -0
- package/dist/esm/blueprint/graph/mermaid-serializer.d.ts +3 -0
- package/dist/esm/blueprint/graph/mermaid-serializer.js +20 -0
- package/dist/esm/blueprint/graph/schema.d.ts +89 -0
- package/dist/esm/blueprint/graph/schema.js +104 -0
- package/dist/esm/blueprint/graph/task-graph-adapter.d.ts +6 -0
- package/dist/esm/blueprint/graph/task-graph-adapter.js +30 -0
- package/dist/esm/blueprint/history/diff.d.ts +36 -0
- package/dist/esm/blueprint/history/diff.js +122 -0
- package/dist/esm/blueprint/index.d.ts +37 -0
- package/dist/esm/blueprint/index.js +46 -0
- package/dist/esm/blueprint/lifecycle/audit.d.ts +17 -0
- package/dist/esm/blueprint/lifecycle/audit.js +423 -0
- package/dist/esm/blueprint/lifecycle/engine.d.ts +38 -0
- package/dist/esm/blueprint/lifecycle/engine.js +157 -0
- package/dist/esm/blueprint/lifecycle/local.d.ts +15 -0
- package/dist/esm/blueprint/lifecycle/local.js +92 -0
- package/dist/esm/blueprint/local.d.ts +21 -0
- package/dist/esm/blueprint/local.js +25 -0
- package/dist/esm/blueprint/markdown/helpers.d.ts +17 -0
- package/dist/esm/blueprint/markdown/helpers.js +92 -0
- package/dist/esm/blueprint/markdown/task-heading.d.ts +8 -0
- package/dist/esm/blueprint/markdown/task-heading.js +19 -0
- package/dist/esm/blueprint/next-action.d.ts +27 -0
- package/dist/esm/blueprint/next-action.js +45 -0
- package/dist/esm/blueprint/project-resolver.d.ts +31 -0
- package/dist/esm/blueprint/project-resolver.js +142 -0
- package/dist/esm/blueprint/projection-ready.d.ts +3 -0
- package/dist/esm/blueprint/projection-ready.js +29 -0
- package/dist/esm/blueprint/projects.d.ts +96 -0
- package/dist/esm/blueprint/projects.js +383 -0
- package/dist/esm/blueprint/query/types.d.ts +53 -0
- package/dist/esm/blueprint/query/types.js +16 -0
- package/dist/esm/blueprint/roadmap.d.ts +24 -0
- package/dist/esm/blueprint/roadmap.js +82 -0
- package/dist/esm/blueprint/service/BlueprintCreationService.d.ts +47 -0
- package/dist/esm/blueprint/service/BlueprintCreationService.js +260 -0
- package/dist/esm/blueprint/service/BlueprintService.d.ts +70 -0
- package/dist/esm/blueprint/service/BlueprintService.js +190 -0
- package/dist/esm/blueprint/service/TechDebtService.d.ts +102 -0
- package/dist/esm/blueprint/service/TechDebtService.js +337 -0
- package/dist/esm/blueprint/service/TrackedDocumentService.d.ts +198 -0
- package/dist/esm/blueprint/service/TrackedDocumentService.js +162 -0
- package/dist/esm/blueprint/service/blueprint-records.d.ts +8 -0
- package/dist/esm/blueprint/service/blueprint-records.js +124 -0
- package/dist/esm/blueprint/service/blueprint-tech-debt-links.d.ts +3 -0
- package/dist/esm/blueprint/service/blueprint-tech-debt-links.js +35 -0
- package/dist/esm/blueprint/service/priority-scoring.d.ts +21 -0
- package/dist/esm/blueprint/service/priority-scoring.js +85 -0
- package/dist/esm/blueprint/service/scanner.d.ts +56 -0
- package/dist/esm/blueprint/service/scanner.js +212 -0
- package/dist/esm/blueprint/sync/auth.d.ts +27 -0
- package/dist/esm/blueprint/sync/auth.js +59 -0
- package/dist/esm/blueprint/sync/client.d.ts +64 -0
- package/dist/esm/blueprint/sync/client.js +232 -0
- package/dist/esm/blueprint/sync/replica.d.ts +55 -0
- package/dist/esm/blueprint/sync/replica.js +139 -0
- package/dist/esm/blueprint/sync/types.d.ts +178 -0
- package/dist/esm/blueprint/sync/types.js +18 -0
- package/dist/esm/blueprint/tech-debt/index.d.ts +9 -0
- package/dist/esm/blueprint/tech-debt/index.js +9 -0
- package/dist/esm/blueprint/tech-debt/parser.d.ts +56 -0
- package/dist/esm/blueprint/tech-debt/parser.js +133 -0
- package/dist/esm/blueprint/tech-debt/query-types.d.ts +130 -0
- package/dist/esm/blueprint/tech-debt/query-types.js +37 -0
- package/dist/esm/blueprint/tech-debt/schema.d.ts +151 -0
- package/dist/esm/blueprint/tech-debt/schema.js +145 -0
- package/dist/esm/blueprint/test-utils/blueprint-mocks.d.ts +31 -0
- package/dist/esm/blueprint/test-utils/blueprint-mocks.js +63 -0
- package/dist/esm/blueprint/tracked-document/index.d.ts +11 -0
- package/dist/esm/blueprint/tracked-document/index.js +11 -0
- package/dist/esm/blueprint/tracked-document/parser.d.ts +113 -0
- package/dist/esm/blueprint/tracked-document/parser.js +197 -0
- package/dist/esm/blueprint/tracked-document/query-types.d.ts +43 -0
- package/dist/esm/blueprint/tracked-document/query-types.js +8 -0
- package/dist/esm/blueprint/tracked-document/schema.d.ts +80 -0
- package/dist/esm/blueprint/tracked-document/schema.js +89 -0
- package/dist/esm/blueprint/types/execution-backend.d.ts +17 -0
- package/dist/esm/blueprint/types/execution-backend.js +16 -0
- package/dist/esm/blueprint/utils/archive.d.ts +69 -0
- package/dist/esm/blueprint/utils/archive.js +209 -0
- package/dist/esm/blueprint/utils/blueprint-root.d.ts +9 -0
- package/dist/esm/blueprint/utils/blueprint-root.js +77 -0
- package/dist/esm/blueprint/utils/conflict.d.ts +125 -0
- package/dist/esm/blueprint/utils/conflict.js +111 -0
- package/dist/esm/blueprint/utils/decision-trace-artifacts.d.ts +16 -0
- package/dist/esm/blueprint/utils/decision-trace-artifacts.js +37 -0
- package/dist/esm/blueprint/utils/errors.d.ts +14 -0
- package/dist/esm/blueprint/utils/errors.js +44 -0
- package/dist/esm/blueprint/utils/freshness.d.ts +21 -0
- package/dist/esm/blueprint/utils/freshness.js +66 -0
- package/dist/esm/blueprint/utils/package-assets.d.ts +6 -0
- package/dist/esm/blueprint/utils/package-assets.js +20 -0
- package/dist/esm/blueprint/utils/string.d.ts +8 -0
- package/dist/esm/blueprint/utils/string.js +10 -0
- package/dist/esm/blueprint/utils/tech-debt-root.d.ts +4 -0
- package/dist/esm/blueprint/utils/tech-debt-root.js +18 -0
- package/dist/esm/blueprint/verification.d.ts +116 -0
- package/dist/esm/blueprint/verification.js +246 -0
- package/dist/esm/build/generate-skills-dir.d.ts +14 -0
- package/dist/esm/build/generate-skills-dir.js +56 -0
- package/dist/esm/ci/act-helper.d.ts +29 -0
- package/dist/esm/ci/act-helper.js +106 -0
- package/dist/esm/ci/act-runner.d.ts +24 -0
- package/dist/esm/ci/act-runner.js +71 -0
- package/dist/esm/cli/auto-update/detect-pm.d.ts +76 -0
- package/dist/esm/cli/auto-update/detect-pm.js +237 -0
- package/dist/esm/cli/auto-update/installer.d.ts +65 -0
- package/dist/esm/cli/auto-update/installer.js +171 -0
- package/dist/esm/cli/auto-update/log.d.ts +46 -0
- package/dist/esm/cli/auto-update/log.js +107 -0
- package/dist/esm/cli/auto-update/run.d.ts +23 -0
- package/dist/esm/cli/auto-update/run.js +116 -0
- package/dist/esm/cli/auto-update/skip.d.ts +34 -0
- package/dist/esm/cli/auto-update/skip.js +84 -0
- package/dist/esm/cli/bootstrap.d.ts +28 -0
- package/dist/esm/cli/bootstrap.js +55 -0
- package/dist/esm/cli/cli.d.ts +11 -0
- package/dist/esm/cli/cli.js +310 -0
- package/dist/esm/cli/commands/audit-core.d.ts +61 -0
- package/dist/esm/cli/commands/audit-core.js +87 -0
- package/dist/esm/cli/commands/audit.d.ts +10 -0
- package/dist/esm/cli/commands/audit.js +273 -0
- package/dist/esm/cli/commands/bench/index.d.ts +6 -0
- package/dist/esm/cli/commands/bench/index.js +54 -0
- package/dist/esm/cli/commands/bench/session-memory.d.ts +129 -0
- package/dist/esm/cli/commands/bench/session-memory.js +242 -0
- package/dist/esm/cli/commands/blueprint/db-commands.d.ts +60 -0
- package/dist/esm/cli/commands/blueprint/db-commands.js +244 -0
- package/dist/esm/cli/commands/blueprint/execution-io.d.ts +80 -0
- package/dist/esm/cli/commands/blueprint/execution-io.js +78 -0
- package/dist/esm/cli/commands/blueprint/execution-spec.d.ts +45 -0
- package/dist/esm/cli/commands/blueprint/execution-spec.js +177 -0
- package/dist/esm/cli/commands/blueprint/execution-state.d.ts +17 -0
- package/dist/esm/cli/commands/blueprint/execution-state.js +38 -0
- package/dist/esm/cli/commands/blueprint/execution.d.ts +74 -0
- package/dist/esm/cli/commands/blueprint/execution.js +256 -0
- package/dist/esm/cli/commands/blueprint/mutations.d.ts +109 -0
- package/dist/esm/cli/commands/blueprint/mutations.js +357 -0
- package/dist/esm/cli/commands/blueprint/router-dispatch.d.ts +50 -0
- package/dist/esm/cli/commands/blueprint/router-dispatch.js +358 -0
- package/dist/esm/cli/commands/blueprint/router-output.d.ts +25 -0
- package/dist/esm/cli/commands/blueprint/router-output.js +190 -0
- package/dist/esm/cli/commands/blueprint/router.d.ts +117 -0
- package/dist/esm/cli/commands/blueprint/router.js +480 -0
- package/dist/esm/cli/commands/blueprint/template-resolver.d.ts +19 -0
- package/dist/esm/cli/commands/blueprint/template-resolver.js +55 -0
- package/dist/esm/cli/commands/ci.d.ts +31 -0
- package/dist/esm/cli/commands/ci.js +76 -0
- package/dist/esm/cli/commands/compile.d.ts +21 -0
- package/dist/esm/cli/commands/compile.js +329 -0
- package/dist/esm/cli/commands/config.d.ts +55 -0
- package/dist/esm/cli/commands/config.js +272 -0
- package/dist/esm/cli/commands/dev.d.ts +17 -0
- package/dist/esm/cli/commands/dev.js +56 -0
- package/dist/esm/cli/commands/docs-core.d.ts +26 -0
- package/dist/esm/cli/commands/docs-core.js +88 -0
- package/dist/esm/cli/commands/docs.d.ts +9 -0
- package/dist/esm/cli/commands/docs.js +46 -0
- package/dist/esm/cli/commands/doctor.d.ts +10 -0
- package/dist/esm/cli/commands/doctor.js +53 -0
- package/dist/esm/cli/commands/e2e.d.ts +22 -0
- package/dist/esm/cli/commands/e2e.js +99 -0
- package/dist/esm/cli/commands/err.d.ts +11 -0
- package/dist/esm/cli/commands/err.js +73 -0
- package/dist/esm/cli/commands/format.d.ts +4 -0
- package/dist/esm/cli/commands/format.js +48 -0
- package/dist/esm/cli/commands/gain/index.d.ts +10 -0
- package/dist/esm/cli/commands/gain/index.js +83 -0
- package/dist/esm/cli/commands/hooks.d.ts +3 -0
- package/dist/esm/cli/commands/hooks.js +21 -0
- package/dist/esm/cli/commands/init/config.d.ts +36 -0
- package/dist/esm/cli/commands/init/config.js +116 -0
- package/dist/esm/cli/commands/init/detect-consumer.d.ts +49 -0
- package/dist/esm/cli/commands/init/detect-consumer.js +279 -0
- package/dist/esm/cli/commands/init/gitignore-patcher.d.ts +9 -0
- package/dist/esm/cli/commands/init/gitignore-patcher.js +133 -0
- package/dist/esm/cli/commands/init/host-visibility.d.ts +37 -0
- package/dist/esm/cli/commands/init/host-visibility.js +105 -0
- package/dist/esm/cli/commands/init/index.d.ts +23 -0
- package/dist/esm/cli/commands/init/index.js +751 -0
- package/dist/esm/cli/commands/init/merge.d.ts +33 -0
- package/dist/esm/cli/commands/init/merge.js +111 -0
- package/dist/esm/cli/commands/init/preflight.d.ts +15 -0
- package/dist/esm/cli/commands/init/preflight.js +87 -0
- package/dist/esm/cli/commands/init/prompts.d.ts +24 -0
- package/dist/esm/cli/commands/init/prompts.js +126 -0
- package/dist/esm/cli/commands/init/scaffold-agent-rules.d.ts +11 -0
- package/dist/esm/cli/commands/init/scaffold-agent-rules.js +58 -0
- package/dist/esm/cli/commands/init/scaffold-agent-skills.d.ts +11 -0
- package/dist/esm/cli/commands/init/scaffold-agent-skills.js +58 -0
- package/dist/esm/cli/commands/init/scaffold-agent.d.ts +15 -0
- package/dist/esm/cli/commands/init/scaffold-agent.js +63 -0
- package/dist/esm/cli/commands/init/scaffold-agents-md.d.ts +16 -0
- package/dist/esm/cli/commands/init/scaffold-agents-md.js +182 -0
- package/dist/esm/cli/commands/init/scaffold-base-kit.d.ts +9 -0
- package/dist/esm/cli/commands/init/scaffold-base-kit.js +183 -0
- package/dist/esm/cli/commands/init/scaffold-blueprints.d.ts +8 -0
- package/dist/esm/cli/commands/init/scaffold-blueprints.js +84 -0
- package/dist/esm/cli/commands/init/scaffold-catalog-ignore.d.ts +14 -0
- package/dist/esm/cli/commands/init/scaffold-catalog-ignore.js +48 -0
- package/dist/esm/cli/commands/init/scaffold-docs.d.ts +8 -0
- package/dist/esm/cli/commands/init/scaffold-docs.js +15 -0
- package/dist/esm/cli/commands/init/scaffold-monorepo-nav.d.ts +19 -0
- package/dist/esm/cli/commands/init/scaffold-monorepo-nav.js +101 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/codex-global-normalize.d.ts +20 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/codex-global-normalize.js +258 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/codex-global-ownership.d.ts +3 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/codex-global-ownership.js +36 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/codex-ownership.d.ts +11 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/codex-ownership.js +62 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/codex-trust-sync.d.ts +24 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/codex-trust-sync.js +101 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/index.d.ts +68 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/index.js +585 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/skill-hooks.d.ts +21 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/skill-hooks.js +123 -0
- package/dist/esm/cli/commands/init/scaffolders/audit-hooks/index.d.ts +16 -0
- package/dist/esm/cli/commands/init/scaffolders/audit-hooks/index.js +65 -0
- package/dist/esm/cli/commands/init/scaffolders/claude-plugin/index.d.ts +33 -0
- package/dist/esm/cli/commands/init/scaffolders/claude-plugin/index.js +67 -0
- package/dist/esm/cli/commands/init/scaffolders/claude-rules/index.d.ts +7 -0
- package/dist/esm/cli/commands/init/scaffolders/claude-rules/index.js +127 -0
- package/dist/esm/cli/commands/init/scaffolders/codex-cli/index.d.ts +17 -0
- package/dist/esm/cli/commands/init/scaffolders/codex-cli/index.js +27 -0
- package/dist/esm/cli/commands/init/scaffolders/codex-mcp/index.d.ts +79 -0
- package/dist/esm/cli/commands/init/scaffolders/codex-mcp/index.js +189 -0
- package/dist/esm/cli/commands/init/scaffolders/context-mode/index.d.ts +24 -0
- package/dist/esm/cli/commands/init/scaffolders/context-mode/index.js +165 -0
- package/dist/esm/cli/commands/init/scaffolders/example-skill/index.d.ts +15 -0
- package/dist/esm/cli/commands/init/scaffolders/example-skill/index.js +31 -0
- package/dist/esm/cli/commands/init/scaffolders/gstack/index.d.ts +92 -0
- package/dist/esm/cli/commands/init/scaffolders/gstack/index.js +228 -0
- package/dist/esm/cli/commands/init/scaffolders/lore-commits/index.d.ts +12 -0
- package/dist/esm/cli/commands/init/scaffolders/lore-commits/index.js +24 -0
- package/dist/esm/cli/commands/init/scaffolders/omc/index.d.ts +41 -0
- package/dist/esm/cli/commands/init/scaffolders/omc/index.js +54 -0
- package/dist/esm/cli/commands/init/scaffolders/omx/index.d.ts +63 -0
- package/dist/esm/cli/commands/init/scaffolders/omx/index.js +251 -0
- package/dist/esm/cli/commands/init/scaffolders/opencode-plugin/index.d.ts +9 -0
- package/dist/esm/cli/commands/init/scaffolders/opencode-plugin/index.js +86 -0
- package/dist/esm/cli/commands/init/scaffolders/rtk/index.d.ts +25 -0
- package/dist/esm/cli/commands/init/scaffolders/rtk/index.js +55 -0
- package/dist/esm/cli/commands/init/scaffolders/runtime-check/index.d.ts +15 -0
- package/dist/esm/cli/commands/init/scaffolders/runtime-check/index.js +37 -0
- package/dist/esm/cli/commands/init/scaffolders/spinner.d.ts +23 -0
- package/dist/esm/cli/commands/init/scaffolders/spinner.js +32 -0
- package/dist/esm/cli/commands/init/scaffolders/subagents/index.d.ts +7 -0
- package/dist/esm/cli/commands/init/scaffolders/subagents/index.js +88 -0
- package/dist/esm/cli/commands/init/scaffolders/version-pin.d.ts +19 -0
- package/dist/esm/cli/commands/init/scaffolders/version-pin.js +95 -0
- package/dist/esm/cli/commands/init/scaffolders/vision/index.d.ts +10 -0
- package/dist/esm/cli/commands/init/scaffolders/vision/index.js +67 -0
- package/dist/esm/cli/commands/init/scaffolders/vision/interview.d.ts +22 -0
- package/dist/esm/cli/commands/init/scaffolders/vision/interview.js +73 -0
- package/dist/esm/cli/commands/init/scaffolders/workspace-config/index.d.ts +28 -0
- package/dist/esm/cli/commands/init/scaffolders/workspace-config/index.js +40 -0
- package/dist/esm/cli/commands/lint.d.ts +4 -0
- package/dist/esm/cli/commands/lint.js +40 -0
- package/dist/esm/cli/commands/mcp.d.ts +4 -0
- package/dist/esm/cli/commands/mcp.js +18 -0
- package/dist/esm/cli/commands/roadmap.d.ts +7 -0
- package/dist/esm/cli/commands/roadmap.js +79 -0
- package/dist/esm/cli/commands/rule.d.ts +8 -0
- package/dist/esm/cli/commands/rule.js +59 -0
- package/dist/esm/cli/commands/skill.d.ts +20 -0
- package/dist/esm/cli/commands/skill.js +160 -0
- package/dist/esm/cli/commands/sync.d.ts +14 -0
- package/dist/esm/cli/commands/sync.js +132 -0
- package/dist/esm/cli/commands/tech-debt/index.d.ts +5 -0
- package/dist/esm/cli/commands/tech-debt/index.js +5 -0
- package/dist/esm/cli/commands/tech-debt/router-dispatch.d.ts +22 -0
- package/dist/esm/cli/commands/tech-debt/router-dispatch.js +436 -0
- package/dist/esm/cli/commands/tech-debt/router.d.ts +10 -0
- package/dist/esm/cli/commands/tech-debt/router.js +30 -0
- package/dist/esm/cli/commands/test.d.ts +12 -0
- package/dist/esm/cli/commands/test.js +88 -0
- package/dist/esm/cli/commands/typecheck.d.ts +18 -0
- package/dist/esm/cli/commands/typecheck.js +57 -0
- package/dist/esm/cli/commands/worktree/router-dispatch.d.ts +39 -0
- package/dist/esm/cli/commands/worktree/router-dispatch.js +217 -0
- package/dist/esm/cli/commands/worktree/router.d.ts +10 -0
- package/dist/esm/cli/commands/worktree/router.js +34 -0
- package/dist/esm/cli/utils.d.ts +45 -0
- package/dist/esm/cli/utils.js +156 -0
- package/dist/esm/codex/app-server/client.d.ts +50 -0
- package/dist/esm/codex/app-server/client.js +202 -0
- package/dist/esm/codex/app-server/types.d.ts +240 -0
- package/dist/esm/codex/app-server/types.js +103 -0
- package/dist/esm/compiler/flatten.d.ts +10 -0
- package/dist/esm/compiler/flatten.js +71 -0
- package/dist/esm/compiler/manifests/_versions.d.ts +7 -0
- package/dist/esm/compiler/manifests/_versions.js +7 -0
- package/dist/esm/compiler/manifests/claude.d.ts +9 -0
- package/dist/esm/compiler/manifests/claude.js +36 -0
- package/dist/esm/compiler/manifests/codex.d.ts +9 -0
- package/dist/esm/compiler/manifests/codex.js +23 -0
- package/dist/esm/compiler/manifests/cursor.d.ts +9 -0
- package/dist/esm/compiler/manifests/cursor.js +28 -0
- package/dist/esm/compiler/manifests/gemini.d.ts +9 -0
- package/dist/esm/compiler/manifests/gemini.js +20 -0
- package/dist/esm/compiler/memory/directives.d.ts +23 -0
- package/dist/esm/compiler/memory/directives.js +108 -0
- package/dist/esm/compiler/memory/directives.schema.d.ts +55 -0
- package/dist/esm/compiler/memory/directives.schema.js +32 -0
- package/dist/esm/compiler/memory/merger.d.ts +17 -0
- package/dist/esm/compiler/memory/merger.js +122 -0
- package/dist/esm/compiler/memory/precedence.d.ts +15 -0
- package/dist/esm/compiler/memory/precedence.js +40 -0
- package/dist/esm/compiler/memory/provenance.d.ts +13 -0
- package/dist/esm/compiler/memory/provenance.js +8 -0
- package/dist/esm/compiler/orphans.d.ts +8 -0
- package/dist/esm/compiler/orphans.js +58 -0
- package/dist/esm/compiler/schema.d.ts +47 -0
- package/dist/esm/compiler/schema.js +49 -0
- package/dist/esm/config/docs-lint/cli/check-internal-links.d.ts +13 -0
- package/dist/esm/config/docs-lint/cli/check-internal-links.js +161 -0
- package/dist/esm/config/docs-lint/cli/check-refs.d.ts +9 -0
- package/dist/esm/config/docs-lint/cli/check-refs.js +165 -0
- package/dist/esm/config/docs-lint/cli/check-stale.d.ts +9 -0
- package/dist/esm/config/docs-lint/cli/check-stale.js +116 -0
- package/dist/esm/config/docs-lint/cli/commands/migrate-command.d.ts +22 -0
- package/dist/esm/config/docs-lint/cli/commands/migrate-command.js +254 -0
- package/dist/esm/config/docs-lint/cli/commands/validate-command.d.ts +28 -0
- package/dist/esm/config/docs-lint/cli/commands/validate-command.js +363 -0
- package/dist/esm/config/docs-lint/cli/factories.d.ts +54 -0
- package/dist/esm/config/docs-lint/cli/factories.js +85 -0
- package/dist/esm/config/docs-lint/cli/fixers/code-language.d.ts +34 -0
- package/dist/esm/config/docs-lint/cli/fixers/code-language.js +277 -0
- package/dist/esm/config/docs-lint/cli/interfaces.d.ts +55 -0
- package/dist/esm/config/docs-lint/cli/interfaces.js +6 -0
- package/dist/esm/config/docs-lint/cli/migrate.d.ts +3 -0
- package/dist/esm/config/docs-lint/cli/migrate.js +53 -0
- package/dist/esm/config/docs-lint/cli/planning-path.d.ts +2 -0
- package/dist/esm/config/docs-lint/cli/planning-path.js +29 -0
- package/dist/esm/config/docs-lint/cli/validate.d.ts +3 -0
- package/dist/esm/config/docs-lint/cli/validate.js +47 -0
- package/dist/esm/config/docs-lint/cli/validators/code-density.d.ts +7 -0
- package/dist/esm/config/docs-lint/cli/validators/code-density.js +15 -0
- package/dist/esm/config/docs-lint/cli/validators/command-safety.d.ts +19 -0
- package/dist/esm/config/docs-lint/cli/validators/command-safety.js +195 -0
- package/dist/esm/config/docs-lint/cli/validators/context-limits.d.ts +58 -0
- package/dist/esm/config/docs-lint/cli/validators/context-limits.js +212 -0
- package/dist/esm/config/docs-lint/cli/validators/deprecated-commands.d.ts +9 -0
- package/dist/esm/config/docs-lint/cli/validators/deprecated-commands.js +112 -0
- package/dist/esm/config/docs-lint/cli/validators/filename.d.ts +12 -0
- package/dist/esm/config/docs-lint/cli/validators/filename.js +128 -0
- package/dist/esm/config/docs-lint/cli/validators/imports.d.ts +30 -0
- package/dist/esm/config/docs-lint/cli/validators/imports.js +163 -0
- package/dist/esm/config/docs-lint/cli/validators/index.d.ts +8 -0
- package/dist/esm/config/docs-lint/cli/validators/index.js +8 -0
- package/dist/esm/config/docs-lint/cli/validators/links.d.ts +30 -0
- package/dist/esm/config/docs-lint/cli/validators/links.js +134 -0
- package/dist/esm/config/docs-lint/cli/validators/markdownlint.d.ts +11 -0
- package/dist/esm/config/docs-lint/cli/validators/markdownlint.js +17 -0
- package/dist/esm/config/docs-lint/cli/validators/structure.d.ts +10 -0
- package/dist/esm/config/docs-lint/cli/validators/structure.js +75 -0
- package/dist/esm/config/docs-lint/generator/frontmatter-validator.d.ts +6 -0
- package/dist/esm/config/docs-lint/generator/frontmatter-validator.js +72 -0
- package/dist/esm/config/docs-lint/generator/index.d.ts +11 -0
- package/dist/esm/config/docs-lint/generator/index.js +10 -0
- package/dist/esm/config/docs-lint/generator/markdown-generator.d.ts +6 -0
- package/dist/esm/config/docs-lint/generator/markdown-generator.js +78 -0
- package/dist/esm/config/docs-lint/generator/template-loader.d.ts +18 -0
- package/dist/esm/config/docs-lint/generator/template-loader.js +66 -0
- package/dist/esm/config/docs-lint/generator/types.d.ts +100 -0
- package/dist/esm/config/docs-lint/generator/types.js +2 -0
- package/dist/esm/config/docs-lint/index.d.ts +34 -0
- package/dist/esm/config/docs-lint/index.js +3 -0
- package/dist/esm/config/docs-lint/parsers/bold-metadata.d.ts +28 -0
- package/dist/esm/config/docs-lint/parsers/bold-metadata.js +176 -0
- package/dist/esm/config/docs-lint/parsers/frontmatter.d.ts +20 -0
- package/dist/esm/config/docs-lint/parsers/frontmatter.js +67 -0
- package/dist/esm/config/docs-lint/parsers/index.d.ts +3 -0
- package/dist/esm/config/docs-lint/parsers/index.js +3 -0
- package/dist/esm/config/docs-lint/schemas/adaptation.d.ts +28 -0
- package/dist/esm/config/docs-lint/schemas/adaptation.js +18 -0
- package/dist/esm/config/docs-lint/schemas/agents.d.ts +76 -0
- package/dist/esm/config/docs-lint/schemas/agents.js +29 -0
- package/dist/esm/config/docs-lint/schemas/audit.d.ts +52 -0
- package/dist/esm/config/docs-lint/schemas/audit.js +20 -0
- package/dist/esm/config/docs-lint/schemas/common.d.ts +68 -0
- package/dist/esm/config/docs-lint/schemas/common.js +73 -0
- package/dist/esm/config/docs-lint/schemas/cookbook.d.ts +48 -0
- package/dist/esm/config/docs-lint/schemas/cookbook.js +21 -0
- package/dist/esm/config/docs-lint/schemas/core.d.ts +189 -0
- package/dist/esm/config/docs-lint/schemas/core.js +54 -0
- package/dist/esm/config/docs-lint/schemas/decision.d.ts +18 -0
- package/dist/esm/config/docs-lint/schemas/decision.js +9 -0
- package/dist/esm/config/docs-lint/schemas/draft.d.ts +36 -0
- package/dist/esm/config/docs-lint/schemas/draft.js +35 -0
- package/dist/esm/config/docs-lint/schemas/evaluation.d.ts +43 -0
- package/dist/esm/config/docs-lint/schemas/evaluation.js +22 -0
- package/dist/esm/config/docs-lint/schemas/implementation-plan.d.ts +62 -0
- package/dist/esm/config/docs-lint/schemas/implementation-plan.js +34 -0
- package/dist/esm/config/docs-lint/schemas/index.d.ts +51 -0
- package/dist/esm/config/docs-lint/schemas/index.js +109 -0
- package/dist/esm/config/docs-lint/schemas/ongoing-initiative.d.ts +99 -0
- package/dist/esm/config/docs-lint/schemas/ongoing-initiative.js +31 -0
- package/dist/esm/config/docs-lint/schemas/parent-roadmap.d.ts +39 -0
- package/dist/esm/config/docs-lint/schemas/parent-roadmap.js +24 -0
- package/dist/esm/config/docs-lint/schemas/research.d.ts +26 -0
- package/dist/esm/config/docs-lint/schemas/research.js +20 -0
- package/dist/esm/config/docs-lint/schemas/rule.d.ts +48 -0
- package/dist/esm/config/docs-lint/schemas/rule.js +12 -0
- package/dist/esm/config/e2e-preset/index.d.ts +17 -0
- package/dist/esm/config/e2e-preset/index.js +29 -0
- package/dist/esm/config/e2e-preset/playwright.d.ts +17 -0
- package/dist/esm/config/e2e-preset/playwright.js +12 -0
- package/dist/esm/config/launch/contracts.d.ts +100 -0
- package/dist/esm/config/launch/contracts.js +13 -0
- package/dist/esm/config/launch/dev-contracts.d.ts +47 -0
- package/dist/esm/config/launch/dev-contracts.js +8 -0
- package/dist/esm/config/launch/dev-manifest.d.ts +42 -0
- package/dist/esm/config/launch/dev-manifest.js +196 -0
- package/dist/esm/config/launch/index.d.ts +14 -0
- package/dist/esm/config/launch/index.js +12 -0
- package/dist/esm/config/launch/launch-profile.d.ts +47 -0
- package/dist/esm/config/launch/launch-profile.js +39 -0
- package/dist/esm/config/launch/provision-stack.d.ts +64 -0
- package/dist/esm/config/launch/provision-stack.js +45 -0
- package/dist/esm/config/oxlint/code-safety.d.ts +19 -0
- package/dist/esm/config/oxlint/code-safety.js +90 -0
- package/dist/esm/config/oxlint/foundation-purity.d.ts +22 -0
- package/dist/esm/config/oxlint/foundation-purity.js +53 -0
- package/dist/esm/config/oxlint/graphql-conventions.d.ts +24 -0
- package/dist/esm/config/oxlint/graphql-conventions.js +204 -0
- package/dist/esm/config/oxlint/import-hygiene.d.ts +35 -0
- package/dist/esm/config/oxlint/import-hygiene.js +208 -0
- package/dist/esm/config/oxlint/index.d.ts +23 -0
- package/dist/esm/config/oxlint/index.js +29 -0
- package/dist/esm/config/oxlint/monorepo-paths.d.ts +19 -0
- package/dist/esm/config/oxlint/monorepo-paths.js +129 -0
- package/dist/esm/config/oxlint/oxlint-config.fixture.d.ts +3 -0
- package/dist/esm/config/oxlint/oxlint-config.fixture.js +5 -0
- package/dist/esm/config/oxlint/query-patterns.d.ts +25 -0
- package/dist/esm/config/oxlint/query-patterns.js +126 -0
- package/dist/esm/config/oxlint/testing-quality.d.ts +36 -0
- package/dist/esm/config/oxlint/testing-quality.js +187 -0
- package/dist/esm/config/oxlint/tier-boundaries.d.ts +36 -0
- package/dist/esm/config/oxlint/tier-boundaries.js +134 -0
- package/dist/esm/config/stryker/index.d.ts +44 -0
- package/dist/esm/config/stryker/index.js +79 -0
- package/dist/esm/config/test-preset/index.d.ts +2 -0
- package/dist/esm/config/test-preset/index.js +2 -0
- package/dist/esm/config/test-preset/vitest.d.ts +26 -0
- package/dist/esm/config/test-preset/vitest.js +31 -0
- package/dist/esm/config/tsconfig/base.json +37 -0
- package/dist/esm/config/tsconfig/cloudflare.json +10 -0
- package/dist/esm/config/tsconfig/library.json +16 -0
- package/dist/esm/config/tsconfig/react-library.json +9 -0
- package/dist/esm/config/tsconfig/react-router.json +10 -0
- package/dist/esm/config/vitest/bun-sqlite-shim.d.ts +14 -0
- package/dist/esm/config/vitest/bun-sqlite-shim.js +14 -0
- package/dist/esm/config/vitest/consumer-package.d.ts +4 -0
- package/dist/esm/config/vitest/consumer-package.js +63 -0
- package/dist/esm/config/vitest/flakiness-reporter.d.ts +7 -0
- package/dist/esm/config/vitest/flakiness-reporter.js +53 -0
- package/dist/esm/config/vitest/generated-runtime-aliases.d.ts +6 -0
- package/dist/esm/config/vitest/generated-runtime-aliases.js +3 -0
- package/dist/esm/config/vitest/node-setup.d.ts +6 -0
- package/dist/esm/config/vitest/node-setup.js +16 -0
- package/dist/esm/config/vitest/node.d.ts +43 -0
- package/dist/esm/config/vitest/node.js +180 -0
- package/dist/esm/config/vitest/pool-defaults.d.ts +11 -0
- package/dist/esm/config/vitest/pool-defaults.js +43 -0
- package/dist/esm/config/vitest/react-router.d.ts +22 -0
- package/dist/esm/config/vitest/react-router.js +83 -0
- package/dist/esm/config/vitest/react-setup.d.ts +13 -0
- package/dist/esm/config/vitest/react-setup.js +27 -0
- package/dist/esm/config/vitest/react.d.ts +22 -0
- package/dist/esm/config/vitest/react.js +85 -0
- package/dist/esm/config/vitest/version-guard.d.ts +7 -0
- package/dist/esm/config/vitest/version-guard.js +42 -0
- package/dist/esm/config/vitest/workers.d.ts +28 -0
- package/dist/esm/config/vitest/workers.js +44 -0
- package/dist/esm/config/workers-test/cloudflare-types.d.ts +30 -0
- package/dist/esm/config/workers-test/cloudflare-types.js +2 -0
- package/dist/esm/config/workers-test/durable-objects.d.ts +60 -0
- package/dist/esm/config/workers-test/durable-objects.js +73 -0
- package/dist/esm/config/workers-test/env.d.ts +58 -0
- package/dist/esm/config/workers-test/env.js +74 -0
- package/dist/esm/config/workers-test/execution-context.d.ts +21 -0
- package/dist/esm/config/workers-test/execution-context.js +22 -0
- package/dist/esm/config/workers-test/index.d.ts +16 -0
- package/dist/esm/config/workers-test/index.js +15 -0
- package/dist/esm/config/workers-test/requests.d.ts +44 -0
- package/dist/esm/config/workers-test/requests.js +71 -0
- package/dist/esm/config/workers-test/setup.d.ts +63 -0
- package/dist/esm/config/workers-test/setup.js +86 -0
- package/dist/esm/content/audit.d.ts +20 -0
- package/dist/esm/content/audit.js +164 -0
- package/dist/esm/content/dispatch.d.ts +32 -0
- package/dist/esm/content/dispatch.js +204 -0
- package/dist/esm/content/loader.d.ts +50 -0
- package/dist/esm/content/loader.js +166 -0
- package/dist/esm/content/schema.d.ts +123 -0
- package/dist/esm/content/schema.js +125 -0
- package/dist/esm/dev/dev-link-state.d.ts +22 -0
- package/dist/esm/dev/dev-link-state.js +51 -0
- package/dist/esm/dev/index.d.ts +2 -0
- package/dist/esm/dev/index.js +2 -0
- package/dist/esm/dev/load-manifest.d.ts +35 -0
- package/dist/esm/dev/load-manifest.js +182 -0
- package/dist/esm/dev/restore-dev-links/index.d.ts +30 -0
- package/dist/esm/dev/restore-dev-links/index.js +103 -0
- package/dist/esm/docs-linter/blueprint-plan.d.ts +80 -0
- package/dist/esm/docs-linter/blueprint-plan.js +427 -0
- package/dist/esm/docs-linter/index.d.ts +8 -0
- package/dist/esm/docs-linter/index.js +7 -0
- package/dist/esm/docs-linter/types.d.ts +16 -0
- package/dist/esm/docs-linter/types.js +8 -0
- package/dist/esm/e2e/command-builder.d.ts +3 -0
- package/dist/esm/e2e/command-builder.js +98 -0
- package/dist/esm/e2e/command-host-adapter.d.ts +30 -0
- package/dist/esm/e2e/command-host-adapter.js +70 -0
- package/dist/esm/e2e/config.d.ts +26 -0
- package/dist/esm/e2e/config.js +39 -0
- package/dist/esm/e2e/execution.d.ts +14 -0
- package/dist/esm/e2e/execution.js +148 -0
- package/dist/esm/e2e/host-adapter.d.ts +6 -0
- package/dist/esm/e2e/host-adapter.js +22 -0
- package/dist/esm/e2e/index.d.ts +9 -0
- package/dist/esm/e2e/index.js +8 -0
- package/dist/esm/e2e/load-host-adapter.d.ts +43 -0
- package/dist/esm/e2e/load-host-adapter.js +150 -0
- package/dist/esm/e2e/run-planner.d.ts +11 -0
- package/dist/esm/e2e/run-planner.js +186 -0
- package/dist/esm/e2e/suite-registry.d.ts +9 -0
- package/dist/esm/e2e/suite-registry.js +30 -0
- package/dist/esm/e2e/types.d.ts +81 -0
- package/dist/esm/e2e/types.js +2 -0
- package/dist/esm/format/errors.d.ts +2 -0
- package/dist/esm/format/errors.js +15 -0
- package/dist/esm/format/format.d.ts +2 -0
- package/dist/esm/format/format.js +16 -0
- package/dist/esm/format/index.d.ts +35 -0
- package/dist/esm/format/index.js +67 -0
- package/dist/esm/hooks/check-dev-link/index.d.ts +19 -0
- package/dist/esm/hooks/check-dev-link/index.js +87 -0
- package/dist/esm/hooks/doctor.d.ts +34 -0
- package/dist/esm/hooks/doctor.js +699 -0
- package/dist/esm/hooks/guard-switch/index.d.ts +3 -0
- package/dist/esm/hooks/guard-switch/index.js +18 -0
- package/dist/esm/hooks/guard-switch/state.d.ts +4 -0
- package/dist/esm/hooks/guard-switch/state.js +30 -0
- package/dist/esm/hooks/post-tool/lint-after-edit.d.ts +17 -0
- package/dist/esm/hooks/post-tool/lint-after-edit.js +57 -0
- package/dist/esm/hooks/pretool-guard/dev-routing.d.ts +21 -0
- package/dist/esm/hooks/pretool-guard/dev-routing.js +658 -0
- package/dist/esm/hooks/pretool-guard/index.d.ts +5 -0
- package/dist/esm/hooks/pretool-guard/index.js +11 -0
- package/dist/esm/hooks/pretool-guard/logger.d.ts +32 -0
- package/dist/esm/hooks/pretool-guard/logger.js +82 -0
- package/dist/esm/hooks/pretool-guard/runner.d.ts +16 -0
- package/dist/esm/hooks/pretool-guard/runner.js +149 -0
- package/dist/esm/hooks/pretool-guard/validators/blueprint.d.ts +3 -0
- package/dist/esm/hooks/pretool-guard/validators/blueprint.js +16 -0
- package/dist/esm/hooks/pretool-guard/validators/command-file.d.ts +3 -0
- package/dist/esm/hooks/pretool-guard/validators/command-file.js +36 -0
- package/dist/esm/hooks/pretool-guard/validators/complexity.d.ts +3 -0
- package/dist/esm/hooks/pretool-guard/validators/complexity.js +24 -0
- package/dist/esm/hooks/pretool-guard/validators/dangerous-commands.d.ts +4 -0
- package/dist/esm/hooks/pretool-guard/validators/dangerous-commands.js +60 -0
- package/dist/esm/hooks/pretool-guard/validators/docs-governance.d.ts +2 -0
- package/dist/esm/hooks/pretool-guard/validators/docs-governance.js +2 -0
- package/dist/esm/hooks/pretool-guard/validators/file-conventions.d.ts +3 -0
- package/dist/esm/hooks/pretool-guard/validators/file-conventions.js +67 -0
- package/dist/esm/hooks/pretool-guard/validators/forbidden-commands.d.ts +66 -0
- package/dist/esm/hooks/pretool-guard/validators/forbidden-commands.js +439 -0
- package/dist/esm/hooks/pretool-guard/validators/index.d.ts +14 -0
- package/dist/esm/hooks/pretool-guard/validators/index.js +26 -0
- package/dist/esm/hooks/pretool-guard/validators/mcp-redirect.d.ts +16 -0
- package/dist/esm/hooks/pretool-guard/validators/mcp-redirect.js +50 -0
- package/dist/esm/hooks/pretool-guard/validators/package-imports.d.ts +10 -0
- package/dist/esm/hooks/pretool-guard/validators/package-imports.js +36 -0
- package/dist/esm/hooks/pretool-guard/validators/package-imports.types.d.ts +8 -0
- package/dist/esm/hooks/pretool-guard/validators/package-imports.types.js +2 -0
- package/dist/esm/hooks/pretool-guard/validators/path-contract.d.ts +15 -0
- package/dist/esm/hooks/pretool-guard/validators/path-contract.js +105 -0
- package/dist/esm/hooks/pretool-guard/validators/plan-frontmatter.d.ts +13 -0
- package/dist/esm/hooks/pretool-guard/validators/plan-frontmatter.js +121 -0
- package/dist/esm/hooks/pretool-guard/validators/skip-result.d.ts +3 -0
- package/dist/esm/hooks/pretool-guard/validators/skip-result.js +4 -0
- package/dist/esm/hooks/pretool-guard/validators/test-quality.d.ts +22 -0
- package/dist/esm/hooks/pretool-guard/validators/test-quality.js +218 -0
- package/dist/esm/hooks/pretool-guard/validators/ux-quality.d.ts +3 -0
- package/dist/esm/hooks/pretool-guard/validators/ux-quality.js +80 -0
- package/dist/esm/hooks/sessionstart/index.d.ts +16 -0
- package/dist/esm/hooks/sessionstart/index.js +122 -0
- package/dist/esm/hooks/sessionstart/update-banner.d.ts +2 -0
- package/dist/esm/hooks/sessionstart/update-banner.js +66 -0
- package/dist/esm/hooks/shared/hook-bootstrap.d.ts +28 -0
- package/dist/esm/hooks/shared/hook-bootstrap.js +62 -0
- package/dist/esm/hooks/shared/mcp-sentinel.d.ts +10 -0
- package/dist/esm/hooks/shared/mcp-sentinel.js +106 -0
- package/dist/esm/hooks/shared/routing-block.d.ts +8 -0
- package/dist/esm/hooks/shared/routing-block.js +140 -0
- package/dist/esm/hooks/shared/types.d.ts +24 -0
- package/dist/esm/hooks/shared/types.js +48 -0
- package/dist/esm/hooks/shared/validators/blueprint.d.ts +17 -0
- package/dist/esm/hooks/shared/validators/blueprint.js +98 -0
- package/dist/esm/hooks/shared/validators/docs-governance.d.ts +3 -0
- package/dist/esm/hooks/shared/validators/docs-governance.js +30 -0
- package/dist/esm/hooks/shared/worktree-root.d.ts +2 -0
- package/dist/esm/hooks/shared/worktree-root.js +46 -0
- package/dist/esm/hooks/stop/qa-changed-files.d.ts +14 -0
- package/dist/esm/hooks/stop/qa-changed-files.js +96 -0
- package/dist/esm/hooks/test-quality-check.d.ts +5 -0
- package/dist/esm/hooks/test-quality-check.js +61 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/lint/index.d.ts +53 -0
- package/dist/esm/lint/index.js +115 -0
- package/dist/esm/local.d.ts +19 -0
- package/dist/esm/local.js +14 -0
- package/dist/esm/mcp/_tail-hints.d.ts +31 -0
- package/dist/esm/mcp/_tail-hints.js +86 -0
- package/dist/esm/mcp/auto-discover.d.ts +65 -0
- package/dist/esm/mcp/auto-discover.js +108 -0
- package/dist/esm/mcp/blueprint-server.d.ts +137 -0
- package/dist/esm/mcp/blueprint-server.js +2131 -0
- package/dist/esm/mcp/blueprint-server.platform-first.test-harness.d.ts +31 -0
- package/dist/esm/mcp/blueprint-server.platform-first.test-harness.js +216 -0
- package/dist/esm/mcp/blueprint-server.test-harness.d.ts +49 -0
- package/dist/esm/mcp/blueprint-server.test-harness.js +195 -0
- package/dist/esm/mcp/cli.d.ts +10 -0
- package/dist/esm/mcp/cli.js +48 -0
- package/dist/esm/mcp/runners/test.d.ts +36 -0
- package/dist/esm/mcp/runners/test.js +330 -0
- package/dist/esm/mcp/server.d.ts +24 -0
- package/dist/esm/mcp/server.js +142 -0
- package/dist/esm/mcp/tools/_shared/project-root.d.ts +29 -0
- package/dist/esm/mcp/tools/_shared/project-root.js +61 -0
- package/dist/esm/mcp/tools/_shared/redact.d.ts +2 -0
- package/dist/esm/mcp/tools/_shared/redact.js +29 -0
- package/dist/esm/mcp/tools/_shared/result.d.ts +79 -0
- package/dist/esm/mcp/tools/_shared/result.js +85 -0
- package/dist/esm/mcp/tools/_shared/run-command.d.ts +37 -0
- package/dist/esm/mcp/tools/_shared/run-command.js +122 -0
- package/dist/esm/mcp/tools/_shared/test-budget-contract.d.ts +18 -0
- package/dist/esm/mcp/tools/_shared/test-budget-contract.js +24 -0
- package/dist/esm/mcp/tools/_shared/ui-detection.d.ts +2 -0
- package/dist/esm/mcp/tools/_shared/ui-detection.js +19 -0
- package/dist/esm/mcp/tools/audit.d.ts +45 -0
- package/dist/esm/mcp/tools/audit.js +345 -0
- package/dist/esm/mcp/tools/ci-act.d.ts +4 -0
- package/dist/esm/mcp/tools/ci-act.js +91 -0
- package/dist/esm/mcp/tools/e2e.d.ts +31 -0
- package/dist/esm/mcp/tools/e2e.js +116 -0
- package/dist/esm/mcp/tools/format.d.ts +27 -0
- package/dist/esm/mcp/tools/format.js +107 -0
- package/dist/esm/mcp/tools/lint.d.ts +26 -0
- package/dist/esm/mcp/tools/lint.js +229 -0
- package/dist/esm/mcp/tools/qa.d.ts +39 -0
- package/dist/esm/mcp/tools/qa.js +218 -0
- package/dist/esm/mcp/tools/test.d.ts +25 -0
- package/dist/esm/mcp/tools/test.js +112 -0
- package/dist/esm/mcp/tools/typecheck.d.ts +27 -0
- package/dist/esm/mcp/tools/typecheck.js +186 -0
- package/dist/esm/mcp/tools/worker-tail.d.ts +4 -0
- package/dist/esm/mcp/tools/worker-tail.js +121 -0
- package/dist/esm/output-transforms/generic.d.ts +3 -0
- package/dist/esm/output-transforms/generic.js +20 -0
- package/dist/esm/output-transforms/index.d.ts +34 -0
- package/dist/esm/output-transforms/index.js +41 -0
- package/dist/esm/output-transforms/metadata.d.ts +8 -0
- package/dist/esm/output-transforms/metadata.js +24 -0
- package/dist/esm/output-transforms/oxlint.d.ts +3 -0
- package/dist/esm/output-transforms/oxlint.js +85 -0
- package/dist/esm/output-transforms/passthrough.d.ts +3 -0
- package/dist/esm/output-transforms/passthrough.js +11 -0
- package/dist/esm/output-transforms/rulesync.d.ts +3 -0
- package/dist/esm/output-transforms/rulesync.js +80 -0
- package/dist/esm/output-transforms/should-compact.d.ts +7 -0
- package/dist/esm/output-transforms/should-compact.js +14 -0
- package/dist/esm/output-transforms/tsc.d.ts +3 -0
- package/dist/esm/output-transforms/tsc.js +45 -0
- package/dist/esm/output-transforms/vitest.d.ts +3 -0
- package/dist/esm/output-transforms/vitest.js +120 -0
- package/dist/esm/package.json +92 -0
- package/dist/esm/paths/state-root.d.ts +23 -0
- package/dist/esm/paths/state-root.js +121 -0
- package/dist/esm/quality-engine/command-builder.d.ts +141 -0
- package/dist/esm/quality-engine/command-builder.js +285 -0
- package/dist/esm/quality-engine/index.d.ts +15 -0
- package/dist/esm/quality-engine/index.js +16 -0
- package/dist/esm/quality-engine/log-paths.d.ts +44 -0
- package/dist/esm/quality-engine/log-paths.js +73 -0
- package/dist/esm/quality-engine/package-import-rules.d.ts +69 -0
- package/dist/esm/quality-engine/package-import-rules.js +491 -0
- package/dist/esm/quality-engine/target-resolver.d.ts +187 -0
- package/dist/esm/quality-engine/target-resolver.js +552 -0
- package/dist/esm/quality-engine/test-classification.d.ts +7 -0
- package/dist/esm/quality-engine/test-classification.js +85 -0
- package/dist/esm/quality-engine/workspace-config.d.ts +68 -0
- package/dist/esm/quality-engine/workspace-config.js +131 -0
- package/dist/esm/runners/claude-subagent/index.d.ts +11 -0
- package/dist/esm/runners/claude-subagent/index.js +114 -0
- package/dist/esm/runners/claude-subagent/types.d.ts +7 -0
- package/dist/esm/runners/claude-subagent/types.js +5 -0
- package/dist/esm/runners/codex-exec/index.d.ts +16 -0
- package/dist/esm/runners/codex-exec/index.js +105 -0
- package/dist/esm/runners/index.d.ts +3 -0
- package/dist/esm/runners/index.js +2 -0
- package/dist/esm/runners/local-worktree/index.d.ts +19 -0
- package/dist/esm/runners/local-worktree/index.js +85 -0
- package/dist/esm/runners/local-worktree/path.d.ts +10 -0
- package/dist/esm/runners/local-worktree/path.js +14 -0
- package/dist/esm/runners/select.d.ts +12 -0
- package/dist/esm/runners/select.js +38 -0
- package/dist/esm/runners/types.d.ts +70 -0
- package/dist/esm/runners/types.js +62 -0
- package/dist/esm/secret-gate/runner.d.ts +25 -0
- package/dist/esm/secret-gate/runner.js +106 -0
- package/dist/esm/session-memory/fetch-index.d.ts +13 -0
- package/dist/esm/session-memory/fetch-index.js +80 -0
- package/dist/esm/session-memory/repo-hash.d.ts +3 -0
- package/dist/esm/session-memory/repo-hash.js +20 -0
- package/dist/esm/session-memory/session.d.ts +10 -0
- package/dist/esm/session-memory/session.js +105 -0
- package/dist/esm/session-memory/store.d.ts +17 -0
- package/dist/esm/session-memory/store.js +168 -0
- package/dist/esm/session-memory/types.d.ts +58 -0
- package/dist/esm/session-memory/types.js +2 -0
- package/dist/esm/symlinker/consumers.d.ts +97 -0
- package/dist/esm/symlinker/consumers.js +87 -0
- package/dist/esm/symlinker/frontmatter.d.ts +15 -0
- package/dist/esm/symlinker/frontmatter.js +20 -0
- package/dist/esm/symlinker/index.d.ts +84 -0
- package/dist/esm/symlinker/index.js +496 -0
- package/dist/esm/symlinker/test-utils/assert-symlink-resolves.d.ts +12 -0
- package/dist/esm/symlinker/test-utils/assert-symlink-resolves.js +24 -0
- package/dist/esm/symlinker/toml.d.ts +11 -0
- package/dist/esm/symlinker/toml.js +16 -0
- package/dist/esm/symlinker/unified-sync.d.ts +64 -0
- package/dist/esm/symlinker/unified-sync.js +362 -0
- package/dist/esm/telemetry/_endpoint.d.ts +3 -0
- package/dist/esm/telemetry/_endpoint.js +4 -0
- package/dist/esm/telemetry/setup-tthw.d.ts +10 -0
- package/dist/esm/telemetry/setup-tthw.js +34 -0
- package/dist/esm/test/command-builder.d.ts +25 -0
- package/dist/esm/test/command-builder.js +98 -0
- package/dist/esm/test/index.d.ts +3 -0
- package/dist/esm/test/index.js +3 -0
- package/dist/esm/test/target-resolver.d.ts +13 -0
- package/dist/esm/test/target-resolver.js +53 -0
- package/dist/esm/typecheck/index.d.ts +52 -0
- package/dist/esm/typecheck/index.js +135 -0
- package/dist/esm/vite/bundle-budget.d.ts +37 -0
- package/dist/esm/vite/bundle-budget.js +151 -0
- package/dist/esm/vite/chunk-load-recovery.d.ts +18 -0
- package/dist/esm/vite/chunk-load-recovery.js +62 -0
- package/dist/esm/vite/index.d.ts +3 -0
- package/dist/esm/vite/index.js +3 -0
- package/dist/esm/vite/local.d.ts +16 -0
- package/dist/esm/vite/local.js +164 -0
- package/just/dev-kit.just +24 -0
- package/just/e2e-kit.just +13 -0
- package/just/test-kit.just +10 -0
- package/package.json +675 -0
- package/skills/better-auth-best-practices/SKILL.md +212 -0
- package/skills/deep-research/SKILL.md +240 -0
- package/skills/fix/SKILL.md +120 -0
- package/skills/frontend-design/LICENSE.txt +177 -0
- package/skills/frontend-design/SKILL.md +189 -0
- package/skills/hooks-doctor/SKILL.md +77 -0
- package/skills/logging-best-practices/SKILL.md +145 -0
- package/skills/lore-protocol/SKILL.md +93 -0
- package/skills/plan-refine/SKILL.md +645 -0
- package/skills/pll/SKILL.md +85 -0
- package/skills/react-doctor/SKILL.md +54 -0
- package/skills/systematic-debugging/SKILL.md +322 -0
- package/skills/tanstack-query/SKILL.md +175 -0
- package/skills/tech-debt/SKILL.md +79 -0
- package/skills/test-driven-development/SKILL.md +403 -0
- package/skills/testing-philosophy/SKILL.md +530 -0
- package/skills/vercel-react-best-practices/SKILL.md +212 -0
- package/skills/verify/SKILL.md +133 -0
- package/skills/web-design-guidelines/SKILL.md +53 -0
- package/tsconfig/base.json +37 -0
- package/tsconfig/cloudflare.json +10 -0
- package/tsconfig/library.json +16 -0
- package/tsconfig/react-library.json +9 -0
- package/tsconfig/react-router.json +10 -0
|
@@ -0,0 +1,875 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join, relative, resolve, sep } from 'node:path';
|
|
3
|
+
import matter from 'gray-matter';
|
|
4
|
+
import { blueprintDerivedHandoffSchema } from '#execution/types';
|
|
5
|
+
import { validateLoreTrailers } from './commit-message-lore.js';
|
|
6
|
+
const DEFAULT_COMMIT_TYPES = [
|
|
7
|
+
'feat',
|
|
8
|
+
'fix',
|
|
9
|
+
'docs',
|
|
10
|
+
'style',
|
|
11
|
+
'refactor',
|
|
12
|
+
'perf',
|
|
13
|
+
'test',
|
|
14
|
+
'build',
|
|
15
|
+
'ci',
|
|
16
|
+
'chore',
|
|
17
|
+
'revert',
|
|
18
|
+
];
|
|
19
|
+
const DEFAULT_DOC_TYPES = [
|
|
20
|
+
'guide',
|
|
21
|
+
'system',
|
|
22
|
+
'research',
|
|
23
|
+
'runbook',
|
|
24
|
+
'postmortem',
|
|
25
|
+
'adr',
|
|
26
|
+
'migration',
|
|
27
|
+
'template',
|
|
28
|
+
'docs-index',
|
|
29
|
+
];
|
|
30
|
+
const DEFAULT_DOC_FOLDER_TYPES = {
|
|
31
|
+
adrs: 'adr',
|
|
32
|
+
decisions: 'adr',
|
|
33
|
+
migrations: 'migration',
|
|
34
|
+
research: 'research',
|
|
35
|
+
runbooks: 'runbook',
|
|
36
|
+
templates: 'template',
|
|
37
|
+
};
|
|
38
|
+
const DEFAULT_BLUEPRINT_STATUSES = [
|
|
39
|
+
'draft',
|
|
40
|
+
'planned',
|
|
41
|
+
'in-progress',
|
|
42
|
+
'parked',
|
|
43
|
+
'completed',
|
|
44
|
+
'archived',
|
|
45
|
+
];
|
|
46
|
+
const ACTIVE_BLUEPRINT_STATUSES = new Set(['draft', 'planned', 'in-progress', 'parked']);
|
|
47
|
+
const BLUEPRINT_REFERENCE_PATTERN = /^(?:blueprints\/)?(?:draft|planned|in-progress|parked|completed|archived)\/[A-Za-z0-9._-]+(?:\/_overview\.md)?$/;
|
|
48
|
+
const GITHUB_BLOB_URL_PATTERN = /^https?:\/\/github\.com\/[^/\s]+\/[^/\s]+\/blob\/[^/\s]+\/.+$/i;
|
|
49
|
+
const ABSOLUTE_FILE_REFERENCE_PATTERN = /^(?:\/|[A-Za-z]:[\\/]|file:\/\/)/i;
|
|
50
|
+
const LEGACY_CROSS_REPO_LABEL_PATTERN = /^cross-repo:/i;
|
|
51
|
+
const GITHUB_REPO_PATTERN = /^[^/\s]+\/[^/\s]+$/;
|
|
52
|
+
const BLUEPRINT_SLUG_PATTERN = /^[A-Za-z0-9._-]+$/;
|
|
53
|
+
export function auditCatalogDrift(rootDirectory = process.cwd(), options = {}) {
|
|
54
|
+
const root = resolve(rootDirectory);
|
|
55
|
+
const workspacePath = resolve(root, options.workspaceFile ?? 'pnpm-workspace.yaml');
|
|
56
|
+
const violations = [];
|
|
57
|
+
if (!existsSync(workspacePath)) {
|
|
58
|
+
return result('Catalog drift — single package (no workspace file)', 0, []);
|
|
59
|
+
}
|
|
60
|
+
const workspaceYaml = readFileSync(workspacePath, 'utf8');
|
|
61
|
+
const workspaceGlobs = parseWorkspacePackageGlobs(workspaceYaml);
|
|
62
|
+
const catalogNames = parseCatalogDependencyNames(workspaceYaml);
|
|
63
|
+
const packageFiles = discoverWorkspacePackageFiles(root, workspaceGlobs);
|
|
64
|
+
const dependencyUses = new Map();
|
|
65
|
+
for (const packageFile of packageFiles) {
|
|
66
|
+
const pkg = readJsonObject(packageFile);
|
|
67
|
+
// peerDependencies are compatibility constraints, not installed package
|
|
68
|
+
// versions, so ranges such as ">=19" are legitimate and should not be
|
|
69
|
+
// forced through a pnpm catalog.
|
|
70
|
+
const sections = ['dependencies', 'devDependencies', 'optionalDependencies'];
|
|
71
|
+
for (const section of sections) {
|
|
72
|
+
const dependencies = readStringRecord(pkg[section]);
|
|
73
|
+
for (const [dependencyName, version] of Object.entries(dependencies)) {
|
|
74
|
+
const uses = dependencyUses.get(dependencyName) ?? [];
|
|
75
|
+
uses.push({ packageFile, dependencyName, version });
|
|
76
|
+
dependencyUses.set(dependencyName, uses);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
for (const [dependencyName, uses] of [...dependencyUses.entries()].toSorted(([left], [right]) => left.localeCompare(right))) {
|
|
81
|
+
if (uses.length < 2)
|
|
82
|
+
continue;
|
|
83
|
+
for (const use of uses) {
|
|
84
|
+
if (isSharedDependencyReference(use.version))
|
|
85
|
+
continue;
|
|
86
|
+
const catalogHint = catalogNames.has(dependencyName)
|
|
87
|
+
? 'use catalog:'
|
|
88
|
+
: 'promote it to the pnpm catalog or use workspace:';
|
|
89
|
+
violations.push({
|
|
90
|
+
file: relativePath(root, use.packageFile),
|
|
91
|
+
message: `${dependencyName} is used in ${uses.length} workspaces but declares ${JSON.stringify(use.version)}; ${catalogHint}`,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return result('Catalog drift', packageFiles.length, violations);
|
|
96
|
+
}
|
|
97
|
+
export function validateCommitMessage(message, options = {}) {
|
|
98
|
+
const violations = [];
|
|
99
|
+
const lines = message.replace(/\r\n/g, '\n').split('\n');
|
|
100
|
+
const subject = lines[0]?.trimEnd() ?? '';
|
|
101
|
+
const allowedTypes = options.allowedTypes ?? DEFAULT_COMMIT_TYPES;
|
|
102
|
+
const subjectMaxLength = options.subjectMaxLength ?? 100;
|
|
103
|
+
if (subject.length === 0) {
|
|
104
|
+
violations.push({ message: 'Commit subject is required' });
|
|
105
|
+
return result('Commit message', 1, violations);
|
|
106
|
+
}
|
|
107
|
+
if (/^(Merge|Revert|fixup!|squash!)/.test(subject)) {
|
|
108
|
+
return result('Commit message', 1, []);
|
|
109
|
+
}
|
|
110
|
+
const conventionalMatch = /^(?<type>[a-z]+)(?:\([^)]+\))?!?: .+/.exec(subject);
|
|
111
|
+
if (!conventionalMatch?.groups?.type || !allowedTypes.includes(conventionalMatch.groups.type)) {
|
|
112
|
+
violations.push({
|
|
113
|
+
message: `Commit subject must be conventional (${allowedTypes.join('|')})(scope): summary`,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
if (subject.length > subjectMaxLength) {
|
|
117
|
+
violations.push({
|
|
118
|
+
message: `Commit subject must be ${subjectMaxLength} characters or fewer`,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
if (lines.length > 1 && lines[1] !== '') {
|
|
122
|
+
violations.push({
|
|
123
|
+
message: 'Second line must be blank when a commit body is present',
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
const shouldEnforceLore = options.requireLore === true || options.loreWarn === true || subject.includes('[lore]');
|
|
127
|
+
if (shouldEnforceLore) {
|
|
128
|
+
const loreResult = validateLoreTrailers(message, {
|
|
129
|
+
requireLore: options.requireLore === true || subject.includes('[lore]'),
|
|
130
|
+
loreWarn: options.loreWarn === true && !(options.requireLore === true || subject.includes('[lore]')),
|
|
131
|
+
});
|
|
132
|
+
for (const violation of loreResult.violations) {
|
|
133
|
+
violations.push({ message: violation });
|
|
134
|
+
}
|
|
135
|
+
for (const warning of loreResult.warnings) {
|
|
136
|
+
console.warn(`[lore-warn] ${warning}`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return result('Commit message', 1, violations);
|
|
140
|
+
}
|
|
141
|
+
export function auditCommitMessageFile(messageFile, options = {}) {
|
|
142
|
+
return withFilePrefix(resolve(messageFile), validateCommitMessage(readFileSync(messageFile, 'utf8'), options));
|
|
143
|
+
}
|
|
144
|
+
export function auditDocsFrontmatter(rootDirectory = process.cwd(), options = {}) {
|
|
145
|
+
const root = resolve(rootDirectory);
|
|
146
|
+
const docsRoot = resolve(root, options.docsRoot ?? 'docs');
|
|
147
|
+
const allowedTypes = new Set(options.allowedTypes ?? DEFAULT_DOC_TYPES);
|
|
148
|
+
const folderTypes = options.folderTypes ?? DEFAULT_DOC_FOLDER_TYPES;
|
|
149
|
+
const violations = [];
|
|
150
|
+
const today = options.today ?? new Date().toISOString().slice(0, 10);
|
|
151
|
+
if (!existsSync(docsRoot)) {
|
|
152
|
+
return result('Docs frontmatter', 0, []);
|
|
153
|
+
}
|
|
154
|
+
const markdownFiles = walkMarkdownFiles(docsRoot);
|
|
155
|
+
for (const file of markdownFiles) {
|
|
156
|
+
let markdown = readFileSync(file, 'utf8');
|
|
157
|
+
const folder = relativePath(docsRoot, file).split('/')[0] ?? '';
|
|
158
|
+
const inferredType = folderTypes[folder] ?? 'guide';
|
|
159
|
+
if (options.fix) {
|
|
160
|
+
const fixed = applyDocsFrontmatterFix(markdown, {
|
|
161
|
+
inferredType,
|
|
162
|
+
today,
|
|
163
|
+
});
|
|
164
|
+
if (fixed !== markdown) {
|
|
165
|
+
writeFileSync(file, fixed, 'utf8');
|
|
166
|
+
markdown = fixed;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
const frontmatter = parseFrontmatter(markdown);
|
|
170
|
+
const relativeFile = relativePath(root, file);
|
|
171
|
+
const type = frontmatter.type;
|
|
172
|
+
const lastUpdated = frontmatter.last_updated;
|
|
173
|
+
if (!type) {
|
|
174
|
+
violations.push({
|
|
175
|
+
file: relativeFile,
|
|
176
|
+
message: 'Missing required frontmatter field: type',
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
else if (folder !== 'templates' && !allowedTypes.has(type)) {
|
|
180
|
+
violations.push({
|
|
181
|
+
file: relativeFile,
|
|
182
|
+
message: `Invalid type ${JSON.stringify(type)}`,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
if (!lastUpdated) {
|
|
186
|
+
violations.push({
|
|
187
|
+
file: relativeFile,
|
|
188
|
+
message: 'Missing required frontmatter field: last_updated',
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
const expectedType = folderTypes[folder];
|
|
192
|
+
if (folder !== 'templates' && expectedType && type && type !== expectedType) {
|
|
193
|
+
violations.push({
|
|
194
|
+
file: relativeFile,
|
|
195
|
+
message: `Docs in ${folder}/ must use type: ${expectedType}`,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return result('Docs frontmatter', markdownFiles.length, violations);
|
|
200
|
+
}
|
|
201
|
+
export function auditBlueprintLifecycle(rootDirectory = process.cwd(), options = {}) {
|
|
202
|
+
const root = resolve(rootDirectory);
|
|
203
|
+
const blueprintsRoot = resolve(root, options.blueprintsRoot ?? 'blueprints');
|
|
204
|
+
const statuses = options.statuses ?? DEFAULT_BLUEPRINT_STATUSES;
|
|
205
|
+
const violations = [];
|
|
206
|
+
let checked = 0;
|
|
207
|
+
for (const status of statuses) {
|
|
208
|
+
const statusRoot = join(blueprintsRoot, status);
|
|
209
|
+
if (!existsSync(statusRoot))
|
|
210
|
+
continue;
|
|
211
|
+
for (const entry of readdirSync(statusRoot, { withFileTypes: true })) {
|
|
212
|
+
if (!entry.isDirectory())
|
|
213
|
+
continue;
|
|
214
|
+
const overviewPath = join(statusRoot, entry.name, '_overview.md');
|
|
215
|
+
checked += 1;
|
|
216
|
+
if (!existsSync(overviewPath)) {
|
|
217
|
+
violations.push({
|
|
218
|
+
file: relativePath(root, overviewPath),
|
|
219
|
+
message: 'Missing _overview.md',
|
|
220
|
+
});
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
const raw = readFileSync(overviewPath, 'utf8');
|
|
224
|
+
const frontmatter = matter(raw).data;
|
|
225
|
+
if (frontmatter.type !== 'blueprint' && frontmatter.type !== 'parent-roadmap') {
|
|
226
|
+
violations.push({
|
|
227
|
+
file: relativePath(root, overviewPath),
|
|
228
|
+
message: 'Blueprint overview must use type: blueprint or parent-roadmap',
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
if (frontmatter.status !== status) {
|
|
232
|
+
violations.push({
|
|
233
|
+
file: relativePath(root, overviewPath),
|
|
234
|
+
message: `Blueprint status must match folder (${status})`,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
violations.push(...validateBlueprintLinkingFrontmatter({
|
|
238
|
+
file: relativePath(root, overviewPath),
|
|
239
|
+
frontmatter,
|
|
240
|
+
status,
|
|
241
|
+
}));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (options.includeLegacyOmx === true) {
|
|
245
|
+
const legacy = auditLegacyOmxPlans(root);
|
|
246
|
+
checked += legacy.checked;
|
|
247
|
+
violations.push(...legacy.violations);
|
|
248
|
+
}
|
|
249
|
+
return result('Blueprint lifecycle', checked, violations);
|
|
250
|
+
}
|
|
251
|
+
export function formatRepoAuditReport(auditResult) {
|
|
252
|
+
const status = auditResult.ok ? 'OK' : 'FAILED';
|
|
253
|
+
const lines = [`${auditResult.title}: ${status} (${auditResult.checked} checked)`];
|
|
254
|
+
for (const violation of auditResult.violations) {
|
|
255
|
+
const location = violation.file ? `${violation.file}: ` : '';
|
|
256
|
+
lines.push(`- ${location}${violation.message}`);
|
|
257
|
+
}
|
|
258
|
+
return lines.join('\n');
|
|
259
|
+
}
|
|
260
|
+
function result(title, checked, violations) {
|
|
261
|
+
return { ok: violations.length === 0, title, checked, violations };
|
|
262
|
+
}
|
|
263
|
+
function parseWorkspacePackageGlobs(workspaceYaml) {
|
|
264
|
+
return extractTopLevelBlock(workspaceYaml, 'packages')
|
|
265
|
+
.map((line) => /^\s*-\s*(.+?)\s*$/.exec(line)?.[1])
|
|
266
|
+
.filter((value) => value !== undefined)
|
|
267
|
+
.map((value) => stripQuotes(value.trim()))
|
|
268
|
+
.filter((value) => value.length > 0 && !value.startsWith('!'));
|
|
269
|
+
}
|
|
270
|
+
function validateBlueprintLinkingFrontmatter(options) {
|
|
271
|
+
if (!ACTIVE_BLUEPRINT_STATUSES.has(options.status))
|
|
272
|
+
return [];
|
|
273
|
+
const violations = [];
|
|
274
|
+
const parentRoadmap = typeof options.frontmatter.parent_roadmap === 'string'
|
|
275
|
+
? options.frontmatter.parent_roadmap.trim()
|
|
276
|
+
: '';
|
|
277
|
+
if (parentRoadmap.length > 0 && !isLocalParentRoadmapReference(parentRoadmap)) {
|
|
278
|
+
violations.push({
|
|
279
|
+
file: options.file,
|
|
280
|
+
message: 'parent_roadmap must reference a local roadmap slug/path in the same repo; use cross_repo_depends_on plus GitHub links for cross-repo relationships',
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
const dependsOn = Array.isArray(options.frontmatter.depends_on)
|
|
284
|
+
? options.frontmatter.depends_on
|
|
285
|
+
: [];
|
|
286
|
+
for (const dependency of dependsOn) {
|
|
287
|
+
if (typeof dependency !== 'string') {
|
|
288
|
+
violations.push({
|
|
289
|
+
file: options.file,
|
|
290
|
+
message: 'depends_on entries must be strings',
|
|
291
|
+
});
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
const trimmed = dependency.trim();
|
|
295
|
+
if (looksLikeCrossRepoReference(trimmed)) {
|
|
296
|
+
violations.push({
|
|
297
|
+
file: options.file,
|
|
298
|
+
message: 'depends_on must stay repo-local; move cross-repo blockers to cross_repo_depends_on and use GitHub links in markdown body references',
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
if (options.frontmatter.cross_repo_depends_on === undefined)
|
|
303
|
+
return violations;
|
|
304
|
+
if (!Array.isArray(options.frontmatter.cross_repo_depends_on)) {
|
|
305
|
+
violations.push({
|
|
306
|
+
file: options.file,
|
|
307
|
+
message: 'cross_repo_depends_on must be an array of { repo, slug, require_status? } objects',
|
|
308
|
+
});
|
|
309
|
+
return violations;
|
|
310
|
+
}
|
|
311
|
+
for (const dependency of options.frontmatter.cross_repo_depends_on) {
|
|
312
|
+
if (!dependency || typeof dependency !== 'object' || Array.isArray(dependency)) {
|
|
313
|
+
violations.push({
|
|
314
|
+
file: options.file,
|
|
315
|
+
message: 'cross_repo_depends_on entries must be objects with repo, slug, and optional require_status',
|
|
316
|
+
});
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
const record = dependency;
|
|
320
|
+
const repo = typeof record.repo === 'string' ? record.repo.trim() : '';
|
|
321
|
+
const slug = typeof record.slug === 'string' ? record.slug.trim() : '';
|
|
322
|
+
const requireStatus = typeof record.require_status === 'string' ? record.require_status.trim() : undefined;
|
|
323
|
+
if (!GITHUB_REPO_PATTERN.test(repo) || looksLikeCrossRepoReference(repo)) {
|
|
324
|
+
violations.push({
|
|
325
|
+
file: options.file,
|
|
326
|
+
message: 'cross_repo_depends_on.repo must use owner/repo form',
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
if (!BLUEPRINT_SLUG_PATTERN.test(slug) || looksLikeCrossRepoReference(slug)) {
|
|
330
|
+
violations.push({
|
|
331
|
+
file: options.file,
|
|
332
|
+
message: 'cross_repo_depends_on.slug must be a blueprint slug only (no paths, URLs, or _overview.md suffix)',
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
if (requireStatus && !isBlueprintStatusValue(requireStatus)) {
|
|
336
|
+
violations.push({
|
|
337
|
+
file: options.file,
|
|
338
|
+
message: 'cross_repo_depends_on.require_status must be a valid blueprint lifecycle status',
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return violations;
|
|
343
|
+
}
|
|
344
|
+
function isLocalParentRoadmapReference(reference) {
|
|
345
|
+
const normalized = normalizeBlueprintReference(reference);
|
|
346
|
+
if (normalized.length === 0)
|
|
347
|
+
return false;
|
|
348
|
+
if (looksLikeCrossRepoReference(normalized))
|
|
349
|
+
return false;
|
|
350
|
+
if (BLUEPRINT_REFERENCE_PATTERN.test(normalized))
|
|
351
|
+
return true;
|
|
352
|
+
return BLUEPRINT_SLUG_PATTERN.test(lastSegment(normalized));
|
|
353
|
+
}
|
|
354
|
+
function looksLikeCrossRepoReference(reference) {
|
|
355
|
+
const trimmed = reference.trim();
|
|
356
|
+
return (trimmed.length > 0 &&
|
|
357
|
+
(LEGACY_CROSS_REPO_LABEL_PATTERN.test(trimmed) ||
|
|
358
|
+
ABSOLUTE_FILE_REFERENCE_PATTERN.test(trimmed) ||
|
|
359
|
+
/^https?:\/\//i.test(trimmed) ||
|
|
360
|
+
GITHUB_BLOB_URL_PATTERN.test(trimmed)));
|
|
361
|
+
}
|
|
362
|
+
function normalizeBlueprintReference(reference) {
|
|
363
|
+
return reference
|
|
364
|
+
.trim()
|
|
365
|
+
.replace(/^['"]|['"]$/g, '')
|
|
366
|
+
.replace(/\\/g, '/')
|
|
367
|
+
.replace(/^\.?\//, '')
|
|
368
|
+
.replace(/\/_overview\.md$/, '');
|
|
369
|
+
}
|
|
370
|
+
function lastSegment(value) {
|
|
371
|
+
return value.split('/').filter(Boolean).at(-1) ?? value;
|
|
372
|
+
}
|
|
373
|
+
function isBlueprintStatusValue(value) {
|
|
374
|
+
return DEFAULT_BLUEPRINT_STATUSES.includes(value);
|
|
375
|
+
}
|
|
376
|
+
function parseCatalogDependencyNames(workspaceYaml) {
|
|
377
|
+
const names = new Set();
|
|
378
|
+
for (const line of extractTopLevelBlock(workspaceYaml, 'catalog')) {
|
|
379
|
+
const match = /^\s+([^:#][^:]*):\s*(.+?)\s*$/.exec(line);
|
|
380
|
+
if (match?.[1] && match[2] !== '')
|
|
381
|
+
names.add(stripQuotes(match[1].trim()));
|
|
382
|
+
}
|
|
383
|
+
for (const line of extractTopLevelBlock(workspaceYaml, 'catalogs')) {
|
|
384
|
+
const indent = line.match(/^\s*/)?.[0].length ?? 0;
|
|
385
|
+
const match = /^\s+([^:#][^:]*):\s*(.+?)\s*$/.exec(line);
|
|
386
|
+
if (indent >= 4 && match?.[1] && match[2] !== '')
|
|
387
|
+
names.add(stripQuotes(match[1].trim()));
|
|
388
|
+
}
|
|
389
|
+
return names;
|
|
390
|
+
}
|
|
391
|
+
function extractTopLevelBlock(yaml, key) {
|
|
392
|
+
const lines = [];
|
|
393
|
+
let inBlock = false;
|
|
394
|
+
for (const line of yaml.split(/\r?\n/)) {
|
|
395
|
+
const trimmed = line.trim();
|
|
396
|
+
if (trimmed.length === 0 || trimmed.startsWith('#'))
|
|
397
|
+
continue;
|
|
398
|
+
const topLevelKey = /^([A-Za-z0-9_-]+):/.exec(trimmed)?.[1];
|
|
399
|
+
const indent = line.match(/^\s*/)?.[0].length ?? 0;
|
|
400
|
+
if (indent === 0 && topLevelKey) {
|
|
401
|
+
inBlock = topLevelKey === key;
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
if (inBlock)
|
|
405
|
+
lines.push(line);
|
|
406
|
+
}
|
|
407
|
+
return lines;
|
|
408
|
+
}
|
|
409
|
+
function discoverWorkspacePackageFiles(root, workspaceGlobs) {
|
|
410
|
+
const packageFiles = new Set();
|
|
411
|
+
for (const workspaceGlob of workspaceGlobs) {
|
|
412
|
+
const normalizedGlob = workspaceGlob.replace(/\\/g, '/');
|
|
413
|
+
if (normalizedGlob.endsWith('/*')) {
|
|
414
|
+
const baseDirectory = resolve(root, normalizedGlob.slice(0, -2));
|
|
415
|
+
if (!existsSync(baseDirectory))
|
|
416
|
+
continue;
|
|
417
|
+
for (const entry of readdirSync(baseDirectory, { withFileTypes: true })) {
|
|
418
|
+
if (!entry.isDirectory())
|
|
419
|
+
continue;
|
|
420
|
+
const packageFile = join(baseDirectory, entry.name, 'package.json');
|
|
421
|
+
if (existsSync(packageFile))
|
|
422
|
+
packageFiles.add(packageFile);
|
|
423
|
+
}
|
|
424
|
+
continue;
|
|
425
|
+
}
|
|
426
|
+
const packageFile = resolve(root, normalizedGlob, 'package.json');
|
|
427
|
+
if (existsSync(packageFile))
|
|
428
|
+
packageFiles.add(packageFile);
|
|
429
|
+
}
|
|
430
|
+
return [...packageFiles].toSorted((left, right) => left.localeCompare(right));
|
|
431
|
+
}
|
|
432
|
+
function isSharedDependencyReference(version) {
|
|
433
|
+
return (version.startsWith('catalog:') ||
|
|
434
|
+
version.startsWith('workspace:') ||
|
|
435
|
+
version.startsWith('file:') ||
|
|
436
|
+
version.startsWith('link:'));
|
|
437
|
+
}
|
|
438
|
+
function readJsonObject(file) {
|
|
439
|
+
const value = JSON.parse(readFileSync(file, 'utf8'));
|
|
440
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
441
|
+
return {};
|
|
442
|
+
return value;
|
|
443
|
+
}
|
|
444
|
+
function readStringRecord(value) {
|
|
445
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
446
|
+
return {};
|
|
447
|
+
return Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === 'string'));
|
|
448
|
+
}
|
|
449
|
+
const MARKDOWN_SKIP_DIRS = new Set(['node_modules', 'dist', '.git', '_sandbox']);
|
|
450
|
+
function walkMarkdownFiles(root) {
|
|
451
|
+
const files = [];
|
|
452
|
+
for (const entry of readdirSync(root, { withFileTypes: true })) {
|
|
453
|
+
const path = join(root, entry.name);
|
|
454
|
+
if (entry.isDirectory()) {
|
|
455
|
+
if (MARKDOWN_SKIP_DIRS.has(entry.name))
|
|
456
|
+
continue;
|
|
457
|
+
files.push(...walkMarkdownFiles(path));
|
|
458
|
+
continue;
|
|
459
|
+
}
|
|
460
|
+
if (entry.isFile() && entry.name.endsWith('.md'))
|
|
461
|
+
files.push(path);
|
|
462
|
+
}
|
|
463
|
+
return files.toSorted((left, right) => left.localeCompare(right));
|
|
464
|
+
}
|
|
465
|
+
export function parseFrontmatter(markdown) {
|
|
466
|
+
if (!markdown.startsWith('---'))
|
|
467
|
+
return {};
|
|
468
|
+
const end = markdown.indexOf('\n---', 3);
|
|
469
|
+
if (end === -1)
|
|
470
|
+
return {};
|
|
471
|
+
const frontmatter = markdown.slice(3, end);
|
|
472
|
+
const data = {};
|
|
473
|
+
for (const line of frontmatter.split(/\r?\n/)) {
|
|
474
|
+
const match = /^\s*([A-Za-z0-9_-]+):\s*(.*?)\s*$/.exec(line);
|
|
475
|
+
if (!match?.[1])
|
|
476
|
+
continue;
|
|
477
|
+
data[match[1]] = stripQuotes(match[2] ?? '');
|
|
478
|
+
}
|
|
479
|
+
return data;
|
|
480
|
+
}
|
|
481
|
+
function applyDocsFrontmatterFix(markdown, options) {
|
|
482
|
+
const frontmatter = parseFrontmatter(markdown);
|
|
483
|
+
const needsType = !frontmatter.type;
|
|
484
|
+
const needsLastUpdated = !frontmatter.last_updated;
|
|
485
|
+
if (!needsType && !needsLastUpdated)
|
|
486
|
+
return markdown;
|
|
487
|
+
const lines = [];
|
|
488
|
+
if (needsType) {
|
|
489
|
+
lines.push('# TODO: classify type — auto-set by wp');
|
|
490
|
+
lines.push(`type: ${options.inferredType}`);
|
|
491
|
+
}
|
|
492
|
+
if (needsLastUpdated) {
|
|
493
|
+
lines.push(`last_updated: '${options.today}'`);
|
|
494
|
+
}
|
|
495
|
+
if (!markdown.startsWith('---')) {
|
|
496
|
+
return `---\n${lines.join('\n')}\n---\n\n${markdown}`;
|
|
497
|
+
}
|
|
498
|
+
const end = markdown.indexOf('\n---', 3);
|
|
499
|
+
if (end === -1)
|
|
500
|
+
return markdown;
|
|
501
|
+
return `${markdown.slice(0, end)}\n${lines.join('\n')}${markdown.slice(end)}`;
|
|
502
|
+
}
|
|
503
|
+
function auditLegacyOmxPlans(root) {
|
|
504
|
+
const plansRoot = join(root, '.omx', 'plans');
|
|
505
|
+
const violations = [];
|
|
506
|
+
let checked = 0;
|
|
507
|
+
const planFiles = readDirectoryEntries(plansRoot).filter((file) => file.endsWith('.md'));
|
|
508
|
+
const hasLegacySurface = planFiles.length > 0;
|
|
509
|
+
if (!hasLegacySurface)
|
|
510
|
+
return { checked, violations };
|
|
511
|
+
for (const file of planFiles) {
|
|
512
|
+
checked += 1;
|
|
513
|
+
const content = readTextIfExists(join(plansRoot, file));
|
|
514
|
+
if (!content)
|
|
515
|
+
continue;
|
|
516
|
+
const relativeFile = relativePath(root, join(plansRoot, file));
|
|
517
|
+
const parsed = matter(content);
|
|
518
|
+
if (/^#\s+(?:PRD|Test Spec):/im.test(content) || /^#\s+(?:PRD|Test Spec):/im.test(parsed.content)) {
|
|
519
|
+
violations.push({
|
|
520
|
+
file: relativeFile,
|
|
521
|
+
message: '.omx/plans must be a derived blueprint handoff, not an authoritative PRD/test-spec',
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
const frontmatter = parsed.data;
|
|
525
|
+
for (const [field, marker] of [
|
|
526
|
+
['derived', 'derived: true'],
|
|
527
|
+
['non-authoritative', 'non-authoritative: true'],
|
|
528
|
+
['blueprint_slug', 'blueprint_slug:'],
|
|
529
|
+
['blueprint_path', 'blueprint_path:'],
|
|
530
|
+
['content_hash', 'content_hash:'],
|
|
531
|
+
['head_at_ingest', 'head_at_ingest:'],
|
|
532
|
+
]) {
|
|
533
|
+
if (frontmatter[field] === undefined) {
|
|
534
|
+
violations.push({
|
|
535
|
+
file: relativeFile,
|
|
536
|
+
message: `.omx/plans handoff is missing required derived-handoff marker: ${marker}`,
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
if (frontmatter.derived !== undefined && frontmatter.derived !== true) {
|
|
541
|
+
violations.push({
|
|
542
|
+
file: relativeFile,
|
|
543
|
+
message: '.omx/plans handoff is missing required derived-handoff marker: derived: true',
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
if (frontmatter['non-authoritative'] !== undefined &&
|
|
547
|
+
frontmatter['non-authoritative'] !== true) {
|
|
548
|
+
violations.push({
|
|
549
|
+
file: relativeFile,
|
|
550
|
+
message: '.omx/plans handoff is missing required derived-handoff marker: non-authoritative: true',
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
if (typeof frontmatter.blueprint_path === 'string' &&
|
|
554
|
+
!/^(?:.*\/)?(?:blueprints|webpresso\/blueprints)\//.test(frontmatter.blueprint_path)) {
|
|
555
|
+
violations.push({
|
|
556
|
+
file: relativeFile,
|
|
557
|
+
message: '.omx/plans handoff blueprint_path must point at blueprints/',
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
const validated = blueprintDerivedHandoffSchema.safeParse(frontmatter);
|
|
561
|
+
if (!validated.success) {
|
|
562
|
+
for (const issue of validated.error.issues) {
|
|
563
|
+
const path = issue.path.join('.');
|
|
564
|
+
if (issue.path[0] === 'codex_goal' ||
|
|
565
|
+
issue.path[0] === 'omx_context' ||
|
|
566
|
+
issue.path[0] === 'generated_at' ||
|
|
567
|
+
issue.path[0] === 'generated_by') {
|
|
568
|
+
violations.push({
|
|
569
|
+
file: relativeFile,
|
|
570
|
+
message: `.omx/plans handoff has invalid optional provenance field ${path}: ${issue.message}`,
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
return { checked, violations };
|
|
577
|
+
}
|
|
578
|
+
function readDirectoryEntries(directory) {
|
|
579
|
+
return existsSync(directory) ? readdirSync(directory) : [];
|
|
580
|
+
}
|
|
581
|
+
function readTextIfExists(file) {
|
|
582
|
+
return existsSync(file) ? readFileSync(file, 'utf8') : undefined;
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* Fail if any package.json (root, workspaces, or named extras) declares a
|
|
586
|
+
* `link:<filesystem-path>` value in `dependencies`, `devDependencies`,
|
|
587
|
+
* `optionalDependencies`, or `pnpm.overrides`. `link:` filesystem-couples
|
|
588
|
+
* consumer clones to a maintainer's directory layout and hides version-pin
|
|
589
|
+
* drift; use `catalog:` (cross-repo) or `workspace:*` (intra-repo) instead.
|
|
590
|
+
*/
|
|
591
|
+
export function auditNoLinkProtocol(rootDirectory = process.cwd(), options = {}) {
|
|
592
|
+
const root = resolve(rootDirectory);
|
|
593
|
+
const workspacePath = resolve(root, options.workspaceFile ?? 'pnpm-workspace.yaml');
|
|
594
|
+
const violations = [];
|
|
595
|
+
const packageFiles = new Set();
|
|
596
|
+
const rootPackageFile = resolve(root, 'package.json');
|
|
597
|
+
if (existsSync(rootPackageFile))
|
|
598
|
+
packageFiles.add(rootPackageFile);
|
|
599
|
+
if (existsSync(workspacePath)) {
|
|
600
|
+
const workspaceGlobs = parseWorkspacePackageGlobs(readFileSync(workspacePath, 'utf8'));
|
|
601
|
+
for (const discovered of discoverWorkspacePackageFiles(root, workspaceGlobs)) {
|
|
602
|
+
packageFiles.add(discovered);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
for (const extraGlob of options.extraPackageGlobs ?? []) {
|
|
606
|
+
for (const discovered of discoverWorkspacePackageFiles(root, [extraGlob])) {
|
|
607
|
+
packageFiles.add(discovered);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
const sortedPackageFiles = [...packageFiles].toSorted((left, right) => left.localeCompare(right));
|
|
611
|
+
for (const packageFile of sortedPackageFiles) {
|
|
612
|
+
const pkg = readJsonObject(packageFile);
|
|
613
|
+
const file = relativePath(root, packageFile);
|
|
614
|
+
const directSections = ['dependencies', 'devDependencies', 'optionalDependencies'];
|
|
615
|
+
for (const section of directSections) {
|
|
616
|
+
for (const [name, value] of Object.entries(readStringRecord(pkg[section]))) {
|
|
617
|
+
if (value.startsWith('link:')) {
|
|
618
|
+
violations.push({
|
|
619
|
+
file,
|
|
620
|
+
message: `${section}.${name}: ${JSON.stringify(value)} — replace with "catalog:" (cross-repo) or "workspace:*" (intra-repo)`,
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
const pnpm = pkg.pnpm;
|
|
626
|
+
if (pnpm && typeof pnpm === 'object' && !Array.isArray(pnpm)) {
|
|
627
|
+
const overrides = readStringRecord(pnpm.overrides);
|
|
628
|
+
for (const [name, value] of Object.entries(overrides)) {
|
|
629
|
+
if (value.startsWith('link:')) {
|
|
630
|
+
violations.push({
|
|
631
|
+
file,
|
|
632
|
+
message: `pnpm.overrides.${name}: ${JSON.stringify(value)} — link: in overrides filesystem-couples the consumer; remove the override or pin to a published version`,
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
return result('no-link-protocol', sortedPackageFiles.length, violations);
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Fail if any source file contains relative parent imports (`../`) or if any
|
|
642
|
+
* `tsconfig*.json` declares a parent-relative path. Use `#alias` package
|
|
643
|
+
* imports for source code and a workspace path mapping / package alias for
|
|
644
|
+
* tsconfig `extends`, `paths`, `references`, etc.
|
|
645
|
+
*/
|
|
646
|
+
export function auditNoRelativeParentImports(root, options = {}) {
|
|
647
|
+
const srcDir = resolve(root, options.srcDir ?? 'src');
|
|
648
|
+
const extensions = options.extensions ?? ['.ts', '.tsx', '.js', '.jsx'];
|
|
649
|
+
const excludedDirs = new Set((options.excludeDirs ?? []).map((d) => resolve(srcDir, d)));
|
|
650
|
+
const violations = [];
|
|
651
|
+
let checked = 0;
|
|
652
|
+
function walk(dir) {
|
|
653
|
+
if (!existsSync(dir))
|
|
654
|
+
return;
|
|
655
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
656
|
+
const full = join(dir, entry.name);
|
|
657
|
+
if (entry.isDirectory()) {
|
|
658
|
+
if (entry.name === 'node_modules' || entry.name === 'dist' || entry.name === '_sandbox')
|
|
659
|
+
continue;
|
|
660
|
+
if (excludedDirs.has(full))
|
|
661
|
+
continue;
|
|
662
|
+
walk(full);
|
|
663
|
+
continue;
|
|
664
|
+
}
|
|
665
|
+
if (!extensions.some((ext) => entry.name.endsWith(ext)))
|
|
666
|
+
continue;
|
|
667
|
+
if (entry.name.endsWith('.test.ts') || entry.name.endsWith('.test.tsx'))
|
|
668
|
+
continue;
|
|
669
|
+
if (entry.name.endsWith('.integration.test.ts'))
|
|
670
|
+
continue;
|
|
671
|
+
checked++;
|
|
672
|
+
const content = readFileSync(full, 'utf-8');
|
|
673
|
+
const rel = relativePath(root, full);
|
|
674
|
+
const lines = content.split('\n');
|
|
675
|
+
for (let i = 0; i < lines.length; i++) {
|
|
676
|
+
const line = lines[i] ?? '';
|
|
677
|
+
// Skip comment lines
|
|
678
|
+
if (/^\s*(\/\/|\/\*)/.test(line))
|
|
679
|
+
continue;
|
|
680
|
+
if (/(?:from|export\s+\*\s+from)\s+['"]\.\.\//.test(line)) {
|
|
681
|
+
violations.push({
|
|
682
|
+
file: rel,
|
|
683
|
+
message: `Line ${i + 1}: relative parent import detected — use a \`#\` alias instead: ${line.trim()}`,
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
// Detect 3+ level fixed-depth path traversal in runtime code.
|
|
687
|
+
// These break when src/ vs dist/esm/ depth differs. Use resolvePackageAsset() instead.
|
|
688
|
+
const hasDeepStringTraversal = /['"`][^'"`\n]*(?:\.\.\/){3,}[^'"`\n]*['"`]/.test(line);
|
|
689
|
+
const hasDeepArgTraversal = (line.match(/['"]\.\.['"]/g)?.length ?? 0) >= 3;
|
|
690
|
+
if (hasDeepStringTraversal || hasDeepArgTraversal) {
|
|
691
|
+
violations.push({
|
|
692
|
+
file: rel,
|
|
693
|
+
message: `Line ${i + 1}: fixed-depth path traversal (3+ levels) — use resolvePackageAsset() to locate package assets portably: ${line.trim()}`,
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
walk(srcDir);
|
|
700
|
+
if (options.skipTsconfig !== true) {
|
|
701
|
+
const tsconfigRoot = resolve(root, options.tsconfigRoot ?? '.');
|
|
702
|
+
const tsconfigChecked = walkTsconfigParentPaths(tsconfigRoot, root, violations);
|
|
703
|
+
checked += tsconfigChecked;
|
|
704
|
+
}
|
|
705
|
+
return {
|
|
706
|
+
ok: violations.length === 0,
|
|
707
|
+
title: 'no-relative-parent-imports',
|
|
708
|
+
checked,
|
|
709
|
+
violations,
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
const TSCONFIG_SKIP_DIRS = new Set([
|
|
713
|
+
'node_modules',
|
|
714
|
+
'dist',
|
|
715
|
+
'build',
|
|
716
|
+
'.git',
|
|
717
|
+
'.cache',
|
|
718
|
+
'.next',
|
|
719
|
+
'.turbo',
|
|
720
|
+
'.omx',
|
|
721
|
+
// Mutation-testing sandbox (gitignored, generated per package).
|
|
722
|
+
'.stryker-tmp',
|
|
723
|
+
// Per-worktree clones (Claude Code Agent isolation) — not part of the
|
|
724
|
+
// canonical source tree, audit them via their own root if needed.
|
|
725
|
+
'.claude',
|
|
726
|
+
// Scaffolding templates: content under `template/` becomes a downstream
|
|
727
|
+
// customer's source tree, not ours. Parent paths inside template
|
|
728
|
+
// tsconfigs reference the scaffolded layout, not the repo layout.
|
|
729
|
+
'template',
|
|
730
|
+
// Workspace-level scratch/archive space — stale trees produce false
|
|
731
|
+
// positives; consumers without this directory see no behaviour change.
|
|
732
|
+
'_sandbox',
|
|
733
|
+
]);
|
|
734
|
+
/**
|
|
735
|
+
* Walk the repo for `tsconfig*.json` files and flag any value that uses a
|
|
736
|
+
* parent-relative path (`../`). Covers `extends`, `paths`, `references`,
|
|
737
|
+
* `include`, `exclude`, `files`, `baseUrl`, `rootDir`, `outDir`, etc., by
|
|
738
|
+
* scanning every string value recursively. tsconfig.json supports JSONC
|
|
739
|
+
* (trailing commas + comments), but we only need to inspect string-shaped
|
|
740
|
+
* values — a defensive line-level scan tolerates the comment syntax.
|
|
741
|
+
*/
|
|
742
|
+
function walkTsconfigParentPaths(startDir, reportRoot, violations) {
|
|
743
|
+
if (!existsSync(startDir))
|
|
744
|
+
return 0;
|
|
745
|
+
let checked = 0;
|
|
746
|
+
function walk(dir) {
|
|
747
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
748
|
+
const full = join(dir, entry.name);
|
|
749
|
+
if (entry.isDirectory()) {
|
|
750
|
+
if (TSCONFIG_SKIP_DIRS.has(entry.name))
|
|
751
|
+
continue;
|
|
752
|
+
walk(full);
|
|
753
|
+
continue;
|
|
754
|
+
}
|
|
755
|
+
if (!entry.isFile())
|
|
756
|
+
continue;
|
|
757
|
+
if (!/^tsconfig(\.[^.]+)*\.json$/.test(entry.name))
|
|
758
|
+
continue;
|
|
759
|
+
checked += 1;
|
|
760
|
+
const content = readFileSync(full, 'utf-8');
|
|
761
|
+
const rel = relativePath(reportRoot, full);
|
|
762
|
+
const lines = content.split('\n');
|
|
763
|
+
for (let i = 0; i < lines.length; i++) {
|
|
764
|
+
const line = lines[i] ?? '';
|
|
765
|
+
const trimmed = line.trim();
|
|
766
|
+
// Skip blank lines, line comments, and block-comment-only lines.
|
|
767
|
+
if (trimmed === '' || trimmed.startsWith('//') || trimmed.startsWith('/*'))
|
|
768
|
+
continue;
|
|
769
|
+
// Any `"../` inside a JSON string value is a parent reference. We
|
|
770
|
+
// match `"` followed by zero or more non-quote chars then `../`
|
|
771
|
+
// (handles both `"../foo"` and `"./foo/../bar"`).
|
|
772
|
+
if (/"[^"]*\.\.\/[^"]*"/.test(line)) {
|
|
773
|
+
violations.push({
|
|
774
|
+
file: rel,
|
|
775
|
+
message: `Line ${i + 1}: tsconfig parent-relative path detected — use a workspace path mapping or package alias instead: ${trimmed}`,
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
walk(startDir);
|
|
782
|
+
return checked;
|
|
783
|
+
}
|
|
784
|
+
function withFilePrefix(file, auditResult) {
|
|
785
|
+
return {
|
|
786
|
+
...auditResult,
|
|
787
|
+
violations: auditResult.violations.map((violation) => ({
|
|
788
|
+
...violation,
|
|
789
|
+
file: violation.file ?? file,
|
|
790
|
+
})),
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
function stripQuotes(value) {
|
|
794
|
+
return value.replace(/^['"]|['"]$/g, '');
|
|
795
|
+
}
|
|
796
|
+
function relativePath(root, path) {
|
|
797
|
+
const relativePathValue = relative(root, path);
|
|
798
|
+
return relativePathValue.split(sep).join('/');
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Fail if any `package.json#scripts` entry invokes a relative parent path
|
|
802
|
+
* (`../`). Scripts should call workspace bins or registered CLI commands, not
|
|
803
|
+
* path-relative sibling scripts — those break when packages move.
|
|
804
|
+
*
|
|
805
|
+
* @example bad — "build": "node [dot-dot-dot]/scripts/foo.js" (relative parent path)
|
|
806
|
+
* @example good — "build": "pnpm --filter scripts foo" or "build": "wp build"
|
|
807
|
+
*/
|
|
808
|
+
export function auditNoRelativePackageScripts(root, options = {}) {
|
|
809
|
+
const violations = [];
|
|
810
|
+
const excludedDirs = new Set((options.excludeDirs ?? []).map((d) => resolve(root, d)));
|
|
811
|
+
let checked = 0;
|
|
812
|
+
function walk(dir) {
|
|
813
|
+
if (!existsSync(dir))
|
|
814
|
+
return;
|
|
815
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
816
|
+
const full = join(dir, entry.name);
|
|
817
|
+
if (entry.isDirectory()) {
|
|
818
|
+
if (entry.name === 'node_modules' ||
|
|
819
|
+
entry.name === 'dist' ||
|
|
820
|
+
entry.name === '.git' ||
|
|
821
|
+
entry.name === '_sandbox')
|
|
822
|
+
continue;
|
|
823
|
+
if (excludedDirs.has(full))
|
|
824
|
+
continue;
|
|
825
|
+
walk(full);
|
|
826
|
+
continue;
|
|
827
|
+
}
|
|
828
|
+
if (entry.name !== 'package.json')
|
|
829
|
+
continue;
|
|
830
|
+
checked++;
|
|
831
|
+
let pkg;
|
|
832
|
+
try {
|
|
833
|
+
pkg = JSON.parse(readFileSync(full, 'utf-8'));
|
|
834
|
+
}
|
|
835
|
+
catch {
|
|
836
|
+
continue;
|
|
837
|
+
}
|
|
838
|
+
const scripts = pkg['scripts'];
|
|
839
|
+
if (!scripts || typeof scripts !== 'object')
|
|
840
|
+
continue;
|
|
841
|
+
const rel = relativePath(root, full);
|
|
842
|
+
for (const [name, value] of Object.entries(scripts)) {
|
|
843
|
+
if (typeof value !== 'string')
|
|
844
|
+
continue;
|
|
845
|
+
// Detect ../ only in the executable/script position of each sub-command,
|
|
846
|
+
// not in subsequent argument tokens. Split by command separators first.
|
|
847
|
+
const subCommands = value.split(/&&|\|\||;/);
|
|
848
|
+
const hasRelativeScript = subCommands.some((sub) => {
|
|
849
|
+
const trimmed = sub.trim();
|
|
850
|
+
// interpreter followed immediately by a ../ script path
|
|
851
|
+
if (/^(?:node|bun|tsx|ts-node|npx|pnpm\s+exec)\s+\.\.\/\S+/.test(trimmed))
|
|
852
|
+
return true;
|
|
853
|
+
// bare ../ script execution
|
|
854
|
+
if (trimmed.startsWith('../'))
|
|
855
|
+
return true;
|
|
856
|
+
return false;
|
|
857
|
+
});
|
|
858
|
+
if (hasRelativeScript) {
|
|
859
|
+
violations.push({
|
|
860
|
+
file: rel,
|
|
861
|
+
message: `scripts.${name}: relative parent path detected — use a workspace bin or registered CLI command instead: ${value}`,
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
walk(root);
|
|
868
|
+
return {
|
|
869
|
+
ok: violations.length === 0,
|
|
870
|
+
title: 'no-relative-package-scripts',
|
|
871
|
+
checked,
|
|
872
|
+
violations,
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
//# sourceMappingURL=repo-guardrails.js.map
|