@planu/cli 0.43.0 → 0.44.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/dist/cli/colors.d.ts +14 -0
- package/dist/cli/colors.d.ts.map +1 -0
- package/dist/cli/colors.js +26 -0
- package/dist/cli/colors.js.map +1 -0
- package/dist/cli/commands/audit.d.ts +3 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/audit.js +38 -0
- package/dist/cli/commands/audit.js.map +1 -0
- package/dist/cli/commands/create.d.ts +3 -0
- package/dist/cli/commands/create.d.ts.map +1 -0
- package/dist/cli/commands/create.js +50 -0
- package/dist/cli/commands/create.js.map +1 -0
- package/dist/cli/commands/dashboard.d.ts +3 -0
- package/dist/cli/commands/dashboard.d.ts.map +1 -0
- package/dist/cli/commands/dashboard.js +29 -0
- package/dist/cli/commands/dashboard.js.map +1 -0
- package/dist/cli/commands/estimate.d.ts +3 -0
- package/dist/cli/commands/estimate.d.ts.map +1 -0
- package/dist/cli/commands/estimate.js +36 -0
- package/dist/cli/commands/estimate.js.map +1 -0
- package/dist/cli/commands/handoff.d.ts +3 -0
- package/dist/cli/commands/handoff.d.ts.map +1 -0
- package/dist/cli/commands/handoff.js +49 -0
- package/dist/cli/commands/handoff.js.map +1 -0
- package/dist/cli/commands/init.d.ts +3 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +43 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/list.d.ts +3 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/list.js +36 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +3 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +34 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/status.d.ts +3 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +49 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +3 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +36 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/commands/watch.d.ts +3 -0
- package/dist/cli/commands/watch.d.ts.map +1 -0
- package/dist/cli/commands/watch.js +156 -0
- package/dist/cli/commands/watch.js.map +1 -0
- package/dist/cli/formatter.d.ts +18 -0
- package/dist/cli/formatter.d.ts.map +1 -0
- package/dist/cli/formatter.js +78 -0
- package/dist/cli/formatter.js.map +1 -0
- package/dist/cli/index.d.ts +6 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +7 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/interactive.d.ts +13 -0
- package/dist/cli/interactive.d.ts.map +1 -0
- package/dist/cli/interactive.js +42 -0
- package/dist/cli/interactive.js.map +1 -0
- package/dist/cli/project-detector.d.ts +6 -0
- package/dist/cli/project-detector.d.ts.map +1 -0
- package/dist/cli/project-detector.js +12 -0
- package/dist/cli/project-detector.js.map +1 -0
- package/dist/cli/router.d.ts +5 -0
- package/dist/cli/router.d.ts.map +1 -0
- package/dist/cli/router.js +104 -0
- package/dist/cli/router.js.map +1 -0
- package/dist/config/hook-defaults.json +19 -0
- package/dist/config/license-plans.json +16 -1
- package/dist/config/tool-groups.json +12 -1
- package/dist/engine/analyzer/analyze-project.d.ts +15 -0
- package/dist/engine/analyzer/analyze-project.d.ts.map +1 -0
- package/dist/engine/analyzer/analyze-project.js +101 -0
- package/dist/engine/analyzer/analyze-project.js.map +1 -0
- package/dist/engine/analyzer/completeness-checker.d.ts +6 -0
- package/dist/engine/analyzer/completeness-checker.d.ts.map +1 -0
- package/dist/engine/analyzer/completeness-checker.js +79 -0
- package/dist/engine/analyzer/completeness-checker.js.map +1 -0
- package/dist/engine/analyzer/db-engine.d.ts +9 -0
- package/dist/engine/analyzer/db-engine.d.ts.map +1 -0
- package/dist/engine/analyzer/db-engine.js +137 -0
- package/dist/engine/analyzer/db-engine.js.map +1 -0
- package/dist/engine/analyzer/detectors.d.ts +7 -0
- package/dist/engine/analyzer/detectors.d.ts.map +1 -0
- package/dist/engine/analyzer/detectors.js +234 -0
- package/dist/engine/analyzer/detectors.js.map +1 -0
- package/dist/engine/analyzer/env-setup.d.ts +6 -0
- package/dist/engine/analyzer/env-setup.d.ts.map +1 -0
- package/dist/engine/analyzer/env-setup.js +174 -0
- package/dist/engine/analyzer/env-setup.js.map +1 -0
- package/dist/engine/analyzer/index.d.ts +6 -0
- package/dist/engine/analyzer/index.d.ts.map +1 -0
- package/dist/engine/analyzer/index.js +8 -0
- package/dist/engine/analyzer/index.js.map +1 -0
- package/dist/engine/analyzer-db.d.ts +1 -8
- package/dist/engine/analyzer-db.d.ts.map +1 -1
- package/dist/engine/analyzer-db.js +3 -136
- package/dist/engine/analyzer-db.js.map +1 -1
- package/dist/engine/analyzer-detectors.d.ts +1 -6
- package/dist/engine/analyzer-detectors.d.ts.map +1 -1
- package/dist/engine/analyzer-detectors.js +3 -231
- package/dist/engine/analyzer-detectors.js.map +1 -1
- package/dist/engine/analyzer-env.d.ts +1 -5
- package/dist/engine/analyzer-env.d.ts.map +1 -1
- package/dist/engine/analyzer-env.js +3 -173
- package/dist/engine/analyzer-env.js.map +1 -1
- package/dist/engine/analyzer.d.ts +2 -18
- package/dist/engine/analyzer.d.ts.map +1 -1
- package/dist/engine/analyzer.js +4 -172
- package/dist/engine/analyzer.js.map +1 -1
- package/dist/engine/dashboard/data-loader.d.ts +16 -1
- package/dist/engine/dashboard/data-loader.d.ts.map +1 -1
- package/dist/engine/dashboard/data-loader.js +140 -2
- package/dist/engine/dashboard/data-loader.js.map +1 -1
- package/dist/engine/dashboard/index.d.ts +2 -0
- package/dist/engine/dashboard/index.d.ts.map +1 -1
- package/dist/engine/dashboard/index.js +2 -0
- package/dist/engine/dashboard/index.js.map +1 -1
- package/dist/engine/dashboard/kanban-logic.d.ts +31 -0
- package/dist/engine/dashboard/kanban-logic.d.ts.map +1 -0
- package/dist/engine/dashboard/kanban-logic.js +122 -0
- package/dist/engine/dashboard/kanban-logic.js.map +1 -0
- package/dist/engine/dashboard/routes.d.ts +2 -0
- package/dist/engine/dashboard/routes.d.ts.map +1 -1
- package/dist/engine/dashboard/routes.js +112 -23
- package/dist/engine/dashboard/routes.js.map +1 -1
- package/dist/engine/dashboard/server.d.ts +5 -0
- package/dist/engine/dashboard/server.d.ts.map +1 -1
- package/dist/engine/dashboard/server.js +48 -0
- package/dist/engine/dashboard/server.js.map +1 -1
- package/dist/engine/dashboard/spec-updater.d.ts +8 -0
- package/dist/engine/dashboard/spec-updater.d.ts.map +1 -0
- package/dist/engine/dashboard/spec-updater.js +37 -0
- package/dist/engine/dashboard/spec-updater.js.map +1 -0
- package/dist/engine/dashboard/templates-kanban.d.ts +6 -0
- package/dist/engine/dashboard/templates-kanban.d.ts.map +1 -0
- package/dist/engine/dashboard/templates-kanban.js +100 -0
- package/dist/engine/dashboard/templates-kanban.js.map +1 -0
- package/dist/engine/dashboard/templates-layout.d.ts +3 -3
- package/dist/engine/dashboard/templates-layout.d.ts.map +1 -1
- package/dist/engine/dashboard/templates-layout.js +167 -44
- package/dist/engine/dashboard/templates-layout.js.map +1 -1
- package/dist/engine/dashboard/templates-project.d.ts +1 -1
- package/dist/engine/dashboard/templates-project.d.ts.map +1 -1
- package/dist/engine/dashboard/templates-project.js +109 -3
- package/dist/engine/dashboard/templates-project.js.map +1 -1
- package/dist/engine/dashboard/templates.d.ts +1 -0
- package/dist/engine/dashboard/templates.d.ts.map +1 -1
- package/dist/engine/dashboard/templates.js +1 -0
- package/dist/engine/dashboard/templates.js.map +1 -1
- package/dist/engine/docs-site-generator/spec-renderer.d.ts.map +1 -1
- package/dist/engine/docs-site-generator/spec-renderer.js +2 -1
- package/dist/engine/docs-site-generator/spec-renderer.js.map +1 -1
- package/dist/engine/execution-plan/agent-execution-plan.d.ts.map +1 -1
- package/dist/engine/execution-plan/agent-execution-plan.js +2 -0
- package/dist/engine/execution-plan/agent-execution-plan.js.map +1 -1
- package/dist/engine/hooks/config-loader.d.ts +36 -0
- package/dist/engine/hooks/config-loader.d.ts.map +1 -0
- package/dist/engine/hooks/config-loader.js +142 -0
- package/dist/engine/hooks/config-loader.js.map +1 -0
- package/dist/engine/hooks/debouncer.d.ts +30 -0
- package/dist/engine/hooks/debouncer.d.ts.map +1 -0
- package/dist/engine/hooks/debouncer.js +124 -0
- package/dist/engine/hooks/debouncer.js.map +1 -0
- package/dist/engine/hooks/event-bus.d.ts +40 -0
- package/dist/engine/hooks/event-bus.d.ts.map +1 -0
- package/dist/engine/hooks/event-bus.js +83 -0
- package/dist/engine/hooks/event-bus.js.map +1 -0
- package/dist/engine/hooks/file-watcher.d.ts +48 -0
- package/dist/engine/hooks/file-watcher.d.ts.map +1 -0
- package/dist/engine/hooks/file-watcher.js +193 -0
- package/dist/engine/hooks/file-watcher.js.map +1 -0
- package/dist/engine/hooks/handlers/on-commit.d.ts +26 -0
- package/dist/engine/hooks/handlers/on-commit.d.ts.map +1 -0
- package/dist/engine/hooks/handlers/on-commit.js +198 -0
- package/dist/engine/hooks/handlers/on-commit.js.map +1 -0
- package/dist/engine/hooks/handlers/on-create.d.ts +8 -0
- package/dist/engine/hooks/handlers/on-create.d.ts.map +1 -0
- package/dist/engine/hooks/handlers/on-create.js +30 -0
- package/dist/engine/hooks/handlers/on-create.js.map +1 -0
- package/dist/engine/hooks/handlers/on-delete.d.ts +9 -0
- package/dist/engine/hooks/handlers/on-delete.d.ts.map +1 -0
- package/dist/engine/hooks/handlers/on-delete.js +33 -0
- package/dist/engine/hooks/handlers/on-delete.js.map +1 -0
- package/dist/engine/hooks/handlers/on-save.d.ts +29 -0
- package/dist/engine/hooks/handlers/on-save.d.ts.map +1 -0
- package/dist/engine/hooks/handlers/on-save.js +118 -0
- package/dist/engine/hooks/handlers/on-save.js.map +1 -0
- package/dist/engine/hooks/handlers/on-test-pass.d.ts +33 -0
- package/dist/engine/hooks/handlers/on-test-pass.d.ts.map +1 -0
- package/dist/engine/hooks/handlers/on-test-pass.js +103 -0
- package/dist/engine/hooks/handlers/on-test-pass.js.map +1 -0
- package/dist/engine/hooks/hook-engine.d.ts +50 -0
- package/dist/engine/hooks/hook-engine.d.ts.map +1 -0
- package/dist/engine/hooks/hook-engine.js +159 -0
- package/dist/engine/hooks/hook-engine.js.map +1 -0
- package/dist/engine/hooks/index.d.ts +10 -0
- package/dist/engine/hooks/index.d.ts.map +1 -1
- package/dist/engine/hooks/index.js +12 -0
- package/dist/engine/hooks/index.js.map +1 -1
- package/dist/engine/living-spec/annotation-parser.d.ts +18 -0
- package/dist/engine/living-spec/annotation-parser.d.ts.map +1 -0
- package/dist/engine/living-spec/annotation-parser.js +105 -0
- package/dist/engine/living-spec/annotation-parser.js.map +1 -0
- package/dist/engine/living-spec/auto-reconciler.d.ts +28 -0
- package/dist/engine/living-spec/auto-reconciler.d.ts.map +1 -0
- package/dist/engine/living-spec/auto-reconciler.js +103 -0
- package/dist/engine/living-spec/auto-reconciler.js.map +1 -0
- package/dist/engine/living-spec/bidirectional-sync.d.ts +26 -0
- package/dist/engine/living-spec/bidirectional-sync.d.ts.map +1 -0
- package/dist/engine/living-spec/bidirectional-sync.js +160 -0
- package/dist/engine/living-spec/bidirectional-sync.js.map +1 -0
- package/dist/engine/living-spec/dashboard-collector.d.ts +22 -0
- package/dist/engine/living-spec/dashboard-collector.d.ts.map +1 -0
- package/dist/engine/living-spec/dashboard-collector.js +97 -0
- package/dist/engine/living-spec/dashboard-collector.js.map +1 -0
- package/dist/engine/living-spec/drift-watcher.d.ts +15 -0
- package/dist/engine/living-spec/drift-watcher.d.ts.map +1 -0
- package/dist/engine/living-spec/drift-watcher.js +126 -0
- package/dist/engine/living-spec/drift-watcher.js.map +1 -0
- package/dist/engine/living-spec/hash-tracker.d.ts +24 -0
- package/dist/engine/living-spec/hash-tracker.d.ts.map +1 -0
- package/dist/engine/living-spec/hash-tracker.js +123 -0
- package/dist/engine/living-spec/hash-tracker.js.map +1 -0
- package/dist/engine/living-spec/index.d.ts +9 -0
- package/dist/engine/living-spec/index.d.ts.map +1 -0
- package/dist/engine/living-spec/index.js +10 -0
- package/dist/engine/living-spec/index.js.map +1 -0
- package/dist/engine/living-spec/signature-tracker.d.ts +18 -0
- package/dist/engine/living-spec/signature-tracker.d.ts.map +1 -0
- package/dist/engine/living-spec/signature-tracker.js +136 -0
- package/dist/engine/living-spec/signature-tracker.js.map +1 -0
- package/dist/engine/living-spec/test-coverage-correlator.d.ts +22 -0
- package/dist/engine/living-spec/test-coverage-correlator.d.ts.map +1 -0
- package/dist/engine/living-spec/test-coverage-correlator.js +130 -0
- package/dist/engine/living-spec/test-coverage-correlator.js.map +1 -0
- package/dist/engine/llm-providers/cost-tracker.d.ts.map +1 -1
- package/dist/engine/llm-providers/cost-tracker.js +1 -0
- package/dist/engine/llm-providers/cost-tracker.js.map +1 -1
- package/dist/engine/llm-providers/load-balancer.d.ts.map +1 -1
- package/dist/engine/llm-providers/load-balancer.js +3 -0
- package/dist/engine/llm-providers/load-balancer.js.map +1 -1
- package/dist/engine/plugins/extensions/tool-extension.d.ts.map +1 -1
- package/dist/engine/plugins/extensions/tool-extension.js +1 -0
- package/dist/engine/plugins/extensions/tool-extension.js.map +1 -1
- package/dist/engine/plugins/extensions/worker-extension.d.ts.map +1 -1
- package/dist/engine/plugins/extensions/worker-extension.js +3 -1
- package/dist/engine/plugins/extensions/worker-extension.js.map +1 -1
- package/dist/engine/plugins/loader.d.ts.map +1 -1
- package/dist/engine/plugins/loader.js +3 -0
- package/dist/engine/plugins/loader.js.map +1 -1
- package/dist/engine/safety/file-mutex.d.ts.map +1 -1
- package/dist/engine/safety/file-mutex.js +3 -0
- package/dist/engine/safety/file-mutex.js.map +1 -1
- package/dist/engine/safety/health-monitor.d.ts.map +1 -1
- package/dist/engine/safety/health-monitor.js +3 -0
- package/dist/engine/safety/health-monitor.js.map +1 -1
- package/dist/engine/safety/transaction.d.ts.map +1 -1
- package/dist/engine/safety/transaction.js +3 -0
- package/dist/engine/safety/transaction.js.map +1 -1
- package/dist/engine/spec-templates/custom-loader.d.ts.map +1 -1
- package/dist/engine/spec-templates/custom-loader.js +1 -0
- package/dist/engine/spec-templates/custom-loader.js.map +1 -1
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -1
- package/dist/storage/hash-snapshot-store.d.ts +18 -0
- package/dist/storage/hash-snapshot-store.d.ts.map +1 -0
- package/dist/storage/hash-snapshot-store.js +43 -0
- package/dist/storage/hash-snapshot-store.js.map +1 -0
- package/dist/storage/index.d.ts +3 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +3 -0
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/living-dashboard-store.d.ts +10 -0
- package/dist/storage/living-dashboard-store.d.ts.map +1 -0
- package/dist/storage/living-dashboard-store.js +31 -0
- package/dist/storage/living-dashboard-store.js.map +1 -0
- package/dist/storage/sync-log-store.d.ts +26 -0
- package/dist/storage/sync-log-store.d.ts.map +1 -0
- package/dist/storage/sync-log-store.js +60 -0
- package/dist/storage/sync-log-store.js.map +1 -0
- package/dist/tools/auto-reconcile.d.ts +3 -0
- package/dist/tools/auto-reconcile.d.ts.map +1 -0
- package/dist/tools/auto-reconcile.js +81 -0
- package/dist/tools/auto-reconcile.js.map +1 -0
- package/dist/tools/challenge-spec/platform-challenge-scenarios-b2.d.ts.map +1 -1
- package/dist/tools/challenge-spec/platform-challenge-scenarios-b2.js +6 -0
- package/dist/tools/challenge-spec/platform-challenge-scenarios-b2.js.map +1 -1
- package/dist/tools/create-spec/spec-builder.js +2 -0
- package/dist/tools/create-spec/spec-builder.js.map +1 -1
- package/dist/tools/dashboard.d.ts.map +1 -1
- package/dist/tools/dashboard.js +20 -13
- package/dist/tools/dashboard.js.map +1 -1
- package/dist/tools/generate-annotations.d.ts +3 -0
- package/dist/tools/generate-annotations.d.ts.map +1 -0
- package/dist/tools/generate-annotations.js +70 -0
- package/dist/tools/generate-annotations.js.map +1 -0
- package/dist/tools/generate-execution-plan.d.ts.map +1 -1
- package/dist/tools/generate-execution-plan.js +1 -0
- package/dist/tools/generate-execution-plan.js.map +1 -1
- package/dist/tools/github-pr-handler.d.ts.map +1 -1
- package/dist/tools/github-pr-handler.js +1 -0
- package/dist/tools/github-pr-handler.js.map +1 -1
- package/dist/tools/github-review-handler.d.ts.map +1 -1
- package/dist/tools/github-review-handler.js +1 -0
- package/dist/tools/github-review-handler.js.map +1 -1
- package/dist/tools/ide-config-handler.d.ts.map +1 -1
- package/dist/tools/ide-config-handler.js +3 -0
- package/dist/tools/ide-config-handler.js.map +1 -1
- package/dist/tools/init-project/handler.d.ts.map +1 -1
- package/dist/tools/init-project/handler.js +0 -3
- package/dist/tools/init-project/handler.js.map +1 -1
- package/dist/tools/living-spec-coverage.d.ts +3 -0
- package/dist/tools/living-spec-coverage.d.ts.map +1 -0
- package/dist/tools/living-spec-coverage.js +100 -0
- package/dist/tools/living-spec-coverage.js.map +1 -0
- package/dist/tools/living-spec-watch.d.ts +4 -0
- package/dist/tools/living-spec-watch.d.ts.map +1 -0
- package/dist/tools/living-spec-watch.js +94 -0
- package/dist/tools/living-spec-watch.js.map +1 -0
- package/dist/tools/manage-plugins-handler.d.ts.map +1 -1
- package/dist/tools/manage-plugins-handler.js +2 -1
- package/dist/tools/manage-plugins-handler.js.map +1 -1
- package/dist/tools/orchestrate-distribution.d.ts.map +1 -1
- package/dist/tools/orchestrate-distribution.js +1 -0
- package/dist/tools/orchestrate-distribution.js.map +1 -1
- package/dist/tools/orchestrate-runtime.js +2 -0
- package/dist/tools/orchestrate-runtime.js.map +1 -1
- package/dist/tools/plan-team-distribution.d.ts.map +1 -1
- package/dist/tools/plan-team-distribution.js +2 -0
- package/dist/tools/plan-team-distribution.js.map +1 -1
- package/dist/tools/register-dashboard-tools.d.ts.map +1 -1
- package/dist/tools/register-dashboard-tools.js +5 -1
- package/dist/tools/register-dashboard-tools.js.map +1 -1
- package/dist/tools/register-hooks-tools.d.ts.map +1 -1
- package/dist/tools/register-hooks-tools.js +82 -1
- package/dist/tools/register-hooks-tools.js.map +1 -1
- package/dist/tools/register-living-spec-advanced-tools.d.ts +6 -0
- package/dist/tools/register-living-spec-advanced-tools.d.ts.map +1 -0
- package/dist/tools/register-living-spec-advanced-tools.js +113 -0
- package/dist/tools/register-living-spec-advanced-tools.js.map +1 -0
- package/dist/tools/register-living-spec-tools.d.ts +6 -0
- package/dist/tools/register-living-spec-tools.d.ts.map +1 -0
- package/dist/tools/register-living-spec-tools.js +67 -0
- package/dist/tools/register-living-spec-tools.js.map +1 -0
- package/dist/tools/resolve-sync-conflict.d.ts +3 -0
- package/dist/tools/resolve-sync-conflict.d.ts.map +1 -0
- package/dist/tools/resolve-sync-conflict.js +38 -0
- package/dist/tools/resolve-sync-conflict.js.map +1 -0
- package/dist/tools/snapshot-spec-hashes.d.ts +3 -0
- package/dist/tools/snapshot-spec-hashes.d.ts.map +1 -0
- package/dist/tools/snapshot-spec-hashes.js +100 -0
- package/dist/tools/snapshot-spec-hashes.js.map +1 -0
- package/dist/tools/spec-diff.d.ts +3 -0
- package/dist/tools/spec-diff.d.ts.map +1 -0
- package/dist/tools/spec-diff.js +58 -0
- package/dist/tools/spec-diff.js.map +1 -0
- package/dist/tools/start-hooks.d.ts +17 -0
- package/dist/tools/start-hooks.d.ts.map +1 -0
- package/dist/tools/start-hooks.js +209 -0
- package/dist/tools/start-hooks.js.map +1 -0
- package/dist/tools/suggest-tooling/catalog-loader.d.ts.map +1 -1
- package/dist/tools/suggest-tooling/catalog-loader.js +1 -0
- package/dist/tools/suggest-tooling/catalog-loader.js.map +1 -1
- package/dist/tools/sync-code-to-spec.d.ts +3 -0
- package/dist/tools/sync-code-to-spec.d.ts.map +1 -0
- package/dist/tools/sync-code-to-spec.js +51 -0
- package/dist/tools/sync-code-to-spec.js.map +1 -0
- package/dist/tools/sync-spec-to-code.d.ts +3 -0
- package/dist/tools/sync-spec-to-code.d.ts.map +1 -0
- package/dist/tools/sync-spec-to-code.js +58 -0
- package/dist/tools/sync-spec-to-code.js.map +1 -0
- package/dist/tools/validate-annotations.d.ts +3 -0
- package/dist/tools/validate-annotations.d.ts.map +1 -0
- package/dist/tools/validate-annotations.js +90 -0
- package/dist/tools/validate-annotations.js.map +1 -0
- package/dist/types/cli.d.ts +14 -0
- package/dist/types/cli.d.ts.map +1 -0
- package/dist/types/cli.js +3 -0
- package/dist/types/cli.js.map +1 -0
- package/dist/types/dashboard.d.ts +86 -1
- package/dist/types/dashboard.d.ts.map +1 -1
- package/dist/types/file-hooks.d.ts +230 -0
- package/dist/types/file-hooks.d.ts.map +1 -0
- package/dist/types/file-hooks.js +3 -0
- package/dist/types/file-hooks.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/living-spec.d.ts +382 -0
- package/dist/types/living-spec.d.ts.map +1 -0
- package/dist/types/living-spec.js +3 -0
- package/dist/types/living-spec.js.map +1 -0
- package/package.json +1 -1
- package/src/config/hook-defaults.json +19 -0
- package/src/config/license-plans.json +16 -1
- package/src/config/tool-groups.json +12 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer-detectors.js","sourceRoot":"","sources":["../../src/engine/analyzer-detectors.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"analyzer-detectors.js","sourceRoot":"","sources":["../../src/engine/analyzer-detectors.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,4DAA4D;AAC5D,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,GACd,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function analyzeEnvSetup(projectPath: string, projectId: string): Promise<EnvSetupGuide>;
|
|
3
|
-
export declare function discoverMcps(projectPath: string): Promise<McpServerInfo[]>;
|
|
4
|
-
export declare function buildStackList(language: string, framework: string | null, database: DatabaseEngine, packageManager: string | null): string[];
|
|
5
|
-
export declare function buildQualityProfile(linting: LintingAnalysis, conventions: Record<string, string>): QualityProfile;
|
|
1
|
+
export { analyzeEnvSetup, discoverMcps, buildStackList, buildQualityProfile, } from './analyzer/env-setup.js';
|
|
6
2
|
//# sourceMappingURL=analyzer-env.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer-env.d.ts","sourceRoot":"","sources":["../../src/engine/analyzer-env.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analyzer-env.d.ts","sourceRoot":"","sources":["../../src/engine/analyzer-env.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,cAAc,EACd,mBAAmB,GACpB,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,174 +1,4 @@
|
|
|
1
|
-
// Planu — Analyzer
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
import { join } from 'node:path';
|
|
5
|
-
import { fileExists } from './detection-utils.js';
|
|
6
|
-
// === Env Setup Analysis ===
|
|
7
|
-
export async function analyzeEnvSetup(projectPath, projectId) {
|
|
8
|
-
const variables = [];
|
|
9
|
-
const issues = [];
|
|
10
|
-
for (const envFile of ['.env.example', '.env.local.example', '.env.sample']) {
|
|
11
|
-
try {
|
|
12
|
-
const content = await readFile(join(projectPath, envFile), 'utf-8');
|
|
13
|
-
const parsed = parseEnvFile(content);
|
|
14
|
-
variables.push(...parsed);
|
|
15
|
-
break;
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
// File doesn't exist
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
const gitignoreHasEnv = await checkGitignoreForEnv(projectPath);
|
|
22
|
-
const noEnvInGit = !(await fileExists(projectPath, '.env'));
|
|
23
|
-
if (!gitignoreHasEnv) {
|
|
24
|
-
issues.push({
|
|
25
|
-
severity: 'critical',
|
|
26
|
-
issue: '.env files are not in .gitignore',
|
|
27
|
-
fix: 'Add .env* to .gitignore immediately',
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
const security = {
|
|
31
|
-
gitignoreHasEnv,
|
|
32
|
-
noSecretsInCode: true,
|
|
33
|
-
noEnvInGit,
|
|
34
|
-
noSecretsInLogs: true,
|
|
35
|
-
usesSecretManager: false,
|
|
36
|
-
issues,
|
|
37
|
-
};
|
|
38
|
-
const missing = variables.filter((v) => v.required);
|
|
39
|
-
return { projectId, variables, missing, security, setupSteps: [] };
|
|
40
|
-
}
|
|
41
|
-
function parseEnvFile(content) {
|
|
42
|
-
const variables = [];
|
|
43
|
-
for (const line of content.split('\n')) {
|
|
44
|
-
const trimmed = line.trim();
|
|
45
|
-
if (!trimmed || trimmed.startsWith('#')) {
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
const eqIndex = trimmed.indexOf('=');
|
|
49
|
-
if (eqIndex === -1) {
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
const name = trimmed.substring(0, eqIndex).trim();
|
|
53
|
-
const value = trimmed.substring(eqIndex + 1).trim();
|
|
54
|
-
const sensitive = /secret|key|password|token|api_key|private/i.test(name);
|
|
55
|
-
variables.push({
|
|
56
|
-
name,
|
|
57
|
-
service: inferServiceFromEnvName(name),
|
|
58
|
-
required: true,
|
|
59
|
-
sensitive,
|
|
60
|
-
description: '',
|
|
61
|
-
howToGet: '',
|
|
62
|
-
exampleValue: value || undefined,
|
|
63
|
-
environments: ['development', 'staging', 'production'],
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
return variables;
|
|
67
|
-
}
|
|
68
|
-
function inferServiceFromEnvName(name) {
|
|
69
|
-
const upper = name.toUpperCase();
|
|
70
|
-
if (upper.includes('SUPABASE')) {
|
|
71
|
-
return 'supabase';
|
|
72
|
-
}
|
|
73
|
-
if (upper.includes('STRIPE')) {
|
|
74
|
-
return 'stripe';
|
|
75
|
-
}
|
|
76
|
-
if (upper.includes('FIREBASE')) {
|
|
77
|
-
return 'firebase';
|
|
78
|
-
}
|
|
79
|
-
if (upper.includes('AWS')) {
|
|
80
|
-
return 'aws';
|
|
81
|
-
}
|
|
82
|
-
if (upper.includes('DATABASE') || upper.includes('DB_')) {
|
|
83
|
-
return 'database';
|
|
84
|
-
}
|
|
85
|
-
if (upper.includes('REDIS')) {
|
|
86
|
-
return 'redis';
|
|
87
|
-
}
|
|
88
|
-
if (upper.includes('SENTRY')) {
|
|
89
|
-
return 'sentry';
|
|
90
|
-
}
|
|
91
|
-
if (upper.includes('GITHUB')) {
|
|
92
|
-
return 'github';
|
|
93
|
-
}
|
|
94
|
-
if (upper.includes('OPENAI') || upper.includes('ANTHROPIC')) {
|
|
95
|
-
return 'ai';
|
|
96
|
-
}
|
|
97
|
-
return 'app';
|
|
98
|
-
}
|
|
99
|
-
async function checkGitignoreForEnv(projectPath) {
|
|
100
|
-
try {
|
|
101
|
-
const content = await readFile(join(projectPath, '.gitignore'), 'utf-8');
|
|
102
|
-
return content.includes('.env');
|
|
103
|
-
}
|
|
104
|
-
catch {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
// === MCP Discovery ===
|
|
109
|
-
export async function discoverMcps(projectPath) {
|
|
110
|
-
const mcps = [];
|
|
111
|
-
const mcpConfigPaths = [
|
|
112
|
-
join(projectPath, '.claude', 'settings.json'),
|
|
113
|
-
join(projectPath, '.claude', 'settings.local.json'),
|
|
114
|
-
];
|
|
115
|
-
for (const configPath of mcpConfigPaths) {
|
|
116
|
-
try {
|
|
117
|
-
const content = await readFile(configPath, 'utf-8');
|
|
118
|
-
const config = JSON.parse(content);
|
|
119
|
-
if (config.mcpServers && typeof config.mcpServers === 'object') {
|
|
120
|
-
for (const [name, serverConfig] of Object.entries(config.mcpServers)) {
|
|
121
|
-
const sc = serverConfig;
|
|
122
|
-
mcps.push({
|
|
123
|
-
name,
|
|
124
|
-
command: typeof sc.command === 'string' ? sc.command : '',
|
|
125
|
-
tools: Array.isArray(sc.tools) ? sc.tools : [],
|
|
126
|
-
relevantFor: [],
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
catch {
|
|
132
|
-
// Config doesn't exist or is invalid
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return mcps;
|
|
136
|
-
}
|
|
137
|
-
// === Stack and Quality Helpers ===
|
|
138
|
-
export function buildStackList(language, framework, database, packageManager) {
|
|
139
|
-
const stack = [language];
|
|
140
|
-
if (framework) {
|
|
141
|
-
stack.push(framework);
|
|
142
|
-
}
|
|
143
|
-
if (database !== 'unknown') {
|
|
144
|
-
stack.push(database);
|
|
145
|
-
}
|
|
146
|
-
if (packageManager) {
|
|
147
|
-
stack.push(packageManager);
|
|
148
|
-
}
|
|
149
|
-
return stack;
|
|
150
|
-
}
|
|
151
|
-
export function buildQualityProfile(linting, conventions) {
|
|
152
|
-
const enabledCategories = [
|
|
153
|
-
'solid',
|
|
154
|
-
'clean-code',
|
|
155
|
-
'architecture',
|
|
156
|
-
'security',
|
|
157
|
-
'error-handling',
|
|
158
|
-
];
|
|
159
|
-
const principles = ['SOLID', 'Clean Code', 'Fail Fast', 'DRY'];
|
|
160
|
-
let strictness = 'standard';
|
|
161
|
-
// Auto-configure based on project rules
|
|
162
|
-
if (conventions['ai-rules'] ?? conventions['commit-convention']) {
|
|
163
|
-
strictness = 'strict';
|
|
164
|
-
}
|
|
165
|
-
if (linting.maturityScore >= 80) {
|
|
166
|
-
enabledCategories.push('testing', 'performance');
|
|
167
|
-
}
|
|
168
|
-
const configuredLinterCount = linting.detectedLinters.filter((l) => l.status === 'configured').length;
|
|
169
|
-
if (configuredLinterCount >= 3) {
|
|
170
|
-
strictness = 'strict';
|
|
171
|
-
}
|
|
172
|
-
return { enabledCategories, customRules: [], principles, strictness };
|
|
173
|
-
}
|
|
1
|
+
// Planu — Analyzer Env barrel re-export (SOLID split)
|
|
2
|
+
// Implementation moved to src/engine/analyzer/ subdirectory
|
|
3
|
+
export { analyzeEnvSetup, discoverMcps, buildStackList, buildQualityProfile, } from './analyzer/env-setup.js';
|
|
174
4
|
//# sourceMappingURL=analyzer-env.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer-env.js","sourceRoot":"","sources":["../../src/engine/analyzer-env.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"analyzer-env.js","sourceRoot":"","sources":["../../src/engine/analyzer-env.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,4DAA4D;AAC5D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,cAAc,EACd,mBAAmB,GACpB,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Full project analysis: scans filesystem to build ProjectKnowledge.
|
|
4
|
-
*/
|
|
5
|
-
export declare function analyzeProject(projectPath: string, projectId: string, locale?: SupportedLocale, experienceLevel?: ExperienceLevel, stackSignatures?: StackSignatures, archPatterns?: ArchPatternsFile): Promise<ProjectKnowledge>;
|
|
6
|
-
/**
|
|
7
|
-
* Quick analysis: only detects language, framework, and package manager.
|
|
8
|
-
*/
|
|
9
|
-
export declare function quickAnalyze(projectPath: string): Promise<{
|
|
10
|
-
language: string;
|
|
11
|
-
framework: string | null;
|
|
12
|
-
packageManager: string | null;
|
|
13
|
-
database: DatabaseEngine;
|
|
14
|
-
}>;
|
|
15
|
-
/**
|
|
16
|
-
* Check project completeness (has readme, gitignore, tests, ci, etc.)
|
|
17
|
-
*/
|
|
18
|
-
export declare function checkProjectCompleteness(projectPath: string): Promise<ProjectCompleteness>;
|
|
1
|
+
export { analyzeProject, quickAnalyze } from './analyzer/analyze-project.js';
|
|
2
|
+
export { checkProjectCompleteness } from './analyzer/completeness-checker.js';
|
|
19
3
|
//# sourceMappingURL=analyzer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../src/engine/analyzer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../src/engine/analyzer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC"}
|
package/dist/engine/analyzer.js
CHANGED
|
@@ -1,173 +1,5 @@
|
|
|
1
|
-
// Planu —
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { detectFramework, detectFrameworkVersion, detectDatabase, detectOrm, detectPackageManager, detectBuildCommand, detectTestCommand, detectLintCommand, } from './framework-detector.js';
|
|
6
|
-
import { detectArchitecture } from './architecture-detector.js';
|
|
7
|
-
import { detectApps, isMonorepoProject, detectApiContracts } from './multi-app-detector.js';
|
|
8
|
-
import { detectProjectCategory } from './platform-detector.js';
|
|
9
|
-
import { analyzeEnvSetup, discoverMcps, buildStackList, buildQualityProfile, } from './analyzer-env.js';
|
|
10
|
-
import { detectAgentProjectKnowledge } from './detectors/agent-framework-detector.js';
|
|
11
|
-
import { analyzeLinting, detectConventions, detectEnvironments, detectExternalServices, detectTooling, } from './analyzer-detectors.js';
|
|
12
|
-
// === Public API ===
|
|
13
|
-
/**
|
|
14
|
-
* Full project analysis: scans filesystem to build ProjectKnowledge.
|
|
15
|
-
*/
|
|
16
|
-
export async function analyzeProject(projectPath, projectId, locale = 'en', experienceLevel = 'intermediate', stackSignatures, archPatterns) {
|
|
17
|
-
const signatures = stackSignatures ?? (await loadStackSignatures());
|
|
18
|
-
const archConfig = archPatterns ?? (await loadArchPatterns());
|
|
19
|
-
const [language, framework, packageManager, database, orm, apps, architecture, linting, envSetup, apiContracts, mcps, conventions, monorepo, _completeness,] = await Promise.all([
|
|
20
|
-
detectLanguage(projectPath, signatures),
|
|
21
|
-
detectFramework(projectPath, signatures),
|
|
22
|
-
detectPackageManager(projectPath, signatures),
|
|
23
|
-
detectDatabase(projectPath, signatures),
|
|
24
|
-
detectOrm(projectPath),
|
|
25
|
-
detectApps(projectPath, signatures, archConfig),
|
|
26
|
-
detectArchitecture(projectPath, archConfig),
|
|
27
|
-
analyzeLinting(projectPath),
|
|
28
|
-
analyzeEnvSetup(projectPath, projectId),
|
|
29
|
-
detectApiContracts(projectPath),
|
|
30
|
-
discoverMcps(projectPath),
|
|
31
|
-
detectConventions(projectPath),
|
|
32
|
-
isMonorepoProject(projectPath),
|
|
33
|
-
checkProjectCompleteness(projectPath),
|
|
34
|
-
]);
|
|
35
|
-
const [languageVersion, frameworkVersion, buildCommand, testCommand, lintCommand, externalServices, tooling, environments, projectCategory, agentKnowledge,] = await Promise.all([
|
|
36
|
-
detectLanguageVersion(projectPath, language),
|
|
37
|
-
detectFrameworkVersion(projectPath, framework, signatures),
|
|
38
|
-
detectBuildCommand(projectPath, packageManager),
|
|
39
|
-
detectTestCommand(projectPath, packageManager),
|
|
40
|
-
detectLintCommand(projectPath, packageManager),
|
|
41
|
-
detectExternalServices(projectPath),
|
|
42
|
-
detectTooling(projectPath),
|
|
43
|
-
detectEnvironments(projectPath),
|
|
44
|
-
detectProjectCategory(projectPath, framework),
|
|
45
|
-
detectAgentProjectKnowledge(projectPath),
|
|
46
|
-
]);
|
|
47
|
-
const stack = buildStackList(language, framework, database, packageManager);
|
|
48
|
-
const layers = architecture.layers.map((l) => l.name);
|
|
49
|
-
const qualityProfile = buildQualityProfile(linting, conventions);
|
|
50
|
-
return {
|
|
51
|
-
projectId,
|
|
52
|
-
projectPath,
|
|
53
|
-
locale,
|
|
54
|
-
experienceLevel,
|
|
55
|
-
language,
|
|
56
|
-
languageVersion,
|
|
57
|
-
framework,
|
|
58
|
-
frameworkVersion,
|
|
59
|
-
packageManager,
|
|
60
|
-
buildCommand,
|
|
61
|
-
testCommand,
|
|
62
|
-
lintCommand,
|
|
63
|
-
stack,
|
|
64
|
-
database,
|
|
65
|
-
orm,
|
|
66
|
-
architecture,
|
|
67
|
-
apps,
|
|
68
|
-
conventions,
|
|
69
|
-
layers,
|
|
70
|
-
environments,
|
|
71
|
-
apiContracts,
|
|
72
|
-
monorepo,
|
|
73
|
-
externalServices,
|
|
74
|
-
tooling,
|
|
75
|
-
specLocation: 'planu/specs',
|
|
76
|
-
envSetup,
|
|
77
|
-
linting,
|
|
78
|
-
availableMcps: mcps,
|
|
79
|
-
docsRegistry: {},
|
|
80
|
-
qualityProfile,
|
|
81
|
-
lastAnalyzed: new Date().toISOString(),
|
|
82
|
-
projectCategory,
|
|
83
|
-
agentKnowledge: agentKnowledge.framework !== null ? agentKnowledge : undefined,
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Quick analysis: only detects language, framework, and package manager.
|
|
88
|
-
*/
|
|
89
|
-
export async function quickAnalyze(projectPath) {
|
|
90
|
-
const signatures = await loadStackSignatures();
|
|
91
|
-
const [language, framework, packageManager, database] = await Promise.all([
|
|
92
|
-
detectLanguage(projectPath, signatures),
|
|
93
|
-
detectFramework(projectPath, signatures),
|
|
94
|
-
detectPackageManager(projectPath, signatures),
|
|
95
|
-
detectDatabase(projectPath, signatures),
|
|
96
|
-
]);
|
|
97
|
-
return { language, framework, packageManager, database };
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Check project completeness (has readme, gitignore, tests, ci, etc.)
|
|
101
|
-
*/
|
|
102
|
-
export async function checkProjectCompleteness(projectPath) {
|
|
103
|
-
const checks = await Promise.all([
|
|
104
|
-
fileExists(projectPath, 'README.md'),
|
|
105
|
-
fileExists(projectPath, '.gitignore'),
|
|
106
|
-
fileExists(projectPath, '.env.example').then((r) => r || fileExists(projectPath, '.env.local.example')),
|
|
107
|
-
fileExists(projectPath, 'LICENSE'),
|
|
108
|
-
fileExists(projectPath, '.editorconfig'),
|
|
109
|
-
hasAnyFile(projectPath, [
|
|
110
|
-
'.eslintrc*',
|
|
111
|
-
'eslint.config.*',
|
|
112
|
-
'biome.json',
|
|
113
|
-
'.pylintrc',
|
|
114
|
-
'ruff.toml',
|
|
115
|
-
'.golangci.yml',
|
|
116
|
-
'Cargo.toml',
|
|
117
|
-
]),
|
|
118
|
-
hasAnyFile(projectPath, ['.prettierrc*', 'biome.json', '.editorconfig']),
|
|
119
|
-
hasAnyFile(projectPath, [
|
|
120
|
-
'jest.config.*',
|
|
121
|
-
'vitest.config.*',
|
|
122
|
-
'pytest.ini',
|
|
123
|
-
'pyproject.toml',
|
|
124
|
-
'Cargo.toml',
|
|
125
|
-
'*.test.*',
|
|
126
|
-
'*.spec.*',
|
|
127
|
-
]),
|
|
128
|
-
hasAnyFile(projectPath, [
|
|
129
|
-
'.github/workflows/*',
|
|
130
|
-
'.gitlab-ci.yml',
|
|
131
|
-
'Jenkinsfile',
|
|
132
|
-
'.circleci/config.yml',
|
|
133
|
-
]),
|
|
134
|
-
hasAnyFile(projectPath, ['sentry.*.config.*', '.sentryclirc', 'bugsnag.*']),
|
|
135
|
-
hasAnyFile(projectPath, ['tsconfig.json', 'mypy.ini', 'pyrightconfig.json', '.flowconfig']),
|
|
136
|
-
hasAnyFile(projectPath, ['.snyk', '.trivyignore', 'security.md', 'SECURITY.md']),
|
|
137
|
-
hasAnyFile(projectPath, ['docs/**/*.md', 'doc/**/*', 'documentation/**/*']),
|
|
138
|
-
fileExists(projectPath, 'CONTRIBUTING.md'),
|
|
139
|
-
hasAnyFile(projectPath, ['CHANGELOG.md', '.changeset/*', '.releaserc*']),
|
|
140
|
-
hasAnyFile(projectPath, ['backup*', 'docker-compose.yml']),
|
|
141
|
-
hasAnyFile(projectPath, ['*.a11y.*', 'axe*', 'pa11y*']),
|
|
142
|
-
hasAnyFile(projectPath, ['robots.txt', 'sitemap.xml', 'next-sitemap.config.*']),
|
|
143
|
-
hasAnyFile(projectPath, ['lighthouse*', 'bundle-analyzer*', 'webpack-bundle*']),
|
|
144
|
-
hasAnyFile(projectPath, ['seed.*', 'seeds/*', 'fixtures/*', 'prisma/seed.*']),
|
|
145
|
-
]);
|
|
146
|
-
const [hasReadme, hasGitignore, hasEnvExample, hasLicense, hasEditorConfig, hasLinting, hasFormatting, hasTesting, hasCiCd, hasErrorTracking, hasTypeChecking, hasSecurityScanning, hasDocumentation, hasContributing, hasChangelogStrategy, hasBackupStrategy, hasAccessibility, hasSeo, hasPerformanceBudget, hasSeedData,] = checks;
|
|
147
|
-
const trueCount = checks.filter(Boolean).length;
|
|
148
|
-
const completenessScore = Math.round((trueCount / checks.length) * 100);
|
|
149
|
-
return {
|
|
150
|
-
hasReadme,
|
|
151
|
-
hasGitignore,
|
|
152
|
-
hasEnvExample,
|
|
153
|
-
hasLicense,
|
|
154
|
-
hasEditorConfig,
|
|
155
|
-
hasLinting,
|
|
156
|
-
hasFormatting,
|
|
157
|
-
hasTesting,
|
|
158
|
-
hasCiCd,
|
|
159
|
-
hasErrorTracking,
|
|
160
|
-
hasTypeChecking,
|
|
161
|
-
hasSecurityScanning,
|
|
162
|
-
hasDocumentation,
|
|
163
|
-
hasContributing,
|
|
164
|
-
hasChangelogStrategy,
|
|
165
|
-
hasBackupStrategy,
|
|
166
|
-
hasAccessibility,
|
|
167
|
-
hasSeo,
|
|
168
|
-
hasPerformanceBudget,
|
|
169
|
-
hasSeedData,
|
|
170
|
-
completenessScore,
|
|
171
|
-
};
|
|
172
|
-
}
|
|
1
|
+
// Planu — Analyzer barrel re-export (SOLID split)
|
|
2
|
+
// Implementation moved to src/engine/analyzer/ subdirectory
|
|
3
|
+
export { analyzeProject, quickAnalyze } from './analyzer/analyze-project.js';
|
|
4
|
+
export { checkProjectCompleteness } from './analyzer/completeness-checker.js';
|
|
173
5
|
//# sourceMappingURL=analyzer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.js","sourceRoot":"","sources":["../../src/engine/analyzer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"analyzer.js","sourceRoot":"","sources":["../../src/engine/analyzer.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,4DAA4D;AAC5D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DashboardProjectSummary, DashboardUsageStats, ProjectHealthMetrics } from '../../types/index.js';
|
|
1
|
+
import type { DashboardEventsResponse, DashboardMetrics, DashboardProjectSummary, DashboardUsageStats, ProjectHealthMetrics, ProjectHealthScore, SpecDetailData, SpecFrontmatter } from '../../types/index.js';
|
|
2
2
|
/** Parse criteria counts from PROGRESS.md content */
|
|
3
3
|
export declare function parseCriteriaFromProgress(content: string): {
|
|
4
4
|
total: number;
|
|
@@ -16,6 +16,21 @@ export declare function loadSpecDetail(projectId: string, specId: string): Promi
|
|
|
16
16
|
ficha: string | null;
|
|
17
17
|
progress: string | null;
|
|
18
18
|
}>;
|
|
19
|
+
/** Extract code links (file references) from a technical markdown */
|
|
20
|
+
export declare function extractCodeLinks(technicalMd: string): string[];
|
|
21
|
+
/** Parse YAML-like frontmatter from spec.md content */
|
|
22
|
+
export declare function parseFrontmatter(content: string): SpecFrontmatter;
|
|
23
|
+
/** Load enhanced spec detail with code links and frontmatter */
|
|
24
|
+
export declare function loadSpecDetailEnhanced(projectId: string, specId: string): Promise<SpecDetailData>;
|
|
25
|
+
/** Load the drift score from constitution-drift.json */
|
|
26
|
+
export declare function loadDriftScore(projectId: string): Promise<number>;
|
|
27
|
+
/** Load aggregated project metrics */
|
|
28
|
+
export declare function loadProjectMetrics(projectId: string): Promise<DashboardMetrics>;
|
|
29
|
+
/** Load project health score */
|
|
30
|
+
export declare function loadProjectHealthScore(projectId: string): Promise<ProjectHealthScore>;
|
|
31
|
+
/** Load events for a project since a given timestamp.
|
|
32
|
+
* Scans spec.json files for updatedAt fields newer than `since`. */
|
|
33
|
+
export declare function loadProjectEvents(projectId: string, since: string): Promise<DashboardEventsResponse>;
|
|
19
34
|
/** Read usage stats from data/global/usage.json (written by SPEC-064) */
|
|
20
35
|
export declare function loadUsageStats(): Promise<DashboardUsageStats>;
|
|
21
36
|
//# sourceMappingURL=data-loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-loader.d.ts","sourceRoot":"","sources":["../../../src/engine/dashboard/data-loader.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"data-loader.d.ts","sourceRoot":"","sources":["../../../src/engine/dashboard/data-loader.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EAEvB,mBAAmB,EAEnB,oBAAoB,EACpB,kBAAkB,EAMlB,cAAc,EACd,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAyB9B,qDAAqD;AACrD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CAiBA;AAwFD,4CAA4C;AAC5C,wBAAsB,eAAe,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC,CA+C1E;AAED,sCAAsC;AACtC,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAG5F;AAED,2CAA2C;AAC3C,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,uBAAuB,GAAG,oBAAoB,CAe3F;AAED,mDAAmD;AACnD,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAQ/E;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAW9D;AAED,uDAAuD;AACvD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAqCjE;AAED,gEAAgE;AAChE,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,cAAc,CAAC,CAazB;AAED,wDAAwD;AACxD,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAIvE;AAED,sCAAsC;AACtC,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAOrF;AAED,gCAAgC;AAChC,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAG3F;AAED;qEACqE;AACrE,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,uBAAuB,CAAC,CA+BlC;AAED,yEAAyE;AACzE,wBAAsB,cAAc,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAqBnE"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// for the dashboard. All I/O is synchronous-style via fs promises.
|
|
3
3
|
import { readFile, readdir, stat } from 'node:fs/promises';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
|
+
import { computeDashboardMetrics, computeHealthScore } from './kanban-logic.js';
|
|
5
6
|
/** Root data directory for all project data */
|
|
6
7
|
const DATA_DIR = join(process.cwd(), 'data');
|
|
7
8
|
/** Safely read and parse a JSON file; returns null on any error */
|
|
@@ -86,14 +87,29 @@ async function loadSpecCards(projectDir) {
|
|
|
86
87
|
? parseCriteriaFromProgress(progressContent)
|
|
87
88
|
: { total: 0, implemented: 0 };
|
|
88
89
|
const progressPercent = total > 0 ? Math.round((implemented / total) * 100) : 0;
|
|
89
|
-
|
|
90
|
+
const card = {
|
|
90
91
|
id: specId,
|
|
91
92
|
title,
|
|
92
93
|
status,
|
|
93
94
|
criteriaTotal: total,
|
|
94
95
|
criteriaImplemented: implemented,
|
|
95
96
|
progressPercent,
|
|
96
|
-
}
|
|
97
|
+
};
|
|
98
|
+
if (raw.updatedAt) {
|
|
99
|
+
card.updatedAt = raw.updatedAt;
|
|
100
|
+
}
|
|
101
|
+
const validDifficulties = [1, 2, 3, 4, 5];
|
|
102
|
+
if (raw.difficulty !== undefined && validDifficulties.includes(raw.difficulty)) {
|
|
103
|
+
card.difficulty = raw.difficulty;
|
|
104
|
+
}
|
|
105
|
+
const validRisks = ['low', 'medium', 'high', 'critical'];
|
|
106
|
+
if (raw.risk !== undefined && validRisks.includes(raw.risk)) {
|
|
107
|
+
card.risk = raw.risk;
|
|
108
|
+
}
|
|
109
|
+
if (raw.tags && Array.isArray(raw.tags)) {
|
|
110
|
+
card.tags = raw.tags;
|
|
111
|
+
}
|
|
112
|
+
cards.push(card);
|
|
97
113
|
}
|
|
98
114
|
// Sort by spec ID ascending
|
|
99
115
|
cards.sort((a, b) => a.id.localeCompare(b.id));
|
|
@@ -172,6 +188,128 @@ export async function loadSpecDetail(projectId, specId) {
|
|
|
172
188
|
]);
|
|
173
189
|
return { hu, ficha, progress };
|
|
174
190
|
}
|
|
191
|
+
/** Extract code links (file references) from a technical markdown */
|
|
192
|
+
export function extractCodeLinks(technicalMd) {
|
|
193
|
+
const links = [];
|
|
194
|
+
// Match patterns like `src/path/file.ts` or paths ending with common extensions
|
|
195
|
+
const regex = /`((?:src|tests|lib|packages)\/[\w/.-]+\.\w+)`/g;
|
|
196
|
+
let match;
|
|
197
|
+
while ((match = regex.exec(technicalMd)) !== null) {
|
|
198
|
+
if (match[1]) {
|
|
199
|
+
links.push(match[1]);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return links;
|
|
203
|
+
}
|
|
204
|
+
/** Parse YAML-like frontmatter from spec.md content */
|
|
205
|
+
export function parseFrontmatter(content) {
|
|
206
|
+
const result = {};
|
|
207
|
+
const fmMatch = /^---\s*\n([\s\S]*?)\n---/.exec(content);
|
|
208
|
+
if (!fmMatch?.[1]) {
|
|
209
|
+
return result;
|
|
210
|
+
}
|
|
211
|
+
const lines = fmMatch[1].split('\n');
|
|
212
|
+
for (const line of lines) {
|
|
213
|
+
const kvMatch = /^(\w[\w-]*):\s*(.*)$/.exec(line);
|
|
214
|
+
if (!kvMatch?.[1]) {
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
const key = kvMatch[1];
|
|
218
|
+
const rawVal = kvMatch[2]?.trim() ?? '';
|
|
219
|
+
if (rawVal === '') {
|
|
220
|
+
result[key] = null;
|
|
221
|
+
}
|
|
222
|
+
else if (rawVal.startsWith('[') && rawVal.endsWith(']')) {
|
|
223
|
+
// Simple array: [a, b, c]
|
|
224
|
+
result[key] = rawVal
|
|
225
|
+
.slice(1, -1)
|
|
226
|
+
.split(',')
|
|
227
|
+
.map((s) => s.trim().replace(/^['"]|['"]$/g, ''))
|
|
228
|
+
.filter((s) => s.length > 0);
|
|
229
|
+
}
|
|
230
|
+
else if (rawVal === 'true') {
|
|
231
|
+
result[key] = true;
|
|
232
|
+
}
|
|
233
|
+
else if (rawVal === 'false') {
|
|
234
|
+
result[key] = false;
|
|
235
|
+
}
|
|
236
|
+
else if (rawVal === 'null') {
|
|
237
|
+
result[key] = null;
|
|
238
|
+
}
|
|
239
|
+
else if (/^\d+$/.test(rawVal)) {
|
|
240
|
+
result[key] = parseInt(rawVal, 10);
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
result[key] = rawVal.replace(/^['"]|['"]$/g, '');
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return result;
|
|
247
|
+
}
|
|
248
|
+
/** Load enhanced spec detail with code links and frontmatter */
|
|
249
|
+
export async function loadSpecDetailEnhanced(projectId, specId) {
|
|
250
|
+
const specDir = join(DATA_DIR, 'projects', projectId, 'specs', specId);
|
|
251
|
+
const [hu, ficha, progress, specMd] = await Promise.all([
|
|
252
|
+
readTextFile(join(specDir, 'HU.md')),
|
|
253
|
+
readTextFile(join(specDir, 'FICHA-TECNICA.md')),
|
|
254
|
+
readTextFile(join(specDir, 'PROGRESS.md')),
|
|
255
|
+
readTextFile(join(specDir, 'spec.md')),
|
|
256
|
+
]);
|
|
257
|
+
const codeLinks = ficha ? extractCodeLinks(ficha) : [];
|
|
258
|
+
const frontmatter = specMd ? parseFrontmatter(specMd) : {};
|
|
259
|
+
return { hu, ficha, progress, codeLinks, frontmatter };
|
|
260
|
+
}
|
|
261
|
+
/** Load the drift score from constitution-drift.json */
|
|
262
|
+
export async function loadDriftScore(projectId) {
|
|
263
|
+
const driftFile = join(DATA_DIR, 'projects', projectId, 'constitution-drift.json');
|
|
264
|
+
const raw = await readJsonFile(driftFile);
|
|
265
|
+
return raw?.score ?? 0;
|
|
266
|
+
}
|
|
267
|
+
/** Load aggregated project metrics */
|
|
268
|
+
export async function loadProjectMetrics(projectId) {
|
|
269
|
+
const project = await loadProject(projectId);
|
|
270
|
+
if (!project) {
|
|
271
|
+
return { completionRate: 0, criteriaCoverage: 0, velocity: 0, driftScore: 0 };
|
|
272
|
+
}
|
|
273
|
+
const drift = await loadDriftScore(projectId);
|
|
274
|
+
return computeDashboardMetrics(project.specs, drift);
|
|
275
|
+
}
|
|
276
|
+
/** Load project health score */
|
|
277
|
+
export async function loadProjectHealthScore(projectId) {
|
|
278
|
+
const metrics = await loadProjectMetrics(projectId);
|
|
279
|
+
return computeHealthScore(metrics);
|
|
280
|
+
}
|
|
281
|
+
/** Load events for a project since a given timestamp.
|
|
282
|
+
* Scans spec.json files for updatedAt fields newer than `since`. */
|
|
283
|
+
export async function loadProjectEvents(projectId, since) {
|
|
284
|
+
const sinceMs = new Date(since).getTime();
|
|
285
|
+
const events = [];
|
|
286
|
+
const specsDir = join(DATA_DIR, 'projects', projectId, 'specs');
|
|
287
|
+
let entries;
|
|
288
|
+
try {
|
|
289
|
+
entries = await readdir(specsDir);
|
|
290
|
+
}
|
|
291
|
+
catch {
|
|
292
|
+
return { events: [], timestamp: new Date().toISOString() };
|
|
293
|
+
}
|
|
294
|
+
for (const entry of entries) {
|
|
295
|
+
const specFile = join(specsDir, entry, 'spec.json');
|
|
296
|
+
const raw = await readJsonFile(specFile);
|
|
297
|
+
if (!raw?.updatedAt) {
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
const updatedMs = new Date(raw.updatedAt).getTime();
|
|
301
|
+
if (!isNaN(updatedMs) && updatedMs > sinceMs) {
|
|
302
|
+
events.push({
|
|
303
|
+
type: 'spec_updated',
|
|
304
|
+
specId: raw.id ?? entry,
|
|
305
|
+
timestamp: raw.updatedAt,
|
|
306
|
+
data: { status: raw.status, title: raw.title },
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
events.sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime());
|
|
311
|
+
return { events, timestamp: new Date().toISOString() };
|
|
312
|
+
}
|
|
175
313
|
/** Read usage stats from data/global/usage.json (written by SPEC-064) */
|
|
176
314
|
export async function loadUsageStats() {
|
|
177
315
|
const usageFile = join(DATA_DIR, 'global', 'usage.json');
|