create-quiver 0.17.4 → 0.17.5

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.
Files changed (26) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/docs/CLI_UX_GUIDE.md +7 -0
  3. package/docs/TROUBLESHOOTING.md +10 -0
  4. package/docs/reference/commands.md +13 -0
  5. package/package.json +1 -1
  6. package/specs/quiver-v56-analyze-project-usable-doc-merge/EVIDENCE_REPORT.md +11 -0
  7. package/specs/quiver-v56-analyze-project-usable-doc-merge/EXECUTION_PLAN.md +28 -0
  8. package/specs/quiver-v56-analyze-project-usable-doc-merge/SPEC.md +96 -0
  9. package/specs/quiver-v56-analyze-project-usable-doc-merge/STATUS.md +26 -0
  10. package/specs/quiver-v56-analyze-project-usable-doc-merge/pr.md +56 -0
  11. package/specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-01-document-classification-merge-engine/CLOSURE_BRIEF.md +61 -0
  12. package/specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-01-document-classification-merge-engine/EXECUTION_BRIEF.md +59 -0
  13. package/specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-01-document-classification-merge-engine/pr.md +61 -0
  14. package/specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-01-document-classification-merge-engine/slice.json +71 -0
  15. package/specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-02-apply-integration-validation-contract/CLOSURE_BRIEF.md +30 -0
  16. package/specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-02-apply-integration-validation-contract/EXECUTION_BRIEF.md +39 -0
  17. package/specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-02-apply-integration-validation-contract/pr.md +62 -0
  18. package/specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-02-apply-integration-validation-contract/slice.json +80 -0
  19. package/specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-03-cli-docs-real-fixture-smoke/CLOSURE_BRIEF.md +29 -0
  20. package/specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-03-cli-docs-real-fixture-smoke/EXECUTION_BRIEF.md +32 -0
  21. package/specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-03-cli-docs-real-fixture-smoke/pr.md +61 -0
  22. package/specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-03-cli-docs-real-fixture-smoke/slice.json +79 -0
  23. package/src/create-quiver/commands/ai.js +36 -1
  24. package/src/create-quiver/lib/ai/analyze-project-docs.js +284 -4
  25. package/src/create-quiver/lib/ai/analyze-project-proposal.js +11 -0
  26. package/src/create-quiver/lib/ai/analyze-project-validation.js +26 -0
