@prmichaelsen/task-mcp 0.2.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 (142) hide show
  1. package/.env.example +19 -0
  2. package/AGENT.md +1165 -0
  3. package/CHANGELOG.md +72 -0
  4. package/agent/commands/acp.commit.md +511 -0
  5. package/agent/commands/acp.init.md +376 -0
  6. package/agent/commands/acp.package-install.md +347 -0
  7. package/agent/commands/acp.proceed.md +311 -0
  8. package/agent/commands/acp.report.md +392 -0
  9. package/agent/commands/acp.status.md +280 -0
  10. package/agent/commands/acp.sync.md +323 -0
  11. package/agent/commands/acp.update.md +301 -0
  12. package/agent/commands/acp.validate.md +385 -0
  13. package/agent/commands/acp.version-check-for-updates.md +275 -0
  14. package/agent/commands/acp.version-check.md +190 -0
  15. package/agent/commands/acp.version-update.md +288 -0
  16. package/agent/commands/command.template.md +273 -0
  17. package/agent/commands/git.commit.md +511 -0
  18. package/agent/commands/git.init.md +513 -0
  19. package/agent/design/.gitkeep +0 -0
  20. package/agent/design/acp-task-execution-requirements.md +555 -0
  21. package/agent/design/api-dto-design.md +394 -0
  22. package/agent/design/code-extraction-guide.md +827 -0
  23. package/agent/design/design.template.md +136 -0
  24. package/agent/design/requirements.template.md +387 -0
  25. package/agent/design/rest-api-integration.md +489 -0
  26. package/agent/design/sdk-export-requirements.md +549 -0
  27. package/agent/milestones/.gitkeep +0 -0
  28. package/agent/milestones/milestone-1-{title}.template.md +206 -0
  29. package/agent/milestones/milestone-2-task-infrastructure.md +232 -0
  30. package/agent/milestones/milestone-4-autonomous-execution.md +235 -0
  31. package/agent/patterns/.gitkeep +0 -0
  32. package/agent/patterns/bootstrap.md +1271 -0
  33. package/agent/patterns/bootstrap.template.md +1237 -0
  34. package/agent/patterns/pattern.template.md +364 -0
  35. package/agent/progress.template.yaml +158 -0
  36. package/agent/progress.yaml +375 -0
  37. package/agent/scripts/check-for-updates.sh +88 -0
  38. package/agent/scripts/install.sh +157 -0
  39. package/agent/scripts/uninstall.sh +75 -0
  40. package/agent/scripts/update.sh +139 -0
  41. package/agent/scripts/version.sh +35 -0
  42. package/agent/tasks/.gitkeep +0 -0
  43. package/agent/tasks/task-1-{title}.template.md +225 -0
  44. package/agent/tasks/task-86-task-data-model-schemas.md +143 -0
  45. package/agent/tasks/task-87-task-database-service.md +220 -0
  46. package/agent/tasks/task-88-firebase-client-wrapper.md +139 -0
  47. package/agent/tasks/task-88-task-execution-engine.md +277 -0
  48. package/agent/tasks/task-89-mcp-server-implementation.md +197 -0
  49. package/agent/tasks/task-90-build-configuration.md +146 -0
  50. package/agent/tasks/task-91-deployment-configuration.md +128 -0
  51. package/coverage/base.css +224 -0
  52. package/coverage/block-navigation.js +87 -0
  53. package/coverage/favicon.png +0 -0
  54. package/coverage/index.html +191 -0
  55. package/coverage/lcov-report/base.css +224 -0
  56. package/coverage/lcov-report/block-navigation.js +87 -0
  57. package/coverage/lcov-report/favicon.png +0 -0
  58. package/coverage/lcov-report/index.html +191 -0
  59. package/coverage/lcov-report/prettify.css +1 -0
  60. package/coverage/lcov-report/prettify.js +2 -0
  61. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  62. package/coverage/lcov-report/sorter.js +210 -0
  63. package/coverage/lcov-report/src/client.ts.html +1030 -0
  64. package/coverage/lcov-report/src/constant/collections.ts.html +469 -0
  65. package/coverage/lcov-report/src/constant/index.html +116 -0
  66. package/coverage/lcov-report/src/dto/index.html +116 -0
  67. package/coverage/lcov-report/src/dto/transformers.ts.html +568 -0
  68. package/coverage/lcov-report/src/index.html +146 -0
  69. package/coverage/lcov-report/src/schemas/index.html +116 -0
  70. package/coverage/lcov-report/src/schemas/task.ts.html +547 -0
  71. package/coverage/lcov-report/src/server-factory.ts.html +418 -0
  72. package/coverage/lcov-report/src/server.ts.html +289 -0
  73. package/coverage/lcov-report/src/services/index.html +116 -0
  74. package/coverage/lcov-report/src/services/task-database.service.ts.html +1495 -0
  75. package/coverage/lcov-report/src/tools/index.html +236 -0
  76. package/coverage/lcov-report/src/tools/index.ts.html +292 -0
  77. package/coverage/lcov-report/src/tools/task-add-message.ts.html +277 -0
  78. package/coverage/lcov-report/src/tools/task-complete-task-item.ts.html +343 -0
  79. package/coverage/lcov-report/src/tools/task-create-milestone.ts.html +286 -0
  80. package/coverage/lcov-report/src/tools/task-create-task-item.ts.html +358 -0
  81. package/coverage/lcov-report/src/tools/task-get-next-step.ts.html +460 -0
  82. package/coverage/lcov-report/src/tools/task-get-status.ts.html +316 -0
  83. package/coverage/lcov-report/src/tools/task-report-completion.ts.html +343 -0
  84. package/coverage/lcov-report/src/tools/task-update-progress.ts.html +232 -0
  85. package/coverage/lcov.info +974 -0
  86. package/coverage/prettify.css +1 -0
  87. package/coverage/prettify.js +2 -0
  88. package/coverage/sort-arrow-sprite.png +0 -0
  89. package/coverage/sorter.js +210 -0
  90. package/coverage/src/client.ts.html +1030 -0
  91. package/coverage/src/constant/collections.ts.html +469 -0
  92. package/coverage/src/constant/index.html +116 -0
  93. package/coverage/src/dto/index.html +116 -0
  94. package/coverage/src/dto/transformers.ts.html +568 -0
  95. package/coverage/src/index.html +146 -0
  96. package/coverage/src/schemas/index.html +116 -0
  97. package/coverage/src/schemas/task.ts.html +547 -0
  98. package/coverage/src/server-factory.ts.html +418 -0
  99. package/coverage/src/server.ts.html +289 -0
  100. package/coverage/src/services/index.html +116 -0
  101. package/coverage/src/services/task-database.service.ts.html +1495 -0
  102. package/coverage/src/tools/index.html +236 -0
  103. package/coverage/src/tools/index.ts.html +292 -0
  104. package/coverage/src/tools/task-add-message.ts.html +277 -0
  105. package/coverage/src/tools/task-complete-task-item.ts.html +343 -0
  106. package/coverage/src/tools/task-create-milestone.ts.html +286 -0
  107. package/coverage/src/tools/task-create-task-item.ts.html +358 -0
  108. package/coverage/src/tools/task-get-next-step.ts.html +460 -0
  109. package/coverage/src/tools/task-get-status.ts.html +316 -0
  110. package/coverage/src/tools/task-report-completion.ts.html +343 -0
  111. package/coverage/src/tools/task-update-progress.ts.html +232 -0
  112. package/firestore.rules +95 -0
  113. package/jest.config.js +31 -0
  114. package/package.json +67 -0
  115. package/src/client.spec.ts +199 -0
  116. package/src/client.ts +315 -0
  117. package/src/constant/collections.ts +128 -0
  118. package/src/dto/index.ts +47 -0
  119. package/src/dto/task-api.dto.ts +219 -0
  120. package/src/dto/transformers.spec.ts +462 -0
  121. package/src/dto/transformers.ts +161 -0
  122. package/src/schemas/task.ts +154 -0
  123. package/src/server-factory.spec.ts +70 -0
  124. package/src/server-factory.ts +111 -0
  125. package/src/server.ts +68 -0
  126. package/src/services/task-database.service.e2e.ts +116 -0
  127. package/src/services/task-database.service.spec.ts +479 -0
  128. package/src/services/task-database.service.ts +470 -0
  129. package/src/test-schemas.ts +161 -0
  130. package/src/tools/index.ts +69 -0
  131. package/src/tools/task-add-message.ts +64 -0
  132. package/src/tools/task-complete-task-item.ts +86 -0
  133. package/src/tools/task-create-milestone.ts +67 -0
  134. package/src/tools/task-create-task-item.ts +91 -0
  135. package/src/tools/task-get-next-step.spec.ts +136 -0
  136. package/src/tools/task-get-next-step.ts +125 -0
  137. package/src/tools/task-get-status.spec.ts +213 -0
  138. package/src/tools/task-get-status.ts +77 -0
  139. package/src/tools/task-report-completion.ts +86 -0
  140. package/src/tools/task-update-progress.ts +49 -0
  141. package/src/tools/tools.spec.ts +194 -0
  142. package/tsconfig.json +31 -0
