@matteeh/osq 0.2.0 → 0.2.2
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/README.md +234 -15
- package/dist/cli/approve.d.ts +7 -0
- package/dist/cli/approve.d.ts.map +1 -1
- package/dist/cli/approve.js +34 -0
- package/dist/cli/approve.js.map +1 -1
- package/dist/cli/bin.js +2 -3
- package/dist/cli/bin.js.map +1 -1
- package/dist/cli/check.d.ts +15 -0
- package/dist/cli/check.d.ts.map +1 -0
- package/dist/cli/check.js +65 -0
- package/dist/cli/check.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +10 -10
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +6 -1
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/lint.d.ts +3 -0
- package/dist/cli/lint.d.ts.map +1 -1
- package/dist/cli/lint.js +33 -14
- package/dist/cli/lint.js.map +1 -1
- package/dist/cli/plan-queue.d.ts +10 -4
- package/dist/cli/plan-queue.d.ts.map +1 -1
- package/dist/cli/plan-queue.js +20 -19
- package/dist/cli/plan-queue.js.map +1 -1
- package/dist/cli/plan-sections.d.ts +15 -0
- package/dist/cli/plan-sections.d.ts.map +1 -0
- package/dist/cli/plan-sections.js +47 -0
- package/dist/cli/plan-sections.js.map +1 -0
- package/dist/cli/plan.d.ts +1 -0
- package/dist/cli/plan.d.ts.map +1 -1
- package/dist/cli/plan.js +14 -4
- package/dist/cli/plan.js.map +1 -1
- package/dist/cli/report.d.ts.map +1 -1
- package/dist/cli/report.js +73 -1
- package/dist/cli/report.js.map +1 -1
- package/dist/cli/run.d.ts +7 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +22 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/verified.d.ts +15 -0
- package/dist/cli/verified.d.ts.map +1 -0
- package/dist/cli/verified.js +34 -0
- package/dist/cli/verified.js.map +1 -0
- package/dist/core/foundation/config-agents.d.ts +16 -0
- package/dist/core/foundation/config-agents.d.ts.map +1 -0
- package/dist/core/foundation/config-agents.js +2 -0
- package/dist/core/foundation/config-agents.js.map +1 -0
- package/dist/core/foundation/config-claude.d.ts +48 -0
- package/dist/core/foundation/config-claude.d.ts.map +1 -0
- package/dist/core/foundation/config-claude.js +106 -0
- package/dist/core/foundation/config-claude.js.map +1 -0
- package/dist/core/foundation/config-codex-resolve.d.ts +10 -0
- package/dist/core/foundation/config-codex-resolve.d.ts.map +1 -0
- package/dist/core/foundation/config-codex-resolve.js +24 -0
- package/dist/core/foundation/config-codex-resolve.js.map +1 -0
- package/dist/core/foundation/config-file.d.ts +18 -0
- package/dist/core/foundation/config-file.d.ts.map +1 -0
- package/dist/core/foundation/config-file.js +46 -0
- package/dist/core/foundation/config-file.js.map +1 -0
- package/dist/core/foundation/config-gates.d.ts +2 -0
- package/dist/core/foundation/config-gates.d.ts.map +1 -1
- package/dist/core/foundation/config-gates.js +8 -0
- package/dist/core/foundation/config-gates.js.map +1 -1
- package/dist/core/foundation/config-opencode.d.ts +25 -0
- package/dist/core/foundation/config-opencode.d.ts.map +1 -0
- package/dist/core/foundation/config-opencode.js +55 -0
- package/dist/core/foundation/config-opencode.js.map +1 -0
- package/dist/core/foundation/config-pi.d.ts +10 -0
- package/dist/core/foundation/config-pi.d.ts.map +1 -1
- package/dist/core/foundation/config-pi.js +13 -0
- package/dist/core/foundation/config-pi.js.map +1 -1
- package/dist/core/foundation/config-planning.d.ts +12 -1
- package/dist/core/foundation/config-planning.d.ts.map +1 -1
- package/dist/core/foundation/config-planning.js +29 -1
- package/dist/core/foundation/config-planning.js.map +1 -1
- package/dist/core/foundation/config-traceability.d.ts +28 -0
- package/dist/core/foundation/config-traceability.d.ts.map +1 -0
- package/dist/core/foundation/config-traceability.js +63 -0
- package/dist/core/foundation/config-traceability.js.map +1 -0
- package/dist/core/foundation/config-user.d.ts +32 -0
- package/dist/core/foundation/config-user.d.ts.map +1 -0
- package/dist/core/foundation/config-user.js +2 -0
- package/dist/core/foundation/config-user.js.map +1 -0
- package/dist/core/foundation/config-vcs.d.ts +29 -0
- package/dist/core/foundation/config-vcs.d.ts.map +1 -0
- package/dist/core/foundation/config-vcs.js +57 -0
- package/dist/core/foundation/config-vcs.js.map +1 -0
- package/dist/core/foundation/config.d.ts +23 -24
- package/dist/core/foundation/config.d.ts.map +1 -1
- package/dist/core/foundation/config.js +29 -36
- package/dist/core/foundation/config.js.map +1 -1
- package/dist/core/foundation/decisions-validate.d.ts +16 -0
- package/dist/core/foundation/decisions-validate.d.ts.map +1 -0
- package/dist/core/foundation/decisions-validate.js +74 -0
- package/dist/core/foundation/decisions-validate.js.map +1 -0
- package/dist/core/foundation/decisions.d.ts +34 -0
- package/dist/core/foundation/decisions.d.ts.map +1 -0
- package/dist/core/foundation/decisions.js +152 -0
- package/dist/core/foundation/decisions.js.map +1 -0
- package/dist/core/foundation/doctor-decisions.d.ts +9 -0
- package/dist/core/foundation/doctor-decisions.d.ts.map +1 -0
- package/dist/core/foundation/doctor-decisions.js +49 -0
- package/dist/core/foundation/doctor-decisions.js.map +1 -0
- package/dist/core/foundation/doctor-managed.d.ts.map +1 -1
- package/dist/core/foundation/doctor-managed.js +3 -0
- package/dist/core/foundation/doctor-managed.js.map +1 -1
- package/dist/core/foundation/doctor-prices.d.ts +8 -0
- package/dist/core/foundation/doctor-prices.d.ts.map +1 -0
- package/dist/core/foundation/doctor-prices.js +25 -0
- package/dist/core/foundation/doctor-prices.js.map +1 -0
- package/dist/core/foundation/doctor.d.ts.map +1 -1
- package/dist/core/foundation/doctor.js +20 -30
- package/dist/core/foundation/doctor.js.map +1 -1
- package/dist/core/foundation/harness-catalog.d.ts +7 -8
- package/dist/core/foundation/harness-catalog.d.ts.map +1 -1
- package/dist/core/foundation/harness-catalog.js +26 -41
- package/dist/core/foundation/harness-catalog.js.map +1 -1
- package/dist/core/foundation/init-blocks.d.ts +1 -1
- package/dist/core/foundation/init-blocks.d.ts.map +1 -1
- package/dist/core/foundation/init-blocks.js +51 -14
- package/dist/core/foundation/init-blocks.js.map +1 -1
- package/dist/core/foundation/init.d.ts +4 -0
- package/dist/core/foundation/init.d.ts.map +1 -1
- package/dist/core/foundation/init.js +7 -0
- package/dist/core/foundation/init.js.map +1 -1
- package/dist/core/foundation/new.d.ts +4 -1
- package/dist/core/foundation/new.d.ts.map +1 -1
- package/dist/core/foundation/new.js +18 -8
- package/dist/core/foundation/new.js.map +1 -1
- package/dist/core/foundation/package-root.d.ts +6 -0
- package/dist/core/foundation/package-root.d.ts.map +1 -1
- package/dist/core/foundation/package-root.js +6 -0
- package/dist/core/foundation/package-root.js.map +1 -1
- package/dist/core/foundation/rules-block.d.ts +11 -0
- package/dist/core/foundation/rules-block.d.ts.map +1 -0
- package/dist/core/foundation/rules-block.js +90 -0
- package/dist/core/foundation/rules-block.js.map +1 -0
- package/dist/core/foundation/traceability-block.d.ts +13 -0
- package/dist/core/foundation/traceability-block.d.ts.map +1 -0
- package/dist/core/foundation/traceability-block.js +124 -0
- package/dist/core/foundation/traceability-block.js.map +1 -0
- package/dist/core/lifecycle/done.d.ts.map +1 -1
- package/dist/core/lifecycle/done.js +2 -4
- package/dist/core/lifecycle/done.js.map +1 -1
- package/dist/core/lifecycle/recertify.d.ts +9 -0
- package/dist/core/lifecycle/recertify.d.ts.map +1 -0
- package/dist/core/lifecycle/recertify.js +27 -0
- package/dist/core/lifecycle/recertify.js.map +1 -0
- package/dist/core/lifecycle/reject.d.ts.map +1 -1
- package/dist/core/lifecycle/reject.js +3 -4
- package/dist/core/lifecycle/reject.js.map +1 -1
- package/dist/core/lifecycle/retry.d.ts.map +1 -1
- package/dist/core/lifecycle/retry.js +6 -20
- package/dist/core/lifecycle/retry.js.map +1 -1
- package/dist/core/lifecycle/verification-record.d.ts +42 -0
- package/dist/core/lifecycle/verification-record.d.ts.map +1 -0
- package/dist/core/lifecycle/verification-record.js +76 -0
- package/dist/core/lifecycle/verification-record.js.map +1 -0
- package/dist/core/report/approval-flags.d.ts +16 -3
- package/dist/core/report/approval-flags.d.ts.map +1 -1
- package/dist/core/report/approval-flags.js +59 -22
- package/dist/core/report/approval-flags.js.map +1 -1
- package/dist/core/report/brief-to-approval.d.ts +7 -0
- package/dist/core/report/brief-to-approval.d.ts.map +1 -0
- package/dist/core/report/brief-to-approval.js +43 -0
- package/dist/core/report/brief-to-approval.js.map +1 -0
- package/dist/core/report/planning-price-gaps.d.ts +10 -0
- package/dist/core/report/planning-price-gaps.d.ts.map +1 -0
- package/dist/core/report/planning-price-gaps.js +37 -0
- package/dist/core/report/planning-price-gaps.js.map +1 -0
- package/dist/core/report/planning-slice-lookup.d.ts.map +1 -1
- package/dist/core/report/planning-slice-lookup.js +3 -9
- package/dist/core/report/planning-slice-lookup.js.map +1 -1
- package/dist/core/report/recent-disclosures.d.ts +18 -0
- package/dist/core/report/recent-disclosures.d.ts.map +1 -0
- package/dist/core/report/recent-disclosures.js +105 -0
- package/dist/core/report/recent-disclosures.js.map +1 -0
- package/dist/core/report/record-disclosures.d.ts +14 -0
- package/dist/core/report/record-disclosures.d.ts.map +1 -0
- package/dist/core/report/record-disclosures.js +30 -0
- package/dist/core/report/record-disclosures.js.map +1 -0
- package/dist/core/report/record-estimates.d.ts +25 -0
- package/dist/core/report/record-estimates.d.ts.map +1 -0
- package/dist/core/report/record-estimates.js +83 -0
- package/dist/core/report/record-estimates.js.map +1 -0
- package/dist/core/report/record-rework.d.ts +19 -0
- package/dist/core/report/record-rework.d.ts.map +1 -0
- package/dist/core/report/record-rework.js +50 -0
- package/dist/core/report/record-rework.js.map +1 -0
- package/dist/core/report/record-verification.d.ts +16 -0
- package/dist/core/report/record-verification.d.ts.map +1 -0
- package/dist/core/report/record-verification.js +33 -0
- package/dist/core/report/record-verification.js.map +1 -0
- package/dist/core/report/report-dependencies.d.ts +29 -0
- package/dist/core/report/report-dependencies.d.ts.map +1 -0
- package/dist/core/report/report-dependencies.js +92 -0
- package/dist/core/report/report-dependencies.js.map +1 -0
- package/dist/core/report/report-events.d.ts +1 -0
- package/dist/core/report/report-events.d.ts.map +1 -1
- package/dist/core/report/report-events.js +8 -26
- package/dist/core/report/report-events.js.map +1 -1
- package/dist/core/report/report-mutation.d.ts +34 -0
- package/dist/core/report/report-mutation.d.ts.map +1 -0
- package/dist/core/report/report-mutation.js +191 -0
- package/dist/core/report/report-mutation.js.map +1 -0
- package/dist/core/report/report-scope.d.ts +21 -0
- package/dist/core/report/report-scope.d.ts.map +1 -0
- package/dist/core/report/report-scope.js +61 -0
- package/dist/core/report/report-scope.js.map +1 -0
- package/dist/core/report/report-traceability.d.ts +29 -0
- package/dist/core/report/report-traceability.d.ts.map +1 -0
- package/dist/core/report/report-traceability.js +94 -0
- package/dist/core/report/report-traceability.js.map +1 -0
- package/dist/core/report/report.d.ts +35 -1
- package/dist/core/report/report.d.ts.map +1 -1
- package/dist/core/report/report.js +130 -111
- package/dist/core/report/report.js.map +1 -1
- package/dist/core/report/result-sections.d.ts +30 -0
- package/dist/core/report/result-sections.d.ts.map +1 -0
- package/dist/core/report/result-sections.js +125 -0
- package/dist/core/report/result-sections.js.map +1 -0
- package/dist/core/report/scope-size.d.ts +7 -0
- package/dist/core/report/scope-size.d.ts.map +1 -0
- package/dist/core/report/scope-size.js +22 -0
- package/dist/core/report/scope-size.js.map +1 -0
- package/dist/core/run/commit-message.d.ts +24 -0
- package/dist/core/run/commit-message.d.ts.map +1 -0
- package/dist/core/run/commit-message.js +76 -0
- package/dist/core/run/commit-message.js.map +1 -0
- package/dist/core/run/dead-commit.d.ts +10 -0
- package/dist/core/run/dead-commit.d.ts.map +1 -0
- package/dist/core/run/dead-commit.js +70 -0
- package/dist/core/run/dead-commit.js.map +1 -0
- package/dist/core/run/focused-tests.d.ts +43 -0
- package/dist/core/run/focused-tests.d.ts.map +1 -0
- package/dist/core/run/focused-tests.js +116 -0
- package/dist/core/run/focused-tests.js.map +1 -0
- package/dist/core/run/manifest-approval.d.ts +7 -0
- package/dist/core/run/manifest-approval.d.ts.map +1 -0
- package/dist/core/run/manifest-approval.js +30 -0
- package/dist/core/run/manifest-approval.js.map +1 -0
- package/dist/core/run/manifest.d.ts +11 -1
- package/dist/core/run/manifest.d.ts.map +1 -1
- package/dist/core/run/manifest.js +52 -11
- package/dist/core/run/manifest.js.map +1 -1
- package/dist/core/run/mutation-report.d.ts +29 -0
- package/dist/core/run/mutation-report.d.ts.map +1 -0
- package/dist/core/run/mutation-report.js +107 -0
- package/dist/core/run/mutation-report.js.map +1 -0
- package/dist/core/run/mutation-run.d.ts +32 -0
- package/dist/core/run/mutation-run.d.ts.map +1 -0
- package/dist/core/run/mutation-run.js +80 -0
- package/dist/core/run/mutation-run.js.map +1 -0
- package/dist/core/run/verification.d.ts +12 -1
- package/dist/core/run/verification.d.ts.map +1 -1
- package/dist/core/run/verification.js +24 -2
- package/dist/core/run/verification.js.map +1 -1
- package/dist/core/spec/approve-worktree-shared.d.ts +33 -0
- package/dist/core/spec/approve-worktree-shared.d.ts.map +1 -0
- package/dist/core/spec/approve-worktree-shared.js +59 -0
- package/dist/core/spec/approve-worktree-shared.js.map +1 -0
- package/dist/core/spec/approve-worktree.d.ts +21 -0
- package/dist/core/spec/approve-worktree.d.ts.map +1 -0
- package/dist/core/spec/approve-worktree.js +153 -0
- package/dist/core/spec/approve-worktree.js.map +1 -0
- package/dist/core/spec/approve.d.ts +20 -10
- package/dist/core/spec/approve.d.ts.map +1 -1
- package/dist/core/spec/approve.js +57 -54
- package/dist/core/spec/approve.js.map +1 -1
- package/dist/core/spec/capability-impact.d.ts +43 -0
- package/dist/core/spec/capability-impact.d.ts.map +1 -0
- package/dist/core/spec/capability-impact.js +85 -0
- package/dist/core/spec/capability-impact.js.map +1 -0
- package/dist/core/spec/decisions-lint.d.ts +18 -0
- package/dist/core/spec/decisions-lint.d.ts.map +1 -0
- package/dist/core/spec/decisions-lint.js +127 -0
- package/dist/core/spec/decisions-lint.js.map +1 -0
- package/dist/core/spec/delta.d.ts +6 -0
- package/dist/core/spec/delta.d.ts.map +1 -1
- package/dist/core/spec/delta.js +73 -5
- package/dist/core/spec/delta.js.map +1 -1
- package/dist/core/spec/digest-capability.d.ts +17 -0
- package/dist/core/spec/digest-capability.d.ts.map +1 -0
- package/dist/core/spec/digest-capability.js +89 -0
- package/dist/core/spec/digest-capability.js.map +1 -0
- package/dist/core/spec/digest-decisions.d.ts +27 -0
- package/dist/core/spec/digest-decisions.d.ts.map +1 -0
- package/dist/core/spec/digest-decisions.js +86 -0
- package/dist/core/spec/digest-decisions.js.map +1 -0
- package/dist/core/spec/digest-flags.d.ts +1 -0
- package/dist/core/spec/digest-flags.d.ts.map +1 -1
- package/dist/core/spec/digest-flags.js +16 -16
- package/dist/core/spec/digest-flags.js.map +1 -1
- package/dist/core/spec/digest-format.d.ts +4 -0
- package/dist/core/spec/digest-format.d.ts.map +1 -0
- package/dist/core/spec/digest-format.js +44 -0
- package/dist/core/spec/digest-format.js.map +1 -0
- package/dist/core/spec/digest.d.ts +6 -3
- package/dist/core/spec/digest.d.ts.map +1 -1
- package/dist/core/spec/digest.js +18 -32
- package/dist/core/spec/digest.js.map +1 -1
- package/dist/core/spec/human-steps.d.ts +20 -0
- package/dist/core/spec/human-steps.d.ts.map +1 -0
- package/dist/core/spec/human-steps.js +52 -0
- package/dist/core/spec/human-steps.js.map +1 -0
- package/dist/core/spec/impact-lint.d.ts +24 -0
- package/dist/core/spec/impact-lint.d.ts.map +1 -0
- package/dist/core/spec/impact-lint.js +39 -0
- package/dist/core/spec/impact-lint.js.map +1 -0
- package/dist/core/spec/import-graph.d.ts +35 -0
- package/dist/core/spec/import-graph.d.ts.map +1 -0
- package/dist/core/spec/import-graph.js +155 -0
- package/dist/core/spec/import-graph.js.map +1 -0
- package/dist/core/spec/lint-findings.d.ts +44 -0
- package/dist/core/spec/lint-findings.d.ts.map +1 -0
- package/dist/core/spec/lint-findings.js +56 -0
- package/dist/core/spec/lint-findings.js.map +1 -0
- package/dist/core/spec/lint-output.d.ts +53 -0
- package/dist/core/spec/lint-output.d.ts.map +1 -0
- package/dist/core/spec/lint-output.js +87 -0
- package/dist/core/spec/lint-output.js.map +1 -0
- package/dist/core/spec/linter.d.ts +14 -4
- package/dist/core/spec/linter.d.ts.map +1 -1
- package/dist/core/spec/linter.js +271 -111
- package/dist/core/spec/linter.js.map +1 -1
- package/dist/core/spec/merged-spec-check.d.ts +24 -0
- package/dist/core/spec/merged-spec-check.d.ts.map +1 -0
- package/dist/core/spec/merged-spec-check.js +95 -0
- package/dist/core/spec/merged-spec-check.js.map +1 -0
- package/dist/core/spec/openspec-issues.d.ts +58 -0
- package/dist/core/spec/openspec-issues.d.ts.map +1 -0
- package/dist/core/spec/openspec-issues.js +166 -0
- package/dist/core/spec/openspec-issues.js.map +1 -0
- package/dist/core/spec/parser.d.ts +1 -0
- package/dist/core/spec/parser.d.ts.map +1 -1
- package/dist/core/spec/parser.js +16 -6
- package/dist/core/spec/parser.js.map +1 -1
- package/dist/core/spec/scenario-impact.d.ts +47 -0
- package/dist/core/spec/scenario-impact.d.ts.map +1 -0
- package/dist/core/spec/scenario-impact.js +130 -0
- package/dist/core/spec/scenario-impact.js.map +1 -0
- package/dist/core/spec/test-impact.d.ts +28 -0
- package/dist/core/spec/test-impact.d.ts.map +1 -0
- package/dist/core/spec/test-impact.js +119 -0
- package/dist/core/spec/test-impact.js.map +1 -0
- package/dist/core/spec/traceability-links.d.ts +50 -0
- package/dist/core/spec/traceability-links.d.ts.map +1 -0
- package/dist/core/spec/traceability-links.js +120 -0
- package/dist/core/spec/traceability-links.js.map +1 -0
- package/dist/core/spec/traceability-lint.d.ts +29 -0
- package/dist/core/spec/traceability-lint.d.ts.map +1 -0
- package/dist/core/spec/traceability-lint.js +143 -0
- package/dist/core/spec/traceability-lint.js.map +1 -0
- package/dist/core/status/blocked-item.d.ts +8 -0
- package/dist/core/status/blocked-item.d.ts.map +1 -0
- package/dist/core/status/blocked-item.js +45 -0
- package/dist/core/status/blocked-item.js.map +1 -0
- package/dist/core/status/change-locations.d.ts +44 -0
- package/dist/core/status/change-locations.d.ts.map +1 -0
- package/dist/core/status/change-locations.js +138 -0
- package/dist/core/status/change-locations.js.map +1 -0
- package/dist/core/status/dependency-readiness.d.ts +11 -0
- package/dist/core/status/dependency-readiness.d.ts.map +1 -0
- package/dist/core/status/dependency-readiness.js +39 -0
- package/dist/core/status/dependency-readiness.js.map +1 -0
- package/dist/core/status/inbox-projection.d.ts.map +1 -1
- package/dist/core/status/inbox-projection.js +23 -4
- package/dist/core/status/inbox-projection.js.map +1 -1
- package/dist/core/status/inbox-text.d.ts.map +1 -1
- package/dist/core/status/inbox-text.js +34 -3
- package/dist/core/status/inbox-text.js.map +1 -1
- package/dist/core/status/inbox.d.ts +10 -1
- package/dist/core/status/inbox.d.ts.map +1 -1
- package/dist/core/status/inbox.js +19 -1
- package/dist/core/status/inbox.js.map +1 -1
- package/dist/core/status/layout.d.ts +6 -0
- package/dist/core/status/layout.d.ts.map +1 -1
- package/dist/core/status/layout.js +8 -0
- package/dist/core/status/layout.js.map +1 -1
- package/dist/core/status/next-step.d.ts +17 -0
- package/dist/core/status/next-step.d.ts.map +1 -0
- package/dist/core/status/next-step.js +85 -0
- package/dist/core/status/next-step.js.map +1 -0
- package/dist/core/status/pre-spawn-words.d.ts +13 -0
- package/dist/core/status/pre-spawn-words.d.ts.map +1 -0
- package/dist/core/status/pre-spawn-words.js +26 -0
- package/dist/core/status/pre-spawn-words.js.map +1 -0
- package/dist/core/status/queue-parser.d.ts +1 -0
- package/dist/core/status/queue-parser.d.ts.map +1 -1
- package/dist/core/status/queue-parser.js +41 -2
- package/dist/core/status/queue-parser.js.map +1 -1
- package/dist/core/status/queue-planning.d.ts +1 -0
- package/dist/core/status/queue-planning.d.ts.map +1 -1
- package/dist/core/status/queue-planning.js +24 -12
- package/dist/core/status/queue-planning.js.map +1 -1
- package/dist/core/status/queue-report-detail.d.ts.map +1 -1
- package/dist/core/status/queue-report-detail.js +5 -3
- package/dist/core/status/queue-report-detail.js.map +1 -1
- package/dist/core/status/queue-state.d.ts +1 -1
- package/dist/core/status/queue-state.d.ts.map +1 -1
- package/dist/core/status/queue-state.js +27 -41
- package/dist/core/status/queue-state.js.map +1 -1
- package/dist/core/status/show.d.ts +25 -0
- package/dist/core/status/show.d.ts.map +1 -1
- package/dist/core/status/show.js +354 -91
- package/dist/core/status/show.js.map +1 -1
- package/dist/core/status/state.d.ts.map +1 -1
- package/dist/core/status/state.js +1 -23
- package/dist/core/status/state.js.map +1 -1
- package/dist/core/status/status.d.ts +18 -0
- package/dist/core/status/status.d.ts.map +1 -1
- package/dist/core/status/status.js +59 -80
- package/dist/core/status/status.js.map +1 -1
- package/dist/core/status/verification.d.ts +27 -0
- package/dist/core/status/verification.d.ts.map +1 -0
- package/dist/core/status/verification.js +111 -0
- package/dist/core/status/verification.js.map +1 -0
- package/dist/core/trace/function-ranges.d.ts +30 -0
- package/dist/core/trace/function-ranges.d.ts.map +1 -0
- package/dist/core/trace/function-ranges.js +250 -0
- package/dist/core/trace/function-ranges.js.map +1 -0
- package/dist/core/trace/mutation-pick.d.ts +55 -0
- package/dist/core/trace/mutation-pick.d.ts.map +1 -0
- package/dist/core/trace/mutation-pick.js +96 -0
- package/dist/core/trace/mutation-pick.js.map +1 -0
- package/dist/core/trace/scenario-index.d.ts +27 -0
- package/dist/core/trace/scenario-index.d.ts.map +1 -0
- package/dist/core/trace/scenario-index.js +76 -0
- package/dist/core/trace/scenario-index.js.map +1 -0
- package/dist/core/trace/scenario-lookup.d.ts +14 -0
- package/dist/core/trace/scenario-lookup.d.ts.map +1 -0
- package/dist/core/trace/scenario-lookup.js +179 -0
- package/dist/core/trace/scenario-lookup.js.map +1 -0
- package/dist/core/trace/tag-scan.d.ts +44 -0
- package/dist/core/trace/tag-scan.d.ts.map +1 -0
- package/dist/core/trace/tag-scan.js +200 -0
- package/dist/core/trace/tag-scan.js.map +1 -0
- package/dist/core/vcs/doctor-git.d.ts +13 -0
- package/dist/core/vcs/doctor-git.d.ts.map +1 -0
- package/dist/core/vcs/doctor-git.js +114 -0
- package/dist/core/vcs/doctor-git.js.map +1 -0
- package/dist/core/vcs/git-vcs-write.d.ts +47 -0
- package/dist/core/vcs/git-vcs-write.d.ts.map +1 -0
- package/dist/core/vcs/git-vcs-write.js +210 -0
- package/dist/core/vcs/git-vcs-write.js.map +1 -0
- package/dist/core/vcs/git-vcs.d.ts +40 -0
- package/dist/core/vcs/git-vcs.d.ts.map +1 -0
- package/dist/core/vcs/git-vcs.js +170 -0
- package/dist/core/vcs/git-vcs.js.map +1 -0
- package/dist/core/vcs/no-vcs.d.ts +26 -0
- package/dist/core/vcs/no-vcs.d.ts.map +1 -0
- package/dist/core/vcs/no-vcs.js +62 -0
- package/dist/core/vcs/no-vcs.js.map +1 -0
- package/dist/core/vcs/select.d.ts +11 -0
- package/dist/core/vcs/select.d.ts.map +1 -0
- package/dist/core/vcs/select.js +33 -0
- package/dist/core/vcs/select.js.map +1 -0
- package/dist/core/vcs/snapshot.d.ts +34 -0
- package/dist/core/vcs/snapshot.d.ts.map +1 -0
- package/dist/core/vcs/snapshot.js +71 -0
- package/dist/core/vcs/snapshot.js.map +1 -0
- package/dist/core/vcs/vcs.d.ts +55 -0
- package/dist/core/vcs/vcs.d.ts.map +1 -0
- package/dist/core/vcs/vcs.js +2 -0
- package/dist/core/vcs/vcs.js.map +1 -0
- package/dist/core/vcs/worktree.d.ts +10 -0
- package/dist/core/vcs/worktree.d.ts.map +1 -0
- package/dist/core/vcs/worktree.js +25 -0
- package/dist/core/vcs/worktree.js.map +1 -0
- package/dist/core/web/web-data-folders.d.ts.map +1 -1
- package/dist/core/web/web-data-folders.js +18 -33
- package/dist/core/web/web-data-folders.js.map +1 -1
- package/dist/core/web/web-data-lifecycle.d.ts.map +1 -1
- package/dist/core/web/web-data-lifecycle.js +2 -1
- package/dist/core/web/web-data-lifecycle.js.map +1 -1
- package/dist/core/web/web-events.d.ts +8 -6
- package/dist/core/web/web-events.d.ts.map +1 -1
- package/dist/core/web/web-events.js +7 -31
- package/dist/core/web/web-events.js.map +1 -1
- package/dist/core/web/web-server.d.ts.map +1 -1
- package/dist/core/web/web-server.js +3 -0
- package/dist/core/web/web-server.js.map +1 -1
- package/dist/core/web/web-trees.d.ts +27 -0
- package/dist/core/web/web-trees.d.ts.map +1 -0
- package/dist/core/web/web-trees.js +82 -0
- package/dist/core/web/web-trees.js.map +1 -0
- package/dist/harness/claude/claude-exec-args.d.ts +13 -0
- package/dist/harness/claude/claude-exec-args.d.ts.map +1 -0
- package/dist/harness/claude/claude-exec-args.js +61 -0
- package/dist/harness/claude/claude-exec-args.js.map +1 -0
- package/dist/harness/claude/claude-exec.d.ts +12 -0
- package/dist/harness/claude/claude-exec.d.ts.map +1 -0
- package/dist/harness/claude/claude-exec.js +79 -0
- package/dist/harness/claude/claude-exec.js.map +1 -0
- package/dist/harness/claude/claude-stream.d.ts +31 -0
- package/dist/harness/claude/claude-stream.d.ts.map +1 -0
- package/dist/harness/claude/claude-stream.js +150 -0
- package/dist/harness/claude/claude-stream.js.map +1 -0
- package/dist/harness/claude/claude-tools.d.ts +5 -0
- package/dist/harness/claude/claude-tools.d.ts.map +1 -0
- package/dist/harness/claude/claude-tools.js +30 -0
- package/dist/harness/claude/claude-tools.js.map +1 -0
- package/dist/harness/index.d.ts +1 -0
- package/dist/harness/index.d.ts.map +1 -1
- package/dist/harness/index.js +3 -0
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/opencode/opencode-session.d.ts +42 -0
- package/dist/harness/opencode/opencode-session.d.ts.map +1 -0
- package/dist/harness/opencode/opencode-session.js +123 -0
- package/dist/harness/opencode/opencode-session.js.map +1 -0
- package/dist/harness/opencode/opencode.d.ts +2 -1
- package/dist/harness/opencode/opencode.d.ts.map +1 -1
- package/dist/harness/opencode/opencode.js +52 -28
- package/dist/harness/opencode/opencode.js.map +1 -1
- package/dist/harness/prompt.js +1 -1
- package/dist/harness/prompt.js.map +1 -1
- package/dist/harness/types.d.ts +114 -1
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/harness/types.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +2 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/scenario.d.ts +29 -0
- package/dist/testing/scenario.d.ts.map +1 -0
- package/dist/testing/scenario.js +157 -0
- package/dist/testing/scenario.js.map +1 -0
- package/dist/watcher/archiver.d.ts +2 -1
- package/dist/watcher/archiver.d.ts.map +1 -1
- package/dist/watcher/archiver.js +27 -2
- package/dist/watcher/archiver.js.map +1 -1
- package/dist/watcher/auto-recertify.d.ts +27 -0
- package/dist/watcher/auto-recertify.d.ts.map +1 -0
- package/dist/watcher/auto-recertify.js +113 -0
- package/dist/watcher/auto-recertify.js.map +1 -0
- package/dist/watcher/auto-retry.d.ts +1 -1
- package/dist/watcher/auto-retry.d.ts.map +1 -1
- package/dist/watcher/auto-retry.js +3 -11
- package/dist/watcher/auto-retry.js.map +1 -1
- package/dist/watcher/baseline-key.d.ts +17 -0
- package/dist/watcher/baseline-key.d.ts.map +1 -0
- package/dist/watcher/baseline-key.js +31 -0
- package/dist/watcher/baseline-key.js.map +1 -0
- package/dist/watcher/baseline.d.ts +32 -0
- package/dist/watcher/baseline.d.ts.map +1 -0
- package/dist/watcher/baseline.js +166 -0
- package/dist/watcher/baseline.js.map +1 -0
- package/dist/watcher/blocked.d.ts +12 -0
- package/dist/watcher/blocked.d.ts.map +1 -0
- package/dist/watcher/blocked.js +24 -0
- package/dist/watcher/blocked.js.map +1 -0
- package/dist/watcher/build-project.d.ts +11 -0
- package/dist/watcher/build-project.d.ts.map +1 -0
- package/dist/watcher/build-project.js +36 -0
- package/dist/watcher/build-project.js.map +1 -0
- package/dist/watcher/build.d.ts +8 -5
- package/dist/watcher/build.d.ts.map +1 -1
- package/dist/watcher/build.js +35 -39
- package/dist/watcher/build.js.map +1 -1
- package/dist/watcher/dependencies.d.ts +28 -0
- package/dist/watcher/dependencies.d.ts.map +1 -0
- package/dist/watcher/dependencies.js +152 -0
- package/dist/watcher/dependencies.js.map +1 -0
- package/dist/watcher/done-metadata.d.ts +4 -0
- package/dist/watcher/done-metadata.d.ts.map +1 -0
- package/dist/watcher/done-metadata.js +20 -0
- package/dist/watcher/done-metadata.js.map +1 -0
- package/dist/watcher/failure-reason.d.ts +1 -1
- package/dist/watcher/failure-reason.d.ts.map +1 -1
- package/dist/watcher/fingerprint.d.ts +2 -2
- package/dist/watcher/fingerprint.d.ts.map +1 -1
- package/dist/watcher/fingerprint.js +31 -2
- package/dist/watcher/fingerprint.js.map +1 -1
- package/dist/watcher/focused-verify.d.ts +17 -0
- package/dist/watcher/focused-verify.d.ts.map +1 -0
- package/dist/watcher/focused-verify.js +54 -0
- package/dist/watcher/focused-verify.js.map +1 -0
- package/dist/watcher/git-guard.d.ts +24 -0
- package/dist/watcher/git-guard.d.ts.map +1 -0
- package/dist/watcher/git-guard.js +95 -0
- package/dist/watcher/git-guard.js.map +1 -0
- package/dist/watcher/instructions-drift.d.ts +21 -0
- package/dist/watcher/instructions-drift.d.ts.map +1 -0
- package/dist/watcher/instructions-drift.js +115 -0
- package/dist/watcher/instructions-drift.js.map +1 -0
- package/dist/watcher/loop.d.ts.map +1 -1
- package/dist/watcher/loop.js +37 -51
- package/dist/watcher/loop.js.map +1 -1
- package/dist/watcher/measures.d.ts.map +1 -1
- package/dist/watcher/measures.js +22 -39
- package/dist/watcher/measures.js.map +1 -1
- package/dist/watcher/mutation-check.d.ts +42 -0
- package/dist/watcher/mutation-check.d.ts.map +1 -0
- package/dist/watcher/mutation-check.js +147 -0
- package/dist/watcher/mutation-check.js.map +1 -0
- package/dist/watcher/outcome.d.ts +2 -0
- package/dist/watcher/outcome.d.ts.map +1 -1
- package/dist/watcher/outcome.js +5 -1
- package/dist/watcher/outcome.js.map +1 -1
- package/dist/watcher/regression.d.ts +10 -5
- package/dist/watcher/regression.d.ts.map +1 -1
- package/dist/watcher/regression.js +29 -19
- package/dist/watcher/regression.js.map +1 -1
- package/dist/watcher/runner.d.ts.map +1 -1
- package/dist/watcher/runner.js +12 -14
- package/dist/watcher/runner.js.map +1 -1
- package/dist/watcher/spawn.d.ts.map +1 -1
- package/dist/watcher/spawn.js +11 -1
- package/dist/watcher/spawn.js.map +1 -1
- package/dist/watcher/task-verify.d.ts +7 -2
- package/dist/watcher/task-verify.d.ts.map +1 -1
- package/dist/watcher/task-verify.js +33 -8
- package/dist/watcher/task-verify.js.map +1 -1
- package/dist/watcher/verify.d.ts +1 -5
- package/dist/watcher/verify.d.ts.map +1 -1
- package/dist/watcher/verify.js +2 -6
- package/dist/watcher/verify.js.map +1 -1
- package/package.json +5 -1
- package/templates/PLANNER.md +35 -9
- package/templates/openspec/config.yaml +1 -1
- package/templates/openspec/schemas/osq/schema.yaml +4 -2
- package/templates/openspec/schemas/osq/templates/proposal.md +9 -2
- package/templates/proposal.md +9 -2
- package/ui/dist/assets/{index-CZYeQ8la.js → index-D39uYbbL.js} +1 -1
- package/ui/dist/index.html +1 -1
|
@@ -3,6 +3,7 @@ import path from 'node:path';
|
|
|
3
3
|
import { DEFAULT_CONFIG } from './config.js';
|
|
4
4
|
import { CLAUDE_PLAN_COMMAND_PATH, MANAGED_AGENTS_MD_BODY, MANAGED_CLAUDE_PLAN_COMMAND, MANAGED_PLANNER_BLOCK, } from './init-blocks.js';
|
|
5
5
|
import { inspectManagedBlock } from './init-managed.js';
|
|
6
|
+
import { checkTraceabilityBlocks } from './traceability-block.js';
|
|
6
7
|
/**
|
|
7
8
|
* Every planning entry point osq manages. Codex reads `AGENTS.md`, the human
|
|
8
9
|
* planner model reads `PLANNER.md`, and Claude Code expands the command below.
|
|
@@ -65,9 +66,11 @@ export async function checkManagedBlocks(projectRoot, config) {
|
|
|
65
66
|
setupFailures.push(`${relPath} is missing`);
|
|
66
67
|
}
|
|
67
68
|
}
|
|
69
|
+
const traceabilityFailures = await checkTraceabilityBlocks(projectRoot, config);
|
|
68
70
|
const groups = [
|
|
69
71
|
failures.length > 0 ? `${failures.join('; ')} (run osq init)` : '',
|
|
70
72
|
setupFailures.length > 0 ? `${setupFailures.join('; ')} (run osq setup)` : '',
|
|
73
|
+
traceabilityFailures.length > 0 ? traceabilityFailures.join('; ') : '',
|
|
71
74
|
].filter((group) => group !== '');
|
|
72
75
|
if (groups.length === 0) {
|
|
73
76
|
return { ok: true, message: 'managed blocks valid' };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-managed.js","sourceRoot":"","sources":["../../../src/core/foundation/doctor-managed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAkB,MAAM,aAAa,CAAC;AAC7D,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAA4B,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor-managed.js","sourceRoot":"","sources":["../../../src/core/foundation/doctor-managed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAkB,MAAM,aAAa,CAAC;AAC7D,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAA4B,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAYlE;;;GAGG;AACH,MAAM,aAAa,GAA2B;IAC5C,EAAE,OAAO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,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;QAC7E,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;KACvE,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IAElC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;IACvD,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { OsqConfig } from './config.js';
|
|
2
|
+
import type { DoctorCheckResult } from './doctor.js';
|
|
3
|
+
/**
|
|
4
|
+
* The `planning-prices` warning when some recorded-token planning model has no
|
|
5
|
+
* price entry, otherwise null so the check list stays unchanged.
|
|
6
|
+
*/
|
|
7
|
+
export declare function checkPlanningPrices(projectRoot: string, config: OsqConfig): Promise<DoctorCheckResult | null>;
|
|
8
|
+
//# sourceMappingURL=doctor-prices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-prices.d.ts","sourceRoot":"","sources":["../../../src/core/foundation/doctor-prices.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAQrD;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAWnC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { findUnpricedPlanningModels, formatPriceKey } from '../report/planning-price-gaps.js';
|
|
2
|
+
import { listChanges } from '../status/change-locations.js';
|
|
3
|
+
/** Every active and archived change folder under the canonical layout. */
|
|
4
|
+
async function changeFolders(projectRoot, config) {
|
|
5
|
+
const changes = await listChanges(projectRoot, config, ['active', 'archived']);
|
|
6
|
+
return changes.map((change) => change.folderPath);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The `planning-prices` warning when some recorded-token planning model has no
|
|
10
|
+
* price entry, otherwise null so the check list stays unchanged.
|
|
11
|
+
*/
|
|
12
|
+
export async function checkPlanningPrices(projectRoot, config) {
|
|
13
|
+
const folders = await changeFolders(projectRoot, config);
|
|
14
|
+
const models = await findUnpricedPlanningModels(folders, config.planning?.prices);
|
|
15
|
+
if (models.length === 0)
|
|
16
|
+
return null;
|
|
17
|
+
const keys = models.map((model) => formatPriceKey(model)).join(', ');
|
|
18
|
+
return {
|
|
19
|
+
name: 'planning-prices',
|
|
20
|
+
ok: true,
|
|
21
|
+
warning: true,
|
|
22
|
+
message: `planning cost stays unreported for ${models.join(', ')}; add ${keys}`,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=doctor-prices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-prices.js","sourceRoot":"","sources":["../../../src/core/foundation/doctor-prices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAI5D,0EAA0E;AAC1E,KAAK,UAAU,aAAa,CAAC,WAAmB,EAAE,MAAiB;IACjE,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;IAC/E,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,WAAmB,EACnB,MAAiB;IAEjB,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,MAAM,0BAA0B,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAClF,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrE,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,EAAE,EAAE,IAAI;QACR,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,sCAAsC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE;KAChF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/core/foundation/doctor.ts"],"names":[],"mappings":"AAYA,OAAO,EAAkB,KAAK,SAAS,EAAc,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/core/foundation/doctor.ts"],"names":[],"mappings":"AAYA,OAAO,EAAkB,KAAK,SAAS,EAAc,MAAM,aAAa,CAAC;AAMzE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC7B;AAED,kEAAkE;AAClE,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACzD,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3D;AAuKD,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,IAAI,GAAE,kBAAuB,GAC5B,OAAO,CAAC,YAAY,CAAC,CAyBvB"}
|
|
@@ -3,10 +3,13 @@ import path from 'node:path';
|
|
|
3
3
|
import { isPidRunning } from '../run/lock.js';
|
|
4
4
|
import { OPENSPEC_EXPECTED_VERSION, assessOpenSpecVersion, formatInRangeWarning, } from '../spec/openspec-version.js';
|
|
5
5
|
import { parseFrontmatter } from '../spec/parser.js';
|
|
6
|
-
import {
|
|
6
|
+
import { listChanges } from '../status/change-locations.js';
|
|
7
|
+
import { checkGit } from '../vcs/doctor-git.js';
|
|
7
8
|
import { harnessBinary, probeVersion } from './config-doctor.js';
|
|
8
9
|
import { DEFAULT_CONFIG, loadConfig } from './config.js';
|
|
10
|
+
import { checkDecisions } from './doctor-decisions.js';
|
|
9
11
|
import { checkManagedBlocks } from './doctor-managed.js';
|
|
12
|
+
import { checkPlanningPrices } from './doctor-prices.js';
|
|
10
13
|
import { findHarness } from './harness-catalog.js';
|
|
11
14
|
function make(name, ok, message) {
|
|
12
15
|
return { name, ok, message };
|
|
@@ -89,25 +92,11 @@ async function checkManaged(projectRoot, config) {
|
|
|
89
92
|
const result = await checkManagedBlocks(projectRoot, config);
|
|
90
93
|
return make('managed-blocks', result.ok, result.message);
|
|
91
94
|
}
|
|
92
|
-
async function listDirs(root) {
|
|
93
|
-
let entries = [];
|
|
94
|
-
try {
|
|
95
|
-
entries = await fs.readdir(root, { withFileTypes: true });
|
|
96
|
-
}
|
|
97
|
-
catch {
|
|
98
|
-
return [];
|
|
99
|
-
}
|
|
100
|
-
return entries.filter((entry) => entry.isDirectory()).map((entry) => path.join(root, entry.name));
|
|
101
|
-
}
|
|
102
95
|
async function checkLocks(projectRoot, config) {
|
|
103
|
-
const changesDir = getChangesDir(config.paths.openspecRoot, projectRoot);
|
|
104
96
|
const orphaned = [];
|
|
105
|
-
for (const
|
|
106
|
-
const name = path.basename(changeDir);
|
|
107
|
-
if (name === 'archive' || name.startsWith('_') || name.startsWith('.'))
|
|
108
|
-
continue;
|
|
97
|
+
for (const change of await listChanges(projectRoot, config, ['active'])) {
|
|
109
98
|
for (const lockDirName of ['running', 'locks']) {
|
|
110
|
-
const lockDir = path.join(
|
|
99
|
+
const lockDir = path.join(change.folderPath, '.run', lockDirName);
|
|
111
100
|
for (const file of await fs.readdir(lockDir).catch(() => [])) {
|
|
112
101
|
if (!file.endsWith('.pid'))
|
|
113
102
|
continue;
|
|
@@ -127,15 +116,14 @@ async function checkLocks(projectRoot, config) {
|
|
|
127
116
|
: make('locks', true, 'no orphaned locks');
|
|
128
117
|
}
|
|
129
118
|
async function checkArchives(projectRoot, config) {
|
|
130
|
-
const root = getArchiveDir(config.paths.openspecRoot, projectRoot);
|
|
131
119
|
const corrupt = [];
|
|
132
|
-
for (const
|
|
133
|
-
const hasProposal = (await exists(path.join(
|
|
134
|
-
(await exists(path.join(
|
|
135
|
-
const hasTasks = (await exists(path.join(
|
|
136
|
-
(await exists(path.join(
|
|
120
|
+
for (const change of await listChanges(projectRoot, config, ['archived'])) {
|
|
121
|
+
const hasProposal = (await exists(path.join(change.folderPath, 'proposal.md'))) ||
|
|
122
|
+
(await exists(path.join(change.folderPath, 'spec.md')));
|
|
123
|
+
const hasTasks = (await exists(path.join(change.folderPath, 'tasks'))) ||
|
|
124
|
+
(await exists(path.join(change.folderPath, 'tasks.md')));
|
|
137
125
|
if (!hasProposal || !hasTasks)
|
|
138
|
-
corrupt.push(path.relative(projectRoot,
|
|
126
|
+
corrupt.push(path.relative(projectRoot, change.folderPath));
|
|
139
127
|
}
|
|
140
128
|
return corrupt.length > 0
|
|
141
129
|
? make('archives', false, `invalid archive(s): ${corrupt.join(', ')}`)
|
|
@@ -143,13 +131,9 @@ async function checkArchives(projectRoot, config) {
|
|
|
143
131
|
}
|
|
144
132
|
/** Active change done markers must be automated (`scope_hash`) or manual. */
|
|
145
133
|
async function checkDoneMarkers(projectRoot, config) {
|
|
146
|
-
const changesDir = getChangesDir(config.paths.openspecRoot, projectRoot);
|
|
147
134
|
const invalid = [];
|
|
148
|
-
for (const
|
|
149
|
-
const
|
|
150
|
-
if (name === 'archive' || name.startsWith('_') || name.startsWith('.'))
|
|
151
|
-
continue;
|
|
152
|
-
const doneDir = path.join(changeDir, '.run', 'done');
|
|
135
|
+
for (const change of await listChanges(projectRoot, config, ['active'])) {
|
|
136
|
+
const doneDir = path.join(change.folderPath, '.run', 'done');
|
|
153
137
|
for (const marker of await fs.readdir(doneDir).catch(() => [])) {
|
|
154
138
|
const markerPath = path.join(doneDir, marker);
|
|
155
139
|
const { data } = parseFrontmatter(await fs.readFile(markerPath, 'utf8').catch(() => ''));
|
|
@@ -169,6 +153,7 @@ export async function runDoctorChecks(projectRoot, deps = {}) {
|
|
|
169
153
|
// A catalog entry may add checks for its own executable after a passing probe.
|
|
170
154
|
const diagnose = harness.check.ok ? findHarness(config.harness)?.diagnose : undefined;
|
|
171
155
|
const extra = diagnose ? await diagnose({ config, projectRoot, version: harness.version }) : [];
|
|
156
|
+
const decisionsCheck = await checkDecisions(projectRoot, config);
|
|
172
157
|
const checks = [
|
|
173
158
|
configCheck,
|
|
174
159
|
harness.check,
|
|
@@ -177,11 +162,16 @@ export async function runDoctorChecks(projectRoot, deps = {}) {
|
|
|
177
162
|
...(diagnosis.warning ? { warning: true } : {}),
|
|
178
163
|
})),
|
|
179
164
|
await checkManaged(projectRoot, config),
|
|
165
|
+
...(decisionsCheck ? [decisionsCheck] : []),
|
|
180
166
|
await checkLocks(projectRoot, config),
|
|
181
167
|
await checkArchives(projectRoot, config),
|
|
182
168
|
await checkDoneMarkers(projectRoot, config),
|
|
183
169
|
await checkValidator(projectRoot, deps),
|
|
170
|
+
...(await checkGit(projectRoot, config)),
|
|
184
171
|
];
|
|
172
|
+
const priceCheck = await checkPlanningPrices(projectRoot, config);
|
|
173
|
+
if (priceCheck)
|
|
174
|
+
checks.push(priceCheck);
|
|
185
175
|
return { ok: checks.every((check) => check.ok), checks };
|
|
186
176
|
}
|
|
187
177
|
//# sourceMappingURL=doctor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/core/foundation/doctor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/core/foundation/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAkB,UAAU,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAA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AO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAChD,CAAC,CAAC;QACH,MAAM,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC;QACvC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,MAAM,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC;QACrC,MAAM,aAAa,CAAC,WAAW,EAAE,MAAM,CAAC;QACxC,MAAM,gBAAgB,CAAC,WAAW,EAAE,MAAM,CAAC;QAC3C,MAAM,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC;QACvC,GAAG,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;KACzC,CAAC;IACF,MAAM,UAAU,GAAG,MAAM,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAClE,IAAI,UAAU;QAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxC,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;AAC3D,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as piConfig from './config-pi.js';
|
|
2
2
|
import type { OsqConfig } from './config.js';
|
|
3
3
|
/**
|
|
4
4
|
* Canonical, immutable catalog of first-party harness capabilities. Every
|
|
5
5
|
* shared consumer derives its harness knowledge from here, so adding a harness
|
|
6
6
|
* never means editing a generic workflow branch.
|
|
7
7
|
*/
|
|
8
|
-
export declare const HARNESS_NAMES: readonly ["agy", "opencode", "mock", "codex", "pi"];
|
|
8
|
+
export declare const HARNESS_NAMES: readonly ["agy", "opencode", "mock", "codex", "pi", "claude"];
|
|
9
9
|
export type HarnessName = (typeof HARNESS_NAMES)[number];
|
|
10
10
|
/** Where in {@link OsqConfig} a harness keeps its harness-specific settings. */
|
|
11
|
-
export type HarnessConfigKey = 'agy' | 'opencode' | 'codex' | 'pi';
|
|
11
|
+
export type HarnessConfigKey = 'agy' | 'opencode' | 'codex' | 'pi' | 'claude';
|
|
12
12
|
export interface PlannerCapability {
|
|
13
13
|
/** Whether `planner.agent` is a meaningful setting for this harness. */
|
|
14
14
|
readonly agent: boolean;
|
|
@@ -30,8 +30,10 @@ export interface HarnessCatalogEntry {
|
|
|
30
30
|
/** Applicable reasoning effort, or `null` when the harness has no such knob. */
|
|
31
31
|
readonly effort: (config: OsqConfig) => string | null;
|
|
32
32
|
readonly planner: PlannerCapability;
|
|
33
|
+
/** What the harness confines for this configuration, when the entry declares it. */
|
|
34
|
+
readonly containment?: (config: OsqConfig) => string;
|
|
33
35
|
/** Optional extra doctor checks run after a passing `harness` probe. */
|
|
34
|
-
readonly diagnose?: (context: HarnessDiagnoseContext) => Promise<readonly HarnessDiagnosis[]>;
|
|
36
|
+
readonly diagnose?: (context: piConfig.HarnessDiagnoseContext) => Promise<readonly piConfig.HarnessDiagnosis[]>;
|
|
35
37
|
}
|
|
36
38
|
/** Normalize arbitrary casing and surrounding whitespace to a lower-case name. */
|
|
37
39
|
export declare function normalizeHarnessName(name: string): string;
|
|
@@ -88,9 +90,6 @@ export declare function resolveCodexBinary(config?: Pick<OsqConfig, 'codex'>): s
|
|
|
88
90
|
export declare function resolveCodexModel(config?: Pick<OsqConfig, 'harness' | 'codex'>): string | undefined;
|
|
89
91
|
/** Resolve the Codex reasoning effort override, or `undefined` for native defaults. */
|
|
90
92
|
export declare function resolveCodexEffort(config?: Pick<OsqConfig, 'codex'>): string | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* Resolve the Pi execution model: explicit `pi.model`, then `OSQ_MODEL` only
|
|
93
|
-
* when Pi is the executor, otherwise `undefined` (Pi's native default).
|
|
94
|
-
*/
|
|
93
|
+
/** Resolve the Pi execution model with the selected-executor env fallback. */
|
|
95
94
|
export declare function resolvePiModel(config?: Pick<OsqConfig, 'harness' | 'pi'>): string | undefined;
|
|
96
95
|
//# sourceMappingURL=harness-catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness-catalog.d.ts","sourceRoot":"","sources":["../../../src/core/foundation/harness-catalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"harness-catalog.d.ts","sourceRoot":"","sources":["../../../src/core/foundation/harness-catalog.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,aAAa,+DAAgE,CAAC;AAE3F,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,gFAAgF;AAChF,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ,CAAC;AAE9E,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,mEAAmE;IACnE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IACtC,+EAA+E;IAC/E,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;IACzC,wEAAwE;IACxE,QAAQ,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,MAAM,GAAG,IAAI,CAAC;IAC1D,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,MAAM,G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,gBAAgB;IAC/B,OAAO,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,GAAG,gBAAgB,CAsB3E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,CAE9E;AAED,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAEtF;AAED,+DAA+D;AAC/D,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,CAEnF;AAED,sFAAsF;AACtF,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,CAE5E;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,GAC5C,MAAM,GAAG,SAAS,CAEpB;AAED,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAExF;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,SAAS,CAE7F"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { claudeContainment, diagnoseClaude, resolveClaudeBinary, resolveClaudeModel, } from './config-claude.js';
|
|
2
|
+
import { codexExecutable, codexModel } from './config-codex-resolve.js';
|
|
3
|
+
import { diagnoseOpencode } from './config-opencode.js';
|
|
4
|
+
import * as piConfig from './config-pi.js';
|
|
2
5
|
/**
|
|
3
6
|
* Canonical, immutable catalog of first-party harness capabilities. Every
|
|
4
7
|
* shared consumer derives its harness knowledge from here, so adding a harness
|
|
5
8
|
* never means editing a generic workflow branch.
|
|
6
9
|
*/
|
|
7
|
-
export const HARNESS_NAMES = ['agy', 'opencode', 'mock', 'codex', 'pi'];
|
|
10
|
+
export const HARNESS_NAMES = ['agy', 'opencode', 'mock', 'codex', 'pi', 'claude'];
|
|
8
11
|
const DEFINITIONS = {
|
|
9
12
|
agy: {
|
|
10
13
|
configKey: 'agy',
|
|
@@ -23,6 +26,7 @@ const DEFINITIONS = {
|
|
|
23
26
|
model: (config) => config.opencode?.model?.trim() || undefined,
|
|
24
27
|
effort: () => null,
|
|
25
28
|
planner: { agent: true, defaultAgent: 'osq-planner', briefModelWhenNative: '' },
|
|
29
|
+
diagnose: diagnoseOpencode,
|
|
26
30
|
},
|
|
27
31
|
mock: {
|
|
28
32
|
envModelWhenUnselected: false,
|
|
@@ -34,37 +38,29 @@ const DEFINITIONS = {
|
|
|
34
38
|
codex: {
|
|
35
39
|
configKey: 'codex',
|
|
36
40
|
envModelWhenUnselected: false,
|
|
37
|
-
executable:
|
|
38
|
-
|
|
39
|
-
if (explicit)
|
|
40
|
-
return explicit;
|
|
41
|
-
const fromEnv = process.env.CODEX_PATH?.trim();
|
|
42
|
-
if (fromEnv)
|
|
43
|
-
return fromEnv;
|
|
44
|
-
return 'codex';
|
|
45
|
-
},
|
|
46
|
-
model: (config) => {
|
|
47
|
-
const explicit = config.codex?.model?.trim();
|
|
48
|
-
if (explicit)
|
|
49
|
-
return explicit;
|
|
50
|
-
if (normalizeHarnessName(config.harness) === 'codex') {
|
|
51
|
-
const fromEnv = process.env.OSQ_MODEL?.trim();
|
|
52
|
-
if (fromEnv)
|
|
53
|
-
return fromEnv;
|
|
54
|
-
}
|
|
55
|
-
return undefined;
|
|
56
|
-
},
|
|
41
|
+
executable: codexExecutable,
|
|
42
|
+
model: (config) => codexModel(config, normalizeHarnessName(config.harness) === 'codex'),
|
|
57
43
|
effort: (config) => config.codex?.effort?.trim() || null,
|
|
58
44
|
planner: { agent: false, briefModelWhenNative: 'default' },
|
|
59
45
|
},
|
|
60
46
|
pi: {
|
|
61
47
|
configKey: 'pi',
|
|
62
48
|
envModelWhenUnselected: false,
|
|
63
|
-
executable: resolvePiBinary,
|
|
49
|
+
executable: piConfig.resolvePiBinary,
|
|
64
50
|
model: resolvePiModel,
|
|
65
|
-
effort: resolvePiEffort,
|
|
51
|
+
effort: piConfig.resolvePiEffort,
|
|
66
52
|
planner: { agent: false, briefModelWhenNative: 'default' },
|
|
67
|
-
diagnose: diagnosePi,
|
|
53
|
+
diagnose: piConfig.diagnosePi,
|
|
54
|
+
},
|
|
55
|
+
claude: {
|
|
56
|
+
configKey: 'claude',
|
|
57
|
+
envModelWhenUnselected: false,
|
|
58
|
+
executable: resolveClaudeBinary,
|
|
59
|
+
model: (config) => resolveClaudeModel(config, normalizeHarnessName(config.harness) === 'claude'),
|
|
60
|
+
effort: () => null,
|
|
61
|
+
planner: { agent: false, briefModelWhenNative: 'default' },
|
|
62
|
+
containment: claudeContainment,
|
|
63
|
+
diagnose: diagnoseClaude,
|
|
68
64
|
},
|
|
69
65
|
};
|
|
70
66
|
/** Normalize arbitrary casing and surrounding whitespace to a lower-case name. */
|
|
@@ -151,32 +147,21 @@ export function resolveAdapterModel(_adapterName, config) {
|
|
|
151
147
|
}
|
|
152
148
|
/** Resolve the Codex executable: explicit config, then `CODEX_PATH`, then `codex`. */
|
|
153
149
|
export function resolveCodexBinary(config) {
|
|
154
|
-
return
|
|
150
|
+
return codexExecutable(config);
|
|
155
151
|
}
|
|
156
152
|
/**
|
|
157
153
|
* Resolve the Codex execution model: explicit `codex.model`, then `OSQ_MODEL`
|
|
158
154
|
* only when Codex is the executor, otherwise `undefined` (native default).
|
|
159
155
|
*/
|
|
160
156
|
export function resolveCodexModel(config) {
|
|
161
|
-
return
|
|
157
|
+
return codexModel(config, normalizeHarnessName(config?.harness ?? '') === 'codex');
|
|
162
158
|
}
|
|
163
159
|
/** Resolve the Codex reasoning effort override, or `undefined` for native defaults. */
|
|
164
160
|
export function resolveCodexEffort(config) {
|
|
165
|
-
return
|
|
161
|
+
return config?.codex?.effort?.trim() || undefined;
|
|
166
162
|
}
|
|
167
|
-
/**
|
|
168
|
-
* Resolve the Pi execution model: explicit `pi.model`, then `OSQ_MODEL` only
|
|
169
|
-
* when Pi is the executor, otherwise `undefined` (Pi's native default).
|
|
170
|
-
*/
|
|
163
|
+
/** Resolve the Pi execution model with the selected-executor env fallback. */
|
|
171
164
|
export function resolvePiModel(config) {
|
|
172
|
-
|
|
173
|
-
if (explicit)
|
|
174
|
-
return explicit;
|
|
175
|
-
if (normalizeHarnessName(config?.harness ?? '') === 'pi') {
|
|
176
|
-
const fromEnv = process.env.OSQ_MODEL?.trim();
|
|
177
|
-
if (fromEnv)
|
|
178
|
-
return fromEnv;
|
|
179
|
-
}
|
|
180
|
-
return undefined;
|
|
165
|
+
return piConfig.resolvePiModel(config, normalizeHarnessName(config?.harness ?? '') === 'pi');
|
|
181
166
|
}
|
|
182
167
|
//# sourceMappingURL=harness-catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness-catalog.js","sourceRoot":"","sources":["../../../src/core/foundation/harness-catalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"harness-catalog.js","sourceRoot":"","sources":["../../../src/core/foundation/harness-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAA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OR_EXIT_LINES: readonly string[];
|
|
|
21
21
|
export declare const MANAGED_AGENTS_MD_BODY: string;
|
|
22
22
|
/** @deprecated use {@link MANAGED_AGENTS_MD_BODY}; alias kept for existing importers. */
|
|
23
23
|
export declare const MANAGED_AGENTS_BLOCK: string;
|
|
24
|
-
export declare const MANAGED_PLANNER_BLOCK = "<!-- OSQ:START -->\n## Planning a change\n\nYou write the change folder; a cheaper executor runs it one task at a time,\nsees only what you wrote, and reads it literally.\n\n### Interactive planning\n\nWhen a human is in the session:\n\n1. Read `AGENTS.md`, the capability specs this change touches, and one recent\n archived change end to end.\n2.
|
|
24
|
+
export declare const MANAGED_PLANNER_BLOCK = "<!-- OSQ:START -->\n## Planning a change\n\nYou write the change folder; a cheaper executor runs it one task at a time,\nsees only what you wrote, and reads it literally.\n\n### Interactive planning\n\nWhen a human is in the session:\n\n1. Read `AGENTS.md`, the capability specs this change touches, and one recent\n archived change end to end.\n2. Write the change folder. Stop after the task list only when the human asks to\n review it first; then reply with the parent spec, the task list (titles only),\n the capability specs this change will write, and any `## Human steps`, and say\n the change folder is not written yet.\n\n### Working from the handoff\n\nWhen `osq plan` started you, `plan-prompt.md` in the selected change folder is\nyour complete prompt; read it and follow it exactly.\n\n### Either way\n\n- Write only inside that change folder.\n- Run `osq lint <slug>` and fix every finding before you finish.\n- Never run `osq approve`; a human owns that gate.\n- Finish by telling the human, in chat, the task titles, that the change folder\n is written and `osq lint` passes, and the exact `osq approve <id>` to run. The\n human should not approve before that message.\n- Grep for what already exists; verify every version, flag, or API before use.\n- Write files with the file tool, never through a shell echo.\n\n### Tasks\n\n- One task per coherent unit. Title is \"When X, Y\".\n- Every task names its `scope` and `verify` (no TTY, no network). A task that changes a preexisting\n test sets `tests.modify: true` and lists that test in `scope`; every other preexisting test is\n frozen. `osq lint` enforces the configured limits on scope patterns and acceptance lines.\n- `osq init` and `osq new` seed `verify: node -e \"process.exit(0)\"` as a\n planning sentinel, not trusted coverage. `osq lint` rejects it; replace it\n before approval with a command that verifies the completed change's final tree.\n- Every task's `verify` exercises its slice through the real entry point, wiring included. If closing\n the loop requires a file outside the task's `scope`, the scope is wrong; widen it or merge the task.\n An executor result that says the work is outside its scope is a planning failure.\n- Every task's `verify` must stay re-runnable against the final tree of the\n completed change, because the watcher and archive recertification run it there after\n later tasks land. A command that passes only mid-change is a planning failure.\n- By default the watcher also runs the change-level `verify` after each task, and\n a red result kills that task. Every task must leave it green; tasks that pass\n only together are one task.\n- The watcher runs each task's `verify` once before the first attempt and expects\n it to fail. A task whose `verify` should already pass before any change, such as\n a refactor, declares `verify_starts: green`. A task whose `verify` names a test\n the task creates declares `verify_starts: red`; a new test file may share that\n verify with existing tests. `any` is only for a task that can honestly start\n either way.\n- A file belongs to one task. Before each later task, the watcher re-hashes the\n resolved `scope` of every done task. When a later task must extend a file,\n order that later task after the owner, put the file in its `scope` too, and\n name the shared file in the proposal; the watcher then recertifies the owner\n by itself when the owner's `verify` still passes. Any other change to a done\n task's files halts the change until a human runs `osq retry`. Globs resolve again\n at every audit, so a broad glob also captures files that later tasks create.\n- Task bodies carry acceptance lines and the names of existing code to reuse,\n without signature blocks, numbered implementation steps, or line numbers. Write\n full signatures only for ports.\n- Refer to functions and files by name, never by line number.\n\n### Parent spec\n\n- `## Goal`, then the change-level `verify` every proposal declares as the first\n thing written after the goal, then `## Non-goals` and the contract as\n requirements with scenarios.\n- `## Surface` follows `## Non-goals` and lists the user-facing names the change\n adds, changes, or removes: commands, flags, config keys, frontmatter fields,\n document sections, dead reasons, and event types. Write `None` when there are\n none; `osq lint` rejects a proposal without the section.\n- `## Decisions` follows `## Surface`. Give one line per accepted ADR that\n governs a capability the change writes, saying what it means for this\n change, such as `ADR 009: the adapter is the only module that imports\n dockerode.` Name a system-wide ADR only to depart from it; AGENTS.md already\n carries its rule. A departure line starts `Departs from ADR <n>:` and gives\n the reason; a needed departure is a reason for a new ADR. Write `None` when\n no ADR governs the change. Repeat a rule in a task only when that task\n touches the area.\n- The delta is the exact text the capability spec will contain after the change,\n never an instruction to update something.\n- Anything a task must not do itself goes under `## Human steps`, which never\n includes `osq approve`.\n- Split `## Human steps` into `### Before approval` and `### After landing`, and\n write `None` under one with no steps. A step during the run, such as an\n expected `osq retry`, goes under Before approval. After-landing steps, or\n `check: <command>` in the proposal frontmatter, keep the change verification\n pending after it lands, and its dependents wait, until a human runs\n `osq verified <id> --passed` or `--failed`.\n- Guidance a task needs about another capability's code, such as how to test\n against it, goes into that capability's spec through a delta, not only into the\n task.\n- Replacing a requirement's behavior is a REMOVED requirement plus an ADDED one.\n A MODIFIED requirement must keep every scenario it already has; `osq lint` and\n archive refuse one that drops any.\n<!-- OSQ:END -->";
|
|
25
25
|
/**
|
|
26
26
|
* Canonical `.claude/commands/osq-plan.md` body. Claude expands `$ARGUMENTS`
|
|
27
27
|
* with the slug the author passes, so the command resolves the change folder
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-blocks.d.ts","sourceRoot":"","sources":["../../../src/core/foundation/init-blocks.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,cAAc,qBAAqB,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAQ3C,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"init-blocks.d.ts","sourceRoot":"","sources":["../../../src/core/foundation/init-blocks.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,cAAc,qBAAqB,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAQ3C,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAmB/E,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAQhD,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAyBjB,CAAC;AAEnB,yFAAyF;AACzF,eAAO,MAAM,oBAAoB,QAAyB,CAAC;AAE3D,eAAO,MAAM,qBAAqB,+5LAsGhB,CAAC;AAEnB;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,qWAStB,CAAC;AAEnB,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,QAAkD,CAAC"}
|
|
@@ -7,8 +7,8 @@ export const OSQ_END_MARKER = '<!-- OSQ:END -->';
|
|
|
7
7
|
*/
|
|
8
8
|
export const EXECUTOR_STEPS = [
|
|
9
9
|
'1. Read your task file, its parent `proposal.md`, then only the delta specs and capability specs it names. Nothing else.',
|
|
10
|
-
|
|
11
|
-
"3. Read a previous result file for this task if present. Run the task's `verify`. Start from what fails.",
|
|
10
|
+
"2. Can't finish within your task's `scope`, or too big for one pass? Write what you need under `## Blocked` in `.run/results/<n>.md`, and exit without code.",
|
|
11
|
+
"3. Read a previous result file for this task if present. Run the task's `verify`. Start from what fails. A `verify` that names a file your task creates fails until that file exists, so starting red is expected.",
|
|
12
12
|
'4. Tests for each acceptance line before implementing.',
|
|
13
13
|
"5. Minimal code to pass. Write only `.run/results/<n>.md` and files inside the task's `scope`; the task's `scope` wins over any other ownership rule you were given.",
|
|
14
14
|
'6. New test files are always allowed. Change a preexisting test only when the task sets `tests.modify: true` and the file is inside `scope`; any other test change kills the task.',
|
|
@@ -17,10 +17,21 @@ export const EXECUTOR_STEPS = [
|
|
|
17
17
|
/** The result-file headings and their purposes, in the order they must appear. */
|
|
18
18
|
export const RESULT_HEADINGS = [
|
|
19
19
|
{ heading: '## Changed', purpose: 'what you changed.' },
|
|
20
|
-
{
|
|
20
|
+
{
|
|
21
|
+
heading: '## Deviated',
|
|
22
|
+
purpose: 'for the reviewer: what you did differently from the task, and why.',
|
|
23
|
+
},
|
|
21
24
|
{
|
|
22
25
|
heading: '## Missing context',
|
|
23
|
-
purpose: '
|
|
26
|
+
purpose: 'for the planner: what the task lacked that you needed.',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
heading: '## Outside scope',
|
|
30
|
+
purpose: 'for the human: what you found broken outside your scope and left alone.',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
heading: '## Blocked',
|
|
34
|
+
purpose: 'for the human: what you need before this task can be finished within its scope.',
|
|
24
35
|
},
|
|
25
36
|
{ heading: '## Next', purpose: 'for unfinished work, the acceptance line to pick up next.' },
|
|
26
37
|
];
|
|
@@ -55,7 +66,7 @@ ${EXECUTOR_EXIT_LINES.join('\n')}
|
|
|
55
66
|
|
|
56
67
|
- Living capability specs live under \`openspec/specs/\` as \`<capability>/spec.md\`. Never edit them; the watcher applies approved deltas at archive.
|
|
57
68
|
- In-flight changes live under \`openspec/changes/<id>-<slug>/\`: \`proposal.md\`, delta specs as \`specs/<capability>/spec.md\`, and one \`tasks/<n>.md\` per task.
|
|
58
|
-
- \`tasks.md\`
|
|
69
|
+
- Executors never edit \`tasks.md\` or any file under \`.run/\` except their result file; those belong to the watcher and the human. Planners write \`tasks.md\` and the task files.
|
|
59
70
|
- Approval gate: only \`osq approve\`, run by a human, writes \`.run/approved\`. Verification gate: only the watcher's own \`verify\` run marks a task done.
|
|
60
71
|
|
|
61
72
|
## Planning a change
|
|
@@ -80,9 +91,10 @@ When a human is in the session:
|
|
|
80
91
|
|
|
81
92
|
1. Read \`AGENTS.md\`, the capability specs this change touches, and one recent
|
|
82
93
|
archived change end to end.
|
|
83
|
-
2.
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
2. Write the change folder. Stop after the task list only when the human asks to
|
|
95
|
+
review it first; then reply with the parent spec, the task list (titles only),
|
|
96
|
+
the capability specs this change will write, and any \`## Human steps\`, and say
|
|
97
|
+
the change folder is not written yet.
|
|
86
98
|
|
|
87
99
|
### Working from the handoff
|
|
88
100
|
|
|
@@ -94,6 +106,9 @@ your complete prompt; read it and follow it exactly.
|
|
|
94
106
|
- Write only inside that change folder.
|
|
95
107
|
- Run \`osq lint <slug>\` and fix every finding before you finish.
|
|
96
108
|
- Never run \`osq approve\`; a human owns that gate.
|
|
109
|
+
- Finish by telling the human, in chat, the task titles, that the change folder
|
|
110
|
+
is written and \`osq lint\` passes, and the exact \`osq approve <id>\` to run. The
|
|
111
|
+
human should not approve before that message.
|
|
97
112
|
- Grep for what already exists; verify every version, flag, or API before use.
|
|
98
113
|
- Write files with the file tool, never through a shell echo.
|
|
99
114
|
|
|
@@ -122,11 +137,12 @@ your complete prompt; read it and follow it exactly.
|
|
|
122
137
|
verify with existing tests. \`any\` is only for a task that can honestly start
|
|
123
138
|
either way.
|
|
124
139
|
- A file belongs to one task. Before each later task, the watcher re-hashes the
|
|
125
|
-
resolved \`scope\` of every done task
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
140
|
+
resolved \`scope\` of every done task. When a later task must extend a file,
|
|
141
|
+
order that later task after the owner, put the file in its \`scope\` too, and
|
|
142
|
+
name the shared file in the proposal; the watcher then recertifies the owner
|
|
143
|
+
by itself when the owner's \`verify\` still passes. Any other change to a done
|
|
144
|
+
task's files halts the change until a human runs \`osq retry\`. Globs resolve again
|
|
145
|
+
at every audit, so a broad glob also captures files that later tasks create.
|
|
130
146
|
- Task bodies carry acceptance lines and the names of existing code to reuse,
|
|
131
147
|
without signature blocks, numbered implementation steps, or line numbers. Write
|
|
132
148
|
full signatures only for ports.
|
|
@@ -141,9 +157,30 @@ your complete prompt; read it and follow it exactly.
|
|
|
141
157
|
adds, changes, or removes: commands, flags, config keys, frontmatter fields,
|
|
142
158
|
document sections, dead reasons, and event types. Write \`None\` when there are
|
|
143
159
|
none; \`osq lint\` rejects a proposal without the section.
|
|
160
|
+
- \`## Decisions\` follows \`## Surface\`. Give one line per accepted ADR that
|
|
161
|
+
governs a capability the change writes, saying what it means for this
|
|
162
|
+
change, such as \`ADR 009: the adapter is the only module that imports
|
|
163
|
+
dockerode.\` Name a system-wide ADR only to depart from it; AGENTS.md already
|
|
164
|
+
carries its rule. A departure line starts \`Departs from ADR <n>:\` and gives
|
|
165
|
+
the reason; a needed departure is a reason for a new ADR. Write \`None\` when
|
|
166
|
+
no ADR governs the change. Repeat a rule in a task only when that task
|
|
167
|
+
touches the area.
|
|
144
168
|
- The delta is the exact text the capability spec will contain after the change,
|
|
145
169
|
never an instruction to update something.
|
|
146
|
-
- Anything a task must not do itself goes under \`## Human steps
|
|
170
|
+
- Anything a task must not do itself goes under \`## Human steps\`, which never
|
|
171
|
+
includes \`osq approve\`.
|
|
172
|
+
- Split \`## Human steps\` into \`### Before approval\` and \`### After landing\`, and
|
|
173
|
+
write \`None\` under one with no steps. A step during the run, such as an
|
|
174
|
+
expected \`osq retry\`, goes under Before approval. After-landing steps, or
|
|
175
|
+
\`check: <command>\` in the proposal frontmatter, keep the change verification
|
|
176
|
+
pending after it lands, and its dependents wait, until a human runs
|
|
177
|
+
\`osq verified <id> --passed\` or \`--failed\`.
|
|
178
|
+
- Guidance a task needs about another capability's code, such as how to test
|
|
179
|
+
against it, goes into that capability's spec through a delta, not only into the
|
|
180
|
+
task.
|
|
181
|
+
- Replacing a requirement's behavior is a REMOVED requirement plus an ADDED one.
|
|
182
|
+
A MODIFIED requirement must keep every scenario it already has; \`osq lint\` and
|
|
183
|
+
archive refuse one that drops any.
|
|
147
184
|
${OSQ_END_MARKER}`;
|
|
148
185
|
/**
|
|
149
186
|
* Canonical `.claude/commands/osq-plan.md` body. Claude expands `$ARGUMENTS`
|