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,53 @@
1
+ # EXECUTION_BRIEF - slice-01 Local model catalog and alias normalization
2
+
3
+ ## Context
4
+
5
+ Quiver currently stores free-form model labels. Users can accidentally save display names as provider model ids, causing live provider failures.
6
+
7
+ ## Objective
8
+
9
+ Create Quiver's local model catalog and shared alias normalization helpers.
10
+
11
+ ## Scope
12
+
13
+ - `src/create-quiver/lib/ai/model-catalog.js`
14
+ - `src/create-quiver/lib/agent-profiles.js`
15
+ - related unit tests
16
+
17
+ ## Acceptance Criteria
18
+
19
+ - Required Codex, Claude, and Gemini entries exist.
20
+ - Catalog includes version and last updated date.
21
+ - Aliases normalize case-insensitively and tolerate spaces/dashes.
22
+ - `GPT 5.5`, `gpt 5.5`, `Gpt-5.5`, and `gpt-5.5` resolve to `gpt-5.5`.
23
+ - Existing v2 profiles remain readable.
24
+ - Custom models remain allowed.
25
+
26
+ ## Technical Plan Summary
27
+
28
+ Add pure catalog/model-resolution helpers first. Later slices consume these helpers for prompts, doctor, repair, and live command preflight.
29
+
30
+ ## Suggested Steps
31
+
32
+ 1. Add `model-catalog.js`.
33
+ 2. Add helpers for listing providers/models, defaults by role, alias matching, and normalization.
34
+ 3. Extend profile building to use normalization where safe.
35
+ 4. Add tests for catalog shape and aliases.
36
+
37
+ ## Restrictions
38
+
39
+ - Do not add prompts.
40
+ - Do not execute provider CLIs.
41
+ - Do not add remote catalog calls.
42
+
43
+ ## Risks
44
+
45
+ - Catalog entries can become stale.
46
+ - Alias collisions must not silently choose a model.
47
+
48
+ ## Completion Checklist
49
+
50
+ - [ ] Catalog helpers implemented.
51
+ - [ ] Alias normalization tested.
52
+ - [ ] Legacy profile compatibility tested.
53
+ - [ ] `git diff --check` passes.
@@ -0,0 +1,72 @@
1
+ {
2
+ "slice_id": "slice-01-model-catalog-alias-normalization",
3
+ "ticket": "QUIVER-31-01",
4
+ "type": "feature",
5
+ "title": "Local model catalog and alias normalization",
6
+ "objective": "Create Quiver's local provider/model catalog and shared model resolution helpers.",
7
+ "description": "Adds the source of truth for known providers, model ids, display names, aliases, role recommendations, metadata, and normalization.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "v31-model-catalog-alias-normalization",
12
+ "branch_name": "feature/QUIVER-31-01-v31-model-catalog-alias-normalization"
13
+ },
14
+ "files": [
15
+ "src/create-quiver/lib/ai/model-catalog.js",
16
+ "src/create-quiver/lib/agent-profiles.js",
17
+ "tests/lib/model-catalog.test.js",
18
+ "tests/lib/agent-profiles.test.js"
19
+ ],
20
+ "expected_read_paths": [
21
+ "SPEC.md",
22
+ "src/create-quiver/lib/ai/providers.js",
23
+ "src/create-quiver/lib/agent-profiles.js",
24
+ "tests/lib/ai-providers.test.js",
25
+ "tests/lib/agent-profiles.test.js"
26
+ ],
27
+ "allowed_write_paths": [
28
+ "src/create-quiver/lib/ai/model-catalog.js",
29
+ "src/create-quiver/lib/agent-profiles.js",
30
+ "tests/lib/model-catalog.test.js",
31
+ "tests/lib/agent-profiles.test.js",
32
+ "specs/quiver-v31-ai-model-catalog-agent-selection/**"
33
+ ],
34
+ "depends_on": [
35
+ "slice-00-spec-foundation"
36
+ ],
37
+ "parallel_safe": "no",
38
+ "parallel_safe_reason": "Catalog helpers are foundational for later selectors, doctor, repair, and preflight slices.",
39
+ "must": [
40
+ "Add a versioned catalog with catalogVersion and lastUpdated.",
41
+ "Include Codex, Claude, and Gemini models required by the spec.",
42
+ "Support aliases, role recommendations, cost/quality/stability metadata, and custom entries.",
43
+ "Normalize aliases case-insensitively and with tolerant spacing/dashes.",
44
+ "Keep existing v2 agent profiles readable.",
45
+ "Expose pure helpers that can be unit-tested without a TTY."
46
+ ],
47
+ "not_included": [
48
+ "Interactive prompts.",
49
+ "Live provider execution.",
50
+ "Remote catalog API."
51
+ ],
52
+ "acceptance": [
53
+ "All required model entries are available through the catalog.",
54
+ "`GPT 5.5`, `gpt 5.5`, `Gpt-5.5`, and `gpt-5.5` resolve to `gpt-5.5` for Codex.",
55
+ "Ambiguous aliases do not silently choose a model.",
56
+ "Custom models remain allowed with metadata indicating they are not catalog-validated.",
57
+ "Tests cover catalog shape, defaults, aliases, and legacy profile compatibility."
58
+ ],
59
+ "tests": [
60
+ "node --test tests/lib/model-catalog.test.js tests/lib/agent-profiles.test.js",
61
+ "git diff --check"
62
+ ],
63
+ "validation_hints": [
64
+ "Test pure functions directly instead of prompt flows.",
65
+ "Do not call provider CLIs in this slice."
66
+ ],
67
+ "estimated_hours": 6,
68
+ "status": "completed",
69
+ "blocked_reason": null,
70
+ "actual_hours": 5,
71
+ "completed_at": "2026-05-27"
72
+ }
@@ -0,0 +1,36 @@
1
+ # CLOSURE_BRIEF - slice-02 Interactive agent set provider and model selectors
2
+
3
+ ## Summary
4
+
5
+ Implemented guided provider/model resolution for `ai agent set <role>`.
6
+ The command now supports interactive provider/model selectors when TTY prompts are available, requires explicit `--provider` and `--model` in non-interactive mode, supports existing profile actions, custom model ids, and a write summary before saving.
7
+
8
+ ## Validation Against Acceptance Criteria
9
+
10
+ - [x] Interactive setup works through injectable selector helpers.
11
+ - [x] No-TTY guardrails fail clearly without hanging.
12
+ - [x] Existing profiles can be updated, extended, switched as default, or canceled before writes.
13
+ - [x] Custom model flow captures technical id and display name.
14
+ - [x] Known catalog selections write technical model ids and human display names.
15
+
16
+ ## Relevant Changes
17
+
18
+ - Added reusable `promptText` support to CLI selectors.
19
+ - Added provider/model selector resolution to `ai agent set`.
20
+ - Added provider CLI status hints for provider choices.
21
+ - Added role-ordered model choices from the local catalog.
22
+ - Made `ai agent` dispatch async-safe.
23
+ - Added tests for selector helpers, no-TTY behavior, interactive provider/model selection, custom models, and named profile creation.
24
+
25
+ ## Pending
26
+
27
+ - Live validation and repair remain deferred to later slices.
28
+
29
+ ## Remaining Risks
30
+
31
+ - Provider install status is best-effort and only detects CLI availability, not whether the selected account can run the chosen model.
32
+ - Interactive prompt rendering itself is covered through injected selectors rather than a real terminal e2e test.
33
+
34
+ ## Future Recommendations
35
+
36
+ Add richer live provider validation only after the selector flow is stable.
@@ -0,0 +1,56 @@
1
+ # EXECUTION_BRIEF - slice-02 Interactive agent set provider and model selectors
2
+
3
+ ## Context
4
+
5
+ Agent setup currently requires users to know provider ids and exact model ids. v30 added selector primitives; v31 uses them to guide agent model setup.
6
+
7
+ ## Objective
8
+
9
+ Make `ai agent set <role>` interactive in TTY mode when provider/model data is missing.
10
+
11
+ ## Scope
12
+
13
+ - `src/create-quiver/commands/ai.js`
14
+ - `src/create-quiver/lib/cli/selectors.js`
15
+ - `src/create-quiver/lib/agent-profiles.js`
16
+ - related tests
17
+
18
+ ## Acceptance Criteria
19
+
20
+ - TTY setup shows provider and model selectors.
21
+ - No-TTY/CI without required flags fails clearly.
22
+ - Existing profiles are summarized before changes.
23
+ - Users can update current, create new, change default, or cancel.
24
+ - Custom model flow collects technical id and display name.
25
+ - Cancellation writes no files.
26
+
27
+ ## Technical Plan Summary
28
+
29
+ Reuse catalog helpers from slice-01 and selector helpers from v30. Keep prompt logic injectable for tests.
30
+
31
+ ## Suggested Steps
32
+
33
+ 1. Add a resolver for interactive agent setup options.
34
+ 2. Add provider selector with CLI install status.
35
+ 3. Add model selector ordered by role recommendations.
36
+ 4. Add summary before writes.
37
+ 5. Add no-TTY guardrails.
38
+ 6. Add tests for TTY, no-TTY, cancellation, and custom.
39
+
40
+ ## Restrictions
41
+
42
+ - Do not implement agent doctor/repair here.
43
+ - Do not force live validation.
44
+ - Do not break scripted `--provider --model` usage.
45
+
46
+ ## Risks
47
+
48
+ - Interactive tests can be brittle if logic is not separated from rendering.
49
+ - Existing profile overwrite must be explicit.
50
+
51
+ ## Completion Checklist
52
+
53
+ - [ ] TTY flow implemented.
54
+ - [ ] No-TTY safety tested.
55
+ - [ ] Existing profile flow tested.
56
+ - [ ] Custom model flow tested.
@@ -0,0 +1,78 @@
1
+ {
2
+ "slice_id": "slice-02-interactive-agent-set-selectors",
3
+ "ticket": "QUIVER-31-02",
4
+ "type": "feature",
5
+ "title": "Interactive agent set provider and model selectors",
6
+ "objective": "Make `ai agent set <role>` guide users through provider and model selection in TTY mode.",
7
+ "description": "Adds a guided setup flow that shows providers, CLI install status, known models ordered by role, custom model input, summaries, cancellation, and no-TTY safeguards.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "v31-interactive-agent-set-selectors",
12
+ "branch_name": "feature/QUIVER-31-02-v31-interactive-agent-set-selectors"
13
+ },
14
+ "files": [
15
+ "src/create-quiver/commands/ai.js",
16
+ "src/create-quiver/lib/cli/selectors.js",
17
+ "src/create-quiver/lib/agent-profiles.js",
18
+ "tests/commands/ai-agent.test.js",
19
+ "tests/lib/cli-selectors.test.js"
20
+ ],
21
+ "expected_read_paths": [
22
+ "SPEC.md",
23
+ "src/create-quiver/lib/ai/model-catalog.js",
24
+ "src/create-quiver/lib/cli/selectors.js",
25
+ "src/create-quiver/lib/agent-profiles.js",
26
+ "tests/commands/ai-agent.test.js"
27
+ ],
28
+ "allowed_write_paths": [
29
+ "src/create-quiver/commands/ai.js",
30
+ "src/create-quiver/lib/cli/selectors.js",
31
+ "src/create-quiver/lib/agent-profiles.js",
32
+ "tests/commands/ai-agent.test.js",
33
+ "tests/lib/cli-selectors.test.js",
34
+ "specs/quiver-v31-ai-model-catalog-agent-selection/**"
35
+ ],
36
+ "depends_on": [
37
+ "slice-01-model-catalog-alias-normalization"
38
+ ],
39
+ "parallel_safe": "yes",
40
+ "parallel_safe_reason": "Can run in parallel with ai models list if command-file conflicts are coordinated.",
41
+ "must": [
42
+ "Open interactive setup automatically only in TTY when required flags are missing.",
43
+ "Fail clearly in no-TTY/CI when required flags are missing.",
44
+ "Show existing profiles before changes.",
45
+ "Support update current, create new, change default, and cancel.",
46
+ "Show provider CLI install status.",
47
+ "Order model choices by the requested role.",
48
+ "Support custom model id and display name.",
49
+ "Show a write summary before saving.",
50
+ "Do not write on cancellation."
51
+ ],
52
+ "not_included": [
53
+ "Agent doctor and repair.",
54
+ "Live validation execution unless a small reusable hook is needed and remains disabled by default.",
55
+ "Remote model catalog."
56
+ ],
57
+ "acceptance": [
58
+ "`ai agent set planner` in TTY shows provider/model selectors.",
59
+ "No-TTY command without flags fails without hanging.",
60
+ "Known model selection writes technical `model` and human `displayName`.",
61
+ "Custom selection writes a technical id and a default display name if none is provided.",
62
+ "Cancellation writes no profile changes.",
63
+ "Duplicate display names are distinguishable in selectors."
64
+ ],
65
+ "tests": [
66
+ "node --test tests/commands/ai-agent.test.js tests/lib/cli-selectors.test.js",
67
+ "git diff --check"
68
+ ],
69
+ "validation_hints": [
70
+ "Test prompt logic through injectable selector helpers.",
71
+ "Do not require a real interactive terminal in unit tests."
72
+ ],
73
+ "estimated_hours": 8,
74
+ "status": "completed",
75
+ "blocked_reason": null,
76
+ "actual_hours": 6,
77
+ "completed_at": "2026-05-27"
78
+ }
@@ -0,0 +1,36 @@
1
+ # CLOSURE_BRIEF - slice-03 Agent profile doctor and repair dry-run
2
+
3
+ ## Summary
4
+
5
+ Implemented `ai agent doctor` and `ai agent repair --dry-run` for existing agent profile diagnostics and safe repair previews.
6
+
7
+ ## Validation Against Acceptance Criteria
8
+
9
+ - [x] Doctor checks every configured profile, not only defaults.
10
+ - [x] Severity and exit codes behave correctly; errors set exit code 1.
11
+ - [x] Repair dry-run shows proposed changes only and writes no files.
12
+ - [x] Human and JSON output contracts pass.
13
+ - [x] Unsupported providers are errors.
14
+ - [x] Display aliases in `model` are detected and repairable.
15
+ - [x] Custom unvalidated models are warnings.
16
+
17
+ ## Relevant Changes
18
+
19
+ - Added pure doctor report and repair-plan builders in `agent-profiles.js`.
20
+ - Added `ai agent doctor` with human and JSON output.
21
+ - Added `ai agent repair --dry-run` with before/after repair previews.
22
+ - Updated help text to expose `ai agent doctor` and `ai agent repair`.
23
+ - Added CLI and library tests for invalid legacy profiles, alias repair, JSON output, and no-write repair behavior.
24
+
25
+ ## Pending
26
+
27
+ - Write-mode repair remains intentionally unavailable.
28
+
29
+ ## Remaining Risks
30
+
31
+ - Provider CLI checks are best-effort and do not prove account/model entitlement.
32
+ - Repair currently only normalizes safe catalog alias issues; unsupported providers and custom models still require human action.
33
+
34
+ ## Future Recommendations
35
+
36
+ Consider write-mode repair only after dry-run behavior is dogfooded.
@@ -0,0 +1,57 @@
1
+ # EXECUTION_BRIEF - slice-03 Agent profile doctor and repair dry-run
2
+
3
+ ## Context
4
+
5
+ Projects can already have misconfigured profiles. New selectors only help future setup, so existing profiles need diagnostics and safe repair previews.
6
+
7
+ ## Objective
8
+
9
+ Add `ai agent doctor` and `ai agent repair --dry-run`.
10
+
11
+ ## Scope
12
+
13
+ - `src/create-quiver/commands/ai.js`
14
+ - `src/create-quiver/lib/agent-profiles.js`
15
+ - `src/create-quiver/lib/ai/model-catalog.js`
16
+ - related tests
17
+
18
+ ## Acceptance Criteria
19
+
20
+ - Doctor evaluates all profiles and identifies defaults.
21
+ - Findings use `error`, `warning`, and `info`.
22
+ - Unsupported providers are errors.
23
+ - Custom unvalidated models are warnings.
24
+ - Display aliases stored in `model` are detected.
25
+ - Repair dry-run shows before/after changes without writes.
26
+ - Human output uses `Checks` and `Suggested fixes`; JSON is clean.
27
+
28
+ ## Technical Plan Summary
29
+
30
+ Build profile diagnostics as pure data first, then render human/JSON outputs from that shared report.
31
+
32
+ ## Suggested Steps
33
+
34
+ 1. Add profile issue classifier.
35
+ 2. Add doctor report builder.
36
+ 3. Add human and JSON renderers.
37
+ 4. Add repair proposal builder.
38
+ 5. Wire commands.
39
+ 6. Add fixture tests for legacy bad profiles.
40
+
41
+ ## Restrictions
42
+
43
+ - Do not auto-write repairs by default.
44
+ - Do not install provider CLIs.
45
+ - Do not mark catalog models as available without live validation.
46
+
47
+ ## Risks
48
+
49
+ - Doctor can become noisy if severities are weak.
50
+ - Repair must preserve legitimate custom values.
51
+
52
+ ## Completion Checklist
53
+
54
+ - [ ] Doctor command implemented.
55
+ - [ ] Repair dry-run implemented.
56
+ - [ ] JSON outputs tested.
57
+ - [ ] Legacy bad-profile fixture tested.
@@ -0,0 +1,77 @@
1
+ {
2
+ "slice_id": "slice-03-agent-doctor-repair",
3
+ "ticket": "QUIVER-31-03",
4
+ "type": "feature",
5
+ "title": "Agent profile doctor and repair dry-run",
6
+ "objective": "Diagnose existing agent profile issues and preview safe repairs without writing files.",
7
+ "description": "Adds `ai agent doctor` and `ai agent repair --dry-run` for missing data, unsupported providers, display aliases stored as model ids, custom unvalidated models, duplicate labels, and missing provider CLIs.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "v31-agent-doctor-repair",
12
+ "branch_name": "feature/QUIVER-31-03-v31-agent-doctor-repair"
13
+ },
14
+ "files": [
15
+ "src/create-quiver/commands/ai.js",
16
+ "src/create-quiver/lib/agent-profiles.js",
17
+ "src/create-quiver/lib/ai/model-catalog.js",
18
+ "tests/commands/ai-agent.test.js",
19
+ "tests/lib/agent-profiles.test.js"
20
+ ],
21
+ "expected_read_paths": [
22
+ "SPEC.md",
23
+ "src/create-quiver/lib/agent-profiles.js",
24
+ "src/create-quiver/lib/ai/model-catalog.js",
25
+ "src/create-quiver/lib/cli/ux.js",
26
+ "tests/commands/ai-agent.test.js"
27
+ ],
28
+ "allowed_write_paths": [
29
+ "src/create-quiver/commands/ai.js",
30
+ "src/create-quiver/lib/agent-profiles.js",
31
+ "src/create-quiver/lib/ai/model-catalog.js",
32
+ "tests/commands/ai-agent.test.js",
33
+ "tests/lib/agent-profiles.test.js",
34
+ "specs/quiver-v31-ai-model-catalog-agent-selection/**"
35
+ ],
36
+ "depends_on": [
37
+ "slice-01-model-catalog-alias-normalization",
38
+ "slice-02-interactive-agent-set-selectors"
39
+ ],
40
+ "parallel_safe": "no",
41
+ "parallel_safe_reason": "Doctor and repair depend on catalog issue classification and may share command wiring with selectors.",
42
+ "must": [
43
+ "Add human and JSON output for `ai agent doctor`.",
44
+ "Evaluate every profile, not only defaults.",
45
+ "Classify findings as error, warning, or info.",
46
+ "Set exit code 1 when errors exist.",
47
+ "Add `ai agent repair --dry-run` with before/after proposed changes.",
48
+ "Prevent repair writes without explicit confirmation or `--yes` if write mode is implemented.",
49
+ "Use v30 human output hierarchy with Checks and Suggested fixes."
50
+ ],
51
+ "not_included": [
52
+ "Remote validation against provider APIs.",
53
+ "Automatic destructive profile rewrites.",
54
+ "Installing provider CLIs."
55
+ ],
56
+ "acceptance": [
57
+ "Doctor reports unsupported providers as errors.",
58
+ "Doctor reports custom unvalidated models as warnings.",
59
+ "Doctor detects `model: \"GPT 5.5\"` and suggests repair.",
60
+ "Repair dry-run shows normalized `model: gpt-5.5` and `displayName: GPT 5.5` without writing.",
61
+ "`--json` outputs parseable JSON without human prose.",
62
+ "Human output uses Quiver Doctor-style sections."
63
+ ],
64
+ "tests": [
65
+ "node --test tests/commands/ai-agent.test.js tests/lib/agent-profiles.test.js",
66
+ "git diff --check"
67
+ ],
68
+ "validation_hints": [
69
+ "Include fixtures for multiple profiles and duplicate display names.",
70
+ "Include the real bug profile with `model: \"GPT 5.5\"`."
71
+ ],
72
+ "estimated_hours": 8,
73
+ "status": "completed",
74
+ "blocked_reason": null,
75
+ "actual_hours": 7,
76
+ "completed_at": "2026-05-27"
77
+ }
@@ -0,0 +1,35 @@
1
+ # CLOSURE_BRIEF - slice-04 Shared model preflight and provider error extraction
2
+
3
+ ## Summary
4
+
5
+ Implemented shared model alias resolution and provider error extraction across planner and executor runtime paths.
6
+
7
+ ## Validation Against Acceptance Criteria
8
+
9
+ - [x] Live commands preflight profile models before provider execution.
10
+ - [x] Legacy profile display aliases block before provider execution with a repair suggestion.
11
+ - [x] CLI `--model` display aliases normalize to technical ids in dry-runs.
12
+ - [x] Provider invalid-model errors are surfaced ahead of secondary MCP/tool noise.
13
+ - [x] Provider error text redacts common secret patterns.
14
+ - [x] Existing successful provider runs keep working.
15
+
16
+ ## Relevant Changes
17
+
18
+ - Added provider model alias normalization and blocking policy.
19
+ - Added provider error cause extraction for invalid model, auth, missing CLI, timeout, and generic failures.
20
+ - Added provider failure serialization for non-zero provider exits with stderr but no process error.
21
+ - Applied profile-alias blocking to planner, reviewer, repair-plan, execute-slice, and execute-plan flows.
22
+ - Added tests for CLI alias normalization, legacy profile blocking, invalid model extraction, and secret redaction.
23
+
24
+ ## Pending
25
+
26
+ - None for this slice.
27
+
28
+ ## Remaining Risks
29
+
30
+ - Provider stderr formats can change; new failures should be added as fixtures.
31
+ - Custom model ids still rely on provider-side validation because Quiver cannot know account entitlement locally.
32
+
33
+ ## Future Recommendations
34
+
35
+ Track provider stderr patterns as test fixtures when new provider failures are observed.
@@ -0,0 +1,55 @@
1
+ # EXECUTION_BRIEF - slice-04 Shared model preflight and provider error extraction
2
+
3
+ ## Context
4
+
5
+ The real dogfooding failure surfaced as `provider run failed` even though Codex emitted a useful invalid-model error. Live AI commands need shared preflight and better error extraction.
6
+
7
+ ## Objective
8
+
9
+ Apply model resolution before live provider execution and surface actionable provider errors.
10
+
11
+ ## Scope
12
+
13
+ - `src/create-quiver/lib/ai/providers.js`
14
+ - `src/create-quiver/lib/ai/executor.js`
15
+ - `src/create-quiver/lib/ai/execution-plan.js`
16
+ - `src/create-quiver/commands/ai.js`
17
+ - related tests
18
+
19
+ ## Acceptance Criteria
20
+
21
+ - Live commands block before provider execution for known bad display aliases.
22
+ - CLI `--model "GPT 5.5"` is normalized or blocked with guidance.
23
+ - Dry-runs show the real command and technical model id.
24
+ - Invalid model errors are prioritized over secondary MCP/tool noise.
25
+ - Secrets are redacted from provider errors.
26
+
27
+ ## Technical Plan Summary
28
+
29
+ Create one shared provider/model resolution path and one provider-error extraction path, then adopt them across planner, reviewer, executor, and execution-plan flows.
30
+
31
+ ## Suggested Steps
32
+
33
+ 1. Add shared model preflight helper.
34
+ 2. Add provider error extractor.
35
+ 3. Adopt helper in planner/reviewer commands.
36
+ 4. Adopt helper in executor/execution-plan flows.
37
+ 5. Add tests with fake provider output.
38
+
39
+ ## Restrictions
40
+
41
+ - Do not require real provider auth in tests.
42
+ - Do not change provider prompt content except for validation/preflight.
43
+ - Do not remove custom model support.
44
+
45
+ ## Risks
46
+
47
+ - Over-eager blocking can prevent legitimate custom models.
48
+ - Provider stderr formats can change.
49
+
50
+ ## Completion Checklist
51
+
52
+ - [ ] Shared preflight implemented.
53
+ - [ ] Provider error extraction implemented.
54
+ - [ ] Planner and executor paths adopted.
55
+ - [ ] Regression test covers `GPT 5.5`.
@@ -0,0 +1,84 @@
1
+ {
2
+ "slice_id": "slice-04-shared-preflight-provider-errors",
3
+ "ticket": "QUIVER-31-04",
4
+ "type": "feature",
5
+ "title": "Shared model preflight and provider error extraction",
6
+ "objective": "Apply model resolution and useful provider errors before every live AI command.",
7
+ "description": "Adds shared preflight for profile and CLI model overrides plus provider error extraction that prioritizes invalid model and auth causes over noisy secondary logs.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "v31-shared-preflight-provider-errors",
12
+ "branch_name": "feature/QUIVER-31-04-v31-shared-preflight-provider-errors"
13
+ },
14
+ "files": [
15
+ "src/create-quiver/lib/ai/providers.js",
16
+ "src/create-quiver/lib/ai/executor.js",
17
+ "src/create-quiver/lib/ai/execution-plan.js",
18
+ "src/create-quiver/commands/ai.js",
19
+ "tests/lib/ai-providers.test.js",
20
+ "tests/commands/ai-prepare-context-planner.test.js",
21
+ "tests/commands/ai-plan.test.js",
22
+ "tests/commands/ai-execute-slice.test.js"
23
+ ],
24
+ "expected_read_paths": [
25
+ "SPEC.md",
26
+ "src/create-quiver/lib/ai/providers.js",
27
+ "src/create-quiver/lib/ai/model-catalog.js",
28
+ "src/create-quiver/lib/ai/executor.js",
29
+ "src/create-quiver/commands/ai.js"
30
+ ],
31
+ "allowed_write_paths": [
32
+ "src/create-quiver/lib/ai/providers.js",
33
+ "src/create-quiver/lib/ai/executor.js",
34
+ "src/create-quiver/lib/ai/execution-plan.js",
35
+ "src/create-quiver/commands/ai.js",
36
+ "tests/lib/ai-providers.test.js",
37
+ "tests/commands/ai-prepare-context-planner.test.js",
38
+ "tests/commands/ai-plan.test.js",
39
+ "tests/commands/ai-review-plan.test.js",
40
+ "tests/commands/ai-execute-slice.test.js",
41
+ "tests/commands/ai-execute-plan.test.js",
42
+ "specs/quiver-v31-ai-model-catalog-agent-selection/**"
43
+ ],
44
+ "depends_on": [
45
+ "slice-01-model-catalog-alias-normalization",
46
+ "slice-03-agent-doctor-repair"
47
+ ],
48
+ "parallel_safe": "no",
49
+ "parallel_safe_reason": "Touches shared provider and AI command runtime behavior.",
50
+ "must": [
51
+ "Create shared provider/model selection resolution used by live AI commands.",
52
+ "Apply normalization or blocking to profile models and CLI `--model` overrides.",
53
+ "Block before provider execution for known display aliases that can be corrected.",
54
+ "Keep dry-run output truthful with the real command and model args.",
55
+ "Extract invalid model, auth, missing CLI, timeout, and secondary warning causes.",
56
+ "Redact secrets in surfaced provider errors.",
57
+ "Preserve JSON/no-TTY cleanliness."
58
+ ],
59
+ "not_included": [
60
+ "Changing provider CLI install process.",
61
+ "Guaranteeing account-level access without live validation.",
62
+ "Changing prompt content unrelated to model selection."
63
+ ],
64
+ "acceptance": [
65
+ "Live AI commands block before provider execution for `model: \"GPT 5.5\"` with Codex.",
66
+ "CLI override `--model \"GPT 5.5\"` is normalized or blocked with a concrete suggestion.",
67
+ "Dry-run shows the real command and technical model id.",
68
+ "Provider stderr with invalid model plus MCP noise reports invalid model as primary cause.",
69
+ "Existing successful provider runs keep working."
70
+ ],
71
+ "tests": [
72
+ "node --test tests/lib/ai-providers.test.js tests/commands/ai-prepare-context-planner.test.js tests/commands/ai-plan.test.js tests/commands/ai-review-plan.test.js tests/commands/ai-execute-slice.test.js tests/commands/ai-execute-plan.test.js",
73
+ "git diff --check"
74
+ ],
75
+ "validation_hints": [
76
+ "Use fake provider runners for failure cases.",
77
+ "Do not require real provider auth in automated tests."
78
+ ],
79
+ "estimated_hours": 10,
80
+ "status": "completed",
81
+ "blocked_reason": null,
82
+ "actual_hours": 8,
83
+ "completed_at": "2026-05-27"
84
+ }