@@ -30,14 +30,15 @@ Clone the repository and install dependencies:
3030
3131``` bash
3232git clone https://github.com/Coderrob/ddd-kit.git
33- cd document-driven-development
33+ cd ddd-kit
3434npm install
35+ npm run build
3536```
3637
37- Run the toolkit :
38+ Run the CLI :
3839
3940``` bash
40- npm start
41+ npm run cli -- --help
4142```
4243
4344### Running from Source
@@ -46,10 +47,10 @@ Want to live on the edge? Run the latest codebase:
4647
4748``` bash
4849git clone https://github.com/Coderrob/ddd-kit.git
49- cd document-driven-development
50+ cd ddd-kit
5051npm install
5152npm run build
52- npm start
53+ npm run cli -- --help
5354```
5455
5556⚠️ ** Note** : The development version is cutting-edge but may not be production-ready. Use at your own risk!
@@ -60,138 +61,154 @@ npm start
6061
6162Follow the instructions above to run the toolkit from source. Before contributing, make sure to:
6263
63- - Read the [ Contributing Guide] ( CONTRIBUTING.md ) .
6464- Run ` npm test ` to ensure your changes meet our quality standards.
65- - Use ` npm run dev ` for hot module reloading during development.
65+ - Use ` npm run dev ` for development with TypeScript compilation.
66+ - Use ` npm run build ` to compile TypeScript to JavaScript.
6667
67- To avoid committing files that fail linting, install a pre-commit git hook :
68+ To avoid committing files that fail linting, git hooks are automatically installed :
6869
6970``` bash
70- npm run githooks-install
71+ npm install # Installs husky pre-commit hooks automatically
7172```
7273
7374---
7475
7576## Command Line Interface (CLI) ⚡
7677
77- The Document Driven Development Kit comes with a powerful CLI to supercharge your workflow. Here's what you can do:
78+ The Document Driven Development Kit comes with a powerful CLI ( ` dddctl ` ) to supercharge your workflow. Here's what you can do:
7879
79- ### ` cli `
80+ ### CLI Usage
8081
81- The ` cli ` command is your gateway to creating and managing specifications .
82+ The CLI provides task management, validation, and development workflow commands .
8283
8384#### Usage
8485
8586``` bash
8687npm run cli -- < command> [options]
8788```
8889
90+ Or if installed globally:
91+
92+ ``` bash
93+ dddctl < command> [options]
94+ ```
95+
8996#### Commands
9097
91- - ` init ` : Kickstart a new specification project .
98+ - ` next ` : Hydrate the next eligible task for processing .
9299
93100 Example:
94101
95102 ``` bash
96- npm run cli -- init my-project
103+ npm run cli -- next
97104 ```
98105
99- - ` plan ` : Turn your specification into a technical implementation plan .
106+ - ` render ` : Re-render guidance for a specific task .
100107
101108 Example:
102109
103110 ``` bash
104- npm run cli -- plan my-spec.md
111+ npm run cli -- render < task-id >
105112 ```
106113
107- - ` tasks ` : Break down your specification into actionable tasks .
114+ - ` supersede ` : Supersede an old UID with a new one .
108115
109116 Example:
110117
111118 ``` bash
112- npm run cli -- tasks my-spec.md
119+ npm run cli -- supersede < old-uid > < new-uid >
113120 ```
114121
115122### CLI Commands and Sub-Commands
116123
117124The Document Driven Development Kit CLI provides the following commands and sub-commands:
118125
119- #### ` todo: list `
126+ #### ` todo list `
120127
121128List all tasks in the TODO.md file.
122129
123130Example:
124131
125132``` bash
126- npm run cli -- todo: list
133+ npm run cli -- todo list
127134```
128135
129- #### ` todo: show `
136+ #### ` todo show `
130137
131138Show details of a specific task by ID.
132139
133140Example:
134141
135142``` bash
136- npm run cli -- todo:show --id < task-id>
143+ npm run cli -- todo show < task-id>
137144```
138145
139- #### ` todo: complete `
146+ #### ` todo complete `
140147
141148Mark a task as complete.
142149
143150Example:
144151
145152``` bash
146- npm run cli -- todo: complete --id < task-id> --message " Task completed "
153+ npm run cli -- todo complete < task-id>
147154```
148155
149- #### ` todo: add `
156+ #### ` todo add `
150157
151158Add a new task from a file.
152159
153160Example:
154161
155162``` bash
156- npm run cli -- todo:add --file < file-path>
163+ npm run cli -- todo add < file-path>
157164```
158165
159- #### ` todo: validate`
166+ #### ` validate tasks `
160167
161- Validate tasks against the schema.
168+ Validate all tasks against the schema.
162169
163170Example:
164171
165172``` bash
166- npm run cli -- todo: validate
173+ npm run cli -- validate tasks
167174```
168175
169- #### ` todo: validate: fix`
176+ #### ` validate fix `
170177
171178Validate tasks and optionally fix issues.
172179
173180Example:
174181
175182``` bash
176- npm run cli -- todo:validate:fix --fix --dryRun --summary json
183+ npm run cli -- validate fix
184+ ```
185+
186+ #### ` ref audit `
187+
188+ Audit references across repository and tasks.
189+
190+ Example:
191+
192+ ``` bash
193+ npm run cli -- ref audit
177194```
178195
179196#### Options
180197
181- - ` --debug ` : Get detailed debug output for troubleshooting .
198+ - ` -V, --version ` : Display the version number .
182199
183200 Example:
184201
185202 ``` bash
186- npm run cli -- plan my-spec.md --debug
203+ npm run cli -- --version
187204 ```
188205
189- - ` --no-git ` : Skip git repository initialization during ` init ` .
206+ - ` -h, --help ` : Display help information for any command .
190207
191208 Example:
192209
193210 ``` bash
194- npm run cli -- init my-project --no-git
211+ npm run cli -- todo --help
195212 ```
196213
197214For a full list of commands and options, run:
@@ -202,6 +219,56 @@ npm run cli -- --help
202219
203220---
204221
222+ ## Development Scripts 🛠️
223+
224+ The project includes several npm scripts for development and validation:
225+
226+ ### Task Validation
227+
228+ - ** Quick Validation** : Use the lightweight validation script for faster feedback:
229+
230+ ``` bash
231+ npm run validate-local
232+ ```
233+
234+ This provides the same validation as ` npm run cli -- validate tasks ` but with simpler output and faster execution.
235+
236+ ### Code Quality
237+
238+ - ** Linting** : Check and fix code style issues:
239+
240+ ``` bash
241+ npm run lint # Check for issues
242+ npm run lint:fix # Fix issues automatically
243+ ```
244+
245+ - ** Formatting** : Format code with Prettier:
246+
247+ ``` bash
248+ npm run format # Format all files
249+ npm run format:check # Check formatting
250+ ```
251+
252+ - ** Build** : Compile TypeScript to JavaScript:
253+
254+ ``` bash
255+ npm run build
256+ ```
257+
258+ - ** Development** : Run CLI directly from TypeScript source:
259+
260+ ``` bash
261+ npm run dev # Equivalent to ts-node src/cli.ts
262+ ```
263+
264+ - ** Testing** : Run the test suite:
265+
266+ ``` bash
267+ npm test
268+ ```
269+
270+ ---
271+
205272## Additional Links 🔗
206273
207274- [ Code] ( https://github.com/Coderrob/ddd-kit )
@@ -212,4 +279,4 @@ npm run cli -- --help
212279
213280## License 📜
214281
215- This project is licensed under the terms of the MIT open source license. See the [ LICENSE] ( LICENSE ) file for details.
282+ This project is licensed under the terms of the GPL v3 open source license. See the [ LICENSE] ( LICENSE ) file for details.
0 commit comments