create-quiver 0.14.1 → 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 +16 -0
- package/README.md +4 -0
- package/README_FOR_AI.md +8 -2
- package/ROADMAP.md +8 -2
- package/docs/CLI_UX_GUIDE.md +64 -4
- package/docs/COMMANDS.md.template +7 -1
- package/docs/reference/commands.md +4 -0
- package/package.json +1 -1
- 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 +364 -81
- package/src/create-quiver/commands/spec.js +106 -6
- package/src/create-quiver/index.js +533 -70
- package/src/create-quiver/lib/agent-profiles.js +111 -10
- 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/selectors.js +107 -0
- package/src/create-quiver/lib/cli/theme.js +5 -2
- package/src/create-quiver/lib/cli/ux-flags.js +18 -0
- package/src/create-quiver/lib/cli/ux.js +100 -5
|
@@ -49,6 +49,11 @@ function createUx(options = {}) {
|
|
|
49
49
|
write(`${text}\n`);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
function formatStatus(status, text) {
|
|
53
|
+
const symbol = mode.theme.symbols[status] || mode.theme.symbols.bullet;
|
|
54
|
+
return mode.theme.status(status, `${symbol} ${text}`);
|
|
55
|
+
}
|
|
56
|
+
|
|
52
57
|
function heading(text) {
|
|
53
58
|
if (mode.json) return;
|
|
54
59
|
if (!mode.decoration) {
|
|
@@ -59,15 +64,65 @@ function createUx(options = {}) {
|
|
|
59
64
|
line(mode.theme.status('planner', `${prefix} ${text}`));
|
|
60
65
|
}
|
|
61
66
|
|
|
67
|
+
function section(text) {
|
|
68
|
+
if (mode.json) return;
|
|
69
|
+
if (!mode.decoration) {
|
|
70
|
+
line(text);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const prefix = mode.theme.symbols.section || mode.theme.symbols.start;
|
|
74
|
+
line(mode.theme.status('command', `${prefix} ${text}`));
|
|
75
|
+
}
|
|
76
|
+
|
|
62
77
|
function writeStatus(status, text) {
|
|
63
78
|
if (mode.json) return;
|
|
64
79
|
if (!mode.decoration) {
|
|
65
80
|
line(text);
|
|
66
81
|
return;
|
|
67
82
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
83
|
+
line(formatStatus(status, text));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function check(text) {
|
|
87
|
+
writeStatus('success', text);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function warning(text) {
|
|
91
|
+
writeStatus('warning', text);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function error(text) {
|
|
95
|
+
writeStatus('error', text);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function info(text) {
|
|
99
|
+
writeStatus('info', text);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function summary(items = [], summaryOptions = {}) {
|
|
103
|
+
if (mode.json) return;
|
|
104
|
+
const title = summaryOptions.title || 'Summary';
|
|
105
|
+
section(title);
|
|
106
|
+
for (const item of items) {
|
|
107
|
+
if (typeof item === 'string') {
|
|
108
|
+
line(mode.decoration ? mode.theme.status('muted', ` ${mode.theme.symbols.bullet} ${item}`) : `- ${item}`);
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
if (item && typeof item === 'object') {
|
|
112
|
+
const label = item.label || item.key || '';
|
|
113
|
+
const value = item.value == null ? '' : String(item.value);
|
|
114
|
+
const text = label ? `${label}: ${value}` : value;
|
|
115
|
+
line(mode.decoration ? mode.theme.status(item.status || 'muted', ` ${mode.theme.symbols.bullet} ${text}`) : `- ${text}`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function nextSteps(steps = [], stepOptions = {}) {
|
|
121
|
+
if (mode.json || !Array.isArray(steps) || steps.length === 0) return;
|
|
122
|
+
section(stepOptions.title || 'Next steps');
|
|
123
|
+
for (const step of steps) {
|
|
124
|
+
line(mode.decoration ? mode.theme.status('command', ` ${mode.theme.symbols.bullet} ${step}`) : `- ${step}`);
|
|
125
|
+
}
|
|
71
126
|
}
|
|
72
127
|
|
|
73
128
|
async function withSpinner(message, task, spinnerOptions = {}) {
|
|
@@ -84,17 +139,49 @@ function createUx(options = {}) {
|
|
|
84
139
|
|
|
85
140
|
const clack = await loadClack(options.prompts);
|
|
86
141
|
const spinner = clack.spinner();
|
|
142
|
+
let stopped = false;
|
|
143
|
+
function stop(message, code) {
|
|
144
|
+
if (stopped) return;
|
|
145
|
+
stopped = true;
|
|
146
|
+
spinner.stop(message, code);
|
|
147
|
+
}
|
|
87
148
|
spinner.start(message);
|
|
88
149
|
try {
|
|
89
150
|
const result = await task();
|
|
90
|
-
|
|
151
|
+
stop(spinnerOptions.successMessage || message);
|
|
91
152
|
return result;
|
|
92
153
|
} catch (error) {
|
|
93
|
-
|
|
154
|
+
stop(spinnerOptions.failureMessage || `Failed: ${message}`, 1);
|
|
94
155
|
throw error;
|
|
95
156
|
}
|
|
96
157
|
}
|
|
97
158
|
|
|
159
|
+
async function taskGroup(title, stages = []) {
|
|
160
|
+
heading(title);
|
|
161
|
+
const results = [];
|
|
162
|
+
for (const stage of stages) {
|
|
163
|
+
const run = typeof stage === 'function' ? stage : stage.run;
|
|
164
|
+
const message = typeof stage === 'function' ? stage.name || 'Running task' : stage.message;
|
|
165
|
+
const successMessage = stage.successMessage || message;
|
|
166
|
+
const useSpinner = stage.spinner === true;
|
|
167
|
+
if (typeof run !== 'function') {
|
|
168
|
+
throw new Error('create-quiver: taskGroup stage requires a run function.');
|
|
169
|
+
}
|
|
170
|
+
const result = useSpinner
|
|
171
|
+
? await withSpinner(message, run, {
|
|
172
|
+
successMessage,
|
|
173
|
+
failureMessage: stage.failureMessage,
|
|
174
|
+
echo: stage.echo,
|
|
175
|
+
})
|
|
176
|
+
: await run();
|
|
177
|
+
if (!useSpinner) {
|
|
178
|
+
check(successMessage);
|
|
179
|
+
}
|
|
180
|
+
results.push(result);
|
|
181
|
+
}
|
|
182
|
+
return results;
|
|
183
|
+
}
|
|
184
|
+
|
|
98
185
|
async function promptConfirm(message, promptOptions = {}) {
|
|
99
186
|
if (!mode.usePrompts) {
|
|
100
187
|
throw new Error('create-quiver: interactive confirmation requires an interactive TTY. Pass the equivalent flags or rerun with --interactive.');
|
|
@@ -114,11 +201,19 @@ function createUx(options = {}) {
|
|
|
114
201
|
}
|
|
115
202
|
|
|
116
203
|
return {
|
|
204
|
+
check,
|
|
205
|
+
error,
|
|
117
206
|
heading,
|
|
207
|
+
info,
|
|
118
208
|
line,
|
|
119
209
|
mode,
|
|
210
|
+
nextSteps,
|
|
120
211
|
promptConfirm,
|
|
212
|
+
section,
|
|
213
|
+
summary,
|
|
214
|
+
taskGroup,
|
|
121
215
|
theme: mode.theme,
|
|
216
|
+
warning,
|
|
122
217
|
withSpinner,
|
|
123
218
|
writeStatus,
|
|
124
219
|
};
|