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,389 @@
1
+ ---
2
+ description: Create or update the project roadmap with prioritized requirements, deferred functionality, and AI-suggested enhancements.
3
+ handoffs:
4
+ - label: Create Specification
5
+ agent: doit.specit
6
+ prompt: Create a feature specification for the top roadmap item...
7
+ - label: Update Constitution
8
+ agent: doit.constitution
9
+ prompt: Update the project constitution based on roadmap priorities...
10
+ ---
11
+
12
+ ## User Input
13
+
14
+ ```text
15
+ $ARGUMENTS
16
+ ```
17
+
18
+ You **MUST** consider the user input before proceeding (if not empty).
19
+
20
+ ## Load Project Context
21
+
22
+ Before proceeding, load the project context to inform your responses:
23
+
24
+ ```bash
25
+ doit context show
26
+ ```
27
+
28
+ **If the command fails or doit is not installed**: Continue without context, but note that alignment with project principles cannot be verified.
29
+
30
+ **Use loaded context to**:
31
+
32
+ - Reference constitution principles when making decisions
33
+ - Consider roadmap priorities
34
+ - Identify connections to related specifications
35
+
36
+ ## Outline
37
+
38
+ This command creates or updates the project roadmap at `.doit/memory/roadmap.md`. The roadmap captures high-level requirements prioritized by business value, deferred items, and project vision.
39
+
40
+ ### 1. Parse Command Arguments
41
+
42
+ Extract the operation and details from `$ARGUMENTS`:
43
+
44
+ | Pattern | Operation | Example |
45
+ |---------|-----------|---------|
46
+ | `create [vision]` | Create new roadmap | `/doit.roadmapit create a task management app` |
47
+ | `add [item]` | Add item to roadmap | `/doit.roadmapit add user authentication` |
48
+ | `defer [item]` | Move item to deferred | `/doit.roadmapit defer social login` |
49
+ | `reprioritize` | Review and change priorities | `/doit.roadmapit reprioritize` |
50
+ | `sync-milestones` | Sync priorities to GitHub milestones | `/doit.roadmapit sync-milestones` |
51
+ | `sync-milestones --dry-run` | Preview milestone sync | `/doit.roadmapit sync-milestones --dry-run` |
52
+ | (empty or `update`) | Interactive update | `/doit.roadmapit` |
53
+
54
+ If no arguments provided or unrecognized pattern, proceed to step 2 for detection.
55
+
56
+ ### 2. Check for Existing Roadmap
57
+
58
+ Check if `.doit/memory/roadmap.md` exists:
59
+
60
+ - **If NOT exists**: Proceed to Step 3 (Create Workflow)
61
+ - **If exists**: Proceed to Step 4 (Update Workflow)
62
+
63
+ ### 3. Create Workflow (New Roadmap)
64
+
65
+ #### 3.1 Ensure Directory Exists
66
+
67
+ ```bash
68
+ mkdir -p .doit/memory
69
+ ```
70
+
71
+ #### 3.2 Gather Project Context
72
+
73
+ Read these files if they exist to understand project context:
74
+
75
+ - `.doit/memory/constitution.md` - Project principles and tech stack
76
+ - `README.md` - Project description
77
+ - `package.json` or `pyproject.toml` - Project metadata
78
+
79
+ #### 3.3 Ask Clarifying Questions
80
+
81
+ Present questions to establish roadmap foundation. Use the user's input (if provided) as context:
82
+
83
+ **Question 1: Project Vision**
84
+ > What is the primary goal or vision for this project?
85
+ >
86
+ > Based on your input "[USER_INPUT]", I understand the project is about [INTERPRETATION].
87
+ >
88
+ > Please confirm or provide a more detailed vision statement.
89
+
90
+ **Question 2: Initial Priority Items**
91
+ > What are the most critical features or requirements for your MVP?
92
+ >
93
+ > Suggested based on your description:
94
+ > - [SUGGESTION_1]
95
+ > - [SUGGESTION_2]
96
+ >
97
+ > Which of these are correct? What would you add or change?
98
+
99
+ **Question 3: Known Constraints**
100
+ > Are there any constraints or limitations to consider?
101
+ >
102
+ > Options:
103
+ > A. Timeline constraints (specific deadline)
104
+ > B. Technical constraints (must use specific tech)
105
+ > C. Resource constraints (limited team/budget)
106
+ > D. No significant constraints
107
+ > E. Custom (please specify)
108
+
109
+ #### 3.4 Build Roadmap Structure
110
+
111
+ Using the gathered information, create the roadmap:
112
+
113
+ 1. Load template from `.doit/templates/roadmap-template.md`
114
+ 2. Replace `[PROJECT_NAME]` with project name from constitution or package metadata
115
+ 3. Replace `[DATE]` with current date
116
+ 4. Replace `[PROJECT_VISION]` with the confirmed vision statement
117
+ 5. Populate priority sections based on user's answers:
118
+ - Add confirmed critical items to P1
119
+ - Add important but not blocking items to P2
120
+ - Add nice-to-have items to P3/P4
121
+ 6. Leave Deferred Items empty for new roadmaps
122
+
123
+ #### 3.5 Write Roadmap
124
+
125
+ Write the populated roadmap to `.doit/memory/roadmap.md`
126
+
127
+ #### 3.6 Offer Enhancement Suggestions
128
+
129
+ After creating the roadmap, proceed to Step 6 (AI Suggestions).
130
+
131
+ ---
132
+
133
+ ### 4. Update Workflow (Existing Roadmap)
134
+
135
+ #### 4.1 Load Current Roadmap
136
+
137
+ Read `.doit/memory/roadmap.md` and parse:
138
+
139
+ - Current vision statement
140
+ - All items in P1, P2, P3, P4 sections with their status
141
+ - All deferred items
142
+ - Last updated date
143
+
144
+ #### 4.2 Display Current State
145
+
146
+ Show the user the current roadmap state:
147
+
148
+ ```markdown
149
+ ## Current Roadmap State
150
+
151
+ **Vision**: [Current vision statement]
152
+ **Last Updated**: [Date]
153
+
154
+ ### Active Items
155
+ | Priority | Item | Feature Branch | Status |
156
+ |----------|------|----------------|--------|
157
+ | P1 | [item] | [branch-ref] | [ ] |
158
+ | P2 | [item] | [branch-ref] | [ ] |
159
+ ...
160
+
161
+ ### Deferred Items
162
+ | Item | Original Priority | Reason |
163
+ |------|-------------------|--------|
164
+ ...
165
+ ```
166
+
167
+ #### 4.3 Handle Specific Operations
168
+
169
+ Based on the parsed operation from Step 1:
170
+
171
+ **Add Operation (`add [item]`)**:
172
+ 1. Ask: "What priority should this item have? (P1/P2/P3/P4)"
173
+ 2. Ask: "What's the business rationale for this priority?"
174
+ 3. Ask: "Is there a feature branch reference? (e.g., `[###-feature-name]`)"
175
+ 4. Add the item to the appropriate section
176
+
177
+ **Defer Operation (`defer [item]`)**:
178
+ 1. Search for the item in active sections
179
+ 2. If not found: List available items and ask user to select
180
+ 3. If found: Ask "What's the reason for deferring?"
181
+ 4. Move item to Deferred section with original priority and reason
182
+
183
+ **Reprioritize Operation (`reprioritize`)**:
184
+ 1. List all active items with current priorities
185
+ 2. Ask: "Which items need priority changes?"
186
+ 3. For each item to change:
187
+ - Show current priority
188
+ - Ask for new priority (P1/P2/P3/P4)
189
+ - Ask for rationale for the change
190
+ 4. Update items in their new sections
191
+
192
+ **Sync Milestones Operation (`sync-milestones` or `sync-milestones --dry-run`)**:
193
+
194
+ 1. Execute the milestone sync command:
195
+
196
+ ```bash
197
+ doit roadmapit sync-milestones [--dry-run]
198
+ ```
199
+
200
+ 2. The command will:
201
+ - Create GitHub milestones for each priority level (P1-P4) if they don't exist
202
+ - Assign roadmap epics to their corresponding priority milestones
203
+ - Display a summary of changes made
204
+ 3. After sync completes, show:
205
+ - Milestones created count
206
+ - Epics assigned count
207
+ - Link to view milestones on GitHub
208
+ 4. **Complete this operation** - Do not proceed to other steps
209
+
210
+ **Interactive Update (no specific operation)**:
211
+ 1. Ask: "What would you like to do?"
212
+ - A. Add a new item
213
+ - B. Defer an item
214
+ - C. Reprioritize items
215
+ - D. Update the vision statement
216
+ - E. Mark an item as complete (moves to completed_roadmap.md)
217
+ - F. Sync priorities to GitHub milestones
218
+ 2. Execute the selected operation
219
+
220
+ #### 4.4 Preserve Unmodified Content
221
+
222
+ When updating the roadmap:
223
+
224
+ - Keep all items not explicitly changed
225
+ - Maintain existing rationales unless updated
226
+ - Preserve feature branch references
227
+ - Update only the `Last Updated` date
228
+
229
+ #### 4.5 Write Updated Roadmap
230
+
231
+ Write the modified roadmap back to `.doit/memory/roadmap.md`
232
+
233
+ #### 4.6 Offer Enhancement Suggestions
234
+
235
+ After updating, proceed to Step 6 (AI Suggestions).
236
+
237
+ ---
238
+
239
+ ### 5. Handle Edge Cases
240
+
241
+ #### 5.1 Malformed Roadmap
242
+
243
+ If existing roadmap cannot be parsed:
244
+
245
+ 1. Create backup: `mv .doit/memory/roadmap.md .doit/memory/roadmap.md.bak`
246
+ 2. Notify user: "The existing roadmap appears to be malformed. A backup has been created."
247
+ 3. Try to extract any readable content
248
+ 4. Offer to create fresh roadmap incorporating salvaged content
249
+
250
+ #### 5.2 Item Not Found (for defer/update)
251
+
252
+ If specified item cannot be found:
253
+
254
+ 1. List all current items in a table
255
+ 2. Ask user to select from the list or provide exact item text
256
+ 3. Use fuzzy matching to suggest closest matches
257
+
258
+ #### 5.3 Conflicting Priorities
259
+
260
+ If user assigns multiple P1 items:
261
+
262
+ 1. Show warning: "You have [N] P1 items. P1 should be reserved for truly critical items."
263
+ 2. Ask: "Would you like to compare these items to determine which is most critical?"
264
+ 3. If yes, present pairwise comparison for each P1 item
265
+
266
+ ---
267
+
268
+ ### 6. AI Enhancement Suggestions
269
+
270
+ After any create or update operation, analyze the roadmap and project context to suggest enhancements.
271
+
272
+ #### 6.1 Gather Context
273
+
274
+ Read additional context if available:
275
+
276
+ - `.doit/memory/constitution.md` - Project principles
277
+ - `.doit/memory/completed_roadmap.md` - Past completed items
278
+ - Current roadmap items and gaps
279
+
280
+ #### 6.2 Generate Suggestions
281
+
282
+ Based on context, generate 2-5 complementary feature suggestions:
283
+
284
+ ```markdown
285
+ ## Enhancement Suggestions
286
+
287
+ Based on your roadmap and project context, here are some features you might consider:
288
+
289
+ ### Suggestion 1: [Feature Name]
290
+ **Rationale**: [Why this complements existing items]
291
+ **Suggested Priority**: P[N]
292
+ **Aligns with**: [Related existing item or principle]
293
+
294
+ ### Suggestion 2: [Feature Name]
295
+ ...
296
+
297
+ ---
298
+
299
+ **Actions**:
300
+ - Type the suggestion number to add it (e.g., "1" or "1, 3")
301
+ - Type "skip" to finish without adding suggestions
302
+ - Type "modify [N]" to customize a suggestion before adding
303
+ ```
304
+
305
+ #### 6.3 Handle Suggestion Response
306
+
307
+ - If user selects suggestions: Add them to the appropriate priority sections
308
+ - If user modifies: Apply customizations then add
309
+ - If user skips: Complete without changes
310
+
311
+ ---
312
+
313
+ ### 7. Completion Report
314
+
315
+ Output a summary of changes:
316
+
317
+ ```markdown
318
+ ## Roadmap Update Complete
319
+
320
+ **File**: `.doit/memory/roadmap.md`
321
+ **Operation**: [Create/Add/Defer/Reprioritize]
322
+ **Date**: [Current date]
323
+
324
+ ### Changes Made
325
+ - [List of specific changes]
326
+
327
+ ### Current Statistics
328
+ | Priority | Count |
329
+ |----------|-------|
330
+ | P1 | [N] |
331
+ | P2 | [N] |
332
+ | P3 | [N] |
333
+ | P4 | [N] |
334
+ | Deferred | [N] |
335
+
336
+ ### Next Steps
337
+ - Run `/doit.specit` to create specs for top priority items
338
+ - Run `/doit.roadmapit` again to continue updating
339
+ - Review completed items in `.doit/memory/completed_roadmap.md`
340
+ ```
341
+
342
+ ---
343
+
344
+ ## Key Rules
345
+
346
+ - Always preserve existing content when updating
347
+ - Ask clarifying questions before making changes
348
+ - Provide AI suggestions after every operation
349
+ - Use feature branch references `[###-feature-name]` for traceability
350
+ - Maintain maximum 3-5 P1 items (truly critical only)
351
+ - Back up malformed roadmaps before recreating
352
+
353
+ ---
354
+
355
+ ## Next Steps
356
+
357
+ After completing this command, display a recommendation section based on the outcome:
358
+
359
+ ### On Success (roadmap created or updated)
360
+
361
+ Display the following at the end of your output:
362
+
363
+ ```markdown
364
+ ---
365
+
366
+ ## Next Steps
367
+
368
+ **Roadmap updated!**
369
+
370
+ **Recommended**: Run `/doit.specit [top priority item]` to create a specification for your highest priority feature.
371
+
372
+ **Alternative**: Run `/doit.roadmapit add [item]` to add more items to the roadmap.
373
+ ```
374
+
375
+ ### On Item Added
376
+
377
+ If a new item was added to the roadmap:
378
+
379
+ ```markdown
380
+ ---
381
+
382
+ ## Next Steps
383
+
384
+ **Item added to roadmap!**
385
+
386
+ **Recommended**: Run `/doit.specit [item description]` to create a specification for this item.
387
+
388
+ **Alternative**: Run `/doit.roadmapit reprioritize` to review and adjust priorities.
389
+ ```