@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.
Files changed (138) hide show
  1. package/.claude/settings.local.json +23 -0
  2. package/.env.example +13 -0
  3. package/AGENT.md +1772 -0
  4. package/README.md +54 -0
  5. package/agent/commands/acp.clarification-capture.md +386 -0
  6. package/agent/commands/acp.clarification-create.md +432 -0
  7. package/agent/commands/acp.clarifications-research.md +326 -0
  8. package/agent/commands/acp.command-create.md +432 -0
  9. package/agent/commands/acp.design-create.md +286 -0
  10. package/agent/commands/acp.design-reference.md +355 -0
  11. package/agent/commands/acp.index.md +423 -0
  12. package/agent/commands/acp.init.md +546 -0
  13. package/agent/commands/acp.package-create.md +895 -0
  14. package/agent/commands/acp.package-info.md +212 -0
  15. package/agent/commands/acp.package-install.md +539 -0
  16. package/agent/commands/acp.package-list.md +280 -0
  17. package/agent/commands/acp.package-publish.md +541 -0
  18. package/agent/commands/acp.package-remove.md +293 -0
  19. package/agent/commands/acp.package-search.md +307 -0
  20. package/agent/commands/acp.package-update.md +361 -0
  21. package/agent/commands/acp.package-validate.md +540 -0
  22. package/agent/commands/acp.pattern-create.md +386 -0
  23. package/agent/commands/acp.plan.md +577 -0
  24. package/agent/commands/acp.proceed.md +882 -0
  25. package/agent/commands/acp.project-create.md +675 -0
  26. package/agent/commands/acp.project-info.md +312 -0
  27. package/agent/commands/acp.project-list.md +226 -0
  28. package/agent/commands/acp.project-remove.md +379 -0
  29. package/agent/commands/acp.project-set.md +227 -0
  30. package/agent/commands/acp.project-update.md +307 -0
  31. package/agent/commands/acp.projects-restore.md +228 -0
  32. package/agent/commands/acp.projects-sync.md +347 -0
  33. package/agent/commands/acp.report.md +407 -0
  34. package/agent/commands/acp.resume.md +239 -0
  35. package/agent/commands/acp.sessions.md +301 -0
  36. package/agent/commands/acp.status.md +293 -0
  37. package/agent/commands/acp.sync.md +364 -0
  38. package/agent/commands/acp.task-create.md +500 -0
  39. package/agent/commands/acp.update.md +302 -0
  40. package/agent/commands/acp.validate.md +466 -0
  41. package/agent/commands/acp.version-check-for-updates.md +276 -0
  42. package/agent/commands/acp.version-check.md +191 -0
  43. package/agent/commands/acp.version-update.md +289 -0
  44. package/agent/commands/command.template.md +339 -0
  45. package/agent/commands/git.commit.md +526 -0
  46. package/agent/commands/git.init.md +514 -0
  47. package/agent/design/.gitkeep +0 -0
  48. package/agent/design/design.template.md +154 -0
  49. package/agent/design/requirements.md +332 -0
  50. package/agent/design/requirements.template.md +387 -0
  51. package/agent/index/.gitkeep +0 -0
  52. package/agent/index/local.main.template.yaml +37 -0
  53. package/agent/manifest.template.yaml +13 -0
  54. package/agent/manifest.yaml +61 -0
  55. package/agent/milestones/.gitkeep +0 -0
  56. package/agent/milestones/milestone-1-foundation-listings-mvp.md +140 -0
  57. package/agent/milestones/milestone-1-{title}.template.md +206 -0
  58. package/agent/milestones/milestone-2-content-interaction.md +56 -0
  59. package/agent/milestones/milestone-3-users-and-messaging.md +54 -0
  60. package/agent/milestones/milestone-4-subreddits-and-flair.md +56 -0
  61. package/agent/milestones/milestone-5-moderation.md +53 -0
  62. package/agent/milestones/milestone-6-advanced-features-and-polish.md +56 -0
  63. package/agent/package.template.yaml +86 -0
  64. package/agent/patterns/.gitkeep +0 -0
  65. package/agent/patterns/bootstrap.template.md +1237 -0
  66. package/agent/patterns/pattern.template.md +382 -0
  67. package/agent/progress.template.yaml +161 -0
  68. package/agent/progress.yaml +223 -0
  69. package/agent/schemas/package.schema.yaml +276 -0
  70. package/agent/scripts/acp.common.sh +1781 -0
  71. package/agent/scripts/acp.yaml-parser.sh +985 -0
  72. package/agent/tasks/.gitkeep +0 -0
  73. package/agent/tasks/milestone-1-foundation-listings-mvp/task-1-project-scaffolding.md +75 -0
  74. package/agent/tasks/milestone-1-foundation-listings-mvp/task-2-reddit-oauth.md +71 -0
  75. package/agent/tasks/milestone-1-foundation-listings-mvp/task-3-reddit-api-client.md +71 -0
  76. package/agent/tasks/milestone-1-foundation-listings-mvp/task-4-listing-tools.md +65 -0
  77. package/agent/tasks/milestone-1-foundation-listings-mvp/task-5-search-tools.md +43 -0
  78. package/agent/tasks/milestone-1-foundation-listings-mvp/task-6-testing-verification.md +49 -0
  79. package/agent/tasks/milestone-2-content-interaction/task-7-post-tools.md +56 -0
  80. package/agent/tasks/milestone-2-content-interaction/task-8-comment-tools.md +49 -0
  81. package/agent/tasks/milestone-2-content-interaction/task-9-vote-save-report-tools.md +50 -0
  82. package/agent/tasks/milestone-3-users-and-messaging/task-10-account-tools.md +44 -0
  83. package/agent/tasks/milestone-3-users-and-messaging/task-11-user-profile-tools.md +50 -0
  84. package/agent/tasks/milestone-3-users-and-messaging/task-12-private-message-tools.md +50 -0
  85. package/agent/tasks/milestone-4-subreddits-and-flair/task-13-subreddit-tools.md +47 -0
  86. package/agent/tasks/milestone-4-subreddits-and-flair/task-14-flair-tools.md +46 -0
  87. package/agent/tasks/milestone-4-subreddits-and-flair/task-15-http-transport.md +53 -0
  88. package/agent/tasks/milestone-5-moderation/task-16-mod-action-tools.md +48 -0
  89. package/agent/tasks/milestone-5-moderation/task-17-mod-listing-tools.md +47 -0
  90. package/agent/tasks/milestone-5-moderation/task-18-mod-management-tools.md +42 -0
  91. package/agent/tasks/milestone-6-advanced-features-and-polish/task-19-multireddit-tools.md +49 -0
  92. package/agent/tasks/milestone-6-advanced-features-and-polish/task-20-wiki-tools.md +47 -0
  93. package/agent/tasks/milestone-6-advanced-features-and-polish/task-21-documentation-polish.md +65 -0
  94. package/agent/tasks/task-1-{title}.template.md +244 -0
  95. package/dist/auth/oauth.d.ts +15 -0
  96. package/dist/auth/oauth.d.ts.map +1 -0
  97. package/dist/client/reddit.d.ts +28 -0
  98. package/dist/client/reddit.d.ts.map +1 -0
  99. package/dist/factory.d.ts +2 -0
  100. package/dist/factory.d.ts.map +1 -0
  101. package/dist/factory.js +30394 -0
  102. package/dist/factory.js.map +7 -0
  103. package/dist/index.d.ts +2 -0
  104. package/dist/index.d.ts.map +1 -0
  105. package/dist/index.js +31955 -0
  106. package/dist/index.js.map +7 -0
  107. package/dist/server.d.ts +5 -0
  108. package/dist/server.d.ts.map +1 -0
  109. package/dist/server.js +30401 -0
  110. package/dist/server.js.map +7 -0
  111. package/dist/tools/listings.d.ts +4 -0
  112. package/dist/tools/listings.d.ts.map +1 -0
  113. package/dist/tools/search.d.ts +4 -0
  114. package/dist/tools/search.d.ts.map +1 -0
  115. package/dist/transport/http.d.ts +7 -0
  116. package/dist/transport/http.d.ts.map +1 -0
  117. package/dist/types/index.d.ts +78 -0
  118. package/dist/types/index.d.ts.map +1 -0
  119. package/esbuild.build.js +21 -0
  120. package/jest.config.js +18 -0
  121. package/package.json +46 -0
  122. package/src/auth/oauth.ts +200 -0
  123. package/src/client/reddit.ts +245 -0
  124. package/src/factory.ts +5 -0
  125. package/src/index.ts +31 -0
  126. package/src/server.ts +36 -0
  127. package/src/tools/listings.ts +202 -0
  128. package/src/tools/search.ts +85 -0
  129. package/src/transport/http.ts +49 -0
  130. package/src/types/index.ts +83 -0
  131. package/tests/fixtures/reddit-responses.ts +132 -0
  132. package/tests/helpers/mock-client.ts +36 -0
  133. package/tests/unit/auth.test.ts +89 -0
  134. package/tests/unit/client.test.ts +218 -0
  135. package/tests/unit/listings.test.ts +113 -0
  136. package/tests/unit/search.test.ts +59 -0
  137. package/tests/unit/server.test.ts +14 -0
  138. package/tsconfig.json +21 -0
