create-quiver 0.12.0 → 0.13.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 +52 -0
- package/README.md +65 -25
- package/README_FOR_AI.md +36 -29
- package/ROADMAP.md +22 -3
- package/docs/AI_ONBOARDING_PROMPT.md.template +7 -1
- package/docs/COMMANDS.md.template +53 -20
- package/docs/STATUS.md.template +5 -1
- package/docs/WORKFLOW.md.template +13 -11
- package/package.json +10 -3
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/EVIDENCE_REPORT.md +293 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/EXECUTION_PLAN.md +58 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/SPEC.md +242 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/STATUS.md +35 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/pr.md +77 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +52 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-00-spec-foundation/slice.json +52 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-01-cli-contract-compatibility/CLOSURE_BRIEF.md +36 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-01-cli-contract-compatibility/EXECUTION_BRIEF.md +52 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-01-cli-contract-compatibility/slice.json +56 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-02-run-state-phase-locks/CLOSURE_BRIEF.md +43 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-02-run-state-phase-locks/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-02-run-state-phase-locks/slice.json +52 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-03-safe-ai-onboarding-docs/CLOSURE_BRIEF.md +35 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-03-safe-ai-onboarding-docs/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-03-safe-ai-onboarding-docs/slice.json +54 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-04-agent-profiles-adapters/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-04-agent-profiles-adapters/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-04-agent-profiles-adapters/slice.json +52 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-05-approval-gates/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-05-approval-gates/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-05-approval-gates/slice.json +53 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-06-spec-slice-generator/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-06-spec-slice-generator/EXECUTION_BRIEF.md +56 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-06-spec-slice-generator/slice.json +55 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-07-slice-execution-planner/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-07-slice-execution-planner/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-07-slice-execution-planner/slice.json +52 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-08-controlled-slice-execution/CLOSURE_BRIEF.md +39 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-08-controlled-slice-execution/EXECUTION_BRIEF.md +56 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-08-controlled-slice-execution/slice.json +53 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-09-git-worktree-pr-lifecycle/CLOSURE_BRIEF.md +38 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-09-git-worktree-pr-lifecycle/EXECUTION_BRIEF.md +57 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-09-git-worktree-pr-lifecycle/slice.json +52 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-10-validation-errors-fixtures/CLOSURE_BRIEF.md +39 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-10-validation-errors-fixtures/EXECUTION_BRIEF.md +55 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-10-validation-errors-fixtures/slice.json +56 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-11-export-dashboard-migration/CLOSURE_BRIEF.md +36 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-11-export-dashboard-migration/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-11-export-dashboard-migration/slice.json +53 -0
- package/specs/quiver-v26-0121-smoke-hardening/EVIDENCE_REPORT.md +208 -0
- package/specs/quiver-v26-0121-smoke-hardening/EXECUTION_PLAN.md +57 -0
- package/specs/quiver-v26-0121-smoke-hardening/SPEC.md +137 -0
- package/specs/quiver-v26-0121-smoke-hardening/STATUS.md +32 -0
- package/specs/quiver-v26-0121-smoke-hardening/pr.md +96 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-00-docs-foundation/CLOSURE_BRIEF.md +35 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-00-docs-foundation/EXECUTION_BRIEF.md +55 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-00-docs-foundation/slice.json +73 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-01-cli-help-version-contract/CLOSURE_BRIEF.md +38 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-01-cli-help-version-contract/EXECUTION_BRIEF.md +51 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-01-cli-help-version-contract/slice.json +76 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-02-init-doc-links-and-flow-guidance/CLOSURE_BRIEF.md +37 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-02-init-doc-links-and-flow-guidance/EXECUTION_BRIEF.md +52 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-02-init-doc-links-and-flow-guidance/slice.json +75 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-03-ai-approval-review-consistency/CLOSURE_BRIEF.md +37 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-03-ai-approval-review-consistency/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-03-ai-approval-review-consistency/slice.json +77 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-04-local-validation-brief-contracts/CLOSURE_BRIEF.md +35 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-04-local-validation-brief-contracts/EXECUTION_BRIEF.md +52 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-04-local-validation-brief-contracts/slice.json +77 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-05-demo-scaffold-readiness/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-05-demo-scaffold-readiness/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-05-demo-scaffold-readiness/slice.json +84 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-06-plan-graph-scope-performance/CLOSURE_BRIEF.md +35 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-06-plan-graph-scope-performance/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-06-plan-graph-scope-performance/slice.json +82 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-07-smoke-release-readiness/CLOSURE_BRIEF.md +35 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-07-smoke-release-readiness/EXECUTION_BRIEF.md +55 -0
- package/specs/quiver-v26-0121-smoke-hardening/slices/slice-07-smoke-release-readiness/slice.json +92 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/AUDIT_V24_V25_V26.md +67 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/COMMAND_CONTRACTS.md +125 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/COVERAGE_MATRIX.md +74 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/EVIDENCE_REPORT.md +179 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/EXECUTION_PLAN.md +71 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/SPEC.md +176 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/STATUS.md +37 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/pr.md +132 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-00-docs-audit-coverage-and-contracts/CLOSURE_BRIEF.md +36 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-00-docs-audit-coverage-and-contracts/EXECUTION_BRIEF.md +56 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-00-docs-audit-coverage-and-contracts/slice.json +75 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-01-core-state-resolver-and-canonical-statuses/CLOSURE_BRIEF.md +37 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-01-core-state-resolver-and-canonical-statuses/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-01-core-state-resolver-and-canonical-statuses/slice.json +79 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-02-json-export-contract-and-machine-output/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-02-json-export-contract-and-machine-output/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-02-json-export-contract-and-machine-output/slice.json +75 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-03-approved-plan-to-spec-create/CLOSURE_BRIEF.md +36 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-03-approved-plan-to-spec-create/EXECUTION_BRIEF.md +55 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-03-approved-plan-to-spec-create/slice.json +78 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-04-ai-artifact-storage-redaction-and-token-compaction/CLOSURE_BRIEF.md +31 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-04-ai-artifact-storage-redaction-and-token-compaction/EXECUTION_BRIEF.md +55 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-04-ai-artifact-storage-redaction-and-token-compaction/slice.json +77 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-05-worktree-lifecycle-locks-and-recovery/CLOSURE_BRIEF.md +31 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-05-worktree-lifecycle-locks-and-recovery/EXECUTION_BRIEF.md +55 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-05-worktree-lifecycle-locks-and-recovery/slice.json +84 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-06-validation-gates-and-scope-safety/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-06-validation-gates-and-scope-safety/EXECUTION_BRIEF.md +57 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-06-validation-gates-and-scope-safety/slice.json +99 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-07-context-analysis-and-doctor-flow/CLOSURE_BRIEF.md +31 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-07-context-analysis-and-doctor-flow/EXECUTION_BRIEF.md +57 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-07-context-analysis-and-doctor-flow/slice.json +88 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-08-cross-platform-help-auth-and-dx/CLOSURE_BRIEF.md +31 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-08-cross-platform-help-auth-and-dx/EXECUTION_BRIEF.md +56 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-08-cross-platform-help-auth-and-dx/slice.json +85 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-09-fixtures-smoke-docs-and-release-readiness/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-09-fixtures-smoke-docs-and-release-readiness/EXECUTION_BRIEF.md +56 -0
- package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-09-fixtures-smoke-docs-and-release-readiness/slice.json +91 -0
- package/src/create-quiver/commands/ai.js +652 -27
- package/src/create-quiver/commands/flow.js +58 -9
- package/src/create-quiver/commands/graph.js +11 -9
- package/src/create-quiver/commands/plan.js +7 -16
- package/src/create-quiver/commands/spec.js +282 -0
- package/src/create-quiver/index.js +409 -31
- package/src/create-quiver/lib/actionable-error.js +27 -0
- package/src/create-quiver/lib/agent-profiles.js +16 -4
- package/src/create-quiver/lib/ai/artifacts.js +318 -0
- package/src/create-quiver/lib/ai/context-packs.js +4 -0
- package/src/create-quiver/lib/ai/execution-plan.js +16 -1
- package/src/create-quiver/lib/ai/executor.js +272 -21
- package/src/create-quiver/lib/ai/export-state.js +679 -0
- package/src/create-quiver/lib/ai/github.js +162 -2
- package/src/create-quiver/lib/ai/onboarding-template.js +215 -2
- package/src/create-quiver/lib/ai/plan-review.js +7 -2
- package/src/create-quiver/lib/ai/providers.js +4 -3
- package/src/create-quiver/lib/ai/run-state.js +414 -0
- package/src/create-quiver/lib/ai/spec-generator.js +84 -13
- package/src/create-quiver/lib/ai/spec-templates.js +150 -21
- package/src/create-quiver/lib/analyze.js +2 -2
- package/src/create-quiver/lib/approvals.js +36 -5
- package/src/create-quiver/lib/demo.js +189 -14
- package/src/create-quiver/lib/doctor.js +154 -0
- package/src/create-quiver/lib/git.js +40 -1
- package/src/create-quiver/lib/handoff.js +123 -12
- package/src/create-quiver/lib/init-docs.js +35 -13
- package/src/create-quiver/lib/init-layout.js +9 -0
- package/src/create-quiver/lib/json.js +53 -3
- package/src/create-quiver/lib/lifecycle.js +52 -3
- package/src/create-quiver/lib/locks.js +134 -0
- package/src/create-quiver/lib/package-safety.js +7 -0
- package/src/create-quiver/lib/paths.js +74 -0
- package/src/create-quiver/lib/project-scan.js +74 -0
- package/src/create-quiver/lib/project-state-resolver.js +236 -0
- package/src/create-quiver/lib/readiness.js +66 -10
- package/src/create-quiver/lib/scope.js +52 -8
- package/src/create-quiver/lib/slice-graph.js +138 -38
- package/src/create-quiver/lib/slice.js +14 -5
- package/src/create-quiver/lib/spec-worktrees.js +129 -32
- package/src/create-quiver/lib/statuses.js +115 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# EXECUTION BRIEF - slice-01: Core state resolver and canonical statuses
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
Pixel Quiver showed that classic commands and AI commands can disagree about specs/slices, especially completed slices. This slice creates the shared model that later export, spec create, validation, and DX work depends on.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Implement a shared internal resolver and canonical status model.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- Resolver/state code under `src/create-quiver/lib/**`
|
|
14
|
+
- Command adapters that currently discover specs/slices independently
|
|
15
|
+
- Tests and fixtures for state discovery
|
|
16
|
+
- v27 evidence/status docs
|
|
17
|
+
|
|
18
|
+
## Acceptance Criteria
|
|
19
|
+
|
|
20
|
+
- Classic and AI commands can resolve the same specs/slices from the same underlying model.
|
|
21
|
+
- Completed slices are included when explicitly requested.
|
|
22
|
+
- Scoped reads do not parse unrelated specs unnecessarily.
|
|
23
|
+
- Status values are normalized and deterministic.
|
|
24
|
+
- Existing command contracts are preserved or explicitly documented.
|
|
25
|
+
|
|
26
|
+
## Technical Plan Summary
|
|
27
|
+
|
|
28
|
+
Extract or introduce a resolver module, route affected commands through it, add fixtures for mixed states, and test deterministic output.
|
|
29
|
+
|
|
30
|
+
## Suggested Execution Steps
|
|
31
|
+
|
|
32
|
+
1. Identify all spec/slice discovery implementations.
|
|
33
|
+
2. Design the internal model and canonical statuses.
|
|
34
|
+
3. Refactor command adapters incrementally.
|
|
35
|
+
4. Add tests for completed/draft/multiple-spec/scoped cases.
|
|
36
|
+
5. Update evidence and status.
|
|
37
|
+
|
|
38
|
+
## Restrictions
|
|
39
|
+
|
|
40
|
+
- Do not change public JSON schema in this slice unless required for compatibility.
|
|
41
|
+
- Do not implement spec create parsing here.
|
|
42
|
+
|
|
43
|
+
## Risks
|
|
44
|
+
|
|
45
|
+
- Broad resolver changes can regress many commands; keep adapters small and tested.
|
|
46
|
+
|
|
47
|
+
## Completion Checklist
|
|
48
|
+
|
|
49
|
+
- [ ] Shared resolver implemented.
|
|
50
|
+
- [ ] Canonical statuses documented in code/tests.
|
|
51
|
+
- [ ] Classic and AI commands covered by tests.
|
|
52
|
+
- [ ] Scoped behavior covered.
|
|
53
|
+
- [ ] Validation commands passed.
|
|
54
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-01-core-state-resolver-and-canonical-statuses",
|
|
3
|
+
"ticket": "QUIVER-27-01",
|
|
4
|
+
"type": "implementation",
|
|
5
|
+
"title": "Core state resolver and canonical statuses",
|
|
6
|
+
"objective": "Create a shared internal resolver and canonical status model used by classic and AI commands.",
|
|
7
|
+
"description": "Unifies spec, slice, run, approval, agent, evidence, worktree, status, source metadata, root detection, and ordering behavior so commands stop disagreeing about project state.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "feature",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "v27-core-state-resolver-canonical-statuses",
|
|
12
|
+
"branch_name": "feature/QUIVER-27-01-v27-core-state-resolver-canonical-statuses"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src/create-quiver/lib/**",
|
|
16
|
+
"src/create-quiver/commands/**",
|
|
17
|
+
"tests/lib/**",
|
|
18
|
+
"tests/commands/**",
|
|
19
|
+
"specs/quiver-v27-reliability-ai-workflow-hardening/**"
|
|
20
|
+
],
|
|
21
|
+
"expected_read_paths": [
|
|
22
|
+
"src/create-quiver/lib/slice-graph.js",
|
|
23
|
+
"src/create-quiver/lib/ai/export-state.js",
|
|
24
|
+
"src/create-quiver/lib/doctor.js",
|
|
25
|
+
"src/create-quiver/commands/plan.js",
|
|
26
|
+
"src/create-quiver/commands/graph.js",
|
|
27
|
+
"src/create-quiver/commands/next.js",
|
|
28
|
+
"src/create-quiver/commands/ai.js",
|
|
29
|
+
"tests/lib/ai-export-state.test.js",
|
|
30
|
+
"tests/commands/ai-export.test.js",
|
|
31
|
+
"tests/commands/plan.test.js",
|
|
32
|
+
"tests/commands/doctor.test.js"
|
|
33
|
+
],
|
|
34
|
+
"allowed_write_paths": [
|
|
35
|
+
"src/create-quiver/lib/**",
|
|
36
|
+
"src/create-quiver/commands/**",
|
|
37
|
+
"tests/lib/**",
|
|
38
|
+
"tests/commands/**",
|
|
39
|
+
"specs/quiver-v27-reliability-ai-workflow-hardening/**"
|
|
40
|
+
],
|
|
41
|
+
"depends_on": [
|
|
42
|
+
"slice-00-docs-audit-coverage-and-contracts"
|
|
43
|
+
],
|
|
44
|
+
"parallel_safe": "no",
|
|
45
|
+
"parallel_safe_reason": "This slice defines shared contracts consumed by later slices.",
|
|
46
|
+
"must": [
|
|
47
|
+
"Define canonical statuses for specs, slices, runs, approvals, agents, and datasets.",
|
|
48
|
+
"Expose a shared resolver for classic and AI commands.",
|
|
49
|
+
"Support scoped reads with --spec without parsing unrelated historical specs unnecessarily.",
|
|
50
|
+
"Return deterministic ordering.",
|
|
51
|
+
"Preserve compatibility for existing commands."
|
|
52
|
+
],
|
|
53
|
+
"not_included": [
|
|
54
|
+
"Public JSON export schema changes beyond resolver plumbing.",
|
|
55
|
+
"Spec create parsing changes.",
|
|
56
|
+
"Worktree lifecycle changes."
|
|
57
|
+
],
|
|
58
|
+
"acceptance": [
|
|
59
|
+
"Classic and AI command tests share the same state resolver or a documented adapter over it.",
|
|
60
|
+
"Completed slices are visible when includeCompleted/include-completed is requested.",
|
|
61
|
+
"Scoped reads avoid unrelated specs where possible.",
|
|
62
|
+
"Status values are normalized through one canonical catalog.",
|
|
63
|
+
"Existing plan, graph, next, doctor, ai inspect, and ai list behavior remains compatible."
|
|
64
|
+
],
|
|
65
|
+
"tests": [
|
|
66
|
+
"node --test tests/lib/*resolver*.test.js tests/lib/ai-export-state.test.js tests/commands/ai-export.test.js tests/commands/plan.test.js tests/commands/graph.test.js tests/commands/doctor.test.js",
|
|
67
|
+
"npm run smoke:doctor-fixtures",
|
|
68
|
+
"git diff --check"
|
|
69
|
+
],
|
|
70
|
+
"validation_hints": [
|
|
71
|
+
"Add fixtures for multiple specs with completed and draft slices.",
|
|
72
|
+
"Assert ordering is stable across runs."
|
|
73
|
+
],
|
|
74
|
+
"estimated_hours": 6,
|
|
75
|
+
"actual_hours": 6,
|
|
76
|
+
"status": "completed",
|
|
77
|
+
"completed_at": "2026-05-24T13:48:34Z",
|
|
78
|
+
"blocked_reason": null
|
|
79
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# CLOSURE BRIEF - slice-02: JSON export contract and machine output
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Implemented the v27 machine-readable lifecycle export contract.
|
|
6
|
+
|
|
7
|
+
`ai export --format json` now emits schema v2 lifecycle data with source metadata, warnings, approvals, blockers, evidence, next steps, lifecycle details, aggregates, and canonical statuses while preserving existing fields for compatibility.
|
|
8
|
+
|
|
9
|
+
## Validation Against Acceptance Criteria
|
|
10
|
+
|
|
11
|
+
- `ai export --format json` emits parseable JSON only on stdout.
|
|
12
|
+
- Successful JSON export keeps stderr empty.
|
|
13
|
+
- Unsupported formats fail non-zero and write the actionable error to stderr.
|
|
14
|
+
- Completed slices are exported when `--include-completed` is used.
|
|
15
|
+
- Export includes source metadata, warnings, aggregates, approvals, blockers, evidence, next steps, lifecycle, specs, slices, agents, and runs.
|
|
16
|
+
- Arrays used by specs, slices, evidence, and resolver-backed state remain deterministically ordered by existing resolver ordering.
|
|
17
|
+
|
|
18
|
+
## Changes
|
|
19
|
+
|
|
20
|
+
- Updated `src/create-quiver/lib/ai/export-state.js`.
|
|
21
|
+
- Updated `tests/lib/ai-export-state.test.js`.
|
|
22
|
+
- Updated `tests/commands/ai-export.test.js`.
|
|
23
|
+
- Updated v27 spec status, execution plan, evidence, and this closure brief.
|
|
24
|
+
|
|
25
|
+
## Remaining Risks
|
|
26
|
+
|
|
27
|
+
- The export contract is additive, but downstream users that hard-code `schema_version: 1` will need to accept schema v2.
|
|
28
|
+
- The schema is asserted by tests, but there is not yet a separate JSON Schema artifact; that can be added in a later hardening slice if needed.
|
|
29
|
+
- Some approval and evidence fields may remain empty in projects that have not used the AI lifecycle yet.
|
|
30
|
+
|
|
31
|
+
## Follow-up Recommendations
|
|
32
|
+
|
|
33
|
+
- Execute `slice-03-approved-plan-to-spec-create` next because it depends on stable resolver/export behavior.
|
|
34
|
+
- Keep any future export changes additive unless a new schema version and migration note are explicitly added.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# EXECUTION BRIEF - slice-02: JSON export contract and machine output
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
Pixel Quiver could not consume `ai export --format json` directly because the output schema did not match dashboard needs and completed slices were missing in some states. This slice stabilizes machine output.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Implement a stable, versioned JSON export contract and align AI export behavior with it.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- Export resolver/adapters
|
|
14
|
+
- CLI format handling
|
|
15
|
+
- JSON schema fixtures/tests
|
|
16
|
+
- v27 evidence/status docs
|
|
17
|
+
|
|
18
|
+
## Acceptance Criteria
|
|
19
|
+
|
|
20
|
+
- `--format json` emits parseable JSON only on stdout.
|
|
21
|
+
- Export includes the required state, source metadata, warnings, and aggregates.
|
|
22
|
+
- Completed slices appear with `--include-completed`.
|
|
23
|
+
- Errors go to stderr and exit non-zero.
|
|
24
|
+
- Arrays are deterministically ordered.
|
|
25
|
+
|
|
26
|
+
## Technical Plan Summary
|
|
27
|
+
|
|
28
|
+
Define schema, serialize from the shared resolver, align `ai export`, and add CLI parse tests.
|
|
29
|
+
|
|
30
|
+
## Suggested Execution Steps
|
|
31
|
+
|
|
32
|
+
1. Define export payload shape and schema version.
|
|
33
|
+
2. Implement serializer over the shared resolver.
|
|
34
|
+
3. Align `ai export` and/or add `export-specs`.
|
|
35
|
+
4. Add valid/invalid fixtures and CLI tests.
|
|
36
|
+
5. Update docs/evidence.
|
|
37
|
+
|
|
38
|
+
## Restrictions
|
|
39
|
+
|
|
40
|
+
- Do not add dashboard UI.
|
|
41
|
+
- Do not mix human logs into JSON stdout.
|
|
42
|
+
|
|
43
|
+
## Risks
|
|
44
|
+
|
|
45
|
+
- Existing consumers may rely on older `ai export`; preserve or document compatibility.
|
|
46
|
+
|
|
47
|
+
## Completion Checklist
|
|
48
|
+
|
|
49
|
+
- [ ] Schema implemented.
|
|
50
|
+
- [ ] CLI JSON parse tests added.
|
|
51
|
+
- [ ] Completed slice export covered.
|
|
52
|
+
- [ ] Error path covered.
|
|
53
|
+
- [ ] Validation commands passed.
|
|
54
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-02-json-export-contract-and-machine-output",
|
|
3
|
+
"ticket": "QUIVER-27-02",
|
|
4
|
+
"type": "implementation",
|
|
5
|
+
"title": "JSON export contract and machine output",
|
|
6
|
+
"objective": "Define and implement a stable JSON export contract for dashboards, agents, and machine consumers.",
|
|
7
|
+
"description": "Adds a versioned export schema, pure stdout JSON behavior, deterministic ordering, source metadata, partial/empty/invalid semantics, sanitized paths, and alignment between ai export and export-specs.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "feature",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "v27-json-export-contract-machine-output",
|
|
12
|
+
"branch_name": "feature/QUIVER-27-02-v27-json-export-contract-machine-output"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src/create-quiver/lib/**",
|
|
16
|
+
"src/create-quiver/commands/**",
|
|
17
|
+
"src/create-quiver/index.js",
|
|
18
|
+
"tests/lib/**",
|
|
19
|
+
"tests/commands/**",
|
|
20
|
+
"specs/quiver-v27-reliability-ai-workflow-hardening/**"
|
|
21
|
+
],
|
|
22
|
+
"expected_read_paths": [
|
|
23
|
+
"src/create-quiver/lib/ai/export-state.js",
|
|
24
|
+
"src/create-quiver/commands/ai.js",
|
|
25
|
+
"src/create-quiver/index.js",
|
|
26
|
+
"tests/lib/ai-export-state.test.js",
|
|
27
|
+
"tests/commands/ai-export.test.js"
|
|
28
|
+
],
|
|
29
|
+
"allowed_write_paths": [
|
|
30
|
+
"src/create-quiver/lib/**",
|
|
31
|
+
"src/create-quiver/commands/**",
|
|
32
|
+
"src/create-quiver/index.js",
|
|
33
|
+
"tests/lib/**",
|
|
34
|
+
"tests/commands/**",
|
|
35
|
+
"specs/quiver-v27-reliability-ai-workflow-hardening/**"
|
|
36
|
+
],
|
|
37
|
+
"depends_on": [
|
|
38
|
+
"slice-01-core-state-resolver-and-canonical-statuses"
|
|
39
|
+
],
|
|
40
|
+
"parallel_safe": "no",
|
|
41
|
+
"parallel_safe_reason": "Export contract depends on the shared state resolver and is consumed by later slices.",
|
|
42
|
+
"must": [
|
|
43
|
+
"Define schemaVersion and stable field names.",
|
|
44
|
+
"Ensure --format json writes JSON only to stdout.",
|
|
45
|
+
"Route warnings/errors to structured JSON fields or stderr as appropriate.",
|
|
46
|
+
"Include source metadata and completed slices with --include-completed.",
|
|
47
|
+
"Sanitize local paths where needed."
|
|
48
|
+
],
|
|
49
|
+
"not_included": [
|
|
50
|
+
"Dashboard UI implementation.",
|
|
51
|
+
"Provider execution.",
|
|
52
|
+
"Spec create parsing changes."
|
|
53
|
+
],
|
|
54
|
+
"acceptance": [
|
|
55
|
+
"JSON output parses with JSON.parse without cleanup.",
|
|
56
|
+
"Export includes specs, slices, agents, runs, approvals, blockers, evidence, next steps, lifecycle, aggregates, warnings, and source metadata.",
|
|
57
|
+
"Completed slices appear when --include-completed is used.",
|
|
58
|
+
"Human logs are not mixed into JSON stdout.",
|
|
59
|
+
"Unsupported formats fail with non-zero exit and stderr error."
|
|
60
|
+
],
|
|
61
|
+
"tests": [
|
|
62
|
+
"node --test tests/lib/ai-export-state.test.js tests/commands/ai-export.test.js",
|
|
63
|
+
"node --test tests/commands/cli-contract.test.js",
|
|
64
|
+
"git diff --check"
|
|
65
|
+
],
|
|
66
|
+
"validation_hints": [
|
|
67
|
+
"Add tests that run the CLI and parse stdout directly.",
|
|
68
|
+
"Assert deterministic ordering in exported arrays."
|
|
69
|
+
],
|
|
70
|
+
"estimated_hours": 5,
|
|
71
|
+
"actual_hours": 5,
|
|
72
|
+
"status": "completed",
|
|
73
|
+
"completed_at": "2026-05-24T13:54:36Z",
|
|
74
|
+
"blocked_reason": null
|
|
75
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# CLOSURE BRIEF - slice-03: Approved plan to spec create
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Implemented strict approved-plan to spec generation.
|
|
6
|
+
|
|
7
|
+
`spec create` and the spec-phase generator now require structured slice data from the reviewed and approved technical plan. They preserve every approved implementation slice, generate the mandatory `slice-00-spec-foundation`, and fail before writing when the plan is not structurally safe.
|
|
8
|
+
|
|
9
|
+
## Validation Against Acceptance Criteria
|
|
10
|
+
|
|
11
|
+
- A plan with 8 approved implementation slices produces those 8 slices plus the mandatory `slice-00-spec-foundation`.
|
|
12
|
+
- Plans without a structured slices array fail before writing files.
|
|
13
|
+
- Duplicate slice IDs fail before writing files.
|
|
14
|
+
- Missing dependencies fail before writing files.
|
|
15
|
+
- Circular dependencies fail before writing files.
|
|
16
|
+
- Fenced JSON slice blocks inside Markdown plans are supported.
|
|
17
|
+
- Failed `spec create --dry-run` does not create a spec directory.
|
|
18
|
+
|
|
19
|
+
## Changes
|
|
20
|
+
|
|
21
|
+
- Updated `src/create-quiver/lib/ai/spec-generator.js`.
|
|
22
|
+
- Updated `src/create-quiver/lib/ai/spec-templates.js`.
|
|
23
|
+
- Updated `tests/lib/ai-spec-generator.test.js`.
|
|
24
|
+
- Updated `tests/commands/spec-create.test.js`.
|
|
25
|
+
- Updated v27 spec status, execution plan, evidence, and this closure brief.
|
|
26
|
+
|
|
27
|
+
## Remaining Risks
|
|
28
|
+
|
|
29
|
+
- Free-form technical plans without structured slice data now fail intentionally; users need to revise the planner prompt or add a fenced JSON slice block.
|
|
30
|
+
- The structured contract is currently documented through the error message and tests, not a standalone schema file.
|
|
31
|
+
- Generated spec execution is still not performed in this slice.
|
|
32
|
+
|
|
33
|
+
## Follow-up Recommendations
|
|
34
|
+
|
|
35
|
+
- Update planner prompts in later slices so technical plans always include the structured slice block.
|
|
36
|
+
- Execute `slice-04` and `slice-05` next; they can proceed in parallel only if write scopes remain independent.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# EXECUTION BRIEF - slice-03: Approved plan to spec create
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
Pixel Quiver showed that `spec create` can generate a generic two-slice scaffold instead of the approved multi-slice plan. That breaks the central WDD + SDD flow.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Make `spec create` faithful to the approved technical plan and safe on parse failure.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- Spec generator
|
|
14
|
+
- Approval metadata handling
|
|
15
|
+
- Spec templates
|
|
16
|
+
- Command tests and fixtures
|
|
17
|
+
- v27 evidence/status docs
|
|
18
|
+
|
|
19
|
+
## Acceptance Criteria
|
|
20
|
+
|
|
21
|
+
- `spec create` uses an explicitly approved technical plan version.
|
|
22
|
+
- Approved slice count, IDs, dependencies, handoffs, execution plan, and PR body are generated.
|
|
23
|
+
- Missing/invalid structured slice data fails before writing.
|
|
24
|
+
- Generic fallback scaffolds are not created silently.
|
|
25
|
+
- Failed runs do not leave empty remnant directories.
|
|
26
|
+
|
|
27
|
+
## Technical Plan Summary
|
|
28
|
+
|
|
29
|
+
Add structured plan extraction/validation, atomic writes, safe failure handling, and regression tests based on the Pixel Quiver failure.
|
|
30
|
+
|
|
31
|
+
## Suggested Execution Steps
|
|
32
|
+
|
|
33
|
+
1. Inspect current spec generator and approval selection.
|
|
34
|
+
2. Define the structured slice block contract.
|
|
35
|
+
3. Implement validation and atomic write flow.
|
|
36
|
+
4. Add tests for good plan, missing structure, duplicates, circular dependencies, dry-run, and failure cleanup.
|
|
37
|
+
5. Update docs/evidence.
|
|
38
|
+
|
|
39
|
+
## Restrictions
|
|
40
|
+
|
|
41
|
+
- Do not execute generated slices.
|
|
42
|
+
- Do not open PRs.
|
|
43
|
+
|
|
44
|
+
## Risks
|
|
45
|
+
|
|
46
|
+
- Existing free-form plans may need compatibility guidance or migration.
|
|
47
|
+
|
|
48
|
+
## Completion Checklist
|
|
49
|
+
|
|
50
|
+
- [ ] Structured block contract implemented.
|
|
51
|
+
- [ ] Generic fallback removed or made explicit error.
|
|
52
|
+
- [ ] Atomic write behavior covered.
|
|
53
|
+
- [ ] Regression fixture added.
|
|
54
|
+
- [ ] Validation commands passed.
|
|
55
|
+
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-03-approved-plan-to-spec-create",
|
|
3
|
+
"ticket": "QUIVER-27-03",
|
|
4
|
+
"type": "implementation",
|
|
5
|
+
"title": "Approved plan to spec create",
|
|
6
|
+
"objective": "Make spec create generate the approved spec/slices/handoffs from a reviewed and approved technical plan, or fail safely before writing.",
|
|
7
|
+
"description": "Prevents generic fallback scaffolds by requiring structured slice data from the approved plan, validating slice IDs/dependencies/slice-00/handoffs, using atomic writes, and cleaning up safely.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "feature",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "v27-approved-plan-to-spec-create",
|
|
12
|
+
"branch_name": "feature/QUIVER-27-03-v27-approved-plan-to-spec-create"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src/create-quiver/lib/ai/spec-generator.js",
|
|
16
|
+
"src/create-quiver/lib/ai/spec-templates.js",
|
|
17
|
+
"src/create-quiver/lib/approvals.js",
|
|
18
|
+
"src/create-quiver/commands/spec.js",
|
|
19
|
+
"tests/lib/ai-spec-generator.test.js",
|
|
20
|
+
"tests/commands/spec-create.test.js",
|
|
21
|
+
"specs/quiver-v27-reliability-ai-workflow-hardening/**"
|
|
22
|
+
],
|
|
23
|
+
"expected_read_paths": [
|
|
24
|
+
"src/create-quiver/lib/ai/spec-generator.js",
|
|
25
|
+
"src/create-quiver/lib/ai/spec-templates.js",
|
|
26
|
+
"src/create-quiver/lib/approvals.js",
|
|
27
|
+
"tests/lib/ai-spec-generator.test.js",
|
|
28
|
+
"tests/commands/spec-create.test.js"
|
|
29
|
+
],
|
|
30
|
+
"allowed_write_paths": [
|
|
31
|
+
"src/create-quiver/lib/ai/spec-generator.js",
|
|
32
|
+
"src/create-quiver/lib/ai/spec-templates.js",
|
|
33
|
+
"src/create-quiver/lib/approvals.js",
|
|
34
|
+
"src/create-quiver/commands/spec.js",
|
|
35
|
+
"tests/lib/ai-spec-generator.test.js",
|
|
36
|
+
"tests/commands/spec-create.test.js",
|
|
37
|
+
"specs/quiver-v27-reliability-ai-workflow-hardening/**"
|
|
38
|
+
],
|
|
39
|
+
"depends_on": [
|
|
40
|
+
"slice-01-core-state-resolver-and-canonical-statuses",
|
|
41
|
+
"slice-02-json-export-contract-and-machine-output"
|
|
42
|
+
],
|
|
43
|
+
"parallel_safe": "no",
|
|
44
|
+
"parallel_safe_reason": "Spec generation depends on shared state/export contracts and affects core workflow.",
|
|
45
|
+
"must": [
|
|
46
|
+
"Use explicitly approved technical plan metadata.",
|
|
47
|
+
"Require or extract a structured slice block.",
|
|
48
|
+
"Generate slice-00 and every approved slice.",
|
|
49
|
+
"Create SPEC.md, STATUS.md, EVIDENCE_REPORT.md, EXECUTION_PLAN.md, pr.md, slice.json, EXECUTION_BRIEF.md, and CLOSURE_BRIEF.md.",
|
|
50
|
+
"Fail before writing if the plan cannot be parsed.",
|
|
51
|
+
"Use atomic writes and avoid empty scaffold remnants."
|
|
52
|
+
],
|
|
53
|
+
"not_included": [
|
|
54
|
+
"Changing AI provider prompts except where needed for structured output.",
|
|
55
|
+
"Executing generated slices.",
|
|
56
|
+
"Opening PRs."
|
|
57
|
+
],
|
|
58
|
+
"acceptance": [
|
|
59
|
+
"Given a plan with 8 approved slices, spec create creates 8 slices plus required artifacts.",
|
|
60
|
+
"Given no structured slice block, spec create fails without writing files.",
|
|
61
|
+
"Given duplicate IDs or circular dependencies, spec create fails before writing.",
|
|
62
|
+
"Generated names are derived from requirement/spec metadata and not generic approved placeholders.",
|
|
63
|
+
"No empty generic scaffold directories remain after failure or regeneration."
|
|
64
|
+
],
|
|
65
|
+
"tests": [
|
|
66
|
+
"node --test tests/lib/ai-spec-generator.test.js tests/commands/spec-create.test.js",
|
|
67
|
+
"git diff --check"
|
|
68
|
+
],
|
|
69
|
+
"validation_hints": [
|
|
70
|
+
"Test dry-run and real-run behavior.",
|
|
71
|
+
"Compare git status before/after failed spec create."
|
|
72
|
+
],
|
|
73
|
+
"estimated_hours": 6,
|
|
74
|
+
"actual_hours": 6,
|
|
75
|
+
"status": "completed",
|
|
76
|
+
"completed_at": "2026-05-24T14:00:33Z",
|
|
77
|
+
"blocked_reason": null
|
|
78
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# CLOSURE BRIEF - slice-04: AI artifact storage, redaction, and token compaction
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Implemented AI artifact hardening for planner and review flows. Draft/review artifacts now persist clean provider output, raw stdout/stderr are stored separately under run-scoped `.quiver/runs/<run-id>/raw/*.json`, secrets and local paths are redacted, oversized revise inputs are compacted before provider execution, and package safety blocks raw AI artifacts from npm tarballs.
|
|
6
|
+
|
|
7
|
+
## Validation Against Acceptance Criteria
|
|
8
|
+
|
|
9
|
+
- Draft files contain useful output only: covered by `ai plan stores clean drafts and separates redacted raw provider logs`.
|
|
10
|
+
- Raw logs are run-scoped and redacted: covered by `raw_artifact_path` assertions in `ai-plan` and `ai-review-plan` tests.
|
|
11
|
+
- Oversized revise inputs are compacted or blocked: covered by `ai revise compacts oversized feedback before provider execution` and `ai plan rejects oversized prompts before provider execution`.
|
|
12
|
+
- Approved versions remain explicit: existing versioned approval tests still pass and approved metadata carries the selected draft metadata.
|
|
13
|
+
- Package safety blocks raw AI artifacts: covered by `tests/lib/package-safety.test.js`.
|
|
14
|
+
|
|
15
|
+
## Changes
|
|
16
|
+
|
|
17
|
+
- Added `src/create-quiver/lib/ai/artifacts.js`.
|
|
18
|
+
- Updated `src/create-quiver/commands/ai.js` for clean/raw separation, prompt-size guards, and revise compaction.
|
|
19
|
+
- Updated `src/create-quiver/lib/approvals.js` and `src/create-quiver/lib/ai/plan-review.js` to persist raw artifact metadata.
|
|
20
|
+
- Updated `src/create-quiver/lib/package-safety.js` to classify `.quiver/runs/*/raw/` as unsafe package content.
|
|
21
|
+
- Added/updated tests in `tests/commands/ai-plan.test.js`, `tests/commands/ai-review-plan.test.js`, and `tests/lib/package-safety.test.js`.
|
|
22
|
+
|
|
23
|
+
## Remaining Risks
|
|
24
|
+
|
|
25
|
+
- Provider-specific log formats can vary. The cleanup intentionally strips prompt echoes and common leading/trailing provider log lines while preserving the provider's main stdout content.
|
|
26
|
+
- Raw artifacts are redacted and ignored under `.quiver/`, but future package changes should keep package-safety checks in the release path.
|
|
27
|
+
|
|
28
|
+
## Follow-up Recommendations
|
|
29
|
+
|
|
30
|
+
- Add provider-specific clean-output fixtures if future dogfooding finds additional Claude/Codex/Gemini transcript wrappers.
|
|
31
|
+
- Consider exposing prompt-size limits in user-facing docs if users need to tune `QUIVER_AI_MAX_PROMPT_BYTES`, `QUIVER_AI_MAX_REVISION_INPUT_BYTES`, or `QUIVER_AI_COMPACTED_REVISION_INPUT_BYTES`.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# EXECUTION BRIEF - slice-04: AI artifact storage, redaction, and token compaction
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
Pixel Quiver showed drafts polluted with provider logs and `ai revise` failures caused by very large accumulated context. This slice hardens AI artifact persistence and token control.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Persist clean drafts, store raw logs separately, redact sensitive values, and compact oversized feedback safely.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- AI provider/output handling
|
|
14
|
+
- Approval draft persistence
|
|
15
|
+
- Raw log storage
|
|
16
|
+
- Redaction and package safety
|
|
17
|
+
- Token compaction for revise/review flows
|
|
18
|
+
|
|
19
|
+
## Acceptance Criteria
|
|
20
|
+
|
|
21
|
+
- Drafts contain clean useful AI output.
|
|
22
|
+
- Raw logs are separated and redacted.
|
|
23
|
+
- Oversized inputs are compacted or rejected before provider execution.
|
|
24
|
+
- Approved version metadata remains explicit.
|
|
25
|
+
- Package safety covers raw AI artifacts.
|
|
26
|
+
|
|
27
|
+
## Technical Plan Summary
|
|
28
|
+
|
|
29
|
+
Add output extraction, raw transcript storage, redaction, size checks, compaction logic, and regression tests.
|
|
30
|
+
|
|
31
|
+
## Suggested Execution Steps
|
|
32
|
+
|
|
33
|
+
1. Inspect AI provider and approval persistence paths.
|
|
34
|
+
2. Add clean/raw separation.
|
|
35
|
+
3. Add redaction and package-safety rules.
|
|
36
|
+
4. Add size checks and compaction.
|
|
37
|
+
5. Test contaminated provider output and long feedback inputs.
|
|
38
|
+
|
|
39
|
+
## Restrictions
|
|
40
|
+
|
|
41
|
+
- Do not store credentials.
|
|
42
|
+
- Do not weaken approval gates.
|
|
43
|
+
|
|
44
|
+
## Risks
|
|
45
|
+
|
|
46
|
+
- Over-compaction can remove important constraints; preserve decisions, risks, files, and criteria.
|
|
47
|
+
|
|
48
|
+
## Completion Checklist
|
|
49
|
+
|
|
50
|
+
- [ ] Clean draft behavior implemented.
|
|
51
|
+
- [ ] Raw logs separated and redacted.
|
|
52
|
+
- [ ] Compaction covered by tests.
|
|
53
|
+
- [ ] Package safety updated.
|
|
54
|
+
- [ ] Validation commands passed.
|
|
55
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-04-ai-artifact-storage-redaction-and-token-compaction",
|
|
3
|
+
"ticket": "QUIVER-27-04",
|
|
4
|
+
"type": "implementation",
|
|
5
|
+
"title": "AI artifact storage, redaction, and token compaction",
|
|
6
|
+
"objective": "Keep AI drafts clean, persist raw provider logs separately with redaction, and prevent revise flows from exceeding provider context limits.",
|
|
7
|
+
"description": "Separates useful provider output from raw transcripts, redacts sensitive values before persistence, snapshots raw logs under run-scoped paths, and compacts long review/feedback inputs before calling providers.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "feature",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "v27-ai-artifacts-redaction-token-compaction",
|
|
12
|
+
"branch_name": "feature/QUIVER-27-04-v27-ai-artifacts-redaction-token-compaction"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src/create-quiver/lib/ai/**",
|
|
16
|
+
"src/create-quiver/lib/approvals.js",
|
|
17
|
+
"src/create-quiver/lib/package-safety.js",
|
|
18
|
+
"tests/lib/ai-*.test.js",
|
|
19
|
+
"tests/lib/package-safety.test.js",
|
|
20
|
+
"tests/commands/ai-*.test.js",
|
|
21
|
+
"specs/quiver-v27-reliability-ai-workflow-hardening/**"
|
|
22
|
+
],
|
|
23
|
+
"expected_read_paths": [
|
|
24
|
+
"src/create-quiver/lib/ai/providers.js",
|
|
25
|
+
"src/create-quiver/lib/ai/prompt-transport.js",
|
|
26
|
+
"src/create-quiver/lib/ai/plan-review.js",
|
|
27
|
+
"src/create-quiver/lib/approvals.js",
|
|
28
|
+
"tests/commands/ai-plan.test.js",
|
|
29
|
+
"tests/commands/ai-review-plan.test.js"
|
|
30
|
+
],
|
|
31
|
+
"allowed_write_paths": [
|
|
32
|
+
"src/create-quiver/lib/ai/**",
|
|
33
|
+
"src/create-quiver/lib/approvals.js",
|
|
34
|
+
"src/create-quiver/lib/package-safety.js",
|
|
35
|
+
"tests/lib/ai-*.test.js",
|
|
36
|
+
"tests/lib/package-safety.test.js",
|
|
37
|
+
"tests/commands/ai-*.test.js",
|
|
38
|
+
"specs/quiver-v27-reliability-ai-workflow-hardening/**"
|
|
39
|
+
],
|
|
40
|
+
"depends_on": [
|
|
41
|
+
"slice-01-core-state-resolver-and-canonical-statuses"
|
|
42
|
+
],
|
|
43
|
+
"parallel_safe": "yes",
|
|
44
|
+
"parallel_safe_reason": "Can run after shared resolver if it avoids files touched by worktree lifecycle work.",
|
|
45
|
+
"must": [
|
|
46
|
+
"Store clean drafts separately from raw provider output.",
|
|
47
|
+
"Redact secrets and sensitive local values before persisting raw logs.",
|
|
48
|
+
"Detect oversized inputs before provider calls.",
|
|
49
|
+
"Compact feedback while preserving decisions, risks, changed files, and acceptance criteria.",
|
|
50
|
+
"Preserve approved version metadata."
|
|
51
|
+
],
|
|
52
|
+
"not_included": [
|
|
53
|
+
"Changing provider CLI installation.",
|
|
54
|
+
"Changing spec create parsing.",
|
|
55
|
+
"Adding telemetry."
|
|
56
|
+
],
|
|
57
|
+
"acceptance": [
|
|
58
|
+
"Draft files contain only useful AI output, not provider logs or prompt echo.",
|
|
59
|
+
"Raw logs are stored in run-scoped raw paths and redacted.",
|
|
60
|
+
"Oversized revise inputs are compacted or blocked with an actionable message before provider execution.",
|
|
61
|
+
"Approved versions remain explicit and are not inferred from latest draft filenames.",
|
|
62
|
+
"Package safety blocks unsafe raw AI artifacts from npm publication."
|
|
63
|
+
],
|
|
64
|
+
"tests": [
|
|
65
|
+
"node --test tests/lib/ai-*.test.js tests/commands/ai-plan.test.js tests/commands/ai-review-plan.test.js",
|
|
66
|
+
"node --test tests/lib/package-safety.test.js",
|
|
67
|
+
"git diff --check"
|
|
68
|
+
],
|
|
69
|
+
"validation_hints": [
|
|
70
|
+
"Use fixtures with prompt echo and long review text.",
|
|
71
|
+
"Assert raw logs do not leak obvious token/env patterns."
|
|
72
|
+
],
|
|
73
|
+
"estimated_hours": 5,
|
|
74
|
+
"status": "completed",
|
|
75
|
+
"completed_at": "2026-05-24",
|
|
76
|
+
"blocked_reason": null
|
|
77
|
+
}
|