create-quiver 0.15.0 → 0.15.2

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 (96) hide show
  1. package/.github/workflows/ci.yml +3 -0
  2. package/CHANGELOG.md +6 -0
  3. package/README.md +33 -0
  4. package/README_FOR_AI.md +13 -6
  5. package/ROADMAP.md +5 -0
  6. package/docs/AI_CONTEXT.md.template +4 -0
  7. package/docs/AI_ONBOARDING_PROMPT.md.template +8 -0
  8. package/docs/CLI_UX_GUIDE.md +31 -2
  9. package/docs/COMMANDS.md.template +16 -5
  10. package/docs/TROUBLESHOOTING.md +70 -0
  11. package/docs/TROUBLESHOOTING.md.template +20 -0
  12. package/docs/WORKFLOW.md.template +2 -2
  13. package/docs/getting-started/installation.md +86 -0
  14. package/docs/reference/commands.md +39 -5
  15. package/package.json +1 -1
  16. package/specs/quiver-v31-ai-model-catalog-agent-selection/EVIDENCE_REPORT.md +185 -0
  17. package/specs/quiver-v31-ai-model-catalog-agent-selection/EXECUTION_PLAN.md +85 -0
  18. package/specs/quiver-v31-ai-model-catalog-agent-selection/SPEC.md +337 -0
  19. package/specs/quiver-v31-ai-model-catalog-agent-selection/STATUS.md +30 -0
  20. package/specs/quiver-v31-ai-model-catalog-agent-selection/pr.md +98 -0
  21. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +30 -0
  22. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +51 -0
  23. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-00-spec-foundation/slice.json +62 -0
  24. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-01-model-catalog-alias-normalization/CLOSURE_BRIEF.md +32 -0
  25. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-01-model-catalog-alias-normalization/EXECUTION_BRIEF.md +53 -0
  26. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-01-model-catalog-alias-normalization/slice.json +72 -0
  27. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-02-interactive-agent-set-selectors/CLOSURE_BRIEF.md +36 -0
  28. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-02-interactive-agent-set-selectors/EXECUTION_BRIEF.md +56 -0
  29. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-02-interactive-agent-set-selectors/slice.json +78 -0
  30. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-03-agent-doctor-repair/CLOSURE_BRIEF.md +36 -0
  31. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-03-agent-doctor-repair/EXECUTION_BRIEF.md +57 -0
  32. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-03-agent-doctor-repair/slice.json +77 -0
  33. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-04-shared-preflight-provider-errors/CLOSURE_BRIEF.md +35 -0
  34. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-04-shared-preflight-provider-errors/EXECUTION_BRIEF.md +55 -0
  35. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-04-shared-preflight-provider-errors/slice.json +84 -0
  36. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-05-ai-models-list/CLOSURE_BRIEF.md +32 -0
  37. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-05-ai-models-list/EXECUTION_BRIEF.md +52 -0
  38. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-05-ai-models-list/slice.json +72 -0
  39. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-06-docs-templates-alignment/CLOSURE_BRIEF.md +33 -0
  40. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-06-docs-templates-alignment/EXECUTION_BRIEF.md +58 -0
  41. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-06-docs-templates-alignment/slice.json +84 -0
  42. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-07-tests-smokes-release-readiness/CLOSURE_BRIEF.md +32 -0
  43. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-07-tests-smokes-release-readiness/EXECUTION_BRIEF.md +59 -0
  44. package/specs/quiver-v31-ai-model-catalog-agent-selection/slices/slice-07-tests-smokes-release-readiness/slice.json +94 -0
  45. package/specs/quiver-v32-npx-installation-guidance/EVIDENCE_REPORT.md +26 -0
  46. package/specs/quiver-v32-npx-installation-guidance/SPEC.md +55 -0
  47. package/specs/quiver-v32-npx-installation-guidance/STATUS.md +23 -0
  48. package/specs/quiver-v32-npx-installation-guidance/pr.md +72 -0
  49. package/specs/quiver-v32-npx-installation-guidance/slices/slice-00-installation-docs/CLOSURE_BRIEF.md +31 -0
  50. package/specs/quiver-v32-npx-installation-guidance/slices/slice-00-installation-docs/EXECUTION_BRIEF.md +56 -0
  51. package/specs/quiver-v32-npx-installation-guidance/slices/slice-00-installation-docs/slice.json +75 -0
  52. package/specs/quiver-v33-approval-ux-and-planner-progress/EVIDENCE_REPORT.md +93 -0
  53. package/specs/quiver-v33-approval-ux-and-planner-progress/EXECUTION_PLAN.md +83 -0
  54. package/specs/quiver-v33-approval-ux-and-planner-progress/SPEC.md +158 -0
  55. package/specs/quiver-v33-approval-ux-and-planner-progress/STATUS.md +31 -0
  56. package/specs/quiver-v33-approval-ux-and-planner-progress/pr.md +109 -0
  57. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-00-approval-ux-foundation/CLOSURE_BRIEF.md +30 -0
  58. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-00-approval-ux-foundation/EXECUTION_BRIEF.md +56 -0
  59. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-00-approval-ux-foundation/slice.json +65 -0
  60. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-01-approval-candidates-model/CLOSURE_BRIEF.md +19 -0
  61. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-01-approval-candidates-model/EXECUTION_BRIEF.md +51 -0
  62. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-01-approval-candidates-model/slice.json +74 -0
  63. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-02-approve-interactive-selection/CLOSURE_BRIEF.md +20 -0
  64. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-02-approve-interactive-selection/EXECUTION_BRIEF.md +53 -0
  65. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-02-approve-interactive-selection/slice.json +79 -0
  66. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-03-technical-plan-review-decision-data/CLOSURE_BRIEF.md +19 -0
  67. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-03-technical-plan-review-decision-data/EXECUTION_BRIEF.md +50 -0
  68. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-03-technical-plan-review-decision-data/slice.json +75 -0
  69. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-04-revise-input-guardrails/CLOSURE_BRIEF.md +19 -0
  70. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-04-revise-input-guardrails/EXECUTION_BRIEF.md +51 -0
  71. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-04-revise-input-guardrails/slice.json +73 -0
  72. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-05-provider-progress-alignment/CLOSURE_BRIEF.md +20 -0
  73. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-05-provider-progress-alignment/EXECUTION_BRIEF.md +51 -0
  74. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-05-provider-progress-alignment/slice.json +91 -0
  75. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-06-workflow-surface-integration/CLOSURE_BRIEF.md +20 -0
  76. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-06-workflow-surface-integration/EXECUTION_BRIEF.md +53 -0
  77. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-06-workflow-surface-integration/slice.json +87 -0
  78. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-07-docs-tests-release-readiness/CLOSURE_BRIEF.md +21 -0
  79. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-07-docs-tests-release-readiness/EXECUTION_BRIEF.md +55 -0
  80. package/specs/quiver-v33-approval-ux-and-planner-progress/slices/slice-07-docs-tests-release-readiness/slice.json +97 -0
  81. package/src/create-quiver/commands/ai.js +561 -46
  82. package/src/create-quiver/commands/flow.js +76 -14
  83. package/src/create-quiver/commands/spec.js +8 -1
  84. package/src/create-quiver/index.js +36 -12
  85. package/src/create-quiver/lib/agent-profiles.js +332 -4
  86. package/src/create-quiver/lib/ai/approval-candidates.js +86 -0
  87. package/src/create-quiver/lib/ai/execution-plan.js +7 -2
  88. package/src/create-quiver/lib/ai/executor.js +9 -2
  89. package/src/create-quiver/lib/ai/model-catalog.js +333 -0
  90. package/src/create-quiver/lib/ai/plan-review.js +77 -1
  91. package/src/create-quiver/lib/ai/providers.js +143 -4
  92. package/src/create-quiver/lib/ai/run-state.js +21 -4
  93. package/src/create-quiver/lib/approvals.js +103 -0
  94. package/src/create-quiver/lib/cli/selectors.js +53 -0
  95. package/src/create-quiver/lib/git.js +13 -4
  96. package/src/create-quiver/lib/paths.js +45 -3
