doit-toolkit-cli 0.1.10__py3-none-any.whl

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.

Potentially problematic release.


This version of doit-toolkit-cli might be problematic. Click here for more details.

Files changed (135) hide show
  1. doit_cli/__init__.py +1356 -0
  2. doit_cli/cli/__init__.py +26 -0
  3. doit_cli/cli/analytics_command.py +616 -0
  4. doit_cli/cli/context_command.py +213 -0
  5. doit_cli/cli/diagram_command.py +304 -0
  6. doit_cli/cli/fixit_command.py +641 -0
  7. doit_cli/cli/hooks_command.py +211 -0
  8. doit_cli/cli/init_command.py +613 -0
  9. doit_cli/cli/memory_command.py +293 -0
  10. doit_cli/cli/roadmapit_command.py +10 -0
  11. doit_cli/cli/status_command.py +117 -0
  12. doit_cli/cli/sync_prompts_command.py +248 -0
  13. doit_cli/cli/validate_command.py +196 -0
  14. doit_cli/cli/verify_command.py +204 -0
  15. doit_cli/cli/workflow_mixin.py +224 -0
  16. doit_cli/cli/xref_command.py +555 -0
  17. doit_cli/formatters/__init__.py +8 -0
  18. doit_cli/formatters/base.py +38 -0
  19. doit_cli/formatters/json_formatter.py +126 -0
  20. doit_cli/formatters/markdown_formatter.py +97 -0
  21. doit_cli/formatters/rich_formatter.py +257 -0
  22. doit_cli/main.py +51 -0
  23. doit_cli/models/__init__.py +139 -0
  24. doit_cli/models/agent.py +74 -0
  25. doit_cli/models/analytics_models.py +384 -0
  26. doit_cli/models/context_config.py +464 -0
  27. doit_cli/models/crossref_models.py +182 -0
  28. doit_cli/models/diagram_models.py +363 -0
  29. doit_cli/models/fixit_models.py +355 -0
  30. doit_cli/models/hook_config.py +125 -0
  31. doit_cli/models/project.py +91 -0
  32. doit_cli/models/results.py +121 -0
  33. doit_cli/models/search_models.py +228 -0
  34. doit_cli/models/status_models.py +195 -0
  35. doit_cli/models/sync_models.py +146 -0
  36. doit_cli/models/template.py +77 -0
  37. doit_cli/models/validation_models.py +175 -0
  38. doit_cli/models/workflow_models.py +319 -0
  39. doit_cli/prompts/__init__.py +5 -0
  40. doit_cli/prompts/fixit_prompts.py +344 -0
  41. doit_cli/prompts/interactive.py +390 -0
  42. doit_cli/rules/__init__.py +5 -0
  43. doit_cli/rules/builtin_rules.py +160 -0
  44. doit_cli/services/__init__.py +79 -0
  45. doit_cli/services/agent_detector.py +168 -0
  46. doit_cli/services/analytics_service.py +218 -0
  47. doit_cli/services/architecture_generator.py +290 -0
  48. doit_cli/services/backup_service.py +204 -0
  49. doit_cli/services/config_loader.py +113 -0
  50. doit_cli/services/context_loader.py +1123 -0
  51. doit_cli/services/coverage_calculator.py +142 -0
  52. doit_cli/services/crossref_service.py +237 -0
  53. doit_cli/services/cycle_time_calculator.py +134 -0
  54. doit_cli/services/date_inferrer.py +349 -0
  55. doit_cli/services/diagram_service.py +337 -0
  56. doit_cli/services/drift_detector.py +109 -0
  57. doit_cli/services/entity_parser.py +301 -0
  58. doit_cli/services/er_diagram_generator.py +197 -0
  59. doit_cli/services/fixit_service.py +699 -0
  60. doit_cli/services/github_service.py +192 -0
  61. doit_cli/services/hook_manager.py +258 -0
  62. doit_cli/services/hook_validator.py +528 -0
  63. doit_cli/services/input_validator.py +322 -0
  64. doit_cli/services/memory_search.py +527 -0
  65. doit_cli/services/mermaid_validator.py +334 -0
  66. doit_cli/services/prompt_transformer.py +91 -0
  67. doit_cli/services/prompt_writer.py +133 -0
  68. doit_cli/services/query_interpreter.py +428 -0
  69. doit_cli/services/report_exporter.py +219 -0
  70. doit_cli/services/report_generator.py +256 -0
  71. doit_cli/services/requirement_parser.py +112 -0
  72. doit_cli/services/roadmap_summarizer.py +209 -0
  73. doit_cli/services/rule_engine.py +443 -0
  74. doit_cli/services/scaffolder.py +215 -0
  75. doit_cli/services/score_calculator.py +172 -0
  76. doit_cli/services/section_parser.py +204 -0
  77. doit_cli/services/spec_scanner.py +327 -0
  78. doit_cli/services/state_manager.py +355 -0
  79. doit_cli/services/status_reporter.py +143 -0
  80. doit_cli/services/task_parser.py +347 -0
  81. doit_cli/services/template_manager.py +710 -0
  82. doit_cli/services/template_reader.py +158 -0
  83. doit_cli/services/user_journey_generator.py +214 -0
  84. doit_cli/services/user_story_parser.py +232 -0
  85. doit_cli/services/validation_service.py +188 -0
  86. doit_cli/services/validator.py +232 -0
  87. doit_cli/services/velocity_tracker.py +173 -0
  88. doit_cli/services/workflow_engine.py +405 -0
  89. doit_cli/templates/agent-file-template.md +28 -0
  90. doit_cli/templates/checklist-template.md +39 -0
  91. doit_cli/templates/commands/doit.checkin.md +363 -0
  92. doit_cli/templates/commands/doit.constitution.md +187 -0
  93. doit_cli/templates/commands/doit.documentit.md +485 -0
  94. doit_cli/templates/commands/doit.fixit.md +181 -0
  95. doit_cli/templates/commands/doit.implementit.md +265 -0
  96. doit_cli/templates/commands/doit.planit.md +262 -0
  97. doit_cli/templates/commands/doit.reviewit.md +355 -0
  98. doit_cli/templates/commands/doit.roadmapit.md +389 -0
  99. doit_cli/templates/commands/doit.scaffoldit.md +458 -0
  100. doit_cli/templates/commands/doit.specit.md +521 -0
  101. doit_cli/templates/commands/doit.taskit.md +304 -0
  102. doit_cli/templates/commands/doit.testit.md +277 -0
  103. doit_cli/templates/config/context.yaml +134 -0
  104. doit_cli/templates/config/hooks.yaml +93 -0
  105. doit_cli/templates/config/validation-rules.yaml +64 -0
  106. doit_cli/templates/github-issue-templates/epic.yml +78 -0
  107. doit_cli/templates/github-issue-templates/feature.yml +116 -0
  108. doit_cli/templates/github-issue-templates/task.yml +129 -0
  109. doit_cli/templates/hooks/.gitkeep +0 -0
  110. doit_cli/templates/hooks/post-commit.sh +25 -0
  111. doit_cli/templates/hooks/post-merge.sh +75 -0
  112. doit_cli/templates/hooks/pre-commit.sh +17 -0
  113. doit_cli/templates/hooks/pre-push.sh +18 -0
  114. doit_cli/templates/memory/completed_roadmap.md +50 -0
  115. doit_cli/templates/memory/constitution.md +125 -0
  116. doit_cli/templates/memory/roadmap.md +61 -0
  117. doit_cli/templates/plan-template.md +146 -0
  118. doit_cli/templates/scripts/bash/check-prerequisites.sh +166 -0
  119. doit_cli/templates/scripts/bash/common.sh +156 -0
  120. doit_cli/templates/scripts/bash/create-new-feature.sh +297 -0
  121. doit_cli/templates/scripts/bash/setup-plan.sh +61 -0
  122. doit_cli/templates/scripts/bash/update-agent-context.sh +675 -0
  123. doit_cli/templates/scripts/powershell/check-prerequisites.ps1 +148 -0
  124. doit_cli/templates/scripts/powershell/common.ps1 +137 -0
  125. doit_cli/templates/scripts/powershell/create-new-feature.ps1 +283 -0
  126. doit_cli/templates/scripts/powershell/setup-plan.ps1 +61 -0
  127. doit_cli/templates/scripts/powershell/update-agent-context.ps1 +406 -0
  128. doit_cli/templates/spec-template.md +159 -0
  129. doit_cli/templates/tasks-template.md +313 -0
  130. doit_cli/templates/vscode-settings.json +14 -0
  131. doit_toolkit_cli-0.1.10.dist-info/METADATA +324 -0
  132. doit_toolkit_cli-0.1.10.dist-info/RECORD +135 -0
  133. doit_toolkit_cli-0.1.10.dist-info/WHEEL +4 -0
  134. doit_toolkit_cli-0.1.10.dist-info/entry_points.txt +2 -0
  135. doit_toolkit_cli-0.1.10.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,355 @@