@@ -0,0 +1,47 @@
1
+ # Task 13: Subreddit Tools
2
+
3
+ **Milestone**: [M4 - Subreddits & Flair](../../milestones/milestone-4-subreddits-and-flair.md)
4
+ **Design Reference**: [Requirements](../../design/requirements.md)
5
+ **Estimated Time**: 2.5 hours
6
+ **Dependencies**: Task 6
7
+ **Status**: Not Started
8
+
9
+ ---
10
+
11
+ ## Objective
12
+
13
+ Implement tools for subreddit discovery, info, rules, subscription management, and search.
14
+
15
+ ---
16
+
17
+ ## Steps
18
+
19
+ ### 1. Create src/tools/subreddits.ts
20
+
21
+ Register 8 tools:
22
+
23
+ | Tool | Endpoint | Parameters | Scope |
24
+ |------|----------|------------|-------|
25
+ | `reddit_subreddit_about` | GET /r/{subreddit}/about | subreddit | read |
26
+ | `reddit_subreddit_rules` | GET /r/{subreddit}/about/rules | subreddit | read |
27
+ | `reddit_subscribe` | POST /api/subscribe | sr_name, action=sub | subscribe |
28
+ | `reddit_unsubscribe` | POST /api/subscribe | sr_name, action=unsub | subscribe |
29
+ | `reddit_subreddits_mine` | GET /subreddits/mine/subscriber | limit, after, before | mysubreddits |
30
+ | `reddit_subreddits_popular` | GET /subreddits/popular | limit, after, before | read |
31
+ | `reddit_subreddits_new` | GET /subreddits/new | limit, after, before | read |
32
+ | `reddit_subreddits_search` | GET /subreddits/search | q, limit, after, before | read |
33
+
34
+ ---
35
+
36
+ ## Verification
37
+
38
+ - [ ] `reddit_subreddit_about` returns subreddit metadata
39
+ - [ ] `reddit_subreddit_rules` returns rules list
40
+ - [ ] Subscribe/unsubscribe toggle subscription
41
+ - [ ] `reddit_subreddits_mine` lists user's subscriptions
42
+ - [ ] `reddit_subreddits_search` finds subreddits by query
43
+ - [ ] Unit tests for each tool
44
+
45
+ ---
46
+
47
+ **Next Task**: [Task 14: Flair Tools](task-14-flair-tools.md)
@@ -0,0 +1,46 @@
1
+ # Task 14: Flair Tools
2
+
3
+ **Milestone**: [M4 - Subreddits & Flair](../../milestones/milestone-4-subreddits-and-flair.md)
4
+ **Design Reference**: [Requirements](../../design/requirements.md)
5
+ **Estimated Time**: 1.5 hours
6
+ **Dependencies**: Task 13
7
+ **Status**: Not Started
8
+
9
+ ---
10
+
11
+ ## Objective
12
+
13
+ Implement tools for reading and setting flair on posts and users.
14
+
15
+ ---
16
+
17
+ ## Steps
18
+
19
+ ### 1. Create src/tools/flair.ts
20
+
21
+ Register 3 tools:
22
+
23
+ | Tool | Endpoint | Parameters | Scope |
24
+ |------|----------|------------|-------|
25
+ | `reddit_link_flair` | GET /r/{subreddit}/api/link_flair_v2 | subreddit | flair |
26
+ | `reddit_user_flair` | GET /r/{subreddit}/api/user_flair_v2 | subreddit | flair |
27
+ | `reddit_select_flair` | POST /r/{subreddit}/api/selectflair | subreddit, flair_template_id, link? (fullname), name? (username), text? | flair |
28
+
29
+ ### 2. Select flair details
30
+ - If `link` provided: sets link flair on a post
31
+ - If `name` provided: sets user flair
32
+ - `flair_template_id` from the link_flair or user_flair listing
33
+ - Optional `text` to customize flair text
34
+
35
+ ---
36
+
37
+ ## Verification
38
+
39
+ - [ ] `reddit_link_flair` returns available post flair templates
40
+ - [ ] `reddit_user_flair` returns available user flair templates
41
+ - [ ] `reddit_select_flair` sets flair on a post or user
42
+ - [ ] Unit tests for each tool
43
+
44
+ ---
45
+
46
+ **Next Task**: [Task 15: HTTP Transport](task-15-http-transport.md)
@@ -0,0 +1,53 @@
1
+ # Task 15: HTTP Transport
2
+
3
+ **Milestone**: [M4 - Subreddits & Flair](../../milestones/milestone-4-subreddits-and-flair.md)
4
+ **Design Reference**: [Requirements](../../design/requirements.md)
5
+ **Estimated Time**: 2 hours
6
+ **Dependencies**: Task 4
7
+ **Status**: Not Started
8
+
9
+ ---
10
+
11
+ ## Objective
12
+
13
+ Implement the streamable HTTP transport, following the youtube-mcp pattern.
14
+
15
+ ---
16
+
17
+ ## Steps
18
+
19
+ ### 1. Implement src/transport/http.ts
20
+
21
+ ```typescript
22
+ export async function startHttpTransport(
23
+ server: McpServer,
24
+ options: { port: number; host: string }
25
+ ): Promise<void>
26
+ ```
27
+
28
+ - Use MCP SDK's `StreamableHTTPServerTransport`
29
+ - Per-session transport creation
30
+ - Routes:
31
+ - POST /mcp — MCP requests
32
+ - GET /health — health check (`{ status: "ok" }`)
33
+ - Anything else — 404
34
+
35
+ ### 2. Update src/index.ts
36
+ - Parse --transport flag (stdio | http)
37
+ - Parse --port and --host flags
38
+ - Fallback to TRANSPORT, HTTP_PORT, HTTP_HOST env vars
39
+ - Default: stdio on port 3000
40
+
41
+ ---
42
+
43
+ ## Verification
44
+
45
+ - [ ] HTTP transport serves MCP requests on /mcp
46
+ - [ ] Health check returns 200 with `{ status: "ok" }`
47
+ - [ ] Unknown routes return 404
48
+ - [ ] Transport selection works via CLI flags and env vars
49
+ - [ ] Unit tests for HTTP transport
50
+
51
+ ---
52
+
53
+ **Next Task**: [Task 16: Mod Action Tools](../milestone-5-moderation/task-16-mod-action-tools.md)
@@ -0,0 +1,48 @@
1
+ # Task 16: Mod Action Tools
2
+
3
+ **Milestone**: [M5 - Moderation](../../milestones/milestone-5-moderation.md)
4
+ **Design Reference**: [Requirements](../../design/requirements.md)
5
+ **Estimated Time**: 2 hours
6
+ **Dependencies**: Task 6
7
+ **Status**: Not Started
8
+
9
+ ---
10
+
11
+ ## Objective
12
+
13
+ Implement moderator action tools — approve, remove, distinguish, ignore reports, lock/unlock.
14
+
15
+ ---
16
+
17
+ ## Steps
18
+
19
+ ### 1. Create src/tools/moderation.ts
20
+
21
+ Register 7 tools:
22
+
23
+ | Tool | Endpoint | Parameters | Scope |
24
+ |------|----------|------------|-------|
25
+ | `reddit_approve` | POST /api/approve | id (fullname) | modposts |
26
+ | `reddit_remove` | POST /api/remove | id, spam? (boolean) | modposts |
27
+ | `reddit_distinguish` | POST /api/distinguish | id, how (yes/no/admin/special) | modposts |
28
+ | `reddit_ignore_reports` | POST /api/ignore_reports | id | modposts |
29
+ | `reddit_unignore_reports` | POST /api/unignore_reports | id | modposts |
30
+ | `reddit_lock` | POST /api/lock | id | modposts |
31
+ | `reddit_unlock` | POST /api/unlock | id | modposts |
32
+
33
+ ### 2. Distinguish details
34
+ - `how`: "yes" = mod distinguish, "no" = remove distinguish, "admin" = admin, "special" = special
35
+
36
+ ---
37
+
38
+ ## Verification
39
+
40
+ - [ ] All 7 mod action tools registered
41
+ - [ ] Each tool requires modposts scope
42
+ - [ ] `reddit_remove` supports spam flag
43
+ - [ ] `reddit_distinguish` handles all `how` values
44
+ - [ ] Unit tests for each tool
45
+
46
+ ---
47
+
48
+ **Next Task**: [Task 17: Mod Listing Tools](task-17-mod-listing-tools.md)
@@ -0,0 +1,47 @@
1
+ # Task 17: Mod Listing Tools
2
+
3
+ **Milestone**: [M5 - Moderation](../../milestones/milestone-5-moderation.md)
4
+ **Design Reference**: [Requirements](../../design/requirements.md)
5
+ **Estimated Time**: 2 hours
6
+ **Dependencies**: Task 16
7
+ **Status**: Not Started
8
+
9
+ ---
10
+
11
+ ## Objective
12
+
13
+ Implement tools for viewing moderation queues, reports, spam, edited items, and the moderation log.
14
+
15
+ ---
16
+
17
+ ## Steps
18
+
19
+ ### 1. Add to src/tools/moderation.ts (or create src/tools/mod-listings.ts)
20
+
21
+ Register 5 tools:
22
+
23
+ | Tool | Endpoint | Parameters | Scope |
24
+ |------|----------|------------|-------|
25
+ | `reddit_modqueue` | GET /r/{subreddit}/about/modqueue | subreddit, limit, after, before | modposts |
26
+ | `reddit_reports` | GET /r/{subreddit}/about/reports | subreddit, limit, after, before | modposts |
27
+ | `reddit_spam` | GET /r/{subreddit}/about/spam | subreddit, limit, after, before | modposts |
28
+ | `reddit_edited` | GET /r/{subreddit}/about/edited | subreddit, limit, after, before | modposts |
29
+ | `reddit_modlog` | GET /r/{subreddit}/about/log | subreddit, type?, mod?, limit, after, before | modlog |
30
+
31
+ ### 2. Modlog details
32
+ - `type` filter: banuser, unbanuser, removelink, removecomment, approvelink, approvecomment, etc.
33
+ - `mod` filter: moderator username
34
+
35
+ ---
36
+
37
+ ## Verification
38
+
39
+ - [ ] All 5 mod listing tools registered
40
+ - [ ] `reddit_modqueue` returns items awaiting review
41
+ - [ ] `reddit_modlog` supports type and mod filters
42
+ - [ ] Pagination works correctly
43
+ - [ ] Unit tests for each tool
44
+
45
+ ---
46
+
47
+ **Next Task**: [Task 18: Mod Management Tools](task-18-mod-management-tools.md)
@@ -0,0 +1,42 @@
1
+ # Task 18: Mod Management Tools
2
+
3
+ **Milestone**: [M5 - Moderation](../../milestones/milestone-5-moderation.md)
4
+ **Design Reference**: [Requirements](../../design/requirements.md)
5
+ **Estimated Time**: 1.5 hours
6
+ **Dependencies**: Task 16
7
+ **Status**: Not Started
8
+
9
+ ---
10
+
11
+ ## Objective
12
+
13
+ Implement tools for listing moderators, approved contributors, banned users, and muted users.
14
+
15
+ ---
16
+
17
+ ## Steps
18
+
19
+ ### 1. Add to src/tools/moderation.ts
20
+
21
+ Register 4 tools:
22
+
23
+ | Tool | Endpoint | Parameters | Scope |
24
+ |------|----------|------------|-------|
25
+ | `reddit_moderators` | GET /r/{subreddit}/about/moderators | subreddit | read |
26
+ | `reddit_contributors` | GET /r/{subreddit}/about/contributors | subreddit, limit, after, before | modcontributors |
27
+ | `reddit_banned` | GET /r/{subreddit}/about/banned | subreddit, limit, after, before | modcontributors |
28
+ | `reddit_muted` | GET /r/{subreddit}/about/muted | subreddit, limit, after, before | modcontributors |
29
+
30
+ ---
31
+
32
+ ## Verification
33
+
34
+ - [ ] All 4 tools registered with correct scopes
35
+ - [ ] `reddit_moderators` returns mod list
36
+ - [ ] `reddit_banned` returns banned user list with reasons
37
+ - [ ] Pagination works for contributor/banned/muted lists
38
+ - [ ] Unit tests for each tool
39
+
40
+ ---
41
+
42
+ **Next Task**: [Task 19: Multireddit Tools](../milestone-6-advanced-features-and-polish/task-19-multireddit-tools.md)
@@ -0,0 +1,49 @@
1
+ # Task 19: Multireddit Tools
2
+
3
+ **Milestone**: [M6 - Advanced Features & Polish](../../milestones/milestone-6-advanced-features-and-polish.md)
4
+ **Design Reference**: [Requirements](../../design/requirements.md)
5
+ **Estimated Time**: 2 hours
6
+ **Dependencies**: Task 6
7
+ **Status**: Not Started
8
+
9
+ ---
10
+
11
+ ## Objective
12
+
13
+ Implement tools for managing multireddits (custom feeds) — list, get, create, update, delete, and manage subreddits within them.
14
+
15
+ ---
16
+
17
+ ## Steps
18
+
19
+ ### 1. Create src/tools/multireddits.ts
20
+
21
+ Register 7 tools:
22
+
23
+ | Tool | Endpoint | Parameters | Scope |
24
+ |------|----------|------------|-------|
25
+ | `reddit_multi_mine` | GET /api/multi/mine | — | read |
26
+ | `reddit_multi_get` | GET /api/multi/{multipath} | multipath | read |
27
+ | `reddit_multi_create` | POST /api/multi/{multipath} | multipath, model (JSON: display_name, subreddits, visibility) | subscribe |
28
+ | `reddit_multi_update` | PUT /api/multi/{multipath} | multipath, model (JSON) | subscribe |
29
+ | `reddit_multi_delete` | DELETE /api/multi/{multipath} | multipath | subscribe |
30
+ | `reddit_multi_add_sub` | PUT /api/multi/{multipath}/r/{srname} | multipath, srname, model ({name: srname}) | subscribe |
31
+ | `reddit_multi_remove_sub` | DELETE /api/multi/{multipath}/r/{srname} | multipath, srname | subscribe |
32
+
33
+ ### 2. Multipath format
34
+ - Format: `/user/{username}/m/{multiname}`
35
+ - Example: `/user/spez/m/frontpage`
36
+
37
+ ---
38
+
39
+ ## Verification
40
+
41
+ - [ ] `reddit_multi_mine` returns user's multireddits
42
+ - [ ] CRUD operations work on multireddits
43
+ - [ ] Add/remove subreddit from multi works
44
+ - [ ] Multipath format correctly handled
45
+ - [ ] Unit tests for each tool
46
+
47
+ ---
48
+
49
+ **Next Task**: [Task 20: Wiki Tools](task-20-wiki-tools.md)
@@ -0,0 +1,47 @@
1
+ # Task 20: Wiki Tools
2
+
3
+ **Milestone**: [M6 - Advanced Features & Polish](../../milestones/milestone-6-advanced-features-and-polish.md)
4
+ **Design Reference**: [Requirements](../../design/requirements.md)
5
+ **Estimated Time**: 2 hours
6
+ **Dependencies**: Task 6
7
+ **Status**: Not Started
8
+
9
+ ---
10
+
11
+ ## Objective
12
+
13
+ Implement tools for reading, editing, and browsing subreddit wiki pages and their revision history.
14
+
15
+ ---
16
+
17
+ ## Steps
18
+
19
+ ### 1. Create src/tools/wiki.ts
20
+
21
+ Register 5 tools:
22
+
23
+ | Tool | Endpoint | Parameters | Scope |
24
+ |------|----------|------------|-------|
25
+ | `reddit_wiki_page` | GET /r/{subreddit}/wiki/{page} | subreddit, page | wikiread |
26
+ | `reddit_wiki_edit` | POST /r/{subreddit}/api/wiki/edit | subreddit, page, content, reason? | wikiedit |
27
+ | `reddit_wiki_pages` | GET /r/{subreddit}/wiki/pages | subreddit | wikiread |
28
+ | `reddit_wiki_revisions` | GET /r/{subreddit}/wiki/revisions | subreddit, limit, after, before | wikiread |
29
+ | `reddit_wiki_page_revisions` | GET /r/{subreddit}/wiki/revisions/{page} | subreddit, page, limit, after, before | wikiread |
30
+
31
+ ### 2. Wiki edit details
32
+ - `content` is the full wiki page content (markdown)
33
+ - `reason` is an optional edit reason (like a commit message)
34
+
35
+ ---
36
+
37
+ ## Verification
38
+
39
+ - [ ] `reddit_wiki_page` returns wiki page content
40
+ - [ ] `reddit_wiki_edit` updates a wiki page
41
+ - [ ] `reddit_wiki_pages` lists all wiki pages in a subreddit
42
+ - [ ] Revision history tools return edit history
43
+ - [ ] Unit tests for each tool
44
+
45
+ ---
46
+
47
+ **Next Task**: [Task 21: Documentation & Polish](task-21-documentation-polish.md)
@@ -0,0 +1,65 @@
1
+ # Task 21: Documentation & Polish
2
+
3
+ **Milestone**: [M6 - Advanced Features & Polish](../../milestones/milestone-6-advanced-features-and-polish.md)
4
+ **Design Reference**: [Requirements](../../design/requirements.md)
5
+ **Estimated Time**: 3 hours
6
+ **Dependencies**: Tasks 1-20
7
+ **Status**: Not Started
8
+
9
+ ---
10
+
11
+ ## Objective
12
+
13
+ Complete README documentation, CHANGELOG, factory export for mcp-auth, and ensure the package is publish-ready.
14
+
15
+ ---
16
+
17
+ ## Steps
18
+
19
+ ### 1. Create comprehensive README.md
20
+ - Project overview and description
21
+ - Quick start guide (OAuth setup, configuration)
22
+ - All 88 tools documented in a reference table
23
+ - OAuth scopes per category
24
+ - Transport options (stdio/HTTP)
25
+ - Claude Desktop configuration example
26
+ - Rate limit information
27
+ - Environment variables reference
28
+
29
+ ### 2. Create CHANGELOG.md
30
+ - Document all milestones as releases
31
+ - List tools added per milestone
32
+
33
+ ### 3. Finalize factory export (src/factory.ts)
34
+ ```typescript
35
+ export function createServer(accessToken: string): McpServer
36
+ ```
37
+ - Used by reddit-mcp-server for mcp-auth integration
38
+ - Creates server with raw access token (no OAuth flow)
39
+
40
+ ### 4. Package verification
41
+ - Ensure package.json exports are correct
42
+ - Verify `npm pack` produces clean package
43
+ - Check no dev files included in package
44
+ - Verify all tools registered (count = 88)
45
+
46
+ ### 5. Final test pass
47
+ - Run full test suite
48
+ - Verify coverage >= 70%
49
+ - Check for any TODO/FIXME items
50
+
51
+ ---
52
+
53
+ ## Verification
54
+
55
+ - [ ] README documents all 88 tools
56
+ - [ ] CHANGELOG covers all milestones
57
+ - [ ] Factory export creates server from access token
58
+ - [ ] `npm pack` produces clean package
59
+ - [ ] All tests pass
60
+ - [ ] No TODO/FIXME items remaining
61
+ - [ ] Package publishable to npm
62
+
63
+ ---
64
+
65
+ **Related Design Docs**: [Requirements](../../design/requirements.md)
@@ -0,0 +1,244 @@
1
+ # Task {N}: {Descriptive Task Name}
2
+
3
+ **Milestone**: [M{N} - Milestone Name](../milestones/milestone-{N}-{name}.md)
4
+ **Design Reference**: [{Design Name}](../design/{namespace}.{design-name}.md) | None
5
+ **Estimated Time**: [e.g., "2 hours", "4 hours", "1 day"]
6
+ **Dependencies**: [List prerequisite tasks, or "None"]
7
+ **Status**: Not Started | In Progress | Completed
8
+
9
+ ---
10
+
11
+ ## Objective
12
+
13
+ [Clearly state what this task accomplishes. Be specific and focused on a single, achievable goal.]
14
+
15
+ **Example**: "Create the basic project structure with all necessary configuration files and directory organization for a TypeScript-based MCP server."
16
+
17
+ ---
18
+
19
+ ## Context
20
+
21
+ [Provide background information that helps understand why this task is necessary and how it fits into the larger milestone.]
22
+
23
+ **Example**: "This task establishes the foundation for the project. Without proper structure and configuration, subsequent development tasks cannot proceed. The structure follows industry best practices for TypeScript projects and MCP server organization."
24
+
25
+ ---
26
+
27
+ ## Steps
28
+
29
+ [Provide a detailed, sequential list of actions to complete this task. Each step should be concrete and actionable.]
30
+
31
+ ### 1. [Step Category or Action]
32
+ [Detailed description of what to do]
33
+
34
+ ```bash
35
+ # Command examples if applicable
36
+ command --with-flags
37
+ ```
38
+
39
+ ```typescript
40
+ // Code examples if applicable
41
+ const example = "code";
42
+ ```
43
+
44
+ ### 2. [Next Step]
45
+ [Detailed description]
46
+
47
+ ### 3. [Next Step]
48
+ [Detailed description]
49
+
50
+ **Example**:
51
+
52
+ ### 1. Create Project Directory
53
+ Create the root directory for the project and navigate into it:
54
+
55
+ ```bash
56
+ mkdir -p my-project
57
+ cd my-project
58
+ ```
59
+
60
+ ### 2. Initialize npm Project
61
+ Initialize a new npm project with default settings:
62
+
63
+ ```bash
64
+ npm init -y
65
+ ```
66
+
67
+ ### 3. Update package.json
68
+ Edit the generated package.json to include proper metadata and scripts:
69
+
70
+ ```json
71
+ {
72
+ "name": "my-project",
73
+ "version": "0.1.0",
74
+ "description": "Description of what this project does",
75
+ "main": "dist/index.js",
76
+ "type": "module",
77
+ "scripts": {
78
+ "build": "node esbuild.build.js",
79
+ "dev": "tsx watch src/index.ts",
80
+ "start": "node dist/index.js",
81
+ "test": "vitest",
82
+ "typecheck": "tsc --noEmit"
83
+ },
84
+ "keywords": ["mcp", "relevant", "keywords"],
85
+ "author": "Your Name",
86
+ "license": "MIT"
87
+ }
88
+ ```
89
+
90
+ ### 4. Create Directory Structure
91
+ Create all necessary directories:
92
+
93
+ ```bash
94
+ mkdir -p src/{types,utils,tools}
95
+ mkdir -p tests/{unit,integration}
96
+ mkdir -p agent/{design,milestones,patterns,tasks}
97
+ ```
98
+
99
+ ### 5. Create Configuration Files
100
+ Create TypeScript configuration, build scripts, and other config files.
101
+
102
+ **tsconfig.json**:
103
+ ```json
104
+ {
105
+ "compilerOptions": {
106
+ "target": "ES2022",
107
+ "module": "Node16",
108
+ "moduleResolution": "Node16",
109
+ "lib": ["ES2022"],
110
+ "outDir": "./dist",
111
+ "rootDir": "./src",
112
+ "strict": true,
113
+ "esModuleInterop": true,
114
+ "skipLibCheck": true,
115
+ "forceConsistentCasingInFileNames": true,
116
+ "resolveJsonModule": true,
117
+ "declaration": true,
118
+ "declarationMap": true,
119
+ "sourceMap": true
120
+ },
121
+ "include": ["src/**/*"],
122
+ "exclude": ["node_modules", "dist", "tests"]
123
+ }
124
+ ```
125
+
126
+ [Continue with other config files...]
127
+
128
+ ---
129
+
130
+ ## Verification
131
+
132
+ [Provide a checklist of items to verify the task is complete. Each item should be objectively verifiable.]
133
+
134
+ - [ ] Verification item 1: [Specific condition to check]
135
+ - [ ] Verification item 2: [Specific condition to check]
136
+ - [ ] Verification item 3: [Specific condition to check]
137
+ - [ ] Verification item 4: [Specific condition to check]
138
+ - [ ] Verification item 5: [Specific condition to check]
139
+
140
+ **Example**:
141
+ - [ ] Project directory created and contains expected subdirectories
142
+ - [ ] package.json exists and contains correct metadata
143
+ - [ ] tsconfig.json exists and is valid JSON
144
+ - [ ] All configuration files created (.gitignore, .env.example, etc.)
145
+ - [ ] Directory structure matches specification
146
+ - [ ] No syntax errors in configuration files
147
+
148
+ ---
149
+
150
+ ## Expected Output
151
+
152
+ [Describe what the project should look like after this task is complete.]
153
+
154
+ **File Structure**:
155
+ ```
156
+ project-root/
157
+ ├── file1
158
+ ├── file2
159
+ └── directory/
160
+ └── file3
161
+ ```
162
+
163
+ **Key Files Created**:
164
+ - `file1`: [Purpose]
165
+ - `file2`: [Purpose]
166
+ - `directory/file3`: [Purpose]
167
+
168
+ ---
169
+
170
+ ## Key Design Decisions (Optional)
171
+
172
+ <!-- This section is populated by @acp.clarification-capture when
173
+ create commands are invoked with --from-clar, --from-chat, or
174
+ --from-context. It can also be manually authored.
175
+ Omit this section entirely if no decisions to capture.
176
+
177
+ Group decisions by agent-inferred category using tables:
178
+
179
+ ### {Category}
180
+
181
+ | Decision | Choice | Rationale |
182
+ |---|---|---|
183
+ | {decision} | {choice} | {rationale} |
184
+ -->
185
+
186
+ ---
187
+
188
+ ## Common Issues and Solutions
189
+
190
+ [Document potential problems and how to resolve them:]
191
+
192
+ ### Issue 1: [Problem description]
193
+ **Symptom**: [What the user will see]
194
+ **Solution**: [How to fix it]
195
+
196
+ ### Issue 2: [Problem description]
197
+ **Symptom**: [What the user will see]
198
+ **Solution**: [How to fix it]
199
+
200
+ **Example**:
201
+
202
+ ### Issue 1: npm init fails
203
+ **Symptom**: Error message about permissions or missing npm
204
+ **Solution**: Ensure Node.js and npm are installed correctly. Run `node --version` and `npm --version` to verify.
205
+
206
+ ### Issue 2: TypeScript configuration errors
207
+ **Symptom**: tsc complains about invalid configuration
208
+ **Solution**: Validate JSON syntax in tsconfig.json. Ensure all required fields are present.
209
+
210
+ ---
211
+
212
+ ## Resources
213
+
214
+ [Link to relevant documentation, examples, or references:]
215
+
216
+ - [Resource 1 Name](URL): Description
217
+ - [Resource 2 Name](URL): Description
218
+ - [Resource 3 Name](URL): Description
219
+
220
+ **Example**:
221
+ - [TypeScript Handbook](https://www.typescriptlang.org/docs/): Official TypeScript documentation
222
+ - [esbuild Documentation](https://esbuild.github.io/): Build tool documentation
223
+ - [MCP SDK Documentation](https://github.com/modelcontextprotocol/sdk): MCP protocol reference
224
+
225
+ ---
226
+
227
+ ## Notes
228
+
229
+ [Any additional context, warnings, or considerations:]
230
+
231
+ - Note 1: [Important information]
232
+ - Note 2: [Important information]
233
+ - Note 3: [Important information]
234
+
235
+ **Example**:
236
+ - This task creates the foundation for all subsequent work
237
+ - Configuration files may need adjustment based on specific project requirements
238
+ - Keep .env files out of version control (ensure .gitignore is correct)
239
+
240
+ ---
241
+
242
+ **Next Task**: [Link to next task: task-{N+1}-{name}.md]
243
+ **Related Design Docs**: [Links to relevant design documents]
244
+ **Estimated Completion Date**: [YYYY-MM-DD or "TBD"]