codexspec 0.1.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.
@@ -0,0 +1,286 @@
1
+ # IDE
2
+ .idea/
3
+ .vscode/
4
+ *.swp
5
+ *.swo
6
+ *~
7
+ /spec-kit/
8
+
9
+ # Project specific
10
+ .codexspec/
11
+ !.codexspec/.gitkeep
12
+
13
+
14
+
15
+ # Created by https://www.toptal.com/developers/gitignore/api/macos,windows,linux,python,powershell,git
16
+ # Edit at https://www.toptal.com/developers/gitignore?templates=macos,windows,linux,python,powershell,git
17
+
18
+ ### Git ###
19
+ # Created by git for backups. To disable backups in Git:
20
+ # $ git config --global mergetool.keepBackup false
21
+ *.orig
22
+
23
+ # Created by git when using merge tools for conflicts
24
+ *.BACKUP.*
25
+ *.BASE.*
26
+ *.LOCAL.*
27
+ *.REMOTE.*
28
+ *_BACKUP_*.txt
29
+ *_BASE_*.txt
30
+ *_LOCAL_*.txt
31
+ *_REMOTE_*.txt
32
+
33
+ ### Linux ###
34
+ *~
35
+
36
+ # temporary files which can be created if a process still has a handle open of a deleted file
37
+ .fuse_hidden*
38
+
39
+ # KDE directory preferences
40
+ .directory
41
+
42
+ # Linux trash folder which might appear on any partition or disk
43
+ .Trash-*
44
+
45
+ # .nfs files are created when an open file is removed but is still being accessed
46
+ .nfs*
47
+
48
+ ### macOS ###
49
+ # General
50
+ .DS_Store
51
+ .AppleDouble
52
+ .LSOverride
53
+
54
+ # Icon must end with two \r
55
+ Icon
56
+
57
+
58
+ # Thumbnails
59
+ ._*
60
+
61
+ # Files that might appear in the root of a volume
62
+ .DocumentRevisions-V100
63
+ .fseventsd
64
+ .Spotlight-V100
65
+ .TemporaryItems
66
+ .Trashes
67
+ .VolumeIcon.icns
68
+ .com.apple.timemachine.donotpresent
69
+
70
+ # Directories potentially created on remote AFP share
71
+ .AppleDB
72
+ .AppleDesktop
73
+ Network Trash Folder
74
+ Temporary Items
75
+ .apdisk
76
+
77
+ ### macOS Patch ###
78
+ # iCloud generated files
79
+ *.icloud
80
+
81
+ ### PowerShell ###
82
+ # Exclude packaged modules
83
+ *.zip
84
+
85
+ # Exclude .NET assemblies from source
86
+ *.dll
87
+
88
+ ### Python ###
89
+ # Byte-compiled / optimized / DLL files
90
+ __pycache__/
91
+ *.py[cod]
92
+ *$py.class
93
+
94
+ # C extensions
95
+ *.so
96
+
97
+ # Distribution / packaging
98
+ .Python
99
+ build/
100
+ develop-eggs/
101
+ dist/
102
+ downloads/
103
+ eggs/
104
+ .eggs/
105
+ lib/
106
+ lib64/
107
+ parts/
108
+ sdist/
109
+ var/
110
+ wheels/
111
+ share/python-wheels/
112
+ *.egg-info/
113
+ .installed.cfg
114
+ *.egg
115
+ MANIFEST
116
+
117
+ # PyInstaller
118
+ # Usually these files are written by a python script from a template
119
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
120
+ *.manifest
121
+ *.spec
122
+
123
+ # Installer logs
124
+ pip-log.txt
125
+ pip-delete-this-directory.txt
126
+
127
+ # Unit test / coverage reports
128
+ htmlcov/
129
+ .tox/
130
+ .nox/
131
+ .coverage
132
+ .coverage.*
133
+ .cache
134
+ nosetests.xml
135
+ coverage.xml
136
+ *.cover
137
+ *.py,cover
138
+ .hypothesis/
139
+ .pytest_cache/
140
+ cover/
141
+
142
+ # Translations
143
+ *.mo
144
+ *.pot
145
+
146
+ # Django stuff:
147
+ *.log
148
+ local_settings.py
149
+ db.sqlite3
150
+ db.sqlite3-journal
151
+
152
+ # Flask stuff:
153
+ instance/
154
+ .webassets-cache
155
+
156
+ # Scrapy stuff:
157
+ .scrapy
158
+
159
+ # Sphinx documentation
160
+ docs/_build/
161
+
162
+ # PyBuilder
163
+ .pybuilder/
164
+ target/
165
+
166
+ # Jupyter Notebook
167
+ .ipynb_checkpoints
168
+
169
+ # IPython
170
+ profile_default/
171
+ ipython_config.py
172
+
173
+ # pyenv
174
+ # For a library or package, you might want to ignore these files since the code is
175
+ # intended to run in multiple environments; otherwise, check them in:
176
+ # .python-version
177
+
178
+ # pipenv
179
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
180
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
181
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
182
+ # install all needed dependencies.
183
+ #Pipfile.lock
184
+
185
+ # poetry
186
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
187
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
188
+ # commonly ignored for libraries.
189
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
190
+ #poetry.lock
191
+
192
+ # pdm
193
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
194
+ #pdm.lock
195
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
196
+ # in version control.
197
+ # https://pdm.fming.dev/#use-with-ide
198
+ .pdm.toml
199
+
200
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
201
+ __pypackages__/
202
+
203
+ # Celery stuff
204
+ celerybeat-schedule
205
+ celerybeat.pid
206
+
207
+ # SageMath parsed files
208
+ *.sage.py
209
+
210
+ # Environments
211
+ .env
212
+ .venv
213
+ env/
214
+ venv/
215
+ ENV/
216
+ env.bak/
217
+ venv.bak/
218
+
219
+ # Spyder project settings
220
+ .spyderproject
221
+ .spyproject
222
+
223
+ # Rope project settings
224
+ .ropeproject
225
+
226
+ # mkdocs documentation
227
+ /site
228
+
229
+ # mypy
230
+ .mypy_cache/
231
+ .dmypy.json
232
+ dmypy.json
233
+
234
+ # Pyre type checker
235
+ .pyre/
236
+
237
+ # pytype static type analyzer
238
+ .pytype/
239
+
240
+ # Cython debug symbols
241
+ cython_debug/
242
+
243
+ # PyCharm
244
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
245
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
246
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
247
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
248
+ #.idea/
249
+
250
+ ### Python Patch ###
251
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
252
+ poetry.toml
253
+
254
+ # ruff
255
+ .ruff_cache/
256
+
257
+ # LSP config files
258
+ pyrightconfig.json
259
+
260
+ ### Windows ###
261
+ # Windows thumbnail cache files
262
+ Thumbs.db
263
+ Thumbs.db:encryptable
264
+ ehthumbs.db
265
+ ehthumbs_vista.db
266
+
267
+ # Dump file
268
+ *.stackdump
269
+
270
+ # Folder config file
271
+ [Dd]esktop.ini
272
+
273
+ # Recycle Bin used on file shares
274
+ $RECYCLE.BIN/
275
+
276
+ # Windows Installer files
277
+ *.cab
278
+ *.msi
279
+ *.msix
280
+ *.msm
281
+ *.msp
282
+
283
+ # Windows shortcuts
284
+ *.lnk
285
+
286
+ # End of https://www.toptal.com/developers/gitignore/api/macos,windows,linux,python,powershell,git
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 CodexSpec Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,384 @@
1
+ Metadata-Version: 2.4
2
+ Name: codexspec
3
+ Version: 0.1.0
4
+ Summary: CodexSpec - A Spec-Driven Development (SDD) toolkit for Claude Code
5
+ Project-URL: Homepage, https://github.com/Zts0hg/codexspec
6
+ Project-URL: Repository, https://github.com/Zts0hg/codexspec
7
+ Project-URL: Issues, https://github.com/Zts0hg/codexspec/issues
8
+ Author: CodexSpec Team
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai,claude,cli,sdd,spec-driven-development
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development
20
+ Classifier: Topic :: Software Development :: Code Generators
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: httpx>=0.25.0
23
+ Requires-Dist: packaging>=23.0
24
+ Requires-Dist: platformdirs>=4.0.0
25
+ Requires-Dist: pyyaml>=6.0
26
+ Requires-Dist: rich>=13.0.0
27
+ Requires-Dist: typer>=0.9.0
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
30
+ Requires-Dist: pytest>=7.0; extra == 'dev'
31
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
32
+ Description-Content-Type: text/markdown
33
+
34
+ # CodexSpec
35
+
36
+ **A Spec-Driven Development (SDD) toolkit for Claude Code**
37
+
38
+ CodexSpec is a toolkit that helps you build high-quality software using a structured, specification-driven approach. It flips the script on traditional development by making specifications executable artifacts that directly guide implementation.
39
+
40
+ ## Features
41
+
42
+ - **Structured Workflow**: Clear commands for each phase of development
43
+ - **Claude Code Integration**: Native slash commands for Claude Code
44
+ - **Constitution-Based**: Project principles guide all decisions
45
+ - **Specification-First**: Define what and why before how
46
+ - **Plan-Driven**: Technical choices come after requirements
47
+ - **Task-Oriented**: Break down implementation into actionable tasks
48
+ - **Quality Assurance**: Built-in review, analysis, and checklist commands
49
+ - **Cross-Platform**: Support for both Bash and PowerShell scripts
50
+ - **Extensible**: Plugin architecture for custom commands
51
+
52
+ ## Installation
53
+
54
+ ### Option 1: Persistent Installation (Recommended)
55
+
56
+ Install once and use everywhere:
57
+
58
+ ```bash
59
+ uv tool install codexspec --from git+https://github.com/Zts0hg/codexspec.git
60
+ ```
61
+
62
+ Then use the tool directly:
63
+
64
+ ```bash
65
+ # Create new project
66
+ codexspec init my-project
67
+
68
+ # Initialize in existing project
69
+ codexspec init . --ai claude
70
+ # or
71
+ codexspec init --here --ai claude
72
+
73
+ # Check installed tools
74
+ codexspec check
75
+
76
+ # View version
77
+ codexspec version
78
+ ```
79
+
80
+ To upgrade:
81
+
82
+ ```bash
83
+ uv tool install codexspec --force --from git+https://github.com/Zts0hg/codexspec.git
84
+ ```
85
+
86
+ ### Option 2: One-time Usage
87
+
88
+ Run directly without installing:
89
+
90
+ ```bash
91
+ uvx --from git+https://github.com/Zts0hg/codexspec.git codexspec init my-project
92
+ ```
93
+
94
+ ## Quick Start
95
+
96
+ ### 1. Initialize a Project
97
+
98
+ ```bash
99
+ # Create a new project
100
+ codexspec init my-awesome-project
101
+
102
+ # Or initialize in current directory
103
+ codexspec init . --ai claude
104
+ ```
105
+
106
+ ### 2. Establish Project Principles
107
+
108
+ Launch Claude Code in the project directory:
109
+
110
+ ```bash
111
+ cd my-awesome-project
112
+ claude
113
+ ```
114
+
115
+ Use the `/codexspec.constitution` command to create your project's governing principles:
116
+
117
+ ```
118
+ /codexspec.constitution Create principles focused on code quality, testing standards, and clean architecture
119
+ ```
120
+
121
+ ### 3. Create a Specification
122
+
123
+ Use `/codexspec.specify` to define what you want to build:
124
+
125
+ ```
126
+ /codexspec.specify Build a task management application with the following features: create tasks, assign to users, set due dates, and track progress
127
+ ```
128
+
129
+ ### 4. Clarify Requirements (Optional but Recommended)
130
+
131
+ Use `/codexspec.clarify` to resolve ambiguities before planning:
132
+
133
+ ```
134
+ /codexspec.clarify
135
+ ```
136
+
137
+ ### 5. Create a Technical Plan
138
+
139
+ Use `/codexspec.spec-to-plan` to define how to implement it:
140
+
141
+ ```
142
+ /codexspec.spec-to-plan Use Python with FastAPI for the backend, PostgreSQL for the database, and React for the frontend
143
+ ```
144
+
145
+ ### 6. Generate Tasks
146
+
147
+ Use `/codexspec.plan-to-tasks` to break down the plan:
148
+
149
+ ```
150
+ /codexspec.plan-to-tasks
151
+ ```
152
+
153
+ ### 7. Analyze (Optional but Recommended)
154
+
155
+ Use `/codexspec.analyze` for cross-artifact consistency check:
156
+
157
+ ```
158
+ /codexspec.analyze
159
+ ```
160
+
161
+ ### 8. Implement
162
+
163
+ Use `/codexspec.implement-tasks` to execute the implementation:
164
+
165
+ ```
166
+ /codexspec.implement-tasks
167
+ ```
168
+
169
+ ## Available Commands
170
+
171
+ ### CLI Commands
172
+
173
+ | Command | Description |
174
+ |---------|-------------|
175
+ | `codexspec init` | Initialize a new CodexSpec project |
176
+ | `codexspec check` | Check for installed tools |
177
+ | `codexspec version` | Display version information |
178
+
179
+ ### `codexspec init` Options
180
+
181
+ | Option | Description |
182
+ |--------|-------------|
183
+ | `PROJECT_NAME` | Name for your new project directory |
184
+ | `--here`, `-h` | Initialize in current directory |
185
+ | `--ai`, `-a` | AI assistant to use (default: claude) |
186
+ | `--force`, `-f` | Force overwrite existing files |
187
+ | `--no-git` | Skip git initialization |
188
+ | `--debug`, `-d` | Enable debug output |
189
+
190
+ ### Slash Commands
191
+
192
+ After initialization, these slash commands are available in Claude Code:
193
+
194
+ #### Core Commands
195
+
196
+ | Command | Description |
197
+ |---------|-------------|
198
+ | `/codexspec.constitution` | Create or update project governing principles |
199
+ | `/codexspec.specify` | Define what you want to build (requirements) |
200
+ | `/codexspec.generate-spec` | Generate detailed specification from requirements |
201
+ | `/codexspec.spec-to-plan` | Convert specification to technical plan |
202
+ | `/codexspec.plan-to-tasks` | Break down plan into actionable tasks |
203
+ | `/codexspec.implement-tasks` | Execute tasks according to breakdown |
204
+
205
+ #### Review Commands
206
+
207
+ | Command | Description |
208
+ |---------|-------------|
209
+ | `/codexspec.review-spec` | Review specification for completeness |
210
+ | `/codexspec.review-plan` | Review technical plan for feasibility |
211
+ | `/codexspec.review-tasks` | Review task breakdown for completeness |
212
+
213
+ #### Enhanced Commands
214
+
215
+ | Command | Description |
216
+ |---------|-------------|
217
+ | `/codexspec.clarify` | Clarify underspecified areas before planning |
218
+ | `/codexspec.analyze` | Cross-artifact consistency analysis |
219
+ | `/codexspec.checklist` | Generate quality checklists for requirements |
220
+ | `/codexspec.tasks-to-issues` | Convert tasks to GitHub issues |
221
+
222
+ ## Workflow Overview
223
+
224
+ ```
225
+ ┌─────────────────────────────────────────────────────────────┐
226
+ │ CodexSpec Workflow │
227
+ ├─────────────────────────────────────────────────────────────┤
228
+ │ │
229
+ │ 1. Constitution ──► Define project principles │
230
+ │ │ │
231
+ │ ▼ │
232
+ │ 2. Specify ───────► Create feature specification │
233
+ │ │ │
234
+ │ ▼ │
235
+ │ 3. Clarify ───────► Resolve ambiguities (optional) │
236
+ │ │ │
237
+ │ ▼ │
238
+ │ 4. Review Spec ───► Validate specification │
239
+ │ │ │
240
+ │ ▼ │
241
+ │ 5. Spec to Plan ──► Create technical plan │
242
+ │ │ │
243
+ │ ▼ │
244
+ │ 6. Review Plan ───► Validate technical plan │
245
+ │ │ │
246
+ │ ▼ │
247
+ │ 7. Plan to Tasks ─► Generate task breakdown │
248
+ │ │ │
249
+ │ ▼ │
250
+ │ 8. Analyze ───────► Cross-artifact consistency (optional) │
251
+ │ │ │
252
+ │ ▼ │
253
+ │ 9. Review Tasks ──► Validate task breakdown │
254
+ │ │ │
255
+ │ ▼ │
256
+ │ 10. Implement ─────► Execute implementation │
257
+ │ │
258
+ └─────────────────────────────────────────────────────────────┘
259
+ ```
260
+
261
+ ## Project Structure
262
+
263
+ After initialization, your project will have this structure:
264
+
265
+ ```
266
+ my-project/
267
+ ├── .codexspec/
268
+ │ ├── memory/
269
+ │ │ └── constitution.md # Project governing principles
270
+ │ ├── specs/
271
+ │ │ └── {feature-id}/
272
+ │ │ ├── spec.md # Feature specification
273
+ │ │ ├── plan.md # Technical plan
274
+ │ │ ├── tasks.md # Task breakdown
275
+ │ │ └── checklists/ # Quality checklists
276
+ │ ├── templates/ # Custom templates
277
+ │ ├── scripts/ # Helper scripts
278
+ │ │ ├── bash/ # Bash scripts
279
+ │ │ └── powershell/ # PowerShell scripts
280
+ │ └── extensions/ # Custom extensions
281
+ ├── .claude/
282
+ │ └── commands/ # Slash commands for Claude Code
283
+ └── CLAUDE.md # Context for Claude Code
284
+ ```
285
+
286
+ ## Extension System
287
+
288
+ CodexSpec supports a plugin architecture for adding custom commands:
289
+
290
+ ### Extension Structure
291
+
292
+ ```
293
+ my-extension/
294
+ ├── extension.yml # Extension manifest
295
+ ├── commands/ # Custom slash commands
296
+ │ └── command.md
297
+ └── README.md
298
+ ```
299
+
300
+ ### Creating Extensions
301
+
302
+ 1. Copy the template from `extensions/template/`
303
+ 2. Modify `extension.yml` with your extension details
304
+ 3. Add your custom commands in `commands/`
305
+ 4. Test locally and publish
306
+
307
+ See `extensions/EXTENSION-DEVELOPMENT-GUIDE.md` for details.
308
+
309
+ ## Development
310
+
311
+ ### Prerequisites
312
+
313
+ - Python 3.11+
314
+ - uv package manager
315
+ - Git
316
+
317
+ ### Local Development
318
+
319
+ ```bash
320
+ # Clone the repository
321
+ git clone https://github.com/Zts0hg/codexspec.git
322
+ cd codexspec
323
+
324
+ # Install development dependencies
325
+ uv sync --dev
326
+
327
+ # Run locally
328
+ uv run codexspec --help
329
+
330
+ # Run tests
331
+ uv run pytest
332
+
333
+ # Lint code
334
+ uv run ruff check src/
335
+ ```
336
+
337
+ ### Building
338
+
339
+ ```bash
340
+ # Build the package
341
+ uv build
342
+ ```
343
+
344
+ ## Comparison with spec-kit
345
+
346
+ CodexSpec is inspired by GitHub's spec-kit but with some key differences:
347
+
348
+ | Feature | spec-kit | CodexSpec |
349
+ |---------|----------|-----------|
350
+ | Core Philosophy | Spec-driven development | Spec-driven development |
351
+ | CLI Name | `specify` | `codexspec` |
352
+ | Primary AI | Multi-agent support | Claude Code focused |
353
+ | Command Prefix | `/speckit.*` | `/codexspec.*` |
354
+ | Workflow | specify → plan → tasks → implement | constitution → specify → clarify → plan → tasks → analyze → implement |
355
+ | Review Steps | Optional | Built-in review commands |
356
+ | Clarify Command | Yes | Yes |
357
+ | Analyze Command | Yes | Yes |
358
+ | Checklist Command | Yes | Yes |
359
+ | Extension System | Yes | Yes |
360
+ | PowerShell Scripts | Yes | Yes |
361
+
362
+ ## Philosophy
363
+
364
+ CodexSpec follows these core principles:
365
+
366
+ 1. **Intent-driven development**: Specifications define the "what" before the "how"
367
+ 2. **Rich specification creation**: Use guardrails and organizational principles
368
+ 3. **Multi-step refinement**: Rather than one-shot code generation
369
+ 4. **Heavy reliance on AI**: Leverage AI for specification interpretation
370
+ 5. **Review-oriented**: Validate each artifact before moving forward
371
+ 6. **Quality-first**: Built-in checklists and analysis for requirements quality
372
+
373
+ ## Contributing
374
+
375
+ Contributions are welcome! Please read our contributing guidelines before submitting a pull request.
376
+
377
+ ## License
378
+
379
+ MIT License - see [LICENSE](LICENSE) for details.
380
+
381
+ ## Acknowledgements
382
+
383
+ - Inspired by [GitHub spec-kit](https://github.com/github/spec-kit)
384
+ - Built for [Claude Code](https://claude.ai/code)