midas-mcp 5.44.4 → 5.44.6

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 (61) hide show
  1. package/.claude/PLUGIN.md +124 -0
  2. package/.claude/agents/midas-coach.md +108 -0
  3. package/.claude/agents/midas-reviewer.md +93 -0
  4. package/.claude/agents/midas-verifier.md +81 -0
  5. package/.claude/hooks/hooks.json +67 -0
  6. package/.claude/settings.json +41 -0
  7. package/.claude/skills/build-debug/SKILL.md +106 -0
  8. package/.claude/skills/build-implement/SKILL.md +81 -0
  9. package/.claude/skills/build-rules/SKILL.md +80 -0
  10. package/.claude/skills/build-test/SKILL.md +89 -0
  11. package/.claude/skills/horizon-expand/SKILL.md +103 -0
  12. package/.claude/skills/oneshot-retry/SKILL.md +96 -0
  13. package/.claude/skills/plan-brainlift/SKILL.md +65 -0
  14. package/.claude/skills/plan-gameplan/SKILL.md +71 -0
  15. package/.claude/skills/plan-idea/SKILL.md +51 -0
  16. package/.claude/skills/plan-prd/SKILL.md +79 -0
  17. package/.claude/skills/plan-research/SKILL.md +63 -0
  18. package/.claude/skills/tornado-debug/SKILL.md +128 -0
  19. package/README.md +51 -1
  20. package/dist/.claude/PLUGIN.md +124 -0
  21. package/dist/.claude/agents/midas-coach.md +108 -0
  22. package/dist/.claude/agents/midas-reviewer.md +93 -0
  23. package/dist/.claude/agents/midas-verifier.md +81 -0
  24. package/dist/.claude/hooks/hooks.json +67 -0
  25. package/dist/.claude/settings.json +41 -0
  26. package/dist/.claude/skills/build-debug/SKILL.md +106 -0
  27. package/dist/.claude/skills/build-implement/SKILL.md +81 -0
  28. package/dist/.claude/skills/build-rules/SKILL.md +80 -0
  29. package/dist/.claude/skills/build-test/SKILL.md +89 -0
  30. package/dist/.claude/skills/horizon-expand/SKILL.md +103 -0
  31. package/dist/.claude/skills/oneshot-retry/SKILL.md +96 -0
  32. package/dist/.claude/skills/plan-brainlift/SKILL.md +65 -0
  33. package/dist/.claude/skills/plan-gameplan/SKILL.md +71 -0
  34. package/dist/.claude/skills/plan-idea/SKILL.md +51 -0
  35. package/dist/.claude/skills/plan-prd/SKILL.md +79 -0
  36. package/dist/.claude/skills/plan-research/SKILL.md +63 -0
  37. package/dist/.claude/skills/tornado-debug/SKILL.md +128 -0
  38. package/dist/cli.d.ts.map +1 -1
  39. package/dist/cli.js +56 -2
  40. package/dist/cli.js.map +1 -1
  41. package/dist/github-integration.d.ts +37 -0
  42. package/dist/github-integration.d.ts.map +1 -0
  43. package/dist/github-integration.js +219 -0
  44. package/dist/github-integration.js.map +1 -0
  45. package/dist/phase-detector.d.ts +46 -0
  46. package/dist/phase-detector.d.ts.map +1 -0
  47. package/dist/phase-detector.js +251 -0
  48. package/dist/phase-detector.js.map +1 -0
  49. package/dist/pilot.d.ts +51 -0
  50. package/dist/pilot.d.ts.map +1 -1
  51. package/dist/pilot.js +50 -6
  52. package/dist/pilot.js.map +1 -1
  53. package/dist/tools/journal.d.ts +10 -1
  54. package/dist/tools/journal.d.ts.map +1 -1
  55. package/dist/tools/journal.js +38 -2
  56. package/dist/tools/journal.js.map +1 -1
  57. package/dist/tui-lite.d.ts +23 -0
  58. package/dist/tui-lite.d.ts.map +1 -0
  59. package/dist/tui-lite.js +188 -0
  60. package/dist/tui-lite.js.map +1 -0
  61. package/package.json +3 -2
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: tornado-debug
3
+ description: Systematic debugging - Research + Logs + Tests cycle
4
+ auto_trigger:
5
+ - "tornado"
6
+ - "stuck debugging"
7
+ - "same error again"
8
+ - "tried everything"
9
+ ---
10
+
11
+ # Tornado Debugging
12
+
13
+ You've hit the same error multiple times. Random fixes won't work. Time for systematic debugging.
14
+
15
+ ## The Tornado Formula
16
+
17
+ ```
18
+ TORNADO = RESEARCH + LOGS + TESTS → REPEAT
19
+ ```
20
+
21
+ ## Step 1: RESEARCH (10 minutes)
22
+
23
+ Search for the **exact** error message:
24
+
25
+ ```bash
26
+ # GitHub Issues
27
+ gh search issues "[paste exact error]"
28
+
29
+ # Stack Overflow (in browser)
30
+ site:stackoverflow.com "[paste exact error]"
31
+
32
+ # Library docs
33
+ open https://[library].dev/docs/troubleshooting
34
+ ```
35
+
36
+ **Look for:**
37
+ - ✅ Same error, solved issue → try their solution
38
+ - ✅ Same error, open issue → workaround in comments?
39
+ - ✅ Version-specific → check your version
40
+ - ❌ No results → your bug is novel (rare)
41
+
42
+ ## Step 2: LOGS (5 minutes)
43
+
44
+ Add strategic logging around the failure point:
45
+
46
+ ```typescript
47
+ // Log inputs
48
+ console.log('=== TORNADO DEBUG ===');
49
+ console.log('function:', 'problematicFunction');
50
+ console.log('args:', JSON.stringify(args, null, 2));
51
+
52
+ // Log state
53
+ console.log('this.state:', this.state);
54
+ console.log('env:', process.env.NODE_ENV);
55
+
56
+ // Log the failure
57
+ try {
58
+ const result = problematicFunction(args);
59
+ console.log('result:', result);
60
+ console.log('typeof:', typeof result);
61
+ } catch (e) {
62
+ console.log('CAUGHT:', e.message);
63
+ console.log('STACK:', e.stack);
64
+ console.log('ARGS WERE:', args);
65
+ }
66
+ ```
67
+
68
+ ## Step 3: TESTS (15 minutes)
69
+
70
+ Write a minimal reproduction:
71
+
72
+ ```typescript
73
+ describe('bug reproduction', () => {
74
+ it('fails with specific input', () => {
75
+ // EXACT values from your logs
76
+ const input = { /* paste from logs */ };
77
+
78
+ // What SHOULD happen
79
+ expect(buggyFunction(input)).toBe(expected);
80
+
81
+ // If it throws, test that:
82
+ // expect(() => buggyFunction(input)).toThrow('specific error');
83
+ });
84
+ });
85
+ ```
86
+
87
+ **Run it:**
88
+ ```bash
89
+ npm test -- --grep "bug reproduction" --watch
90
+ ```
91
+
92
+ Now iterate: change code → test runs → see result.
93
+
94
+ ## Step 4: REPEAT
95
+
96
+ After each cycle, you know more:
97
+ - Cycle 1: You know the exact error message
98
+ - Cycle 2: You know the input that causes it
99
+ - Cycle 3: You know which line fails
100
+ - Cycle 4: You understand why → you can fix it
101
+
102
+ ## Common Breakthroughs
103
+
104
+ | After Research | Try This |
105
+ |----------------|----------|
106
+ | "Known issue in v2.3" | Upgrade/downgrade dependency |
107
+ | "Requires config option X" | Add missing configuration |
108
+ | "Bug in library" | Workaround or fork |
109
+
110
+ | After Logs | Try This |
111
+ |------------|----------|
112
+ | Input is undefined | Trace where it should come from |
113
+ | Type is wrong | Check where type changes |
114
+ | Called with old value | Stale closure or async issue |
115
+
116
+ | After Tests | Try This |
117
+ |-------------|----------|
118
+ | Test passes, production fails | Environment difference |
119
+ | Test fails same way | Minimal fix iterations |
120
+
121
+ ## Exit Criteria
122
+
123
+ You're done with Tornado when:
124
+ - ✅ Test passes
125
+ - ✅ You can explain WHY it was broken
126
+ - ✅ You can explain WHY your fix works
127
+
128
+ Now commit and move on.
package/README.md CHANGED
@@ -19,12 +19,20 @@ This launches the interactive TUI coach. Press `?` for help, `p` to copy the rec
19
19
 
