gsd-trae 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +8 -0
- package/.gitmodules +6 -0
- package/.trae/project_rules.md +56 -0
- package/.trae/rules/project_rules.md +56 -0
- package/.vscode/code-counter/code-counter.db +0 -0
- package/.vscode/settings.json +5 -0
- package/README.md +193 -0
- package/bin/cli.js +13 -0
- package/install.sh +77 -0
- package/package.json +29 -0
- package/refs/gsd/.github/CODEOWNERS +2 -0
- package/refs/gsd/.github/FUNDING.yml +1 -0
- package/refs/gsd/.github/ISSUE_TEMPLATE/bug_report.yml +59 -0
- package/refs/gsd/.github/ISSUE_TEMPLATE/feature_request.yml +37 -0
- package/refs/gsd/.github/pull_request_template.md +24 -0
- package/refs/gsd/.github/workflows/auto-label-issues.yml +21 -0
- package/refs/gsd/CHANGELOG.md +1520 -0
- package/refs/gsd/LICENSE +21 -0
- package/refs/gsd/README.md +704 -0
- package/refs/gsd/SECURITY.md +33 -0
- package/refs/gsd/agents/gsd-codebase-mapper.md +764 -0
- package/refs/gsd/agents/gsd-debugger.md +1246 -0
- package/refs/gsd/agents/gsd-executor.md +469 -0
- package/refs/gsd/agents/gsd-integration-checker.md +443 -0
- package/refs/gsd/agents/gsd-phase-researcher.md +546 -0
- package/refs/gsd/agents/gsd-plan-checker.md +690 -0
- package/refs/gsd/agents/gsd-planner.md +1275 -0
- package/refs/gsd/agents/gsd-project-researcher.md +621 -0
- package/refs/gsd/agents/gsd-research-synthesizer.md +239 -0
- package/refs/gsd/agents/gsd-roadmapper.md +642 -0
- package/refs/gsd/agents/gsd-verifier.md +573 -0
- package/refs/gsd/assets/gsd-logo-2000-transparent.png +0 -0
- package/refs/gsd/assets/gsd-logo-2000-transparent.svg +17 -0
- package/refs/gsd/assets/gsd-logo-2000.png +0 -0
- package/refs/gsd/assets/gsd-logo-2000.svg +21 -0
- package/refs/gsd/assets/terminal.svg +68 -0
- package/refs/gsd/bin/install.js +2090 -0
- package/refs/gsd/commands/gsd/add-phase.md +43 -0
- package/refs/gsd/commands/gsd/add-tests.md +41 -0
- package/refs/gsd/commands/gsd/add-todo.md +47 -0
- package/refs/gsd/commands/gsd/audit-milestone.md +36 -0
- package/refs/gsd/commands/gsd/check-todos.md +45 -0
- package/refs/gsd/commands/gsd/cleanup.md +18 -0
- package/refs/gsd/commands/gsd/complete-milestone.md +136 -0
- package/refs/gsd/commands/gsd/debug.md +167 -0
- package/refs/gsd/commands/gsd/discuss-phase.md +83 -0
- package/refs/gsd/commands/gsd/execute-phase.md +41 -0
- package/refs/gsd/commands/gsd/health.md +22 -0
- package/refs/gsd/commands/gsd/help.md +22 -0
- package/refs/gsd/commands/gsd/insert-phase.md +32 -0
- package/refs/gsd/commands/gsd/join-discord.md +18 -0
- package/refs/gsd/commands/gsd/list-phase-assumptions.md +46 -0
- package/refs/gsd/commands/gsd/map-codebase.md +71 -0
- package/refs/gsd/commands/gsd/new-milestone.md +44 -0
- package/refs/gsd/commands/gsd/new-project.md +42 -0
- package/refs/gsd/commands/gsd/new-project.md.bak +1041 -0
- package/refs/gsd/commands/gsd/pause-work.md +38 -0
- package/refs/gsd/commands/gsd/plan-milestone-gaps.md +34 -0
- package/refs/gsd/commands/gsd/plan-phase.md +45 -0
- package/refs/gsd/commands/gsd/progress.md +24 -0
- package/refs/gsd/commands/gsd/quick.md +41 -0
- package/refs/gsd/commands/gsd/reapply-patches.md +110 -0
- package/refs/gsd/commands/gsd/remove-phase.md +31 -0
- package/refs/gsd/commands/gsd/research-phase.md +189 -0
- package/refs/gsd/commands/gsd/resume-work.md +40 -0
- package/refs/gsd/commands/gsd/set-profile.md +34 -0
- package/refs/gsd/commands/gsd/settings.md +36 -0
- package/refs/gsd/commands/gsd/update.md +37 -0
- package/refs/gsd/commands/gsd/verify-work.md +38 -0
- package/refs/gsd/docs/USER-GUIDE.md +471 -0
- package/refs/gsd/docs/context-monitor.md +96 -0
- package/refs/gsd/get-shit-done/bin/gsd-tools.cjs +585 -0
- package/refs/gsd/get-shit-done/bin/lib/commands.cjs +553 -0
- package/refs/gsd/get-shit-done/bin/lib/config.cjs +162 -0
- package/refs/gsd/get-shit-done/bin/lib/core.cjs +411 -0
- package/refs/gsd/get-shit-done/bin/lib/frontmatter.cjs +299 -0
- package/refs/gsd/get-shit-done/bin/lib/init.cjs +710 -0
- package/refs/gsd/get-shit-done/bin/lib/milestone.cjs +215 -0
- package/refs/gsd/get-shit-done/bin/lib/phase.cjs +870 -0
- package/refs/gsd/get-shit-done/bin/lib/roadmap.cjs +298 -0
- package/refs/gsd/get-shit-done/bin/lib/state.cjs +521 -0
- package/refs/gsd/get-shit-done/bin/lib/template.cjs +222 -0
- package/refs/gsd/get-shit-done/bin/lib/verify.cjs +772 -0
- package/refs/gsd/get-shit-done/references/checkpoints.md +776 -0
- package/refs/gsd/get-shit-done/references/continuation-format.md +249 -0
- package/refs/gsd/get-shit-done/references/decimal-phase-calculation.md +65 -0
- package/refs/gsd/get-shit-done/references/git-integration.md +248 -0
- package/refs/gsd/get-shit-done/references/git-planning-commit.md +38 -0
- package/refs/gsd/get-shit-done/references/model-profile-resolution.md +34 -0
- package/refs/gsd/get-shit-done/references/model-profiles.md +92 -0
- package/refs/gsd/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/refs/gsd/get-shit-done/references/planning-config.md +196 -0
- package/refs/gsd/get-shit-done/references/questioning.md +145 -0
- package/refs/gsd/get-shit-done/references/tdd.md +263 -0
- package/refs/gsd/get-shit-done/references/ui-brand.md +160 -0
- package/refs/gsd/get-shit-done/references/verification-patterns.md +612 -0
- package/refs/gsd/get-shit-done/templates/DEBUG.md +164 -0
- package/refs/gsd/get-shit-done/templates/UAT.md +247 -0
- package/refs/gsd/get-shit-done/templates/VALIDATION.md +76 -0
- package/refs/gsd/get-shit-done/templates/codebase/architecture.md +255 -0
- package/refs/gsd/get-shit-done/templates/codebase/concerns.md +310 -0
- package/refs/gsd/get-shit-done/templates/codebase/conventions.md +307 -0
- package/refs/gsd/get-shit-done/templates/codebase/integrations.md +280 -0
- package/refs/gsd/get-shit-done/templates/codebase/stack.md +186 -0
- package/refs/gsd/get-shit-done/templates/codebase/structure.md +285 -0
- package/refs/gsd/get-shit-done/templates/codebase/testing.md +480 -0
- package/refs/gsd/get-shit-done/templates/config.json +37 -0
- package/refs/gsd/get-shit-done/templates/context.md +283 -0
- package/refs/gsd/get-shit-done/templates/continue-here.md +78 -0
- package/refs/gsd/get-shit-done/templates/debug-subagent-prompt.md +91 -0
- package/refs/gsd/get-shit-done/templates/discovery.md +146 -0
- package/refs/gsd/get-shit-done/templates/milestone-archive.md +123 -0
- package/refs/gsd/get-shit-done/templates/milestone.md +115 -0
- package/refs/gsd/get-shit-done/templates/phase-prompt.md +569 -0
- package/refs/gsd/get-shit-done/templates/planner-subagent-prompt.md +117 -0
- package/refs/gsd/get-shit-done/templates/project.md +184 -0
- package/refs/gsd/get-shit-done/templates/requirements.md +231 -0
- package/refs/gsd/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
- package/refs/gsd/get-shit-done/templates/research-project/FEATURES.md +147 -0
- package/refs/gsd/get-shit-done/templates/research-project/PITFALLS.md +200 -0
- package/refs/gsd/get-shit-done/templates/research-project/STACK.md +120 -0
- package/refs/gsd/get-shit-done/templates/research-project/SUMMARY.md +170 -0
- package/refs/gsd/get-shit-done/templates/research.md +552 -0
- package/refs/gsd/get-shit-done/templates/retrospective.md +54 -0
- package/refs/gsd/get-shit-done/templates/roadmap.md +202 -0
- package/refs/gsd/get-shit-done/templates/state.md +176 -0
- package/refs/gsd/get-shit-done/templates/summary-complex.md +59 -0
- package/refs/gsd/get-shit-done/templates/summary-minimal.md +41 -0
- package/refs/gsd/get-shit-done/templates/summary-standard.md +48 -0
- package/refs/gsd/get-shit-done/templates/summary.md +248 -0
- package/refs/gsd/get-shit-done/templates/user-setup.md +311 -0
- package/refs/gsd/get-shit-done/templates/verification-report.md +322 -0
- package/refs/gsd/get-shit-done/workflows/add-phase.md +111 -0
- package/refs/gsd/get-shit-done/workflows/add-tests.md +350 -0
- package/refs/gsd/get-shit-done/workflows/add-todo.md +157 -0
- package/refs/gsd/get-shit-done/workflows/audit-milestone.md +297 -0
- package/refs/gsd/get-shit-done/workflows/check-todos.md +176 -0
- package/refs/gsd/get-shit-done/workflows/cleanup.md +152 -0
- package/refs/gsd/get-shit-done/workflows/complete-milestone.md +763 -0
- package/refs/gsd/get-shit-done/workflows/diagnose-issues.md +219 -0
- package/refs/gsd/get-shit-done/workflows/discovery-phase.md +289 -0
- package/refs/gsd/get-shit-done/workflows/discuss-phase.md +542 -0
- package/refs/gsd/get-shit-done/workflows/execute-phase.md +449 -0
- package/refs/gsd/get-shit-done/workflows/execute-plan.md +448 -0
- package/refs/gsd/get-shit-done/workflows/health.md +156 -0
- package/refs/gsd/get-shit-done/workflows/help.md +489 -0
- package/refs/gsd/get-shit-done/workflows/insert-phase.md +129 -0
- package/refs/gsd/get-shit-done/workflows/list-phase-assumptions.md +178 -0
- package/refs/gsd/get-shit-done/workflows/map-codebase.md +315 -0
- package/refs/gsd/get-shit-done/workflows/new-milestone.md +382 -0
- package/refs/gsd/get-shit-done/workflows/new-project.md +1116 -0
- package/refs/gsd/get-shit-done/workflows/pause-work.md +122 -0
- package/refs/gsd/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
- package/refs/gsd/get-shit-done/workflows/plan-phase.md +569 -0
- package/refs/gsd/get-shit-done/workflows/progress.md +381 -0
- package/refs/gsd/get-shit-done/workflows/quick.md +453 -0
- package/refs/gsd/get-shit-done/workflows/remove-phase.md +154 -0
- package/refs/gsd/get-shit-done/workflows/research-phase.md +73 -0
- package/refs/gsd/get-shit-done/workflows/resume-project.md +306 -0
- package/refs/gsd/get-shit-done/workflows/set-profile.md +80 -0
- package/refs/gsd/get-shit-done/workflows/settings.md +213 -0
- package/refs/gsd/get-shit-done/workflows/transition.md +544 -0
- package/refs/gsd/get-shit-done/workflows/update.md +219 -0
- package/refs/gsd/get-shit-done/workflows/verify-phase.md +242 -0
- package/refs/gsd/get-shit-done/workflows/verify-work.md +569 -0
- package/refs/gsd/hooks/gsd-check-update.js +62 -0
- package/refs/gsd/hooks/gsd-context-monitor.js +122 -0
- package/refs/gsd/hooks/gsd-statusline.js +108 -0
- package/refs/gsd/package.json +50 -0
- package/refs/gsd/scripts/build-hooks.js +43 -0
- package/refs/gsd/tests/commands.test.cjs +661 -0
- package/refs/gsd/tests/helpers.cjs +40 -0
- package/refs/gsd/tests/init.test.cjs +205 -0
- package/refs/gsd/tests/milestone.test.cjs +98 -0
- package/refs/gsd/tests/phase.test.cjs +1241 -0
- package/refs/gsd/tests/roadmap.test.cjs +265 -0
- package/refs/gsd/tests/state.test.cjs +302 -0
- package/refs/gsd/tests/verify.test.cjs +80 -0
- package/refs/vbenchmark/.agent/agents/codebase-explorer.md +224 -0
- package/refs/vbenchmark/.agent/agents/debugger.md +180 -0
- package/refs/vbenchmark/.agent/agents/documenter.md +166 -0
- package/refs/vbenchmark/.agent/agents/implementer.md +70 -0
- package/refs/vbenchmark/.agent/agents/orchestrator.md +212 -0
- package/refs/vbenchmark/.agent/agents/researcher.md +80 -0
- package/refs/vbenchmark/.agent/agents/reviewer.md +184 -0
- package/refs/vbenchmark/.agent/agents/tester.md +170 -0
- package/refs/vbenchmark/.agent/commands/commit.md +29 -0
- package/refs/vbenchmark/.agent/commands/debug.md +59 -0
- package/refs/vbenchmark/.agent/commands/document.md +52 -0
- package/refs/vbenchmark/.agent/commands/gather-context.md +58 -0
- package/refs/vbenchmark/.agent/commands/init.md +56 -0
- package/refs/vbenchmark/.agent/commands/preset-help.md +50 -0
- package/refs/vbenchmark/.agent/commands/refactor.md +71 -0
- package/refs/vbenchmark/.agent/commands/research.md +37 -0
- package/refs/vbenchmark/.agent/commands/review.md +38 -0
- package/refs/vbenchmark/.agent/commands/test.md +61 -0
- package/refs/vbenchmark/.agent/rules/01-code-quality.md +33 -0
- package/refs/vbenchmark/.agent/rules/02-typescript-go.md +46 -0
- package/refs/vbenchmark/.agent/rules/03-security-git.md +34 -0
- package/refs/vbenchmark/.agent/rules/04-architecture.md +40 -0
- package/refs/vbenchmark/.agent/sync.js +536 -0
- package/refs/vbenchmark/.agent/workflows/commit.md +29 -0
- package/refs/vbenchmark/.agent/workflows/debug.md +59 -0
- package/refs/vbenchmark/.agent/workflows/document.md +52 -0
- package/refs/vbenchmark/.agent/workflows/gather-context.md +58 -0
- package/refs/vbenchmark/.agent/workflows/init.md +56 -0
- package/refs/vbenchmark/.agent/workflows/preset-help.md +50 -0
- package/refs/vbenchmark/.agent/workflows/refactor.md +71 -0
- package/refs/vbenchmark/.agent/workflows/research.md +37 -0
- package/refs/vbenchmark/.agent/workflows/review.md +38 -0
- package/refs/vbenchmark/.agent/workflows/test.md +61 -0
- package/refs/vbenchmark/.claude/commands/agentic-dev/apply.md +222 -0
- package/refs/vbenchmark/.claude/commands/agentic-dev/done.md +166 -0
- package/refs/vbenchmark/.claude/commands/agentic-dev/proposal.md +220 -0
- package/refs/vbenchmark/.claude/commands/openspec/apply.md +23 -0
- package/refs/vbenchmark/.claude/commands/openspec/archive.md +27 -0
- package/refs/vbenchmark/.claude/commands/openspec/proposal.md +28 -0
- package/refs/vbenchmark/.clinerules/01-rules.md +73 -0
- package/refs/vbenchmark/.clinerules/02-agents.md +34 -0
- package/refs/vbenchmark/.cursor/commands/commit.md +29 -0
- package/refs/vbenchmark/.cursor/commands/debug.md +59 -0
- package/refs/vbenchmark/.cursor/commands/document.md +52 -0
- package/refs/vbenchmark/.cursor/commands/gather-context.md +58 -0
- package/refs/vbenchmark/.cursor/commands/init.md +56 -0
- package/refs/vbenchmark/.cursor/commands/preset-help.md +50 -0
- package/refs/vbenchmark/.cursor/commands/refactor.md +71 -0
- package/refs/vbenchmark/.cursor/commands/research.md +37 -0
- package/refs/vbenchmark/.cursor/commands/review.md +38 -0
- package/refs/vbenchmark/.cursor/commands/test.md +61 -0
- package/refs/vbenchmark/.cursor/rules/agents.mdc +1357 -0
- package/refs/vbenchmark/.factory/droids/codebase-explorer.md +224 -0
- package/refs/vbenchmark/.factory/droids/debugger.md +180 -0
- package/refs/vbenchmark/.factory/droids/documenter.md +166 -0
- package/refs/vbenchmark/.factory/droids/implementer.md +70 -0
- package/refs/vbenchmark/.factory/droids/orchestrator.md +212 -0
- package/refs/vbenchmark/.factory/droids/researcher.md +80 -0
- package/refs/vbenchmark/.factory/droids/reviewer.md +184 -0
- package/refs/vbenchmark/.factory/droids/tester.md +170 -0
- package/refs/vbenchmark/.gemini/workflows/commit.md +29 -0
- package/refs/vbenchmark/.gemini/workflows/debug.md +59 -0
- package/refs/vbenchmark/.gemini/workflows/document.md +52 -0
- package/refs/vbenchmark/.gemini/workflows/gather-context.md +58 -0
- package/refs/vbenchmark/.gemini/workflows/init.md +56 -0
- package/refs/vbenchmark/.gemini/workflows/preset-help.md +50 -0
- package/refs/vbenchmark/.gemini/workflows/refactor.md +71 -0
- package/refs/vbenchmark/.gemini/workflows/research.md +37 -0
- package/refs/vbenchmark/.gemini/workflows/review.md +38 -0
- package/refs/vbenchmark/.gemini/workflows/test.md +61 -0
- package/refs/vbenchmark/.github/CODEOWNERS +20 -0
- package/refs/vbenchmark/.github/FUNDING.yml +4 -0
- package/refs/vbenchmark/.github/ISSUE_TEMPLATE/bug-report.yml +76 -0
- package/refs/vbenchmark/.github/ISSUE_TEMPLATE/new-task.yml +106 -0
- package/refs/vbenchmark/.github/PULL_REQUEST_TEMPLATE.md +38 -0
- package/refs/vbenchmark/.github/copilot-instructions.md +73 -0
- package/refs/vbenchmark/.github/workflows/ci.yaml +33 -0
- package/refs/vbenchmark/.github/workflows/vercel-auto-pr.yml +478 -0
- package/refs/vbenchmark/.github/workflows/vercel-deploy.yaml +487 -0
- package/refs/vbenchmark/.github/workflows/vercel-pr-command.yaml +337 -0
- package/refs/vbenchmark/.github/workflows/vercel-project-init.yaml +208 -0
- package/refs/vbenchmark/.opencode/agent/codebase-explorer.md +224 -0
- package/refs/vbenchmark/.opencode/agent/debugger.md +180 -0
- package/refs/vbenchmark/.opencode/agent/documenter.md +166 -0
- package/refs/vbenchmark/.opencode/agent/implementer.md +70 -0
- package/refs/vbenchmark/.opencode/agent/orchestrator.md +212 -0
- package/refs/vbenchmark/.opencode/agent/researcher.md +80 -0
- package/refs/vbenchmark/.opencode/agent/reviewer.md +184 -0
- package/refs/vbenchmark/.opencode/agent/tester.md +170 -0
- package/refs/vbenchmark/.opencode/command/commit.md +29 -0
- package/refs/vbenchmark/.opencode/command/debug.md +59 -0
- package/refs/vbenchmark/.opencode/command/document.md +52 -0
- package/refs/vbenchmark/.opencode/command/gather-context.md +58 -0
- package/refs/vbenchmark/.opencode/command/init.md +56 -0
- package/refs/vbenchmark/.opencode/command/preset-help.md +50 -0
- package/refs/vbenchmark/.opencode/command/refactor.md +71 -0
- package/refs/vbenchmark/.opencode/command/research.md +37 -0
- package/refs/vbenchmark/.opencode/command/review.md +38 -0
- package/refs/vbenchmark/.opencode/command/test.md +61 -0
- package/refs/vbenchmark/.trae/project_rules.md +73 -0
- package/refs/vbenchmark/.windsurf/rules/rules.md +85 -0
- package/refs/vbenchmark/AGENTS.md +73 -0
- package/refs/vbenchmark/CONTRIBUTING.md +332 -0
- package/refs/vbenchmark/Caddyfile +3 -0
- package/refs/vbenchmark/LICENSE +47 -0
- package/refs/vbenchmark/README.md +354 -0
- package/refs/vbenchmark/docker-compose.prod.yaml +35 -0
- package/refs/vbenchmark/docker-compose.yaml +53 -0
- package/refs/vbenchmark/docs/TASK_EXPANSION_PLAN.md +211 -0
- package/refs/vbenchmark/docs/THESIS.md +441 -0
- package/refs/vbenchmark/docs/categories/code-evolution.md +138 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/design.md +111 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/proposal.md +15 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/specs/evaluation/spec.md +105 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/specs/leaderboard/spec.md +68 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/specs/task-definition/spec.md +45 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/specs/task-runner/spec.md +49 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/tasks.md +413 -0
- package/refs/vbenchmark/package.json +51 -0
- package/refs/vbenchmark/packages/cli/eslint.config.js +16 -0
- package/refs/vbenchmark/packages/cli/package.json +35 -0
- package/refs/vbenchmark/packages/cli/src/agents/index.ts +655 -0
- package/refs/vbenchmark/packages/cli/src/commands/eval.ts +197 -0
- package/refs/vbenchmark/packages/cli/src/commands/list.ts +63 -0
- package/refs/vbenchmark/packages/cli/src/commands/run.ts +147 -0
- package/refs/vbenchmark/packages/cli/src/evaluator.ts +125 -0
- package/refs/vbenchmark/packages/cli/src/index.ts +21 -0
- package/refs/vbenchmark/packages/cli/src/lib/task-variation.ts +153 -0
- package/refs/vbenchmark/packages/cli/src/loader.ts +258 -0
- package/refs/vbenchmark/packages/cli/src/reporter.ts +222 -0
- package/refs/vbenchmark/packages/cli/src/runtime/docker.ts +385 -0
- package/refs/vbenchmark/packages/cli/tsconfig.json +8 -0
- package/refs/vbenchmark/packages/dashboard/Dockerfile +42 -0
- package/refs/vbenchmark/packages/dashboard/index.html +21 -0
- package/refs/vbenchmark/packages/dashboard/package.json +29 -0
- package/refs/vbenchmark/packages/dashboard/postcss.config.js +6 -0
- package/refs/vbenchmark/packages/dashboard/public/favicon.svg +24 -0
- package/refs/vbenchmark/packages/dashboard/public/logo.png +0 -0
- package/refs/vbenchmark/packages/dashboard/public/logo.svg +39 -0
- package/refs/vbenchmark/packages/dashboard/src/App.tsx +1468 -0
- package/refs/vbenchmark/packages/dashboard/src/data/category-performance.json +1 -0
- package/refs/vbenchmark/packages/dashboard/src/data/leaderboard.json +1 -0
- package/refs/vbenchmark/packages/dashboard/src/data/task-results.json +1 -0
- package/refs/vbenchmark/packages/dashboard/src/data/tasks.json +1 -0
- package/refs/vbenchmark/packages/dashboard/src/index.css +3 -0
- package/refs/vbenchmark/packages/dashboard/src/main.tsx +13 -0
- package/refs/vbenchmark/packages/dashboard/src/vite-env.d.ts +9 -0
- package/refs/vbenchmark/packages/dashboard/tailwind.config.js +11 -0
- package/refs/vbenchmark/packages/dashboard/tsconfig.json +21 -0
- package/refs/vbenchmark/packages/dashboard/tsconfig.node.json +11 -0
- package/refs/vbenchmark/packages/dashboard/vercel.json +6 -0
- package/refs/vbenchmark/packages/dashboard/vite.config.ts +28 -0
- package/refs/vbenchmark/packages/evaluator/eslint.config.js +16 -0
- package/refs/vbenchmark/packages/evaluator/package.json +24 -0
- package/refs/vbenchmark/packages/evaluator/src/index.ts +15 -0
- package/refs/vbenchmark/packages/evaluator/src/runners/functional.ts +88 -0
- package/refs/vbenchmark/packages/evaluator/src/runners/quality.ts +140 -0
- package/refs/vbenchmark/packages/evaluator/src/runners/security.ts +94 -0
- package/refs/vbenchmark/packages/evaluator/src/runners/visual.ts +108 -0
- package/refs/vbenchmark/packages/evaluator/src/types.d.ts +19 -0
- package/refs/vbenchmark/packages/evaluator/tsconfig.json +8 -0
- package/refs/vbenchmark/packages/leaderboard/Dockerfile +38 -0
- package/refs/vbenchmark/packages/leaderboard/drizzle.config.ts +10 -0
- package/refs/vbenchmark/packages/leaderboard/eslint.config.js +16 -0
- package/refs/vbenchmark/packages/leaderboard/fly.toml +29 -0
- package/refs/vbenchmark/packages/leaderboard/package.json +36 -0
- package/refs/vbenchmark/packages/leaderboard/src/app.ts +29 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/BrowserPreview.tsx +190 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/ComparisonView.tsx +205 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/LeaderboardTable.tsx +150 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/LiveRunCard.tsx +133 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/SubmissionForm.tsx +406 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/SubmitForm.tsx +293 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/TerminalStream.tsx +111 -0
- package/refs/vbenchmark/packages/leaderboard/src/config/pricing.ts +206 -0
- package/refs/vbenchmark/packages/leaderboard/src/db/index.ts +31 -0
- package/refs/vbenchmark/packages/leaderboard/src/db/schema.ts +125 -0
- package/refs/vbenchmark/packages/leaderboard/src/index.ts +13 -0
- package/refs/vbenchmark/packages/leaderboard/src/lib/websocket.ts +124 -0
- package/refs/vbenchmark/packages/leaderboard/src/routes/leaderboard.ts +698 -0
- package/refs/vbenchmark/packages/leaderboard/src/routes/live.ts +175 -0
- package/refs/vbenchmark/packages/leaderboard/src/routes/submissions.ts +183 -0
- package/refs/vbenchmark/packages/leaderboard/src/routes/tasks.ts +215 -0
- package/refs/vbenchmark/packages/leaderboard/tests/api.test.ts +228 -0
- package/refs/vbenchmark/packages/leaderboard/tsconfig.json +9 -0
- package/refs/vbenchmark/scripts/deploy.sh +70 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/context-management/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/context-management/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/evaluation-framework/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/evaluation-framework/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/guardrails-safety/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/guardrails-safety/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/memory-system/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/memory-system/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/model-routing/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/model-routing/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/multi-agent-system/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/multi-agent-system/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/prompt-optimization/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/prompt-optimization/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/reasoning-chain/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/reasoning-chain/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/streaming-pipeline/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/streaming-pipeline/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/tool-use-orchestration/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/tool-use-orchestration/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/agents/code-review-agent/PROMPT.md +64 -0
- package/refs/vbenchmark/tasks/ai-integration/agents/code-review-agent/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/agents/research-agent/PROMPT.md +61 -0
- package/refs/vbenchmark/tasks/ai-integration/agents/research-agent/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/agents/web-scraper-agent/PROMPT.md +57 -0
- package/refs/vbenchmark/tasks/ai-integration/agents/web-scraper-agent/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/embeddings/duplicate-detection/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/ai-integration/embeddings/duplicate-detection/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/embeddings/recommendation-engine/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/ai-integration/embeddings/recommendation-engine/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/embeddings/semantic-search/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/ai-integration/embeddings/semantic-search/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/fine-tuning/classification-model/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/ai-integration/fine-tuning/classification-model/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/function-calling/api-orchestrator/PROMPT.md +60 -0
- package/refs/vbenchmark/tasks/ai-integration/function-calling/api-orchestrator/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/function-calling/calendar-assistant/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/ai-integration/function-calling/calendar-assistant/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/function-calling/database-query/PROMPT.md +62 -0
- package/refs/vbenchmark/tasks/ai-integration/function-calling/database-query/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/multimodal/chart-interpreter/PROMPT.md +60 -0
- package/refs/vbenchmark/tasks/ai-integration/multimodal/chart-interpreter/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/multimodal/image-captioning/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/ai-integration/multimodal/image-captioning/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/code-assistant/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/code-assistant/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/doc-search/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/doc-search/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/pdf-qa/PROMPT.md +76 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/pdf-qa/docker-compose.yaml +30 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/pdf-qa/task.yaml +30 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/pdf-qa/tests/functional/qa.test.py +146 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/support-bot/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/support-bot/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/contract-analyzer/PROMPT.md +67 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/contract-analyzer/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/invoice-parser/PROMPT.md +61 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/invoice-parser/task.yaml +27 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/receipt-scanner/PROMPT.md +65 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/receipt-scanner/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/resume-parser/PROMPT.md +70 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/resume-parser/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/api-analytics/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/api-analytics/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/api-gateway/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/api-gateway/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/api-mocking/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/api-mocking/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/contract-testing/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/contract-testing/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/graphql-federation/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/graphql-federation/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/grpc-gateway/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/grpc-gateway/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/rate-limiter/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/rate-limiter/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/request-validator/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/request-validator/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/sdk-generator/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/sdk-generator/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/webhook-processor/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/webhook-processor/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/analytics/mixpanel-events/PROMPT.md +42 -0
- package/refs/vbenchmark/tasks/api-integrations/analytics/mixpanel-events/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/analytics/segment-tracking/PROMPT.md +42 -0
- package/refs/vbenchmark/tasks/api-integrations/analytics/segment-tracking/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/auth-provider/oauth2-github/PROMPT.md +42 -0
- package/refs/vbenchmark/tasks/api-integrations/auth-provider/oauth2-github/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/auth-provider/okta-integration/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/api-integrations/auth-provider/okta-integration/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/auth-provider/saml-sso/PROMPT.md +42 -0
- package/refs/vbenchmark/tasks/api-integrations/auth-provider/saml-sso/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/communication/discord-webhook/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/api-integrations/communication/discord-webhook/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/communication/slack-bot/PROMPT.md +42 -0
- package/refs/vbenchmark/tasks/api-integrations/communication/slack-bot/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/communication/twilio-sms/PROMPT.md +42 -0
- package/refs/vbenchmark/tasks/api-integrations/communication/twilio-sms/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/email/transactional/PROMPT.md +82 -0
- package/refs/vbenchmark/tasks/api-integrations/email/transactional/task.yaml +27 -0
- package/refs/vbenchmark/tasks/api-integrations/maps/google-maps-geocoding/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/maps/google-maps-geocoding/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/maps/mapbox-directions/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/maps/mapbox-directions/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/payment/crypto-payments/PROMPT.md +43 -0
- package/refs/vbenchmark/tasks/api-integrations/payment/crypto-payments/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/payment/paypal-integration/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/payment/paypal-integration/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/social/twitter-api/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/social/twitter-api/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/storage/cloudinary-upload/PROMPT.md +43 -0
- package/refs/vbenchmark/tasks/api-integrations/storage/cloudinary-upload/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/storage/gcs-streaming/PROMPT.md +43 -0
- package/refs/vbenchmark/tasks/api-integrations/storage/gcs-streaming/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/storage/s3-presigned-urls/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/storage/s3-presigned-urls/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/checkout-session/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/checkout-session/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/payment-webhook/PROMPT.md +60 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/payment-webhook/docker-compose.yaml +38 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/payment-webhook/task.yaml +31 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/payment-webhook/tests/webhook.test.ts +193 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/subscription-portal/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/subscription-portal/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/api-deprecation/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/api-deprecation/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/ast-refactoring/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/ast-refactoring/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/concurrency-fix/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/concurrency-fix/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/database-schema-migration/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/database-schema-migration/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/dead-code-elimination/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/dead-code-elimination/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/dependency-upgrade/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/dependency-upgrade/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/memory-optimization/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/memory-optimization/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/monorepo-extraction/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/monorepo-extraction/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/performance-profiling/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/performance-profiling/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/type-migration/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/type-migration/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/callback-to-async/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/callback-to-async/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/express-to-fastify/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/express-to-fastify/base-code/src/app.ts +22 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/express-to-fastify/task.yaml +37 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/express-to-fastify/tests/api.test.ts +70 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/flask-to-fastapi/PROMPT.md +46 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/flask-to-fastapi/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/java-to-kotlin/PROMPT.md +45 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/java-to-kotlin/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/jquery-to-react/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/jquery-to-react/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/rest-to-grpc/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/rest-to-grpc/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/performance/async-refactor/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/performance/async-refactor/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/performance/memory-leak-fix/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/performance/memory-leak-fix/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/performance/query-optimization/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/code-evolution/performance/query-optimization/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/class-to-hooks/PROMPT.md +96 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/class-to-hooks/task.yaml +27 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/dependency-injection/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/dependency-injection/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/error-handling/PROMPT.md +48 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/error-handling/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/monolith-to-modules/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/monolith-to-modules/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/orm-migration/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/orm-migration/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/security/secrets-rotation/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/code-evolution/security/secrets-rotation/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/security/sql-injection-fix/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/code-evolution/security/sql-injection-fix/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/security/xss-prevention/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/security/xss-prevention/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/testing/add-unit-tests/PROMPT.md +48 -0
- package/refs/vbenchmark/tasks/code-evolution/testing/add-unit-tests/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/testing/e2e-playwright/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/code-evolution/testing/e2e-playwright/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/testing/pytest-fixtures/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/testing/pytest-fixtures/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/accessibility/keyboard-shortcuts/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/frontend/accessibility/keyboard-shortcuts/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/accessibility/screen-reader-nav/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/frontend/accessibility/screen-reader-nav/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/advanced/canvas-editor/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/canvas-editor/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/micro-frontend/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/micro-frontend/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/offline-first/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/offline-first/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/realtime-collab/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/realtime-collab/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/service-worker/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/service-worker/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/state-machine/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/state-machine/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/virtual-list/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/virtual-list/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/wasm-integration/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/wasm-integration/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/web-worker/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/web-worker/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/webgl-visualization/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/webgl-visualization/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/animation/page-transitions/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/frontend/animation/page-transitions/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/components/data-grid/PROMPT.md +59 -0
- package/refs/vbenchmark/tasks/frontend/components/data-grid/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/components/date-range-picker/PROMPT.md +57 -0
- package/refs/vbenchmark/tasks/frontend/components/date-range-picker/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/components/file-uploader/PROMPT.md +55 -0
- package/refs/vbenchmark/tasks/frontend/components/file-uploader/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/components/form-builder/PROMPT.md +96 -0
- package/refs/vbenchmark/tasks/frontend/components/form-builder/task.yaml +28 -0
- package/refs/vbenchmark/tasks/frontend/components/rich-text-editor/PROMPT.md +45 -0
- package/refs/vbenchmark/tasks/frontend/components/rich-text-editor/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/dashboard-layout/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/dashboard-layout/task.yaml +25 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/landing-page/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/landing-page/task.yaml +25 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/mobile-app-screen/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/mobile-app-screen/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/PROMPT.md +93 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/docker-compose.yaml +23 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/task.yaml +30 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/tests/visual/diff.test.ts +107 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/tests/visual/interaction.test.ts +88 -0
- package/refs/vbenchmark/tasks/frontend/performance/image-lazy-load/PROMPT.md +43 -0
- package/refs/vbenchmark/tasks/frontend/performance/image-lazy-load/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/performance/infinite-scroll/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/frontend/performance/infinite-scroll/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/state-management/collaborative-editor/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/frontend/state-management/collaborative-editor/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/state-management/shopping-cart/PROMPT.md +53 -0
- package/refs/vbenchmark/tasks/frontend/state-management/shopping-cart/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/visualization/chart-dashboard/PROMPT.md +83 -0
- package/refs/vbenchmark/tasks/frontend/visualization/chart-dashboard/task.yaml +28 -0
- package/refs/vbenchmark/tasks/frontend/visualization/gantt-chart/PROMPT.md +57 -0
- package/refs/vbenchmark/tasks/frontend/visualization/gantt-chart/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/visualization/map-dashboard/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/frontend/visualization/map-dashboard/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/visualization/realtime-charts/PROMPT.md +43 -0
- package/refs/vbenchmark/tasks/frontend/visualization/realtime-charts/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/blue-green-deploy/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/blue-green-deploy/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/canary-release/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/canary-release/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/change-data-capture/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/change-data-capture/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/config-management/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/config-management/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/data-pipeline/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/data-pipeline/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/distributed-tracing/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/distributed-tracing/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/log-aggregation/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/log-aggregation/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/schema-registry/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/schema-registry/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/secret-rotation/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/secret-rotation/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/stream-processing/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/stream-processing/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/api-sync/rest-to-graphql/PROMPT.md +66 -0
- package/refs/vbenchmark/tasks/glue-code/api-sync/rest-to-graphql/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/caching/redis-cache/PROMPT.md +82 -0
- package/refs/vbenchmark/tasks/glue-code/caching/redis-cache/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/avro-schema-evolution/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/avro-schema-evolution/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/csv-normalizer/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/csv-normalizer/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/excel-to-json/PROMPT.md +67 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/excel-to-json/task.yaml +28 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/excel-to-json/tests/transform.test.py +137 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/json-to-xml/PROMPT.md +45 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/json-to-xml/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/protobuf-converter/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/protobuf-converter/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/etl/cdc-pipeline/PROMPT.md +52 -0
- package/refs/vbenchmark/tasks/glue-code/etl/cdc-pipeline/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/etl/database-sync/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/glue-code/etl/database-sync/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/etl/s3-to-warehouse/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/glue-code/etl/s3-to-warehouse/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/file-processing/image-resizer/PROMPT.md +52 -0
- package/refs/vbenchmark/tasks/glue-code/file-processing/image-resizer/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/file-processing/pdf-merger/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/glue-code/file-processing/pdf-merger/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/file-processing/video-transcoder/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/glue-code/file-processing/video-transcoder/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/migration/data-backfill/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/glue-code/migration/data-backfill/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/migration/database-versioning/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/glue-code/migration/database-versioning/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/queue/kafka-producer/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/glue-code/queue/kafka-producer/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/queue/rabbitmq-consumer/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/glue-code/queue/rabbitmq-consumer/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/queue/sqs-batch-processor/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/glue-code/queue/sqs-batch-processor/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/scheduler/cron-job-manager/PROMPT.md +52 -0
- package/refs/vbenchmark/tasks/glue-code/scheduler/cron-job-manager/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/scheduler/delayed-tasks/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/glue-code/scheduler/delayed-tasks/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/api-versioning/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/api-versioning/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/circuit-breaker/PROMPT.md +13 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/circuit-breaker/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/compliance-gdpr/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/compliance-gdpr/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/cqrs-pattern/PROMPT.md +13 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/cqrs-pattern/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/data-encryption/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/data-encryption/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/distributed-locking/PROMPT.md +46 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/distributed-locking/task.yaml +24 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/event-sourcing/PROMPT.md +23 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/event-sourcing/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/feature-flags-ab/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/feature-flags-ab/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/saga-orchestration/PROMPT.md +13 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/saga-orchestration/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/webhook-delivery/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/webhook-delivery/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/audit/activity-logging/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/saas-core/audit/activity-logging/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/auth/jwt-refresh-tokens/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/saas-core/auth/jwt-refresh-tokens/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/auth/magic-link-email/PROMPT.md +53 -0
- package/refs/vbenchmark/tasks/saas-core/auth/magic-link-email/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/auth/mfa-totp/PROMPT.md +79 -0
- package/refs/vbenchmark/tasks/saas-core/auth/mfa-totp/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/auth/rbac-permissions/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/saas-core/auth/rbac-permissions/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/auth/session-management/PROMPT.md +52 -0
- package/refs/vbenchmark/tasks/saas-core/auth/session-management/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/auth/supabase-oauth/PROMPT.md +45 -0
- package/refs/vbenchmark/tasks/saas-core/auth/supabase-oauth/docker-compose.yaml +47 -0
- package/refs/vbenchmark/tasks/saas-core/auth/supabase-oauth/task.yaml +32 -0
- package/refs/vbenchmark/tasks/saas-core/auth/supabase-oauth/tests/auth.test.ts +59 -0
- package/refs/vbenchmark/tasks/saas-core/billing/invoice-generation/PROMPT.md +53 -0
- package/refs/vbenchmark/tasks/saas-core/billing/invoice-generation/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/billing/stripe-subscriptions/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/saas-core/billing/stripe-subscriptions/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/billing/usage-metering/PROMPT.md +52 -0
- package/refs/vbenchmark/tasks/saas-core/billing/usage-metering/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/crud/dashboard-table/PROMPT.md +48 -0
- package/refs/vbenchmark/tasks/saas-core/crud/dashboard-table/task.yaml +28 -0
- package/refs/vbenchmark/tasks/saas-core/multi-tenant/org-isolation/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/saas-core/multi-tenant/org-isolation/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/multi-tenant/subdomain-routing/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/saas-core/multi-tenant/subdomain-routing/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/notifications/email-queue/PROMPT.md +53 -0
- package/refs/vbenchmark/tasks/saas-core/notifications/email-queue/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/notifications/in-app-alerts/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/saas-core/notifications/in-app-alerts/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/notifications/push-notifications/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/saas-core/notifications/push-notifications/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/realtime/websocket-chat/PROMPT.md +80 -0
- package/refs/vbenchmark/tasks/saas-core/realtime/websocket-chat/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/search/full-text-search/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/saas-core/search/full-text-search/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/security/rate-limiter/PROMPT.md +99 -0
- package/refs/vbenchmark/tasks/saas-core/security/rate-limiter/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/settings/user-preferences/PROMPT.md +78 -0
- package/refs/vbenchmark/tasks/saas-core/settings/user-preferences/task.yaml +27 -0
- package/refs/vbenchmark/templates/fastapi-postgres/docker-compose.yaml +36 -0
- package/refs/vbenchmark/templates/fastapi-postgres/pyproject.toml +34 -0
- package/refs/vbenchmark/templates/fastapi-postgres/src/__init__.py +0 -0
- package/refs/vbenchmark/templates/fastapi-postgres/src/config.py +12 -0
- package/refs/vbenchmark/templates/fastapi-postgres/src/database.py +15 -0
- package/refs/vbenchmark/templates/fastapi-postgres/src/main.py +51 -0
- package/refs/vbenchmark/templates/fastapi-postgres/src/models.py +12 -0
- package/refs/vbenchmark/templates/fastapi-postgres/src/schemas.py +20 -0
- package/refs/vbenchmark/templates/go-fiber/docker-compose.yaml +34 -0
- package/refs/vbenchmark/templates/go-fiber/go.mod +33 -0
- package/refs/vbenchmark/templates/go-fiber/go.sum +68 -0
- package/refs/vbenchmark/templates/go-fiber/main.go +98 -0
- package/refs/vbenchmark/templates/nextjs-supabase/.env.example +3 -0
- package/refs/vbenchmark/templates/nextjs-supabase/docker-compose.yaml +68 -0
- package/refs/vbenchmark/templates/nextjs-supabase/src/app/globals.css +13 -0
- package/refs/vbenchmark/templates/nextjs-supabase/src/app/layout.tsx +19 -0
- package/refs/vbenchmark/templates/nextjs-supabase/src/app/page.tsx +38 -0
- package/refs/vbenchmark/templates/nextjs-supabase/src/lib/supabase/client.ts +8 -0
- package/refs/vbenchmark/templates/nextjs-supabase/src/lib/supabase/server.ts +32 -0
- package/refs/vbenchmark/templates/rust-axum/Cargo.lock +2371 -0
- package/refs/vbenchmark/templates/rust-axum/Cargo.toml +16 -0
- package/refs/vbenchmark/templates/rust-axum/docker-compose.yaml +34 -0
- package/refs/vbenchmark/templates/rust-axum/migrations/20240101000000_init.sql +20 -0
- package/refs/vbenchmark/templates/rust-axum/src/main.rs +121 -0
- package/refs/vbenchmark/tsconfig.base.json +18 -0
- package/refs/vbenchmark/turbo.json +23 -0
- package/refs/vbenchmark/vercel.json +10 -0
|
@@ -0,0 +1,772 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verify — Verification suite, consistency, and health validation
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const { safeReadFile, normalizePhaseName, execGit, findPhaseInternal, getMilestoneInfo, output, error } = require('./core.cjs');
|
|
8
|
+
const { extractFrontmatter, parseMustHavesBlock } = require('./frontmatter.cjs');
|
|
9
|
+
|
|
10
|
+
function cmdVerifySummary(cwd, summaryPath, checkFileCount, raw) {
|
|
11
|
+
if (!summaryPath) {
|
|
12
|
+
error('summary-path required');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const fullPath = path.join(cwd, summaryPath);
|
|
16
|
+
const checkCount = checkFileCount || 2;
|
|
17
|
+
|
|
18
|
+
// Check 1: Summary exists
|
|
19
|
+
if (!fs.existsSync(fullPath)) {
|
|
20
|
+
const result = {
|
|
21
|
+
passed: false,
|
|
22
|
+
checks: {
|
|
23
|
+
summary_exists: false,
|
|
24
|
+
files_created: { checked: 0, found: 0, missing: [] },
|
|
25
|
+
commits_exist: false,
|
|
26
|
+
self_check: 'not_found',
|
|
27
|
+
},
|
|
28
|
+
errors: ['SUMMARY.md not found'],
|
|
29
|
+
};
|
|
30
|
+
output(result, raw, 'failed');
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const content = fs.readFileSync(fullPath, 'utf-8');
|
|
35
|
+
const errors = [];
|
|
36
|
+
|
|
37
|
+
// Check 2: Spot-check files mentioned in summary
|
|
38
|
+
const mentionedFiles = new Set();
|
|
39
|
+
const patterns = [
|
|
40
|
+
/`([^`]+\.[a-zA-Z]+)`/g,
|
|
41
|
+
/(?:Created|Modified|Added|Updated|Edited):\s*`?([^\s`]+\.[a-zA-Z]+)`?/gi,
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
for (const pattern of patterns) {
|
|
45
|
+
let m;
|
|
46
|
+
while ((m = pattern.exec(content)) !== null) {
|
|
47
|
+
const filePath = m[1];
|
|
48
|
+
if (filePath && !filePath.startsWith('http') && filePath.includes('/')) {
|
|
49
|
+
mentionedFiles.add(filePath);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const filesToCheck = Array.from(mentionedFiles).slice(0, checkCount);
|
|
55
|
+
const missing = [];
|
|
56
|
+
for (const file of filesToCheck) {
|
|
57
|
+
if (!fs.existsSync(path.join(cwd, file))) {
|
|
58
|
+
missing.push(file);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Check 3: Commits exist
|
|
63
|
+
const commitHashPattern = /\b[0-9a-f]{7,40}\b/g;
|
|
64
|
+
const hashes = content.match(commitHashPattern) || [];
|
|
65
|
+
let commitsExist = false;
|
|
66
|
+
if (hashes.length > 0) {
|
|
67
|
+
for (const hash of hashes.slice(0, 3)) {
|
|
68
|
+
const result = execGit(cwd, ['cat-file', '-t', hash]);
|
|
69
|
+
if (result.exitCode === 0 && result.stdout === 'commit') {
|
|
70
|
+
commitsExist = true;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Check 4: Self-check section
|
|
77
|
+
let selfCheck = 'not_found';
|
|
78
|
+
const selfCheckPattern = /##\s*(?:Self[- ]?Check|Verification|Quality Check)/i;
|
|
79
|
+
if (selfCheckPattern.test(content)) {
|
|
80
|
+
const passPattern = /(?:all\s+)?(?:pass|✓|✅|complete|succeeded)/i;
|
|
81
|
+
const failPattern = /(?:fail|✗|❌|incomplete|blocked)/i;
|
|
82
|
+
const checkSection = content.slice(content.search(selfCheckPattern));
|
|
83
|
+
if (failPattern.test(checkSection)) {
|
|
84
|
+
selfCheck = 'failed';
|
|
85
|
+
} else if (passPattern.test(checkSection)) {
|
|
86
|
+
selfCheck = 'passed';
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (missing.length > 0) errors.push('Missing files: ' + missing.join(', '));
|
|
91
|
+
if (!commitsExist && hashes.length > 0) errors.push('Referenced commit hashes not found in git history');
|
|
92
|
+
if (selfCheck === 'failed') errors.push('Self-check section indicates failure');
|
|
93
|
+
|
|
94
|
+
const checks = {
|
|
95
|
+
summary_exists: true,
|
|
96
|
+
files_created: { checked: filesToCheck.length, found: filesToCheck.length - missing.length, missing },
|
|
97
|
+
commits_exist: commitsExist,
|
|
98
|
+
self_check: selfCheck,
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const passed = missing.length === 0 && selfCheck !== 'failed';
|
|
102
|
+
const result = { passed, checks, errors };
|
|
103
|
+
output(result, raw, passed ? 'passed' : 'failed');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function cmdVerifyPlanStructure(cwd, filePath, raw) {
|
|
107
|
+
if (!filePath) { error('file path required'); }
|
|
108
|
+
const fullPath = path.isAbsolute(filePath) ? filePath : path.join(cwd, filePath);
|
|
109
|
+
const content = safeReadFile(fullPath);
|
|
110
|
+
if (!content) { output({ error: 'File not found', path: filePath }, raw); return; }
|
|
111
|
+
|
|
112
|
+
const fm = extractFrontmatter(content);
|
|
113
|
+
const errors = [];
|
|
114
|
+
const warnings = [];
|
|
115
|
+
|
|
116
|
+
// Check required frontmatter fields
|
|
117
|
+
const required = ['phase', 'plan', 'type', 'wave', 'depends_on', 'files_modified', 'autonomous', 'must_haves'];
|
|
118
|
+
for (const field of required) {
|
|
119
|
+
if (fm[field] === undefined) errors.push(`Missing required frontmatter field: ${field}`);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Parse and check task elements
|
|
123
|
+
const taskPattern = /<task[^>]*>([\s\S]*?)<\/task>/g;
|
|
124
|
+
const tasks = [];
|
|
125
|
+
let taskMatch;
|
|
126
|
+
while ((taskMatch = taskPattern.exec(content)) !== null) {
|
|
127
|
+
const taskContent = taskMatch[1];
|
|
128
|
+
const nameMatch = taskContent.match(/<name>([\s\S]*?)<\/name>/);
|
|
129
|
+
const taskName = nameMatch ? nameMatch[1].trim() : 'unnamed';
|
|
130
|
+
const hasFiles = /<files>/.test(taskContent);
|
|
131
|
+
const hasAction = /<action>/.test(taskContent);
|
|
132
|
+
const hasVerify = /<verify>/.test(taskContent);
|
|
133
|
+
const hasDone = /<done>/.test(taskContent);
|
|
134
|
+
|
|
135
|
+
if (!nameMatch) errors.push('Task missing <name> element');
|
|
136
|
+
if (!hasAction) errors.push(`Task '${taskName}' missing <action>`);
|
|
137
|
+
if (!hasVerify) warnings.push(`Task '${taskName}' missing <verify>`);
|
|
138
|
+
if (!hasDone) warnings.push(`Task '${taskName}' missing <done>`);
|
|
139
|
+
if (!hasFiles) warnings.push(`Task '${taskName}' missing <files>`);
|
|
140
|
+
|
|
141
|
+
tasks.push({ name: taskName, hasFiles, hasAction, hasVerify, hasDone });
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (tasks.length === 0) warnings.push('No <task> elements found');
|
|
145
|
+
|
|
146
|
+
// Wave/depends_on consistency
|
|
147
|
+
if (fm.wave && parseInt(fm.wave) > 1 && (!fm.depends_on || (Array.isArray(fm.depends_on) && fm.depends_on.length === 0))) {
|
|
148
|
+
warnings.push('Wave > 1 but depends_on is empty');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Autonomous/checkpoint consistency
|
|
152
|
+
const hasCheckpoints = /<task\s+type=["']?checkpoint/.test(content);
|
|
153
|
+
if (hasCheckpoints && fm.autonomous !== 'false' && fm.autonomous !== false) {
|
|
154
|
+
errors.push('Has checkpoint tasks but autonomous is not false');
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
output({
|
|
158
|
+
valid: errors.length === 0,
|
|
159
|
+
errors,
|
|
160
|
+
warnings,
|
|
161
|
+
task_count: tasks.length,
|
|
162
|
+
tasks,
|
|
163
|
+
frontmatter_fields: Object.keys(fm),
|
|
164
|
+
}, raw, errors.length === 0 ? 'valid' : 'invalid');
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function cmdVerifyPhaseCompleteness(cwd, phase, raw) {
|
|
168
|
+
if (!phase) { error('phase required'); }
|
|
169
|
+
const phaseInfo = findPhaseInternal(cwd, phase);
|
|
170
|
+
if (!phaseInfo || !phaseInfo.found) {
|
|
171
|
+
output({ error: 'Phase not found', phase }, raw);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const errors = [];
|
|
176
|
+
const warnings = [];
|
|
177
|
+
const phaseDir = path.join(cwd, phaseInfo.directory);
|
|
178
|
+
|
|
179
|
+
// List plans and summaries
|
|
180
|
+
let files;
|
|
181
|
+
try { files = fs.readdirSync(phaseDir); } catch { output({ error: 'Cannot read phase directory' }, raw); return; }
|
|
182
|
+
|
|
183
|
+
const plans = files.filter(f => f.match(/-PLAN\.md$/i));
|
|
184
|
+
const summaries = files.filter(f => f.match(/-SUMMARY\.md$/i));
|
|
185
|
+
|
|
186
|
+
// Extract plan IDs (everything before -PLAN.md)
|
|
187
|
+
const planIds = new Set(plans.map(p => p.replace(/-PLAN\.md$/i, '')));
|
|
188
|
+
const summaryIds = new Set(summaries.map(s => s.replace(/-SUMMARY\.md$/i, '')));
|
|
189
|
+
|
|
190
|
+
// Plans without summaries
|
|
191
|
+
const incompletePlans = [...planIds].filter(id => !summaryIds.has(id));
|
|
192
|
+
if (incompletePlans.length > 0) {
|
|
193
|
+
errors.push(`Plans without summaries: ${incompletePlans.join(', ')}`);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Summaries without plans (orphans)
|
|
197
|
+
const orphanSummaries = [...summaryIds].filter(id => !planIds.has(id));
|
|
198
|
+
if (orphanSummaries.length > 0) {
|
|
199
|
+
warnings.push(`Summaries without plans: ${orphanSummaries.join(', ')}`);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
output({
|
|
203
|
+
complete: errors.length === 0,
|
|
204
|
+
phase: phaseInfo.phase_number,
|
|
205
|
+
plan_count: plans.length,
|
|
206
|
+
summary_count: summaries.length,
|
|
207
|
+
incomplete_plans: incompletePlans,
|
|
208
|
+
orphan_summaries: orphanSummaries,
|
|
209
|
+
errors,
|
|
210
|
+
warnings,
|
|
211
|
+
}, raw, errors.length === 0 ? 'complete' : 'incomplete');
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function cmdVerifyReferences(cwd, filePath, raw) {
|
|
215
|
+
if (!filePath) { error('file path required'); }
|
|
216
|
+
const fullPath = path.isAbsolute(filePath) ? filePath : path.join(cwd, filePath);
|
|
217
|
+
const content = safeReadFile(fullPath);
|
|
218
|
+
if (!content) { output({ error: 'File not found', path: filePath }, raw); return; }
|
|
219
|
+
|
|
220
|
+
const found = [];
|
|
221
|
+
const missing = [];
|
|
222
|
+
|
|
223
|
+
// Find @-references: @path/to/file (must contain / to be a file path)
|
|
224
|
+
const atRefs = content.match(/@([^\s\n,)]+\/[^\s\n,)]+)/g) || [];
|
|
225
|
+
for (const ref of atRefs) {
|
|
226
|
+
const cleanRef = ref.slice(1); // remove @
|
|
227
|
+
const resolved = cleanRef.startsWith('~/')
|
|
228
|
+
? path.join(process.env.HOME || '', cleanRef.slice(2))
|
|
229
|
+
: path.join(cwd, cleanRef);
|
|
230
|
+
if (fs.existsSync(resolved)) {
|
|
231
|
+
found.push(cleanRef);
|
|
232
|
+
} else {
|
|
233
|
+
missing.push(cleanRef);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Find backtick file paths that look like real paths (contain / and have extension)
|
|
238
|
+
const backtickRefs = content.match(/`([^`]+\/[^`]+\.[a-zA-Z]{1,10})`/g) || [];
|
|
239
|
+
for (const ref of backtickRefs) {
|
|
240
|
+
const cleanRef = ref.slice(1, -1); // remove backticks
|
|
241
|
+
if (cleanRef.startsWith('http') || cleanRef.includes('${') || cleanRef.includes('{{')) continue;
|
|
242
|
+
if (found.includes(cleanRef) || missing.includes(cleanRef)) continue; // dedup
|
|
243
|
+
const resolved = path.join(cwd, cleanRef);
|
|
244
|
+
if (fs.existsSync(resolved)) {
|
|
245
|
+
found.push(cleanRef);
|
|
246
|
+
} else {
|
|
247
|
+
missing.push(cleanRef);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
output({
|
|
252
|
+
valid: missing.length === 0,
|
|
253
|
+
found: found.length,
|
|
254
|
+
missing,
|
|
255
|
+
total: found.length + missing.length,
|
|
256
|
+
}, raw, missing.length === 0 ? 'valid' : 'invalid');
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
function cmdVerifyCommits(cwd, hashes, raw) {
|
|
260
|
+
if (!hashes || hashes.length === 0) { error('At least one commit hash required'); }
|
|
261
|
+
|
|
262
|
+
const valid = [];
|
|
263
|
+
const invalid = [];
|
|
264
|
+
for (const hash of hashes) {
|
|
265
|
+
const result = execGit(cwd, ['cat-file', '-t', hash]);
|
|
266
|
+
if (result.exitCode === 0 && result.stdout.trim() === 'commit') {
|
|
267
|
+
valid.push(hash);
|
|
268
|
+
} else {
|
|
269
|
+
invalid.push(hash);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
output({
|
|
274
|
+
all_valid: invalid.length === 0,
|
|
275
|
+
valid,
|
|
276
|
+
invalid,
|
|
277
|
+
total: hashes.length,
|
|
278
|
+
}, raw, invalid.length === 0 ? 'valid' : 'invalid');
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function cmdVerifyArtifacts(cwd, planFilePath, raw) {
|
|
282
|
+
if (!planFilePath) { error('plan file path required'); }
|
|
283
|
+
const fullPath = path.isAbsolute(planFilePath) ? planFilePath : path.join(cwd, planFilePath);
|
|
284
|
+
const content = safeReadFile(fullPath);
|
|
285
|
+
if (!content) { output({ error: 'File not found', path: planFilePath }, raw); return; }
|
|
286
|
+
|
|
287
|
+
const artifacts = parseMustHavesBlock(content, 'artifacts');
|
|
288
|
+
if (artifacts.length === 0) {
|
|
289
|
+
output({ error: 'No must_haves.artifacts found in frontmatter', path: planFilePath }, raw);
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
const results = [];
|
|
294
|
+
for (const artifact of artifacts) {
|
|
295
|
+
if (typeof artifact === 'string') continue; // skip simple string items
|
|
296
|
+
const artPath = artifact.path;
|
|
297
|
+
if (!artPath) continue;
|
|
298
|
+
|
|
299
|
+
const artFullPath = path.join(cwd, artPath);
|
|
300
|
+
const exists = fs.existsSync(artFullPath);
|
|
301
|
+
const check = { path: artPath, exists, issues: [], passed: false };
|
|
302
|
+
|
|
303
|
+
if (exists) {
|
|
304
|
+
const fileContent = safeReadFile(artFullPath) || '';
|
|
305
|
+
const lineCount = fileContent.split('\n').length;
|
|
306
|
+
|
|
307
|
+
if (artifact.min_lines && lineCount < artifact.min_lines) {
|
|
308
|
+
check.issues.push(`Only ${lineCount} lines, need ${artifact.min_lines}`);
|
|
309
|
+
}
|
|
310
|
+
if (artifact.contains && !fileContent.includes(artifact.contains)) {
|
|
311
|
+
check.issues.push(`Missing pattern: ${artifact.contains}`);
|
|
312
|
+
}
|
|
313
|
+
if (artifact.exports) {
|
|
314
|
+
const exports = Array.isArray(artifact.exports) ? artifact.exports : [artifact.exports];
|
|
315
|
+
for (const exp of exports) {
|
|
316
|
+
if (!fileContent.includes(exp)) check.issues.push(`Missing export: ${exp}`);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
check.passed = check.issues.length === 0;
|
|
320
|
+
} else {
|
|
321
|
+
check.issues.push('File not found');
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
results.push(check);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
const passed = results.filter(r => r.passed).length;
|
|
328
|
+
output({
|
|
329
|
+
all_passed: passed === results.length,
|
|
330
|
+
passed,
|
|
331
|
+
total: results.length,
|
|
332
|
+
artifacts: results,
|
|
333
|
+
}, raw, passed === results.length ? 'valid' : 'invalid');
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
function cmdVerifyKeyLinks(cwd, planFilePath, raw) {
|
|
337
|
+
if (!planFilePath) { error('plan file path required'); }
|
|
338
|
+
const fullPath = path.isAbsolute(planFilePath) ? planFilePath : path.join(cwd, planFilePath);
|
|
339
|
+
const content = safeReadFile(fullPath);
|
|
340
|
+
if (!content) { output({ error: 'File not found', path: planFilePath }, raw); return; }
|
|
341
|
+
|
|
342
|
+
const keyLinks = parseMustHavesBlock(content, 'key_links');
|
|
343
|
+
if (keyLinks.length === 0) {
|
|
344
|
+
output({ error: 'No must_haves.key_links found in frontmatter', path: planFilePath }, raw);
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const results = [];
|
|
349
|
+
for (const link of keyLinks) {
|
|
350
|
+
if (typeof link === 'string') continue;
|
|
351
|
+
const check = { from: link.from, to: link.to, via: link.via || '', verified: false, detail: '' };
|
|
352
|
+
|
|
353
|
+
const sourceContent = safeReadFile(path.join(cwd, link.from || ''));
|
|
354
|
+
if (!sourceContent) {
|
|
355
|
+
check.detail = 'Source file not found';
|
|
356
|
+
} else if (link.pattern) {
|
|
357
|
+
try {
|
|
358
|
+
const regex = new RegExp(link.pattern);
|
|
359
|
+
if (regex.test(sourceContent)) {
|
|
360
|
+
check.verified = true;
|
|
361
|
+
check.detail = 'Pattern found in source';
|
|
362
|
+
} else {
|
|
363
|
+
const targetContent = safeReadFile(path.join(cwd, link.to || ''));
|
|
364
|
+
if (targetContent && regex.test(targetContent)) {
|
|
365
|
+
check.verified = true;
|
|
366
|
+
check.detail = 'Pattern found in target';
|
|
367
|
+
} else {
|
|
368
|
+
check.detail = `Pattern "${link.pattern}" not found in source or target`;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
} catch {
|
|
372
|
+
check.detail = `Invalid regex pattern: ${link.pattern}`;
|
|
373
|
+
}
|
|
374
|
+
} else {
|
|
375
|
+
// No pattern: just check source references target
|
|
376
|
+
if (sourceContent.includes(link.to || '')) {
|
|
377
|
+
check.verified = true;
|
|
378
|
+
check.detail = 'Target referenced in source';
|
|
379
|
+
} else {
|
|
380
|
+
check.detail = 'Target not referenced in source';
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
results.push(check);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
const verified = results.filter(r => r.verified).length;
|
|
388
|
+
output({
|
|
389
|
+
all_verified: verified === results.length,
|
|
390
|
+
verified,
|
|
391
|
+
total: results.length,
|
|
392
|
+
links: results,
|
|
393
|
+
}, raw, verified === results.length ? 'valid' : 'invalid');
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
function cmdValidateConsistency(cwd, raw) {
|
|
397
|
+
const roadmapPath = path.join(cwd, '.planning', 'ROADMAP.md');
|
|
398
|
+
const phasesDir = path.join(cwd, '.planning', 'phases');
|
|
399
|
+
const errors = [];
|
|
400
|
+
const warnings = [];
|
|
401
|
+
|
|
402
|
+
// Check for ROADMAP
|
|
403
|
+
if (!fs.existsSync(roadmapPath)) {
|
|
404
|
+
errors.push('ROADMAP.md not found');
|
|
405
|
+
output({ passed: false, errors, warnings }, raw, 'failed');
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
const roadmapContent = fs.readFileSync(roadmapPath, 'utf-8');
|
|
410
|
+
|
|
411
|
+
// Extract phases from ROADMAP
|
|
412
|
+
const roadmapPhases = new Set();
|
|
413
|
+
const phasePattern = /#{2,4}\s*Phase\s+(\d+[A-Z]?(?:\.\d+)*)\s*:/gi;
|
|
414
|
+
let m;
|
|
415
|
+
while ((m = phasePattern.exec(roadmapContent)) !== null) {
|
|
416
|
+
roadmapPhases.add(m[1]);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// Get phases on disk
|
|
420
|
+
const diskPhases = new Set();
|
|
421
|
+
try {
|
|
422
|
+
const entries = fs.readdirSync(phasesDir, { withFileTypes: true });
|
|
423
|
+
const dirs = entries.filter(e => e.isDirectory()).map(e => e.name);
|
|
424
|
+
for (const dir of dirs) {
|
|
425
|
+
const dm = dir.match(/^(\d+[A-Z]?(?:\.\d+)*)/i);
|
|
426
|
+
if (dm) diskPhases.add(dm[1]);
|
|
427
|
+
}
|
|
428
|
+
} catch {}
|
|
429
|
+
|
|
430
|
+
// Check: phases in ROADMAP but not on disk
|
|
431
|
+
for (const p of roadmapPhases) {
|
|
432
|
+
if (!diskPhases.has(p) && !diskPhases.has(normalizePhaseName(p))) {
|
|
433
|
+
warnings.push(`Phase ${p} in ROADMAP.md but no directory on disk`);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// Check: phases on disk but not in ROADMAP
|
|
438
|
+
for (const p of diskPhases) {
|
|
439
|
+
const unpadded = String(parseInt(p, 10));
|
|
440
|
+
if (!roadmapPhases.has(p) && !roadmapPhases.has(unpadded)) {
|
|
441
|
+
warnings.push(`Phase ${p} exists on disk but not in ROADMAP.md`);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// Check: sequential phase numbers (integers only)
|
|
446
|
+
const integerPhases = [...diskPhases]
|
|
447
|
+
.filter(p => !p.includes('.'))
|
|
448
|
+
.map(p => parseInt(p, 10))
|
|
449
|
+
.sort((a, b) => a - b);
|
|
450
|
+
|
|
451
|
+
for (let i = 1; i < integerPhases.length; i++) {
|
|
452
|
+
if (integerPhases[i] !== integerPhases[i - 1] + 1) {
|
|
453
|
+
warnings.push(`Gap in phase numbering: ${integerPhases[i - 1]} → ${integerPhases[i]}`);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
// Check: plan numbering within phases
|
|
458
|
+
try {
|
|
459
|
+
const entries = fs.readdirSync(phasesDir, { withFileTypes: true });
|
|
460
|
+
const dirs = entries.filter(e => e.isDirectory()).map(e => e.name).sort();
|
|
461
|
+
|
|
462
|
+
for (const dir of dirs) {
|
|
463
|
+
const phaseFiles = fs.readdirSync(path.join(phasesDir, dir));
|
|
464
|
+
const plans = phaseFiles.filter(f => f.endsWith('-PLAN.md')).sort();
|
|
465
|
+
|
|
466
|
+
// Extract plan numbers
|
|
467
|
+
const planNums = plans.map(p => {
|
|
468
|
+
const pm = p.match(/-(\d{2})-PLAN\.md$/);
|
|
469
|
+
return pm ? parseInt(pm[1], 10) : null;
|
|
470
|
+
}).filter(n => n !== null);
|
|
471
|
+
|
|
472
|
+
for (let i = 1; i < planNums.length; i++) {
|
|
473
|
+
if (planNums[i] !== planNums[i - 1] + 1) {
|
|
474
|
+
warnings.push(`Gap in plan numbering in ${dir}: plan ${planNums[i - 1]} → ${planNums[i]}`);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// Check: plans without summaries (completed plans)
|
|
479
|
+
const summaries = phaseFiles.filter(f => f.endsWith('-SUMMARY.md'));
|
|
480
|
+
const planIds = new Set(plans.map(p => p.replace('-PLAN.md', '')));
|
|
481
|
+
const summaryIds = new Set(summaries.map(s => s.replace('-SUMMARY.md', '')));
|
|
482
|
+
|
|
483
|
+
// Summary without matching plan is suspicious
|
|
484
|
+
for (const sid of summaryIds) {
|
|
485
|
+
if (!planIds.has(sid)) {
|
|
486
|
+
warnings.push(`Summary ${sid}-SUMMARY.md in ${dir} has no matching PLAN.md`);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
} catch {}
|
|
491
|
+
|
|
492
|
+
// Check: frontmatter in plans has required fields
|
|
493
|
+
try {
|
|
494
|
+
const entries = fs.readdirSync(phasesDir, { withFileTypes: true });
|
|
495
|
+
const dirs = entries.filter(e => e.isDirectory()).map(e => e.name);
|
|
496
|
+
|
|
497
|
+
for (const dir of dirs) {
|
|
498
|
+
const phaseFiles = fs.readdirSync(path.join(phasesDir, dir));
|
|
499
|
+
const plans = phaseFiles.filter(f => f.endsWith('-PLAN.md'));
|
|
500
|
+
|
|
501
|
+
for (const plan of plans) {
|
|
502
|
+
const content = fs.readFileSync(path.join(phasesDir, dir, plan), 'utf-8');
|
|
503
|
+
const fm = extractFrontmatter(content);
|
|
504
|
+
|
|
505
|
+
if (!fm.wave) {
|
|
506
|
+
warnings.push(`${dir}/${plan}: missing 'wave' in frontmatter`);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
} catch {}
|
|
511
|
+
|
|
512
|
+
const passed = errors.length === 0;
|
|
513
|
+
output({ passed, errors, warnings, warning_count: warnings.length }, raw, passed ? 'passed' : 'failed');
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
function cmdValidateHealth(cwd, options, raw) {
|
|
517
|
+
const planningDir = path.join(cwd, '.planning');
|
|
518
|
+
const projectPath = path.join(planningDir, 'PROJECT.md');
|
|
519
|
+
const roadmapPath = path.join(planningDir, 'ROADMAP.md');
|
|
520
|
+
const statePath = path.join(planningDir, 'STATE.md');
|
|
521
|
+
const configPath = path.join(planningDir, 'config.json');
|
|
522
|
+
const phasesDir = path.join(planningDir, 'phases');
|
|
523
|
+
|
|
524
|
+
const errors = [];
|
|
525
|
+
const warnings = [];
|
|
526
|
+
const info = [];
|
|
527
|
+
const repairs = [];
|
|
528
|
+
|
|
529
|
+
// Helper to add issue
|
|
530
|
+
const addIssue = (severity, code, message, fix, repairable = false) => {
|
|
531
|
+
const issue = { code, message, fix, repairable };
|
|
532
|
+
if (severity === 'error') errors.push(issue);
|
|
533
|
+
else if (severity === 'warning') warnings.push(issue);
|
|
534
|
+
else info.push(issue);
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
// ─── Check 1: .planning/ exists ───────────────────────────────────────────
|
|
538
|
+
if (!fs.existsSync(planningDir)) {
|
|
539
|
+
addIssue('error', 'E001', '.planning/ directory not found', 'Run /gsd:new-project to initialize');
|
|
540
|
+
output({
|
|
541
|
+
status: 'broken',
|
|
542
|
+
errors,
|
|
543
|
+
warnings,
|
|
544
|
+
info,
|
|
545
|
+
repairable_count: 0,
|
|
546
|
+
}, raw);
|
|
547
|
+
return;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// ─── Check 2: PROJECT.md exists and has required sections ─────────────────
|
|
551
|
+
if (!fs.existsSync(projectPath)) {
|
|
552
|
+
addIssue('error', 'E002', 'PROJECT.md not found', 'Run /gsd:new-project to create');
|
|
553
|
+
} else {
|
|
554
|
+
const content = fs.readFileSync(projectPath, 'utf-8');
|
|
555
|
+
const requiredSections = ['## What This Is', '## Core Value', '## Requirements'];
|
|
556
|
+
for (const section of requiredSections) {
|
|
557
|
+
if (!content.includes(section)) {
|
|
558
|
+
addIssue('warning', 'W001', `PROJECT.md missing section: ${section}`, 'Add section manually');
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// ─── Check 3: ROADMAP.md exists ───────────────────────────────────────────
|
|
564
|
+
if (!fs.existsSync(roadmapPath)) {
|
|
565
|
+
addIssue('error', 'E003', 'ROADMAP.md not found', 'Run /gsd:new-milestone to create roadmap');
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
// ─── Check 4: STATE.md exists and references valid phases ─────────────────
|
|
569
|
+
if (!fs.existsSync(statePath)) {
|
|
570
|
+
addIssue('error', 'E004', 'STATE.md not found', 'Run /gsd:health --repair to regenerate', true);
|
|
571
|
+
repairs.push('regenerateState');
|
|
572
|
+
} else {
|
|
573
|
+
const stateContent = fs.readFileSync(statePath, 'utf-8');
|
|
574
|
+
// Extract phase references from STATE.md
|
|
575
|
+
const phaseRefs = [...stateContent.matchAll(/[Pp]hase\s+(\d+(?:\.\d+)*)/g)].map(m => m[1]);
|
|
576
|
+
// Get disk phases
|
|
577
|
+
const diskPhases = new Set();
|
|
578
|
+
try {
|
|
579
|
+
const entries = fs.readdirSync(phasesDir, { withFileTypes: true });
|
|
580
|
+
for (const e of entries) {
|
|
581
|
+
if (e.isDirectory()) {
|
|
582
|
+
const m = e.name.match(/^(\d+(?:\.\d+)*)/);
|
|
583
|
+
if (m) diskPhases.add(m[1]);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
} catch {}
|
|
587
|
+
// Check for invalid references
|
|
588
|
+
for (const ref of phaseRefs) {
|
|
589
|
+
const normalizedRef = String(parseInt(ref, 10)).padStart(2, '0');
|
|
590
|
+
if (!diskPhases.has(ref) && !diskPhases.has(normalizedRef) && !diskPhases.has(String(parseInt(ref, 10)))) {
|
|
591
|
+
// Only warn if phases dir has any content (not just an empty project)
|
|
592
|
+
if (diskPhases.size > 0) {
|
|
593
|
+
addIssue('warning', 'W002', `STATE.md references phase ${ref}, but only phases ${[...diskPhases].sort().join(', ')} exist`, 'Run /gsd:health --repair to regenerate STATE.md', true);
|
|
594
|
+
if (!repairs.includes('regenerateState')) repairs.push('regenerateState');
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
// ─── Check 5: config.json valid JSON + valid schema ───────────────────────
|
|
601
|
+
if (!fs.existsSync(configPath)) {
|
|
602
|
+
addIssue('warning', 'W003', 'config.json not found', 'Run /gsd:health --repair to create with defaults', true);
|
|
603
|
+
repairs.push('createConfig');
|
|
604
|
+
} else {
|
|
605
|
+
try {
|
|
606
|
+
const raw = fs.readFileSync(configPath, 'utf-8');
|
|
607
|
+
const parsed = JSON.parse(raw);
|
|
608
|
+
// Validate known fields
|
|
609
|
+
const validProfiles = ['quality', 'balanced', 'budget'];
|
|
610
|
+
if (parsed.model_profile && !validProfiles.includes(parsed.model_profile)) {
|
|
611
|
+
addIssue('warning', 'W004', `config.json: invalid model_profile "${parsed.model_profile}"`, `Valid values: ${validProfiles.join(', ')}`);
|
|
612
|
+
}
|
|
613
|
+
} catch (err) {
|
|
614
|
+
addIssue('error', 'E005', `config.json: JSON parse error - ${err.message}`, 'Run /gsd:health --repair to reset to defaults', true);
|
|
615
|
+
repairs.push('resetConfig');
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
// ─── Check 6: Phase directory naming (NN-name format) ─────────────────────
|
|
620
|
+
try {
|
|
621
|
+
const entries = fs.readdirSync(phasesDir, { withFileTypes: true });
|
|
622
|
+
for (const e of entries) {
|
|
623
|
+
if (e.isDirectory() && !e.name.match(/^\d{2}(?:\.\d+)*-[\w-]+$/)) {
|
|
624
|
+
addIssue('warning', 'W005', `Phase directory "${e.name}" doesn't follow NN-name format`, 'Rename to match pattern (e.g., 01-setup)');
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
} catch {}
|
|
628
|
+
|
|
629
|
+
// ─── Check 7: Orphaned plans (PLAN without SUMMARY) ───────────────────────
|
|
630
|
+
try {
|
|
631
|
+
const entries = fs.readdirSync(phasesDir, { withFileTypes: true });
|
|
632
|
+
for (const e of entries) {
|
|
633
|
+
if (!e.isDirectory()) continue;
|
|
634
|
+
const phaseFiles = fs.readdirSync(path.join(phasesDir, e.name));
|
|
635
|
+
const plans = phaseFiles.filter(f => f.endsWith('-PLAN.md') || f === 'PLAN.md');
|
|
636
|
+
const summaries = phaseFiles.filter(f => f.endsWith('-SUMMARY.md') || f === 'SUMMARY.md');
|
|
637
|
+
const summaryBases = new Set(summaries.map(s => s.replace('-SUMMARY.md', '').replace('SUMMARY.md', '')));
|
|
638
|
+
|
|
639
|
+
for (const plan of plans) {
|
|
640
|
+
const planBase = plan.replace('-PLAN.md', '').replace('PLAN.md', '');
|
|
641
|
+
if (!summaryBases.has(planBase)) {
|
|
642
|
+
addIssue('info', 'I001', `${e.name}/${plan} has no SUMMARY.md`, 'May be in progress');
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
} catch {}
|
|
647
|
+
|
|
648
|
+
// ─── Check 8: Run existing consistency checks ─────────────────────────────
|
|
649
|
+
// Inline subset of cmdValidateConsistency
|
|
650
|
+
if (fs.existsSync(roadmapPath)) {
|
|
651
|
+
const roadmapContent = fs.readFileSync(roadmapPath, 'utf-8');
|
|
652
|
+
const roadmapPhases = new Set();
|
|
653
|
+
const phasePattern = /#{2,4}\s*Phase\s+(\d+[A-Z]?(?:\.\d+)*)\s*:/gi;
|
|
654
|
+
let m;
|
|
655
|
+
while ((m = phasePattern.exec(roadmapContent)) !== null) {
|
|
656
|
+
roadmapPhases.add(m[1]);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
const diskPhases = new Set();
|
|
660
|
+
try {
|
|
661
|
+
const entries = fs.readdirSync(phasesDir, { withFileTypes: true });
|
|
662
|
+
for (const e of entries) {
|
|
663
|
+
if (e.isDirectory()) {
|
|
664
|
+
const dm = e.name.match(/^(\d+[A-Z]?(?:\.\d+)*)/i);
|
|
665
|
+
if (dm) diskPhases.add(dm[1]);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
} catch {}
|
|
669
|
+
|
|
670
|
+
// Phases in ROADMAP but not on disk
|
|
671
|
+
for (const p of roadmapPhases) {
|
|
672
|
+
const padded = String(parseInt(p, 10)).padStart(2, '0');
|
|
673
|
+
if (!diskPhases.has(p) && !diskPhases.has(padded)) {
|
|
674
|
+
addIssue('warning', 'W006', `Phase ${p} in ROADMAP.md but no directory on disk`, 'Create phase directory or remove from roadmap');
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
// Phases on disk but not in ROADMAP
|
|
679
|
+
for (const p of diskPhases) {
|
|
680
|
+
const unpadded = String(parseInt(p, 10));
|
|
681
|
+
if (!roadmapPhases.has(p) && !roadmapPhases.has(unpadded)) {
|
|
682
|
+
addIssue('warning', 'W007', `Phase ${p} exists on disk but not in ROADMAP.md`, 'Add to roadmap or remove directory');
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
// ─── Perform repairs if requested ─────────────────────────────────────────
|
|
688
|
+
const repairActions = [];
|
|
689
|
+
if (options.repair && repairs.length > 0) {
|
|
690
|
+
for (const repair of repairs) {
|
|
691
|
+
try {
|
|
692
|
+
switch (repair) {
|
|
693
|
+
case 'createConfig':
|
|
694
|
+
case 'resetConfig': {
|
|
695
|
+
const defaults = {
|
|
696
|
+
model_profile: 'balanced',
|
|
697
|
+
commit_docs: true,
|
|
698
|
+
search_gitignored: false,
|
|
699
|
+
branching_strategy: 'none',
|
|
700
|
+
research: true,
|
|
701
|
+
plan_checker: true,
|
|
702
|
+
verifier: true,
|
|
703
|
+
parallelization: true,
|
|
704
|
+
};
|
|
705
|
+
fs.writeFileSync(configPath, JSON.stringify(defaults, null, 2), 'utf-8');
|
|
706
|
+
repairActions.push({ action: repair, success: true, path: 'config.json' });
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
case 'regenerateState': {
|
|
710
|
+
// Create timestamped backup before overwriting
|
|
711
|
+
if (fs.existsSync(statePath)) {
|
|
712
|
+
const timestamp = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
|
|
713
|
+
const backupPath = `${statePath}.bak-${timestamp}`;
|
|
714
|
+
fs.copyFileSync(statePath, backupPath);
|
|
715
|
+
repairActions.push({ action: 'backupState', success: true, path: backupPath });
|
|
716
|
+
}
|
|
717
|
+
// Generate minimal STATE.md from ROADMAP.md structure
|
|
718
|
+
const milestone = getMilestoneInfo(cwd);
|
|
719
|
+
let stateContent = `# Session State\n\n`;
|
|
720
|
+
stateContent += `## Project Reference\n\n`;
|
|
721
|
+
stateContent += `See: .planning/PROJECT.md\n\n`;
|
|
722
|
+
stateContent += `## Position\n\n`;
|
|
723
|
+
stateContent += `**Milestone:** ${milestone.version} ${milestone.name}\n`;
|
|
724
|
+
stateContent += `**Current phase:** (determining...)\n`;
|
|
725
|
+
stateContent += `**Status:** Resuming\n\n`;
|
|
726
|
+
stateContent += `## Session Log\n\n`;
|
|
727
|
+
stateContent += `- ${new Date().toISOString().split('T')[0]}: STATE.md regenerated by /gsd:health --repair\n`;
|
|
728
|
+
fs.writeFileSync(statePath, stateContent, 'utf-8');
|
|
729
|
+
repairActions.push({ action: repair, success: true, path: 'STATE.md' });
|
|
730
|
+
break;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
} catch (err) {
|
|
734
|
+
repairActions.push({ action: repair, success: false, error: err.message });
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
// ─── Determine overall status ─────────────────────────────────────────────
|
|
740
|
+
let status;
|
|
741
|
+
if (errors.length > 0) {
|
|
742
|
+
status = 'broken';
|
|
743
|
+
} else if (warnings.length > 0) {
|
|
744
|
+
status = 'degraded';
|
|
745
|
+
} else {
|
|
746
|
+
status = 'healthy';
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
const repairableCount = errors.filter(e => e.repairable).length +
|
|
750
|
+
warnings.filter(w => w.repairable).length;
|
|
751
|
+
|
|
752
|
+
output({
|
|
753
|
+
status,
|
|
754
|
+
errors,
|
|
755
|
+
warnings,
|
|
756
|
+
info,
|
|
757
|
+
repairable_count: repairableCount,
|
|
758
|
+
repairs_performed: repairActions.length > 0 ? repairActions : undefined,
|
|
759
|
+
}, raw);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
module.exports = {
|
|
763
|
+
cmdVerifySummary,
|
|
764
|
+
cmdVerifyPlanStructure,
|
|
765
|
+
cmdVerifyPhaseCompleteness,
|
|
766
|
+
cmdVerifyReferences,
|
|
767
|
+
cmdVerifyCommits,
|
|
768
|
+
cmdVerifyArtifacts,
|
|
769
|
+
cmdVerifyKeyLinks,
|
|
770
|
+
cmdValidateConsistency,
|
|
771
|
+
cmdValidateHealth,
|
|
772
|
+
};
|