@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.
- package/.env.example +19 -0
- package/AGENT.md +1165 -0
- package/CHANGELOG.md +72 -0
- package/agent/commands/acp.commit.md +511 -0
- package/agent/commands/acp.init.md +376 -0
- package/agent/commands/acp.package-install.md +347 -0
- package/agent/commands/acp.proceed.md +311 -0
- package/agent/commands/acp.report.md +392 -0
- package/agent/commands/acp.status.md +280 -0
- package/agent/commands/acp.sync.md +323 -0
- package/agent/commands/acp.update.md +301 -0
- package/agent/commands/acp.validate.md +385 -0
- package/agent/commands/acp.version-check-for-updates.md +275 -0
- package/agent/commands/acp.version-check.md +190 -0
- package/agent/commands/acp.version-update.md +288 -0
- package/agent/commands/command.template.md +273 -0
- package/agent/commands/git.commit.md +511 -0
- package/agent/commands/git.init.md +513 -0
- package/agent/design/.gitkeep +0 -0
- package/agent/design/acp-task-execution-requirements.md +555 -0
- package/agent/design/api-dto-design.md +394 -0
- package/agent/design/code-extraction-guide.md +827 -0
- package/agent/design/design.template.md +136 -0
- package/agent/design/requirements.template.md +387 -0
- package/agent/design/rest-api-integration.md +489 -0
- package/agent/design/sdk-export-requirements.md +549 -0
- package/agent/milestones/.gitkeep +0 -0
- package/agent/milestones/milestone-1-{title}.template.md +206 -0
- package/agent/milestones/milestone-2-task-infrastructure.md +232 -0
- package/agent/milestones/milestone-4-autonomous-execution.md +235 -0
- package/agent/patterns/.gitkeep +0 -0
- package/agent/patterns/bootstrap.md +1271 -0
- package/agent/patterns/bootstrap.template.md +1237 -0
- package/agent/patterns/pattern.template.md +364 -0
- package/agent/progress.template.yaml +158 -0
- package/agent/progress.yaml +375 -0
- package/agent/scripts/check-for-updates.sh +88 -0
- package/agent/scripts/install.sh +157 -0
- package/agent/scripts/uninstall.sh +75 -0
- package/agent/scripts/update.sh +139 -0
- package/agent/scripts/version.sh +35 -0
- package/agent/tasks/.gitkeep +0 -0
- package/agent/tasks/task-1-{title}.template.md +225 -0
- package/agent/tasks/task-86-task-data-model-schemas.md +143 -0
- package/agent/tasks/task-87-task-database-service.md +220 -0
- package/agent/tasks/task-88-firebase-client-wrapper.md +139 -0
- package/agent/tasks/task-88-task-execution-engine.md +277 -0
- package/agent/tasks/task-89-mcp-server-implementation.md +197 -0
- package/agent/tasks/task-90-build-configuration.md +146 -0
- package/agent/tasks/task-91-deployment-configuration.md +128 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +191 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +191 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/client.ts.html +1030 -0
- package/coverage/lcov-report/src/constant/collections.ts.html +469 -0
- package/coverage/lcov-report/src/constant/index.html +116 -0
- package/coverage/lcov-report/src/dto/index.html +116 -0
- package/coverage/lcov-report/src/dto/transformers.ts.html +568 -0
- package/coverage/lcov-report/src/index.html +146 -0
- package/coverage/lcov-report/src/schemas/index.html +116 -0
- package/coverage/lcov-report/src/schemas/task.ts.html +547 -0
- package/coverage/lcov-report/src/server-factory.ts.html +418 -0
- package/coverage/lcov-report/src/server.ts.html +289 -0
- package/coverage/lcov-report/src/services/index.html +116 -0
- package/coverage/lcov-report/src/services/task-database.service.ts.html +1495 -0
- package/coverage/lcov-report/src/tools/index.html +236 -0
- package/coverage/lcov-report/src/tools/index.ts.html +292 -0
- package/coverage/lcov-report/src/tools/task-add-message.ts.html +277 -0
- package/coverage/lcov-report/src/tools/task-complete-task-item.ts.html +343 -0
- package/coverage/lcov-report/src/tools/task-create-milestone.ts.html +286 -0
- package/coverage/lcov-report/src/tools/task-create-task-item.ts.html +358 -0
- package/coverage/lcov-report/src/tools/task-get-next-step.ts.html +460 -0
- package/coverage/lcov-report/src/tools/task-get-status.ts.html +316 -0
- package/coverage/lcov-report/src/tools/task-report-completion.ts.html +343 -0
- package/coverage/lcov-report/src/tools/task-update-progress.ts.html +232 -0
- package/coverage/lcov.info +974 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/coverage/src/client.ts.html +1030 -0
- package/coverage/src/constant/collections.ts.html +469 -0
- package/coverage/src/constant/index.html +116 -0
- package/coverage/src/dto/index.html +116 -0
- package/coverage/src/dto/transformers.ts.html +568 -0
- package/coverage/src/index.html +146 -0
- package/coverage/src/schemas/index.html +116 -0
- package/coverage/src/schemas/task.ts.html +547 -0
- package/coverage/src/server-factory.ts.html +418 -0
- package/coverage/src/server.ts.html +289 -0
- package/coverage/src/services/index.html +116 -0
- package/coverage/src/services/task-database.service.ts.html +1495 -0
- package/coverage/src/tools/index.html +236 -0
- package/coverage/src/tools/index.ts.html +292 -0
- package/coverage/src/tools/task-add-message.ts.html +277 -0
- package/coverage/src/tools/task-complete-task-item.ts.html +343 -0
- package/coverage/src/tools/task-create-milestone.ts.html +286 -0
- package/coverage/src/tools/task-create-task-item.ts.html +358 -0
- package/coverage/src/tools/task-get-next-step.ts.html +460 -0
- package/coverage/src/tools/task-get-status.ts.html +316 -0
- package/coverage/src/tools/task-report-completion.ts.html +343 -0
- package/coverage/src/tools/task-update-progress.ts.html +232 -0
- package/firestore.rules +95 -0
- package/jest.config.js +31 -0
- package/package.json +67 -0
- package/src/client.spec.ts +199 -0
- package/src/client.ts +315 -0
- package/src/constant/collections.ts +128 -0
- package/src/dto/index.ts +47 -0
- package/src/dto/task-api.dto.ts +219 -0
- package/src/dto/transformers.spec.ts +462 -0
- package/src/dto/transformers.ts +161 -0
- package/src/schemas/task.ts +154 -0
- package/src/server-factory.spec.ts +70 -0
- package/src/server-factory.ts +111 -0
- package/src/server.ts +68 -0
- package/src/services/task-database.service.e2e.ts +116 -0
- package/src/services/task-database.service.spec.ts +479 -0
- package/src/services/task-database.service.ts +470 -0
- package/src/test-schemas.ts +161 -0
- package/src/tools/index.ts +69 -0
- package/src/tools/task-add-message.ts +64 -0
- package/src/tools/task-complete-task-item.ts +86 -0
- package/src/tools/task-create-milestone.ts +67 -0
- package/src/tools/task-create-task-item.ts +91 -0
- package/src/tools/task-get-next-step.spec.ts +136 -0
- package/src/tools/task-get-next-step.ts +125 -0
- package/src/tools/task-get-status.spec.ts +213 -0
- package/src/tools/task-get-status.ts +77 -0
- package/src/tools/task-report-completion.ts +86 -0
- package/src/tools/task-update-progress.ts +49 -0
- package/src/tools/tools.spec.ts +194 -0
- package/tsconfig.json +31 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Milestone {N}: {Descriptive Name}
|
|
2
|
+
|
|
3
|
+
**Goal**: [One-line objective that clearly states what this milestone achieves]
|
|
4
|
+
**Duration**: [Estimated time: e.g., "1-2 weeks", "3-5 days"]
|
|
5
|
+
**Dependencies**: [List prerequisite milestones or external dependencies, or "None"]
|
|
6
|
+
**Status**: Not Started | In Progress | Completed
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
[Provide a comprehensive description of what this milestone accomplishes and why it's important to the project. Explain how it fits into the overall project roadmap.]
|
|
13
|
+
|
|
14
|
+
**Example**: "This milestone establishes the foundational infrastructure for the project, including build system, database connections, and basic server setup. It creates the scaffolding that all future features will build upon."
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Deliverables
|
|
19
|
+
|
|
20
|
+
[List concrete, measurable outputs this milestone will produce. Be specific about what will exist when this milestone is complete.]
|
|
21
|
+
|
|
22
|
+
### 1. [Deliverable Category 1]
|
|
23
|
+
- Specific item 1
|
|
24
|
+
- Specific item 2
|
|
25
|
+
- Specific item 3
|
|
26
|
+
|
|
27
|
+
### 2. [Deliverable Category 2]
|
|
28
|
+
- Specific item 1
|
|
29
|
+
- Specific item 2
|
|
30
|
+
|
|
31
|
+
### 3. [Deliverable Category 3]
|
|
32
|
+
- Specific item 1
|
|
33
|
+
- Specific item 2
|
|
34
|
+
|
|
35
|
+
**Example**:
|
|
36
|
+
|
|
37
|
+
### 1. Project Structure
|
|
38
|
+
- New `project-name/` directory with organized subdirectories
|
|
39
|
+
- package.json with all metadata and scripts
|
|
40
|
+
- TypeScript configuration (tsconfig.json)
|
|
41
|
+
- Build system using esbuild
|
|
42
|
+
- Directory structure: src/, tests/, agent/
|
|
43
|
+
|
|
44
|
+
### 2. Core Dependencies
|
|
45
|
+
- @modelcontextprotocol/sdk installed and configured
|
|
46
|
+
- Database client libraries installed
|
|
47
|
+
- Development tools (TypeScript, testing framework)
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Success Criteria
|
|
52
|
+
|
|
53
|
+
[Define objective, verifiable criteria that indicate this milestone is complete. Each criterion should be testable.]
|
|
54
|
+
|
|
55
|
+
- [ ] Criterion 1: [Specific, measurable condition]
|
|
56
|
+
- [ ] Criterion 2: [Specific, measurable condition]
|
|
57
|
+
- [ ] Criterion 3: [Specific, measurable condition]
|
|
58
|
+
- [ ] Criterion 4: [Specific, measurable condition]
|
|
59
|
+
- [ ] Criterion 5: [Specific, measurable condition]
|
|
60
|
+
|
|
61
|
+
**Example**:
|
|
62
|
+
- [ ] Project builds successfully (`npm run build` completes without errors)
|
|
63
|
+
- [ ] TypeScript compiles without errors (`npm run typecheck` passes)
|
|
64
|
+
- [ ] All dependencies install correctly (`npm install` succeeds)
|
|
65
|
+
- [ ] Basic server starts and responds to health check
|
|
66
|
+
- [ ] All tests pass (`npm test` succeeds)
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Key Files to Create
|
|
71
|
+
|
|
72
|
+
[List the specific files and directories that will be created during this milestone. Use a tree structure for clarity.]
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
project-root/
|
|
76
|
+
├── file1.ext
|
|
77
|
+
├── file2.ext
|
|
78
|
+
├── directory1/
|
|
79
|
+
│ ├── file3.ext
|
|
80
|
+
│ └── file4.ext
|
|
81
|
+
└── directory2/
|
|
82
|
+
├── subdirectory/
|
|
83
|
+
│ └── file5.ext
|
|
84
|
+
└── file6.ext
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Example**:
|
|
88
|
+
```
|
|
89
|
+
my-project/
|
|
90
|
+
├── package.json
|
|
91
|
+
├── tsconfig.json
|
|
92
|
+
├── esbuild.build.js
|
|
93
|
+
├── .gitignore
|
|
94
|
+
├── .env.example
|
|
95
|
+
├── README.md
|
|
96
|
+
├── src/
|
|
97
|
+
│ ├── index.ts
|
|
98
|
+
│ ├── server.ts
|
|
99
|
+
│ ├── types/
|
|
100
|
+
│ │ └── index.ts
|
|
101
|
+
│ └── utils/
|
|
102
|
+
│ └── logger.ts
|
|
103
|
+
└── tests/
|
|
104
|
+
└── setup.test.ts
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Tasks
|
|
110
|
+
|
|
111
|
+
[List the tasks that comprise this milestone. Reference task documents if they exist.]
|
|
112
|
+
|
|
113
|
+
1. [Task 1: task-N-{name}.md](../tasks/task-N-{name}.md) - [Brief description]
|
|
114
|
+
2. [Task 2: task-N-{name}.md](../tasks/task-N-{name}.md) - [Brief description]
|
|
115
|
+
3. [Task 3: task-N-{name}.md](../tasks/task-N-{name}.md) - [Brief description]
|
|
116
|
+
4. [Task 4: task-N-{name}.md](../tasks/task-N-{name}.md) - [Brief description]
|
|
117
|
+
|
|
118
|
+
**Example**:
|
|
119
|
+
1. [Task 1: Initialize Project Structure](../tasks/task-1-initialize-project-structure.md) - Set up directories and config files
|
|
120
|
+
2. [Task 2: Install Dependencies](../tasks/task-2-install-dependencies.md) - Install and configure npm packages
|
|
121
|
+
3. [Task 3: Create Basic Server](../tasks/task-3-create-basic-server.md) - Implement minimal MCP server
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Environment Variables
|
|
126
|
+
|
|
127
|
+
[If this milestone requires environment configuration, document it here:]
|
|
128
|
+
|
|
129
|
+
```env
|
|
130
|
+
# Category 1
|
|
131
|
+
VAR_NAME_1=example_value
|
|
132
|
+
VAR_NAME_2=example_value
|
|
133
|
+
|
|
134
|
+
# Category 2
|
|
135
|
+
VAR_NAME_3=example_value
|
|
136
|
+
VAR_NAME_4=example_value
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Example**:
|
|
140
|
+
```env
|
|
141
|
+
# Database Configuration
|
|
142
|
+
DATABASE_URL=postgresql://localhost:5432/mydb
|
|
143
|
+
DATABASE_POOL_SIZE=10
|
|
144
|
+
|
|
145
|
+
# API Configuration
|
|
146
|
+
API_KEY=your_api_key_here
|
|
147
|
+
API_URL=https://api.example.com
|
|
148
|
+
|
|
149
|
+
# Server Configuration
|
|
150
|
+
PORT=3000
|
|
151
|
+
NODE_ENV=development
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Testing Requirements
|
|
157
|
+
|
|
158
|
+
[Describe what testing should be in place by the end of this milestone:]
|
|
159
|
+
|
|
160
|
+
- [ ] Test category 1: [Description]
|
|
161
|
+
- [ ] Test category 2: [Description]
|
|
162
|
+
- [ ] Test category 3: [Description]
|
|
163
|
+
|
|
164
|
+
**Example**:
|
|
165
|
+
- [ ] Unit tests for core utilities
|
|
166
|
+
- [ ] Integration test for database connection
|
|
167
|
+
- [ ] Server initialization test
|
|
168
|
+
- [ ] Environment variable loading test
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Documentation Requirements
|
|
173
|
+
|
|
174
|
+
[List documentation that should be created or updated:]
|
|
175
|
+
|
|
176
|
+
- [ ] Document 1: [Description]
|
|
177
|
+
- [ ] Document 2: [Description]
|
|
178
|
+
- [ ] Document 3: [Description]
|
|
179
|
+
|
|
180
|
+
**Example**:
|
|
181
|
+
- [ ] README.md with project overview and quick start
|
|
182
|
+
- [ ] API documentation for core interfaces
|
|
183
|
+
- [ ] Development setup guide
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Risks and Mitigation
|
|
188
|
+
|
|
189
|
+
[Identify potential risks and how to address them:]
|
|
190
|
+
|
|
191
|
+
| Risk | Impact | Probability | Mitigation Strategy |
|
|
192
|
+
|------|--------|-------------|---------------------|
|
|
193
|
+
| [Risk 1] | High/Medium/Low | High/Medium/Low | [How to mitigate] |
|
|
194
|
+
| [Risk 2] | High/Medium/Low | High/Medium/Low | [How to mitigate] |
|
|
195
|
+
|
|
196
|
+
**Example**:
|
|
197
|
+
| Risk | Impact | Probability | Mitigation Strategy |
|
|
198
|
+
|------|--------|-------------|---------------------|
|
|
199
|
+
| Database connection issues | High | Medium | Provide clear error messages and connection testing utilities |
|
|
200
|
+
| Dependency conflicts | Medium | Low | Pin dependency versions and test thoroughly |
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
**Next Milestone**: [Link to next milestone: milestone-{N+1}-{name}.md]
|
|
205
|
+
**Blockers**: [List any current blockers, or "None"]
|
|
206
|
+
**Notes**: [Any additional context or considerations]
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# Milestone 2: MCP Server Foundation
|
|
2
|
+
|
|
3
|
+
**Goal**: Create task-mcp server with core task management tools
|
|
4
|
+
**Duration**: 2 weeks
|
|
5
|
+
**Dependencies**: None (can start immediately)
|
|
6
|
+
**Status**: Not Started
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
This milestone creates the `task-mcp` MCP server project following the [MCP Server Bootstrap Pattern](https://github.com/prmichaelsen/remember-mcp/blob/main/agent/patterns/bootstrap.md). The server exposes task management tools via MCP protocol and uses Firebase Admin SDK for direct Firestore access.
|
|
13
|
+
|
|
14
|
+
## Deliverables
|
|
15
|
+
|
|
16
|
+
1. **task-mcp Project Structure**
|
|
17
|
+
- Initialize Node.js project with TypeScript
|
|
18
|
+
- Set up esbuild for bundling
|
|
19
|
+
- Configure tsconfig.json for ESM
|
|
20
|
+
- Set up testing infrastructure (Jest)
|
|
21
|
+
- Create directory structure per bootstrap pattern
|
|
22
|
+
|
|
23
|
+
2. **Firebase Admin SDK Client**
|
|
24
|
+
- Wrapper class for Firestore operations
|
|
25
|
+
- Service account authentication
|
|
26
|
+
- User-scoped data access
|
|
27
|
+
- Connection management
|
|
28
|
+
- Error handling
|
|
29
|
+
|
|
30
|
+
3. **Firebase Client Wrapper & Core MCP Tools** (Task 88)
|
|
31
|
+
- Firebase Admin SDK client wrapper
|
|
32
|
+
- 8 core MCP tools that return instructions:
|
|
33
|
+
* `task_get_status` - Get current status
|
|
34
|
+
* `task_get_next_step` - Get next instructions
|
|
35
|
+
* `task_update_progress` - Update progress
|
|
36
|
+
* `task_complete_task_item` - Mark task complete
|
|
37
|
+
* `task_create_milestone` - Create milestone
|
|
38
|
+
* `task_create_task_item` - Create task item
|
|
39
|
+
* `task_report_completion` - Report completion
|
|
40
|
+
* `task_add_message` - Add message to thread
|
|
41
|
+
|
|
42
|
+
4. **MCP Server Implementation** (Task 89)
|
|
43
|
+
- Server class with stdio transport
|
|
44
|
+
- Server factory for multi-tenant
|
|
45
|
+
- Tool registration
|
|
46
|
+
- Request handling
|
|
47
|
+
- Error handling
|
|
48
|
+
|
|
49
|
+
5. **Build Configuration** (Task 90)
|
|
50
|
+
- esbuild for bundling
|
|
51
|
+
- Watch mode for development
|
|
52
|
+
- TypeScript declaration generation
|
|
53
|
+
- Source maps
|
|
54
|
+
|
|
55
|
+
6. **Deployment Configuration** (Task 91)
|
|
56
|
+
- Dockerfile for Cloud Run
|
|
57
|
+
- Cloud Run deployment config
|
|
58
|
+
- Service account setup
|
|
59
|
+
- Environment variables
|
|
60
|
+
- Deployment scripts
|
|
61
|
+
|
|
62
|
+
7. **Testing** (Integrated across all tasks)
|
|
63
|
+
- Unit tests for each component
|
|
64
|
+
- E2E tests with Firestore emulator
|
|
65
|
+
- Integration tests for MCP protocol
|
|
66
|
+
- Test coverage > 80%
|
|
67
|
+
|
|
68
|
+
## Success Criteria
|
|
69
|
+
|
|
70
|
+
- [x] task-mcp project initialized with TypeScript
|
|
71
|
+
- [x] Schemas and database service implemented
|
|
72
|
+
- [ ] Firebase client wrapper created
|
|
73
|
+
- [ ] All 8 core MCP tools implemented
|
|
74
|
+
- [ ] MCP server starts with stdio transport
|
|
75
|
+
- [ ] Tools can be called via MCP protocol
|
|
76
|
+
- [ ] Firebase operations work correctly
|
|
77
|
+
- [ ] User isolation enforced
|
|
78
|
+
- [x] Unit tests pass (14/14 for database service)
|
|
79
|
+
- [ ] E2E tests pass
|
|
80
|
+
- [ ] Build configuration complete
|
|
81
|
+
- [ ] Can deploy to Cloud Run
|
|
82
|
+
- [ ] Service account configuration documented
|
|
83
|
+
|
|
84
|
+
## Key Files to Create
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
task-mcp/
|
|
88
|
+
├── src/
|
|
89
|
+
│ ├── index.ts # CLI entry (stdio)
|
|
90
|
+
│ ├── server.ts # Standalone server
|
|
91
|
+
│ ├── server.ts.spec.ts # Server tests
|
|
92
|
+
│ ├── server-factory.ts # Multi-tenant factory
|
|
93
|
+
│ ├── server-factory.spec.ts # Factory tests
|
|
94
|
+
│ ├── client.ts # Firebase client
|
|
95
|
+
│ ├── client.spec.ts # Client tests
|
|
96
|
+
│ ├── types.ts # Shared types
|
|
97
|
+
│ │
|
|
98
|
+
│ ├── tools/
|
|
99
|
+
│ │ ├── index.ts
|
|
100
|
+
│ │ ├── task-get-status.ts
|
|
101
|
+
│ │ ├── task-get-status.spec.ts
|
|
102
|
+
│ │ ├── task-update-progress.ts
|
|
103
|
+
│ │ ├── task-update-progress.spec.ts
|
|
104
|
+
│ │ ├── task-pause.ts
|
|
105
|
+
│ │ ├── task-pause.spec.ts
|
|
106
|
+
│ │ ├── task-resume.ts
|
|
107
|
+
│ │ ├── task-resume.spec.ts
|
|
108
|
+
│ │ ├── task-create-milestone.ts
|
|
109
|
+
│ │ ├── task-create-milestone.spec.ts
|
|
110
|
+
│ │ ├── task-create-task.ts
|
|
111
|
+
│ │ ├── task-create-task.spec.ts
|
|
112
|
+
│ │ ├── task-complete-task.ts
|
|
113
|
+
│ │ ├── task-complete-task.spec.ts
|
|
114
|
+
│ │ ├── task-complete-milestone.ts
|
|
115
|
+
│ │ └── task-complete-milestone.spec.ts
|
|
116
|
+
│ │
|
|
117
|
+
│ └── utils/
|
|
118
|
+
│ ├── logger.ts
|
|
119
|
+
│ ├── logger.spec.ts
|
|
120
|
+
│ ├── error-serializer.ts
|
|
121
|
+
│ └── error-serializer.spec.ts
|
|
122
|
+
│
|
|
123
|
+
├── agent/ # ACP docs
|
|
124
|
+
│ ├── design/
|
|
125
|
+
│ ├── milestones/
|
|
126
|
+
│ ├── tasks/
|
|
127
|
+
│ └── progress.yaml
|
|
128
|
+
│
|
|
129
|
+
├── package.json
|
|
130
|
+
├── tsconfig.json
|
|
131
|
+
├── esbuild.build.js
|
|
132
|
+
├── esbuild.watch.js
|
|
133
|
+
├── jest.config.js
|
|
134
|
+
├── Dockerfile
|
|
135
|
+
├── .env.example
|
|
136
|
+
├── .gitignore
|
|
137
|
+
└── README.md
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Tool Implementation Pattern
|
|
141
|
+
|
|
142
|
+
Each tool follows the bootstrap pattern:
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
// src/tools/task-get-status.ts
|
|
146
|
+
import { FirebaseClient } from '../client.js'
|
|
147
|
+
|
|
148
|
+
export const taskGetStatusTool = {
|
|
149
|
+
name: 'task_get_status',
|
|
150
|
+
description: 'Get current task status and progress',
|
|
151
|
+
inputSchema: {
|
|
152
|
+
type: 'object',
|
|
153
|
+
properties: {
|
|
154
|
+
task_id: {
|
|
155
|
+
type: 'string',
|
|
156
|
+
description: 'Task ID to get status for'
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
required: ['task_id']
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export async function handleTaskGetStatus(
|
|
164
|
+
client: FirebaseClient,
|
|
165
|
+
args: { task_id: string }
|
|
166
|
+
): Promise<string> {
|
|
167
|
+
try {
|
|
168
|
+
const task = await client.getTask(args.task_id)
|
|
169
|
+
if (!task) {
|
|
170
|
+
throw new Error(`Task not found: ${args.task_id}`)
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return JSON.stringify({
|
|
174
|
+
task_title: task.title,
|
|
175
|
+
status: task.status,
|
|
176
|
+
current_milestone: task.progress.current_milestone,
|
|
177
|
+
overall_progress: task.progress.overall_percentage
|
|
178
|
+
}, null, 2)
|
|
179
|
+
} catch (error) {
|
|
180
|
+
throw new Error(`Failed to get status: ${error instanceof Error ? error.message : String(error)}`)
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Technical Decisions
|
|
186
|
+
|
|
187
|
+
1. **Project Structure**: Follow MCP Bootstrap Pattern exactly
|
|
188
|
+
2. **Transport**: Start with stdio, add SSE in Phase 2
|
|
189
|
+
3. **Authentication**: Server factory with user_id parameter
|
|
190
|
+
4. **Database**: Firebase Admin SDK with service account
|
|
191
|
+
5. **Deployment**: Cloud Run for scalability
|
|
192
|
+
|
|
193
|
+
## Risks and Mitigation
|
|
194
|
+
|
|
195
|
+
**Risk**: Firebase Admin SDK complexity
|
|
196
|
+
- **Mitigation**: Create wrapper client class, comprehensive tests
|
|
197
|
+
|
|
198
|
+
**Risk**: MCP protocol learning curve
|
|
199
|
+
- **Mitigation**: Follow bootstrap pattern, reference remember-mcp
|
|
200
|
+
|
|
201
|
+
**Risk**: Service account security
|
|
202
|
+
- **Mitigation**: Minimal permissions, audit logging, secret management
|
|
203
|
+
|
|
204
|
+
## Dependencies
|
|
205
|
+
|
|
206
|
+
- Firebase project with Firestore
|
|
207
|
+
- Service account key
|
|
208
|
+
- Node.js 18+
|
|
209
|
+
- Google Cloud account (for Cloud Run)
|
|
210
|
+
|
|
211
|
+
## Next Milestone
|
|
212
|
+
|
|
213
|
+
[Milestone 3: agentbase.me Integration](milestone-3-agentbase-integration.md)
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
**Status**: In Progress (33% complete, 2/6 tasks done)
|
|
218
|
+
**Estimated Effort**: 52 hours total (20 hours completed)
|
|
219
|
+
**Priority**: High
|
|
220
|
+
**Owner**: Development Team
|
|
221
|
+
**Last Updated**: 2026-02-16
|
|
222
|
+
|
|
223
|
+
## Task List
|
|
224
|
+
|
|
225
|
+
- [x] Task 86: Task Data Model and Schemas (8 hours) - Completed
|
|
226
|
+
- [x] Task 87: Task Database Service (12 hours) - Completed
|
|
227
|
+
- [ ] Task 88: Firebase Client Wrapper & MCP Tools Foundation (16 hours)
|
|
228
|
+
- [ ] Task 89: MCP Server Implementation (8 hours)
|
|
229
|
+
- [ ] Task 90: Build Configuration (4 hours)
|
|
230
|
+
- [ ] Task 91: Deployment Configuration (4 hours)
|
|
231
|
+
|
|
232
|
+
**Total**: 52 hours estimated, 20 hours completed
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Milestone 4: ACP Workflow Tools
|
|
2
|
+
|
|
3
|
+
**Goal**: Implement advanced ACP workflow tools in task-mcp server
|
|
4
|
+
**Duration**: 2 weeks
|
|
5
|
+
**Dependencies**: Milestone 3 (agentbase.me Integration)
|
|
6
|
+
**Status**: Not Started
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
This milestone adds 5 advanced ACP workflow tools to the task-mcp server. These tools enable agents to initialize task context, get detailed status, synchronize documentation, generate reports, and validate task structure.
|
|
13
|
+
|
|
14
|
+
## Deliverables
|
|
15
|
+
|
|
16
|
+
1. **task_init Tool**
|
|
17
|
+
- Load all task documentation from Firestore
|
|
18
|
+
- Review completed work
|
|
19
|
+
- Identify current position
|
|
20
|
+
- Prepare for execution
|
|
21
|
+
- Return initialization summary
|
|
22
|
+
|
|
23
|
+
2. **task_get_detailed_status Tool**
|
|
24
|
+
- Comprehensive status check
|
|
25
|
+
- Include all milestones and tasks
|
|
26
|
+
- Recent work history
|
|
27
|
+
- Next steps identification
|
|
28
|
+
- Blocker detection
|
|
29
|
+
|
|
30
|
+
3. **task_sync Tool**
|
|
31
|
+
- Compare documented state with actual state
|
|
32
|
+
- Identify documentation drift
|
|
33
|
+
- Update documentation to match reality
|
|
34
|
+
- Log all changes
|
|
35
|
+
- Return sync report
|
|
36
|
+
|
|
37
|
+
4. **task_generate_report Tool**
|
|
38
|
+
- Generate markdown or JSON report
|
|
39
|
+
- Include progress charts
|
|
40
|
+
- List accomplishments
|
|
41
|
+
- Identify next steps
|
|
42
|
+
- Suitable for sharing
|
|
43
|
+
|
|
44
|
+
5. **task_validate Tool**
|
|
45
|
+
- Validate task schema
|
|
46
|
+
- Check milestone/task references
|
|
47
|
+
- Verify progress calculations
|
|
48
|
+
- Identify missing fields
|
|
49
|
+
- Suggest improvements
|
|
50
|
+
|
|
51
|
+
6. **Tool Testing**
|
|
52
|
+
- Unit tests for each workflow tool
|
|
53
|
+
- E2E tests with real scenarios
|
|
54
|
+
- Integration tests with agent
|
|
55
|
+
- Performance tests
|
|
56
|
+
|
|
57
|
+
7. **Documentation**
|
|
58
|
+
- Tool usage examples
|
|
59
|
+
- Best practices guide
|
|
60
|
+
- Troubleshooting guide
|
|
61
|
+
- API reference
|
|
62
|
+
|
|
63
|
+
## Success Criteria
|
|
64
|
+
|
|
65
|
+
- [ ] All 5 workflow tools implemented
|
|
66
|
+
- [ ] Tools follow bootstrap pattern
|
|
67
|
+
- [ ] Agent can use workflow tools
|
|
68
|
+
- [ ] task_init prepares context correctly
|
|
69
|
+
- [ ] task_sync detects drift accurately
|
|
70
|
+
- [ ] task_generate_report creates valid reports
|
|
71
|
+
- [ ] task_validate catches errors
|
|
72
|
+
- [ ] Unit tests pass (>80% coverage)
|
|
73
|
+
- [ ] E2E tests pass
|
|
74
|
+
- [ ] Documentation complete
|
|
75
|
+
|
|
76
|
+
## Key Files to Create
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
task-mcp/
|
|
80
|
+
|
|
81
|
+
src/tools/
|
|
82
|
+
├── task-init.ts
|
|
83
|
+
├── task-get-detailed-status.ts
|
|
84
|
+
├── task-sync.ts
|
|
85
|
+
├── task-generate-report.ts
|
|
86
|
+
└── task-validate.ts
|
|
87
|
+
|
|
88
|
+
src/tools/__tests__/
|
|
89
|
+
├── task-init.spec.ts
|
|
90
|
+
├── task-init.e2e.ts
|
|
91
|
+
├── task-get-detailed-status.spec.ts
|
|
92
|
+
├── task-sync.spec.ts
|
|
93
|
+
├── task-generate-report.spec.ts
|
|
94
|
+
└── task-validate.spec.ts
|
|
95
|
+
|
|
96
|
+
src/utils/
|
|
97
|
+
├── report-generator.ts # Report formatting
|
|
98
|
+
├── validation-rules.ts # Validation logic
|
|
99
|
+
└── drift-detector.ts # Drift detection
|
|
100
|
+
|
|
101
|
+
docs/
|
|
102
|
+
├── workflow-tools.md # Tool documentation
|
|
103
|
+
├── examples.md # Usage examples
|
|
104
|
+
└── troubleshooting.md # Common issues
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Tool Implementation Examples
|
|
108
|
+
|
|
109
|
+
### task_init Tool
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
// src/tools/task-init.ts
|
|
113
|
+
export const taskInitTool = {
|
|
114
|
+
name: 'task_init',
|
|
115
|
+
description: 'Initialize task context by loading all documentation and reviewing state',
|
|
116
|
+
inputSchema: {
|
|
117
|
+
type: 'object',
|
|
118
|
+
properties: {
|
|
119
|
+
task_id: {
|
|
120
|
+
type: 'string',
|
|
121
|
+
description: 'Task ID to initialize'
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
required: ['task_id']
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export async function handleTaskInit(
|
|
129
|
+
client: FirebaseClient,
|
|
130
|
+
args: { task_id: string }
|
|
131
|
+
): Promise<string> {
|
|
132
|
+
const task = await client.getTask(args.task_id)
|
|
133
|
+
if (!task) throw new Error('Task not found')
|
|
134
|
+
|
|
135
|
+
// Load all milestones and tasks
|
|
136
|
+
const milestones = task.progress.milestones
|
|
137
|
+
const tasks = task.progress.tasks
|
|
138
|
+
|
|
139
|
+
// Identify current position
|
|
140
|
+
const currentMilestone = milestones.find(m => m.id === task.progress.current_milestone)
|
|
141
|
+
const currentTask = tasks[task.progress.current_milestone]?.find(
|
|
142
|
+
t => t.id === task.progress.current_task
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
// Prepare next steps
|
|
146
|
+
const nextSteps = determineNextSteps(task, currentMilestone, currentTask)
|
|
147
|
+
|
|
148
|
+
return JSON.stringify({
|
|
149
|
+
status: 'initialized',
|
|
150
|
+
milestones_loaded: milestones.length,
|
|
151
|
+
tasks_loaded: Object.values(tasks).flat().length,
|
|
152
|
+
current_milestone: currentMilestone?.name,
|
|
153
|
+
current_task: currentTask?.name,
|
|
154
|
+
next_steps: nextSteps
|
|
155
|
+
}, null, 2)
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### task_generate_report Tool
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
// src/tools/task-generate-report.ts
|
|
163
|
+
export const taskGenerateReportTool = {
|
|
164
|
+
name: 'task_generate_report',
|
|
165
|
+
description: 'Generate comprehensive status report in markdown or JSON format',
|
|
166
|
+
inputSchema: {
|
|
167
|
+
type: 'object',
|
|
168
|
+
properties: {
|
|
169
|
+
task_id: { type: 'string' },
|
|
170
|
+
format: {
|
|
171
|
+
type: 'string',
|
|
172
|
+
enum: ['markdown', 'json'],
|
|
173
|
+
default: 'markdown'
|
|
174
|
+
},
|
|
175
|
+
include_details: {
|
|
176
|
+
type: 'boolean',
|
|
177
|
+
default: true
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
required: ['task_id']
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export async function handleTaskGenerateReport(
|
|
185
|
+
client: FirebaseClient,
|
|
186
|
+
args: { task_id: string; format?: string; include_details?: boolean }
|
|
187
|
+
): Promise<string> {
|
|
188
|
+
const task = await client.getTask(args.task_id)
|
|
189
|
+
if (!task) throw new Error('Task not found')
|
|
190
|
+
|
|
191
|
+
const format = args.format || 'markdown'
|
|
192
|
+
const includeDetails = args.include_details ?? true
|
|
193
|
+
|
|
194
|
+
if (format === 'markdown') {
|
|
195
|
+
return generateMarkdownReport(task, includeDetails)
|
|
196
|
+
} else {
|
|
197
|
+
return JSON.stringify(generateJSONReport(task, includeDetails), null, 2)
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Technical Decisions
|
|
203
|
+
|
|
204
|
+
1. **Report Format**: Support both markdown and JSON
|
|
205
|
+
2. **Drift Detection**: Compare Firestore state with expected state
|
|
206
|
+
3. **Validation Rules**: Extensible rule system
|
|
207
|
+
4. **Performance**: Cache frequently accessed data
|
|
208
|
+
|
|
209
|
+
## Risks and Mitigation
|
|
210
|
+
|
|
211
|
+
**Risk**: Complex validation logic
|
|
212
|
+
- **Mitigation**: Start with simple rules, add complexity incrementally
|
|
213
|
+
|
|
214
|
+
**Risk**: Report generation performance
|
|
215
|
+
- **Mitigation**: Lazy loading, pagination for large tasks
|
|
216
|
+
|
|
217
|
+
**Risk**: Drift detection accuracy
|
|
218
|
+
- **Mitigation**: Comprehensive test cases, manual verification
|
|
219
|
+
|
|
220
|
+
## Dependencies
|
|
221
|
+
|
|
222
|
+
- Milestone 3 (agentbase.me Integration)
|
|
223
|
+
- Core task tools working
|
|
224
|
+
- Agent can call MCP tools
|
|
225
|
+
|
|
226
|
+
## Next Milestone
|
|
227
|
+
|
|
228
|
+
[Milestone 5: Autonomous Execution & UI Polish](milestone-5-autonomous-execution-ui.md)
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
**Status**: Not Started
|
|
233
|
+
**Estimated Effort**: 80 hours
|
|
234
|
+
**Priority**: Medium
|
|
235
|
+
**Owner**: Development Team
|
|
File without changes
|