@planu/cli 6.0.2 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +60 -48
- 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 -106
- package/dist/engine/reconcile/propagate-mirrors.d.ts +0 -3
- package/dist/engine/reconcile/propagate-mirrors.js +0 -311
- 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 -39
- package/dist/engine/safety/atomic-write-file.js +0 -195
- 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 -490
- 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/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 -825
- 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 -271
- 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 -502
- 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 -1038
- 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
|
@@ -1,752 +0,0 @@
|
|
|
1
|
-
// tools/update-status/transition-guard.ts — Valid state transitions and DoR gate
|
|
2
|
-
import { readFile } from 'node:fs/promises';
|
|
3
|
-
import { isAbsolute } from 'node:path';
|
|
4
|
-
import { resolveVerifiedSpecPath, PortablePathError } from '../../storage/project-identity.js';
|
|
5
|
-
import { ti } from '../../i18n/index.js';
|
|
6
|
-
import { validateDoR } from '../../engine/dor-dod.js';
|
|
7
|
-
import { scoreAmbiguityFromPath } from '../../engine/ambiguity-scorer.js';
|
|
8
|
-
import { checkSpecReadiness } from '../../engine/readiness-checker.js';
|
|
9
|
-
import { validateEnglishOnlySpecText } from '../../engine/spec-language/english-only.js';
|
|
10
|
-
import { checkGroundedSpecContract } from '../../engine/spec-grounding/contract.js';
|
|
11
|
-
import { checkGenericSpecOutput, STRUCTURAL_INTERPOLATION_KIND, } from '../../engine/spec-quality/generic-output-gate.js';
|
|
12
|
-
import { formatKeyValue } from '../output-formatter.js';
|
|
13
|
-
import { deriveChallengeGateState } from '../challenge-spec/challenge-report.js';
|
|
14
|
-
import { evaluateSpecDependencies } from '../../engine/dependency-evaluator.js';
|
|
15
|
-
import { reportClassifiedDegradation } from '../../errors/classified-degradation.js';
|
|
16
|
-
/**
|
|
17
|
-
* Valid state transitions for spec lifecycle.
|
|
18
|
-
* draft -> review -> approved -> implementing -> done
|
|
19
|
-
* Also allow: review -> draft (send back), approved -> review (reconsider)
|
|
20
|
-
*
|
|
21
|
-
* SPEC-733: Terminal states (done, discarded) now support reverse transitions
|
|
22
|
-
* with a mandatory reason. See REVERSE_TRANSITIONS.
|
|
23
|
-
*/
|
|
24
|
-
export const VALID_TRANSITIONS = {
|
|
25
|
-
draft: ['review', 'discarded'],
|
|
26
|
-
review: ['draft', 'approved', 'discarded'],
|
|
27
|
-
approved: ['draft', 'review', 'implementing', 'discarded'],
|
|
28
|
-
implementing: ['approved', 'done', 'discarded'],
|
|
29
|
-
done: ['implementing', 'discarded'], // SPEC-733: reverse transition with mandatory reason
|
|
30
|
-
discarded: ['draft'], // SPEC-733: reverse transition with mandatory reason
|
|
31
|
-
};
|
|
32
|
-
// ---------------------------------------------------------------------------
|
|
33
|
-
// SPEC-733: Reverse transitions
|
|
34
|
-
// ---------------------------------------------------------------------------
|
|
35
|
-
/**
|
|
36
|
-
* Allowed reverse transition pairs (from terminal state back to active).
|
|
37
|
-
*/
|
|
38
|
-
export const REVERSE_TRANSITIONS = [
|
|
39
|
-
['done', 'implementing'],
|
|
40
|
-
['done', 'discarded'],
|
|
41
|
-
['discarded', 'draft'],
|
|
42
|
-
];
|
|
43
|
-
function allowedReversePairs() {
|
|
44
|
-
return REVERSE_TRANSITIONS.map(([from, to]) => `${from}→${to}`).join(', ');
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Returns true if the (from, to) pair is a whitelisted reverse transition.
|
|
48
|
-
*/
|
|
49
|
-
export function isReverseTransition(from, to) {
|
|
50
|
-
return REVERSE_TRANSITIONS.some(([f, t]) => f === from && t === to);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Validates that a reverse transition has the required reason.
|
|
54
|
-
*
|
|
55
|
-
* @returns `{ ok: true }` when valid, or `{ ok: false, error, fixHint }` when invalid.
|
|
56
|
-
*/
|
|
57
|
-
export function validateReverseTransition(input) {
|
|
58
|
-
const { from, to, reason } = input;
|
|
59
|
-
if (!isReverseTransition(from, to)) {
|
|
60
|
-
return {
|
|
61
|
-
ok: false,
|
|
62
|
-
error: `Reverse transition ${from} → ${to} is not supported. Allowed: ${allowedReversePairs()}.`,
|
|
63
|
-
fixHint: `Only ${allowedReversePairs()} are supported reverse transitions.`,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
if (!reason || reason.trim().length < 30) {
|
|
67
|
-
return {
|
|
68
|
-
ok: false,
|
|
69
|
-
error: `Reverse transition ${from} → ${to} requires reason (≥ 30 chars). Received: "${reason ?? ''}" (${String(reason?.trim().length ?? 0)} chars).`,
|
|
70
|
-
fixHint: `Reverse transitions (${allowedReversePairs()}) require reason (>= 30 chars). Example: "Regression found in prod traced to AC#3 — reopening to fix."`,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
return { ok: true };
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Forward lifecycle order (no backward transitions here).
|
|
77
|
-
* Used to resolve auto-advance intermediate steps (SPEC-280).
|
|
78
|
-
*/
|
|
79
|
-
const LIFECYCLE_ORDER = ['draft', 'review', 'approved', 'implementing', 'done'];
|
|
80
|
-
/**
|
|
81
|
-
* SPEC-280: Returns the intermediate states to silently traverse when the
|
|
82
|
-
* caller requests a forward jump (e.g. draft → approved skips review).
|
|
83
|
-
*
|
|
84
|
-
* Returns an array of intermediate statuses to execute before the target,
|
|
85
|
-
* or null when no auto-advance is needed (direct transition or backward).
|
|
86
|
-
*/
|
|
87
|
-
export function resolveAutoAdvanceSteps(currentStatus, targetStatus) {
|
|
88
|
-
const currentIdx = LIFECYCLE_ORDER.indexOf(currentStatus);
|
|
89
|
-
const targetIdx = LIFECYCLE_ORDER.indexOf(targetStatus);
|
|
90
|
-
if (currentIdx === -1 || targetIdx === -1) {
|
|
91
|
-
return null;
|
|
92
|
-
} // not in forward chain
|
|
93
|
-
if (targetIdx <= currentIdx + 1) {
|
|
94
|
-
return null;
|
|
95
|
-
} // direct or backward — no intermediates
|
|
96
|
-
return LIFECYCLE_ORDER.slice(currentIdx + 1, targetIdx);
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Validates that a status transition is allowed.
|
|
100
|
-
* Returns an error ToolResult if invalid, null if valid.
|
|
101
|
-
*/
|
|
102
|
-
export function checkTransition(currentStatus, newStatus) {
|
|
103
|
-
const validNextStates = VALID_TRANSITIONS[currentStatus];
|
|
104
|
-
if (!validNextStates.includes(newStatus)) {
|
|
105
|
-
return {
|
|
106
|
-
content: [
|
|
107
|
-
{
|
|
108
|
-
type: 'text',
|
|
109
|
-
text: ti('spec.invalidTransition', {
|
|
110
|
-
from: currentStatus,
|
|
111
|
-
to: newStatus,
|
|
112
|
-
valid: validNextStates.join(', '),
|
|
113
|
-
}),
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
isError: true,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Validates DoR gate before transitioning to 'implementing'.
|
|
123
|
-
* Returns an error ToolResult if blocked, null if passed.
|
|
124
|
-
*/
|
|
125
|
-
export function checkDorGate(spec, newStatus) {
|
|
126
|
-
if (newStatus !== 'implementing' || isReverseTransition(spec.status, newStatus)) {
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
const dorResult = validateDoR(spec);
|
|
130
|
-
if (!dorResult.isValid) {
|
|
131
|
-
return {
|
|
132
|
-
content: [
|
|
133
|
-
{
|
|
134
|
-
type: 'text',
|
|
135
|
-
text: [
|
|
136
|
-
dorResult.humanMessage,
|
|
137
|
-
dorResult.expertSummary,
|
|
138
|
-
...dorResult.blockingItems.slice(0, 3).map((item) => `Blocker: ${item}`),
|
|
139
|
-
dorResult.blockingItems.length > 3
|
|
140
|
-
? `More blockers: ${String(dorResult.blockingItems.length - 3)}`
|
|
141
|
-
: undefined,
|
|
142
|
-
dorResult.warningItems.length > 0
|
|
143
|
-
? `Warnings: ${String(dorResult.warningItems.length)}`
|
|
144
|
-
: undefined,
|
|
145
|
-
]
|
|
146
|
-
.filter(Boolean)
|
|
147
|
-
.join('\n'),
|
|
148
|
-
},
|
|
149
|
-
],
|
|
150
|
-
isError: true,
|
|
151
|
-
structuredContent: {
|
|
152
|
-
error: 'DoR gate failed',
|
|
153
|
-
message: dorResult.humanMessage,
|
|
154
|
-
expertSummary: dorResult.expertSummary,
|
|
155
|
-
blockingItems: dorResult.blockingItems,
|
|
156
|
-
warningItems: dorResult.warningItems,
|
|
157
|
-
},
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
return null;
|
|
161
|
-
}
|
|
162
|
-
/** Reject implementation until every declared dependency exists and is done. */
|
|
163
|
-
export function checkImplementationDependencyGate(spec, allSpecs, newStatus) {
|
|
164
|
-
if (newStatus !== 'implementing' || isReverseTransition(spec.status, newStatus)) {
|
|
165
|
-
return null;
|
|
166
|
-
}
|
|
167
|
-
const evaluation = evaluateSpecDependencies(spec, allSpecs);
|
|
168
|
-
if (evaluation.allowed) {
|
|
169
|
-
return null;
|
|
170
|
-
}
|
|
171
|
-
const blockingIds = [...new Set(evaluation.blockers.map((blocker) => blocker.specId))];
|
|
172
|
-
return {
|
|
173
|
-
content: [
|
|
174
|
-
{
|
|
175
|
-
type: 'text',
|
|
176
|
-
text: `Dependency gate blocked implementation: ${evaluation.blockers
|
|
177
|
-
.map((blocker) => `${blocker.specId} (${blocker.reason})`)
|
|
178
|
-
.join(', ')}.`,
|
|
179
|
-
},
|
|
180
|
-
],
|
|
181
|
-
isError: true,
|
|
182
|
-
structuredContent: {
|
|
183
|
-
error: 'DEPENDENCY_GATE_BLOCKED',
|
|
184
|
-
code: 'UNMET_DEPENDENCIES',
|
|
185
|
-
blockingIds,
|
|
186
|
-
blockers: evaluation.blockers,
|
|
187
|
-
},
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* SPEC-632: Block transition to 'approved' if ambiguity score < 70.
|
|
192
|
-
* Fails closed when the spec cannot be scored.
|
|
193
|
-
*/
|
|
194
|
-
export async function checkAmbiguityGate(spec, newStatus, projectPath) {
|
|
195
|
-
if (newStatus !== 'approved' || !spec.specPath) {
|
|
196
|
-
return null;
|
|
197
|
-
}
|
|
198
|
-
let resolvedSpecPath;
|
|
199
|
-
try {
|
|
200
|
-
if (!isAbsolute(spec.specPath)) {
|
|
201
|
-
if (!projectPath) {
|
|
202
|
-
throw new PortablePathError('ROOT_NOT_FOUND', '[Planu] project root is required for a portable spec path');
|
|
203
|
-
}
|
|
204
|
-
resolvedSpecPath = await resolveVerifiedSpecPath(spec.id, spec.specPath, projectPath);
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
resolvedSpecPath = spec.specPath;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
catch (error) {
|
|
211
|
-
reportClassifiedDegradation('AMBIGUITY_SPEC_UNRESOLVABLE', error);
|
|
212
|
-
return gateUnavailableResult('AMBIGUITY_GATE_UNAVAILABLE', 'Ambiguity scoring failed.', readinessGateIdentity(spec));
|
|
213
|
-
}
|
|
214
|
-
const report = await scoreAmbiguityFromPath(resolvedSpecPath);
|
|
215
|
-
if (!report) {
|
|
216
|
-
return gateUnavailableResult('AMBIGUITY_GATE_UNAVAILABLE', 'Ambiguity scoring failed.', readinessGateIdentity(spec));
|
|
217
|
-
}
|
|
218
|
-
if (report.score >= 70) {
|
|
219
|
-
return null;
|
|
220
|
-
}
|
|
221
|
-
return {
|
|
222
|
-
content: [
|
|
223
|
-
{
|
|
224
|
-
type: 'text',
|
|
225
|
-
text: formatKeyValue({
|
|
226
|
-
error: 'Ambiguity gate failed',
|
|
227
|
-
message: `Ambiguity score ${String(report.score)}/100 — below 70. Fix vague terms in criteria before approving.`,
|
|
228
|
-
ambiguityScore: report.score,
|
|
229
|
-
violations: report.violations.length,
|
|
230
|
-
blockers: report.blockers.length,
|
|
231
|
-
firstBlocker: report.blockers[0],
|
|
232
|
-
}, 'Ambiguity gate failed'),
|
|
233
|
-
},
|
|
234
|
-
],
|
|
235
|
-
isError: true,
|
|
236
|
-
structuredContent: {
|
|
237
|
-
error: 'Ambiguity gate failed',
|
|
238
|
-
message: `Ambiguity score ${String(report.score)}/100 — below 70. Fix vague terms in criteria before approving.`,
|
|
239
|
-
ambiguityScore: report.score,
|
|
240
|
-
violations: report.violations.slice(0, 5),
|
|
241
|
-
blockers: report.blockers.slice(0, 5),
|
|
242
|
-
},
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
export async function checkSpecArtifactCommittedGate(spec, newStatus, projectPath) {
|
|
246
|
-
if (newStatus !== 'implementing' || !projectPath || !spec.specPath) {
|
|
247
|
-
return null;
|
|
248
|
-
}
|
|
249
|
-
let absoluteSpecPath;
|
|
250
|
-
try {
|
|
251
|
-
absoluteSpecPath = await resolveVerifiedSpecPath(spec.id, spec.specPath, projectPath);
|
|
252
|
-
}
|
|
253
|
-
catch (error) {
|
|
254
|
-
if (!(error instanceof PortablePathError)) {
|
|
255
|
-
throw error;
|
|
256
|
-
}
|
|
257
|
-
return {
|
|
258
|
-
content: [
|
|
259
|
-
{
|
|
260
|
-
type: 'text',
|
|
261
|
-
text: formatKeyValue({
|
|
262
|
-
error: 'SPEC_PATH_UNRESOLVABLE',
|
|
263
|
-
message: `spec.md for ${spec.id} could not be resolved under the canonical project root (${error.code}).`,
|
|
264
|
-
specId: spec.id,
|
|
265
|
-
fixHint: 'Run reconcile_spec to re-link this spec to its file, then retry update_status.',
|
|
266
|
-
}),
|
|
267
|
-
},
|
|
268
|
-
],
|
|
269
|
-
isError: true,
|
|
270
|
-
structuredContent: { error: 'SPEC_PATH_UNRESOLVABLE', code: error.code, specId: spec.id },
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
try {
|
|
274
|
-
const { git } = await import('../git/git-helpers.js');
|
|
275
|
-
const { stdout } = await git(projectPath, ['status', '--porcelain', '--', absoluteSpecPath]);
|
|
276
|
-
if (stdout.trim().length === 0) {
|
|
277
|
-
return null;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
catch (error) {
|
|
281
|
-
reportClassifiedDegradation('SPEC_ARTIFACT_GIT_STATUS_UNAVAILABLE', error);
|
|
282
|
-
return null;
|
|
283
|
-
}
|
|
284
|
-
const fixHint = `Commit ${absoluteSpecPath} (git add "${absoluteSpecPath}" && git commit) then retry update_status(specId: "${spec.id}", status: "implementing").`;
|
|
285
|
-
return {
|
|
286
|
-
content: [
|
|
287
|
-
{
|
|
288
|
-
type: 'text',
|
|
289
|
-
text: formatKeyValue({
|
|
290
|
-
error: 'SPEC_ARTIFACT_UNCOMMITTED',
|
|
291
|
-
message: `spec.md for ${spec.id} has uncommitted changes. The approved contract on disk must match what git holds before an implementer is dispatched.`,
|
|
292
|
-
specId: spec.id,
|
|
293
|
-
specPath: absoluteSpecPath,
|
|
294
|
-
fixHint,
|
|
295
|
-
}),
|
|
296
|
-
},
|
|
297
|
-
],
|
|
298
|
-
isError: true,
|
|
299
|
-
structuredContent: {
|
|
300
|
-
error: 'SPEC_ARTIFACT_UNCOMMITTED',
|
|
301
|
-
specId: spec.id,
|
|
302
|
-
specPath: absoluteSpecPath,
|
|
303
|
-
fixHint,
|
|
304
|
-
},
|
|
305
|
-
};
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* SPEC-769/SPEC-492: Readiness gate — block 'review'/'approved' when spec
|
|
309
|
-
* quality is too low or the persisted spec document is not English.
|
|
310
|
-
* Fails closed if spec.md cannot be read or evaluated.
|
|
311
|
-
*
|
|
312
|
-
* - 0 criteria → InteractiveQuestion (hard block, no force path)
|
|
313
|
-
* - score < 70 on approved && !forceApprove → InteractiveQuestion with 3 options
|
|
314
|
-
* - score < 70 on approved && forceApprove → proceed, qualityWarnings populated
|
|
315
|
-
* - score < 70 on review → block and keep draft
|
|
316
|
-
* - non-English prose → hard block
|
|
317
|
-
* - score >= 70 → proceed, no warnings
|
|
318
|
-
*/
|
|
319
|
-
export async function checkReadinessGate(spec, newStatus, forceApprove, projectPath) {
|
|
320
|
-
if ((newStatus !== 'review' && newStatus !== 'approved') || !spec.specPath) {
|
|
321
|
-
return { blockResult: null, qualityWarnings: [] };
|
|
322
|
-
}
|
|
323
|
-
let body;
|
|
324
|
-
let resolvedPath;
|
|
325
|
-
try {
|
|
326
|
-
resolvedPath =
|
|
327
|
-
!isAbsolute(spec.specPath) && projectPath
|
|
328
|
-
? await resolveVerifiedSpecPath(spec.id, spec.specPath, projectPath)
|
|
329
|
-
: spec.specPath;
|
|
330
|
-
body = await readFile(resolvedPath, 'utf-8');
|
|
331
|
-
}
|
|
332
|
-
catch (error) {
|
|
333
|
-
/* reliability-optional: READINESS_SPEC_UNREADABLE — transition fails closed below */
|
|
334
|
-
reportClassifiedDegradation('READINESS_SPEC_UNREADABLE', error);
|
|
335
|
-
// SPEC-1351 (AC4): a missing spec.md (ENOENT) is a distinct, recoverable
|
|
336
|
-
// situation — surface an actionable message instead of the raw fs error
|
|
337
|
-
// ("ENOENT: no such file or directory, open '<path>'") that update_status
|
|
338
|
-
// was previously appending "Transition blocked..." to verbatim.
|
|
339
|
-
const isMissingFile = (typeof error === 'object' &&
|
|
340
|
-
error !== null &&
|
|
341
|
-
'code' in error &&
|
|
342
|
-
error.code === 'ENOENT') ||
|
|
343
|
-
(error instanceof PortablePathError &&
|
|
344
|
-
(error.code === 'NOT_FOUND' || error.code === 'ROOT_NOT_FOUND'));
|
|
345
|
-
return readinessUnavailable('READINESS_SPEC_UNREADABLE', isMissingFile
|
|
346
|
-
? `spec.md is missing at ${spec.specPath}. Recreate the spec via create_spec or restore spec.md from git/backup before retrying this transition.`
|
|
347
|
-
: error instanceof Error
|
|
348
|
-
? error.message
|
|
349
|
-
: 'spec.md could not be read', readinessGateIdentity(spec, projectPath));
|
|
350
|
-
}
|
|
351
|
-
// Guard: mock environments return undefined; unreadable files return non-string
|
|
352
|
-
if (typeof body !== 'string') {
|
|
353
|
-
return readinessUnavailable('READINESS_SPEC_INVALID', 'spec.md did not return text content', readinessGateIdentity(spec, projectPath));
|
|
354
|
-
}
|
|
355
|
-
const languageValidation = validateEnglishOnlySpecText(body);
|
|
356
|
-
if (!languageValidation.ok) {
|
|
357
|
-
return {
|
|
358
|
-
blockResult: {
|
|
359
|
-
content: [
|
|
360
|
-
{
|
|
361
|
-
type: 'text',
|
|
362
|
-
text: `English-only spec gate blocked transition to ${newStatus}.\n\n` +
|
|
363
|
-
`${languageValidation.reason ?? 'Non-English prose detected.'}\n\n` +
|
|
364
|
-
'Rewrite spec.md in English before moving it forward.',
|
|
365
|
-
},
|
|
366
|
-
],
|
|
367
|
-
isError: true,
|
|
368
|
-
structuredContent: {
|
|
369
|
-
error: 'SPEC_LANGUAGE_GATE_BLOCKED',
|
|
370
|
-
detectedLanguage: languageValidation.detectedLanguage,
|
|
371
|
-
signals: languageValidation.signals,
|
|
372
|
-
fixHint: 'Rewrite spec.md in English before review or approval.',
|
|
373
|
-
},
|
|
374
|
-
},
|
|
375
|
-
qualityWarnings: [],
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
const groundingResult = checkGroundedSpecContract(spec, body);
|
|
379
|
-
if (!groundingResult.passed) {
|
|
380
|
-
return {
|
|
381
|
-
blockResult: {
|
|
382
|
-
content: [
|
|
383
|
-
{
|
|
384
|
-
type: 'text',
|
|
385
|
-
text: `Grounded spec contract blocked transition to ${newStatus}. ` +
|
|
386
|
-
groundingResult.issues.slice(0, 3).join('; '),
|
|
387
|
-
},
|
|
388
|
-
],
|
|
389
|
-
isError: true,
|
|
390
|
-
structuredContent: {
|
|
391
|
-
error: 'GROUNDED_SPEC_CONTRACT_BLOCKED',
|
|
392
|
-
sddConstitutionRuleId: 'sdd.grounded-contract',
|
|
393
|
-
issues: groundingResult.issues,
|
|
394
|
-
fixHint: 'Add grounding metadata for every contract criterion or move ungrounded criteria to advisory/discovery before review or approval.',
|
|
395
|
-
},
|
|
396
|
-
},
|
|
397
|
-
qualityWarnings: [],
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
const genericOutputGate = checkGenericSpecOutput(body);
|
|
401
|
-
// SPEC-1406: structural-interpolation findings warn instead of block here — the
|
|
402
|
-
// `create_spec` call site is where this new detector is blocking; ~1100 already-persisted
|
|
403
|
-
// specs must stay transitionable at update_status even if their rendered body still
|
|
404
|
-
// contains an interpolated-list pattern.
|
|
405
|
-
const blockingGenericOutputIssues = genericOutputGate.issues.filter((issue) => issue.kind !== STRUCTURAL_INTERPOLATION_KIND);
|
|
406
|
-
const structuralInterpolationWarnings = genericOutputGate.issues
|
|
407
|
-
.filter((issue) => issue.kind === STRUCTURAL_INTERPOLATION_KIND)
|
|
408
|
-
.map((issue) => `${issue.phrase}: ${issue.reason}`);
|
|
409
|
-
if (blockingGenericOutputIssues.length > 0) {
|
|
410
|
-
return {
|
|
411
|
-
blockResult: {
|
|
412
|
-
content: [
|
|
413
|
-
{
|
|
414
|
-
type: 'text',
|
|
415
|
-
text: `Spec quality gate blocked transition to ${newStatus}. ` +
|
|
416
|
-
blockingGenericOutputIssues
|
|
417
|
-
.slice(0, 3)
|
|
418
|
-
.map((issue) => `${issue.phrase}: ${issue.reason}`)
|
|
419
|
-
.join('; '),
|
|
420
|
-
},
|
|
421
|
-
],
|
|
422
|
-
isError: true,
|
|
423
|
-
structuredContent: {
|
|
424
|
-
error: 'GENERIC_SPEC_OUTPUT_BLOCKED',
|
|
425
|
-
sddConstitutionRuleId: 'sdd.no-generic-output',
|
|
426
|
-
issues: blockingGenericOutputIssues,
|
|
427
|
-
fixHint: 'Replace generic criteria or placeholder references with grounded, testable behavior before review or approval.',
|
|
428
|
-
},
|
|
429
|
-
},
|
|
430
|
-
// SPEC-1406 (AC3, round 2): the offending section must be named in the output on
|
|
431
|
-
// every return path, not only the success path — this blockResult already fired
|
|
432
|
-
// for a different reason, but any structural-interpolation warnings computed above
|
|
433
|
-
// are still real findings and must not be dropped.
|
|
434
|
-
qualityWarnings: structuralInterpolationWarnings,
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
const specWithResolvedPath = resolvedPath === spec.specPath
|
|
438
|
-
? spec
|
|
439
|
-
: { ...spec, specPath: resolvedPath, technicalPath: resolvedPath };
|
|
440
|
-
let readiness;
|
|
441
|
-
try {
|
|
442
|
-
readiness = await checkSpecReadiness(specWithResolvedPath, 'strict');
|
|
443
|
-
}
|
|
444
|
-
catch (error) {
|
|
445
|
-
/* reliability-optional: READINESS_EVALUATION_FAILED — transition fails closed below */
|
|
446
|
-
reportClassifiedDegradation('READINESS_EVALUATION_FAILED', error);
|
|
447
|
-
return readinessUnavailable('READINESS_EVALUATION_FAILED', error instanceof Error ? error.message : 'readiness evaluation failed', readinessGateIdentity(spec, projectPath), structuralInterpolationWarnings);
|
|
448
|
-
}
|
|
449
|
-
const { score } = readiness;
|
|
450
|
-
const blockers = [...readiness.issues.blockers];
|
|
451
|
-
const warnings = [...readiness.issues.warnings];
|
|
452
|
-
const issues = [...blockers, ...warnings];
|
|
453
|
-
const hasNoCriteria = readiness.issues.breakdown.criteria === 0;
|
|
454
|
-
if (hasNoCriteria) {
|
|
455
|
-
if (newStatus === 'review') {
|
|
456
|
-
return {
|
|
457
|
-
blockResult: {
|
|
458
|
-
content: [
|
|
459
|
-
{
|
|
460
|
-
type: 'text',
|
|
461
|
-
text: 'Readiness gate blocked transition to review: spec has 0 acceptance criteria.',
|
|
462
|
-
},
|
|
463
|
-
],
|
|
464
|
-
isError: true,
|
|
465
|
-
structuredContent: {
|
|
466
|
-
error: 'READINESS_GATE_BLOCKED',
|
|
467
|
-
score,
|
|
468
|
-
threshold: 70,
|
|
469
|
-
blockers,
|
|
470
|
-
warnings,
|
|
471
|
-
fixHint: 'Add at least 3 testable acceptance criteria before moving to review.',
|
|
472
|
-
},
|
|
473
|
-
},
|
|
474
|
-
qualityWarnings: structuralInterpolationWarnings,
|
|
475
|
-
};
|
|
476
|
-
}
|
|
477
|
-
const question = {
|
|
478
|
-
header: 'Spec incomplete',
|
|
479
|
-
question: 'This spec has 0 acceptance criteria. Add criteria before approving — transition blocked.',
|
|
480
|
-
multiSelect: false,
|
|
481
|
-
options: [
|
|
482
|
-
{
|
|
483
|
-
label: 'cancel',
|
|
484
|
-
description: 'Keep current status and complete the spec first (recommended)',
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
label: 'return_to_draft',
|
|
488
|
-
description: 'Return spec to draft to add acceptance criteria',
|
|
489
|
-
},
|
|
490
|
-
],
|
|
491
|
-
};
|
|
492
|
-
return {
|
|
493
|
-
blockResult: {
|
|
494
|
-
content: [
|
|
495
|
-
{
|
|
496
|
-
type: 'text',
|
|
497
|
-
text: `Readiness gate: spec has 0 acceptance criteria — cannot approve an empty spec.`,
|
|
498
|
-
},
|
|
499
|
-
],
|
|
500
|
-
structuredContent: {
|
|
501
|
-
error: 'READINESS_GATE_BLOCKED',
|
|
502
|
-
score,
|
|
503
|
-
threshold: 70,
|
|
504
|
-
blockers,
|
|
505
|
-
warnings,
|
|
506
|
-
interactiveQuestions: [question],
|
|
507
|
-
},
|
|
508
|
-
},
|
|
509
|
-
qualityWarnings: structuralInterpolationWarnings,
|
|
510
|
-
};
|
|
511
|
-
}
|
|
512
|
-
if (readiness.ready) {
|
|
513
|
-
return { blockResult: null, qualityWarnings: structuralInterpolationWarnings };
|
|
514
|
-
}
|
|
515
|
-
const diagnostic = score < 70
|
|
516
|
-
? `score ${String(score)}/100 is below the 70 threshold`
|
|
517
|
-
: `score ${String(score)}/100 meets the threshold, but ${String(blockers.length)} canonical blocker(s) remain`;
|
|
518
|
-
const issuesSummary = issues.slice(0, 3).join('; ');
|
|
519
|
-
if (newStatus === 'review') {
|
|
520
|
-
return {
|
|
521
|
-
blockResult: {
|
|
522
|
-
content: [
|
|
523
|
-
{
|
|
524
|
-
type: 'text',
|
|
525
|
-
text: `Readiness gate blocked transition to review: ${diagnostic}. ` +
|
|
526
|
-
`Issues: ${issuesSummary}`,
|
|
527
|
-
},
|
|
528
|
-
],
|
|
529
|
-
isError: true,
|
|
530
|
-
structuredContent: {
|
|
531
|
-
error: 'READINESS_GATE_BLOCKED',
|
|
532
|
-
score,
|
|
533
|
-
threshold: 70,
|
|
534
|
-
blockers,
|
|
535
|
-
warnings,
|
|
536
|
-
fixHint: 'Complete the spec before moving from draft to review.',
|
|
537
|
-
},
|
|
538
|
-
},
|
|
539
|
-
qualityWarnings: structuralInterpolationWarnings,
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
// Score < 70
|
|
543
|
-
if (forceApprove) {
|
|
544
|
-
// Caller wants to force through — proceed with warnings attached
|
|
545
|
-
return { blockResult: null, qualityWarnings: [...issues, ...structuralInterpolationWarnings] };
|
|
546
|
-
}
|
|
547
|
-
const question = {
|
|
548
|
-
header: 'Readiness gate',
|
|
549
|
-
question: `Spec readiness ${diagnostic}. How to proceed?`,
|
|
550
|
-
multiSelect: false,
|
|
551
|
-
options: [
|
|
552
|
-
{
|
|
553
|
-
label: 'return_to_draft',
|
|
554
|
-
description: 'Keep current status — fix the spec and re-approve (recommended)',
|
|
555
|
-
},
|
|
556
|
-
{
|
|
557
|
-
label: 'view_missing',
|
|
558
|
-
description: `View missing items: ${issuesSummary}`,
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
label: 'force_approve',
|
|
562
|
-
description: 'Force-approve anyway — quality warnings will be stored in spec.md frontmatter. Re-call update_status(approved, forceApprove: true).',
|
|
563
|
-
},
|
|
564
|
-
],
|
|
565
|
-
};
|
|
566
|
-
return {
|
|
567
|
-
blockResult: {
|
|
568
|
-
content: [
|
|
569
|
-
{
|
|
570
|
-
type: 'text',
|
|
571
|
-
text: `Readiness gate: ${diagnostic}. Issues: ${issuesSummary}`,
|
|
572
|
-
},
|
|
573
|
-
],
|
|
574
|
-
structuredContent: {
|
|
575
|
-
error: 'READINESS_GATE_BLOCKED',
|
|
576
|
-
score,
|
|
577
|
-
threshold: 70,
|
|
578
|
-
blockers,
|
|
579
|
-
warnings,
|
|
580
|
-
interactiveQuestions: [question],
|
|
581
|
-
},
|
|
582
|
-
},
|
|
583
|
-
qualityWarnings: structuralInterpolationWarnings,
|
|
584
|
-
};
|
|
585
|
-
}
|
|
586
|
-
function gateBlockedText(message) {
|
|
587
|
-
return `${message} Transition blocked until the gate succeeds. Do not retry the spec-level transition until the originating condition is cleared.`;
|
|
588
|
-
}
|
|
589
|
-
function readinessGateIdentity(spec, projectPath) {
|
|
590
|
-
const identity = { specId: spec.id, projectId: spec.projectId };
|
|
591
|
-
return projectPath === undefined ? identity : { ...identity, projectPath };
|
|
592
|
-
}
|
|
593
|
-
function gateUnavailableResult(code, message, identity) {
|
|
594
|
-
const structuredContent = {
|
|
595
|
-
error: code,
|
|
596
|
-
message,
|
|
597
|
-
retryable: false,
|
|
598
|
-
externalGateBlocked: true,
|
|
599
|
-
originatingCondition: code,
|
|
600
|
-
nextAction: {
|
|
601
|
-
tool: 'check_readiness',
|
|
602
|
-
args: {
|
|
603
|
-
specId: identity.specId,
|
|
604
|
-
...(identity.projectPath === undefined
|
|
605
|
-
? { projectId: identity.projectId }
|
|
606
|
-
: { projectPath: identity.projectPath }),
|
|
607
|
-
},
|
|
608
|
-
rationale: `${message} Fix the originating condition outside the spec contract, then re-run check_readiness to confirm it cleared. Retrying update_status on the same spec will not clear it.`,
|
|
609
|
-
},
|
|
610
|
-
};
|
|
611
|
-
return {
|
|
612
|
-
content: [{ type: 'text', text: gateBlockedText(message) }],
|
|
613
|
-
isError: true,
|
|
614
|
-
structuredContent: structuredContent,
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
function readinessUnavailable(code, message, identity, qualityWarnings = []) {
|
|
618
|
-
return { blockResult: gateUnavailableResult(code, message, identity), qualityWarnings };
|
|
619
|
-
}
|
|
620
|
-
const CHALLENGE_RESOLUTION_INSTRUCTIONS = 'Add a "### Challenge Resolution" subsection to the spec\'s spec.md with one "- " bullet per unresolved finding, each bullet containing that finding\'s exact scenario text plus your mitigation, then re-run challenge_spec to re-derive the report.';
|
|
621
|
-
/**
|
|
622
|
-
* SPEC-964: Challenge gate — block 'review' if challenge_spec was never run
|
|
623
|
-
* or does not contain enough explicit resolution evidence.
|
|
624
|
-
*
|
|
625
|
-
* - Requires challengeReport to exist on the spec
|
|
626
|
-
* - Requires explicit mitigation/risk-acceptance evidence for up to the first 3 findings
|
|
627
|
-
* - High-risk specs (high/critical) require all 5 focus areas
|
|
628
|
-
*/
|
|
629
|
-
export function checkChallengeGate(spec, newStatus) {
|
|
630
|
-
if (newStatus !== 'review') {
|
|
631
|
-
return null;
|
|
632
|
-
}
|
|
633
|
-
const report = spec.challengeReport;
|
|
634
|
-
if (!report) {
|
|
635
|
-
return {
|
|
636
|
-
content: [
|
|
637
|
-
{
|
|
638
|
-
type: 'text',
|
|
639
|
-
text: `Challenge gate blocked: spec has not been stress-tested. Run challenge_spec(specId="${spec.id}") before transitioning to review.`,
|
|
640
|
-
},
|
|
641
|
-
],
|
|
642
|
-
isError: true,
|
|
643
|
-
structuredContent: {
|
|
644
|
-
error: 'CHALLENGE_GATE_BLOCKED',
|
|
645
|
-
code: 'MISSING_CHALLENGE_REPORT',
|
|
646
|
-
fixHint: `Run challenge_spec(specId="${spec.id}") to generate failure scenarios and validate resilience.`,
|
|
647
|
-
},
|
|
648
|
-
};
|
|
649
|
-
}
|
|
650
|
-
if (!Array.isArray(report.findings)) {
|
|
651
|
-
return {
|
|
652
|
-
content: [
|
|
653
|
-
{
|
|
654
|
-
type: 'text',
|
|
655
|
-
text: `Challenge gate blocked: the stored challenge report predates finding-level tracking, so its findings cannot be resolved. Run challenge_spec(specId="${spec.id}") to regenerate it before transitioning to review.`,
|
|
656
|
-
},
|
|
657
|
-
],
|
|
658
|
-
isError: true,
|
|
659
|
-
structuredContent: {
|
|
660
|
-
error: 'CHALLENGE_GATE_BLOCKED',
|
|
661
|
-
code: 'STALE_CHALLENGE_REPORT',
|
|
662
|
-
fixHint: `Run challenge_spec(specId="${spec.id}") to regenerate the report with findings, then record resolution evidence.`,
|
|
663
|
-
},
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
const gateState = deriveChallengeGateState({
|
|
667
|
-
findings: report.findings,
|
|
668
|
-
resolutionEvidence: report.resolutionEvidence,
|
|
669
|
-
totalScenarios: report.totalScenarios,
|
|
670
|
-
overallRisk: report.overallRisk,
|
|
671
|
-
});
|
|
672
|
-
const { addressedCount, requiredCount, unresolvedCount, unresolvedCriticalCount } = gateState;
|
|
673
|
-
if (gateState.gateStatus === 'refresh-required') {
|
|
674
|
-
return {
|
|
675
|
-
content: [
|
|
676
|
-
{
|
|
677
|
-
type: 'text',
|
|
678
|
-
text: `Challenge gate blocked: the stored ${report.overallRisk}-risk report has unresolved findings without persisted impact classification, so unresolved critical findings cannot be ruled out. Run challenge_spec(specId="${spec.id}") to regenerate it before transitioning to review.`,
|
|
679
|
-
},
|
|
680
|
-
],
|
|
681
|
-
isError: true,
|
|
682
|
-
structuredContent: {
|
|
683
|
-
error: 'CHALLENGE_GATE_BLOCKED',
|
|
684
|
-
code: 'CHALLENGE_REPORT_REFRESH_REQUIRED',
|
|
685
|
-
fixHint: `Run challenge_spec(specId="${spec.id}") to regenerate the report with impact metadata, then retry update_status(specId="${spec.id}", status="review").`,
|
|
686
|
-
},
|
|
687
|
-
};
|
|
688
|
-
}
|
|
689
|
-
if (unresolvedCriticalCount > 0) {
|
|
690
|
-
return {
|
|
691
|
-
content: [
|
|
692
|
-
{
|
|
693
|
-
type: 'text',
|
|
694
|
-
text: `Challenge gate blocked: ${String(unresolvedCriticalCount)} unresolved critical finding(s) remain (addressed ${String(addressedCount)}/${String(requiredCount)} required). Record resolution evidence for every critical finding before retrying.`,
|
|
695
|
-
},
|
|
696
|
-
],
|
|
697
|
-
isError: true,
|
|
698
|
-
structuredContent: {
|
|
699
|
-
error: 'CHALLENGE_GATE_BLOCKED',
|
|
700
|
-
code: 'UNRESOLVED_CRITICAL_CHALLENGES',
|
|
701
|
-
addressedCount,
|
|
702
|
-
requiredCount,
|
|
703
|
-
unresolvedCount,
|
|
704
|
-
unresolvedCriticalCount,
|
|
705
|
-
unresolvedCriticalIdentities: gateState.unresolvedCriticalIdentities,
|
|
706
|
-
fixHint: `${CHALLENGE_RESOLUTION_INSTRUCTIONS} Then retry update_status(specId="${spec.id}", status="review").`,
|
|
707
|
-
},
|
|
708
|
-
};
|
|
709
|
-
}
|
|
710
|
-
if (addressedCount < requiredCount) {
|
|
711
|
-
return {
|
|
712
|
-
content: [
|
|
713
|
-
{
|
|
714
|
-
type: 'text',
|
|
715
|
-
text: `Challenge gate blocked: only ${String(addressedCount)} scenario(s) have explicit resolution evidence (minimum ${String(requiredCount)} required). Record resolution evidence for discovered findings before retrying.`,
|
|
716
|
-
},
|
|
717
|
-
],
|
|
718
|
-
isError: true,
|
|
719
|
-
structuredContent: {
|
|
720
|
-
error: 'CHALLENGE_GATE_BLOCKED',
|
|
721
|
-
code: 'INSUFFICIENT_CHALLENGES',
|
|
722
|
-
addressedCount,
|
|
723
|
-
requiredCount,
|
|
724
|
-
unresolvedCount,
|
|
725
|
-
unresolvedIdentities: gateState.unresolvedIdentities,
|
|
726
|
-
fixHint: `${CHALLENGE_RESOLUTION_INSTRUCTIONS} Then retry update_status(specId="${spec.id}", status="review").`,
|
|
727
|
-
},
|
|
728
|
-
};
|
|
729
|
-
}
|
|
730
|
-
const isHighRisk = spec.risk === 'high' || spec.risk === 'critical';
|
|
731
|
-
const allFocusAreas = ['failures', 'concurrency', 'scale', 'security', 'data-consistency'];
|
|
732
|
-
const missingFocus = allFocusAreas.filter((f) => !report.focusAreas.includes(f));
|
|
733
|
-
if (isHighRisk && missingFocus.length > 0) {
|
|
734
|
-
return {
|
|
735
|
-
content: [
|
|
736
|
-
{
|
|
737
|
-
type: 'text',
|
|
738
|
-
text: `Challenge gate blocked: high-risk spec must address all focus areas. Missing: ${missingFocus.join(', ')}. Run challenge_spec(specId="${spec.id}", focus=[${allFocusAreas.map((f) => `"${f}"`).join(', ')}]).`,
|
|
739
|
-
},
|
|
740
|
-
],
|
|
741
|
-
isError: true,
|
|
742
|
-
structuredContent: {
|
|
743
|
-
error: 'CHALLENGE_GATE_BLOCKED',
|
|
744
|
-
code: 'HIGH_RISK_MISSING_FOCUS',
|
|
745
|
-
missingFocusAreas: missingFocus,
|
|
746
|
-
fixHint: `Run challenge_spec(specId="${spec.id}", focus=[${allFocusAreas.map((f) => `"${f}"`).join(', ')}])`,
|
|
747
|
-
},
|
|
748
|
-
};
|
|
749
|
-
}
|
|
750
|
-
return null;
|
|
751
|
-
}
|
|
752
|
-
//# sourceMappingURL=transition-guard.js.map
|