@@ -0,0 +1,337 @@
1
+ # Spec - Quiver v31 AI Model Catalog and Agent Selection
2
+
3
+ ## Objective
4
+
5
+ Make AI agent configuration safer and easier by letting users select providers and known models from Quiver-guided choices instead of memorizing provider-specific model ids.
6
+
7
+ The immediate trigger is a real dogfooding failure: a project stored `model: "GPT 5.5"` for a Codex planner, but Codex requires the technical id `gpt-5.5`. Quiver showed `provider run failed` instead of explaining that the saved model looked like a display name.
8
+
9
+ ## Problem
10
+
11
+ Quiver currently stores free-form `model` values in agent profiles. That is flexible, but it lets users accidentally save a human-friendly model name where the provider CLI expects an exact technical id.
12
+
13
+ This causes:
14
+
15
+ - live AI commands to fail late;
16
+ - unclear `provider run failed` errors;
17
+ - repeated trial and error;
18
+ - poor first-run experience for Planner, Executor, Reviewer, and Doctor setup;
19
+ - fragile profile reuse across projects.
20
+
21
+ ## Product Requirements
22
+
23
+ ### Known Providers
24
+
25
+ The first iteration supports only providers already implemented by Quiver:
26
+
27
+ - `codex`
28
+ - `claude`
29
+ - `gemini`
30
+
31
+ Do not expose Qwen or other providers in the main selector until Quiver has a real provider adapter for them.
32
+
33
+ ### Known Model Catalog
34
+
35
+ Add a local, versioned model catalog owned by Quiver. The catalog is advisory, not a guarantee that a model is enabled for the user's account.
36
+
37
+ Required catalog metadata:
38
+
39
+ - provider id;
40
+ - model id;
41
+ - display name;
42
+ - aliases;
43
+ - recommended roles;
44
+ - cost tier;
45
+ - quality tier;
46
+ - stability;
47
+ - notes;
48
+ - catalog version;
49
+ - last updated date.
50
+
51
+ Required Codex entries:
52
+
53
+ - `gpt-5.5` / `GPT 5.5`
54
+ - `gpt-5.4` / `GPT 5.4`
55
+ - `gpt-5.4-mini` / `GPT 5.4 mini`
56
+ - `gpt-5.3-codex` / `GPT 5.3 Codex`
57
+ - `gpt-5.3-codex-spark` / `GPT 5.3 Codex Spark`
58
+ - `custom`
59
+
60
+ Required Claude entries:
61
+
62
+ - `opus` / `Claude Opus`
63
+ - `sonnet` / `Claude Sonnet`
64
+ - `haiku` / `Claude Haiku`
65
+ - versioned known entries for Opus, Sonnet, and Haiku where Quiver documents them as known local catalog choices;
66
+ - `custom`
67
+
68
+ Required Gemini entries:
69
+
70
+ - `gemini-3.1-pro-preview` / `Gemini 3.1 Pro Preview`
71
+ - `gemini-3.5-flash` / `Gemini 3.5 Flash`
72
+ - `gemini-3.1-flash-lite` / `Gemini 3.1 Flash-Lite`
73
+ - `gemini-3.1-pro-preview-customtools` / `Gemini 3.1 Pro Custom Tools`
74
+ - `custom`
75
+
76
+ Use the phrase "known by Quiver" in human output. Do not call catalog entries "available" unless a live validation has passed.
77
+
78
+ ### Agent Profile Contract
79
+
80
+ The persisted profile must separate technical and human values:
81
+
82
+ ```json
83
+ {
84
+ "provider": "codex",
85
+ "model": "gpt-5.5",
86
+ "displayName": "GPT 5.5",
87
+ "modelSource": "catalog",
88
+ "validation_status": "not-tested"
89
+ }
90
+ ```
91
+
92
+ Rules:
93
+
94
+ - `model` is the technical id sent to the provider CLI.
95
+ - `displayName` is the human label shown in Quiver output.
96
+ - Existing v2 profiles remain readable.
97
+ - New fields must be optional unless a schema bump is required.
98
+ - Profiles must never store provider secrets.
99
+
100
+ ### Interactive Agent Setup
101
+
102
+ When a user runs:
103
+
104
+ ```bash
105
+ npx create-quiver ai agent set planner
106
+ ```
107
+
108
+ in an interactive terminal, Quiver should guide setup:
109
+
110
+ 1. show existing role profiles if present;
111
+ 2. ask whether to update current profile, create a new profile, change default, or cancel;
112
+ 3. show provider choices with CLI install status;
113
+ 4. show known models for the selected provider, ordered by the requested role;
114
+ 5. allow `custom`;
115
+ 6. show a summary before writing;
116
+ 7. optionally run a live validation test before saving.
117
+
118
+ In CI/no-TTY, the same command must not hang. It must fail with an actionable message asking for explicit `--provider` and `--model`.
119
+
120
+ ### Alias Normalization
121
+
122
+ Known aliases must be matched case-insensitively and tolerate spaces, dashes, and common title casing.
123
+
124
+ Examples that must resolve to `gpt-5.5`:
125
+
126
+ - `GPT 5.5`
127
+ - `gpt 5.5`
128
+ - `Gpt-5.5`
129
+ - `gpt-5.5`
130
+
131
+ When a command receives a known display alias through `--model`, Quiver must normalize it or block before provider execution with a concrete suggestion.
132
+
133
+ ### Custom Models
134
+
135
+ Users can select or pass custom models. Quiver should allow them, but mark them as not validated unless a live provider test passes.
136
+
137
+ For `custom`, prompt for:
138
+
139
+ - technical model id;
140
+ - display name, defaulting to the id.
141
+
142
+ ### Optional Live Validation
143
+
144
+ Interactive setup may offer a live validation:
145
+
146
+ ```txt
147
+ This test executes the provider and may consume tokens.
148
+ ```
149
+
150
+ Validation prompt:
151
+
152
+ ```txt
153
+ Respond exactly: ok
154
+ ```
155
+
156
+ Default timeout: 60 seconds.
157
+
158
+ If output contains `ok`, mark validation passed. If it fails, do not save by default and show the relevant provider error.
159
+
160
+ ### Agent Doctor and Repair
161
+
162
+ Add diagnostics for existing profiles:
163
+
164
+ - missing provider;
165
+ - missing model;
166
+ - unsupported provider;
167
+ - display alias stored in `model`;
168
+ - custom model not validated;
169
+ - provider CLI missing;
170
+ - provider model flag unsupported;
171
+ - duplicate display names;
172
+ - multiple profiles per role and default profile.
173
+
174
+ Add dry-run repair:
175
+
176
+ ```bash
177
+ npx create-quiver ai agent repair --dry-run
178
+ ```
179
+
180
+ It must propose changes without writing files. If a write mode is added, it must require explicit confirmation or `--yes`.
181
+
182
+ ### AI Models List
183
+
184
+ Add:
185
+
186
+ ```bash
187
+ npx create-quiver ai models list
188
+ npx create-quiver ai models list --provider codex
189
+ npx create-quiver ai models list --json
190
+ ```
191
+
192
+ Human output must group by provider and show recommended roles. JSON output must include `catalogVersion` and `lastUpdated`.
193
+
194
+ ### Shared Preflight
195
+
196
+ The model resolution and preflight logic must be shared by profile setup and live AI commands:
197
+
198
+ - `ai prepare-context`
199
+ - `ai onboard`
200
+ - `ai plan`
201
+ - `ai review-plan`
202
+ - `ai revise`
203
+ - `ai repair-plan`
204
+ - `ai execute-slice`
205
+ - `ai execute-plan`
206
+
207
+ Any live provider execution must block before invoking the provider when a known bad model/display alias can be corrected safely.
208
+
209
+ ### Provider Error Extraction
210
+
211
+ Provider errors can include noisy secondary lines, for example MCP auth warnings. Quiver must prioritize actionable causes:
212
+
213
+ 1. invalid or unsupported model;
214
+ 2. provider auth;
215
+ 3. CLI missing;
216
+ 4. timeout;
217
+ 5. secondary tool/MCP warnings.
218
+
219
+ When possible, replace generic `provider run failed` with the provider's useful message plus suggested Quiver commands.
220
+
221
+ ### Documentation
222
+
223
+ Update repository docs and generated templates:
224
+
225
+ - `README.md` when the public onboarding flow needs a short mention;
226
+ - `README_FOR_AI.md` as source of truth;
227
+ - `ROADMAP.md`;
228
+ - `docs/CLI_UX_GUIDE.md`;
229
+ - `docs/reference/commands.md`;
230
+ - `docs/COMMANDS.md.template`;
231
+ - generated onboarding docs/templates if agent setup guidance is exposed to new projects.
232
+
233
+ Docs must explain:
234
+
235
+ - `model` vs `displayName`;
236
+ - known catalog vs account availability;
237
+ - interactive setup;
238
+ - no-TTY/script setup;
239
+ - `ai models list`;
240
+ - `ai agent doctor`;
241
+ - `ai agent repair --dry-run`;
242
+ - how to repair profiles from Quiver versions before this spec.
243
+
244
+ ## Acceptance Criteria
245
+
246
+ ### Interactive Setup
247
+
248
+ - Given a Quiver project, when `ai agent set planner` runs in a TTY without provider/model flags, then Quiver shows an interactive provider selector.
249
+ - Given the provider selector, when providers are listed, then Codex, Claude, and Gemini are shown with CLI install status.
250
+ - Given a selected provider, when the model selector opens, then Quiver shows models known by Quiver plus `custom`.
251
+ - Given a known model selection, when the profile is saved, then `model` contains the technical id and `displayName` contains the human label.
252
+ - Given an existing profile, when interactive setup starts, then Quiver shows the current profile and lets the user update, create, change default, or cancel.
253
+ - Given a canceled selector, then Quiver writes no files and reports configuration canceled.
254
+
255
+ ### Non-Interactive Safety
256
+
257
+ - Given CI/no-TTY, when `ai agent set planner` lacks enough flags, then Quiver exits without hanging and prints explicit flag guidance.
258
+ - Given a scripted command with `--provider` and `--model`, then Quiver preserves non-interactive behavior.
259
+ - Given `--dry-run` and a known alias, then Quiver previews the normalized profile without writing.
260
+
261
+ ### Catalog and Alias Behavior
262
+
263
+ - Given Codex, Claude, or Gemini, when models are listed, then the required catalog entries and `custom` are present.
264
+ - Given `GPT 5.5`, `gpt 5.5`, `Gpt-5.5`, or `gpt-5.5`, when the value is normalized for Codex, then the technical id resolves to `gpt-5.5`.
265
+ - Given an ambiguous alias, then Quiver does not choose automatically in non-interactive mode and requests explicit selection or a concrete model id.
266
+ - Given `custom`, then Quiver asks for technical id and display name, defaulting display name to the id.
267
+ - Given a catalog model that was not live-tested, then Quiver describes it as known by Quiver, not available.
268
+
269
+ ### Live Validation
270
+
271
+ - Given a user chooses live validation, then Quiver warns that the test can consume tokens before provider execution.
272
+ - Given the validation returns output containing `ok`, then Quiver marks the profile as validation passed.
273
+ - Given validation fails or times out, then Quiver does not save a passing validation state and shows the relevant error.
274
+ - Given provider stderr includes secrets or sensitive-looking tokens, then Quiver redacts them before output or saved evidence.
275
+
276
+ ### Doctor and Repair
277
+
278
+ - Given multiple profiles per role, `ai agent doctor` evaluates every profile and identifies the default.
279
+ - Given an unsupported provider, doctor marks it as `error`.
280
+ - Given a custom model not validated, doctor marks it as `warning`.
281
+ - Given a display alias stored in `model`, doctor reports the issue and suggests `ai agent repair --dry-run`.
282
+ - Given `ai agent repair --dry-run`, Quiver shows proposed before/after changes without modifying files.
283
+ - Given `ai agent repair` without `--dry-run`, Quiver does not write without explicit confirmation or `--yes`.
284
+
285
+ ### AI Models List
286
+
287
+ - Given `ai models list`, output is grouped by provider and includes recommended roles.
288
+ - Given `ai models list --provider codex`, output only includes Codex catalog entries.
289
+ - Given `ai models list --json`, output is valid JSON without colors or prose and includes `catalogVersion` and `lastUpdated`.
290
+
291
+ ### Shared Preflight and Provider Errors
292
+
293
+ - Given any live AI command receives `--model "GPT 5.5"`, Quiver normalizes or blocks with suggestion before invoking the provider.
294
+ - Given a profile with `model: "GPT 5.5"`, `ai prepare-context --with-planner` blocks before calling Codex and suggests `model: gpt-5.5`, `displayName: GPT 5.5`.
295
+ - Given the provider emits multiple errors and one is an invalid model, Quiver reports invalid model as the primary cause.
296
+ - Given dry-run for a provider/model, Quiver shows the real command that would execute.
297
+
298
+ ### Documentation and Release Readiness
299
+
300
+ - Given the docs are read after implementation, they explain `model` vs `displayName`, known catalog limitations, setup flows, doctor, repair, and model listing.
301
+ - Given generated project templates are inspected, they include current agent setup guidance where appropriate.
302
+ - Given package readiness runs, tests cover catalog, aliases, selectors, no-TTY, JSON, doctor, repair, provider error extraction, and legacy profile compatibility.
303
+ - Given package dry-run runs, the catalog is included and local `.quiver/` state is not published.
304
+
305
+ ## Non-Scope
306
+
307
+ - Remote API for dynamic model catalog updates.
308
+ - Qwen provider support before an adapter exists.
309
+ - Installing provider CLIs.
310
+ - Editing provider credentials.
311
+ - Guaranteeing account-level model access without a live validation.
312
+ - Publishing npm as part of implementation.
313
+
314
+ ## Technical Plan
315
+
316
+ 1. Create `src/create-quiver/lib/ai/model-catalog.js` as the single source of truth.
317
+ 2. Add alias normalization and model resolution helpers.
318
+ 3. Extend agent profile setup with interactive provider/model selection.
319
+ 4. Preserve non-interactive/CI behavior and add no-TTY guardrails.
320
+ 5. Add `ai agent doctor` and `ai agent repair --dry-run`.
321
+ 6. Add shared model preflight for every live AI command.
322
+ 7. Improve provider error extraction and actionable messages.
323
+ 8. Add `ai models list` with human and JSON output.
324
+ 9. Update docs, templates, and source-of-truth guidance.
325
+ 10. Add tests, smokes, package dry-run, and final evidence.
326
+
327
+ ## Risks
328
+
329
+ - Model catalogs can become stale.
330
+ - Provider CLIs can change model flags or behavior.
331
+ - Live validation can consume tokens.
332
+ - Some accounts can lack access to catalog models.
333
+ - Existing profiles may contain user-specific custom values.
334
+
335
+ ## Rollback
336
+
337
+ Revert slice commits in reverse order. The current free-form `model` path must remain available through non-interactive flags and custom model support.
@@ -0,0 +1,30 @@
1
+ # Status - Quiver v31 AI Model Catalog and Agent Selection
2
+
3
+ **Overall status:** Release-ready, pending PR/package publication
4
+ **Created:** 2026-05-27
5
+ **Current slice:** slice-07 completed
6
+
7
+ ## Summary
8
+
9
+ This spec improves AI agent setup by adding a local model catalog, provider/model selectors, alias normalization, profile diagnostics, repair dry-runs, shared model preflight, clearer provider errors, command documentation, generated-template guidance, and release-readiness evidence.
10
+
11
+ ## Slice Status
12
+
13
+ | Slice | Status | Notes |
14
+ |---|---|---|
15
+ | slice-00-spec-foundation | Completed | Documentation package created, source-of-truth docs synchronized, validation passed. |
16
+ | slice-01-model-catalog-alias-normalization | Completed | Local catalog, role metadata, aliases, custom model support, and profile normalization added. |
17
+ | slice-02-interactive-agent-set-selectors | Completed | Guided `ai agent set <role>` provider/model flow, no-TTY guardrails, custom models, and profile actions added. |
18
+ | slice-03-agent-doctor-repair | Completed | Profile diagnostics, JSON output, error exit codes, and dry-run alias repair added. |
19
+ | slice-04-shared-preflight-provider-errors | Completed | Shared alias preflight, CLI override normalization, and provider error extraction added. |
20
+ | slice-05-ai-models-list | Completed | `ai models list` human/JSON output, provider filter, and help contract added. |
21
+ | slice-06-docs-templates-alignment | Completed | README, command reference, CLI UX guide, AI templates, roadmap, and AI source of truth aligned with the model/profile contract. |
22
+ | slice-07-tests-smokes-release-readiness | Completed | Full suite, smokes, package safety, npm pack dry-run, spec validation, and final evidence completed. |
23
+
24
+ ## Current Blockers
25
+
26
+ - None. Implementation must begin with `slice-00`.
27
+
28
+ ## Next Step
29
+
30
+ Open the PR or publish only after explicit human approval.
@@ -0,0 +1,98 @@
1
+ ## Title
2
+
3
+ Quiver v31: AI model catalog and guided agent setup
4
+
5
+ ## Summary
6
+
7
+ - Adds a local Quiver model catalog for Codex, Claude, and Gemini.
8
+ - Separates technical model ids from human display names.
9
+ - Adds guided provider/model selection for agent profiles.
10
+ - Adds diagnostics and repair dry-run for existing profile misconfigurations.
11
+ - Improves live AI command preflight and provider error messages.
12
+
13
+ ## Scope
14
+
15
+ - Local model catalog and alias normalization.
16
+ - Interactive `ai agent set <role>` provider/model flow.
17
+ - `ai models list`.
18
+ - `ai agent doctor`.
19
+ - `ai agent repair --dry-run`.
20
+ - Shared model preflight for live AI commands.
21
+ - Better invalid-model/provider error extraction.
22
+ - Documentation, templates, tests, smokes, and package readiness.
23
+
24
+ ## Files
25
+
26
+ Expected areas:
27
+
28
+ - `src/create-quiver/lib/ai/model-catalog.js`
29
+ - `src/create-quiver/lib/agent-profiles.js`
30
+ - `src/create-quiver/lib/ai/providers.js`
31
+ - `src/create-quiver/lib/cli/selectors.js`
32
+ - `src/create-quiver/commands/ai.js`
33
+ - `docs/**`
34
+ - `README.md`
35
+ - `README_FOR_AI.md`
36
+ - `ROADMAP.md`
37
+ - `tests/**`
38
+ - `specs/quiver-v31-ai-model-catalog-agent-selection/**`
39
+
40
+ ## How to Test (DETAILED - REQUIRED)
41
+
42
+ ### Required Environment
43
+
44
+ - Node.js and npm.
45
+ - Optional provider CLIs for live validation smoke tests.
46
+ - A terminal that can run both TTY and no-TTY command checks.
47
+
48
+ ### Worktree Access
49
+
50
+ - One dedicated branch/worktree for `quiver-v31-ai-model-catalog-agent-selection`.
51
+ - One commit per slice.
52
+
53
+ ### Run the Project
54
+
55
+ This is a CLI framework change. Run command-level tests and smoke commands from the Quiver repo root.
56
+
57
+ ### Use Cases
58
+
59
+ - Configure a planner interactively with Codex and a known model.
60
+ - Configure an executor with `custom`.
61
+ - Run `ai agent doctor` against legacy profile fixtures.
62
+ - Run `ai agent repair --dry-run` against `model: "GPT 5.5"`.
63
+ - Run `ai models list` and `ai models list --json`.
64
+ - Run `ai prepare-context --with-planner` with a bad display alias and verify Quiver blocks before Codex execution.
65
+ - Verify no-TTY and JSON outputs do not prompt or colorize.
66
+
67
+ ### Technical Verification
68
+
69
+ - `node --test tests/**/*.test.js`
70
+ - `npm run smoke:create-quiver`
71
+ - `npm run smoke:doctor-fixtures`
72
+ - `npm run smoke:guided-workflow`
73
+ - `npm run package:quiver`
74
+ - `npm pack --dry-run`
75
+ - `git diff --check`
76
+ - `node bin/create-quiver.js spec validate specs/quiver-v31-ai-model-catalog-agent-selection`
77
+
78
+ ## Evidence
79
+
80
+ - `node --test tests/**/*.test.js` passed: 482 tests.
81
+ - `npm run smoke:create-quiver` passed.
82
+ - `npm run smoke:doctor-fixtures` passed: 13 fixture states.
83
+ - `npm run smoke:guided-workflow` passed.
84
+ - `npm run package:quiver` passed.
85
+ - `npm pack --dry-run` passed.
86
+ - `git diff --check` passed.
87
+ - `node bin/create-quiver.js spec validate specs/quiver-v31-ai-model-catalog-agent-selection` passed.
88
+
89
+ ## Rollback
90
+
91
+ Revert slice commits in reverse order. Free-form custom model support and non-interactive profile setup must remain available during rollback.
92
+
93
+ ## Risks / Notes
94
+
95
+ - Catalog models are known by Quiver, not guaranteed available for every account.
96
+ - Live validation can consume tokens and must be opt-in.
97
+ - Provider CLI behavior can change across versions.
98
+ - Existing profiles can contain legitimate custom values and must not be overwritten without explicit confirmation.
@@ -0,0 +1,30 @@
1
+ # CLOSURE_BRIEF - slice-00 Spec foundation and source-of-truth sync
2
+
3
+ ## Summary
4
+
5
+ Created the approved v31 spec package and synchronized source-of-truth docs to record the planned AI model catalog and guided agent setup work.
6
+
7
+ ## Validation Against Acceptance Criteria
8
+
9
+ - [x] Spec package exists and validates.
10
+ - [x] Source-of-truth docs mention v31 as planned.
11
+ - [x] No product code was modified.
12
+ - [x] Evidence report updated.
13
+
14
+ ## Relevant Changes
15
+
16
+ - Added `specs/quiver-v31-ai-model-catalog-agent-selection/**`.
17
+ - Updated `README_FOR_AI.md`.
18
+ - Updated `ROADMAP.md`.
19
+
20
+ ## Pending
21
+
22
+ - Implement `slice-01-model-catalog-alias-normalization`.
23
+
24
+ ## Remaining Risks
25
+
26
+ - Local `main` is ahead of `origin/main` by the prior `v0.15.0` release commit. This is unrelated to v31 implementation but should be resolved before the next package release.
27
+
28
+ ## Future Recommendations
29
+
30
+ Execute implementation slices only after this documentary foundation is committed.
@@ -0,0 +1,51 @@
1
+ # EXECUTION_BRIEF - slice-00 Spec foundation and source-of-truth sync
2
+
3
+ ## Context
4
+
5
+ The v31 requirements and technical plan were approved to improve AI agent model selection after a real Codex failure caused by `model: "GPT 5.5"` instead of `model: "gpt-5.5"`.
6
+
7
+ ## Objective
8
+
9
+ Publish the approved v31 spec package and synchronize source-of-truth docs without implementing product code.
10
+
11
+ ## Scope
12
+
13
+ - `specs/quiver-v31-ai-model-catalog-agent-selection/**`
14
+ - `README_FOR_AI.md`
15
+ - `ROADMAP.md`
16
+
17
+ ## Acceptance Criteria
18
+
19
+ - The v31 spec package exists and validates.
20
+ - Every slice has `slice.json`, `EXECUTION_BRIEF.md`, and `CLOSURE_BRIEF.md`.
21
+ - Source-of-truth docs mention v31 as planned.
22
+ - No product code is modified.
23
+
24
+ ## Technical Plan Summary
25
+
26
+ Create the documentation foundation first so later executors can work from bounded slice handoffs.
27
+
28
+ ## Suggested Steps
29
+
30
+ 1. Review this spec package for completeness.
31
+ 2. Update `README_FOR_AI.md` and `ROADMAP.md` to mark v31 as planned.
32
+ 3. Run spec validation.
33
+ 4. Update `EVIDENCE_REPORT.md`, `STATUS.md`, and this closure brief.
34
+
35
+ ## Restrictions
36
+
37
+ - Do not implement product code.
38
+ - Do not change package version.
39
+ - Do not claim npm publication.
40
+
41
+ ## Risks
42
+
43
+ - Source-of-truth docs can drift if v31 is not mentioned.
44
+ - The local repo may contain a pending release commit; do not alter it unless explicitly requested.
45
+
46
+ ## Completion Checklist
47
+
48
+ - [ ] Source-of-truth docs synchronized.
49
+ - [ ] Spec validation passes.
50
+ - [ ] Evidence recorded.
51
+ - [ ] No product code changed.
@@ -0,0 +1,62 @@
1
+ {
2
+ "slice_id": "slice-00-spec-foundation",
3
+ "ticket": "QUIVER-31-00",
4
+ "type": "documentation",
5
+ "title": "Spec foundation and source-of-truth sync",
6
+ "objective": "Publish the approved v31 spec package and synchronize source-of-truth docs before implementation.",
7
+ "description": "Creates the spec, execution plan, PR body, evidence report, slice definitions, and handoffs for AI model catalog and guided agent setup.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "v31-ai-model-catalog-agent-selection",
12
+ "branch_name": "feature/QUIVER-31-v31-ai-model-catalog-agent-selection"
13
+ },
14
+ "files": [
15
+ "README_FOR_AI.md",
16
+ "ROADMAP.md",
17
+ "specs/quiver-v31-ai-model-catalog-agent-selection/**"
18
+ ],
19
+ "expected_read_paths": [
20
+ "README_FOR_AI.md",
21
+ "ROADMAP.md",
22
+ "specs/quiver-v31-ai-model-catalog-agent-selection/SPEC.md"
23
+ ],
24
+ "allowed_write_paths": [
25
+ "README_FOR_AI.md",
26
+ "ROADMAP.md",
27
+ "specs/quiver-v31-ai-model-catalog-agent-selection/**"
28
+ ],
29
+ "depends_on": [],
30
+ "parallel_safe": "no",
31
+ "parallel_safe_reason": "The documentary foundation must land before every implementation slice.",
32
+ "must": [
33
+ "Commit the approved v31 spec package.",
34
+ "Ensure every slice has slice.json, EXECUTION_BRIEF.md, and CLOSURE_BRIEF.md.",
35
+ "Mark v31 as planned in source-of-truth docs without claiming implementation or npm publication.",
36
+ "Run spec validation and diff checks."
37
+ ],
38
+ "not_included": [
39
+ "Implementing product code.",
40
+ "Publishing npm.",
41
+ "Changing package version."
42
+ ],
43
+ "acceptance": [
44
+ "The v31 spec package exists and validates.",
45
+ "Source-of-truth docs mention v31 as planned.",
46
+ "No product code is modified.",
47
+ "Evidence report records documentation validation."
48
+ ],
49
+ "tests": [
50
+ "git diff --check",
51
+ "node bin/create-quiver.js spec validate specs/quiver-v31-ai-model-catalog-agent-selection"
52
+ ],
53
+ "validation_hints": [
54
+ "Confirm README_FOR_AI.md does not say v31 is implemented.",
55
+ "Confirm ROADMAP.md does not say v31 is shipped."
56
+ ],
57
+ "estimated_hours": 2,
58
+ "status": "completed",
59
+ "blocked_reason": null,
60
+ "actual_hours": 2,
61
+ "completed_at": "2026-05-27"
62
+ }
@@ -0,0 +1,32 @@
1
+ # CLOSURE_BRIEF - slice-01 Local model catalog and alias normalization
2
+
3
+ ## Summary
4
+
5
+ Implemented the local AI model catalog and connected known alias normalization to agent profile creation.
6
+
7
+ ## Validation Against Acceptance Criteria
8
+
9
+ - [x] Catalog entries added.
10
+ - [x] Alias normalization implemented.
11
+ - [x] Custom models still allowed.
12
+ - [x] Legacy profile compatibility preserved.
13
+
14
+ ## Relevant Changes
15
+
16
+ - Added `src/create-quiver/lib/ai/model-catalog.js`.
17
+ - Updated `src/create-quiver/lib/agent-profiles.js`.
18
+ - Added `tests/lib/model-catalog.test.js`.
19
+ - Updated `tests/lib/agent-profiles.test.js`.
20
+
21
+ ## Pending
22
+
23
+ - Interactive setup, doctor/repair, live preflight, models list, and docs remain for later slices.
24
+
25
+ ## Remaining Risks
26
+
27
+ - Catalog freshness remains a known operational risk until a future remote catalog exists.
28
+ - Live provider availability is not guaranteed by catalog presence.
29
+
30
+ ## Future Recommendations
31
+
32
+ Keep the catalog as the single source of truth until a remote catalog API exists.