@@ -0,0 +1,62 @@
1
+ ## Title
2
+
3
+ QUIVER-56-02 apply integration validation contract
4
+
5
+ ## Summary
6
+
7
+ Integrates the merge engine into all analyze-project write paths and post-write validation.
8
+
9
+ ## PR Policy
10
+
11
+ Individual PR required.
12
+
13
+ ## Scope
14
+
15
+ Slice 02 only.
16
+
17
+ ## Files
18
+
19
+ See `slice.json`.
20
+
21
+ ## How to Test (DETAILED - REQUIRED)
22
+
23
+ ### Required Environment
24
+
25
+ Node.js/npm.
26
+
27
+ ### Worktree Access
28
+
29
+ Use the slice branch.
30
+
31
+ ### Run the Project
32
+
33
+ No dev server required.
34
+
35
+ ### Use Cases
36
+
37
+ Live apply, saved proposal apply, review diff, JSON output, strict validation.
38
+
39
+ ### Technical Verification
40
+
41
+ ```bash
42
+ node --test tests/commands/ai-analyze-project-provider.test.js tests/commands/ai-analyze-project-review.test.js
43
+ node --test tests/lib/ai-analyze-project-docs.test.js tests/lib/ai-analyze-project-validation.test.js
44
+ node bin/create-quiver.js spec validate specs/quiver-v56-analyze-project-usable-doc-merge --strict
45
+ git diff --check
46
+ ```
47
+
48
+ ## Evidence
49
+
50
+ - `node --test tests/commands/ai-analyze-project-provider.test.js tests/commands/ai-analyze-project-review.test.js`: passed.
51
+ - `node --test tests/lib/ai-analyze-project-docs.test.js tests/lib/ai-analyze-project-validation.test.js`: passed.
52
+ - `node --test tests/lib/ai-analyze-project-proposal.test.js`: passed.
53
+ - `node bin/create-quiver.js spec validate specs/quiver-v56-analyze-project-usable-doc-merge --strict`: passed.
54
+ - `git diff --check`: passed.
55
+
56
+ ## Rollback
57
+
58
+ Revert the PR.
59
+
60
+ ## Risks / Notes
61
+
62
+ Depends on Slice 01.
@@ -0,0 +1,80 @@
1
+ {
2
+ "slice_id": "slice-02-apply-integration-validation-contract",
3
+ "ticket": "QUIVER-56-02",
4
+ "type": "feature",
5
+ "title": "Apply Integration + Validation Contract",
6
+ "objective": "Integrate the merge engine across every analyze-project write path and validate visible output quality.",
7
+ "description": "Uses the shared merge engine in live auto-apply, --apply-docs, --save-proposal, --review, and apply --run paths; extends post-write validation for primary visible placeholders and exposes stable JSON merge metadata.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "v56-apply-integration-validation",
12
+ "branch_name": "feature/QUIVER-56-02-v56-apply-integration-validation"
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-docs.js",
18
+ "src/create-quiver/lib/ai/analyze-project-proposal.js",
19
+ "src/create-quiver/lib/ai/analyze-project-validation.js",
20
+ "tests/commands/ai-analyze-project*.test.js",
21
+ "tests/lib/ai-analyze-project-*.test.js",
22
+ "specs/quiver-v56-analyze-project-usable-doc-merge/**"
23
+ ],
24
+ "expected_read_paths": [
25
+ "src/create-quiver/commands/ai.js",
26
+ "src/create-quiver/lib/ai/analyze-project-apply.js",
27
+ "src/create-quiver/lib/ai/analyze-project-proposal.js",
28
+ "src/create-quiver/lib/ai/analyze-project-validation.js",
29
+ "specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-01-document-classification-merge-engine/CLOSURE_BRIEF.md"
30
+ ],
31
+ "allowed_write_paths": [
32
+ "src/create-quiver/commands/ai.js",
33
+ "src/create-quiver/lib/ai/analyze-project-apply.js",
34
+ "src/create-quiver/lib/ai/analyze-project-docs.js",
35
+ "src/create-quiver/lib/ai/analyze-project-proposal.js",
36
+ "src/create-quiver/lib/ai/analyze-project-validation.js",
37
+ "tests/commands/ai-analyze-project-provider.test.js",
38
+ "tests/commands/ai-analyze-project-review.test.js",
39
+ "tests/lib/ai-analyze-project-docs.test.js",
40
+ "tests/lib/ai-analyze-project-validation.test.js",
41
+ "specs/quiver-v56-analyze-project-usable-doc-merge/**"
42
+ ],
43
+ "depends_on": [
44
+ "slice-01-document-classification-merge-engine"
45
+ ],
46
+ "parallel_safe": "never",
47
+ "parallel_safe_reason": "All write paths must share the same merge engine; integrating before slice 01 is complete would duplicate logic.",
48
+ "must": [
49
+ "Use the same merge engine in live apply and apply --run.",
50
+ "Expose merge metadata in JSON apply reports without removing existing fields.",
51
+ "Make --save-proposal include merge-plan metadata or final diff preview.",
52
+ "Make --review show final post-merge diff.",
53
+ "Detect critical placeholders in primary visible content.",
54
+ "Make --strict fail when critical visible placeholders remain."
55
+ ],
56
+ "not_included": [
57
+ "Final docs/troubleshooting polish.",
58
+ "Live provider smoke against nika-erp.",
59
+ "Changing provider prompt semantics."
60
+ ],
61
+ "acceptance": [
62
+ "Live auto-apply and apply --run produce the same result with the same proposal.",
63
+ "--json includes merge strategy and warnings.",
64
+ "--strict fails on critical visible placeholders.",
65
+ "--save-proposal artifacts include enough merge metadata to preview the final write.",
66
+ "--review diff reflects the final post-merge write."
67
+ ],
68
+ "tests": [
69
+ "node --test tests/commands/ai-analyze-project-provider.test.js tests/commands/ai-analyze-project-review.test.js",
70
+ "node --test tests/lib/ai-analyze-project-docs.test.js tests/lib/ai-analyze-project-validation.test.js",
71
+ "node bin/create-quiver.js spec validate specs/quiver-v56-analyze-project-usable-doc-merge --strict",
72
+ "git diff --check"
73
+ ],
74
+ "estimated_hours": 6,
75
+ "actual_hours": 3,
76
+ "status": "completed",
77
+ "blocked_reason": null,
78
+ "started_at": "2026-06-17",
79
+ "completed_at": "2026-06-17"
80
+ }
@@ -0,0 +1,29 @@
1
+ # CLOSURE_BRIEF - slice-03 CLI UX + Docs + Real Fixture Smoke
2
+
3
+ ## Status
4
+
5
+ Completed.
6
+
7
+ ## Summary
8
+
9
+ Finished the user-facing hardening for analyze-project usable doc merges.
10
+
11
+ Key outcomes:
12
+
13
+ - Human apply/save/review output now includes compact `Merge decisions`.
14
+ - Troubleshooting explains how upgraded users recover docs that still show scaffold placeholders.
15
+ - Command reference documents the deterministic merge contract and audit manifests.
16
+ - CLI UX guide documents the merge feedback contract.
17
+ - Changelog records the user-visible behavior change and nika-erp style regression coverage.
18
+ - Deterministic provider test covers a nika-erp style `CONTEXTO.md` with visible placeholders, an old `quiver:context-prep` block, and `NIKA_ERP`/`stockflow`/`StockFlow` naming conflict signals.
19
+
20
+ ## Evidence
21
+
22
+ - `node --test tests/commands/ai-analyze-project-provider.test.js tests/commands/cli-contract.test.js`
23
+ - `npm run docs:check`
24
+ - `node bin/create-quiver.js spec validate specs/quiver-v56-analyze-project-usable-doc-merge --strict`
25
+ - `git diff --check`
26
+
27
+ ## Validation
28
+
29
+ Passed.
@@ -0,0 +1,32 @@
1
+ # EXECUTION_BRIEF - slice-03 CLI UX + Docs + Real Fixture Smoke
2
+
3
+ ## Context
4
+
5
+ Slice 03 depends on the integrated apply behavior from Slice 02 and focuses on user-facing output, docs, and regression evidence.
6
+
7
+ ## Objective
8
+
9
+ Finish the user-facing output, docs, and nika-erp regression coverage after Slice 02 integration.
10
+
11
+ ## Acceptance Criteria
12
+
13
+ - Output reports merge strategies and warnings.
14
+ - Docs/troubleshooting explain how to fix old placeholder-heavy docs.
15
+ - nika-erp style fixture proves final visible docs are usable.
16
+ - Name conflicts are reported.
17
+
18
+ ## Validation
19
+
20
+ ```bash
21
+ node --test tests/commands/ai-analyze-project-provider.test.js tests/commands/cli-contract.test.js
22
+ npm run docs:check
23
+ node bin/create-quiver.js spec validate specs/quiver-v56-analyze-project-usable-doc-merge --strict
24
+ git diff --check
25
+ ```
26
+
27
+ ## Completion Checklist
28
+
29
+ - Output copy is compact and actionable.
30
+ - Docs and troubleshooting are updated.
31
+ - Command reference is synchronized.
32
+ - nika-erp style fixture proves visible placeholders are removed.
@@ -0,0 +1,61 @@
1
+ ## Title
2
+
3
+ QUIVER-56-03 CLI docs real fixture smoke
4
+
5
+ ## Summary
6
+
7
+ Adds user-facing output, docs, and fixture smoke evidence for the usable doc merge behavior.
8
+
9
+ ## PR Policy
10
+
11
+ Individual PR required.
12
+
13
+ ## Scope
14
+
15
+ Slice 03 only.
16
+
17
+ ## Files
18
+
19
+ See `slice.json`.
20
+
21
+ ## How to Test (DETAILED - REQUIRED)
22
+
23
+ ### Required Environment
24
+
25
+ Node.js/npm.
26
+
27
+ ### Worktree Access
28
+
29
+ Use the slice branch.
30
+
31
+ ### Run the Project
32
+
33
+ No dev server required.
34
+
35
+ ### Use Cases
36
+
37
+ CLI output, docs, troubleshooting, deterministic nika-erp style fixture.
38
+
39
+ ### Technical Verification
40
+
41
+ ```bash
42
+ node --test tests/commands/ai-analyze-project-provider.test.js tests/commands/cli-contract.test.js
43
+ npm run docs:check
44
+ node bin/create-quiver.js spec validate specs/quiver-v56-analyze-project-usable-doc-merge --strict
45
+ git diff --check
46
+ ```
47
+
48
+ ## Evidence
49
+
50
+ - `node --test tests/commands/ai-analyze-project-provider.test.js tests/commands/cli-contract.test.js`: passed.
51
+ - `npm run docs:check`: passed.
52
+ - `node bin/create-quiver.js spec validate specs/quiver-v56-analyze-project-usable-doc-merge --strict`: passed.
53
+ - `git diff --check`: passed.
54
+
55
+ ## Rollback
56
+
57
+ Revert the PR.
58
+
59
+ ## Risks / Notes
60
+
61
+ Depends on Slice 02.
@@ -0,0 +1,79 @@
1
+ {
2
+ "slice_id": "slice-03-cli-docs-real-fixture-smoke",
3
+ "ticket": "QUIVER-56-03",
4
+ "type": "hardening",
5
+ "title": "CLI UX + Docs + Real Fixture Smoke",
6
+ "objective": "Make the new merge behavior understandable to users and prove the nika-erp regression is covered.",
7
+ "description": "Updates human output, docs, troubleshooting, changelog guidance, and deterministic nika-erp style fixture/smoke evidence.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "v56-cli-docs-real-fixture-smoke",
12
+ "branch_name": "feature/QUIVER-56-03-v56-cli-docs-real-fixture-smoke"
13
+ },
14
+ "files": [
15
+ "src/create-quiver/commands/ai.js",
16
+ "src/create-quiver/lib/i18n/messages/en.js",
17
+ "src/create-quiver/lib/i18n/messages/es.js",
18
+ "tests/commands/ai-analyze-project*.test.js",
19
+ "tests/fixtures/analyze-project/**",
20
+ "docs/CLI_UX_GUIDE.md",
21
+ "docs/TROUBLESHOOTING.md",
22
+ "docs/reference/commands.md",
23
+ "CHANGELOG.md",
24
+ "specs/quiver-v56-analyze-project-usable-doc-merge/**"
25
+ ],
26
+ "expected_read_paths": [
27
+ "specs/quiver-v56-analyze-project-usable-doc-merge/slices/slice-02-apply-integration-validation-contract/CLOSURE_BRIEF.md",
28
+ "docs/TROUBLESHOOTING.md",
29
+ "docs/reference/commands.md"
30
+ ],
31
+ "allowed_write_paths": [
32
+ "src/create-quiver/commands/ai.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-provider.test.js",
36
+ "tests/fixtures/analyze-project/**",
37
+ "docs/CLI_UX_GUIDE.md",
38
+ "docs/TROUBLESHOOTING.md",
39
+ "docs/reference/commands.md",
40
+ "CHANGELOG.md",
41
+ "specs/quiver-v56-analyze-project-usable-doc-merge/**"
42
+ ],
43
+ "depends_on": [
44
+ "slice-02-apply-integration-validation-contract"
45
+ ],
46
+ "parallel_safe": "after_dependencies",
47
+ "parallel_safe_reason": "Docs can draft after Slice 01, but final fixture smoke and output assertions depend on Slice 02.",
48
+ "must": [
49
+ "Human output reports replaced scaffold, preserved human content, placeholder counts, conflicts, snapshot, and manifest paths.",
50
+ "Troubleshooting explains re-running analyze-project after upgrading.",
51
+ "Docs explain the merge contract without overpromising.",
52
+ "Deterministic fixture covers NIKA_ERP scaffold plus stockflow/StockFlow conflict and old context-prep block.",
53
+ "Evidence proves final CONTEXTO.md has no critical visible placeholders."
54
+ ],
55
+ "not_included": [
56
+ "Provider prompt redesign.",
57
+ "Publishing npm.",
58
+ "Product repository changes."
59
+ ],
60
+ "acceptance": [
61
+ "CLI output is compact and actionable.",
62
+ "Docs and command reference are synchronized.",
63
+ "nika-erp style fixture passes without visible scaffold placeholders.",
64
+ "Name conflict warning is visible.",
65
+ "Release smoke guidance is updated."
66
+ ],
67
+ "tests": [
68
+ "node --test tests/commands/ai-analyze-project-provider.test.js tests/commands/cli-contract.test.js",
69
+ "npm run docs:check",
70
+ "node bin/create-quiver.js spec validate specs/quiver-v56-analyze-project-usable-doc-merge --strict",
71
+ "git diff --check"
72
+ ],
73
+ "estimated_hours": 4,
74
+ "actual_hours": 3,
75
+ "status": "completed",
76
+ "blocked_reason": null,
77
+ "started_at": "2026-06-17",
78
+ "completed_at": "2026-06-17"
79
+ }
@@ -528,6 +528,7 @@ function summarizeAnalyzeProjectWritePlan(writePlan = []) {
528
528
  before_sha256: item.before_sha256,
529
529
  after_sha256: item.after_sha256,
530
530
  reason: item.reason,
531
+ merge_report: item.merge_report,
531
532
  }));
