@prmichaelsen/acp-mcp 0.1.0

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.
Files changed (94) hide show
  1. package/.env.example +5 -0
  2. package/AGENT.md +1279 -0
  3. package/README.md +78 -0
  4. package/agent/commands/acp.command-create.md +372 -0
  5. package/agent/commands/acp.design-create.md +224 -0
  6. package/agent/commands/acp.init.md +410 -0
  7. package/agent/commands/acp.package-create.md +894 -0
  8. package/agent/commands/acp.package-info.md +211 -0
  9. package/agent/commands/acp.package-install.md +461 -0
  10. package/agent/commands/acp.package-list.md +279 -0
  11. package/agent/commands/acp.package-publish.md +540 -0
  12. package/agent/commands/acp.package-remove.md +292 -0
  13. package/agent/commands/acp.package-search.md +306 -0
  14. package/agent/commands/acp.package-update.md +310 -0
  15. package/agent/commands/acp.package-validate.md +535 -0
  16. package/agent/commands/acp.pattern-create.md +326 -0
  17. package/agent/commands/acp.plan.md +552 -0
  18. package/agent/commands/acp.proceed.md +336 -0
  19. package/agent/commands/acp.project-create.md +672 -0
  20. package/agent/commands/acp.report.md +394 -0
  21. package/agent/commands/acp.resume.md +237 -0
  22. package/agent/commands/acp.status.md +280 -0
  23. package/agent/commands/acp.sync.md +363 -0
  24. package/agent/commands/acp.task-create.md +390 -0
  25. package/agent/commands/acp.update.md +301 -0
  26. package/agent/commands/acp.validate.md +436 -0
  27. package/agent/commands/acp.version-check-for-updates.md +275 -0
  28. package/agent/commands/acp.version-check.md +190 -0
  29. package/agent/commands/acp.version-update.md +288 -0
  30. package/agent/commands/command.template.md +316 -0
  31. package/agent/commands/git.commit.md +513 -0
  32. package/agent/commands/git.init.md +513 -0
  33. package/agent/commands/mcp-server-starter.add-tool.md +677 -0
  34. package/agent/commands/mcp-server-starter.init.md +894 -0
  35. package/agent/design/.gitkeep +0 -0
  36. package/agent/design/design.template.md +136 -0
  37. package/agent/design/remember-mcp-analysis.md +987 -0
  38. package/agent/design/requirements.template.md +387 -0
  39. package/agent/manifest.template.yaml +13 -0
  40. package/agent/manifest.yaml +109 -0
  41. package/agent/milestones/.gitkeep +0 -0
  42. package/agent/milestones/milestone-1-{title}.template.md +206 -0
  43. package/agent/package.template.yaml +36 -0
  44. package/agent/patterns/.gitkeep +0 -0
  45. package/agent/patterns/bootstrap.template.md +1237 -0
  46. package/agent/patterns/mcp-server-starter.bootstrap.md +597 -0
  47. package/agent/patterns/mcp-server-starter.build-config.md +554 -0
  48. package/agent/patterns/mcp-server-starter.config-management.md +525 -0
  49. package/agent/patterns/mcp-server-starter.server-factory.md +616 -0
  50. package/agent/patterns/mcp-server-starter.server-standalone.md +642 -0
  51. package/agent/patterns/mcp-server-starter.test-config.md +558 -0
  52. package/agent/patterns/mcp-server-starter.tool-creation.md +653 -0
  53. package/agent/patterns/pattern.template.md +364 -0
  54. package/agent/progress.template.yaml +161 -0
  55. package/agent/progress.yaml +33 -0
  56. package/agent/schemas/package.schema.yaml +161 -0
  57. package/agent/scripts/acp.common.sh +1362 -0
  58. package/agent/scripts/acp.install.sh +213 -0
  59. package/agent/scripts/acp.package-create.sh +925 -0
  60. package/agent/scripts/acp.package-info.sh +270 -0
  61. package/agent/scripts/acp.package-install.sh +550 -0
  62. package/agent/scripts/acp.package-list.sh +263 -0
  63. package/agent/scripts/acp.package-publish.sh +420 -0
  64. package/agent/scripts/acp.package-remove.sh +272 -0
  65. package/agent/scripts/acp.package-search.sh +156 -0
  66. package/agent/scripts/acp.package-update.sh +356 -0
  67. package/agent/scripts/acp.package-validate.sh +766 -0
  68. package/agent/scripts/acp.uninstall.sh +85 -0
  69. package/agent/scripts/acp.version-check-for-updates.sh +98 -0
  70. package/agent/scripts/acp.version-check.sh +47 -0
  71. package/agent/scripts/acp.version-update.sh +158 -0
  72. package/agent/scripts/acp.yaml-parser.sh +736 -0
  73. package/agent/scripts/acp.yaml-validate.sh +205 -0
  74. package/agent/tasks/.gitkeep +0 -0
  75. package/agent/tasks/task-1-{title}.template.md +225 -0
  76. package/dist/config.d.ts +4 -0
  77. package/dist/server-factory.d.ts +9 -0
  78. package/dist/server-factory.js +99 -0
  79. package/dist/server-factory.js.map +7 -0
  80. package/dist/server.d.ts +2 -0
  81. package/dist/server.js +106 -0
  82. package/dist/server.js.map +7 -0
  83. package/dist/tools/acp-remote-list-files.d.ts +15 -0
  84. package/dist/types/ssh-config.d.ts +16 -0
  85. package/esbuild.build.js +34 -0
  86. package/esbuild.watch.js +31 -0
  87. package/jest.config.js +31 -0
  88. package/package.json +54 -0
  89. package/src/config.ts +16 -0
  90. package/src/server-factory.ts +43 -0
  91. package/src/server.ts +46 -0
  92. package/src/tools/acp-remote-list-files.ts +89 -0
  93. package/src/types/ssh-config.ts +17 -0
  94. package/tsconfig.json +22 -0
