@rigstate/mcp 0.4.2

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 (40) hide show
  1. package/.env.example +8 -0
  2. package/README.md +352 -0
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.js +3445 -0
  5. package/dist/index.js.map +1 -0
  6. package/package.json +43 -0
  7. package/roadmap.json +531 -0
  8. package/src/agents/the-scribe.ts +122 -0
  9. package/src/index.ts +1792 -0
  10. package/src/lib/supabase.ts +120 -0
  11. package/src/lib/tool-registry.ts +134 -0
  12. package/src/lib/types.ts +415 -0
  13. package/src/lib/utils.ts +10 -0
  14. package/src/resources/project-morals.ts +92 -0
  15. package/src/tools/arch-tools.ts +166 -0
  16. package/src/tools/archaeological-scan.ts +335 -0
  17. package/src/tools/check-agent-bridge.ts +169 -0
  18. package/src/tools/check-rules-sync.ts +85 -0
  19. package/src/tools/complete-roadmap-task.ts +96 -0
  20. package/src/tools/generate-professional-pdf.ts +232 -0
  21. package/src/tools/get-latest-decisions.ts +130 -0
  22. package/src/tools/get-next-roadmap-step.ts +76 -0
  23. package/src/tools/get-project-context.ts +163 -0
  24. package/src/tools/index.ts +17 -0
  25. package/src/tools/list-features.ts +67 -0
  26. package/src/tools/list-roadmap-tasks.ts +61 -0
  27. package/src/tools/pending-tasks.ts +228 -0
  28. package/src/tools/planning-tools.ts +123 -0
  29. package/src/tools/query-brain.ts +125 -0
  30. package/src/tools/research-tools.ts +149 -0
  31. package/src/tools/run-architecture-audit.ts +203 -0
  32. package/src/tools/save-decision.ts +77 -0
  33. package/src/tools/security-tools.ts +82 -0
  34. package/src/tools/submit-idea.ts +66 -0
  35. package/src/tools/sync-ide-rules.ts +76 -0
  36. package/src/tools/teacher-mode.ts +171 -0
  37. package/src/tools/ui-tools.ts +191 -0
  38. package/src/tools/update-roadmap.ts +105 -0
  39. package/tsconfig.json +29 -0
  40. package/tsup.config.ts +16 -0
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@rigstate/mcp",
3
+ "version": "0.4.2",
4
+ "description": "Rigstate MCP Server - Model Context Protocol for AI Editors",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "bin": {
8
+ "rigstate-mcp": "./dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "dev": "tsup --watch",
12
+ "build": "tsup",
13
+ "lint": "tsc --noEmit",
14
+ "start": "node dist/index.js",
15
+ "test": "node dist/index.js --help"
16
+ },
17
+ "dependencies": {
18
+ "@modelcontextprotocol/sdk": "^1.0.0",
19
+ "@supabase/supabase-js": "^2.39.0",
20
+ "@rigstate/rules-engine": "0.1.0",
21
+ "dotenv": "^17.2.3",
22
+ "uuid": "^9.0.0",
23
+ "zod": "^3.22.4"
24
+ },
25
+ "devDependencies": {
26
+ "@types/node": "^20.11.5",
27
+ "tsup": "^8.0.1",
28
+ "typescript": "^5.3.3"
29
+ },
30
+ "engines": {
31
+ "node": ">=18.0.0"
32
+ },
33
+ "keywords": [
34
+ "rigstate",
35
+ "mcp",
36
+ "model-context-protocol",
37
+ "ai-editor",
38
+ "cursor",
39
+ "claude"
40
+ ],
41
+ "author": "Rigstate",
42
+ "license": "MIT"
43
+ }
package/roadmap.json ADDED
@@ -0,0 +1,531 @@
1
+ {
2
+ "project": "Rigstate Core",
3
+ "last_synced": "2026-01-07T08:39:15.001Z",
4
+ "roadmap": [
5
+ {
6
+ "id": "e503e35a-d480-457b-a771-63cf0297b48a",
7
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
8
+ "step_number": 6,
9
+ "title": "Refactor: Architectural Cleanup",
10
+ "status": "LOCKED",
11
+ "prompt_content": "Frank here. I've detected a compliance violation. Here is the plan to fix it:\n1. Review the violation: \"Repository not yet indexed, but memories exist.\".\n2. Apply the specific Guardian rule found in settings.\n3. Refactor the code to adhere to the standard.\n4. Run tests to confirm stability.",
12
+ "verification_criteria": {
13
+ "label": "Technical Debt",
14
+ "priority": "High",
15
+ "generated_by": "The Guardian",
16
+ "original_issue": "Repository not yet indexed, but memories exist."
17
+ },
18
+ "type": "CODE",
19
+ "created_at": "2026-01-05T13:56:28.859126+00:00",
20
+ "sprint_id": 0,
21
+ "sprint_focus": "Foundation",
22
+ "sprint_description": null,
23
+ "estimated_minutes": 20,
24
+ "verification_type": null,
25
+ "verification_path": null,
26
+ "verification_match": null,
27
+ "summary": null,
28
+ "sprint_number": 1,
29
+ "escalated_by": null,
30
+ "escalated_at": "2026-01-05T13:56:28.859126+00:00",
31
+ "visibility": "private",
32
+ "priority": "MEDIUM",
33
+ "is_legacy": false,
34
+ "completed_at": null
35
+ },
36
+ {
37
+ "id": "8f2f2655-f846-4561-bde8-b4618fa8ae28",
38
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
39
+ "step_number": 999,
40
+ "title": "SQL Search Path Security Vulnerability",
41
+ "status": "COMPLETED",
42
+ "prompt_content": "CONTEXT: supabase/migrations/20260101000012_prompt_versioning.sql (Issue: SQL_INJECTION)\nOBJECTIVE: Database function ensure_single_active_prompt_version() lacks SET search_path = ''.\nGUARDIAN CONSTRAINTS: Update migration to include search_path isolation for all functions.\nDEFINITION OF DONE: SQL Search Path Security Vulnerability is resolved and verified by a new scan.\n\n#auto-guardian",
43
+ "verification_criteria": null,
44
+ "type": "MANUAL",
45
+ "created_at": "2026-01-05T13:50:36.911455+00:00",
46
+ "sprint_id": 0,
47
+ "sprint_focus": "Foundation",
48
+ "sprint_description": null,
49
+ "estimated_minutes": 20,
50
+ "verification_type": null,
51
+ "verification_path": null,
52
+ "verification_match": null,
53
+ "summary": null,
54
+ "sprint_number": 1,
55
+ "escalated_by": null,
56
+ "escalated_at": "2026-01-05T13:50:36.911455+00:00",
57
+ "visibility": "private",
58
+ "priority": "HIGH",
59
+ "is_legacy": false,
60
+ "completed_at": null
61
+ },
62
+ {
63
+ "id": "8b31ac01-cf36-4668-98bd-3b6f83fd0042",
64
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
65
+ "step_number": 999,
66
+ "title": "L-max Breach: lab.ts (689 lines)",
67
+ "status": "COMPLETED",
68
+ "prompt_content": "CONTEXT: apps/web/src/actions/lab.ts (Issue: POLICY_VIOLATION)\nOBJECTIVE: File exceeds 400 line limit for logic modules.\nGUARDIAN CONSTRAINTS: Split lab.ts into domain-specific modules (lab-core, lab-blueprints, lab-feedback).\nDEFINITION OF DONE: L-max Breach: lab.ts (689 lines) is resolved and verified by a new scan.\n\n#auto-guardian",
69
+ "verification_criteria": null,
70
+ "type": "MANUAL",
71
+ "created_at": "2026-01-05T13:50:36.911455+00:00",
72
+ "sprint_id": 0,
73
+ "sprint_focus": "Foundation",
74
+ "sprint_description": null,
75
+ "estimated_minutes": 20,
76
+ "verification_type": null,
77
+ "verification_path": null,
78
+ "verification_match": null,
79
+ "summary": null,
80
+ "sprint_number": 1,
81
+ "escalated_by": null,
82
+ "escalated_at": "2026-01-05T13:50:36.911455+00:00",
83
+ "visibility": "private",
84
+ "priority": "HIGH",
85
+ "is_legacy": false,
86
+ "completed_at": null
87
+ },
88
+ {
89
+ "id": "9c28bc40-043c-4c68-9235-f47b71ca5d86",
90
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
91
+ "step_number": 999,
92
+ "title": "Missing Input Validation: admin.ts",
93
+ "status": "COMPLETED",
94
+ "prompt_content": "CONTEXT: apps/web/src/actions/admin.ts (Issue: UNVALIDATED_INPUT)\nOBJECTIVE: Server Actions in admin.ts lack Zod validation (validateInput).\nGUARDIAN CONSTRAINTS: Apply validateInput with Zod schemas to all administrative actions.\nDEFINITION OF DONE: Missing Input Validation: admin.ts is resolved and verified by a new scan.\n\n#auto-guardian",
95
+ "verification_criteria": null,
96
+ "type": "MANUAL",
97
+ "created_at": "2026-01-05T13:50:36.911455+00:00",
98
+ "sprint_id": 0,
99
+ "sprint_focus": "Foundation",
100
+ "sprint_description": null,
101
+ "estimated_minutes": 20,
102
+ "verification_type": null,
103
+ "verification_path": null,
104
+ "verification_match": null,
105
+ "summary": null,
106
+ "sprint_number": 1,
107
+ "escalated_by": null,
108
+ "escalated_at": "2026-01-05T13:50:36.911455+00:00",
109
+ "visibility": "private",
110
+ "priority": "HIGH",
111
+ "is_legacy": false,
112
+ "completed_at": null
113
+ },
114
+ {
115
+ "id": "f3735dc7-ade5-4eee-bfd5-bb75c63fd399",
116
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
117
+ "step_number": 999,
118
+ "title": "L-max Warning: context-engine.ts (468 lines)",
119
+ "status": "COMPLETED",
120
+ "prompt_content": "CONTEXT: apps/web/src/lib/context-engine.ts (Issue: POLICY_VIOLATION)\nOBJECTIVE: Core engine file is approaching monolith status.\nGUARDIAN CONSTRAINTS: Extract RAG logic and specific parsers into sub-utilities.\nDEFINITION OF DONE: L-max Warning: context-engine.ts (468 lines) is resolved and verified by a new scan.\n\n#auto-guardian",
121
+ "verification_criteria": null,
122
+ "type": "MANUAL",
123
+ "created_at": "2026-01-05T13:50:36.911455+00:00",
124
+ "sprint_id": 0,
125
+ "sprint_focus": "Foundation",
126
+ "sprint_description": null,
127
+ "estimated_minutes": 20,
128
+ "verification_type": null,
129
+ "verification_path": null,
130
+ "verification_match": null,
131
+ "summary": null,
132
+ "sprint_number": 1,
133
+ "escalated_by": null,
134
+ "escalated_at": "2026-01-05T13:50:36.911455+00:00",
135
+ "visibility": "private",
136
+ "priority": "HIGH",
137
+ "is_legacy": false,
138
+ "completed_at": null
139
+ },
140
+ {
141
+ "id": "31ae7181-be64-4d59-80f5-7a9d880f5741",
142
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
143
+ "step_number": 999,
144
+ "title": "Insecure RLS Policy: system_prompts",
145
+ "status": "COMPLETED",
146
+ "prompt_content": "CONTEXT: supabase/migrations/20260101000012_prompt_versioning.sql (Issue: POLICY_VIOLATION)\nOBJECTIVE: system_prompts policy allows direct INSERT/UPDATE by any authenticated user.\nGUARDIAN CONSTRAINTS: Restrict write access to super_admin profiles only.\nDEFINITION OF DONE: Insecure RLS Policy: system_prompts is resolved and verified by a new scan.\n\n#auto-guardian",
147
+ "verification_criteria": null,
148
+ "type": "MANUAL",
149
+ "created_at": "2026-01-05T13:50:36.911455+00:00",
150
+ "sprint_id": 0,
151
+ "sprint_focus": "Foundation",
152
+ "sprint_description": null,
153
+ "estimated_minutes": 20,
154
+ "verification_type": null,
155
+ "verification_path": null,
156
+ "verification_match": null,
157
+ "summary": null,
158
+ "sprint_number": 1,
159
+ "escalated_by": null,
160
+ "escalated_at": "2026-01-05T13:50:36.911455+00:00",
161
+ "visibility": "private",
162
+ "priority": "HIGH",
163
+ "is_legacy": false,
164
+ "completed_at": null
165
+ },
166
+ {
167
+ "id": "aa6a6ff4-8028-4e91-8af0-0fa53c05dbb0",
168
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
169
+ "step_number": 1000,
170
+ "title": "Create `error_logs` Table and API Route",
171
+ "status": "LOCKED",
172
+ "prompt_content": "Create the `error_logs` table in Supabase with the specified schema (id, user_id, project_id, error_message, stack_trace, url, created_at) and configure Row Level Security (RLS) to protect the data. Implement a POST API route `/api/v1/errors` to receive error logs from the client and server. This route should validate the incoming data and insert it into the `error_logs` table.",
173
+ "verification_criteria": null,
174
+ "type": "CODE",
175
+ "created_at": "2026-01-06T10:18:03.712575+00:00",
176
+ "sprint_id": 0,
177
+ "sprint_focus": "Foundation",
178
+ "sprint_description": null,
179
+ "estimated_minutes": 20,
180
+ "verification_type": null,
181
+ "verification_path": null,
182
+ "verification_match": null,
183
+ "summary": "Setup database table and logging API.",
184
+ "sprint_number": 1,
185
+ "escalated_by": "Frank",
186
+ "escalated_at": "2026-01-06T10:18:03.63+00:00",
187
+ "visibility": "private",
188
+ "priority": "MEDIUM",
189
+ "is_legacy": false,
190
+ "completed_at": null
191
+ },
192
+ {
193
+ "id": "a8e185f3-f9c5-4534-96f5-fd5d50bc84fb",
194
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
195
+ "step_number": 1001,
196
+ "title": "Implement ErrorBoundary Component",
197
+ "status": "LOCKED",
198
+ "prompt_content": "Create an `ErrorBoundary` React component that catches uncaught exceptions in the application. This component should wrap the main application content or individual pages. When an error is caught, the component should display a user-friendly error message and asynchronously send the error details (error message, stack trace, URL) to the `/api/v1/errors` endpoint.",
199
+ "verification_criteria": null,
200
+ "type": "CODE",
201
+ "created_at": "2026-01-06T10:18:03.712575+00:00",
202
+ "sprint_id": 0,
203
+ "sprint_focus": "Foundation",
204
+ "sprint_description": null,
205
+ "estimated_minutes": 20,
206
+ "verification_type": null,
207
+ "verification_path": null,
208
+ "verification_match": null,
209
+ "summary": "Build React ErrorBoundary Component.",
210
+ "sprint_number": 2,
211
+ "escalated_by": "Frank",
212
+ "escalated_at": "2026-01-06T10:18:03.63+00:00",
213
+ "visibility": "private",
214
+ "priority": "MEDIUM",
215
+ "is_legacy": false,
216
+ "completed_at": null
217
+ },
218
+ {
219
+ "id": "e1c1d0b4-f636-4f4c-99a4-736c575935fc",
220
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
221
+ "step_number": 1002,
222
+ "title": "Wrap Application with ErrorBoundary",
223
+ "status": "LOCKED",
224
+ "prompt_content": "Wrap the main application content or individual routes/pages with the `ErrorBoundary` component to ensure that all uncaught exceptions are handled. Implement a strategy to capture necessary context data such as `user_id` and `project_id` within the `ErrorBoundary` to provide more granular context in error logs.",
225
+ "verification_criteria": null,
226
+ "type": "CODE",
227
+ "created_at": "2026-01-06T10:18:03.712575+00:00",
228
+ "sprint_id": 0,
229
+ "sprint_focus": "Foundation",
230
+ "sprint_description": null,
231
+ "estimated_minutes": 20,
232
+ "verification_type": null,
233
+ "verification_path": null,
234
+ "verification_match": null,
235
+ "summary": "Integrate ErrorBoundary into Application.",
236
+ "sprint_number": 2,
237
+ "escalated_by": "Frank",
238
+ "escalated_at": "2026-01-06T10:18:03.63+00:00",
239
+ "visibility": "private",
240
+ "priority": "MEDIUM",
241
+ "is_legacy": false,
242
+ "completed_at": null
243
+ },
244
+ {
245
+ "id": "5fca8601-8fb3-4bf9-bfb2-7bc24feda26f",
246
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
247
+ "step_number": 1003,
248
+ "title": "Build Admin Dashboard for Error Overview",
249
+ "status": "LOCKED",
250
+ "prompt_content": "Create an admin dashboard within the application to provide an overview of the errors logged in the `error_logs` table. This dashboard should display information such as the error message, stack trace, user ID, project ID, and timestamp. Implement filtering and sorting capabilities to help administrators quickly identify and address critical issues.",
251
+ "verification_criteria": null,
252
+ "type": "CODE",
253
+ "created_at": "2026-01-06T10:18:03.712575+00:00",
254
+ "sprint_id": 0,
255
+ "sprint_focus": "Foundation",
256
+ "sprint_description": null,
257
+ "estimated_minutes": 20,
258
+ "verification_type": null,
259
+ "verification_path": null,
260
+ "verification_match": null,
261
+ "summary": "Create Admin Error Monitoring Dashboard.",
262
+ "sprint_number": 3,
263
+ "escalated_by": "Frank",
264
+ "escalated_at": "2026-01-06T10:18:03.63+00:00",
265
+ "visibility": "private",
266
+ "priority": "MEDIUM",
267
+ "is_legacy": false,
268
+ "completed_at": null
269
+ },
270
+ {
271
+ "id": "a8165a27-1f1d-45d5-87f4-468b2cfce98d",
272
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
273
+ "step_number": 1004,
274
+ "title": "Integrate with Sentry (Optional)",
275
+ "status": "LOCKED",
276
+ "prompt_content": "Integrate the application with Sentry (or a similar error tracking service) to enhance error monitoring and reporting capabilities. Configure the `ErrorBoundary` component to send error events to Sentry in addition to logging them to the `error_logs` table. Leverage Sentry's features for grouping, alerting, and advanced error analysis.",
277
+ "verification_criteria": null,
278
+ "type": "CODE",
279
+ "created_at": "2026-01-06T10:18:03.712575+00:00",
280
+ "sprint_id": 0,
281
+ "sprint_focus": "Foundation",
282
+ "sprint_description": null,
283
+ "estimated_minutes": 20,
284
+ "verification_type": null,
285
+ "verification_path": null,
286
+ "verification_match": null,
287
+ "summary": "Integrate Sentry for Enhanced Monitoring.",
288
+ "sprint_number": 3,
289
+ "escalated_by": "Frank",
290
+ "escalated_at": "2026-01-06T10:18:03.63+00:00",
291
+ "visibility": "private",
292
+ "priority": "MEDIUM",
293
+ "is_legacy": false,
294
+ "completed_at": null
295
+ },
296
+ {
297
+ "id": "41baefd7-baf3-44d3-9aad-8faf64fb7d6a",
298
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
299
+ "step_number": 1005,
300
+ "title": "Setup React Query Provider",
301
+ "status": "LOCKED",
302
+ "prompt_content": "Install React Query and configure the QueryClientProvider at the root of the application to enable client-side caching. This includes setting up default query options and potentially a custom retry strategy.",
303
+ "verification_criteria": null,
304
+ "type": "CODE",
305
+ "created_at": "2026-01-06T10:35:29.41946+00:00",
306
+ "sprint_id": 0,
307
+ "sprint_focus": "Foundation",
308
+ "sprint_description": null,
309
+ "estimated_minutes": 20,
310
+ "verification_type": null,
311
+ "verification_path": null,
312
+ "verification_match": null,
313
+ "summary": "Configure React Query for client-side caching.",
314
+ "sprint_number": 1,
315
+ "escalated_by": "Frank",
316
+ "escalated_at": "2026-01-06T10:35:29.377+00:00",
317
+ "visibility": "private",
318
+ "priority": "MEDIUM",
319
+ "is_legacy": false,
320
+ "completed_at": null
321
+ },
322
+ {
323
+ "id": "de44fe4e-fc90-442f-87ec-8432c69324cd",
324
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
325
+ "step_number": 1006,
326
+ "title": "Implement Server-Side Caching with unstable_cache",
327
+ "status": "LOCKED",
328
+ "prompt_content": "Identify frequently accessed data in server components (e.g., project context, tech stack, roadmap) and wrap the data fetching functions with `unstable_cache`. Define appropriate TTLs based on the data's volatility.",
329
+ "verification_criteria": null,
330
+ "type": "CODE",
331
+ "created_at": "2026-01-06T10:35:29.41946+00:00",
332
+ "sprint_id": 0,
333
+ "sprint_focus": "Foundation",
334
+ "sprint_description": null,
335
+ "estimated_minutes": 20,
336
+ "verification_type": null,
337
+ "verification_path": null,
338
+ "verification_match": null,
339
+ "summary": "Enable server-side caching for frequent data.",
340
+ "sprint_number": 2,
341
+ "escalated_by": "Frank",
342
+ "escalated_at": "2026-01-06T10:35:29.377+00:00",
343
+ "visibility": "private",
344
+ "priority": "MEDIUM",
345
+ "is_legacy": false,
346
+ "completed_at": null
347
+ },
348
+ {
349
+ "id": "569aad50-0096-40c5-8e3a-41a65fb7e30f",
350
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
351
+ "step_number": 1007,
352
+ "title": "Implement Cache Invalidation on Mutations",
353
+ "status": "LOCKED",
354
+ "prompt_content": "When mutations occur (e.g., updating a project, adding a new tech stack), trigger cache invalidation for relevant queries using React Query's `queryClient.invalidateQueries` and Next.js's `revalidatePath` or `revalidateTag`.",
355
+ "verification_criteria": null,
356
+ "type": "CODE",
357
+ "created_at": "2026-01-06T10:35:29.41946+00:00",
358
+ "sprint_id": 0,
359
+ "sprint_focus": "Foundation",
360
+ "sprint_description": null,
361
+ "estimated_minutes": 20,
362
+ "verification_type": null,
363
+ "verification_path": null,
364
+ "verification_match": null,
365
+ "summary": "Invalidate cache on data modification events.",
366
+ "sprint_number": 2,
367
+ "escalated_by": "Frank",
368
+ "escalated_at": "2026-01-06T10:35:29.377+00:00",
369
+ "visibility": "private",
370
+ "priority": "MEDIUM",
371
+ "is_legacy": false,
372
+ "completed_at": null
373
+ },
374
+ {
375
+ "id": "2cf3faac-067d-4a6c-99dc-938cf8bfd1b8",
376
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
377
+ "step_number": 1008,
378
+ "title": "Monitor Performance and Adjust TTLs",
379
+ "status": "LOCKED",
380
+ "prompt_content": "Monitor the application's performance (response times, database load) after implementing the caching layer. Adjust the TTLs for cached data based on observed performance and data staleness requirements. Refactor as needed.",
381
+ "verification_criteria": null,
382
+ "type": "CODE",
383
+ "created_at": "2026-01-06T10:35:29.41946+00:00",
384
+ "sprint_id": 0,
385
+ "sprint_focus": "Foundation",
386
+ "sprint_description": null,
387
+ "estimated_minutes": 20,
388
+ "verification_type": null,
389
+ "verification_path": null,
390
+ "verification_match": null,
391
+ "summary": "Monitor and fine-tune cache configurations.",
392
+ "sprint_number": 3,
393
+ "escalated_by": "Frank",
394
+ "escalated_at": "2026-01-06T10:35:29.377+00:00",
395
+ "visibility": "private",
396
+ "priority": "MEDIUM",
397
+ "is_legacy": false,
398
+ "completed_at": null
399
+ },
400
+ {
401
+ "id": "a0500716-55ec-4e66-99b0-4f51f59243f1",
402
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
403
+ "step_number": 1009,
404
+ "title": "Implement Rate Limiting Middleware",
405
+ "status": "LOCKED",
406
+ "prompt_content": "Create a middleware function that implements the sliding window algorithm using either Upstash Redis (preferred) or an in-memory store as a fallback. The middleware should check the number of requests from a given IP address (or API key if available) within the current time window. Include logic for configurable rate limits.",
407
+ "verification_criteria": null,
408
+ "type": "CODE",
409
+ "created_at": "2026-01-06T11:27:18.659272+00:00",
410
+ "sprint_id": 0,
411
+ "sprint_focus": "Foundation",
412
+ "sprint_description": null,
413
+ "estimated_minutes": 20,
414
+ "verification_type": null,
415
+ "verification_path": null,
416
+ "verification_match": null,
417
+ "summary": "Create rate limiting middleware function",
418
+ "sprint_number": 1,
419
+ "escalated_by": "Frank",
420
+ "escalated_at": "2026-01-06T11:27:18.571+00:00",
421
+ "visibility": "private",
422
+ "priority": "MEDIUM",
423
+ "is_legacy": false,
424
+ "completed_at": null
425
+ },
426
+ {
427
+ "id": "4d51757b-2c33-4e14-9cf4-0d4dc638c6e9",
428
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
429
+ "step_number": 1010,
430
+ "title": "Configure Rate Limits",
431
+ "status": "LOCKED",
432
+ "prompt_content": "Define a configuration structure for specifying rate limits per endpoint (e.g., requests per minute). Implement logic to read these configurations, allowing different limits for different routes. Initially, set reasonable defaults.",
433
+ "verification_criteria": null,
434
+ "type": "CODE",
435
+ "created_at": "2026-01-06T11:27:18.659272+00:00",
436
+ "sprint_id": 0,
437
+ "sprint_focus": "Foundation",
438
+ "sprint_description": null,
439
+ "estimated_minutes": 20,
440
+ "verification_type": null,
441
+ "verification_path": null,
442
+ "verification_match": null,
443
+ "summary": "Define and read rate limit configurations",
444
+ "sprint_number": 2,
445
+ "escalated_by": "Frank",
446
+ "escalated_at": "2026-01-06T11:27:18.571+00:00",
447
+ "visibility": "private",
448
+ "priority": "MEDIUM",
449
+ "is_legacy": false,
450
+ "completed_at": null
451
+ },
452
+ {
453
+ "id": "8eb5f854-30e0-41d4-bb88-27d854e3c60e",
454
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
455
+ "step_number": 1011,
456
+ "title": "Apply Middleware to Public API Routes",
457
+ "status": "LOCKED",
458
+ "prompt_content": "Apply the rate-limiting middleware to all routes under `/api/v1/*`. Ensure the middleware is correctly integrated into the application's request processing pipeline.",
459
+ "verification_criteria": null,
460
+ "type": "CODE",
461
+ "created_at": "2026-01-06T11:27:18.659272+00:00",
462
+ "sprint_id": 0,
463
+ "sprint_focus": "Foundation",
464
+ "sprint_description": null,
465
+ "estimated_minutes": 20,
466
+ "verification_type": null,
467
+ "verification_path": null,
468
+ "verification_match": null,
469
+ "summary": "Apply middleware to /api/v1/* routes",
470
+ "sprint_number": 2,
471
+ "escalated_by": "Frank",
472
+ "escalated_at": "2026-01-06T11:27:18.571+00:00",
473
+ "visibility": "private",
474
+ "priority": "MEDIUM",
475
+ "is_legacy": false,
476
+ "completed_at": null
477
+ },
478
+ {
479
+ "id": "3784e7a0-629c-419d-9327-1743444466dc",
480
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
481
+ "step_number": 1012,
482
+ "title": "Implement 429 Response",
483
+ "status": "LOCKED",
484
+ "prompt_content": "When the rate limit is exceeded, return a 429 Too Many Requests HTTP response with a `Retry-After` header indicating how long the client should wait before making another request. Test this thoroughly.",
485
+ "verification_criteria": null,
486
+ "type": "CODE",
487
+ "created_at": "2026-01-06T11:27:18.659272+00:00",
488
+ "sprint_id": 0,
489
+ "sprint_focus": "Foundation",
490
+ "sprint_description": null,
491
+ "estimated_minutes": 20,
492
+ "verification_type": null,
493
+ "verification_path": null,
494
+ "verification_match": null,
495
+ "summary": "Return 429 with Retry-After header",
496
+ "sprint_number": 2,
497
+ "escalated_by": "Frank",
498
+ "escalated_at": "2026-01-06T11:27:18.571+00:00",
499
+ "visibility": "private",
500
+ "priority": "MEDIUM",
501
+ "is_legacy": false,
502
+ "completed_at": null
503
+ },
504
+ {
505
+ "id": "d95fba4b-170c-4713-a80d-dc4d255a281c",
506
+ "project_id": "bb9f8445-39fd-438c-8ab6-8057f5514395",
507
+ "step_number": 1013,
508
+ "title": "Admin Configurable API Keys",
509
+ "status": "LOCKED",
510
+ "prompt_content": "Implement functionality so an admin user can configure specific rate limits for specific API keys. The system should fall back to the default IP-based rate limiting when an API key is not provided.",
511
+ "verification_criteria": null,
512
+ "type": "CODE",
513
+ "created_at": "2026-01-06T11:27:18.659272+00:00",
514
+ "sprint_id": 0,
515
+ "sprint_focus": "Foundation",
516
+ "sprint_description": null,
517
+ "estimated_minutes": 20,
518
+ "verification_type": null,
519
+ "verification_path": null,
520
+ "verification_match": null,
521
+ "summary": "Allow admin configuration per API key",
522
+ "sprint_number": 3,
523
+ "escalated_by": "Frank",
524
+ "escalated_at": "2026-01-06T11:27:18.571+00:00",
525
+ "visibility": "private",
526
+ "priority": "MEDIUM",
527
+ "is_legacy": false,
528
+ "completed_at": null
529
+ }
530
+ ]
531
+ }