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
@@ -0,0 +1,152 @@
1
+ import { z } from 'zod';
2
+ import { loadState, saveState, setPhase, getPhaseGuidance, getDefaultState, } from '../state/phase.js';
3
+ import { existsSync, mkdirSync, writeFileSync } from 'fs';
4
+ import { join } from 'path';
5
+ // Tool: midas_start_project
6
+ export const startProjectSchema = z.object({
7
+ projectName: z.string().describe('Name of the project'),
8
+ projectPath: z.string().optional().describe('Path to project root, defaults to cwd'),
9
+ });
10
+ export function startProject(input) {
11
+ const projectPath = input.projectPath || process.cwd();
12
+ const docsPath = join(projectPath, 'docs');
13
+ // Create docs folder
14
+ if (!existsSync(docsPath)) {
15
+ mkdirSync(docsPath, { recursive: true });
16
+ }
17
+ // Create brainlift template
18
+ const brainliftContent = `# Brainlift: ${input.projectName}
19
+
20
+ ## Contrarian Insights
21
+ - [What do YOU know that contradicts conventional wisdom?]
22
+ - [What have you learned from experience that AI can't know?]
23
+
24
+ ## Domain Knowledge
25
+ - [Industry-specific context]
26
+ - [User behavior patterns you've observed]
27
+
28
+ ## Hard-Won Lessons
29
+ - [What NOT to do based on past experience]
30
+ - [Hidden gotchas in this space]
31
+
32
+ ## Current Context
33
+ - [Recent market changes]
34
+ - [Technology updates post-training-cutoff]
35
+ `;
36
+ // Create PRD template
37
+ const prdContent = `# PRD: ${input.projectName}
38
+
39
+ ## Overview
40
+ [One-paragraph description]
41
+
42
+ ## Goals
43
+ 1. [Primary goal]
44
+ 2. [Secondary goal]
45
+
46
+ ## Non-Goals
47
+ - [What you're explicitly NOT building]
48
+
49
+ ## User Stories
50
+ - As a [user type], I want to [action] so that [benefit]
51
+
52
+ ## Technical Requirements
53
+ - [Performance, security, integration requirements]
54
+
55
+ ## Success Metrics
56
+ - [How you'll measure success]
57
+ `;
58
+ // Create Gameplan template
59
+ const gameplanContent = `# Gameplan: ${input.projectName}
60
+
61
+ ## Tech Stack
62
+ [Stack choice with justification]
63
+
64
+ ## Architecture Overview
65
+ [High-level system design]
66
+
67
+ ## Phase 1: Foundation
68
+ - [ ] Task 1
69
+ - [ ] Task 2
70
+
71
+ ## Phase 2: Core Features
72
+ - [ ] Task 1
73
+ - [ ] Task 2
74
+
75
+ ## Risk Mitigation
76
+ - Risk: [issue] → Mitigation: [solution]
77
+ `;
78
+ // Write templates if they don't exist
79
+ const brainliftPath = join(docsPath, 'brainlift.md');
80
+ const prdPath = join(docsPath, 'prd.md');
81
+ const gameplanPath = join(docsPath, 'gameplan.md');
82
+ if (!existsSync(brainliftPath)) {
83
+ writeFileSync(brainliftPath, brainliftContent);
84
+ }
85
+ if (!existsSync(prdPath)) {
86
+ writeFileSync(prdPath, prdContent);
87
+ }
88
+ if (!existsSync(gameplanPath)) {
89
+ writeFileSync(gameplanPath, gameplanContent);
90
+ }
91
+ // Initialize state
92
+ const state = getDefaultState();
93
+ state.current = { phase: 'EAGLE_SIGHT', step: 'IDEA' };
94
+ state.startedAt = new Date().toISOString();
95
+ saveState(projectPath, state);
96
+ return {
97
+ success: true,
98
+ message: `Project "${input.projectName}" initialized with Eagle Sight docs.`,
99
+ nextSteps: [
100
+ 'Fill out docs/brainlift.md with your unique insights',
101
+ 'Define requirements in docs/prd.md',
102
+ 'Plan the build in docs/gameplan.md',
103
+ 'Use midas_get_phase to see current progress',
104
+ ],
105
+ };
106
+ }
107
+ // Tool: midas_get_phase
108
+ export const getPhaseSchema = z.object({
109
+ projectPath: z.string().optional().describe('Path to project root'),
110
+ });
111
+ export function getPhase(input) {
112
+ const projectPath = input.projectPath || process.cwd();
113
+ const state = loadState(projectPath);
114
+ const guidance = getPhaseGuidance(state.current);
115
+ return {
116
+ current: state.current,
117
+ nextSteps: guidance.nextSteps,
118
+ prompt: guidance.prompt,
119
+ };
120
+ }
121
+ // Tool: midas_set_phase
122
+ export const setPhaseSchema = z.object({
123
+ phase: z.enum(['IDLE', 'EAGLE_SIGHT', 'BUILD', 'SHIPPED']).describe('Target phase'),
124
+ step: z.string().optional().describe('Step within phase'),
125
+ projectPath: z.string().optional().describe('Path to project root'),
126
+ });
127
+ export function setPhaseManually(input) {
128
+ const projectPath = input.projectPath || process.cwd();
129
+ let newPhase;
130
+ if (input.phase === 'IDLE') {
131
+ newPhase = { phase: 'IDLE' };
132
+ }
133
+ else if (input.phase === 'SHIPPED') {
134
+ newPhase = { phase: 'SHIPPED' };
135
+ }
136
+ else if (input.phase === 'EAGLE_SIGHT') {
137
+ const step = input.step || 'IDEA';
138
+ newPhase = { phase: 'EAGLE_SIGHT', step };
139
+ }
140
+ else {
141
+ const step = input.step || 'RULES_LOADED';
142
+ newPhase = { phase: 'BUILD', step };
143
+ }
144
+ const state = setPhase(projectPath, newPhase);
145
+ const guidance = getPhaseGuidance(state.current);
146
+ return {
147
+ success: true,
148
+ current: state.current,
149
+ nextSteps: guidance.nextSteps,
150
+ };
151
+ }
152
+ //# sourceMappingURL=phase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phase.js","sourceRoot":"","sources":["../../src/tools/phase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,SAAS,EACT,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,eAAe,GAIhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,4BAA4B;AAC5B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IACvD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;CACrF,CAAC,CAAC;AAIH,MAAM,UAAU,YAAY,CAAC,KAAwB;IAKnD,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAE3C,qBAAqB;IACrB,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,SAAS,CAAC,QAAQ,EAAE,EAAE,SA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AAG,EAAE,CAAC;IAEvD,IAAI,QAAe,CAAC;IAEpB,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;QAC3B,QAAQ,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC/B,CAAC;SAAM,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QACrC,QAAQ,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAClC,CAAC;SAAM,IAAI,KAAK,CAAC,KAAK,KAAK,aAAa,EAAE,CAAC;QACzC,MAAM,IAAI,GAAI,KAAK,CAAC,IAAuB,IAAI,MAAM,CAAC;QACtD,QAAQ,GAAG,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IAC5C,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,GAAI,KAAK,CAAC,IAAkB,IAAI,cAAc,CAAC;QACzD,QAAQ,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACtC,CAAC;IAED,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAEjD,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,SAAS,EAAE,QAAQ,CAAC,SAAS;KAC9B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ export declare const tornadoSchema: z.ZodObject<{
3
+ problem: z.ZodString;
4
+ currentStep: z.ZodOptional<z.ZodEnum<["research", "logs", "tests"]>>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ problem: string;
7
+ currentStep?: "research" | "logs" | "tests" | undefined;
8
+ }, {
9
+ problem: string;
10
+ currentStep?: "research" | "logs" | "tests" | undefined;
11
+ }>;
12
+ export type TornadoInput = z.infer<typeof tornadoSchema>;
13
+ interface TornadoResult {
14
+ nextStep: 'research' | 'logs' | 'tests';
15
+ guidance: string;
16
+ prompt: string;
17
+ }
18
+ export declare function triggerTornado(input: TornadoInput): TornadoResult;
19
+ export {};
20
+ //# sourceMappingURL=tornado.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tornado.d.ts","sourceRoot":"","sources":["../../src/tools/tornado.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa;;;;;;;;;EAGxB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEzD,UAAU,aAAa;IACrB,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,aAAa,CAsDjE"}
@@ -0,0 +1,61 @@
1
+ import { z } from 'zod';
2
+ export const tornadoSchema = z.object({
3
+ problem: z.string().describe('Description of the problem you are stuck on'),
4
+ currentStep: z.enum(['research', 'logs', 'tests']).optional().describe('Which tornado step you just completed'),
5
+ });
6
+ export function triggerTornado(input) {
7
+ // Determine next step in the cycle
8
+ let nextStep;
9
+ if (!input.currentStep) {
10
+ nextStep = 'research';
11
+ }
12
+ else if (input.currentStep === 'research') {
13
+ nextStep = 'logs';
14
+ }
15
+ else if (input.currentStep === 'logs') {
16
+ nextStep = 'tests';
17
+ }
18
+ else {
19
+ nextStep = 'research'; // Cycle back
20
+ }
21
+ const stepDetails = {
22
+ research: {
23
+ guidance: 'Start by researching the problem. Look up documentation, examples, and known issues.',
24
+ prompt: `Research phase for: ${input.problem}
25
+
26
+ 1. Search for documentation related to this problem
27
+ 2. Look for similar issues and their solutions
28
+ 3. Find best practices for this use case
29
+ 4. Note any gotchas or common pitfalls
30
+
31
+ After research, run midas_tornado with currentStep='research' to move to logging.`,
32
+ },
33
+ logs: {
34
+ guidance: 'Add strategic console.logs or debug statements at decision points.',
35
+ prompt: `Logging phase for: ${input.problem}
36
+
37
+ 1. Add logs at the entry point of the problematic code
38
+ 2. Log the state/values at each decision point
39
+ 3. Log before and after async operations
40
+ 4. Include enough context to trace the flow
41
+
42
+ Run the code and analyze the logs. Then run midas_tornado with currentStep='logs' to move to testing.`,
43
+ },
44
+ tests: {
45
+ guidance: 'Write tests that verify the expected behavior and help isolate the issue.',
46
+ prompt: `Testing phase for: ${input.problem}
47
+
48
+ 1. Write a test that reproduces the current (broken) behavior
49
+ 2. Write a test that defines the expected (correct) behavior
50
+ 3. Run both tests to confirm the failure mode
51
+ 4. Use test output to narrow down the root cause
52
+
53
+ If still stuck, run midas_tornado with currentStep='tests' to cycle back to more research.`,
54
+ },
55
+ };
56
+ return {
57
+ nextStep,
58
+ ...stepDetails[nextStep],
59
+ };
60
+ }
61
+ //# sourceMappingURL=tornado.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tornado.js","sourceRoot":"","sources":["../../src/tools/tornado.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IAC3E,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;CAChH,CAAC,CAAC;AAUH,MAAM,UAAU,cAAc,CAAC,KAAmB;IAChD,mCAAmC;IACnC,IAAI,QAAuC,CAAC;IAE5C,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QACvB,QAAQ,GAAG,UAAU,CAAC;IACxB,CAAC;SAAM,IAAI,KAAK,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;QAC5C,QAAQ,GAAG,MAAM,CAAC;IACpB,CAAC;SAAM,IAAI,KAAK,CAAC,WAAW,KAAK,MAAM,EAAE,CAAC;QACxC,QAAQ,GAAG,OAAO,CAAC;IACrB,CAAC;SAAM,CAAC;QACN,QAAQ,GAAG,UAAU,CAAC,CAAC,aAAa;IACtC,CAAC;IAED,MAAM,WAAW,GAAgF;QAC/F,QAAQ,EAAE;YACR,QAAQ,EAAE,sFAAsF;YAChG,MAAM,EAAE,uBAAuB,KAAK,CAAC,OAAO;;;;;;;kFAOgC;SAC7E;QACD,IAAI,EAAE;YACJ,QAAQ,EAAE,oEAAoE;YAC9E,MAAM,EAAE,sBAAsB,KAAK,CAAC,OAAO;;;;;;;sGAOqD;SACjG;QACD,KAAK,EAAE;YACL,QAAQ,EAAE,2EAA2E;YACrF,MAAM,EAAE,sBAAsB,KAAK,CAAC,OAAO;;;;;;;2FAO0C;SACtF;KACF,CAAC;IAEF,OAAO;QACL,QAAQ;QACR,GAAG,WAAW,CAAC,QAAQ,CAAC;KACzB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,122 @@
1
+ # Cheat Sheet
2
+
3
+ Quick reference for the vibecoding methodology.
4
+
5
+ ---
6
+
7
+ ## The Two Phases
8
+
9
+ **Phase 1: Eagle Sight (Pre-Build)**
10
+ ```
11
+ Idea → Research → Brainlift → PRD → Gameplan
12
+ ```
13
+
14
+ **Phase 2: Build (7-Step Process)**
15
+ ```
16
+ 1. User Rules → 2. Index Codebase → 3. Read Files → 4. Research
17
+ 5. Write Code + Tests → 6. Run Tests → 7. Log → Fix → Repeat
18
+ ```
19
+
20
+ ---
21
+
22
+ ## The Three Principles
23
+
24
+ **Oneshot Paradigm**
25
+ ```
26
+ When broken → STOP → Original prompt + error log → Works
27
+ 3 strikes = restart with full context
28
+ ```
29
+
30
+ **Tornado Building**
31
+ ```
32
+ Research + Logs + Tests = Solution
33
+ Each feeds the others until solved
34
+ ```
35
+
36
+ **Horizon Thinking**
37
+ ```
38
+ AI = Vertical (implementation)
39
+ You = Horizontal (context, patterns, constraints)
40
+ Wrong output? Widen your horizontal.
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Key Prompts
46
+
47
+ **Session Start:**
48
+ ```
49
+ Read user rules. Ask clarifying questions. Make todos. Don't start yet.
50
+ ```
51
+
52
+ **Execution:**
53
+ ```
54
+ Continue todos. Write AND run tests. Commit when done.
55
+ ```
56
+
57
+ **When Stuck:**
58
+ ```
59
+ Research [topic]. Add logs at [points]. Write tests for [behavior].
60
+ ```
61
+
62
+ ---
63
+
64
+ ## The Prompt Formula
65
+
66
+ ```
67
+ PROMPT = CONTEXT + TASK + CONSTRAINTS + OUTPUT
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Quick Fixes
73
+
74
+ | Problem | Solution |
75
+ |---------|----------|
76
+ | AI hallucinating | "Ask clarifying questions first" |
77
+ | Generic output | Add more horizontal context |
78
+ | Broken code | Oneshot: original + error + avoid |
79
+ | Stuck on bug | Spin the Tornado |
80
+ | Code doesn't fit | Check patterns to follow |
81
+
82
+ ---
83
+
84
+ ## AI Strengths
85
+
86
+ Let AI handle: boilerplate, types, tests, refactoring, docs, regex, SQL, CSS, API integrations
87
+
88
+ You control: architecture, security, business logic, performance, UX, code review, deployment
89
+
90
+ ---
91
+
92
+ ## Antipatterns
93
+
94
+ | Avoid | Instead |
95
+ |-------|---------|
96
+ | YOLO prompting | One feature at a time |
97
+ | Blind trust | Read and test everything |
98
+ | Context neglect | Complete context sandwich |
99
+ | Fix forward forever | Oneshot after 3 strikes |
100
+ | Security afterthought | Security from day 1 |
101
+ | No tests | Tests alongside code |
102
+
103
+ ---
104
+
105
+ ## Recovery Phrases
106
+
107
+ | Problem | Say |
108
+ |---------|-----|
109
+ | Wrong approach | "Let's try a different approach. What if we..." |
110
+ | Too complex | "Simplify this. Give me the minimal version." |
111
+ | Missing context | "Here's more context: [paste]" |
112
+ | Going in circles | "Let's step back. What's the core problem?" |
113
+
114
+ ---
115
+
116
+ ## Speed Tips
117
+
118
+ - Use `@file` references instead of pasting
119
+ - Batch similar operations
120
+ - Template reuse: "Follow the pattern in [file]"
121
+ - Stop mid-generation if you have enough (Esc)
122
+ - One clear ask per message
@@ -0,0 +1,173 @@
1
+ # The 12 Ingredients
2
+
3
+ Production readiness checklist for any application.
4
+
5
+ ---
6
+
7
+ ## Core Ingredients (1-4)
8
+
9
+ Every app needs these. Without them, nothing works.
10
+
11
+ ### 1. Frontend
12
+ What users see and touch. UI, buttons, screens, interactions.
13
+
14
+ **Checklist:**
15
+ - [ ] Responsive design (mobile, tablet, desktop)
16
+ - [ ] Accessibility basics (labels, contrast, keyboard nav)
17
+ - [ ] Loading states for async operations
18
+ - [ ] Error states with recovery options
19
+ - [ ] Consistent component patterns
20
+
21
+ ### 2. Backend
22
+ Server logic, APIs, business rules.
23
+
24
+ **Checklist:**
25
+ - [ ] RESTful or GraphQL API structure
26
+ - [ ] Input validation on all endpoints
27
+ - [ ] Proper HTTP status codes
28
+ - [ ] Rate limiting on public endpoints
29
+ - [ ] Graceful error responses
30
+
31
+ ### 3. Database
32
+ Where data lives and persists.
33
+
34
+ **Checklist:**
35
+ - [ ] Schema designed for access patterns
36
+ - [ ] Indexes on frequently queried fields
37
+ - [ ] Foreign key constraints where appropriate
38
+ - [ ] Backup strategy defined
39
+ - [ ] Migration system in place
40
+
41
+ ### 4. Authentication
42
+ Who users are, login/signup, permissions.
43
+
44
+ **Checklist:**
45
+ - [ ] Secure password hashing (bcrypt/argon2)
46
+ - [ ] Session/token management
47
+ - [ ] Password reset flow
48
+ - [ ] Account lockout after failed attempts
49
+ - [ ] Secure cookie settings (httpOnly, secure, sameSite)
50
+
51
+ ---
52
+
53
+ ## Power Ingredients (5-7)
54
+
55
+ These transform a basic app into something real.
56
+
57
+ ### 5. API Integrations
58
+ Connecting to external services.
59
+
60
+ **Checklist:**
61
+ - [ ] API keys stored securely (env vars)
62
+ - [ ] Retry logic with exponential backoff
63
+ - [ ] Timeout handling
64
+ - [ ] Circuit breakers for failing services
65
+ - [ ] Rate limit awareness
66
+
67
+ ### 6. State Management
68
+ How data flows through your app.
69
+
70
+ **Checklist:**
71
+ - [ ] Clear data flow pattern
72
+ - [ ] Loading/error/success states
73
+ - [ ] Optimistic updates where appropriate
74
+ - [ ] Cache invalidation strategy
75
+ - [ ] No prop drilling hell
76
+
77
+ ### 7. Design/UX
78
+ Making it beautiful and usable.
79
+
80
+ **Checklist:**
81
+ - [ ] Consistent visual language
82
+ - [ ] Clear user feedback for actions
83
+ - [ ] Intuitive navigation
84
+ - [ ] Empty states designed
85
+ - [ ] Mobile-first or responsive
86
+
87
+ ---
88
+
89
+ ## Protection Ingredients (8-10)
90
+
91
+ Without protection, your app is vulnerable.
92
+
93
+ ### 8. Testing
94
+ Proving it works before shipping.
95
+
96
+ **Checklist:**
97
+ - [ ] Unit tests for business logic
98
+ - [ ] Integration tests for API endpoints
99
+ - [ ] E2E tests for critical flows
100
+ - [ ] Tests run in CI before deploy
101
+ - [ ] Coverage on new code
102
+
103
+ ### 9. Security
104
+ Protection from attacks, data safety.
105
+
106
+ **Checklist:**
107
+ - [ ] SQL injection prevention (parameterized queries)
108
+ - [ ] XSS prevention (output encoding)
109
+ - [ ] CSRF protection
110
+ - [ ] Secrets not in code or logs
111
+ - [ ] Dependencies audited for vulnerabilities
112
+
113
+ ### 10. Error Handling
114
+ Graceful failures, logging, recovery.
115
+
116
+ **Checklist:**
117
+ - [ ] Try/catch on async operations
118
+ - [ ] User-friendly error messages
119
+ - [ ] Errors logged with context
120
+ - [ ] No sensitive data in error responses
121
+ - [ ] Recovery actions available
122
+
123
+ ---
124
+
125
+ ## Mastery Ingredients (11-12)
126
+
127
+ These separate hobby projects from professional software.
128
+
129
+ ### 11. Version Control
130
+ Git, tracking changes, collaboration.
131
+
132
+ **Checklist:**
133
+ - [ ] Meaningful commit messages
134
+ - [ ] Feature branches for development
135
+ - [ ] No secrets committed (ever)
136
+ - [ ] .gitignore comprehensive
137
+ - [ ] PR reviews before merge
138
+
139
+ ### 12. Deployment
140
+ CI/CD, hosting, getting it to users.
141
+
142
+ **Checklist:**
143
+ - [ ] Automated deployment pipeline
144
+ - [ ] Staging environment for testing
145
+ - [ ] Rollback capability
146
+ - [ ] Environment variables managed
147
+ - [ ] Health checks configured
148
+
149
+ ---
150
+
151
+ ## Audit Scoring
152
+
153
+ When Midas audits a project:
154
+
155
+ | Score | Meaning |
156
+ |-------|---------|
157
+ | 1-4 complete | Functional - it works |
158
+ | 5-7 complete | Integrated - it connects |
159
+ | 8-10 complete | Protected - it's safe |
160
+ | 11-12 complete | Professional - it ships |
161
+
162
+ **All 12 = Production Ready**
163
+
164
+ ---
165
+
166
+ ## Quick Audit Questions
167
+
168
+ For each ingredient, ask:
169
+
170
+ 1. **Does it exist?** (binary)
171
+ 2. **Does it work correctly?** (functional)
172
+ 3. **Is it complete?** (coverage)
173
+ 4. **Is it maintainable?** (quality)