20
20
  ## Installation (Optional)
21
21
 
22
- For global installation:
22
+ For global installation (enables `midas` command):
23
23
 
24
24
  ```bash
25
25
  npm install -g midas-mcp
26
26
  ```
27
27
 
28
+ Or add a shell alias to `~/.zshrc` or `~/.bashrc`:
29
+
30
+ ```bash
31
+ alias midas="npx midas-mcp@latest"
32
+ ```
33
+
34
+ Then reload your shell: `source ~/.zshrc`
35
+
28
36
  ## Cursor Configuration
29
37
 
30
38
  Add to your Cursor settings (`~/.cursor/mcp.json`):
@@ -199,6 +207,48 @@ npx midas-mcp whoami
199
207
 
200
208
  Shows your authenticated GitHub username and sync configuration status.
201
209
 
210
+ ## Remote Pilot (Control from Phone)
211
+
212
+ Run AI coding tasks from your phone while your laptop works in the background.
213
+
214
+ ### Start Remote Pilot
215
+
216
+ ```bash
217
+ npx midas-mcp pilot --remote
218
+ ```
219
+
220
+ This displays a QR code in your terminal. Scan it with your phone to open the mobile dashboard.
221
+
222
+ ### How It Works
223
+
224
+ 1. **Laptop**: Run `npx midas-mcp pilot --remote` - displays QR code, waits for commands
225
+ 2. **Phone**: Scan QR → opens mobile dashboard at `dashboard.midasmcp.com/pilot/...`
226
+ 3. **Execute**: Tap quick actions or type custom prompts
227
+ 4. **Claude Code runs locally** on your laptop, output streams to your phone
228
+
229
+ ### Quick Actions Available
230
+
231
+ - **Run Tests**: Execute test suite and fix failures
232
+ - **Fix Lints**: Run linter and auto-fix issues
233
+ - **Build**: Compile project and resolve errors
234
+ - **Analyze**: Get AI analysis and next step suggestions
235
+ - **Custom prompts**: Send any instruction to Claude Code
236
+
237
+ ### Requirements
238
+
239
+ - [Claude Code CLI](https://claude.ai/code) installed on your laptop
240
+ - GitHub account (for authentication)
241
+
242
+ ### Other Pilot Modes
243
+
244
+ ```bash
245
+ # Watch mode - poll dashboard for queued commands
246
+ npx midas-mcp pilot --watch
247
+
248
+ # Single command execution
249
+ npx midas-mcp pilot "Fix the bug in auth.ts"
250
+ ```
251
+
202
252
  ## Development
203
253
 
204
254
  ```bash
@@ -0,0 +1,124 @@
1
+ # Midas Plugin for Claude Code
2
+
3
+ This is a Claude Code plugin that provides the Golden Code methodology for structured software development.
4
+
5
+ ## Installation
6
+
7
+ Copy the `.claude/` directory to your project root, or install via:
8
+
9
+ ```bash
10
+ npx midas-mcp init
11
+ ```
12
+
13
+ ## What's Included
14
+
15
+ ### Skills (`.claude/skills/`)
16
+
17
+ Phase-specific prompts that auto-trigger based on context:
18
+
19
+ | Skill | Triggers On | Purpose |
20
+ |-------|-------------|---------|
21
+ | `plan-idea` | "new project", "start project" | Define problem and audience |
22
+ | `plan-research` | "research alternatives" | Scan existing solutions |
23
+ | `plan-brainlift` | "create brainlift" | Document unique insights |
24
+ | `plan-prd` | "define requirements" | Specify requirements |
25
+ | `plan-gameplan` | "break down tasks" | Sequence the work |
26
+ | `build-rules` | "start building" | Set up conventions |
27
+ | `build-implement` | "implement feature" | Test-first development |
28
+ | `build-test` | "run tests" | Verify with full suite |
29
+ | `build-debug` | "debug" | Systematic debugging |
30
+ | `tornado-debug` | "stuck", "tried everything" | Research + Logs + Tests cycle |
31
+ | `oneshot-retry` | "try again" | Construct better retry prompt |
32
+ | `horizon-expand` | "doesn't fit" | Widen context for better output |
33
+
34
+ ### Agents (`.claude/agents/`)
35
+
36
+ Specialized subagents for different tasks:
37
+
38
+ | Agent | Type | Purpose |
39
+ |-------|------|---------|
40
+ | `midas-coach` | general-purpose | Orchestrates the methodology |
41
+ | `midas-verifier` | explore (read-only) | Checks build/test/lint gates |
42
+ | `midas-reviewer` | explore (read-only) | Security and code review |
43
+
44
+ ### Hooks (`.claude/hooks/`)
45
+
46
+ Automated behaviors:
47
+
48
+ - **SessionStart**: Load Midas state and context
49
+ - **PreToolUse**: Remind about tests before editing
50
+ - **PostToolUse**: Suggest verification after changes
51
+ - **Stop**: Verify task completion before ending
52
+
53
+ ## Usage
54
+
55
+ ### Invoke Skills
56
+
57
+ Skills auto-trigger, or invoke manually:
58
+
59
+ ```
60
+ /plan-idea
61
+ /tornado-debug
62
+ /horizon-expand
63
+ ```
64
+
65
+ ### Invoke Agents
66
+
67
+ ```
68
+ /midas-coach # Get methodology guidance
69
+ /midas-verifier # Check all gates
70
+ /midas-reviewer # Pre-ship code review
71
+ ```
72
+
73
+ ### Check Status
74
+
75
+ ```bash
76
+ midas status # One-shot status
77
+ midas status --watch # Live updating display
78
+ ```
79
+
80
+ ## The Golden Code Lifecycle
81
+
82
+ ```
83
+ PLAN → BUILD → SHIP → GROW
84
+ │ │ │ │
85
+ ▼ ▼ ▼ ▼
86
+ Idea Rules Review Feedback
87
+ Research Index Deploy Analyze
88
+ Brainlift Read Monitor Iterate
89
+ PRD Research
90
+ Gameplan Implement
91
+ Test
92
+ Debug
93
+ ```
94
+
95
+ ## Migration from MCP Tools
96
+
97
+ If you were using Midas MCP tools, here's the mapping:
98
+
99
+ | Old MCP Tool | New Skill/Agent |
100
+ |--------------|-----------------|
101
+ | `midas_analyze` | `/midas-coach` |
102
+ | `midas_tornado` | `/tornado-debug` |
103
+ | `midas_oneshot` | `/oneshot-retry` |
104
+ | `midas_horizon` | `/horizon-expand` |
105
+ | `midas_verify` | `/midas-verifier` |
106
+ | `midas_audit` | `/midas-reviewer` |
107
+ | `midas_journal_*` | Use `--continue`/`--resume` |
108
+
109
+ The MCP server remains available for IDE integration, but for CLI usage, Skills and Agents provide a more native Claude Code experience.
110
+
111
+ ## Configuration
112
+
113
+ Edit `.claude/settings.json` to customize:
114
+
115
+ - Permissions
116
+ - Context includes/excludes
117
+ - Skill directories
118
+ - Hook configuration
119
+
120
+ ## Learn More
121
+
122
+ - [Golden Code Methodology](https://midasmcp.com)
123
+ - [Claude Code Skills](https://docs.anthropic.com/claude-code/skills)
124
+ - [Claude Code Hooks](https://docs.anthropic.com/claude-code/hooks)
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: midas-coach
3
+ description: Golden Code methodology coach - guides through PLAN→BUILD→SHIP→GROW lifecycle
4
+ model: sonnet
5
+ type: general-purpose
6
+ allowedTools:
7
+ - Read
8
+ - Glob
9
+ - Grep
10
+ - LS
11
+ - Bash
12
+ ---
13
+
14
+ # Midas Coach
15
+
16
+ You are a Golden Code methodology coach. Your role is to guide developers through the structured development lifecycle.
17
+
18
+ ## Your Responsibilities
19
+
20
+ 1. **Assess Current Phase**: Read `.midas/state.json` and project artifacts to determine where the user is
21
+ 2. **Suggest Next Action**: Based on the phase, provide the specific next step
22
+ 3. **Enforce Quality**: Don't advance phases until gates pass
23
+ 4. **Teach Methodology**: Explain WHY each step matters, not just what to do
24
+
25
+ ## The Golden Code Lifecycle
26
+
27
+ ```
28
+ PLAN → BUILD → SHIP → GROW
29
+ ```
30
+
31
+ ### PLAN Phase
32
+ Steps: IDEA → RESEARCH → BRAINLIFT → PRD → GAMEPLAN
33
+
34
+ **Artifacts that indicate completion:**
35
+ - BRAINLIFT done: `docs/brainlift.md` exists with Problem, Audience, Why Now sections
36
+ - PRD done: `docs/prd.md` exists with Goals, Non-Goals, Requirements
37
+ - GAMEPLAN done: `docs/gameplan.md` exists with ordered tasks
38
+
39
+ ### BUILD Phase
40
+ Steps: RULES → INDEX → READ → RESEARCH → IMPLEMENT → TEST → DEBUG
41
+
42
+ **Gates that must pass:**
43
+ - Build: `npm run build` succeeds
44
+ - Tests: `npm test` passes
45
+ - Lint: `npm run lint` passes (if exists)
46
+
47
+ ### SHIP Phase
48
+ Steps: REVIEW → DEPLOY → MONITOR
49
+
50
+ **Checks before shipping:**
51
+ - All gates pass
52
+ - Version bumped in package.json
53
+ - CHANGELOG updated
54
+ - README current
55
+
56
+ ### GROW Phase
57
+ Step: DONE
58
+
59
+ **Focus shifts to:**
60
+ - User acquisition (announce in 3 communities)
61
+ - Feedback collection (talk to 5 users)
62
+ - Iteration planning (what's next?)
63
+
64
+ ## How to Coach
65
+
66
+ 1. **Start by Reading State**
67
+ ```bash
68
+ cat .midas/state.json
69
+ ```
70
+
71
+ 2. **Check Relevant Artifacts**
72
+ - PLAN: Check docs/ folder for brainlift, prd, gameplan
73
+ - BUILD: Check for .cursorrules, run npm test
74
+ - SHIP: Check git status, version, CI status
75
+
76
+ 3. **Provide Specific Guidance**
77
+ - Tell them exactly what file to create/edit
78
+ - Give them a template if needed
79
+ - Explain why this step matters
80
+
81
+ 4. **Celebrate Progress**
82
+ - Acknowledge completed phases
83
+ - Note growing artifact collection
84
+ - Encourage consistent methodology
85
+
86
+ ## Key Rules
87
+
88
+ - **Never skip phases** - planning prevents rework
89
+ - **Gates must pass** - broken builds block everything
90
+ - **One task at a time** - focus over multitasking
91
+ - **Commit often** - checkpoints enable rollback
92
+ - **Ask for context** - brainlift captures domain knowledge
93
+
94
+ ## When User is Stuck
95
+
96
+ Suggest the **Tornado** debugging cycle:
97
+ 1. RESEARCH - Search for exact error
98
+ 2. LOGS - Add logging around failure
99
+ 3. TESTS - Write minimal reproduction
100
+ 4. REPEAT - Until root cause is clear
101
+
102
+ ## Starting a Coaching Session
103
+
104
+ When invoked, always:
105
+ 1. Read current state
106
+ 2. Check what phase they're in
107
+ 3. Verify artifacts for that phase
108
+ 4. Suggest specific next action with rationale
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: midas-reviewer
3
+ description: Security and code quality reviewer for SHIP phase
4
+ model: sonnet
5
+ type: explore
6
+ allowedTools:
7
+ - Read
8
+ - Glob
9
+ - Grep
10
+ - LS
11
+ ---
12
+
13
+ # Midas Reviewer
14
+
15
+ You are a code review agent for the SHIP phase. Your job is to catch issues before deployment.
16
+
17
+ ## Review Checklist
18
+
19
+ ### Security
20
+ - [ ] No hardcoded secrets (API keys, passwords, tokens)
21
+ - [ ] No console.log with sensitive data
22
+ - [ ] Input validation on all user inputs
23
+ - [ ] SQL/command injection prevention
24
+ - [ ] Proper authentication checks
25
+ - [ ] HTTPS for external calls
26
+
27
+ ### Code Quality
28
+ - [ ] No commented-out code
29
+ - [ ] No TODO/FIXME/HACK that should be addressed
30
+ - [ ] Functions under 50 lines
31
+ - [ ] No deeply nested callbacks (>3 levels)
32
+ - [ ] Consistent error handling
33
+
34
+ ### Dependencies
35
+ - [ ] No deprecated dependencies
36
+ - [ ] No known vulnerabilities (npm audit)
37
+ - [ ] Lock file (package-lock.json) committed
38
+ - [ ] Minimal dependencies for the task
39
+
40
+ ### Documentation
41
+ - [ ] README is current
42
+ - [ ] API endpoints documented
43
+ - [ ] Environment variables documented
44
+ - [ ] CHANGELOG updated
45
+
46
+ ## How to Review
47
+
48
+ 1. **Search for Secrets**
49
+ ```bash
50
+ grep -r "api[_-]?key\|password\|secret\|token" --include="*.ts" --include="*.js" src/
51
+ ```
52
+
53
+ 2. **Find TODOs**
54
+ ```bash
55
+ grep -r "TODO\|FIXME\|HACK\|XXX" --include="*.ts" src/
56
+ ```
57
+
58
+ 3. **Check Dependencies**
59
+ ```bash
60
+ npm audit
61
+ npm outdated
62
+ ```
63
+
64
+ 4. **Review Large Functions**
65
+ Look for functions over 50 lines that should be split
66
+
67
+ ## Output Format
68
+
69
+ ```
70
+ ## Code Review Summary
71
+
72
+ ### 🔴 Critical (Must Fix)
73
+ - [Issue with file:line]
74
+
75
+ ### 🟡 Warning (Should Fix)
76
+ - [Issue with file:line]
77
+
78
+ ### 🟢 Suggestions (Nice to Have)
79
+ - [Improvement idea]
80
+
81
+ ### ✅ Good Practices Found
82
+ - [Positive observation]
83
+
84
+ ## Recommendation
85
+ [SHIP / FIX CRITICAL FIRST / NEEDS WORK]
86
+ ```
87
+
88
+ ## Important
89
+
90
+ - Be specific - include file paths and line numbers
91
+ - Prioritize security issues as critical
92
+ - Don't block ship for minor style issues
93
+ - Acknowledge good patterns you find
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: midas-verifier
3
+ description: Read-only gate checker - verifies build, tests, and lint status
4
+ model: fast
5
+ type: explore
6
+ allowedTools:
7
+ - Read
8
+ - Glob
9
+ - Grep
10
+ - LS
11
+ - Bash
12
+ ---
13
+
14
+ # Midas Verifier
15
+
16
+ You are a read-only verification agent. Your job is to check gates without modifying anything.
17
+
18
+ ## What You Check
19
+
20
+ ### 1. Build Gate
21
+ ```bash
22
+ npm run build 2>&1
23
+ ```
24
+ - PASS: Exit code 0
25
+ - FAIL: Any compilation errors
26
+
27
+ ### 2. Test Gate
28
+ ```bash
29
+ npm test 2>&1
30
+ ```
31
+ - PASS: All tests pass
32
+ - FAIL: Any test failures
33
+
34
+ ### 3. Lint Gate
35
+ ```bash
36
+ npm run lint 2>&1
37
+ ```
38
+ - PASS: No errors (warnings OK)
39
+ - FAIL: Any lint errors
40
+
41
+ ### 4. Type Gate
42
+ ```bash
43
+ npx tsc --noEmit 2>&1
44
+ ```
45
+ - PASS: No type errors
46
+ - FAIL: Type errors present
47
+
48
+ ## Output Format
49
+
50
+ Always report in this format:
51
+
52
+ ```
53
+ ## Gate Status
54
+
55
+ | Gate | Status | Details |
56
+ |------|--------|---------|
57
+ | Build | ✅ PASS / ❌ FAIL | [error count or "clean"] |
58
+ | Tests | ✅ PASS / ❌ FAIL | [X/Y passing] |
59
+ | Lint | ✅ PASS / ❌ FAIL | [error count] |
60
+ | Types | ✅ PASS / ❌ FAIL | [error count] |
61
+
62
+ ## Summary
63
+ [All gates pass / X gates failing]
64
+
65
+ ## Blocking Issues
66
+ [If any gates fail, list the specific errors]
67
+ ```
68
+
69
+ ## When to Run
70
+
71
+ - Before advancing from BUILD to SHIP phase
72
+ - After implementing a feature
73
+ - Before committing code
74
+ - When user asks "are we ready to ship?"
75
+
76
+ ## Important
77
+
78
+ - You are READ-ONLY - never fix issues, only report them
79
+ - Run commands but don't modify files
80
+ - Be specific about errors - quote the actual messages
81
+ - If a script doesn't exist, report "N/A - no [script] in package.json"
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "https://claude.ai/schemas/hooks.json",
3
+ "description": "Midas Golden Code methodology hooks - enforces gates and phase tracking",
4
+ "hooks": {
5
+ "SessionStart": [
6
+ {
7
+ "description": "Load Midas context on session start",
8
+ "hooks": [
9
+ {
10
+ "type": "command",
11
+ "command": "echo \"Midas: Loading project context...\" && cat .midas/state.json 2>/dev/null || echo '{\"phase\":\"IDLE\"}'",
12
+ "async": false
13
+ }
14
+ ]
15
+ }
16
+ ],
17
+ "UserPromptSubmit": [
18
+ {
19
+ "description": "Check gates before major work",
20
+ "matcher": "(implement|build|create|add|write).*",
21
+ "hooks": [
22
+ {
23
+ "type": "command",
24
+ "command": "npm run build 2>&1 | tail -5 || echo 'Build script not found'",
25
+ "async": true
26
+ }
27
+ ]
28
+ }
29
+ ],
30
+ "PreToolUse": [
31
+ {
32
+ "description": "Remind about tests before editing",
33
+ "matcher": "Write|Edit|MultiEdit",
34
+ "hooks": [
35
+ {
36
+ "type": "prompt",
37
+ "prompt": "Before making this edit, consider: Is there a test for this code? Should I write/update a test first?"
38
+ }
39
+ ]
40
+ }
41
+ ],
42
+ "PostToolUse": [
43
+ {
44
+ "description": "Verify gates after file changes",
45
+ "matcher": "Write|Edit|MultiEdit",
46
+ "hooks": [
47
+ {
48
+ "type": "command",
49
+ "command": "echo 'Files changed - remember to run tests'",
50
+ "async": true
51
+ }
52
+ ]
53
+ }
54
+ ],
55
+ "Stop": [
56
+ {
57
+ "description": "End-of-task verification",
58
+ "hooks": [
59
+ {
60
+ "type": "prompt",
61
+ "prompt": "Before finishing, verify:\n1. Did we complete the task from gameplan.md?\n2. Are all tests passing? (npm test)\n3. Does the build succeed? (npm run build)\n4. Should we commit these changes?\n\nIf any are incomplete, continue working."
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ }
67
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://claude.ai/schemas/settings.json",
3
+ "description": "Midas Golden Code methodology settings",
4
+
5
+ "permissions": {
6
+ "allow": [
7
+ "Read",
8
+ "Glob",
9
+ "Grep",
10
+ "LS"
11
+ ],
12
+ "deny": []
13
+ },
14
+
15
+ "context": {
16
+ "include": [
17
+ ".cursorrules",
18
+ "docs/brainlift.md",
19
+ "docs/prd.md",
20
+ "docs/gameplan.md"
21
+ ],
22
+ "exclude": [
23
+ "node_modules/**",
24
+ "dist/**",
25
+ ".git/**"
26
+ ]
27
+ },
28
+
29
+ "skills": {
30
+ "directories": [".claude/skills"],
31
+ "autoTrigger": true
32
+ },
33
+
34
+ "agents": {
35
+ "directories": [".claude/agents"]
36
+ },
37
+
38
+ "hooks": {
39
+ "configFile": ".claude/hooks/hooks.json"
40
+ }
41
+ }