midas-mcp 1.0.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 (78) hide show
  1. package/README.md +167 -0
  2. package/dist/docs/CHEATSHEET.md +122 -0
  3. package/dist/docs/INGREDIENTS.md +173 -0
  4. package/dist/docs/METHODOLOGY.md +334 -0
  5. package/dist/docs/PROMPTS.md +347 -0
  6. package/dist/docs/SPEC.md +330 -0
  7. package/dist/docs/USER_RULES.md +90 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +15 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/prompts/development.d.ts +3 -0
  13. package/dist/prompts/development.d.ts.map +1 -0
  14. package/dist/prompts/development.js +90 -0
  15. package/dist/prompts/development.js.map +1 -0
  16. package/dist/prompts/index.d.ts +3 -0
  17. package/dist/prompts/index.d.ts.map +1 -0
  18. package/dist/prompts/index.js +11 -0
  19. package/dist/prompts/index.js.map +1 -0
  20. package/dist/prompts/research.d.ts +3 -0
  21. package/dist/prompts/research.d.ts.map +1 -0
  22. package/dist/prompts/research.js +56 -0
  23. package/dist/prompts/research.js.map +1 -0
  24. package/dist/prompts/review.d.ts +3 -0
  25. package/dist/prompts/review.d.ts.map +1 -0
  26. package/dist/prompts/review.js +76 -0
  27. package/dist/prompts/review.js.map +1 -0
  28. package/dist/prompts/session.d.ts +3 -0
  29. package/dist/prompts/session.d.ts.map +1 -0
  30. package/dist/prompts/session.js +35 -0
  31. package/dist/prompts/session.js.map +1 -0
  32. package/dist/resources/index.d.ts +3 -0
  33. package/dist/resources/index.d.ts.map +1 -0
  34. package/dist/resources/index.js +63 -0
  35. package/dist/resources/index.js.map +1 -0
  36. package/dist/server.d.ts +3 -0
  37. package/dist/server.d.ts.map +1 -0
  38. package/dist/server.js +65 -0
  39. package/dist/server.js.map +1 -0
  40. package/dist/state/phase.d.ts +32 -0
  41. package/dist/state/phase.d.ts.map +1 -0
  42. package/dist/state/phase.js +125 -0
  43. package/dist/state/phase.js.map +1 -0
  44. package/dist/tools/audit.d.ts +23 -0
  45. package/dist/tools/audit.d.ts.map +1 -0
  46. package/dist/tools/audit.js +212 -0
  47. package/dist/tools/audit.js.map +1 -0
  48. package/dist/tools/docs.d.ts +23 -0
  49. package/dist/tools/docs.d.ts.map +1 -0
  50. package/dist/tools/docs.js +66 -0
  51. package/dist/tools/docs.js.map +1 -0
  52. package/dist/tools/horizon.d.ts +20 -0
  53. package/dist/tools/horizon.d.ts.map +1 -0
  54. package/dist/tools/horizon.js +75 -0
  55. package/dist/tools/horizon.js.map +1 -0
  56. package/dist/tools/index.d.ts +7 -0
  57. package/dist/tools/index.d.ts.map +1 -0
  58. package/dist/tools/index.js +13 -0
  59. package/dist/tools/index.js.map +1 -0
  60. package/dist/tools/oneshot.d.ts +21 -0
  61. package/dist/tools/oneshot.d.ts.map +1 -0
  62. package/dist/tools/oneshot.js +27 -0
  63. package/dist/tools/oneshot.js.map +1 -0
  64. package/dist/tools/phase.d.ts +51 -0
  65. package/dist/tools/phase.d.ts.map +1 -0
  66. package/dist/tools/phase.js +152 -0
  67. package/dist/tools/phase.js.map +1 -0
  68. package/dist/tools/tornado.d.ts +20 -0
  69. package/dist/tools/tornado.d.ts.map +1 -0
  70. package/dist/tools/tornado.js +61 -0
  71. package/dist/tools/tornado.js.map +1 -0
  72. package/docs/CHEATSHEET.md +122 -0
  73. package/docs/INGREDIENTS.md +173 -0
  74. package/docs/METHODOLOGY.md +334 -0
  75. package/docs/PROMPTS.md +347 -0
  76. package/docs/SPEC.md +330 -0
  77. package/docs/USER_RULES.md +90 -0
  78. package/package.json +42 -0
