create-quiver 0.14.0 → 0.15.0
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 +27 -0
- package/README.md +187 -518
- package/README_FOR_AI.md +39 -27
- package/ROADMAP.md +11 -0
- package/assets/quiver-wordmark.svg +22 -0
- package/docs/AI_CONTEXT.md.template +2 -0
- package/docs/AI_ONBOARDING_PROMPT.md.template +9 -1
- package/docs/CLI_UX_GUIDE.md +185 -0
- package/docs/COMMANDS.md.template +22 -3
- package/docs/GITFLOW_PR_GUIDE.md +70 -0
- package/docs/getting-started/linux.md +84 -0
- package/docs/getting-started/macos.md +85 -0
- package/docs/getting-started/windows-git-bash-wsl.md +78 -0
- package/docs/getting-started/windows-powershell.md +96 -0
- package/docs/reference/commands.md +98 -0
- package/docs/workflows/existing-project.md +131 -0
- package/docs/workflows/full-ai-spec-to-pr.md +311 -0
- package/docs/workflows/legacy-quiver-project.md +102 -0
- package/docs/workflows/new-project.md +76 -0
- package/package.json +5 -1
- package/specs/quiver-v29-planner-prepare-context-cli-ux/EVIDENCE_REPORT.md +163 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/EXECUTION_PLAN.md +72 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/SPEC.md +173 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/STATUS.md +34 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/pr.md +95 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-00-cli-ux-spec-foundation/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-00-cli-ux-spec-foundation/EXECUTION_BRIEF.md +45 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-00-cli-ux-spec-foundation/slice.json +58 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-01-cli-ux-primitives-theme/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-01-cli-ux-primitives-theme/EXECUTION_BRIEF.md +49 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-01-cli-ux-primitives-theme/slice.json +75 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-02-planner-context-proposal-contract/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-02-planner-context-proposal-contract/EXECUTION_BRIEF.md +47 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-02-planner-context-proposal-contract/slice.json +71 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-03-prepare-context-planner-review-flow/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-03-prepare-context-planner-review-flow/EXECUTION_BRIEF.md +52 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-03-prepare-context-planner-review-flow/slice.json +82 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-04-ux-flag-matrix-compatibility/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-04-ux-flag-matrix-compatibility/EXECUTION_BRIEF.md +46 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-04-ux-flag-matrix-compatibility/slice.json +73 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-05-progressive-command-adoption/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-05-progressive-command-adoption/EXECUTION_BRIEF.md +46 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-05-progressive-command-adoption/slice.json +83 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-06-docs-tests-smoke-readiness/CLOSURE_BRIEF.md +31 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-06-docs-tests-smoke-readiness/EXECUTION_BRIEF.md +50 -0
- package/specs/quiver-v29-planner-prepare-context-cli-ux/slices/slice-06-docs-tests-smoke-readiness/slice.json +95 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/EVIDENCE_REPORT.md +213 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/EXECUTION_PLAN.md +85 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/SPEC.md +213 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/STATUS.md +31 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/pr.md +103 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +56 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-00-spec-foundation/slice.json +71 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-01-cli-ux-runtime-progress-engine/CLOSURE_BRIEF.md +31 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-01-cli-ux-runtime-progress-engine/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-01-cli-ux-runtime-progress-engine/slice.json +69 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-02-agent-profile-selection-selectors/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-02-agent-profile-selection-selectors/EXECUTION_BRIEF.md +56 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-02-agent-profile-selection-selectors/slice.json +81 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-03-provider-model-selection-contract/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-03-provider-model-selection-contract/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-03-provider-model-selection-contract/slice.json +75 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-04-planner-ia-progress-flows/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-04-planner-ia-progress-flows/EXECUTION_BRIEF.md +57 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-04-planner-ia-progress-flows/slice.json +85 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-05-executor-pr-progress-flows/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-05-executor-pr-progress-flows/EXECUTION_BRIEF.md +57 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-05-executor-pr-progress-flows/slice.json +85 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-06-doctor-visual-json-contract/CLOSURE_BRIEF.md +35 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-06-doctor-visual-json-contract/EXECUTION_BRIEF.md +55 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-06-doctor-visual-json-contract/slice.json +81 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-07-interactive-init-spec-create/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-07-interactive-init-spec-create/EXECUTION_BRIEF.md +55 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-07-interactive-init-spec-create/slice.json +85 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-08-tests-docs-cross-platform-release/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-08-tests-docs-cross-platform-release/EXECUTION_BRIEF.md +59 -0
- package/specs/quiver-v30-interactive-cli-ux-agent-selection/slices/slice-08-tests-docs-cross-platform-release/slice.json +95 -0
- package/src/create-quiver/commands/ai.js +809 -71
- package/src/create-quiver/commands/spec.js +167 -5
- package/src/create-quiver/index.js +582 -71
- package/src/create-quiver/lib/agent-profiles.js +111 -10
- package/src/create-quiver/lib/ai/context-proposal.js +389 -0
- package/src/create-quiver/lib/ai/context-proposal.schema.js +31 -0
- package/src/create-quiver/lib/ai/execution-plan.js +106 -8
- package/src/create-quiver/lib/ai/executor.js +284 -28
- package/src/create-quiver/lib/ai/providers.js +71 -1
- package/src/create-quiver/lib/cli/editor.js +118 -0
- package/src/create-quiver/lib/cli/selectors.js +107 -0
- package/src/create-quiver/lib/cli/theme.js +103 -0
- package/src/create-quiver/lib/cli/ux-flags.js +169 -0
- package/src/create-quiver/lib/cli/ux.js +225 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Execution Plan - Quiver v29 Planner Prepare Context CLI UX
|
|
2
|
+
|
|
3
|
+
## Execution Order
|
|
4
|
+
|
|
5
|
+
```mermaid
|
|
6
|
+
flowchart TD
|
|
7
|
+
S00[slice-00: CLI UX spec foundation]
|
|
8
|
+
S01[slice-01: CLI UX primitives, theme, and dependencies]
|
|
9
|
+
S02[slice-02: Planner context proposal contract]
|
|
10
|
+
S03[slice-03: Planner-assisted prepare-context review flow]
|
|
11
|
+
S04[slice-04: UX flag matrix and compatibility guardrails]
|
|
12
|
+
S05[slice-05: Progressive command adoption]
|
|
13
|
+
S06[slice-06: Docs, tests, smoke, and release readiness]
|
|
14
|
+
|
|
15
|
+
S00 --> S01
|
|
16
|
+
S01 --> S02
|
|
17
|
+
S01 --> S04
|
|
18
|
+
S02 --> S03
|
|
19
|
+
S04 --> S03
|
|
20
|
+
S03 --> S05
|
|
21
|
+
S04 --> S05
|
|
22
|
+
S02 --> S06
|
|
23
|
+
S03 --> S06
|
|
24
|
+
S04 --> S06
|
|
25
|
+
S05 --> S06
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Waves
|
|
29
|
+
|
|
30
|
+
### Wave 0 - Sequential
|
|
31
|
+
|
|
32
|
+
1. `slice-00-cli-ux-spec-foundation`
|
|
33
|
+
|
|
34
|
+
This slice must run first. It establishes the approved UX standard, command/flag matrix, and documentation contract.
|
|
35
|
+
|
|
36
|
+
### Wave 1 - Sequential
|
|
37
|
+
|
|
38
|
+
1. `slice-01-cli-ux-primitives-theme`
|
|
39
|
+
|
|
40
|
+
This slice adds shared UX infrastructure and dependencies. Other implementation slices depend on this common layer.
|
|
41
|
+
|
|
42
|
+
### Wave 2 - Parallel after slice-01
|
|
43
|
+
|
|
44
|
+
- `slice-02-planner-context-proposal-contract`
|
|
45
|
+
- `slice-04-ux-flag-matrix-compatibility`
|
|
46
|
+
|
|
47
|
+
These can run in parallel if their write scopes stay separated: proposal validation under AI libs, flag/output guardrails under CLI parsing and UX helpers.
|
|
48
|
+
|
|
49
|
+
### Wave 3 - Sequential
|
|
50
|
+
|
|
51
|
+
1. `slice-03-prepare-context-planner-review-flow`
|
|
52
|
+
|
|
53
|
+
This slice depends on the proposal contract and UX compatibility rules.
|
|
54
|
+
|
|
55
|
+
### Wave 4 - Sequential
|
|
56
|
+
|
|
57
|
+
1. `slice-05-progressive-command-adoption`
|
|
58
|
+
|
|
59
|
+
This slice applies the standard to selected commands after `ai prepare-context` proves the pattern.
|
|
60
|
+
|
|
61
|
+
### Wave 5 - Sequential close
|
|
62
|
+
|
|
63
|
+
1. `slice-06-docs-tests-smoke-readiness`
|
|
64
|
+
|
|
65
|
+
This slice closes docs, generated templates, validation coverage, package smoke, and release readiness.
|
|
66
|
+
|
|
67
|
+
## Parallel Safety Notes
|
|
68
|
+
|
|
69
|
+
- Do not run `slice-03` before `slice-02` and `slice-04` are complete.
|
|
70
|
+
- Do not run `slice-05` before `slice-03`; progressive adoption should reuse the proven prepare-context pattern.
|
|
71
|
+
- `slice-06` is never parallel-safe because it validates all previous slices and updates final documentation.
|
|
72
|
+
- If `slice-02` or `slice-04` both need to modify central CLI parsing, run `slice-04` first, then rebase `slice-02`.
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Quiver v29 - Planner-Assisted Prepare Context and CLI UX Standard
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-05-26
|
|
4
|
+
**Status:** Planned
|
|
5
|
+
**Source:** User-approved requirement to improve `ai prepare-context` with optional planner IA and standardize CLI UX across Quiver.
|
|
6
|
+
|
|
7
|
+
Slice numbering resets here. This spec intentionally starts at `slice-00`.
|
|
8
|
+
|
|
9
|
+
## Problem
|
|
10
|
+
|
|
11
|
+
`npx create-quiver ai prepare-context` is currently safe and deterministic: it prepares docs-only context using templates and project signals. That behavior must remain, but Quiver also needs an explicit planner-assisted mode where a configured planner IA can analyze project context and propose richer onboarding documentation.
|
|
12
|
+
|
|
13
|
+
At the same time, Quiver's CLI UX has grown command by command. It needs a shared standard for loaders, prompts, visual hierarchy, review flows, flags, color usage, non-interactive execution, CI, `--json`, agents, and errors. Without a standard, each new AI command risks solving UX differently.
|
|
14
|
+
|
|
15
|
+
## Objective
|
|
16
|
+
|
|
17
|
+
Create a CLI UX standard for Quiver and implement the first high-value application of it:
|
|
18
|
+
|
|
19
|
+
- keep `ai prepare-context` deterministic by default;
|
|
20
|
+
- add explicit planner-assisted preparation;
|
|
21
|
+
- add safe interactive/review flows;
|
|
22
|
+
- validate planner output before writes;
|
|
23
|
+
- standardize output modes, colors, prompts, loaders, and flags;
|
|
24
|
+
- apply the standard progressively to selected commands.
|
|
25
|
+
|
|
26
|
+
## Scope
|
|
27
|
+
|
|
28
|
+
### Included
|
|
29
|
+
|
|
30
|
+
- UX standard documentation for Quiver CLI commands.
|
|
31
|
+
- Shared CLI UX/theme/editor helpers.
|
|
32
|
+
- Quiver color tokens for human-mode output.
|
|
33
|
+
- Optional `--with-planner` mode for `ai prepare-context`.
|
|
34
|
+
- Optional `--interactive` and `--review` flows where they add value.
|
|
35
|
+
- `--print-prompt`, `--dry-run`, `--json`, CI, no-TTY, no-color compatibility.
|
|
36
|
+
- Planner proposal contract validated with a structured schema.
|
|
37
|
+
- Docs-only allowlist for context writes.
|
|
38
|
+
- `$EDITOR` review before applying AI-generated documentation.
|
|
39
|
+
- Progressive adoption plan for `ai plan`, `spec create`, and `ai pr`.
|
|
40
|
+
- Tests, fixtures, documentation, and package smoke readiness.
|
|
41
|
+
|
|
42
|
+
### Excluded
|
|
43
|
+
|
|
44
|
+
- Replacing the whole CLI parser with `commander`, `yargs`, or `oclif`.
|
|
45
|
+
- Adding terminal dashboards with `ink`, `blessed`, or `neo-blessed`.
|
|
46
|
+
- Adding image output protocols.
|
|
47
|
+
- Migrating tests from `node:test` to `vitest`.
|
|
48
|
+
- Storing provider credentials.
|
|
49
|
+
- Allowing planner IA to modify product code.
|
|
50
|
+
- Making interactive prompts mandatory.
|
|
51
|
+
|
|
52
|
+
## Approved Acceptance Criteria
|
|
53
|
+
|
|
54
|
+
### Prepare-context modes
|
|
55
|
+
|
|
56
|
+
1. Given a project with Quiver initialized, when `npx create-quiver ai prepare-context --dry-run` runs, then Quiver keeps the current deterministic behavior, invokes no provider, writes no files, and shows the proposed docs plan.
|
|
57
|
+
2. Given a user runs `npx create-quiver ai prepare-context` without new flags, when the command finishes, then it writes only allowed context docs and does not modify product code.
|
|
58
|
+
3. Given a planner profile or explicit provider is available, when `npx create-quiver ai prepare-context --with-planner --dry-run` runs, then Quiver shows provider invocation, context inputs, candidate docs, and no writes.
|
|
59
|
+
4. Given the user has reviewed dry-run output, when `npx create-quiver ai prepare-context --with-planner` runs, then Quiver invokes the planner, validates the output, and applies only allowed docs-only changes.
|
|
60
|
+
5. Given the user wants to use another AI environment, when `--with-planner --print-prompt` is used, then Quiver prints the exact prompt and exits without provider auth or writes.
|
|
61
|
+
6. Given planner output suggests docs updates, when Quiver evaluates it, then only allowed context docs can be written.
|
|
62
|
+
7. Given planner output attempts product-code, dependency, build, test, lockfile, runtime, absolute, traversal, or outside-repo writes, when Quiver validates it, then the command blocks those writes and reports why.
|
|
63
|
+
8. Given the command writes docs, when it completes, then it snapshots touched docs under `.quiver/runs/<run-id>/snapshots/` and reports files, assumptions, risks, and generation source.
|
|
64
|
+
9. Given provider CLI fails, is missing, or is unauthenticated, when planner mode runs, then Quiver shows an actionable error and writes no partial changes.
|
|
65
|
+
10. Given planner output is incomplete, ambiguous, or invalid, when Quiver processes it, then Quiver does not write files automatically and reports the next safe step.
|
|
66
|
+
|
|
67
|
+
### CLI UX standard
|
|
68
|
+
|
|
69
|
+
11. Given the new behavior, when docs are reviewed, then README, command reference, templates, and `README_FOR_AI.md` explain deterministic mode, planner-assisted mode, and safe usage.
|
|
70
|
+
12. Given the new command surface, when tests run, then there is coverage for deterministic mode, planner dry-run, prompt printing, provider failure, invalid output, path blocking, docs-only writes, TTY/no-TTY, CI, and `--json`.
|
|
71
|
+
13. Given any command uses UX output, when it runs, then it clearly indicates whether it is deterministic, planner-assisted, interactive, review, dry-run, or machine mode.
|
|
72
|
+
14. Given multiple docs or checks are proposed, when human output is shown, then Quiver groups files, actions, risks, and next steps with clear visual hierarchy.
|
|
73
|
+
15. Given `--json`, CI, or stdout/stderr redirection, when output is produced, then no spinners, prompts, colors, or decorative symbols appear in machine-readable output.
|
|
74
|
+
16. Given a command supports `--review`, when a proposal exists, then Quiver opens `$VISUAL` or `$EDITOR`; if neither is available, it leaves an artifact path and gives a manual next step.
|
|
75
|
+
17. Given a command supports prompts, when `--interactive` is not used, then it must not block for interactive choices except already documented confirmations.
|
|
76
|
+
18. Given a prompt is added, when automation is needed, then equivalent non-interactive flags must exist.
|
|
77
|
+
19. Given a command uses loaders, when it runs in human TTY mode, then loaders appear only for slow stages and never hide errors.
|
|
78
|
+
20. Given an output uses colors, when colors are disabled or unsupported, then the output remains readable.
|
|
79
|
+
|
|
80
|
+
### Standard flags and visual identity
|
|
81
|
+
|
|
82
|
+
21. Given the UX standard, when docs are reviewed, then `--with-planner`, `--interactive`, and `--review` are defined with purpose, rules, and applicable commands.
|
|
83
|
+
22. Given a command is evaluated for those flags, when there is no generation, human decision, review, or planner value, then the command must not expose decorative flags.
|
|
84
|
+
23. Given `--with-planner --review` runs on a command that writes persistent AI-generated docs, then Quiver generates, validates, opens for human review, revalidates, and applies only allowed changes after approval.
|
|
85
|
+
24. Given unsupported UX flags are used on a command, then Quiver fails early with a clear explanation and an alternative command.
|
|
86
|
+
25. Given the Quiver CLI uses loaders, states, badges, or highlighted sections, when colors are enabled, then it uses the Quiver palette consistently:
|
|
87
|
+
- `quiver.sky` `#86C8F2`
|
|
88
|
+
- `quiver.blue` `#6BADEB`
|
|
89
|
+
- `quiver.periwinkle` `#7F9EE8`
|
|
90
|
+
- `quiver.violet` `#9B82E6`
|
|
91
|
+
- `quiver.magenta` `#D56AB0`
|
|
92
|
+
26. Given semantic status output is needed, then success/error/warning semantics remain clear and are not replaced blindly by brand colors.
|
|
93
|
+
27. Given a migrated command shows output, then colors and symbols come from centralized helpers, not command-local hardcoding.
|
|
94
|
+
|
|
95
|
+
## Approved Technical Plan
|
|
96
|
+
|
|
97
|
+
1. Keep the current no-IA `ai prepare-context` behavior as the default.
|
|
98
|
+
2. Add shared CLI UX helpers behind a small internal abstraction before command adoption.
|
|
99
|
+
3. Add Quiver theme tokens and no-color/CI/no-TTY detection.
|
|
100
|
+
4. Add `$EDITOR` review support with safe fallback.
|
|
101
|
+
5. Add a planner context proposal contract and schema validation.
|
|
102
|
+
6. Add planner-assisted `ai prepare-context` flow with `--with-planner`, `--print-prompt`, `--dry-run`, `--review`, and `--interactive`.
|
|
103
|
+
7. Add strict docs-only allowlist and path safety for planner-generated writes.
|
|
104
|
+
8. Improve human output with loaders and hierarchy only where safe.
|
|
105
|
+
9. Preserve clean JSON output and automation behavior.
|
|
106
|
+
10. Apply the UX flag standard first to `ai prepare-context`, then selected parts of `ai plan`, `spec create`, and `ai pr`.
|
|
107
|
+
11. Document the standard and update generated templates.
|
|
108
|
+
12. Add tests and package/tarball smoke coverage.
|
|
109
|
+
|
|
110
|
+
## Command/Flag Matrix
|
|
111
|
+
|
|
112
|
+
| Command | `--with-planner` | `--interactive` | `--review` | Scope in this spec |
|
|
113
|
+
|---|---:|---:|---:|---|
|
|
114
|
+
| `ai prepare-context` | yes | yes | yes | Full implementation |
|
|
115
|
+
| `ai plan` | yes | yes | yes | Progressive adoption and contract alignment |
|
|
116
|
+
| `spec create` | yes | yes | yes | Progressive adoption and guardrails |
|
|
117
|
+
| `ai pr` | no | yes | yes | Review/edit PR body and interactive inputs |
|
|
118
|
+
| `ai onboard` | implicit planner | future | future | Documented follow-up |
|
|
119
|
+
| `ai revise` | future | future | future | Documented follow-up |
|
|
120
|
+
| `ai review-plan` | no planner flag | future | future | Documented follow-up |
|
|
121
|
+
| `doctor` | no | future for fixes | no | Documented follow-up |
|
|
122
|
+
| `flow`, `next`, `graph`, `ai inspect`, `ai export`, list commands | no | no | no | Must remain read-only/scriptable |
|
|
123
|
+
|
|
124
|
+
## Tools and Dependency Decisions
|
|
125
|
+
|
|
126
|
+
- Adopt `zod` for validating planner proposal contracts.
|
|
127
|
+
- Adopt `@clack/prompts` behind internal helpers for interactive prompts and human-mode spinners.
|
|
128
|
+
- Use Node native process spawning for `$EDITOR`.
|
|
129
|
+
- Do not adopt `commander`, `yargs`, or `oclif` in this spec.
|
|
130
|
+
- Do not adopt `ink`, `blessed`, `neo-blessed`, terminal image protocols, or `vitest` in this spec.
|
|
131
|
+
|
|
132
|
+
## Slice Roadmap
|
|
133
|
+
|
|
134
|
+
| Slice | Title | Status | Dependencies |
|
|
135
|
+
|---|---|---|---|
|
|
136
|
+
| slice-00 | CLI UX spec foundation | completed | none |
|
|
137
|
+
| slice-01 | CLI UX primitives, theme, and dependencies | completed | slice-00 |
|
|
138
|
+
| slice-02 | Planner context proposal contract | completed | slice-01 |
|
|
139
|
+
| slice-03 | Planner-assisted prepare-context review flow | completed | slice-01, slice-02 |
|
|
140
|
+
| slice-04 | UX flag matrix and compatibility guardrails | completed | slice-01 |
|
|
141
|
+
| slice-05 | Progressive command adoption | completed | slice-03, slice-04 |
|
|
142
|
+
| slice-06 | Docs, tests, smoke, and release readiness | completed | slice-02, slice-03, slice-04, slice-05 |
|
|
143
|
+
|
|
144
|
+
## Validation Strategy
|
|
145
|
+
|
|
146
|
+
- `node --test tests/**/*.test.js`
|
|
147
|
+
- focused command tests for `ai prepare-context`
|
|
148
|
+
- focused tests for UX mode detection and theme fallback
|
|
149
|
+
- focused tests for planner proposal schema/path validation
|
|
150
|
+
- focused tests for editor review cancellation and invalid edit fallback
|
|
151
|
+
- `npm run smoke:create-quiver`
|
|
152
|
+
- `npm run smoke:doctor-fixtures`
|
|
153
|
+
- `npm run smoke:guided-workflow`
|
|
154
|
+
- `npm run package:quiver`
|
|
155
|
+
- `npm pack --dry-run`
|
|
156
|
+
- `git diff --check`
|
|
157
|
+
- `npx create-quiver check-handoff` for all slice briefs
|
|
158
|
+
- JSON parse validation for all `slice.json` files
|
|
159
|
+
|
|
160
|
+
## Risks
|
|
161
|
+
|
|
162
|
+
- New dependencies may affect startup time, CJS/ESM compatibility, and package size.
|
|
163
|
+
- Visual output can break automation unless strictly disabled for `--json`, CI, no-TTY, and pipes.
|
|
164
|
+
- Planner output can be useful but invalid; the validation path must be strict.
|
|
165
|
+
- `$EDITOR` behavior differs across macOS, Linux, Windows PowerShell, Git Bash, and WSL.
|
|
166
|
+
- `--review` can become ambiguous unless consistently defined as "review before persistent writes".
|
|
167
|
+
- Progressive adoption can create inconsistent UX if the matrix is not documented and enforced.
|
|
168
|
+
|
|
169
|
+
## Resolved Decisions
|
|
170
|
+
|
|
171
|
+
- No-color behavior uses both `--no-color` and environment detection (`NO_COLOR`, CI, and no-TTY).
|
|
172
|
+
- `ai plan --with-planner` is accepted for UX consistency because planner behavior is already implicit.
|
|
173
|
+
- `spec create --with-planner` is accepted because the command consumes an already reviewed and approved planner output; it does not execute a provider again.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Quiver v29 Status
|
|
2
|
+
|
|
3
|
+
**Spec:** `quiver-v29-planner-prepare-context-cli-ux`
|
|
4
|
+
**Status:** Completed
|
|
5
|
+
**Created:** 2026-05-26
|
|
6
|
+
|
|
7
|
+
## Current State
|
|
8
|
+
|
|
9
|
+
- Acceptance criteria approved.
|
|
10
|
+
- Technical plan approved.
|
|
11
|
+
- Spec package prepared for execution.
|
|
12
|
+
- `slice-00` completed as the documentary foundation.
|
|
13
|
+
- `slice-01` completed with shared CLI UX primitives, Quiver theme tokens, editor helper, and focused tests.
|
|
14
|
+
- `slice-02` completed with planner proposal schema, parser, docs-only allowlist, unsafe path rejection, and redacted invalid-output artifacts.
|
|
15
|
+
- `slice-04` completed with centralized UX flag support, unsupported/incompatible flag guardrails, and CLI contract tests.
|
|
16
|
+
- `slice-03` completed with explicit planner-assisted `ai prepare-context`, dry-run, prompt printing, provider execution, review, interactive approval, docs-only snapshots, and tests.
|
|
17
|
+
- `slice-05` completed with progressive UX adoption for `ai plan`, `spec create`, and `ai pr`.
|
|
18
|
+
- `slice-06` completed with documentation sync, CLI UX guide, generated template updates, full tests, smoke, package, tarball dry-run, and release readiness evidence.
|
|
19
|
+
|
|
20
|
+
## Slice Status
|
|
21
|
+
|
|
22
|
+
| Slice | Status | Notes |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| slice-00-cli-ux-spec-foundation | completed | Spec package validated and ready as foundation commit. |
|
|
25
|
+
| slice-01-cli-ux-primitives-theme | completed | Added shared CLI theme/UX/editor helpers and focused unit tests; package smoke passed. |
|
|
26
|
+
| slice-02-planner-context-proposal-contract | completed | Added zod proposal contract, parser, path safety, fixtures, and tests. |
|
|
27
|
+
| slice-03-prepare-context-planner-review-flow | completed | Implemented planner-assisted prepare-context while preserving deterministic default behavior. |
|
|
28
|
+
| slice-04-ux-flag-matrix-compatibility | completed | Added flag matrix, early validation, help entries, and tests for unsupported/incompatible UX flags. |
|
|
29
|
+
| slice-05-progressive-command-adoption | completed | Added review/interactive paths for selected planner/spec/PR commands and tests. |
|
|
30
|
+
| slice-06-docs-tests-smoke-readiness | completed | Final docs, templates, full tests, smoke, package, and tarball readiness passed. |
|
|
31
|
+
|
|
32
|
+
## Next Step
|
|
33
|
+
|
|
34
|
+
Open the PR for `quiver-v29-planner-prepare-context-cli-ux`, merge after review, and publish only after the package release process is explicitly requested.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
## Title
|
|
2
|
+
|
|
3
|
+
Quiver v29: planner-assisted prepare-context and CLI UX standard
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
|
|
7
|
+
- Adds a shared UX standard for Quiver CLI commands.
|
|
8
|
+
- Keeps `ai prepare-context` deterministic by default.
|
|
9
|
+
- Adds an explicit planner-assisted prepare-context mode.
|
|
10
|
+
- Adds review and interactive patterns with safe non-interactive alternatives.
|
|
11
|
+
- Standardizes color tokens, loaders, prompts, JSON/CI/no-TTY behavior, and command flag applicability.
|
|
12
|
+
|
|
13
|
+
## Scope
|
|
14
|
+
|
|
15
|
+
- CLI UX infrastructure and docs.
|
|
16
|
+
- Planner proposal validation for context documentation.
|
|
17
|
+
- `ai prepare-context` planner-assisted mode.
|
|
18
|
+
- Progressive UX adoption for selected commands.
|
|
19
|
+
- Tests, generated docs, and package readiness.
|
|
20
|
+
|
|
21
|
+
## Files
|
|
22
|
+
|
|
23
|
+
Expected areas:
|
|
24
|
+
|
|
25
|
+
- `src/create-quiver/index.js`
|
|
26
|
+
- `src/create-quiver/commands/ai.js`
|
|
27
|
+
- `src/create-quiver/commands/spec.js`
|
|
28
|
+
- `src/create-quiver/lib/cli/**`
|
|
29
|
+
- `src/create-quiver/lib/ai/**`
|
|
30
|
+
- `docs/**`
|
|
31
|
+
- `README.md`
|
|
32
|
+
- `README_FOR_AI.md`
|
|
33
|
+
- `tests/**`
|
|
34
|
+
- `package.json`
|
|
35
|
+
- `package-lock.json`
|
|
36
|
+
- `specs/quiver-v29-planner-prepare-context-cli-ux/**`
|
|
37
|
+
|
|
38
|
+
## How to Test (DETAILED - REQUIRED)
|
|
39
|
+
|
|
40
|
+
### Required Environment
|
|
41
|
+
|
|
42
|
+
- Node.js and npm.
|
|
43
|
+
- Git.
|
|
44
|
+
- Local provider CLI only for provider-backed tests/manual smoke.
|
|
45
|
+
|
|
46
|
+
### Worktree Access
|
|
47
|
+
|
|
48
|
+
- One spec worktree dedicated to `quiver-v29-planner-prepare-context-cli-ux`.
|
|
49
|
+
- One commit per slice.
|
|
50
|
+
|
|
51
|
+
### Run the Project
|
|
52
|
+
|
|
53
|
+
This is a CLI framework change. Run command-level tests and smoke commands from the Quiver repo root.
|
|
54
|
+
|
|
55
|
+
### Use Cases
|
|
56
|
+
|
|
57
|
+
- Run deterministic `ai prepare-context`.
|
|
58
|
+
- Run planner-assisted dry-run.
|
|
59
|
+
- Print planner prompt without provider auth.
|
|
60
|
+
- Review planner proposal with `$EDITOR`.
|
|
61
|
+
- Confirm JSON/no-TTY/CI output stays clean.
|
|
62
|
+
- Confirm unsupported UX flags fail with actionable guidance.
|
|
63
|
+
|
|
64
|
+
### Technical Verification
|
|
65
|
+
|
|
66
|
+
- `node --test tests/**/*.test.js`
|
|
67
|
+
- `npm run smoke:create-quiver`
|
|
68
|
+
- `npm run smoke:doctor-fixtures`
|
|
69
|
+
- `npm run smoke:guided-workflow`
|
|
70
|
+
- `npm run package:quiver`
|
|
71
|
+
- `npm pack --dry-run`
|
|
72
|
+
- `git diff --check`
|
|
73
|
+
- `npx create-quiver spec validate specs/quiver-v29-planner-prepare-context-cli-ux`
|
|
74
|
+
|
|
75
|
+
## Evidence
|
|
76
|
+
|
|
77
|
+
- Focused command/UX tests passed with 87 tests.
|
|
78
|
+
- Full suite passed with 426 tests.
|
|
79
|
+
- `npm run smoke:create-quiver` passed.
|
|
80
|
+
- `npm run smoke:doctor-fixtures` passed with 13 fixture states.
|
|
81
|
+
- `npm run smoke:guided-workflow` passed.
|
|
82
|
+
- `npm run package:quiver` passed.
|
|
83
|
+
- `npm pack --dry-run` passed for `create-quiver@0.14.0`.
|
|
84
|
+
- `git diff --check` passed.
|
|
85
|
+
- `node bin/create-quiver.js spec validate specs/quiver-v29-planner-prepare-context-cli-ux` passed.
|
|
86
|
+
|
|
87
|
+
## Rollback
|
|
88
|
+
|
|
89
|
+
Revert the slice commits in reverse order. The deterministic `ai prepare-context` default must remain available throughout rollback.
|
|
90
|
+
|
|
91
|
+
## Risks / Notes
|
|
92
|
+
|
|
93
|
+
- Dependencies must be validated for CJS/ESM compatibility and package size.
|
|
94
|
+
- Human-mode visual output must never leak into JSON or CI output.
|
|
95
|
+
- Planner output must be treated as untrusted until validated.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# CLOSURE_BRIEF - slice-00 CLI UX spec foundation
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Created and validated the Quiver v29 spec package for planner-assisted `ai prepare-context` and the shared CLI UX standard.
|
|
6
|
+
|
|
7
|
+
## Validation Against Acceptance Criteria
|
|
8
|
+
|
|
9
|
+
- Spec root includes `SPEC.md`, `EXECUTION_PLAN.md`, `STATUS.md`, `EVIDENCE_REPORT.md`, and `pr.md`.
|
|
10
|
+
- Every slice folder includes `slice.json`, `EXECUTION_BRIEF.md`, and `CLOSURE_BRIEF.md`.
|
|
11
|
+
- Every `slice.json` parsed successfully.
|
|
12
|
+
- Every brief passed `check-handoff`.
|
|
13
|
+
- `spec validate` passed.
|
|
14
|
+
- `git diff --check` passed.
|
|
15
|
+
|
|
16
|
+
## Relevant Changes
|
|
17
|
+
|
|
18
|
+
- Added `specs/quiver-v29-planner-prepare-context-cli-ux/**`.
|
|
19
|
+
- Added 7 planned slices with dependencies and execution waves.
|
|
20
|
+
- Captured approved acceptance criteria, technical plan, UX flag matrix, Quiver color tokens, and validation strategy.
|
|
21
|
+
|
|
22
|
+
## Pending Work
|
|
23
|
+
|
|
24
|
+
- Execute implementation slices after this documentation foundation commit.
|
|
25
|
+
|
|
26
|
+
## Remaining Risks
|
|
27
|
+
|
|
28
|
+
- Implementation still needs to validate dependency impact, terminal compatibility, planner output safety, and docs sync.
|
|
29
|
+
|
|
30
|
+
## Future Recommendations
|
|
31
|
+
|
|
32
|
+
- Keep this slice as the scope anchor for Quiver v29 and update later closure briefs with evidence rather than changing approved scope.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# EXECUTION_BRIEF - slice-00 CLI UX spec foundation
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
Quiver v29 introduces planner-assisted `ai prepare-context` and a shared CLI UX standard. This slice establishes the documentation foundation only.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Commit the approved spec package so later implementation slices have a stable contract.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- Review `SPEC.md`, `EXECUTION_PLAN.md`, `STATUS.md`, `pr.md`, and every slice contract.
|
|
14
|
+
- Ensure each slice has `slice.json`, `EXECUTION_BRIEF.md`, and `CLOSURE_BRIEF.md`.
|
|
15
|
+
- Validate JSON and Markdown hygiene.
|
|
16
|
+
|
|
17
|
+
## Acceptance Criteria
|
|
18
|
+
|
|
19
|
+
- No product code changes.
|
|
20
|
+
- All slice JSON files parse.
|
|
21
|
+
- `git diff --check` passes.
|
|
22
|
+
- Slice dependencies and allowed write paths are explicit.
|
|
23
|
+
|
|
24
|
+
## Suggested Steps
|
|
25
|
+
|
|
26
|
+
1. Inspect the spec package.
|
|
27
|
+
2. Validate every `slice.json`.
|
|
28
|
+
3. Run `git diff --check`.
|
|
29
|
+
4. Commit only the spec package.
|
|
30
|
+
|
|
31
|
+
## Restrictions
|
|
32
|
+
|
|
33
|
+
- Do not modify `src/`, tests, package files, or generated templates in this slice.
|
|
34
|
+
- Do not implement CLI behavior.
|
|
35
|
+
|
|
36
|
+
## Risks
|
|
37
|
+
|
|
38
|
+
- If this slice is skipped, implementation agents may work from inconsistent scope.
|
|
39
|
+
|
|
40
|
+
## Completion Checklist
|
|
41
|
+
|
|
42
|
+
- [ ] Spec package reviewed.
|
|
43
|
+
- [ ] JSON validation passed.
|
|
44
|
+
- [ ] Whitespace validation passed.
|
|
45
|
+
- [ ] Documentation foundation committed.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-00-cli-ux-spec-foundation",
|
|
3
|
+
"ticket": "QUIVER-29-00",
|
|
4
|
+
"type": "docs",
|
|
5
|
+
"title": "CLI UX spec foundation",
|
|
6
|
+
"objective": "Commit the approved spec package, UX standard, execution plan, and slice contracts before implementation begins.",
|
|
7
|
+
"description": "Creates the documentary foundation for Quiver v29, including the approved acceptance criteria, technical plan, command/flag matrix, execution waves, PR body, and slice handoffs.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "feature",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "v29-cli-ux-spec-foundation",
|
|
12
|
+
"branch_name": "feature/QUIVER-29-00-v29-cli-ux-spec-foundation"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"specs/quiver-v29-planner-prepare-context-cli-ux/**"
|
|
16
|
+
],
|
|
17
|
+
"expected_read_paths": [
|
|
18
|
+
"README_FOR_AI.md",
|
|
19
|
+
"README.md",
|
|
20
|
+
"docs/reference/commands.md",
|
|
21
|
+
"specs/quiver-v28-pixel-quiver-feedback-reconciliation/**"
|
|
22
|
+
],
|
|
23
|
+
"allowed_write_paths": [
|
|
24
|
+
"specs/quiver-v29-planner-prepare-context-cli-ux/**"
|
|
25
|
+
],
|
|
26
|
+
"depends_on": [],
|
|
27
|
+
"parallel_safe": "no",
|
|
28
|
+
"parallel_safe_reason": "This documentation foundation must land before any implementation slice starts.",
|
|
29
|
+
"must": [
|
|
30
|
+
"Capture approved acceptance criteria and technical plan.",
|
|
31
|
+
"Define the UX flag matrix and Quiver color tokens.",
|
|
32
|
+
"Create EXECUTION_BRIEF.md and CLOSURE_BRIEF.md for every slice.",
|
|
33
|
+
"Include an execution plan that identifies sequential and parallel-safe waves."
|
|
34
|
+
],
|
|
35
|
+
"not_included": [
|
|
36
|
+
"Product code changes.",
|
|
37
|
+
"Dependency installation.",
|
|
38
|
+
"CLI behavior changes."
|
|
39
|
+
],
|
|
40
|
+
"acceptance": [
|
|
41
|
+
"The spec root includes SPEC.md, EXECUTION_PLAN.md, STATUS.md, and pr.md.",
|
|
42
|
+
"Every slice folder includes slice.json, EXECUTION_BRIEF.md, and CLOSURE_BRIEF.md.",
|
|
43
|
+
"Every slice has explicit dependencies and allowed write paths.",
|
|
44
|
+
"The documentation package validates as Markdown/JSON and is ready for commit."
|
|
45
|
+
],
|
|
46
|
+
"tests": [
|
|
47
|
+
"find specs/quiver-v29-planner-prepare-context-cli-ux -name 'slice.json' -print -exec node -e \"JSON.parse(require('fs').readFileSync(process.argv[1], 'utf8'))\" {} \\;",
|
|
48
|
+
"git diff --check"
|
|
49
|
+
],
|
|
50
|
+
"validation_hints": [
|
|
51
|
+
"Run this slice first.",
|
|
52
|
+
"Do not start code implementation before this slice is committed."
|
|
53
|
+
],
|
|
54
|
+
"estimated_hours": 2,
|
|
55
|
+
"actual_hours": 2,
|
|
56
|
+
"completed_at": "2026-05-26",
|
|
57
|
+
"status": "completed"
|
|
58
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# CLOSURE_BRIEF - slice-01 CLI UX primitives, theme, and dependencies
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Completed the shared CLI UX foundation required by later v29 slices.
|
|
6
|
+
|
|
7
|
+
## Validation Against Acceptance Criteria
|
|
8
|
+
|
|
9
|
+
- Theme tokens are centralized in `src/create-quiver/lib/cli/theme.js` and tested against the approved Quiver palette.
|
|
10
|
+
- UX mode detection disables prompts, spinners, colors, and decorative output for `--json`, CI, and no-TTY modes.
|
|
11
|
+
- `@clack/prompts` is wrapped behind internal helpers and loaded lazily so command code does not couple to it directly.
|
|
12
|
+
- `$VISUAL`/`$EDITOR` resolution, fallback behavior, shell-free execution, and cancellation paths are tested.
|
|
13
|
+
- `npm run package:quiver` passed after adding dependencies.
|
|
14
|
+
|
|
15
|
+
## Relevant Changes
|
|
16
|
+
|
|
17
|
+
- Added runtime dependencies: `@clack/prompts` and `zod`.
|
|
18
|
+
- Added `theme.js`, `ux.js`, and `editor.js` under `src/create-quiver/lib/cli/`.
|
|
19
|
+
- Added focused `node:test` coverage for theme, UX mode/spinner/prompt behavior, and editor resolution/execution.
|
|
20
|
+
|
|
21
|
+
## Pending Work
|
|
22
|
+
|
|
23
|
+
- Later slices must adopt these helpers instead of duplicating output logic.
|
|
24
|
+
- `zod` is intentionally added now and will be used by `slice-02` for planner proposal validation.
|
|
25
|
+
|
|
26
|
+
## Remaining Risks
|
|
27
|
+
|
|
28
|
+
- `@clack/prompts` is ESM-only; it is loaded through dynamic import and covered by tests, but later command adoption must keep this boundary.
|
|
29
|
+
- Windows editor behavior is covered through injected platform/runner tests; real terminal coverage remains part of final smoke/manual validation.
|
|
30
|
+
|
|
31
|
+
## Future Recommendations
|
|
32
|
+
|
|
33
|
+
- Keep UX helpers minimal and command-owned: command behavior should stay testable without a real TTY.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# EXECUTION_BRIEF - slice-01 CLI UX primitives, theme, and dependencies
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
Quiver currently has no runtime dependencies and uses direct string output. This slice adds a shared UX layer carefully so later command changes stay consistent and script-safe.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Create internal helpers for Quiver-branded human output, prompts, spinners, mode detection, and editor review.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- Add `@clack/prompts` and `zod` only if required by the approved implementation path.
|
|
14
|
+
- Add `src/create-quiver/lib/cli/theme.js`.
|
|
15
|
+
- Add `src/create-quiver/lib/cli/ux.js`.
|
|
16
|
+
- Add `src/create-quiver/lib/cli/editor.js`.
|
|
17
|
+
- Add focused unit tests.
|
|
18
|
+
|
|
19
|
+
## Acceptance Criteria
|
|
20
|
+
|
|
21
|
+
- Existing commands keep current behavior unless using new helpers internally without visible behavior changes.
|
|
22
|
+
- No output decoration in CI/no-TTY/JSON/no-color modes.
|
|
23
|
+
- Quiver color tokens match the approved palette.
|
|
24
|
+
- `$VISUAL`/`$EDITOR` fallback is tested.
|
|
25
|
+
|
|
26
|
+
## Suggested Steps
|
|
27
|
+
|
|
28
|
+
1. Add dependencies and lockfile updates.
|
|
29
|
+
2. Implement theme tokens and symbol fallbacks.
|
|
30
|
+
3. Implement mode detection and human-output helpers.
|
|
31
|
+
4. Implement editor helper with cancellation handling.
|
|
32
|
+
5. Add unit tests.
|
|
33
|
+
6. Run package smoke.
|
|
34
|
+
|
|
35
|
+
## Restrictions
|
|
36
|
+
|
|
37
|
+
- Do not migrate CLI parsing in this slice.
|
|
38
|
+
- Do not modify `ai prepare-context` behavior yet.
|
|
39
|
+
|
|
40
|
+
## Risks
|
|
41
|
+
|
|
42
|
+
- Dependency ESM/CJS compatibility can break `npx`.
|
|
43
|
+
- Decoration can leak into tests if mode detection is weak.
|
|
44
|
+
|
|
45
|
+
## Completion Checklist
|
|
46
|
+
|
|
47
|
+
- [ ] Dependencies justified and package smoke passes.
|
|
48
|
+
- [ ] Theme/helper/editor tests pass.
|
|
49
|
+
- [ ] No hardcoded Quiver colors outside the theme module.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-01-cli-ux-primitives-theme",
|
|
3
|
+
"ticket": "QUIVER-29-01",
|
|
4
|
+
"type": "feature",
|
|
5
|
+
"title": "CLI UX primitives, theme, and dependencies",
|
|
6
|
+
"objective": "Add shared CLI UX primitives for human output, TTY/CI detection, Quiver colors, prompts, spinners, and editor support without changing command behavior yet.",
|
|
7
|
+
"description": "Introduces the reusable internal UX layer that later command slices can adopt safely.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "feature",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "v29-cli-ux-primitives-theme",
|
|
12
|
+
"branch_name": "feature/QUIVER-29-01-v29-cli-ux-primitives-theme"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"package.json",
|
|
16
|
+
"package-lock.json",
|
|
17
|
+
"src/create-quiver/lib/cli/theme.js",
|
|
18
|
+
"src/create-quiver/lib/cli/ux.js",
|
|
19
|
+
"src/create-quiver/lib/cli/editor.js",
|
|
20
|
+
"tests/lib/cli-theme.test.js",
|
|
21
|
+
"tests/lib/cli-ux.test.js",
|
|
22
|
+
"tests/lib/cli-editor.test.js",
|
|
23
|
+
"specs/quiver-v29-planner-prepare-context-cli-ux/**"
|
|
24
|
+
],
|
|
25
|
+
"expected_read_paths": [
|
|
26
|
+
"src/create-quiver/index.js",
|
|
27
|
+
"src/create-quiver/commands/next.js",
|
|
28
|
+
"package.json",
|
|
29
|
+
"tests/**"
|
|
30
|
+
],
|
|
31
|
+
"allowed_write_paths": [
|
|
32
|
+
"package.json",
|
|
33
|
+
"package-lock.json",
|
|
34
|
+
"src/create-quiver/lib/cli/**",
|
|
35
|
+
"tests/lib/cli-theme.test.js",
|
|
36
|
+
"tests/lib/cli-ux.test.js",
|
|
37
|
+
"tests/lib/cli-editor.test.js",
|
|
38
|
+
"specs/quiver-v29-planner-prepare-context-cli-ux/**"
|
|
39
|
+
],
|
|
40
|
+
"depends_on": [
|
|
41
|
+
"slice-00-cli-ux-spec-foundation"
|
|
42
|
+
],
|
|
43
|
+
"parallel_safe": "after_dependencies",
|
|
44
|
+
"parallel_safe_reason": "Must run before other implementation slices because it owns shared helpers and dependencies.",
|
|
45
|
+
"must": [
|
|
46
|
+
"Add Quiver color tokens in one shared module.",
|
|
47
|
+
"Detect TTY, CI, JSON, no-color, and machine-output modes.",
|
|
48
|
+
"Wrap @clack/prompts behind internal helpers so command code is not coupled directly.",
|
|
49
|
+
"Add editor helper using VISUAL, EDITOR, and safe fallback.",
|
|
50
|
+
"Keep existing command behavior unchanged."
|
|
51
|
+
],
|
|
52
|
+
"not_included": [
|
|
53
|
+
"Planner proposal parsing.",
|
|
54
|
+
"prepare-context behavior changes.",
|
|
55
|
+
"Full parser migration to commander/yargs/oclif."
|
|
56
|
+
],
|
|
57
|
+
"acceptance": [
|
|
58
|
+
"Theme tokens are centralized and tested.",
|
|
59
|
+
"UX helpers disable decoration for CI, no-TTY, --json, and no-color mode.",
|
|
60
|
+
"Editor helper handles missing editor and cancellation without writes.",
|
|
61
|
+
"Package smoke still passes after dependencies are added."
|
|
62
|
+
],
|
|
63
|
+
"tests": [
|
|
64
|
+
"node --test tests/lib/cli-theme.test.js tests/lib/cli-ux.test.js tests/lib/cli-editor.test.js",
|
|
65
|
+
"npm run package:quiver"
|
|
66
|
+
],
|
|
67
|
+
"validation_hints": [
|
|
68
|
+
"Prefer small wrappers over direct @clack usage in commands.",
|
|
69
|
+
"Do not hardcode color values outside theme.js."
|
|
70
|
+
],
|
|
71
|
+
"estimated_hours": 6,
|
|
72
|
+
"actual_hours": 3,
|
|
73
|
+
"status": "completed",
|
|
74
|
+
"completed_at": "2026-05-26"
|
|
75
|
+
}
|