@hiroshi.inoue/agent-spectrum-kernel 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +163 -2
- package/bin/ask.mjs +9 -0
- package/dist/AGENTS.md +266 -0
- package/dist/CHANGELOG.md +110 -0
- package/dist/CUSTOM_INSTRUCTIONS.md +72 -0
- package/dist/LICENSE +21 -0
- package/dist/README.md +164 -0
- package/dist/adapters/claude-code/README.md +185 -0
- package/dist/adapters/claude-code/github-actions/README.md +45 -0
- package/dist/adapters/claude-code/github-actions/claude-review-on-mention.yml +151 -0
- package/dist/adapters/claude-code/plugin/.claude-plugin/plugin.json +15 -0
- package/dist/adapters/claude-code/plugin/README.md +48 -0
- package/dist/adapters/claude-code/plugin/bin/ai-skills-metrics-record +18 -0
- package/dist/adapters/claude-code/plugin/contracts/claim-evidence-status-contract.md +60 -0
- package/dist/adapters/claude-code/plugin/contracts/execution-envelope-contract.md +105 -0
- package/dist/adapters/claude-code/plugin/contracts/lifecycle-traceability-contract.md +169 -0
- package/dist/adapters/claude-code/plugin/contracts/review-signal-gate-map.json +128 -0
- package/dist/adapters/claude-code/plugin/hooks/hooks.json +25 -0
- package/dist/adapters/claude-code/plugin/schemas/claim-evidence-status.schema.json +85 -0
- package/dist/adapters/claude-code/plugin/schemas/codex-risk-action.schema.json +58 -0
- package/dist/adapters/claude-code/plugin/schemas/codex-risk-approval-request.schema.json +204 -0
- package/dist/adapters/claude-code/plugin/schemas/execution-envelope.schema.json +127 -0
- package/dist/adapters/claude-code/plugin/schemas/metrics-event.schema.json +395 -0
- package/dist/adapters/claude-code/plugin/scripts/claim-evidence-status.mjs +162 -0
- package/dist/adapters/claude-code/plugin/skills/adoption-report/SKILL.md +19 -0
- package/dist/adapters/claude-code/plugin/skills/evidence-ledger/SKILL.md +96 -0
- package/dist/adapters/claude-code/plugin/skills/handoff/SKILL.md +36 -0
- package/dist/adapters/claude-code/plugin/skills/implement/SKILL.md +41 -0
- package/dist/adapters/claude-code/plugin/skills/implementation-context-check/SKILL.md +21 -0
- package/dist/adapters/claude-code/plugin/skills/investigate/SKILL.md +40 -0
- package/dist/adapters/claude-code/plugin/skills/ledger-refresh/SKILL.md +22 -0
- package/dist/adapters/claude-code/plugin/skills/review-pr/SKILL.md +54 -0
- package/dist/adapters/claude-code/plugin/skills/verify/SKILL.md +44 -0
- package/dist/adapters/claude-code/plugin/templates/handoff.md +30 -0
- package/dist/adapters/claude-code/plugin/templates/implement.md +35 -0
- package/dist/adapters/claude-code/plugin/templates/investigate.md +34 -0
- package/dist/adapters/claude-code/plugin/templates/review-pr.md +48 -0
- package/dist/adapters/claude-code/plugin/templates/verify.md +38 -0
- package/dist/adapters/claude-code/project/.claude/commands/skill-handoff.md +27 -0
- package/dist/adapters/claude-code/project/.claude/commands/skill-implement.md +32 -0
- package/dist/adapters/claude-code/project/.claude/commands/skill-investigate.md +29 -0
- package/dist/adapters/claude-code/project/.claude/commands/skill-ledger-refresh.md +22 -0
- package/dist/adapters/claude-code/project/.claude/commands/skill-report.md +17 -0
- package/dist/adapters/claude-code/project/.claude/commands/skill-review.md +43 -0
- package/dist/adapters/claude-code/project/.claude/commands/skill-verify.md +37 -0
- package/dist/adapters/claude-code/project/.claude/hooks/hooks.json +52 -0
- package/dist/adapters/claude-code/project/.claude/skills/README.md +11 -0
- package/dist/adapters/codex/README.md +128 -0
- package/dist/adapters/codex/commands/codex-exec.md +69 -0
- package/dist/adapters/codex/project/.agents/skills/README.md +36 -0
- package/dist/adapters/codex/prompts/skill-handoff.md +23 -0
- package/dist/adapters/codex/prompts/skill-implement.md +28 -0
- package/dist/adapters/codex/prompts/skill-investigate.md +27 -0
- package/dist/adapters/codex/prompts/skill-review.md +44 -0
- package/dist/adapters/codex/prompts/skill-verify.md +28 -0
- package/dist/benchmarks/README.md +125 -0
- package/dist/benchmarks/adaptive-portfolio.config.json +439 -0
- package/dist/benchmarks/admission-decision-overlay.md +72 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/common/operation-and-observation.md +35 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch02-report-operations/TASK.md +15 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch02-report-operations/acceptance.md +29 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch02-report-operations/business-decisions.md +21 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch02-report-operations/contract.md +37 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch02-report-operations/delivery-provider.md +7 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch02-report-operations/fixture-format.md +13 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch02-report-operations/fixtures/example.json +237 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch02-report-operations/goal-pr.txt +5 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch02-report-operations/nonfunctional.md +3 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch02-report-operations/prompt.txt +5 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch02-report-operations/roles.md +24 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch02-report-operations/workflows.md +35 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch03-price-rollout/TASK.md +15 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch03-price-rollout/acceptance.md +30 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch03-price-rollout/business-decisions.md +23 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch03-price-rollout/contract.md +45 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch03-price-rollout/fixture-format.md +15 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch03-price-rollout/fixtures/campaign-stores.json +284 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch03-price-rollout/fixtures/example.json +299 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch03-price-rollout/goal-pr.txt +5 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch03-price-rollout/nonfunctional.md +3 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch03-price-rollout/prompt.txt +5 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch03-price-rollout/roles.md +28 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch03-price-rollout/workflows.md +35 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch04-document-access/TASK.md +15 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch04-document-access/acceptance.md +30 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch04-document-access/business-decisions.md +23 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch04-document-access/contract.md +39 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch04-document-access/fixture-format.md +11 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch04-document-access/fixtures/dossier-delivery.json +325 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch04-document-access/fixtures/example.json +289 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch04-document-access/goal-pr.txt +5 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch04-document-access/nonfunctional.md +3 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch04-document-access/prompt.txt +5 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch04-document-access/roles.md +27 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch04-document-access/workflows.md +35 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch05-sales-reconciliation/TASK.md +15 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch05-sales-reconciliation/acceptance.md +30 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch05-sales-reconciliation/business-decisions.md +27 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch05-sales-reconciliation/contract.md +39 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch05-sales-reconciliation/fixture-format.md +11 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch05-sales-reconciliation/fixtures/example.json +276 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch05-sales-reconciliation/goal-pr.txt +5 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch05-sales-reconciliation/nonfunctional.md +3 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch05-sales-reconciliation/prompt.txt +5 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch05-sales-reconciliation/roles.md +27 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch05-sales-reconciliation/workflows.md +35 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch06-build-operations/TASK.md +15 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch06-build-operations/acceptance.md +30 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch06-build-operations/business-decisions.md +23 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch06-build-operations/compiler-provider.md +9 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch06-build-operations/contract.md +39 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch06-build-operations/fixture-format.md +11 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch06-build-operations/fixtures/example.json +292 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch06-build-operations/goal-pr.txt +5 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch06-build-operations/nonfunctional.md +3 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch06-build-operations/prompt.txt +5 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch06-build-operations/roles.md +25 -0
- package/dist/benchmarks/challenge-candidates/business-five-v3-decisions/public/tasks/ch06-build-operations/workflows.md +35 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/evaluation-protocol.md +58 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/LICENSE +21 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/PROVENANCE.md +9 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/README-ja.md +29 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/README.md +47 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/brief/adr/001-local-storage.md +6 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/brief/adr/007-shared-boundary.md +9 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/brief/adr/009-retention-draft.md +4 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/brief/architecture.md +29 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/brief/contracts.md +14 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/brief/library-policy.md +16 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/brief/open-decisions.md +10 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/brief/release.md +32 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/brief/spec-index.md +17 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/docs/design.md +1624 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/docs/requirements.md +1194 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/eslint.config.mjs +23 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/evidence/ci-summary.json +11 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/evidence/operational-observations.md +11 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/evidence/pilot-desk/approval-history.csv +6 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/evidence/pilot-desk/batches.csv +21 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/evidence/pilot-desk/bookings.csv +6 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/evidence/pilot-desk/clearance.csv +6 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/evidence/pilot-desk/desk-ledger.csv +13 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/evidence/pilot-desk/service-agreement.md +11 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/evidence/pilot-desk/signoffs.csv +12 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/evidence/previous-readiness-note.md +7 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/package.json +26 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/package.json +21 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/action-log.test.ts +32 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/artifact-store.test.ts +64 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/command-catalog.test.ts +89 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/config-store.test.ts +28 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/core-info.test.ts +13 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/cycle-meta.test.ts +491 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/field-report.test.ts +107 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/fix-flow.test.ts +289 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/flow-manifest.test.ts +126 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/flow-run.test.ts +44 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/knowledge-capture.test.ts +288 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/meta-status.test.ts +109 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/p0-readiness.test.ts +192 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/project-context.test.ts +172 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/project-init.test.ts +82 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/prompt-renderer.test.ts +87 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/prompt-template.test.ts +55 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/response-import.test.ts +40 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/response-normalize.test.ts +59 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/review-resolution.test.ts +187 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/review-work-metrics.test.ts +173 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/runtime-ports.test.ts +118 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/__tests__/skill-evidence.test.ts +101 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/actions/action-log.ts +48 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/application/project-context.ts +291 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/application/project-init.ts +224 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/artifacts/artifact-store.ts +2 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/artifacts/open-artifact.ts +21 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/config/config-store.ts +73 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/cycles/state.ts +799 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/domain/artifacts.ts +20 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/domain/diff-classification.ts +65 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/flows/manifest.ts +1648 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/flows/run.ts +77 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/index.ts +48 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/infrastructure/fs/artifact-store.ts +60 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/infrastructure/fs/runtime.ts +22 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/infrastructure/fs/workspace-store.ts +107 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/infrastructure/memory/runtime.ts +185 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/knowledge/capture.ts +666 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/meta/command-catalog.ts +909 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/meta/readiness.ts +519 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/meta/status.ts +58 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/metrics/review-work.ts +317 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/ports/artifact-store.ts +16 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/ports/runtime.ts +56 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/project/context.ts +46 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/project/init.ts +20 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/prompts/render.ts +369 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/prompts/templates.ts +153 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/reports/field-report.ts +230 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/responses/import.ts +127 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/responses/normalize.ts +389 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/reviews/action-plan-understanding.ts +136 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/reviews/comment-resolution.ts +605 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/reviews/fix-flow.ts +863 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/serialization/json.ts +18 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/serialization/paths.ts +27 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/serialization/yaml.ts +20 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/skill/evidence.ts +207 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/src/types.ts +634 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/core/tsconfig.json +10 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/README.md +18 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/package.json +13 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/public/app.js +357 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/public/index.html +35 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/public/styles.css +172 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/API.md +41 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/access.mjs +17 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/app.mjs +320 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/artifacts.mjs +81 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/core-bridge.mjs +48 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/errors.mjs +9 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/fixtures.mjs +75 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/index.mjs +14 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/jobs.mjs +93 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/journal.mjs +46 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/provider.mjs +59 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/reviews.mjs +80 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/server/store.mjs +105 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/test/helpers/review-fixture.mjs +9 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/test/persistence.test.mjs +60 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/portal/test/portal.test.mjs +364 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/providers/package.json +21 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/providers/src/__tests__/github.test.ts +335 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/providers/src/__tests__/local-git.test.ts +98 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/providers/src/__tests__/provider-boundary.test.ts +18 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/providers/src/github.ts +643 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/providers/src/index.ts +54 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/providers/src/local-git.ts +520 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/providers/tsconfig.json +15 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/l10n/bundle.l10n.ja.json +868 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/l10n/bundle.l10n.json +868 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/package.json +474 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/package.nls.ja.json +38 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/package.nls.json +38 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/resources/reviewops-activitybar.svg +12 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/resources/reviewops-command-dark.svg +12 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/resources/reviewops-command-light.svg +12 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/resources/reviewops_guard_icon_128.png +0 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/artifact-browser.ts +380 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/artifact-loader.ts +460 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/command-center-renderer.ts +1341 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/command-center-results.ts +183 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/command-center.ts +819 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/extension-runtime.ts +2670 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/extension.ts +1 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/localization.ts +19 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/publish-draft-artifacts.ts +58 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/review-targets.ts +178 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/review-work-artifacts.ts +200 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/run-id.ts +3 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/scoped-cycle-prompt.ts +119 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/tree-views.ts +243 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/src/webview-renderers.ts +184 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/packages/vscode-extension/tsconfig.json +18 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/pnpm-lock.yaml +1708 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/pnpm-workspace.yaml +2 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/scripts/check-policy.mjs +14 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/scripts/generate-vsix.command +226 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/scripts/pilot-board.mjs +20 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/scripts/policy-checker.mjs +145 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/scripts/smoke-vsix.command +129 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/task.md +11 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/tests/policy/ai-network-guard.test.ts +9 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/tests/vscode-extension-activation.test.ts +474 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/tests/vscode-extension-artifacts.test.ts +2087 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/tests/vscode-extension-package.test.ts +336 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/tests/vsix-smoke-command.test.ts +32 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/tsconfig.base.json +15 -0
- package/dist/benchmarks/challenge-candidates/review-ceiling-v1/workspace/vitest.config.ts +11 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/README.md +66 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/brief/data-contract.md +51 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/brief/rubric.json +756 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/brief/scenarios.json +333 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/brief/spec.md +35 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/fixtures/assessment-valid.json +53 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/fixtures/assessment-wrong-evidence.json +53 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/fixtures/backup-dangling.json +565 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/fixtures/career-valid.json +51 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/fixtures/plan-over-limit.json +61 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/fixtures/plan-valid.json +61 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/fixtures/plan-wrong-request.json +61 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/fixtures/seed.json +565 -0
- package/dist/benchmarks/challenge-candidates/ui-reconstruction-v1/workspace/task.md +29 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/bundle.json +270 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/examples/mutants.mjs +129 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/examples/reference.mjs +150 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/cases.mjs +261 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/contract.test.mjs +5 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/legacy-baseline/src/errors.mjs +17 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/legacy-baseline/src/index.mjs +3 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/legacy-baseline/src/rule-service.mjs +27 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/legacy-baseline/src/rule-store.mjs +38 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/legacy-baseline/src/validation.mjs +20 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/legacy-case-ids.json +458 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/legacy-results.mjs +37 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/legacy-verifier.v1.2.mjs +115 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/legacy.test.mjs +4 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/r1.test.mjs +10 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/r10.test.mjs +10 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/r2.test.mjs +10 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/r3.test.mjs +10 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/r4.test.mjs +10 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/r5.test.mjs +10 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/r6.test.mjs +10 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/r7.test.mjs +10 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/r8.test.mjs +10 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/fixed/r9.test.mjs +10 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/history.json +27 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/requirements.json +547 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/seed/docs/rule-batch.schema.json +27 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/seed/docs/rule-batches.md +140 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/seed/package.json +7 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/seed/src/errors.mjs +17 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/seed/src/index.mjs +3 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/seed/src/rule-service.mjs +27 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/seed/src/rule-store.mjs +38 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/seed/src/validation.mjs +20 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/seed/test/rule-service.test.mjs +34 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/spec.md +140 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/task.md +35 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/verification-contract.md +56 -0
- package/dist/benchmarks/contracts/rule-batch/2.0.0/verification.json +100 -0
- package/dist/benchmarks/evaluation-tasks.json +1645 -0
- package/dist/benchmarks/evaluator-boundary.md +107 -0
- package/dist/benchmarks/portfolio-admission-policy.json +1171 -0
- package/dist/benchmarks/portfolio-catalog.json +837 -0
- package/dist/benchmarks/portfolio-design-admission-manifest.json +170 -0
- package/dist/benchmarks/portfolio-design-admission-records/hi-authorization-exception.json +99 -0
- package/dist/benchmarks/portfolio-design-admission-records/hi-external-action-approval.json +105 -0
- package/dist/benchmarks/portfolio-design-admission-records/hi-financial-state-integrity.json +105 -0
- package/dist/benchmarks/portfolio-design-admission-records/hi-versioned-migration-safety.json +108 -0
- package/dist/benchmarks/portfolio-design-admission-records/mn-build-option-update.json +108 -0
- package/dist/benchmarks/portfolio-design-admission-records/mn-client-compatibility-fix.json +108 -0
- package/dist/benchmarks/portfolio-design-admission-records/mn-doc-config-correction.json +108 -0
- package/dist/benchmarks/portfolio-design-admission-records/mn-focused-regression-test.json +108 -0
- package/dist/benchmarks/portfolio-design-admission-records/mn-frontend-default-fix.json +108 -0
- package/dist/benchmarks/portfolio-design-admission-records/mn-schema-field-alignment.json +108 -0
- package/dist/benchmarks/portfolio-design-admission-records/mp-accessibility-interaction-review.json +103 -0
- package/dist/benchmarks/portfolio-design-admission-records/mp-ci-evidence-gap.json +103 -0
- package/dist/benchmarks/portfolio-design-admission-records/mp-data-migration-handoff.json +108 -0
- package/dist/benchmarks/portfolio-design-admission-records/mp-frontend-state-review.json +103 -0
- package/dist/benchmarks/portfolio-design-admission-records/mp-iac-rollback-design.json +106 -0
- package/dist/benchmarks/portfolio-design-admission-records/mp-performance-investigation.json +106 -0
- package/dist/benchmarks/portfolio-design-admission-records/pf-api-pagination-behavior.json +108 -0
- package/dist/benchmarks/portfolio-design-admission-records/pf-ci-cache-flake.json +106 -0
- package/dist/benchmarks/portfolio-design-admission-records/pf-data-schema-evolution.json +105 -0
- package/dist/benchmarks/portfolio-design-admission-records/pf-frontend-async-state.json +108 -0
- package/dist/benchmarks/portfolio-design-admission-records/pf-library-compat-upgrade.json +105 -0
- package/dist/benchmarks/portfolio-design-admission-records/pf-observability-redaction.json +99 -0
- package/dist/benchmarks/portfolio-design-admission-records/pf-performance-regression.json +108 -0
- package/dist/benchmarks/portfolio-design-admission-records/pf-review-error-contract.json +103 -0
- package/dist/benchmarks/portfolio-design-independent-review.json +1666 -0
- package/dist/benchmarks/portfolio-design-review-package.json +249 -0
- package/dist/benchmarks/portfolio-design-reviewed-state.json +152 -0
- package/dist/benchmarks/portfolio-high-impact-sensitivity-policy.json +40 -0
- package/dist/benchmarks/portfolio-lineage-policy.json +213 -0
- package/dist/benchmarks/portfolio-policy-manifest.json +32 -0
- package/dist/benchmarks/portfolio-scoring-policy.json +589 -0
- package/dist/benchmarks/portfolio-similarity.json +2222 -0
- package/dist/benchmarks/prompt-v2-preregistration.json +411 -0
- package/dist/benchmarks/protocol-adaptive.md +487 -0
- package/dist/benchmarks/protocol-b2.md +113 -0
- package/dist/benchmarks/protocol-prompt-v2.md +108 -0
- package/dist/benchmarks/protocol.md +122 -0
- package/dist/benchmarks/report-template.md +61 -0
- package/dist/benchmarks/schemas/adaptive-selection-input.schema.json +82 -0
- package/dist/benchmarks/schemas/adaptive-selection-state.schema.json +45 -0
- package/dist/benchmarks/schemas/adaptive-selection.schema.json +137 -0
- package/dist/benchmarks/schemas/agent-output.schema.json +66 -0
- package/dist/benchmarks/schemas/core-evaluator-result-envelope.schema.json +708 -0
- package/dist/benchmarks/schemas/core-native-compatibility-provenance.schema.json +130 -0
- package/dist/benchmarks/schemas/core-normalized-portfolio-result.schema.json +945 -0
- package/dist/benchmarks/schemas/core-normalized-portfolio-run.schema.json +676 -0
- package/dist/benchmarks/schemas/core-original-workspace-authority.schema.json +315 -0
- package/dist/benchmarks/schemas/core-portfolio-command-evidence.schema.json +548 -0
- package/dist/benchmarks/schemas/core-portfolio-engineering-result.schema.json +1187 -0
- package/dist/benchmarks/schemas/core-portfolio-terminal-workspace-authority.schema.json +395 -0
- package/dist/benchmarks/schemas/core-repository-diff-artifact.schema.json +253 -0
- package/dist/benchmarks/schemas/evaluation-input-failure-artifact.schema.json +36 -0
- package/dist/benchmarks/schemas/evaluator-authority-manifest.schema.json +63 -0
- package/dist/benchmarks/schemas/evaluator-check-artifact.schema.json +35 -0
- package/dist/benchmarks/schemas/evaluator-reference.schema.json +129 -0
- package/dist/benchmarks/schemas/evaluator-result-envelope.schema.json +261 -0
- package/dist/benchmarks/schemas/execution-plan.schema.json +121 -0
- package/dist/benchmarks/schemas/materialization-manifest.schema.json +187 -0
- package/dist/benchmarks/schemas/normalized-portfolio-result.schema.json +379 -0
- package/dist/benchmarks/schemas/normalized-portfolio-root.schema.json +49 -0
- package/dist/benchmarks/schemas/normalized-portfolio-run.schema.json +289 -0
- package/dist/benchmarks/schemas/original-workspace-authority.schema.json +99 -0
- package/dist/benchmarks/schemas/portfolio-adapter-identity.schema.json +148 -0
- package/dist/benchmarks/schemas/portfolio-admission-decision.schema.json +140 -0
- package/dist/benchmarks/schemas/portfolio-admission-policy.schema.json +347 -0
- package/dist/benchmarks/schemas/portfolio-admission-review-authority.schema.json +60 -0
- package/dist/benchmarks/schemas/portfolio-aggregate-result-v2.schema.json +1107 -0
- package/dist/benchmarks/schemas/portfolio-aggregate-result.schema.json +140 -0
- package/dist/benchmarks/schemas/portfolio-attempt-commit.schema.json +30 -0
- package/dist/benchmarks/schemas/portfolio-attempt-request.schema.json +134 -0
- package/dist/benchmarks/schemas/portfolio-attempt-result.schema.json +256 -0
- package/dist/benchmarks/schemas/portfolio-case-state.schema.json +38 -0
- package/dist/benchmarks/schemas/portfolio-catalog.schema.json +122 -0
- package/dist/benchmarks/schemas/portfolio-claim.schema.json +72 -0
- package/dist/benchmarks/schemas/portfolio-classification-record.schema.json +46 -0
- package/dist/benchmarks/schemas/portfolio-command-evidence.schema.json +122 -0
- package/dist/benchmarks/schemas/portfolio-config.schema.json +138 -0
- package/dist/benchmarks/schemas/portfolio-consumer-report.schema.json +289 -0
- package/dist/benchmarks/schemas/portfolio-design-admission-manifest.schema.json +76 -0
- package/dist/benchmarks/schemas/portfolio-design-admission-record.schema.json +205 -0
- package/dist/benchmarks/schemas/portfolio-design-independent-review.schema.json +264 -0
- package/dist/benchmarks/schemas/portfolio-design-review-package.schema.json +96 -0
- package/dist/benchmarks/schemas/portfolio-design-reviewed-state.schema.json +99 -0
- package/dist/benchmarks/schemas/portfolio-directional-outcome-report.schema.json +164 -0
- package/dist/benchmarks/schemas/portfolio-engineering-result-set.schema.json +222 -0
- package/dist/benchmarks/schemas/portfolio-engineering-result-source-manifest.schema.json +93 -0
- package/dist/benchmarks/schemas/portfolio-engineering-result.schema.json +515 -0
- package/dist/benchmarks/schemas/portfolio-evolution-binding.schema.json +71 -0
- package/dist/benchmarks/schemas/portfolio-final-admission-record.schema.json +125 -0
- package/dist/benchmarks/schemas/portfolio-high-impact-sensitivity-policy.schema.json +44 -0
- package/dist/benchmarks/schemas/portfolio-high-impact-sensitivity-registration.schema.json +136 -0
- package/dist/benchmarks/schemas/portfolio-high-impact-sensitivity-report.schema.json +384 -0
- package/dist/benchmarks/schemas/portfolio-legacy-calibration-migration.schema.json +308 -0
- package/dist/benchmarks/schemas/portfolio-lineage-policy.schema.json +180 -0
- package/dist/benchmarks/schemas/portfolio-lineage-record.schema.json +52 -0
- package/dist/benchmarks/schemas/portfolio-mechanism-scorecard.schema.json +197 -0
- package/dist/benchmarks/schemas/portfolio-output-contract.schema.json +52 -0
- package/dist/benchmarks/schemas/portfolio-paired-comparison-report.schema.json +346 -0
- package/dist/benchmarks/schemas/portfolio-policy-manifest.schema.json +85 -0
- package/dist/benchmarks/schemas/portfolio-repetition-report.schema.json +204 -0
- package/dist/benchmarks/schemas/portfolio-requirement-record.schema.json +72 -0
- package/dist/benchmarks/schemas/portfolio-run-identity.schema.json +58 -0
- package/dist/benchmarks/schemas/portfolio-runtime-config.schema.json +147 -0
- package/dist/benchmarks/schemas/portfolio-scoring-policy.schema.json +497 -0
- package/dist/benchmarks/schemas/portfolio-similarity.schema.json +64 -0
- package/dist/benchmarks/schemas/portfolio-terminal-workspace-authority.schema.json +134 -0
- package/dist/benchmarks/schemas/portfolio-verification-command-contract.schema.json +69 -0
- package/dist/benchmarks/schemas/primary-evaluator-result-envelope.schema.json +708 -0
- package/dist/benchmarks/schemas/primary-k2-evaluator-result-envelope.schema.json +708 -0
- package/dist/benchmarks/schemas/primary-k2-normalized-portfolio-result.schema.json +945 -0
- package/dist/benchmarks/schemas/primary-k2-normalized-portfolio-run.schema.json +676 -0
- package/dist/benchmarks/schemas/primary-k2-original-workspace-authority.schema.json +315 -0
- package/dist/benchmarks/schemas/primary-k2-portfolio-command-evidence.schema.json +554 -0
- package/dist/benchmarks/schemas/primary-k2-portfolio-engineering-result.schema.json +1187 -0
- package/dist/benchmarks/schemas/primary-k2-portfolio-terminal-workspace-authority.schema.json +395 -0
- package/dist/benchmarks/schemas/primary-k2-repository-diff-artifact.schema.json +253 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v10-evaluator-result-envelope.schema.json +3604 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v10-normalized-portfolio-result.schema.json +3804 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v10-portfolio-command-evidence.schema.json +3531 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v10-portfolio-engineering-result.schema.json +4126 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v2-portfolio-command-evidence.schema.json +548 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v3-portfolio-command-evidence.schema.json +548 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v4-portfolio-command-evidence.schema.json +548 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v5-portfolio-command-evidence.schema.json +558 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v6-portfolio-command-evidence.schema.json +668 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v7-evaluator-result-envelope.schema.json +708 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v7-portfolio-command-evidence.schema.json +676 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v8-evaluator-result-envelope.schema.json +760 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v8-normalized-portfolio-result.schema.json +960 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v8-portfolio-command-evidence.schema.json +687 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v8-portfolio-engineering-result.schema.json +1282 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v9-evaluator-result-envelope.schema.json +760 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v9-normalized-portfolio-result.schema.json +960 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v9-portfolio-command-evidence.schema.json +687 -0
- package/dist/benchmarks/schemas/primary-k2-saved-v9-portfolio-engineering-result.schema.json +1282 -0
- package/dist/benchmarks/schemas/primary-normalized-portfolio-result.schema.json +945 -0
- package/dist/benchmarks/schemas/primary-normalized-portfolio-run.schema.json +676 -0
- package/dist/benchmarks/schemas/primary-original-workspace-authority.schema.json +315 -0
- package/dist/benchmarks/schemas/primary-portfolio-command-evidence.schema.json +554 -0
- package/dist/benchmarks/schemas/primary-portfolio-engineering-result.schema.json +1187 -0
- package/dist/benchmarks/schemas/primary-portfolio-terminal-workspace-authority.schema.json +395 -0
- package/dist/benchmarks/schemas/primary-public-capability-selection-v2.schema.json +31 -0
- package/dist/benchmarks/schemas/primary-repository-diff-artifact.schema.json +253 -0
- package/dist/benchmarks/schemas/primary-runtime-v10-binding.schema.json +2843 -0
- package/dist/benchmarks/schemas/primary-saved-v10-evaluator-result-envelope.schema.json +3604 -0
- package/dist/benchmarks/schemas/primary-saved-v10-normalized-portfolio-result.schema.json +3804 -0
- package/dist/benchmarks/schemas/primary-saved-v10-portfolio-command-evidence.schema.json +3531 -0
- package/dist/benchmarks/schemas/primary-saved-v10-portfolio-engineering-result.schema.json +4126 -0
- package/dist/benchmarks/schemas/primary-saved-v2-portfolio-command-evidence.schema.json +548 -0
- package/dist/benchmarks/schemas/primary-saved-v3-portfolio-command-evidence.schema.json +548 -0
- package/dist/benchmarks/schemas/primary-saved-v4-portfolio-command-evidence.schema.json +548 -0
- package/dist/benchmarks/schemas/primary-saved-v5-portfolio-command-evidence.schema.json +558 -0
- package/dist/benchmarks/schemas/primary-saved-v6-portfolio-command-evidence.schema.json +668 -0
- package/dist/benchmarks/schemas/primary-saved-v7-evaluator-result-envelope.schema.json +708 -0
- package/dist/benchmarks/schemas/primary-saved-v7-portfolio-command-evidence.schema.json +676 -0
- package/dist/benchmarks/schemas/primary-saved-v8-evaluator-result-envelope.schema.json +760 -0
- package/dist/benchmarks/schemas/primary-saved-v8-normalized-portfolio-result.schema.json +960 -0
- package/dist/benchmarks/schemas/primary-saved-v8-portfolio-command-evidence.schema.json +687 -0
- package/dist/benchmarks/schemas/primary-saved-v8-portfolio-engineering-result.schema.json +1282 -0
- package/dist/benchmarks/schemas/primary-saved-v9-evaluator-result-envelope.schema.json +760 -0
- package/dist/benchmarks/schemas/primary-saved-v9-normalized-portfolio-result.schema.json +960 -0
- package/dist/benchmarks/schemas/primary-saved-v9-portfolio-command-evidence.schema.json +687 -0
- package/dist/benchmarks/schemas/primary-saved-v9-portfolio-engineering-result.schema.json +1282 -0
- package/dist/benchmarks/schemas/private-evaluation-record.schema.json +311 -0
- package/dist/benchmarks/schemas/private-evaluator-bundle.schema.json +224 -0
- package/dist/benchmarks/schemas/private-evaluator-fragment.schema.json +140 -0
- package/dist/benchmarks/schemas/private-evaluator-independence-statement.schema.json +168 -0
- package/dist/benchmarks/schemas/prompt-v2-comparison-report.schema.json +94 -0
- package/dist/benchmarks/schemas/prompt-v2-execution-plan.schema.json +115 -0
- package/dist/benchmarks/schemas/prompt-v2-materialization-manifest.schema.json +58 -0
- package/dist/benchmarks/schemas/prompt-v2-normalized-result.schema.json +109 -0
- package/dist/benchmarks/schemas/prompt-v2-preregistration.schema.json +266 -0
- package/dist/benchmarks/schemas/prompt-v2-resume-state.schema.json +60 -0
- package/dist/benchmarks/schemas/repository-diff-artifact.schema.json +78 -0
- package/dist/benchmarks/schemas/result.schema.json +292 -0
- package/dist/benchmarks/schemas/runtime-observation-carrier.schema.json +480 -0
- package/dist/benchmarks/schemas/scoring-input-freeze-manifest.schema.json +77 -0
- package/dist/benchmarks/task-revisions/ch01-inventory-reservation-logistics/rubric.json +41 -0
- package/dist/benchmarks/task-revisions/ch02-report-operations/input-manifest.json +141 -0
- package/dist/benchmarks/task-revisions/ch02-report-operations/rubric.json +40 -0
- package/dist/benchmarks/task-revisions/ch03-price-rollout/input-manifest.json +141 -0
- package/dist/benchmarks/task-revisions/ch03-price-rollout/rubric.json +49 -0
- package/dist/benchmarks/task-revisions/ch04-document-access/input-manifest.json +141 -0
- package/dist/benchmarks/task-revisions/ch04-document-access/rubric.json +49 -0
- package/dist/benchmarks/task-revisions/ch05-sales-reconciliation/input-manifest.json +131 -0
- package/dist/benchmarks/task-revisions/ch05-sales-reconciliation/rubric.json +49 -0
- package/dist/benchmarks/task-revisions/ch06-build-operations/input-manifest.json +141 -0
- package/dist/benchmarks/task-revisions/ch06-build-operations/rubric.json +49 -0
- package/dist/benchmarks/task-revisions/ch08-growth-workspace/input-manifest.json +78 -0
- package/dist/benchmarks/task-revisions/ch08-growth-workspace/rubric.json +49 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/input-manifest.json +72 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/rubric.json +52 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/task.md +17 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/workspace/base/authorization.mjs +6 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/workspace/data/access-cases.json +251 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/workspace/docs/ownership-contract.md +11 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/workspace/package.json +13 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/workspace/pr.diff +12 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/workspace/review.schema.json +175 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/workspace/scripts/trace-access.mjs +14 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/workspace/scripts/validate-review.mjs +12 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/workspace/src/authorization.mjs +6 -0
- package/dist/benchmarks/task-revisions/hi-authorization-exception/workspace/test/access-subset.test.mjs +1 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/input-manifest.json +87 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/rubric.json +44 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/task.md +7 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/data/approval-receipts.json +162 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/data/operation-cases.json +257 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/data/review-attestations.json +257 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/data/state.json +1 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/docs/action-contract.md +15 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/operation-plan.json +5 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/package.json +13 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/plan.schema.json +127 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/scripts/controller.mjs +45 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/scripts/dry-run.mjs +1 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/scripts/validate-plan.mjs +1 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/scripts/validate-shape.mjs +16 -0
- package/dist/benchmarks/task-revisions/hi-external-action-approval/workspace/test/approval.test.mjs +55 -0
- package/dist/benchmarks/task-revisions/hi-financial-state-integrity/input-manifest.json +52 -0
- package/dist/benchmarks/task-revisions/hi-financial-state-integrity/rubric.json +45 -0
- package/dist/benchmarks/task-revisions/hi-financial-state-integrity/task.md +17 -0
- package/dist/benchmarks/task-revisions/hi-financial-state-integrity/workspace/data/incident.json +19 -0
- package/dist/benchmarks/task-revisions/hi-financial-state-integrity/workspace/data/initial-state.json +9 -0
- package/dist/benchmarks/task-revisions/hi-financial-state-integrity/workspace/docs/ledger-contract.md +9 -0
- package/dist/benchmarks/task-revisions/hi-financial-state-integrity/workspace/package.json +11 -0
- package/dist/benchmarks/task-revisions/hi-financial-state-integrity/workspace/src/ledger.mjs +11 -0
- package/dist/benchmarks/task-revisions/hi-financial-state-integrity/workspace/test/ledger.test.mjs +15 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/input-manifest.json +87 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/rubric.json +45 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/task.md +7 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/data/mixed-state.json +17 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/data/rollback-cases.json +84 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/data/schema-phases.json +54 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/data/timeline.json +52 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/docs/migration-contract.md +17 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/migration-plan.json +10 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/package.json +13 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/plan.schema.json +110 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/scripts/compatibility.mjs +51 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/scripts/dry-run.mjs +1 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/scripts/validate-plan.mjs +1 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/scripts/validate-shape.mjs +16 -0
- package/dist/benchmarks/task-revisions/hi-versioned-migration-safety/workspace/test/mixed-version.test.mjs +61 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/input-manifest.json +85 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/rubric.json +34 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/task.md +5 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/workspace/data/incident.json +8 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/workspace/data/initial-state.json +21 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/workspace/data/service-save.json +160 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/workspace/docs/bank-interchange.md +37 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/workspace/docs/close-instructions.md +27 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/workspace/docs/ledger-contract.md +21 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/workspace/package.json +11 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/workspace/src/archive.mjs +46 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/workspace/src/clearing.mjs +47 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/workspace/src/ledger.mjs +36 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/workspace/src/money.mjs +11 -0
- package/dist/benchmarks/task-revisions/implementation-clearing-cutover/workspace/test/ledger.test.mjs +50 -0
- package/dist/benchmarks/task-revisions/implementation-timeline-restore/input-manifest.json +52 -0
- package/dist/benchmarks/task-revisions/implementation-timeline-restore/rubric.json +44 -0
- package/dist/benchmarks/task-revisions/implementation-timeline-restore/task.md +5 -0
- package/dist/benchmarks/task-revisions/implementation-timeline-restore/workspace/docs/archive-operations.md +13 -0
- package/dist/benchmarks/task-revisions/implementation-timeline-restore/workspace/docs/interchange.md +16 -0
- package/dist/benchmarks/task-revisions/implementation-timeline-restore/workspace/docs/statement-interface.md +9 -0
- package/dist/benchmarks/task-revisions/implementation-timeline-restore/workspace/package.json +8 -0
- package/dist/benchmarks/task-revisions/implementation-timeline-restore/workspace/src/event-lookup.mjs +39 -0
- package/dist/benchmarks/task-revisions/implementation-timeline-restore/workspace/test/client.test.mjs +38 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/input-manifest.json +94 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/rubric.json +84 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/task.md +5 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/docs/dispatch.md +25 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/docs/installed-clients.md +35 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/docs/returned-sheets.md +15 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/package.json +8 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/release/console.mjs +2 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/release/database.mjs +52 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/release/desk.mjs +24 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/release/kiosk.mjs +47 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/release/operator.mjs +17 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/release/printer.mjs +63 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/src/delivery.mjs +28 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/src/reconcile.mjs +16 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/src/workspace.mjs +44 -0
- package/dist/benchmarks/task-revisions/implementation-workspace-upgrade/workspace/test/desk.test.mjs +34 -0
- package/dist/benchmarks/task-revisions/mn-build-option-update/input-manifest.json +52 -0
- package/dist/benchmarks/task-revisions/mn-build-option-update/rubric.json +38 -0
- package/dist/benchmarks/task-revisions/mn-build-option-update/task.md +5 -0
- package/dist/benchmarks/task-revisions/mn-build-option-update/workspace/build.config.json +14 -0
- package/dist/benchmarks/task-revisions/mn-build-option-update/workspace/ci/release-build.log +7 -0
- package/dist/benchmarks/task-revisions/mn-build-option-update/workspace/docs/build-options.md +12 -0
- package/dist/benchmarks/task-revisions/mn-build-option-update/workspace/package.json +9 -0
- package/dist/benchmarks/task-revisions/mn-build-option-update/workspace/scripts/validate-build-config.mjs +11 -0
- package/dist/benchmarks/task-revisions/mn-build-option-update/workspace/test/build-config.test.mjs +15 -0
- package/dist/benchmarks/task-revisions/mn-client-compatibility-fix/input-manifest.json +48 -0
- package/dist/benchmarks/task-revisions/mn-client-compatibility-fix/rubric.json +29 -0
- package/dist/benchmarks/task-revisions/mn-client-compatibility-fix/task.md +5 -0
- package/dist/benchmarks/task-revisions/mn-client-compatibility-fix/workspace/docs/client-support.md +12 -0
- package/dist/benchmarks/task-revisions/mn-client-compatibility-fix/workspace/docs/preferences.md +5 -0
- package/dist/benchmarks/task-revisions/mn-client-compatibility-fix/workspace/package.json +6 -0
- package/dist/benchmarks/task-revisions/mn-client-compatibility-fix/workspace/src/preferences.mjs +3 -0
- package/dist/benchmarks/task-revisions/mn-client-compatibility-fix/workspace/test/preferences.test.mjs +20 -0
- package/dist/benchmarks/task-revisions/mn-doc-config-correction/input-manifest.json +42 -0
- package/dist/benchmarks/task-revisions/mn-doc-config-correction/rubric.json +37 -0
- package/dist/benchmarks/task-revisions/mn-doc-config-correction/task.md +3 -0
- package/dist/benchmarks/task-revisions/mn-doc-config-correction/workspace/config/retry-policy.json +6 -0
- package/dist/benchmarks/task-revisions/mn-doc-config-correction/workspace/docs/worker-retries.md +12 -0
- package/dist/benchmarks/task-revisions/mn-doc-config-correction/workspace/package.json +8 -0
- package/dist/benchmarks/task-revisions/mn-doc-config-correction/workspace/test/worker-retries.test.mjs +16 -0
- package/dist/benchmarks/task-revisions/mn-focused-regression-test/input-manifest.json +42 -0
- package/dist/benchmarks/task-revisions/mn-focused-regression-test/rubric.json +37 -0
- package/dist/benchmarks/task-revisions/mn-focused-regression-test/task.md +5 -0
- package/dist/benchmarks/task-revisions/mn-focused-regression-test/workspace/package.json +9 -0
- package/dist/benchmarks/task-revisions/mn-focused-regression-test/workspace/spec/session-key.md +7 -0
- package/dist/benchmarks/task-revisions/mn-focused-regression-test/workspace/src/session-key.mjs +12 -0
- package/dist/benchmarks/task-revisions/mn-focused-regression-test/workspace/test/session-key.test.mjs +11 -0
- package/dist/benchmarks/task-revisions/mn-frontend-default-fix/input-manifest.json +48 -0
- package/dist/benchmarks/task-revisions/mn-frontend-default-fix/rubric.json +45 -0
- package/dist/benchmarks/task-revisions/mn-frontend-default-fix/task.md +5 -0
- package/dist/benchmarks/task-revisions/mn-frontend-default-fix/workspace/package.json +7 -0
- package/dist/benchmarks/task-revisions/mn-frontend-default-fix/workspace/spec/default-state.md +14 -0
- package/dist/benchmarks/task-revisions/mn-frontend-default-fix/workspace/src/display-controls.mjs +6 -0
- package/dist/benchmarks/task-revisions/mn-frontend-default-fix/workspace/src/display-preferences.mjs +18 -0
- package/dist/benchmarks/task-revisions/mn-frontend-default-fix/workspace/test/display-preferences.test.mjs +54 -0
- package/dist/benchmarks/task-revisions/mn-schema-field-alignment/input-manifest.json +58 -0
- package/dist/benchmarks/task-revisions/mn-schema-field-alignment/rubric.json +45 -0
- package/dist/benchmarks/task-revisions/mn-schema-field-alignment/task.md +5 -0
- package/dist/benchmarks/task-revisions/mn-schema-field-alignment/workspace/package.json +7 -0
- package/dist/benchmarks/task-revisions/mn-schema-field-alignment/workspace/schemas/member.schema.json +12 -0
- package/dist/benchmarks/task-revisions/mn-schema-field-alignment/workspace/spec/member-contract.md +13 -0
- package/dist/benchmarks/task-revisions/mn-schema-field-alignment/workspace/spec/schema-alignment-plan.md +5 -0
- package/dist/benchmarks/task-revisions/mn-schema-field-alignment/workspace/src/member-export.mjs +3 -0
- package/dist/benchmarks/task-revisions/mn-schema-field-alignment/workspace/src/member-import.mjs +23 -0
- package/dist/benchmarks/task-revisions/mn-schema-field-alignment/workspace/test/member-record.test.mjs +36 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/input-manifest.json +82 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/rubric.json +52 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/task.md +7 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/workspace/docs/interaction-notes.md +11 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/workspace/notice-editor.html +31 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/workspace/package-lock.json +15 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/workspace/package.json +14 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/workspace/pr.diff +83 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/workspace/review.schema.json +57 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/workspace/scripts/validate-review.mjs +40 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/workspace/src/format-toolbar.html +10 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/workspace/src/format-toolbar.mjs +42 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/workspace/test/helpers/toolbar-fixture.mjs +19 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/workspace/test/integration/format-toolbar.test.mjs +16 -0
- package/dist/benchmarks/task-revisions/mp-accessibility-interaction-review/workspace/test/unit/format-toolbar.test.mjs +23 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/input-manifest.json +87 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/rubric.json +52 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/task.md +5 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/.github/workflows/pull-request.yml +23 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/ci/pull-request-314.log +22 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/docs/verification.md +9 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/package-lock.json +13 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/package.json +14 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/pr.diff +49 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/review.schema.json +61 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/scripts/upload-diagnostics.mjs +4 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/scripts/validate-review.mjs +40 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/src/checkout.mjs +6 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/src/quote-order.mjs +13 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/test/checkout/quote-order-contract.test.mjs +12 -0
- package/dist/benchmarks/task-revisions/mp-ci-evidence-gap/workspace/test/unit/quote-order.test.mjs +23 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/input-manifest.json +97 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/rubric.json +44 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/task.md +7 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/docs/migration-plan.md +21 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/docs/rollback-runbook.md +3 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/evidence/checkpoint-journal.ndjson +10 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/evidence/comparisons.ndjson +6 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/evidence/compatibility.json +25 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/evidence/outbox.ndjson +4 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/handoff.schema.json +216 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/operations/commands.json +71 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/operations/pages.json +134 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/operations/work-orders.json +39 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/package-lock.json +13 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/package.json +11 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/scripts/validate-handoff.mjs +63 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/state/grants.ndjson +5 -0
- package/dist/benchmarks/task-revisions/mp-data-migration-handoff/workspace/state/routing.json +22 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/input-manifest.json +77 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/rubric.json +44 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/task.md +5 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/workspace/docs/state-contract.md +14 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/workspace/package-lock.json +15 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/workspace/package.json +14 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/workspace/pr.diff +116 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/workspace/review.schema.json +57 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/workspace/scripts/validate-review.mjs +40 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/workspace/src/inbox-state.mjs +47 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/workspace/src/inbox-view.mjs +19 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/workspace/test/helpers/inbox-fixture.mjs +8 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/workspace/test/integration/inbox-view.test.mjs +32 -0
- package/dist/benchmarks/task-revisions/mp-frontend-state-review/workspace/test/unit/inbox-state.test.mjs +20 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/input-manifest.json +87 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/rubric.json +52 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/task.md +7 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/change-plan.schema.json +186 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/docs/change-request.md +9 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/docs/knowledge-policy.md +6 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/docs/rollback-policy.md +8 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/infra/alias.tf +11 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/infra/iam.tf +12 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/operations/commands.json +46 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/package-lock.json +15 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/package.json +12 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/plans/candidate-plan.json +15 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/plans/pre-apply-records.json +117 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/scripts/validate-change-plan.mjs +138 -0
- package/dist/benchmarks/task-revisions/mp-iac-rollback-design/workspace/state/current-state.json +23 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/input-manifest.json +97 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/rubric.json +44 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/task.md +7 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/docs/investigation-contract.md +14 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/investigation.schema.json +92 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/observability/cache-samples.csv +7 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/observability/release-events.json +14 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/observability/request-windows.csv +4 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/observability/runtime-profile.json +25 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/package-lock.json +15 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/package.json +15 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/scripts/replay-summary.mjs +12 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/scripts/validate-investigation.mjs +84 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/src/cache-key.mjs +6 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/src/summary-replay.mjs +42 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/src/summary-service.mjs +9 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/test/integration/summary-replay.test.mjs +11 -0
- package/dist/benchmarks/task-revisions/mp-performance-investigation/workspace/test/unit/cache-key.test.mjs +9 -0
- package/dist/benchmarks/task-revisions/pf-api-pagination-behavior/input-manifest.json +53 -0
- package/dist/benchmarks/task-revisions/pf-api-pagination-behavior/rubric.json +44 -0
- package/dist/benchmarks/task-revisions/pf-api-pagination-behavior/task.md +7 -0
- package/dist/benchmarks/task-revisions/pf-api-pagination-behavior/workspace/package.json +6 -0
- package/dist/benchmarks/task-revisions/pf-api-pagination-behavior/workspace/spec/pagination-contract.md +9 -0
- package/dist/benchmarks/task-revisions/pf-api-pagination-behavior/workspace/src/api-pages.mjs +16 -0
- package/dist/benchmarks/task-revisions/pf-api-pagination-behavior/workspace/src/catalog-consumer.mjs +5 -0
- package/dist/benchmarks/task-revisions/pf-api-pagination-behavior/workspace/src/pagination.mjs +19 -0
- package/dist/benchmarks/task-revisions/pf-api-pagination-behavior/workspace/test/pagination.test.mjs +76 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/input-manifest.json +77 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/rubric.json +44 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/task.md +11 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/workspace/ci/build-config.json +11 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/workspace/ci/build-history.log +6 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/workspace/ci/scenarios.json +38 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/workspace/docs/investigation-contract.md +19 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/workspace/investigation.schema.json +503 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/workspace/package.json +14 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/workspace/scripts/reproduce-cache.mjs +5 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/workspace/scripts/validate-report.mjs +31 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/workspace/src/cache-model.mjs +9 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/workspace/test/cache-observation.test.mjs +33 -0
- package/dist/benchmarks/task-revisions/pf-ci-cache-flake/workspace/test/report-structure.test.mjs +2 -0
- package/dist/benchmarks/task-revisions/pf-data-schema-evolution/input-manifest.json +68 -0
- package/dist/benchmarks/task-revisions/pf-data-schema-evolution/rubric.json +45 -0
- package/dist/benchmarks/task-revisions/pf-data-schema-evolution/task.md +11 -0
- package/dist/benchmarks/task-revisions/pf-data-schema-evolution/workspace/data/legacy-customers.json +17 -0
- package/dist/benchmarks/task-revisions/pf-data-schema-evolution/workspace/migrations/v1-v2.plan.json +11 -0
- package/dist/benchmarks/task-revisions/pf-data-schema-evolution/workspace/package.json +12 -0
- package/dist/benchmarks/task-revisions/pf-data-schema-evolution/workspace/schemas/customer-v1.schema.json +27 -0
- package/dist/benchmarks/task-revisions/pf-data-schema-evolution/workspace/schemas/customer-v2.schema.json +25 -0
- package/dist/benchmarks/task-revisions/pf-data-schema-evolution/workspace/spec/evolution-contract.md +8 -0
- package/dist/benchmarks/task-revisions/pf-data-schema-evolution/workspace/src/readers.mjs +3 -0
- package/dist/benchmarks/task-revisions/pf-data-schema-evolution/workspace/src/schema-contract.mjs +7 -0
- package/dist/benchmarks/task-revisions/pf-data-schema-evolution/workspace/test/schema-evolution.test.mjs +15 -0
- package/dist/benchmarks/task-revisions/pf-frontend-async-state/input-manifest.json +47 -0
- package/dist/benchmarks/task-revisions/pf-frontend-async-state/rubric.json +37 -0
- package/dist/benchmarks/task-revisions/pf-frontend-async-state/task.md +7 -0
- package/dist/benchmarks/task-revisions/pf-frontend-async-state/workspace/package.json +1 -0
- package/dist/benchmarks/task-revisions/pf-frontend-async-state/workspace/spec/search-state-contract.md +6 -0
- package/dist/benchmarks/task-revisions/pf-frontend-async-state/workspace/src/search-controller.mjs +5 -0
- package/dist/benchmarks/task-revisions/pf-frontend-async-state/workspace/src/search-view.mjs +3 -0
- package/dist/benchmarks/task-revisions/pf-frontend-async-state/workspace/test/search-state.test.mjs +14 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/input-manifest.json +90 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/rubric.json +42 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/task.md +9 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/config/migration-settings.json +5 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/data/compatibility-matrix.json +44 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/docs/migration-contract.md +13 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/package.json +13 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/scripts/check-rollback.mjs +5 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/scripts/validate-migration.mjs +2 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/src/archive-compat.mjs +2 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/src/download-export.mjs +5 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/src/scheduled-export.mjs +5 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/test/application-callers.test.mjs +19 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/test/archive-compat.test.mjs +13 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/vendor/archive-v1.mjs +3 -0
- package/dist/benchmarks/task-revisions/pf-library-compat-upgrade/workspace/vendor/archive-v2.mjs +3 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/input-manifest.json +88 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/rubric.json +45 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/task.md +11 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/base/projection-policy.json +14 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/config/field-contract.json +24 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/config/projection-policy.json +18 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/config/proposed-policy.json +18 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/data/events.json +80 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/docs/projection-contract.md +11 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/package.json +13 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/pr.diff +19 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/review.schema.json +120 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/scripts/trace-policy.mjs +1 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/scripts/validate-review.mjs +12 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/src/project-event.mjs +7 -0
- package/dist/benchmarks/task-revisions/pf-observability-redaction/workspace/test/project-event.test.mjs +3 -0
- package/dist/benchmarks/task-revisions/pf-performance-regression/input-manifest.json +62 -0
- package/dist/benchmarks/task-revisions/pf-performance-regression/rubric.json +45 -0
- package/dist/benchmarks/task-revisions/pf-performance-regression/task.md +11 -0
- package/dist/benchmarks/task-revisions/pf-performance-regression/workspace/data/measurement-config.json +21 -0
- package/dist/benchmarks/task-revisions/pf-performance-regression/workspace/docs/lookup-contract.md +11 -0
- package/dist/benchmarks/task-revisions/pf-performance-regression/workspace/package.json +12 -0
- package/dist/benchmarks/task-revisions/pf-performance-regression/workspace/reference/scan-lookup.mjs +7 -0
- package/dist/benchmarks/task-revisions/pf-performance-regression/workspace/scripts/generate-data.mjs +5 -0
- package/dist/benchmarks/task-revisions/pf-performance-regression/workspace/scripts/measure-lookup.mjs +103 -0
- package/dist/benchmarks/task-revisions/pf-performance-regression/workspace/src/event-lookup.mjs +7 -0
- package/dist/benchmarks/task-revisions/pf-performance-regression/workspace/test/event-lookup.test.mjs +17 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/input-manifest.json +87 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/rubric.json +44 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/task.md +11 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/base/response-adapter.mjs +10 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/comparisons/option-a.diff +10 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/comparisons/option-b.diff +11 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/data/cases.json +65 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/docs/error-contract.md +10 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/package.json +10 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/pr.diff +13 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/review.schema.json +407 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/scripts/trace-cases.mjs +7 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/scripts/validate-review.mjs +12 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/src/client-policy.mjs +8 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/src/response-adapter.mjs +10 -0
- package/dist/benchmarks/task-revisions/pf-review-error-contract/workspace/test/api-error.test.mjs +6 -0
- package/dist/benchmarks/task-revisions/rc01-shared-review-platform/input-manifest.json +808 -0
- package/dist/benchmarks/task-revisions/rc01-shared-review-platform/rubric.json +40 -0
- package/dist/bin/ask.mjs +9 -0
- package/dist/docs/README.md +80 -0
- package/dist/docs/adapter-capability-matrix.md +75 -0
- package/dist/docs/adapter-conformance-contract.md +81 -0
- package/dist/docs/adapter-cross-conformance-report.md +43 -0
- package/dist/docs/adapter-deployment-governance.md +110 -0
- package/dist/docs/adapter-runtime-boundary-contract.md +211 -0
- package/dist/docs/adapter-runtime-migration.md +130 -0
- package/dist/docs/adoption-apply.md +97 -0
- package/dist/docs/adoption-setup.md +150 -0
- package/dist/docs/adr/0001-verification-evidence-trust-boundary.md +100 -0
- package/dist/docs/adr/0002-epic-admission-work-package-plan-authority.md +76 -0
- package/dist/docs/adr/0003-asset-registry-authority-boundary.md +120 -0
- package/dist/docs/adr/0004-portfolio-activation-authority-boundary.md +290 -0
- package/dist/docs/adr/0005-evolution-authority-boundary.md +195 -0
- package/dist/docs/adr/0006-claim-evidence-status-boundary.md +57 -0
- package/dist/docs/adr/0007-runner-owned-execution-envelope-record.md +28 -0
- package/dist/docs/adr/0008-monotonic-verification-proof-path.md +122 -0
- package/dist/docs/adr/0009-baseline-semantic-review-authority.md +74 -0
- package/dist/docs/adr/0010-one-task-effectiveness-authority-boundary.md +143 -0
- package/dist/docs/adr/0011-prompt-v2-result-blind-canary-authority.md +155 -0
- package/dist/docs/adr/0025-discarded-evaluation-result-use.md +31 -0
- package/dist/docs/agent-session-state-contract.md +67 -0
- package/dist/docs/ai/adoption-report-template.md +179 -0
- package/dist/docs/ai/architecture-decision-memory.md +83 -0
- package/dist/docs/ai/documentation-knowledge-ledger.md +85 -0
- package/dist/docs/ai/domain-rule-ledger.md +115 -0
- package/dist/docs/ai/engineering-capability-ledger.md +90 -0
- package/dist/docs/ai/engineering-pattern-ledger.md +81 -0
- package/dist/docs/ai/implementation-context.md +158 -0
- package/dist/docs/ai/improvement-ledger.md +212 -0
- package/dist/docs/ai/metrics/README.md +9 -0
- package/dist/docs/ai/metrics/fixtures/stakeholder-readiness-events.jsonl +3 -0
- package/dist/docs/ai/observability-config.yml +54 -0
- package/dist/docs/ai/reports/README.md +5 -0
- package/dist/docs/ai/reports/examples/ai-promotion-readiness-sample.md +43 -0
- package/dist/docs/ai/reports/examples/business-unit-client-value-readiness-sample.md +37 -0
- package/dist/docs/ai/reports/examples/development-manager-readiness-sample.md +41 -0
- package/dist/docs/ai/reports/examples/senior-engineer-readiness-sample.md +42 -0
- package/dist/docs/ai/review-context.md +127 -0
- package/dist/docs/ai/review-rule-ledger.md +78 -0
- package/dist/docs/ai/skill-adoption-metrics.md +251 -0
- package/dist/docs/ai/stakeholder-readiness-report-template.md +139 -0
- package/dist/docs/ai/verification-pattern-ledger.md +83 -0
- package/dist/docs/ask-autonomous-development.md +237 -0
- package/dist/docs/ask-core-bundle-implementation.md +155 -0
- package/dist/docs/asset-registry-contract.md +392 -0
- package/dist/docs/bounded-target-snapshot.md +90 -0
- package/dist/docs/claim-evidence-status-contract.md +60 -0
- package/dist/docs/claude-github-review-setup.md +65 -0
- package/dist/docs/codex-metrics-collector.md +149 -0
- package/dist/docs/cross-runtime-environment-loop.md +345 -0
- package/dist/docs/customization-guide.md +175 -0
- package/dist/docs/debt-lifecycle-contract.md +134 -0
- package/dist/docs/demos/personal-loop-saved-demo-ja.md +38 -0
- package/dist/docs/epic-admission-work-package-plan-contract.md +239 -0
- package/dist/docs/evaluation-task-catalog.md +107 -0
- package/dist/docs/evolution-loop-contract.md +395 -0
- package/dist/docs/evolution-loop-sample-prompt-candidate.md +15 -0
- package/dist/docs/execution-envelope-contract.md +105 -0
- package/dist/docs/finding-intake.md +165 -0
- package/dist/docs/first-workflow-mac-codex-ja.md +132 -0
- package/dist/docs/fixtures/adapter-cross-conformance.json +272 -0
- package/dist/docs/fixtures/adapter-runtime-bundle.json +867 -0
- package/dist/docs/fixtures/adapter-runtime-evidence.json +111 -0
- package/dist/docs/fixtures/adapter-runtime-profiles.json +2055 -0
- package/dist/docs/fixtures/asset-registry/reference.json +89 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/06/cacaea5b7b84bb2a9f6a6e849f1e561967637cfc0c28bd60675b665f090a54.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/0a/1bf5ec027954e2def2bf6591655365258e4ed6c3e58a151ea242b961591dcc.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/12/4a398892b63295e43b894776bea049625e3847010acd2dce61880a207cf1da.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/33/d26707d82e68099085b91f60b26b6bea6ea17af802a493dd70ee4629dfc72b.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/34/a511af596bc1317941241135f053153d9862ff7552a243c0231fc079c4edba.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/39/f30afcc78d50c1ff2cf85d4c18d546b47811c370146193535af08cc030cc65.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/43/e18c25bca6279ab7b333b5e4ce3bfdc8ada01023bfe47d0889d61e71872c56.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/5b/50712f43feecf82d532178310cf2e0fe2fe709e0d951eb797a3876ff0cf92d.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/5c/c2ab9ca47824d2d13438f7f4460b71db1a6f939cfce1b0f84291e3e5935be5.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/62/1237eed65b92d996a11b259d7ef8854357c9fd1e7170071d59c4f50f4e7b3e.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/9b/fd6af3c3768f8760fb1fe8b8ab98e6d4753d4802e38f7604b446dc7b14a95a.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/be/c5d5f8f9ee2f8fdab1902f73888b251eb9e62e55bef3529542ab0deb8a48e2.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/c6/19c6c426da2f6fac9185c2426908ea83ff1598e5e9af7add61f509678a5853.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/d6/e6ac3acac3ee396987fd0333b6193c809156c88eb343b43c9e0b0c72fbe1c5.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/d9/6f3131c5d6556d2fa74665befef66c0d279dd1177dc6d41f232f2844eafba6.json +1 -0
- package/dist/docs/fixtures/asset-registry/store/objects/sha256/f4/6abf273daaaf13cc96c10e54d2de72ba8cd269a58d1ea047331c38ba13dc18.json +1 -0
- package/dist/docs/fixtures/claude-fixed-entry-route-baseline.json +36 -0
- package/dist/docs/fixtures/claude-pre-fixed-commands/skill-handoff.md +32 -0
- package/dist/docs/fixtures/claude-pre-fixed-commands/skill-implement.md +30 -0
- package/dist/docs/fixtures/claude-pre-fixed-commands/skill-investigate.md +25 -0
- package/dist/docs/fixtures/claude-pre-fixed-commands/skill-review.md +54 -0
- package/dist/docs/fixtures/claude-pre-fixed-commands/skill-verify.md +36 -0
- package/dist/docs/fixtures/codex-compact-route-baseline.json +42 -0
- package/dist/docs/fixtures/codex-pre-compact-prompts/skill-handoff.md +43 -0
- package/dist/docs/fixtures/codex-pre-compact-prompts/skill-implement.md +55 -0
- package/dist/docs/fixtures/codex-pre-compact-prompts/skill-investigate.md +55 -0
- package/dist/docs/fixtures/codex-pre-compact-prompts/skill-review.md +68 -0
- package/dist/docs/fixtures/codex-pre-compact-prompts/skill-verify.md +55 -0
- package/dist/docs/fixtures/epic-admission-policy.json +50 -0
- package/dist/docs/fixtures/epic-admission-work-package-plan-cases.json +766 -0
- package/dist/docs/fixtures/evolution-loop/reference.json +551 -0
- package/dist/docs/fixtures/first-workflow-315/bypass-input-ja.md +2 -0
- package/dist/docs/fixtures/first-workflow-315/implementation-input-ja.md +15 -0
- package/dist/docs/fixtures/issue-275-slice-1-epic-admission-decision.json +86 -0
- package/dist/docs/fixtures/issue-275-slice-1-work-package-plan-r1.json +1053 -0
- package/dist/docs/fixtures/issue-275-slice-1-work-package-plan-r2.json +1078 -0
- package/dist/docs/fixtures/issue-275-slice-1-work-package-plan-validation-context-r1.json +81 -0
- package/dist/docs/fixtures/issue-275-slice-1-work-package-plan-validation-context-r2.json +117 -0
- package/dist/docs/fixtures/issue-275-slice-1-work-package-plan-validation-context.json +117 -0
- package/dist/docs/fixtures/issue-275-slice-1-work-package-plan.json +1126 -0
- package/dist/docs/fixtures/kernel-principles-source-5f36081.md +266 -0
- package/dist/docs/fixtures/lifecycle-artifact-chains.json +108 -0
- package/dist/docs/fixtures/lifecycle-traceability-chains.json +356 -0
- package/dist/docs/fixtures/portfolio-manager/reference.json +70 -0
- package/dist/docs/fixtures/pragmatic-evaluation/notes-template.json +39 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/binding.json +170 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/reference.json +397 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/rendered/claude_code/skill-handoff.md +32 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/rendered/claude_code/skill-implement.md +38 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/rendered/claude_code/skill-investigate.md +35 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/rendered/claude_code/skill-review.md +49 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/rendered/claude_code/skill-verify.md +43 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/rendered/codex/skill-handoff.md +29 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/rendered/codex/skill-implement.md +34 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/rendered/codex/skill-investigate.md +33 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/rendered/codex/skill-review.md +50 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/rendered/codex/skill-verify.md +34 -0
- package/dist/docs/fixtures/prompt-v2-preregistration/rendered/reference.json +94 -0
- package/dist/docs/fixtures/release-evidence-gate/current-main-756c72-claim-matrix.json +74 -0
- package/dist/docs/fixtures/release-evidence-gate/current-main-756c72-evidence.json +30 -0
- package/dist/docs/fixtures/release-evidence-gate/current-main-d4ad39-claim-matrix.json +389 -0
- package/dist/docs/fixtures/release-evidence-gate/current-main-d4ad39-evidence.json +1024 -0
- package/dist/docs/fixtures/release-evidence-gate/current-main-d4ad39-independent-review.md +95 -0
- package/dist/docs/fixtures/release-evidence-gate/current-main-d4ad39-observations.json +87 -0
- package/dist/docs/fixtures/release-evidence-gate/mac-install-recovery-candidate.json +232 -0
- package/dist/docs/fixtures/release-evidence-gate/mac-install-recovery-review.md +112 -0
- package/dist/docs/fixtures/review-route-cases.json +830 -0
- package/dist/docs/fixtures/skill-effectiveness-outcome-cases.json +549 -0
- package/dist/docs/fixtures/sufficient-change-scope/stage-1.md +51 -0
- package/dist/docs/fixtures/sufficient-change-scope/stage-2.md +30 -0
- package/dist/docs/fixtures/ui-ux-design/README.md +36 -0
- package/dist/docs/fixtures/ui-ux-design/fixture-state.mjs +140 -0
- package/dist/docs/fixtures/ui-ux-design/fixture-state.test.mjs +171 -0
- package/dist/docs/fixtures/ui-ux-design/fixture.mjs +154 -0
- package/dist/docs/fixtures/verification-proof-formal-baseline.md +14 -0
- package/dist/docs/fixtures/verification-proof-policy-cases.json +906 -0
- package/dist/docs/glossary-ja.md +433 -0
- package/dist/docs/instruction-improvement-continuity.md +237 -0
- package/dist/docs/instruction-improvement-delivery.md +130 -0
- package/dist/docs/instruction-improvement-learning-context.md +118 -0
- package/dist/docs/instruction-improvement-readiness.md +116 -0
- package/dist/docs/instruction-loop-failed-preparation.md +45 -0
- package/dist/docs/instruction-loop-fixed-reference-scoring.md +57 -0
- package/dist/docs/instruction-loop-host-authoring.md +83 -0
- package/dist/docs/instruction-loop-reference-evidence.md +185 -0
- package/dist/docs/instruction-loop-retained-authoring.md +115 -0
- package/dist/docs/instruction-loop-source-application.md +110 -0
- package/dist/docs/instruction-loop-source-validation.md +65 -0
- package/dist/docs/instruction-loop-standard-execution.md +101 -0
- package/dist/docs/kernel-principles-candidate-v2.md +124 -0
- package/dist/docs/kernel-principles-comparison.md +135 -0
- package/dist/docs/kernel-principles-v2-adoption.md +118 -0
- package/dist/docs/kernel-standalone-design-proposal.md +198 -0
- package/dist/docs/kernel-standalone-instruction-draft.md +206 -0
- package/dist/docs/lifecycle-artifact-contract.md +274 -0
- package/dist/docs/lifecycle-traceability-contract.md +169 -0
- package/dist/docs/local-codex-admission.md +177 -0
- package/dist/docs/local-codex-connection.md +60 -0
- package/dist/docs/local-codex-read-policy.md +210 -0
- package/dist/docs/local-codex-single-sandbox-design.md +73 -0
- package/dist/docs/local-eval-distribution.md +222 -0
- package/dist/docs/local-full-static-preparation.md +137 -0
- package/dist/docs/local-three-arm-comparison.md +142 -0
- package/dist/docs/local-three-arm-qualification.md +89 -0
- package/dist/docs/mac-ask-full-reference-supplement.json +249 -0
- package/dist/docs/mac-ask-full-static-inventory.json +1488 -0
- package/dist/docs/mac-kernel-value-screening.md +253 -0
- package/dist/docs/measured-review-adoption.md +88 -0
- package/dist/docs/metrics-event-contract.md +252 -0
- package/dist/docs/npm-distribution-ja.md +133 -0
- package/dist/docs/npm-distribution.md +300 -0
- package/dist/docs/npm-loop-spec-example.mjs +34 -0
- package/dist/docs/observability-runtime-contract.md +164 -0
- package/dist/docs/operation-automation-contract.md +89 -0
- package/dist/docs/personal-evolution-bridge.md +33 -0
- package/dist/docs/personal-evolution-cli.md +238 -0
- package/dist/docs/personal-evolution-codex-generation.md +166 -0
- package/dist/docs/personal-evolution-driver.md +15 -0
- package/dist/docs/personal-evolution-generation-connector.md +139 -0
- package/dist/docs/personal-evolution-generation-status.md +86 -0
- package/dist/docs/personal-evolution-generation.md +31 -0
- package/dist/docs/personal-evolution-primary-loop.md +241 -0
- package/dist/docs/personal-evolution-primary-pair-contract.md +72 -0
- package/dist/docs/personal-evolution-saved-results.md +31 -0
- package/dist/docs/personal-evolution-source-reviewer.md +84 -0
- package/dist/docs/personal-evolution-unattended.md +169 -0
- package/dist/docs/personal-loop-quickstart-ja.md +79 -0
- package/dist/docs/personal-v1-release-preparation-ja.md +41 -0
- package/dist/docs/portfolio-manager-contract.md +596 -0
- package/dist/docs/practical-challenge-evaluation.md +273 -0
- package/dist/docs/practical-evaluation-recovery.md +487 -0
- package/dist/docs/practical-grade-supplement.md +193 -0
- package/dist/docs/practical-partial-grading.md +121 -0
- package/dist/docs/practical-quality-observations.md +69 -0
- package/dist/docs/practical-retained-grade-report.md +106 -0
- package/dist/docs/pragmatic-evaluation.md +149 -0
- package/dist/docs/primary-24-practical-review.md +281 -0
- package/dist/docs/primary-24-practical-revision.md +256 -0
- package/dist/docs/primary-24-private-v2.md +28 -0
- package/dist/docs/primary-24-task-assembly.md +276 -0
- package/dist/docs/primary-24-unsafe-action-v8.md +28 -0
- package/dist/docs/primary-evaluation-correctness-v7.md +188 -0
- package/dist/docs/primary-principles-v2-connection.md +88 -0
- package/dist/docs/project-overlay-template.md +152 -0
- package/dist/docs/prompt-recipes-ja.md +955 -0
- package/dist/docs/prompt-v2-execution-handoff.md +81 -0
- package/dist/docs/quality-rubric.md +145 -0
- package/dist/docs/quickstart-ja.md +388 -0
- package/dist/docs/quickstart-mac-codex-ja.md +160 -0
- package/dist/docs/references.md +18 -0
- package/dist/docs/release-evidence-gate-contract.md +198 -0
- package/dist/docs/release-package-2026-10.md +129 -0
- package/dist/docs/review-finding-contract.md +54 -0
- package/dist/docs/review-rule-lifecycle.md +205 -0
- package/dist/docs/routing-model.md +274 -0
- package/dist/docs/rule-batch-prospective-comparison.md +88 -0
- package/dist/docs/skill-effectiveness-evaluation-contract.md +146 -0
- package/dist/docs/skill-matrix.md +190 -0
- package/dist/docs/stack-implementation-overlay-contract.md +122 -0
- package/dist/docs/sufficient-change-scope-evaluation.md +120 -0
- package/dist/docs/supervised-instruction-loop.md +464 -0
- package/dist/docs/unattended-user-comparison-contract.md +90 -0
- package/dist/docs/usage-ja.md +501 -0
- package/dist/docs/user-comparison-contract.md +75 -0
- package/dist/docs/user-repository-comparison-mac-codex-ja.md +571 -0
- package/dist/docs/validation-report.md +756 -0
- package/dist/docs/verification-evidence-contract.md +175 -0
- package/dist/docs/verification-proof-policy-contract.md +177 -0
- package/dist/docs/verification-reuse-completion-contract.md +129 -0
- package/dist/docs/verification-reuse-measurement.md +130 -0
- package/dist/docs/workflow-examples.md +539 -0
- package/dist/examples/01-small-change.md +32 -0
- package/dist/examples/02-new-feature.md +53 -0
- package/dist/examples/03-bug-fix.md +39 -0
- package/dist/examples/04-design-grill.md +40 -0
- package/dist/examples/05-pr-review.md +43 -0
- package/dist/examples/06-handoff-to-agent.md +49 -0
- package/dist/examples/07-mr-readme.md +32 -0
- package/dist/examples/08-code-health-review.md +50 -0
- package/dist/examples/09-improvement-ledger-update.md +90 -0
- package/dist/examples/10-safe-refactor.md +76 -0
- package/dist/examples/11-prevention-rule-feedback.md +104 -0
- package/dist/examples/12-claude-adapter-adoption.md +36 -0
- package/dist/manifest.json +804 -0
- package/dist/npm-runtime-inventory.json +7774 -0
- package/dist/package.json +38 -0
- package/dist/products/ask-core-bundle/AGENTS.md +195 -0
- package/dist/products/ask-core-bundle/capabilities.json +65 -0
- package/dist/products/ask-core-bundle/manifest.json +2738 -0
- package/dist/schemas/adapter-runtime-event.schema.json +169 -0
- package/dist/schemas/adapter-runtime-evidence.schema.json +60 -0
- package/dist/schemas/adapter-runtime-profile.schema.json +281 -0
- package/dist/schemas/adoption-apply-result.schema.json +215 -0
- package/dist/schemas/adoption-plan.schema.json +366 -0
- package/dist/schemas/adoption-report.schema.json +252 -0
- package/dist/schemas/architecture-decision-memory-entry.schema.json +56 -0
- package/dist/schemas/asset-content.schema.json +107 -0
- package/dist/schemas/asset-lifecycle-authority-context.schema.json +69 -0
- package/dist/schemas/asset-record.schema.json +362 -0
- package/dist/schemas/asset-registry-snapshot.schema.json +59 -0
- package/dist/schemas/claim-evidence-status.schema.json +85 -0
- package/dist/schemas/codex-risk-action.schema.json +58 -0
- package/dist/schemas/codex-risk-approval-request.schema.json +204 -0
- package/dist/schemas/codex-risk-approval.schema.json +15 -0
- package/dist/schemas/codex-runner-result.schema.json +41 -0
- package/dist/schemas/compact-profile-control-map.json +154 -0
- package/dist/schemas/context-rollover.schema.json +726 -0
- package/dist/schemas/documentation-knowledge-ledger-entry.schema.json +49 -0
- package/dist/schemas/domain-rule-ledger-entry.schema.json +93 -0
- package/dist/schemas/effectiveness-decision-vocabulary.schema.json +24 -0
- package/dist/schemas/engineering-capability-ledger-entry.schema.json +50 -0
- package/dist/schemas/engineering-pattern-ledger-entry.schema.json +48 -0
- package/dist/schemas/epic-admission-decision.schema.json +196 -0
- package/dist/schemas/epic-admission-policy.schema.json +153 -0
- package/dist/schemas/evolution-action-proposal.schema.json +183 -0
- package/dist/schemas/evolution-application-receipt.schema.json +263 -0
- package/dist/schemas/evolution-candidate.schema.json +269 -0
- package/dist/schemas/evolution-experiment.schema.json +368 -0
- package/dist/schemas/evolution-human-decision.schema.json +79 -0
- package/dist/schemas/evolution-recommendation.schema.json +211 -0
- package/dist/schemas/execution-envelope-record.schema.json +127 -0
- package/dist/schemas/execution-envelope.schema.json +127 -0
- package/dist/schemas/fixed-entry-profile-registry.json +44 -0
- package/dist/schemas/improvement-ledger-entry.schema.json +98 -0
- package/dist/schemas/instruction-asset-package.schema.json +343 -0
- package/dist/schemas/metrics-event.schema.json +395 -0
- package/dist/schemas/normalized-event-schema-registry.json +13 -0
- package/dist/schemas/portfolio-authority-context.schema.json +151 -0
- package/dist/schemas/portfolio-lock.schema.json +99 -0
- package/dist/schemas/portfolio-manifest.schema.json +414 -0
- package/dist/schemas/portfolio-selection-context.schema.json +101 -0
- package/dist/schemas/portfolio-selection.schema.json +266 -0
- package/dist/schemas/release-assessment.schema.json +64 -0
- package/dist/schemas/release-claim-matrix.schema.json +89 -0
- package/dist/schemas/release-evidence-catalog.schema.json +154 -0
- package/dist/schemas/repository-snapshot.schema.json +244 -0
- package/dist/schemas/review-finding.schema.json +110 -0
- package/dist/schemas/review-rule-ledger-entry.schema.json +52 -0
- package/dist/schemas/review-signal-gate-map.json +128 -0
- package/dist/schemas/rollover-evaluation.schema.json +397 -0
- package/dist/schemas/session-checkpoint.schema.json +206 -0
- package/dist/schemas/skill-effectiveness-outcome.schema.json +490 -0
- package/dist/schemas/verification-completion-policy.schema.json +79 -0
- package/dist/schemas/verification-evidence-transfer.schema.json +67 -0
- package/dist/schemas/verification-evidence.schema.json +352 -0
- package/dist/schemas/verification-pattern-ledger-entry.schema.json +52 -0
- package/dist/schemas/verification-proof-policy.schema.json +326 -0
- package/dist/schemas/verification-reuse-measurement.schema.json +370 -0
- package/dist/schemas/verification-reuse-plan.schema.json +239 -0
- package/dist/schemas/verification-scoped-reuse.schema.json +484 -0
- package/dist/schemas/work-package-plan-validation-context.schema.json +244 -0
- package/dist/schemas/work-package-plan.schema.json +495 -0
- package/dist/scripts/adapter-cross-conformance.mjs +431 -0
- package/dist/scripts/adapter-runtime-bundle.mjs +452 -0
- package/dist/scripts/adapter-runtime-event.mjs +233 -0
- package/dist/scripts/adapter-runtime-inventory.mjs +69 -0
- package/dist/scripts/adapter-runtime-smoke.mjs +372 -0
- package/dist/scripts/ai-ledger-refresh.mjs +387 -0
- package/dist/scripts/ai-metrics-record.mjs +1318 -0
- package/dist/scripts/ai-metrics-summarize.mjs +1085 -0
- package/dist/scripts/ask-benchmark-admission-decision.mjs +675 -0
- package/dist/scripts/ask-benchmark-atomic-publication.mjs +85 -0
- package/dist/scripts/ask-benchmark-calibration-source.mjs +49 -0
- package/dist/scripts/ask-benchmark-command-evidence.mjs +1048 -0
- package/dist/scripts/ask-benchmark-design-admission.mjs +524 -0
- package/dist/scripts/ask-benchmark-design-review.mjs +387 -0
- package/dist/scripts/ask-benchmark-duplicate-key-json.mjs +133 -0
- package/dist/scripts/ask-benchmark-evaluator-boundary.mjs +3869 -0
- package/dist/scripts/ask-benchmark-execution.mjs +2442 -0
- package/dist/scripts/ask-benchmark-materialize.mjs +582 -0
- package/dist/scripts/ask-benchmark-mn-build-option-update.mjs +506 -0
- package/dist/scripts/ask-benchmark-mn-client-probe-v2.mjs +185 -0
- package/dist/scripts/ask-benchmark-mn-focused-probe-v2.mjs +318 -0
- package/dist/scripts/ask-benchmark-mn-focused-regression-test.mjs +168 -0
- package/dist/scripts/ask-benchmark-mp-ci-evidence-gap.mjs +167 -0
- package/dist/scripts/ask-benchmark-normalized-results.mjs +884 -0
- package/dist/scripts/ask-benchmark-pf-performance-probe.mjs +342 -0
- package/dist/scripts/ask-benchmark-pf-performance-source.mjs +248 -0
- package/dist/scripts/ask-benchmark-plan.mjs +284 -0
- package/dist/scripts/ask-benchmark-portfolio-aggregate-result-v2.mjs +929 -0
- package/dist/scripts/ask-benchmark-portfolio-aggregate-result.mjs +354 -0
- package/dist/scripts/ask-benchmark-portfolio-catalog.mjs +378 -0
- package/dist/scripts/ask-benchmark-portfolio-consumer-report.mjs +193 -0
- package/dist/scripts/ask-benchmark-portfolio-directional-outcome-report.mjs +274 -0
- package/dist/scripts/ask-benchmark-portfolio-evolution-evidence.mjs +169 -0
- package/dist/scripts/ask-benchmark-portfolio-high-impact-sensitivity.mjs +209 -0
- package/dist/scripts/ask-benchmark-portfolio-legacy-calibration-migration.mjs +383 -0
- package/dist/scripts/ask-benchmark-portfolio-mechanism-scorecard.mjs +382 -0
- package/dist/scripts/ask-benchmark-portfolio-paired-comparison-report.mjs +460 -0
- package/dist/scripts/ask-benchmark-portfolio-policy.mjs +1809 -0
- package/dist/scripts/ask-benchmark-portfolio-repetition-report.mjs +314 -0
- package/dist/scripts/ask-benchmark-portfolio-result-set.mjs +664 -0
- package/dist/scripts/ask-benchmark-portfolio-score.mjs +541 -0
- package/dist/scripts/ask-benchmark-private-evaluator-runner.mjs +615 -0
- package/dist/scripts/ask-benchmark-prompt-successor-bridge.mjs +234 -0
- package/dist/scripts/ask-benchmark-prompt-successor-check.mjs +68 -0
- package/dist/scripts/ask-benchmark-prompt-successor-collection.mjs +113 -0
- package/dist/scripts/ask-benchmark-prompt-successor-control.mjs +115 -0
- package/dist/scripts/ask-benchmark-prompt-successor-delivery.mjs +270 -0
- package/dist/scripts/ask-benchmark-prompt-successor-measured-authority.mjs +249 -0
- package/dist/scripts/ask-benchmark-prompt-successor-measured-execution.mjs +733 -0
- package/dist/scripts/ask-benchmark-prompt-successor-native.mjs +137 -0
- package/dist/scripts/ask-benchmark-prompt-successor-provenance.mjs +191 -0
- package/dist/scripts/ask-benchmark-prompt-successor-report.mjs +256 -0
- package/dist/scripts/ask-benchmark-prompt-successor-repository.mjs +107 -0
- package/dist/scripts/ask-benchmark-prompt-successor-scoring-inputs.mjs +218 -0
- package/dist/scripts/ask-benchmark-prompt-successor-usage.mjs +174 -0
- package/dist/scripts/ask-benchmark-prompt-successor.mjs +263 -0
- package/dist/scripts/ask-benchmark-prompt-v2.mjs +1332 -0
- package/dist/scripts/ask-benchmark-runtime-observation.mjs +235 -0
- package/dist/scripts/ask-benchmark-schema.mjs +29 -0
- package/dist/scripts/ask-benchmark-scoring-contract.mjs +802 -0
- package/dist/scripts/ask-benchmark-selection.mjs +387 -0
- package/dist/scripts/ask-benchmark-source-session.mjs +70 -0
- package/dist/scripts/ask-benchmark-stable-file.mjs +89 -0
- package/dist/scripts/ask-benchmark-terminal-candidate.mjs +432 -0
- package/dist/scripts/ask-benchmark-terminal-workspace.mjs +427 -0
- package/dist/scripts/ask-comparison-conditions.mjs +8 -0
- package/dist/scripts/ask-core-bundle-product.mjs +93 -0
- package/dist/scripts/ask-core-capabilities.mjs +40 -0
- package/dist/scripts/ask-core-capture-producer.mjs +298 -0
- package/dist/scripts/ask-core-codex-native-contract.mjs +61 -0
- package/dist/scripts/ask-core-connected-normalizer.mjs +173 -0
- package/dist/scripts/ask-core-controller-attribution.mjs +74 -0
- package/dist/scripts/ask-core-controller-records.mjs +49 -0
- package/dist/scripts/ask-core-grading-authority.mjs +161 -0
- package/dist/scripts/ask-core-native-authority.mjs +42 -0
- package/dist/scripts/ask-core-native-compatibility-provenance.mjs +77 -0
- package/dist/scripts/ask-core-native-connection.mjs +76 -0
- package/dist/scripts/ask-core-native-files.mjs +16 -0
- package/dist/scripts/ask-core-native-preparation.mjs +61 -0
- package/dist/scripts/ask-core-native-receiver.mjs +91 -0
- package/dist/scripts/ask-core-producer-scope.mjs +38 -0
- package/dist/scripts/ask-core-runner-contract.mjs +65 -0
- package/dist/scripts/ask-core-scored-replay.mjs +12 -0
- package/dist/scripts/ask-core-task-admission.mjs +53 -0
- package/dist/scripts/ask-doctor.mjs +1037 -0
- package/dist/scripts/ask-local-codex-boundaries.mjs +141 -0
- package/dist/scripts/ask-local-codex-time-budget.mjs +119 -0
- package/dist/scripts/ask-local-codex-time-policy.mjs +4 -0
- package/dist/scripts/ask-local-codex-timing.mjs +46 -0
- package/dist/scripts/ask-local-codex.mjs +653 -0
- package/dist/scripts/ask-local-eval.mjs +101 -0
- package/dist/scripts/ask-package-cli.mjs +64 -0
- package/dist/scripts/ask-package-environment.mjs +10 -0
- package/dist/scripts/ask-package-loop-prepare.mjs +87 -0
- package/dist/scripts/ask-package-workspace.mjs +55 -0
- package/dist/scripts/ask-personal-evolution-alignment.mjs +126 -0
- package/dist/scripts/ask-personal-evolution-codex-generation.mjs +224 -0
- package/dist/scripts/ask-personal-evolution-driver.mjs +139 -0
- package/dist/scripts/ask-personal-evolution-generation-connector.mjs +316 -0
- package/dist/scripts/ask-personal-evolution-generation.mjs +122 -0
- package/dist/scripts/ask-personal-evolution-observation.mjs +71 -0
- package/dist/scripts/ask-personal-evolution-primary-pair.mjs +474 -0
- package/dist/scripts/ask-personal-evolution-saved-results.mjs +112 -0
- package/dist/scripts/ask-personal-evolution-source-reviewer.mjs +139 -0
- package/dist/scripts/ask-personal-evolution-unattended.mjs +206 -0
- package/dist/scripts/ask-personal-evolution.mjs +142 -0
- package/dist/scripts/ask-personal-prompt-adoption-materialization.mjs +126 -0
- package/dist/scripts/ask-personal-prompt-materialization.mjs +104 -0
- package/dist/scripts/ask-personal-prompt-repetition-binding.mjs +16 -0
- package/dist/scripts/ask-personal-prompt-repetition-evaluation.mjs +163 -0
- package/dist/scripts/ask-personal-prompt-repetition-statistics.mjs +53 -0
- package/dist/scripts/ask-personal-prompt-target-lock.mjs +34 -0
- package/dist/scripts/ask-pragmatic-evaluation-report.mjs +120 -0
- package/dist/scripts/ask-preparation-git-diagnostic.mjs +14 -0
- package/dist/scripts/ask-primary-client-focused-controller.mjs +119 -0
- package/dist/scripts/ask-primary-discovery-grammar-v9.mjs +105 -0
- package/dist/scripts/ask-primary-engineering-safety.mjs +147 -0
- package/dist/scripts/ask-primary-evaluation-batch.mjs +318 -0
- package/dist/scripts/ask-primary-evaluation-grading.mjs +451 -0
- package/dist/scripts/ask-primary-evaluation-private-grading.mjs +270 -0
- package/dist/scripts/ask-primary-evaluation-producer.mjs +549 -0
- package/dist/scripts/ask-primary-evaluation-profile.mjs +29 -0
- package/dist/scripts/ask-primary-evaluation-scope.mjs +531 -0
- package/dist/scripts/ask-primary-evaluation-start.mjs +34 -0
- package/dist/scripts/ask-primary-execution-input.mjs +299 -0
- package/dist/scripts/ask-primary-fixture-recipe.mjs +102 -0
- package/dist/scripts/ask-primary-fixture-registry.mjs +3 -0
- package/dist/scripts/ask-primary-metadata-task-contract.mjs +31 -0
- package/dist/scripts/ask-primary-native-probe-lifetime.mjs +233 -0
- package/dist/scripts/ask-primary-public-catalog-registry.mjs +13 -0
- package/dist/scripts/ask-primary-runtime-collection-support.mjs +5 -0
- package/dist/scripts/ask-primary-runtime-lineage.mjs +420 -0
- package/dist/scripts/ask-primary-runtime-v10.mjs +59 -0
- package/dist/scripts/ask-primary-scoring-version.mjs +269 -0
- package/dist/scripts/ask-primary-unsafe-action-contract.mjs +86 -0
- package/dist/scripts/ask-review-target-requirement.mjs +118 -0
- package/dist/scripts/ask-rule-batch-bundle.mjs +191 -0
- package/dist/scripts/ask-sensors.mjs +978 -0
- package/dist/scripts/ask-setup-apply-state.mjs +359 -0
- package/dist/scripts/ask-setup-apply.mjs +257 -0
- package/dist/scripts/ask-setup-diagnostics.mjs +45 -0
- package/dist/scripts/ask-setup-doctor-inputs.mjs +78 -0
- package/dist/scripts/ask-setup-git.mjs +130 -0
- package/dist/scripts/ask-setup-inputs.mjs +181 -0
- package/dist/scripts/ask-setup.mjs +762 -0
- package/dist/scripts/ask-shared.mjs +627 -0
- package/dist/scripts/ask-synthetic-json-pilot.mjs +561 -0
- package/dist/scripts/ask-user-comparison-logs.mjs +74 -0
- package/dist/scripts/ask-user-comparison-prepare.mjs +846 -0
- package/dist/scripts/ask-user-comparison-state.mjs +329 -0
- package/dist/scripts/ask-user-comparison-test-reporter.mjs +22 -0
- package/dist/scripts/ask-user-comparison.mjs +1087 -0
- package/dist/scripts/asset-registry.mjs +1002 -0
- package/dist/scripts/claim-evidence-status.mjs +162 -0
- package/dist/scripts/claude-fixed-entry-profile.mjs +218 -0
- package/dist/scripts/claude-native-runtime.mjs +108 -0
- package/dist/scripts/claude-plugin-fixed-entries.mjs +53 -0
- package/dist/scripts/codex-exec-runner.mjs +1479 -0
- package/dist/scripts/codex-metrics-collector.mjs +188 -0
- package/dist/scripts/codex-risk-approval.mjs +477 -0
- package/dist/scripts/codex-risk-workspace.mjs +585 -0
- package/dist/scripts/codex-runtime-profile.mjs +153 -0
- package/dist/scripts/content-addressed-store.mjs +379 -0
- package/dist/scripts/environment-evaluation.mjs +69 -0
- package/dist/scripts/environment-evolution-binding.mjs +66 -0
- package/dist/scripts/environment-saved-results.mjs +122 -0
- package/dist/scripts/environment-target-owner.mjs +103 -0
- package/dist/scripts/environment-target.mjs +260 -0
- package/dist/scripts/epic-admission-work-package-plan.mjs +2009 -0
- package/dist/scripts/evaluation-task-catalog.mjs +268 -0
- package/dist/scripts/evaluation-task-inputs.mjs +166 -0
- package/dist/scripts/evaluation-task-scoring.mjs +237 -0
- package/dist/scripts/evolution-loop.mjs +1773 -0
- package/dist/scripts/execution-envelope.mjs +293 -0
- package/dist/scripts/finding-intake.mjs +114 -0
- package/dist/scripts/fixed-entry-profile.mjs +239 -0
- package/dist/scripts/fixtures/ask-core-receiver-child.mjs +35 -0
- package/dist/scripts/fixtures/instruction-loop/fake-codex.py +6 -0
- package/dist/scripts/generate-ask-core-bundle.mjs +41 -0
- package/dist/scripts/generate-ask-core-grading-schemas.mjs +9 -0
- package/dist/scripts/generate-ask-primary-grading-schemas.mjs +226 -0
- package/dist/scripts/install-ask-core-bundle.mjs +117 -0
- package/dist/scripts/install-claude-adapter.mjs +1444 -0
- package/dist/scripts/install-codex-adapter.mjs +1578 -0
- package/dist/scripts/install-kernel.mjs +408 -0
- package/dist/scripts/installer-lifecycle.mjs +698 -0
- package/dist/scripts/instruction-asset-package.mjs +252 -0
- package/dist/scripts/instruction-composition.mjs +62 -0
- package/dist/scripts/instruction-environment-authoring.mjs +265 -0
- package/dist/scripts/instruction-environment-cli.mjs +129 -0
- package/dist/scripts/instruction-environment-compiler.mjs +92 -0
- package/dist/scripts/instruction-environment.mjs +148 -0
- package/dist/scripts/instruction-evaluation-recovery.mjs +86 -0
- package/dist/scripts/instruction-loop-artifact.mjs +6 -0
- package/dist/scripts/instruction-loop-assets.mjs +67 -0
- package/dist/scripts/instruction-loop-case-selection.mjs +31 -0
- package/dist/scripts/instruction-loop-command-runtime.mjs +108 -0
- package/dist/scripts/instruction-loop-component-candidate.mjs +116 -0
- package/dist/scripts/instruction-loop-component-continuation.mjs +61 -0
- package/dist/scripts/instruction-loop-component-runtime.mjs +151 -0
- package/dist/scripts/instruction-loop-environment-approval.mjs +51 -0
- package/dist/scripts/instruction-loop-failed-preparation.mjs +243 -0
- package/dist/scripts/instruction-loop-feedback.mjs +226 -0
- package/dist/scripts/instruction-loop-fixed-scoring.mjs +39 -0
- package/dist/scripts/instruction-loop-fixed-scoring.py +98 -0
- package/dist/scripts/instruction-loop-full-candidate.mjs +351 -0
- package/dist/scripts/instruction-loop-host-authoring.mjs +66 -0
- package/dist/scripts/instruction-loop-host-scoring.mjs +110 -0
- package/dist/scripts/instruction-loop-measured-adoption.mjs +106 -0
- package/dist/scripts/instruction-loop-native-configuration.mjs +150 -0
- package/dist/scripts/instruction-loop-native-host.mjs +229 -0
- package/dist/scripts/instruction-loop-native-prepare.py +107 -0
- package/dist/scripts/instruction-loop-native-public-inputs.mjs +52 -0
- package/dist/scripts/instruction-loop-native-worker.mjs +10 -0
- package/dist/scripts/instruction-loop-normal-owner-worker.mjs +97 -0
- package/dist/scripts/instruction-loop-operation.mjs +108 -0
- package/dist/scripts/instruction-loop-practical-runtime.mjs +188 -0
- package/dist/scripts/instruction-loop-provider-policy.mjs +23 -0
- package/dist/scripts/instruction-loop-reference-evidence.mjs +95 -0
- package/dist/scripts/instruction-loop-reference-preparation.mjs +138 -0
- package/dist/scripts/instruction-loop-reference-report.mjs +84 -0
- package/dist/scripts/instruction-loop-reference-scoring-runtime.mjs +48 -0
- package/dist/scripts/instruction-loop-result-disposition.mjs +26 -0
- package/dist/scripts/instruction-loop-retained-authoring.mjs +125 -0
- package/dist/scripts/instruction-loop-runtime.mjs +8 -0
- package/dist/scripts/instruction-loop-source-application.mjs +106 -0
- package/dist/scripts/instruction-loop-source-binding.mjs +37 -0
- package/dist/scripts/instruction-projection-paths.mjs +16 -0
- package/dist/scripts/instruction-run-journal.mjs +45 -0
- package/dist/scripts/instruction-source-version.mjs +104 -0
- package/dist/scripts/json-schema-validation.mjs +419 -0
- package/dist/scripts/kernel-principles-candidate-v2.mjs +71 -0
- package/dist/scripts/kernel-principles-v2-catalog24.mjs +86 -0
- package/dist/scripts/kernel-principles-v2.mjs +122 -0
- package/dist/scripts/kernel-principles.mjs +81 -0
- package/dist/scripts/local-codex-probe-worker.mjs +143 -0
- package/dist/scripts/observability-paths.mjs +31 -0
- package/dist/scripts/portfolio-manager.mjs +1870 -0
- package/dist/scripts/practical-challenge-evaluation.mjs +194 -0
- package/dist/scripts/practical-challenge-worker.mjs +126 -0
- package/dist/scripts/practical-codex-adapter.mjs +107 -0
- package/dist/scripts/practical-evaluation-assessor.mjs +92 -0
- package/dist/scripts/practical-evaluation-cli.mjs +134 -0
- package/dist/scripts/practical-evaluation-runner.mjs +261 -0
- package/dist/scripts/practical-evaluation-worker.mjs +193 -0
- package/dist/scripts/practical-grade-report-revision.mjs +12 -0
- package/dist/scripts/practical-grade-source-binding.mjs +53 -0
- package/dist/scripts/practical-grade-supplement.mjs +457 -0
- package/dist/scripts/practical-host-reporting-policy.mjs +85 -0
- package/dist/scripts/practical-initialization-clearance.mjs +143 -0
- package/dist/scripts/practical-initialization-recovery-cli.mjs +44 -0
- package/dist/scripts/practical-isolated-grade-continuation-cli.mjs +19 -0
- package/dist/scripts/practical-isolated-grade-continuation.mjs +179 -0
- package/dist/scripts/practical-primary-grading.mjs +130 -0
- package/dist/scripts/practical-quality-observation.mjs +61 -0
- package/dist/scripts/practical-reporting-grader.mjs +160 -0
- package/dist/scripts/practical-reporting-policy.mjs +126 -0
- package/dist/scripts/practical-retained-grade-report-cli.mjs +19 -0
- package/dist/scripts/practical-retained-grade-report.mjs +80 -0
- package/dist/scripts/practical-saved-command-observation.mjs +159 -0
- package/dist/scripts/practical-session-usage.mjs +73 -0
- package/dist/scripts/prepare-historical-full-test-root.mjs +155 -0
- package/dist/scripts/prompt-v2-historical-renderer.mjs +61 -0
- package/dist/scripts/prompt-v2-preregistration-samples.mjs +1410 -0
- package/dist/scripts/release-evidence-gate.mjs +421 -0
- package/dist/scripts/retained-instruction-comparison.mjs +154 -0
- package/dist/scripts/retained-instruction-layout.mjs +103 -0
- package/dist/scripts/review-route-contract.mjs +135 -0
- package/dist/scripts/review-rule-lifecycle.mjs +171 -0
- package/dist/scripts/saved-instruction-pair-evidence.mjs +37 -0
- package/dist/scripts/skill-assets.mjs +48 -0
- package/dist/scripts/skill-effectiveness-outcome.mjs +501 -0
- package/dist/scripts/skill-usage-evidence.mjs +80 -0
- package/dist/scripts/supervised-instruction-loop-cli.mjs +180 -0
- package/dist/scripts/supervised-instruction-loop.mjs +392 -0
- package/dist/scripts/verification-decision-core.mjs +248 -0
- package/dist/scripts/verification-evidence.mjs +754 -0
- package/dist/scripts/verification-host-provider.mjs +61 -0
- package/dist/scripts/verification-proof-policy.mjs +318 -0
- package/dist/scripts/verification-reuse-completion.mjs +338 -0
- package/dist/scripts/verification-review-dispatch.mjs +144 -0
- package/dist/scripts/verification-scoped-reuse.mjs +993 -0
- package/dist/skills/adr-review/SKILL.md +108 -0
- package/dist/skills/angular-implementation-architecture/SKILL.md +187 -0
- package/dist/skills/application-boundary-architecture/SKILL.md +412 -0
- package/dist/skills/architecture-decision-memory/SKILL.md +102 -0
- package/dist/skills/code-visualization/SKILL.md +24 -0
- package/dist/skills/code-visualization/references/examples/pr497.json +328 -0
- package/dist/skills/code-visualization/references/examples/skill-assets.json +257 -0
- package/dist/skills/code-visualization/references/guide-input.md +48 -0
- package/dist/skills/code-visualization/references/render-guide.mjs +238 -0
- package/dist/skills/code-visualization/references/scene-model.mjs +96 -0
- package/dist/skills/code-visualization/references/visual-player.js +346 -0
- package/dist/skills/code-visualization/references/visual-surface.css +15 -0
- package/dist/skills/controlled-implementation/SKILL.md +195 -0
- package/dist/skills/documentation-knowledge-compiler/SKILL.md +100 -0
- package/dist/skills/domain-rule-ledger/SKILL.md +109 -0
- package/dist/skills/doubt-driven-development/SKILL.md +101 -0
- package/dist/skills/engineering-capability-evaluation/SKILL.md +103 -0
- package/dist/skills/engineering-pattern-ledger/SKILL.md +110 -0
- package/dist/skills/evidence-ledger/SKILL.md +96 -0
- package/dist/skills/grill-design/SKILL.md +92 -0
- package/dist/skills/grill-with-docs/SKILL.md +89 -0
- package/dist/skills/handoff-generation/SKILL.md +99 -0
- package/dist/skills/implementation-context-generation/SKILL.md +185 -0
- package/dist/skills/improvement-ledger/SKILL.md +206 -0
- package/dist/skills/mr-readme-generation/SKILL.md +201 -0
- package/dist/skills/next-best-change-finder/SKILL.md +112 -0
- package/dist/skills/operating-mode-router/SKILL.md +141 -0
- package/dist/skills/planning-with-files/SKILL.md +81 -0
- package/dist/skills/project-adoption-pack-generation/SKILL.md +113 -0
- package/dist/skills/refactor-implementation/SKILL.md +142 -0
- package/dist/skills/release-readiness-gate/SKILL.md +161 -0
- package/dist/skills/repository-orientation/SKILL.md +94 -0
- package/dist/skills/requirement-grill/SKILL.md +137 -0
- package/dist/skills/review-adversarial-risk/SKILL.md +117 -0
- package/dist/skills/review-ai-quality/SKILL.md +127 -0
- package/dist/skills/review-architecture-impact/SKILL.md +144 -0
- package/dist/skills/review-automated-gate/SKILL.md +84 -0
- package/dist/skills/review-code-health/SKILL.md +140 -0
- package/dist/skills/review-context-generation/SKILL.md +175 -0
- package/dist/skills/review-domain-impact/SKILL.md +182 -0
- package/dist/skills/review-final-merge-gate/SKILL.md +120 -0
- package/dist/skills/review-finding-compiler/SKILL.md +96 -0
- package/dist/skills/review-output-quality/SKILL.md +167 -0
- package/dist/skills/review-router/SKILL.md +161 -0
- package/dist/skills/review-to-rule-compiler/SKILL.md +91 -0
- package/dist/skills/risk-gate/SKILL.md +94 -0
- package/dist/skills/scope-control/SKILL.md +97 -0
- package/dist/skills/skill-adoption-metrics/SKILL.md +210 -0
- package/dist/skills/skill-effectiveness-evaluation/SKILL.md +248 -0
- package/dist/skills/skill-effectiveness-evaluation/references/practical-evaluation.md +204 -0
- package/dist/skills/skill-router/SKILL.md +205 -0
- package/dist/skills/spec-driven-development/SKILL.md +136 -0
- package/dist/skills/spec-driven-development/references/context-retrieval.md +40 -0
- package/dist/skills/spec-driven-development/references/decision-led-test-strategy.md +46 -0
- package/dist/skills/spec-driven-development/references/examples/domain-context.md +20 -0
- package/dist/skills/spec-driven-development/references/examples/javascript/reservation.cases.mjs +26 -0
- package/dist/skills/spec-driven-development/references/examples/javascript/reservation.mjs +11 -0
- package/dist/skills/spec-driven-development/references/examples/javascript/reservation.test.mjs +65 -0
- package/dist/skills/spec-driven-development/references/examples/javascript/scenario-observer.mjs +47 -0
- package/dist/skills/spec-driven-development/references/examples/javascript/scenario-player.html +109 -0
- package/dist/skills/spec-driven-development/references/examples/javascript/scenario-review.mjs +166 -0
- package/dist/skills/spec-driven-development/references/examples/python/reservation.py +10 -0
- package/dist/skills/spec-driven-development/references/examples/python/test_reservation.py +40 -0
- package/dist/skills/spec-driven-development/references/examples/quote-reissue/confirmed-quote.mjs +16 -0
- package/dist/skills/spec-driven-development/references/examples/quote-reissue/confirmed-quote.test.mjs +19 -0
- package/dist/skills/spec-driven-development/references/examples/quote-reissue/decision-record.md +25 -0
- package/dist/skills/spec-driven-development/references/examples/quote-reissue/quote-reissue.mjs +28 -0
- package/dist/skills/spec-driven-development/references/examples/quote-reissue/quote-reissue.test.mjs +69 -0
- package/dist/skills/spec-driven-development/references/executable-spec-workflow.md +52 -0
- package/dist/skills/spec-driven-development/references/project-templates.md +92 -0
- package/dist/skills/spec-driven-development/references/quote-reissue-decision.md +35 -0
- package/dist/skills/spec-driven-development/references/scenario-visual-review.md +92 -0
- package/dist/skills/spec-driven-development/references/spec-index.md +51 -0
- package/dist/skills/spec-driven-development/references/spec-writing-conventions.md +52 -0
- package/dist/skills/spec-driven-development/references/verification-selection.md +44 -0
- package/dist/skills/test-first-verification/SKILL.md +170 -0
- package/dist/skills/ui-ux-design/SKILL.md +98 -0
- package/dist/skills/ui-ux-design/references/anti-patterns.md +51 -0
- package/dist/skills/ui-ux-design/references/decision-patterns.md +213 -0
- package/dist/skills/ui-ux-design/references/principles.md +55 -0
- package/dist/skills/ui-ux-design/references/ui-capability-contract.md +70 -0
- package/dist/skills/ui-ux-design/references/working-state.md +52 -0
- package/dist/skills/verification-pattern-ledger/SKILL.md +96 -0
- package/dist/skills/work-package-compiler/SKILL.md +129 -0
- package/package.json +36 -4
|
@@ -0,0 +1,2670 @@
|
|
|
1
|
+
import * as vscode from 'vscode';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
advanceCurrentReviewOpsCycle,
|
|
6
|
+
FileSystemArtifactStore,
|
|
7
|
+
buildFieldReportArtifacts,
|
|
8
|
+
buildKnowledgeCaptureArtifacts,
|
|
9
|
+
buildMetaNextArtifacts,
|
|
10
|
+
buildP0ReadinessArtifacts,
|
|
11
|
+
buildReviewFixChecklistArtifacts,
|
|
12
|
+
buildReviewFixExplanationArtifacts,
|
|
13
|
+
buildReviewFixPlanArtifacts,
|
|
14
|
+
buildReviewFixVerificationArtifacts,
|
|
15
|
+
buildReviewPromptArtifacts,
|
|
16
|
+
buildReviewResolutionArtifacts,
|
|
17
|
+
buildSkillEvidenceArtifacts,
|
|
18
|
+
createReviewOpsCycle,
|
|
19
|
+
getReviewOpsCommandCatalogEntry,
|
|
20
|
+
getReviewOpsMetaStatus,
|
|
21
|
+
importReviewResponseArtifacts,
|
|
22
|
+
initializeReviewOpsProject,
|
|
23
|
+
listReviewOpsCommandCatalog,
|
|
24
|
+
loadCurrentReviewOpsCycle,
|
|
25
|
+
recordReviewOpsMetricsEvent,
|
|
26
|
+
createReplyPublishDrafts,
|
|
27
|
+
resumeCurrentReviewOpsCycle,
|
|
28
|
+
saveApprovedRuleCandidates,
|
|
29
|
+
saveCurrentReviewOpsCycle,
|
|
30
|
+
setupReviewOpsProjectContext,
|
|
31
|
+
type FieldReport,
|
|
32
|
+
type PublishDraft,
|
|
33
|
+
type FlowArtifactRef,
|
|
34
|
+
type ProjectContextInput,
|
|
35
|
+
type ProjectInitResult,
|
|
36
|
+
type P0ManualSmokeStepId,
|
|
37
|
+
type ReviewActionPlanItem,
|
|
38
|
+
type ReviewFindingSeed,
|
|
39
|
+
type ReviewOpsCurrentCycle,
|
|
40
|
+
type ReviewOpsMetricsEventInput,
|
|
41
|
+
type ReviewPromptInput,
|
|
42
|
+
type ReviewFixPlan,
|
|
43
|
+
type ReviewFixVerification,
|
|
44
|
+
type ReviewFixVerificationResult,
|
|
45
|
+
type ReviewOpsCycleId,
|
|
46
|
+
type ReviewOpsCycleStartContext,
|
|
47
|
+
type ReviewOpsMetaStatus,
|
|
48
|
+
type ReviewTargetRef,
|
|
49
|
+
type ReviewReply,
|
|
50
|
+
type RuleCandidateSeed,
|
|
51
|
+
type RuleCandidate
|
|
52
|
+
} from '@reviewops/core';
|
|
53
|
+
import {
|
|
54
|
+
createGitHubReviewProvider,
|
|
55
|
+
createLocalGitReviewProvider,
|
|
56
|
+
createReviewPromptInputFromGitHubPullRequest,
|
|
57
|
+
createReviewPromptInputFromLocalGitDiff,
|
|
58
|
+
createSummaryCommentDraft
|
|
59
|
+
} from '@reviewops/providers';
|
|
60
|
+
import {
|
|
61
|
+
listReviewOpsArtifactQuickPickItems,
|
|
62
|
+
type ReviewOpsArtifactQuickPickItem
|
|
63
|
+
} from './artifact-browser.js';
|
|
64
|
+
import {
|
|
65
|
+
loadLatestImportedActionPlanSeed,
|
|
66
|
+
loadLatestKnowledgeCandidateSeeds,
|
|
67
|
+
loadLatestReviewActionPlan,
|
|
68
|
+
loadLatestReviewFindingSeeds,
|
|
69
|
+
loadLatestReviewFixPlan,
|
|
70
|
+
loadLatestReviewFixVerification,
|
|
71
|
+
loadLatestRuleApplication,
|
|
72
|
+
loadLatestRuleCandidates
|
|
73
|
+
} from './artifact-loader.js';
|
|
74
|
+
import {
|
|
75
|
+
commandForCommandCenterEntry,
|
|
76
|
+
commandForFlowId,
|
|
77
|
+
formatCycleStatus,
|
|
78
|
+
formatCycleTitle,
|
|
79
|
+
formatNextActionReason,
|
|
80
|
+
formatNextActionTitle,
|
|
81
|
+
isCommandCenterOpenFileMessage,
|
|
82
|
+
isCommandCenterRunBatchMessage,
|
|
83
|
+
isCommandCenterRunInputMessage,
|
|
84
|
+
isCommandCenterRunMessage,
|
|
85
|
+
isCommandCenterRunWithOptionsMessage,
|
|
86
|
+
isCommandCenterSetExperienceModeMessage,
|
|
87
|
+
isCommandCenterSkipOptionalStepMessage,
|
|
88
|
+
isCommandCenterStartCycleWithContextMessage,
|
|
89
|
+
isReviewOpsExperienceMode,
|
|
90
|
+
isOptionalImportFlow,
|
|
91
|
+
isOptionalRulesFlow,
|
|
92
|
+
normalizeReviewOpsCycleStartContext,
|
|
93
|
+
optionalImportFlowIdsForCurrentCycle,
|
|
94
|
+
resolveCommandCenterInput,
|
|
95
|
+
validateReviewOpsCycleStartContext,
|
|
96
|
+
type ReviewOpsCommandExecutionOptions,
|
|
97
|
+
type ReviewOpsExperienceMode,
|
|
98
|
+
type ReviewOpsWebviewRunResult
|
|
99
|
+
} from './command-center.js';
|
|
100
|
+
import {
|
|
101
|
+
renderPublishDraftPreviewHtml,
|
|
102
|
+
renderStatusPreview,
|
|
103
|
+
type PublishDraftArtifactPaths
|
|
104
|
+
} from './webview-renderers.js';
|
|
105
|
+
import { writePublishDraftArtifacts } from './publish-draft-artifacts.js';
|
|
106
|
+
import {
|
|
107
|
+
createCommandCenterRunResult,
|
|
108
|
+
createCommandCenterRunningResult,
|
|
109
|
+
isCommandCenterOpenableFile,
|
|
110
|
+
type ReviewOpsWebviewRunCapture
|
|
111
|
+
} from './command-center-results.js';
|
|
112
|
+
import {
|
|
113
|
+
buildScopedCyclePromptArtifacts,
|
|
114
|
+
createCycleStartContextFocus,
|
|
115
|
+
renderCycleStartContextNotes
|
|
116
|
+
} from './scoped-cycle-prompt.js';
|
|
117
|
+
import {
|
|
118
|
+
writeReviewActionPlanArtifacts,
|
|
119
|
+
writeReviewReplyDraftArtifacts,
|
|
120
|
+
writeRuleApplicationArtifacts,
|
|
121
|
+
writeRuleUpdateArtifacts
|
|
122
|
+
} from './review-work-artifacts.js';
|
|
123
|
+
import { ReviewOpsArtifactTreeDataProvider, ReviewOpsStatusTreeDataProvider } from './tree-views.js';
|
|
124
|
+
import { renderCommandCenterHtml } from './command-center-renderer.js';
|
|
125
|
+
import { createRunId } from './run-id.js';
|
|
126
|
+
import {
|
|
127
|
+
isReviewTargetRef,
|
|
128
|
+
rememberCurrentCycleTarget,
|
|
129
|
+
resolveCurrentCycleTargetOrLocalWorkspace,
|
|
130
|
+
resolveGitHubPullRequestTarget,
|
|
131
|
+
resolveLocalGitReviewTarget,
|
|
132
|
+
resolvePublishPreviewTarget
|
|
133
|
+
} from './review-targets.js';
|
|
134
|
+
export {
|
|
135
|
+
formatRunIdForTreeDescription,
|
|
136
|
+
listReviewOpsArtifactQuickPickItems,
|
|
137
|
+
listReviewOpsArtifactViewItems,
|
|
138
|
+
type ReviewOpsArtifactQuickPickItem,
|
|
139
|
+
type ReviewOpsArtifactSurfaceFilter,
|
|
140
|
+
type ReviewOpsArtifactViewId,
|
|
141
|
+
type ReviewOpsArtifactViewItem
|
|
142
|
+
} from './artifact-browser.js';
|
|
143
|
+
export {
|
|
144
|
+
loadLatestImportedActionPlanSeed,
|
|
145
|
+
loadLatestReviewOpsArtifact,
|
|
146
|
+
loadLatestRuleApplication,
|
|
147
|
+
loadLatestRuleCandidates,
|
|
148
|
+
type RuleApplicationPayload
|
|
149
|
+
} from './artifact-loader.js';
|
|
150
|
+
export {
|
|
151
|
+
commandForFlowId,
|
|
152
|
+
resolveCommandCenterInput,
|
|
153
|
+
type ReviewOpsCommandExecutionOptions,
|
|
154
|
+
type ReviewOpsWebviewRunResult
|
|
155
|
+
} from './command-center.js';
|
|
156
|
+
export { formatActionPlanNextActionTitle } from './review-work-artifacts.js';
|
|
157
|
+
export { writePublishDraftArtifacts } from './publish-draft-artifacts.js';
|
|
158
|
+
export { type ReviewOpsWebviewRunCapture } from './command-center-results.js';
|
|
159
|
+
export { renderCommandCenterHtml, type RenderCommandCenterHtmlOptions } from './command-center-renderer.js';
|
|
160
|
+
export { renderPublishDraftPreviewHtml, type PublishDraftArtifactPaths } from './webview-renderers.js';
|
|
161
|
+
export { createStatusTreeNodes, type ReviewOpsTreeNode } from './tree-views.js';
|
|
162
|
+
import { localize } from './localization.js';
|
|
163
|
+
|
|
164
|
+
const githubTokenSecretKey = 'reviewops.github.token';
|
|
165
|
+
const reviewOpsExperienceModeKey = 'reviewops.experienceMode';
|
|
166
|
+
let activeWebviewRunCapture: ReviewOpsWebviewRunCapture | undefined;
|
|
167
|
+
let activeCommandCenterPanel: vscode.WebviewPanel | undefined;
|
|
168
|
+
|
|
169
|
+
export function activate(context: vscode.ExtensionContext): void {
|
|
170
|
+
const statusTree = new ReviewOpsStatusTreeDataProvider(getWorkspaceRoot);
|
|
171
|
+
const reviewWorkTree = new ReviewOpsArtifactTreeDataProvider(getWorkspaceRoot, 'review-work');
|
|
172
|
+
const knowledgeTree = new ReviewOpsArtifactTreeDataProvider(getWorkspaceRoot, 'knowledge');
|
|
173
|
+
const skillEvidenceTree = new ReviewOpsArtifactTreeDataProvider(getWorkspaceRoot, 'skill-evidence');
|
|
174
|
+
const reportsTree = new ReviewOpsArtifactTreeDataProvider(getWorkspaceRoot, 'reports');
|
|
175
|
+
const statusView = vscode.window.createTreeView('reviewops.statusView', {
|
|
176
|
+
treeDataProvider: statusTree
|
|
177
|
+
});
|
|
178
|
+
const reviewWorkView = vscode.window.createTreeView('reviewops.reviewWorkView', {
|
|
179
|
+
treeDataProvider: reviewWorkTree
|
|
180
|
+
});
|
|
181
|
+
const knowledgeView = vscode.window.createTreeView('reviewops.knowledgeView', {
|
|
182
|
+
treeDataProvider: knowledgeTree
|
|
183
|
+
});
|
|
184
|
+
const skillEvidenceView = vscode.window.createTreeView('reviewops.skillEvidenceView', {
|
|
185
|
+
treeDataProvider: skillEvidenceTree
|
|
186
|
+
});
|
|
187
|
+
const reportsView = vscode.window.createTreeView('reviewops.reportsView', {
|
|
188
|
+
treeDataProvider: reportsTree
|
|
189
|
+
});
|
|
190
|
+
const refreshAllViews = () => {
|
|
191
|
+
statusTree.refresh();
|
|
192
|
+
reviewWorkTree.refresh();
|
|
193
|
+
knowledgeTree.refresh();
|
|
194
|
+
skillEvidenceTree.refresh();
|
|
195
|
+
reportsTree.refresh();
|
|
196
|
+
};
|
|
197
|
+
const applyApprovedRulesCommand = async () => {
|
|
198
|
+
await runCommand(async () => {
|
|
199
|
+
const status = await readWorkspaceStatus();
|
|
200
|
+
if (status === undefined) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (!status.initialized) {
|
|
205
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before applying rules.'));
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const candidates = await loadLatestRuleCandidates(status.workspaceRoot);
|
|
210
|
+
if (candidates === undefined || candidates.length === 0) {
|
|
211
|
+
await vscode.window.showWarningMessage(localize('Propose ReviewOps rules before applying approved rules.'));
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const previousApplication = await loadLatestRuleApplication(status.workspaceRoot);
|
|
216
|
+
const appliedCandidateIds = new Set(previousApplication?.saved.map((item) => item.candidateId) ?? []);
|
|
217
|
+
const approvedCandidates = await promptApprovedRuleCandidates(candidates, appliedCandidateIds);
|
|
218
|
+
if (approvedCandidates === undefined) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
const now = new Date();
|
|
223
|
+
const runId = createRunId(now);
|
|
224
|
+
const result = await saveApprovedRuleCandidates({
|
|
225
|
+
workspaceRoot: status.workspaceRoot,
|
|
226
|
+
candidates,
|
|
227
|
+
approvedCandidateIds: approvedCandidates.map((candidate) => candidate.id),
|
|
228
|
+
now: () => now
|
|
229
|
+
});
|
|
230
|
+
const artifacts = await writeRuleApplicationArtifacts(status.workspaceRoot, runId, result, approvedCandidates, now);
|
|
231
|
+
|
|
232
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['rules/apply', 'rules/update'], [
|
|
233
|
+
artifacts.ruleApplicationJson,
|
|
234
|
+
artifacts.ruleUpdateMarkdown,
|
|
235
|
+
artifacts.ruleUpdateJson
|
|
236
|
+
]);
|
|
237
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
238
|
+
kind: 'rules-apply',
|
|
239
|
+
createdAt: now.toISOString(),
|
|
240
|
+
flowId: 'rules/apply',
|
|
241
|
+
runId,
|
|
242
|
+
counts: {
|
|
243
|
+
ruleCandidates: result.saved.length
|
|
244
|
+
},
|
|
245
|
+
artifactPaths: [artifacts.ruleApplicationJson.path, artifacts.ruleUpdateMarkdown.path, artifacts.ruleUpdateJson.path]
|
|
246
|
+
});
|
|
247
|
+
refreshAllViews();
|
|
248
|
+
await openWorkspaceFile(status.workspaceRoot, artifacts.ruleUpdateMarkdown.path);
|
|
249
|
+
await vscode.window.showInformationMessage(
|
|
250
|
+
result.saved.length === 0
|
|
251
|
+
? localize('ReviewOps applied no rules and recorded {0} skipped candidate.', result.skipped.length)
|
|
252
|
+
: localize('ReviewOps saved {0} approved rule candidate and skipped {1}.', result.saved.length, result.skipped.length)
|
|
253
|
+
);
|
|
254
|
+
});
|
|
255
|
+
};
|
|
256
|
+
const updateRulesCommand = async () => {
|
|
257
|
+
await runCommand(async () => {
|
|
258
|
+
const status = await readWorkspaceStatus();
|
|
259
|
+
if (status === undefined) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (!status.initialized) {
|
|
264
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before updating rule artifacts.'));
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
const application = await loadLatestRuleApplication(status.workspaceRoot);
|
|
269
|
+
if (application === undefined) {
|
|
270
|
+
await vscode.window.showWarningMessage(localize('Apply approved rules before updating rule artifacts.'));
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const now = new Date();
|
|
275
|
+
const artifacts = await writeRuleUpdateArtifacts(status.workspaceRoot, createRunId(now), application, now);
|
|
276
|
+
|
|
277
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['rules/update'], [artifacts.ruleUpdateMarkdown, artifacts.ruleUpdateJson]);
|
|
278
|
+
refreshAllViews();
|
|
279
|
+
await openWorkspaceFile(status.workspaceRoot, artifacts.ruleUpdateMarkdown.path);
|
|
280
|
+
await vscode.window.showInformationMessage(
|
|
281
|
+
localize('ReviewOps updated rule artifacts for {0} saved rule and {1} skipped candidate.', application.saved.length, application.skipped.length)
|
|
282
|
+
);
|
|
283
|
+
});
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
const disposables = [
|
|
287
|
+
statusTree,
|
|
288
|
+
reviewWorkTree,
|
|
289
|
+
knowledgeTree,
|
|
290
|
+
skillEvidenceTree,
|
|
291
|
+
reportsTree,
|
|
292
|
+
statusView,
|
|
293
|
+
reviewWorkView,
|
|
294
|
+
knowledgeView,
|
|
295
|
+
skillEvidenceView,
|
|
296
|
+
reportsView,
|
|
297
|
+
vscode.commands.registerCommand('reviewops.initializeProject', async () => {
|
|
298
|
+
await runCommand(async () => {
|
|
299
|
+
const workspaceRoot = await requireWorkspaceRoot();
|
|
300
|
+
if (workspaceRoot === undefined) {
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const result = await initializeReviewOpsProject({ workspaceRoot });
|
|
305
|
+
refreshAllViews();
|
|
306
|
+
await vscode.window.showInformationMessage(formatProjectInitMessage(result));
|
|
307
|
+
});
|
|
308
|
+
}),
|
|
309
|
+
vscode.commands.registerCommand('reviewops.updateProjectContext', async () => {
|
|
310
|
+
await runCommand(async () => {
|
|
311
|
+
const status = await readWorkspaceStatus();
|
|
312
|
+
if (status === undefined) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
if (!status.initialized) {
|
|
317
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before setting project context.'));
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
const result = await setupReviewOpsProjectContext({
|
|
322
|
+
workspaceRoot: status.workspaceRoot,
|
|
323
|
+
input: createDefaultProjectContextInput(status.workspaceRoot)
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
refreshAllViews();
|
|
327
|
+
await openWorkspaceFile(status.workspaceRoot, result.contextPath);
|
|
328
|
+
await vscode.window.showInformationMessage(localize('ReviewOps wrote default local project context. Edit the opened file only if needed.'));
|
|
329
|
+
});
|
|
330
|
+
}),
|
|
331
|
+
vscode.commands.registerCommand('reviewops.openPreview', async () => {
|
|
332
|
+
await runCommand(async () => {
|
|
333
|
+
const status = await readWorkspaceStatus();
|
|
334
|
+
if (status === undefined) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
openStatusPreview(status);
|
|
339
|
+
});
|
|
340
|
+
}),
|
|
341
|
+
vscode.commands.registerCommand('reviewops.openArtifacts', async () => {
|
|
342
|
+
await runCommand(async () => {
|
|
343
|
+
const workspaceRoot = await requireWorkspaceRoot();
|
|
344
|
+
if (workspaceRoot === undefined) {
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const artifacts = await listReviewOpsArtifactQuickPickItems(workspaceRoot);
|
|
349
|
+
if (artifacts.length === 0) {
|
|
350
|
+
await vscode.window.showInformationMessage(localize('ReviewOps found no files to open yet. Run the next action first.'));
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
const showAllArtifactsItem: ReviewOpsArtifactQuickPickItem = {
|
|
355
|
+
label: localize('Advanced: show supporting files'),
|
|
356
|
+
description: localize('JSON, metadata, and older runs.'),
|
|
357
|
+
artifactPath: '',
|
|
358
|
+
viewId: 'review-work',
|
|
359
|
+
showAll: true
|
|
360
|
+
};
|
|
361
|
+
const selected = await vscode.window.showQuickPick([...artifacts, showAllArtifactsItem], {
|
|
362
|
+
placeHolder: localize('Select the file to open.')
|
|
363
|
+
});
|
|
364
|
+
if (selected === undefined) {
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
if (selected.showAll) {
|
|
369
|
+
const allArtifacts = await listReviewOpsArtifactQuickPickItems(workspaceRoot, { surface: 'all' });
|
|
370
|
+
const selectedAll = await vscode.window.showQuickPick(allArtifacts, {
|
|
371
|
+
placeHolder: localize('Select the file to open.')
|
|
372
|
+
});
|
|
373
|
+
if (selectedAll === undefined) {
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
await openWorkspaceFile(workspaceRoot, selectedAll.artifactPath);
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
await openWorkspaceFile(workspaceRoot, selected.artifactPath);
|
|
382
|
+
});
|
|
383
|
+
}),
|
|
384
|
+
vscode.commands.registerCommand('reviewops.commandCenter', async () => {
|
|
385
|
+
await runCommand(async () => {
|
|
386
|
+
const status = await readWorkspaceStatus();
|
|
387
|
+
if (status === undefined) {
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
openCommandCenter(status, refreshAllViews, context);
|
|
392
|
+
});
|
|
393
|
+
}),
|
|
394
|
+
vscode.commands.registerCommand('reviewops.nextAction', async () => {
|
|
395
|
+
await runCommand(async () => {
|
|
396
|
+
const status = await readWorkspaceStatus();
|
|
397
|
+
if (status === undefined) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
const [nextAction] = status.nextActions;
|
|
402
|
+
if (nextAction === undefined) {
|
|
403
|
+
await vscode.window.showInformationMessage(localize('ReviewOps has no next action for this workspace.'));
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
if (nextAction.flowId === 'project/init') {
|
|
408
|
+
const initializeLabel = localize('Initialize');
|
|
409
|
+
const selection = await vscode.window.showInformationMessage(formatNextActionReason(nextAction.reason), initializeLabel);
|
|
410
|
+
if (selection === initializeLabel) {
|
|
411
|
+
await vscode.commands.executeCommand('reviewops.initializeProject');
|
|
412
|
+
}
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
await continueNextAction(nextAction.flowId, status, refreshAllViews);
|
|
417
|
+
});
|
|
418
|
+
}),
|
|
419
|
+
vscode.commands.registerCommand('reviewops.resumeCurrentCycle', async () => {
|
|
420
|
+
await runCommand(async () => {
|
|
421
|
+
const status = await readWorkspaceStatus();
|
|
422
|
+
if (status === undefined) {
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
if (!status.initialized) {
|
|
427
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before resuming a cycle.'));
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
const resumed = await resumeCurrentReviewOpsCycle({ workspaceRoot: status.workspaceRoot });
|
|
432
|
+
refreshAllViews();
|
|
433
|
+
|
|
434
|
+
if (resumed.currentCycle === null) {
|
|
435
|
+
await vscode.window.showInformationMessage(localize('ReviewOps has no current cycle to resume. Use Next Action to start one.'));
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
const nextStatus: ReviewOpsMetaStatus = {
|
|
440
|
+
...status,
|
|
441
|
+
currentCycle: resumed.currentCycle,
|
|
442
|
+
nextActions: resumed.nextActions
|
|
443
|
+
};
|
|
444
|
+
const [nextAction] = resumed.nextActions;
|
|
445
|
+
if (nextAction === undefined) {
|
|
446
|
+
await vscode.window.showInformationMessage(localize('{0} is ready.', formatCycleTitle(resumed.currentCycle.title)));
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
await continueNextAction(nextAction.flowId, nextStatus, refreshAllViews);
|
|
451
|
+
});
|
|
452
|
+
}),
|
|
453
|
+
vscode.commands.registerCommand('reviewops.setupGitHubToken', async () => {
|
|
454
|
+
await runCommand(async () => {
|
|
455
|
+
const token = await vscode.window.showInputBox({
|
|
456
|
+
prompt: localize('Paste a GitHub token for ReviewOps provider calls. It will be stored in VS Code SecretStorage.'),
|
|
457
|
+
password: true,
|
|
458
|
+
ignoreFocusOut: true
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
if (token === undefined) {
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
if (token.trim().length === 0) {
|
|
466
|
+
await context.secrets.delete(githubTokenSecretKey);
|
|
467
|
+
await vscode.window.showInformationMessage(localize('ReviewOps removed the GitHub token from VS Code SecretStorage.'));
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
await context.secrets.store(githubTokenSecretKey, token.trim());
|
|
472
|
+
await vscode.window.showInformationMessage(localize('ReviewOps stored the GitHub token in VS Code SecretStorage.'));
|
|
473
|
+
});
|
|
474
|
+
}),
|
|
475
|
+
vscode.commands.registerCommand('reviewops.prepareGitHubPullRequestReview', async (options?: ReviewOpsCommandExecutionOptions) => {
|
|
476
|
+
await runCommand(async () => {
|
|
477
|
+
const status = await readWorkspaceStatus();
|
|
478
|
+
if (status === undefined) {
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
if (!status.initialized) {
|
|
483
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before preparing a GitHub pull request review.'));
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
const token = await readGitHubTokenOrPromptSetup(context);
|
|
488
|
+
if (token === undefined) {
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
const target = await resolveGitHubPullRequestTarget(status, options?.githubTarget);
|
|
493
|
+
if (target === undefined) {
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
await rememberCurrentCycleTarget(status.workspaceRoot, target);
|
|
497
|
+
|
|
498
|
+
const provider = createGitHubReviewProvider({
|
|
499
|
+
repository: target.repository,
|
|
500
|
+
token
|
|
501
|
+
});
|
|
502
|
+
const [reviewTarget, diff, comments] = await Promise.all([
|
|
503
|
+
provider.getReviewTarget(target),
|
|
504
|
+
provider.getDiff(target),
|
|
505
|
+
provider.getComments(target)
|
|
506
|
+
]);
|
|
507
|
+
|
|
508
|
+
if (diff.summary.changedFiles === 0) {
|
|
509
|
+
await vscode.window.showInformationMessage(localize('ReviewOps found no changed files for this GitHub pull request.'));
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
const now = new Date();
|
|
514
|
+
const promptInput = createReviewPromptInputFromGitHubPullRequest(diff, comments);
|
|
515
|
+
const result = await buildReviewPromptArtifacts({
|
|
516
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
517
|
+
runId: createRunId(now),
|
|
518
|
+
input: {
|
|
519
|
+
...promptInput,
|
|
520
|
+
notes: [promptInput.notes, '', `Pull request title: ${reviewTarget.title}`].join('\n')
|
|
521
|
+
},
|
|
522
|
+
now: () => now
|
|
523
|
+
});
|
|
524
|
+
|
|
525
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['review/select-target', 'provider/fetch-review', 'diff/review'], [
|
|
526
|
+
result.artifacts.prompt,
|
|
527
|
+
result.artifacts.inputSummary,
|
|
528
|
+
result.artifacts.metadata
|
|
529
|
+
]);
|
|
530
|
+
refreshAllViews();
|
|
531
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.prompt.path);
|
|
532
|
+
await vscode.window.showInformationMessage(
|
|
533
|
+
formatPromptReadyMessage(
|
|
534
|
+
localize(
|
|
535
|
+
'ReviewOps prepared a GitHub pull request review prompt for {0} changed files and {1} comments.',
|
|
536
|
+
diff.summary.changedFiles,
|
|
537
|
+
comments.length
|
|
538
|
+
)
|
|
539
|
+
)
|
|
540
|
+
);
|
|
541
|
+
});
|
|
542
|
+
}),
|
|
543
|
+
|
|
544
|
+
vscode.commands.registerCommand('reviewops.prepareGitHubCommentTriage', async (options?: ReviewOpsCommandExecutionOptions) => {
|
|
545
|
+
await runCommand(async () => {
|
|
546
|
+
const status = await readWorkspaceStatus();
|
|
547
|
+
if (status === undefined) {
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
if (!status.initialized) {
|
|
552
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before preparing GitHub comment triage.'));
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
const canUseProviderWithoutPrompt =
|
|
557
|
+
options?.githubTarget !== undefined || status.currentCycle?.target !== undefined;
|
|
558
|
+
const token = canUseProviderWithoutPrompt ? await readGitHubTokenOrPromptSetup(context) : undefined;
|
|
559
|
+
if (token === undefined) {
|
|
560
|
+
if (status.currentCycle?.cycleId === 'cycle/comment-response') {
|
|
561
|
+
await prepareLocalCommentResponseFallback(status);
|
|
562
|
+
refreshAllViews();
|
|
563
|
+
}
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
const target = await resolveGitHubPullRequestTarget(status, options?.githubTarget);
|
|
568
|
+
if (target === undefined) {
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
await rememberCurrentCycleTarget(status.workspaceRoot, target);
|
|
572
|
+
|
|
573
|
+
const provider = createGitHubReviewProvider({
|
|
574
|
+
repository: target.repository,
|
|
575
|
+
token
|
|
576
|
+
});
|
|
577
|
+
const comments = await provider.getComments(target);
|
|
578
|
+
const now = new Date();
|
|
579
|
+
const runId = createRunId(now);
|
|
580
|
+
const result = await buildReviewResolutionArtifacts({
|
|
581
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
582
|
+
runId,
|
|
583
|
+
target,
|
|
584
|
+
comments,
|
|
585
|
+
now: () => now
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
await markCycleStepsCompleted(
|
|
589
|
+
status.workspaceRoot,
|
|
590
|
+
['provider/fetch-review', 'review/comment-triage', 'review/action-plan'],
|
|
591
|
+
[
|
|
592
|
+
result.artifacts.commentTriage,
|
|
593
|
+
result.artifacts.understandingMemoJson,
|
|
594
|
+
result.artifacts.understandingMemoMarkdown,
|
|
595
|
+
result.artifacts.actionPlan,
|
|
596
|
+
result.artifacts.replyDrafts,
|
|
597
|
+
result.artifacts.publishDraft,
|
|
598
|
+
result.artifacts.nextActions
|
|
599
|
+
]
|
|
600
|
+
);
|
|
601
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
602
|
+
kind: 'comment-triage',
|
|
603
|
+
createdAt: now.toISOString(),
|
|
604
|
+
flowId: 'review/comment-triage',
|
|
605
|
+
runId,
|
|
606
|
+
counts: {
|
|
607
|
+
triageComments: result.triage.totalComments,
|
|
608
|
+
fixPlanItems: result.actionPlan.length,
|
|
609
|
+
replyDrafts: result.replyDrafts.length
|
|
610
|
+
},
|
|
611
|
+
artifactPaths: [
|
|
612
|
+
result.artifacts.commentTriage.path,
|
|
613
|
+
result.artifacts.understandingMemoJson.path,
|
|
614
|
+
result.artifacts.understandingMemoMarkdown.path,
|
|
615
|
+
result.artifacts.actionPlan.path,
|
|
616
|
+
result.artifacts.replyDrafts.path,
|
|
617
|
+
result.artifacts.publishDraft.path,
|
|
618
|
+
result.artifacts.nextActions.path
|
|
619
|
+
]
|
|
620
|
+
});
|
|
621
|
+
refreshAllViews();
|
|
622
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.understandingMemoMarkdown.path);
|
|
623
|
+
await vscode.window.showInformationMessage(
|
|
624
|
+
localize('ReviewOps prepared comment triage for {0} comments, {1} action items, and {2} reply drafts.', comments.length, result.actionPlan.length, result.replyDrafts.length)
|
|
625
|
+
);
|
|
626
|
+
});
|
|
627
|
+
}),
|
|
628
|
+
vscode.commands.registerCommand('reviewops.prepareLocalDiffReview', async (options?: ReviewOpsCommandExecutionOptions) => {
|
|
629
|
+
await runCommand(async () => {
|
|
630
|
+
const status = await readWorkspaceStatus();
|
|
631
|
+
if (status === undefined) {
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
if (!status.initialized) {
|
|
636
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before preparing a local diff review.'));
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
const provider = createLocalGitReviewProvider({ workspaceRoot: status.workspaceRoot });
|
|
641
|
+
const cycleStartContext = status.currentCycle?.startContext;
|
|
642
|
+
let target: ReviewTargetRef | undefined;
|
|
643
|
+
try {
|
|
644
|
+
target = await resolveLocalGitReviewTarget(status.workspaceRoot, provider, options?.localDiff);
|
|
645
|
+
} catch (error) {
|
|
646
|
+
if (cycleStartContext === undefined) {
|
|
647
|
+
throw error;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
await prepareScopedCyclePrompt(status, cycleStartContext);
|
|
651
|
+
refreshAllViews();
|
|
652
|
+
await vscode.window.showInformationMessage(formatScopedPromptReadyMessage(status));
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
if (target === undefined) {
|
|
656
|
+
if (cycleStartContext !== undefined) {
|
|
657
|
+
await prepareScopedCyclePrompt(status, cycleStartContext);
|
|
658
|
+
refreshAllViews();
|
|
659
|
+
await vscode.window.showInformationMessage(formatScopedPromptReadyMessage(status));
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
await vscode.window.showWarningMessage(localize('ReviewOps could not find a local git review target.'));
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
const diff = await provider.getDiff(target);
|
|
667
|
+
if (diff.summary.changedFiles === 0) {
|
|
668
|
+
if (cycleStartContext !== undefined) {
|
|
669
|
+
await prepareScopedCyclePrompt(status, cycleStartContext);
|
|
670
|
+
refreshAllViews();
|
|
671
|
+
await vscode.window.showInformationMessage(formatScopedPromptReadyMessage(status));
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
674
|
+
await vscode.window.showInformationMessage(localize('ReviewOps found no local git diff against HEAD.'));
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
const now = new Date();
|
|
679
|
+
const flowIds = promptFlowIdsForCurrentCycle(status.currentCycle);
|
|
680
|
+
const result = await buildReviewPromptArtifacts({
|
|
681
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
682
|
+
runId: createRunId(now),
|
|
683
|
+
input: withCycleStartContext(createReviewPromptInputFromLocalGitDiff(diff), cycleStartContext),
|
|
684
|
+
flowId: flowIds.at(-1),
|
|
685
|
+
now: () => now
|
|
686
|
+
});
|
|
687
|
+
|
|
688
|
+
await markCycleStepsCompleted(
|
|
689
|
+
status.workspaceRoot,
|
|
690
|
+
flowIds,
|
|
691
|
+
attachArtifactsToCompletedFlows([result.artifacts.prompt, result.artifacts.inputSummary, result.artifacts.metadata], flowIds)
|
|
692
|
+
);
|
|
693
|
+
refreshAllViews();
|
|
694
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.prompt.path);
|
|
695
|
+
await vscode.window.showInformationMessage(
|
|
696
|
+
formatPromptReadyMessage(localize('ReviewOps prepared a local diff review prompt for {0} changed files.', diff.summary.changedFiles))
|
|
697
|
+
);
|
|
698
|
+
});
|
|
699
|
+
}),
|
|
700
|
+
vscode.commands.registerCommand('reviewops.importManualReviewResponse', async () => {
|
|
701
|
+
await runCommand(async () => {
|
|
702
|
+
const status = await readWorkspaceStatus();
|
|
703
|
+
if (status === undefined) {
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
if (!status.initialized) {
|
|
708
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before importing a review response.'));
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
const rawResponse = await vscode.window.showInputBox({
|
|
713
|
+
prompt: localize('Paste the manual review response to import and normalize.'),
|
|
714
|
+
ignoreFocusOut: true
|
|
715
|
+
});
|
|
716
|
+
if (rawResponse === undefined || rawResponse.trim().length === 0) {
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
const now = new Date();
|
|
721
|
+
const runId = createRunId(now);
|
|
722
|
+
const flowIds = responseFlowIdsForCurrentCycle(status.currentCycle);
|
|
723
|
+
const result = await importReviewResponseArtifacts({
|
|
724
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
725
|
+
runId,
|
|
726
|
+
rawResponse: rawResponse.trim(),
|
|
727
|
+
flowId: responseImportFlowIdForCurrentCycle(status.currentCycle),
|
|
728
|
+
now: () => now
|
|
729
|
+
});
|
|
730
|
+
|
|
731
|
+
await markCycleStepsCompleted(
|
|
732
|
+
status.workspaceRoot,
|
|
733
|
+
flowIds,
|
|
734
|
+
attachArtifactsToCompletedFlows(
|
|
735
|
+
[
|
|
736
|
+
result.artifacts.rawResponse,
|
|
737
|
+
result.artifacts.resultMarkdown,
|
|
738
|
+
result.artifacts.resultJson,
|
|
739
|
+
result.artifacts.reviewFindings,
|
|
740
|
+
result.artifacts.actionPlan,
|
|
741
|
+
result.artifacts.replyDrafts,
|
|
742
|
+
result.artifacts.knowledgeCandidates,
|
|
743
|
+
result.artifacts.ruleCandidates
|
|
744
|
+
],
|
|
745
|
+
flowIds
|
|
746
|
+
)
|
|
747
|
+
);
|
|
748
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
749
|
+
kind: 'response-import',
|
|
750
|
+
createdAt: now.toISOString(),
|
|
751
|
+
flowId: responseImportFlowIdForCurrentCycle(status.currentCycle),
|
|
752
|
+
runId,
|
|
753
|
+
counts: {
|
|
754
|
+
fixPlanItems: result.normalizeResult.actionPlan.length,
|
|
755
|
+
replyDrafts: result.normalizeResult.replyDrafts.length,
|
|
756
|
+
ruleCandidates: result.normalizeResult.ruleCandidates.length,
|
|
757
|
+
knowledgeCandidates: result.normalizeResult.knowledgeCandidates.length
|
|
758
|
+
},
|
|
759
|
+
artifactPaths: [
|
|
760
|
+
result.artifacts.resultMarkdown.path,
|
|
761
|
+
result.artifacts.resultJson.path,
|
|
762
|
+
result.artifacts.reviewFindings.path,
|
|
763
|
+
result.artifacts.actionPlan.path,
|
|
764
|
+
result.artifacts.replyDrafts.path,
|
|
765
|
+
result.artifacts.knowledgeCandidates.path,
|
|
766
|
+
result.artifacts.ruleCandidates.path
|
|
767
|
+
]
|
|
768
|
+
});
|
|
769
|
+
refreshAllViews();
|
|
770
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.resultMarkdown.path);
|
|
771
|
+
await vscode.window.showInformationMessage(
|
|
772
|
+
localize('ReviewOps imported {0} findings and {1} action items.', result.normalizeResult.reviewFindings.length, result.normalizeResult.actionPlan.length)
|
|
773
|
+
);
|
|
774
|
+
});
|
|
775
|
+
}),
|
|
776
|
+
vscode.commands.registerCommand('reviewops.buildReviewActionPlan', async () => {
|
|
777
|
+
await runCommand(async () => {
|
|
778
|
+
const status = await readWorkspaceStatus();
|
|
779
|
+
if (status === undefined) {
|
|
780
|
+
return;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
if (!status.initialized) {
|
|
784
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before building a review action plan.'));
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
const actionPlanFlowId = actionPlanFlowIdForCurrentCycle(status.currentCycle);
|
|
789
|
+
const importedActionPlan = await loadLatestImportedActionPlanSeed(
|
|
790
|
+
status.workspaceRoot,
|
|
791
|
+
responseImportFlowIdForCurrentCycle(status.currentCycle)
|
|
792
|
+
);
|
|
793
|
+
const actionPlan =
|
|
794
|
+
importedActionPlan !== undefined && importedActionPlan.length > 0
|
|
795
|
+
? importedActionPlan
|
|
796
|
+
: createReviewActionPlanFromCurrentCycle(status.currentCycle);
|
|
797
|
+
if (actionPlan === undefined) {
|
|
798
|
+
return;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
const now = new Date();
|
|
802
|
+
const runId = createRunId(now);
|
|
803
|
+
const artifacts = await writeReviewActionPlanArtifacts(status.workspaceRoot, runId, actionPlan, now, {
|
|
804
|
+
flowId: actionPlanFlowId,
|
|
805
|
+
title: actionPlanTitleForCurrentCycle(status.currentCycle),
|
|
806
|
+
nextFlowId: actionPlanNextFlowIdForCurrentCycle(status.currentCycle)
|
|
807
|
+
});
|
|
808
|
+
|
|
809
|
+
await markCycleStepsCompleted(status.workspaceRoot, [actionPlanFlowId], [
|
|
810
|
+
artifacts.actionPlanJson,
|
|
811
|
+
artifacts.actionPlanMarkdown,
|
|
812
|
+
artifacts.understandingMemoJson,
|
|
813
|
+
artifacts.understandingMemoMarkdown,
|
|
814
|
+
artifacts.nextActions
|
|
815
|
+
]);
|
|
816
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
817
|
+
kind: 'action-plan',
|
|
818
|
+
createdAt: now.toISOString(),
|
|
819
|
+
flowId: actionPlanFlowId,
|
|
820
|
+
runId,
|
|
821
|
+
counts: {
|
|
822
|
+
fixPlanItems: actionPlan.length
|
|
823
|
+
},
|
|
824
|
+
artifactPaths: [
|
|
825
|
+
artifacts.actionPlanJson.path,
|
|
826
|
+
artifacts.actionPlanMarkdown.path,
|
|
827
|
+
artifacts.understandingMemoJson.path,
|
|
828
|
+
artifacts.understandingMemoMarkdown.path,
|
|
829
|
+
artifacts.nextActions.path
|
|
830
|
+
]
|
|
831
|
+
});
|
|
832
|
+
refreshAllViews();
|
|
833
|
+
await openWorkspaceFile(status.workspaceRoot, artifacts.actionPlanMarkdown.path);
|
|
834
|
+
await vscode.window.showInformationMessage(
|
|
835
|
+
importedActionPlan !== undefined && importedActionPlan.length > 0
|
|
836
|
+
? localize('ReviewOps wrote {0} imported review action-plan items.', actionPlan.length)
|
|
837
|
+
: localize('ReviewOps wrote a default review action plan.')
|
|
838
|
+
);
|
|
839
|
+
});
|
|
840
|
+
}),
|
|
841
|
+
vscode.commands.registerCommand('reviewops.planReviewFix', async () => {
|
|
842
|
+
await runCommand(async () => {
|
|
843
|
+
const status = await readWorkspaceStatus();
|
|
844
|
+
if (status === undefined) {
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
if (!status.initialized) {
|
|
849
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before planning a review fix.'));
|
|
850
|
+
return;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
const flowId = workPlanFlowIdForCurrentCycle(status.currentCycle);
|
|
854
|
+
const itemNoun = formatWorkItemNoun(status.currentCycle);
|
|
855
|
+
const actionPlan =
|
|
856
|
+
(await loadLatestReviewActionPlan(status.workspaceRoot)) ??
|
|
857
|
+
createReviewActionPlanFromCurrentCycle(status.currentCycle);
|
|
858
|
+
if (actionPlan === undefined) {
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
if (actionPlan.length === 0) {
|
|
862
|
+
await vscode.window.showWarningMessage(localize('ReviewOps could not find any action-plan items to turn into {0} items.', itemNoun));
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
const now = new Date();
|
|
867
|
+
const runId = createRunId(now);
|
|
868
|
+
const result = await buildReviewFixPlanArtifacts({
|
|
869
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
870
|
+
runId,
|
|
871
|
+
actionPlan,
|
|
872
|
+
flowId,
|
|
873
|
+
now: () => now
|
|
874
|
+
});
|
|
875
|
+
|
|
876
|
+
await markCycleStepsCompleted(status.workspaceRoot, [flowId], [
|
|
877
|
+
result.artifacts.fixPlanJson,
|
|
878
|
+
result.artifacts.fixPlanMarkdown,
|
|
879
|
+
result.artifacts.nextActions
|
|
880
|
+
]);
|
|
881
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
882
|
+
kind: 'fix-plan',
|
|
883
|
+
createdAt: now.toISOString(),
|
|
884
|
+
flowId,
|
|
885
|
+
runId,
|
|
886
|
+
counts: {
|
|
887
|
+
fixPlanItems: result.fixPlan.summary.totalItems
|
|
888
|
+
},
|
|
889
|
+
artifactPaths: [result.artifacts.fixPlanJson.path, result.artifacts.fixPlanMarkdown.path, result.artifacts.nextActions.path]
|
|
890
|
+
});
|
|
891
|
+
refreshAllViews();
|
|
892
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.fixPlanMarkdown.path);
|
|
893
|
+
await vscode.window.showInformationMessage(localize('ReviewOps planned {0} {1} items.', result.fixPlan.summary.totalItems, itemNoun));
|
|
894
|
+
});
|
|
895
|
+
}),
|
|
896
|
+
vscode.commands.registerCommand('reviewops.buildReviewFixChecklist', async () => {
|
|
897
|
+
await runCommand(async () => {
|
|
898
|
+
const status = await readWorkspaceStatus();
|
|
899
|
+
if (status === undefined) {
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
if (!status.initialized) {
|
|
904
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before building a review fix checklist.'));
|
|
905
|
+
return;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
const flowId = workChecklistFlowIdForCurrentCycle(status.currentCycle);
|
|
909
|
+
const planFlowId = workPlanFlowIdForCurrentCycle(status.currentCycle);
|
|
910
|
+
const itemNoun = formatWorkItemNoun(status.currentCycle);
|
|
911
|
+
const fixPlan = await loadLatestReviewFixPlan(status.workspaceRoot, planFlowId);
|
|
912
|
+
if (fixPlan === undefined) {
|
|
913
|
+
await vscode.window.showWarningMessage(localize('Build a ReviewOps {0} plan before building a checklist.', itemNoun));
|
|
914
|
+
return;
|
|
915
|
+
}
|
|
916
|
+
if (fixPlan.items.length === 0) {
|
|
917
|
+
await vscode.window.showWarningMessage(localize('ReviewOps could not find any {0} plan items for the checklist.', itemNoun));
|
|
918
|
+
return;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
const now = new Date();
|
|
922
|
+
const artifactStore = new FileSystemArtifactStore(status.workspaceRoot);
|
|
923
|
+
const checklistResult = await buildReviewFixChecklistArtifacts({
|
|
924
|
+
artifactStore,
|
|
925
|
+
runId: createRunId(now),
|
|
926
|
+
fixPlan,
|
|
927
|
+
flowId,
|
|
928
|
+
now: () => now
|
|
929
|
+
});
|
|
930
|
+
|
|
931
|
+
await markCycleStepsCompleted(status.workspaceRoot, [flowId], [
|
|
932
|
+
checklistResult.artifacts.checklistJson,
|
|
933
|
+
checklistResult.artifacts.checklistMarkdown,
|
|
934
|
+
checklistResult.artifacts.testScenariosJson,
|
|
935
|
+
checklistResult.artifacts.testScenariosMarkdown,
|
|
936
|
+
checklistResult.artifacts.nextActions
|
|
937
|
+
]);
|
|
938
|
+
refreshAllViews();
|
|
939
|
+
await openWorkspaceFile(status.workspaceRoot, checklistResult.artifacts.checklistMarkdown.path);
|
|
940
|
+
await vscode.window.showInformationMessage(
|
|
941
|
+
localize('ReviewOps built {0} manual {1} checklist items.', checklistResult.checklist.summary.totalItems, itemNoun)
|
|
942
|
+
);
|
|
943
|
+
});
|
|
944
|
+
}),
|
|
945
|
+
vscode.commands.registerCommand('reviewops.verifyReviewFix', async () => {
|
|
946
|
+
await runCommand(async () => {
|
|
947
|
+
const status = await readWorkspaceStatus();
|
|
948
|
+
if (status === undefined) {
|
|
949
|
+
return;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
if (!status.initialized) {
|
|
953
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before verifying a review fix.'));
|
|
954
|
+
return;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
const flowId = workVerifyFlowIdForCurrentCycle(status.currentCycle);
|
|
958
|
+
const planFlowId = workPlanFlowIdForCurrentCycle(status.currentCycle);
|
|
959
|
+
const itemNoun = formatWorkItemNoun(status.currentCycle);
|
|
960
|
+
const verificationInput = await resolveReviewFixVerificationInput(status.workspaceRoot, planFlowId, itemNoun);
|
|
961
|
+
if (verificationInput === undefined) {
|
|
962
|
+
return;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
const now = new Date();
|
|
966
|
+
const runId = createRunId(now);
|
|
967
|
+
const result = await buildReviewFixVerificationArtifacts({
|
|
968
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
969
|
+
runId,
|
|
970
|
+
fixPlan: verificationInput.fixPlan,
|
|
971
|
+
results: verificationInput.results,
|
|
972
|
+
flowId,
|
|
973
|
+
now: () => now
|
|
974
|
+
});
|
|
975
|
+
|
|
976
|
+
const verificationArtifacts = [
|
|
977
|
+
result.artifacts.verificationJson,
|
|
978
|
+
result.artifacts.verificationMarkdown,
|
|
979
|
+
result.artifacts.nextActions
|
|
980
|
+
];
|
|
981
|
+
const allResolved = verificationInput.results.every((verificationResult) => verificationResult.status === 'resolved');
|
|
982
|
+
if (allResolved) {
|
|
983
|
+
await markCycleStepsCompleted(status.workspaceRoot, [flowId], verificationArtifacts);
|
|
984
|
+
} else {
|
|
985
|
+
await markCycleStepBlocked(
|
|
986
|
+
status.workspaceRoot,
|
|
987
|
+
flowId,
|
|
988
|
+
verificationArtifacts,
|
|
989
|
+
localize('ReviewOps recorded unresolved verification results; resolve the remaining verification risk before continuing.')
|
|
990
|
+
);
|
|
991
|
+
}
|
|
992
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
993
|
+
kind: 'fix-verification',
|
|
994
|
+
createdAt: now.toISOString(),
|
|
995
|
+
flowId,
|
|
996
|
+
runId,
|
|
997
|
+
counts: {
|
|
998
|
+
unresolvedRisks:
|
|
999
|
+
result.verification.summary.unresolvedCount +
|
|
1000
|
+
result.verification.summary.newRiskCount +
|
|
1001
|
+
result.verification.summary.followUpIssueCount,
|
|
1002
|
+
addedTests: countVerificationTestSignals(result.verification)
|
|
1003
|
+
},
|
|
1004
|
+
artifactPaths: [
|
|
1005
|
+
result.artifacts.verificationJson.path,
|
|
1006
|
+
result.artifacts.verificationMarkdown.path,
|
|
1007
|
+
result.artifacts.nextActions.path
|
|
1008
|
+
]
|
|
1009
|
+
});
|
|
1010
|
+
refreshAllViews();
|
|
1011
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.verificationMarkdown.path);
|
|
1012
|
+
await vscode.window.showInformationMessage(
|
|
1013
|
+
allResolved
|
|
1014
|
+
? localize('ReviewOps recorded {0} resolved {1} verification results.', result.verification.summary.resolvedCount, itemNoun)
|
|
1015
|
+
: localize('ReviewOps kept fix verification blocked with unresolved results.')
|
|
1016
|
+
);
|
|
1017
|
+
});
|
|
1018
|
+
}),
|
|
1019
|
+
vscode.commands.registerCommand('reviewops.explainReviewFix', async () => {
|
|
1020
|
+
await runCommand(async () => {
|
|
1021
|
+
const status = await readWorkspaceStatus();
|
|
1022
|
+
if (status === undefined) {
|
|
1023
|
+
return;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
if (!status.initialized) {
|
|
1027
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before explaining a review fix.'));
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
const flowId = workExplainFlowIdForCurrentCycle(status.currentCycle);
|
|
1032
|
+
const verifyFlowId = workVerifyFlowIdForCurrentCycle(status.currentCycle);
|
|
1033
|
+
const planFlowId = workPlanFlowIdForCurrentCycle(status.currentCycle);
|
|
1034
|
+
const itemNoun = formatWorkItemNoun(status.currentCycle);
|
|
1035
|
+
const fixPlan = await loadLatestReviewFixPlan(status.workspaceRoot, planFlowId);
|
|
1036
|
+
if (fixPlan === undefined) {
|
|
1037
|
+
await vscode.window.showWarningMessage(localize('Build a ReviewOps {0} plan before explaining results.', itemNoun));
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
const verification = await loadLatestReviewFixVerification(status.workspaceRoot, verifyFlowId);
|
|
1041
|
+
if (verification === undefined) {
|
|
1042
|
+
await vscode.window.showWarningMessage(localize('Record ReviewOps {0} verification before explaining results.', itemNoun));
|
|
1043
|
+
return;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
const now = new Date();
|
|
1047
|
+
const artifactStore = new FileSystemArtifactStore(status.workspaceRoot);
|
|
1048
|
+
const explanationResult = await buildReviewFixExplanationArtifacts({
|
|
1049
|
+
artifactStore,
|
|
1050
|
+
runId: createRunId(now),
|
|
1051
|
+
fixPlan,
|
|
1052
|
+
verification,
|
|
1053
|
+
flowId,
|
|
1054
|
+
now: () => now
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
const explanationArtifacts = [
|
|
1058
|
+
explanationResult.artifacts.explanationJson,
|
|
1059
|
+
explanationResult.artifacts.explanationMarkdown,
|
|
1060
|
+
explanationResult.artifacts.nextActions
|
|
1061
|
+
];
|
|
1062
|
+
const allResolved = verification.results.every((verificationResult) => verificationResult.status === 'resolved');
|
|
1063
|
+
if (allResolved) {
|
|
1064
|
+
await markCycleStepsCompleted(status.workspaceRoot, [flowId], explanationArtifacts);
|
|
1065
|
+
} else {
|
|
1066
|
+
await markCycleStepBlocked(
|
|
1067
|
+
status.workspaceRoot,
|
|
1068
|
+
verifyFlowId,
|
|
1069
|
+
explanationArtifacts,
|
|
1070
|
+
localize('ReviewOps recorded unresolved verification results; resolve the remaining verification risk before explaining fixes.')
|
|
1071
|
+
);
|
|
1072
|
+
}
|
|
1073
|
+
refreshAllViews();
|
|
1074
|
+
await openWorkspaceFile(status.workspaceRoot, explanationResult.artifacts.explanationMarkdown.path);
|
|
1075
|
+
await vscode.window.showInformationMessage(
|
|
1076
|
+
allResolved
|
|
1077
|
+
? localize('ReviewOps wrote an explanation for {0} verified {1} item.', explanationResult.explanation.summary.verifiedItems, itemNoun)
|
|
1078
|
+
: localize('ReviewOps kept explanation blocked with unresolved verification results.')
|
|
1079
|
+
);
|
|
1080
|
+
});
|
|
1081
|
+
}),
|
|
1082
|
+
vscode.commands.registerCommand('reviewops.draftReviewReplies', async () => {
|
|
1083
|
+
await runCommand(async () => {
|
|
1084
|
+
const status = await readWorkspaceStatus();
|
|
1085
|
+
if (status === undefined) {
|
|
1086
|
+
return;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
if (!status.initialized) {
|
|
1090
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before drafting review replies.'));
|
|
1091
|
+
return;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
const reply = await createDefaultReviewReply(status.workspaceRoot, status.currentCycle);
|
|
1095
|
+
|
|
1096
|
+
const now = new Date();
|
|
1097
|
+
const runId = createRunId(now);
|
|
1098
|
+
const artifacts = await writeReviewReplyDraftArtifacts(status.workspaceRoot, runId, [reply], now);
|
|
1099
|
+
|
|
1100
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['review/reply-drafts'], [
|
|
1101
|
+
artifacts.replyDraftsJson,
|
|
1102
|
+
artifacts.replyDraftsMarkdown,
|
|
1103
|
+
artifacts.nextActions
|
|
1104
|
+
]);
|
|
1105
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
1106
|
+
kind: 'reply-draft',
|
|
1107
|
+
createdAt: now.toISOString(),
|
|
1108
|
+
flowId: 'review/reply-drafts',
|
|
1109
|
+
runId,
|
|
1110
|
+
counts: {
|
|
1111
|
+
replyDrafts: 1
|
|
1112
|
+
},
|
|
1113
|
+
artifactPaths: [artifacts.replyDraftsJson.path, artifacts.replyDraftsMarkdown.path, artifacts.nextActions.path]
|
|
1114
|
+
});
|
|
1115
|
+
refreshAllViews();
|
|
1116
|
+
await openWorkspaceFile(status.workspaceRoot, artifacts.replyDraftsMarkdown.path);
|
|
1117
|
+
await vscode.window.showInformationMessage(localize('ReviewOps wrote local reply drafts for preview before publishing.'));
|
|
1118
|
+
});
|
|
1119
|
+
}),
|
|
1120
|
+
vscode.commands.registerCommand('reviewops.showMetaNext', async () => {
|
|
1121
|
+
await runCommand(async () => {
|
|
1122
|
+
const status = await readWorkspaceStatus();
|
|
1123
|
+
if (status === undefined) {
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
if (!status.initialized) {
|
|
1128
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before showing next actions.'));
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
const shouldCompleteMetaNext = status.currentCycle?.nextActions[0]?.flowId === 'meta/next';
|
|
1133
|
+
if (shouldCompleteMetaNext) {
|
|
1134
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['meta/next']);
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
const refreshedStatus = await getReviewOpsMetaStatus({ workspaceRoot: status.workspaceRoot });
|
|
1138
|
+
const now = new Date();
|
|
1139
|
+
const result = await buildMetaNextArtifacts({
|
|
1140
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
1141
|
+
workspaceRoot: status.workspaceRoot,
|
|
1142
|
+
runId: createRunId(now),
|
|
1143
|
+
initialized: refreshedStatus.initialized,
|
|
1144
|
+
now: () => now
|
|
1145
|
+
});
|
|
1146
|
+
|
|
1147
|
+
if (shouldCompleteMetaNext) {
|
|
1148
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['meta/next'], [
|
|
1149
|
+
result.artifacts.nextActions,
|
|
1150
|
+
result.artifacts.currentCycle
|
|
1151
|
+
]);
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
refreshAllViews();
|
|
1155
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.nextActions.path);
|
|
1156
|
+
await vscode.window.showInformationMessage(localize('ReviewOps wrote {0} next action entries.', result.metaNext.nextActions.length));
|
|
1157
|
+
});
|
|
1158
|
+
}),
|
|
1159
|
+
vscode.commands.registerCommand('reviewops.showP0Readiness', async () => {
|
|
1160
|
+
await runCommand(async () => {
|
|
1161
|
+
const status = await readWorkspaceStatus();
|
|
1162
|
+
if (status === undefined) {
|
|
1163
|
+
return;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
if (!status.initialized) {
|
|
1167
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before writing P0 readiness artifacts.'));
|
|
1168
|
+
return;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
const manualSmokeStepIds: P0ManualSmokeStepId[] = [];
|
|
1172
|
+
|
|
1173
|
+
const now = new Date();
|
|
1174
|
+
const result = await buildP0ReadinessArtifacts({
|
|
1175
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
1176
|
+
workspaceRoot: status.workspaceRoot,
|
|
1177
|
+
runId: createRunId(now),
|
|
1178
|
+
availableProviders: ['local-git', 'github'],
|
|
1179
|
+
manualSmokeStepIds,
|
|
1180
|
+
now: () => now
|
|
1181
|
+
});
|
|
1182
|
+
|
|
1183
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['meta/readiness'], [
|
|
1184
|
+
result.artifacts.markdown,
|
|
1185
|
+
result.artifacts.json
|
|
1186
|
+
]);
|
|
1187
|
+
refreshAllViews();
|
|
1188
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.markdown.path);
|
|
1189
|
+
await vscode.window.showInformationMessage(
|
|
1190
|
+
localize('ReviewOps P0 readiness is {0}: {1}/{2} checks ready.', result.report.status, result.report.summary.ready, result.report.summary.total)
|
|
1191
|
+
);
|
|
1192
|
+
});
|
|
1193
|
+
}),
|
|
1194
|
+
vscode.commands.registerCommand('reviewops.previewGitHubSummaryComment', async (options?: ReviewOpsCommandExecutionOptions) => {
|
|
1195
|
+
await runCommand(async () => {
|
|
1196
|
+
const status = await readWorkspaceStatus();
|
|
1197
|
+
if (status === undefined) {
|
|
1198
|
+
return;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
if (!status.initialized) {
|
|
1202
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before previewing a GitHub summary comment.'));
|
|
1203
|
+
return;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
const target = resolvePublishPreviewTarget(status, options?.githubTarget);
|
|
1207
|
+
const body = await createDefaultSummaryCommentBody(status.workspaceRoot, status.currentCycle);
|
|
1208
|
+
|
|
1209
|
+
const now = new Date();
|
|
1210
|
+
const runId = createRunId(now);
|
|
1211
|
+
const draft = createSummaryPublishDraft(target, body, now);
|
|
1212
|
+
const artifacts = await writePublishDraftArtifacts(status.workspaceRoot, runId, draft);
|
|
1213
|
+
|
|
1214
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['publish/summary-draft']);
|
|
1215
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
1216
|
+
kind: 'publish-preview',
|
|
1217
|
+
createdAt: now.toISOString(),
|
|
1218
|
+
flowId: 'publish/summary-draft',
|
|
1219
|
+
runId,
|
|
1220
|
+
counts: {
|
|
1221
|
+
previewPosts: 1
|
|
1222
|
+
},
|
|
1223
|
+
artifactPaths: [artifacts.markdownPath, artifacts.jsonPath]
|
|
1224
|
+
});
|
|
1225
|
+
refreshAllViews();
|
|
1226
|
+
openPublishDraftPreview(status.workspaceRoot, draft, artifacts);
|
|
1227
|
+
await vscode.window.showInformationMessage(localize('ReviewOps wrote a local summary preview draft. No provider post was attempted.'));
|
|
1228
|
+
});
|
|
1229
|
+
}),
|
|
1230
|
+
|
|
1231
|
+
vscode.commands.registerCommand('reviewops.previewGitHubReplyComment', async (options?: ReviewOpsCommandExecutionOptions) => {
|
|
1232
|
+
await runCommand(async () => {
|
|
1233
|
+
const status = await readWorkspaceStatus();
|
|
1234
|
+
if (status === undefined) {
|
|
1235
|
+
return;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
if (!status.initialized) {
|
|
1239
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before previewing a GitHub reply comment.'));
|
|
1240
|
+
return;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
const target = resolvePublishPreviewTarget(status, options?.githubTarget);
|
|
1244
|
+
const reply = await createDefaultReviewReply(status.workspaceRoot, status.currentCycle);
|
|
1245
|
+
|
|
1246
|
+
const now = new Date();
|
|
1247
|
+
const runId = createRunId(now);
|
|
1248
|
+
const [replyDraft] = createReplyPublishDrafts({
|
|
1249
|
+
target,
|
|
1250
|
+
replies: [reply],
|
|
1251
|
+
createdAt: now.toISOString()
|
|
1252
|
+
});
|
|
1253
|
+
if (replyDraft === undefined) {
|
|
1254
|
+
return;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
const artifacts = await writePublishDraftArtifacts(status.workspaceRoot, runId, replyDraft.publishDraft);
|
|
1258
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['publish/reply-draft']);
|
|
1259
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
1260
|
+
kind: 'publish-preview',
|
|
1261
|
+
createdAt: now.toISOString(),
|
|
1262
|
+
flowId: 'publish/reply-draft',
|
|
1263
|
+
runId,
|
|
1264
|
+
counts: {
|
|
1265
|
+
previewPosts: 1,
|
|
1266
|
+
replyDrafts: 1
|
|
1267
|
+
},
|
|
1268
|
+
artifactPaths: [artifacts.markdownPath, artifacts.jsonPath]
|
|
1269
|
+
});
|
|
1270
|
+
refreshAllViews();
|
|
1271
|
+
openPublishDraftPreview(status.workspaceRoot, replyDraft.publishDraft, artifacts);
|
|
1272
|
+
await vscode.window.showInformationMessage(localize('ReviewOps wrote a local reply preview draft. No provider post was attempted.'));
|
|
1273
|
+
});
|
|
1274
|
+
}),
|
|
1275
|
+
vscode.commands.registerCommand('reviewops.applyRules', applyApprovedRulesCommand),
|
|
1276
|
+
vscode.commands.registerCommand('reviewops.updateRules', updateRulesCommand),
|
|
1277
|
+
vscode.commands.registerCommand('reviewops.proposeRules', async (options?: ReviewOpsCommandExecutionOptions) => {
|
|
1278
|
+
await runCommand(async () => {
|
|
1279
|
+
const status = await readWorkspaceStatus();
|
|
1280
|
+
if (status === undefined) {
|
|
1281
|
+
return;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
if (!status.initialized) {
|
|
1285
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before proposing rules.'));
|
|
1286
|
+
return;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
const now = new Date();
|
|
1290
|
+
const runId = createRunId(now);
|
|
1291
|
+
const ruleInput = await resolveRuleProposalInput(status.workspaceRoot, now, options?.ruleProposal);
|
|
1292
|
+
if (ruleInput === undefined) {
|
|
1293
|
+
return;
|
|
1294
|
+
}
|
|
1295
|
+
const result = await buildKnowledgeCaptureArtifacts({
|
|
1296
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
1297
|
+
runId,
|
|
1298
|
+
ruleSeeds: ruleInput.ruleSeeds,
|
|
1299
|
+
findings: ruleInput.findings,
|
|
1300
|
+
now: () => now
|
|
1301
|
+
});
|
|
1302
|
+
|
|
1303
|
+
await markCycleStepsCompleted(
|
|
1304
|
+
status.workspaceRoot,
|
|
1305
|
+
['rules/propose', 'rules/reconcile'],
|
|
1306
|
+
[
|
|
1307
|
+
result.artifacts.ruleCandidates,
|
|
1308
|
+
result.artifacts.knowledgeCandidates,
|
|
1309
|
+
result.artifacts.reconciliation,
|
|
1310
|
+
result.artifacts.portableChecklist
|
|
1311
|
+
]
|
|
1312
|
+
);
|
|
1313
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
1314
|
+
kind: 'knowledge-capture',
|
|
1315
|
+
createdAt: now.toISOString(),
|
|
1316
|
+
flowId: 'rules/propose',
|
|
1317
|
+
runId,
|
|
1318
|
+
counts: {
|
|
1319
|
+
ruleCandidates: result.ruleCandidates.length,
|
|
1320
|
+
knowledgeCandidates: result.knowledgeCandidates.length
|
|
1321
|
+
},
|
|
1322
|
+
artifactPaths: [
|
|
1323
|
+
result.artifacts.ruleCandidates.path,
|
|
1324
|
+
result.artifacts.knowledgeCandidates.path,
|
|
1325
|
+
result.artifacts.reconciliation.path,
|
|
1326
|
+
result.artifacts.portableChecklist.path
|
|
1327
|
+
]
|
|
1328
|
+
});
|
|
1329
|
+
refreshAllViews();
|
|
1330
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.portableChecklist.path);
|
|
1331
|
+
await vscode.window.showInformationMessage(
|
|
1332
|
+
localize('ReviewOps proposed {0} rule candidate for review. No rule was applied automatically.', result.ruleCandidates.length)
|
|
1333
|
+
);
|
|
1334
|
+
});
|
|
1335
|
+
}),
|
|
1336
|
+
vscode.commands.registerCommand('reviewops.captureKnowledgeCandidates', async () => {
|
|
1337
|
+
await runCommand(async () => {
|
|
1338
|
+
const status = await readWorkspaceStatus();
|
|
1339
|
+
if (status === undefined) {
|
|
1340
|
+
return;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
if (!status.initialized) {
|
|
1344
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before capturing knowledge candidates.'));
|
|
1345
|
+
return;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
const now = new Date();
|
|
1349
|
+
const knowledgeSeeds =
|
|
1350
|
+
(await loadLatestKnowledgeCandidateSeeds(
|
|
1351
|
+
status.workspaceRoot,
|
|
1352
|
+
responseImportFlowIdForCurrentCycle(status.currentCycle)
|
|
1353
|
+
)) ?? [];
|
|
1354
|
+
const runId = createRunId(now);
|
|
1355
|
+
const result = await buildKnowledgeCaptureArtifacts({
|
|
1356
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
1357
|
+
runId,
|
|
1358
|
+
knowledgeSeeds,
|
|
1359
|
+
now: () => now
|
|
1360
|
+
});
|
|
1361
|
+
|
|
1362
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['knowledge/capture-candidates'], [
|
|
1363
|
+
result.artifacts.ruleCandidates,
|
|
1364
|
+
result.artifacts.knowledgeCandidates,
|
|
1365
|
+
result.artifacts.reconciliation,
|
|
1366
|
+
result.artifacts.portableChecklist
|
|
1367
|
+
]);
|
|
1368
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
1369
|
+
kind: 'knowledge-capture',
|
|
1370
|
+
createdAt: now.toISOString(),
|
|
1371
|
+
flowId: 'knowledge/capture-candidates',
|
|
1372
|
+
runId,
|
|
1373
|
+
counts: {
|
|
1374
|
+
ruleCandidates: result.ruleCandidates.length,
|
|
1375
|
+
knowledgeCandidates: result.knowledgeCandidates.length
|
|
1376
|
+
},
|
|
1377
|
+
artifactPaths: [
|
|
1378
|
+
result.artifacts.ruleCandidates.path,
|
|
1379
|
+
result.artifacts.knowledgeCandidates.path,
|
|
1380
|
+
result.artifacts.reconciliation.path,
|
|
1381
|
+
result.artifacts.portableChecklist.path
|
|
1382
|
+
]
|
|
1383
|
+
});
|
|
1384
|
+
refreshAllViews();
|
|
1385
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.portableChecklist.path);
|
|
1386
|
+
await vscode.window.showInformationMessage(
|
|
1387
|
+
localize('ReviewOps captured {0} knowledge candidate without proposing a rule.', result.knowledgeCandidates.length)
|
|
1388
|
+
);
|
|
1389
|
+
});
|
|
1390
|
+
}),
|
|
1391
|
+
vscode.commands.registerCommand('reviewops.captureSkillEvidence', async () => {
|
|
1392
|
+
await runCommand(async () => {
|
|
1393
|
+
const status = await readWorkspaceStatus();
|
|
1394
|
+
if (status === undefined) {
|
|
1395
|
+
return;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
if (!status.initialized) {
|
|
1399
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before capturing skill evidence.'));
|
|
1400
|
+
return;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
const now = new Date();
|
|
1404
|
+
const runId = createRunId(now);
|
|
1405
|
+
const actionPlan = await loadLatestReviewActionPlan(status.workspaceRoot);
|
|
1406
|
+
const ruleCandidates = await loadLatestRuleCandidates(status.workspaceRoot);
|
|
1407
|
+
const target = isReviewTargetRef(status.currentCycle?.target) ? status.currentCycle.target : undefined;
|
|
1408
|
+
const result = await buildSkillEvidenceArtifacts({
|
|
1409
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
1410
|
+
workspaceRoot: status.workspaceRoot,
|
|
1411
|
+
runId,
|
|
1412
|
+
target,
|
|
1413
|
+
actionPlan,
|
|
1414
|
+
ruleCandidates,
|
|
1415
|
+
manualEvidence: createDefaultManualSkillEvidence(status.currentCycle),
|
|
1416
|
+
now: () => now
|
|
1417
|
+
});
|
|
1418
|
+
|
|
1419
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['skill/evidence-capture'], [result.artifacts.skillEvidence]);
|
|
1420
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
1421
|
+
kind: 'skill-evidence',
|
|
1422
|
+
createdAt: now.toISOString(),
|
|
1423
|
+
flowId: 'skill/evidence-capture',
|
|
1424
|
+
runId,
|
|
1425
|
+
counts: {
|
|
1426
|
+
skillEvidenceSignals: result.skillEvidence.length
|
|
1427
|
+
},
|
|
1428
|
+
artifactPaths: [result.artifacts.skillEvidence.path]
|
|
1429
|
+
});
|
|
1430
|
+
refreshAllViews();
|
|
1431
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.skillEvidence.path);
|
|
1432
|
+
await vscode.window.showInformationMessage(
|
|
1433
|
+
localize('ReviewOps captured {0} skill evidence entry without scoring or ranking.', result.skillEvidence.length)
|
|
1434
|
+
);
|
|
1435
|
+
});
|
|
1436
|
+
}),
|
|
1437
|
+
vscode.commands.registerCommand('reviewops.generateFieldReport', async (options?: ReviewOpsCommandExecutionOptions) => {
|
|
1438
|
+
await runCommand(async () => {
|
|
1439
|
+
const status = await readWorkspaceStatus();
|
|
1440
|
+
if (status === undefined) {
|
|
1441
|
+
return;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
if (!status.initialized) {
|
|
1445
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before generating a field report.'));
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
const now = new Date();
|
|
1450
|
+
const reportOptions = resolveFieldReportOptions(now, options?.fieldReport);
|
|
1451
|
+
const runId = createRunId(now);
|
|
1452
|
+
const result = await buildFieldReportArtifacts({
|
|
1453
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
1454
|
+
runId,
|
|
1455
|
+
period: reportOptions.period,
|
|
1456
|
+
targetScope: reportOptions.targetScope,
|
|
1457
|
+
now: () => now
|
|
1458
|
+
});
|
|
1459
|
+
|
|
1460
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['field/report'], [
|
|
1461
|
+
result.artifacts.markdown,
|
|
1462
|
+
result.artifacts.json
|
|
1463
|
+
]);
|
|
1464
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
1465
|
+
kind: 'field-report',
|
|
1466
|
+
createdAt: now.toISOString(),
|
|
1467
|
+
flowId: 'field/report',
|
|
1468
|
+
runId,
|
|
1469
|
+
counts: {
|
|
1470
|
+
unresolvedRisks: result.report.unresolvedRisks,
|
|
1471
|
+
addedTests: result.report.addedTests,
|
|
1472
|
+
ruleCandidates: result.report.ruleCandidates,
|
|
1473
|
+
knowledgeCandidates: result.report.knowledgeCandidates,
|
|
1474
|
+
skillEvidenceSignals: result.report.skillSignals.length
|
|
1475
|
+
},
|
|
1476
|
+
artifactPaths: [result.artifacts.markdown.path, result.artifacts.json.path]
|
|
1477
|
+
});
|
|
1478
|
+
refreshAllViews();
|
|
1479
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.markdown.path);
|
|
1480
|
+
await vscode.window.showInformationMessage(localize('ReviewOps generated a local field report preview.'));
|
|
1481
|
+
});
|
|
1482
|
+
}),
|
|
1483
|
+
vscode.commands.registerCommand('reviewops.status', async () => {
|
|
1484
|
+
await runCommand(async () => {
|
|
1485
|
+
const status = await readWorkspaceStatus();
|
|
1486
|
+
if (status === undefined) {
|
|
1487
|
+
return;
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
refreshAllViews();
|
|
1491
|
+
await vscode.window.showInformationMessage(formatStatusMessage(status));
|
|
1492
|
+
});
|
|
1493
|
+
})
|
|
1494
|
+
];
|
|
1495
|
+
|
|
1496
|
+
context.subscriptions.push(...disposables);
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
export function deactivate(): void {
|
|
1500
|
+
return;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
async function runCommand(command: () => Promise<void>): Promise<void> {
|
|
1504
|
+
try {
|
|
1505
|
+
await command();
|
|
1506
|
+
} catch (error) {
|
|
1507
|
+
const message = formatError(error);
|
|
1508
|
+
if (activeWebviewRunCapture !== undefined) {
|
|
1509
|
+
activeWebviewRunCapture.errorMessage = message;
|
|
1510
|
+
}
|
|
1511
|
+
await vscode.window.showErrorMessage(localize('ReviewOps failed: {0}', message));
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
async function readWorkspaceStatus(): Promise<ReviewOpsMetaStatus | undefined> {
|
|
1516
|
+
const workspaceRoot = await requireWorkspaceRoot();
|
|
1517
|
+
if (workspaceRoot === undefined) {
|
|
1518
|
+
return undefined;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
return getReviewOpsMetaStatus({ workspaceRoot });
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
async function continueNextAction(
|
|
1525
|
+
flowId: string,
|
|
1526
|
+
status: ReviewOpsMetaStatus,
|
|
1527
|
+
refreshStatusView: () => void,
|
|
1528
|
+
startContext?: ReviewOpsCycleStartContext
|
|
1529
|
+
): Promise<void> {
|
|
1530
|
+
const cycleId = toCycleId(flowId);
|
|
1531
|
+
if (cycleId !== undefined) {
|
|
1532
|
+
const now = new Date();
|
|
1533
|
+
const runId = createRunId(now);
|
|
1534
|
+
const cycle = createReviewOpsCycle({
|
|
1535
|
+
cycleId,
|
|
1536
|
+
runId,
|
|
1537
|
+
startedAt: now.toISOString(),
|
|
1538
|
+
startContext
|
|
1539
|
+
});
|
|
1540
|
+
await saveCurrentReviewOpsCycle({
|
|
1541
|
+
workspaceRoot: status.workspaceRoot,
|
|
1542
|
+
currentCycle: cycle
|
|
1543
|
+
});
|
|
1544
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
1545
|
+
kind: 'review-cycle',
|
|
1546
|
+
createdAt: now.toISOString(),
|
|
1547
|
+
flowId,
|
|
1548
|
+
runId,
|
|
1549
|
+
counts: {
|
|
1550
|
+
reviewCycles: 1
|
|
1551
|
+
}
|
|
1552
|
+
});
|
|
1553
|
+
refreshStatusView();
|
|
1554
|
+
const [nextAction] = cycle.nextActions;
|
|
1555
|
+
if (nextAction !== undefined) {
|
|
1556
|
+
await continueNextAction(nextAction.flowId, { ...status, currentCycle: cycle, nextActions: cycle.nextActions }, refreshStatusView);
|
|
1557
|
+
return;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
await vscode.window.showInformationMessage(
|
|
1561
|
+
localize('ReviewOps started {0}.', formatCycleTitle(cycle.title))
|
|
1562
|
+
);
|
|
1563
|
+
return;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
if (await skipOptionalCommandCenterStep(flowId, status, refreshStatusView)) {
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
const command = commandForFlowId(flowId);
|
|
1571
|
+
if (command !== undefined) {
|
|
1572
|
+
await vscode.commands.executeCommand(command);
|
|
1573
|
+
return;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
await vscode.window.showInformationMessage(localize('ReviewOps next flow: {0}', flowId));
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
export async function skipOptionalCommandCenterStep(
|
|
1580
|
+
flowId: string,
|
|
1581
|
+
status: ReviewOpsMetaStatus,
|
|
1582
|
+
refreshStatusView: () => void
|
|
1583
|
+
): Promise<boolean> {
|
|
1584
|
+
if (isOptionalImportFlow(flowId, status)) {
|
|
1585
|
+
return skipOptionalImportStep(flowId, status, refreshStatusView);
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
if (isOptionalRulesFlow(flowId, status)) {
|
|
1589
|
+
return skipOptionalRulesStep(flowId, status, refreshStatusView);
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
return false;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
export async function skipOptionalResearchImportStep(
|
|
1596
|
+
flowId: string,
|
|
1597
|
+
status: ReviewOpsMetaStatus,
|
|
1598
|
+
refreshStatusView: () => void
|
|
1599
|
+
): Promise<boolean> {
|
|
1600
|
+
return skipOptionalImportStep(flowId, status, refreshStatusView);
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
async function skipOptionalImportStep(
|
|
1604
|
+
flowId: string,
|
|
1605
|
+
status: ReviewOpsMetaStatus,
|
|
1606
|
+
refreshStatusView: () => void
|
|
1607
|
+
): Promise<boolean> {
|
|
1608
|
+
if (!isOptionalImportFlow(flowId, status)) {
|
|
1609
|
+
return false;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
const currentCycle = status.currentCycle;
|
|
1613
|
+
if (currentCycle === null) {
|
|
1614
|
+
return false;
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
const actionPlan = createReviewActionPlanFromCurrentCycle(currentCycle);
|
|
1618
|
+
|
|
1619
|
+
const now = new Date();
|
|
1620
|
+
const runId = createRunId(now);
|
|
1621
|
+
const actionPlanFlowId = actionPlanFlowIdForCurrentCycle(currentCycle);
|
|
1622
|
+
const artifacts = await writeReviewActionPlanArtifacts(status.workspaceRoot, runId, actionPlan, now, {
|
|
1623
|
+
flowId: actionPlanFlowId,
|
|
1624
|
+
title: actionPlanTitleForCurrentCycle(currentCycle),
|
|
1625
|
+
nextFlowId: actionPlanNextFlowIdForCurrentCycle(currentCycle)
|
|
1626
|
+
});
|
|
1627
|
+
|
|
1628
|
+
await markCycleStepsCompleted(
|
|
1629
|
+
status.workspaceRoot,
|
|
1630
|
+
[...optionalImportFlowIdsForCurrentCycle(currentCycle), actionPlanFlowId],
|
|
1631
|
+
[
|
|
1632
|
+
artifacts.actionPlanJson,
|
|
1633
|
+
artifacts.actionPlanMarkdown,
|
|
1634
|
+
artifacts.understandingMemoJson,
|
|
1635
|
+
artifacts.understandingMemoMarkdown,
|
|
1636
|
+
artifacts.nextActions
|
|
1637
|
+
]
|
|
1638
|
+
);
|
|
1639
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
1640
|
+
kind: 'action-plan',
|
|
1641
|
+
createdAt: now.toISOString(),
|
|
1642
|
+
flowId: actionPlanFlowId,
|
|
1643
|
+
runId,
|
|
1644
|
+
counts: {
|
|
1645
|
+
fixPlanItems: actionPlan.length
|
|
1646
|
+
},
|
|
1647
|
+
artifactPaths: [
|
|
1648
|
+
artifacts.actionPlanJson.path,
|
|
1649
|
+
artifacts.actionPlanMarkdown.path,
|
|
1650
|
+
artifacts.understandingMemoJson.path,
|
|
1651
|
+
artifacts.understandingMemoMarkdown.path,
|
|
1652
|
+
artifacts.nextActions.path
|
|
1653
|
+
]
|
|
1654
|
+
});
|
|
1655
|
+
refreshStatusView();
|
|
1656
|
+
await openWorkspaceFile(status.workspaceRoot, artifacts.actionPlanMarkdown.path);
|
|
1657
|
+
await vscode.window.showInformationMessage(
|
|
1658
|
+
localize('ReviewOps continued without importing an external response and wrote a default action plan.')
|
|
1659
|
+
);
|
|
1660
|
+
return true;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
async function skipOptionalRulesStep(
|
|
1664
|
+
flowId: string,
|
|
1665
|
+
status: ReviewOpsMetaStatus,
|
|
1666
|
+
refreshStatusView: () => void
|
|
1667
|
+
): Promise<boolean> {
|
|
1668
|
+
if (!isOptionalRulesFlow(flowId, status)) {
|
|
1669
|
+
return false;
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
await markCycleStepsCompleted(status.workspaceRoot, ['rules/propose', 'rules/reconcile', 'rules/apply', 'rules/update']);
|
|
1673
|
+
refreshStatusView();
|
|
1674
|
+
await vscode.window.showInformationMessage(localize('ReviewOps skipped optional rules and continued the cycle.'));
|
|
1675
|
+
return true;
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
async function prepareLocalCommentResponseFallback(status: ReviewOpsMetaStatus): Promise<void> {
|
|
1679
|
+
const now = new Date();
|
|
1680
|
+
const runId = createRunId(now);
|
|
1681
|
+
const target = resolveCurrentCycleTargetOrLocalWorkspace(status, path.basename(status.workspaceRoot));
|
|
1682
|
+
const result = await buildReviewResolutionArtifacts({
|
|
1683
|
+
artifactStore: new FileSystemArtifactStore(status.workspaceRoot),
|
|
1684
|
+
runId,
|
|
1685
|
+
target,
|
|
1686
|
+
comments: [],
|
|
1687
|
+
now: () => now
|
|
1688
|
+
});
|
|
1689
|
+
|
|
1690
|
+
await markCycleStepsCompleted(
|
|
1691
|
+
status.workspaceRoot,
|
|
1692
|
+
['provider/fetch-review', 'review/comment-triage', 'review/action-plan'],
|
|
1693
|
+
[
|
|
1694
|
+
result.artifacts.commentTriage,
|
|
1695
|
+
result.artifacts.understandingMemoJson,
|
|
1696
|
+
result.artifacts.understandingMemoMarkdown,
|
|
1697
|
+
result.artifacts.actionPlan,
|
|
1698
|
+
result.artifacts.replyDrafts,
|
|
1699
|
+
result.artifacts.publishDraft,
|
|
1700
|
+
result.artifacts.nextActions
|
|
1701
|
+
]
|
|
1702
|
+
);
|
|
1703
|
+
await recordMetricsSafe(status.workspaceRoot, {
|
|
1704
|
+
kind: 'comment-triage',
|
|
1705
|
+
createdAt: now.toISOString(),
|
|
1706
|
+
flowId: 'review/comment-triage',
|
|
1707
|
+
runId,
|
|
1708
|
+
counts: {
|
|
1709
|
+
triageComments: 0,
|
|
1710
|
+
fixPlanItems: result.actionPlan.length,
|
|
1711
|
+
replyDrafts: result.replyDrafts.length
|
|
1712
|
+
},
|
|
1713
|
+
artifactPaths: [
|
|
1714
|
+
result.artifacts.commentTriage.path,
|
|
1715
|
+
result.artifacts.understandingMemoJson.path,
|
|
1716
|
+
result.artifacts.understandingMemoMarkdown.path,
|
|
1717
|
+
result.artifacts.actionPlan.path,
|
|
1718
|
+
result.artifacts.replyDrafts.path,
|
|
1719
|
+
result.artifacts.publishDraft.path,
|
|
1720
|
+
result.artifacts.nextActions.path
|
|
1721
|
+
]
|
|
1722
|
+
});
|
|
1723
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.understandingMemoMarkdown.path);
|
|
1724
|
+
await vscode.window.showInformationMessage(
|
|
1725
|
+
localize('ReviewOps continued without provider input and created a local comment-response workspace.')
|
|
1726
|
+
);
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
async function markCycleStepsCompleted(
|
|
1730
|
+
workspaceRoot: string,
|
|
1731
|
+
completedFlowIds: string[],
|
|
1732
|
+
artifactRefs: Parameters<typeof advanceCurrentReviewOpsCycle>[0]['artifactRefs'] = []
|
|
1733
|
+
): Promise<void> {
|
|
1734
|
+
await advanceCurrentReviewOpsCycle({
|
|
1735
|
+
workspaceRoot,
|
|
1736
|
+
completedFlowIds,
|
|
1737
|
+
artifactRefs,
|
|
1738
|
+
now: () => new Date()
|
|
1739
|
+
});
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
async function markCycleStepBlocked(
|
|
1743
|
+
workspaceRoot: string,
|
|
1744
|
+
flowId: string,
|
|
1745
|
+
artifactRefs: Parameters<typeof advanceCurrentReviewOpsCycle>[0]['artifactRefs'] = [],
|
|
1746
|
+
reason = 'ReviewOps needs this step to be resolved before the cycle can continue.'
|
|
1747
|
+
): Promise<void> {
|
|
1748
|
+
const currentCycle = await loadCurrentReviewOpsCycle(workspaceRoot);
|
|
1749
|
+
if (currentCycle === null) {
|
|
1750
|
+
return;
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
const blockedStep = currentCycle.steps.find((step) => step.flowId === flowId);
|
|
1754
|
+
if (blockedStep === undefined) {
|
|
1755
|
+
return;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
const now = new Date().toISOString();
|
|
1759
|
+
const steps = currentCycle.steps.map((step) =>
|
|
1760
|
+
step.flowId === flowId
|
|
1761
|
+
? {
|
|
1762
|
+
...step,
|
|
1763
|
+
status: 'blocked' as const,
|
|
1764
|
+
artifacts: [...step.artifacts, ...artifactRefs.filter((artifact) => artifact.flowId === flowId)]
|
|
1765
|
+
}
|
|
1766
|
+
: step
|
|
1767
|
+
);
|
|
1768
|
+
await saveCurrentReviewOpsCycle({
|
|
1769
|
+
workspaceRoot,
|
|
1770
|
+
currentCycle: {
|
|
1771
|
+
...currentCycle,
|
|
1772
|
+
status: 'blocked',
|
|
1773
|
+
updatedAt: now,
|
|
1774
|
+
steps,
|
|
1775
|
+
nextActions: [
|
|
1776
|
+
{
|
|
1777
|
+
id: `blocked-${toReviewOpsId(flowId)}`,
|
|
1778
|
+
title: `Unblock ${blockedStep.title}`,
|
|
1779
|
+
flowId,
|
|
1780
|
+
reason
|
|
1781
|
+
}
|
|
1782
|
+
]
|
|
1783
|
+
}
|
|
1784
|
+
});
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
function toCycleId(flowId: string): ReviewOpsCycleId | undefined {
|
|
1788
|
+
if (
|
|
1789
|
+
flowId === 'cycle/mr-review' ||
|
|
1790
|
+
flowId === 'cycle/comment-response' ||
|
|
1791
|
+
flowId === 'cycle/fix-review' ||
|
|
1792
|
+
flowId === 'cycle/research' ||
|
|
1793
|
+
flowId === 'cycle/refactoring' ||
|
|
1794
|
+
flowId === 'cycle/field-report'
|
|
1795
|
+
) {
|
|
1796
|
+
return flowId;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
return undefined;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
export async function executeReviewOpsCommandCenterCommand(
|
|
1803
|
+
commandId: string,
|
|
1804
|
+
status: ReviewOpsMetaStatus,
|
|
1805
|
+
refreshStatusView: () => void,
|
|
1806
|
+
startContext?: ReviewOpsCycleStartContext,
|
|
1807
|
+
commandOptions?: ReviewOpsCommandExecutionOptions
|
|
1808
|
+
): Promise<boolean> {
|
|
1809
|
+
const entry = getReviewOpsCommandCatalogEntry(commandId);
|
|
1810
|
+
if (entry === undefined) {
|
|
1811
|
+
return false;
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
if (entry.requiresInitialized && !status.initialized) {
|
|
1815
|
+
await vscode.window.showWarningMessage(localize('Initialize ReviewOps project files before running {0}.', localize(entry.label)));
|
|
1816
|
+
return false;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
const cycleId = toCycleId(entry.id);
|
|
1820
|
+
if (cycleId !== undefined) {
|
|
1821
|
+
const cycleStartContext = normalizeReviewOpsCycleStartContext(entry.id, startContext);
|
|
1822
|
+
const cycleStartContextValidation = validateReviewOpsCycleStartContext(entry.id, cycleStartContext);
|
|
1823
|
+
if (cycleStartContextValidation !== undefined) {
|
|
1824
|
+
await vscode.window.showWarningMessage(
|
|
1825
|
+
cycleStartContextValidation === 'missing-target-files'
|
|
1826
|
+
? localize('ReviewOps needs target files before starting {0} with Selected files.', localize(entry.label))
|
|
1827
|
+
: localize('ReviewOps needs scope details before starting {0}.', localize(entry.label))
|
|
1828
|
+
);
|
|
1829
|
+
return false;
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
await continueNextAction(cycleId, status, refreshStatusView, cycleStartContext);
|
|
1833
|
+
return true;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
const command = commandForCommandCenterEntry(entry, status);
|
|
1837
|
+
if (command === undefined || command === 'reviewops.commandCenter') {
|
|
1838
|
+
return false;
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
if (commandOptions === undefined) {
|
|
1842
|
+
await vscode.commands.executeCommand(command);
|
|
1843
|
+
} else {
|
|
1844
|
+
await vscode.commands.executeCommand(command, commandOptions);
|
|
1845
|
+
}
|
|
1846
|
+
refreshStatusView();
|
|
1847
|
+
return true;
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
async function executeReviewOpsCommandCenterBatch(
|
|
1851
|
+
commandIds: string[],
|
|
1852
|
+
status: ReviewOpsMetaStatus,
|
|
1853
|
+
refreshStatusView: () => void
|
|
1854
|
+
): Promise<boolean> {
|
|
1855
|
+
const uniqueCommandIds = [...new Set(commandIds)];
|
|
1856
|
+
let currentStatus = status;
|
|
1857
|
+
let executedAny = false;
|
|
1858
|
+
|
|
1859
|
+
for (const commandId of uniqueCommandIds) {
|
|
1860
|
+
const entry = getReviewOpsCommandCatalogEntry(commandId);
|
|
1861
|
+
if (entry === undefined || !entry.batchable) {
|
|
1862
|
+
continue;
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
const executed = await executeReviewOpsCommandCenterCommand(commandId, currentStatus, refreshStatusView);
|
|
1866
|
+
executedAny = executedAny || executed;
|
|
1867
|
+
currentStatus = (await readWorkspaceStatus()) ?? currentStatus;
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
return executedAny;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
async function requireWorkspaceRoot(): Promise<string | undefined> {
|
|
1874
|
+
const workspaceRoot = getWorkspaceRoot();
|
|
1875
|
+
if (workspaceRoot === undefined) {
|
|
1876
|
+
await vscode.window.showWarningMessage(localize('ReviewOps requires an open workspace folder.'));
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
return workspaceRoot;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
function createDefaultProjectContextInput(workspaceRoot: string): ProjectContextInput {
|
|
1883
|
+
return {
|
|
1884
|
+
technicalStack: [`Workspace: ${path.basename(workspaceRoot) || 'Current workspace'}`]
|
|
1885
|
+
};
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
function getWorkspaceRoot(): string | undefined {
|
|
1889
|
+
return vscode.workspace.workspaceFolders?.[0]?.uri.fsPath;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
async function readGitHubTokenOrPromptSetup(context: vscode.ExtensionContext): Promise<string | undefined> {
|
|
1893
|
+
const token = await context.secrets.get(githubTokenSecretKey);
|
|
1894
|
+
if (token !== undefined && token.trim().length > 0) {
|
|
1895
|
+
return token;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
const setupGitHubTokenLabel = localize('Setup GitHub Token');
|
|
1899
|
+
const selection = await vscode.window.showWarningMessage(
|
|
1900
|
+
localize('ReviewOps needs a GitHub token in VS Code SecretStorage before calling the GitHub provider.'),
|
|
1901
|
+
setupGitHubTokenLabel
|
|
1902
|
+
);
|
|
1903
|
+
if (selection === setupGitHubTokenLabel) {
|
|
1904
|
+
await vscode.commands.executeCommand('reviewops.setupGitHubToken');
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
return undefined;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
async function promptApprovedRuleCandidates(
|
|
1911
|
+
candidates: RuleCandidate[],
|
|
1912
|
+
appliedCandidateIds: ReadonlySet<string>
|
|
1913
|
+
): Promise<RuleCandidate[] | undefined> {
|
|
1914
|
+
const applicableCandidates = candidates.filter((candidate) => isP0ApplicableRuleCandidate(candidate, appliedCandidateIds));
|
|
1915
|
+
if (applicableCandidates.length === 0) {
|
|
1916
|
+
const recordSkippedRulesLabel = localize('Record Skipped Rules');
|
|
1917
|
+
const selection = await vscode.window.showWarningMessage(
|
|
1918
|
+
localize(
|
|
1919
|
+
'ReviewOps found {0} rule candidate but none is new, approved, and applicable for P0 local flows. Record the skipped result and continue?',
|
|
1920
|
+
candidates.length
|
|
1921
|
+
),
|
|
1922
|
+
{ modal: true },
|
|
1923
|
+
recordSkippedRulesLabel
|
|
1924
|
+
);
|
|
1925
|
+
return selection === recordSkippedRulesLabel ? [] : undefined;
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
const selected = await vscode.window.showQuickPick(
|
|
1929
|
+
applicableCandidates.map((candidate) => ({
|
|
1930
|
+
label: candidate.title,
|
|
1931
|
+
description: `${candidate.kind} / ${candidate.scope}`,
|
|
1932
|
+
detail: candidate.rationale,
|
|
1933
|
+
candidate
|
|
1934
|
+
})),
|
|
1935
|
+
{
|
|
1936
|
+
canPickMany: true,
|
|
1937
|
+
placeHolder: localize('Select rule candidates that a user approved for local ReviewOps saving.')
|
|
1938
|
+
}
|
|
1939
|
+
);
|
|
1940
|
+
if (selected === undefined) {
|
|
1941
|
+
return undefined;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
const approvedCandidates = selected.map((item) => item.candidate);
|
|
1945
|
+
if (approvedCandidates.length === 0) {
|
|
1946
|
+
const continueWithoutRulesLabel = localize('Continue Without Rules');
|
|
1947
|
+
const selection = await vscode.window.showWarningMessage(
|
|
1948
|
+
localize('ReviewOps will save no rules and record all candidates as skipped. Continue?'),
|
|
1949
|
+
{ modal: true },
|
|
1950
|
+
continueWithoutRulesLabel
|
|
1951
|
+
);
|
|
1952
|
+
return selection === continueWithoutRulesLabel ? [] : undefined;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
const portableCount = approvedCandidates.filter((candidate) => candidate.scope === 'portable-candidate').length;
|
|
1956
|
+
const applyApprovedRulesLabel = localize('Apply Approved Rules');
|
|
1957
|
+
const selection = await vscode.window.showWarningMessage(
|
|
1958
|
+
[
|
|
1959
|
+
localize('ReviewOps will save {0} approved rule candidate.', approvedCandidates.length),
|
|
1960
|
+
portableCount > 0
|
|
1961
|
+
? localize('{0} portable candidate still requires the checklist before sharing.', portableCount)
|
|
1962
|
+
: undefined
|
|
1963
|
+
]
|
|
1964
|
+
.filter((line): line is string => line !== undefined)
|
|
1965
|
+
.join(' '),
|
|
1966
|
+
{ modal: true },
|
|
1967
|
+
applyApprovedRulesLabel
|
|
1968
|
+
);
|
|
1969
|
+
|
|
1970
|
+
return selection === applyApprovedRulesLabel ? approvedCandidates : undefined;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
export function isP0ApplicableRuleCandidate(candidate: RuleCandidate, appliedCandidateIds: ReadonlySet<string> = new Set()): boolean {
|
|
1974
|
+
return (
|
|
1975
|
+
candidate.status === 'new' &&
|
|
1976
|
+
!appliedCandidateIds.has(candidate.id) &&
|
|
1977
|
+
(candidate.scope === 'project-local' || candidate.scope === 'portable-candidate')
|
|
1978
|
+
);
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
export function createManualRuleCandidateSeed(title: string, rationale: string, now: Date): RuleCandidateSeed {
|
|
1982
|
+
return {
|
|
1983
|
+
id: `manual-rule-${createRunId(now)}`,
|
|
1984
|
+
title: title.trim(),
|
|
1985
|
+
rationale: rationale.trim()
|
|
1986
|
+
};
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
async function createDefaultReviewReply(
|
|
1990
|
+
workspaceRoot: string,
|
|
1991
|
+
currentCycle: ReviewOpsCurrentCycle | null
|
|
1992
|
+
): Promise<ReviewReply> {
|
|
1993
|
+
const actionPlan = await loadLatestReviewActionPlan(workspaceRoot);
|
|
1994
|
+
const title =
|
|
1995
|
+
actionPlan?.[0]?.title ??
|
|
1996
|
+
(currentCycle === null
|
|
1997
|
+
? 'ReviewOps follow-up'
|
|
1998
|
+
: `${formatCycleTitle(currentCycle.title)} follow-up`);
|
|
1999
|
+
|
|
2000
|
+
return {
|
|
2001
|
+
commentId: 'reviewops-summary',
|
|
2002
|
+
body: [
|
|
2003
|
+
`ReviewOps draft: ${title}`,
|
|
2004
|
+
'',
|
|
2005
|
+
'Please edit this local draft before publishing if reviewer-specific wording is required.'
|
|
2006
|
+
].join('\n')
|
|
2007
|
+
};
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
async function createDefaultSummaryCommentBody(
|
|
2011
|
+
workspaceRoot: string,
|
|
2012
|
+
currentCycle: ReviewOpsCurrentCycle | null
|
|
2013
|
+
): Promise<string> {
|
|
2014
|
+
const actionPlan = await loadLatestReviewActionPlan(workspaceRoot);
|
|
2015
|
+
if (actionPlan !== undefined && actionPlan.length > 0) {
|
|
2016
|
+
return [
|
|
2017
|
+
'ReviewOps summary draft:',
|
|
2018
|
+
'',
|
|
2019
|
+
...actionPlan.map((item) => `- ${item.title}`),
|
|
2020
|
+
'',
|
|
2021
|
+
'Please review and edit this draft before posting.'
|
|
2022
|
+
].join('\n');
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
return [
|
|
2026
|
+
`ReviewOps summary draft for ${currentCycle === null ? 'the current workspace' : formatCycleTitle(currentCycle.title)}.`,
|
|
2027
|
+
'',
|
|
2028
|
+
'Please review and edit this draft before posting.'
|
|
2029
|
+
].join('\n');
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
function createSummaryPublishDraft(target: ReviewTargetRef, body: string, now: Date): PublishDraft {
|
|
2033
|
+
const createdAt = now.toISOString();
|
|
2034
|
+
if (target.provider === 'github') {
|
|
2035
|
+
try {
|
|
2036
|
+
return createSummaryCommentDraft({
|
|
2037
|
+
target,
|
|
2038
|
+
body,
|
|
2039
|
+
createdAt
|
|
2040
|
+
});
|
|
2041
|
+
} catch {
|
|
2042
|
+
// Keep summary preview usable for partially known provider targets.
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
return {
|
|
2047
|
+
id: `draft_${createdAt.replaceAll(/[^0-9a-z]/giu, '')}_${toReviewOpsId(target.provider)}_${toReviewOpsId(target.id)}`,
|
|
2048
|
+
provider: target.provider,
|
|
2049
|
+
target,
|
|
2050
|
+
title: `Summary draft for ${target.repository} ${target.id}`,
|
|
2051
|
+
body: body.trim(),
|
|
2052
|
+
mode: 'summary-comment',
|
|
2053
|
+
requiresConfirmation: true,
|
|
2054
|
+
status: 'draft',
|
|
2055
|
+
createdAt
|
|
2056
|
+
};
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
function createReviewActionPlanFromCurrentCycle(currentCycle: ReviewOpsCurrentCycle | null): ReviewActionPlanItem[] {
|
|
2060
|
+
const fromStartContext = createReviewActionPlanFromCycleStartContext(currentCycle?.startContext, currentCycle?.cycleId);
|
|
2061
|
+
return fromStartContext ?? [createDefaultReviewActionPlanItem(currentCycle)];
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
function createReviewActionPlanFromCycleStartContext(
|
|
2065
|
+
startContext: ReviewOpsCycleStartContext | undefined,
|
|
2066
|
+
cycleId?: ReviewOpsCycleId
|
|
2067
|
+
): ReviewActionPlanItem[] | undefined {
|
|
2068
|
+
if (startContext === undefined) {
|
|
2069
|
+
return undefined;
|
|
2070
|
+
}
|
|
2071
|
+
const refactor = cycleId === 'cycle/refactoring';
|
|
2072
|
+
|
|
2073
|
+
return [
|
|
2074
|
+
{
|
|
2075
|
+
id: `cycle-action-${toReviewOpsId(startContext.scopeLabel)}`,
|
|
2076
|
+
title: startContext.intent,
|
|
2077
|
+
priority: 'P1',
|
|
2078
|
+
source: 'response',
|
|
2079
|
+
relatedCommentIds: [],
|
|
2080
|
+
steps: [
|
|
2081
|
+
`${refactor ? 'Scope the refactor' : 'Scope the work'}: ${startContext.scopeLabel}`,
|
|
2082
|
+
...(startContext.targetFiles ?? []).map((file) => `Inspect ${file}`),
|
|
2083
|
+
refactor
|
|
2084
|
+
? 'Apply the smallest behavior-preserving refactor outside ReviewOps.'
|
|
2085
|
+
: 'Apply the smallest manual change outside ReviewOps.',
|
|
2086
|
+
'Run focused verification and record the result.'
|
|
2087
|
+
],
|
|
2088
|
+
doneCriteria: [
|
|
2089
|
+
refactor
|
|
2090
|
+
? 'The scoped refactor is implemented or explicitly deferred.'
|
|
2091
|
+
: 'The scoped work is implemented or explicitly deferred.',
|
|
2092
|
+
...(refactor ? ['No behavior change is expected unless explicitly documented.'] : []),
|
|
2093
|
+
'A focused verification result is recorded in ReviewOps.'
|
|
2094
|
+
]
|
|
2095
|
+
}
|
|
2096
|
+
];
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
function createDefaultReviewActionPlanItem(currentCycle: ReviewOpsCurrentCycle | null): ReviewActionPlanItem {
|
|
2100
|
+
const cycleId = currentCycle?.cycleId;
|
|
2101
|
+
const title = defaultActionPlanTitleForCycle(cycleId);
|
|
2102
|
+
|
|
2103
|
+
return {
|
|
2104
|
+
id: `cycle-action-${toReviewOpsId(cycleId ?? 'current-workspace')}`,
|
|
2105
|
+
title,
|
|
2106
|
+
priority: 'P1',
|
|
2107
|
+
source: 'response',
|
|
2108
|
+
relatedCommentIds: [],
|
|
2109
|
+
steps: defaultActionPlanStepsForCycle(cycleId),
|
|
2110
|
+
doneCriteria: [
|
|
2111
|
+
'The smallest relevant main file is reviewed.',
|
|
2112
|
+
'Any required code or reply work is explicitly completed or deferred.',
|
|
2113
|
+
'A focused verification result is recorded before publishing.'
|
|
2114
|
+
]
|
|
2115
|
+
};
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
function createDefaultManualSkillEvidence(
|
|
2119
|
+
currentCycle: ReviewOpsCurrentCycle | null
|
|
2120
|
+
): Parameters<typeof buildSkillEvidenceArtifacts>[0]['manualEvidence'] {
|
|
2121
|
+
if (currentCycle === null) {
|
|
2122
|
+
return [];
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
return [
|
|
2126
|
+
{
|
|
2127
|
+
kind: 'technical-explanation',
|
|
2128
|
+
title: `${formatCycleTitle(currentCycle.title)} progress captured`,
|
|
2129
|
+
summary: 'ReviewOps captured cycle progress without requiring additional Webview input.',
|
|
2130
|
+
strength: 'weak'
|
|
2131
|
+
}
|
|
2132
|
+
];
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
function defaultActionPlanTitleForCycle(cycleId: ReviewOpsCycleId | undefined): string {
|
|
2136
|
+
switch (cycleId) {
|
|
2137
|
+
case 'cycle/mr-review':
|
|
2138
|
+
return 'Review the current workspace diff and prepare a reviewer-safe response.';
|
|
2139
|
+
case 'cycle/comment-response':
|
|
2140
|
+
return 'Triage available reviewer comments and prepare the smallest safe response.';
|
|
2141
|
+
case 'cycle/fix-review':
|
|
2142
|
+
return 'Review the current fix and verify remaining reviewer risk.';
|
|
2143
|
+
case 'cycle/research':
|
|
2144
|
+
return 'Investigate the current workspace and identify concrete risks, decisions, and next actions.';
|
|
2145
|
+
case 'cycle/refactoring':
|
|
2146
|
+
return 'Plan the smallest safe refactoring path for the current workspace.';
|
|
2147
|
+
case 'cycle/field-report':
|
|
2148
|
+
return 'Summarize current ReviewOps evidence into a field report.';
|
|
2149
|
+
default:
|
|
2150
|
+
return 'Review the current workspace and decide the next smallest safe action.';
|
|
2151
|
+
}
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
function defaultActionPlanStepsForCycle(cycleId: ReviewOpsCycleId | undefined): string[] {
|
|
2155
|
+
switch (cycleId) {
|
|
2156
|
+
case 'cycle/comment-response':
|
|
2157
|
+
return [
|
|
2158
|
+
'Use any available provider comments or local notes.',
|
|
2159
|
+
'Identify the smallest response or fix that reduces review risk.',
|
|
2160
|
+
'Draft the response locally before publishing.'
|
|
2161
|
+
];
|
|
2162
|
+
case 'cycle/refactoring':
|
|
2163
|
+
return [
|
|
2164
|
+
'Scope the behavior-preserving refactor.',
|
|
2165
|
+
'Plan the smallest local change.',
|
|
2166
|
+
'Run focused verification and capture the result.'
|
|
2167
|
+
];
|
|
2168
|
+
case 'cycle/field-report':
|
|
2169
|
+
return [
|
|
2170
|
+
'Gather the latest ReviewOps artifacts.',
|
|
2171
|
+
'Summarize unresolved risks, added tests, rules, knowledge, and skill evidence.',
|
|
2172
|
+
'Review the generated field report before sharing.'
|
|
2173
|
+
];
|
|
2174
|
+
default:
|
|
2175
|
+
return [
|
|
2176
|
+
'Inspect the current workspace state.',
|
|
2177
|
+
'Apply or explicitly defer the smallest relevant manual change.',
|
|
2178
|
+
'Run focused verification and capture the result.'
|
|
2179
|
+
];
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
type ReviewFixVerificationInput = {
|
|
2184
|
+
fixPlan: ReviewFixPlan;
|
|
2185
|
+
results: Array<Omit<ReviewFixVerificationResult, 'id' | 'verifiedAt'>>;
|
|
2186
|
+
};
|
|
2187
|
+
|
|
2188
|
+
async function resolveReviewFixVerificationInput(
|
|
2189
|
+
workspaceRoot: string,
|
|
2190
|
+
planFlowId = 'fix/plan',
|
|
2191
|
+
itemNoun = 'review fix'
|
|
2192
|
+
): Promise<ReviewFixVerificationInput | undefined> {
|
|
2193
|
+
const fixPlan = await loadLatestReviewFixPlan(workspaceRoot, planFlowId);
|
|
2194
|
+
if (fixPlan === undefined) {
|
|
2195
|
+
await vscode.window.showWarningMessage(localize('Build a ReviewOps {0} plan before recording verification.', itemNoun));
|
|
2196
|
+
return undefined;
|
|
2197
|
+
}
|
|
2198
|
+
if (fixPlan.items.length === 0) {
|
|
2199
|
+
await vscode.window.showWarningMessage(localize('ReviewOps could not find any {0} plan items to verify.', itemNoun));
|
|
2200
|
+
return undefined;
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
return {
|
|
2204
|
+
fixPlan,
|
|
2205
|
+
results: fixPlan.items.map((item) => ({
|
|
2206
|
+
fixPlanItemId: item.id,
|
|
2207
|
+
status: 'needs_followup_issue',
|
|
2208
|
+
evidence:
|
|
2209
|
+
'ReviewOps created this verification note without extra Webview input. Replace this text with actual verification evidence before treating the work as complete.',
|
|
2210
|
+
commands: [],
|
|
2211
|
+
followUpIssueTitle: `Verify ${item.title}`
|
|
2212
|
+
}))
|
|
2213
|
+
};
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
function toReviewOpsId(value: string): string {
|
|
2217
|
+
const normalized = value.replaceAll(/[^0-9a-z]+/giu, '-').replaceAll(/^-+|-+$/gu, '').toLowerCase();
|
|
2218
|
+
return normalized.length > 0 ? normalized : 'manual-item';
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
async function resolveRuleProposalInput(
|
|
2222
|
+
workspaceRoot: string,
|
|
2223
|
+
now: Date,
|
|
2224
|
+
options?: ReviewOpsCommandExecutionOptions['ruleProposal']
|
|
2225
|
+
): Promise<{ ruleSeeds?: RuleCandidateSeed[]; findings?: ReviewFindingSeed[] } | undefined> {
|
|
2226
|
+
if (options !== undefined && options.title !== undefined && options.rationale !== undefined) {
|
|
2227
|
+
const title = options.title.trim();
|
|
2228
|
+
const rationale = options.rationale.trim();
|
|
2229
|
+
if (title.length === 0 || rationale.length === 0) {
|
|
2230
|
+
await vscode.window.showWarningMessage(localize('ReviewOps needs a rule title and rationale before proposing a manual rule.'));
|
|
2231
|
+
return undefined;
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
return {
|
|
2235
|
+
ruleSeeds: [createManualRuleCandidateSeed(title, rationale, now)]
|
|
2236
|
+
};
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
const findings = (await loadLatestReviewFindingSeeds(workspaceRoot)) ?? [];
|
|
2240
|
+
if (findings.length > 0) {
|
|
2241
|
+
return { findings };
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
const title = await vscode.window.showInputBox({
|
|
2245
|
+
prompt: localize('Rule candidate title to preview before saving.'),
|
|
2246
|
+
placeHolder: localize('Require focused verification for risky review fixes'),
|
|
2247
|
+
ignoreFocusOut: true
|
|
2248
|
+
});
|
|
2249
|
+
if (title === undefined || title.trim().length === 0) {
|
|
2250
|
+
return undefined;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
const rationale = await vscode.window.showInputBox({
|
|
2254
|
+
prompt: localize('Why this rule candidate is useful.'),
|
|
2255
|
+
ignoreFocusOut: true
|
|
2256
|
+
});
|
|
2257
|
+
if (rationale === undefined || rationale.trim().length === 0) {
|
|
2258
|
+
return undefined;
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
return {
|
|
2262
|
+
ruleSeeds: [createManualRuleCandidateSeed(title, rationale, now)]
|
|
2263
|
+
};
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
function resolveFieldReportOptions(
|
|
2267
|
+
now: Date,
|
|
2268
|
+
options?: ReviewOpsCommandExecutionOptions['fieldReport']
|
|
2269
|
+
): { period: FieldReport['period']; targetScope: FieldReport['targetScope'] } {
|
|
2270
|
+
const defaultPeriod = createSevenDayReportPeriod(now);
|
|
2271
|
+
const from = normalizeDateOnly(options?.from) ?? defaultPeriod.from;
|
|
2272
|
+
const to = normalizeDateOnly(options?.to) ?? defaultPeriod.to;
|
|
2273
|
+
|
|
2274
|
+
return {
|
|
2275
|
+
period: from <= to ? { from, to } : { from: to, to: from },
|
|
2276
|
+
targetScope: isFieldReportTargetScope(options?.targetScope) ? options.targetScope : 'field'
|
|
2277
|
+
};
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
function normalizeDateOnly(value: string | undefined): string | undefined {
|
|
2281
|
+
if (value === undefined) {
|
|
2282
|
+
return undefined;
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
const trimmed = value.trim();
|
|
2286
|
+
return /^\d{4}-\d{2}-\d{2}$/u.test(trimmed) ? trimmed : undefined;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
function isFieldReportTargetScope(value: unknown): value is FieldReport['targetScope'] {
|
|
2290
|
+
return value === 'developer' || value === 'field' || value === 'reviewer' || value === 'team';
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
function formatProjectInitMessage(result: ProjectInitResult): string {
|
|
2294
|
+
return localize(
|
|
2295
|
+
'ReviewOps project files are ready. {0} created {1} updated {2} existing',
|
|
2296
|
+
result.created.length,
|
|
2297
|
+
result.updated.length,
|
|
2298
|
+
result.existing.length
|
|
2299
|
+
);
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
export function formatStatusMessage(status: ReviewOpsMetaStatus): string {
|
|
2303
|
+
const nextAction = status.nextActions[0] === undefined ? localize('No next action') : formatNextActionTitle(status.nextActions[0]);
|
|
2304
|
+
const initialized = status.initialized ? localize('ReviewOps is ready.') : localize('ReviewOps is not initialized.');
|
|
2305
|
+
const cycle =
|
|
2306
|
+
status.currentCycle === null
|
|
2307
|
+
? localize('Current cycle: {0}.', localize('None'))
|
|
2308
|
+
: localize(
|
|
2309
|
+
'Current cycle: {0}.',
|
|
2310
|
+
`${formatCycleTitle(status.currentCycle.title)} ${formatCycleStatus(status.currentCycle.status)}`
|
|
2311
|
+
);
|
|
2312
|
+
return `${initialized} ${cycle} ${localize('Next: {0}.', nextAction)}`;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
async function openWorkspaceFile(workspaceRoot: string, relativePath: string): Promise<void> {
|
|
2316
|
+
if (activeWebviewRunCapture !== undefined) {
|
|
2317
|
+
activeWebviewRunCapture.openedFiles.push({ workspaceRoot, relativePath });
|
|
2318
|
+
return;
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
const document = await vscode.workspace.openTextDocument(vscode.Uri.file(path.join(workspaceRoot, relativePath)));
|
|
2322
|
+
await vscode.window.showTextDocument(document, {
|
|
2323
|
+
preview: false
|
|
2324
|
+
});
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
function formatPromptReadyMessage(baseMessage: string): string {
|
|
2328
|
+
return localize(
|
|
2329
|
+
'{0} Use the opened prompt only when you want outside review; otherwise continue with the next step.',
|
|
2330
|
+
baseMessage
|
|
2331
|
+
);
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
function formatScopedPromptReadyMessage(status: ReviewOpsMetaStatus): string {
|
|
2335
|
+
return formatPromptReadyMessage(
|
|
2336
|
+
localize('ReviewOps prepared a scoped {0} prompt.', formatCycleTitle(status.currentCycle?.title ?? 'Research Cycle'))
|
|
2337
|
+
);
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
function promptFlowIdsForCurrentCycle(currentCycle: ReviewOpsCurrentCycle | null): string[] {
|
|
2341
|
+
return currentCycle?.cycleId === 'cycle/research'
|
|
2342
|
+
? ['research/select-scope', 'research/investigate']
|
|
2343
|
+
: ['review/select-target', 'diff/review'];
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
function responseFlowIdsForCurrentCycle(currentCycle: ReviewOpsCurrentCycle | null): string[] {
|
|
2347
|
+
return currentCycle?.cycleId === 'cycle/research'
|
|
2348
|
+
? ['research/import-findings', 'research/normalize-findings']
|
|
2349
|
+
: ['response/import', 'response/normalize'];
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
function responseImportFlowIdForCurrentCycle(currentCycle: ReviewOpsCurrentCycle | null): string {
|
|
2353
|
+
return currentCycle?.cycleId === 'cycle/research' ? 'research/import-findings' : 'response/import';
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
function actionPlanFlowIdForCurrentCycle(currentCycle: ReviewOpsCurrentCycle | null): string {
|
|
2357
|
+
return currentCycle?.cycleId === 'cycle/research' ? 'research/action-plan' : 'review/action-plan';
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
function actionPlanTitleForCurrentCycle(currentCycle: ReviewOpsCurrentCycle | null): string {
|
|
2361
|
+
return currentCycle?.cycleId === 'cycle/research' ? 'ReviewOps Research Action Plan' : 'ReviewOps Action Plan';
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
export function actionPlanNextFlowIdForCurrentCycle(currentCycle: ReviewOpsCurrentCycle | null): string {
|
|
2365
|
+
switch (currentCycle?.cycleId) {
|
|
2366
|
+
case 'cycle/research':
|
|
2367
|
+
return 'knowledge/capture-candidates';
|
|
2368
|
+
case 'cycle/mr-review':
|
|
2369
|
+
return 'publish/summary-draft';
|
|
2370
|
+
case 'cycle/comment-response':
|
|
2371
|
+
case 'cycle/fix-review':
|
|
2372
|
+
default:
|
|
2373
|
+
return 'fix/plan';
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
function workPlanFlowIdForCurrentCycle(currentCycle: ReviewOpsCurrentCycle | null): string {
|
|
2378
|
+
return currentCycle?.cycleId === 'cycle/refactoring' ? 'refactor/plan' : 'fix/plan';
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
function workChecklistFlowIdForCurrentCycle(currentCycle: ReviewOpsCurrentCycle | null): string {
|
|
2382
|
+
return currentCycle?.cycleId === 'cycle/refactoring' ? 'refactor/checklist' : 'fix/checklist';
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
function workVerifyFlowIdForCurrentCycle(currentCycle: ReviewOpsCurrentCycle | null): string {
|
|
2386
|
+
return currentCycle?.cycleId === 'cycle/refactoring' ? 'refactor/verify' : 'fix/verify';
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
function workExplainFlowIdForCurrentCycle(currentCycle: ReviewOpsCurrentCycle | null): string {
|
|
2390
|
+
return currentCycle?.cycleId === 'cycle/refactoring' ? 'refactor/explain' : 'fix/explain';
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
function formatWorkItemNoun(currentCycle: ReviewOpsCurrentCycle | null): string {
|
|
2394
|
+
return currentCycle?.cycleId === 'cycle/refactoring' ? localize('refactor') : localize('review fix');
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
function attachArtifactsToCompletedFlows(artifactRefs: FlowArtifactRef[], completedFlowIds: string[]): FlowArtifactRef[] {
|
|
2398
|
+
return completedFlowIds.flatMap((flowId) => artifactRefs.map((artifact) => ({ ...artifact, flowId })));
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
async function prepareScopedCyclePrompt(
|
|
2402
|
+
status: ReviewOpsMetaStatus,
|
|
2403
|
+
startContext: ReviewOpsCycleStartContext
|
|
2404
|
+
): Promise<void> {
|
|
2405
|
+
const flowIds = promptFlowIdsForCurrentCycle(status.currentCycle);
|
|
2406
|
+
const result = await buildScopedCyclePromptArtifacts(status.workspaceRoot, startContext, flowIds.at(-1));
|
|
2407
|
+
await markCycleStepsCompleted(
|
|
2408
|
+
status.workspaceRoot,
|
|
2409
|
+
flowIds,
|
|
2410
|
+
attachArtifactsToCompletedFlows([result.artifacts.prompt, result.artifacts.inputSummary, result.artifacts.metadata], flowIds)
|
|
2411
|
+
);
|
|
2412
|
+
await openWorkspaceFile(status.workspaceRoot, result.artifacts.prompt.path);
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
function withCycleStartContext(
|
|
2416
|
+
input: ReviewPromptInput,
|
|
2417
|
+
startContext: ReviewOpsCycleStartContext | undefined
|
|
2418
|
+
): ReviewPromptInput {
|
|
2419
|
+
if (startContext === undefined) {
|
|
2420
|
+
return input;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
return {
|
|
2424
|
+
...input,
|
|
2425
|
+
focus: [...(input.focus ?? []), ...createCycleStartContextFocus(startContext)],
|
|
2426
|
+
notes: [input.notes, renderCycleStartContextNotes(startContext)].filter((note): note is string => Boolean(note)).join('\n\n')
|
|
2427
|
+
};
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
function createSevenDayReportPeriod(now: Date): { from: string; to: string } {
|
|
2431
|
+
const from = new Date(now.getTime());
|
|
2432
|
+
from.setUTCDate(from.getUTCDate() - 6);
|
|
2433
|
+
|
|
2434
|
+
return {
|
|
2435
|
+
from: from.toISOString().slice(0, 10),
|
|
2436
|
+
to: now.toISOString().slice(0, 10)
|
|
2437
|
+
};
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
async function recordMetricsSafe(workspaceRoot: string, event: ReviewOpsMetricsEventInput): Promise<void> {
|
|
2441
|
+
try {
|
|
2442
|
+
await recordReviewOpsMetricsEvent({
|
|
2443
|
+
workspaceRoot,
|
|
2444
|
+
event
|
|
2445
|
+
});
|
|
2446
|
+
} catch (error) {
|
|
2447
|
+
await vscode.window.showWarningMessage(localize('ReviewOps could not update local metrics files: {0}', formatError(error)));
|
|
2448
|
+
}
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
function countVerificationTestSignals(verification: ReviewFixVerification): number {
|
|
2452
|
+
return verification.results.filter((result) =>
|
|
2453
|
+
[...result.commands, result.evidence].some((value) => /(test|spec|coverage)/iu.test(value))
|
|
2454
|
+
).length;
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
function openPublishDraftPreview(workspaceRoot: string, draft: PublishDraft, artifacts: PublishDraftArtifactPaths): void {
|
|
2458
|
+
if (activeWebviewRunCapture !== undefined) {
|
|
2459
|
+
activeWebviewRunCapture.openedFiles.push({ workspaceRoot, relativePath: artifacts.markdownPath });
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
const panel = vscode.window.createWebviewPanel(
|
|
2463
|
+
'reviewopsPublishDraftPreview',
|
|
2464
|
+
localize('ReviewOps Publish Draft Preview'),
|
|
2465
|
+
vscode.ViewColumn.Active,
|
|
2466
|
+
{
|
|
2467
|
+
enableScripts: false,
|
|
2468
|
+
retainContextWhenHidden: false
|
|
2469
|
+
}
|
|
2470
|
+
);
|
|
2471
|
+
|
|
2472
|
+
panel.webview.html = renderPublishDraftPreviewHtml(draft, artifacts);
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
function openStatusPreview(status: ReviewOpsMetaStatus): void {
|
|
2476
|
+
const panel = vscode.window.createWebviewPanel(
|
|
2477
|
+
'reviewopsStatusPreview',
|
|
2478
|
+
localize('ReviewOps Preview'),
|
|
2479
|
+
vscode.ViewColumn.Active,
|
|
2480
|
+
{
|
|
2481
|
+
enableScripts: false,
|
|
2482
|
+
retainContextWhenHidden: false
|
|
2483
|
+
}
|
|
2484
|
+
);
|
|
2485
|
+
|
|
2486
|
+
panel.webview.html = renderStatusPreview(status);
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
function openCommandCenter(
|
|
2490
|
+
status: ReviewOpsMetaStatus,
|
|
2491
|
+
refreshStatusView: () => void,
|
|
2492
|
+
context: vscode.ExtensionContext
|
|
2493
|
+
): void {
|
|
2494
|
+
if (activeCommandCenterPanel !== undefined) {
|
|
2495
|
+
activeCommandCenterPanel.reveal(vscode.ViewColumn.Active);
|
|
2496
|
+
return;
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2499
|
+
const panel = vscode.window.createWebviewPanel(
|
|
2500
|
+
'reviewopsCommandCenter',
|
|
2501
|
+
localize('ReviewOps Command Center'),
|
|
2502
|
+
vscode.ViewColumn.Active,
|
|
2503
|
+
{
|
|
2504
|
+
enableScripts: true,
|
|
2505
|
+
retainContextWhenHidden: true
|
|
2506
|
+
}
|
|
2507
|
+
);
|
|
2508
|
+
activeCommandCenterPanel = panel;
|
|
2509
|
+
panel.onDidDispose(() => {
|
|
2510
|
+
if (activeCommandCenterPanel === panel) {
|
|
2511
|
+
activeCommandCenterPanel = undefined;
|
|
2512
|
+
}
|
|
2513
|
+
});
|
|
2514
|
+
const render = async (
|
|
2515
|
+
currentStatus: ReviewOpsMetaStatus,
|
|
2516
|
+
runResult?: ReviewOpsWebviewRunResult,
|
|
2517
|
+
experienceMode = readReviewOpsExperienceMode(context)
|
|
2518
|
+
) => {
|
|
2519
|
+
panel.webview.html = renderCommandCenterHtml({
|
|
2520
|
+
status: currentStatus,
|
|
2521
|
+
commands: listReviewOpsCommandCatalog(),
|
|
2522
|
+
nonce: createNonce(),
|
|
2523
|
+
cspSource: panel.webview.cspSource,
|
|
2524
|
+
runResult,
|
|
2525
|
+
experienceMode
|
|
2526
|
+
});
|
|
2527
|
+
};
|
|
2528
|
+
|
|
2529
|
+
void render(status);
|
|
2530
|
+
panel.webview.onDidReceiveMessage((message: unknown) => {
|
|
2531
|
+
void runCommand(async () => {
|
|
2532
|
+
if (isCommandCenterOpenFileMessage(message)) {
|
|
2533
|
+
const currentStatus = (await readWorkspaceStatus()) ?? status;
|
|
2534
|
+
if (!isCommandCenterOpenableFile(message.relativePath)) {
|
|
2535
|
+
await vscode.window.showWarningMessage(localize('ReviewOps ignored an unavailable local file.'));
|
|
2536
|
+
return;
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
await openWorkspaceFile(currentStatus.workspaceRoot, message.relativePath);
|
|
2540
|
+
return;
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
if (isCommandCenterSetExperienceModeMessage(message)) {
|
|
2544
|
+
await getExtensionWorkspaceState(context)?.update(reviewOpsExperienceModeKey, message.experienceMode);
|
|
2545
|
+
await getExtensionGlobalState(context)?.update(reviewOpsExperienceModeKey, message.experienceMode);
|
|
2546
|
+
const currentStatus = (await readWorkspaceStatus()) ?? status;
|
|
2547
|
+
await render(currentStatus, undefined, message.experienceMode);
|
|
2548
|
+
return;
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
if (
|
|
2552
|
+
!isCommandCenterRunMessage(message) &&
|
|
2553
|
+
!isCommandCenterRunBatchMessage(message) &&
|
|
2554
|
+
!isCommandCenterRunInputMessage(message) &&
|
|
2555
|
+
!isCommandCenterStartCycleWithContextMessage(message) &&
|
|
2556
|
+
!isCommandCenterRunWithOptionsMessage(message) &&
|
|
2557
|
+
!isCommandCenterSkipOptionalStepMessage(message)
|
|
2558
|
+
) {
|
|
2559
|
+
return;
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2562
|
+
const currentStatus = (await readWorkspaceStatus()) ?? status;
|
|
2563
|
+
let commandIds: string[];
|
|
2564
|
+
if (isCommandCenterRunBatchMessage(message)) {
|
|
2565
|
+
commandIds = message.commandIds;
|
|
2566
|
+
} else if (isCommandCenterRunInputMessage(message)) {
|
|
2567
|
+
const resolvedInput = resolveCommandCenterInput(listReviewOpsCommandCatalog(), message.inputValue);
|
|
2568
|
+
if (resolvedInput === undefined) {
|
|
2569
|
+
await render(
|
|
2570
|
+
currentStatus,
|
|
2571
|
+
await createCommandCenterRunResult({
|
|
2572
|
+
entry: undefined,
|
|
2573
|
+
executed: false,
|
|
2574
|
+
capture: { openedFiles: [] },
|
|
2575
|
+
status: currentStatus
|
|
2576
|
+
})
|
|
2577
|
+
);
|
|
2578
|
+
await vscode.window.showWarningMessage(localize('No matching ReviewOps command.'));
|
|
2579
|
+
return;
|
|
2580
|
+
}
|
|
2581
|
+
commandIds = resolvedInput.commandIds;
|
|
2582
|
+
} else {
|
|
2583
|
+
commandIds = [message.commandId];
|
|
2584
|
+
}
|
|
2585
|
+
const entry = getReviewOpsCommandCatalogEntry(commandIds[0]);
|
|
2586
|
+
await render(currentStatus, createCommandCenterRunningResult(entry, currentStatus));
|
|
2587
|
+
|
|
2588
|
+
const capture: ReviewOpsWebviewRunCapture = { openedFiles: [] };
|
|
2589
|
+
const previousCapture = activeWebviewRunCapture;
|
|
2590
|
+
activeWebviewRunCapture = capture;
|
|
2591
|
+
let executed = false;
|
|
2592
|
+
try {
|
|
2593
|
+
executed = isCommandCenterRunBatchMessage(message)
|
|
2594
|
+
? await executeReviewOpsCommandCenterBatch(message.commandIds, currentStatus, refreshStatusView)
|
|
2595
|
+
: isCommandCenterRunInputMessage(message)
|
|
2596
|
+
? commandIds.length > 1
|
|
2597
|
+
? await executeReviewOpsCommandCenterBatch(commandIds, currentStatus, refreshStatusView)
|
|
2598
|
+
: await executeReviewOpsCommandCenterCommand(commandIds[0], currentStatus, refreshStatusView)
|
|
2599
|
+
: isCommandCenterSkipOptionalStepMessage(message)
|
|
2600
|
+
? await skipOptionalCommandCenterStep(message.commandId, currentStatus, refreshStatusView)
|
|
2601
|
+
: isCommandCenterStartCycleWithContextMessage(message)
|
|
2602
|
+
? await executeReviewOpsCommandCenterCommand(message.commandId, currentStatus, refreshStatusView, message.startContext)
|
|
2603
|
+
: isCommandCenterRunWithOptionsMessage(message)
|
|
2604
|
+
? await executeReviewOpsCommandCenterCommand(
|
|
2605
|
+
message.commandId,
|
|
2606
|
+
currentStatus,
|
|
2607
|
+
refreshStatusView,
|
|
2608
|
+
undefined,
|
|
2609
|
+
message.commandOptions
|
|
2610
|
+
)
|
|
2611
|
+
: await executeReviewOpsCommandCenterCommand(message.commandId, currentStatus, refreshStatusView);
|
|
2612
|
+
} finally {
|
|
2613
|
+
activeWebviewRunCapture = previousCapture;
|
|
2614
|
+
}
|
|
2615
|
+
const refreshedStatus = (await readWorkspaceStatus()) ?? currentStatus;
|
|
2616
|
+
const runResult = await createCommandCenterRunResult({
|
|
2617
|
+
entry,
|
|
2618
|
+
executed,
|
|
2619
|
+
capture,
|
|
2620
|
+
status: refreshedStatus
|
|
2621
|
+
});
|
|
2622
|
+
await render(refreshedStatus, runResult);
|
|
2623
|
+
|
|
2624
|
+
if (!executed) {
|
|
2625
|
+
await vscode.window.showWarningMessage(localize('ReviewOps ignored an unavailable Command Center action.'));
|
|
2626
|
+
}
|
|
2627
|
+
});
|
|
2628
|
+
});
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
function readReviewOpsExperienceMode(context: vscode.ExtensionContext): ReviewOpsExperienceMode {
|
|
2632
|
+
const workspaceValue = getExtensionWorkspaceState(context)?.get<unknown>(reviewOpsExperienceModeKey);
|
|
2633
|
+
if (isReviewOpsExperienceMode(workspaceValue)) {
|
|
2634
|
+
return workspaceValue;
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
const globalValue = getExtensionGlobalState(context)?.get<unknown>(reviewOpsExperienceModeKey);
|
|
2638
|
+
return isReviewOpsExperienceMode(globalValue) ? globalValue : 'guide';
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2641
|
+
function getExtensionWorkspaceState(context: vscode.ExtensionContext):
|
|
2642
|
+
| {
|
|
2643
|
+
get<T>(key: string): T | undefined;
|
|
2644
|
+
update(key: string, value: unknown): Thenable<void>;
|
|
2645
|
+
}
|
|
2646
|
+
| undefined {
|
|
2647
|
+
return (context as Partial<vscode.ExtensionContext>).workspaceState;
|
|
2648
|
+
}
|
|
2649
|
+
|
|
2650
|
+
function getExtensionGlobalState(context: vscode.ExtensionContext):
|
|
2651
|
+
| {
|
|
2652
|
+
get<T>(key: string): T | undefined;
|
|
2653
|
+
update(key: string, value: unknown): Thenable<void>;
|
|
2654
|
+
}
|
|
2655
|
+
| undefined {
|
|
2656
|
+
return (context as Partial<vscode.ExtensionContext>).globalState;
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
function createNonce(): string {
|
|
2660
|
+
const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
2661
|
+
let value = '';
|
|
2662
|
+
for (let index = 0; index < 32; index += 1) {
|
|
2663
|
+
value += possible.charAt(Math.floor(Math.random() * possible.length));
|
|
2664
|
+
}
|
|
2665
|
+
return value;
|
|
2666
|
+
}
|
|
2667
|
+
|
|
2668
|
+
function formatError(error: unknown): string {
|
|
2669
|
+
return error instanceof Error ? error.message : String(error);
|
|
2670
|
+
}
|