create-quiver 0.15.1 → 0.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/.github/workflows/ci.yml +3 -0
  2. package/README.md +3 -0
  3. package/README_FOR_AI.md +11 -7
  4. package/docs/CLI_UX_GUIDE.md +16 -2
  5. package/docs/COMMANDS.md.template +16 -4
  6. package/docs/INDEX.md +87 -0
  7. package/docs/WORKFLOW.md.template +4 -4
  8. package/docs/reference/commands.md +23 -5
  9. package/package.json +3 -1
  10. package/specs/quiver-v33-approval-ux-and-planner-progress/EVIDENCE_REPORT.md +93 -0
  11. package/specs/quiver-v33-approval-ux-and-planner-progress/EXECUTION_PLAN.md +83 -0
  12. package/specs/quiver-v33-approval-ux-and-planner-progress/SPEC.md +158 -0
  13. package/specs/quiver-v33-approval-ux-and-planner-progress/STATUS.md +31 -0
  14. package/specs/quiver-v33-approval-ux-and-planner-progress/pr.md +109 -0
  15. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-00-approval-ux-foundation/CLOSURE_BRIEF.md +30 -0
  16. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-00-approval-ux-foundation/EXECUTION_BRIEF.md +56 -0
  17. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-00-approval-ux-foundation/slice.json +65 -0
  18. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-01-approval-candidates-model/CLOSURE_BRIEF.md +19 -0
  19. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-01-approval-candidates-model/EXECUTION_BRIEF.md +51 -0
  20. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-01-approval-candidates-model/slice.json +74 -0
  21. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-02-approve-interactive-selection/CLOSURE_BRIEF.md +20 -0
  22. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-02-approve-interactive-selection/EXECUTION_BRIEF.md +53 -0
  23. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-02-approve-interactive-selection/slice.json +79 -0
  24. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-03-technical-plan-review-decision-data/CLOSURE_BRIEF.md +19 -0
  25. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-03-technical-plan-review-decision-data/EXECUTION_BRIEF.md +50 -0
  26. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-03-technical-plan-review-decision-data/slice.json +75 -0
  27. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-04-revise-input-guardrails/CLOSURE_BRIEF.md +19 -0
  28. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-04-revise-input-guardrails/EXECUTION_BRIEF.md +51 -0
  29. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-04-revise-input-guardrails/slice.json +73 -0
  30. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-05-provider-progress-alignment/CLOSURE_BRIEF.md +20 -0
  31. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-05-provider-progress-alignment/EXECUTION_BRIEF.md +51 -0
  32. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-05-provider-progress-alignment/slice.json +91 -0
  33. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-06-workflow-surface-integration/CLOSURE_BRIEF.md +20 -0
  34. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-06-workflow-surface-integration/EXECUTION_BRIEF.md +53 -0
  35. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-06-workflow-surface-integration/slice.json +87 -0
  36. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-07-docs-tests-release-readiness/CLOSURE_BRIEF.md +21 -0
  37. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-07-docs-tests-release-readiness/EXECUTION_BRIEF.md +55 -0
  38. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-07-docs-tests-release-readiness/slice.json +97 -0
  39. package/specs/quiver-v34-cli-dashboard-status/EVIDENCE_REPORT.md +119 -0
  40. package/specs/quiver-v34-cli-dashboard-status/EXECUTION_PLAN.md +77 -0
  41. package/specs/quiver-v34-cli-dashboard-status/SPEC.md +152 -0
  42. package/specs/quiver-v34-cli-dashboard-status/STATUS.md +29 -0
  43. package/specs/quiver-v34-cli-dashboard-status/pr.md +99 -0
  44. package/specs/quiver-v34-cli-dashboard-status/slices/slice-00-dashboard-foundation/CLOSURE_BRIEF.md +19 -0
  45. package/specs/quiver-v34-cli-dashboard-status/slices/slice-00-dashboard-foundation/EXECUTION_BRIEF.md +49 -0
  46. package/specs/quiver-v34-cli-dashboard-status/slices/slice-00-dashboard-foundation/slice.json +68 -0
  47. package/specs/quiver-v34-cli-dashboard-status/slices/slice-01-dashboard-report-contract/CLOSURE_BRIEF.md +19 -0
  48. package/specs/quiver-v34-cli-dashboard-status/slices/slice-01-dashboard-report-contract/EXECUTION_BRIEF.md +53 -0
  49. package/specs/quiver-v34-cli-dashboard-status/slices/slice-01-dashboard-report-contract/slice.json +78 -0
  50. package/specs/quiver-v34-cli-dashboard-status/slices/slice-02-dashboard-command-rendering/CLOSURE_BRIEF.md +19 -0
  51. package/specs/quiver-v34-cli-dashboard-status/slices/slice-02-dashboard-command-rendering/EXECUTION_BRIEF.md +53 -0
  52. package/specs/quiver-v34-cli-dashboard-status/slices/slice-02-dashboard-command-rendering/slice.json +82 -0
  53. package/specs/quiver-v34-cli-dashboard-status/slices/slice-03-dashboard-edge-cases-and-guardrails/CLOSURE_BRIEF.md +19 -0
  54. package/specs/quiver-v34-cli-dashboard-status/slices/slice-03-dashboard-edge-cases-and-guardrails/EXECUTION_BRIEF.md +54 -0
  55. package/specs/quiver-v34-cli-dashboard-status/slices/slice-03-dashboard-edge-cases-and-guardrails/slice.json +77 -0
  56. package/specs/quiver-v34-cli-dashboard-status/slices/slice-04-docs-templates-and-scripts/CLOSURE_BRIEF.md +19 -0
  57. package/specs/quiver-v34-cli-dashboard-status/slices/slice-04-docs-templates-and-scripts/EXECUTION_BRIEF.md +54 -0
  58. package/specs/quiver-v34-cli-dashboard-status/slices/slice-04-docs-templates-and-scripts/slice.json +88 -0
  59. package/specs/quiver-v34-cli-dashboard-status/slices/slice-05-tests-smokes-release-readiness/CLOSURE_BRIEF.md +26 -0
  60. package/specs/quiver-v34-cli-dashboard-status/slices/slice-05-tests-smokes-release-readiness/EXECUTION_BRIEF.md +57 -0
  61. package/specs/quiver-v34-cli-dashboard-status/slices/slice-05-tests-smokes-release-readiness/slice.json +85 -0
  62. package/specs/quiver-v35-compact-dashboard-version-ux/EVIDENCE_REPORT.md +43 -0
  63. package/specs/quiver-v35-compact-dashboard-version-ux/EXECUTION_PLAN.md +85 -0
  64. package/specs/quiver-v35-compact-dashboard-version-ux/SPEC.md +147 -0
  65. package/specs/quiver-v35-compact-dashboard-version-ux/STATUS.md +33 -0
  66. package/specs/quiver-v35-compact-dashboard-version-ux/pr.md +106 -0
  67. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-00-foundation-and-doc-router/CLOSURE_BRIEF.md +19 -0
  68. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-00-foundation-and-doc-router/EXECUTION_BRIEF.md +38 -0
  69. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-00-foundation-and-doc-router/slice.json +64 -0
  70. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-01-dashboard-cli-contract/CLOSURE_BRIEF.md +19 -0
  71. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-01-dashboard-cli-contract/EXECUTION_BRIEF.md +49 -0
  72. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-01-dashboard-cli-contract/slice.json +80 -0
  73. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-02-dashboard-compact-renderer/CLOSURE_BRIEF.md +19 -0
  74. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-02-dashboard-compact-renderer/EXECUTION_BRIEF.md +48 -0
  75. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-02-dashboard-compact-renderer/slice.json +73 -0
  76. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-03-dashboard-details-sections/CLOSURE_BRIEF.md +19 -0
  77. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-03-dashboard-details-sections/EXECUTION_BRIEF.md +48 -0
  78. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-03-dashboard-details-sections/slice.json +72 -0
  79. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-04-version-command/CLOSURE_BRIEF.md +19 -0
  80. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-04-version-command/EXECUTION_BRIEF.md +49 -0
  81. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-04-version-command/slice.json +82 -0
  82. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-05-docs-help-generated-guidance/CLOSURE_BRIEF.md +19 -0
  83. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-05-docs-help-generated-guidance/EXECUTION_BRIEF.md +50 -0
  84. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-05-docs-help-generated-guidance/slice.json +90 -0
  85. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-06-tests-smokes-release-readiness/CLOSURE_BRIEF.md +21 -0
  86. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-06-tests-smokes-release-readiness/EXECUTION_BRIEF.md +51 -0
  87. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-06-tests-smokes-release-readiness/slice.json +85 -0
  88. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-07-package-and-cross-platform-smoke/CLOSURE_BRIEF.md +20 -0
  89. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-07-package-and-cross-platform-smoke/EXECUTION_BRIEF.md +49 -0
  90. package/specs/quiver-v35-compact-dashboard-version-ux/slices/slice-07-package-and-cross-platform-smoke/slice.json +79 -0
  91. package/specs/quiver-v36-ai-run-watch-portable/EVIDENCE_REPORT.md +33 -0
  92. package/specs/quiver-v36-ai-run-watch-portable/EXECUTION_PLAN.md +39 -0
  93. package/specs/quiver-v36-ai-run-watch-portable/SPEC.md +166 -0
  94. package/specs/quiver-v36-ai-run-watch-portable/STATUS.md +31 -0
  95. package/specs/quiver-v36-ai-run-watch-portable/pr.md +78 -0
  96. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-00-foundation-and-handoffs/CLOSURE_BRIEF.md +19 -0
  97. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-00-foundation-and-handoffs/EXECUTION_BRIEF.md +43 -0
  98. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-00-foundation-and-handoffs/slice.json +61 -0
  99. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-01-run-schema-path-safety/CLOSURE_BRIEF.md +18 -0
  100. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-01-run-schema-path-safety/EXECUTION_BRIEF.md +43 -0
  101. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-01-run-schema-path-safety/slice.json +65 -0
  102. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-02-event-writer-redacted-logs/CLOSURE_BRIEF.md +18 -0
  103. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-02-event-writer-redacted-logs/EXECUTION_BRIEF.md +43 -0
  104. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-02-event-writer-redacted-logs/slice.json +66 -0
  105. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-03-provider-streaming-integration/CLOSURE_BRIEF.md +18 -0
  106. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-03-provider-streaming-integration/EXECUTION_BRIEF.md +41 -0
  107. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-03-provider-streaming-integration/slice.json +71 -0
  108. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-04-ai-run-watch-command/CLOSURE_BRIEF.md +18 -0
  109. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-04-ai-run-watch-command/EXECUTION_BRIEF.md +44 -0
  110. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-04-ai-run-watch-command/slice.json +73 -0
  111. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-05-main-progress-user-guidance/CLOSURE_BRIEF.md +18 -0
  112. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-05-main-progress-user-guidance/EXECUTION_BRIEF.md +44 -0
  113. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-05-main-progress-user-guidance/slice.json +71 -0
  114. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-06-docs-generated-guidance/CLOSURE_BRIEF.md +19 -0
  115. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-06-docs-generated-guidance/EXECUTION_BRIEF.md +45 -0
  116. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-06-docs-generated-guidance/slice.json +77 -0
  117. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-07-tests-cross-platform-readiness/CLOSURE_BRIEF.md +22 -0
  118. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-07-tests-cross-platform-readiness/EXECUTION_BRIEF.md +46 -0
  119. package/specs/quiver-v36-ai-run-watch-portable/slices/slice-07-tests-cross-platform-readiness/slice.json +87 -0
  120. package/src/create-quiver/commands/ai.js +112 -12
  121. package/src/create-quiver/commands/dashboard.js +31 -0
  122. package/src/create-quiver/commands/flow.js +74 -12
  123. package/src/create-quiver/commands/spec.js +8 -1
  124. package/src/create-quiver/index.js +107 -4
  125. package/src/create-quiver/lib/ai/approval-candidates.js +86 -0
  126. package/src/create-quiver/lib/ai/plan-review.js +77 -1
  127. package/src/create-quiver/lib/ai/run-state.js +21 -4
  128. package/src/create-quiver/lib/approvals.js +103 -0
  129. package/src/create-quiver/lib/cli/ux-flags.js +6 -0
  130. package/src/create-quiver/lib/dashboard.js +896 -0
  131. package/src/create-quiver/lib/git.js +13 -4
  132. package/src/create-quiver/lib/init-docs.js +6 -0
  133. package/src/create-quiver/lib/init-layout.js +2 -0
  134. package/src/create-quiver/lib/paths.js +45 -3
  135. package/src/create-quiver/lib/project-state-resolver.js +22 -2
  136. package/src/create-quiver/lib/version.js +157 -0
