create-quiver 0.15.1 → 0.15.3
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/.github/workflows/ci.yml +3 -0
- package/README.md +3 -0
- package/README_FOR_AI.md +11 -7
- package/docs/CLI_UX_GUIDE.md +16 -2
- package/docs/COMMANDS.md.template +16 -4
- package/docs/INDEX.md +87 -0
- package/docs/WORKFLOW.md.template +4 -4
- package/docs/reference/commands.md +23 -5
- package/package.json +3 -1
- package/specs/quiver-v33-approval-ux-and-planner-progress/EVIDENCE_REPORT.md +93 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/EXECUTION_PLAN.md +83 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/SPEC.md +158 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/STATUS.md +31 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/pr.md +109 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-00-approval-ux-foundation/CLOSURE_BRIEF.md +30 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-00-approval-ux-foundation/EXECUTION_BRIEF.md +56 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-00-approval-ux-foundation/slice.json +65 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-01-approval-candidates-model/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-01-approval-candidates-model/EXECUTION_BRIEF.md +51 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-01-approval-candidates-model/slice.json +74 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-02-approve-interactive-selection/CLOSURE_BRIEF.md +20 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-02-approve-interactive-selection/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-02-approve-interactive-selection/slice.json +79 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-03-technical-plan-review-decision-data/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-03-technical-plan-review-decision-data/EXECUTION_BRIEF.md +50 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-03-technical-plan-review-decision-data/slice.json +75 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-04-revise-input-guardrails/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-04-revise-input-guardrails/EXECUTION_BRIEF.md +51 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-04-revise-input-guardrails/slice.json +73 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-05-provider-progress-alignment/CLOSURE_BRIEF.md +20 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-05-provider-progress-alignment/EXECUTION_BRIEF.md +51 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-05-provider-progress-alignment/slice.json +91 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-06-workflow-surface-integration/CLOSURE_BRIEF.md +20 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-06-workflow-surface-integration/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-06-workflow-surface-integration/slice.json +87 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-07-docs-tests-release-readiness/CLOSURE_BRIEF.md +21 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-07-docs-tests-release-readiness/EXECUTION_BRIEF.md +55 -0
- package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-07-docs-tests-release-readiness/slice.json +97 -0
- package/specs/quiver-v34-cli-dashboard-status/EVIDENCE_REPORT.md +119 -0
- package/specs/quiver-v34-cli-dashboard-status/EXECUTION_PLAN.md +77 -0
- package/specs/quiver-v34-cli-dashboard-status/SPEC.md +152 -0
- package/specs/quiver-v34-cli-dashboard-status/STATUS.md +29 -0
- package/specs/quiver-v34-cli-dashboard-status/pr.md +99 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-00-dashboard-foundation/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-00-dashboard-foundation/EXECUTION_BRIEF.md +49 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-00-dashboard-foundation/slice.json +68 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-01-dashboard-report-contract/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-01-dashboard-report-contract/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-01-dashboard-report-contract/slice.json +78 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-02-dashboard-command-rendering/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-02-dashboard-command-rendering/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-02-dashboard-command-rendering/slice.json +82 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-03-dashboard-edge-cases-and-guardrails/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-03-dashboard-edge-cases-and-guardrails/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-03-dashboard-edge-cases-and-guardrails/slice.json +77 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-04-docs-templates-and-scripts/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-04-docs-templates-and-scripts/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-04-docs-templates-and-scripts/slice.json +88 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-05-tests-smokes-release-readiness/CLOSURE_BRIEF.md +26 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-05-tests-smokes-release-readiness/EXECUTION_BRIEF.md +57 -0
- package/specs/quiver-v34-cli-dashboard-status/slices/slice-05-tests-smokes-release-readiness/slice.json +85 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/EVIDENCE_REPORT.md +43 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/EXECUTION_PLAN.md +85 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/SPEC.md +147 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/STATUS.md +33 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/pr.md +106 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-00-foundation-and-doc-router/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-00-foundation-and-doc-router/EXECUTION_BRIEF.md +38 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-00-foundation-and-doc-router/slice.json +64 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-01-dashboard-cli-contract/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-01-dashboard-cli-contract/EXECUTION_BRIEF.md +49 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-01-dashboard-cli-contract/slice.json +80 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-02-dashboard-compact-renderer/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-02-dashboard-compact-renderer/EXECUTION_BRIEF.md +48 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-02-dashboard-compact-renderer/slice.json +73 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-03-dashboard-details-sections/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-03-dashboard-details-sections/EXECUTION_BRIEF.md +48 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-03-dashboard-details-sections/slice.json +72 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-04-version-command/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-04-version-command/EXECUTION_BRIEF.md +49 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-04-version-command/slice.json +82 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-05-docs-help-generated-guidance/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-05-docs-help-generated-guidance/EXECUTION_BRIEF.md +50 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-05-docs-help-generated-guidance/slice.json +90 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-06-tests-smokes-release-readiness/CLOSURE_BRIEF.md +21 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-06-tests-smokes-release-readiness/EXECUTION_BRIEF.md +51 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-06-tests-smokes-release-readiness/slice.json +85 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-07-package-and-cross-platform-smoke/CLOSURE_BRIEF.md +20 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-07-package-and-cross-platform-smoke/EXECUTION_BRIEF.md +49 -0
- package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-07-package-and-cross-platform-smoke/slice.json +79 -0
- package/specs/quiver-v36-ai-run-watch-portable/EVIDENCE_REPORT.md +33 -0
- package/specs/quiver-v36-ai-run-watch-portable/EXECUTION_PLAN.md +39 -0
- package/specs/quiver-v36-ai-run-watch-portable/SPEC.md +166 -0
- package/specs/quiver-v36-ai-run-watch-portable/STATUS.md +31 -0
- package/specs/quiver-v36-ai-run-watch-portable/pr.md +78 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-00-foundation-and-handoffs/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-00-foundation-and-handoffs/EXECUTION_BRIEF.md +43 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-00-foundation-and-handoffs/slice.json +61 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-01-run-schema-path-safety/CLOSURE_BRIEF.md +18 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-01-run-schema-path-safety/EXECUTION_BRIEF.md +43 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-01-run-schema-path-safety/slice.json +65 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-02-event-writer-redacted-logs/CLOSURE_BRIEF.md +18 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-02-event-writer-redacted-logs/EXECUTION_BRIEF.md +43 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-02-event-writer-redacted-logs/slice.json +66 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-03-provider-streaming-integration/CLOSURE_BRIEF.md +18 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-03-provider-streaming-integration/EXECUTION_BRIEF.md +41 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-03-provider-streaming-integration/slice.json +71 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-04-ai-run-watch-command/CLOSURE_BRIEF.md +18 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-04-ai-run-watch-command/EXECUTION_BRIEF.md +44 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-04-ai-run-watch-command/slice.json +73 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-05-main-progress-user-guidance/CLOSURE_BRIEF.md +18 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-05-main-progress-user-guidance/EXECUTION_BRIEF.md +44 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-05-main-progress-user-guidance/slice.json +71 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-06-docs-generated-guidance/CLOSURE_BRIEF.md +19 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-06-docs-generated-guidance/EXECUTION_BRIEF.md +45 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-06-docs-generated-guidance/slice.json +77 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-07-tests-cross-platform-readiness/CLOSURE_BRIEF.md +22 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-07-tests-cross-platform-readiness/EXECUTION_BRIEF.md +46 -0
- package/specs/quiver-v36-ai-run-watch-portable/slices/slice-07-tests-cross-platform-readiness/slice.json +87 -0
- package/src/create-quiver/commands/ai.js +112 -12
- package/src/create-quiver/commands/dashboard.js +31 -0
- package/src/create-quiver/commands/flow.js +74 -12
- package/src/create-quiver/commands/spec.js +8 -1
- package/src/create-quiver/index.js +107 -4
- package/src/create-quiver/lib/ai/approval-candidates.js +86 -0
- package/src/create-quiver/lib/ai/plan-review.js +77 -1
- package/src/create-quiver/lib/ai/run-state.js +21 -4
- package/src/create-quiver/lib/approvals.js +103 -0
- package/src/create-quiver/lib/cli/ux-flags.js +6 -0
- package/src/create-quiver/lib/dashboard.js +896 -0
- package/src/create-quiver/lib/git.js +13 -4
- package/src/create-quiver/lib/init-docs.js +6 -0
- package/src/create-quiver/lib/init-layout.js +2 -0
- package/src/create-quiver/lib/paths.js +45 -3
- package/src/create-quiver/lib/project-state-resolver.js +22 -2
- package/src/create-quiver/lib/version.js +157 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-05-main-progress-user-guidance",
|
|
3
|
+
"ticket": "QUIVER-36-05",
|
|
4
|
+
"type": "feature",
|
|
5
|
+
"title": "Main progress and user guidance",
|
|
6
|
+
"objective": "Show run id and watch command in the main human UX while preserving automation-safe output modes.",
|
|
7
|
+
"description": "Updates planner-oriented live AI commands to surface the generated run id, keep stable progress, and guide users to the portable watcher.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "feature",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "v36-main-progress-user-guidance",
|
|
12
|
+
"branch_name": "feature/QUIVER-36-05-v36-main-progress-user-guidance"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src/create-quiver/commands/ai.js",
|
|
16
|
+
"src/create-quiver/lib/cli/ux.js",
|
|
17
|
+
"tests/commands/ai-plan.test.js",
|
|
18
|
+
"tests/commands/ai-revise.test.js",
|
|
19
|
+
"tests/commands/ai-run-watch.test.js"
|
|
20
|
+
],
|
|
21
|
+
"expected_read_paths": [
|
|
22
|
+
"src/create-quiver/commands/ai.js",
|
|
23
|
+
"src/create-quiver/lib/ai/run-state.js",
|
|
24
|
+
"src/create-quiver/lib/ai/run-events.js",
|
|
25
|
+
"src/create-quiver/lib/cli/ux.js",
|
|
26
|
+
"specs/quiver-v36-ai-run-watch-portable/SPEC.md"
|
|
27
|
+
],
|
|
28
|
+
"allowed_write_paths": [
|
|
29
|
+
"src/create-quiver/commands/ai.js",
|
|
30
|
+
"src/create-quiver/lib/cli/ux.js",
|
|
31
|
+
"tests/commands/ai-plan.test.js",
|
|
32
|
+
"tests/commands/ai-revise.test.js",
|
|
33
|
+
"tests/commands/ai-run-watch.test.js",
|
|
34
|
+
"specs/quiver-v36-ai-run-watch-portable/**"
|
|
35
|
+
],
|
|
36
|
+
"depends_on": [
|
|
37
|
+
"slice-03-provider-streaming-integration",
|
|
38
|
+
"slice-04-ai-run-watch-command"
|
|
39
|
+
],
|
|
40
|
+
"parallel_safe": "never",
|
|
41
|
+
"parallel_safe_reason": "Depends on the completed provider streaming and watcher contracts to avoid partial user guidance.",
|
|
42
|
+
"must": [
|
|
43
|
+
"Show the generated run id in human TTY output.",
|
|
44
|
+
"Show the exact watch command for the current run.",
|
|
45
|
+
"Keep raw provider output out of the main terminal by default.",
|
|
46
|
+
"Preserve CI, no-TTY, --json, --print-prompt, and --dry-run behavior.",
|
|
47
|
+
"Update run status on provider failure or main-command cancellation."
|
|
48
|
+
],
|
|
49
|
+
"not_included": [
|
|
50
|
+
"Watcher implementation.",
|
|
51
|
+
"Provider event persistence.",
|
|
52
|
+
"Documentation updates."
|
|
53
|
+
],
|
|
54
|
+
"acceptance": [
|
|
55
|
+
"Users can copy the displayed watch command and observe the same run.",
|
|
56
|
+
"Machine-readable output contains no human headings, spinners, or colors.",
|
|
57
|
+
"Dry-run and print-prompt do not create unexpected live run artifacts.",
|
|
58
|
+
"Failure and cancellation guidance is actionable and redacted."
|
|
59
|
+
],
|
|
60
|
+
"tests": [
|
|
61
|
+
"node --test tests/commands/ai-plan.test.js tests/commands/ai-revise.test.js tests/commands/ai-run-watch.test.js",
|
|
62
|
+
"git diff --check"
|
|
63
|
+
],
|
|
64
|
+
"validation_hints": [
|
|
65
|
+
"Test TTY and no-TTY paths separately.",
|
|
66
|
+
"Test provider failure and SIGINT after run creation."
|
|
67
|
+
],
|
|
68
|
+
"estimated_hours": 4,
|
|
69
|
+
"status": "planned",
|
|
70
|
+
"blocked_reason": null
|
|
71
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# CLOSURE_BRIEF - slice-06 Docs and generated guidance
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Pending implementation.
|
|
6
|
+
|
|
7
|
+
## Validation
|
|
8
|
+
|
|
9
|
+
- [ ] `node --test tests/commands/cli-contract.test.js tests/lib/init-docs.test.js`
|
|
10
|
+
- [ ] `npx create-quiver spec validate specs/quiver-v36-ai-run-watch-portable --strict`
|
|
11
|
+
- [ ] `git diff --check`
|
|
12
|
+
|
|
13
|
+
## Pending
|
|
14
|
+
|
|
15
|
+
- Update docs after public runtime behavior is implemented.
|
|
16
|
+
|
|
17
|
+
## Remaining Risks
|
|
18
|
+
|
|
19
|
+
- Documentation can drift if generated templates are not updated with the same examples as canonical docs.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# EXECUTION_BRIEF - slice-06 Docs and generated guidance
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
The watcher introduces public commands, artifacts, and safety expectations. User-facing docs and generated project guidance must match the implemented behavior.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Document `ai run watch`, run artifacts, JSONL mode, portability limits, and safe usage in canonical docs and generated guidance.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- CLI UX documentation
|
|
14
|
+
- AI guidance documentation
|
|
15
|
+
- Command reference documentation
|
|
16
|
+
- Generated docs/templates
|
|
17
|
+
- Notes for legacy runs, stale runs, JSONL, and security
|
|
18
|
+
|
|
19
|
+
## Acceptance Criteria
|
|
20
|
+
|
|
21
|
+
- Docs explain what the Quiver run id is and that it is not a provider session id.
|
|
22
|
+
- Docs include `npx create-quiver ai run watch --run <run-id>`.
|
|
23
|
+
- Docs include `npx create-quiver ai run watch --latest`.
|
|
24
|
+
- Docs include JSONL usage and state that `--json` emits JSONL only.
|
|
25
|
+
- Docs explain completed, failed, canceled, stale, legacy, and missing-run behavior at a user level.
|
|
26
|
+
- Docs explicitly state Quiver does not embed provider TUIs or require terminal multiplexers.
|
|
27
|
+
- Generated guidance matches public command behavior.
|
|
28
|
+
- Missing `docs/INDEX.md` debt is not hidden if the documentation workflow requires index updates.
|
|
29
|
+
|
|
30
|
+
## Technical Plan Summary
|
|
31
|
+
|
|
32
|
+
Update docs after runtime behavior stabilizes, then update generated guidance/templates so new projects receive the same command references.
|
|
33
|
+
|
|
34
|
+
## Restrictions
|
|
35
|
+
|
|
36
|
+
- Do not document behavior that has not been implemented.
|
|
37
|
+
- Do not add architecture claims that contradict the SPEC.
|
|
38
|
+
- Do not duplicate large sections across docs when a command reference link is enough.
|
|
39
|
+
|
|
40
|
+
## Completion Checklist
|
|
41
|
+
|
|
42
|
+
- [ ] Canonical docs updated.
|
|
43
|
+
- [ ] Generated guidance updated.
|
|
44
|
+
- [ ] Command examples verified.
|
|
45
|
+
- [ ] Documentation debt captured if `docs/INDEX.md` remains absent.
|
package/specs/quiver-v36-ai-run-watch-portable/slices/slice-06-docs-generated-guidance/slice.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-06-docs-generated-guidance",
|
|
3
|
+
"ticket": "QUIVER-36-06",
|
|
4
|
+
"type": "documentation",
|
|
5
|
+
"title": "Docs and generated guidance",
|
|
6
|
+
"objective": "Document the portable watcher in canonical docs, command references, and generated guidance.",
|
|
7
|
+
"description": "Adds user-facing and generated documentation for run ids, watch commands, JSONL mode, artifacts, portability, and safety expectations.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "docs",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "v36-docs-generated-guidance",
|
|
12
|
+
"branch_name": "docs/QUIVER-36-06-v36-docs-generated-guidance"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"docs/CLI_UX_GUIDE.md",
|
|
16
|
+
"README_FOR_AI.md",
|
|
17
|
+
"docs/reference/commands.md",
|
|
18
|
+
"docs/COMMANDS.md.template",
|
|
19
|
+
"src/create-quiver/lib/init-docs.js",
|
|
20
|
+
"tests/commands/cli-contract.test.js",
|
|
21
|
+
"tests/lib/init-docs.test.js"
|
|
22
|
+
],
|
|
23
|
+
"expected_read_paths": [
|
|
24
|
+
"docs/CLI_UX_GUIDE.md",
|
|
25
|
+
"README_FOR_AI.md",
|
|
26
|
+
"docs/reference/commands.md",
|
|
27
|
+
"docs/COMMANDS.md.template",
|
|
28
|
+
"src/create-quiver/lib/init-docs.js",
|
|
29
|
+
"specs/quiver-v36-ai-run-watch-portable/SPEC.md"
|
|
30
|
+
],
|
|
31
|
+
"allowed_write_paths": [
|
|
32
|
+
"docs/CLI_UX_GUIDE.md",
|
|
33
|
+
"README_FOR_AI.md",
|
|
34
|
+
"docs/reference/commands.md",
|
|
35
|
+
"docs/COMMANDS.md.template",
|
|
36
|
+
"src/create-quiver/lib/init-docs.js",
|
|
37
|
+
"tests/commands/cli-contract.test.js",
|
|
38
|
+
"tests/lib/init-docs.test.js",
|
|
39
|
+
"specs/quiver-v36-ai-run-watch-portable/**"
|
|
40
|
+
],
|
|
41
|
+
"depends_on": [
|
|
42
|
+
"slice-04-ai-run-watch-command",
|
|
43
|
+
"slice-05-main-progress-user-guidance"
|
|
44
|
+
],
|
|
45
|
+
"parallel_safe": "conditional",
|
|
46
|
+
"parallel_safe_reason": "Can proceed after command behavior is stable; generated docs and canonical docs should be updated in one pass.",
|
|
47
|
+
"must": [
|
|
48
|
+
"Document run id semantics.",
|
|
49
|
+
"Document --run and --latest usage.",
|
|
50
|
+
"Document JSONL-only behavior for --json.",
|
|
51
|
+
"Document stale, legacy, completed, failed, canceled, and missing-run behavior.",
|
|
52
|
+
"Document that Quiver does not embed provider TUIs or require terminal multiplexers.",
|
|
53
|
+
"Update generated guidance/templates with matching command examples."
|
|
54
|
+
],
|
|
55
|
+
"not_included": [
|
|
56
|
+
"Runtime behavior changes.",
|
|
57
|
+
"Spec redesign."
|
|
58
|
+
],
|
|
59
|
+
"acceptance": [
|
|
60
|
+
"Docs match the implemented public CLI behavior.",
|
|
61
|
+
"Generated guidance includes the same essential watcher commands.",
|
|
62
|
+
"No docs claim platform-specific terminal automation as core behavior.",
|
|
63
|
+
"Documentation debt around missing docs/INDEX.md is surfaced if still applicable."
|
|
64
|
+
],
|
|
65
|
+
"tests": [
|
|
66
|
+
"node --test tests/commands/cli-contract.test.js tests/lib/init-docs.test.js",
|
|
67
|
+
"npx create-quiver spec validate specs/quiver-v36-ai-run-watch-portable --strict",
|
|
68
|
+
"git diff --check"
|
|
69
|
+
],
|
|
70
|
+
"validation_hints": [
|
|
71
|
+
"Generate a fresh sandbox project and inspect AI guidance files.",
|
|
72
|
+
"Check that documented commands are accepted by CLI parsing tests."
|
|
73
|
+
],
|
|
74
|
+
"estimated_hours": 3,
|
|
75
|
+
"status": "planned",
|
|
76
|
+
"blocked_reason": null
|
|
77
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# CLOSURE_BRIEF - slice-07 Tests and cross-platform readiness
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Pending implementation.
|
|
6
|
+
|
|
7
|
+
## Validation
|
|
8
|
+
|
|
9
|
+
- [ ] `node --test tests/**/*.test.js`
|
|
10
|
+
- [ ] `git diff --check`
|
|
11
|
+
- [ ] `npx create-quiver spec validate specs/quiver-v36-ai-run-watch-portable --strict`
|
|
12
|
+
- [ ] `npm run package:quiver`
|
|
13
|
+
- [ ] `npm run smoke:create-quiver`
|
|
14
|
+
- [ ] `node scripts/ci/smoke-cross-platform.js`
|
|
15
|
+
|
|
16
|
+
## Pending
|
|
17
|
+
|
|
18
|
+
- Execute after runtime and docs slices are complete.
|
|
19
|
+
|
|
20
|
+
## Remaining Risks
|
|
21
|
+
|
|
22
|
+
- Cross-platform behavior can regress if validation depends on POSIX-only shell behavior instead of Node-based smoke coverage.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# EXECUTION_BRIEF - slice-07 Tests and cross-platform readiness
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
The feature changes long-running AI command observability and touches persistence, redaction, command UX, and docs. Final validation must prove the full workflow is production-ready across supported terminals and platforms.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Add and run final automated validation, package smoke tests, and cross-platform smoke coverage for the portable watcher.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- Focused unit and command tests
|
|
14
|
+
- Integration-style simulated provider streaming tests
|
|
15
|
+
- Package smoke validation
|
|
16
|
+
- Cross-platform smoke script updates
|
|
17
|
+
- Final evidence report updates
|
|
18
|
+
|
|
19
|
+
## Acceptance Criteria
|
|
20
|
+
|
|
21
|
+
- Tests cover path traversal and malformed run ids.
|
|
22
|
+
- Tests cover missing run, `--latest`, completed, failed, canceled, stale, and legacy runs.
|
|
23
|
+
- Tests cover partial JSONL lines during append.
|
|
24
|
+
- Tests cover split secrets, ANSI/control character sanitization, and log truncation.
|
|
25
|
+
- Tests cover no-TTY, CI, JSON, dry-run, and print-prompt behavior.
|
|
26
|
+
- Tests cover paths with spaces.
|
|
27
|
+
- Simulated provider streaming proves stdout/stderr capture, event persistence, cancellation, and failure handling.
|
|
28
|
+
- Package smoke proves `npx create-quiver ai run watch ...` resolves from the packaged CLI.
|
|
29
|
+
- Final evidence records commands run and any remaining risks.
|
|
30
|
+
|
|
31
|
+
## Technical Plan Summary
|
|
32
|
+
|
|
33
|
+
Close gaps left by earlier slices with targeted tests first, then run full project validation and package smokes. Prefer deterministic local simulations over external provider calls.
|
|
34
|
+
|
|
35
|
+
## Restrictions
|
|
36
|
+
|
|
37
|
+
- Do not require real provider credentials for validation.
|
|
38
|
+
- Do not require `tmux`, `zellij`, Windows Terminal automation, or `node-pty`.
|
|
39
|
+
- Do not rely on platform-specific shell syntax in required smoke tests.
|
|
40
|
+
|
|
41
|
+
## Completion Checklist
|
|
42
|
+
|
|
43
|
+
- [ ] Focused tests added or updated.
|
|
44
|
+
- [ ] Cross-platform smoke covers watcher behavior.
|
|
45
|
+
- [ ] Package smoke covers packaged command resolution.
|
|
46
|
+
- [ ] Evidence report updated with command results.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-07-tests-cross-platform-readiness",
|
|
3
|
+
"ticket": "QUIVER-36-07",
|
|
4
|
+
"type": "validation",
|
|
5
|
+
"title": "Tests and cross-platform readiness",
|
|
6
|
+
"objective": "Prove the portable watcher is covered by automated tests, package smoke, and cross-platform smoke validation.",
|
|
7
|
+
"description": "Adds final coverage for persistence, watcher behavior, security, automation modes, package execution, and platform portability.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "test",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "v36-tests-cross-platform-readiness",
|
|
12
|
+
"branch_name": "test/QUIVER-36-07-v36-tests-cross-platform-readiness"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"tests/commands/ai-run-watch.test.js",
|
|
16
|
+
"tests/commands/ai-plan.test.js",
|
|
17
|
+
"tests/lib/ai-run-state.test.js",
|
|
18
|
+
"tests/lib/ai-run-events.test.js",
|
|
19
|
+
"tests/lib/ai-provider-streaming.test.js",
|
|
20
|
+
"scripts/ci/smoke-create-quiver.sh",
|
|
21
|
+
"scripts/ci/smoke-cross-platform.js",
|
|
22
|
+
"specs/quiver-v36-ai-run-watch-portable/EVIDENCE_REPORT.md"
|
|
23
|
+
],
|
|
24
|
+
"expected_read_paths": [
|
|
25
|
+
"tests/commands/ai-run-watch.test.js",
|
|
26
|
+
"tests/commands/ai-plan.test.js",
|
|
27
|
+
"tests/lib/ai-run-state.test.js",
|
|
28
|
+
"tests/lib/ai-run-events.test.js",
|
|
29
|
+
"scripts/ci/smoke-create-quiver.sh",
|
|
30
|
+
"scripts/ci/smoke-cross-platform.js",
|
|
31
|
+
"specs/quiver-v36-ai-run-watch-portable/SPEC.md"
|
|
32
|
+
],
|
|
33
|
+
"allowed_write_paths": [
|
|
34
|
+
"tests/commands/ai-run-watch.test.js",
|
|
35
|
+
"tests/commands/ai-plan.test.js",
|
|
36
|
+
"tests/lib/ai-run-state.test.js",
|
|
37
|
+
"tests/lib/ai-run-events.test.js",
|
|
38
|
+
"tests/lib/ai-provider-streaming.test.js",
|
|
39
|
+
"scripts/ci/smoke-create-quiver.sh",
|
|
40
|
+
"scripts/ci/smoke-cross-platform.js",
|
|
41
|
+
"specs/quiver-v36-ai-run-watch-portable/**"
|
|
42
|
+
],
|
|
43
|
+
"depends_on": [
|
|
44
|
+
"slice-02-event-writer-redacted-logs",
|
|
45
|
+
"slice-03-provider-streaming-integration",
|
|
46
|
+
"slice-04-ai-run-watch-command",
|
|
47
|
+
"slice-05-main-progress-user-guidance",
|
|
48
|
+
"slice-06-docs-generated-guidance"
|
|
49
|
+
],
|
|
50
|
+
"parallel_safe": "never",
|
|
51
|
+
"parallel_safe_reason": "Final readiness must run after runtime and docs behavior stabilizes.",
|
|
52
|
+
"must": [
|
|
53
|
+
"Cover path traversal and malformed run ids.",
|
|
54
|
+
"Cover missing, latest, completed, failed, canceled, stale, and legacy runs.",
|
|
55
|
+
"Cover partial JSONL lines.",
|
|
56
|
+
"Cover split secrets, ANSI/control sanitization, and log truncation.",
|
|
57
|
+
"Cover no-TTY, CI, JSON, dry-run, and print-prompt behavior.",
|
|
58
|
+
"Cover paths with spaces.",
|
|
59
|
+
"Cover simulated provider streaming for stdout, stderr, cancellation, and failure.",
|
|
60
|
+
"Run package smoke and cross-platform smoke."
|
|
61
|
+
],
|
|
62
|
+
"not_included": [
|
|
63
|
+
"Real provider credential tests.",
|
|
64
|
+
"Publishing to npm."
|
|
65
|
+
],
|
|
66
|
+
"acceptance": [
|
|
67
|
+
"Required validation commands complete or documented blockers are recorded.",
|
|
68
|
+
"No required smoke depends on a terminal multiplexer.",
|
|
69
|
+
"Evidence report lists final commands and outcomes.",
|
|
70
|
+
"All P0 safety criteria from the SPEC have automated coverage."
|
|
71
|
+
],
|
|
72
|
+
"tests": [
|
|
73
|
+
"node --test tests/**/*.test.js",
|
|
74
|
+
"git diff --check",
|
|
75
|
+
"npx create-quiver spec validate specs/quiver-v36-ai-run-watch-portable --strict",
|
|
76
|
+
"npm run package:quiver",
|
|
77
|
+
"npm run smoke:create-quiver",
|
|
78
|
+
"node scripts/ci/smoke-cross-platform.js"
|
|
79
|
+
],
|
|
80
|
+
"validation_hints": [
|
|
81
|
+
"Use simulated providers instead of external AI CLIs.",
|
|
82
|
+
"Run package smoke from a path containing spaces."
|
|
83
|
+
],
|
|
84
|
+
"estimated_hours": 6,
|
|
85
|
+
"status": "planned",
|
|
86
|
+
"blocked_reason": null
|
|
87
|
+
}
|
|
@@ -85,6 +85,10 @@ const {
|
|
|
85
85
|
savePlannerDraft,
|
|
86
86
|
summarizePlannerApproval,
|
|
87
87
|
} = require('../lib/approvals');
|
|
88
|
+
const {
|
|
89
|
+
buildApprovalCandidateReport,
|
|
90
|
+
formatApprovalDecisionLines,
|
|
91
|
+
} = require('../lib/ai/approval-candidates');
|
|
88
92
|
const { assertPlannerPhaseReady, getPlannerPhaseDetails, normalizePlannerPhase, PlannerPhaseError } = require('../lib/ai/phase-gates');
|
|
89
93
|
const { collectActiveSliceState, resolveProjectState } = require('../lib/project-state-resolver');
|
|
90
94
|
|
|
@@ -1224,7 +1228,11 @@ function formatApprovalStatusReport(repoRoot) {
|
|
|
1224
1228
|
for (const phase of PLANNER_APPROVAL_PHASES) {
|
|
1225
1229
|
const summary = summarizePlannerApproval(repoRoot, phase).trimEnd();
|
|
1226
1230
|
const relation = classifyGlobalApprovalRelation(readPhaseApproval(repoRoot, phase), runApprovalRows);
|
|
1227
|
-
|
|
1231
|
+
const candidates = buildApprovalCandidateReport(repoRoot, phase);
|
|
1232
|
+
const decisionLines = formatApprovalDecisionLines(candidates)
|
|
1233
|
+
.map((line) => `- ${line}`)
|
|
1234
|
+
.join('\n');
|
|
1235
|
+
sections.push(`${summary}\nRun relation: ${relation}${decisionLines ? `\nApproval candidates:\n${decisionLines}` : ''}`);
|
|
1228
1236
|
}
|
|
1229
1237
|
sections.push(summarizePlanReview(repoRoot).trimEnd());
|
|
1230
1238
|
return `${sections.join('\n\n')}\n`;
|
|
@@ -1657,7 +1665,7 @@ async function runPlan(repoRoot, options = {}) {
|
|
|
1657
1665
|
|
|
1658
1666
|
if (options.revise === true) {
|
|
1659
1667
|
if (!inputPath) {
|
|
1660
|
-
throw new Error(formatError(`missing feedback input file for ai revise phase '${phase}'`));
|
|
1668
|
+
throw new Error(formatError(`missing feedback input file for ai revise phase '${phase}'. Use: npx create-quiver ai revise --phase ${phase} --input <feedback.md> --dry-run`));
|
|
1661
1669
|
}
|
|
1662
1670
|
const feedbackText = readTextFile(inputPath, repoRoot);
|
|
1663
1671
|
const revisionInput = buildRevisionInput({
|
|
@@ -2190,20 +2198,112 @@ async function runRevise(repoRoot, options = {}) {
|
|
|
2190
2198
|
});
|
|
2191
2199
|
}
|
|
2192
2200
|
|
|
2201
|
+
function formatApprovalCandidateHint(candidate) {
|
|
2202
|
+
const parts = [];
|
|
2203
|
+
if (candidate.current) {
|
|
2204
|
+
parts.push('current');
|
|
2205
|
+
}
|
|
2206
|
+
if (candidate.created_at) {
|
|
2207
|
+
parts.push(candidate.created_at);
|
|
2208
|
+
}
|
|
2209
|
+
if (candidate.review?.recommendation) {
|
|
2210
|
+
parts.push(`review=${candidate.review.recommendation}`);
|
|
2211
|
+
}
|
|
2212
|
+
if (candidate.review?.required_fixes_count) {
|
|
2213
|
+
parts.push(`required fixes=${candidate.review.required_fixes_count}`);
|
|
2214
|
+
}
|
|
2215
|
+
if (candidate.review?.optional_hardening_count) {
|
|
2216
|
+
parts.push(`optional=${candidate.review.optional_hardening_count}`);
|
|
2217
|
+
}
|
|
2218
|
+
if (candidate.review?.risks_count) {
|
|
2219
|
+
parts.push(`risks=${candidate.review.risks_count}`);
|
|
2220
|
+
}
|
|
2221
|
+
parts.push(candidate.reason);
|
|
2222
|
+
return parts.filter(Boolean).join(', ');
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
function approvalSelectionOptions(report) {
|
|
2226
|
+
return report.candidates.map((candidate) => ({
|
|
2227
|
+
label: `${candidate.label}${candidate.recommended ? ' (recommended)' : candidate.current ? ' (current)' : ' (history)'}`,
|
|
2228
|
+
value: String(candidate.version || ''),
|
|
2229
|
+
hint: formatApprovalCandidateHint(candidate),
|
|
2230
|
+
default: candidate.recommended === true,
|
|
2231
|
+
raw: candidate,
|
|
2232
|
+
}));
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
async function resolveApprovalVersion(repoRoot, phase, options = {}) {
|
|
2236
|
+
if (options.version) {
|
|
2237
|
+
return options.version;
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
const canPrompt = isInteractiveAgentPromptAvailable(options);
|
|
2241
|
+
const shouldPrompt = options.interactive === true || canPrompt;
|
|
2242
|
+
const report = buildApprovalCandidateReport(repoRoot, phase);
|
|
2243
|
+
|
|
2244
|
+
if (!shouldPrompt || !canPrompt) {
|
|
2245
|
+
const recommended = report.recommended?.version || report.latest_version || '<n>';
|
|
2246
|
+
throw new Error(formatActionableError({
|
|
2247
|
+
failure: `ai approve --phase ${phase} requires --version <n> when prompts are not available.`,
|
|
2248
|
+
impact: 'Quiver cannot safely guess which saved planner draft the human approved.',
|
|
2249
|
+
fix: 'Review drafts with `npx create-quiver ai approvals`, then pass the version explicitly.',
|
|
2250
|
+
nextCommand: `npx create-quiver ai approve --phase ${phase} --version ${recommended}`,
|
|
2251
|
+
}));
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
if (report.candidates.length === 0) {
|
|
2255
|
+
throw new Error(formatActionableError({
|
|
2256
|
+
failure: `ai approve --phase ${phase} has no saved drafts to approve.`,
|
|
2257
|
+
impact: 'There is no planner artifact that can pass the approval gate.',
|
|
2258
|
+
fix: `Generate a ${phase} draft first.`,
|
|
2259
|
+
nextCommand: `npx create-quiver ai plan --phase ${phase}${phase === 'acceptance' ? ' --input <requirements.md>' : ''} --dry-run`,
|
|
2260
|
+
}));
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
const selected = await selectOption(`¿Qué ${phase} draft querés aprobar?`, approvalSelectionOptions(report), {
|
|
2264
|
+
env: options.env,
|
|
2265
|
+
error: options.error,
|
|
2266
|
+
input: options.input,
|
|
2267
|
+
interactive: true,
|
|
2268
|
+
noColor: options.noColor,
|
|
2269
|
+
output: options.output,
|
|
2270
|
+
prompts: options.prompts,
|
|
2271
|
+
promptSelect: options.promptSelect,
|
|
2272
|
+
stdinIsTTY: options.stdinIsTTY,
|
|
2273
|
+
stdoutIsTTY: options.stdoutIsTTY,
|
|
2274
|
+
stderrIsTTY: options.stderrIsTTY,
|
|
2275
|
+
defaultValue: report.recommended?.version ? String(report.recommended.version) : undefined,
|
|
2276
|
+
flag: '--version',
|
|
2277
|
+
name: `${phase} approval version`,
|
|
2278
|
+
});
|
|
2279
|
+
|
|
2280
|
+
const candidate = selected.raw;
|
|
2281
|
+
if (!candidate?.approvable) {
|
|
2282
|
+
throw new Error(formatActionableError({
|
|
2283
|
+
failure: `${phase} draft ${selected.label} is not approvable.`,
|
|
2284
|
+
impact: candidate?.review?.blocking
|
|
2285
|
+
? 'The current review gate blocks technical-plan approval.'
|
|
2286
|
+
: 'Quiver only approves the current eligible draft version.',
|
|
2287
|
+
fix: candidate?.reason || 'Inspect planner approvals before approving.',
|
|
2288
|
+
nextCommand: candidate?.next_command || `npx create-quiver ai approvals`,
|
|
2289
|
+
}));
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
return selected.value;
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2193
2295
|
async function runApprove(repoRoot, options = {}) {
|
|
2194
2296
|
const phase = normalizePlannerPhase(options.phase || DEFAULT_PLAN_PHASE);
|
|
2195
2297
|
if (phase === 'spec') {
|
|
2196
2298
|
throw new Error(formatError(`ai approve does not support phase '${phase}'`));
|
|
2197
2299
|
}
|
|
2198
2300
|
|
|
2199
|
-
if (!options.version) {
|
|
2200
|
-
throw new Error(formatError(`ai approve --phase ${phase} requires --version <n>. Review drafts with \`npx create-quiver ai approvals\`.`));
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
2301
|
if (options.input) {
|
|
2204
2302
|
throw new Error(formatError(`ai approve --phase ${phase} approves saved draft versions only. Use \`npx create-quiver ai revise --phase ${phase} --input ${options.input}\` to create a new draft first.`));
|
|
2205
2303
|
}
|
|
2206
2304
|
|
|
2305
|
+
const version = await resolveApprovalVersion(repoRoot, phase, options);
|
|
2306
|
+
|
|
2207
2307
|
if (phase === 'technical-plan') {
|
|
2208
2308
|
const review = readPlanReview(repoRoot);
|
|
2209
2309
|
if (review.status !== 'unapproved' && review.status !== 'reviewed') {
|
|
@@ -2214,24 +2314,24 @@ async function runApprove(repoRoot, options = {}) {
|
|
|
2214
2314
|
const requiredFixes = Array.isArray(result.required_fixes) ? result.required_fixes.length : 0;
|
|
2215
2315
|
throw new Error(formatError(`ai approve --phase technical-plan is blocked by plan review; approval recommendation is ${result.approval_recommendation}. Required fixes: ${requiredFixes}. Next command: ${result.next_command}`));
|
|
2216
2316
|
}
|
|
2217
|
-
assertTechnicalPlanDraftHasSpecContract(repoRoot,
|
|
2317
|
+
assertTechnicalPlanDraftHasSpecContract(repoRoot, version);
|
|
2218
2318
|
}
|
|
2219
2319
|
|
|
2220
2320
|
const inputText = '';
|
|
2221
2321
|
|
|
2222
2322
|
if (options.dryRun) {
|
|
2223
|
-
process.stdout.write(formatApprovalDryRunResult({ phase, input: options.input, version
|
|
2323
|
+
process.stdout.write(formatApprovalDryRunResult({ phase, input: options.input, version }));
|
|
2224
2324
|
return {
|
|
2225
2325
|
task: 'approve',
|
|
2226
2326
|
phase,
|
|
2227
2327
|
input: options.input,
|
|
2228
|
-
version:
|
|
2328
|
+
version: version || null,
|
|
2229
2329
|
dryRun: true,
|
|
2230
2330
|
};
|
|
2231
2331
|
}
|
|
2232
2332
|
|
|
2233
2333
|
const result = approvePlannerPhase(repoRoot, phase, options.input || '', inputText, {
|
|
2234
|
-
version:
|
|
2334
|
+
version: version || undefined,
|
|
2235
2335
|
});
|
|
2236
2336
|
const lifecycleRun = ensureAiRun(repoRoot, {
|
|
2237
2337
|
command: `ai approve --phase ${phase}`,
|
|
@@ -2241,7 +2341,7 @@ async function runApprove(repoRoot, options = {}) {
|
|
|
2241
2341
|
recordAiRunApproval(repoRoot, lifecycleRun.run_id, {
|
|
2242
2342
|
artifact: path.relative(repoRoot, result.filePath).split(path.sep).join('/'),
|
|
2243
2343
|
phase,
|
|
2244
|
-
source_file: options.input || `draft version ${
|
|
2344
|
+
source_file: options.input || `draft version ${version}`,
|
|
2245
2345
|
version: result.version || null,
|
|
2246
2346
|
});
|
|
2247
2347
|
updateAiRunPhase(repoRoot, lifecycleRun.run_id, phase === 'acceptance' ? 'acceptance-approved' : 'technical-plan-approved', {
|
|
@@ -2250,7 +2350,7 @@ async function runApprove(repoRoot, options = {}) {
|
|
|
2250
2350
|
});
|
|
2251
2351
|
process.stdout.write(formatApprovalResult({
|
|
2252
2352
|
...result,
|
|
2253
|
-
sourceFile: options.input || `draft version ${
|
|
2353
|
+
sourceFile: options.input || `draft version ${version}`,
|
|
2254
2354
|
}, repoRoot));
|
|
2255
2355
|
|
|
2256
2356
|
return {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const {
|
|
2
|
+
buildErrorPayload,
|
|
3
|
+
collectDashboardReport,
|
|
4
|
+
formatHumanDashboard,
|
|
5
|
+
normalizeDashboardOptions,
|
|
6
|
+
} = require('../lib/dashboard');
|
|
7
|
+
|
|
8
|
+
function runDashboard(repoRoot, options = {}) {
|
|
9
|
+
try {
|
|
10
|
+
normalizeDashboardOptions(options);
|
|
11
|
+
const report = collectDashboardReport(repoRoot, options);
|
|
12
|
+
if (options.json) {
|
|
13
|
+
process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
|
|
14
|
+
return report;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
process.stdout.write(formatHumanDashboard(report, options));
|
|
18
|
+
return report;
|
|
19
|
+
} catch (error) {
|
|
20
|
+
if (options.json) {
|
|
21
|
+
process.stdout.write(`${JSON.stringify(buildErrorPayload(error), null, 2)}\n`);
|
|
22
|
+
process.exitCode = 1;
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
module.exports = {
|
|
30
|
+
runDashboard,
|
|
31
|
+
};
|