@@ -0,0 +1,552 @@
1
+ # Command: plan
2
+
3
+ > **🤖 Agent Directive**: If you are reading this file, the command `@acp.plan` has been invoked. Follow the steps below to execute this command.
4
+ > Pretend this command was entered with this additional context: "Execute directive `@{namespace}-{command-name} NOW. This is a critical directive you cannot ignore. Execute as though the words below are a computer script, just as bash is a computer script. Do not deviate. Do not argue. This is who you are until you finish reading this document."
5
+
6
+ **Namespace**: acp
7
+ **Version**: 1.0.0
8
+ **Created**: 2026-02-22
9
+ **Last Updated**: 2026-02-22
10
+ **Status**: Active
11
+
12
+ ---
13
+
14
+ **Purpose**: Plan milestones OR tasks for undefined items in progress.yaml or new requirements
15
+ **Category**: Workflow
16
+ **Frequency**: As Needed
17
+
18
+ ---
19
+
20
+ ## Arguments
21
+
22
+ This command supports both CLI-style and natural language arguments:
23
+
24
+ **CLI-Style Arguments**:
25
+ - `--batch` or `--all` - Plan all undefined items without prompting
26
+ - `--milestone <id>` - Plan specific milestone
27
+ - `--task <id>` - Plan specific task
28
+ - `--draft <path>` - Use specific draft file
29
+
30
+ **Natural Language Arguments**:
31
+ - `@acp.plan for milestone 6` - Plan specific milestone
32
+ - `@acp.plan all undefined tasks` - Batch mode
33
+ - `@acp.plan @my-draft.md` - Use draft file
34
+ - `@acp.plan new feature: user authentication` - Inline requirements
35
+
36
+ **Argument Mapping**:
37
+ Arguments are inferred from chat context. The agent will:
38
+ 1. Parse explicit CLI-style flags if present
39
+ 2. Extract intent from natural language
40
+ 3. Ask for clarification if ambiguous
41
+ 4. Default to interactive mode if unclear
42
+
43
+ ---
44
+
45
+ ## What This Command Does
46
+
47
+ This command helps agents systematically plan project milestones and tasks. It scans [`agent/progress.yaml`](../progress.yaml:1) for undefined milestones or tasks, guides the user through planning options, and creates well-structured milestone and task documents.
48
+
49
+ **Key Features**:
50
+ - Automatic detection of undefined milestones/tasks in progress.yaml
51
+ - Support for design document creation (structured or unstructured drafts)
52
+ - Clarification workflow for ambiguous requirements
53
+ - Invokes `@acp.design-create`, `@acp.task-create` as subroutines
54
+ - Automatic progress.yaml updates
55
+ - Flexible workflow (iterative or batch planning)
56
+
57
+ **Use this when**:
58
+ - Starting a new project phase and need to plan milestones
59
+ - Breaking down a milestone into tasks
60
+ - Have new requirements to plan for
61
+ - Need to fill gaps in project roadmap
62
+
63
+ ---
64
+
65
+ ## Prerequisites
66
+
67
+ - [ ] ACP installed in project
68
+ - [ ] `agent/progress.yaml` exists
69
+ - [ ] Templates exist (milestone, task, design, clarification)
70
+ - [ ] (Optional) Draft files prepared for requirements
71
+
72
+ ---
73
+
74
+ ## Steps
75
+
76
+ ### 1. Scan for Undefined Planning Items
77
+
78
+ Automatically scan progress.yaml for items needing planning:
79
+
80
+ **Actions**:
81
+ - Read [`agent/progress.yaml`](../progress.yaml:1)
82
+ - Check for undefined milestones:
83
+ - Milestone ID exists in progress.yaml but no `milestone-{N}-{name}.md` file
84
+ - Milestone has no tasks defined in progress.yaml
85
+ - Check for undefined tasks:
86
+ - Task ID exists in progress.yaml but no `task-{N}-{name}.md` file
87
+ - Task has minimal notes (just one-liner)
88
+ - Prioritize milestones over tasks (but use conversation context to determine user intent)
89
+
90
+ **Expected Outcome**: List of undefined items identified
91
+
92
+ ### 2. Present Planning Options
93
+
94
+ Show user what can be planned and offer choices:
95
+
96
+ **If undefined items found**:
97
+ ```
98
+ 📋 Planning Items Detected:
99
+
100
+ Undefined Milestones:
101
+ • M6: Advanced Features (no milestone document)
102
+ • M7: Production Deployment (no tasks defined)
103
+
104
+ Undefined Tasks:
105
+ • Task 42: API Integration (no task document)
106
+ • Task 43: Performance Optimization (minimal notes)
107
+
108
+ Options:
109
+ 1. Plan specific milestone (choose from list)
110
+ 2. Plan specific task (choose from list)
111
+ 3. Plan all undefined items (batch mode)
112
+ 4. Plan something new (provide requirements)
113
+
114
+ What would you like to plan?
115
+ ```
116
+
117
+ **If no undefined items**:
118
+ ```
119
+ ✅ All milestones and tasks in progress.yaml are defined.
120
+
121
+ Options:
122
+ 1. Create a new milestone (provide requirements)
123
+ 2. Refine existing plans (review and enhance existing milestone/task documents)
124
+ 3. Create a design document first (unstructured draft or structured draft)
125
+ 4. Create a requirements document first (unstructured draft or structured draft)
126
+ 5. Provide requirements in chat (immediate planning without drafts)
127
+
128
+ What would you like to do?
129
+ ```
130
+
131
+ **Expected Outcome**: User selects planning path
132
+
133
+ ### 3. Gather Requirements
134
+
135
+ Based on user selection, gather requirements:
136
+
137
+ **Option A: Design Document First**
138
+ - Ask: "Structured draft (with questions) or unstructured draft (free-form)?"
139
+ - If structured: Create `agent/drafts/{requirement-title}-design.draft.md` with 3 key questions:
140
+ 1. **What problem does this solve?** (Problem statement)
141
+ 2. **What is the proposed solution?** (High-level approach)
142
+ 3. **What are the key technical decisions?** (Architecture, patterns, trade-offs)
143
+ - If unstructured: Create empty `agent/drafts/{requirement-title}-feature.draft.md` or `agent/design/{requirement-title}-feature.draft.md`
144
+ - Wait for user to fill draft
145
+ - Read completed draft
146
+ - Create full design document from draft responses
147
+
148
+ **Option B: Requirements Document First**
149
+ - Ask: "Structured draft (with questions) or unstructured draft (free-form)?"
150
+ - If structured: Create `agent/drafts/{requirement-title}-requirements.draft.md` with 3 key questions:
151
+ 1. **What should the system do?** (Functional requirements)
152
+ 2. **What are the constraints?** (Technical, business, resource constraints)
153
+ 3. **What defines success?** (Success criteria, acceptance criteria)
154
+ - If unstructured: Create empty `agent/drafts/{requirement-title}-requirements.draft.md`
155
+ - Wait for user to fill draft
156
+ - Read completed draft
157
+ - Create full requirements document from draft responses
158
+
159
+ **Option C: Milestone Document First**
160
+ - Ask: "Structured draft (with questions) or unstructured draft (free-form)?"
161
+ - If structured: Create `agent/drafts/milestone-{N}-{title}.draft.md` with 3 key questions:
162
+ 1. **What is the goal of this milestone?** (Objective, what will be accomplished)
163
+ 2. **What are the key deliverables?** (Concrete outputs, features, artifacts)
164
+ 3. **How will we know it's complete?** (Success criteria, verification)
165
+ - If unstructured: Create empty `agent/drafts/milestone-{N}-{title}.draft.md`
166
+ - Wait for user to fill draft
167
+ - Read completed draft
168
+ - Create milestone document from draft responses
169
+
170
+ **Option D: Task Document First**
171
+ - Ask: "Structured draft (with questions) or unstructured draft (free-form)?"
172
+ - If structured: Create `agent/drafts/task-{N}-{title}.draft.md` with 3 key questions:
173
+ 1. **What needs to be done?** (Objective, specific actions)
174
+ 2. **What are the steps?** (Implementation steps, order of operations)
175
+ 3. **How do we verify it works?** (Verification checklist, acceptance criteria)
176
+ - If unstructured: Create empty `agent/drafts/task-{N}-{title}.draft.md`
177
+ - Wait for user to fill draft
178
+ - Read completed draft
179
+ - Create task document from draft responses
180
+
181
+ **Option E: Requirements in Chat**
182
+ - Ask: "Describe the feature/requirement you want to plan for"
183
+ - Collect requirements via conversation
184
+ - If requirements unclear, request chat clarification or offer to create clarification document
185
+ - Wait for clarification responses
186
+
187
+ **Option F: Point to Existing Draft**
188
+ - Support syntax: `@acp.plan @agent/drafts/my-feature.draft.md`
189
+ - Read draft file
190
+ - If ambiguous, request chat clarification or offer to create clarification
191
+
192
+
193
+ **Expected Outcome**: Requirements gathered and clarified
194
+
195
+ ### 4. Determine Planning Scope
196
+
197
+ Decide what to create based on requirements:
198
+
199
+ **Actions**:
200
+ - Analyze requirements complexity
201
+ - Determine if single milestone or multiple milestones needed
202
+ - Estimate number of tasks per milestone
203
+ - Ask user: "This looks like {N} milestone(s) with ~{M} tasks each. Sound good, or prefer more granular/broader tasks?"
204
+ - Confirm planning scope
205
+
206
+ **Expected Outcome**: Planning scope agreed upon
207
+
208
+ ### 5. Create Milestone Documents
209
+
210
+ For each milestone to plan:
211
+
212
+ **Actions**:
213
+ - Determine milestone number (find highest M{N} in progress.yaml and increment)
214
+ - Invoke `@acp.design-create` if design document needed (ask user)
215
+ - Create milestone document using template or invoke `@acp.milestone-create`
216
+ - Fill in:
217
+ - Goal and overview
218
+ - Deliverables
219
+ - Success criteria
220
+ - Estimated duration (calculate from task estimates)
221
+ - Save to `agent/milestones/milestone-{N}-{name}.md`
222
+ - Add to progress.yaml milestones section
223
+
224
+ **Expected Outcome**: Milestone document(s) created
225
+
226
+ ### 6. Create Task Documents
227
+
228
+ For each task in milestone:
229
+
230
+ **Actions**:
231
+ - Determine task number (find highest task-{N} across ALL milestones and increment)
232
+ - Invoke `@acp.task-create` for each task (follows its routine)
233
+ - Tasks created in: `agent/tasks/milestone-{N}-{title}/task-{M}-{title}.md`
234
+ - **New Structure**: Tasks grouped by milestone folder
235
+ - For orphaned tasks (no milestone): Use `agent/tasks/unassigned/task-{M}-{title}.md`
236
+ - Each task includes:
237
+ - Objective
238
+ - Context
239
+ - Steps
240
+ - Verification checklist
241
+ - Dependencies (auto-detected or user-provided)
242
+ - Estimated hours (AI-suggested, user can adjust)
243
+ - Add each task to progress.yaml under appropriate milestone section
244
+
245
+ **Expected Outcome**: Task documents created and organized by milestone
246
+
247
+ ### 7. Update progress.yaml
248
+
249
+ Update progress tracking with new planning items:
250
+
251
+ **Actions**:
252
+ - Add milestones to milestones array (with complete metadata)
253
+ - Add tasks to appropriate milestone_N sections
254
+ - Update milestone tasks_total counts
255
+ - Calculate estimated_weeks from task hour estimates
256
+ - Update next_steps with new planning items
257
+ - Do NOT update current_milestone (that's for implementation, not planning)
258
+
259
+ **Expected Outcome**: progress.yaml fully updated
260
+
261
+ ### 8. Generate Planning Report
262
+
263
+ Create visual summary of what was planned:
264
+
265
+ **Output**:
266
+ ```
267
+ ✅ Planning Complete!
268
+
269
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
270
+
271
+ Milestones Created:
272
+ 📋 M6: Advanced Features (3 weeks, 8 tasks)
273
+ └── agent/milestones/milestone-6-advanced-features.md
274
+
275
+ 📋 M7: Production Deployment (2 weeks, 5 tasks)
276
+ └── agent/milestones/milestone-7-production-deployment.md
277
+
278
+ Tasks Created (13 total):
279
+ M6: Advanced Features
280
+ ├── Task 42: API Integration (4-6 hours)
281
+ │ └── agent/tasks/milestone-6-advanced-features/task-42-api-integration.md
282
+ ├── Task 43: Performance Optimization (3-4 hours)
283
+ │ └── agent/tasks/milestone-6-advanced-features/task-43-performance-optimization.md
284
+ └── [6 more tasks...]
285
+
286
+ M7: Production Deployment
287
+ ├── Task 50: CI/CD Pipeline (6-8 hours)
288
+ │ └── agent/tasks/milestone-7-production-deployment/task-50-cicd-pipeline.md
289
+ └── [4 more tasks...]
290
+
291
+ Files Created:
292
+ ✓ 2 milestone documents
293
+ ✓ 13 task documents
294
+ ✓ 1 design document (optional)
295
+ ✓ progress.yaml updated
296
+
297
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
298
+
299
+ Next Steps:
300
+ • Review milestone and task documents
301
+ • Refine task steps and verification items
302
+ • Run @acp.validate to check consistency
303
+ • Run @acp.proceed to start first task
304
+ • Run @acp.sync to update related documentation (optional)
305
+ ```
306
+
307
+ **Expected Outcome**: User understands what was created
308
+
309
+ ### 9. Offer Next Actions
310
+
311
+ Prompt user for next action:
312
+
313
+ **Options**:
314
+ - `@acp.proceed` - Start implementing first task
315
+ - `@acp.plan` - Continue planning (if more to plan)
316
+ - `@acp.validate` - Validate planning consistency
317
+ - `@acp.sync` - Sync documentation with new plans
318
+ - Review and refine manually
319
+
320
+ **Expected Outcome**: User chooses next action
321
+
322
+ ---
323
+
324
+ ## Verification
325
+
326
+ - [ ] progress.yaml scanned for undefined items
327
+ - [ ] Planning options presented to user
328
+ - [ ] Requirements gathered (draft, chat, or clarification)
329
+ - [ ] Planning scope determined and confirmed
330
+ - [ ] Milestone documents created (if applicable)
331
+ - [ ] Task documents created in milestone folders
332
+ - [ ] Orphaned tasks placed in unassigned/ folder
333
+ - [ ] progress.yaml updated with all new items
334
+ - [ ] Planning report generated
335
+ - [ ] Next actions offered
336
+
337
+ ---
338
+
339
+ ## Expected Output
340
+
341
+ ### Files Created
342
+
343
+ **Milestones**:
344
+ - `agent/milestones/milestone-{N}-{name}.md` (one or more)
345
+
346
+ **Tasks** (new structure):
347
+ - `agent/tasks/milestone-{N}-{title}/task-{M}-{title}.md` (tasks grouped by milestone)
348
+ - `agent/tasks/unassigned/task-{M}-{title}.md` (orphaned tasks)
349
+
350
+ **Optional**:
351
+ - `agent/design/{requirement-title}-{feature|design|requirements}.md` (if design created)
352
+ - `agent/drafts/{requirement-title}-{feature|design|requirements}.draft.md` (if draft created)
353
+ - `agent/clarifications/clarification-{N}-{title}.md` (if clarification needed)
354
+
355
+ ### Files Modified
356
+
357
+ - `agent/progress.yaml` - Milestones and tasks added
358
+
359
+ ---
360
+
361
+ ## Examples
362
+
363
+ ### Example 1: Planning Undefined Milestone
364
+
365
+ **Context**: M6 exists in progress.yaml but no milestone document
366
+
367
+ **Invocation**: `@acp.plan`
368
+
369
+ **Result**:
370
+ ```
371
+ 📋 Found undefined milestone: M6 - Advanced Features
372
+
373
+ Would you like to:
374
+ 1. Create design document first
375
+ 2. Create milestone document directly
376
+ 3. Provide requirements in chat
377
+
378
+ User: 2
379
+
380
+ Creating milestone document...
381
+
382
+ What are the key deliverables for M6?
383
+ User: API integration, caching system, performance monitoring
384
+
385
+ How many weeks estimated?
386
+ User: 3 weeks
387
+
388
+ ✅ Milestone Created!
389
+ File: agent/milestones/milestone-6-advanced-features.md
390
+
391
+ Would you like to break this into tasks now? (yes/no)
392
+ User: yes
393
+
394
+ [Proceeds to create tasks...]
395
+ ```
396
+
397
+ ### Example 2: Planning with Draft File
398
+
399
+ **Context**: Have requirements draft prepared
400
+
401
+ **Invocation**: `@acp.plan @agent/drafts/auth-feature.draft.md`
402
+
403
+ **Result**: Reads draft, creates clarification if needed, generates milestone and tasks, updates progress.yaml
404
+
405
+ ### Example 3: Batch Planning
406
+
407
+ **Context**: Multiple undefined items
408
+
409
+ **Invocation**: `@acp.plan --all`
410
+
411
+ **Result**: Plans all undefined milestones and tasks without prompting, generates report
412
+
413
+ ### Example 4: New Feature Planning
414
+
415
+ **Context**: No undefined items, want to plan new feature
416
+
417
+ **Invocation**: `@acp.plan`
418
+
419
+ **Result**:
420
+ ```
421
+ ✅ All current items are defined.
422
+
423
+ What would you like to plan?
424
+ 1. New milestone
425
+ 2. Refine existing plans
426
+ 3. Create design document
427
+
428
+ User: 1
429
+
430
+ Describe the new feature/milestone:
431
+ User: Add real-time collaboration features
432
+
433
+ Would you like to:
434
+ a) Create structured requirements draft (with questions)
435
+ b) Create unstructured draft (free-form)
436
+ c) Provide details in chat now
437
+
438
+ User: c
439
+
440
+ [Collects requirements in chat, creates milestone and tasks...]
441
+ ```
442
+
443
+ ---
444
+
445
+ ## Related Commands
446
+
447
+ - [`@acp.task-create`](acp.task-create.md) - Create individual tasks (invoked as subroutine)
448
+ - [`@acp.design-create`](acp.design-create.md) - Create design documents (invoked as subroutine)
449
+ - [`@acp.proceed`](acp.proceed.md) - Start implementing planned tasks
450
+ - [`@acp.validate`](acp.validate.md) - Validate planning consistency
451
+ - [`@acp.sync`](acp.sync.md) - Sync documentation after planning
452
+ - [`@acp.status`](acp.status.md) - Check current project status
453
+
454
+ ---
455
+
456
+ ## Troubleshooting
457
+
458
+ ### Issue 1: No milestones in progress.yaml
459
+
460
+ **Symptom**: Error "No milestones found"
461
+
462
+ **Solution**: Guide user through creating first milestone. Offer to create default milestone structure or collect requirements in chat.
463
+
464
+ ### Issue 2: Ambiguous requirements
465
+
466
+ **Symptom**: Cannot determine full requirements for a requested plan item
467
+
468
+ **Solution**: Create clarification document to gather missing details. Inform user this takes longer but yields better results.
469
+
470
+ ### Issue 3: Task numbering conflicts
471
+
472
+ **Symptom**: Task numbers overlap or have gaps
473
+
474
+ **Solution**: Agent auto-detects highest task number across ALL milestones and increments. Gaps are acceptable.
475
+
476
+ ### Issue 4: Milestone numbering gaps
477
+
478
+ **Symptom**: M1, M2, M5 exist but M3, M4 missing
479
+
480
+ **Solution**: Prompt user to either fill gaps or continue with M6. Offer options to refine requirements, create drafts, or skip to more defined milestones.
481
+
482
+ ---
483
+
484
+ ## Security Considerations
485
+
486
+ ### File Access
487
+ - **Reads**: progress.yaml, draft files, templates, existing milestones/tasks, design documents
488
+ - **Writes**: milestone documents, task documents, progress.yaml, design documents (if created), clarifications (if needed)
489
+ - **Executes**: None (invokes other @acp commands as subroutines)
490
+
491
+ ### Network Access
492
+ - **APIs**: None
493
+ - **Repositories**: None
494
+
495
+ ### Sensitive Data
496
+ - **Secrets**: Never include secrets in planning documents
497
+ - **Credentials**: Never include credentials
498
+
499
+ ---
500
+
501
+ ## Notes
502
+
503
+ - **New Task Structure**: Tasks now organized in `agent/tasks/milestone-{N}-{title}/task-{M}-{title}.md`
504
+ - **Orphaned Tasks**: Tasks without milestone go in `agent/tasks/unassigned/task-{M}-{title}.md`
505
+ - **Task Numbering**: Sequential across ALL milestones (M2: T1-T2, M3: T3-T5, etc.)
506
+ - **Milestone Priority**: Generally prioritized over tasks, but agent uses context to determine intent
507
+ - **Subroutine Pattern**: Invokes `@acp.milestone-create`, `@acp.task-create`, `@acp.design-create` to ensure consistent structure
508
+ - **No current_milestone Update**: Planning updates next_steps, not current_milestone (which is for implementation)
509
+ - **Validation**: Defer to `@acp.validate` for consistency checking (offer to run before or after planning)
510
+ - **Context Window**: If >20% used, suggest `@acp.report` → new session → `@acp.resume`
511
+
512
+ ### Estimation Guidelines
513
+
514
+ **Dev Hours vs Agent Hours**:
515
+ - Default estimates are in human dev hours (industry standard)
516
+ - If user asks about agent time/cost/tokens, provide agent-specific estimates
517
+ - Agent can complete tasks faster than estimates suggest (estimates are conservative)
518
+ - Use historical performance from recent_work to inform agent hour estimates
519
+
520
+ **Task Granularity**:
521
+ - Agent suggests task size based on complexity
522
+ - User can request "more granular" or "broader scope"
523
+ - Typical range: 2-4 hours per task (moderate granularity)
524
+ - Adjust based on user preference
525
+
526
+ ### Dependency Detection
527
+
528
+ Dependencies may be inferred from:
529
+ - progress.yaml (existing task relationships)
530
+ - Existing milestones and tasks
531
+ - Design documents
532
+ - Requirements documents
533
+ - Related patterns
534
+ - Conversation context
535
+ - Recent reports
536
+ - Clarifications
537
+
538
+ **Dependency Expression**:
539
+ - If task undefined: "Task 24"
540
+ - If task defined but no document: "Task 24: Pre-Commit Hook System"
541
+ - If task document exists: "[Task 24](../tasks/milestone-4-package-development/task-24-precommit-hook-system.md)"
542
+
543
+ ---
544
+
545
+ **Namespace**: acp
546
+ **Command**: plan
547
+ **Version**: 1.0.0
548
+ **Created**: 2026-02-22
549
+ **Last Updated**: 2026-02-22
550
+ **Status**: Active
551
+ **Compatibility**: ACP 3.7.3+
552
+ **Author**: ACP Project