@@ -1,6 +1,7 @@
1
1
  const fs = require('node:fs');
2
2
  const path = require('node:path');
3
3
 
4
+ const { redactSecrets, truncateText } = require('./evidence');
4
5
  const { quiverInternalPaths } = require('./init-layout');
5
6
 
6
7
  const PLANNER_APPROVAL_PHASES = Object.freeze(['acceptance', 'technical-plan']);
@@ -185,6 +186,107 @@ function renderApprovalStatus(report) {
185
186
  return `approved ${report.phase}`;
186
187
  }
187
188
 
189
+ function safePreview(text, maxLength = 180) {
190
+ const firstLines = String(text || '')
191
+ .split(/\r?\n/)
192
+ .map((line) => line.trim())
193
+ .filter(Boolean)
194
+ .slice(0, 3)
195
+ .join(' ');
196
+ const truncated = truncateText(redactSecrets(firstLines), maxLength);
197
+ return {
198
+ text: truncated.text.replace(/\s+/g, ' ').trim(),
199
+ truncated: truncated.truncated,
200
+ };
201
+ }
202
+
203
+ function readCandidatePreview(projectRoot, draft) {
204
+ const draftPath = draft?.path || '';
205
+ if (!draftPath) {
206
+ return safePreview('');
207
+ }
208
+ const resolved = path.resolve(projectRoot, draftPath);
209
+ if (!fs.existsSync(resolved)) {
210
+ return {
211
+ text: '(missing draft artifact)',
212
+ truncated: false,
213
+ };
214
+ }
215
+ return safePreview(fs.readFileSync(resolved, 'utf8'));
216
+ }
217
+
218
+ function buildApprovalCandidate(projectRoot, phase, draft, latestVersion, report) {
219
+ const version = Number(draft.version || 0) || null;
220
+ const isLatest = Boolean(version && latestVersion && version === latestVersion);
221
+ const artifactExists = Boolean(draft.path && fs.existsSync(path.resolve(projectRoot, draft.path)));
222
+ const preview = readCandidatePreview(projectRoot, draft);
223
+ const approvable = isLatest && artifactExists && (report.status === 'draft' || report.status === 'stale' || report.status === 'approved');
224
+ const nextCommand = version
225
+ ? `npx create-quiver ai approve --phase ${phase} --version ${version}`
226
+ : `npx create-quiver ai approve --phase ${phase} --version <n>`;
227
+
228
+ return {
229
+ phase,
230
+ version,
231
+ label: version ? `v${version}` : 'unknown version',
232
+ path: draft.path || '',
233
+ source_file: draft.source_file || '',
234
+ created_at: draft.created_at || '',
235
+ raw_artifact_path: draft.raw_artifact_path || null,
236
+ output_source: draft.output_source || null,
237
+ input_compaction: draft.input_compaction || null,
238
+ current: isLatest,
239
+ latest: isLatest,
240
+ recommended: approvable,
241
+ approvable,
242
+ blocked: !approvable,
243
+ status: approvable ? 'approvable' : isLatest ? 'blocked' : 'history',
244
+ reason: approvable
245
+ ? 'latest draft is eligible for approval'
246
+ : isLatest
247
+ ? 'latest draft artifact is missing or not eligible'
248
+ : `not current; latest draft version is ${latestVersion || 'unknown'}`,
249
+ preview: preview.text,
250
+ preview_truncated: preview.truncated,
251
+ next_command: nextCommand,
252
+ recommended_action: approvable ? 'approve' : 'inspect',
253
+ review: null,
254
+ };
255
+ }
256
+
257
+ function buildPlannerApprovalCandidates(projectRoot, phase) {
258
+ const normalizedPhase = normalizePhase(phase);
259
+ if (!PLANNER_APPROVAL_PHASES.includes(normalizedPhase)) {
260
+ throw new Error(formatError(`approval candidates are only supported for planner phases: ${PLANNER_APPROVAL_PHASES.join(', ')}`));
261
+ }
262
+
263
+ const report = readPhaseApproval(projectRoot, normalizedPhase);
264
+ const drafts = normalizeDrafts(report.meta);
265
+ const latestVersion = latestDraftVersion(report.meta);
266
+ const candidates = drafts.map((draft) => buildApprovalCandidate(projectRoot, normalizedPhase, draft, latestVersion, report));
267
+ const current = candidates.find((candidate) => candidate.current) || null;
268
+ const recommended = candidates.find((candidate) => candidate.recommended) || null;
269
+
270
+ return {
271
+ phase: normalizedPhase,
272
+ approval_status: report.status,
273
+ latest_version: latestVersion,
274
+ current,
275
+ recommended,
276
+ candidates,
277
+ history: candidates.filter((candidate) => !candidate.current),
278
+ approved: report.approved
279
+ ? {
280
+ path: report.approved.path,
281
+ version: Number(report.meta?.approved?.version || 0) || null,
282
+ source_file: report.meta?.approved?.source_file || '',
283
+ approved_at: report.meta?.approved?.approved_at || '',
284
+ }
285
+ : null,
286
+ next_command: recommended?.next_command || `npx create-quiver ai plan --phase ${normalizedPhase}${normalizedPhase === 'acceptance' ? ' --input <requirements.md>' : ''} --dry-run`,
287
+ };
288
+ }
289
+
188
290
  function writeApprovalArtifacts(projectRoot, phase, kind, sourceFile, contents, options = {}) {
189
291
  const normalizedPhase = normalizePhase(phase);
190
292
  const root = approvalRoot(projectRoot, normalizedPhase);
@@ -372,6 +474,7 @@ module.exports = {
372
474
  approvePlannerPhase,
373
475
  findDraftVersion,
374
476
  latestDraftVersion,
477
+ buildPlannerApprovalCandidates,
375
478
  normalizePhase,
376
479
  readPhaseApproval,
377
480
  renderApprovalStatus,
@@ -47,6 +47,12 @@ const UX_FLAG_MATRIX = Object.freeze({
47
47
  review: false,
48
48
  note: 'execution strategy confirmation and future selectors',
49
49
  }),
50
+ dashboard: Object.freeze({
51
+ withPlanner: false,
52
+ interactive: false,
53
+ review: false,
54
+ note: 'read-only consolidated project status',
55
+ }),
50
56
  });
51
57
 
52
58
  function formatError(message) {