@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
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { DEFAULT_CONFIG } from '../foundation/config.js';
|
|
4
|
+
import { readManifestApprovedAt } from '../run/manifest-approval.js';
|
|
4
5
|
import { parseFrontmatter, parseTaskMd } from '../spec/parser.js';
|
|
5
|
-
import {
|
|
6
|
+
import { changeTrees, listChanges } from '../status/change-locations.js';
|
|
6
7
|
import { readQueueReport } from '../status/queue-report.js';
|
|
7
8
|
import { compareNumericPrefix, deriveSpecState } from '../status/state.js';
|
|
8
9
|
import { collectApprovalFlagOutcomes, formatApprovalFlagOutcomes, } from './approval-flags.js';
|
|
10
|
+
import { readBriefToApprovalSeconds } from './brief-to-approval.js';
|
|
9
11
|
import { buildPlanningComparison, computePlanningByChange, } from './planning-economics.js';
|
|
10
12
|
import { readPlanningSessions } from './planning.js';
|
|
13
|
+
import { collectDisclosures, formatDisclosures, } from './record-disclosures.js';
|
|
14
|
+
import { collectCostBySource, formatPlanningCostBySource, } from './record-estimates.js';
|
|
15
|
+
import { collectRework, formatRework } from './record-rework.js';
|
|
16
|
+
import { collectVerificationCounts, formatVerificationCounts, } from './record-verification.js';
|
|
17
|
+
import { collectDependencies, formatDependencies, } from './report-dependencies.js';
|
|
11
18
|
import { asData, eventTimestampMs, observeAttempts, observeTaskStream, parseEventLines, parseTokenEvent, } from './report-events.js';
|
|
19
|
+
import { collectMutationScores, formatMutation, } from './report-mutation.js';
|
|
12
20
|
import { observePreSpawnEvents } from './report-pre-spawn.js';
|
|
13
21
|
import { addRetryHistory, emptyRetryHistory, observeRetries, } from './report-retries.js';
|
|
22
|
+
import { collectTraceabilityGaps, formatTraceability, } from './report-traceability.js';
|
|
23
|
+
import { taskScopeSize } from './scope-size.js';
|
|
14
24
|
export function formatDuration(ms) {
|
|
15
25
|
if (ms <= 0)
|
|
16
26
|
return '0s';
|
|
@@ -123,7 +133,7 @@ async function readTaskMetadata(folderPath, taskNumber) {
|
|
|
123
133
|
* start-to-end pairs and is null when no pair completes.
|
|
124
134
|
*/
|
|
125
135
|
function deriveMeasuredTask(change, task, events) {
|
|
126
|
-
let
|
|
136
|
+
let startScopeFiles = null;
|
|
127
137
|
let scopeResolver;
|
|
128
138
|
let pendingStartMs = null;
|
|
129
139
|
let coveredMs = 0;
|
|
@@ -134,11 +144,11 @@ function deriveMeasuredTask(change, task, events) {
|
|
|
134
144
|
const data = asData(event);
|
|
135
145
|
if (data?.phase === 'start') {
|
|
136
146
|
const rawScopeFiles = data.scopeFiles;
|
|
137
|
-
if (
|
|
147
|
+
if (startScopeFiles === null &&
|
|
138
148
|
typeof rawScopeFiles === 'number' &&
|
|
139
149
|
Number.isFinite(rawScopeFiles) &&
|
|
140
150
|
rawScopeFiles >= 0) {
|
|
141
|
-
|
|
151
|
+
startScopeFiles = rawScopeFiles;
|
|
142
152
|
scopeResolver = data.scopeResolver;
|
|
143
153
|
}
|
|
144
154
|
pendingStartMs = eventTimestampMs(event);
|
|
@@ -152,14 +162,14 @@ function deriveMeasuredTask(change, task, events) {
|
|
|
152
162
|
pendingStartMs = null;
|
|
153
163
|
}
|
|
154
164
|
}
|
|
155
|
-
if (
|
|
165
|
+
if (startScopeFiles === null)
|
|
156
166
|
return null;
|
|
157
167
|
const { attempts, firstAttemptPass } = observeAttempts(events);
|
|
158
168
|
return {
|
|
159
169
|
change,
|
|
160
170
|
task,
|
|
161
171
|
scopeResolver,
|
|
162
|
-
scopeFiles,
|
|
172
|
+
scopeFiles: taskScopeSize(events, startScopeFiles),
|
|
163
173
|
attempts,
|
|
164
174
|
firstAttemptPass,
|
|
165
175
|
durationSeconds: hasDuration ? coveredMs / 1000 : null,
|
|
@@ -304,45 +314,16 @@ function formatSizeBucketLines(rows) {
|
|
|
304
314
|
}
|
|
305
315
|
return lines;
|
|
306
316
|
}
|
|
307
|
-
/**
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
const ms = value.getTime();
|
|
312
|
-
return Number.isFinite(ms) ? ms : null;
|
|
313
|
-
}
|
|
314
|
-
if (typeof value !== 'string')
|
|
315
|
-
return null;
|
|
316
|
-
const trimmed = value.trim();
|
|
317
|
-
if (!trimmed)
|
|
318
|
-
return null;
|
|
319
|
-
const ms = Date.parse(trimmed);
|
|
320
|
-
return Number.isFinite(ms) ? ms : null;
|
|
321
|
-
}
|
|
322
|
-
/** Brief frontmatter date in milliseconds, or null when missing or invalid. */
|
|
323
|
-
async function readBriefDateMs(folderPath) {
|
|
324
|
-
const content = await fs.readFile(path.join(folderPath, 'brief.md'), 'utf8').catch(() => null);
|
|
325
|
-
if (content === null)
|
|
326
|
-
return null;
|
|
327
|
-
return parseBriefDateMs(parseFrontmatter(content).data);
|
|
328
|
-
}
|
|
329
|
-
/** Manifest `approvedAt` in milliseconds, or null when missing or invalid. */
|
|
317
|
+
/**
|
|
318
|
+
* Trusted manifest `approvedAt` in milliseconds: the value counts only when the
|
|
319
|
+
* change folder holds `.run/approved`. Null when missing, untrusted, or invalid.
|
|
320
|
+
*/
|
|
330
321
|
async function readApprovedAtMs(folderPath) {
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
.catch(() => null);
|
|
334
|
-
if (content === null)
|
|
322
|
+
const approvedAt = await readManifestApprovedAt(folderPath);
|
|
323
|
+
if (approvedAt === null)
|
|
335
324
|
return null;
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
if (typeof parsed.approvedAt !== 'string')
|
|
339
|
-
return null;
|
|
340
|
-
const ms = Date.parse(parsed.approvedAt);
|
|
341
|
-
return Number.isFinite(ms) ? ms : null;
|
|
342
|
-
}
|
|
343
|
-
catch {
|
|
344
|
-
return null;
|
|
345
|
-
}
|
|
325
|
+
const ms = Date.parse(approvedAt);
|
|
326
|
+
return Number.isFinite(ms) ? ms : null;
|
|
346
327
|
}
|
|
347
328
|
/**
|
|
348
329
|
* Earliest `started` event timestamp across numeric `<n>.jsonl` task streams.
|
|
@@ -455,62 +436,78 @@ function aggregatePhase(rows, key) {
|
|
|
455
436
|
};
|
|
456
437
|
}
|
|
457
438
|
export async function getMetricsReport(projectRoot, config = DEFAULT_CONFIG) {
|
|
458
|
-
|
|
459
|
-
let
|
|
460
|
-
let
|
|
439
|
+
const [tree] = await changeTrees(projectRoot, config);
|
|
440
|
+
let specsDir = tree.changesDir;
|
|
441
|
+
let archiveDir = tree.archiveDir;
|
|
442
|
+
let rejectedDir = tree.rejectedDir;
|
|
461
443
|
const specsDirStat = await fs.stat(specsDir).catch(() => null);
|
|
462
444
|
const archiveDirStat = await fs.stat(archiveDir).catch(() => null);
|
|
445
|
+
let legacy = false;
|
|
463
446
|
if (!specsDirStat && !archiveDirStat) {
|
|
464
447
|
const legacySpecs = path.join(projectRoot, 'specs');
|
|
465
448
|
const legacyArchive = path.join(projectRoot, 'specs', 'archive');
|
|
466
449
|
const legacySpecsStat = await fs.stat(legacySpecs).catch(() => null);
|
|
467
450
|
const legacyArchiveStat = await fs.stat(legacyArchive).catch(() => null);
|
|
468
451
|
if (legacySpecsStat || legacyArchiveStat) {
|
|
452
|
+
legacy = true;
|
|
469
453
|
specsDir = legacySpecs;
|
|
470
454
|
archiveDir = legacyArchive;
|
|
471
455
|
rejectedDir = path.join(legacySpecs, 'rejected');
|
|
472
456
|
}
|
|
473
457
|
}
|
|
474
|
-
// 1. Identify active specs
|
|
475
|
-
let activeEntries = [];
|
|
476
|
-
try {
|
|
477
|
-
activeEntries = await fs.readdir(specsDir);
|
|
478
|
-
}
|
|
479
|
-
catch {
|
|
480
|
-
activeEntries = [];
|
|
481
|
-
}
|
|
482
|
-
const archiveRel = path.relative(specsDir, archiveDir);
|
|
483
|
-
const archiveFolder = !archiveRel.startsWith('..') && !path.isAbsolute(archiveRel)
|
|
484
|
-
? archiveRel.split(path.sep)[0]
|
|
485
|
-
: 'archive';
|
|
486
|
-
const rejectedRel = path.relative(specsDir, rejectedDir);
|
|
487
|
-
const rejectedFolder = !rejectedRel.startsWith('..') && !path.isAbsolute(rejectedRel)
|
|
488
|
-
? rejectedRel.split(path.sep)[0]
|
|
489
|
-
: 'rejected';
|
|
490
|
-
const candidateActive = activeEntries.filter((e) => !e.startsWith('_') && !e.startsWith('.') && e !== archiveFolder && e !== rejectedFolder);
|
|
491
458
|
const activeFolders = [];
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
459
|
+
const archivedFolders = [];
|
|
460
|
+
let rejectedFolders = [];
|
|
461
|
+
if (legacy) {
|
|
462
|
+
// 1. Identify active specs
|
|
463
|
+
let activeEntries = [];
|
|
464
|
+
try {
|
|
465
|
+
activeEntries = await fs.readdir(specsDir);
|
|
497
466
|
}
|
|
467
|
+
catch {
|
|
468
|
+
activeEntries = [];
|
|
469
|
+
}
|
|
470
|
+
const archiveRel = path.relative(specsDir, archiveDir);
|
|
471
|
+
const archiveFolder = !archiveRel.startsWith('..') && !path.isAbsolute(archiveRel)
|
|
472
|
+
? archiveRel.split(path.sep)[0]
|
|
473
|
+
: 'archive';
|
|
474
|
+
const rejectedRel = path.relative(specsDir, rejectedDir);
|
|
475
|
+
const rejectedFolder = !rejectedRel.startsWith('..') && !path.isAbsolute(rejectedRel)
|
|
476
|
+
? rejectedRel.split(path.sep)[0]
|
|
477
|
+
: 'rejected';
|
|
478
|
+
const candidateActive = activeEntries.filter((e) => !e.startsWith('_') && !e.startsWith('.') && e !== archiveFolder && e !== rejectedFolder);
|
|
479
|
+
for (const folder of candidateActive) {
|
|
480
|
+
const fullPath = path.join(specsDir, folder);
|
|
481
|
+
const stat = await fs.stat(fullPath).catch(() => null);
|
|
482
|
+
if (stat?.isDirectory())
|
|
483
|
+
activeFolders.push(fullPath);
|
|
484
|
+
}
|
|
485
|
+
// 2. Identify archived specs
|
|
486
|
+
let archiveEntries = [];
|
|
487
|
+
try {
|
|
488
|
+
archiveEntries = await fs.readdir(archiveDir);
|
|
489
|
+
}
|
|
490
|
+
catch {
|
|
491
|
+
archiveEntries = [];
|
|
492
|
+
}
|
|
493
|
+
for (const folder of archiveEntries) {
|
|
494
|
+
if (folder.startsWith('_') || folder.startsWith('.'))
|
|
495
|
+
continue;
|
|
496
|
+
const fullPath = path.join(archiveDir, folder);
|
|
497
|
+
const stat = await fs.stat(fullPath).catch(() => null);
|
|
498
|
+
if (stat?.isDirectory())
|
|
499
|
+
archivedFolders.push(fullPath);
|
|
500
|
+
}
|
|
501
|
+
rejectedFolders = await listRejectedFolders(rejectedDir);
|
|
498
502
|
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
const candidateArchived = archiveEntries.filter((e) => !e.startsWith('_') && !e.startsWith('.'));
|
|
508
|
-
const archivedFolders = [];
|
|
509
|
-
for (const folder of candidateArchived) {
|
|
510
|
-
const fullPath = path.join(archiveDir, folder);
|
|
511
|
-
const stat = await fs.stat(fullPath).catch(() => null);
|
|
512
|
-
if (stat?.isDirectory()) {
|
|
513
|
-
archivedFolders.push(fullPath);
|
|
503
|
+
else {
|
|
504
|
+
for (const change of await listChanges(projectRoot, config)) {
|
|
505
|
+
if (change.location === 'active')
|
|
506
|
+
activeFolders.push(change.folderPath);
|
|
507
|
+
else if (change.location === 'archived')
|
|
508
|
+
archivedFolders.push(change.folderPath);
|
|
509
|
+
else
|
|
510
|
+
rejectedFolders.push(change.folderPath);
|
|
514
511
|
}
|
|
515
512
|
}
|
|
516
513
|
const allSpecFolders = [...activeFolders, ...archivedFolders];
|
|
@@ -519,7 +516,7 @@ export async function getMetricsReport(projectRoot, config = DEFAULT_CONFIG) {
|
|
|
519
516
|
// other aggregate. A folder counts once, only with a valid `rejected` event.
|
|
520
517
|
let rejectionTotal = 0;
|
|
521
518
|
const rejectionsByPlanner = {};
|
|
522
|
-
for (const folderPath of
|
|
519
|
+
for (const folderPath of rejectedFolders) {
|
|
523
520
|
if (!(await hasRejectedEvent(folderPath)))
|
|
524
521
|
continue;
|
|
525
522
|
rejectionTotal++;
|
|
@@ -637,6 +634,7 @@ export async function getMetricsReport(projectRoot, config = DEFAULT_CONFIG) {
|
|
|
637
634
|
let scopeVerificationPassed = 0;
|
|
638
635
|
let scopeVerificationFailed = 0;
|
|
639
636
|
let scopeRecertifiedByHuman = 0;
|
|
637
|
+
let scopeRecertifiedAutomatically = 0;
|
|
640
638
|
let scopeRequeuedForAgent = 0;
|
|
641
639
|
let withEventsCount = 0;
|
|
642
640
|
let withoutEventsCount = 0;
|
|
@@ -688,6 +686,7 @@ export async function getMetricsReport(projectRoot, config = DEFAULT_CONFIG) {
|
|
|
688
686
|
scopeVerificationPassed += observation.scopeVerificationPassed;
|
|
689
687
|
scopeVerificationFailed += observation.scopeVerificationFailed;
|
|
690
688
|
scopeRecertifiedByHuman += observation.scopeRecertifiedByHuman;
|
|
689
|
+
scopeRecertifiedAutomatically += observation.scopeRecertifiedAutomatically;
|
|
691
690
|
scopeRequeuedForAgent += observation.scopeRequeuedForAgent;
|
|
692
691
|
attemptsByTask[task.id] = taskAttempts;
|
|
693
692
|
if (taskAttempts > 1)
|
|
@@ -872,11 +871,10 @@ export async function getMetricsReport(projectRoot, config = DEFAULT_CONFIG) {
|
|
|
872
871
|
const cycleRows = [];
|
|
873
872
|
for (const folderPath of archivedFolders) {
|
|
874
873
|
const change = path.basename(folderPath);
|
|
875
|
-
const briefMs = await readBriefDateMs(folderPath);
|
|
876
874
|
const approvedMs = await readApprovedAtMs(folderPath);
|
|
877
875
|
const firstStartMs = await readFirstTaskStartMs(folderPath);
|
|
878
876
|
const archivedMs = await readArchivedAtMs(folderPath);
|
|
879
|
-
const briefToApprovalSeconds =
|
|
877
|
+
const briefToApprovalSeconds = await readBriefToApprovalSeconds(folderPath);
|
|
880
878
|
const approvalToFirstTaskSeconds = phaseSeconds(approvedMs, firstStartMs);
|
|
881
879
|
const firstTaskToArchiveSeconds = phaseSeconds(firstStartMs, archivedMs);
|
|
882
880
|
const totalSeconds = briefToApprovalSeconds !== null &&
|
|
@@ -909,7 +907,14 @@ export async function getMetricsReport(projectRoot, config = DEFAULT_CONFIG) {
|
|
|
909
907
|
const formattedTotal = formatDuration(totalDurationMs);
|
|
910
908
|
const formattedAvg = formatDuration(avgDurationMs);
|
|
911
909
|
const queue = await readQueueReport(projectRoot, config);
|
|
912
|
-
const
|
|
910
|
+
const rework = await collectRework(allSpecFolders);
|
|
911
|
+
const approvalFlags = await collectApprovalFlagOutcomes(allSpecFolders, rework);
|
|
912
|
+
const disclosures = await collectDisclosures(allSpecFolders);
|
|
913
|
+
const dependencies = await collectDependencies(allSpecFolders);
|
|
914
|
+
const verification = await collectVerificationCounts(archivedFolders);
|
|
915
|
+
const planningCostBySource = await collectCostBySource(allSpecFolders, config.planning?.prices);
|
|
916
|
+
const traceability = await collectTraceabilityGaps(projectRoot, config);
|
|
917
|
+
const mutation = await collectMutationScores(allSpecFolders, config);
|
|
913
918
|
const measuredTasks = await projectMeasuredTasks(allSpecFolders);
|
|
914
919
|
const sizes = {
|
|
915
920
|
scopeFileSeries: deriveScopeFileSeries(measuredTasks),
|
|
@@ -984,8 +989,13 @@ export async function getMetricsReport(projectRoot, config = DEFAULT_CONFIG) {
|
|
|
984
989
|
verificationPassedAtDetection: scopeVerificationPassed,
|
|
985
990
|
verificationFailedAtDetection: scopeVerificationFailed,
|
|
986
991
|
recertifiedByHuman: scopeRecertifiedByHuman,
|
|
992
|
+
recertifiedAutomatically: scopeRecertifiedAutomatically,
|
|
987
993
|
requeuedForAgent: scopeRequeuedForAgent,
|
|
988
994
|
},
|
|
995
|
+
rework,
|
|
996
|
+
disclosures,
|
|
997
|
+
...(dependencies.length > 0 ? { dependencies } : {}),
|
|
998
|
+
...(verification ? { verification } : {}),
|
|
989
999
|
},
|
|
990
1000
|
coverage: {
|
|
991
1001
|
withEvents: withEventsCount,
|
|
@@ -1034,6 +1044,7 @@ export async function getMetricsReport(projectRoot, config = DEFAULT_CONFIG) {
|
|
|
1034
1044
|
total: planningCost,
|
|
1035
1045
|
formattedTotal: formatReportedCost(planningCost, planningCostReportedSessions),
|
|
1036
1046
|
provenance: 'harness-reported',
|
|
1047
|
+
bySource: planningCostBySource,
|
|
1037
1048
|
},
|
|
1038
1049
|
coverage: {
|
|
1039
1050
|
reportedSessions: planningReportedSessions,
|
|
@@ -1043,6 +1054,8 @@ export async function getMetricsReport(projectRoot, config = DEFAULT_CONFIG) {
|
|
|
1043
1054
|
comparison: planningComparison,
|
|
1044
1055
|
},
|
|
1045
1056
|
queue,
|
|
1057
|
+
...(traceability ? { traceability } : {}),
|
|
1058
|
+
...(mutation ? { mutation } : {}),
|
|
1046
1059
|
};
|
|
1047
1060
|
}
|
|
1048
1061
|
/**
|
|
@@ -1057,25 +1070,9 @@ function numericPrefix(name) {
|
|
|
1057
1070
|
const match = name.match(/^(\d+)/);
|
|
1058
1071
|
return match ? Number.parseInt(match[1], 10) : null;
|
|
1059
1072
|
}
|
|
1060
|
-
/**
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
try {
|
|
1064
|
-
entries = await fs.readdir(archiveDir);
|
|
1065
|
-
}
|
|
1066
|
-
catch {
|
|
1067
|
-
return [];
|
|
1068
|
-
}
|
|
1069
|
-
const folders = [];
|
|
1070
|
-
for (const entry of entries) {
|
|
1071
|
-
if (entry.startsWith('.') || entry.startsWith('_'))
|
|
1072
|
-
continue;
|
|
1073
|
-
const fullPath = path.join(archiveDir, entry);
|
|
1074
|
-
const stat = await fs.stat(fullPath).catch(() => null);
|
|
1075
|
-
if (stat?.isDirectory())
|
|
1076
|
-
folders.push(fullPath);
|
|
1077
|
-
}
|
|
1078
|
-
folders.sort((a, b) => {
|
|
1073
|
+
/** Newest archived folders first by numeric prefix, capped at `limit`. */
|
|
1074
|
+
function listRecentArchiveFolders(folders, limit) {
|
|
1075
|
+
const sorted = [...folders].sort((a, b) => {
|
|
1079
1076
|
const nameA = path.basename(a);
|
|
1080
1077
|
const nameB = path.basename(b);
|
|
1081
1078
|
const numA = numericPrefix(nameA);
|
|
@@ -1091,7 +1088,7 @@ async function listRecentArchiveFolders(archiveDir, limit) {
|
|
|
1091
1088
|
return 1;
|
|
1092
1089
|
return nameA.localeCompare(nameB);
|
|
1093
1090
|
});
|
|
1094
|
-
return
|
|
1091
|
+
return sorted.slice(0, limit);
|
|
1095
1092
|
}
|
|
1096
1093
|
/** Every typed `dead` event in the window, in change/task/event order. */
|
|
1097
1094
|
async function collectDeadOutcomes(folders) {
|
|
@@ -1132,8 +1129,8 @@ async function collectDeadOutcomes(folders) {
|
|
|
1132
1129
|
* changes by numeric id, with measured outcomes and up to ten dead rows.
|
|
1133
1130
|
*/
|
|
1134
1131
|
export async function getRepositoryRecord(projectRoot, config = DEFAULT_CONFIG) {
|
|
1135
|
-
const
|
|
1136
|
-
const folders =
|
|
1132
|
+
const archived = await listChanges(projectRoot, config, ['archived']);
|
|
1133
|
+
const folders = listRecentArchiveFolders(archived.map((change) => change.folderPath), REPOSITORY_RECORD_MAX_ARCHIVED_CHANGES);
|
|
1137
1134
|
const measured = await projectMeasuredTasks(folders);
|
|
1138
1135
|
const deadOutcomes = await collectDeadOutcomes(folders);
|
|
1139
1136
|
const passed = measured.filter((task) => task.firstAttemptPass).length;
|
|
@@ -1150,7 +1147,7 @@ export async function getRepositoryRecord(projectRoot, config = DEFAULT_CONFIG)
|
|
|
1150
1147
|
const scopeFileResolver = scopeTasks.length > 0 ? (useResolver2 ? 'resolver-2' : 'legacy') : null;
|
|
1151
1148
|
return {
|
|
1152
1149
|
measuredTasks: measured.length,
|
|
1153
|
-
|
|
1150
|
+
firstAttemptPasses: passed,
|
|
1154
1151
|
medianDurationSeconds: medianSeconds(durations),
|
|
1155
1152
|
largestFirstAttemptPass: selectLargestFirstAttemptPass(scopeTasks),
|
|
1156
1153
|
scopeFileResolver,
|
|
@@ -1166,7 +1163,7 @@ export function formatRepositoryRecordBody(record) {
|
|
|
1166
1163
|
return `This repository's measured record is too small (fewer than ${REPOSITORY_RECORD_MIN_MEASURED_TASKS} tasks).`;
|
|
1167
1164
|
}
|
|
1168
1165
|
const lines = [];
|
|
1169
|
-
lines.push(`First-attempt
|
|
1166
|
+
lines.push(`First-attempt passes: ${record.firstAttemptPasses}/${record.measuredTasks}`);
|
|
1170
1167
|
const largest = record.largestFirstAttemptPass;
|
|
1171
1168
|
if (largest) {
|
|
1172
1169
|
const scopeLabel = record.scopeFileResolver === 'legacy'
|
|
@@ -1275,7 +1272,16 @@ export function formatMetricsReport(report, config = DEFAULT_CONFIG) {
|
|
|
1275
1272
|
lines.push(` Verification passed at detection: ${report.history.scopeRegressions.verificationPassedAtDetection}`);
|
|
1276
1273
|
lines.push(` Verification failed at detection: ${report.history.scopeRegressions.verificationFailedAtDetection}`);
|
|
1277
1274
|
lines.push(` Recertified by human: ${report.history.scopeRegressions.recertifiedByHuman}`);
|
|
1275
|
+
lines.push(` Recertified automatically: ${report.history.scopeRegressions.recertifiedAutomatically}`);
|
|
1278
1276
|
lines.push(` Requeued for agent: ${report.history.scopeRegressions.requeuedForAgent}`);
|
|
1277
|
+
lines.push(...formatRework(report.history.rework ?? []));
|
|
1278
|
+
lines.push(...formatDisclosures(report.history.disclosures ?? []));
|
|
1279
|
+
if ((report.history.dependencies ?? []).length > 0) {
|
|
1280
|
+
lines.push(...formatDependencies(report.history.dependencies ?? []));
|
|
1281
|
+
}
|
|
1282
|
+
if (report.history.verification) {
|
|
1283
|
+
lines.push(formatVerificationCounts(report.history.verification));
|
|
1284
|
+
}
|
|
1279
1285
|
const scopeSeries = report.history.sizes.scopeFileSeries;
|
|
1280
1286
|
const legacySeries = scopeSeries.find((entry) => entry.resolver === 'legacy');
|
|
1281
1287
|
const resolver2Series = scopeSeries.find((entry) => entry.resolver === 'resolver-2');
|
|
@@ -1299,6 +1305,14 @@ export function formatMetricsReport(report, config = DEFAULT_CONFIG) {
|
|
|
1299
1305
|
lines.push(` Size hint: largest first-attempt pass ${largestPass.change}/${largestPass.task} — ${matching.join('; ')}`);
|
|
1300
1306
|
}
|
|
1301
1307
|
}
|
|
1308
|
+
if (report.traceability) {
|
|
1309
|
+
lines.push('');
|
|
1310
|
+
lines.push(...formatTraceability(report.traceability));
|
|
1311
|
+
}
|
|
1312
|
+
if (report.mutation) {
|
|
1313
|
+
lines.push('');
|
|
1314
|
+
lines.push(...formatMutation(report.mutation));
|
|
1315
|
+
}
|
|
1302
1316
|
lines.push('');
|
|
1303
1317
|
lines.push('Coverage:');
|
|
1304
1318
|
lines.push(` Tasks with event files: ${report.coverage.withEvents}`);
|
|
@@ -1322,6 +1336,7 @@ export function formatMetricsReport(report, config = DEFAULT_CONFIG) {
|
|
|
1322
1336
|
lines.push(` Cached tokens: ${report.planning.tokens.cached}`);
|
|
1323
1337
|
lines.push(` Reasoning tokens: ${report.planning.tokens.reasoning}`);
|
|
1324
1338
|
lines.push(` Harness-reported cost: ${report.planning.cost.formattedTotal}`);
|
|
1339
|
+
lines.push(...formatPlanningCostBySource(report.planning.cost.bySource));
|
|
1325
1340
|
lines.push(` ${report.planning.coverage.reportedSessions} of ${report.planning.coverage.totalSessions} sessions reported usage`);
|
|
1326
1341
|
lines.push(` ${report.planning.changesWithPlanningRecords} changes have a planning record`);
|
|
1327
1342
|
const planningChangeEntries = Object.entries(report.planning.byChange).sort(([a], [b]) => a.localeCompare(b));
|
|
@@ -1359,6 +1374,10 @@ export function formatMetricsReport(report, config = DEFAULT_CONFIG) {
|
|
|
1359
1374
|
['Total', report.cycle.phases.total],
|
|
1360
1375
|
];
|
|
1361
1376
|
for (const [label, phase] of cyclePhaseLines) {
|
|
1377
|
+
if (phase.coveredChanges === 0) {
|
|
1378
|
+
lines.push(` ${label}: not reported (0 of ${phase.totalChanges} archived changes)`);
|
|
1379
|
+
continue;
|
|
1380
|
+
}
|
|
1362
1381
|
lines.push(` ${label}: total ${formatDuration(phase.totalSeconds * 1000)}, average ${formatDuration(phase.averageSeconds * 1000)} (${phase.coveredChanges} of ${phase.totalChanges} archived changes)`);
|
|
1363
1382
|
}
|
|
1364
1383
|
lines.push('');
|