532
533
  }
533
534
 
@@ -545,14 +546,46 @@ function formatAnalyzeProjectSavedProposalReport(report = {}) {
545
546
  `Proposal summary: ${artifacts.proposal_markdown || 'none'}`,
546
547
  `Proposal diff: ${artifacts.proposal_diff || 'none'}`,
547
548
  `Manifest: ${artifacts.manifest || 'none'}`,
549
+ ];
550
+ lines.push(...formatAnalyzeProjectMergeSummary(report.write_plan));
551
+ lines.push(
548
552
  '',
549
553
  'Next commands:',
550
554
  `- npx create-quiver ai analyze-project apply --run ${report.run_id || '<run-id>'}`,
551
555
  '- npx create-quiver ai analyze-project --deep --apply-docs --provider <provider> --model <model>',
552
- ];
556
+ );
553
557
  return `${lines.join('\n')}\n`;
554
558
  }
555
559
 
560
+ function formatAnalyzeProjectMergeSummary(writePlan = []) {
561
+ const changed = (Array.isArray(writePlan) ? writePlan : []).filter((item) => item.action !== 'skip');
562
+ if (changed.length === 0) {
563
+ return [];
564
+ }
565
+
566
+ const lines = ['', 'Merge decisions:'];
567
+ for (const item of changed.slice(0, 10)) {
568
+ const merge = item.merge_report || {};
569
+ const details = [
570
+ merge.classification ? `class=${merge.classification}` : '',
571
+ merge.scaffold_replaced ? 'scaffold replaced' : '',
572
+ merge.human_content_preserved ? 'human preserved' : '',
573
+ merge.context_prep_removed ? 'context-prep removed' : '',
574
+ Array.isArray(merge.critical_placeholders) && merge.critical_placeholders.length > 0
575
+ ? `placeholders=${merge.critical_placeholders.length}`
576
+ : '',
577
+ ].filter(Boolean);
578
+ lines.push(`- ${item.path}: ${merge.strategy || 'unknown'}${details.length > 0 ? ` (${details.join(', ')})` : ''}`);
579
+ for (const warning of Array.isArray(merge.warnings) ? merge.warnings.slice(0, 2) : []) {
580
+ lines.push(` warning: ${warning}`);
581
+ }
582
+ }
583
+ if (changed.length > 10) {
584
+ lines.push(`- ... ${changed.length - 10} more doc merge decision${changed.length - 10 === 1 ? '' : 's'}`);
585
+ }
586
+ return lines;
587
+ }
588
+
556
589
  function formatAnalyzeProjectPostWriteValidation(validation) {
557
590
  if (!validation) {
558
591
  return [];
@@ -592,6 +625,7 @@ function formatAnalyzeProjectReviewPlan({ writePlan, reviewPath, snapshot, writt
592
625
  for (const item of writePlan || []) {
593
626
  lines.push(`- ${item.path}: ${item.action}${item.reason ? ` (${item.reason})` : ''}`);
594
627
  }
628
+ lines.push(...formatAnalyzeProjectMergeSummary(writePlan));
595
629
  lines.push('', 'Final diff:');
596
630
  lines.push(...formatAnalyzeProjectDiffPreview(writePlan || []));
597
631
  lines.push('', 'Confirmation required before writing.');
@@ -617,6 +651,7 @@ function formatAnalyzeProjectApplyReport(report = {}) {
617
651
  `Proposal manifest: ${artifacts.manifest || 'none'}`,
618
652
  `Write manifest: ${writeManifest.path || 'none'}`,
619
653
  ].filter(Boolean);
654
+ lines.push(...formatAnalyzeProjectMergeSummary(report.write_plan));
620
655
  lines.push(...formatAnalyzeProjectPostWriteValidation(report.post_write_validation));
621
656
  return `${lines.join('\n')}\n`;
622
657
  }