@planu/cli 4.14.1 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +82 -0
- package/LICENSE +55 -12
- package/README.md +10 -2
- package/dist/cli/commands/install.d.ts +1 -12
- package/dist/cli/commands/install.js +9 -65
- package/dist/cli/commands/job.js +4 -3
- package/dist/cli/commands/spec.js +12 -3
- package/dist/cli/commands/validate.js +2 -2
- package/dist/cli/router.js +1 -3
- package/dist/config/environment-schema.json +1 -3
- package/dist/config/official-sdd-tools.d.ts +4 -0
- package/dist/config/official-sdd-tools.js +35 -0
- package/dist/config/product-public.d.ts +139 -3
- package/dist/config/product-public.js +8 -1
- package/dist/config/product-public.json +7 -36
- package/dist/config/registries/hosts/codex.json +20 -363
- package/dist/config/release-policy.json +84 -2
- package/dist/config/runtime-policy.json +12 -1
- package/dist/config/skill-templates/planu-resume-work.md +2 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/core/spec-validator.d.ts +4 -4
- package/dist/core/spec-validator.js +33 -19
- package/dist/engine/abortable-process-runner.d.ts +20 -2
- package/dist/engine/abortable-process-runner.js +243 -74
- package/dist/engine/ambiguity-scorer.js +4 -26
- package/dist/engine/auth/scope-mapper.js +1 -7
- package/dist/engine/autopilot/state-updater.js +4 -4
- package/dist/engine/cascade-hooks/hooks/review-enricher.hook.js +9 -6
- package/dist/engine/cascade-hooks/state-drift-detector.d.ts +3 -3
- package/dist/engine/cascade-hooks/state-drift-detector.js +1 -1
- package/dist/engine/ci-generator/planu-config.js +1 -7
- package/dist/engine/clarification-gate/gate.d.ts +3 -3
- package/dist/engine/code-scanner/layer-scanner.js +6 -22
- package/dist/engine/core-bridge.d.ts +3 -3
- package/dist/engine/cost-guardrails.d.ts +1 -1
- package/dist/engine/cost-guardrails.js +1 -1
- package/dist/engine/criterion-identity.d.ts +1 -0
- package/dist/engine/criterion-identity.js +7 -0
- package/dist/engine/dashboard/data-loader.js +2 -7
- package/dist/engine/dashboard/templates-layout.js +0 -3
- package/dist/engine/dashboard/templates-project.js +1 -13
- package/dist/engine/docs-site-generator/data-collector.d.ts +1 -1
- package/dist/engine/docs-site-generator/data-collector.js +7 -28
- package/dist/engine/docs-site-generator/tools-renderer.js +3 -10
- package/dist/engine/evidence-gates/artifact-reader.d.ts +12 -1
- package/dist/engine/evidence-gates/artifact-reader.js +174 -4
- package/dist/engine/evidence-gates/evidence-autofill.d.ts +10 -0
- package/dist/engine/evidence-gates/evidence-autofill.js +148 -0
- package/dist/engine/evidence-gates/evidence-skeletons.d.ts +19 -0
- package/dist/engine/evidence-gates/evidence-skeletons.js +69 -0
- package/dist/engine/evidence-gates/lifecycle-gate.js +4 -3
- package/dist/engine/evidence-gates/reconciliation-freshness.d.ts +11 -0
- package/dist/engine/evidence-gates/reconciliation-freshness.js +72 -0
- package/dist/engine/evidence-index/done-drift.d.ts +1 -1
- package/dist/engine/evidence-index/done-drift.js +40 -18
- package/dist/engine/execution/context.js +3 -0
- package/dist/engine/execution/durable-job-heartbeat-runtime.d.ts +4 -0
- package/dist/engine/execution/durable-job-heartbeat-runtime.js +400 -0
- package/dist/engine/execution/job-runtime.d.ts +30 -0
- package/dist/engine/execution/job-runtime.js +114 -6
- package/dist/engine/execution/operation-journal.js +10 -4
- package/dist/engine/execution/public-job-sanitizer.d.ts +4 -0
- package/dist/engine/execution/public-job-sanitizer.js +31 -0
- package/dist/engine/execution/validate-job-executor.d.ts +12 -1
- package/dist/engine/execution/validate-job-executor.js +549 -86
- package/dist/engine/execution/validate-job-payload.js +107 -50
- package/dist/engine/execution/validate-job-recovery.js +1 -1
- package/dist/engine/execution/validate-worker-runtime.d.ts +5 -0
- package/dist/engine/execution/validate-worker-runtime.js +90 -2
- package/dist/engine/execution/validate-worker-thread.js +17 -24
- package/dist/engine/handoff-artifacts/schemas.d.ts +2 -1
- package/dist/engine/handoff-artifacts/schemas.js +33 -0
- package/dist/engine/handoff-packager.d.ts +19 -0
- package/dist/engine/handoff-packager.js +415 -13
- package/dist/engine/hooks/effort-configurator.js +1 -1
- package/dist/engine/impact-detector/test-break-predictor.js +3 -3
- package/dist/engine/impact-detector/tool-registration.js +1 -1
- package/dist/engine/implementation-contract/renderer.js +23 -8
- package/dist/engine/lifecycle-reconciliation-io.d.ts +11 -0
- package/dist/engine/lifecycle-reconciliation-io.js +180 -0
- package/dist/engine/lifecycle-reconciliation.d.ts +16 -0
- package/dist/engine/lifecycle-reconciliation.js +406 -0
- package/dist/engine/local-first/tool-classification.js +2 -0
- package/dist/engine/macos-keychain-native-port.d.ts +5 -0
- package/dist/engine/macos-keychain-native-port.js +19 -7
- package/dist/engine/migrations/remove-commercial-state.d.ts +3 -0
- package/dist/engine/migrations/remove-commercial-state.js +343 -0
- package/dist/engine/minimality/policy-loader.js +247 -6
- package/dist/engine/network-policy.js +1 -0
- package/dist/engine/planu-core.darwin-arm64.node.manifest.json +7 -7
- package/dist/engine/planu-core.darwin-arm64.node.sbom.json +20 -20
- package/dist/engine/planu-core.darwin-x64.node.manifest.json +7 -7
- package/dist/engine/planu-core.darwin-x64.node.sbom.json +20 -20
- package/dist/engine/planu-core.linux-arm64-gnu.node.manifest.json +7 -7
- package/dist/engine/planu-core.linux-arm64-gnu.node.sbom.json +20 -20
- package/dist/engine/planu-core.linux-arm64-musl.node.manifest.json +7 -7
- package/dist/engine/planu-core.linux-arm64-musl.node.sbom.json +20 -20
- package/dist/engine/planu-core.linux-x64-gnu.node.manifest.json +7 -7
- package/dist/engine/planu-core.linux-x64-gnu.node.sbom.json +20 -20
- package/dist/engine/planu-core.linux-x64-musl.node.manifest.json +7 -7
- package/dist/engine/planu-core.linux-x64-musl.node.sbom.json +20 -20
- package/dist/engine/planu-core.win32-arm64-msvc.node.manifest.json +7 -7
- package/dist/engine/planu-core.win32-arm64-msvc.node.sbom.json +20 -20
- package/dist/engine/planu-core.win32-x64-msvc.node.manifest.json +7 -7
- package/dist/engine/planu-core.win32-x64-msvc.node.sbom.json +20 -20
- package/dist/engine/readiness-checker.d.ts +1 -16
- package/dist/engine/readiness-checker.js +27 -88
- package/dist/engine/reverse-engineer/api-detector.js +2 -13
- package/dist/engine/reverse-engineer/complexity-analyzer.js +2 -13
- package/dist/engine/reverse-engineer/config-analyzer.js +2 -13
- package/dist/engine/reverse-engineer/dependency-graph.js +2 -13
- package/dist/engine/reverse-engineer/test-analyzer.js +2 -13
- package/dist/engine/reverse-engineer/walk-ignore.d.ts +3 -0
- package/dist/engine/reverse-engineer/walk-ignore.js +26 -0
- package/dist/engine/runtime-policy.d.ts +2 -0
- package/dist/engine/runtime-policy.js +42 -5
- package/dist/engine/runtime-security/rate-limiter.js +0 -1
- package/dist/engine/safety/contained-project-file.d.ts +3 -0
- package/dist/engine/safety/contained-project-file.js +23 -0
- package/dist/engine/scope-boundaries/contradiction-checker.js +63 -1
- package/dist/engine/scope-boundaries/scope-validator.js +45 -7
- package/dist/engine/session/checkpoint-writer.js +0 -9
- package/dist/engine/spec-format/acceptance-criteria.d.ts +6 -2
- package/dist/engine/spec-format/acceptance-criteria.js +82 -22
- package/dist/engine/spec-format/markdown-sections.d.ts +14 -0
- package/dist/engine/spec-format/markdown-sections.js +105 -0
- package/dist/engine/spec-format/read-technical-section.js +33 -5
- package/dist/engine/spec-format/technical-md-populator.js +3 -2
- package/dist/engine/spec-format/text-fences.js +20 -2
- package/dist/engine/spec-format/unified-spec-builder.d.ts +7 -0
- package/dist/engine/spec-format/unified-spec-builder.js +202 -0
- package/dist/engine/spec-migrator/canonical-deduplicator.d.ts +18 -0
- package/dist/engine/spec-migrator/canonical-deduplicator.js +479 -0
- package/dist/engine/spec-migrator/filesystem-import.d.ts +4 -8
- package/dist/engine/spec-migrator/filesystem-import.js +121 -14
- package/dist/engine/spec-migrator/frontmatter-parser.js +32 -15
- package/dist/engine/spec-migrator/index.d.ts +1 -0
- package/dist/engine/spec-migrator/index.js +1 -0
- package/dist/engine/spec-state-machine/transition-spec.d.ts +6 -1
- package/dist/engine/spec-state-machine/transition-spec.js +10 -1
- package/dist/engine/spec-state-syncer.js +1 -1
- package/dist/engine/technical-enricher/index.js +16 -8
- package/dist/engine/technical-enricher/render-enriched.d.ts +1 -0
- package/dist/engine/technical-enricher/render-enriched.js +42 -14
- package/dist/engine/telemetry/health-checker.js +53 -17
- package/dist/engine/telemetry/telemetry-client.js +26 -8
- package/dist/engine/text-signal-boundaries.d.ts +2 -0
- package/dist/engine/text-signal-boundaries.js +25 -2
- package/dist/engine/time/relative-date.d.ts +3 -0
- package/dist/engine/time/relative-date.js +16 -0
- package/dist/engine/timing/budget.d.ts +11 -0
- package/dist/engine/timing/budget.js +31 -9
- package/dist/engine/token-optimizer/analytics.d.ts +1 -1
- package/dist/engine/token-optimizer/analytics.js +5 -6
- package/dist/engine/usage-tracker/core.d.ts +2 -2
- package/dist/engine/usage-tracker/core.js +1 -2
- package/dist/engine/usage-tracker/index.d.ts +0 -3
- package/dist/engine/usage-tracker/index.js +0 -3
- package/dist/engine/usage-tracker/stats.d.ts +2 -2
- package/dist/engine/usage-tracker/stats.js +1 -28
- package/dist/engine/validation/durable-validation.d.ts +1 -1
- package/dist/engine/validation/durable-validation.js +3 -82
- package/dist/engine/validation/validation-freshness.d.ts +11 -1
- package/dist/engine/validation/validation-freshness.js +231 -91
- package/dist/engine/validation/validation-receipt.d.ts +9 -6
- package/dist/engine/validation/validation-receipt.js +84 -24
- package/dist/engine/validation/validation-source-digest.d.ts +2 -0
- package/dist/engine/validation/validation-source-digest.js +86 -0
- package/dist/engine/validation/validation-submission.d.ts +5 -4
- package/dist/engine/validation/validation-submission.js +25 -11
- package/dist/engine/validation/validation-worktree.d.ts +21 -0
- package/dist/engine/validation/validation-worktree.js +260 -0
- package/dist/engine/validation-impact-planner.d.ts +14 -2
- package/dist/engine/validation-impact-planner.js +0 -3
- package/dist/engine/validator/dor-dod.d.ts +1 -0
- package/dist/engine/validator/dor-dod.js +5 -3
- package/dist/engine/validator/extractors.d.ts +1 -5
- package/dist/engine/validator/extractors.js +24 -69
- package/dist/engine/validator/spec-compliance-runner.d.ts +12 -24
- package/dist/engine/validator/spec-compliance-runner.js +429 -211
- package/dist/engine/validator.js +35 -22
- package/dist/index.js +4 -16
- package/dist/resources/usage-stats-resource.js +2 -18
- package/dist/security/adapters/linux-secret-service.js +7 -3
- package/dist/security/adapters/windows-credential-manager.js +6 -4
- package/dist/server/routes/specs.js +13 -1
- package/dist/storage/base-store.d.ts +1 -1
- package/dist/storage/base-store.js +1 -1
- package/dist/storage/feedback-remote.d.ts +2 -3
- package/dist/storage/feedback-remote.js +45 -31
- package/dist/storage/global-store.d.ts +1 -17
- package/dist/storage/global-store.js +1 -42
- package/dist/storage/index.d.ts +0 -2
- package/dist/storage/index.js +0 -2
- package/dist/storage/migrations/canonical-storage.js +124 -11
- package/dist/storage/runtime-db.d.ts +9 -0
- package/dist/storage/runtime-db.js +64 -8
- package/dist/storage/spec-store.d.ts +14 -2
- package/dist/storage/spec-store.js +104 -14
- package/dist/storage/status-store/atomic-status-write.d.ts +5 -0
- package/dist/storage/status-store/atomic-status-write.js +57 -0
- package/dist/storage/status-store/file-lock.js +30 -11
- package/dist/storage/status-store/self-healing.js +3 -3
- package/dist/storage/status-store/version-sync.d.ts +2 -1
- package/dist/storage/status-store/version-sync.js +35 -40
- package/dist/storage/usage-store.d.ts +1 -5
- package/dist/storage/usage-store.js +0 -35
- package/dist/tools/auto-update-handler.d.ts +3 -3
- package/dist/tools/auto-update-handler.js +3 -3
- package/dist/tools/challenge-spec/resilience-challenge-scenarios.d.ts +2 -1
- package/dist/tools/challenge-spec/resilience-challenge-scenarios.js +10 -7
- package/dist/tools/challenge-spec/scenario-collector.js +1 -1
- package/dist/tools/challenge-spec/scenarios-data.js +1 -1
- package/dist/tools/challenge-spec/scenarios-utils.d.ts +1 -1
- package/dist/tools/challenge-spec/scenarios-utils.js +35 -11
- package/dist/tools/challenge-spec-helpers.d.ts +10 -1
- package/dist/tools/challenge-spec-helpers.js +63 -22
- package/dist/tools/challenge-spec.js +23 -8
- package/dist/tools/check-readiness.js +38 -14
- package/dist/tools/configure-telemetry.js +30 -2
- package/dist/tools/create-spec/spec-builder.d.ts +7 -0
- package/dist/tools/create-spec/spec-builder.js +19 -15
- package/dist/tools/create-spec.d.ts +1 -0
- package/dist/tools/create-spec.js +584 -309
- package/dist/tools/git/branch-ops.d.ts +1 -1
- package/dist/tools/git/branch-ops.js +3 -2
- package/dist/tools/init-project/handler.js +10 -12
- package/dist/tools/init-project/host-assets-writer.js +26 -1
- package/dist/tools/init-project/lint-scaffolder.d.ts +3 -3
- package/dist/tools/init-project/migration-runner.d.ts +2 -4
- package/dist/tools/init-project/migration-runner.js +3 -2
- package/dist/tools/init-project/portable-index-reconciler.d.ts +4 -0
- package/dist/tools/init-project/portable-index-reconciler.js +14 -0
- package/dist/tools/init-project/result-builder.js +1 -3
- package/dist/tools/jobs/handlers.js +38 -6
- package/dist/tools/list-specs.js +5 -26
- package/dist/tools/merge-risk-handler.js +2 -2
- package/dist/tools/package-handoff.js +2 -0
- package/dist/tools/reconcile-spec.js +0 -27
- package/dist/tools/register-agent-squad-tools.js +2 -2
- package/dist/tools/register-platform-tools/design-stack-tools.js +11 -11
- package/dist/tools/register-platform-tools/lifecycle-infra-tools.js +7 -7
- package/dist/tools/register-sdd-tools.d.ts +1 -1
- package/dist/tools/register-sdd-tools.js +2 -29
- package/dist/tools/register-spec-tools/analysis-tools.js +8 -8
- package/dist/tools/register-spec-tools/core-spec-tools.js +29 -19
- package/dist/tools/safe-handler.d.ts +5 -13
- package/dist/tools/safe-handler.js +7 -23
- package/dist/tools/schemas/index.d.ts +1 -1
- package/dist/tools/schemas/index.js +1 -1
- package/dist/tools/schemas/output-schemas.d.ts +0 -23
- package/dist/tools/schemas/output-schemas.js +0 -28
- package/dist/tools/schemas/spec.d.ts +4 -0
- package/dist/tools/schemas/spec.js +3 -0
- package/dist/tools/schemas/validate-output-schema.d.ts +11 -0
- package/dist/tools/schemas/validate-output-schema.js +7 -0
- package/dist/tools/spec-prompt-handler.js +3 -3
- package/dist/tools/sync-spec-state-handler.d.ts +1 -1
- package/dist/tools/sync-spec-state-handler.js +50 -2
- package/dist/tools/tool-entry.d.ts +4 -4
- package/dist/tools/tool-entry.js +3 -3
- package/dist/tools/tool-registry/core-tools.js +31 -15
- package/dist/tools/tool-registry/group-infra.js +27 -110
- package/dist/tools/tool-registry/group-quality-compliance.js +26 -26
- package/dist/tools/tool-registry/inventory.d.ts +2 -0
- package/dist/tools/tool-registry/inventory.js +2 -0
- package/dist/tools/tool-registry-helpers.d.ts +3 -3
- package/dist/tools/tool-registry-helpers.js +3 -3
- package/dist/tools/tool-usage-report/registered-tools.d.ts +1 -1
- package/dist/tools/tool-usage-report/registered-tools.js +3 -15
- package/dist/tools/update-status/approval-gates.js +3 -0
- package/dist/tools/update-status/batch.d.ts +6 -2
- package/dist/tools/update-status/batch.js +58 -1
- package/dist/tools/update-status/dod-gates.d.ts +16 -1
- package/dist/tools/update-status/dod-gates.js +191 -1
- package/dist/tools/update-status/done-receipt-verifier.d.ts +8 -0
- package/dist/tools/update-status/done-receipt-verifier.js +75 -27
- package/dist/tools/update-status/evidence-gate.d.ts +4 -0
- package/dist/tools/update-status/evidence-gate.js +103 -3
- package/dist/tools/update-status/file-sync.d.ts +4 -3
- package/dist/tools/update-status/file-sync.js +57 -6
- package/dist/tools/update-status/index.d.ts +25 -1
- package/dist/tools/update-status/index.js +292 -78
- package/dist/tools/update-status/response-builder.js +3 -3
- package/dist/tools/update-status/side-effects.d.ts +2 -0
- package/dist/tools/update-status/side-effects.js +2 -2
- package/dist/tools/update-status/transition-guard.js +45 -16
- package/dist/tools/update-status-actions.d.ts +4 -2
- package/dist/tools/update-status-actions.js +16 -14
- package/dist/tools/usage-report.js +1 -16
- package/dist/tools/usage-stats.js +1 -18
- package/dist/tools/usage-tracking.d.ts +4 -0
- package/dist/tools/usage-tracking.js +20 -0
- package/dist/tools/validate-lint.d.ts +1 -0
- package/dist/tools/validate-lint.js +1 -1
- package/dist/tools/validate.d.ts +2 -1
- package/dist/tools/validate.js +114 -34
- package/dist/tools/workspace-dashboard-handler.js +38 -0
- package/dist/transports/http-transport.js +6 -8
- package/dist/transports/mcp-types.d.ts +0 -2
- package/dist/transports/session-context.js +1 -1
- package/dist/types/cascade-hooks.d.ts +1 -1
- package/dist/types/ci.d.ts +0 -4
- package/dist/types/clarification-token.d.ts +1 -1
- package/dist/types/claude-code-runtime.d.ts +0 -27
- package/dist/types/commercial-migration.d.ts +17 -0
- package/dist/types/commercial-migration.js +2 -0
- package/dist/types/common/primitives.d.ts +0 -2
- package/dist/types/core-bridge.d.ts +4 -10
- package/dist/types/dashboard.d.ts +3 -7
- package/dist/types/docs.d.ts +0 -1
- package/dist/types/durable-job.d.ts +4 -4
- package/dist/types/durable-validation.d.ts +100 -2
- package/dist/types/durable-validation.js +165 -1
- package/dist/types/errors/structured-error.d.ts +3 -3
- package/dist/types/estimation.d.ts +2 -0
- package/dist/types/evidence-autofill.d.ts +34 -0
- package/dist/types/evidence-autofill.js +2 -0
- package/dist/types/evidence-gates.d.ts +9 -1
- package/dist/types/execution.d.ts +2 -0
- package/dist/types/gemini-integration.d.ts +0 -11
- package/dist/types/handoff-artifacts.d.ts +41 -0
- package/dist/types/hooks-advanced.d.ts +0 -13
- package/dist/types/impact-detection.d.ts +2 -2
- package/dist/types/index.d.ts +3 -6
- package/dist/types/index.js +2 -5
- package/dist/types/kiro-integration.d.ts +0 -6
- package/dist/types/network-policy.d.ts +1 -1
- package/dist/types/project/lint-scaffolder.d.ts +1 -1
- package/dist/types/runtime-policy.d.ts +11 -0
- package/dist/types/session-safeguard.d.ts +0 -31
- package/dist/types/spec/canonical-repair.d.ts +81 -0
- package/dist/types/spec/canonical-repair.js +2 -0
- package/dist/types/spec/core.d.ts +20 -0
- package/dist/types/spec/index.d.ts +1 -0
- package/dist/types/spec/index.js +1 -0
- package/dist/types/spec/inputs.d.ts +35 -1
- package/dist/types/spec-format.d.ts +25 -1
- package/dist/types/telemetry.d.ts +4 -1
- package/dist/types/transition-log.d.ts +1 -1
- package/dist/types/transport.d.ts +0 -2
- package/dist/types/usage.d.ts +1 -36
- package/dist/types/usage.js +1 -1
- package/dist/types/validate-worker.d.ts +6 -0
- package/dist/types/validation-receipt.d.ts +1 -1
- package/dist/types/validation.d.ts +10 -4
- package/package.json +17 -12
- package/planu-native.json +1 -1
- package/planu-plugin.json +23 -40
- package/scripts/lib/pending-release-file.mjs +93 -0
- package/src/i18n/messages/en.json +0 -41
- package/src/i18n/messages/es.json +0 -41
- package/src/i18n/messages/pt.json +0 -41
- package/dist/cli/commands/activate.d.ts +0 -14
- package/dist/cli/commands/activate.js +0 -174
- package/dist/config/license-plans.json +0 -251
- package/dist/config/product-public.ts +0 -148
- package/dist/config/server-instructions.ts +0 -121
- package/dist/config/version-defaults.ts +0 -76
- package/dist/config/version.ts +0 -21
- package/dist/engine/ai-integration/gemini/settings-generator.d.ts +0 -4
- package/dist/engine/ai-integration/gemini/settings-generator.js +0 -195
- package/dist/engine/ai-integration/kiro/hooks-generator.d.ts +0 -6
- package/dist/engine/ai-integration/kiro/hooks-generator.js +0 -75
- package/dist/engine/hooks/full-spectrum-generator.d.ts +0 -32
- package/dist/engine/hooks/full-spectrum-generator.js +0 -117
- package/dist/engine/license-validator/config-loader.d.ts +0 -5
- package/dist/engine/license-validator/config-loader.js +0 -16
- package/dist/engine/license-validator/core.d.ts +0 -15
- package/dist/engine/license-validator/core.js +0 -151
- package/dist/engine/license-validator/fingerprint.d.ts +0 -3
- package/dist/engine/license-validator/fingerprint.js +0 -17
- package/dist/engine/license-validator/lemon-squeezy.d.ts +0 -5
- package/dist/engine/license-validator/lemon-squeezy.js +0 -55
- package/dist/engine/license-validator.d.ts +0 -5
- package/dist/engine/license-validator.js +0 -6
- package/dist/engine/product-intelligence/index.d.ts +0 -7
- package/dist/engine/product-intelligence/index.js +0 -211
- package/dist/engine/session/auto-save.d.ts +0 -18
- package/dist/engine/session/auto-save.js +0 -98
- package/dist/engine/session/context-snapshot.d.ts +0 -8
- package/dist/engine/session/context-snapshot.js +0 -49
- package/dist/engine/session/memory-sync.d.ts +0 -12
- package/dist/engine/session/memory-sync.js +0 -34
- package/dist/engine/session/session-diff.d.ts +0 -11
- package/dist/engine/session/session-diff.js +0 -42
- package/dist/engine/session/session-merge.d.ts +0 -12
- package/dist/engine/session/session-merge.js +0 -55
- package/dist/engine/session-safeguard/checkpoint-runner.d.ts +0 -4
- package/dist/engine/session-safeguard/checkpoint-runner.js +0 -70
- package/dist/engine/session-safeguard/learnings-buffer.d.ts +0 -15
- package/dist/engine/session-safeguard/learnings-buffer.js +0 -91
- package/dist/engine/session-safeguard/precompaction-drain.d.ts +0 -10
- package/dist/engine/session-safeguard/precompaction-drain.js +0 -82
- package/dist/engine/session-safeguard/unpushed-detector.d.ts +0 -7
- package/dist/engine/session-safeguard/unpushed-detector.js +0 -59
- package/dist/engine/spec-changelog/core.d.ts +0 -16
- package/dist/engine/spec-changelog/core.js +0 -176
- package/dist/engine/spec-changelog/diff.d.ts +0 -18
- package/dist/engine/spec-changelog/diff.js +0 -121
- package/dist/engine/spec-changelog/index.d.ts +0 -3
- package/dist/engine/spec-changelog/index.js +0 -4
- package/dist/engine/trial-engine.d.ts +0 -5
- package/dist/engine/trial-engine.js +0 -14
- package/dist/engine/usage-tracker/rate-check.d.ts +0 -7
- package/dist/engine/usage-tracker/rate-check.js +0 -18
- package/dist/engine/usage-tracker/rate-limiter.d.ts +0 -14
- package/dist/engine/usage-tracker/rate-limiter.js +0 -73
- package/dist/engine/usage-tracker/trial.d.ts +0 -27
- package/dist/engine/usage-tracker/trial.js +0 -49
- package/dist/engine/webhook/event-handlers.d.ts +0 -25
- package/dist/engine/webhook/event-handlers.js +0 -89
- package/dist/engine/webhook/index.d.ts +0 -4
- package/dist/engine/webhook/index.js +0 -5
- package/dist/engine/webhook/server.d.ts +0 -12
- package/dist/engine/webhook/server.js +0 -249
- package/dist/engine/webhook/signature.d.ts +0 -16
- package/dist/engine/webhook/signature.js +0 -49
- package/dist/storage/license-store.d.ts +0 -6
- package/dist/storage/license-store.js +0 -63
- package/dist/storage/session-store.d.ts +0 -20
- package/dist/storage/session-store.js +0 -136
- package/dist/tools/activate-license.d.ts +0 -6
- package/dist/tools/activate-license.js +0 -132
- package/dist/tools/checkpoint-handler.d.ts +0 -3
- package/dist/tools/checkpoint-handler.js +0 -130
- package/dist/tools/export-session.d.ts +0 -3
- package/dist/tools/export-session.js +0 -90
- package/dist/tools/license-gate.d.ts +0 -18
- package/dist/tools/license-gate.js +0 -222
- package/dist/tools/license-status.d.ts +0 -3
- package/dist/tools/license-status.js +0 -93
- package/dist/tools/list-sessions.d.ts +0 -3
- package/dist/tools/list-sessions.js +0 -46
- package/dist/tools/planu-session-checkpoint.d.ts +0 -6
- package/dist/tools/planu-session-checkpoint.js +0 -42
- package/dist/tools/restore-session.d.ts +0 -3
- package/dist/tools/restore-session.js +0 -71
- package/dist/tools/spec-history.d.ts +0 -3
- package/dist/tools/spec-history.js +0 -59
- package/dist/tools/webhook.d.ts +0 -6
- package/dist/tools/webhook.js +0 -150
- package/dist/types/changelog.d.ts +0 -49
- package/dist/types/changelog.js +0 -3
- package/dist/types/licensing.d.ts +0 -109
- package/dist/types/licensing.js +0 -4
- package/dist/types/product-intelligence.d.ts +0 -60
- package/dist/types/product-intelligence.js +0 -3
- package/dist/types/session.d.ts +0 -84
- package/dist/types/session.js +0 -3
- package/dist/types/webhook.d.ts +0 -62
- package/dist/types/webhook.js +0 -4
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tiers": {
|
|
3
|
-
"free": {
|
|
4
|
-
"maxProjects": 2,
|
|
5
|
-
"maxActiveSpecs": 5
|
|
6
|
-
},
|
|
7
|
-
"pro": {
|
|
8
|
-
"maxProjects": 10,
|
|
9
|
-
"maxActiveSpecs": 999999
|
|
10
|
-
},
|
|
11
|
-
"team": {
|
|
12
|
-
"maxProjects": 999999,
|
|
13
|
-
"maxActiveSpecs": 999999
|
|
14
|
-
},
|
|
15
|
-
"enterprise": {
|
|
16
|
-
"maxProjects": 999999,
|
|
17
|
-
"maxActiveSpecs": 999999
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"freeTools": [
|
|
21
|
-
"activate_group",
|
|
22
|
-
"agent_run_history",
|
|
23
|
-
"analyze_performance_impact",
|
|
24
|
-
"analyze_spec_dependencies",
|
|
25
|
-
"approval_status",
|
|
26
|
-
"approve_spec",
|
|
27
|
-
"architecture_lint",
|
|
28
|
-
"assess_merge_risk",
|
|
29
|
-
"assign_role",
|
|
30
|
-
"audit_claude_config",
|
|
31
|
-
"audit_log_export",
|
|
32
|
-
"audit_schema_type_parity",
|
|
33
|
-
"audit_specs_drift",
|
|
34
|
-
"audit_trail",
|
|
35
|
-
"bump_spec_version",
|
|
36
|
-
"cancel_job",
|
|
37
|
-
"challenge_spec",
|
|
38
|
-
"check_compliance",
|
|
39
|
-
"check_config_health",
|
|
40
|
-
"check_parallel_safety",
|
|
41
|
-
"check_readiness",
|
|
42
|
-
"check_spec_accuracy",
|
|
43
|
-
"check_update_status",
|
|
44
|
-
"check_versions",
|
|
45
|
-
"clarify_requirements",
|
|
46
|
-
"code_graph_status",
|
|
47
|
-
"compliance_coverage_report",
|
|
48
|
-
"compliance_gap_analysis",
|
|
49
|
-
"compliance_gate_status",
|
|
50
|
-
"compliance_score_report",
|
|
51
|
-
"config_health",
|
|
52
|
-
"configure_approval_policy",
|
|
53
|
-
"configure_code_graph",
|
|
54
|
-
"configure_compliance",
|
|
55
|
-
"configure_deploy_target",
|
|
56
|
-
"configure_memory",
|
|
57
|
-
"configure_oauth",
|
|
58
|
-
"configure_observability",
|
|
59
|
-
"configure_roles",
|
|
60
|
-
"configure_squad",
|
|
61
|
-
"configure_tdd_policy",
|
|
62
|
-
"configure_telemetry",
|
|
63
|
-
"configure_webhook",
|
|
64
|
-
"configure_workers",
|
|
65
|
-
"consult_docs",
|
|
66
|
-
"context_budget",
|
|
67
|
-
"convert_to_bdd",
|
|
68
|
-
"coverage_gap_analyzer",
|
|
69
|
-
"create_rule",
|
|
70
|
-
"create_skill",
|
|
71
|
-
"create_spec",
|
|
72
|
-
"data_governance",
|
|
73
|
-
"data_retention_policy",
|
|
74
|
-
"decompose_spec",
|
|
75
|
-
"define_spec_lint_rule",
|
|
76
|
-
"define_ui_contract",
|
|
77
|
-
"delete_spec_lint_rule",
|
|
78
|
-
"deploy_spec",
|
|
79
|
-
"deploy_status",
|
|
80
|
-
"detect_agent",
|
|
81
|
-
"detect_drift",
|
|
82
|
-
"discover_docs_url",
|
|
83
|
-
"discover_mcps",
|
|
84
|
-
"discover_registry",
|
|
85
|
-
"dogfood_watch",
|
|
86
|
-
"ears_lint",
|
|
87
|
-
"ecosystem_status",
|
|
88
|
-
"enable_auto_update",
|
|
89
|
-
"estimate",
|
|
90
|
-
"estimate_ai_cost",
|
|
91
|
-
"eval_rule",
|
|
92
|
-
"eval_skill",
|
|
93
|
-
"export_audit_trail",
|
|
94
|
-
"export_spec",
|
|
95
|
-
"expose_spec_as_prompt",
|
|
96
|
-
"facilitate",
|
|
97
|
-
"feedback_status",
|
|
98
|
-
"gc_data_projects",
|
|
99
|
-
"generate_api_client",
|
|
100
|
-
"generate_attestation",
|
|
101
|
-
"generate_automation_guide",
|
|
102
|
-
"generate_batch_script",
|
|
103
|
-
"generate_checklist",
|
|
104
|
-
"generate_compliance_report",
|
|
105
|
-
"generate_compliance_tests",
|
|
106
|
-
"generate_diagram",
|
|
107
|
-
"generate_docs",
|
|
108
|
-
"generate_docs_site",
|
|
109
|
-
"generate_edge_tests",
|
|
110
|
-
"generate_execution_plan",
|
|
111
|
-
"generate_ide_config",
|
|
112
|
-
"generate_orchestration_script",
|
|
113
|
-
"generate_proposal",
|
|
114
|
-
"generate_rules",
|
|
115
|
-
"generate_skill",
|
|
116
|
-
"generate_spec_dashboard",
|
|
117
|
-
"generate_spec_from_issue",
|
|
118
|
-
"generate_sub_agent",
|
|
119
|
-
"generate_tests",
|
|
120
|
-
"generate_validation_schema",
|
|
121
|
-
"graph_specs",
|
|
122
|
-
"get_job",
|
|
123
|
-
"guided_tour",
|
|
124
|
-
"heal_spec_docs",
|
|
125
|
-
"init_constitution",
|
|
126
|
-
"init_project",
|
|
127
|
-
"integrate_pm",
|
|
128
|
-
"issue_reviewer_token",
|
|
129
|
-
"learn_pattern",
|
|
130
|
-
"legal_compliance_report",
|
|
131
|
-
"list_groups",
|
|
132
|
-
"list_registered_projects",
|
|
133
|
-
"list_spec_lint_rules",
|
|
134
|
-
"list_spec_prompts",
|
|
135
|
-
"list_specs",
|
|
136
|
-
"living_reconcile_spec",
|
|
137
|
-
"manage_context",
|
|
138
|
-
"manage_git",
|
|
139
|
-
"manage_plugins",
|
|
140
|
-
"memory_status",
|
|
141
|
-
"multi_agent_review",
|
|
142
|
-
"onboarding_checklist",
|
|
143
|
-
"onboarding_progress",
|
|
144
|
-
"orchestrate",
|
|
145
|
-
"oauth_status",
|
|
146
|
-
"outbound_webhook_status",
|
|
147
|
-
"package_handoff",
|
|
148
|
-
"paradigm_report",
|
|
149
|
-
"planu_status",
|
|
150
|
-
"publish_registry",
|
|
151
|
-
"quick_start",
|
|
152
|
-
"recommend_model",
|
|
153
|
-
"reconcile_hooks",
|
|
154
|
-
"reconcile_rules",
|
|
155
|
-
"reconcile_skills",
|
|
156
|
-
"reconcile_spec",
|
|
157
|
-
"reconcile_universal_rules",
|
|
158
|
-
"red_team",
|
|
159
|
-
"register_project_path",
|
|
160
|
-
"registry_install",
|
|
161
|
-
"registry_login",
|
|
162
|
-
"registry_logout",
|
|
163
|
-
"registry_publish",
|
|
164
|
-
"registry_search",
|
|
165
|
-
"registry_whoami",
|
|
166
|
-
"remove_webhook",
|
|
167
|
-
"render_spec_for_provider",
|
|
168
|
-
"repair_frontmatter_drift",
|
|
169
|
-
"request_changes",
|
|
170
|
-
"resolve_feedback",
|
|
171
|
-
"restart_job",
|
|
172
|
-
"reverse_engineer",
|
|
173
|
-
"rewrite_criteria_ears",
|
|
174
|
-
"run_mutation_hints",
|
|
175
|
-
"run_spec_lint",
|
|
176
|
-
"scaffold_plugin",
|
|
177
|
-
"scan_orphan_spec_refs",
|
|
178
|
-
"scan_project",
|
|
179
|
-
"search_all_projects",
|
|
180
|
-
"security_report",
|
|
181
|
-
"set_locale",
|
|
182
|
-
"set_work_mode",
|
|
183
|
-
"skill_install",
|
|
184
|
-
"skill_search",
|
|
185
|
-
"solid_check",
|
|
186
|
-
"spec_coverage",
|
|
187
|
-
"spec_obesity_healer",
|
|
188
|
-
"squad_status",
|
|
189
|
-
"ssr_back_migration",
|
|
190
|
-
"start_oauth_flow",
|
|
191
|
-
"start_onboarding",
|
|
192
|
-
"storage_export",
|
|
193
|
-
"storage_import",
|
|
194
|
-
"storage_paths",
|
|
195
|
-
"suggest_mcp_server",
|
|
196
|
-
"suggest_mcps",
|
|
197
|
-
"suggest_stack",
|
|
198
|
-
"suggest_token_optimizer",
|
|
199
|
-
"suggest_tooling",
|
|
200
|
-
"summarize_spec",
|
|
201
|
-
"submit_feedback",
|
|
202
|
-
"sync_ai_configs",
|
|
203
|
-
"sync_feedback",
|
|
204
|
-
"sync_spec_state",
|
|
205
|
-
"tdd_scaffold",
|
|
206
|
-
"tdd_status",
|
|
207
|
-
"telemetry_health",
|
|
208
|
-
"token_optimizer_status",
|
|
209
|
-
"transform_code",
|
|
210
|
-
"triage_feedback",
|
|
211
|
-
"triage_request",
|
|
212
|
-
"type_safety_gate",
|
|
213
|
-
"unregister_project_path",
|
|
214
|
-
"update_registry",
|
|
215
|
-
"update_status",
|
|
216
|
-
"update_status_batch",
|
|
217
|
-
"validate",
|
|
218
|
-
"validate_api_contract",
|
|
219
|
-
"validate_browser",
|
|
220
|
-
"validate_criteria_quality",
|
|
221
|
-
"validate_docs_registry",
|
|
222
|
-
"validate_workflow",
|
|
223
|
-
"verify_integrations",
|
|
224
|
-
"verify_spec_compliance",
|
|
225
|
-
"watch_job",
|
|
226
|
-
"worker_status"
|
|
227
|
-
],
|
|
228
|
-
"proTools": ["audit", "design_schema", "generate_adr", "security_check"],
|
|
229
|
-
"alwaysAllowed": [
|
|
230
|
-
"activate_license",
|
|
231
|
-
"configure_compliance_gate",
|
|
232
|
-
"deactivate_license",
|
|
233
|
-
"fix_schema_type_parity",
|
|
234
|
-
"license_status",
|
|
235
|
-
"pin_version",
|
|
236
|
-
"start_dashboard",
|
|
237
|
-
"start_webhook",
|
|
238
|
-
"stop_dashboard",
|
|
239
|
-
"stop_webhook",
|
|
240
|
-
"tool_usage_report",
|
|
241
|
-
"usage_report",
|
|
242
|
-
"usage_stats",
|
|
243
|
-
"webhook_status"
|
|
244
|
-
],
|
|
245
|
-
"variantMapping": {
|
|
246
|
-
"Planu Pro": "pro",
|
|
247
|
-
"Planu Team": "team"
|
|
248
|
-
},
|
|
249
|
-
"upgradeUrl": "https://planu.dev/pricing",
|
|
250
|
-
"freeUntil": "2026-05-13"
|
|
251
|
-
}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import rawProductPublic from './product-public.json' with { type: 'json' };
|
|
3
|
-
import type { ProductPublicManifest } from '../types/product-public.js';
|
|
4
|
-
|
|
5
|
-
const nonBlank = z.string().trim().min(1).max(512);
|
|
6
|
-
const pathSegment = z.string().regex(/^[A-Za-z0-9-]+$/u);
|
|
7
|
-
const navItemSchema = z.object({ text: nonBlank, path: nonBlank }).strict();
|
|
8
|
-
const chromeSchema = z
|
|
9
|
-
.object({
|
|
10
|
-
footerLead: nonBlank,
|
|
11
|
-
support: nonBlank,
|
|
12
|
-
changelog: nonBlank,
|
|
13
|
-
reportBug: nonBlank,
|
|
14
|
-
appearance: nonBlank,
|
|
15
|
-
lightTheme: nonBlank,
|
|
16
|
-
darkTheme: nonBlank,
|
|
17
|
-
sidebar: nonBlank,
|
|
18
|
-
top: nonBlank,
|
|
19
|
-
language: nonBlank,
|
|
20
|
-
skip: nonBlank,
|
|
21
|
-
outline: nonBlank,
|
|
22
|
-
previous: nonBlank,
|
|
23
|
-
next: nonBlank,
|
|
24
|
-
search: nonBlank,
|
|
25
|
-
noResults: nonBlank,
|
|
26
|
-
})
|
|
27
|
-
.strict();
|
|
28
|
-
const localeSchema = z
|
|
29
|
-
.object({
|
|
30
|
-
id: pathSegment,
|
|
31
|
-
contentLocale: z.enum(['en', 'es', 'pt', 'fr', 'de', 'zh']),
|
|
32
|
-
label: nonBlank,
|
|
33
|
-
lang: nonBlank,
|
|
34
|
-
hreflang: nonBlank,
|
|
35
|
-
ogLocale: nonBlank,
|
|
36
|
-
nav: z.array(navItemSchema).length(4),
|
|
37
|
-
chrome: chromeSchema,
|
|
38
|
-
})
|
|
39
|
-
.strict();
|
|
40
|
-
const donationSchema = z
|
|
41
|
-
.object({
|
|
42
|
-
id: z.enum(['btc', 'eth', 'sol']),
|
|
43
|
-
symbol: nonBlank,
|
|
44
|
-
network: nonBlank,
|
|
45
|
-
address: nonBlank,
|
|
46
|
-
qrPath: z.string().regex(/^\/donations\/[a-z0-9-]+\.svg$/u),
|
|
47
|
-
walletUri: z.url().nullable(),
|
|
48
|
-
})
|
|
49
|
-
.strict();
|
|
50
|
-
|
|
51
|
-
export const productPublicSchema = z
|
|
52
|
-
.object({
|
|
53
|
-
schemaVersion: z.literal(1),
|
|
54
|
-
website: z
|
|
55
|
-
.object({
|
|
56
|
-
baseUrl: z.url(),
|
|
57
|
-
defaultLocale: pathSegment,
|
|
58
|
-
theme: z
|
|
59
|
-
.object({
|
|
60
|
-
defaultAppearance: z.literal('system'),
|
|
61
|
-
allowUserToggle: z.boolean(),
|
|
62
|
-
})
|
|
63
|
-
.strict(),
|
|
64
|
-
disabledRouteSegments: z.array(pathSegment).min(1),
|
|
65
|
-
locales: z.array(localeSchema).min(2),
|
|
66
|
-
newsletter: z
|
|
67
|
-
.object({
|
|
68
|
-
enabled: z.boolean(),
|
|
69
|
-
provider: z.enum(['none']),
|
|
70
|
-
signupUrl: z.url().nullable(),
|
|
71
|
-
})
|
|
72
|
-
.strict(),
|
|
73
|
-
sponsors: z
|
|
74
|
-
.object({
|
|
75
|
-
enabled: z.boolean(),
|
|
76
|
-
pagePath: z.string().startsWith('/'),
|
|
77
|
-
githubUrl: z.url(),
|
|
78
|
-
contactEmail: z.email(),
|
|
79
|
-
})
|
|
80
|
-
.strict(),
|
|
81
|
-
})
|
|
82
|
-
.strict(),
|
|
83
|
-
donations: z.array(donationSchema).length(3),
|
|
84
|
-
claims: z
|
|
85
|
-
.object({
|
|
86
|
-
installCommand: nonBlank,
|
|
87
|
-
publicToolInventory: z.array(pathSegment.or(z.string().regex(/^[a-z][a-z0-9_]+$/u))).min(1),
|
|
88
|
-
registryReadmeBaseline: z
|
|
89
|
-
.object({
|
|
90
|
-
package: z.literal('@planu/cli'),
|
|
91
|
-
version: z.string().regex(/^\d+\.\d+\.\d+$/u),
|
|
92
|
-
sha256: z.string().regex(/^[a-f0-9]{64}$/u),
|
|
93
|
-
})
|
|
94
|
-
.strict(),
|
|
95
|
-
})
|
|
96
|
-
.strict(),
|
|
97
|
-
})
|
|
98
|
-
.strict()
|
|
99
|
-
.superRefine((value, context) => {
|
|
100
|
-
const localeIds = value.website.locales.map(({ id }) => id);
|
|
101
|
-
const donationIds = value.donations.map(({ id }) => id);
|
|
102
|
-
const tools = value.claims.publicToolInventory;
|
|
103
|
-
for (const [items, path] of [
|
|
104
|
-
[localeIds, ['website', 'locales']],
|
|
105
|
-
[donationIds, ['donations']],
|
|
106
|
-
[tools, ['claims', 'publicToolInventory']],
|
|
107
|
-
] as [string[], (string | number)[]][]) {
|
|
108
|
-
if (new Set(items).size !== items.length) {
|
|
109
|
-
context.addIssue({ code: 'custom', message: 'Entries must be unique', path });
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (!localeIds.includes(value.website.defaultLocale)) {
|
|
113
|
-
context.addIssue({
|
|
114
|
-
code: 'custom',
|
|
115
|
-
message: 'Default locale must reference a declared locale',
|
|
116
|
-
path: ['website', 'defaultLocale'],
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
if (value.website.newsletter.enabled || value.website.newsletter.signupUrl !== null) {
|
|
120
|
-
context.addIssue({
|
|
121
|
-
code: 'custom',
|
|
122
|
-
message: 'Newsletter provider must be configured before enabling subscriptions',
|
|
123
|
-
path: ['website', 'newsletter'],
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
let cachedManifest: ProductPublicManifest | undefined;
|
|
129
|
-
|
|
130
|
-
export function parseProductPublicManifest(input: unknown): ProductPublicManifest {
|
|
131
|
-
const result = productPublicSchema.safeParse(input);
|
|
132
|
-
if (!result.success) {
|
|
133
|
-
const issue = result.error.issues[0];
|
|
134
|
-
const issuePath = issue?.path.join('.');
|
|
135
|
-
const location = issuePath?.length ? issuePath : 'root';
|
|
136
|
-
throw new Error(
|
|
137
|
-
`[Planu] Invalid public product manifest at ${location}: ${issue?.message ?? 'unknown error'}`,
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
return result.data;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export function getProductPublicManifest(): ProductPublicManifest {
|
|
144
|
-
cachedManifest ??= parseProductPublicManifest(rawProductPublic);
|
|
145
|
-
return cachedManifest;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export const productPublic = getProductPublicManifest();
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
// server-instructions.ts — LLM instructions injected into the MCP server on startup.
|
|
2
|
-
// Extracted from index.ts to keep the entry point lean.
|
|
3
|
-
|
|
4
|
-
export const SERVER_INSTRUCTIONS = [
|
|
5
|
-
'CONTEXT — Why structured specs matter:',
|
|
6
|
-
'- Vibe Coding (describing features informally to AI) creates technical debt at scale',
|
|
7
|
-
'- The bottleneck has moved from writing code to validating whether generated code is correct',
|
|
8
|
-
'- Spec Driven Development is BDD for the AI era: specify behavior before implementation',
|
|
9
|
-
'- Planu enforces this: spec first, then implement, then validate — no exceptions',
|
|
10
|
-
'',
|
|
11
|
-
'You are Planu — a friendly assistant that helps people plan and organize software projects.',
|
|
12
|
-
'',
|
|
13
|
-
'AUTONOMOUS WORKFLOW — zero configuration required:',
|
|
14
|
-
'- When the user describes something they want to BUILD, CREATE, ADD, or IMPLEMENT (features, systems, fixes, integrations), ALWAYS use the Spec-Driven Development workflow:',
|
|
15
|
-
' 1. If the project has NOT been initialized yet (first interaction), run init_project with the project path first',
|
|
16
|
-
' 2. Use create_spec to create a detailed plan — present it conversationally and ask for approval',
|
|
17
|
-
' 3. NEVER write production code without an approved spec — the spec is a contract between you and the user',
|
|
18
|
-
' 4. After implementation, suggest running validate to check compliance',
|
|
19
|
-
'- The user should NEVER need to type command names or know tool names — they just describe what they want naturally',
|
|
20
|
-
' - "I want payments with Stripe" → you create a spec, get approval, then implement',
|
|
21
|
-
' - "Add Google login" → same flow: spec first, then code',
|
|
22
|
-
' - "Fix the bug where users can\'t upload files" → create a bugfix spec, then fix',
|
|
23
|
-
'- If the user explicitly asks to skip the workflow (e.g., "just add a console.log", "quick fix this typo"), respect their wish',
|
|
24
|
-
'- After EVERY tool call, summarize the result in plain language — never show raw JSON to the user',
|
|
25
|
-
'- When showing spec details, format them as readable markdown with emojis — not JSON dumps',
|
|
26
|
-
'',
|
|
27
|
-
'CRITICAL UX RULES — follow these in EVERY interaction:',
|
|
28
|
-
'',
|
|
29
|
-
'1. ALWAYS explain technical terms in plain language. Your users may not be developers.',
|
|
30
|
-
' - "spec" → "a detailed plan for a feature — like a blueprint before building a house"',
|
|
31
|
-
' - "draft" → "a first version that is not finished yet — you can still change it"',
|
|
32
|
-
' - "review" → "the plan is ready for someone to check before approving it"',
|
|
33
|
-
' - "approved" → "the plan has been approved and is ready to be built"',
|
|
34
|
-
' - "implementing" → "someone is actively building this feature right now"',
|
|
35
|
-
' - "done" → "the feature is finished and matches what the plan described"',
|
|
36
|
-
' - "drift" → "when the code no longer matches what the plan says — like building a house that does not match the blueprint"',
|
|
37
|
-
' - "constitution" → "a set of rules your project always follows — like ground rules for quality"',
|
|
38
|
-
' - "ADR" → "a record of an important technical decision — why you chose X over Y"',
|
|
39
|
-
' - "schema" → "the structure of your database — what tables and fields store your data"',
|
|
40
|
-
' - "UI contract" → "a description of how your screens work — what each component shows and does"',
|
|
41
|
-
' - "acceptance criteria" → "a checklist of conditions that must be true for a feature to be considered done"',
|
|
42
|
-
' - "coverage" → "how much of the plan has actually been built — shown as a percentage"',
|
|
43
|
-
' - "audit" → "a health check of your code — finds problems and gives you a score"',
|
|
44
|
-
' - "PII" → "personal data like names, emails, or phone numbers that need special protection"',
|
|
45
|
-
' - "migration" → "moving your project from one technology to another"',
|
|
46
|
-
' - "stack" → "the set of technologies your project uses (language, framework, database, etc.)"',
|
|
47
|
-
' - "orchestration" → "coordinating multiple AI agents to work on different parts of your project at the same time"',
|
|
48
|
-
' - "handoff" → "a package of instructions so an AI agent knows exactly what to build"',
|
|
49
|
-
' - "readiness" → "whether a plan has enough detail to start building"',
|
|
50
|
-
' - "reconcile" → "updating a plan to match changes that happened during building"',
|
|
51
|
-
'',
|
|
52
|
-
'2. Be conversational and warm. Guide the user step by step.',
|
|
53
|
-
'3. After every tool result, summarize what happened in simple terms.',
|
|
54
|
-
'4. When presenting lists or results, use plain language headers — not jargon.',
|
|
55
|
-
'5. If the user seems confused, offer to explain further. Never assume knowledge.',
|
|
56
|
-
"6. Adapt your language to the user's locale (English, Spanish, or Portuguese).",
|
|
57
|
-
' EXCEPTION: spec.md files must ALWAYS be written in English regardless of locale.',
|
|
58
|
-
' The user-facing narrative (tool response text) is translated; spec docs are always English.',
|
|
59
|
-
'',
|
|
60
|
-
'INTERACTIVE QUESTIONS — HARD GATE enforcement (SPEC-584):',
|
|
61
|
-
'GENERAL RULE: Whenever you would ask the user ANY question — follow-up after a tool call, clarification,',
|
|
62
|
-
'"what do you want to do next?", or any decision — you MUST use AskUserQuestion. NEVER write a question',
|
|
63
|
-
'as plain text. No exceptions.',
|
|
64
|
-
'When ANY tool response includes structuredContent.interactiveQuestions[]:',
|
|
65
|
-
'- You MUST call AskUserQuestion immediately — NEVER output the question as plain text.',
|
|
66
|
-
'- Map each interactiveQuestion to AskUserQuestion: use question as the prompt, options[].label as choices.',
|
|
67
|
-
'- Do NOT summarize or paraphrase the question. Relay it verbatim via AskUserQuestion.',
|
|
68
|
-
'- Do NOT continue with any other action until the user answers.',
|
|
69
|
-
'- After the user answers, retry the same tool with clarificationAnswers: { <questionKey>: <selectedLabel>, ... }.',
|
|
70
|
-
'- WARNING: Calling a tool again WITHOUT clarificationAnswers when a pending clarification exists returns isError: true.',
|
|
71
|
-
' The server will block the call until you provide answers. There is no way to bypass this gate.',
|
|
72
|
-
'',
|
|
73
|
-
'GIT WORKFLOW — automatic branch management:',
|
|
74
|
-
'- Planu automatically detects your git workflow (gitflow, github-flow, or trunk-based) by checking which branches exist.',
|
|
75
|
-
'- When creating a spec, Planu auto-creates a feature branch from the correct base branch (develop for gitflow, main for github-flow).',
|
|
76
|
-
'- The base branch is fetched and updated before creating the feature branch — no manual git pull needed.',
|
|
77
|
-
'- If there are uncommitted changes, Planu warns instead of risking data loss.',
|
|
78
|
-
'- Use manage_git with action "auto-setup" to manually trigger branch setup for an existing spec.',
|
|
79
|
-
'- Available git actions: create-branch, generate-pr, link-commits, generate-changelog, setup-hooks, check-branch, status, sync-branch, check-gitflow, resolve-conflict, breaking-check, release, hotfix, promote, auto-setup.',
|
|
80
|
-
'- Branch naming convention: feat/SPEC-XXX-short-name for features, fix/SPEC-XXX-short-name for fixes.',
|
|
81
|
-
'- Explain why: "Working in a separate branch keeps your main code safe while you build this feature. When it is ready, you merge it back."',
|
|
82
|
-
'',
|
|
83
|
-
'SPEC APPROVAL FLOW — MANDATORY after every create_spec:',
|
|
84
|
-
'- After creating a spec, ALWAYS present a clear summary to the user and ask: "Do you approve this spec, or do you have changes/observations?"',
|
|
85
|
-
'- If the user APPROVES: call update_status to move the spec from "draft" to "review", then to "approved".',
|
|
86
|
-
'- If the user has OBSERVATIONS or wants changes: call update_status with status="draft" and include their feedback in the reviewNotes field. Then revise the spec and ask again.',
|
|
87
|
-
'- NEVER start implementing a spec without explicit user approval. The spec is a contract — both sides must agree.',
|
|
88
|
-
'- When creating multiple specs at once, present ALL specs for review and let the user approve/reject each one individually.',
|
|
89
|
-
'- The reviewNotes field stores a history of all feedback — implementers can see what was requested and why.',
|
|
90
|
-
'',
|
|
91
|
-
'SKILL DISCOVERY — proactive search, mandatory in these situations:',
|
|
92
|
-
'1. AFTER init_project: call skill_search for EACH technology in the detected stack.',
|
|
93
|
-
' - Use the actual detected values: language, framework, database, key stack entries.',
|
|
94
|
-
' - Works for ANY stack: Python, Go, Rust, Java, Ruby, PHP, .NET — not just JavaScript.',
|
|
95
|
-
' - Example: stack has [Django, PostgreSQL, Celery] → call skill_search("django"), skill_search("postgresql").',
|
|
96
|
-
' - Example: stack has [Next.js, Tailwind, Prisma] → call skill_search("nextjs"), skill_search("prisma").',
|
|
97
|
-
' - Present the top 5 results grouped by technology and offer to install the most relevant.',
|
|
98
|
-
' - ALSO search for design/marketing skills when the project has brand or product signals:',
|
|
99
|
-
' * Signals: projectPath contains "landing"/"marketing"/"brand", stack has "website"/"saas"/"startup",',
|
|
100
|
-
' apps[] has marketing-named entries, or README mentions logo/brand/landing.',
|
|
101
|
-
' * When detected: call skill_search("logo design"), skill_search("banner design"),',
|
|
102
|
-
' skill_search("brand identity"), skill_search("og image"), skill_search("favicon generator").',
|
|
103
|
-
' * Present these alongside technical skills — visual assets matter as much as code.',
|
|
104
|
-
'2. BEFORE implementing any repeatable pattern: call skill_search with the pattern name.',
|
|
105
|
-
' - "add authentication" → skill_search("authentication " + detected_framework)',
|
|
106
|
-
' - "setup CI/CD" → skill_search("github actions") or skill_search("gitlab ci")',
|
|
107
|
-
'3. When the user mentions any technology by name: call skill_search with that term.',
|
|
108
|
-
'- If a matching skill is found: show it, offer to install with skill_install.',
|
|
109
|
-
'- If no skill found: proceed normally and note there are no community skills for that technology yet.',
|
|
110
|
-
'- Explain: "Skills are community-curated guides that encode best practices for this technology."',
|
|
111
|
-
'',
|
|
112
|
-
'RESPONSE FORMAT — MANDATORY for all tool results:',
|
|
113
|
-
'- NEVER show raw JSON.stringify output to the user — always format as readable markdown',
|
|
114
|
-
'- Use emojis for visual hierarchy: ✅ success, ⚠️ warning, ❌ error, 🚀 next steps, 📊 stats',
|
|
115
|
-
'- Always include actionable next steps after every operation',
|
|
116
|
-
'- Put machine-readable data in structuredContent, human-readable narrative in content[].text',
|
|
117
|
-
'- When presenting specs, show: title, summary, key acceptance criteria, estimated effort — not the full JSON',
|
|
118
|
-
'',
|
|
119
|
-
'IDEAS BACKLOG — automatic capture:',
|
|
120
|
-
'- When a user expresses a non-urgent idea or future possibility (phrases like "sería bueno", "a futuro", "se me ocurre", "what if", "maybe we could"), call capture_idea automatically without asking. Confirm in one line.',
|
|
121
|
-
].join('\n');
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
// config/version-defaults.ts — Central registry loader for default-versions.json
|
|
2
|
-
// All hardcoded versions in the codebase are sourced from this file.
|
|
3
|
-
|
|
4
|
-
import { readFileSync } from 'node:fs';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
import { join, dirname } from 'node:path';
|
|
7
|
-
import type { VersionDefaults } from '../types/infrastructure.js';
|
|
8
|
-
|
|
9
|
-
const FALLBACK: VersionDefaults = {
|
|
10
|
-
docker: {},
|
|
11
|
-
terraform: {},
|
|
12
|
-
npm: {},
|
|
13
|
-
jvm: {},
|
|
14
|
-
scala: {},
|
|
15
|
-
elixir: {},
|
|
16
|
-
dart: {},
|
|
17
|
-
rust: {},
|
|
18
|
-
cdn: {},
|
|
19
|
-
standards: {},
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
function loadDefaults(): VersionDefaults {
|
|
23
|
-
try {
|
|
24
|
-
const dir = dirname(fileURLToPath(import.meta.url));
|
|
25
|
-
const raw = readFileSync(join(dir, 'default-versions.json'), 'utf-8');
|
|
26
|
-
return JSON.parse(raw) as VersionDefaults;
|
|
27
|
-
} catch {
|
|
28
|
-
return FALLBACK;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const defaults: VersionDefaults = loadDefaults();
|
|
33
|
-
|
|
34
|
-
export function getDockerTag(service: string): string {
|
|
35
|
-
return defaults.docker[service]?.tag ?? 'latest';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function getTerraformVersion(resource: string): string {
|
|
39
|
-
return defaults.terraform[resource]?.version ?? '';
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function getNpmVersion(pkg: string): string {
|
|
43
|
-
return defaults.npm[pkg]?.version ?? 'latest';
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export function getJvmVersion(lib: string): string {
|
|
47
|
-
return defaults.jvm[lib]?.version ?? '';
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export function getScalaVersion(tool: string): string {
|
|
51
|
-
return defaults.scala[tool]?.version ?? '';
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function getElixirVersion(dep: string): string {
|
|
55
|
-
return defaults.elixir[dep]?.version ?? '';
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function getDartVersion(pkg: string): string {
|
|
59
|
-
return defaults.dart[pkg]?.version ?? '';
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export function getRustVersion(crate: string): string {
|
|
63
|
-
return defaults.rust[crate]?.version ?? '';
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export function getCdnUrl(name: string): string {
|
|
67
|
-
const entry = defaults.cdn[name];
|
|
68
|
-
if (!entry) {
|
|
69
|
-
return '';
|
|
70
|
-
}
|
|
71
|
-
return entry.baseUrl.replace('{version}', entry.version);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export function getStandardVersion(name: string): string {
|
|
75
|
-
return defaults.standards?.[name]?.version ?? '';
|
|
76
|
-
}
|
package/dist/config/version.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// version.ts — reads from package.json at runtime; updated by the local release flow
|
|
2
|
-
|
|
3
|
-
import { readFileSync } from 'node:fs';
|
|
4
|
-
import { dirname, join } from 'node:path';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
|
|
7
|
-
const pkgPath = join(dirname(fileURLToPath(import.meta.url)), '../../package.json');
|
|
8
|
-
function loadVersion(): string {
|
|
9
|
-
const raw: unknown = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
10
|
-
const version =
|
|
11
|
-
typeof raw === 'object' && raw !== null && 'version' in raw ? raw.version : undefined;
|
|
12
|
-
if (
|
|
13
|
-
typeof version !== 'string' ||
|
|
14
|
-
!/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/u.test(version)
|
|
15
|
-
) {
|
|
16
|
-
throw new Error('[Planu] package.json contains an invalid release version');
|
|
17
|
-
}
|
|
18
|
-
return version;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const PLANU_VERSION = loadVersion();
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { GeminiSettings } from '../../../types/gemini-integration.js';
|
|
2
|
-
export declare function generateGeminiSettings(_projectPath: string): GeminiSettings;
|
|
3
|
-
export declare function writeGeminiSettings(projectPath: string): void;
|
|
4
|
-
//# sourceMappingURL=settings-generator.d.ts.map
|