@prmichaelsen/reddit-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.
- package/.claude/settings.local.json +23 -0
- package/.env.example +13 -0
- package/AGENT.md +1772 -0
- package/README.md +54 -0
- package/agent/commands/acp.clarification-capture.md +386 -0
- package/agent/commands/acp.clarification-create.md +432 -0
- package/agent/commands/acp.clarifications-research.md +326 -0
- package/agent/commands/acp.command-create.md +432 -0
- package/agent/commands/acp.design-create.md +286 -0
- package/agent/commands/acp.design-reference.md +355 -0
- package/agent/commands/acp.index.md +423 -0
- package/agent/commands/acp.init.md +546 -0
- package/agent/commands/acp.package-create.md +895 -0
- package/agent/commands/acp.package-info.md +212 -0
- package/agent/commands/acp.package-install.md +539 -0
- package/agent/commands/acp.package-list.md +280 -0
- package/agent/commands/acp.package-publish.md +541 -0
- package/agent/commands/acp.package-remove.md +293 -0
- package/agent/commands/acp.package-search.md +307 -0
- package/agent/commands/acp.package-update.md +361 -0
- package/agent/commands/acp.package-validate.md +540 -0
- package/agent/commands/acp.pattern-create.md +386 -0
- package/agent/commands/acp.plan.md +577 -0
- package/agent/commands/acp.proceed.md +882 -0
- package/agent/commands/acp.project-create.md +675 -0
- package/agent/commands/acp.project-info.md +312 -0
- package/agent/commands/acp.project-list.md +226 -0
- package/agent/commands/acp.project-remove.md +379 -0
- package/agent/commands/acp.project-set.md +227 -0
- package/agent/commands/acp.project-update.md +307 -0
- package/agent/commands/acp.projects-restore.md +228 -0
- package/agent/commands/acp.projects-sync.md +347 -0
- package/agent/commands/acp.report.md +407 -0
- package/agent/commands/acp.resume.md +239 -0
- package/agent/commands/acp.sessions.md +301 -0
- package/agent/commands/acp.status.md +293 -0
- package/agent/commands/acp.sync.md +364 -0
- package/agent/commands/acp.task-create.md +500 -0
- package/agent/commands/acp.update.md +302 -0
- package/agent/commands/acp.validate.md +466 -0
- package/agent/commands/acp.version-check-for-updates.md +276 -0
- package/agent/commands/acp.version-check.md +191 -0
- package/agent/commands/acp.version-update.md +289 -0
- package/agent/commands/command.template.md +339 -0
- package/agent/commands/git.commit.md +526 -0
- package/agent/commands/git.init.md +514 -0
- package/agent/design/.gitkeep +0 -0
- package/agent/design/design.template.md +154 -0
- package/agent/design/requirements.md +332 -0
- package/agent/design/requirements.template.md +387 -0
- package/agent/index/.gitkeep +0 -0
- package/agent/index/local.main.template.yaml +37 -0
- package/agent/manifest.template.yaml +13 -0
- package/agent/manifest.yaml +61 -0
- package/agent/milestones/.gitkeep +0 -0
- package/agent/milestones/milestone-1-foundation-listings-mvp.md +140 -0
- package/agent/milestones/milestone-1-{title}.template.md +206 -0
- package/agent/milestones/milestone-2-content-interaction.md +56 -0
- package/agent/milestones/milestone-3-users-and-messaging.md +54 -0
- package/agent/milestones/milestone-4-subreddits-and-flair.md +56 -0
- package/agent/milestones/milestone-5-moderation.md +53 -0
- package/agent/milestones/milestone-6-advanced-features-and-polish.md +56 -0
- package/agent/package.template.yaml +86 -0
- package/agent/patterns/.gitkeep +0 -0
- package/agent/patterns/bootstrap.template.md +1237 -0
- package/agent/patterns/pattern.template.md +382 -0
- package/agent/progress.template.yaml +161 -0
- package/agent/progress.yaml +223 -0
- package/agent/schemas/package.schema.yaml +276 -0
- package/agent/scripts/acp.common.sh +1781 -0
- package/agent/scripts/acp.yaml-parser.sh +985 -0
- package/agent/tasks/.gitkeep +0 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-1-project-scaffolding.md +75 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-2-reddit-oauth.md +71 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-3-reddit-api-client.md +71 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-4-listing-tools.md +65 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-5-search-tools.md +43 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-6-testing-verification.md +49 -0
- package/agent/tasks/milestone-2-content-interaction/task-7-post-tools.md +56 -0
- package/agent/tasks/milestone-2-content-interaction/task-8-comment-tools.md +49 -0
- package/agent/tasks/milestone-2-content-interaction/task-9-vote-save-report-tools.md +50 -0
- package/agent/tasks/milestone-3-users-and-messaging/task-10-account-tools.md +44 -0
- package/agent/tasks/milestone-3-users-and-messaging/task-11-user-profile-tools.md +50 -0
- package/agent/tasks/milestone-3-users-and-messaging/task-12-private-message-tools.md +50 -0
- package/agent/tasks/milestone-4-subreddits-and-flair/task-13-subreddit-tools.md +47 -0
- package/agent/tasks/milestone-4-subreddits-and-flair/task-14-flair-tools.md +46 -0
- package/agent/tasks/milestone-4-subreddits-and-flair/task-15-http-transport.md +53 -0
- package/agent/tasks/milestone-5-moderation/task-16-mod-action-tools.md +48 -0
- package/agent/tasks/milestone-5-moderation/task-17-mod-listing-tools.md +47 -0
- package/agent/tasks/milestone-5-moderation/task-18-mod-management-tools.md +42 -0
- package/agent/tasks/milestone-6-advanced-features-and-polish/task-19-multireddit-tools.md +49 -0
- package/agent/tasks/milestone-6-advanced-features-and-polish/task-20-wiki-tools.md +47 -0
- package/agent/tasks/milestone-6-advanced-features-and-polish/task-21-documentation-polish.md +65 -0
- package/agent/tasks/task-1-{title}.template.md +244 -0
- package/dist/auth/oauth.d.ts +15 -0
- package/dist/auth/oauth.d.ts.map +1 -0
- package/dist/client/reddit.d.ts +28 -0
- package/dist/client/reddit.d.ts.map +1 -0
- package/dist/factory.d.ts +2 -0
- package/dist/factory.d.ts.map +1 -0
- package/dist/factory.js +30394 -0
- package/dist/factory.js.map +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31955 -0
- package/dist/index.js.map +7 -0
- package/dist/server.d.ts +5 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +30401 -0
- package/dist/server.js.map +7 -0
- package/dist/tools/listings.d.ts +4 -0
- package/dist/tools/listings.d.ts.map +1 -0
- package/dist/tools/search.d.ts +4 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/transport/http.d.ts +7 -0
- package/dist/transport/http.d.ts.map +1 -0
- package/dist/types/index.d.ts +78 -0
- package/dist/types/index.d.ts.map +1 -0
- package/esbuild.build.js +21 -0
- package/jest.config.js +18 -0
- package/package.json +46 -0
- package/src/auth/oauth.ts +200 -0
- package/src/client/reddit.ts +245 -0
- package/src/factory.ts +5 -0
- package/src/index.ts +31 -0
- package/src/server.ts +36 -0
- package/src/tools/listings.ts +202 -0
- package/src/tools/search.ts +85 -0
- package/src/transport/http.ts +49 -0
- package/src/types/index.ts +83 -0
- package/tests/fixtures/reddit-responses.ts +132 -0
- package/tests/helpers/mock-client.ts +36 -0
- package/tests/unit/auth.test.ts +89 -0
- package/tests/unit/client.test.ts +218 -0
- package/tests/unit/listings.test.ts +113 -0
- package/tests/unit/search.test.ts +59 -0
- package/tests/unit/server.test.ts +14 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
# Project Requirements
|
|
2
|
+
|
|
3
|
+
**Project Name**: [Your Project Name]
|
|
4
|
+
**Created**: YYYY-MM-DD
|
|
5
|
+
**Status**: Draft | Active | Implemented
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
[Provide a high-level description of what this project is and what it aims to accomplish. This should be a clear, concise summary that anyone can understand.]
|
|
12
|
+
|
|
13
|
+
**Example**: "A multi-tenant memory system that enables AI agents to store, retrieve, and manage contextual information across sessions with vector search capabilities and relationship tracking."
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Problem Statement
|
|
18
|
+
|
|
19
|
+
[Describe the problem this project solves. What pain points or needs does it address?]
|
|
20
|
+
|
|
21
|
+
**Example**: "AI agents currently have no persistent memory between sessions, leading to loss of context and requiring users to repeatedly provide the same information."
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Goals and Objectives
|
|
26
|
+
|
|
27
|
+
[List the primary goals this project aims to achieve. Be specific and measurable where possible.]
|
|
28
|
+
|
|
29
|
+
### Primary Goals
|
|
30
|
+
1. Goal 1: [Description]
|
|
31
|
+
2. Goal 2: [Description]
|
|
32
|
+
3. Goal 3: [Description]
|
|
33
|
+
|
|
34
|
+
### Secondary Goals
|
|
35
|
+
1. Goal 1: [Description]
|
|
36
|
+
2. Goal 2: [Description]
|
|
37
|
+
|
|
38
|
+
**Example**:
|
|
39
|
+
|
|
40
|
+
### Primary Goals
|
|
41
|
+
1. Enable persistent memory storage across agent sessions
|
|
42
|
+
2. Provide fast vector-based semantic search
|
|
43
|
+
3. Support multi-tenant isolation for data security
|
|
44
|
+
|
|
45
|
+
### Secondary Goals
|
|
46
|
+
1. Implement relationship tracking between memories
|
|
47
|
+
2. Add trust-based access control
|
|
48
|
+
3. Support template-based memory creation
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Functional Requirements
|
|
53
|
+
|
|
54
|
+
[List what the system must do. These are the features and capabilities.]
|
|
55
|
+
|
|
56
|
+
### Core Features
|
|
57
|
+
1. **Feature 1**: [Description of what it does]
|
|
58
|
+
2. **Feature 2**: [Description of what it does]
|
|
59
|
+
3. **Feature 3**: [Description of what it does]
|
|
60
|
+
|
|
61
|
+
### Additional Features
|
|
62
|
+
1. **Feature 1**: [Description]
|
|
63
|
+
2. **Feature 2**: [Description]
|
|
64
|
+
|
|
65
|
+
**Example**:
|
|
66
|
+
|
|
67
|
+
### Core Features
|
|
68
|
+
1. **Memory Storage**: Store structured memories with metadata (title, content, tags, timestamps)
|
|
69
|
+
2. **Vector Search**: Find semantically similar memories using vector embeddings
|
|
70
|
+
3. **Multi-Tenancy**: Isolate user data with per-user access control
|
|
71
|
+
|
|
72
|
+
### Additional Features
|
|
73
|
+
1. **Relationship Graph**: Track connections between related memories
|
|
74
|
+
2. **Template System**: Pre-defined memory structures for common use cases
|
|
75
|
+
3. **Trust Levels**: Control memory visibility based on trust scores
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Non-Functional Requirements
|
|
80
|
+
|
|
81
|
+
[Describe quality attributes and constraints.]
|
|
82
|
+
|
|
83
|
+
### Performance
|
|
84
|
+
- Requirement 1: [Specific metric]
|
|
85
|
+
- Requirement 2: [Specific metric]
|
|
86
|
+
|
|
87
|
+
### Security
|
|
88
|
+
- Requirement 1: [Security requirement]
|
|
89
|
+
- Requirement 2: [Security requirement]
|
|
90
|
+
|
|
91
|
+
### Scalability
|
|
92
|
+
- Requirement 1: [Scalability requirement]
|
|
93
|
+
- Requirement 2: [Scalability requirement]
|
|
94
|
+
|
|
95
|
+
### Reliability
|
|
96
|
+
- Requirement 1: [Reliability requirement]
|
|
97
|
+
- Requirement 2: [Reliability requirement]
|
|
98
|
+
|
|
99
|
+
**Example**:
|
|
100
|
+
|
|
101
|
+
### Performance
|
|
102
|
+
- Search queries return results in < 200ms for 95th percentile
|
|
103
|
+
- Support 1000+ concurrent users
|
|
104
|
+
|
|
105
|
+
### Security
|
|
106
|
+
- Complete data isolation between tenants
|
|
107
|
+
- All API endpoints require authentication
|
|
108
|
+
- Sensitive data encrypted at rest
|
|
109
|
+
|
|
110
|
+
### Scalability
|
|
111
|
+
- Horizontal scaling for increased load
|
|
112
|
+
- Support millions of memories per tenant
|
|
113
|
+
|
|
114
|
+
### Reliability
|
|
115
|
+
- 99.9% uptime SLA
|
|
116
|
+
- Automatic backups every 24 hours
|
|
117
|
+
- Graceful degradation under load
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Technical Requirements
|
|
122
|
+
|
|
123
|
+
[Specify technical constraints and requirements.]
|
|
124
|
+
|
|
125
|
+
### Technology Stack
|
|
126
|
+
- **Language**: [Programming language and version]
|
|
127
|
+
- **Framework**: [Framework and version]
|
|
128
|
+
- **Database**: [Database technology]
|
|
129
|
+
- **Infrastructure**: [Hosting/deployment platform]
|
|
130
|
+
|
|
131
|
+
### Dependencies
|
|
132
|
+
- Dependency 1: [Purpose]
|
|
133
|
+
- Dependency 2: [Purpose]
|
|
134
|
+
- Dependency 3: [Purpose]
|
|
135
|
+
|
|
136
|
+
### Integrations
|
|
137
|
+
- Integration 1: [What it integrates with and why]
|
|
138
|
+
- Integration 2: [What it integrates with and why]
|
|
139
|
+
|
|
140
|
+
**Example**:
|
|
141
|
+
|
|
142
|
+
### Technology Stack
|
|
143
|
+
- **Language**: TypeScript 5.x
|
|
144
|
+
- **Runtime**: Node.js 20+
|
|
145
|
+
- **Protocol**: Model Context Protocol (MCP)
|
|
146
|
+
- **Vector DB**: Weaviate
|
|
147
|
+
- **Document DB**: Firestore
|
|
148
|
+
- **Authentication**: Firebase Auth
|
|
149
|
+
|
|
150
|
+
### Dependencies
|
|
151
|
+
- @modelcontextprotocol/sdk: MCP protocol implementation
|
|
152
|
+
- weaviate-client: Vector database client
|
|
153
|
+
- firebase-admin: Firestore and auth
|
|
154
|
+
|
|
155
|
+
### Integrations
|
|
156
|
+
- OpenAI API: Generate vector embeddings
|
|
157
|
+
- Firebase Auth: User authentication and authorization
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## User Stories
|
|
162
|
+
|
|
163
|
+
[Describe functionality from the user's perspective.]
|
|
164
|
+
|
|
165
|
+
### As a [User Type]
|
|
166
|
+
1. I want to [action] so that [benefit]
|
|
167
|
+
2. I want to [action] so that [benefit]
|
|
168
|
+
3. I want to [action] so that [benefit]
|
|
169
|
+
|
|
170
|
+
**Example**:
|
|
171
|
+
|
|
172
|
+
### As an AI Agent
|
|
173
|
+
1. I want to store memories about user preferences so that I can personalize responses
|
|
174
|
+
2. I want to search for relevant memories so that I can provide contextual answers
|
|
175
|
+
3. I want to create relationships between memories so that I can understand connections
|
|
176
|
+
|
|
177
|
+
### As a User
|
|
178
|
+
1. I want my data isolated from other users so that my privacy is protected
|
|
179
|
+
2. I want to control which memories are shared so that I maintain control over my data
|
|
180
|
+
3. I want to export my memories so that I can back them up
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Constraints
|
|
185
|
+
|
|
186
|
+
[List any limitations or constraints on the project.]
|
|
187
|
+
|
|
188
|
+
### Technical Constraints
|
|
189
|
+
- Constraint 1: [Description and impact]
|
|
190
|
+
- Constraint 2: [Description and impact]
|
|
191
|
+
|
|
192
|
+
### Business Constraints
|
|
193
|
+
- Constraint 1: [Description and impact]
|
|
194
|
+
- Constraint 2: [Description and impact]
|
|
195
|
+
|
|
196
|
+
### Resource Constraints
|
|
197
|
+
- Constraint 1: [Description and impact]
|
|
198
|
+
- Constraint 2: [Description and impact]
|
|
199
|
+
|
|
200
|
+
**Example**:
|
|
201
|
+
|
|
202
|
+
### Technical Constraints
|
|
203
|
+
- Must use existing Firebase infrastructure
|
|
204
|
+
- Vector embeddings limited to OpenAI models
|
|
205
|
+
- MCP protocol requires stdio or SSE transport
|
|
206
|
+
|
|
207
|
+
### Business Constraints
|
|
208
|
+
- Must launch MVP within 3 months
|
|
209
|
+
- Free tier must support 1000 memories per user
|
|
210
|
+
- Must comply with GDPR and data privacy regulations
|
|
211
|
+
|
|
212
|
+
### Resource Constraints
|
|
213
|
+
- Single developer for initial implementation
|
|
214
|
+
- Limited budget for cloud infrastructure
|
|
215
|
+
- No dedicated QA team
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Success Criteria
|
|
220
|
+
|
|
221
|
+
[Define what success looks like. How will you know the project is complete and successful?]
|
|
222
|
+
|
|
223
|
+
### MVP Success Criteria
|
|
224
|
+
- [ ] Criterion 1: [Measurable condition]
|
|
225
|
+
- [ ] Criterion 2: [Measurable condition]
|
|
226
|
+
- [ ] Criterion 3: [Measurable condition]
|
|
227
|
+
|
|
228
|
+
### Full Release Success Criteria
|
|
229
|
+
- [ ] Criterion 1: [Measurable condition]
|
|
230
|
+
- [ ] Criterion 2: [Measurable condition]
|
|
231
|
+
- [ ] Criterion 3: [Measurable condition]
|
|
232
|
+
|
|
233
|
+
**Example**:
|
|
234
|
+
|
|
235
|
+
### MVP Success Criteria
|
|
236
|
+
- [ ] Users can create, read, update, and delete memories
|
|
237
|
+
- [ ] Vector search returns relevant results
|
|
238
|
+
- [ ] Multi-tenant isolation verified through security testing
|
|
239
|
+
- [ ] Basic documentation complete
|
|
240
|
+
|
|
241
|
+
### Full Release Success Criteria
|
|
242
|
+
- [ ] All core and additional features implemented
|
|
243
|
+
- [ ] Performance meets specified metrics
|
|
244
|
+
- [ ] Security audit passed
|
|
245
|
+
- [ ] 100 active users with positive feedback
|
|
246
|
+
- [ ] Comprehensive documentation and examples
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Out of Scope
|
|
251
|
+
|
|
252
|
+
[Explicitly list what is NOT included in this project to manage expectations.]
|
|
253
|
+
|
|
254
|
+
1. Feature/capability 1: [Why it's out of scope]
|
|
255
|
+
2. Feature/capability 2: [Why it's out of scope]
|
|
256
|
+
3. Feature/capability 3: [Why it's out of scope]
|
|
257
|
+
|
|
258
|
+
**Example**:
|
|
259
|
+
|
|
260
|
+
1. **Mobile app**: Focus is on MCP server, not end-user applications
|
|
261
|
+
2. **Real-time collaboration**: Single-user focus for MVP
|
|
262
|
+
3. **Advanced analytics**: Basic usage stats only, no complex analytics
|
|
263
|
+
4. **Custom embedding models**: OpenAI only for MVP
|
|
264
|
+
5. **On-premise deployment**: Cloud-only for initial release
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Assumptions
|
|
269
|
+
|
|
270
|
+
[List assumptions being made about the project.]
|
|
271
|
+
|
|
272
|
+
1. Assumption 1: [Description]
|
|
273
|
+
2. Assumption 2: [Description]
|
|
274
|
+
3. Assumption 3: [Description]
|
|
275
|
+
|
|
276
|
+
**Example**:
|
|
277
|
+
|
|
278
|
+
1. Users have stable internet connectivity
|
|
279
|
+
2. OpenAI API will remain available and affordable
|
|
280
|
+
3. Firebase infrastructure will scale to meet demand
|
|
281
|
+
4. MCP protocol will remain stable (no breaking changes)
|
|
282
|
+
5. Users understand basic AI agent concepts
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Risks
|
|
287
|
+
|
|
288
|
+
[Identify potential risks and mitigation strategies.]
|
|
289
|
+
|
|
290
|
+
| Risk | Impact | Probability | Mitigation Strategy |
|
|
291
|
+
|------|--------|-------------|---------------------|
|
|
292
|
+
| [Risk 1] | High/Medium/Low | High/Medium/Low | [How to mitigate] |
|
|
293
|
+
| [Risk 2] | High/Medium/Low | High/Medium/Low | [How to mitigate] |
|
|
294
|
+
| [Risk 3] | High/Medium/Low | High/Medium/Low | [How to mitigate] |
|
|
295
|
+
|
|
296
|
+
**Example**:
|
|
297
|
+
|
|
298
|
+
| Risk | Impact | Probability | Mitigation Strategy |
|
|
299
|
+
|------|--------|-------------|---------------------|
|
|
300
|
+
| OpenAI API cost escalation | High | Medium | Implement caching, batch processing, consider alternative providers |
|
|
301
|
+
| Security vulnerability | High | Low | Regular security audits, follow best practices, bug bounty program |
|
|
302
|
+
| Performance degradation at scale | Medium | Medium | Load testing, performance monitoring, optimization plan |
|
|
303
|
+
| MCP protocol changes | Medium | Low | Stay updated with MCP community, version pinning |
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## Timeline
|
|
308
|
+
|
|
309
|
+
[Provide a high-level timeline for the project.]
|
|
310
|
+
|
|
311
|
+
### Phase 1: [Phase Name] (Duration)
|
|
312
|
+
- Milestone 1
|
|
313
|
+
- Milestone 2
|
|
314
|
+
|
|
315
|
+
### Phase 2: [Phase Name] (Duration)
|
|
316
|
+
- Milestone 3
|
|
317
|
+
- Milestone 4
|
|
318
|
+
|
|
319
|
+
### Phase 3: [Phase Name] (Duration)
|
|
320
|
+
- Milestone 5
|
|
321
|
+
- Milestone 6
|
|
322
|
+
|
|
323
|
+
**Example**:
|
|
324
|
+
|
|
325
|
+
### Phase 1: Foundation (Weeks 1-2)
|
|
326
|
+
- Project setup and infrastructure
|
|
327
|
+
- Basic MCP server implementation
|
|
328
|
+
- Database connections
|
|
329
|
+
|
|
330
|
+
### Phase 2: Core Features (Weeks 3-6)
|
|
331
|
+
- Memory CRUD operations
|
|
332
|
+
- Vector search implementation
|
|
333
|
+
- Multi-tenant isolation
|
|
334
|
+
|
|
335
|
+
### Phase 3: Advanced Features (Weeks 7-10)
|
|
336
|
+
- Relationship tracking
|
|
337
|
+
- Template system
|
|
338
|
+
- Trust-based access control
|
|
339
|
+
|
|
340
|
+
### Phase 4: Polish & Launch (Weeks 11-12)
|
|
341
|
+
- Testing and bug fixes
|
|
342
|
+
- Documentation
|
|
343
|
+
- Deployment and monitoring
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Stakeholders
|
|
348
|
+
|
|
349
|
+
[Identify who is involved in or affected by this project.]
|
|
350
|
+
|
|
351
|
+
| Role | Name/Team | Responsibilities |
|
|
352
|
+
|------|-----------|------------------|
|
|
353
|
+
| [Role 1] | [Name] | [What they do] |
|
|
354
|
+
| [Role 2] | [Name] | [What they do] |
|
|
355
|
+
| [Role 3] | [Name] | [What they do] |
|
|
356
|
+
|
|
357
|
+
**Example**:
|
|
358
|
+
|
|
359
|
+
| Role | Name/Team | Responsibilities |
|
|
360
|
+
|------|-----------|------------------|
|
|
361
|
+
| Product Owner | [Name] | Define requirements, prioritize features |
|
|
362
|
+
| Lead Developer | [Name] | Architecture, implementation, code review |
|
|
363
|
+
| DevOps | [Name] | Infrastructure, deployment, monitoring |
|
|
364
|
+
| Users | AI Agent Developers | Provide feedback, report issues |
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## References
|
|
369
|
+
|
|
370
|
+
[Link to related documents, research, or resources.]
|
|
371
|
+
|
|
372
|
+
- [Document/Resource 1](URL): Description
|
|
373
|
+
- [Document/Resource 2](URL): Description
|
|
374
|
+
- [Document/Resource 3](URL): Description
|
|
375
|
+
|
|
376
|
+
**Example**:
|
|
377
|
+
|
|
378
|
+
- [Model Context Protocol Specification](https://modelcontextprotocol.io): MCP protocol documentation
|
|
379
|
+
- [Weaviate Documentation](https://weaviate.io/developers/weaviate): Vector database docs
|
|
380
|
+
- [Firebase Documentation](https://firebase.google.com/docs): Firebase platform docs
|
|
381
|
+
- [Similar Project Analysis](URL): Research on existing solutions
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
**Status**: [Current status of requirements]
|
|
386
|
+
**Last Updated**: [YYYY-MM-DD]
|
|
387
|
+
**Next Review**: [YYYY-MM-DD]
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# agent/index/local.main.yaml
|
|
2
|
+
# Key file index for project-local files
|
|
3
|
+
# See: agent/design/local.key-file-index-system.md
|
|
4
|
+
#
|
|
5
|
+
# Naming convention: {namespace}.{qualifier}.yaml
|
|
6
|
+
# - namespace: "local" for project files, package name for packages
|
|
7
|
+
# - qualifier: "main" is the default, can use others for categorization
|
|
8
|
+
#
|
|
9
|
+
# Schema:
|
|
10
|
+
# path (string, required) - Explicit file path, no globs
|
|
11
|
+
# weight (float, required) - 0.0 to 1.0 importance (1.0 = always read)
|
|
12
|
+
# kind (enum, required) - pattern, command, design, requirements
|
|
13
|
+
# description (string, required) - What the file contains and why it matters
|
|
14
|
+
# rationale (string, required) - Why this file is in the index
|
|
15
|
+
# applies (string, required) - Comma-separated fully qualified command names
|
|
16
|
+
#
|
|
17
|
+
# Recommended limits:
|
|
18
|
+
# - Per-namespace: 5-10 entries maximum
|
|
19
|
+
# - Total across namespaces: 15-20 entries maximum
|
|
20
|
+
# - High-weight files (>= 0.8): 3-5 per namespace
|
|
21
|
+
#
|
|
22
|
+
# Implicit key files (NOT listed here):
|
|
23
|
+
# - AGENT.md (always read by @acp.init)
|
|
24
|
+
# - agent/progress.yaml (always read by @acp.init)
|
|
25
|
+
|
|
26
|
+
local:
|
|
27
|
+
index:
|
|
28
|
+
- path: agent/design/requirements.md
|
|
29
|
+
weight: 1.0
|
|
30
|
+
kind: requirements
|
|
31
|
+
description: |
|
|
32
|
+
Core project requirements defining goals, constraints,
|
|
33
|
+
and success criteria for the application.
|
|
34
|
+
rationale: |
|
|
35
|
+
Must be read before any design or task creation to ensure
|
|
36
|
+
alignment with project goals.
|
|
37
|
+
applies: acp.init, acp.design-create, acp.task-create, acp.plan, acp.proceed
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# agent/manifest.template.yaml
|
|
2
|
+
# Template for ACP package manifest
|
|
3
|
+
# This file tracks installed ACP packages and their versions
|
|
4
|
+
|
|
5
|
+
# Installed packages
|
|
6
|
+
# Each package entry tracks source, version, and installed files
|
|
7
|
+
packages: {}
|
|
8
|
+
|
|
9
|
+
# Manifest format version (for future compatibility)
|
|
10
|
+
manifest_version: 1.0.0
|
|
11
|
+
|
|
12
|
+
# Last time manifest was updated
|
|
13
|
+
last_updated: null
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# ACP Package Manifest
|
|
2
|
+
# Tracks installed packages and their versions
|
|
3
|
+
|
|
4
|
+
packages:
|
|
5
|
+
acp-core:
|
|
6
|
+
source: https://github.com/prmichaelsen/agent-context-protocol.git
|
|
7
|
+
package_version: 5.15.1
|
|
8
|
+
installed_at: 2026-03-10T17:47:16Z
|
|
9
|
+
updated_at: 2026-03-10T17:47:16Z
|
|
10
|
+
files:
|
|
11
|
+
commands:
|
|
12
|
+
- name: acp.clarification-capture.md
|
|
13
|
+
- name: acp.clarification-create.md
|
|
14
|
+
- name: acp.clarifications-research.md
|
|
15
|
+
- name: acp.command-create.md
|
|
16
|
+
- name: acp.design-create.md
|
|
17
|
+
- name: acp.design-reference.md
|
|
18
|
+
- name: acp.index.md
|
|
19
|
+
- name: acp.init.md
|
|
20
|
+
- name: acp.package-create.md
|
|
21
|
+
- name: acp.package-info.md
|
|
22
|
+
- name: acp.package-install.md
|
|
23
|
+
- name: acp.package-list.md
|
|
24
|
+
- name: acp.package-publish.md
|
|
25
|
+
- name: acp.package-remove.md
|
|
26
|
+
- name: acp.package-search.md
|
|
27
|
+
- name: acp.package-update.md
|
|
28
|
+
- name: acp.package-validate.md
|
|
29
|
+
- name: acp.pattern-create.md
|
|
30
|
+
- name: acp.plan.md
|
|
31
|
+
- name: acp.proceed.md
|
|
32
|
+
- name: acp.project-create.md
|
|
33
|
+
- name: acp.project-info.md
|
|
34
|
+
- name: acp.project-list.md
|
|
35
|
+
- name: acp.project-remove.md
|
|
36
|
+
- name: acp.project-set.md
|
|
37
|
+
- name: acp.project-update.md
|
|
38
|
+
- name: acp.projects-restore.md
|
|
39
|
+
- name: acp.projects-sync.md
|
|
40
|
+
- name: acp.report.md
|
|
41
|
+
- name: acp.resume.md
|
|
42
|
+
- name: acp.sessions.md
|
|
43
|
+
- name: acp.status.md
|
|
44
|
+
- name: acp.sync.md
|
|
45
|
+
- name: acp.task-create.md
|
|
46
|
+
- name: acp.update.md
|
|
47
|
+
- name: acp.validate.md
|
|
48
|
+
- name: acp.version-check-for-updates.md
|
|
49
|
+
- name: acp.version-check.md
|
|
50
|
+
- name: acp.version-update.md
|
|
51
|
+
- name: git.commit.md
|
|
52
|
+
- name: git.init.md
|
|
53
|
+
patterns:
|
|
54
|
+
- name: bootstrap.template.md
|
|
55
|
+
- name: pattern.template.md
|
|
56
|
+
designs:
|
|
57
|
+
- name: design.template.md
|
|
58
|
+
- name: requirements.template.md
|
|
59
|
+
|
|
60
|
+
manifest_version: 1.0.0
|
|
61
|
+
last_updated: 2026-03-10T17:47:16Z
|
|
File without changes
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Milestone 1: Foundation + Listings MVP
|
|
2
|
+
|
|
3
|
+
**Goal**: Establish project infrastructure and implement core read-only Reddit browsing tools
|
|
4
|
+
**Duration**: 1 week
|
|
5
|
+
**Dependencies**: None
|
|
6
|
+
**Status**: Not Started
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
This milestone creates the foundational project infrastructure — build system, OAuth authentication, Reddit API client wrapper — and implements the core read-only listing and search tools. This is the MVP that proves the MCP server can authenticate with Reddit and return content.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Deliverables
|
|
17
|
+
|
|
18
|
+
### 1. Project Infrastructure
|
|
19
|
+
- package.json with all metadata, scripts, and dependencies
|
|
20
|
+
- TypeScript configuration (tsconfig.json)
|
|
21
|
+
- Build system (esbuild.build.js)
|
|
22
|
+
- Jest test configuration
|
|
23
|
+
- Directory structure: src/, tests/
|
|
24
|
+
|
|
25
|
+
### 2. Reddit OAuth 2.0 Authentication
|
|
26
|
+
- Authorization code flow with PKCE
|
|
27
|
+
- Token storage and automatic refresh
|
|
28
|
+
- Scope-based access control
|
|
29
|
+
- Factory function from environment variables
|
|
30
|
+
|
|
31
|
+
### 3. Reddit API Client
|
|
32
|
+
- HTTP client wrapper using fetch
|
|
33
|
+
- Proper User-Agent header
|
|
34
|
+
- Rate limit header parsing (X-Ratelimit-Remaining/Reset)
|
|
35
|
+
- Error mapping (400, 401, 403, 404, 429, 5xx)
|
|
36
|
+
- Retry with exponential backoff
|
|
37
|
+
|
|
38
|
+
### 4. MCP Server + Listing Tools
|
|
39
|
+
- MCP server factory (createServer / createServerWithToken)
|
|
40
|
+
- 11 listing and search tools
|
|
41
|
+
- stdio transport
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Success Criteria
|
|
46
|
+
|
|
47
|
+
- [ ] `npm run build` completes without errors
|
|
48
|
+
- [ ] `npm run typecheck` passes
|
|
49
|
+
- [ ] `npm test` passes with 70%+ coverage
|
|
50
|
+
- [ ] OAuth flow authenticates with Reddit
|
|
51
|
+
- [ ] `reddit_listings_hot` returns posts from a subreddit
|
|
52
|
+
- [ ] `reddit_search` returns search results
|
|
53
|
+
- [ ] `reddit_comments_thread` returns a post with comments
|
|
54
|
+
- [ ] Server starts via stdio transport
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Key Files to Create
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
reddit-mcp/
|
|
62
|
+
├── package.json
|
|
63
|
+
├── tsconfig.json
|
|
64
|
+
├── esbuild.build.js
|
|
65
|
+
├── jest.config.js
|
|
66
|
+
├── .env.example
|
|
67
|
+
├── src/
|
|
68
|
+
│ ├── index.ts # Transport selector
|
|
69
|
+
│ ├── server.ts # MCP server factory
|
|
70
|
+
│ ├── factory.ts # Public factory export
|
|
71
|
+
│ ├── auth/
|
|
72
|
+
│ │ └── oauth.ts # Reddit OAuth 2.0
|
|
73
|
+
│ ├── client/
|
|
74
|
+
│ │ └── reddit.ts # Reddit API HTTP client
|
|
75
|
+
│ ├── tools/
|
|
76
|
+
│ │ ├── listings.ts # Listing tools (hot, new, top, etc.)
|
|
77
|
+
│ │ └── search.ts # Search tools
|
|
78
|
+
│ ├── transport/
|
|
79
|
+
│ │ └── http.ts # HTTP transport (stubbed)
|
|
80
|
+
│ └── types/
|
|
81
|
+
│ └── index.ts # Shared types
|
|
82
|
+
└── tests/
|
|
83
|
+
├── unit/
|
|
84
|
+
│ ├── auth.test.ts
|
|
85
|
+
│ ├── client.test.ts
|
|
86
|
+
│ ├── server.test.ts
|
|
87
|
+
│ ├── listings.test.ts
|
|
88
|
+
│ └── search.test.ts
|
|
89
|
+
├── fixtures/
|
|
90
|
+
│ └── reddit-responses.ts
|
|
91
|
+
└── helpers/
|
|
92
|
+
└── mock-client.ts
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Tasks
|
|
98
|
+
|
|
99
|
+
1. [Task 1: Project Scaffolding](../tasks/milestone-1-foundation-listings-mvp/task-1-project-scaffolding.md) - Set up project structure, config files, dependencies
|
|
100
|
+
2. [Task 2: Reddit OAuth 2.0](../tasks/milestone-1-foundation-listings-mvp/task-2-reddit-oauth.md) - Implement OAuth authentication flow
|
|
101
|
+
3. [Task 3: Reddit API Client Wrapper](../tasks/milestone-1-foundation-listings-mvp/task-3-reddit-api-client.md) - HTTP client with error handling and retry
|
|
102
|
+
4. [Task 4: Listing Tools](../tasks/milestone-1-foundation-listings-mvp/task-4-listing-tools.md) - Implement browsing and comment thread tools
|
|
103
|
+
5. [Task 5: Search Tools](../tasks/milestone-1-foundation-listings-mvp/task-5-search-tools.md) - Implement search across Reddit and subreddits
|
|
104
|
+
6. [Task 6: Testing & Verification](../tasks/milestone-1-foundation-listings-mvp/task-6-testing-verification.md) - Unit tests, fixtures, CI readiness
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Environment Variables
|
|
109
|
+
|
|
110
|
+
```env
|
|
111
|
+
# Reddit OAuth
|
|
112
|
+
REDDIT_CLIENT_ID=your_client_id
|
|
113
|
+
REDDIT_CLIENT_SECRET=your_client_secret
|
|
114
|
+
REDDIT_REDIRECT_URI=http://localhost:8080/callback
|
|
115
|
+
REDDIT_USER_AGENT=platform:app-id:v0.1.0 (by /u/username)
|
|
116
|
+
|
|
117
|
+
# Token Storage
|
|
118
|
+
TOKEN_STORAGE_PATH=./.tokens/reddit.json
|
|
119
|
+
|
|
120
|
+
# Transport
|
|
121
|
+
TRANSPORT=stdio
|
|
122
|
+
HTTP_PORT=3000
|
|
123
|
+
HTTP_HOST=localhost
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Testing Requirements
|
|
129
|
+
|
|
130
|
+
- [ ] Unit tests for OAuth flow (token exchange, refresh)
|
|
131
|
+
- [ ] Unit tests for API client (error mapping, retry logic)
|
|
132
|
+
- [ ] Unit tests for each listing tool (parameter validation, response formatting)
|
|
133
|
+
- [ ] Unit tests for search tools
|
|
134
|
+
- [ ] Mock client for isolated testing
|
|
135
|
+
- [ ] Response fixtures for consistent test data
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
**Next Milestone**: [Milestone 2: Content Interaction](milestone-2-content-interaction.md)
|
|
140
|
+
**Blockers**: None
|