codexspec 0.7.19__tar.gz → 0.7.21__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.7.19 → codexspec-0.7.21}/PKG-INFO +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/README.md +22 -7
- {codexspec-0.7.19 → codexspec-0.7.21}/pyproject.toml +1 -1
- {codexspec-0.7.19 → codexspec-0.7.21}/scripts/powershell/check-prerequisites.ps1 +1 -1
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/__init__.py +94 -23
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/automation.py +243 -148
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/commands/installer.py +48 -3
- codexspec-0.7.21/src/codexspec/commit_guidance.py +76 -0
- codexspec-0.7.21/src/codexspec/commit_runtime.py +496 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/integrations/codex.py +22 -2
- codexspec-0.7.21/src/codexspec/merge_commits.py +48 -0
- codexspec-0.7.21/src/codexspec/staged_commits.py +226 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/worktrees.py +8 -23
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/analyze.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/auto-dev.md +84 -18
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/blueprint.md +46 -9
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/checklist.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/clarify.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/commit-staged.md +122 -102
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/config.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/constitution.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/debug.md +23 -8
- codexspec-0.7.19/templates/commands/spec-to-plan.md → codexspec-0.7.21/templates/commands/design-to-plan.md +24 -9
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/distill.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/evolve.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/generate-spec.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/implement-tasks.md +29 -10
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/onboard.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/plan-to-tasks.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/pr.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/quick.md +24 -9
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/release-notes.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/reverse-spec.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/review-code.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/review-design.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/review-plan.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/review-spec.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/review-tasks.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/spec-to-design.md +25 -10
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/specify.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/commands/tasks-to-issues.md +23 -8
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/translations/de.json +1 -1
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/translations/en.json +1 -1
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/translations/es.json +1 -1
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/translations/fr.json +1 -1
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/translations/ja.json +1 -1
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/translations/ko.json +1 -1
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/translations/pt-BR.json +1 -1
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/translations/zh-CN.json +1 -1
- {codexspec-0.7.19 → codexspec-0.7.21}/.gitignore +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/LICENSE +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/codexspec-icon.svg +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/codexspec-logo-dark.svg +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/codexspec-logo-light.svg +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/scripts/bash/check-i18n-completeness.sh +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/scripts/bash/check-i18n-structure.sh +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/scripts/bash/check-prerequisites.sh +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/scripts/bash/common.sh +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/scripts/bash/create-new-feature.sh +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/scripts/bash/review-context.sh +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/scripts/powershell/common.ps1 +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/scripts/powershell/create-new-feature.ps1 +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/scripts/powershell/review-context.ps1 +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/blueprint.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/commands/__init__.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/__init__.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/app.js +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/ar.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/de.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/en.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/es.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/fr.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/hi.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/it.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/ja.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/ko.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/pt.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/ru.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/zh-CN.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/i18n/zh-TW.json +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/index.html +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/assets/styles.css +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/domain.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/lease.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/models.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/records.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/server.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/session.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/terminal.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/distill_review/transaction.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/i18n.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/idea.md +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/integrations/__init__.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/integrations/base.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/integrations/claude.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/profile.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/src/codexspec/translator.py +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/docs/checklist-template.md +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/docs/constitution-template.md +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/docs/design-template.md +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/docs/plan-template-detailed.md +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/docs/plan-template-simple.md +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/docs/requirements-template.md +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/docs/spec-template-detailed.md +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/docs/spec-template-simple.md +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/docs/tasks-template-detailed.md +0 -0
- {codexspec-0.7.19 → codexspec-0.7.21}/templates/docs/tasks-template-simple.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: codexspec
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.21
|
|
4
4
|
Summary: CodexSpec - A Requirements-First 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
|
|
@@ -169,7 +169,7 @@ CodexSpec structures development into **reviewable checkpoints**:
|
|
|
169
169
|
Idea → /specify → requirements.md
|
|
170
170
|
→ /generate-spec → spec.md → review-spec
|
|
171
171
|
→ /spec-to-design → design.md → review-design
|
|
172
|
-
→ /
|
|
172
|
+
→ /design-to-plan → plan.md → review-plan
|
|
173
173
|
→ /plan-to-tasks → tasks.md → review-tasks
|
|
174
174
|
→ /implement-tasks → code
|
|
175
175
|
```
|
|
@@ -212,7 +212,7 @@ claude
|
|
|
212
212
|
> /codexspec:specify I want to build a todo application
|
|
213
213
|
> /codexspec:generate-spec
|
|
214
214
|
> /codexspec:spec-to-design
|
|
215
|
-
> /codexspec:
|
|
215
|
+
> /codexspec:design-to-plan
|
|
216
216
|
> /codexspec:plan-to-tasks
|
|
217
217
|
> /codexspec:implement-tasks
|
|
218
218
|
```
|
|
@@ -349,7 +349,7 @@ The config command will guide you through:
|
|
|
349
349
|
| Method | Best For | Features |
|
|
350
350
|
|--------|----------|----------|
|
|
351
351
|
| **CLI Installation** (`uv tool install`) | Full development workflow | CLI commands (`init`, `check`, `config`) + slash commands |
|
|
352
|
-
| **Plugin Marketplace** | Quick start, existing projects | Slash commands
|
|
352
|
+
| **Plugin Marketplace** | Quick start, existing projects | Slash commands + automatic commit guidance (use `/codexspec:config` for language setup) |
|
|
353
353
|
|
|
354
354
|
**Note**: The plugin uses `strict: false` mode and reuses the existing multi-language support via LLM dynamic translation.
|
|
355
355
|
|
|
@@ -363,7 +363,7 @@ CodexSpec breaks development into **reviewable checkpoints**:
|
|
|
363
363
|
Idea → /specify → requirements.md
|
|
364
364
|
→ /generate-spec → spec.md → review-spec
|
|
365
365
|
→ /spec-to-design → design.md → review-design
|
|
366
|
-
→ /
|
|
366
|
+
→ /design-to-plan → plan.md → review-plan
|
|
367
367
|
→ /plan-to-tasks → tasks.md → review-tasks
|
|
368
368
|
→ /implement-tasks → code
|
|
369
369
|
```
|
|
@@ -376,7 +376,7 @@ Idea → /specify → requirements.md
|
|
|
376
376
|
| 2. Requirement Clarification | `/codexspec:specify` | `requirements.md` | ✅ |
|
|
377
377
|
| 3. Generate Spec | `/codexspec:generate-spec` | `spec.md` + auto-review | ✅ |
|
|
378
378
|
| 4. System Design | `/codexspec:spec-to-design` | `design.md` + auto-review | ✅ |
|
|
379
|
-
| 5. Technical Planning | `/codexspec:
|
|
379
|
+
| 5. Technical Planning | `/codexspec:design-to-plan` | `plan.md` + auto-review | ✅ |
|
|
380
380
|
| 6. Task Breakdown | `/codexspec:plan-to-tasks` | `tasks.md` + auto-review | ✅ |
|
|
381
381
|
| 7. Cross-Artifact Analysis | `/codexspec:analyze` | Analysis report | ✅ |
|
|
382
382
|
| 8. Implementation | `/codexspec:implement-tasks` | Code | - |
|
|
@@ -478,7 +478,8 @@ This command:
|
|
|
478
478
|
### 5. Create Technical Plan
|
|
479
479
|
|
|
480
480
|
```
|
|
481
|
-
/codexspec:spec-to-
|
|
481
|
+
/codexspec:spec-to-design Use Python FastAPI for backend, PostgreSQL for database, React for frontend
|
|
482
|
+
/codexspec:design-to-plan
|
|
482
483
|
```
|
|
483
484
|
|
|
484
485
|
Uses only relevant planning sections, records `Covers` links to specification requirements, and verifies applicable project principles.
|
|
@@ -580,7 +581,7 @@ Implementation follows **conditional TDD workflow**:
|
|
|
580
581
|
| `/codexspec:blueprint` | Discuss and maintain confirmed requirements in the shared blueprint |
|
|
581
582
|
| `/codexspec:generate-spec` | Generate `spec.md` document ★ Auto-review |
|
|
582
583
|
| `/codexspec:spec-to-design` | Produce `design.md` (architecture/components/decisions) ★ Auto-review |
|
|
583
|
-
| `/codexspec:
|
|
584
|
+
| `/codexspec:design-to-plan` | Convert design to implementation plan ★ Auto-review |
|
|
584
585
|
| `/codexspec:plan-to-tasks` | Break down plan into traceable, verifiable tasks ★ Auto-review |
|
|
585
586
|
| `/codexspec:implement-tasks` | Execute tasks (conditional TDD) |
|
|
586
587
|
| `/codexspec:auto-dev` | Autonomously develop all pending blueprint requirements in order |
|
|
@@ -616,6 +617,11 @@ Implementation follows **conditional TDD workflow**:
|
|
|
616
617
|
|
|
617
618
|
#### Git Workflow Commands
|
|
618
619
|
|
|
620
|
+
Agents invoke `commit-staged` before authorized commits, including auto-dev and
|
|
621
|
+
blueprint commits. The caller prepares staging; the command generates a subject
|
|
622
|
+
and any needed body from the staged diff only. Helper workflows use preview
|
|
623
|
+
analysis and verify that the finalized commit matches the analyzed content.
|
|
624
|
+
|
|
619
625
|
| Command | Description |
|
|
620
626
|
| -------------------------- | ------------------------------------------------- |
|
|
621
627
|
| `/codexspec:commit-staged` | Generate commit message from staged changes |
|
|
@@ -834,6 +840,8 @@ Contributions are welcome! Please read the contributing guidelines before submit
|
|
|
834
840
|
|
|
835
841
|
MIT License - see [LICENSE](LICENSE) for details.
|
|
836
842
|
|
|
843
|
+
The commit-staged runtime is bundled with Claude plugins and copied by init to `.codexspec/scripts/commit-staged-helper.py`, including one-time uvx initialization. Direct preview and authorized in-place commits require Python 3.11+ and Git, but no persistent CodexSpec CLI. The current agent generates the message; the shared helper validates and executes it. Worktree routing, blueprint and auto-dev keep their existing CLI prerequisites.
|
|
844
|
+
|
|
837
845
|
## Acknowledgements
|
|
838
846
|
|
|
839
847
|
- Inspired by [GitHub spec-kit](https://github.com/github/spec-kit)
|
|
@@ -845,3 +853,10 @@ Blueprint and auto-dev retain their fixed shared worktree. Standalone project ed
|
|
|
845
853
|
use a maintenance worktree; settings take effect per checkout and reach other checkouts
|
|
846
854
|
through Git integration. See [worktree development](docs/en/user-guide/workflow.md#worktree-development)
|
|
847
855
|
and [configuration](docs/en/reference/configuration.md#workflowworktrees).
|
|
856
|
+
|
|
857
|
+
The enabled Claude plugin loads the same commit guidance at session start,
|
|
858
|
+
including resumed sessions, through its bundled `hooks/hooks.json`. This requires
|
|
859
|
+
Git on PATH and a Claude Code version supporting command-hook `args` (exec form).
|
|
860
|
+
It does not initialize the project or modify its Git state. Initialized projects
|
|
861
|
+
receive the rule in CLAUDE.md or AGENTS.md. The guidance tells the agent to invoke
|
|
862
|
+
commit-staged; it is not a Git-wide interceptor for manual terminal commands.
|
|
@@ -124,7 +124,7 @@ CodexSpec structures development into **reviewable checkpoints**:
|
|
|
124
124
|
Idea → /specify → requirements.md
|
|
125
125
|
→ /generate-spec → spec.md → review-spec
|
|
126
126
|
→ /spec-to-design → design.md → review-design
|
|
127
|
-
→ /
|
|
127
|
+
→ /design-to-plan → plan.md → review-plan
|
|
128
128
|
→ /plan-to-tasks → tasks.md → review-tasks
|
|
129
129
|
→ /implement-tasks → code
|
|
130
130
|
```
|
|
@@ -167,7 +167,7 @@ claude
|
|
|
167
167
|
> /codexspec:specify I want to build a todo application
|
|
168
168
|
> /codexspec:generate-spec
|
|
169
169
|
> /codexspec:spec-to-design
|
|
170
|
-
> /codexspec:
|
|
170
|
+
> /codexspec:design-to-plan
|
|
171
171
|
> /codexspec:plan-to-tasks
|
|
172
172
|
> /codexspec:implement-tasks
|
|
173
173
|
```
|
|
@@ -304,7 +304,7 @@ The config command will guide you through:
|
|
|
304
304
|
| Method | Best For | Features |
|
|
305
305
|
|--------|----------|----------|
|
|
306
306
|
| **CLI Installation** (`uv tool install`) | Full development workflow | CLI commands (`init`, `check`, `config`) + slash commands |
|
|
307
|
-
| **Plugin Marketplace** | Quick start, existing projects | Slash commands
|
|
307
|
+
| **Plugin Marketplace** | Quick start, existing projects | Slash commands + automatic commit guidance (use `/codexspec:config` for language setup) |
|
|
308
308
|
|
|
309
309
|
**Note**: The plugin uses `strict: false` mode and reuses the existing multi-language support via LLM dynamic translation.
|
|
310
310
|
|
|
@@ -318,7 +318,7 @@ CodexSpec breaks development into **reviewable checkpoints**:
|
|
|
318
318
|
Idea → /specify → requirements.md
|
|
319
319
|
→ /generate-spec → spec.md → review-spec
|
|
320
320
|
→ /spec-to-design → design.md → review-design
|
|
321
|
-
→ /
|
|
321
|
+
→ /design-to-plan → plan.md → review-plan
|
|
322
322
|
→ /plan-to-tasks → tasks.md → review-tasks
|
|
323
323
|
→ /implement-tasks → code
|
|
324
324
|
```
|
|
@@ -331,7 +331,7 @@ Idea → /specify → requirements.md
|
|
|
331
331
|
| 2. Requirement Clarification | `/codexspec:specify` | `requirements.md` | ✅ |
|
|
332
332
|
| 3. Generate Spec | `/codexspec:generate-spec` | `spec.md` + auto-review | ✅ |
|
|
333
333
|
| 4. System Design | `/codexspec:spec-to-design` | `design.md` + auto-review | ✅ |
|
|
334
|
-
| 5. Technical Planning | `/codexspec:
|
|
334
|
+
| 5. Technical Planning | `/codexspec:design-to-plan` | `plan.md` + auto-review | ✅ |
|
|
335
335
|
| 6. Task Breakdown | `/codexspec:plan-to-tasks` | `tasks.md` + auto-review | ✅ |
|
|
336
336
|
| 7. Cross-Artifact Analysis | `/codexspec:analyze` | Analysis report | ✅ |
|
|
337
337
|
| 8. Implementation | `/codexspec:implement-tasks` | Code | - |
|
|
@@ -433,7 +433,8 @@ This command:
|
|
|
433
433
|
### 5. Create Technical Plan
|
|
434
434
|
|
|
435
435
|
```
|
|
436
|
-
/codexspec:spec-to-
|
|
436
|
+
/codexspec:spec-to-design Use Python FastAPI for backend, PostgreSQL for database, React for frontend
|
|
437
|
+
/codexspec:design-to-plan
|
|
437
438
|
```
|
|
438
439
|
|
|
439
440
|
Uses only relevant planning sections, records `Covers` links to specification requirements, and verifies applicable project principles.
|
|
@@ -535,7 +536,7 @@ Implementation follows **conditional TDD workflow**:
|
|
|
535
536
|
| `/codexspec:blueprint` | Discuss and maintain confirmed requirements in the shared blueprint |
|
|
536
537
|
| `/codexspec:generate-spec` | Generate `spec.md` document ★ Auto-review |
|
|
537
538
|
| `/codexspec:spec-to-design` | Produce `design.md` (architecture/components/decisions) ★ Auto-review |
|
|
538
|
-
| `/codexspec:
|
|
539
|
+
| `/codexspec:design-to-plan` | Convert design to implementation plan ★ Auto-review |
|
|
539
540
|
| `/codexspec:plan-to-tasks` | Break down plan into traceable, verifiable tasks ★ Auto-review |
|
|
540
541
|
| `/codexspec:implement-tasks` | Execute tasks (conditional TDD) |
|
|
541
542
|
| `/codexspec:auto-dev` | Autonomously develop all pending blueprint requirements in order |
|
|
@@ -571,6 +572,11 @@ Implementation follows **conditional TDD workflow**:
|
|
|
571
572
|
|
|
572
573
|
#### Git Workflow Commands
|
|
573
574
|
|
|
575
|
+
Agents invoke `commit-staged` before authorized commits, including auto-dev and
|
|
576
|
+
blueprint commits. The caller prepares staging; the command generates a subject
|
|
577
|
+
and any needed body from the staged diff only. Helper workflows use preview
|
|
578
|
+
analysis and verify that the finalized commit matches the analyzed content.
|
|
579
|
+
|
|
574
580
|
| Command | Description |
|
|
575
581
|
| -------------------------- | ------------------------------------------------- |
|
|
576
582
|
| `/codexspec:commit-staged` | Generate commit message from staged changes |
|
|
@@ -789,6 +795,8 @@ Contributions are welcome! Please read the contributing guidelines before submit
|
|
|
789
795
|
|
|
790
796
|
MIT License - see [LICENSE](LICENSE) for details.
|
|
791
797
|
|
|
798
|
+
The commit-staged runtime is bundled with Claude plugins and copied by init to `.codexspec/scripts/commit-staged-helper.py`, including one-time uvx initialization. Direct preview and authorized in-place commits require Python 3.11+ and Git, but no persistent CodexSpec CLI. The current agent generates the message; the shared helper validates and executes it. Worktree routing, blueprint and auto-dev keep their existing CLI prerequisites.
|
|
799
|
+
|
|
792
800
|
## Acknowledgements
|
|
793
801
|
|
|
794
802
|
- Inspired by [GitHub spec-kit](https://github.com/github/spec-kit)
|
|
@@ -800,3 +808,10 @@ Blueprint and auto-dev retain their fixed shared worktree. Standalone project ed
|
|
|
800
808
|
use a maintenance worktree; settings take effect per checkout and reach other checkouts
|
|
801
809
|
through Git integration. See [worktree development](docs/en/user-guide/workflow.md#worktree-development)
|
|
802
810
|
and [configuration](docs/en/reference/configuration.md#workflowworktrees).
|
|
811
|
+
|
|
812
|
+
The enabled Claude plugin loads the same commit guidance at session start,
|
|
813
|
+
including resumed sessions, through its bundled `hooks/hooks.json`. This requires
|
|
814
|
+
Git on PATH and a Claude Code version supporting command-hook `args` (exec form).
|
|
815
|
+
It does not initialize the project or modify its Git state. Initialized projects
|
|
816
|
+
receive the rule in CLAUDE.md or AGENTS.md. The guidance tells the agent to invoke
|
|
817
|
+
commit-staged; it is not a Git-wide interceptor for manual terminal commands.
|
|
@@ -95,7 +95,7 @@ if (-not (Test-Path $paths.FEATURE_DIR -PathType Container)) {
|
|
|
95
95
|
|
|
96
96
|
if (-not (Test-Path $paths.IMPL_PLAN -PathType Leaf)) {
|
|
97
97
|
Write-Output "ERROR: plan.md not found in $($paths.FEATURE_DIR)"
|
|
98
|
-
Write-Output "Run /codexspec:
|
|
98
|
+
Write-Output "Run /codexspec:design-to-plan first to create the implementation plan."
|
|
99
99
|
exit 1
|
|
100
100
|
}
|
|
101
101
|
|
|
@@ -46,6 +46,7 @@ from .commands.installer import (
|
|
|
46
46
|
should_update_commands,
|
|
47
47
|
update_installed_command_frontmatter,
|
|
48
48
|
)
|
|
49
|
+
from .commit_guidance import inject_commit_guidance
|
|
49
50
|
from .distill_review.domain import ReviewError, ReviewService
|
|
50
51
|
from .distill_review.lease import ActiveSessionError, ReviewLease
|
|
51
52
|
from .distill_review.server import create_server
|
|
@@ -77,7 +78,7 @@ from .worktrees import (
|
|
|
77
78
|
)
|
|
78
79
|
|
|
79
80
|
# Version info
|
|
80
|
-
__version__ = "0.7.
|
|
81
|
+
__version__ = "0.7.21"
|
|
81
82
|
__author__ = "CodexSpec Team"
|
|
82
83
|
|
|
83
84
|
# Constitution file path constants
|
|
@@ -109,6 +110,12 @@ def worktree_helper(
|
|
|
109
110
|
root = checkout_root(Path.cwd())
|
|
110
111
|
if action == "setting":
|
|
111
112
|
result = {"enabled": read_worktrees(root / ".codexspec/config.yml")}
|
|
113
|
+
elif action == "finish-initial" and verification:
|
|
114
|
+
from .automation import finish_initial_workspace
|
|
115
|
+
|
|
116
|
+
result = finish_initial_workspace(
|
|
117
|
+
locate_repository(root), json.loads(verification.read_text(encoding="utf-8"))
|
|
118
|
+
)
|
|
112
119
|
elif action == "route":
|
|
113
120
|
result = {"status": "ready", "workspace": str(write_destination(root))}
|
|
114
121
|
elif action == "create" and not read_worktrees(root / ".codexspec/config.yml"):
|
|
@@ -388,10 +395,30 @@ def _stdin_json() -> dict:
|
|
|
388
395
|
|
|
389
396
|
|
|
390
397
|
def _automation_failure(exc: Exception) -> None:
|
|
398
|
+
if isinstance(exc, AutomationError) and exc.code == "initial_merge_requires_verification":
|
|
399
|
+
_machine_json(json.loads(str(exc).split(": ", 1)[1]))
|
|
400
|
+
raise typer.Exit(3)
|
|
391
401
|
typer.echo(str(exc), err=True)
|
|
392
402
|
raise typer.Exit(1)
|
|
393
403
|
|
|
394
404
|
|
|
405
|
+
def _analysis_request(body: dict[str, Any], *, token: bool = False) -> None:
|
|
406
|
+
keys = {"preparation_id", "analyzed_tree", "message"} | ({"token"} if token else set())
|
|
407
|
+
if set(body) != keys or not all(isinstance(body[key], str) for key in keys):
|
|
408
|
+
raise AutomationError("analysis_required", "prepare staging and use commit-staged -p before finalizing")
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
@app.command("_commit-staged-helper", hidden=True)
|
|
412
|
+
def commit_staged_helper(action: str = typer.Argument(...)) -> None:
|
|
413
|
+
"""Snapshot or commit the original index without staging files."""
|
|
414
|
+
from .commit_runtime import dispatch
|
|
415
|
+
|
|
416
|
+
try:
|
|
417
|
+
_machine_json(dispatch(action, _stdin_json() if action == "commit" else None))
|
|
418
|
+
except (AutomationError, OSError, ValueError) as exc:
|
|
419
|
+
_automation_failure(exc)
|
|
420
|
+
|
|
421
|
+
|
|
395
422
|
@app.command("_blueprint-helper", hidden=True)
|
|
396
423
|
def blueprint_helper(
|
|
397
424
|
action: str = typer.Argument(..., help="Internal helper action"),
|
|
@@ -418,9 +445,31 @@ def blueprint_helper(
|
|
|
418
445
|
}
|
|
419
446
|
)
|
|
420
447
|
return
|
|
448
|
+
if action == "prepare":
|
|
449
|
+
_machine_json(store.prepare(sys.stdin.buffer.read(), owner_token=auto_dev_token))
|
|
450
|
+
return
|
|
421
451
|
if action == "apply":
|
|
422
|
-
|
|
423
|
-
|
|
452
|
+
body = _stdin_json()
|
|
453
|
+
_analysis_request(body)
|
|
454
|
+
_machine_json(
|
|
455
|
+
store.apply_and_commit(
|
|
456
|
+
body["preparation_id"],
|
|
457
|
+
body["analyzed_tree"],
|
|
458
|
+
body["message"],
|
|
459
|
+
owner_token=auto_dev_token,
|
|
460
|
+
)
|
|
461
|
+
)
|
|
462
|
+
return
|
|
463
|
+
if action == "discard":
|
|
464
|
+
from .staged_commits import PreparedCommits
|
|
465
|
+
|
|
466
|
+
body = _stdin_json()
|
|
467
|
+
if set(body) != {"preparation_id"} or not isinstance(body["preparation_id"], str):
|
|
468
|
+
raise AutomationError("invalid_preparation")
|
|
469
|
+
if auto_dev_token is not None:
|
|
470
|
+
AutoDevOwnership(context).assert_owner(auto_dev_token)
|
|
471
|
+
PreparedCommits(workspace).discard(body["preparation_id"], kind="blueprint", token=auto_dev_token)
|
|
472
|
+
_machine_json({"state": "discarded"})
|
|
424
473
|
return
|
|
425
474
|
raise AutomationError("unsupported_blueprint_helper_action", action)
|
|
426
475
|
except (AutomationError, OwnershipError, OSError, UnicodeError, ValueError) as exc:
|
|
@@ -444,9 +493,9 @@ def auto_dev_helper(action: str = typer.Argument(..., help="Internal helper acti
|
|
|
444
493
|
if body:
|
|
445
494
|
raise AutomationError("unexpected_fields")
|
|
446
495
|
token = ownership.acquire()
|
|
447
|
-
workspace = ensure_dedicated_workspace(context)
|
|
448
|
-
service = AutoDevGit(workspace, ownership)
|
|
449
496
|
try:
|
|
497
|
+
workspace = ensure_dedicated_workspace(context)
|
|
498
|
+
service = AutoDevGit(workspace, ownership)
|
|
450
499
|
merge_recovery = service.recover_merge_ownership(token)
|
|
451
500
|
if merge_recovery["state"] == "none":
|
|
452
501
|
BlueprintStore(workspace).recover_pending_transaction(owner_token=token)
|
|
@@ -490,19 +539,34 @@ def auto_dev_helper(action: str = typer.Argument(..., help="Internal helper acti
|
|
|
490
539
|
elif action == "abort-sync":
|
|
491
540
|
result = service.abort_sync(token)
|
|
492
541
|
elif action == "continue-sync":
|
|
493
|
-
if set(body)
|
|
542
|
+
if set(body) not in (
|
|
543
|
+
{"token", "checks_passed"},
|
|
544
|
+
{"token", "checks_passed", "analysis", "message"},
|
|
545
|
+
) or not isinstance(body.get("checks_passed"), bool):
|
|
494
546
|
raise AutomationError("invalid_continue_sync_request")
|
|
495
|
-
result = service.continue_sync(
|
|
496
|
-
|
|
497
|
-
if set(body) != {"token", "feature_id", "commit_type", "description", "paths"}:
|
|
498
|
-
raise AutomationError("invalid_commit_feature_request")
|
|
499
|
-
if not all(isinstance(body[key], str) for key in ("feature_id", "commit_type", "description")):
|
|
500
|
-
raise AutomationError("invalid_commit_feature_request")
|
|
501
|
-
if not isinstance(body["paths"], list) or not all(isinstance(item, str) for item in body["paths"]):
|
|
502
|
-
raise AutomationError("invalid_commit_feature_request")
|
|
503
|
-
result = service.commit_feature(
|
|
504
|
-
token, body["feature_id"], body["commit_type"], body["description"], body["paths"]
|
|
547
|
+
result = service.continue_sync(
|
|
548
|
+
token, checks_passed=body["checks_passed"], analysis=body.get("analysis"), message=body.get("message")
|
|
505
549
|
)
|
|
550
|
+
elif action == "prepare-feature":
|
|
551
|
+
if (
|
|
552
|
+
set(body) != {"token", "feature_id", "paths"}
|
|
553
|
+
or not isinstance(body["feature_id"], str)
|
|
554
|
+
or not isinstance(body["paths"], list)
|
|
555
|
+
or not all(isinstance(path, str) for path in body["paths"])
|
|
556
|
+
):
|
|
557
|
+
raise AutomationError("invalid_prepare_feature_request")
|
|
558
|
+
result = service.prepare_feature(token, body["feature_id"], body["paths"])
|
|
559
|
+
elif action == "commit-feature":
|
|
560
|
+
_analysis_request(body, token=True)
|
|
561
|
+
result = service.commit_feature(token, body["preparation_id"], body["analyzed_tree"], body["message"])
|
|
562
|
+
elif action == "discard-feature":
|
|
563
|
+
from .staged_commits import PreparedCommits
|
|
564
|
+
|
|
565
|
+
if set(body) != {"token", "preparation_id"} or not isinstance(body["preparation_id"], str):
|
|
566
|
+
raise AutomationError("invalid_preparation")
|
|
567
|
+
ownership.assert_owner(token)
|
|
568
|
+
PreparedCommits(workspace).discard(body["preparation_id"], kind="feature", token=token)
|
|
569
|
+
result = {"state": "discarded"}
|
|
506
570
|
else:
|
|
507
571
|
raise AutomationError("unsupported_auto_dev_helper_action", action)
|
|
508
572
|
_machine_json(result)
|
|
@@ -1186,6 +1250,10 @@ def init(
|
|
|
1186
1250
|
ensure_profile_scaffold(target_dir)
|
|
1187
1251
|
ensure_runtime_ignored(target_dir, install_managed_file=True)
|
|
1188
1252
|
|
|
1253
|
+
from .commit_runtime import install_helper
|
|
1254
|
+
|
|
1255
|
+
install_helper(codexspec_dir / "scripts")
|
|
1256
|
+
|
|
1189
1257
|
# Copy helper scripts based on platform
|
|
1190
1258
|
scripts_source_dir = get_scripts_dir()
|
|
1191
1259
|
if scripts_source_dir.exists():
|
|
@@ -1367,6 +1435,7 @@ def init(
|
|
|
1367
1435
|
# Inject the profile block AFTER creation/compliance so it never clobbers
|
|
1368
1436
|
# the compliance @import or the user's body (bounded, idempotent).
|
|
1369
1437
|
inject_profile_block(claude_md)
|
|
1438
|
+
inject_commit_guidance(claude_md, "/codexspec:commit-staged")
|
|
1370
1439
|
|
|
1371
1440
|
# Initialize git if requested
|
|
1372
1441
|
if not no_git and not (target_dir / ".git").exists():
|
|
@@ -2069,7 +2138,8 @@ The following slash commands are available in this project:
|
|
|
2069
2138
|
| `/codexspec:specify` | Define what you want to build (requirements and user stories) |
|
|
2070
2139
|
| `/codexspec:blueprint` | Discuss and maintain confirmed requirements in the shared blueprint |
|
|
2071
2140
|
| `/codexspec:generate-spec` | Generate detailed specification from high-level requirements |
|
|
2072
|
-
| `/codexspec:spec-to-
|
|
2141
|
+
| `/codexspec:spec-to-design` | Convert specification to design |
|
|
2142
|
+
| `/codexspec:design-to-plan` | Convert design to implementation plan |
|
|
2073
2143
|
| `/codexspec:plan-to-tasks` | Break down plan into actionable tasks |
|
|
2074
2144
|
| `/codexspec:review-spec` | Review specification for completeness and quality |
|
|
2075
2145
|
| `/codexspec:review-plan` | Review technical plan for feasibility |
|
|
@@ -2112,12 +2182,13 @@ The following slash commands are available in this project:
|
|
|
2112
2182
|
2. **Create Specification**: Run `/codexspec:specify` with your feature requirements
|
|
2113
2183
|
3. **Clarify Spec**: Run `/codexspec:clarify` to resolve ambiguities
|
|
2114
2184
|
4. **Review Spec**: Run `/codexspec:review-spec` to validate the specification
|
|
2115
|
-
5. **Create
|
|
2116
|
-
6. **
|
|
2117
|
-
7. **
|
|
2118
|
-
8. **
|
|
2119
|
-
9. **
|
|
2120
|
-
10. **
|
|
2185
|
+
5. **Create Design**: Run `/codexspec:spec-to-design` to define the system design
|
|
2186
|
+
6. **Create Plan**: Run `/codexspec:design-to-plan` to plan implementation of the design
|
|
2187
|
+
7. **Review Plan**: Run `/codexspec:review-plan` to validate the plan
|
|
2188
|
+
8. **Generate Tasks**: Run `/codexspec:plan-to-tasks` to create task breakdown
|
|
2189
|
+
9. **Analyze**: Run `/codexspec:analyze` for cross-artifact consistency
|
|
2190
|
+
10. **Review Tasks**: Run `/codexspec:review-tasks` to validate tasks
|
|
2191
|
+
11. **Implement**: Run `/codexspec:implement-tasks` to execute the implementation
|
|
2121
2192
|
|
|
2122
2193
|
> **Shortcut**: For small, self-contained requirements, run `/codexspec:quick` to
|
|
2123
2194
|
> auto-run spec → plan → tasks → implementation in one shot.
|