codexspec 0.5.20__tar.gz → 0.6.0__tar.gz
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.
- {codexspec-0.5.20 → codexspec-0.6.0}/.gitignore +3 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/PKG-INFO +35 -34
- {codexspec-0.5.20 → codexspec-0.6.0}/README.md +34 -33
- {codexspec-0.5.20 → codexspec-0.6.0}/pyproject.toml +1 -1
- codexspec-0.6.0/scripts/bash/check-prerequisites.sh +270 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/scripts/bash/common.sh +18 -4
- codexspec-0.6.0/scripts/bash/create-new-feature.sh +141 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/scripts/powershell/check-prerequisites.ps1 +16 -3
- codexspec-0.6.0/scripts/powershell/common.ps1 +222 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/scripts/powershell/create-new-feature.ps1 +56 -88
- codexspec-0.6.0/scripts/python/claude_auto_responder.en.md +545 -0
- codexspec-0.6.0/scripts/python/claude_auto_responder.py +967 -0
- codexspec-0.6.0/scripts/python/claude_auto_responder.zh-CN.md +545 -0
- codexspec-0.6.0/scripts/python/claude_auto_responder_demo.en.md +139 -0
- codexspec-0.6.0/scripts/python/claude_auto_responder_demo.zh-CN.md +139 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/src/codexspec/__init__.py +1 -1
- codexspec-0.6.0/templates/commands/analyze.md +79 -0
- codexspec-0.6.0/templates/commands/clarify.md +71 -0
- codexspec-0.6.0/templates/commands/generate-spec.md +100 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/commands/implement-tasks.md +33 -16
- codexspec-0.6.0/templates/commands/plan-to-tasks.md +92 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/commands/pr.md +0 -2
- codexspec-0.6.0/templates/commands/quick.md +53 -0
- codexspec-0.6.0/templates/commands/review-plan.md +127 -0
- codexspec-0.6.0/templates/commands/review-spec.md +129 -0
- codexspec-0.6.0/templates/commands/review-tasks.md +130 -0
- codexspec-0.6.0/templates/commands/spec-to-plan.md +101 -0
- codexspec-0.6.0/templates/commands/specify.md +104 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/docs/plan-template-detailed.md +13 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/docs/plan-template-simple.md +7 -0
- codexspec-0.6.0/templates/docs/requirements-template.md +80 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/docs/spec-template-detailed.md +21 -7
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/docs/spec-template-simple.md +7 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/docs/tasks-template-detailed.md +9 -5
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/docs/tasks-template-simple.md +3 -1
- codexspec-0.5.20/scripts/bash/check-prerequisites.sh +0 -55
- codexspec-0.5.20/scripts/bash/create-new-feature.sh +0 -114
- codexspec-0.5.20/scripts/powershell/common.ps1 +0 -156
- codexspec-0.5.20/scripts/python/.claude/settings.local.json +0 -11
- codexspec-0.5.20/templates/commands/analyze.md +0 -180
- codexspec-0.5.20/templates/commands/clarify.md +0 -302
- codexspec-0.5.20/templates/commands/generate-spec.md +0 -204
- codexspec-0.5.20/templates/commands/plan-to-tasks.md +0 -334
- codexspec-0.5.20/templates/commands/quick.md +0 -400
- codexspec-0.5.20/templates/commands/review-plan.md +0 -383
- codexspec-0.5.20/templates/commands/review-spec.md +0 -318
- codexspec-0.5.20/templates/commands/review-tasks.md +0 -471
- codexspec-0.5.20/templates/commands/spec-to-plan.md +0 -355
- codexspec-0.5.20/templates/commands/specify.md +0 -214
- {codexspec-0.5.20 → codexspec-0.6.0}/LICENSE +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/codexspec-icon.svg +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/codexspec-logo-dark.svg +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/codexspec-logo-light.svg +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/scripts/bash/check-i18n-completeness.sh +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/scripts/bash/check-i18n-structure.sh +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/scripts/python/README.md +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/scripts/python/claude_ctl.py +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/scripts/python/claude_monitor.py +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/scripts/python/notify_telegram.py +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/src/codexspec/commands/__init__.py +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/src/codexspec/commands/installer.py +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/src/codexspec/i18n.py +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/src/codexspec/idea.md +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/src/codexspec/translator.py +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/commands/checklist.md +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/commands/commit-staged.md +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/commands/config.md +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/commands/constitution.md +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/commands/review-code.md +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/commands/tasks-to-issues.md +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/docs/checklist-template.md +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/docs/constitution-template.md +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/translations/de.json +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/translations/en.json +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/translations/es.json +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/translations/fr.json +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/translations/ja.json +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/translations/ko.json +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/translations/pt-BR.json +0 -0
- {codexspec-0.5.20 → codexspec-0.6.0}/templates/translations/zh-CN.json +0 -0
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
.codexspec/memory/*
|
|
18
18
|
!.codexspec/memory/constitution.md
|
|
19
19
|
|
|
20
|
+
# Promotion content archive (local drafts, not meant for the repo)
|
|
21
|
+
promotion-posts.md
|
|
22
|
+
|
|
20
23
|
|
|
21
24
|
|
|
22
25
|
# Created by https://www.toptal.com/developers/gitignore/api/macos,windows,linux,python,powershell,git
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codexspec
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: CodexSpec - A Spec-Driven Development (SDD) toolkit for Claude Code
|
|
5
5
|
Project-URL: Homepage, https://github.com/Zts0hg/codexspec
|
|
6
6
|
Project-URL: Repository, https://github.com/Zts0hg/codexspec
|
|
@@ -102,7 +102,7 @@ Why use CodexSpec on top of Claude Code? Here's the comparison:
|
|
|
102
102
|
|
|
103
103
|
```
|
|
104
104
|
Traditional: Idea → Code → Debug → Rewrite
|
|
105
|
-
SDD: Idea → Spec → Plan → Tasks → Code
|
|
105
|
+
SDD: Idea → Confirmed Requirements → Spec → Plan → Tasks → Code
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
**Why use SDD?**
|
|
@@ -120,9 +120,9 @@ SDD: Idea → Spec → Plan → Tasks → Code
|
|
|
120
120
|
### Core Workflow
|
|
121
121
|
|
|
122
122
|
- **Constitution-Based Development** - Establish project principles that guide all decisions
|
|
123
|
-
- **
|
|
124
|
-
- **Automatic Reviews** - Every artifact includes built-in quality checks
|
|
125
|
-
- **
|
|
123
|
+
- **Persistent Requirement Capture** - `/specify` records confirmed discussion in `requirements.md` before document generation
|
|
124
|
+
- **Automatic Reviews** - Every generated spec, plan, and task artifact includes built-in quality checks
|
|
125
|
+
- **Traceable Tasks** - Task breakdowns preserve requirement and plan coverage, applying test-first only where required
|
|
126
126
|
|
|
127
127
|
### Human-AI Collaboration
|
|
128
128
|
|
|
@@ -160,14 +160,14 @@ CodexSpec is built on the belief that **effective AI-assisted development requir
|
|
|
160
160
|
CodexSpec structures development into **reviewable checkpoints**:
|
|
161
161
|
|
|
162
162
|
```
|
|
163
|
-
Idea → /specify → /generate-spec → /spec-to-plan → /plan-to-tasks → /implement
|
|
164
|
-
│
|
|
165
|
-
|
|
166
|
-
│ │ │
|
|
167
|
-
✅ Human ✅ Human ✅ Human
|
|
163
|
+
Idea → /specify → requirements.md → /generate-spec → spec.md → /spec-to-plan → plan.md → /plan-to-tasks → tasks.md → /implement
|
|
164
|
+
│ │ │
|
|
165
|
+
Review spec Review plan Review tasks
|
|
168
166
|
```
|
|
169
167
|
|
|
170
|
-
|
|
168
|
+
Confirmed requirements are the highest-priority feature authority. Derived artifacts carry explicit source links so conflicts can be traced back instead of silently propagated.
|
|
169
|
+
|
|
170
|
+
**Every generated artifact has a corresponding review command:**
|
|
171
171
|
|
|
172
172
|
- `spec.md` → `/codexspec:review-spec`
|
|
173
173
|
- `plan.md` → `/codexspec:review-plan`
|
|
@@ -346,11 +346,9 @@ The config command will guide you through:
|
|
|
346
346
|
CodexSpec breaks development into **reviewable checkpoints**:
|
|
347
347
|
|
|
348
348
|
```
|
|
349
|
-
Idea → /specify → /generate-spec → /spec-to-plan → /plan-to-tasks → /implement
|
|
350
|
-
│
|
|
351
|
-
|
|
352
|
-
│ │ │
|
|
353
|
-
✅ Human ✅ Human ✅ Human
|
|
349
|
+
Idea → /specify → requirements.md → /generate-spec → spec.md → /spec-to-plan → plan.md → /plan-to-tasks → tasks.md → /implement
|
|
350
|
+
│ │ │
|
|
351
|
+
Review spec Review plan Review tasks
|
|
354
352
|
```
|
|
355
353
|
|
|
356
354
|
### Workflow Steps
|
|
@@ -358,7 +356,7 @@ Idea → /specify → /generate-spec → /spec-to-plan → /plan-to-tasks → /i
|
|
|
358
356
|
| Step | Command | Output | Human Check |
|
|
359
357
|
| ---------------------------- | ---------------------------- | --------------------------- | ----------- |
|
|
360
358
|
| 1. Project Principles | `/codexspec:constitution` | `constitution.md` | ✅ |
|
|
361
|
-
| 2. Requirement Clarification | `/codexspec:specify` |
|
|
359
|
+
| 2. Requirement Clarification | `/codexspec:specify` | `requirements.md` | ✅ |
|
|
362
360
|
| 3. Generate Spec | `/codexspec:generate-spec` | `spec.md` + auto-review | ✅ |
|
|
363
361
|
| 4. Technical Planning | `/codexspec:spec-to-plan` | `plan.md` + auto-review | ✅ |
|
|
364
362
|
| 5. Task Breakdown | `/codexspec:plan-to-tasks` | `tasks.md` + auto-review | ✅ |
|
|
@@ -369,15 +367,15 @@ Idea → /specify → /generate-spec → /spec-to-plan → /plan-to-tasks → /i
|
|
|
369
367
|
|
|
370
368
|
| Aspect | `/codexspec:specify` | `/codexspec:clarify` |
|
|
371
369
|
|--------|----------------------|----------------------|
|
|
372
|
-
| **Purpose** | Initial requirement exploration | Refine
|
|
373
|
-
| **When to Use** |
|
|
374
|
-
| **Output** |
|
|
370
|
+
| **Purpose** | Initial requirement exploration and confirmation | Refine confirmed requirements or derived spec |
|
|
371
|
+
| **When to Use** | Starting a feature | Requirements or spec need clarification |
|
|
372
|
+
| **Output** | Creates/updates `requirements.md` | Updates `requirements.md` first, then synchronizes `spec.md` |
|
|
375
373
|
| **Method** | Open-ended Q&A | Structured scan (4 categories) |
|
|
376
374
|
| **Questions** | Unlimited | Max 5 per run |
|
|
377
375
|
|
|
378
376
|
### Key Concept: Iterative Quality Loop
|
|
379
377
|
|
|
380
|
-
Every generation command includes **automatic review
|
|
378
|
+
Every generation command includes **automatic review**. Verified defects may be fixed and re-reviewed for at most two rounds; advisory suggestions remain separate and never trigger automatic changes.
|
|
381
379
|
|
|
382
380
|
1. Review the report
|
|
383
381
|
2. Describe issues to fix in natural language
|
|
@@ -405,8 +403,8 @@ flowchart TB
|
|
|
405
403
|
A["Generate Spec/Plan/Tasks"]:::rectStyle --> B["Auto Review"]:::rectStyle
|
|
406
404
|
B --> C{"Issues Found?"}:::diamondStyle
|
|
407
405
|
|
|
408
|
-
C -->|
|
|
409
|
-
D --> E["Update
|
|
406
|
+
C -->|Verified defect| D["Fix with evidence"]:::rectStyle
|
|
407
|
+
D --> E["Update artifact + review report"]:::rectStyle
|
|
410
408
|
|
|
411
409
|
E --> B
|
|
412
410
|
|
|
@@ -442,7 +440,8 @@ This command will:
|
|
|
442
440
|
|
|
443
441
|
- Ask clarifying questions to understand your idea
|
|
444
442
|
- Explore edge cases you might not have considered
|
|
445
|
-
-
|
|
443
|
+
- Ask you to confirm the final requirement summary
|
|
444
|
+
- Persist confirmed needs, constraints, decisions, exclusions, and open questions in `requirements.md`
|
|
446
445
|
|
|
447
446
|
### 4. Generate Specification Document
|
|
448
447
|
|
|
@@ -454,7 +453,8 @@ Once requirements are clarified:
|
|
|
454
453
|
|
|
455
454
|
This command:
|
|
456
455
|
|
|
457
|
-
- Compiles
|
|
456
|
+
- Compiles confirmed entries from `requirements.md` into a structured specification
|
|
457
|
+
- Adds source references for requirement traceability
|
|
458
458
|
- **Automatically** runs review and generates `review-spec.md`
|
|
459
459
|
|
|
460
460
|
### 5. Create Technical Plan
|
|
@@ -463,7 +463,7 @@ This command:
|
|
|
463
463
|
/codexspec:spec-to-plan Use Python FastAPI for backend, PostgreSQL for database, React for frontend
|
|
464
464
|
```
|
|
465
465
|
|
|
466
|
-
|
|
466
|
+
Uses only relevant planning sections, records `Covers` links to specification requirements, and verifies applicable project principles.
|
|
467
467
|
|
|
468
468
|
### 6. Generate Tasks
|
|
469
469
|
|
|
@@ -471,11 +471,12 @@ Includes **constitutionality review** - verifies plan aligns with project princi
|
|
|
471
471
|
/codexspec:plan-to-tasks
|
|
472
472
|
```
|
|
473
473
|
|
|
474
|
-
Tasks are organized
|
|
474
|
+
Tasks are organized around verifiable outcomes:
|
|
475
475
|
|
|
476
|
-
- **
|
|
477
|
-
- **Parallel Markers `[P]`**:
|
|
476
|
+
- **Conditional testing**: Test-first ordering is used when required by the plan, constitution, or task risk
|
|
477
|
+
- **Parallel Markers `[P]`**: Used only for genuinely independent tasks
|
|
478
478
|
- **File Path Specifications**: Clear deliverables per task
|
|
479
|
+
- **Traceability**: Each task links to the plan and requirements it covers
|
|
479
480
|
|
|
480
481
|
### 7. Cross-Artifact Analysis (Optional but Recommended)
|
|
481
482
|
|
|
@@ -483,7 +484,7 @@ Tasks are organized into standard phases:
|
|
|
483
484
|
/codexspec:analyze
|
|
484
485
|
```
|
|
485
486
|
|
|
486
|
-
Detects issues across spec, plan, and tasks:
|
|
487
|
+
Detects issues across requirements, spec, plan, and tasks:
|
|
487
488
|
|
|
488
489
|
- Coverage gaps (requirements without tasks)
|
|
489
490
|
- Duplication and inconsistencies
|
|
@@ -549,10 +550,10 @@ Implementation follows **conditional TDD workflow**:
|
|
|
549
550
|
| Command | Description |
|
|
550
551
|
| ---------------------------- | ----------------------------------------------------------------- |
|
|
551
552
|
| `/codexspec:constitution` | Create/update project constitution with cross-artifact validation |
|
|
552
|
-
| `/codexspec:specify` | Clarify requirements
|
|
553
|
+
| `/codexspec:specify` | Clarify, confirm, and persist requirements in `requirements.md` |
|
|
553
554
|
| `/codexspec:generate-spec` | Generate `spec.md` document ★ Auto-review |
|
|
554
555
|
| `/codexspec:spec-to-plan` | Convert spec to technical plan ★ Auto-review |
|
|
555
|
-
| `/codexspec:plan-to-tasks` | Break down plan into
|
|
556
|
+
| `/codexspec:plan-to-tasks` | Break down plan into traceable, verifiable tasks ★ Auto-review |
|
|
556
557
|
| `/codexspec:implement-tasks` | Execute tasks (conditional TDD) |
|
|
557
558
|
|
|
558
559
|
#### Review Commands (Quality Gates)
|
|
@@ -602,7 +603,7 @@ CodexSpec is inspired by GitHub spec-kit with key differences:
|
|
|
602
603
|
| Review Commands | Optional | 3 dedicated review commands + scoring |
|
|
603
604
|
| Clarify Command | Yes | 4 focus categories, review integration |
|
|
604
605
|
| Analyze Command | Yes | Read-only, severity-based, constitution-aware |
|
|
605
|
-
| TDD in Tasks | Optional |
|
|
606
|
+
| TDD in Tasks | Optional | Conditional on requirements, risk, and policy |
|
|
606
607
|
| Implementation | Standard | Conditional TDD (code vs docs/config) |
|
|
607
608
|
| Extension System | Yes | Yes |
|
|
608
609
|
| PowerShell Scripts | Yes | Yes |
|
|
@@ -612,7 +613,7 @@ CodexSpec is inspired by GitHub spec-kit with key differences:
|
|
|
612
613
|
|
|
613
614
|
1. **Review-First Culture**: Every major artifact has a dedicated review command
|
|
614
615
|
2. **Constitution Governance**: Principles are validated, not just documented
|
|
615
|
-
3. **
|
|
616
|
+
3. **Evidence-Based Review**: Defects require concrete evidence; advisory design ideas do not affect acceptance
|
|
616
617
|
4. **Human Checkpoints**: Workflow designed around validation gates
|
|
617
618
|
|
|
618
619
|
---
|
|
@@ -57,7 +57,7 @@ Why use CodexSpec on top of Claude Code? Here's the comparison:
|
|
|
57
57
|
|
|
58
58
|
```
|
|
59
59
|
Traditional: Idea → Code → Debug → Rewrite
|
|
60
|
-
SDD: Idea → Spec → Plan → Tasks → Code
|
|
60
|
+
SDD: Idea → Confirmed Requirements → Spec → Plan → Tasks → Code
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
**Why use SDD?**
|
|
@@ -75,9 +75,9 @@ SDD: Idea → Spec → Plan → Tasks → Code
|
|
|
75
75
|
### Core Workflow
|
|
76
76
|
|
|
77
77
|
- **Constitution-Based Development** - Establish project principles that guide all decisions
|
|
78
|
-
- **
|
|
79
|
-
- **Automatic Reviews** - Every artifact includes built-in quality checks
|
|
80
|
-
- **
|
|
78
|
+
- **Persistent Requirement Capture** - `/specify` records confirmed discussion in `requirements.md` before document generation
|
|
79
|
+
- **Automatic Reviews** - Every generated spec, plan, and task artifact includes built-in quality checks
|
|
80
|
+
- **Traceable Tasks** - Task breakdowns preserve requirement and plan coverage, applying test-first only where required
|
|
81
81
|
|
|
82
82
|
### Human-AI Collaboration
|
|
83
83
|
|
|
@@ -115,14 +115,14 @@ CodexSpec is built on the belief that **effective AI-assisted development requir
|
|
|
115
115
|
CodexSpec structures development into **reviewable checkpoints**:
|
|
116
116
|
|
|
117
117
|
```
|
|
118
|
-
Idea → /specify → /generate-spec → /spec-to-plan → /plan-to-tasks → /implement
|
|
119
|
-
│
|
|
120
|
-
|
|
121
|
-
│ │ │
|
|
122
|
-
✅ Human ✅ Human ✅ Human
|
|
118
|
+
Idea → /specify → requirements.md → /generate-spec → spec.md → /spec-to-plan → plan.md → /plan-to-tasks → tasks.md → /implement
|
|
119
|
+
│ │ │
|
|
120
|
+
Review spec Review plan Review tasks
|
|
123
121
|
```
|
|
124
122
|
|
|
125
|
-
|
|
123
|
+
Confirmed requirements are the highest-priority feature authority. Derived artifacts carry explicit source links so conflicts can be traced back instead of silently propagated.
|
|
124
|
+
|
|
125
|
+
**Every generated artifact has a corresponding review command:**
|
|
126
126
|
|
|
127
127
|
- `spec.md` → `/codexspec:review-spec`
|
|
128
128
|
- `plan.md` → `/codexspec:review-plan`
|
|
@@ -301,11 +301,9 @@ The config command will guide you through:
|
|
|
301
301
|
CodexSpec breaks development into **reviewable checkpoints**:
|
|
302
302
|
|
|
303
303
|
```
|
|
304
|
-
Idea → /specify → /generate-spec → /spec-to-plan → /plan-to-tasks → /implement
|
|
305
|
-
│
|
|
306
|
-
|
|
307
|
-
│ │ │
|
|
308
|
-
✅ Human ✅ Human ✅ Human
|
|
304
|
+
Idea → /specify → requirements.md → /generate-spec → spec.md → /spec-to-plan → plan.md → /plan-to-tasks → tasks.md → /implement
|
|
305
|
+
│ │ │
|
|
306
|
+
Review spec Review plan Review tasks
|
|
309
307
|
```
|
|
310
308
|
|
|
311
309
|
### Workflow Steps
|
|
@@ -313,7 +311,7 @@ Idea → /specify → /generate-spec → /spec-to-plan → /plan-to-tasks → /i
|
|
|
313
311
|
| Step | Command | Output | Human Check |
|
|
314
312
|
| ---------------------------- | ---------------------------- | --------------------------- | ----------- |
|
|
315
313
|
| 1. Project Principles | `/codexspec:constitution` | `constitution.md` | ✅ |
|
|
316
|
-
| 2. Requirement Clarification | `/codexspec:specify` |
|
|
314
|
+
| 2. Requirement Clarification | `/codexspec:specify` | `requirements.md` | ✅ |
|
|
317
315
|
| 3. Generate Spec | `/codexspec:generate-spec` | `spec.md` + auto-review | ✅ |
|
|
318
316
|
| 4. Technical Planning | `/codexspec:spec-to-plan` | `plan.md` + auto-review | ✅ |
|
|
319
317
|
| 5. Task Breakdown | `/codexspec:plan-to-tasks` | `tasks.md` + auto-review | ✅ |
|
|
@@ -324,15 +322,15 @@ Idea → /specify → /generate-spec → /spec-to-plan → /plan-to-tasks → /i
|
|
|
324
322
|
|
|
325
323
|
| Aspect | `/codexspec:specify` | `/codexspec:clarify` |
|
|
326
324
|
|--------|----------------------|----------------------|
|
|
327
|
-
| **Purpose** | Initial requirement exploration | Refine
|
|
328
|
-
| **When to Use** |
|
|
329
|
-
| **Output** |
|
|
325
|
+
| **Purpose** | Initial requirement exploration and confirmation | Refine confirmed requirements or derived spec |
|
|
326
|
+
| **When to Use** | Starting a feature | Requirements or spec need clarification |
|
|
327
|
+
| **Output** | Creates/updates `requirements.md` | Updates `requirements.md` first, then synchronizes `spec.md` |
|
|
330
328
|
| **Method** | Open-ended Q&A | Structured scan (4 categories) |
|
|
331
329
|
| **Questions** | Unlimited | Max 5 per run |
|
|
332
330
|
|
|
333
331
|
### Key Concept: Iterative Quality Loop
|
|
334
332
|
|
|
335
|
-
Every generation command includes **automatic review
|
|
333
|
+
Every generation command includes **automatic review**. Verified defects may be fixed and re-reviewed for at most two rounds; advisory suggestions remain separate and never trigger automatic changes.
|
|
336
334
|
|
|
337
335
|
1. Review the report
|
|
338
336
|
2. Describe issues to fix in natural language
|
|
@@ -360,8 +358,8 @@ flowchart TB
|
|
|
360
358
|
A["Generate Spec/Plan/Tasks"]:::rectStyle --> B["Auto Review"]:::rectStyle
|
|
361
359
|
B --> C{"Issues Found?"}:::diamondStyle
|
|
362
360
|
|
|
363
|
-
C -->|
|
|
364
|
-
D --> E["Update
|
|
361
|
+
C -->|Verified defect| D["Fix with evidence"]:::rectStyle
|
|
362
|
+
D --> E["Update artifact + review report"]:::rectStyle
|
|
365
363
|
|
|
366
364
|
E --> B
|
|
367
365
|
|
|
@@ -397,7 +395,8 @@ This command will:
|
|
|
397
395
|
|
|
398
396
|
- Ask clarifying questions to understand your idea
|
|
399
397
|
- Explore edge cases you might not have considered
|
|
400
|
-
-
|
|
398
|
+
- Ask you to confirm the final requirement summary
|
|
399
|
+
- Persist confirmed needs, constraints, decisions, exclusions, and open questions in `requirements.md`
|
|
401
400
|
|
|
402
401
|
### 4. Generate Specification Document
|
|
403
402
|
|
|
@@ -409,7 +408,8 @@ Once requirements are clarified:
|
|
|
409
408
|
|
|
410
409
|
This command:
|
|
411
410
|
|
|
412
|
-
- Compiles
|
|
411
|
+
- Compiles confirmed entries from `requirements.md` into a structured specification
|
|
412
|
+
- Adds source references for requirement traceability
|
|
413
413
|
- **Automatically** runs review and generates `review-spec.md`
|
|
414
414
|
|
|
415
415
|
### 5. Create Technical Plan
|
|
@@ -418,7 +418,7 @@ This command:
|
|
|
418
418
|
/codexspec:spec-to-plan Use Python FastAPI for backend, PostgreSQL for database, React for frontend
|
|
419
419
|
```
|
|
420
420
|
|
|
421
|
-
|
|
421
|
+
Uses only relevant planning sections, records `Covers` links to specification requirements, and verifies applicable project principles.
|
|
422
422
|
|
|
423
423
|
### 6. Generate Tasks
|
|
424
424
|
|
|
@@ -426,11 +426,12 @@ Includes **constitutionality review** - verifies plan aligns with project princi
|
|
|
426
426
|
/codexspec:plan-to-tasks
|
|
427
427
|
```
|
|
428
428
|
|
|
429
|
-
Tasks are organized
|
|
429
|
+
Tasks are organized around verifiable outcomes:
|
|
430
430
|
|
|
431
|
-
- **
|
|
432
|
-
- **Parallel Markers `[P]`**:
|
|
431
|
+
- **Conditional testing**: Test-first ordering is used when required by the plan, constitution, or task risk
|
|
432
|
+
- **Parallel Markers `[P]`**: Used only for genuinely independent tasks
|
|
433
433
|
- **File Path Specifications**: Clear deliverables per task
|
|
434
|
+
- **Traceability**: Each task links to the plan and requirements it covers
|
|
434
435
|
|
|
435
436
|
### 7. Cross-Artifact Analysis (Optional but Recommended)
|
|
436
437
|
|
|
@@ -438,7 +439,7 @@ Tasks are organized into standard phases:
|
|
|
438
439
|
/codexspec:analyze
|
|
439
440
|
```
|
|
440
441
|
|
|
441
|
-
Detects issues across spec, plan, and tasks:
|
|
442
|
+
Detects issues across requirements, spec, plan, and tasks:
|
|
442
443
|
|
|
443
444
|
- Coverage gaps (requirements without tasks)
|
|
444
445
|
- Duplication and inconsistencies
|
|
@@ -504,10 +505,10 @@ Implementation follows **conditional TDD workflow**:
|
|
|
504
505
|
| Command | Description |
|
|
505
506
|
| ---------------------------- | ----------------------------------------------------------------- |
|
|
506
507
|
| `/codexspec:constitution` | Create/update project constitution with cross-artifact validation |
|
|
507
|
-
| `/codexspec:specify` | Clarify requirements
|
|
508
|
+
| `/codexspec:specify` | Clarify, confirm, and persist requirements in `requirements.md` |
|
|
508
509
|
| `/codexspec:generate-spec` | Generate `spec.md` document ★ Auto-review |
|
|
509
510
|
| `/codexspec:spec-to-plan` | Convert spec to technical plan ★ Auto-review |
|
|
510
|
-
| `/codexspec:plan-to-tasks` | Break down plan into
|
|
511
|
+
| `/codexspec:plan-to-tasks` | Break down plan into traceable, verifiable tasks ★ Auto-review |
|
|
511
512
|
| `/codexspec:implement-tasks` | Execute tasks (conditional TDD) |
|
|
512
513
|
|
|
513
514
|
#### Review Commands (Quality Gates)
|
|
@@ -557,7 +558,7 @@ CodexSpec is inspired by GitHub spec-kit with key differences:
|
|
|
557
558
|
| Review Commands | Optional | 3 dedicated review commands + scoring |
|
|
558
559
|
| Clarify Command | Yes | 4 focus categories, review integration |
|
|
559
560
|
| Analyze Command | Yes | Read-only, severity-based, constitution-aware |
|
|
560
|
-
| TDD in Tasks | Optional |
|
|
561
|
+
| TDD in Tasks | Optional | Conditional on requirements, risk, and policy |
|
|
561
562
|
| Implementation | Standard | Conditional TDD (code vs docs/config) |
|
|
562
563
|
| Extension System | Yes | Yes |
|
|
563
564
|
| PowerShell Scripts | Yes | Yes |
|
|
@@ -567,7 +568,7 @@ CodexSpec is inspired by GitHub spec-kit with key differences:
|
|
|
567
568
|
|
|
568
569
|
1. **Review-First Culture**: Every major artifact has a dedicated review command
|
|
569
570
|
2. **Constitution Governance**: Principles are validated, not just documented
|
|
570
|
-
3. **
|
|
571
|
+
3. **Evidence-Based Review**: Defects require concrete evidence; advisory design ideas do not affect acceptance
|
|
571
572
|
4. **Human Checkpoints**: Workflow designed around validation gates
|
|
572
573
|
|
|
573
574
|
---
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Check development prerequisites or resolve SDD workflow artifact paths.
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
# Source common utilities
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
+
source "$SCRIPT_DIR/common.sh"
|
|
9
|
+
|
|
10
|
+
JSON=false
|
|
11
|
+
PATHS_ONLY=false
|
|
12
|
+
REQUIRE_TASKS=false
|
|
13
|
+
INCLUDE_TASKS=false
|
|
14
|
+
FEATURE_ARG=""
|
|
15
|
+
WORKFLOW_MODE=false
|
|
16
|
+
|
|
17
|
+
while [[ $# -gt 0 ]]; do
|
|
18
|
+
case "$1" in
|
|
19
|
+
--json)
|
|
20
|
+
JSON=true
|
|
21
|
+
WORKFLOW_MODE=true
|
|
22
|
+
shift
|
|
23
|
+
;;
|
|
24
|
+
--paths-only)
|
|
25
|
+
PATHS_ONLY=true
|
|
26
|
+
WORKFLOW_MODE=true
|
|
27
|
+
shift
|
|
28
|
+
;;
|
|
29
|
+
--require-tasks)
|
|
30
|
+
REQUIRE_TASKS=true
|
|
31
|
+
WORKFLOW_MODE=true
|
|
32
|
+
shift
|
|
33
|
+
;;
|
|
34
|
+
--include-tasks)
|
|
35
|
+
INCLUDE_TASKS=true
|
|
36
|
+
WORKFLOW_MODE=true
|
|
37
|
+
shift
|
|
38
|
+
;;
|
|
39
|
+
--feature)
|
|
40
|
+
FEATURE_ARG="$2"
|
|
41
|
+
WORKFLOW_MODE=true
|
|
42
|
+
shift 2
|
|
43
|
+
;;
|
|
44
|
+
-h|--help)
|
|
45
|
+
cat <<'EOF'
|
|
46
|
+
Usage: check-prerequisites.sh [OPTIONS]
|
|
47
|
+
|
|
48
|
+
With no options, checks the local development environment.
|
|
49
|
+
|
|
50
|
+
Workflow options:
|
|
51
|
+
--json Output JSON
|
|
52
|
+
--paths-only Resolve artifact paths without requiring plan/tasks
|
|
53
|
+
--require-tasks Require tasks.md
|
|
54
|
+
--include-tasks Include tasks.md in AVAILABLE_DOCS
|
|
55
|
+
--feature PATH|ID Resolve an explicit feature directory or ID
|
|
56
|
+
EOF
|
|
57
|
+
exit 0
|
|
58
|
+
;;
|
|
59
|
+
*)
|
|
60
|
+
log_error "Unknown option: $1"
|
|
61
|
+
exit 1
|
|
62
|
+
;;
|
|
63
|
+
esac
|
|
64
|
+
done
|
|
65
|
+
|
|
66
|
+
resolve_feature_dir() {
|
|
67
|
+
local specs_dir
|
|
68
|
+
specs_dir=$(get_specs_dir)
|
|
69
|
+
|
|
70
|
+
if [ -n "$FEATURE_ARG" ]; then
|
|
71
|
+
if [ -d "$FEATURE_ARG" ]; then
|
|
72
|
+
local explicit_dir
|
|
73
|
+
explicit_dir=$(cd "$FEATURE_ARG" && pwd -P)
|
|
74
|
+
if ! is_feature_name "$(basename "$explicit_dir")"; then
|
|
75
|
+
log_error "Invalid feature directory name: $FEATURE_ARG"
|
|
76
|
+
return 1
|
|
77
|
+
fi
|
|
78
|
+
printf "%s\n" "$explicit_dir"
|
|
79
|
+
return
|
|
80
|
+
fi
|
|
81
|
+
if [ -f "$FEATURE_ARG" ]; then
|
|
82
|
+
local artifact_dir
|
|
83
|
+
artifact_dir=$(cd "$(dirname "$FEATURE_ARG")" && pwd -P)
|
|
84
|
+
if ! is_feature_name "$(basename "$artifact_dir")"; then
|
|
85
|
+
log_error "Invalid feature directory name: $artifact_dir"
|
|
86
|
+
return 1
|
|
87
|
+
fi
|
|
88
|
+
printf "%s\n" "$artifact_dir"
|
|
89
|
+
return
|
|
90
|
+
fi
|
|
91
|
+
if [ -d "$specs_dir/$FEATURE_ARG" ]; then
|
|
92
|
+
if ! is_feature_name "$FEATURE_ARG"; then
|
|
93
|
+
log_error "Invalid feature directory name: $FEATURE_ARG"
|
|
94
|
+
return 1
|
|
95
|
+
fi
|
|
96
|
+
(cd "$specs_dir/$FEATURE_ARG" && pwd -P)
|
|
97
|
+
return
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
if ! is_feature_id "$FEATURE_ARG"; then
|
|
101
|
+
log_error "Invalid feature ID: $FEATURE_ARG"
|
|
102
|
+
return 1
|
|
103
|
+
fi
|
|
104
|
+
|
|
105
|
+
# A short ID is only a local lookup convenience. The full directory
|
|
106
|
+
# name identifies the workspace, and ambiguity must be explicit.
|
|
107
|
+
local id_matches=()
|
|
108
|
+
local candidate
|
|
109
|
+
if [ -d "$specs_dir" ]; then
|
|
110
|
+
for candidate in "$specs_dir"/*; do
|
|
111
|
+
[ -d "$candidate" ] || continue
|
|
112
|
+
if is_feature_name "$(basename "$candidate")" &&
|
|
113
|
+
[[ "$(basename "$candidate")" == "$FEATURE_ARG"-* ]]; then
|
|
114
|
+
id_matches+=("$candidate")
|
|
115
|
+
fi
|
|
116
|
+
done
|
|
117
|
+
fi
|
|
118
|
+
if [ "${#id_matches[@]}" -eq 1 ]; then
|
|
119
|
+
(cd "${id_matches[0]}" && pwd -P)
|
|
120
|
+
return
|
|
121
|
+
fi
|
|
122
|
+
if [ "${#id_matches[@]}" -gt 1 ]; then
|
|
123
|
+
log_error "Multiple feature directories match ID '$FEATURE_ARG'. Pass a full directory or artifact path."
|
|
124
|
+
return 1
|
|
125
|
+
fi
|
|
126
|
+
|
|
127
|
+
log_error "Feature directory not found: $FEATURE_ARG"
|
|
128
|
+
return 1
|
|
129
|
+
fi
|
|
130
|
+
|
|
131
|
+
local feature_id
|
|
132
|
+
feature_id=$(get_feature_id)
|
|
133
|
+
if [ -n "$feature_id" ] && [ -d "$specs_dir/$feature_id" ]; then
|
|
134
|
+
(cd "$specs_dir/$feature_id" && pwd -P)
|
|
135
|
+
return
|
|
136
|
+
fi
|
|
137
|
+
|
|
138
|
+
local candidates=()
|
|
139
|
+
if [ -d "$specs_dir" ]; then
|
|
140
|
+
while IFS= read -r candidate; do
|
|
141
|
+
if is_feature_name "$(basename "$candidate")"; then
|
|
142
|
+
candidates+=("$candidate")
|
|
143
|
+
fi
|
|
144
|
+
done < <(find "$specs_dir" -mindepth 1 -maxdepth 1 -type d | sort)
|
|
145
|
+
fi
|
|
146
|
+
|
|
147
|
+
if [ "${#candidates[@]}" -eq 1 ]; then
|
|
148
|
+
(cd "${candidates[0]}" && pwd -P)
|
|
149
|
+
return
|
|
150
|
+
fi
|
|
151
|
+
|
|
152
|
+
if [ "${#candidates[@]}" -gt 1 ]; then
|
|
153
|
+
log_error "Multiple feature directories found. Pass --feature explicitly."
|
|
154
|
+
else
|
|
155
|
+
log_error "No feature directory found. Run /codexspec:specify first."
|
|
156
|
+
fi
|
|
157
|
+
return 1
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if [ "$WORKFLOW_MODE" = true ]; then
|
|
161
|
+
require_codexspec_project
|
|
162
|
+
|
|
163
|
+
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd -P)
|
|
164
|
+
if ! FEATURE_DIR=$(resolve_feature_dir); then
|
|
165
|
+
printf "%s\n" "$FEATURE_DIR"
|
|
166
|
+
exit 1
|
|
167
|
+
fi
|
|
168
|
+
BRANCH=$(git branch --show-current 2>/dev/null || true)
|
|
169
|
+
REQUIREMENTS="$FEATURE_DIR/requirements.md"
|
|
170
|
+
FEATURE_SPEC="$FEATURE_DIR/spec.md"
|
|
171
|
+
IMPL_PLAN="$FEATURE_DIR/plan.md"
|
|
172
|
+
TASKS="$FEATURE_DIR/tasks.md"
|
|
173
|
+
|
|
174
|
+
if [ "$PATHS_ONLY" = false ]; then
|
|
175
|
+
if [ ! -f "$IMPL_PLAN" ]; then
|
|
176
|
+
log_error "plan.md not found in $FEATURE_DIR"
|
|
177
|
+
exit 1
|
|
178
|
+
fi
|
|
179
|
+
if [ "$REQUIRE_TASKS" = true ] && [ ! -f "$TASKS" ]; then
|
|
180
|
+
log_error "tasks.md not found in $FEATURE_DIR"
|
|
181
|
+
exit 1
|
|
182
|
+
fi
|
|
183
|
+
fi
|
|
184
|
+
|
|
185
|
+
AVAILABLE_DOCS=()
|
|
186
|
+
[ -f "$REQUIREMENTS" ] && AVAILABLE_DOCS+=("requirements.md")
|
|
187
|
+
[ -f "$FEATURE_SPEC" ] && AVAILABLE_DOCS+=("spec.md")
|
|
188
|
+
[ -f "$IMPL_PLAN" ] && AVAILABLE_DOCS+=("plan.md")
|
|
189
|
+
if [ "$INCLUDE_TASKS" = true ] && [ -f "$TASKS" ]; then
|
|
190
|
+
AVAILABLE_DOCS+=("tasks.md")
|
|
191
|
+
fi
|
|
192
|
+
|
|
193
|
+
if [ "$JSON" = true ]; then
|
|
194
|
+
python3 -c '
|
|
195
|
+
import json
|
|
196
|
+
import sys
|
|
197
|
+
|
|
198
|
+
keys = (
|
|
199
|
+
"REPO_ROOT",
|
|
200
|
+
"BRANCH",
|
|
201
|
+
"FEATURE_DIR",
|
|
202
|
+
"REQUIREMENTS",
|
|
203
|
+
"FEATURE_SPEC",
|
|
204
|
+
"IMPL_PLAN",
|
|
205
|
+
"TASKS",
|
|
206
|
+
)
|
|
207
|
+
values = sys.argv[1:8]
|
|
208
|
+
payload = dict(zip(keys, values))
|
|
209
|
+
payload["AVAILABLE_DOCS"] = sys.argv[8:]
|
|
210
|
+
print(json.dumps(payload, separators=(",", ":")))
|
|
211
|
+
' "$REPO_ROOT" "$BRANCH" "$FEATURE_DIR" "$REQUIREMENTS" "$FEATURE_SPEC" "$IMPL_PLAN" "$TASKS" "${AVAILABLE_DOCS[@]}"
|
|
212
|
+
else
|
|
213
|
+
echo "REPO_ROOT: $REPO_ROOT"
|
|
214
|
+
echo "BRANCH: $BRANCH"
|
|
215
|
+
echo "FEATURE_DIR: $FEATURE_DIR"
|
|
216
|
+
echo "REQUIREMENTS: $REQUIREMENTS"
|
|
217
|
+
echo "FEATURE_SPEC: $FEATURE_SPEC"
|
|
218
|
+
echo "IMPL_PLAN: $IMPL_PLAN"
|
|
219
|
+
echo "TASKS: $TASKS"
|
|
220
|
+
echo "AVAILABLE_DOCS: ${AVAILABLE_DOCS[*]}"
|
|
221
|
+
fi
|
|
222
|
+
exit 0
|
|
223
|
+
fi
|
|
224
|
+
|
|
225
|
+
log_info "Checking prerequisites for CodexSpec..."
|
|
226
|
+
|
|
227
|
+
# Check Python
|
|
228
|
+
if command_exists python3; then
|
|
229
|
+
PYTHON_VERSION=$(python3 --version 2>&1 | cut -d' ' -f2)
|
|
230
|
+
log_success "Python 3 installed: $PYTHON_VERSION"
|
|
231
|
+
else
|
|
232
|
+
log_error "Python 3 is not installed"
|
|
233
|
+
exit 1
|
|
234
|
+
fi
|
|
235
|
+
|
|
236
|
+
# Check uv
|
|
237
|
+
if command_exists uv; then
|
|
238
|
+
UV_VERSION=$(uv --version 2>&1)
|
|
239
|
+
log_success "uv installed: $UV_VERSION"
|
|
240
|
+
else
|
|
241
|
+
log_warning "uv is not installed. Recommended for package management."
|
|
242
|
+
echo " Install with: curl -LsSf https://astral.sh/uv/install.sh | sh"
|
|
243
|
+
fi
|
|
244
|
+
|
|
245
|
+
# Check git
|
|
246
|
+
if command_exists git; then
|
|
247
|
+
GIT_VERSION=$(git --version 2>&1 | cut -d' ' -f3)
|
|
248
|
+
log_success "Git installed: $GIT_VERSION"
|
|
249
|
+
else
|
|
250
|
+
log_warning "Git is not installed. Recommended for version control."
|
|
251
|
+
fi
|
|
252
|
+
|
|
253
|
+
# Check Claude Code
|
|
254
|
+
if command_exists claude; then
|
|
255
|
+
log_success "Claude Code CLI is installed"
|
|
256
|
+
else
|
|
257
|
+
log_warning "Claude Code CLI is not installed"
|
|
258
|
+
echo " Install from: https://claude.ai/code"
|
|
259
|
+
fi
|
|
260
|
+
|
|
261
|
+
# Check if in a CodexSpec project
|
|
262
|
+
if is_codexspec_project; then
|
|
263
|
+
log_success "Currently in a CodexSpec project"
|
|
264
|
+
else
|
|
265
|
+
log_info "Not currently in a CodexSpec project"
|
|
266
|
+
echo " Run 'codexspec init' to initialize a new project"
|
|
267
|
+
fi
|
|
268
|
+
|
|
269
|
+
echo ""
|
|
270
|
+
log_success "Prerequisite check complete!"
|