package/docs/SPEC.md ADDED
@@ -0,0 +1,330 @@
1
+ # Midas MCP Technical Specification
2
+
3
+ Technical design for the midas-mcp server.
4
+
5
+ ---
6
+
7
+ ## Architecture
8
+
9
+ ```
10
+ midas-mcp/
11
+ ├── src/
12
+ │ ├── index.ts # MCP server entry point
13
+ │ ├── server.ts # Server setup and configuration
14
+ │ ├── tools/
15
+ │ │ ├── index.ts # Tool exports
16
+ │ │ ├── phase.ts # Phase tracking tools
17
+ │ │ ├── audit.ts # 12 ingredients audit
18
+ │ │ ├── docs.ts # Check docs completeness
19
+ │ │ ├── oneshot.ts # Oneshot paradigm helper
20
+ │ │ ├── tornado.ts # Tornado cycle trigger
21
+ │ │ └── horizon.ts # Horizon expansion helper
22
+ │ ├── prompts/
23
+ │ │ ├── index.ts # Prompt exports
24
+ │ │ ├── session.ts # Master/execution prompts
25
+ │ │ ├── development.ts # Feature/bug prompts
26
+ │ │ ├── review.ts # Security/performance review
27
+ │ │ └── research.ts # Research prompts
28
+ │ ├── resources/
29
+ │ │ ├── index.ts # Resource exports
30
+ │ │ ├── methodology.ts # Core methodology content
31
+ │ │ ├── prompts.ts # Prompt library content
32
+ │ │ └── ingredients.ts # 12 ingredients content
33
+ │ └── state/
34
+ │ └── phase.ts # Phase state machine
35
+ ├── docs/
36
+ │ ├── METHODOLOGY.md # Source content
37
+ │ ├── PROMPTS.md # Source content
38
+ │ ├── INGREDIENTS.md # Source content
39
+ │ ├── USER_RULES.md # Source content
40
+ │ └── SPEC.md # This file
41
+ ├── package.json
42
+ ├── tsconfig.json
43
+ └── README.md
44
+ ```
45
+
46
+ ---
47
+
48
+ ## Phase State Machine
49
+
50
+ ```typescript
51
+ type EagleSightStep =
52
+ | 'IDEA'
53
+ | 'RESEARCH'
54
+ | 'BRAINLIFT'
55
+ | 'PRD'
56
+ | 'GAMEPLAN';
57
+
58
+ type BuildStep =
59
+ | 'RULES_LOADED'
60
+ | 'CODEBASE_INDEXED'
61
+ | 'FILES_READ'
62
+ | 'RESEARCHING'
63
+ | 'IMPLEMENTING'
64
+ | 'TESTING'
65
+ | 'DEBUGGING';
66
+
67
+ type Phase =
68
+ | { phase: 'IDLE' }
69
+ | { phase: 'EAGLE_SIGHT'; step: EagleSightStep }
70
+ | { phase: 'BUILD'; step: BuildStep }
71
+ | { phase: 'SHIPPED' };
72
+
73
+ interface PhaseState {
74
+ current: Phase;
75
+ history: Phase[];
76
+ startedAt: string;
77
+ docs: {
78
+ brainlift: boolean;
79
+ prd: boolean;
80
+ gameplan: boolean;
81
+ };
82
+ }
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Tools Specification
88
+
89
+ ### midas_start_project
90
+
91
+ Initializes a new project with Eagle Sight.
92
+
93
+ **Input:**
94
+ ```typescript
95
+ {
96
+ projectName: string;
97
+ projectPath?: string; // defaults to cwd
98
+ }
99
+ ```
100
+
101
+ **Behavior:**
102
+ 1. Creates `docs/` folder
103
+ 2. Creates `docs/brainlift.md` with template
104
+ 3. Creates `docs/prd.md` with template
105
+ 4. Creates `docs/gameplan.md` with template
106
+ 5. Sets phase to `EAGLE_SIGHT.IDEA`
107
+ 6. Returns guidance for next step
108
+
109
+ ---
110
+
111
+ ### midas_get_phase
112
+
113
+ Returns current phase and recommended actions.
114
+
115
+ **Input:** none
116
+
117
+ **Output:**
118
+ ```typescript
119
+ {
120
+ current: Phase;
121
+ nextSteps: string[];
122
+ prompt?: string; // suggested prompt for this phase
123
+ }
124
+ ```
125
+
126
+ ---
127
+
128
+ ### midas_set_phase
129
+
130
+ Manually set the current phase.
131
+
132
+ **Input:**
133
+ ```typescript
134
+ {
135
+ phase: 'EAGLE_SIGHT' | 'BUILD' | 'SHIPPED';
136
+ step?: string;
137
+ }
138
+ ```
139
+
140
+ ---
141
+
142
+ ### midas_audit
143
+
144
+ Audit project against 12 ingredients.
145
+
146
+ **Input:**
147
+ ```typescript
148
+ {
149
+ projectPath?: string;
150
+ }
151
+ ```
152
+
153
+ **Output:**
154
+ ```typescript
155
+ {
156
+ scores: {
157
+ [ingredient: string]: {
158
+ exists: boolean;
159
+ score: number; // 0-100
160
+ issues: string[];
161
+ suggestions: string[];
162
+ }
163
+ };
164
+ overall: number;
165
+ level: 'functional' | 'integrated' | 'protected' | 'production';
166
+ }
167
+ ```
168
+
169
+ ---
170
+
171
+ ### midas_check_docs
172
+
173
+ Verify Eagle Sight docs exist and are complete.
174
+
175
+ **Input:**
176
+ ```typescript
177
+ {
178
+ projectPath?: string;
179
+ }
180
+ ```
181
+
182
+ **Output:**
183
+ ```typescript
184
+ {
185
+ brainlift: { exists: boolean; complete: boolean; issues: string[] };
186
+ prd: { exists: boolean; complete: boolean; issues: string[] };
187
+ gameplan: { exists: boolean; complete: boolean; issues: string[] };
188
+ ready: boolean;
189
+ }
190
+ ```
191
+
192
+ ---
193
+
194
+ ### midas_oneshot
195
+
196
+ Construct a Oneshot retry prompt.
197
+
198
+ **Input:**
199
+ ```typescript
200
+ {
201
+ originalPrompt: string;
202
+ error: string;
203
+ learnings?: string[];
204
+ }
205
+ ```
206
+
207
+ **Output:**
208
+ ```typescript
209
+ {
210
+ prompt: string; // constructed oneshot prompt
211
+ }
212
+ ```
213
+
214
+ ---
215
+
216
+ ### midas_tornado
217
+
218
+ Guide through tornado cycle.
219
+
220
+ **Input:**
221
+ ```typescript
222
+ {
223
+ problem: string;
224
+ currentStep?: 'research' | 'logs' | 'tests';
225
+ }
226
+ ```
227
+
228
+ **Output:**
229
+ ```typescript
230
+ {
231
+ nextStep: 'research' | 'logs' | 'tests';
232
+ guidance: string;
233
+ prompt: string;
234
+ }
235
+ ```
236
+
237
+ ---
238
+
239
+ ### midas_horizon
240
+
241
+ Expand horizontal context.
242
+
243
+ **Input:**
244
+ ```typescript
245
+ {
246
+ currentOutput: string;
247
+ expectedOutput: string;
248
+ }
249
+ ```
250
+
251
+ **Output:**
252
+ ```typescript
253
+ {
254
+ missingContext: string[];
255
+ expandedPrompt: string;
256
+ checklist: string[];
257
+ }
258
+ ```
259
+
260
+ ---
261
+
262
+ ## Prompts Specification
263
+
264
+ Each prompt is exposed via MCP prompt capability.
265
+
266
+ ### Session Prompts
267
+ - `master_prompt` - Initialize session
268
+ - `execution_prompt` - Start building
269
+
270
+ ### Development Prompts
271
+ - `feature_planning` - Plan before implementing
272
+ - `feature_implementation` - Implement with TDD
273
+ - `bug_investigation` - Diagnose before fixing
274
+ - `bug_fix` - Fix with test-first
275
+
276
+ ### Review Prompts
277
+ - `security_review` - Check for vulnerabilities
278
+ - `performance_review` - Check for bottlenecks
279
+ - `safe_refactor` - Move code safely
280
+
281
+ ### Problem-Solving Prompts
282
+ - `oneshot_retry` - Retry with full context
283
+ - `tornado_trigger` - Research + Logs + Tests
284
+ - `horizon_expansion` - Add missing context
285
+
286
+ ---
287
+
288
+ ## Resources Specification
289
+
290
+ Resources are served via MCP resource capability.
291
+
292
+ | URI | Content |
293
+ |-----|---------|
294
+ | `midas://methodology` | METHODOLOGY.md |
295
+ | `midas://prompts` | PROMPTS.md |
296
+ | `midas://ingredients` | INGREDIENTS.md |
297
+ | `midas://user-rules` | USER_RULES.md |
298
+ | `midas://cheatsheet` | Quick reference |
299
+
300
+ ---
301
+
302
+ ## Implementation Notes
303
+
304
+ ### Dependencies
305
+ - `@modelcontextprotocol/sdk` - MCP SDK
306
+ - `zod` - Input validation
307
+
308
+ ### State Persistence
309
+ Phase state stored in `.midas/state.json` in project root.
310
+
311
+ ### Error Handling
312
+ All tools return structured errors:
313
+ ```typescript
314
+ {
315
+ error: string;
316
+ code: 'NOT_FOUND' | 'INVALID_INPUT' | 'PHASE_ERROR';
317
+ suggestion?: string;
318
+ }
319
+ ```
320
+
321
+ ### Logging
322
+ Use structured logging for debugging:
323
+ ```typescript
324
+ console.error(JSON.stringify({
325
+ level: 'error',
326
+ tool: 'midas_audit',
327
+ message: 'Failed to scan project',
328
+ error: err.message
329
+ }));
330
+ ```
@@ -0,0 +1,90 @@
1
+ # User Rules Reference
2
+
3
+ Expert user rules for .cursorrules files.
4
+
5
+ ---
6
+
7
+ ## Documentation Style
8
+
9
+ - No emojis, no ALL CAPS, no markdown tables with dashes/pipes
10
+ - No em dashes, no excessive formatting
11
+ - Bold key words inside sentences for emphasis
12
+ - Write tersely, casually, high IQ
13
+
14
+ ---
15
+
16
+ ## Paid Services (Firebase, APIs, etc.)
17
+
18
+ - **SHOW THE MATH** - Calculate and comment max monthly cost
19
+ - **LIMIT EVERYTHING** - No operation without explicit maximum
20
+ - **PREVENT LOOPS** - Code must not trigger itself without guards
21
+
22
+ ---
23
+
24
+ ## Security
25
+
26
+ - Build exhaustively secure, unhackable
27
+ - Comprehensive .gitignore from day 1
28
+ - Production-ready always
29
+ - Never git push an API key
30
+
31
+ ---
32
+
33
+ ## Code Quality
34
+
35
+ - Single responsibility principle
36
+ - Achieve each task in minimum tokens
37
+ - Testflight-deployable builds
38
+ - Add logs and look up documentation to debug
39
+
40
+ ---
41
+
42
+ ## Workflow
43
+
44
+ - Don't delete scripts when done, move to scripts folder
45
+ - Try to compile/build before git committing, fix errors as needed
46
+ - Simple short git commit after changes, no emojis or special characters
47
+ - Deploy Firebase rules/functions/indexes when changed
48
+ - Deploy Firebase cloud functions when updated
49
+
50
+ ---
51
+
52
+ ## Testing
53
+
54
+ - Use iPhone 16 or 16 Pro for Xcode iOS simulator
55
+
56
+ ---
57
+
58
+ ## Full Rules Template
59
+
60
+ ```plaintext
61
+ # DOCUMENTATION
62
+ - No emojis, no ALL CAPS, no tables with dashes/pipes
63
+ - No em dashes, no excessive formatting
64
+ - Bold for emphasis, write tersely, casually, high IQ
65
+
66
+ # PAID SERVICES
67
+ - SHOW THE MATH - Calculate and comment max monthly cost
68
+ - LIMIT EVERYTHING - No operation without explicit maximum
69
+ - PREVENT LOOPS - Code must not trigger itself without guards
70
+
71
+ # SECURITY
72
+ - Build exhaustively secure, unhackable
73
+ - Comprehensive .gitignore from day 1
74
+ - Production-ready always
75
+ - Never git push an API key
76
+
77
+ # CODE QUALITY
78
+ - Single responsibility principle
79
+ - Achieve each task in minimum tokens
80
+ - Add logs and look up documentation to debug
81
+
82
+ # WORKFLOW
83
+ - Don't delete scripts, move to scripts folder
84
+ - Compile/build before git committing
85
+ - Simple short git commit, no emojis or special characters
86
+ - Deploy Firebase rules/functions/indexes when changed
87
+
88
+ # TESTING
89
+ - Use iPhone 16 or 16 Pro for Xcode iOS simulator
90
+ ```
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "midas-mcp",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for Elite Vibecoding - everything you vibecode turns to gold",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "midas-mcp": "./dist/index.js"
8
+ },
9
+ "type": "module",
10
+ "scripts": {
11
+ "build": "tsc && cp -r docs dist/",
12
+ "dev": "tsc --watch",
13
+ "start": "node dist/index.js",
14
+ "prepublishOnly": "npm run build"
15
+ },
16
+ "keywords": [
17
+ "mcp",
18
+ "model-context-protocol",
19
+ "vibecoding",
20
+ "cursor",
21
+ "ai-assistant",
22
+ "developer-tools"
23
+ ],
24
+ "author": "",
25
+ "license": "MIT",
26
+ "dependencies": {
27
+ "@modelcontextprotocol/sdk": "^1.0.0",
28
+ "zod": "^3.23.0"
29
+ },
30
+ "devDependencies": {
31
+ "@types/node": "^20.0.0",
32
+ "typescript": "^5.0.0"
33
+ },
34
+ "engines": {
35
+ "node": ">=18.0.0"
36
+ },
37
+ "files": [
38
+ "dist",
39
+ "docs",
40
+ "README.md"
41
+ ]
42
+ }