@@ -0,0 +1,376 @@
1
+ # Command: init
2
+
3
+ > **🤖 Agent Directive**: If you are reading this file, the command `@acp-init` has been invoked. Follow the steps below to execute this command.
4
+
5
+ **Namespace**: acp
6
+ **Version**: 1.0.0
7
+ **Created**: 2026-02-16
8
+ **Last Updated**: 2026-02-16
9
+ **Status**: Active
10
+
11
+ ---
12
+
13
+ **Purpose**: Initialize agent context by loading all documentation, reviewing source code, and preparing for work
14
+ **Category**: Workflow
15
+ **Frequency**: Once Per Session
16
+
17
+ ---
18
+
19
+ ## What This Command Does
20
+
21
+ This command performs a comprehensive initialization of the agent's context for working on an ACP-structured project. It checks for ACP updates, reads all documentation in the `agent/` directory, reviews key source files to understand the current implementation, updates any stale documentation, and refreshes progress tracking.
22
+
23
+ Use this command at the start of each work session to ensure you have complete project context. It's the most thorough way to get up to speed on a project, understanding both what's documented and what's actually implemented in the code.
24
+
25
+ Unlike `@acp-status` which only reads progress.yaml, or `@acp-proceed` which focuses on a single task, `@acp-init` provides comprehensive context loading across all project documentation and source code. It's designed to answer: "What is this project? Where does it stand? What needs to be done?"
26
+
27
+ ---
28
+
29
+ ## Prerequisites
30
+
31
+ - [ ] ACP installed in project (AGENT.md and agent/ directory exist)
32
+ - [ ] Project has source code to review
33
+ - [ ] Git repository initialized (optional, for update checking)
34
+
35
+ ---
36
+
37
+ ## Steps
38
+
39
+ ### 1. Check for ACP Updates
40
+
41
+ Check if newer version of ACP is available.
42
+
43
+ **Actions**:
44
+ - Run `./agent/scripts/check-for-updates.sh` if it exists
45
+ - Report if updates are available
46
+ - Show what changed via CHANGELOG
47
+ - Ask if user wants to update (don't auto-update)
48
+
49
+ **Expected Outcome**: User informed of ACP version status
50
+
51
+ ### 2. Read All Agent Documentation
52
+
53
+ Load complete context from the agent/ directory.
54
+
55
+ **Actions**:
56
+ - Read `agent/progress.yaml` for current status
57
+ - Read `agent/design/requirements.md` for project goals
58
+ - Read all design documents in `agent/design/`
59
+ - Read current milestone document
60
+ - Read all task documents (focus on current/upcoming)
61
+ - Read relevant pattern documents in `agent/patterns/`
62
+ - Note any missing or incomplete documentation
63
+
64
+ **Expected Outcome**: Complete documentation context loaded
65
+
66
+ ### 3. Identify Key Source Files
67
+
68
+ Determine which source files are most important to review.
69
+
70
+ **Actions**:
71
+ - Check project type (package.json, requirements.txt, go.mod, etc.)
72
+ - Identify main entry points (src/index.ts, main.py, cmd/main.go, etc.)
73
+ - Note key configuration files (tsconfig.json, .env.example, etc.)
74
+ - Identify core business logic files
75
+ - List test files
76
+
77
+ **Expected Outcome**: Key source files identified for review
78
+
79
+ ### 4. Review Key Source Files
80
+
81
+ Read important source files to understand current implementation.
82
+
83
+ **Actions**:
84
+ - Read main entry point files
85
+ - Review core business logic
86
+ - Check configuration files
87
+ - Note any TODOs or FIXMEs
88
+ - Understand current architecture
89
+ - Compare implementation with design documents
90
+
91
+ **Expected Outcome**: Current implementation understood
92
+
93
+ ### 5. Identify Documentation Drift
94
+
95
+ Compare documentation with actual implementation.
96
+
97
+ **Actions**:
98
+ - Check if design documents match implementation
99
+ - Note any undocumented features in code
100
+ - Identify outdated documentation
101
+ - Flag missing documentation
102
+ - List discrepancies
103
+
104
+ **Expected Outcome**: Documentation gaps identified
105
+
106
+ ### 6. Update Stale Documentation
107
+
108
+ Refresh outdated documentation to match current state.
109
+
110
+ **Actions**:
111
+ - Update design documents if implementation differs
112
+ - Update task documents if steps have changed
113
+ - Add notes about discovered issues
114
+ - Update progress.yaml with current understanding
115
+ - Document any new patterns found in code
116
+
117
+ **Expected Outcome**: Documentation synchronized with code
118
+
119
+ ### 7. Update Progress Tracking
120
+
121
+ Refresh progress.yaml with latest status.
122
+
123
+ **Actions**:
124
+ - Verify current milestone is correct
125
+ - Confirm current task is accurate
126
+ - Update progress percentages if needed
127
+ - Add recent work entry for initialization
128
+ - Update next steps based on current state
129
+ - Note any new blockers discovered
130
+
131
+ **Expected Outcome**: Progress tracking is current and accurate
132
+
133
+ ### 8. Report Status and Next Steps
134
+
135
+ Provide comprehensive status report.
136
+
137
+ **Actions**:
138
+ - Summarize project status
139
+ - Show current milestone and progress
140
+ - Identify current task
141
+ - List recent accomplishments
142
+ - Highlight next steps
143
+ - Note any blockers or concerns
144
+ - Provide recommendations
145
+
146
+ **Expected Outcome**: User has complete context and knows what to do next
147
+
148
+ ---
149
+
150
+ ## Verification
151
+
152
+ - [ ] ACP update check completed
153
+ - [ ] All agent/ files read successfully
154
+ - [ ] Key source files identified and reviewed
155
+ - [ ] Documentation drift identified (if any)
156
+ - [ ] Stale documentation updated
157
+ - [ ] progress.yaml updated with current status
158
+ - [ ] Comprehensive status report provided
159
+ - [ ] Next steps clearly identified
160
+ - [ ] No errors encountered during initialization
161
+
162
+ ---
163
+
164
+ ## Expected Output
165
+
166
+ ### Files Modified
167
+ - `agent/progress.yaml` - Updated with current status, recent work entry added
168
+ - Design/task documents - Updated if stale (as needed)
169
+
170
+ ### Console Output
171
+ ```
172
+ 🚀 Initializing Agent Context
173
+
174
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
175
+
176
+ ✓ Checking for ACP updates...
177
+ Current version: 1.0.3
178
+ Status: Up to date
179
+
180
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
181
+
182
+ 📚 Reading Agent Documentation...
183
+ ✓ Read agent/progress.yaml
184
+ ✓ Read agent/design/requirements.md
185
+ ✓ Read agent/design/acp-commands-design.md
186
+ ✓ Read agent/milestones/milestone-1-acp-commands.md
187
+ ✓ Read agent/milestones/milestone-2-acp-commands-advanced.md
188
+ ✓ Read agent/tasks/task-1-commands-infrastructure.md
189
+ ✓ Read agent/tasks/task-2-workflow-commands.md
190
+ ✓ Read agent/tasks/task-3-version-commands.md
191
+ ✓ Read agent/tasks/task-4-update-documentation.md
192
+
193
+ Total: 9 agent files read
194
+
195
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
196
+
197
+ 📂 Reviewing Source Files...
198
+ ✓ Read AGENT.md (1,055 lines)
199
+ ✓ Read README.md (200 lines)
200
+ ✓ Read CHANGELOG.md (50 lines)
201
+ ✓ Read scripts/install.sh
202
+ ✓ Read scripts/update.sh
203
+ ✓ Read agent/commands/command.template.md
204
+ ✓ Read agent/commands/acp.status.md
205
+ ✓ Read agent/commands/acp.proceed.md
206
+
207
+ Total: 8 source files reviewed
208
+
209
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
210
+
211
+ 🔍 Documentation Analysis...
212
+ ✓ Design documents match implementation
213
+ ✓ Task documents are current
214
+ ⚠️ Task-2 document references old nested structure (acp/init.md)
215
+ ✓ Progress tracking is accurate
216
+
217
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
218
+
219
+ 📝 Updating Documentation...
220
+ ✓ Updated progress.yaml with initialization entry
221
+ ℹ️ No other updates needed
222
+
223
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
224
+
225
+ 📊 Project Status
226
+
227
+ Project: agent-context-protocol (v1.0.3)
228
+ Status: in_progress
229
+ Started: 2026-02-16
230
+
231
+ Current Milestone: M1 - ACP Commands Infrastructure
232
+ Progress: 33% (1/4 tasks completed)
233
+ Status: in_progress
234
+
235
+ Current Task: task-2 - Implement Core Workflow Commands
236
+ Status: in_progress (2/3 commands complete)
237
+ File: agent/tasks/task-2-workflow-commands.md
238
+
239
+ Recent Work (2026-02-16):
240
+ - ✅ Created comprehensive design document
241
+ - ✅ Implemented @acp-status command
242
+ - ✅ Implemented @acp-proceed command
243
+ - 📋 Next: Complete workflow commands (init)
244
+
245
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
246
+
247
+ 🎯 Next Steps:
248
+ 1. Complete task-2: Implement acp.init.md command
249
+ 2. Start task-3: Implement version commands
250
+ 3. Complete milestone-1: All 6 core commands
251
+
252
+ ⚠️ Current Blockers: None
253
+
254
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
255
+
256
+ ✅ Initialization Complete!
257
+ Ready to proceed with task-2 completion.
258
+ ```
259
+
260
+ ### Status Update
261
+ - Recent work entry added to progress.yaml
262
+ - Context fully loaded
263
+ - Ready to work
264
+
265
+ ---
266
+
267
+ ## Examples
268
+
269
+ ### Example 1: Starting Fresh Session
270
+
271
+ **Context**: Beginning work on a project for the first time today
272
+
273
+ **Invocation**: `@acp-init`
274
+
275
+ **Result**: Checks for updates, reads all 15 agent files, reviews 10 source files, updates progress tracking, reports you're on milestone 2 task 5, ready to continue
276
+
277
+ ### Example 2: Returning After Break
278
+
279
+ **Context**: Haven't worked on project in a week
280
+
281
+ **Invocation**: `@acp-init`
282
+
283
+ **Result**: Full context reload, discovers 3 new commits since last session, updates documentation to reflect changes, shows current status (milestone 3, 80% complete), identifies next task
284
+
285
+ ### Example 3: New Agent Session
286
+
287
+ **Context**: Different AI agent picking up the project
288
+
289
+ **Invocation**: `@acp-init`
290
+
291
+ **Result**: Complete onboarding - reads all documentation, understands architecture from source code, gets current status, ready to contribute immediately
292
+
293
+ ---
294
+
295
+ ## Related Commands
296
+
297
+ - [`@acp-proceed`](acp.proceed.md) - Use after init to start working on current task
298
+ - [`@acp-status`](acp.status.md) - Use for quick status check without full initialization
299
+ - [`@acp-sync`](acp.sync.md) - Use to sync documentation after code changes
300
+ - [`@acp-version-check-for-updates`](acp.version-check-for-updates.md) - Part of init process
301
+
302
+ ---
303
+
304
+ ## Troubleshooting
305
+
306
+ ### Issue 1: No agent/ directory found
307
+
308
+ **Symptom**: Error message "agent/ directory not found"
309
+
310
+ **Cause**: ACP not installed in this project
311
+
312
+ **Solution**: Install ACP first using the installation script from the ACP repository
313
+
314
+ ### Issue 2: Update check script not found
315
+
316
+ **Symptom**: Warning "check-for-updates.sh not found"
317
+
318
+ **Cause**: Older ACP installation without update scripts
319
+
320
+ **Solution**: This is non-critical, continue with initialization. Consider updating ACP to latest version.
321
+
322
+ ### Issue 3: No source files found
323
+
324
+ **Symptom**: Warning "No source files to review"
325
+
326
+ **Cause**: Project is new or source code is in unexpected location
327
+
328
+ **Solution**: This is fine for new projects. Specify source file locations if they're in non-standard directories.
329
+
330
+ ### Issue 4: progress.yaml doesn't exist
331
+
332
+ **Symptom**: Error "Cannot read progress.yaml"
333
+
334
+ **Cause**: Progress tracking not initialized yet
335
+
336
+ **Solution**: Create progress.yaml from template: `cp agent/progress.template.yaml agent/progress.yaml`, then run `@acp-init` again
337
+
338
+ ---
339
+
340
+ ## Security Considerations
341
+
342
+ ### File Access
343
+ - **Reads**: All files in `agent/` directory, key source files throughout project, AGENT.md, README.md, CHANGELOG.md
344
+ - **Writes**: `agent/progress.yaml` (updates status), design/task documents (if stale)
345
+ - **Executes**: `./agent/scripts/check-for-updates.sh` (if exists)
346
+
347
+ ### Network Access
348
+ - **APIs**: None directly (update check script may access GitHub)
349
+ - **Repositories**: Update check script accesses GitHub repository
350
+
351
+ ### Sensitive Data
352
+ - **Secrets**: Never reads .env files or credential files
353
+ - **Credentials**: Does not access any credentials
354
+
355
+ ---
356
+
357
+ ## Notes
358
+
359
+ - This is the most comprehensive ACP command - expect 30-60 seconds for large projects
360
+ - Reads many files to build complete context
361
+ - Updates documentation if drift is detected
362
+ - Safe to run multiple times (idempotent)
363
+ - Replaces the old "AGENT.md: Initialize" prompt
364
+ - Consider running at start of each session for best results
365
+ - Can be run mid-session if you need to refresh context
366
+
367
+ ---
368
+
369
+ **Namespace**: acp
370
+ **Command**: init
371
+ **Version**: 1.0.0
372
+ **Created**: 2026-02-16
373
+ **Last Updated**: 2026-02-16
374
+ **Status**: Active
375
+ **Compatibility**: ACP 1.0.3+
376
+ **Author**: ACP Project