create-quiver 0.17.2 → 0.17.4
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/CHANGELOG.md +4 -0
- package/docs/CLI_UX_GUIDE.md +13 -3
- package/docs/TROUBLESHOOTING.md +42 -3
- package/docs/reference/commands.md +33 -12
- package/docs/workflows/existing-project.md +18 -3
- package/package.json +1 -1
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/command-language-mode-matrix.json +4 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/EVIDENCE_REPORT.md +209 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/EXECUTION_PLAN.md +49 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/SPEC.md +276 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/STATUS.md +29 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-01-cli-proposal-contract/CLOSURE_BRIEF.md +47 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-01-cli-proposal-contract/EXECUTION_BRIEF.md +67 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-01-cli-proposal-contract/pr.md +129 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-01-cli-proposal-contract/slice.json +82 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-02-save-proposal-flow/CLOSURE_BRIEF.md +39 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-02-save-proposal-flow/EXECUTION_BRIEF.md +61 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-02-save-proposal-flow/pr.md +116 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-02-save-proposal-flow/slice.json +69 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-03-noninteractive-apply-engine/CLOSURE_BRIEF.md +36 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-03-noninteractive-apply-engine/EXECUTION_BRIEF.md +62 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-03-noninteractive-apply-engine/pr.md +132 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-03-noninteractive-apply-engine/slice.json +76 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-04-interactive-apply-ux/CLOSURE_BRIEF.md +47 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-04-interactive-apply-ux/EXECUTION_BRIEF.md +70 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-04-interactive-apply-ux/pr.md +141 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-04-interactive-apply-ux/slice.json +72 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-05-apply-saved-proposal/CLOSURE_BRIEF.md +42 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-05-apply-saved-proposal/EXECUTION_BRIEF.md +61 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-05-apply-saved-proposal/pr.md +129 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-05-apply-saved-proposal/slice.json +67 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-06-i18n-docs-release-smoke/CLOSURE_BRIEF.md +38 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-06-i18n-docs-release-smoke/EXECUTION_BRIEF.md +64 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-06-i18n-docs-release-smoke/pr.md +123 -0
- package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-06-i18n-docs-release-smoke/slice.json +76 -0
- package/src/create-quiver/commands/ai.js +648 -65
- package/src/create-quiver/index.js +80 -1
- package/src/create-quiver/lib/ai/analyze-project-apply.js +269 -0
- package/src/create-quiver/lib/ai/analyze-project-docs.js +16 -1
- package/src/create-quiver/lib/ai/analyze-project-interactive.js +241 -0
- package/src/create-quiver/lib/ai/analyze-project-proposal.js +582 -0
- package/src/create-quiver/lib/ai/analyze-project-validation.js +10 -8
- package/src/create-quiver/lib/cli/ux-flags.js +6 -0
- package/src/create-quiver/lib/i18n/messages/en.js +28 -0
- package/src/create-quiver/lib/i18n/messages/es.js +29 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# EXECUTION_BRIEF - slice-02 save proposal flow
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
Users need a way to keep the generated documentation proposal without applying final docs. This must work in automation and must not require an editor.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Implement `--save-proposal` so Quiver persists a validated, normalized proposal and audit summary without writing final documentation.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- Build proposal from `buildAnalyzeProjectDocProposal(parsed.analysis)`.
|
|
14
|
+
- Save:
|
|
15
|
+
- normalized proposal JSON;
|
|
16
|
+
- compact Markdown summary;
|
|
17
|
+
- full diff artifact;
|
|
18
|
+
- manifest with hashes and events.
|
|
19
|
+
- Support `--save-proposal --json`.
|
|
20
|
+
- Do not create snapshots or write final docs.
|
|
21
|
+
- Update run status with proposal artifact metadata.
|
|
22
|
+
|
|
23
|
+
## Acceptance Criteria
|
|
24
|
+
|
|
25
|
+
- `--save-proposal` runs provider, validates/repairs JSON, and saves proposal artifacts.
|
|
26
|
+
- Final docs are not modified.
|
|
27
|
+
- no-TTY mode works without prompting.
|
|
28
|
+
- `--json` emits clean machine-readable proposal result.
|
|
29
|
+
- Invalid final JSON does not create usable proposal artifacts.
|
|
30
|
+
- Proposal Markdown summary is compact and does not embed full doc contents by default.
|
|
31
|
+
|
|
32
|
+
## Expected Files To Modify
|
|
33
|
+
|
|
34
|
+
- `src/create-quiver/commands/ai.js`
|
|
35
|
+
- `src/create-quiver/lib/ai/analyze-project-proposal.js`
|
|
36
|
+
- `tests/commands/ai-analyze-project-provider.test.js`
|
|
37
|
+
- `tests/lib/ai-analyze-project-proposal.test.js`
|
|
38
|
+
- this slice closure/status/evidence files
|
|
39
|
+
|
|
40
|
+
## Validation Required
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
node --test tests/commands/ai-analyze-project-provider.test.js
|
|
44
|
+
node --test tests/lib/ai-analyze-project-proposal.test.js
|
|
45
|
+
node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict
|
|
46
|
+
git diff --check
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Completion Checklist
|
|
50
|
+
|
|
51
|
+
- Save-only proposal flow implemented without final docs writes.
|
|
52
|
+
- Proposal JSON, Markdown, diff, and manifest artifacts covered by tests.
|
|
53
|
+
- `--json` output contract verified.
|
|
54
|
+
- Invalid JSON failure path verified.
|
|
55
|
+
- Slice closure brief updated with evidence.
|
|
56
|
+
|
|
57
|
+
## Constraints
|
|
58
|
+
|
|
59
|
+
- Do not write docs final.
|
|
60
|
+
- Do not create snapshots for save-only flows.
|
|
61
|
+
- Do not re-run provider when only formatting artifacts.
|
package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-02-save-proposal-flow/pr.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
## Title
|
|
2
|
+
|
|
3
|
+
QUIVER-55-02 - Save Analyze Project Proposal Artifacts
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
|
|
7
|
+
Implements the second v55 slice for `ai analyze-project`: `--save-proposal` now persists a validated, normalized documentation proposal without writing final docs.
|
|
8
|
+
|
|
9
|
+
## PR Policy
|
|
10
|
+
|
|
11
|
+
- One slice: `slice-02-save-proposal-flow`.
|
|
12
|
+
- Runtime behavior change is limited to save-only proposal artifact persistence.
|
|
13
|
+
- This PR does not implement docs apply, interactive selector UX, or saved proposal apply.
|
|
14
|
+
|
|
15
|
+
## Scope
|
|
16
|
+
|
|
17
|
+
Included:
|
|
18
|
+
|
|
19
|
+
- Build a normalized doc proposal from validated provider analysis.
|
|
20
|
+
- Save proposal JSON, compact Markdown summary, full diff, and manifest under `.quiver/runs/<run-id>/proposal/`.
|
|
21
|
+
- Record proposal metadata in run status.
|
|
22
|
+
- Support `--save-proposal --json`.
|
|
23
|
+
- Keep final docs unchanged.
|
|
24
|
+
- Avoid snapshots in save-only mode.
|
|
25
|
+
- Add command and helper tests for success, JSON output, and invalid provider JSON.
|
|
26
|
+
|
|
27
|
+
Excluded:
|
|
28
|
+
|
|
29
|
+
- No `--apply-docs` implementation.
|
|
30
|
+
- No interactive selector.
|
|
31
|
+
- No `ai analyze-project apply --run` implementation.
|
|
32
|
+
- No live provider smoke in CI.
|
|
33
|
+
|
|
34
|
+
## Files
|
|
35
|
+
|
|
36
|
+
- `src/create-quiver/commands/ai.js`
|
|
37
|
+
- `src/create-quiver/lib/ai/analyze-project-proposal.js`
|
|
38
|
+
- `tests/commands/ai-analyze-project-provider.test.js`
|
|
39
|
+
- `tests/lib/ai-analyze-project-proposal.test.js`
|
|
40
|
+
- `specs/quiver-v55-analyze-project-doc-apply-ux/**`
|
|
41
|
+
|
|
42
|
+
## How to Test (DETAILED - REQUIRED)
|
|
43
|
+
|
|
44
|
+
### Required Environment
|
|
45
|
+
|
|
46
|
+
- Node.js supported by this repository.
|
|
47
|
+
- npm dependencies installed.
|
|
48
|
+
- No provider credentials are required for automated tests.
|
|
49
|
+
|
|
50
|
+
### Worktree Access
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
git checkout feature/QUIVER-55-02-v55-save-proposal-flow
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Run the Project
|
|
57
|
+
|
|
58
|
+
No dev server is required. This is a CLI save-artifact slice.
|
|
59
|
+
|
|
60
|
+
### Use Cases
|
|
61
|
+
|
|
62
|
+
#### Case 1: Save proposal artifacts
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
node --test tests/commands/ai-analyze-project-provider.test.js
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Expected: `--save-proposal` test writes proposal artifacts under `.quiver/runs/<run-id>/proposal/` and does not write `docs/CONTEXTO.md`.
|
|
69
|
+
|
|
70
|
+
#### Case 2: Save proposal JSON output
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
node --test tests/commands/ai-analyze-project-provider.test.js
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Expected: `--save-proposal --json` output parses as JSON and points to the saved proposal manifest.
|
|
77
|
+
|
|
78
|
+
#### Case 3: Invalid provider JSON remains safe
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
node --test tests/commands/ai-analyze-project-provider.test.js
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Expected: invalid final provider JSON rejects before proposal artifacts are created.
|
|
85
|
+
|
|
86
|
+
### Technical Verification
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
node --test tests/lib/ai-analyze-project-proposal.test.js
|
|
90
|
+
node --test tests/commands/ai-analyze-project-provider.test.js
|
|
91
|
+
node --test tests/commands/ai-analyze-project.test.js tests/commands/cli-contract.test.js tests/commands/ux-flags.test.js
|
|
92
|
+
node --test tests/commands/ai-analyze-project-review.test.js tests/lib/ai-analyze-project-validation.test.js tests/lib/ai-analyze-project-docs.test.js
|
|
93
|
+
node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict
|
|
94
|
+
git diff --check
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Evidence
|
|
98
|
+
|
|
99
|
+
- All technical verification commands passed locally.
|
|
100
|
+
- `slice-02` closure brief records executed evidence.
|
|
101
|
+
- No live provider call was required.
|
|
102
|
+
|
|
103
|
+
## Rollback
|
|
104
|
+
|
|
105
|
+
Revert this PR:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
git revert <merge-commit-sha>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
This restores `--save-proposal` to the previously recognized-but-unavailable contract while preserving the earlier slice-01 CLI contract.
|
|
112
|
+
|
|
113
|
+
## Risks / Notes
|
|
114
|
+
|
|
115
|
+
- Saved proposals are artifacts only; users still need a later slice to apply them with `apply --run`.
|
|
116
|
+
- The Markdown summary intentionally omits full proposed doc contents; the JSON and diff artifacts hold details.
|
package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-02-save-proposal-flow/slice.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-02-save-proposal-flow",
|
|
3
|
+
"ticket": "QUIVER-55-02",
|
|
4
|
+
"type": "feature",
|
|
5
|
+
"title": "Save Proposal Flow",
|
|
6
|
+
"objective": "Persist validated analyze-project doc proposals without writing final documentation.",
|
|
7
|
+
"description": "Implements --save-proposal with normalized JSON, compact Markdown summary, full diff artifact, manifest hashes, run-status metadata, and JSON automation output.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "feature",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "v55-save-proposal-flow",
|
|
12
|
+
"branch_name": "feature/QUIVER-55-02-v55-save-proposal-flow"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src/create-quiver/commands/ai.js",
|
|
16
|
+
"src/create-quiver/lib/ai/analyze-project-proposal.js",
|
|
17
|
+
"tests/commands/ai-analyze-project-provider.test.js",
|
|
18
|
+
"tests/lib/ai-analyze-project-proposal.test.js",
|
|
19
|
+
"specs/quiver-v55-analyze-project-doc-apply-ux/**"
|
|
20
|
+
],
|
|
21
|
+
"expected_read_paths": [
|
|
22
|
+
"src/create-quiver/lib/ai/analyze-project-docs.js",
|
|
23
|
+
"src/create-quiver/lib/ai/analyze-project-review.js",
|
|
24
|
+
"src/create-quiver/lib/ai/artifacts.js"
|
|
25
|
+
],
|
|
26
|
+
"allowed_write_paths": [
|
|
27
|
+
"src/create-quiver/commands/ai.js",
|
|
28
|
+
"src/create-quiver/lib/ai/analyze-project-proposal.js",
|
|
29
|
+
"tests/commands/ai-analyze-project-provider.test.js",
|
|
30
|
+
"tests/lib/ai-analyze-project-proposal.test.js",
|
|
31
|
+
"specs/quiver-v55-analyze-project-doc-apply-ux/**"
|
|
32
|
+
],
|
|
33
|
+
"depends_on": [
|
|
34
|
+
"slice-01-cli-proposal-contract"
|
|
35
|
+
],
|
|
36
|
+
"parallel_safe": "never",
|
|
37
|
+
"parallel_safe_reason": "This slice depends on the artifact contract and feeds the apply engine.",
|
|
38
|
+
"must": [
|
|
39
|
+
"Save normalized proposal JSON.",
|
|
40
|
+
"Save compact Markdown summary.",
|
|
41
|
+
"Save diff artifact.",
|
|
42
|
+
"Never write final docs."
|
|
43
|
+
],
|
|
44
|
+
"not_included": [
|
|
45
|
+
"Apply docs.",
|
|
46
|
+
"Interactive selector.",
|
|
47
|
+
"Apply saved run."
|
|
48
|
+
],
|
|
49
|
+
"acceptance": [
|
|
50
|
+
"--save-proposal writes proposal artifacts.",
|
|
51
|
+
"--save-proposal --json is parseable.",
|
|
52
|
+
"Final docs remain unchanged.",
|
|
53
|
+
"Invalid final JSON does not create usable proposal artifacts."
|
|
54
|
+
],
|
|
55
|
+
"tests": [
|
|
56
|
+
"node --test tests/commands/ai-analyze-project-provider.test.js",
|
|
57
|
+
"node --test tests/lib/ai-analyze-project-proposal.test.js",
|
|
58
|
+
"node --test tests/commands/ai-analyze-project.test.js tests/commands/cli-contract.test.js tests/commands/ux-flags.test.js",
|
|
59
|
+
"node --test tests/commands/ai-analyze-project-review.test.js tests/lib/ai-analyze-project-validation.test.js tests/lib/ai-analyze-project-docs.test.js",
|
|
60
|
+
"node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict",
|
|
61
|
+
"git diff --check"
|
|
62
|
+
],
|
|
63
|
+
"estimated_hours": 5,
|
|
64
|
+
"actual_hours": 5,
|
|
65
|
+
"status": "completed",
|
|
66
|
+
"blocked_reason": null,
|
|
67
|
+
"started_at": "2026-06-12T00:00:00.000Z",
|
|
68
|
+
"completed_at": "2026-06-12T00:00:00.000Z"
|
|
69
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# CLOSURE_BRIEF - slice-03 non-interactive apply engine
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Implemented. `ai analyze-project --deep --apply-docs --yes` now runs the provider, builds a validated doc proposal, saves proposal artifacts, blocks unsafe dirty/stale writes, creates a snapshot, writes only approved docs, saves a separate write manifest, runs post-write validation, and supports parseable JSON output.
|
|
6
|
+
|
|
7
|
+
The interactive `--apply-docs` selector and `apply --run` remain out of scope for later slices.
|
|
8
|
+
|
|
9
|
+
## Evidence
|
|
10
|
+
|
|
11
|
+
- Apply success test passes with proposal artifacts, snapshot, write manifest, written docs, and post-write validation.
|
|
12
|
+
- Dirty target docs block `--yes` unless `--allow-dirty-docs` is provided.
|
|
13
|
+
- Stale target hash preflight is covered at the apply engine boundary.
|
|
14
|
+
- Invalid provider doc proposals write no final docs and create no proposal artifacts.
|
|
15
|
+
- `--apply-docs --yes --json` emits a parseable complete result.
|
|
16
|
+
- Existing `--review` tests still pass unchanged.
|
|
17
|
+
|
|
18
|
+
## Validation
|
|
19
|
+
|
|
20
|
+
Executed:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
node --test tests/lib/ai-analyze-project-apply.test.js
|
|
24
|
+
node --test tests/lib/ai-analyze-project-proposal.test.js
|
|
25
|
+
node --test tests/commands/ai-analyze-project-review.test.js
|
|
26
|
+
node --test tests/commands/ai-analyze-project.test.js tests/commands/cli-contract.test.js tests/commands/ux-flags.test.js
|
|
27
|
+
node --test tests/commands/ai-analyze-project-provider.test.js
|
|
28
|
+
node --test tests/lib/ai/analyze-project-repair.test.js
|
|
29
|
+
npm run docs:check
|
|
30
|
+
npm run schema:slice:check
|
|
31
|
+
node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict
|
|
32
|
+
git diff --check
|
|
33
|
+
npm test
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Result: all passed. Full `npm test` passed with 730 tests.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# EXECUTION_BRIEF - slice-03 non-interactive apply engine
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
Automation needs a safe direct apply path. This must not depend on selector UI and must reuse existing write plan, snapshot, and post-write validation behavior.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Implement the non-interactive apply engine for `--apply-docs --yes`.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- Save proposal artifacts before applying.
|
|
14
|
+
- Build write plan from normalized proposal.
|
|
15
|
+
- Detect dirty/stale target docs.
|
|
16
|
+
- Block dirty docs in `--yes` unless `--allow-dirty-docs` is passed.
|
|
17
|
+
- Create snapshot before writes.
|
|
18
|
+
- Write docs through existing safe write path.
|
|
19
|
+
- Save write manifest.
|
|
20
|
+
- Run post-write validation.
|
|
21
|
+
- Support `--apply-docs --yes --json`.
|
|
22
|
+
|
|
23
|
+
## Acceptance Criteria
|
|
24
|
+
|
|
25
|
+
- `--apply-docs --yes` writes only allowed docs when proposal is valid.
|
|
26
|
+
- `--apply-docs --yes` blocks on invalid proposal.
|
|
27
|
+
- `--apply-docs --yes` blocks on dirty docs unless explicitly allowed.
|
|
28
|
+
- Snapshot and write manifest are created before/after writes as appropriate.
|
|
29
|
+
- JSON output includes run id, proposal artifacts, write plan, snapshot, written docs, validation, and artifacts.
|
|
30
|
+
- Existing `--review` behavior remains unchanged.
|
|
31
|
+
|
|
32
|
+
## Expected Files To Modify
|
|
33
|
+
|
|
34
|
+
- `src/create-quiver/commands/ai.js`
|
|
35
|
+
- `src/create-quiver/lib/ai/analyze-project-apply.js`
|
|
36
|
+
- `src/create-quiver/lib/ai/analyze-project-proposal.js`
|
|
37
|
+
- `tests/commands/ai-analyze-project-review.test.js`
|
|
38
|
+
- `tests/lib/ai-analyze-project-validation.test.js`
|
|
39
|
+
- this slice closure/status/evidence files
|
|
40
|
+
|
|
41
|
+
## Validation Required
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
node --test tests/commands/ai-analyze-project-review.test.js
|
|
45
|
+
node --test tests/lib/ai-analyze-project-validation.test.js
|
|
46
|
+
node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict
|
|
47
|
+
git diff --check
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Completion Checklist
|
|
51
|
+
|
|
52
|
+
- Non-interactive apply engine uses validated proposals only.
|
|
53
|
+
- Dirty/stale docs guardrails covered by tests.
|
|
54
|
+
- Snapshot and write manifest behavior verified.
|
|
55
|
+
- JSON output includes apply artifacts and validation status.
|
|
56
|
+
- Slice closure brief updated with evidence.
|
|
57
|
+
|
|
58
|
+
## Constraints
|
|
59
|
+
|
|
60
|
+
- Do not implement selector UI in this slice.
|
|
61
|
+
- Do not allow product code writes.
|
|
62
|
+
- Do not let `--yes` approve anything beyond validated doc updates.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
## Title
|
|
2
|
+
|
|
3
|
+
QUIVER-55-03 - Non-Interactive Analyze Project Apply Engine
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
|
|
7
|
+
Implements the third v55 slice for `ai analyze-project`: `--apply-docs --yes` now applies validated documentation proposals through a safe non-interactive write engine.
|
|
8
|
+
|
|
9
|
+
## PR Policy
|
|
10
|
+
|
|
11
|
+
- One slice: `slice-03-noninteractive-apply-engine`.
|
|
12
|
+
- Runtime behavior change is limited to the non-interactive `--apply-docs --yes` path.
|
|
13
|
+
- This PR does not implement interactive selector UX or saved proposal application by run id.
|
|
14
|
+
- Human merge is required because this PR changes runtime write behavior.
|
|
15
|
+
|
|
16
|
+
## Scope
|
|
17
|
+
|
|
18
|
+
Included:
|
|
19
|
+
|
|
20
|
+
- Persist proposal artifacts before applying docs.
|
|
21
|
+
- Build the write plan from a normalized validated proposal.
|
|
22
|
+
- Block dirty target docs in `--yes` unless `--allow-dirty-docs` is passed.
|
|
23
|
+
- Block stale target docs when current hashes no longer match the saved proposal manifest.
|
|
24
|
+
- Create snapshots before final doc writes.
|
|
25
|
+
- Write approved docs only through the existing managed-block path.
|
|
26
|
+
- Save `.quiver/runs/<run-id>/writes/analyze-project-doc-writes.json`.
|
|
27
|
+
- Run post-write validation.
|
|
28
|
+
- Support `--apply-docs --yes --json`.
|
|
29
|
+
- Preserve existing `--review` behavior.
|
|
30
|
+
|
|
31
|
+
Excluded:
|
|
32
|
+
|
|
33
|
+
- No interactive selector for plain `--apply-docs`.
|
|
34
|
+
- No `ai analyze-project apply --run <run-id>`.
|
|
35
|
+
- No live provider smoke in CI.
|
|
36
|
+
|
|
37
|
+
## Files
|
|
38
|
+
|
|
39
|
+
- `src/create-quiver/commands/ai.js`
|
|
40
|
+
- `src/create-quiver/lib/ai/analyze-project-apply.js`
|
|
41
|
+
- `src/create-quiver/lib/ai/analyze-project-proposal.js`
|
|
42
|
+
- `tests/commands/ai-analyze-project-review.test.js`
|
|
43
|
+
- `tests/lib/ai-analyze-project-apply.test.js`
|
|
44
|
+
- `tests/lib/ai-analyze-project-proposal.test.js`
|
|
45
|
+
- `specs/quiver-v55-analyze-project-doc-apply-ux/**`
|
|
46
|
+
|
|
47
|
+
## How to Test (DETAILED - REQUIRED)
|
|
48
|
+
|
|
49
|
+
### Required Environment
|
|
50
|
+
|
|
51
|
+
- Node.js supported by this repository.
|
|
52
|
+
- npm dependencies installed.
|
|
53
|
+
- No provider credentials are required for automated tests.
|
|
54
|
+
|
|
55
|
+
### Worktree Access
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
git checkout feature/QUIVER-55-03-v55-noninteractive-apply-engine
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Run the Project
|
|
62
|
+
|
|
63
|
+
No dev server is required. This is a CLI docs-apply engine slice.
|
|
64
|
+
|
|
65
|
+
### Use Cases
|
|
66
|
+
|
|
67
|
+
#### Case 1: Apply valid docs non-interactively
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
node --test tests/commands/ai-analyze-project-review.test.js
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Expected: `--apply-docs --yes` writes approved docs, saves proposal artifacts, creates a snapshot, saves the write manifest, and passes post-write validation.
|
|
74
|
+
|
|
75
|
+
#### Case 2: Automation JSON output
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
node --test tests/commands/ai-analyze-project-review.test.js
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Expected: `--apply-docs --yes --json` emits parseable JSON containing run id, proposal artifacts, write plan, snapshot, written docs, post-write validation, and write manifest.
|
|
82
|
+
|
|
83
|
+
#### Case 3: Dirty docs are blocked by default
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
node --test tests/commands/ai-analyze-project-review.test.js
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Expected: existing target docs block `--yes` unless `--allow-dirty-docs` is provided; final docs remain unchanged when blocked.
|
|
90
|
+
|
|
91
|
+
#### Case 4: Stale docs are blocked
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
node --test tests/lib/ai-analyze-project-apply.test.js
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Expected: hash mismatches between proposal manifest and current target docs fail before writing final docs.
|
|
98
|
+
|
|
99
|
+
### Technical Verification
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
node --test tests/commands/ai-analyze-project-review.test.js tests/lib/ai-analyze-project-apply.test.js tests/lib/ai-analyze-project-proposal.test.js tests/lib/ai-analyze-project-validation.test.js
|
|
103
|
+
node --test tests/commands/ai-analyze-project-provider.test.js tests/commands/ai-analyze-project.test.js tests/commands/cli-contract.test.js tests/commands/ux-flags.test.js
|
|
104
|
+
node --test tests/lib/ai/analyze-project-repair.test.js
|
|
105
|
+
npm run docs:check
|
|
106
|
+
npm run schema:slice:check
|
|
107
|
+
node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict
|
|
108
|
+
git diff --check
|
|
109
|
+
npm test
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Evidence
|
|
113
|
+
|
|
114
|
+
- All technical verification commands passed locally.
|
|
115
|
+
- Full `npm test` passed locally: 730 tests.
|
|
116
|
+
- `slice-03` closure brief records executed evidence.
|
|
117
|
+
|
|
118
|
+
## Rollback
|
|
119
|
+
|
|
120
|
+
Revert this PR:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
git revert <merge-commit-sha>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
This disables non-interactive docs apply while preserving the earlier CLI contract and `--save-proposal` artifacts.
|
|
127
|
+
|
|
128
|
+
## Risks / Notes
|
|
129
|
+
|
|
130
|
+
- `--apply-docs` without `--yes` still intentionally blocks until the interactive selector slice lands.
|
|
131
|
+
- Existing docs are treated as dirty targets and require `--allow-dirty-docs` for automation.
|
|
132
|
+
- Saved proposal application remains a later slice.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-03-noninteractive-apply-engine",
|
|
3
|
+
"ticket": "QUIVER-55-03",
|
|
4
|
+
"type": "feature",
|
|
5
|
+
"title": "Non-Interactive Apply Engine",
|
|
6
|
+
"objective": "Apply validated analyze-project doc proposals safely through --apply-docs --yes without selector UI.",
|
|
7
|
+
"description": "Adds the reusable apply engine: proposal persistence, dirty/stale preflight, snapshot, doc writes, write manifest, post-write validation, and JSON output.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "feature",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "v55-noninteractive-apply-engine",
|
|
12
|
+
"branch_name": "feature/QUIVER-55-03-v55-noninteractive-apply-engine"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src/create-quiver/commands/ai.js",
|
|
16
|
+
"src/create-quiver/lib/ai/analyze-project-apply.js",
|
|
17
|
+
"src/create-quiver/lib/ai/analyze-project-proposal.js",
|
|
18
|
+
"tests/commands/ai-analyze-project-review.test.js",
|
|
19
|
+
"tests/lib/ai-analyze-project-apply.test.js",
|
|
20
|
+
"tests/lib/ai-analyze-project-proposal.test.js",
|
|
21
|
+
"tests/lib/ai-analyze-project-validation.test.js",
|
|
22
|
+
"specs/quiver-v55-analyze-project-doc-apply-ux/**"
|
|
23
|
+
],
|
|
24
|
+
"expected_read_paths": [
|
|
25
|
+
"src/create-quiver/lib/ai/analyze-project-docs.js",
|
|
26
|
+
"src/create-quiver/lib/ai/analyze-project-validation.js",
|
|
27
|
+
"src/create-quiver/lib/ai/analyze-project-review.js"
|
|
28
|
+
],
|
|
29
|
+
"allowed_write_paths": [
|
|
30
|
+
"src/create-quiver/commands/ai.js",
|
|
31
|
+
"src/create-quiver/lib/ai/analyze-project-apply.js",
|
|
32
|
+
"src/create-quiver/lib/ai/analyze-project-proposal.js",
|
|
33
|
+
"tests/commands/ai-analyze-project-review.test.js",
|
|
34
|
+
"tests/lib/ai-analyze-project-apply.test.js",
|
|
35
|
+
"tests/lib/ai-analyze-project-proposal.test.js",
|
|
36
|
+
"tests/lib/ai-analyze-project-validation.test.js",
|
|
37
|
+
"specs/quiver-v55-analyze-project-doc-apply-ux/**"
|
|
38
|
+
],
|
|
39
|
+
"depends_on": [
|
|
40
|
+
"slice-01-cli-proposal-contract",
|
|
41
|
+
"slice-02-save-proposal-flow"
|
|
42
|
+
],
|
|
43
|
+
"parallel_safe": "never",
|
|
44
|
+
"parallel_safe_reason": "This slice owns the docs write boundary and must be reviewed independently.",
|
|
45
|
+
"must": [
|
|
46
|
+
"Persist proposal before apply.",
|
|
47
|
+
"Create snapshot before final doc writes.",
|
|
48
|
+
"Save write manifest.",
|
|
49
|
+
"Run post-write validation."
|
|
50
|
+
],
|
|
51
|
+
"not_included": [
|
|
52
|
+
"Interactive selector.",
|
|
53
|
+
"Apply saved run.",
|
|
54
|
+
"Docs release smoke."
|
|
55
|
+
],
|
|
56
|
+
"acceptance": [
|
|
57
|
+
"--apply-docs --yes writes valid allowed docs.",
|
|
58
|
+
"Dirty docs block --yes unless --allow-dirty-docs is passed.",
|
|
59
|
+
"Invalid proposal writes no final docs.",
|
|
60
|
+
"--apply-docs --yes --json is parseable and complete."
|
|
61
|
+
],
|
|
62
|
+
"tests": [
|
|
63
|
+
"node --test tests/commands/ai-analyze-project-review.test.js",
|
|
64
|
+
"node --test tests/lib/ai-analyze-project-apply.test.js",
|
|
65
|
+
"node --test tests/lib/ai-analyze-project-proposal.test.js",
|
|
66
|
+
"node --test tests/lib/ai-analyze-project-validation.test.js",
|
|
67
|
+
"node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict",
|
|
68
|
+
"git diff --check"
|
|
69
|
+
],
|
|
70
|
+
"estimated_hours": 6,
|
|
71
|
+
"actual_hours": 6,
|
|
72
|
+
"status": "completed",
|
|
73
|
+
"blocked_reason": null,
|
|
74
|
+
"started_at": "2026-06-12T00:00:00.000Z",
|
|
75
|
+
"completed_at": "2026-06-12T00:00:00.000Z"
|
|
76
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# CLOSURE_BRIEF - slice-04 interactive apply UX
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Completed. Plain TTY `ai analyze-project --deep --apply-docs` now runs the provider, builds the validated proposal, and shows an explained selector instead of forcing a large editor buffer. The selector routes apply/save/edit/cancel/view-diff actions through the existing safe proposal, review, and apply flows.
|
|
6
|
+
|
|
7
|
+
## Behavior Delivered
|
|
8
|
+
|
|
9
|
+
- TTY `--apply-docs` shows compact summary, proposed files, changed/dirty counts, selected context artifact, and option descriptions.
|
|
10
|
+
- Dynamic recommendation puts `Apply documentation` first for clean creates and `View diff` first for dirty/update targets.
|
|
11
|
+
- `View diff` saves the full diff artifact, prints only a bounded terminal preview, and requires a second decision.
|
|
12
|
+
- `Save proposal` writes `.quiver/runs/<run-id>/proposal/*` artifacts only.
|
|
13
|
+
- `Edit proposal` reuses the existing review/editor/confirmation flow.
|
|
14
|
+
- `Cancel` writes no final docs and records `apply-canceled` status.
|
|
15
|
+
- no-TTY or CI `--apply-docs` without `--yes` fails before provider execution with actionable guidance.
|
|
16
|
+
- English and Spanish selector copy are covered.
|
|
17
|
+
|
|
18
|
+
## Required Evidence
|
|
19
|
+
|
|
20
|
+
- Apply option test passes.
|
|
21
|
+
- Diff option test passes.
|
|
22
|
+
- Save option test passes.
|
|
23
|
+
- Edit option test passes.
|
|
24
|
+
- Cancel option test passes.
|
|
25
|
+
- no-TTY error test passes.
|
|
26
|
+
|
|
27
|
+
## Validation
|
|
28
|
+
|
|
29
|
+
Executed:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
node --test tests/commands/ai-analyze-project-review.test.js
|
|
33
|
+
node --test tests/lib/cli-ux.test.js
|
|
34
|
+
node --test tests/commands/ai-analyze-project.test.js
|
|
35
|
+
node --test tests/commands/cli-contract.test.js
|
|
36
|
+
node --test tests/lib/i18n-catalog.test.js
|
|
37
|
+
node --test tests/commands/ux-flags.test.js
|
|
38
|
+
node --test tests/commands/ai-analyze-project-provider.test.js
|
|
39
|
+
node --test tests/lib/ai-analyze-project-validation.test.js tests/lib/ai/analyze-project-repair.test.js
|
|
40
|
+
npm run docs:check
|
|
41
|
+
npm run schema:slice:check
|
|
42
|
+
node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict
|
|
43
|
+
git diff --check
|
|
44
|
+
npm test
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Result: all passed. Full `npm test` passed with 741 tests.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# EXECUTION_BRIEF - slice-04 interactive apply UX
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
The main user-facing improvement is an explained selector that avoids forcing users into a large editor buffer. This selector must orchestrate already-tested save/apply/edit actions instead of owning write logic.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Implement `--apply-docs` TTY selector UX with English/Spanish messages and safe action routing.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- Show compact analysis/proposal summary.
|
|
14
|
+
- Show proposed files and action counts.
|
|
15
|
+
- Show repair summary and artifact paths.
|
|
16
|
+
- Render selector options with one-line descriptions.
|
|
17
|
+
- Dynamic recommendation:
|
|
18
|
+
- Apply documentation when target docs are clean/low-risk;
|
|
19
|
+
- View diff when docs are existing/dirty/high-risk.
|
|
20
|
+
- Implement actions:
|
|
21
|
+
- apply;
|
|
22
|
+
- view diff then apply/save/cancel;
|
|
23
|
+
- save proposal;
|
|
24
|
+
- edit proposal via existing `--review` path;
|
|
25
|
+
- cancel.
|
|
26
|
+
- Truncate human diff and save full diff artifact.
|
|
27
|
+
|
|
28
|
+
## Acceptance Criteria
|
|
29
|
+
|
|
30
|
+
- TTY `--apply-docs` shows explained options.
|
|
31
|
+
- no-TTY `--apply-docs` without `--yes` fails with actionable message.
|
|
32
|
+
- Cancel writes no final docs.
|
|
33
|
+
- Save proposal from selector writes artifacts only.
|
|
34
|
+
- Edit proposal reuses editor flow and handles editor failure by returning actionable guidance.
|
|
35
|
+
- View diff does not accidentally apply docs and requires a second decision.
|
|
36
|
+
- `--review` remains backward compatible.
|
|
37
|
+
|
|
38
|
+
## Expected Files To Modify
|
|
39
|
+
|
|
40
|
+
- `src/create-quiver/commands/ai.js`
|
|
41
|
+
- `src/create-quiver/lib/ai/analyze-project-interactive.js`
|
|
42
|
+
- `src/create-quiver/lib/ai/analyze-project-apply.js`
|
|
43
|
+
- `src/create-quiver/lib/i18n/messages/en.js`
|
|
44
|
+
- `src/create-quiver/lib/i18n/messages/es.js`
|
|
45
|
+
- `tests/commands/ai-analyze-project-review.test.js`
|
|
46
|
+
- `tests/lib/cli-ux.test.js`
|
|
47
|
+
- this slice closure/status/evidence files
|
|
48
|
+
|
|
49
|
+
## Validation Required
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
node --test tests/commands/ai-analyze-project-review.test.js
|
|
53
|
+
node --test tests/lib/cli-ux.test.js
|
|
54
|
+
node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict
|
|
55
|
+
git diff --check
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Completion Checklist
|
|
59
|
+
|
|
60
|
+
- TTY selector presents explained choices in the configured language.
|
|
61
|
+
- no-TTY apply without `--yes` fails with actionable guidance.
|
|
62
|
+
- Diff, save, edit, cancel, and apply paths are tested.
|
|
63
|
+
- Terminal diff output remains bounded.
|
|
64
|
+
- Slice closure brief updated with evidence.
|
|
65
|
+
|
|
66
|
+
## Constraints
|
|
67
|
+
|
|
68
|
+
- Do not duplicate write logic inside selector code.
|
|
69
|
+
- Do not make `--interactive` required for `--apply-docs`.
|
|
70
|
+
- Do not print unbounded diffs in terminal.
|