1
+ ---
2
+ description: Review implemented code for quality and completeness against specifications
3
+ handoffs:
4
+ - label: Run Tests
5
+ agent: doit.test
6
+ prompt: Execute automated tests and generate test report
7
+ send: true
8
+ - label: Check In
9
+ agent: doit.checkin
10
+ prompt: Finalize feature and create pull request
11
+ send: true
12
+ ---
13
+
14
+ ## User Input
15
+
16
+ ```text
17
+ $ARGUMENTS
18
+ ```
19
+
20
+ You **MUST** consider the user input before proceeding (if not empty).
21
+
22
+ ## Load Project Context
23
+
24
+ Before proceeding, load the project context to inform your responses:
25
+
26
+ ```bash
27
+ doit context show
28
+ ```
29
+
30
+ **If the command fails or doit is not installed**: Continue without context, but note that alignment with project principles cannot be verified.
31
+
32
+ **Use loaded context to**:
33
+
34
+ - Reference constitution principles when making decisions
35
+ - Consider roadmap priorities
36
+ - Identify connections to related specifications
37
+
38
+ ## Outline
39
+
40
+ 1. **Setup**: Run `.doit/scripts/bash/check-prerequisites.sh --json --require-tasks` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute.
41
+
42
+ 2. **Load review context**:
43
+ - **REQUIRED**: Read spec.md for requirements and acceptance criteria
44
+ - **REQUIRED**: Read plan.md for technical decisions and architecture
45
+ - **REQUIRED**: Read tasks.md for implementation details and file paths
46
+ - **IF EXISTS**: Read data-model.md for entity definitions
47
+ - **IF EXISTS**: Read contracts/ for API specifications
48
+
49
+ 3. **Detect implemented files** from tasks.md:
50
+ - Parse completed tasks (marked with [X])
51
+ - Extract file paths from task descriptions
52
+ - Build list of files to review
53
+ - Group files by category: models, services, endpoints, tests, config
54
+
55
+ 4. **Execute code review** against requirements:
56
+ - For each implemented file:
57
+ - Read file contents
58
+ - Compare against relevant spec requirements
59
+ - Check adherence to plan.md architecture decisions
60
+ - Verify data model compliance (if data-model.md exists)
61
+ - Verify API contract compliance (if contracts/ exists)
62
+ - Generate findings with severity levels:
63
+ - **CRITICAL**: Requirement not implemented, security issue, data loss risk
64
+ - **MAJOR**: Partial implementation, performance concern, missing validation
65
+ - **MINOR**: Code style, documentation gap, minor deviation from plan
66
+ - **INFO**: Suggestion, optimization opportunity, best practice note
67
+
68
+ 5. **Format findings report**:
69
+
70
+ ```text
71
+ ## Code Review Findings
72
+
73
+ ### Critical (X findings)
74
+ | File | Issue | Requirement |
75
+ |------|-------|-------------|
76
+ | path/to/file.py | Description | FR-XXX |
77
+
78
+ ### Major (X findings)
79
+ ...
80
+
81
+ ### Minor (X findings)
82
+ ...
83
+
84
+ ### Info (X findings)
85
+ ...
86
+
87
+ ### Summary
88
+ - Total files reviewed: X
89
+ - Critical issues: X
90
+ - Major issues: X
91
+ - Minor issues: X
92
+ - Recommendations: [list]
93
+ ```
94
+
95
+ 6. **Extract manual test items** from spec.md:
96
+ - Parse acceptance criteria/scenarios from spec
97
+ - Extract testable items that require manual verification
98
+ - Items typically marked as "Given/When/Then" or acceptance criteria
99
+ - Create sequential test list with:
100
+ - Test ID (MT-001, MT-002, etc.)
101
+ - Description
102
+ - Expected outcome
103
+ - Prerequisites (if any)
104
+
105
+ 7. **Present manual tests sequentially**:
106
+ - For each manual test:
107
+
108
+ ```text
109
+ ## Manual Test MT-XXX
110
+
111
+ **Description**: [test description]
112
+ **Prerequisites**: [any setup needed]
113
+ **Steps**:
114
+ 1. [step 1]
115
+ 2. [step 2]
116
+ ...
117
+
118
+ **Expected Result**: [what should happen]
119
+
120
+ ---
121
+ Please execute this test and respond with:
122
+ - PASS: Test passed as expected
123
+ - FAIL: Test failed (describe what happened)
124
+ - SKIP: Cannot test right now (provide reason)
125
+ - BLOCK: Blocked by issue (describe blocker)
126
+ ```
127
+
128
+ - Wait for user response before proceeding to next test
129
+ - Track results in memory
130
+
131
+ 8. **Track test progress**:
132
+ - Maintain running tally:
133
+
134
+ ```text
135
+ Progress: X/Y tests completed
136
+ - Passed: X
137
+ - Failed: X
138
+ - Skipped: X
139
+ - Blocked: X
140
+ ```
141
+
142
+ - Display after each test completion
143
+
144
+ 9. **Collect sign-off**:
145
+ - After all manual tests complete, present summary:
146
+
147
+ ```text
148
+ ## Manual Testing Complete
149
+
150
+ | Test ID | Description | Result |
151
+ |---------|-------------|--------|
152
+ | MT-001 | ... | PASS |
153
+ | MT-002 | ... | FAIL |
154
+ ...
155
+
156
+ **Overall Status**: [PASS if no failures, FAIL otherwise]
157
+
158
+ Do you approve these results and sign off on manual testing? (yes/no)
159
+ ```
160
+
161
+ - Record sign-off response and timestamp
162
+
163
+ 10. **Generate review-report.md** in FEATURE_DIR:
164
+
165
+ ```markdown
166
+ # Review Report: [Feature Name]
167
+
168
+ **Date**: [timestamp]
169
+ **Reviewer**: [Claude]
170
+ **Branch**: [current branch]
171
+
172
+ ## Code Review Summary
173
+
174
+ | Severity | Count |
175
+ |----------|-------|
176
+ | Critical | X |
177
+ | Major | X |
178
+ | Minor | X |
179
+ | Info | X |
180
+
181
+ ### Critical Findings
182
+ [detailed list]
183
+
184
+ ### Major Findings
185
+ [detailed list]
186
+
187
+ ## Manual Testing Summary
188
+
189
+ | Metric | Count |
190
+ |--------|-------|
191
+ | Total Tests | X |
192
+ | Passed | X |
193
+ | Failed | X |
194
+ | Skipped | X |
195
+ | Blocked | X |
196
+
197
+ ### Test Results
198
+ [detailed table]
199
+
200
+ ## Sign-Off
201
+
202
+ - Manual Testing: [Approved/Not Approved] at [timestamp]
203
+ - Notes: [any notes from sign-off]
204
+
205
+ ## Recommendations
206
+
207
+ 1. [recommendation 1]
208
+ 2. [recommendation 2]
209
+ ...
210
+
211
+ ## Next Steps
212
+
213
+ - Run `/doit.testit` for automated test execution
214
+ - Address any CRITICAL or MAJOR findings before merge
215
+ ```
216
+
217
+ 11. **Generate Mermaid Visualizations** (FR-011, FR-012):
218
+
219
+ After collecting all review data, generate visual quality dashboards:
220
+
221
+ a. **Finding Distribution Pie Chart**:
222
+ - Count findings by severity (Critical, Major, Minor, Info)
223
+ - Generate pie chart showing distribution
224
+ - Add to review-report.md in Quality Overview section
225
+
226
+ ```mermaid
227
+ pie title Finding Distribution
228
+ "Critical" : 0
229
+ "Major" : 2
230
+ "Minor" : 5
231
+ "Info" : 3
232
+ ```
233
+
234
+ Insert using auto-generated markers:
235
+
236
+ ~~~markdown
237
+ ## Quality Overview
238
+
239
+ <!-- BEGIN:AUTO-GENERATED section="finding-distribution" -->
240
+ ```mermaid
241
+ pie title Finding Distribution
242
+ "Critical" : [count]
243
+ "Major" : [count]
244
+ "Minor" : [count]
245
+ "Info" : [count]
246
+ ```
247
+ <!-- END:AUTO-GENERATED -->
248
+ ~~~
249
+
250
+ b. **Test Results Visualization**:
251
+ - Count test results by status (Passed, Failed, Skipped, Blocked)
252
+ - Generate pie chart showing test outcomes
253
+ - Add to review-report.md in Manual Testing Summary section
254
+
255
+ ```mermaid
256
+ pie title Test Results
257
+ "Passed" : 8
258
+ "Failed" : 1
259
+ "Skipped" : 2
260
+ "Blocked" : 0
261
+ ```
262
+
263
+ Insert using auto-generated markers:
264
+
265
+ ~~~markdown
266
+ ## Test Results Overview
267
+
268
+ <!-- BEGIN:AUTO-GENERATED section="test-results" -->
269
+ ```mermaid
270
+ pie title Test Results
271
+ "Passed" : [count]
272
+ "Failed" : [count]
273
+ "Skipped" : [count]
274
+ "Blocked" : [count]
275
+ ```
276
+ <!-- END:AUTO-GENERATED -->
277
+ ~~~
278
+
279
+ c. **Conditional Generation**:
280
+ - If no findings: Show "No Issues Found" message instead of empty pie chart
281
+ - If no manual tests: Omit Test Results visualization entirely
282
+ - If all tests pass: Use green-themed success message
283
+
284
+ d. **Diagram Validation**:
285
+ - Verify mermaid syntax is valid
286
+ - Ensure all counts are non-negative integers
287
+ - Check that pie chart values sum to total count
288
+
289
+ 12. **Report**: Output path to review-report.md and summary of findings
290
+
291
+ ## Key Rules
292
+
293
+ - Use absolute paths for all file operations
294
+ - STOP on any CRITICAL finding that blocks further review
295
+ - Present manual tests one at a time, wait for response
296
+ - Generate review-report.md even if some tests are skipped
297
+ - Include timestamps for audit trail
298
+
299
+ ---
300
+
301
+ ## Next Steps
302
+
303
+ After completing this command, display a recommendation section based on the outcome:
304
+
305
+ ### On Success (review approved, no critical issues)
306
+
307
+ Display the following at the end of your output:
308
+
309
+ ```markdown
310
+ ---
311
+
312
+ ## Next Steps
313
+
314
+ ┌───────────────────────────────────────────────────────────────────────────────────┐
315
+ │ Workflow Progress │
316
+ │ ● specit → ● planit → ● taskit → ● implementit → ● testit → ● reviewit → ○ checkin │
317
+ └───────────────────────────────────────────────────────────────────────────────────┘
318
+
319
+ **Recommended**: Run `/doit.checkin` to finalize and merge your changes.
320
+ ```
321
+
322
+ ### On Issues Found (changes requested)
323
+
324
+ If the review found issues that need to be addressed:
325
+
326
+ ```markdown
327
+ ---
328
+
329
+ ## Next Steps
330
+
331
+ ┌───────────────────────────────────────────────────────────────────────────────────┐
332
+ │ Workflow Progress │
333
+ │ ● specit → ● planit → ● taskit → ● implementit → ● testit → ◐ reviewit → ○ checkin │
334
+ └───────────────────────────────────────────────────────────────────────────────────┘
335
+
336
+ **Status**: [N] critical, [M] major issues found.
337
+
338
+ **Recommended**: Run `/doit.implementit` to address the review feedback.
339
+
340
+ After fixing issues, run `/doit.reviewit` again to verify.
341
+ ```
342
+
343
+ ### On Error (missing prerequisites)
344
+
345
+ If required files are missing:
346
+
347
+ ```markdown
348
+ ---
349
+
350
+ ## Next Steps
351
+
352
+ **Issue**: Required files for review are missing.
353
+
354
+ **Recommended**: Run `/doit.implementit` to complete the implementation first.
355
+ ```