create-quiver 0.17.1 → 0.17.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/ACTIVE_SLICES.md +43 -0
- package/CHANGELOG.md +8 -0
- package/auditoria-ux-ui-performance-documentacion.md +705 -0
- package/copys-landing-page.md +244 -0
- package/docs/CLI_UX_GUIDE.md +13 -3
- package/docs/TROUBLESHOOTING.md +94 -0
- package/docs/reference/commands.md +68 -4
- package/docs/workflows/existing-project-ai-quiver-setup.md +552 -0
- package/docs/workflows/existing-project.md +36 -0
- package/package.json +1 -1
- package/specs/quiver-v43-cli-i18n-audit-release-readiness/command-language-mode-matrix.json +5 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/EVIDENCE_REPORT.md +151 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/EXECUTION_PLAN.md +50 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/SPEC.md +207 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/STATUS.md +32 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/pr.md +73 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-00-analysis-run-contract/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-00-analysis-run-contract/EXECUTION_BRIEF.md +63 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-00-analysis-run-contract/slice.json +70 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-01-provider-fixture-harness/CLOSURE_BRIEF.md +38 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-01-provider-fixture-harness/EXECUTION_BRIEF.md +60 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-01-provider-fixture-harness/slice.json +74 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-02-safe-context-boundary/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-02-safe-context-boundary/EXECUTION_BRIEF.md +68 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-02-safe-context-boundary/slice.json +85 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-03-schema-error-grouping/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-03-schema-error-grouping/EXECUTION_BRIEF.md +65 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-03-schema-error-grouping/slice.json +80 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-04-safe-repair-layer/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-04-safe-repair-layer/EXECUTION_BRIEF.md +63 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-04-safe-repair-layer/slice.json +80 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-05-controlled-retry-layer/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-05-controlled-retry-layer/EXECUTION_BRIEF.md +65 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-05-controlled-retry-layer/slice.json +81 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-06-audit-review-transaction/CLOSURE_BRIEF.md +35 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-06-audit-review-transaction/EXECUTION_BRIEF.md +71 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-06-audit-review-transaction/slice.json +88 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-07-semantic-validation-docs/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-07-semantic-validation-docs/EXECUTION_BRIEF.md +66 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-07-semantic-validation-docs/slice.json +86 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-08-structural-map-hardening/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-08-structural-map-hardening/EXECUTION_BRIEF.md +67 -0
- package/specs/quiver-v53-reliable-deep-project-analysis/slices/slice-08-structural-map-hardening/slice.json +81 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/EVIDENCE_REPORT.md +53 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/EXECUTION_PLAN.md +55 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/SPEC.md +184 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/STATUS.md +34 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-01-contract-regression-harness/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-01-contract-regression-harness/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-01-contract-regression-harness/slice.json +72 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-02-safe-discovery-sampling/CLOSURE_BRIEF.md +11 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-02-safe-discovery-sampling/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-02-safe-discovery-sampling/slice.json +69 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-03-run-lifecycle-cli-io/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-03-run-lifecycle-cli-io/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-03-run-lifecycle-cli-io/slice.json +69 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-04-artifact-store-redaction/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-04-artifact-store-redaction/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-04-artifact-store-redaction/slice.json +73 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-05-path-aware-repair-engine/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-05-path-aware-repair-engine/EXECUTION_BRIEF.md +57 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-05-path-aware-repair-engine/slice.json +72 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-06-retry-controller/CLOSURE_BRIEF.md +9 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-06-retry-controller/EXECUTION_BRIEF.md +52 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-06-retry-controller/slice.json +70 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-07-final-validation-review-write-gate/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-07-final-validation-review-write-gate/EXECUTION_BRIEF.md +57 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-07-final-validation-review-write-gate/slice.json +75 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-08-doctor-agents-guidance/CLOSURE_BRIEF.md +9 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-08-doctor-agents-guidance/EXECUTION_BRIEF.md +51 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-08-doctor-agents-guidance/slice.json +66 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-09-release-smoke-rollback-docs/CLOSURE_BRIEF.md +10 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-09-release-smoke-rollback-docs/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v54-deep-project-analysis-hardening/slices/slice-09-release-smoke-rollback-docs/slice.json +69 -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 +989 -136
- package/src/create-quiver/index.js +83 -1
- package/src/create-quiver/lib/ai/analyze-project-apply.js +269 -0
- package/src/create-quiver/lib/ai/analyze-project-discovery.js +213 -2
- package/src/create-quiver/lib/ai/analyze-project-docs.js +3 -1
- package/src/create-quiver/lib/ai/analyze-project-interactive.js +241 -0
- package/src/create-quiver/lib/ai/analyze-project-parser.js +1 -0
- package/src/create-quiver/lib/ai/analyze-project-prompts.js +130 -0
- package/src/create-quiver/lib/ai/analyze-project-proposal.js +582 -0
- package/src/create-quiver/lib/ai/analyze-project-repair.js +402 -0
- package/src/create-quiver/lib/ai/analyze-project-sampling.js +31 -4
- package/src/create-quiver/lib/ai/analyze-project-validation.js +178 -8
- package/src/create-quiver/lib/ai/artifacts.js +83 -2
- package/src/create-quiver/lib/cli/ux-flags.js +6 -0
- package/src/create-quiver/lib/doctor.js +107 -12
- package/src/create-quiver/lib/i18n/messages/en.js +33 -0
- package/src/create-quiver/lib/i18n/messages/es.js +34 -0
|
@@ -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.
|
package/specs/quiver-v55-analyze-project-doc-apply-ux/slices/slice-04-interactive-apply-ux/pr.md
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
## Title
|
|
2
|
+
|
|
3
|
+
QUIVER-55-04 - Interactive Analyze Project Apply UX
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
|
|
7
|
+
Implements the fourth v55 slice for `ai analyze-project`: plain TTY `--apply-docs` now shows an explained selector after provider validation instead of forcing users into a large editor buffer.
|
|
8
|
+
|
|
9
|
+
The selector supports:
|
|
10
|
+
|
|
11
|
+
- Apply documentation.
|
|
12
|
+
- View bounded diff, then choose again.
|
|
13
|
+
- Save proposal artifacts only.
|
|
14
|
+
- Edit proposal through the existing review flow.
|
|
15
|
+
- Cancel without final docs writes.
|
|
16
|
+
|
|
17
|
+
## PR Policy
|
|
18
|
+
|
|
19
|
+
- One slice, one commit, one PR.
|
|
20
|
+
- Runtime UX change, so this must be an individual PR.
|
|
21
|
+
- Human merge required after CI passes.
|
|
22
|
+
|
|
23
|
+
## Scope
|
|
24
|
+
|
|
25
|
+
Included:
|
|
26
|
+
|
|
27
|
+
- Interactive selector module for `--apply-docs`.
|
|
28
|
+
- Safe routing from selector actions into existing save/apply/review flows.
|
|
29
|
+
- Dynamic recommendation based on clean creates vs dirty/update targets.
|
|
30
|
+
- Bounded terminal diff with full diff artifact saved under `.quiver/runs`.
|
|
31
|
+
- English and Spanish selector copy with option descriptions.
|
|
32
|
+
- Tests for apply, save, edit, cancel, view-diff second decision, no-TTY guard, and selector recommendation.
|
|
33
|
+
- Slice status, evidence, and closure updates.
|
|
34
|
+
|
|
35
|
+
Excluded:
|
|
36
|
+
|
|
37
|
+
- `ai analyze-project apply --run <run-id>`.
|
|
38
|
+
- Release smoke docs.
|
|
39
|
+
- Product repo code changes.
|
|
40
|
+
|
|
41
|
+
## Files
|
|
42
|
+
|
|
43
|
+
- `src/create-quiver/commands/ai.js`
|
|
44
|
+
- `src/create-quiver/lib/ai/analyze-project-interactive.js`
|
|
45
|
+
- `src/create-quiver/lib/i18n/messages/en.js`
|
|
46
|
+
- `src/create-quiver/lib/i18n/messages/es.js`
|
|
47
|
+
- `tests/commands/ai-analyze-project-review.test.js`
|
|
48
|
+
- `tests/lib/cli-ux.test.js`
|
|
49
|
+
- `specs/quiver-v55-analyze-project-doc-apply-ux/**`
|
|
50
|
+
|
|
51
|
+
## How to Test (DETAILED - REQUIRED)
|
|
52
|
+
|
|
53
|
+
### Required Environment
|
|
54
|
+
|
|
55
|
+
- Node/npm environment for this repo.
|
|
56
|
+
- No live provider credentials required for automated tests.
|
|
57
|
+
|
|
58
|
+
### Worktree Access
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
git checkout feature/QUIVER-55-04-v55-interactive-apply-ux
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Run the Project
|
|
65
|
+
|
|
66
|
+
No dev server is required. This is CLI behavior.
|
|
67
|
+
|
|
68
|
+
### Use Cases
|
|
69
|
+
|
|
70
|
+
1. Interactive apply selector:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
node --test tests/commands/ai-analyze-project-review.test.js
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Expected: selector paths for apply, save, edit, cancel, view diff, no-TTY, and Spanish copy pass.
|
|
77
|
+
|
|
78
|
+
2. UX helper behavior:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
node --test tests/lib/cli-ux.test.js
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Expected: selector recommendations and bounded diff formatting pass.
|
|
85
|
+
|
|
86
|
+
3. Contract regressions:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
node --test tests/commands/ai-analyze-project.test.js
|
|
90
|
+
node --test tests/commands/cli-contract.test.js
|
|
91
|
+
node --test tests/commands/ux-flags.test.js
|
|
92
|
+
node --test tests/lib/i18n-catalog.test.js
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Expected: CLI contracts, help, UX flags, and i18n catalog remain valid.
|
|
96
|
+
|
|
97
|
+
### Technical Verification
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
node --test tests/commands/ai-analyze-project-provider.test.js
|
|
101
|
+
node --test tests/lib/ai-analyze-project-validation.test.js tests/lib/ai/analyze-project-repair.test.js
|
|
102
|
+
npm run docs:check
|
|
103
|
+
npm run schema:slice:check
|
|
104
|
+
node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict
|
|
105
|
+
git diff --check
|
|
106
|
+
npm test
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Expected: all pass.
|
|
110
|
+
|
|
111
|
+
## Evidence
|
|
112
|
+
|
|
113
|
+
Executed locally:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
node --test tests/commands/ai-analyze-project-review.test.js
|
|
117
|
+
node --test tests/lib/cli-ux.test.js
|
|
118
|
+
node --test tests/commands/ai-analyze-project.test.js
|
|
119
|
+
node --test tests/commands/cli-contract.test.js
|
|
120
|
+
node --test tests/lib/i18n-catalog.test.js
|
|
121
|
+
node --test tests/commands/ux-flags.test.js
|
|
122
|
+
node --test tests/commands/ai-analyze-project-provider.test.js
|
|
123
|
+
node --test tests/lib/ai-analyze-project-validation.test.js tests/lib/ai/analyze-project-repair.test.js
|
|
124
|
+
npm run docs:check
|
|
125
|
+
npm run schema:slice:check
|
|
126
|
+
node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict
|
|
127
|
+
git diff --check
|
|
128
|
+
npm test
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Result: all passed. Full `npm test` passed with 741 tests.
|
|
132
|
+
|
|
133
|
+
## Rollback
|
|
134
|
+
|
|
135
|
+
Revert this PR. `--apply-docs --yes`, `--save-proposal`, and `--review` remain available from earlier slices if this selector UX must be removed.
|
|
136
|
+
|
|
137
|
+
## Risks / Notes
|
|
138
|
+
|
|
139
|
+
- `--apply-docs` without `--yes` now runs the provider in interactive TTY mode before showing the selector.
|
|
140
|
+
- no-TTY and CI usage still require `--yes`; otherwise the command fails before provider execution.
|
|
141
|
+
- `apply --run <run-id>` remains intentionally deferred to slice-05.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-04-interactive-apply-ux",
|
|
3
|
+
"ticket": "QUIVER-55-04",
|
|
4
|
+
"type": "ux",
|
|
5
|
+
"title": "Interactive Apply UX",
|
|
6
|
+
"objective": "Add the explained TTY selector for --apply-docs while delegating all writes to the tested apply engine.",
|
|
7
|
+
"description": "Implements the human selector with option descriptions, dynamic recommendation, diff flow, save/edit/cancel actions, and bounded terminal output.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "feature",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "v55-interactive-apply-ux",
|
|
12
|
+
"branch_name": "feature/QUIVER-55-04-v55-interactive-apply-ux"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src/create-quiver/commands/ai.js",
|
|
16
|
+
"src/create-quiver/lib/ai/analyze-project-interactive.js",
|
|
17
|
+
"src/create-quiver/lib/ai/analyze-project-apply.js",
|
|
18
|
+
"src/create-quiver/lib/i18n/messages/en.js",
|
|
19
|
+
"src/create-quiver/lib/i18n/messages/es.js",
|
|
20
|
+
"tests/commands/ai-analyze-project-review.test.js",
|
|
21
|
+
"tests/lib/cli-ux.test.js",
|
|
22
|
+
"specs/quiver-v55-analyze-project-doc-apply-ux/**"
|
|
23
|
+
],
|
|
24
|
+
"expected_read_paths": [
|
|
25
|
+
"src/create-quiver/lib/cli/ux.js",
|
|
26
|
+
"src/create-quiver/lib/ai/analyze-project-review.js",
|
|
27
|
+
"src/create-quiver/lib/ai/analyze-project-apply.js"
|
|
28
|
+
],
|
|
29
|
+
"allowed_write_paths": [
|
|
30
|
+
"src/create-quiver/commands/ai.js",
|
|
31
|
+
"src/create-quiver/lib/ai/analyze-project-interactive.js",
|
|
32
|
+
"src/create-quiver/lib/ai/analyze-project-apply.js",
|
|
33
|
+
"src/create-quiver/lib/i18n/messages/en.js",
|
|
34
|
+
"src/create-quiver/lib/i18n/messages/es.js",
|
|
35
|
+
"tests/commands/ai-analyze-project-review.test.js",
|
|
36
|
+
"tests/lib/cli-ux.test.js",
|
|
37
|
+
"specs/quiver-v55-analyze-project-doc-apply-ux/**"
|
|
38
|
+
],
|
|
39
|
+
"depends_on": [
|
|
40
|
+
"slice-03-noninteractive-apply-engine"
|
|
41
|
+
],
|
|
42
|
+
"parallel_safe": "never",
|
|
43
|
+
"parallel_safe_reason": "Selector behavior depends on the completed apply engine contract.",
|
|
44
|
+
"must": [
|
|
45
|
+
"Show option descriptions.",
|
|
46
|
+
"Use dynamic recommendation.",
|
|
47
|
+
"Keep terminal diff bounded.",
|
|
48
|
+
"Route write actions through apply engine."
|
|
49
|
+
],
|
|
50
|
+
"not_included": [
|
|
51
|
+
"Apply saved run.",
|
|
52
|
+
"Release smoke docs."
|
|
53
|
+
],
|
|
54
|
+
"acceptance": [
|
|
55
|
+
"TTY --apply-docs shows explained selector.",
|
|
56
|
+
"no-TTY --apply-docs without --yes fails actionably.",
|
|
57
|
+
"Cancel writes no final docs.",
|
|
58
|
+
"View diff requires a second decision."
|
|
59
|
+
],
|
|
60
|
+
"tests": [
|
|
61
|
+
"node --test tests/commands/ai-analyze-project-review.test.js",
|
|
62
|
+
"node --test tests/lib/cli-ux.test.js",
|
|
63
|
+
"node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict",
|
|
64
|
+
"git diff --check"
|
|
65
|
+
],
|
|
66
|
+
"estimated_hours": 6,
|
|
67
|
+
"actual_hours": 6,
|
|
68
|
+
"status": "completed",
|
|
69
|
+
"blocked_reason": null,
|
|
70
|
+
"started_at": "2026-06-12T00:00:00.000Z",
|
|
71
|
+
"completed_at": "2026-06-12T00:00:00.000Z"
|
|
72
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# CLOSURE_BRIEF - slice-05 apply saved proposal
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Completed. `ai analyze-project apply --run <run-id>` now loads a saved analyze-project doc proposal from `.quiver/runs/<run-id>/proposal/`, revalidates the manifest and proposal JSON, and applies it through the same safe apply engine without executing a provider or requiring provider/model flags.
|
|
6
|
+
|
|
7
|
+
## Behavior Delivered
|
|
8
|
+
|
|
9
|
+
- Explicit run ids are validated as safe single path segments before artifact access.
|
|
10
|
+
- Missing or invalid saved proposal manifests fail before docs writes.
|
|
11
|
+
- Saved proposal JSON is reparsed through the doc proposal schema and allowed-path checks.
|
|
12
|
+
- Saved proposal manifest doc paths must match the proposal target docs.
|
|
13
|
+
- Manual proposal content edits are accepted only after revalidation and recorded as `saved-proposal-edited` in the write manifest.
|
|
14
|
+
- Dirty target docs block by default and can be applied only with `--allow-dirty-docs`.
|
|
15
|
+
- Stale target docs block before any final docs write.
|
|
16
|
+
- `--run latest` is resolved only in an interactive terminal, and is rejected with `--yes` or `--json`.
|
|
17
|
+
- Apply-run reports set `provider_execution: skipped` and do not call provider/model resolution.
|
|
18
|
+
|
|
19
|
+
## Required Evidence
|
|
20
|
+
|
|
21
|
+
- Apply saved run success test passes.
|
|
22
|
+
- Invalid run id test passes.
|
|
23
|
+
- Stale/dirty blocking tests pass.
|
|
24
|
+
- No-provider-execution test passes.
|
|
25
|
+
- Manual proposal edit audit 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/ai-analyze-project-proposal.test.js
|
|
34
|
+
node --test tests/commands/ai-analyze-project.test.js
|
|
35
|
+
npm run docs:check
|
|
36
|
+
npm run schema:slice:check
|
|
37
|
+
node bin/create-quiver.js spec validate specs/quiver-v55-analyze-project-doc-apply-ux --strict
|
|
38
|
+
git diff --check
|
|
39
|
+
npm test
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Result: all passed. Full `npm test` passed with 747 tests.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# EXECUTION_BRIEF - slice-05 apply saved proposal
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
Saving a proposal is only useful if users can later apply it without re-running the provider. This flow has a higher trust boundary because proposal artifacts may be stale or manually edited.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Implement `ai analyze-project apply --run <run-id>` to apply saved proposals without provider execution.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- Resolve and validate run id.
|
|
14
|
+
- Load proposal manifest and normalized JSON.
|
|
15
|
+
- Revalidate proposal schema and allowed paths.
|
|
16
|
+
- Recalculate target doc hashes.
|
|
17
|
+
- Detect stale/dirty docs before writing.
|
|
18
|
+
- Apply through the same apply engine from slice-03.
|
|
19
|
+
- Support `--yes`, `--strict`, `--allow-dirty-docs`, and `--json` where safe.
|
|
20
|
+
- Optionally support `--run latest` only in TTY and never with `--yes`.
|
|
21
|
+
|
|
22
|
+
## Acceptance Criteria
|
|
23
|
+
|
|
24
|
+
- `apply --run <run-id>` does not execute provider and does not require provider/model.
|
|
25
|
+
- Invalid or missing run id fails with actionable guidance.
|
|
26
|
+
- Missing/invalid proposal manifest fails without docs writes.
|
|
27
|
+
- Stale or dirty docs block non-interactive apply unless explicitly allowed.
|
|
28
|
+
- Manual proposal edits are accepted only after full revalidation and recorded as edited.
|
|
29
|
+
- `--run latest --yes` is rejected.
|
|
30
|
+
|
|
31
|
+
## Expected Files To Modify
|
|
32
|
+
|
|
33
|
+
- `src/create-quiver/commands/ai.js`
|
|
34
|
+
- `src/create-quiver/lib/ai/analyze-project-apply.js`
|
|
35
|
+
- `src/create-quiver/lib/ai/analyze-project-proposal.js`
|
|
36
|
+
- `tests/commands/ai-analyze-project-review.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-review.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
|
+
- Saved proposal apply path never executes provider.
|
|
52
|
+
- Proposal manifest and normalized JSON are revalidated before writes.
|
|
53
|
+
- Stale/dirty target docs behavior is tested.
|
|
54
|
+
- Edited proposal audit metadata is recorded.
|
|
55
|
+
- Slice closure brief updated with evidence.
|
|
56
|
+
|
|
57
|
+
## Constraints
|
|
58
|
+
|
|
59
|
+
- Do not execute provider in `apply --run`.
|
|
60
|
+
- Do not trust saved artifacts without revalidation.
|
|
61
|
+
- Do not allow ambiguous `latest` in automation.
|