@planu/cli 6.1.0 → 7.1.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/index.d.ts +1 -2
- package/dist/index.js +1 -112
- package/dist/sdd-engine/contracts.d.ts +76 -0
- package/dist/sdd-engine/contracts.js +60 -0
- package/dist/sdd-engine/index.d.ts +5 -0
- package/dist/sdd-engine/index.js +5 -0
- package/dist/sdd-engine/patch-sandbox.d.ts +14 -0
- package/dist/sdd-engine/patch-sandbox.js +173 -0
- package/dist/sdd-engine/server.d.ts +5 -0
- package/dist/sdd-engine/server.js +30 -0
- package/dist/sdd-engine/task-window.d.ts +9 -0
- package/dist/sdd-engine/task-window.js +153 -0
- package/dist/sdd-engine/tools/execution-tools.d.ts +5 -0
- package/dist/sdd-engine/tools/execution-tools.js +138 -0
- package/dist/sdd-engine/tools/format-result.d.ts +4 -0
- package/dist/sdd-engine/tools/format-result.js +22 -0
- package/dist/sdd-engine/tools/workspace-tools.d.ts +3 -0
- package/dist/sdd-engine/tools/workspace-tools.js +193 -0
- package/dist/sdd-engine/tools.d.ts +3 -0
- package/dist/sdd-engine/tools.js +13 -0
- package/dist/types/sdd-engine.d.ts +91 -0
- package/dist/types/sdd-engine.js +2 -0
- package/package.json +2 -2
- package/dist/.planu-build.json +0 -1
- package/dist/cli/colors.d.ts +0 -14
- package/dist/cli/colors.js +0 -26
- package/dist/cli/commands/doctor.d.ts +0 -12
- package/dist/cli/commands/doctor.js +0 -91
- package/dist/cli/commands/init.d.ts +0 -3
- package/dist/cli/commands/init.js +0 -37
- package/dist/cli/commands/job.d.ts +0 -3
- package/dist/cli/commands/job.js +0 -112
- package/dist/cli/commands/list.d.ts +0 -3
- package/dist/cli/commands/list.js +0 -39
- package/dist/cli/commands/package-handoff.d.ts +0 -3
- package/dist/cli/commands/package-handoff.js +0 -75
- package/dist/cli/commands/spec.d.ts +0 -3
- package/dist/cli/commands/spec.js +0 -156
- package/dist/cli/commands/status.d.ts +0 -3
- package/dist/cli/commands/status.js +0 -113
- package/dist/cli/commands/validate.d.ts +0 -3
- package/dist/cli/commands/validate.js +0 -39
- package/dist/cli/formatter.d.ts +0 -26
- package/dist/cli/formatter.js +0 -126
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.js +0 -29
- package/dist/cli/project-detector.d.ts +0 -6
- package/dist/cli/project-detector.js +0 -12
- package/dist/cli/router.d.ts +0 -6
- package/dist/cli/router.js +0 -142
- package/dist/config/architecture-patterns.json +0 -324
- package/dist/config/detection-signals.json +0 -256
- package/dist/config/docs-registry.json +0 -94
- package/dist/config/dor-dod-items.json +0 -194
- package/dist/config/drift-severity.json +0 -22
- package/dist/config/event-brokers.json +0 -63
- package/dist/config/framework-registry/csharp-aspnet.json +0 -67
- package/dist/config/framework-registry/dart-flutter.json +0 -61
- package/dist/config/framework-registry/go-gin.json +0 -62
- package/dist/config/framework-registry/index.json +0 -164
- package/dist/config/framework-registry/java-springboot.json +0 -67
- package/dist/config/framework-registry/php-laravel.json +0 -67
- package/dist/config/framework-registry/python-django.json +0 -72
- package/dist/config/framework-registry/python-fastapi.json +0 -72
- package/dist/config/framework-registry/ruby-rails.json +0 -67
- package/dist/config/framework-registry/rust-actix.json +0 -61
- package/dist/config/framework-registry/swift-swiftui.json +0 -67
- package/dist/config/framework-registry/typescript-angular.json +0 -67
- package/dist/config/framework-registry/typescript-astro.json +0 -61
- package/dist/config/framework-registry/typescript-express.json +0 -67
- package/dist/config/framework-registry/typescript-nestjs.json +0 -62
- package/dist/config/framework-registry/typescript-nextjs.json +0 -82
- package/dist/config/framework-registry/typescript-nuxt.json +0 -67
- package/dist/config/framework-registry/typescript-react.json +0 -77
- package/dist/config/framework-registry/typescript-remix.json +0 -61
- package/dist/config/framework-registry/typescript-sveltekit.json +0 -67
- package/dist/config/framework-registry/typescript-vue.json +0 -72
- package/dist/config/hook-templates/planu-force-ask-user-question.sh +0 -14
- package/dist/config/hook-templates/planu-spec-sanctity.sh +0 -128
- package/dist/config/legacy-artifacts.json +0 -26
- package/dist/config/minimal-implementation-gate.json +0 -149
- package/dist/config/negative-predicate-phrases.json +0 -33
- package/dist/config/official-sdd-tools.d.ts +0 -7
- package/dist/config/official-sdd-tools.js +0 -44
- package/dist/config/out-of-scope-suggestions.json +0 -190
- package/dist/config/paradigm-registry.json +0 -380
- package/dist/config/project-knowledge-graph.json +0 -170
- package/dist/config/readiness-config.json +0 -22
- package/dist/config/registries/error-recovery.json +0 -114
- package/dist/config/registries/legacy-guidance.json +0 -118
- package/dist/config/registries/spec-folder-sanctity.json +0 -4
- package/dist/config/runtime-policy.json +0 -66
- package/dist/config/server-instructions.d.ts +0 -2
- package/dist/config/server-instructions.js +0 -18
- package/dist/config/skill-templates/planu-dogfood-bug.md +0 -43
- package/dist/config/skill-templates/planu-implement.md +0 -42
- package/dist/config/skill-templates/planu-native.md +0 -30
- package/dist/config/skill-templates/planu-new-spec.md +0 -56
- package/dist/config/skill-templates/planu-resume-work.md +0 -51
- package/dist/config/skill-templates/planu-review.md +0 -47
- package/dist/config/skill-templates/planu-validate.md +0 -59
- package/dist/config/stack-signatures.json +0 -793
- package/dist/config/subagent-templates/planu-challenger.md +0 -49
- package/dist/config/subagent-templates/planu-readiness-auditor.md +0 -51
- package/dist/config/subagent-templates/planu-spec-implementer.md +0 -50
- package/dist/config/subagent-templates/planu-validator.md +0 -56
- package/dist/config/technology-registry.json +0 -120
- package/dist/config/version.d.ts +0 -2
- package/dist/config/version.js +0 -20
- package/dist/core/shared/fs.d.ts +0 -10
- package/dist/core/shared/fs.js +0 -89
- package/dist/core/shared/object.d.ts +0 -3
- package/dist/core/shared/object.js +0 -12
- package/dist/core/shared/strings.d.ts +0 -3
- package/dist/core/shared/strings.js +0 -13
- package/dist/core/spec-validator.d.ts +0 -12
- package/dist/core/spec-validator.js +0 -250
- package/dist/engine/abortable-process-runner.d.ts +0 -26
- package/dist/engine/abortable-process-runner.js +0 -308
- package/dist/engine/ai-assurance/index.d.ts +0 -4
- package/dist/engine/ai-assurance/index.js +0 -3
- package/dist/engine/ai-assurance/new-code-gate.d.ts +0 -3
- package/dist/engine/ai-assurance/new-code-gate.js +0 -39
- package/dist/engine/ai-assurance/spec-assurance.d.ts +0 -3
- package/dist/engine/ai-assurance/spec-assurance.js +0 -138
- package/dist/engine/ai-integration/codex/agent-roles-generator.d.ts +0 -12
- package/dist/engine/ai-integration/codex/agent-roles-generator.js +0 -62
- package/dist/engine/ambiguity-scorer.d.ts +0 -13
- package/dist/engine/ambiguity-scorer.js +0 -155
- package/dist/engine/approval-workflow.d.ts +0 -21
- package/dist/engine/approval-workflow.js +0 -82
- package/dist/engine/audit-trail/hasher.d.ts +0 -18
- package/dist/engine/audit-trail/hasher.js +0 -46
- package/dist/engine/auditor-scoring.d.ts +0 -7
- package/dist/engine/auditor-scoring.js +0 -76
- package/dist/engine/build-freshness.d.ts +0 -4
- package/dist/engine/build-freshness.js +0 -170
- package/dist/engine/challenge-prioritizer.d.ts +0 -17
- package/dist/engine/challenge-prioritizer.js +0 -78
- package/dist/engine/clarification-gate/error-builder.d.ts +0 -12
- package/dist/engine/clarification-gate/error-builder.js +0 -33
- package/dist/engine/clarification-gate/gate.d.ts +0 -15
- package/dist/engine/clarification-gate/gate.js +0 -41
- package/dist/engine/clarification-gate/token-store.d.ts +0 -28
- package/dist/engine/clarification-gate/token-store.js +0 -67
- package/dist/engine/coach/i18n.d.ts +0 -11
- package/dist/engine/coach/i18n.js +0 -78
- package/dist/engine/code-scanner/gap-scorer.d.ts +0 -9
- package/dist/engine/code-scanner/gap-scorer.js +0 -89
- package/dist/engine/code-scanner/index.d.ts +0 -9
- package/dist/engine/code-scanner/index.js +0 -15
- package/dist/engine/code-scanner/keyword-extractor.d.ts +0 -11
- package/dist/engine/code-scanner/keyword-extractor.js +0 -88
- package/dist/engine/code-scanner/layer-scanner.d.ts +0 -24
- package/dist/engine/code-scanner/layer-scanner.js +0 -135
- package/dist/engine/compact/tool-list-compactor.d.ts +0 -7
- package/dist/engine/compact/tool-list-compactor.js +0 -87
- package/dist/engine/compact-obj.d.ts +0 -7
- package/dist/engine/compact-obj.js +0 -28
- package/dist/engine/complexity-budget/index.d.ts +0 -2
- package/dist/engine/complexity-budget/index.js +0 -3
- package/dist/engine/complexity-budget/trivial-detector.d.ts +0 -7
- package/dist/engine/complexity-budget/trivial-detector.js +0 -69
- package/dist/engine/config-loader.d.ts +0 -73
- package/dist/engine/config-loader.js +0 -239
- package/dist/engine/constitution/sdd-rules-registry.d.ts +0 -11
- package/dist/engine/constitution/sdd-rules-registry.js +0 -109
- package/dist/engine/context-merger.d.ts +0 -23
- package/dist/engine/context-merger.js +0 -197
- package/dist/engine/contradiction-detector.d.ts +0 -16
- package/dist/engine/contradiction-detector.js +0 -406
- package/dist/engine/convention-scanner/codebase-scanner.d.ts +0 -7
- package/dist/engine/convention-scanner/codebase-scanner.js +0 -390
- package/dist/engine/convention-scanner/convention-parser.d.ts +0 -7
- package/dist/engine/convention-scanner/convention-parser.js +0 -189
- package/dist/engine/convention-scanner/index.d.ts +0 -3
- package/dist/engine/convention-scanner/index.js +0 -5
- package/dist/engine/conventions-ttl.d.ts +0 -8
- package/dist/engine/conventions-ttl.js +0 -75
- package/dist/engine/core-bridge-duplicate-blocks.d.ts +0 -3
- package/dist/engine/core-bridge-duplicate-blocks.js +0 -56
- package/dist/engine/core-bridge-gaps.d.ts +0 -4
- package/dist/engine/core-bridge-gaps.js +0 -75
- package/dist/engine/core-bridge-project-graph.d.ts +0 -9
- package/dist/engine/core-bridge-project-graph.js +0 -499
- package/dist/engine/core-bridge.d.ts +0 -34
- package/dist/engine/core-bridge.js +0 -392
- package/dist/engine/criteria-quality-checker.d.ts +0 -8
- package/dist/engine/criteria-quality-checker.js +0 -55
- package/dist/engine/criterion-identity.d.ts +0 -7
- package/dist/engine/criterion-identity.js +0 -70
- package/dist/engine/data-projects-gc/pattern-matcher.d.ts +0 -21
- package/dist/engine/data-projects-gc/pattern-matcher.js +0 -68
- package/dist/engine/dep-guard/cycle-detector.d.ts +0 -29
- package/dist/engine/dep-guard/cycle-detector.js +0 -83
- package/dist/engine/dep-guard/index.d.ts +0 -3
- package/dist/engine/dep-guard/index.js +0 -3
- package/dist/engine/dependency-evaluator.d.ts +0 -15
- package/dist/engine/dependency-evaluator.js +0 -81
- package/dist/engine/detection-utils.d.ts +0 -13
- package/dist/engine/detection-utils.js +0 -255
- package/dist/engine/dor-dod/dod.d.ts +0 -17
- package/dist/engine/dor-dod/dod.js +0 -98
- package/dist/engine/dor-dod/dor.d.ts +0 -21
- package/dist/engine/dor-dod/dor.js +0 -149
- package/dist/engine/dor-dod/index.d.ts +0 -4
- package/dist/engine/dor-dod/index.js +0 -5
- package/dist/engine/dor-dod/items-loader.d.ts +0 -18
- package/dist/engine/dor-dod/items-loader.js +0 -55
- package/dist/engine/dor-dod/plan.d.ts +0 -8
- package/dist/engine/dor-dod/plan.js +0 -50
- package/dist/engine/dor-dod.d.ts +0 -2
- package/dist/engine/dor-dod.js +0 -4
- package/dist/engine/ears-gate.d.ts +0 -19
- package/dist/engine/ears-gate.js +0 -120
- package/dist/engine/elicitation/answer-extractor.d.ts +0 -4
- package/dist/engine/elicitation/answer-extractor.js +0 -225
- package/dist/engine/elicitation/capability.d.ts +0 -9
- package/dist/engine/elicitation/capability.js +0 -48
- package/dist/engine/elicitation/decision-gap-detector.d.ts +0 -3
- package/dist/engine/elicitation/decision-gap-detector.js +0 -142
- package/dist/engine/elicitation/elicit-helper.d.ts +0 -36
- package/dist/engine/elicitation/elicit-helper.js +0 -113
- package/dist/engine/elicitation/question-grounding-gate.d.ts +0 -3
- package/dist/engine/elicitation/question-grounding-gate.js +0 -103
- package/dist/engine/errors/error-result.d.ts +0 -4
- package/dist/engine/errors/error-result.js +0 -16
- package/dist/engine/errors/error-wrapper.d.ts +0 -4
- package/dist/engine/errors/error-wrapper.js +0 -82
- package/dist/engine/errors/recovery-registry.d.ts +0 -13
- package/dist/engine/errors/recovery-registry.js +0 -96
- package/dist/engine/errors/registry-loader.d.ts +0 -3
- package/dist/engine/errors/registry-loader.js +0 -22
- package/dist/engine/event-detector.d.ts +0 -33
- package/dist/engine/event-detector.js +0 -97
- package/dist/engine/evidence-gates/artifact-reader.d.ts +0 -133
- package/dist/engine/evidence-gates/artifact-reader.js +0 -387
- package/dist/engine/evidence-gates/evidence-autofill.d.ts +0 -15
- package/dist/engine/evidence-gates/evidence-autofill.js +0 -255
- package/dist/engine/evidence-gates/evidence-skeletons.d.ts +0 -19
- package/dist/engine/evidence-gates/evidence-skeletons.js +0 -78
- package/dist/engine/evidence-gates/lifecycle-gate.d.ts +0 -12
- package/dist/engine/evidence-gates/lifecycle-gate.js +0 -293
- package/dist/engine/evidence-gates/reconciliation-freshness.d.ts +0 -11
- package/dist/engine/evidence-gates/reconciliation-freshness.js +0 -73
- package/dist/engine/evidence-index/done-drift.d.ts +0 -7
- package/dist/engine/evidence-index/done-drift.js +0 -91
- package/dist/engine/evidence-index/index-builder.d.ts +0 -10
- package/dist/engine/evidence-index/index-builder.js +0 -202
- package/dist/engine/execution/context.d.ts +0 -19
- package/dist/engine/execution/context.js +0 -130
- package/dist/engine/execution/deadline-io.d.ts +0 -20
- package/dist/engine/execution/deadline-io.js +0 -30
- package/dist/engine/execution/durable-job-heartbeat-runtime.d.ts +0 -4
- package/dist/engine/execution/durable-job-heartbeat-runtime.js +0 -401
- package/dist/engine/execution/job-runtime.d.ts +0 -101
- package/dist/engine/execution/job-runtime.js +0 -319
- package/dist/engine/execution/operation-journal.d.ts +0 -67
- package/dist/engine/execution/operation-journal.js +0 -266
- package/dist/engine/execution/package-handoff-job-executor.d.ts +0 -22
- package/dist/engine/execution/package-handoff-job-executor.js +0 -510
- package/dist/engine/execution/public-job-sanitizer.d.ts +0 -4
- package/dist/engine/execution/public-job-sanitizer.js +0 -31
- package/dist/engine/execution/startup-recovery.d.ts +0 -3
- package/dist/engine/execution/startup-recovery.js +0 -15
- package/dist/engine/execution/validate-job-executor.d.ts +0 -37
- package/dist/engine/execution/validate-job-executor.js +0 -900
- package/dist/engine/execution/validate-job-payload.d.ts +0 -5
- package/dist/engine/execution/validate-job-payload.js +0 -145
- package/dist/engine/execution/validate-job-recovery.d.ts +0 -4
- package/dist/engine/execution/validate-job-recovery.js +0 -47
- package/dist/engine/execution/validate-worker-runtime.d.ts +0 -10
- package/dist/engine/execution/validate-worker-runtime.js +0 -188
- package/dist/engine/execution/validate-worker-thread.d.ts +0 -2
- package/dist/engine/execution/validate-worker-thread.js +0 -65
- package/dist/engine/framework-detector.d.ts +0 -35
- package/dist/engine/framework-detector.js +0 -268
- package/dist/engine/freeze/freeze-checker.d.ts +0 -14
- package/dist/engine/freeze/freeze-checker.js +0 -28
- package/dist/engine/freeze/unlock-token.d.ts +0 -17
- package/dist/engine/freeze/unlock-token.js +0 -30
- package/dist/engine/frontmatter-parser.d.ts +0 -32
- package/dist/engine/frontmatter-parser.js +0 -157
- package/dist/engine/frontmatter-sha/canonicalize.d.ts +0 -9
- package/dist/engine/frontmatter-sha/canonicalize.js +0 -20
- package/dist/engine/frontmatter-sha/compute-sha.d.ts +0 -8
- package/dist/engine/frontmatter-sha/compute-sha.js +0 -14
- package/dist/engine/frontmatter-sha/frozen-fields.d.ts +0 -6
- package/dist/engine/frontmatter-sha/frozen-fields.js +0 -14
- package/dist/engine/frontmatter-sha/index.d.ts +0 -2
- package/dist/engine/frontmatter-sha/index.js +0 -3
- package/dist/engine/git/branch-detector.d.ts +0 -7
- package/dist/engine/git/branch-detector.js +0 -45
- package/dist/engine/git/exec-git.d.ts +0 -2
- package/dist/engine/git/exec-git.js +0 -14
- package/dist/engine/git/git-command-guard.d.ts +0 -2
- package/dist/engine/git/git-command-guard.js +0 -43
- package/dist/engine/git/repository-probe.d.ts +0 -3
- package/dist/engine/git/repository-probe.js +0 -13
- package/dist/engine/handoff-artifacts/implementation-review-reader.d.ts +0 -4
- package/dist/engine/handoff-artifacts/implementation-review-reader.js +0 -86
- package/dist/engine/handoff-artifacts/io.d.ts +0 -51
- package/dist/engine/handoff-artifacts/io.js +0 -200
- package/dist/engine/handoff-artifacts/schema-skeleton.d.ts +0 -5
- package/dist/engine/handoff-artifacts/schema-skeleton.js +0 -108
- package/dist/engine/handoff-artifacts/schemas.d.ts +0 -164
- package/dist/engine/handoff-artifacts/schemas.js +0 -242
- package/dist/engine/handoff-artifacts/validation-result.d.ts +0 -18
- package/dist/engine/handoff-artifacts/validation-result.js +0 -3
- package/dist/engine/handoff-artifacts/version-policy.d.ts +0 -18
- package/dist/engine/handoff-artifacts/version-policy.js +0 -35
- package/dist/engine/handoff-format.d.ts +0 -26
- package/dist/engine/handoff-format.js +0 -253
- package/dist/engine/handoff-packager.d.ts +0 -30
- package/dist/engine/handoff-packager.js +0 -864
- package/dist/engine/host-detection/detect-host.d.ts +0 -10
- package/dist/engine/host-detection/detect-host.js +0 -34
- package/dist/engine/host-rules-templates/index.d.ts +0 -3
- package/dist/engine/host-rules-templates/index.js +0 -4
- package/dist/engine/host-rules-templates/inject-rules-block.d.ts +0 -3
- package/dist/engine/host-rules-templates/inject-rules-block.js +0 -29
- package/dist/engine/host-rules-templates/templates.d.ts +0 -12
- package/dist/engine/host-rules-templates/templates.js +0 -111
- package/dist/engine/host-tool-filter.d.ts +0 -28
- package/dist/engine/host-tool-filter.js +0 -162
- package/dist/engine/human-summary.d.ts +0 -18
- package/dist/engine/human-summary.js +0 -114
- package/dist/engine/implementation-contract/common.d.ts +0 -22
- package/dist/engine/implementation-contract/common.js +0 -47
- package/dist/engine/implementation-contract/evaluator.d.ts +0 -3
- package/dist/engine/implementation-contract/evaluator.js +0 -192
- package/dist/engine/implementation-contract/index.d.ts +0 -4
- package/dist/engine/implementation-contract/index.js +0 -4
- package/dist/engine/implementation-contract/renderer.d.ts +0 -4
- package/dist/engine/implementation-contract/renderer.js +0 -114
- package/dist/engine/keyword-matcher/boundary.d.ts +0 -18
- package/dist/engine/keyword-matcher/boundary.js +0 -30
- package/dist/engine/keyword-matcher/extractor.d.ts +0 -14
- package/dist/engine/keyword-matcher/extractor.js +0 -85
- package/dist/engine/keyword-matcher/index.d.ts +0 -5
- package/dist/engine/keyword-matcher/index.js +0 -11
- package/dist/engine/keyword-matcher/matcher.d.ts +0 -28
- package/dist/engine/keyword-matcher/matcher.js +0 -79
- package/dist/engine/keyword-matcher/stopwords.d.ts +0 -26
- package/dist/engine/keyword-matcher/stopwords.js +0 -100
- package/dist/engine/lifecycle-hints.d.ts +0 -12
- package/dist/engine/lifecycle-hints.js +0 -61
- package/dist/engine/lifecycle-reconciliation-io.d.ts +0 -11
- package/dist/engine/lifecycle-reconciliation-io.js +0 -181
- package/dist/engine/lifecycle-reconciliation.d.ts +0 -16
- package/dist/engine/lifecycle-reconciliation.js +0 -460
- package/dist/engine/living-spec-analyzer.d.ts +0 -10
- package/dist/engine/living-spec-analyzer.js +0 -397
- package/dist/engine/minimality/analyzer.d.ts +0 -3
- package/dist/engine/minimality/analyzer.js +0 -182
- package/dist/engine/minimality/formatter.d.ts +0 -3
- package/dist/engine/minimality/formatter.js +0 -25
- package/dist/engine/minimality/index.d.ts +0 -3
- package/dist/engine/minimality/index.js +0 -3
- package/dist/engine/minimality/policy-loader.d.ts +0 -3
- package/dist/engine/minimality/policy-loader.js +0 -364
- package/dist/engine/model-tier-resolver.d.ts +0 -4
- package/dist/engine/model-tier-resolver.js +0 -15
- package/dist/engine/network-policy.d.ts +0 -4
- package/dist/engine/network-policy.js +0 -96
- package/dist/engine/onboarding/new-project-resolver.d.ts +0 -6
- package/dist/engine/onboarding/new-project-resolver.js +0 -265
- package/dist/engine/opencode/config-scaffold.d.ts +0 -3
- package/dist/engine/opencode/config-scaffold.js +0 -99
- package/dist/engine/paradigm-detector.d.ts +0 -12
- package/dist/engine/paradigm-detector.js +0 -236
- package/dist/engine/paradigm-registry.d.ts +0 -20
- package/dist/engine/paradigm-registry.js +0 -44
- package/dist/engine/phase-tracker.d.ts +0 -41
- package/dist/engine/phase-tracker.js +0 -89
- package/dist/engine/planu-config-writer.d.ts +0 -33
- package/dist/engine/planu-config-writer.js +0 -68
- package/dist/engine/project-command-runtime.d.ts +0 -5
- package/dist/engine/project-command-runtime.js +0 -87
- package/dist/engine/project-graph/builder.d.ts +0 -7
- package/dist/engine/project-graph/builder.js +0 -320
- package/dist/engine/project-graph/cache.d.ts +0 -47
- package/dist/engine/project-graph/cache.js +0 -739
- package/dist/engine/project-graph/extractors/decision-store-extractor.d.ts +0 -3
- package/dist/engine/project-graph/extractors/decision-store-extractor.js +0 -58
- package/dist/engine/project-graph/extractors/git-extractor.d.ts +0 -7
- package/dist/engine/project-graph/extractors/git-extractor.js +0 -89
- package/dist/engine/project-graph/extractors/handoff-extractor.d.ts +0 -3
- package/dist/engine/project-graph/extractors/handoff-extractor.js +0 -55
- package/dist/engine/project-graph/extractors/spec-extractor.d.ts +0 -3
- package/dist/engine/project-graph/extractors/spec-extractor.js +0 -189
- package/dist/engine/project-graph/extractors/validation-extractor.d.ts +0 -3
- package/dist/engine/project-graph/extractors/validation-extractor.js +0 -36
- package/dist/engine/project-graph/freshness-projection.d.ts +0 -16
- package/dist/engine/project-graph/freshness-projection.js +0 -98
- package/dist/engine/project-graph/index.d.ts +0 -2
- package/dist/engine/project-graph/index.js +0 -2
- package/dist/engine/project-graph/native.d.ts +0 -3
- package/dist/engine/project-graph/native.js +0 -36
- package/dist/engine/project-graph/query.d.ts +0 -8
- package/dist/engine/project-graph/query.js +0 -193
- package/dist/engine/project-graph/redaction.d.ts +0 -4
- package/dist/engine/project-graph/redaction.js +0 -11
- package/dist/engine/project-scanner/convention-detector.d.ts +0 -3
- package/dist/engine/project-scanner/convention-detector.js +0 -149
- package/dist/engine/project-scanner/index.d.ts +0 -4
- package/dist/engine/project-scanner/index.js +0 -18
- package/dist/engine/project-scanner/quality-baseline.d.ts +0 -3
- package/dist/engine/project-scanner/quality-baseline.js +0 -72
- package/dist/engine/project-scanner/stack-detector.d.ts +0 -3
- package/dist/engine/project-scanner/stack-detector.js +0 -128
- package/dist/engine/readiness-checker.d.ts +0 -56
- package/dist/engine/readiness-checker.js +0 -566
- package/dist/engine/readiness-config-loader.d.ts +0 -23
- package/dist/engine/readiness-config-loader.js +0 -63
- package/dist/engine/reconcile/apply-changes.d.ts +0 -4
- package/dist/engine/reconcile/apply-changes.js +0 -117
- package/dist/engine/reconcile/propagate-mirrors.d.ts +0 -3
- package/dist/engine/reconcile/propagate-mirrors.js +0 -376
- package/dist/engine/reconcile/verify-write.d.ts +0 -10
- package/dist/engine/reconcile/verify-write.js +0 -49
- package/dist/engine/registry-extender.d.ts +0 -25
- package/dist/engine/registry-extender.js +0 -60
- package/dist/engine/reviewer-tokens/issuer.d.ts +0 -29
- package/dist/engine/reviewer-tokens/issuer.js +0 -88
- package/dist/engine/reviewer-tokens/signer.d.ts +0 -17
- package/dist/engine/reviewer-tokens/signer.js +0 -51
- package/dist/engine/reviewer-tokens/types.d.ts +0 -2
- package/dist/engine/reviewer-tokens/types.js +0 -2
- package/dist/engine/runtime-policy.d.ts +0 -9
- package/dist/engine/runtime-policy.js +0 -163
- package/dist/engine/safety/atomic-write-file.d.ts +0 -47
- package/dist/engine/safety/atomic-write-file.js +0 -232
- package/dist/engine/safety/atomic-writer.d.ts +0 -22
- package/dist/engine/safety/atomic-writer.js +0 -97
- package/dist/engine/safety/contained-project-file.d.ts +0 -3
- package/dist/engine/safety/contained-project-file.js +0 -23
- package/dist/engine/safety/cross-process-lock.d.ts +0 -13
- package/dist/engine/safety/cross-process-lock.js +0 -318
- package/dist/engine/safety/file-mutex.d.ts +0 -6
- package/dist/engine/safety/file-mutex.js +0 -182
- package/dist/engine/safety/lock-lease-store.d.ts +0 -84
- package/dist/engine/safety/lock-lease-store.js +0 -383
- package/dist/engine/safety/lock-scavenger.d.ts +0 -8
- package/dist/engine/safety/lock-scavenger.js +0 -198
- package/dist/engine/safety/lock-staleness.d.ts +0 -33
- package/dist/engine/safety/lock-staleness.js +0 -76
- package/dist/engine/safety/obsolete-lock-guard.d.ts +0 -8
- package/dist/engine/safety/obsolete-lock-guard.js +0 -31
- package/dist/engine/scope-boundaries/contradiction-checker.d.ts +0 -7
- package/dist/engine/scope-boundaries/contradiction-checker.js +0 -276
- package/dist/engine/scope-boundaries/index.d.ts +0 -4
- package/dist/engine/scope-boundaries/index.js +0 -5
- package/dist/engine/scope-boundaries/scope-validator.d.ts +0 -7
- package/dist/engine/scope-boundaries/scope-validator.js +0 -114
- package/dist/engine/scope-boundaries/suggester.d.ts +0 -8
- package/dist/engine/scope-boundaries/suggester.js +0 -27
- package/dist/engine/score-to-grade.d.ts +0 -2
- package/dist/engine/score-to-grade.js +0 -16
- package/dist/engine/sdd-model-routing.d.ts +0 -15
- package/dist/engine/sdd-model-routing.js +0 -200
- package/dist/engine/spec-dependency-graph.d.ts +0 -33
- package/dist/engine/spec-dependency-graph.js +0 -243
- package/dist/engine/spec-difficulty.d.ts +0 -3
- package/dist/engine/spec-difficulty.js +0 -17
- package/dist/engine/spec-folder-sanctity.d.ts +0 -5
- package/dist/engine/spec-folder-sanctity.js +0 -32
- package/dist/engine/spec-format/acceptance-criteria.d.ts +0 -10
- package/dist/engine/spec-format/acceptance-criteria.js +0 -157
- package/dist/engine/spec-format/bdd-parser.d.ts +0 -19
- package/dist/engine/spec-format/bdd-parser.js +0 -224
- package/dist/engine/spec-format/copula-blacklist.d.ts +0 -15
- package/dist/engine/spec-format/copula-blacklist.js +0 -31
- package/dist/engine/spec-format/criteria-drift.d.ts +0 -3
- package/dist/engine/spec-format/criteria-drift.js +0 -36
- package/dist/engine/spec-format/executable-test-path.d.ts +0 -2
- package/dist/engine/spec-format/executable-test-path.js +0 -5
- package/dist/engine/spec-format/lean-spec-generator.d.ts +0 -8
- package/dist/engine/spec-format/lean-spec-generator.js +0 -236
- package/dist/engine/spec-format/lean-technical-generator.d.ts +0 -5
- package/dist/engine/spec-format/lean-technical-generator.js +0 -45
- package/dist/engine/spec-format/markdown-sections.d.ts +0 -14
- package/dist/engine/spec-format/markdown-sections.js +0 -105
- package/dist/engine/spec-format/metadata-value-policy.d.ts +0 -156
- package/dist/engine/spec-format/metadata-value-policy.js +0 -86
- package/dist/engine/spec-format/read-technical-section.d.ts +0 -25
- package/dist/engine/spec-format/read-technical-section.js +0 -99
- package/dist/engine/spec-format/replace-section.d.ts +0 -17
- package/dist/engine/spec-format/replace-section.js +0 -79
- package/dist/engine/spec-format/retired-scaffold.d.ts +0 -3
- package/dist/engine/spec-format/retired-scaffold.js +0 -5
- package/dist/engine/spec-format/spec-id.d.ts +0 -8
- package/dist/engine/spec-format/spec-id.js +0 -25
- package/dist/engine/spec-format/technical-md-populator.d.ts +0 -17
- package/dist/engine/spec-format/technical-md-populator.js +0 -321
- package/dist/engine/spec-format/text-fences.d.ts +0 -6
- package/dist/engine/spec-format/text-fences.js +0 -28
- package/dist/engine/spec-format/unified-spec-builder.d.ts +0 -25
- package/dist/engine/spec-format/unified-spec-builder.js +0 -400
- package/dist/engine/spec-generator/fallback-generator.d.ts +0 -5
- package/dist/engine/spec-generator/fallback-generator.js +0 -41
- package/dist/engine/spec-generator/index.d.ts +0 -2
- package/dist/engine/spec-generator/index.js +0 -2
- package/dist/engine/spec-grounding/contract.d.ts +0 -24
- package/dist/engine/spec-grounding/contract.js +0 -278
- package/dist/engine/spec-grounding/grounding-entry-parser.d.ts +0 -4
- package/dist/engine/spec-grounding/grounding-entry-parser.js +0 -184
- package/dist/engine/spec-health-scorer.d.ts +0 -7
- package/dist/engine/spec-health-scorer.js +0 -134
- package/dist/engine/spec-language/english-only.d.ts +0 -30
- package/dist/engine/spec-language/english-only.js +0 -224
- package/dist/engine/spec-migrator/criteria-scanner.d.ts +0 -7
- package/dist/engine/spec-migrator/criteria-scanner.js +0 -113
- package/dist/engine/spec-migrator/drift-detector.d.ts +0 -10
- package/dist/engine/spec-migrator/drift-detector.js +0 -142
- package/dist/engine/spec-migrator/filesystem-import.d.ts +0 -10
- package/dist/engine/spec-migrator/filesystem-import.js +0 -205
- package/dist/engine/spec-migrator/flatten-specs.d.ts +0 -12
- package/dist/engine/spec-migrator/flatten-specs.js +0 -111
- package/dist/engine/spec-migrator/folder-operations.d.ts +0 -7
- package/dist/engine/spec-migrator/folder-operations.js +0 -109
- package/dist/engine/spec-migrator/frontmatter-parser.d.ts +0 -11
- package/dist/engine/spec-migrator/frontmatter-parser.js +0 -111
- package/dist/engine/spec-migrator/git-aware-fs.d.ts +0 -9
- package/dist/engine/spec-migrator/git-aware-fs.js +0 -20
- package/dist/engine/spec-migrator/index.d.ts +0 -10
- package/dist/engine/spec-migrator/index.js +0 -23
- package/dist/engine/spec-migrator/lean-migration.d.ts +0 -8
- package/dist/engine/spec-migrator/lean-migration.js +0 -405
- package/dist/engine/spec-migrator/legacy-classifier.d.ts +0 -4
- package/dist/engine/spec-migrator/legacy-classifier.js +0 -70
- package/dist/engine/spec-migrator/legacy-migration.d.ts +0 -13
- package/dist/engine/spec-migrator/legacy-migration.js +0 -88
- package/dist/engine/spec-migrator/path-utils.d.ts +0 -13
- package/dist/engine/spec-migrator/path-utils.js +0 -40
- package/dist/engine/spec-migrator/planu-canonical-policy.d.ts +0 -18
- package/dist/engine/spec-migrator/planu-canonical-policy.js +0 -105
- package/dist/engine/spec-migrator/prefix-migration.d.ts +0 -11
- package/dist/engine/spec-migrator/prefix-migration.js +0 -85
- package/dist/engine/spec-migrator/reconcile-paths.d.ts +0 -12
- package/dist/engine/spec-migrator/reconcile-paths.js +0 -77
- package/dist/engine/spec-migrator/strict-planu-cleanup.d.ts +0 -7
- package/dist/engine/spec-migrator/strict-planu-cleanup.js +0 -308
- package/dist/engine/spec-migrator/version-detection.d.ts +0 -5
- package/dist/engine/spec-migrator/version-detection.js +0 -19
- package/dist/engine/spec-migrator.d.ts +0 -2
- package/dist/engine/spec-migrator.js +0 -3
- package/dist/engine/spec-quality/generic-output-gate.d.ts +0 -9
- package/dist/engine/spec-quality/generic-output-gate.js +0 -350
- package/dist/engine/spec-quality-scorer.d.ts +0 -4
- package/dist/engine/spec-quality-scorer.js +0 -423
- package/dist/engine/spec-reader.d.ts +0 -7
- package/dist/engine/spec-reader.js +0 -23
- package/dist/engine/spec-state-machine/transition-spec.d.ts +0 -56
- package/dist/engine/spec-state-machine/transition-spec.js +0 -59
- package/dist/engine/spec-versioner.d.ts +0 -28
- package/dist/engine/spec-versioner.js +0 -92
- package/dist/engine/spec-versioning/bump-version.d.ts +0 -17
- package/dist/engine/spec-versioning/bump-version.js +0 -199
- package/dist/engine/spec-versioning/migrate-format.d.ts +0 -23
- package/dist/engine/spec-versioning/migrate-format.js +0 -96
- package/dist/engine/spec-versioning/render-history.d.ts +0 -14
- package/dist/engine/spec-versioning/render-history.js +0 -31
- package/dist/engine/technology-registry.d.ts +0 -11
- package/dist/engine/technology-registry.js +0 -142
- package/dist/engine/test-selection/policy.d.ts +0 -9
- package/dist/engine/test-selection/policy.js +0 -192
- package/dist/engine/text-signal-boundaries.d.ts +0 -8
- package/dist/engine/text-signal-boundaries.js +0 -122
- package/dist/engine/time/relative-date.d.ts +0 -3
- package/dist/engine/time/relative-date.js +0 -16
- package/dist/engine/timing/budget.d.ts +0 -29
- package/dist/engine/timing/budget.js +0 -129
- package/dist/engine/universal-rules/catalog.d.ts +0 -7
- package/dist/engine/universal-rules/catalog.js +0 -25
- package/dist/engine/universal-rules/host-writer.d.ts +0 -7
- package/dist/engine/universal-rules/host-writer.js +0 -113
- package/dist/engine/universal-rules/installer.d.ts +0 -5
- package/dist/engine/universal-rules/installer.js +0 -236
- package/dist/engine/universal-rules/rules/planu-approval-gates.d.ts +0 -3
- package/dist/engine/universal-rules/rules/planu-approval-gates.js +0 -48
- package/dist/engine/universal-rules/rules/planu-bdd-criteria.d.ts +0 -3
- package/dist/engine/universal-rules/rules/planu-bdd-criteria.js +0 -44
- package/dist/engine/universal-rules/rules/planu-dogfood-bugs.d.ts +0 -3
- package/dist/engine/universal-rules/rules/planu-dogfood-bugs.js +0 -70
- package/dist/engine/universal-rules/rules/planu-english-specs.d.ts +0 -3
- package/dist/engine/universal-rules/rules/planu-english-specs.js +0 -41
- package/dist/engine/universal-rules/rules/planu-minimal-change.d.ts +0 -3
- package/dist/engine/universal-rules/rules/planu-minimal-change.js +0 -42
- package/dist/engine/universal-rules/rules/planu-modes.d.ts +0 -3
- package/dist/engine/universal-rules/rules/planu-modes.js +0 -57
- package/dist/engine/universal-rules/rules/planu-sdd-model-routing.d.ts +0 -3
- package/dist/engine/universal-rules/rules/planu-sdd-model-routing.js +0 -50
- package/dist/engine/universal-rules/rules/planu-workflow.d.ts +0 -3
- package/dist/engine/universal-rules/rules/planu-workflow.js +0 -92
- package/dist/engine/universal-rules/user-edit-detector.d.ts +0 -21
- package/dist/engine/universal-rules/user-edit-detector.js +0 -46
- package/dist/engine/validation/durable-validation.d.ts +0 -44
- package/dist/engine/validation/durable-validation.js +0 -344
- package/dist/engine/validation/validation-freshness.d.ts +0 -73
- package/dist/engine/validation/validation-freshness.js +0 -777
- package/dist/engine/validation/validation-receipt-codec.d.ts +0 -13
- package/dist/engine/validation/validation-receipt-codec.js +0 -184
- package/dist/engine/validation/validation-receipt.d.ts +0 -67
- package/dist/engine/validation/validation-receipt.js +0 -342
- package/dist/engine/validation/validation-source-digest.d.ts +0 -2
- package/dist/engine/validation/validation-source-digest.js +0 -86
- package/dist/engine/validation/validation-source-policy.d.ts +0 -4
- package/dist/engine/validation/validation-source-policy.js +0 -17
- package/dist/engine/validation/validation-submission.d.ts +0 -35
- package/dist/engine/validation/validation-submission.js +0 -142
- package/dist/engine/validation/validation-worktree.d.ts +0 -21
- package/dist/engine/validation/validation-worktree.js +0 -294
- package/dist/engine/validation-evidence-digest.d.ts +0 -4
- package/dist/engine/validation-evidence-digest.js +0 -83
- package/dist/engine/validation-evidence-ledger.d.ts +0 -30
- package/dist/engine/validation-evidence-ledger.js +0 -328
- package/dist/engine/validation-impact-planner.d.ts +0 -14
- package/dist/engine/validation-impact-planner.js +0 -74
- package/dist/engine/validation-loop.d.ts +0 -12
- package/dist/engine/validation-loop.js +0 -216
- package/dist/engine/validator/analyzer.d.ts +0 -23
- package/dist/engine/validator/analyzer.js +0 -495
- package/dist/engine/validator/blast-radius-gate.d.ts +0 -3
- package/dist/engine/validator/blast-radius-gate.js +0 -305
- package/dist/engine/validator/checklist.d.ts +0 -6
- package/dist/engine/validator/checklist.js +0 -147
- package/dist/engine/validator/deep-code-checker.d.ts +0 -49
- package/dist/engine/validator/deep-code-checker.js +0 -410
- package/dist/engine/validator/dor-dod.d.ts +0 -11
- package/dist/engine/validator/dor-dod.js +0 -338
- package/dist/engine/validator/executable-evidence.d.ts +0 -18
- package/dist/engine/validator/executable-evidence.js +0 -104
- package/dist/engine/validator/extractors.d.ts +0 -16
- package/dist/engine/validator/extractors.js +0 -105
- package/dist/engine/validator/gates/code-gates.d.ts +0 -14
- package/dist/engine/validator/gates/code-gates.js +0 -87
- package/dist/engine/validator/gates/convention-gates.d.ts +0 -13
- package/dist/engine/validator/gates/convention-gates.js +0 -84
- package/dist/engine/validator/gates/index.d.ts +0 -8
- package/dist/engine/validator/gates/index.js +0 -63
- package/dist/engine/validator/gates/test-gates.d.ts +0 -12
- package/dist/engine/validator/gates/test-gates.js +0 -105
- package/dist/engine/validator/holistic-report.d.ts +0 -11
- package/dist/engine/validator/holistic-report.js +0 -34
- package/dist/engine/validator/negative-predicate.d.ts +0 -17
- package/dist/engine/validator/negative-predicate.js +0 -240
- package/dist/engine/validator/package-json-evidence.d.ts +0 -3
- package/dist/engine/validator/package-json-evidence.js +0 -97
- package/dist/engine/validator/reliability-gate.d.ts +0 -4
- package/dist/engine/validator/reliability-gate.js +0 -81
- package/dist/engine/validator/scope-resolver.d.ts +0 -30
- package/dist/engine/validator/scope-resolver.js +0 -67
- package/dist/engine/validator/spec-compliance-runner.d.ts +0 -9
- package/dist/engine/validator/spec-compliance-runner.js +0 -849
- package/dist/engine/validator/test-evidence-grounding.d.ts +0 -64
- package/dist/engine/validator/test-evidence-grounding.js +0 -221
- package/dist/engine/validator/validation-report-writer.d.ts +0 -27
- package/dist/engine/validator/validation-report-writer.js +0 -208
- package/dist/engine/validator.d.ts +0 -19
- package/dist/engine/validator.js +0 -244
- package/dist/engine/verifier/bdd-entity-extractor.d.ts +0 -23
- package/dist/engine/verifier/bdd-entity-extractor.js +0 -227
- package/dist/engine/verifier/compliance-scorer.d.ts +0 -17
- package/dist/engine/verifier/compliance-scorer.js +0 -131
- package/dist/engine/verifier/criterion-matcher.d.ts +0 -22
- package/dist/engine/verifier/criterion-matcher.js +0 -309
- package/dist/engine/web-fetcher/registry-loader.d.ts +0 -7
- package/dist/engine/web-fetcher/registry-loader.js +0 -44
- package/dist/engine/whats-new.d.ts +0 -2
- package/dist/engine/whats-new.js +0 -42
- package/dist/errors/classified-degradation.d.ts +0 -3
- package/dist/errors/classified-degradation.js +0 -10
- package/dist/errors/degradation-sink.d.ts +0 -3
- package/dist/errors/degradation-sink.js +0 -5
- package/dist/errors/error-taxonomy.d.ts +0 -11
- package/dist/errors/error-taxonomy.js +0 -59
- package/dist/hosts/claude-code/coach.d.ts +0 -6
- package/dist/hosts/claude-code/coach.js +0 -10
- package/dist/hosts/claude-code/ux/subagent-publisher.d.ts +0 -20
- package/dist/hosts/claude-code/ux/subagent-publisher.js +0 -117
- package/dist/hosts/codex/config-scaffold.d.ts +0 -10
- package/dist/hosts/codex/config-scaffold.js +0 -102
- package/dist/hosts/codex/workspace-scope.d.ts +0 -43
- package/dist/hosts/codex/workspace-scope.js +0 -89
- package/dist/hosts/gemini/config-scaffold.d.ts +0 -14
- package/dist/hosts/gemini/config-scaffold.js +0 -165
- package/dist/i18n/index.d.ts +0 -61
- package/dist/i18n/index.js +0 -288
- package/dist/prompts/index.d.ts +0 -6
- package/dist/prompts/index.js +0 -121
- package/dist/resources/process.d.ts +0 -11
- package/dist/resources/process.js +0 -80
- package/dist/resources/registry.d.ts +0 -6
- package/dist/resources/registry.js +0 -16
- package/dist/resources/specs.d.ts +0 -11
- package/dist/resources/specs.js +0 -58
- package/dist/security/adapters/environment.d.ts +0 -12
- package/dist/security/adapters/environment.js +0 -25
- package/dist/security/adapters/local-file.d.ts +0 -12
- package/dist/security/adapters/local-file.js +0 -56
- package/dist/security/adapters/macos-keychain.d.ts +0 -20
- package/dist/security/adapters/macos-keychain.js +0 -151
- package/dist/security/redactor.d.ts +0 -5
- package/dist/security/redactor.js +0 -58
- package/dist/security/secret-provider.d.ts +0 -22
- package/dist/security/secret-provider.js +0 -107
- package/dist/storage/approval-operation-lock.d.ts +0 -7
- package/dist/storage/approval-operation-lock.js +0 -47
- package/dist/storage/approval-store.d.ts +0 -14
- package/dist/storage/approval-store.js +0 -117
- package/dist/storage/audit-trail-store.d.ts +0 -20
- package/dist/storage/audit-trail-store.js +0 -83
- package/dist/storage/base-store.d.ts +0 -69
- package/dist/storage/base-store.js +0 -195
- package/dist/storage/compliance-gate-config-store.d.ts +0 -4
- package/dist/storage/compliance-gate-config-store.js +0 -20
- package/dist/storage/convention-baseline.d.ts +0 -20
- package/dist/storage/convention-baseline.js +0 -62
- package/dist/storage/current-project.d.ts +0 -3
- package/dist/storage/current-project.js +0 -21
- package/dist/storage/file-mutex.d.ts +0 -14
- package/dist/storage/file-mutex.js +0 -47
- package/dist/storage/global-projects-store.d.ts +0 -53
- package/dist/storage/global-projects-store.js +0 -181
- package/dist/storage/global-store.d.ts +0 -82
- package/dist/storage/global-store.js +0 -246
- package/dist/storage/index.d.ts +0 -15
- package/dist/storage/index.js +0 -16
- package/dist/storage/knowledge-store/knowledge.d.ts +0 -25
- package/dist/storage/knowledge-store/knowledge.js +0 -112
- package/dist/storage/knowledge-store/sessions.d.ts +0 -16
- package/dist/storage/knowledge-store/sessions.js +0 -155
- package/dist/storage/knowledge-store.d.ts +0 -3
- package/dist/storage/knowledge-store.js +0 -8
- package/dist/storage/migrations/canonical-storage.d.ts +0 -15
- package/dist/storage/migrations/canonical-storage.js +0 -754
- package/dist/storage/migrations/sdd-core-v6.d.ts +0 -11
- package/dist/storage/migrations/sdd-core-v6.js +0 -873
- package/dist/storage/pattern-store.d.ts +0 -38
- package/dist/storage/pattern-store.js +0 -136
- package/dist/storage/project-identity.d.ts +0 -60
- package/dist/storage/project-identity.js +0 -454
- package/dist/storage/project-resolver.d.ts +0 -17
- package/dist/storage/project-resolver.js +0 -134
- package/dist/storage/retention.d.ts +0 -13
- package/dist/storage/retention.js +0 -383
- package/dist/storage/runtime-db.d.ts +0 -207
- package/dist/storage/runtime-db.js +0 -1313
- package/dist/storage/schema-registry.d.ts +0 -5
- package/dist/storage/schema-registry.js +0 -74
- package/dist/storage/spec-index.d.ts +0 -23
- package/dist/storage/spec-index.js +0 -117
- package/dist/storage/spec-lock-store.d.ts +0 -22
- package/dist/storage/spec-lock-store.js +0 -99
- package/dist/storage/spec-store.d.ts +0 -170
- package/dist/storage/spec-store.js +0 -968
- package/dist/storage/storage-bundle.d.ts +0 -16
- package/dist/storage/storage-bundle.js +0 -117
- package/dist/storage/storage-catalog-validation.d.ts +0 -3
- package/dist/storage/storage-catalog-validation.js +0 -20
- package/dist/storage/storage-catalog.d.ts +0 -25
- package/dist/storage/storage-catalog.js +0 -421
- package/dist/storage/storage-layout.d.ts +0 -40
- package/dist/storage/storage-layout.js +0 -117
- package/dist/storage/technology-selection-store.d.ts +0 -5
- package/dist/storage/technology-selection-store.js +0 -46
- package/dist/storage/transition-log.d.ts +0 -11
- package/dist/storage/transition-log.js +0 -234
- package/dist/tools/bump-spec-version.d.ts +0 -31
- package/dist/tools/bump-spec-version.js +0 -132
- package/dist/tools/challenge-spec/agent-challenge-scenarios.d.ts +0 -12
- package/dist/tools/challenge-spec/agent-challenge-scenarios.js +0 -129
- package/dist/tools/challenge-spec/architecture-challenge-scenarios.d.ts +0 -12
- package/dist/tools/challenge-spec/architecture-challenge-scenarios.js +0 -113
- package/dist/tools/challenge-spec/challenge-report.d.ts +0 -26
- package/dist/tools/challenge-spec/challenge-report.js +0 -221
- package/dist/tools/challenge-spec/event-challenge-scenarios.d.ts +0 -14
- package/dist/tools/challenge-spec/event-challenge-scenarios.js +0 -68
- package/dist/tools/challenge-spec/implementation-contract-challenge-scenarios.d.ts +0 -3
- package/dist/tools/challenge-spec/implementation-contract-challenge-scenarios.js +0 -51
- package/dist/tools/challenge-spec/platform-challenge-scenarios-b.d.ts +0 -7
- package/dist/tools/challenge-spec/platform-challenge-scenarios-b.js +0 -48
- package/dist/tools/challenge-spec/platform-challenge-scenarios-b1.d.ts +0 -4
- package/dist/tools/challenge-spec/platform-challenge-scenarios-b1.js +0 -109
- package/dist/tools/challenge-spec/platform-challenge-scenarios-b2.d.ts +0 -5
- package/dist/tools/challenge-spec/platform-challenge-scenarios-b2.js +0 -191
- package/dist/tools/challenge-spec/platform-challenge-scenarios.d.ts +0 -7
- package/dist/tools/challenge-spec/platform-challenge-scenarios.js +0 -224
- package/dist/tools/challenge-spec/resilience-challenge-scenarios-a.d.ts +0 -28
- package/dist/tools/challenge-spec/resilience-challenge-scenarios-a.js +0 -183
- package/dist/tools/challenge-spec/resilience-challenge-scenarios-b.d.ts +0 -14
- package/dist/tools/challenge-spec/resilience-challenge-scenarios-b.js +0 -144
- package/dist/tools/challenge-spec/resilience-challenge-scenarios.d.ts +0 -8
- package/dist/tools/challenge-spec/resilience-challenge-scenarios.js +0 -37
- package/dist/tools/challenge-spec/scenario-collector.d.ts +0 -13
- package/dist/tools/challenge-spec/scenario-collector.js +0 -84
- package/dist/tools/challenge-spec/scenarios-data.d.ts +0 -3
- package/dist/tools/challenge-spec/scenarios-data.js +0 -73
- package/dist/tools/challenge-spec/scenarios-desktop.d.ts +0 -7
- package/dist/tools/challenge-spec/scenarios-desktop.js +0 -91
- package/dist/tools/challenge-spec/scenarios-failure.d.ts +0 -3
- package/dist/tools/challenge-spec/scenarios-failure.js +0 -136
- package/dist/tools/challenge-spec/scenarios-game.d.ts +0 -6
- package/dist/tools/challenge-spec/scenarios-game.js +0 -71
- package/dist/tools/challenge-spec/scenarios-scale.d.ts +0 -3
- package/dist/tools/challenge-spec/scenarios-scale.js +0 -37
- package/dist/tools/challenge-spec/scenarios-security.d.ts +0 -3
- package/dist/tools/challenge-spec/scenarios-security.js +0 -85
- package/dist/tools/challenge-spec/scenarios-utils.d.ts +0 -42
- package/dist/tools/challenge-spec/scenarios-utils.js +0 -250
- package/dist/tools/challenge-spec-helpers.d.ts +0 -16
- package/dist/tools/challenge-spec-helpers.js +0 -152
- package/dist/tools/challenge-spec-scenarios.d.ts +0 -7
- package/dist/tools/challenge-spec-scenarios.js +0 -9
- package/dist/tools/challenge-spec.d.ts +0 -4
- package/dist/tools/challenge-spec.js +0 -448
- package/dist/tools/check-readiness.d.ts +0 -5
- package/dist/tools/check-readiness.js +0 -343
- package/dist/tools/claude-settings-file.d.ts +0 -3
- package/dist/tools/claude-settings-file.js +0 -19
- package/dist/tools/create-skill.d.ts +0 -4
- package/dist/tools/create-skill.js +0 -151
- package/dist/tools/create-spec/autopilot-analyzer.d.ts +0 -33
- package/dist/tools/create-spec/autopilot-analyzer.js +0 -171
- package/dist/tools/create-spec/constitution-validator.d.ts +0 -4
- package/dist/tools/create-spec/constitution-validator.js +0 -31
- package/dist/tools/create-spec/question-generator.d.ts +0 -4
- package/dist/tools/create-spec/question-generator.js +0 -25
- package/dist/tools/create-spec/relevance-scorer.d.ts +0 -18
- package/dist/tools/create-spec/relevance-scorer.js +0 -156
- package/dist/tools/create-spec/spec-builder.d.ts +0 -20
- package/dist/tools/create-spec/spec-builder.js +0 -274
- package/dist/tools/create-spec-helpers.d.ts +0 -4
- package/dist/tools/create-spec-helpers.js +0 -24
- package/dist/tools/create-spec-tech/constitution.d.ts +0 -7
- package/dist/tools/create-spec-tech/constitution.js +0 -79
- package/dist/tools/create-spec-tech.d.ts +0 -2
- package/dist/tools/create-spec-tech.js +0 -3
- package/dist/tools/create-spec.d.ts +0 -25
- package/dist/tools/create-spec.js +0 -1698
- package/dist/tools/git/git-helpers.d.ts +0 -20
- package/dist/tools/git/git-helpers.js +0 -33
- package/dist/tools/init-project/agents-md-writer.d.ts +0 -18
- package/dist/tools/init-project/agents-md-writer.js +0 -123
- package/dist/tools/init-project/config-builder.d.ts +0 -14
- package/dist/tools/init-project/config-builder.js +0 -19
- package/dist/tools/init-project/conventions-writer.d.ts +0 -11
- package/dist/tools/init-project/conventions-writer.js +0 -61
- package/dist/tools/init-project/handler.d.ts +0 -4
- package/dist/tools/init-project/handler.js +0 -463
- package/dist/tools/init-project/helpers.d.ts +0 -31
- package/dist/tools/init-project/helpers.js +0 -223
- package/dist/tools/init-project/host-assets-writer.d.ts +0 -28
- package/dist/tools/init-project/host-assets-writer.js +0 -240
- package/dist/tools/init-project/legacy-guidance-scanner.d.ts +0 -9
- package/dist/tools/init-project/legacy-guidance-scanner.js +0 -218
- package/dist/tools/init-project/legacy-root-migration.d.ts +0 -16
- package/dist/tools/init-project/legacy-root-migration.js +0 -213
- package/dist/tools/init-project/lifecycle-helpers.d.ts +0 -12
- package/dist/tools/init-project/lifecycle-helpers.js +0 -37
- package/dist/tools/init-project/managed-guidance-refresher.d.ts +0 -9
- package/dist/tools/init-project/managed-guidance-refresher.js +0 -65
- package/dist/tools/init-project/migration-runner.d.ts +0 -43
- package/dist/tools/init-project/migration-runner.js +0 -227
- package/dist/tools/init-project/portable-index-reconciler.d.ts +0 -32
- package/dist/tools/init-project/portable-index-reconciler.js +0 -278
- package/dist/tools/init-project/result-builder.d.ts +0 -4
- package/dist/tools/init-project/result-builder.js +0 -272
- package/dist/tools/init-project/scaffold-verifier.d.ts +0 -6
- package/dist/tools/init-project/scaffold-verifier.js +0 -97
- package/dist/tools/init-project/scaffold-writer.d.ts +0 -49
- package/dist/tools/init-project/scaffold-writer.js +0 -50
- package/dist/tools/init-project.d.ts +0 -2
- package/dist/tools/init-project.js +0 -4
- package/dist/tools/jobs/handlers.d.ts +0 -11
- package/dist/tools/jobs/handlers.js +0 -152
- package/dist/tools/list-specs.d.ts +0 -3
- package/dist/tools/list-specs.js +0 -323
- package/dist/tools/output-formatter.d.ts +0 -34
- package/dist/tools/output-formatter.js +0 -171
- package/dist/tools/output-integrity-guard.d.ts +0 -3
- package/dist/tools/output-integrity-guard.js +0 -53
- package/dist/tools/package-handoff.d.ts +0 -4
- package/dist/tools/package-handoff.js +0 -215
- package/dist/tools/reconcile-spec-sanctity-hook.d.ts +0 -3
- package/dist/tools/reconcile-spec-sanctity-hook.js +0 -55
- package/dist/tools/reconcile-spec.d.ts +0 -4
- package/dist/tools/reconcile-spec.js +0 -572
- package/dist/tools/register-sdd-tools.d.ts +0 -4
- package/dist/tools/register-sdd-tools.js +0 -13
- package/dist/tools/resolve-project-id.d.ts +0 -58
- package/dist/tools/resolve-project-id.js +0 -103
- package/dist/tools/resolve-project-path.d.ts +0 -27
- package/dist/tools/resolve-project-path.js +0 -172
- package/dist/tools/response-helpers.d.ts +0 -70
- package/dist/tools/response-helpers.js +0 -139
- package/dist/tools/safe-handler.d.ts +0 -36
- package/dist/tools/safe-handler.js +0 -283
- package/dist/tools/sanitize-path.d.ts +0 -13
- package/dist/tools/sanitize-path.js +0 -60
- package/dist/tools/schemas/agents.d.ts +0 -21
- package/dist/tools/schemas/agents.js +0 -9
- package/dist/tools/schemas/analysis.d.ts +0 -28
- package/dist/tools/schemas/analysis.js +0 -22
- package/dist/tools/schemas/index.d.ts +0 -8
- package/dist/tools/schemas/index.js +0 -9
- package/dist/tools/schemas/infra.d.ts +0 -19
- package/dist/tools/schemas/infra.js +0 -18
- package/dist/tools/schemas/lifecycle.d.ts +0 -88
- package/dist/tools/schemas/lifecycle.js +0 -85
- package/dist/tools/schemas/output-schemas.d.ts +0 -115
- package/dist/tools/schemas/output-schemas.js +0 -136
- package/dist/tools/schemas/package-handoff-output-schema.d.ts +0 -41
- package/dist/tools/schemas/package-handoff-output-schema.js +0 -70
- package/dist/tools/schemas/spec-id.d.ts +0 -2
- package/dist/tools/schemas/spec-id.js +0 -2
- package/dist/tools/schemas/spec.d.ts +0 -51
- package/dist/tools/schemas/spec.js +0 -41
- package/dist/tools/schemas/validate-output-schema.d.ts +0 -276
- package/dist/tools/schemas/validate-output-schema.js +0 -225
- package/dist/tools/status-handler.d.ts +0 -3
- package/dist/tools/status-handler.js +0 -242
- package/dist/tools/tool-entry.d.ts +0 -52
- package/dist/tools/tool-entry.js +0 -46
- package/dist/tools/tool-registry/core-tools.d.ts +0 -4
- package/dist/tools/tool-registry/core-tools.js +0 -581
- package/dist/tools/tool-registry/inventory.d.ts +0 -2
- package/dist/tools/tool-registry/inventory.js +0 -2
- package/dist/tools/tool-registry-helpers.d.ts +0 -34
- package/dist/tools/tool-registry-helpers.js +0 -45
- package/dist/tools/update-status/approval-gates.d.ts +0 -13
- package/dist/tools/update-status/approval-gates.js +0 -108
- package/dist/tools/update-status/batch.d.ts +0 -7
- package/dist/tools/update-status/batch.js +0 -176
- package/dist/tools/update-status/dod-gates.d.ts +0 -117
- package/dist/tools/update-status/dod-gates.js +0 -847
- package/dist/tools/update-status/done-receipt-verifier.d.ts +0 -38
- package/dist/tools/update-status/done-receipt-verifier.js +0 -208
- package/dist/tools/update-status/evidence-gate.d.ts +0 -16
- package/dist/tools/update-status/evidence-gate.js +0 -361
- package/dist/tools/update-status/evidence-payload.d.ts +0 -180
- package/dist/tools/update-status/evidence-payload.js +0 -79
- package/dist/tools/update-status/file-sync.d.ts +0 -37
- package/dist/tools/update-status/file-sync.js +0 -223
- package/dist/tools/update-status/gate-harness.d.ts +0 -8
- package/dist/tools/update-status/gate-harness.js +0 -8
- package/dist/tools/update-status/index.d.ts +0 -25
- package/dist/tools/update-status/index.js +0 -1487
- package/dist/tools/update-status/response-builder.d.ts +0 -17
- package/dist/tools/update-status/response-builder.js +0 -297
- package/dist/tools/update-status/side-effects.d.ts +0 -16
- package/dist/tools/update-status/side-effects.js +0 -117
- package/dist/tools/update-status/transition-guard.d.ts +0 -85
- package/dist/tools/update-status/transition-guard.js +0 -752
- package/dist/tools/update-status-actions.d.ts +0 -6
- package/dist/tools/update-status-actions.js +0 -19
- package/dist/tools/update-status-convention-gate.d.ts +0 -9
- package/dist/tools/update-status-convention-gate.js +0 -330
- package/dist/tools/update-status.d.ts +0 -2
- package/dist/tools/update-status.js +0 -3
- package/dist/tools/validate-assurance.d.ts +0 -6
- package/dist/tools/validate-assurance.js +0 -55
- package/dist/tools/validate-graph-coverage.d.ts +0 -8
- package/dist/tools/validate-graph-coverage.js +0 -54
- package/dist/tools/validate-helpers.d.ts +0 -10
- package/dist/tools/validate-helpers.js +0 -65
- package/dist/tools/validate-lint.d.ts +0 -9
- package/dist/tools/validate-lint.js +0 -170
- package/dist/tools/validate-minimality.d.ts +0 -16
- package/dist/tools/validate-minimality.js +0 -22
- package/dist/tools/validate-structured-compat.d.ts +0 -19
- package/dist/tools/validate-structured-compat.js +0 -14
- package/dist/tools/validate.d.ts +0 -8
- package/dist/tools/validate.js +0 -1039
- package/dist/transports/transport-factory.d.ts +0 -5
- package/dist/transports/transport-factory.js +0 -182
- package/dist/types/abortable-process.d.ts +0 -29
- package/dist/types/abortable-process.js +0 -2
- package/dist/types/agent-team.d.ts +0 -17
- package/dist/types/agent-team.js +0 -3
- package/dist/types/ai-assurance.d.ts +0 -32
- package/dist/types/ai-assurance.js +0 -2
- package/dist/types/ai-native.d.ts +0 -16
- package/dist/types/ai-native.js +0 -3
- package/dist/types/analysis.d.ts +0 -238
- package/dist/types/analysis.js +0 -3
- package/dist/types/approval.d.ts +0 -66
- package/dist/types/approval.js +0 -6
- package/dist/types/architecture.d.ts +0 -101
- package/dist/types/architecture.js +0 -4
- package/dist/types/audit.d.ts +0 -38
- package/dist/types/audit.js +0 -4
- package/dist/types/build-freshness.d.ts +0 -11
- package/dist/types/build-freshness.js +0 -2
- package/dist/types/clarification-token.d.ts +0 -46
- package/dist/types/clarification-token.js +0 -2
- package/dist/types/clarification.d.ts +0 -23
- package/dist/types/clarification.js +0 -5
- package/dist/types/claude-code-runtime.d.ts +0 -91
- package/dist/types/claude-code-runtime.js +0 -5
- package/dist/types/claude-code-ux.d.ts +0 -62
- package/dist/types/claude-code-ux.js +0 -5
- package/dist/types/cli.d.ts +0 -40
- package/dist/types/cli.js +0 -3
- package/dist/types/codex.d.ts +0 -108
- package/dist/types/codex.js +0 -3
- package/dist/types/common/index.d.ts +0 -4
- package/dist/types/common/index.js +0 -6
- package/dist/types/common/learning.d.ts +0 -43
- package/dist/types/common/learning.js +0 -3
- package/dist/types/common/tech-enums.d.ts +0 -8
- package/dist/types/common/tech-enums.js +0 -2
- package/dist/types/complexity-budget.d.ts +0 -17
- package/dist/types/complexity-budget.js +0 -5
- package/dist/types/compliance-gate.d.ts +0 -5
- package/dist/types/compliance-gate.js +0 -3
- package/dist/types/context.d.ts +0 -52
- package/dist/types/context.js +0 -4
- package/dist/types/conventions.d.ts +0 -135
- package/dist/types/conventions.js +0 -5
- package/dist/types/core-bridge.d.ts +0 -130
- package/dist/types/core-bridge.js +0 -3
- package/dist/types/criterion-identity.d.ts +0 -12
- package/dist/types/criterion-identity.js +0 -2
- package/dist/types/cross-repo-search.d.ts +0 -81
- package/dist/types/cross-repo-search.js +0 -9
- package/dist/types/decisions.d.ts +0 -19
- package/dist/types/decisions.js +0 -4
- package/dist/types/durable-job.d.ts +0 -119
- package/dist/types/durable-job.js +0 -10
- package/dist/types/durable-validation.d.ts +0 -158
- package/dist/types/durable-validation.js +0 -166
- package/dist/types/edge-db.d.ts +0 -21
- package/dist/types/edge-db.js +0 -9
- package/dist/types/elicitation.d.ts +0 -115
- package/dist/types/elicitation.js +0 -13
- package/dist/types/env.d.ts +0 -94
- package/dist/types/env.js +0 -3
- package/dist/types/errors/structured-error.d.ts +0 -37
- package/dist/types/errors/structured-error.js +0 -3
- package/dist/types/estimation.d.ts +0 -29
- package/dist/types/estimation.js +0 -5
- package/dist/types/events.d.ts +0 -18
- package/dist/types/events.js +0 -4
- package/dist/types/evidence-autofill.d.ts +0 -40
- package/dist/types/evidence-autofill.js +0 -3
- package/dist/types/evidence-gates.d.ts +0 -103
- package/dist/types/evidence-gates.js +0 -2
- package/dist/types/evidence-index.d.ts +0 -26
- package/dist/types/evidence-index.js +0 -2
- package/dist/types/execution.d.ts +0 -103
- package/dist/types/execution.js +0 -2
- package/dist/types/frontmatter.d.ts +0 -5
- package/dist/types/frontmatter.js +0 -2
- package/dist/types/gemini.d.ts +0 -124
- package/dist/types/gemini.js +0 -3
- package/dist/types/handoff-artifacts.d.ts +0 -182
- package/dist/types/handoff-artifacts.js +0 -3
- package/dist/types/host-rules.d.ts +0 -10
- package/dist/types/host-rules.js +0 -3
- package/dist/types/host-tool-filter.d.ts +0 -31
- package/dist/types/host-tool-filter.js +0 -3
- package/dist/types/housekeeping.d.ts +0 -8
- package/dist/types/housekeeping.js +0 -22
- package/dist/types/index.d.ts +0 -81
- package/dist/types/index.js +0 -94
- package/dist/types/interactive-question.d.ts +0 -19
- package/dist/types/interactive-question.js +0 -3
- package/dist/types/keyword-matcher.d.ts +0 -38
- package/dist/types/keyword-matcher.js +0 -3
- package/dist/types/legacy-guidance.d.ts +0 -24
- package/dist/types/legacy-guidance.js +0 -3
- package/dist/types/legal.d.ts +0 -44
- package/dist/types/legal.js +0 -5
- package/dist/types/living-spec/annotations.d.ts +0 -36
- package/dist/types/living-spec/annotations.js +0 -23
- package/dist/types/living-spec.d.ts +0 -2
- package/dist/types/living-spec.js +0 -6
- package/dist/types/llm-security.d.ts +0 -19
- package/dist/types/llm-security.js +0 -4
- package/dist/types/local-first.d.ts +0 -25
- package/dist/types/local-first.js +0 -10
- package/dist/types/mcp.d.ts +0 -34
- package/dist/types/mcp.js +0 -4
- package/dist/types/migration/canonical-storage.d.ts +0 -38
- package/dist/types/migration/canonical-storage.js +0 -2
- package/dist/types/minimal-implementation-gate.d.ts +0 -98
- package/dist/types/minimal-implementation-gate.js +0 -2
- package/dist/types/model-routing.d.ts +0 -25
- package/dist/types/model-routing.js +0 -26
- package/dist/types/multi-agent.d.ts +0 -18
- package/dist/types/multi-agent.js +0 -18
- package/dist/types/nli-context.d.ts +0 -25
- package/dist/types/nli-context.js +0 -2
- package/dist/types/opencode.d.ts +0 -4
- package/dist/types/opencode.js +0 -3
- package/dist/types/paradigm.d.ts +0 -99
- package/dist/types/paradigm.js +0 -11
- package/dist/types/privacy.d.ts +0 -81
- package/dist/types/privacy.js +0 -25
- package/dist/types/project/agent.d.ts +0 -13
- package/dist/types/project/agent.js +0 -3
- package/dist/types/project/architecture-detection.d.ts +0 -24
- package/dist/types/project/architecture-detection.js +0 -2
- package/dist/types/project/config-metrics.d.ts +0 -10
- package/dist/types/project/config-metrics.js +0 -2
- package/dist/types/project/constitution.d.ts +0 -26
- package/dist/types/project/constitution.js +0 -3
- package/dist/types/project/core.d.ts +0 -137
- package/dist/types/project/core.js +0 -7
- package/dist/types/project/health-checker.d.ts +0 -13
- package/dist/types/project/health-checker.js +0 -3
- package/dist/types/project/inputs.d.ts +0 -39
- package/dist/types/project/inputs.js +0 -5
- package/dist/types/project/legacy-artifacts.d.ts +0 -7
- package/dist/types/project/legacy-artifacts.js +0 -2
- package/dist/types/project/library-groups.d.ts +0 -112
- package/dist/types/project/library-groups.js +0 -4
- package/dist/types/project/mfe-detection.d.ts +0 -19
- package/dist/types/project/mfe-detection.js +0 -3
- package/dist/types/project/planu-config.d.ts +0 -142
- package/dist/types/project/planu-config.js +0 -2
- package/dist/types/project/platform-exotic.d.ts +0 -108
- package/dist/types/project/platform-exotic.js +0 -3
- package/dist/types/project/platform-mobile.d.ts +0 -7
- package/dist/types/project/platform-mobile.js +0 -3
- package/dist/types/project/platform-specialty.d.ts +0 -17
- package/dist/types/project/platform-specialty.js +0 -3
- package/dist/types/project/scaffold-verification.d.ts +0 -15
- package/dist/types/project/scaffold-verification.js +0 -2
- package/dist/types/project-knowledge-graph.d.ts +0 -227
- package/dist/types/project-knowledge-graph.js +0 -2
- package/dist/types/project.d.ts +0 -11
- package/dist/types/project.js +0 -13
- package/dist/types/readiness.d.ts +0 -82
- package/dist/types/readiness.js +0 -7
- package/dist/types/reconcile.d.ts +0 -41
- package/dist/types/reconcile.js +0 -9
- package/dist/types/retention.d.ts +0 -12
- package/dist/types/retention.js +0 -3
- package/dist/types/reviewer-tokens.d.ts +0 -58
- package/dist/types/reviewer-tokens.js +0 -4
- package/dist/types/runtime-database.d.ts +0 -10
- package/dist/types/runtime-database.js +0 -2
- package/dist/types/runtime-policy.d.ts +0 -62
- package/dist/types/runtime-policy.js +0 -2
- package/dist/types/safe-schemas.d.ts +0 -12
- package/dist/types/safe-schemas.js +0 -27
- package/dist/types/safety.d.ts +0 -42
- package/dist/types/safety.js +0 -3
- package/dist/types/scan-project.d.ts +0 -20
- package/dist/types/scan-project.js +0 -4
- package/dist/types/schema-registry.d.ts +0 -12
- package/dist/types/schema-registry.js +0 -2
- package/dist/types/scope-boundaries.d.ts +0 -62
- package/dist/types/scope-boundaries.js +0 -3
- package/dist/types/scope.d.ts +0 -89
- package/dist/types/scope.js +0 -3
- package/dist/types/sdd-constitution.d.ts +0 -27
- package/dist/types/sdd-constitution.js +0 -2
- package/dist/types/sdd-core-v6.d.ts +0 -62
- package/dist/types/sdd-core-v6.js +0 -2
- package/dist/types/sdd-flow.d.ts +0 -3
- package/dist/types/sdd-flow.js +0 -3
- package/dist/types/sdd-model-routing.d.ts +0 -22
- package/dist/types/sdd-model-routing.js +0 -2
- package/dist/types/security.d.ts +0 -20
- package/dist/types/security.js +0 -4
- package/dist/types/skill-bootstrap.d.ts +0 -7
- package/dist/types/skill-bootstrap.js +0 -3
- package/dist/types/spec/clarification.d.ts +0 -86
- package/dist/types/spec/clarification.js +0 -2
- package/dist/types/spec/core.d.ts +0 -414
- package/dist/types/spec/core.js +0 -3
- package/dist/types/spec/health-score.d.ts +0 -25
- package/dist/types/spec/health-score.js +0 -2
- package/dist/types/spec/index-cache.d.ts +0 -25
- package/dist/types/spec/index-cache.js +0 -3
- package/dist/types/spec/index.d.ts +0 -7
- package/dist/types/spec/index.js +0 -9
- package/dist/types/spec/inputs.d.ts +0 -250
- package/dist/types/spec/inputs.js +0 -7
- package/dist/types/spec/versioning.d.ts +0 -39
- package/dist/types/spec/versioning.js +0 -3
- package/dist/types/spec-format.d.ts +0 -211
- package/dist/types/spec-format.js +0 -3
- package/dist/types/spec-generator.d.ts +0 -32
- package/dist/types/spec-generator.js +0 -2
- package/dist/types/spec-grounding.d.ts +0 -48
- package/dist/types/spec-grounding.js +0 -2
- package/dist/types/spec-language-translation.d.ts +0 -19
- package/dist/types/spec-language-translation.js +0 -5
- package/dist/types/spec-language.d.ts +0 -8
- package/dist/types/spec-language.js +0 -2
- package/dist/types/spec-lock-v2.d.ts +0 -66
- package/dist/types/spec-lock-v2.js +0 -4
- package/dist/types/spec-lock.d.ts +0 -14
- package/dist/types/spec-lock.js +0 -8
- package/dist/types/spec-quality.d.ts +0 -82
- package/dist/types/spec-quality.js +0 -6
- package/dist/types/stack/build-tool.d.ts +0 -13
- package/dist/types/stack/build-tool.js +0 -5
- package/dist/types/stack/hypermedia.d.ts +0 -4
- package/dist/types/stack/hypermedia.js +0 -3
- package/dist/types/stack/index.d.ts +0 -4
- package/dist/types/stack/index.js +0 -4
- package/dist/types/stack/recommend.d.ts +0 -38
- package/dist/types/stack/recommend.js +0 -3
- package/dist/types/status.d.ts +0 -27
- package/dist/types/status.js +0 -6
- package/dist/types/storage-catalog.d.ts +0 -21
- package/dist/types/storage-catalog.js +0 -2
- package/dist/types/supply-chain.d.ts +0 -49
- package/dist/types/supply-chain.js +0 -25
- package/dist/types/technology-registry.d.ts +0 -36
- package/dist/types/technology-registry.js +0 -2
- package/dist/types/technology-selection.d.ts +0 -78
- package/dist/types/technology-selection.js +0 -3
- package/dist/types/technology-symbols.generated.d.ts +0 -117
- package/dist/types/technology-symbols.generated.js +0 -2
- package/dist/types/testing.d.ts +0 -17
- package/dist/types/testing.js +0 -10
- package/dist/types/timing.d.ts +0 -18
- package/dist/types/timing.js +0 -3
- package/dist/types/transition-log.d.ts +0 -78
- package/dist/types/transition-log.js +0 -4
- package/dist/types/transport.d.ts +0 -6
- package/dist/types/transport.js +0 -4
- package/dist/types/universal-rules/index.d.ts +0 -69
- package/dist/types/universal-rules/index.js +0 -4
- package/dist/types/validate-worker.d.ts +0 -50
- package/dist/types/validate-worker.js +0 -2
- package/dist/types/validation-config.d.ts +0 -36
- package/dist/types/validation-config.js +0 -2
- package/dist/types/validation-evidence.d.ts +0 -177
- package/dist/types/validation-evidence.js +0 -2
- package/dist/types/validation-loop.d.ts +0 -26
- package/dist/types/validation-loop.js +0 -3
- package/dist/types/validation-receipt.d.ts +0 -126
- package/dist/types/validation-receipt.js +0 -2
- package/dist/types/validation.d.ts +0 -67
- package/dist/types/validation.js +0 -3
- package/dist/types/verifiable-criteria.d.ts +0 -31
- package/dist/types/verifiable-criteria.js +0 -10
- package/src/i18n/messages/en.json +0 -184
- package/src/i18n/messages/es.json +0 -184
- package/src/i18n/messages/pt.json +0 -184
package/dist/tools/validate.js
DELETED
|
@@ -1,1039 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-lines -- validate coordinates multiple legacy gate payloads in one tool. */
|
|
2
|
-
// tools/validate.ts — Compare spec vs implementation (SPEC-595: elicitation on failures)
|
|
3
|
-
// Uses the validator engine to check coverage, missing items, quality issues.
|
|
4
|
-
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
5
|
-
if (value !== null && value !== void 0) {
|
|
6
|
-
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
7
|
-
var dispose, inner;
|
|
8
|
-
if (async) {
|
|
9
|
-
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
10
|
-
dispose = value[Symbol.asyncDispose];
|
|
11
|
-
}
|
|
12
|
-
if (dispose === void 0) {
|
|
13
|
-
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
14
|
-
dispose = value[Symbol.dispose];
|
|
15
|
-
if (async) inner = dispose;
|
|
16
|
-
}
|
|
17
|
-
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
18
|
-
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
19
|
-
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
20
|
-
}
|
|
21
|
-
else if (async) {
|
|
22
|
-
env.stack.push({ async: true });
|
|
23
|
-
}
|
|
24
|
-
return value;
|
|
25
|
-
};
|
|
26
|
-
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
27
|
-
return function (env) {
|
|
28
|
-
function fail(e) {
|
|
29
|
-
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
30
|
-
env.hasError = true;
|
|
31
|
-
}
|
|
32
|
-
var r, s = 0;
|
|
33
|
-
function next() {
|
|
34
|
-
while (r = env.stack.pop()) {
|
|
35
|
-
try {
|
|
36
|
-
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
37
|
-
if (r.dispose) {
|
|
38
|
-
var result = r.dispose.call(r.value);
|
|
39
|
-
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
40
|
-
}
|
|
41
|
-
else s |= 1;
|
|
42
|
-
}
|
|
43
|
-
catch (e) {
|
|
44
|
-
fail(e);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
48
|
-
if (env.hasError) throw env.error;
|
|
49
|
-
}
|
|
50
|
-
return next();
|
|
51
|
-
};
|
|
52
|
-
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
53
|
-
var e = new Error(message);
|
|
54
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
55
|
-
});
|
|
56
|
-
import { elicitOrFallback, buildEnumSchema } from '../engine/elicitation/elicit-helper.js';
|
|
57
|
-
import { compactObj } from '../engine/compact-obj.js';
|
|
58
|
-
import { resolveProjectId, missingProjectIdError } from './resolve-project-id.js';
|
|
59
|
-
import { specStore, knowledgeStore } from '../storage/index.js';
|
|
60
|
-
import { validateSpec, generateDoR, generateDoD } from '../engine/validator.js';
|
|
61
|
-
import { scanCodeForSpec } from '../engine/validator/analyzer.js';
|
|
62
|
-
import { isBlockingQualitySeverity } from '../engine/validator/dor-dod.js';
|
|
63
|
-
import { readVerifiedImplementationReview } from '../engine/handoff-artifacts/implementation-review-reader.js';
|
|
64
|
-
import { calcQualityScore } from '../engine/auditor-scoring.js';
|
|
65
|
-
import { scoreToGrade } from '../engine/score-to-grade.js';
|
|
66
|
-
import { t, ti } from '../i18n/index.js';
|
|
67
|
-
import { createBasicPhaseEvent } from '../engine/phase-tracker.js';
|
|
68
|
-
import { parseConventions, scanConventions } from '../engine/convention-scanner/index.js';
|
|
69
|
-
import { validateScopeCompliance } from '../engine/scope-boundaries/index.js';
|
|
70
|
-
import { compareWithBaseline } from '../storage/convention-baseline.js';
|
|
71
|
-
import { readFile } from 'node:fs/promises';
|
|
72
|
-
import { isAbsolute, join } from 'node:path';
|
|
73
|
-
import { writeImplementationReviewReport } from '../engine/validator/validation-report-writer.js';
|
|
74
|
-
import { runReliabilityGate } from '../engine/validator/reliability-gate.js';
|
|
75
|
-
import { runBlastRadiusGate } from '../engine/validator/blast-radius-gate.js';
|
|
76
|
-
import { collectDeclaredSpecFiles } from '../engine/validator/spec-compliance-runner.js';
|
|
77
|
-
import { buildGraphCoverageReport, formatGraphCoverageText } from './validate-graph-coverage.js';
|
|
78
|
-
import { buildMinimalityReport } from './validate-minimality.js';
|
|
79
|
-
import { buildValidateFailureFallback, validateStrictLayoutOrError } from './validate-helpers.js';
|
|
80
|
-
import { runLintCheck } from './validate-lint.js';
|
|
81
|
-
import { checkPlanuUncommittedChanges, runAssuranceGates } from './validate-assurance.js';
|
|
82
|
-
import { applyValidateStructuredCompat } from './validate-structured-compat.js';
|
|
83
|
-
import { getToolExecutionSignal } from './safe-handler.js';
|
|
84
|
-
import { remainingExecutionMs } from '../engine/execution/context.js';
|
|
85
|
-
import { DurableJobRuntime, publicJobCursor } from '../engine/execution/job-runtime.js';
|
|
86
|
-
import { scheduleValidateJobExecution } from '../engine/execution/validate-job-executor.js';
|
|
87
|
-
import { createPendingValidationSubmission } from '../engine/validation/durable-validation.js';
|
|
88
|
-
import { PROJECT_ID as CANONICAL_PROJECT_ID } from '../engine/validation/validation-receipt-codec.js';
|
|
89
|
-
import { acquireLock, releaseLock } from '../engine/safety/cross-process-lock.js';
|
|
90
|
-
import { getRuntimePolicy } from '../engine/runtime-policy.js';
|
|
91
|
-
import { PROCESS_TERMINATION_GRACE_MS, PROCESS_TREE_EXTINCTION_TIMEOUT_MS, PROCESS_CHILD_CLOSE_TIMEOUT_MS, } from '../engine/abortable-process-runner.js';
|
|
92
|
-
import { resolveValidationWorktree, ValidationWorktreeError, } from '../engine/validation/validation-worktree.js';
|
|
93
|
-
// Re-export for external use (SPEC-018)
|
|
94
|
-
const VALIDATION_GATE_TOTAL = 10;
|
|
95
|
-
const GATE_DEADLINE_EXEMPT_PHASES = new Set(['lint', 'compliance']);
|
|
96
|
-
const BLAST_RADIUS_TERMINATION_MARGIN_MS = PROCESS_TERMINATION_GRACE_MS +
|
|
97
|
-
PROCESS_TREE_EXTINCTION_TIMEOUT_MS +
|
|
98
|
-
PROCESS_CHILD_CLOSE_TIMEOUT_MS;
|
|
99
|
-
async function runWithGateDeadline(phase, command, work, deadlineMs = getRuntimePolicy().validation.perGateTimeoutMs) {
|
|
100
|
-
if (GATE_DEADLINE_EXEMPT_PHASES.has(phase)) {
|
|
101
|
-
return work();
|
|
102
|
-
}
|
|
103
|
-
let timer;
|
|
104
|
-
const deadline = new Promise((_resolve, reject) => {
|
|
105
|
-
timer = setTimeout(() => {
|
|
106
|
-
reject(new Error(`[Planu] validate gate "${phase}" (${command}) exceeded its ${String(deadlineMs)}ms deadline`));
|
|
107
|
-
}, deadlineMs);
|
|
108
|
-
});
|
|
109
|
-
try {
|
|
110
|
-
return await Promise.race([Promise.resolve(work()), deadline]);
|
|
111
|
-
}
|
|
112
|
-
finally {
|
|
113
|
-
clearTimeout(timer);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
function computeIntegrationTimeoutMs() {
|
|
117
|
-
const blastRadiusTimeoutMs = getRuntimePolicy().validation.blastRadiusTimeoutMs;
|
|
118
|
-
return Math.max(0, Math.min(blastRadiusTimeoutMs, remainingExecutionMs() - blastRadiusTimeoutMs));
|
|
119
|
-
}
|
|
120
|
-
function isBlastRadiusPassed(blastRadiusGate) {
|
|
121
|
-
return blastRadiusGate.passed && blastRadiusGate.warningReason === null;
|
|
122
|
-
}
|
|
123
|
-
function blastRadiusWarnings(blastRadiusGate) {
|
|
124
|
-
if (blastRadiusGate.warningReason === 'stale-dist') {
|
|
125
|
-
return [
|
|
126
|
-
{
|
|
127
|
-
file: 'blast-radius',
|
|
128
|
-
line: 0,
|
|
129
|
-
severity: 'warning',
|
|
130
|
-
rule: 'stale-dist',
|
|
131
|
-
message: 'Blast radius gate could not run: dist/ build provenance is stale',
|
|
132
|
-
suggestion: 'Run pnpm build:ts and re-run validate.',
|
|
133
|
-
},
|
|
134
|
-
];
|
|
135
|
-
}
|
|
136
|
-
return blastRadiusGate.warningReason === null
|
|
137
|
-
? []
|
|
138
|
-
: [
|
|
139
|
-
{
|
|
140
|
-
file: 'blast-radius',
|
|
141
|
-
line: 0,
|
|
142
|
-
severity: 'warning',
|
|
143
|
-
rule: blastRadiusGate.warningReason,
|
|
144
|
-
message: 'Integration importers of the changed files were not exercised within the validate budget.',
|
|
145
|
-
suggestion: 'Run `npx vitest related --run <changed files>` without PLANU_EXCLUDE_INTEGRATION_TESTS, or raise validation.blastRadiusTimeoutMs, before marking this spec done.',
|
|
146
|
-
},
|
|
147
|
-
];
|
|
148
|
-
}
|
|
149
|
-
export function createValidationStageRunner(onProgress) {
|
|
150
|
-
const startedAt = Date.now();
|
|
151
|
-
let completedGates = 0;
|
|
152
|
-
return async (phase, command, work, deadlineMs) => {
|
|
153
|
-
const emit = (status) => {
|
|
154
|
-
onProgress?.({
|
|
155
|
-
phase,
|
|
156
|
-
command,
|
|
157
|
-
durationMs: Date.now() - startedAt,
|
|
158
|
-
completedGates,
|
|
159
|
-
totalGates: VALIDATION_GATE_TOTAL,
|
|
160
|
-
lastProgressAt: new Date().toISOString(),
|
|
161
|
-
status,
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
emit('running');
|
|
165
|
-
try {
|
|
166
|
-
const result = await runWithGateDeadline(phase, command, work, deadlineMs);
|
|
167
|
-
completedGates += 1;
|
|
168
|
-
emit('passed');
|
|
169
|
-
return result;
|
|
170
|
-
}
|
|
171
|
-
catch (error) {
|
|
172
|
-
completedGates += 1;
|
|
173
|
-
emit('failed');
|
|
174
|
-
throw error;
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
/** Public MCP boundary: persist and acknowledge validation work without running it inline. */
|
|
179
|
-
export async function handleValidate(args) {
|
|
180
|
-
let projectId;
|
|
181
|
-
try {
|
|
182
|
-
projectId = resolveProjectId(args);
|
|
183
|
-
}
|
|
184
|
-
catch (error) {
|
|
185
|
-
return validationWorktreeErrorResult(error, args.specId);
|
|
186
|
-
}
|
|
187
|
-
if (!projectId) {
|
|
188
|
-
return missingProjectIdError;
|
|
189
|
-
}
|
|
190
|
-
if (!CANONICAL_PROJECT_ID.test(projectId)) {
|
|
191
|
-
return {
|
|
192
|
-
content: [
|
|
193
|
-
{
|
|
194
|
-
type: 'text',
|
|
195
|
-
text: '[Planu] Validation requires the canonical project identity. Run init_project with the absolute projectPath to migrate legacy state, then retry validate with projectPath.',
|
|
196
|
-
},
|
|
197
|
-
],
|
|
198
|
-
isError: true,
|
|
199
|
-
structuredContent: {
|
|
200
|
-
error: 'legacy_project_identity',
|
|
201
|
-
code: 409,
|
|
202
|
-
context: { projectId, expected: 'canonical-32-hex' },
|
|
203
|
-
nextAction: {
|
|
204
|
-
tool: 'init_project',
|
|
205
|
-
arguments: { projectPath: '<absolute-project-path>' },
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
const knowledge = await knowledgeStore.getKnowledge(projectId);
|
|
211
|
-
if (!knowledge) {
|
|
212
|
-
return {
|
|
213
|
-
content: [{ type: 'text', text: t('project.notFound') }],
|
|
214
|
-
isError: true,
|
|
215
|
-
structuredContent: { error: 'project_not_found', code: 404, context: { projectId } },
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
const storedSpec = await specStore.getSpec(projectId, args.specId, args.projectPath === undefined ? knowledge.projectPath : undefined);
|
|
219
|
-
if (!storedSpec?.specPath) {
|
|
220
|
-
return {
|
|
221
|
-
content: [{ type: 'text', text: ti('spec.notFound', { id: args.specId }) }],
|
|
222
|
-
isError: true,
|
|
223
|
-
structuredContent: {
|
|
224
|
-
error: 'spec_not_found',
|
|
225
|
-
code: 404,
|
|
226
|
-
context: { specId: args.specId, projectId },
|
|
227
|
-
},
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
let validationWorktree;
|
|
231
|
-
try {
|
|
232
|
-
const requestedProjectPath = args.projectPath ?? knowledge.projectPath;
|
|
233
|
-
const selectedSpecPath = isAbsolute(storedSpec.specPath)
|
|
234
|
-
? storedSpec.specPath
|
|
235
|
-
: join(requestedProjectPath, storedSpec.specPath);
|
|
236
|
-
validationWorktree = await resolveValidationWorktree({
|
|
237
|
-
requestedProjectPath,
|
|
238
|
-
canonicalProjectPath: knowledge.projectPath,
|
|
239
|
-
canonicalSpecPath: selectedSpecPath,
|
|
240
|
-
specId: args.specId,
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
catch (error) {
|
|
244
|
-
return validationWorktreeErrorResult(error, args.specId);
|
|
245
|
-
}
|
|
246
|
-
const spec = await specStore.getSpec(projectId, args.specId, validationWorktree.projectPath);
|
|
247
|
-
if (!spec) {
|
|
248
|
-
return {
|
|
249
|
-
content: [{ type: 'text', text: ti('spec.notFound', { id: args.specId }) }],
|
|
250
|
-
isError: true,
|
|
251
|
-
structuredContent: {
|
|
252
|
-
error: 'spec_not_found',
|
|
253
|
-
code: 404,
|
|
254
|
-
context: { specId: args.specId, projectId },
|
|
255
|
-
},
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
const submissionLock = await acquireValidationSubmissionLock(projectId, args.specId);
|
|
259
|
-
try {
|
|
260
|
-
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
261
|
-
try {
|
|
262
|
-
const runtime = __addDisposableResource(env_1, new DurableJobRuntime(), false);
|
|
263
|
-
const active = runtime.list(projectId).find((candidate) => {
|
|
264
|
-
const payload = candidate.payload;
|
|
265
|
-
return (['accepted', 'checkpointed', 'running'].includes(candidate.state) &&
|
|
266
|
-
payload?.kind === 'validate' &&
|
|
267
|
-
payload.input?.specId === args.specId);
|
|
268
|
-
});
|
|
269
|
-
if (active) {
|
|
270
|
-
const activePayload = active.payload;
|
|
271
|
-
if (activePayload?.validationRootId !== validationWorktree.validationRootId) {
|
|
272
|
-
return validationWorktreeErrorResult(new ValidationWorktreeError('VALIDATION_ROOT_BUSY', args.specId), args.specId);
|
|
273
|
-
}
|
|
274
|
-
if (active.state === 'accepted' || active.state === 'checkpointed') {
|
|
275
|
-
scheduleValidateJobExecution(projectId, active.workspaceId);
|
|
276
|
-
}
|
|
277
|
-
return validationAcceptedResult(active, projectId, runtime, { justCreated: false });
|
|
278
|
-
}
|
|
279
|
-
const job = createPendingValidationSubmission({
|
|
280
|
-
runtime,
|
|
281
|
-
canonicalProjectId: projectId,
|
|
282
|
-
spec: {
|
|
283
|
-
id: args.specId,
|
|
284
|
-
projectPath: validationWorktree.projectPath,
|
|
285
|
-
specPath: validationWorktree.relativeSpecPath,
|
|
286
|
-
validationRootId: validationWorktree.validationRootId,
|
|
287
|
-
},
|
|
288
|
-
deadlineAt: Date.now() + getRuntimePolicy().validation.defaultDeadlineMs,
|
|
289
|
-
});
|
|
290
|
-
if (job.state === 'accepted' || job.state === 'checkpointed') {
|
|
291
|
-
scheduleValidateJobExecution(projectId, job.workspaceId);
|
|
292
|
-
}
|
|
293
|
-
return validationAcceptedResult(job, projectId, runtime, { justCreated: true });
|
|
294
|
-
}
|
|
295
|
-
catch (e_1) {
|
|
296
|
-
env_1.error = e_1;
|
|
297
|
-
env_1.hasError = true;
|
|
298
|
-
}
|
|
299
|
-
finally {
|
|
300
|
-
__disposeResources(env_1);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
finally {
|
|
304
|
-
await releaseLock(submissionLock);
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
function validationWorktreeErrorResult(error, specId) {
|
|
308
|
-
const failure = error instanceof ValidationWorktreeError
|
|
309
|
-
? error
|
|
310
|
-
: new ValidationWorktreeError('VALIDATION_ROOT_NOT_GIT_WORKTREE', specId);
|
|
311
|
-
return {
|
|
312
|
-
content: [{ type: 'text', text: failure.message }],
|
|
313
|
-
isError: true,
|
|
314
|
-
structuredContent: {
|
|
315
|
-
error: 'validation_worktree_rejected',
|
|
316
|
-
code: failure.code,
|
|
317
|
-
context: {
|
|
318
|
-
specId: failure.specId,
|
|
319
|
-
...(failure.relativeSpecPath ? { path: failure.relativeSpecPath } : {}),
|
|
320
|
-
},
|
|
321
|
-
...(failure.code === 'VALIDATION_STALE_SPEC_PATH'
|
|
322
|
-
? {
|
|
323
|
-
fixHint: `The spec registry still points at a stale checkout for ${failure.relativeSpecPath ?? 'this spec'}. Re-run validate from the canonical checkout (or call list_specs against the canonical projectPath) to self-heal the registry entry, then retry.`,
|
|
324
|
-
}
|
|
325
|
-
: {}),
|
|
326
|
-
},
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
async function acquireValidationSubmissionLock(projectId, specId) {
|
|
330
|
-
const policy = getRuntimePolicy().validation;
|
|
331
|
-
const deadlineAt = Date.now() + policy.submissionLockWaitMs;
|
|
332
|
-
while (Date.now() < deadlineAt) {
|
|
333
|
-
const handle = await acquireLock(projectId, `${specId}-validation-submit`, {
|
|
334
|
-
reason: 'durable-validation-submit',
|
|
335
|
-
});
|
|
336
|
-
if (handle) {
|
|
337
|
-
return handle;
|
|
338
|
-
}
|
|
339
|
-
const remainingMs = deadlineAt - Date.now();
|
|
340
|
-
if (remainingMs > 0) {
|
|
341
|
-
await new Promise((resolve) => setTimeout(resolve, Math.min(policy.submissionLockPollMs, remainingMs)));
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
throw new Error('[Planu] Timed out waiting for the validation submission lock');
|
|
345
|
-
}
|
|
346
|
-
function validationAcceptedResult(job, projectId, runtime, { justCreated }) {
|
|
347
|
-
const observation = runtime.observe(job);
|
|
348
|
-
const reused = !justCreated;
|
|
349
|
-
const accepted = {
|
|
350
|
-
schemaVersion: 1,
|
|
351
|
-
operationId: job.id,
|
|
352
|
-
projectId,
|
|
353
|
-
workspaceId: job.workspaceId,
|
|
354
|
-
state: job.state,
|
|
355
|
-
submittedAt: justCreated ? job.updatedAt : job.createdAt,
|
|
356
|
-
attachedAt: justCreated ? job.updatedAt : new Date().toISOString(),
|
|
357
|
-
reused,
|
|
358
|
-
cursor: publicJobCursor(observation),
|
|
359
|
-
queue: observation.queue,
|
|
360
|
-
terminalStates: ['completed', 'failed', 'cancelled', 'dead-letter'],
|
|
361
|
-
resultSchema: 'validate-completion/v1',
|
|
362
|
-
observation: {
|
|
363
|
-
get: 'get_job',
|
|
364
|
-
restart: 'restart_job',
|
|
365
|
-
},
|
|
366
|
-
};
|
|
367
|
-
const text = reused
|
|
368
|
-
? `Attached to already-running validation job ${job.id}; no new work was scheduled. Follow it with get_job. To force re-execution after it reaches a terminal state, run validate again.`
|
|
369
|
-
: `Validation accepted as durable job ${job.id}.`;
|
|
370
|
-
return {
|
|
371
|
-
content: [{ type: 'text', text }],
|
|
372
|
-
structuredContent: accepted,
|
|
373
|
-
};
|
|
374
|
-
}
|
|
375
|
-
// SPEC-595: server? param enables elicitation for direct internal/test execution.
|
|
376
|
-
// eslint-disable-next-line max-lines-per-function -- validate orchestrates many existing gates in one handler.
|
|
377
|
-
export async function executeValidate(args, server, onProgress) {
|
|
378
|
-
const { specId } = args;
|
|
379
|
-
const projectId = resolveProjectId(args);
|
|
380
|
-
if (!projectId) {
|
|
381
|
-
return missingProjectIdError;
|
|
382
|
-
}
|
|
383
|
-
const knowledge = await knowledgeStore.getKnowledge(projectId);
|
|
384
|
-
if (!knowledge) {
|
|
385
|
-
return {
|
|
386
|
-
content: [{ type: 'text', text: t('project.notFound') }],
|
|
387
|
-
isError: true,
|
|
388
|
-
structuredContent: {
|
|
389
|
-
error: 'project_not_found',
|
|
390
|
-
code: 404,
|
|
391
|
-
context: { projectId },
|
|
392
|
-
fixHint: 'Run init_project first to initialize the project knowledge.',
|
|
393
|
-
},
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
const projectPath = args.projectPath ?? knowledge.projectPath;
|
|
397
|
-
const spec = await specStore.getSpec(projectId, specId, projectPath);
|
|
398
|
-
if (!spec) {
|
|
399
|
-
return {
|
|
400
|
-
content: [{ type: 'text', text: ti('spec.notFound', { id: specId }) }],
|
|
401
|
-
isError: true,
|
|
402
|
-
structuredContent: {
|
|
403
|
-
error: 'spec_not_found',
|
|
404
|
-
code: 404,
|
|
405
|
-
context: { specId, projectId },
|
|
406
|
-
fixHint: `Verify the specId is correct and the spec exists in project ${projectId}.`,
|
|
407
|
-
},
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
const executionSpec = args.specPath ? { ...spec, specPath: args.specPath } : spec;
|
|
411
|
-
const runStage = createValidationStageRunner(onProgress);
|
|
412
|
-
// SPEC-1017: fail closed when planu/ contains non-canonical artifacts.
|
|
413
|
-
const strictLayoutError = await runStage('layout', 'validate strict layout', () => validateStrictLayoutOrError({
|
|
414
|
-
projectPath,
|
|
415
|
-
specId,
|
|
416
|
-
specPath: executionSpec.specPath,
|
|
417
|
-
}));
|
|
418
|
-
if (strictLayoutError !== null) {
|
|
419
|
-
return strictLayoutError;
|
|
420
|
-
}
|
|
421
|
-
const result = await runStage('spec-scan', 'validate spec implementation', () => validateSpec(executionSpec, projectPath));
|
|
422
|
-
const graphCoverage = await runStage('graph', 'validate graph coverage', () => buildGraphCoverageReport({ projectId, projectPath, specId }));
|
|
423
|
-
const { dor, dod } = await runStage('definitions', 'validate ready and done definitions', async () => {
|
|
424
|
-
const verifiedReview = await readVerifiedImplementationReview(projectId, specId);
|
|
425
|
-
return {
|
|
426
|
-
dor: generateDoR(executionSpec),
|
|
427
|
-
dod: await generateDoD(executionSpec, result, undefined, projectPath, verifiedReview),
|
|
428
|
-
};
|
|
429
|
-
});
|
|
430
|
-
const implementationQualityScore = calcQualityScore(result.qualityIssues);
|
|
431
|
-
const auditedFiles = [...new Set(result.qualityIssues.map((i) => i.file))];
|
|
432
|
-
const codeState = await scanCodeForSpec(executionSpec, projectPath);
|
|
433
|
-
const reliabilityGate = await runStage('reliability', 'scripts/check-reliability-policies.mjs --json', () => runReliabilityGate(projectPath, codeState.affectedFiles));
|
|
434
|
-
const blastRadiusTimeoutMs = getRuntimePolicy().validation.blastRadiusTimeoutMs;
|
|
435
|
-
const integrationTimeoutMs = computeIntegrationTimeoutMs();
|
|
436
|
-
const blastRadiusGate = await runStage('blast-radius', "vitest related over the spec's affected source files", async () => {
|
|
437
|
-
const absoluteSpecPath = isAbsolute(executionSpec.specPath)
|
|
438
|
-
? executionSpec.specPath
|
|
439
|
-
: join(projectPath, executionSpec.specPath);
|
|
440
|
-
const raw = await readFile(absoluteSpecPath, 'utf-8');
|
|
441
|
-
const candidateFiles = [
|
|
442
|
-
...new Set([...collectDeclaredSpecFiles(raw), ...codeState.affectedFiles]),
|
|
443
|
-
];
|
|
444
|
-
return runBlastRadiusGate(projectPath, candidateFiles, {
|
|
445
|
-
timeoutMs: blastRadiusTimeoutMs,
|
|
446
|
-
integrationTimeoutMs,
|
|
447
|
-
signal: getToolExecutionSignal(),
|
|
448
|
-
});
|
|
449
|
-
}, blastRadiusTimeoutMs + integrationTimeoutMs + BLAST_RADIUS_TERMINATION_MARGIN_MS);
|
|
450
|
-
const { conventionViolations, regressionDetected } = await runStage('conventions', 'validate project conventions', () => scanProjectConventions(projectId, projectPath));
|
|
451
|
-
const lintCheck = await runStage('lint', knowledge.lintCommand ?? 'pnpm lint', () => runLintCheck(projectPath, knowledge.lintCommand ?? null, {
|
|
452
|
-
projectId,
|
|
453
|
-
specId,
|
|
454
|
-
maximumTimeoutMs: getRuntimePolicy().validation.durableLintTimeoutMs,
|
|
455
|
-
}));
|
|
456
|
-
const { assuranceGates, minimalityReport } = await runStage('assurance', 'validate assurance and minimality', async () => ({
|
|
457
|
-
assuranceGates: runAssuranceGates(projectPath),
|
|
458
|
-
minimalityReport: await buildMinimalityReport({
|
|
459
|
-
projectPath,
|
|
460
|
-
specId,
|
|
461
|
-
risk: executionSpec.risk,
|
|
462
|
-
title: executionSpec.title,
|
|
463
|
-
missing: result.missing,
|
|
464
|
-
extra: result.extra,
|
|
465
|
-
qualityIssues: result.qualityIssues,
|
|
466
|
-
}),
|
|
467
|
-
}));
|
|
468
|
-
// SPEC-1050: Generate a mandatory implementation-review artifact.
|
|
469
|
-
const validationReport = await runStage('compliance', 'validate spec compliance', () => writeImplementationReviewReport({
|
|
470
|
-
projectId,
|
|
471
|
-
specId,
|
|
472
|
-
spec: executionSpec,
|
|
473
|
-
projectPath,
|
|
474
|
-
score: result.score,
|
|
475
|
-
lintPassed: lintCheck.passed,
|
|
476
|
-
conventionRegression: regressionDetected,
|
|
477
|
-
minimalityReport: minimalityReport ?? undefined,
|
|
478
|
-
signal: getToolExecutionSignal(),
|
|
479
|
-
blastRadius: blastRadiusGate,
|
|
480
|
-
}));
|
|
481
|
-
const effectiveResult = buildEffectiveValidationResult(result, validationReport.specCompliance);
|
|
482
|
-
const qualityGateSummary = buildQualityGateSummary({
|
|
483
|
-
conventionViolations,
|
|
484
|
-
regressionDetected,
|
|
485
|
-
lintPassed: lintCheck.passed,
|
|
486
|
-
assurancePassed: assuranceGates.newCode.passed,
|
|
487
|
-
minimalityBlocked: minimalityReport?.blocked === true,
|
|
488
|
-
reliabilityPassed: reliabilityGate.passed,
|
|
489
|
-
blastRadiusPassed: isBlastRadiusPassed(blastRadiusGate),
|
|
490
|
-
score: effectiveResult.score,
|
|
491
|
-
});
|
|
492
|
-
const output = {
|
|
493
|
-
specId,
|
|
494
|
-
title: executionSpec.title,
|
|
495
|
-
score: effectiveResult.score,
|
|
496
|
-
fieldsImplemented: effectiveResult.fieldsImplemented,
|
|
497
|
-
fieldsTotal: effectiveResult.fieldsTotal,
|
|
498
|
-
matches: effectiveResult.matches,
|
|
499
|
-
missing: effectiveResult.missing,
|
|
500
|
-
extra: effectiveResult.extra,
|
|
501
|
-
qualityIssues: result.qualityIssues.map((issue) => ({
|
|
502
|
-
file: issue.file,
|
|
503
|
-
line: issue.line,
|
|
504
|
-
severity: issue.severity,
|
|
505
|
-
rule: issue.rule,
|
|
506
|
-
message: issue.message,
|
|
507
|
-
suggestion: issue.suggestion,
|
|
508
|
-
})),
|
|
509
|
-
implementationQualityScore: {
|
|
510
|
-
overall: implementationQualityScore.overall,
|
|
511
|
-
gradeLetter: scoreToGrade(implementationQualityScore.overall),
|
|
512
|
-
filesAudited: auditedFiles.length,
|
|
513
|
-
categories: implementationQualityScore.categories.map((c) => ({
|
|
514
|
-
category: c.category,
|
|
515
|
-
score: c.score,
|
|
516
|
-
weight: c.weight,
|
|
517
|
-
issueCount: c.issueCount,
|
|
518
|
-
worstSeverity: c.worstSeverity,
|
|
519
|
-
})),
|
|
520
|
-
},
|
|
521
|
-
definitionOfReady: {
|
|
522
|
-
isReady: dor.isReady,
|
|
523
|
-
passed: dor.passedCount,
|
|
524
|
-
required: dor.requiredCount,
|
|
525
|
-
items: dor.items
|
|
526
|
-
.filter((item) => item.status === 'failed')
|
|
527
|
-
.map((item) => ({
|
|
528
|
-
id: item.id,
|
|
529
|
-
description: item.description,
|
|
530
|
-
status: item.status,
|
|
531
|
-
})),
|
|
532
|
-
},
|
|
533
|
-
definitionOfDone: {
|
|
534
|
-
isDone: dod.isDone,
|
|
535
|
-
passed: dod.passedCount,
|
|
536
|
-
required: dod.requiredCount,
|
|
537
|
-
failedItems: dod.items
|
|
538
|
-
.filter((i) => i.required && i.status !== 'passed')
|
|
539
|
-
.map((i) => ({
|
|
540
|
-
id: i.id,
|
|
541
|
-
description: i.description,
|
|
542
|
-
category: i.category,
|
|
543
|
-
status: i.status,
|
|
544
|
-
})),
|
|
545
|
-
items: dod.items
|
|
546
|
-
.filter((item) => item.status !== 'passed')
|
|
547
|
-
.map((item) => ({
|
|
548
|
-
id: item.id,
|
|
549
|
-
description: item.description,
|
|
550
|
-
status: item.status,
|
|
551
|
-
})),
|
|
552
|
-
},
|
|
553
|
-
conventionCompliance: {
|
|
554
|
-
totalViolations: conventionViolations.length,
|
|
555
|
-
regressionDetected,
|
|
556
|
-
violations: conventionViolations.slice(0, 20).map((v) => ({
|
|
557
|
-
category: v.category,
|
|
558
|
-
file: v.file,
|
|
559
|
-
line: v.line,
|
|
560
|
-
message: v.message,
|
|
561
|
-
severity: v.severity,
|
|
562
|
-
})),
|
|
563
|
-
},
|
|
564
|
-
lintCheck,
|
|
565
|
-
assuranceGates,
|
|
566
|
-
qualityGateSummary,
|
|
567
|
-
validationReport,
|
|
568
|
-
minimalityReport,
|
|
569
|
-
graphCoverage,
|
|
570
|
-
};
|
|
571
|
-
// SPEC-612: Scope boundary validation — warn if impl files match outOfScope items
|
|
572
|
-
if (spec.outOfScope !== undefined && spec.outOfScope.length > 0) {
|
|
573
|
-
const scopeResult = validateScopeCompliance(spec.outOfScope, auditedFiles);
|
|
574
|
-
for (const warning of scopeResult.warnings) {
|
|
575
|
-
output.qualityIssues.push({
|
|
576
|
-
file: warning.filePath,
|
|
577
|
-
line: 0,
|
|
578
|
-
severity: 'warning',
|
|
579
|
-
rule: 'scope-boundary-violation',
|
|
580
|
-
message: warning.reason,
|
|
581
|
-
suggestion: `Review whether this file should exist — it matches the out-of-scope item: "${warning.violates}"`,
|
|
582
|
-
});
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
for (const failure of reliabilityGate.failures) {
|
|
586
|
-
output.qualityIssues.push({
|
|
587
|
-
file: failure.file,
|
|
588
|
-
line: failure.line,
|
|
589
|
-
severity: 'critical',
|
|
590
|
-
rule: failure.rule,
|
|
591
|
-
message: `Reliability gate violation: ${failure.rule}`,
|
|
592
|
-
suggestion: 'Fix the release-gate reliability violation before marking this spec done.',
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
for (const warning of reliabilityGate.warnings) {
|
|
596
|
-
output.qualityIssues.push({
|
|
597
|
-
file: warning.file,
|
|
598
|
-
line: warning.line,
|
|
599
|
-
severity: 'warning',
|
|
600
|
-
rule: warning.rule,
|
|
601
|
-
message: `Reliability gate violation in an unrelated file: ${warning.rule}`,
|
|
602
|
-
suggestion: 'Not blocking this spec — file is outside the spec Files section.',
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
for (const failure of blastRadiusGate.failures) {
|
|
606
|
-
output.qualityIssues.push({
|
|
607
|
-
file: failure.file,
|
|
608
|
-
line: 0,
|
|
609
|
-
severity: 'critical',
|
|
610
|
-
rule: 'blast-radius',
|
|
611
|
-
message: `Blast radius test failure: ${failure.message}`,
|
|
612
|
-
suggestion: 'Fix the failing importer tests (or raise validation.blastRadiusTimeoutMs) before marking this spec done.',
|
|
613
|
-
});
|
|
614
|
-
}
|
|
615
|
-
if (blastRadiusGate.skipped !== null) {
|
|
616
|
-
output.qualityIssues.push({
|
|
617
|
-
file: 'blast-radius',
|
|
618
|
-
line: 0,
|
|
619
|
-
severity: 'warning',
|
|
620
|
-
rule: 'blast-radius-skipped',
|
|
621
|
-
message: `Blast radius gate skipped: ${blastRadiusGate.skipped}`,
|
|
622
|
-
suggestion: 'No importer regression coverage ran for this validate call.',
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
output.qualityIssues.push(...blastRadiusWarnings(blastRadiusGate));
|
|
626
|
-
// Auto-suggest corrective actions based on validation results
|
|
627
|
-
// score is null when no criteria can be extracted — treat as 0 for comparisons.
|
|
628
|
-
const scoreValue = effectiveResult.score ?? 0;
|
|
629
|
-
const suggestions = [];
|
|
630
|
-
if (scoreValue < 50) {
|
|
631
|
-
suggestions.push('Critical: Many acceptance criteria not implemented. Review spec requirements.');
|
|
632
|
-
}
|
|
633
|
-
if (result.qualityIssues.length > 10) {
|
|
634
|
-
suggestions.push('Run audit for detailed code quality analysis.');
|
|
635
|
-
}
|
|
636
|
-
if (!dor.isReady && spec.status === 'draft') {
|
|
637
|
-
suggestions.push('Spec is not ready for implementation. Complete missing DoR items first.');
|
|
638
|
-
}
|
|
639
|
-
if (!dod.isDone && spec.status === 'implementing') {
|
|
640
|
-
suggestions.push('Implementation incomplete. Review DoD checklist before marking as done.');
|
|
641
|
-
}
|
|
642
|
-
if (effectiveResult.missing.length > 0) {
|
|
643
|
-
suggestions.push(`${effectiveResult.missing.length} criteria still missing. Run reconcile_spec to record the gaps.`);
|
|
644
|
-
}
|
|
645
|
-
if (graphCoverage.gaps.length > 0) {
|
|
646
|
-
suggestions.push(`${graphCoverage.gaps.length} graph-backed coverage gap(s) found without broad repository scan.`);
|
|
647
|
-
}
|
|
648
|
-
if (conventionViolations.length > 0) {
|
|
649
|
-
suggestions.push(`${conventionViolations.length} convention violation(s) detected. Fix before marking as done.`);
|
|
650
|
-
}
|
|
651
|
-
if (regressionDetected) {
|
|
652
|
-
suggestions.push('Quality regression detected: more violations than baseline. New code introduced convention violations.');
|
|
653
|
-
}
|
|
654
|
-
if (!lintCheck.passed) {
|
|
655
|
-
suggestions.push(`Lint check failed: ${lintCheck.issueCount} issue(s) found via \`${lintCheck.command}\`. Fix before marking as done.`);
|
|
656
|
-
}
|
|
657
|
-
if (reliabilityGate.executionError !== undefined) {
|
|
658
|
-
suggestions.push(`Reliability gate could not run: ${reliabilityGate.executionError}. Fix the gate before marking as done.`);
|
|
659
|
-
}
|
|
660
|
-
else if (!reliabilityGate.passed) {
|
|
661
|
-
suggestions.push(`Reliability gate failed: ${String(reliabilityGate.failures.length)} violation(s) in this spec's files. Fix before marking as done.`);
|
|
662
|
-
}
|
|
663
|
-
if (blastRadiusGate.skipped === null && !blastRadiusGate.passed) {
|
|
664
|
-
suggestions.push('Fix the failing importer tests (or raise validation.blastRadiusTimeoutMs) before marking this spec done.');
|
|
665
|
-
}
|
|
666
|
-
if (!assuranceGates.newCode.passed) {
|
|
667
|
-
suggestions.push(`Assurance gate failed: ${String(assuranceGates.newCode.findings.length)} new-code domain inference issue(s) found.`);
|
|
668
|
-
}
|
|
669
|
-
if (minimalityReport?.blocked) {
|
|
670
|
-
suggestions.push(`${minimalityReport.findings.filter((finding) => finding.blocksDone).length} blocking minimality finding(s) detected. Remove avoidable complexity or record accepted debt before marking done.`);
|
|
671
|
-
}
|
|
672
|
-
const commitReminder = scoreValue >= 80
|
|
673
|
-
? `\n\n> 💡 Good score! Remember to save progress with git: \`git add planu/specs/ planu/conventions.json && git commit -m "chore: ${specId} progress checkpoint"\``
|
|
674
|
-
: '';
|
|
675
|
-
// SPEC-326: Pending HTML changes notification
|
|
676
|
-
const planuChanges = checkPlanuUncommittedChanges(projectPath);
|
|
677
|
-
const planuReminder = planuChanges
|
|
678
|
-
? '\n\n📁 HTML reports updated — commit to save: `git add planu/specs/ planu/conventions.json && git commit -m "chore(planu): update reports"`'
|
|
679
|
-
: '';
|
|
680
|
-
// SPEC-512: Compact output — only surface failures, cap to 200 tokens
|
|
681
|
-
const totalCriteria = effectiveResult.fieldsTotal;
|
|
682
|
-
const passedCount = effectiveResult.fieldsImplemented;
|
|
683
|
-
const failedCount = totalCriteria - passedCount;
|
|
684
|
-
const indeterminate = effectiveResult.indeterminate ?? [];
|
|
685
|
-
const effectiveScore = qualityGateSummary.effectiveScore ?? scoreValue;
|
|
686
|
-
const compactText = buildCompactValidateText({
|
|
687
|
-
score: effectiveScore,
|
|
688
|
-
passedCount,
|
|
689
|
-
failedCount,
|
|
690
|
-
totalCriteria,
|
|
691
|
-
qualityFailures: qualityGateSummary.failures,
|
|
692
|
-
missing: effectiveResult.missing,
|
|
693
|
-
indeterminate,
|
|
694
|
-
commitReminder,
|
|
695
|
-
planuReminder,
|
|
696
|
-
});
|
|
697
|
-
const graphText = formatGraphCoverageText(graphCoverage);
|
|
698
|
-
// SPEC-512: Compact structuredContent — essential fields only at top level
|
|
699
|
-
const compactSummary = buildCompactSummary(specId, effectiveResult.score === null ? null : effectiveScore, passedCount, failedCount + (qualityGateSummary.passed ? 0 : 1), totalCriteria, graphCoverage.availability);
|
|
700
|
-
const structuredBase = buildValidateStructuredContent({
|
|
701
|
-
specId,
|
|
702
|
-
title: spec.title,
|
|
703
|
-
score: effectiveResult.score === null ? null : effectiveScore,
|
|
704
|
-
compactSummary,
|
|
705
|
-
result: effectiveResult,
|
|
706
|
-
indeterminate,
|
|
707
|
-
dor,
|
|
708
|
-
dod,
|
|
709
|
-
qualityIssues: output.qualityIssues,
|
|
710
|
-
implementationQualityScore: output.implementationQualityScore,
|
|
711
|
-
conventionCompliance: output.conventionCompliance,
|
|
712
|
-
lintCheck,
|
|
713
|
-
assuranceGates,
|
|
714
|
-
qualityGateSummary,
|
|
715
|
-
validationReport,
|
|
716
|
-
minimalityReport,
|
|
717
|
-
graphCoverage,
|
|
718
|
-
suggestions,
|
|
719
|
-
});
|
|
720
|
-
// SPEC-595: Elicit next action when validation fails and a server is available
|
|
721
|
-
if (server !== undefined && failedCount > 0) {
|
|
722
|
-
const { field, property } = buildEnumSchema('action', ['re-implement', 'ignore', 'mark-manual'], ['Fix failing criteria (Recommended)', 'Ignore failures', 'Mark as manually reviewed'], 'Next action', 're-implement');
|
|
723
|
-
const schema = { type: 'object', properties: { [field]: property } };
|
|
724
|
-
const fallback = buildValidateFailureFallback(failedCount);
|
|
725
|
-
const outcome = await elicitOrFallback(server, `Validation: ${String(failedCount)} criteria failed. How do you want to proceed?`, schema, [fallback]);
|
|
726
|
-
if (outcome.mode === 'fallback') {
|
|
727
|
-
return {
|
|
728
|
-
phaseEvent: createBasicPhaseEvent('validate', 'completed', 100, 'validating'),
|
|
729
|
-
content: [{ type: 'text', text: compactText + graphText }],
|
|
730
|
-
structuredContent: {
|
|
731
|
-
...structuredBase,
|
|
732
|
-
interactiveQuestions: outcome.interactiveQuestions,
|
|
733
|
-
},
|
|
734
|
-
};
|
|
735
|
-
}
|
|
736
|
-
const elicitedAction = outcome.action === 'accept'
|
|
737
|
-
? (outcome.content?.action ?? 're-implement')
|
|
738
|
-
: 're-implement';
|
|
739
|
-
return {
|
|
740
|
-
phaseEvent: createBasicPhaseEvent('validate', 'completed', 100, 'validating'),
|
|
741
|
-
content: [{ type: 'text', text: compactText + graphText }],
|
|
742
|
-
structuredContent: {
|
|
743
|
-
...structuredBase,
|
|
744
|
-
elicitedAction,
|
|
745
|
-
},
|
|
746
|
-
};
|
|
747
|
-
}
|
|
748
|
-
return {
|
|
749
|
-
phaseEvent: createBasicPhaseEvent('validate', 'completed', 100, 'validating'),
|
|
750
|
-
content: [{ type: 'text', text: compactText + graphText }],
|
|
751
|
-
structuredContent: structuredBase,
|
|
752
|
-
};
|
|
753
|
-
}
|
|
754
|
-
async function scanProjectConventions(projectId, projectPath) {
|
|
755
|
-
try {
|
|
756
|
-
const rules = parseConventions(projectPath);
|
|
757
|
-
if (rules.length === 0) {
|
|
758
|
-
return { conventionViolations: [], regressionDetected: false };
|
|
759
|
-
}
|
|
760
|
-
const conventionViolations = scanConventions(projectPath, rules);
|
|
761
|
-
const comparison = await compareWithBaseline(projectId, {
|
|
762
|
-
rules,
|
|
763
|
-
violations: conventionViolations,
|
|
764
|
-
summary: {
|
|
765
|
-
totalRules: rules.length,
|
|
766
|
-
totalViolations: conventionViolations.length,
|
|
767
|
-
bySeverity: {},
|
|
768
|
-
byCategory: {},
|
|
769
|
-
},
|
|
770
|
-
scannedAt: new Date().toISOString(),
|
|
771
|
-
});
|
|
772
|
-
return { conventionViolations, regressionDetected: comparison.regressionDetected };
|
|
773
|
-
}
|
|
774
|
-
catch {
|
|
775
|
-
return { conventionViolations: [], regressionDetected: false };
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
function buildQualityGateSummary(input) {
|
|
779
|
-
const blockingConventionViolations = input.conventionViolations.filter((violation) => violation.severity === 'critical');
|
|
780
|
-
const failures = [
|
|
781
|
-
...(input.regressionDetected ? ['convention-regression'] : []),
|
|
782
|
-
...(!input.lintPassed ? ['lint'] : []),
|
|
783
|
-
...(!input.assurancePassed ? ['assurance'] : []),
|
|
784
|
-
...(input.minimalityBlocked ? ['minimality'] : []),
|
|
785
|
-
...(!input.reliabilityPassed ? ['reliability'] : []),
|
|
786
|
-
...(!input.blastRadiusPassed ? ['blast-radius'] : []),
|
|
787
|
-
];
|
|
788
|
-
return {
|
|
789
|
-
passed: failures.length === 0,
|
|
790
|
-
effectiveScore: failures.length === 0 ? input.score : Math.min(input.score ?? 0, 99),
|
|
791
|
-
failures,
|
|
792
|
-
conventionRegression: input.regressionDetected,
|
|
793
|
-
blockingConventionViolations: blockingConventionViolations.length,
|
|
794
|
-
lintPassed: input.lintPassed,
|
|
795
|
-
assurancePassed: input.assurancePassed,
|
|
796
|
-
minimalityPassed: !input.minimalityBlocked,
|
|
797
|
-
reliabilityPassed: input.reliabilityPassed,
|
|
798
|
-
blastRadiusPassed: input.blastRadiusPassed,
|
|
799
|
-
};
|
|
800
|
-
}
|
|
801
|
-
function buildExecutableCoverage(specCompliance) {
|
|
802
|
-
if (specCompliance.scenarios.length === 0) {
|
|
803
|
-
return null;
|
|
804
|
-
}
|
|
805
|
-
const matches = specCompliance.scenarios
|
|
806
|
-
.filter((scenario) => scenario.verdict === 'pass')
|
|
807
|
-
.map((scenario) => scenario.title);
|
|
808
|
-
const indeterminate = specCompliance.scenarios
|
|
809
|
-
.filter((scenario) => scenario.verdict !== 'pass' && scenario.unverifiable)
|
|
810
|
-
.map((scenario) => scenario.title);
|
|
811
|
-
const missing = specCompliance.scenarios
|
|
812
|
-
.filter((scenario) => scenario.verdict !== 'pass' && !scenario.unverifiable)
|
|
813
|
-
.map((scenario) => scenario.title);
|
|
814
|
-
return {
|
|
815
|
-
score: specCompliance.score,
|
|
816
|
-
fieldsImplemented: matches.length,
|
|
817
|
-
fieldsTotal: specCompliance.scenarios.length,
|
|
818
|
-
matches,
|
|
819
|
-
missing,
|
|
820
|
-
indeterminate,
|
|
821
|
-
};
|
|
822
|
-
}
|
|
823
|
-
function buildEffectiveValidationResult(result, specCompliance) {
|
|
824
|
-
const executableCoverage = buildExecutableCoverage(specCompliance);
|
|
825
|
-
if (executableCoverage === null) {
|
|
826
|
-
return result;
|
|
827
|
-
}
|
|
828
|
-
return {
|
|
829
|
-
...result,
|
|
830
|
-
score: executableCoverage.score,
|
|
831
|
-
fieldsImplemented: executableCoverage.fieldsImplemented,
|
|
832
|
-
fieldsTotal: executableCoverage.fieldsTotal,
|
|
833
|
-
matches: executableCoverage.matches,
|
|
834
|
-
missing: executableCoverage.missing,
|
|
835
|
-
indeterminate: executableCoverage.indeterminate,
|
|
836
|
-
};
|
|
837
|
-
}
|
|
838
|
-
function buildCompactSummary(specId, score, passedCount, failedCount, totalCriteria, graphAvailability) {
|
|
839
|
-
return {
|
|
840
|
-
specId,
|
|
841
|
-
score,
|
|
842
|
-
passed: passedCount,
|
|
843
|
-
failed: failedCount,
|
|
844
|
-
total: totalCriteria,
|
|
845
|
-
status: failedCount === 0 ? 'passing' : 'failing',
|
|
846
|
-
graphAvailability,
|
|
847
|
-
};
|
|
848
|
-
}
|
|
849
|
-
function buildValidateStructuredContent(args) {
|
|
850
|
-
const failedDorItems = args.dor.items
|
|
851
|
-
.filter((item) => item.status === 'failed')
|
|
852
|
-
.slice(0, 5)
|
|
853
|
-
.map((item) => ({
|
|
854
|
-
id: item.id,
|
|
855
|
-
description: item.description,
|
|
856
|
-
category: item.category,
|
|
857
|
-
status: item.status,
|
|
858
|
-
required: item.required,
|
|
859
|
-
}));
|
|
860
|
-
const failedDodItems = args.dod.items
|
|
861
|
-
.filter((item) => item.required === true && item.status !== 'passed')
|
|
862
|
-
.slice(0, 5)
|
|
863
|
-
.map((item) => ({
|
|
864
|
-
id: item.id,
|
|
865
|
-
description: item.description,
|
|
866
|
-
category: item.category,
|
|
867
|
-
status: item.status,
|
|
868
|
-
required: item.required,
|
|
869
|
-
}));
|
|
870
|
-
const failedGates = args.validationReport.gates.filter((gate) => !gate.passed);
|
|
871
|
-
const minimalityBlockingFindings = args.minimalityReport?.findings.filter((finding) => finding.blocksDone) ?? [];
|
|
872
|
-
const blockers = [
|
|
873
|
-
...args.result.missing.map((missing) => `missing: ${missing}`),
|
|
874
|
-
// SPEC-1367 review finding 6: matches detectDrift's "needs-evidence"
|
|
875
|
-
// wording — display text only, the `indeterminate` field/enum is unchanged.
|
|
876
|
-
...args.indeterminate.map((item) => `needs-evidence: ${item}`),
|
|
877
|
-
...args.qualityGateSummary.failures.map((failure) => `gate: ${failure}`),
|
|
878
|
-
...args.qualityIssues
|
|
879
|
-
.filter((issue) => isBlockingQualitySeverity(issue.severity))
|
|
880
|
-
.map((issue) => `${issue.rule}: ${issue.message}`),
|
|
881
|
-
];
|
|
882
|
-
const risks = [
|
|
883
|
-
...args.conventionCompliance.violations.map((violation) => violation.message),
|
|
884
|
-
...minimalityBlockingFindings.map((finding) => `${finding.ruleId}: ${finding.target}`),
|
|
885
|
-
...args.suggestions,
|
|
886
|
-
];
|
|
887
|
-
const structured = compactObj({
|
|
888
|
-
specId: args.specId,
|
|
889
|
-
title: args.title,
|
|
890
|
-
ready: args.compactSummary.status === 'passing' && args.qualityGateSummary.passed,
|
|
891
|
-
status: args.compactSummary.status,
|
|
892
|
-
score: args.score,
|
|
893
|
-
summary: args.compactSummary,
|
|
894
|
-
counts: {
|
|
895
|
-
matches: args.result.matches.length,
|
|
896
|
-
missing: args.result.missing.length,
|
|
897
|
-
extra: args.result.extra.length,
|
|
898
|
-
indeterminate: args.indeterminate.length,
|
|
899
|
-
qualityIssues: args.qualityIssues.length,
|
|
900
|
-
conventionViolations: args.conventionCompliance.totalViolations,
|
|
901
|
-
graphGaps: args.graphCoverage.gaps.length,
|
|
902
|
-
failedGates: failedGates.length,
|
|
903
|
-
},
|
|
904
|
-
missingTop5: args.result.missing.slice(0, 5),
|
|
905
|
-
extraTop5: args.result.extra.slice(0, 5),
|
|
906
|
-
indeterminateTop5: args.indeterminate.slice(0, 5),
|
|
907
|
-
qualityIssuesTop5: args.qualityIssues.slice(0, 5),
|
|
908
|
-
qualityGateSummary: args.qualityGateSummary,
|
|
909
|
-
blockersCount: blockers.length,
|
|
910
|
-
blockersTop3: blockers.slice(0, 3),
|
|
911
|
-
risksTop5: risks.slice(0, 5),
|
|
912
|
-
autofixable: args.suggestions.length > 0 || args.qualityIssues.length > 0,
|
|
913
|
-
nextAction: args.suggestions[0] ??
|
|
914
|
-
(args.compactSummary.status === 'passing'
|
|
915
|
-
? 'Proceed to update_status(done) after required release checks pass.'
|
|
916
|
-
: 'Fix the top blockers and rerun validate.'),
|
|
917
|
-
artifactRefs: {
|
|
918
|
-
validationReport: args.validationReport.path,
|
|
919
|
-
validationReportSha: args.validationReport.sha,
|
|
920
|
-
},
|
|
921
|
-
validationReport: {
|
|
922
|
-
written: args.validationReport.written,
|
|
923
|
-
path: args.validationReport.path,
|
|
924
|
-
sha: args.validationReport.sha,
|
|
925
|
-
passed: args.validationReport.passed,
|
|
926
|
-
reviewer: args.validationReport.reviewer,
|
|
927
|
-
gatesCount: args.validationReport.gates.length,
|
|
928
|
-
failedGatesTop5: failedGates.slice(0, 5),
|
|
929
|
-
},
|
|
930
|
-
implementationQualityScore: args.implementationQualityScore,
|
|
931
|
-
definitionOfReady: {
|
|
932
|
-
isReady: args.dor.isReady,
|
|
933
|
-
passed: args.dor.passedCount,
|
|
934
|
-
required: args.dor.requiredCount,
|
|
935
|
-
items: failedDorItems,
|
|
936
|
-
failedItemsTop5: failedDorItems,
|
|
937
|
-
},
|
|
938
|
-
definitionOfDone: {
|
|
939
|
-
isDone: args.dod.isDone,
|
|
940
|
-
passed: args.dod.passedCount,
|
|
941
|
-
required: args.dod.requiredCount,
|
|
942
|
-
failedItems: failedDodItems,
|
|
943
|
-
failedItemsTop5: failedDodItems,
|
|
944
|
-
},
|
|
945
|
-
conventionCompliance: {
|
|
946
|
-
totalViolations: args.conventionCompliance.totalViolations,
|
|
947
|
-
regressionDetected: args.conventionCompliance.regressionDetected,
|
|
948
|
-
violations: args.conventionCompliance.violations,
|
|
949
|
-
violationsTop5: args.conventionCompliance.violations.slice(0, 5),
|
|
950
|
-
},
|
|
951
|
-
lintCheck: {
|
|
952
|
-
passed: args.lintCheck.passed,
|
|
953
|
-
issueCount: args.lintCheck.issueCount,
|
|
954
|
-
command: args.lintCheck.command,
|
|
955
|
-
output: args.lintCheck.output ?? '',
|
|
956
|
-
outputPreview: typeof args.lintCheck.output === 'string' ? args.lintCheck.output.slice(0, 500) : undefined,
|
|
957
|
-
},
|
|
958
|
-
assuranceGates: {
|
|
959
|
-
newCode: {
|
|
960
|
-
passed: args.assuranceGates.newCode.passed,
|
|
961
|
-
findingsCount: args.assuranceGates.newCode.findings.length,
|
|
962
|
-
findingsTop5: args.assuranceGates.newCode.findings.slice(0, 5),
|
|
963
|
-
},
|
|
964
|
-
},
|
|
965
|
-
minimalityReport: args.minimalityReport !== null
|
|
966
|
-
? {
|
|
967
|
-
enabled: args.minimalityReport.enabled,
|
|
968
|
-
blocked: args.minimalityReport.blocked,
|
|
969
|
-
findingCount: args.minimalityReport.findings.length,
|
|
970
|
-
blockingFindingCount: minimalityBlockingFindings.length,
|
|
971
|
-
blockingFindingsTop5: minimalityBlockingFindings.slice(0, 5).map((finding) => ({
|
|
972
|
-
ruleId: finding.ruleId,
|
|
973
|
-
target: finding.target,
|
|
974
|
-
evidence: finding.evidence,
|
|
975
|
-
blocksDone: finding.blocksDone,
|
|
976
|
-
})),
|
|
977
|
-
}
|
|
978
|
-
: undefined,
|
|
979
|
-
graphCoverage: {
|
|
980
|
-
availability: args.graphCoverage.availability,
|
|
981
|
-
gapsCount: args.graphCoverage.gaps.length,
|
|
982
|
-
gapsTop5: args.graphCoverage.gaps.slice(0, 5),
|
|
983
|
-
warningsCount: args.graphCoverage.warnings.length,
|
|
984
|
-
warningsTop5: args.graphCoverage.warnings.slice(0, 5),
|
|
985
|
-
freshness: args.graphCoverage.freshness,
|
|
986
|
-
},
|
|
987
|
-
suggestionsTop5: args.suggestions.slice(0, 5),
|
|
988
|
-
});
|
|
989
|
-
const lintCheck = structured.lintCheck;
|
|
990
|
-
lintCheck.output = args.lintCheck.output ?? '';
|
|
991
|
-
applyValidateStructuredCompat({
|
|
992
|
-
structured,
|
|
993
|
-
fieldsImplemented: args.compactSummary.passed,
|
|
994
|
-
fieldsTotal: args.compactSummary.total,
|
|
995
|
-
matches: args.result.matches,
|
|
996
|
-
missing: args.result.missing,
|
|
997
|
-
extra: args.result.extra,
|
|
998
|
-
qualityIssues: args.qualityIssues,
|
|
999
|
-
conventionViolations: args.conventionCompliance.violations,
|
|
1000
|
-
});
|
|
1001
|
-
return structured;
|
|
1002
|
-
}
|
|
1003
|
-
function buildCompactValidateText(args) {
|
|
1004
|
-
const { score, passedCount, failedCount, totalCriteria, qualityFailures, missing, indeterminate, commitReminder, planuReminder, } = args;
|
|
1005
|
-
if (failedCount === 0 && qualityFailures.length === 0) {
|
|
1006
|
-
// All passing — single line
|
|
1007
|
-
return (`✅ Validate: ${String(score)}/100 — ${String(passedCount)}/${String(totalCriteria)} criteria passing` +
|
|
1008
|
-
` — See what to do next: https://planu.dev/?src=validation` +
|
|
1009
|
-
commitReminder +
|
|
1010
|
-
planuReminder);
|
|
1011
|
-
}
|
|
1012
|
-
if (failedCount === 0) {
|
|
1013
|
-
return (`❌ Validate: ${String(score)}/100 — failing; ${String(passedCount)}/${String(totalCriteria)} criteria passing; failing gates: ${qualityFailures.join(', ')}` +
|
|
1014
|
-
commitReminder +
|
|
1015
|
-
planuReminder);
|
|
1016
|
-
}
|
|
1017
|
-
// Failures exist — list only the failing ones (max 5)
|
|
1018
|
-
const MAX_FAILURES = 5;
|
|
1019
|
-
const labelledFailures = [
|
|
1020
|
-
...missing.map((criterion) => ({ label: 'missing', criterion })),
|
|
1021
|
-
// SPEC-1367 review finding 6: display label only — matches detectDrift's
|
|
1022
|
-
// "needs-evidence" wording; the underlying `indeterminate` array is unchanged.
|
|
1023
|
-
...indeterminate.map((criterion) => ({ label: 'needs-evidence', criterion })),
|
|
1024
|
-
];
|
|
1025
|
-
const shownFailures = labelledFailures.slice(0, MAX_FAILURES);
|
|
1026
|
-
const remainingCount = labelledFailures.length - shownFailures.length;
|
|
1027
|
-
const failureList = shownFailures
|
|
1028
|
-
.map((f) => ` - ${f.label === 'missing' ? f.criterion : `${f.label}: ${f.criterion}`}`)
|
|
1029
|
-
.join('\n');
|
|
1030
|
-
const moreLine = remainingCount > 0 ? `\n ... and ${String(remainingCount)} more` : '';
|
|
1031
|
-
const failNames = shownFailures
|
|
1032
|
-
.slice(0, 3)
|
|
1033
|
-
.map((failure) => `${failure.label}: ${failure.criterion}`)
|
|
1034
|
-
.join(', ');
|
|
1035
|
-
const gateSuffix = qualityFailures.length > 0 ? `; failing gates: ${qualityFailures.join(', ')}` : '';
|
|
1036
|
-
const summaryLine = `❌ Validate: ${String(score)}/100 — failing; ${String(failedCount)} failing criteria: [${failNames}${remainingCount + shownFailures.length > 3 ? '...' : ''}]${gateSuffix}`;
|
|
1037
|
-
return summaryLine + '\n' + failureList + moreLine + commitReminder + planuReminder;
|
|
1038
|
-
}
|
|
1039
|
-
//# sourceMappingURL=validate.js.map
|