monty-autonomous-fullstack-dev-multillm 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 (186) hide show
  1. package/LICENSE +81 -0
  2. package/README.md +608 -0
  3. package/bin/cli.js +448 -0
  4. package/dist/agents/coding.d.ts +15 -0
  5. package/dist/agents/coding.d.ts.map +1 -0
  6. package/dist/agents/coding.js +189 -0
  7. package/dist/agents/coding.js.map +1 -0
  8. package/dist/agents/initializer.d.ts +15 -0
  9. package/dist/agents/initializer.d.ts.map +1 -0
  10. package/dist/agents/initializer.js +87 -0
  11. package/dist/agents/initializer.js.map +1 -0
  12. package/dist/agents/prompts/arbitrator.md +143 -0
  13. package/dist/agents/prompts/coding.md +247 -0
  14. package/dist/agents/prompts/initializer.md +98 -0
  15. package/dist/config/agent-config.d.ts +103 -0
  16. package/dist/config/agent-config.d.ts.map +1 -0
  17. package/dist/config/agent-config.js +138 -0
  18. package/dist/config/agent-config.js.map +1 -0
  19. package/dist/config/auth-config.d.ts +152 -0
  20. package/dist/config/auth-config.d.ts.map +1 -0
  21. package/dist/config/auth-config.js +139 -0
  22. package/dist/config/auth-config.js.map +1 -0
  23. package/dist/config/mcp-config.d.ts +109 -0
  24. package/dist/config/mcp-config.d.ts.map +1 -0
  25. package/dist/config/mcp-config.js +234 -0
  26. package/dist/config/mcp-config.js.map +1 -0
  27. package/dist/config/provider-config.d.ts +139 -0
  28. package/dist/config/provider-config.d.ts.map +1 -0
  29. package/dist/config/provider-config.js +344 -0
  30. package/dist/config/provider-config.js.map +1 -0
  31. package/dist/config/subagents-config.d.ts +85 -0
  32. package/dist/config/subagents-config.d.ts.map +1 -0
  33. package/dist/config/subagents-config.js +430 -0
  34. package/dist/config/subagents-config.js.map +1 -0
  35. package/dist/index.d.ts +14 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +385 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/orchestrator/arbitrator.d.ts +93 -0
  40. package/dist/orchestrator/arbitrator.d.ts.map +1 -0
  41. package/dist/orchestrator/arbitrator.js +330 -0
  42. package/dist/orchestrator/arbitrator.js.map +1 -0
  43. package/dist/orchestrator/index.d.ts +113 -0
  44. package/dist/orchestrator/index.d.ts.map +1 -0
  45. package/dist/orchestrator/index.js +217 -0
  46. package/dist/orchestrator/index.js.map +1 -0
  47. package/dist/orchestrator/review-coordinator.d.ts +143 -0
  48. package/dist/orchestrator/review-coordinator.d.ts.map +1 -0
  49. package/dist/orchestrator/review-coordinator.js +401 -0
  50. package/dist/orchestrator/review-coordinator.js.map +1 -0
  51. package/dist/orchestrator/task-classifier.d.ts +87 -0
  52. package/dist/orchestrator/task-classifier.d.ts.map +1 -0
  53. package/dist/orchestrator/task-classifier.js +250 -0
  54. package/dist/orchestrator/task-classifier.js.map +1 -0
  55. package/dist/providers/anthropic-provider.d.ts +64 -0
  56. package/dist/providers/anthropic-provider.d.ts.map +1 -0
  57. package/dist/providers/anthropic-provider.js +264 -0
  58. package/dist/providers/anthropic-provider.js.map +1 -0
  59. package/dist/providers/base-provider.d.ts +219 -0
  60. package/dist/providers/base-provider.d.ts.map +1 -0
  61. package/dist/providers/base-provider.js +143 -0
  62. package/dist/providers/base-provider.js.map +1 -0
  63. package/dist/providers/cursor-provider.d.ts +82 -0
  64. package/dist/providers/cursor-provider.d.ts.map +1 -0
  65. package/dist/providers/cursor-provider.js +321 -0
  66. package/dist/providers/cursor-provider.js.map +1 -0
  67. package/dist/providers/google-provider.d.ts +75 -0
  68. package/dist/providers/google-provider.d.ts.map +1 -0
  69. package/dist/providers/google-provider.js +274 -0
  70. package/dist/providers/google-provider.js.map +1 -0
  71. package/dist/providers/index.d.ts +92 -0
  72. package/dist/providers/index.d.ts.map +1 -0
  73. package/dist/providers/index.js +233 -0
  74. package/dist/providers/index.js.map +1 -0
  75. package/dist/providers/openai-provider.d.ts +83 -0
  76. package/dist/providers/openai-provider.d.ts.map +1 -0
  77. package/dist/providers/openai-provider.js +295 -0
  78. package/dist/providers/openai-provider.js.map +1 -0
  79. package/dist/templates/feature_list.template.json +66 -0
  80. package/dist/templates/progress.template.txt +51 -0
  81. package/dist/utils/auth-manager.d.ts +121 -0
  82. package/dist/utils/auth-manager.d.ts.map +1 -0
  83. package/dist/utils/auth-manager.js +560 -0
  84. package/dist/utils/auth-manager.js.map +1 -0
  85. package/dist/utils/budget-enforcer.d.ts +181 -0
  86. package/dist/utils/budget-enforcer.d.ts.map +1 -0
  87. package/dist/utils/budget-enforcer.js +386 -0
  88. package/dist/utils/budget-enforcer.js.map +1 -0
  89. package/dist/utils/chatgpt-detector.d.ts +51 -0
  90. package/dist/utils/chatgpt-detector.d.ts.map +1 -0
  91. package/dist/utils/chatgpt-detector.js +274 -0
  92. package/dist/utils/chatgpt-detector.js.map +1 -0
  93. package/dist/utils/claude-code-detector.d.ts +39 -0
  94. package/dist/utils/claude-code-detector.d.ts.map +1 -0
  95. package/dist/utils/claude-code-detector.js +153 -0
  96. package/dist/utils/claude-code-detector.js.map +1 -0
  97. package/dist/utils/code-quality.d.ts +58 -0
  98. package/dist/utils/code-quality.d.ts.map +1 -0
  99. package/dist/utils/code-quality.js +258 -0
  100. package/dist/utils/code-quality.js.map +1 -0
  101. package/dist/utils/context-primer.d.ts +50 -0
  102. package/dist/utils/context-primer.d.ts.map +1 -0
  103. package/dist/utils/context-primer.js +429 -0
  104. package/dist/utils/context-primer.js.map +1 -0
  105. package/dist/utils/dependency-management.d.ts +40 -0
  106. package/dist/utils/dependency-management.d.ts.map +1 -0
  107. package/dist/utils/dependency-management.js +123 -0
  108. package/dist/utils/dependency-management.js.map +1 -0
  109. package/dist/utils/environment-validation.d.ts +33 -0
  110. package/dist/utils/environment-validation.d.ts.map +1 -0
  111. package/dist/utils/environment-validation.js +136 -0
  112. package/dist/utils/environment-validation.js.map +1 -0
  113. package/dist/utils/error-recovery.d.ts +60 -0
  114. package/dist/utils/error-recovery.d.ts.map +1 -0
  115. package/dist/utils/error-recovery.js +183 -0
  116. package/dist/utils/error-recovery.js.map +1 -0
  117. package/dist/utils/feature-list.d.ts +102 -0
  118. package/dist/utils/feature-list.d.ts.map +1 -0
  119. package/dist/utils/feature-list.js +191 -0
  120. package/dist/utils/feature-list.js.map +1 -0
  121. package/dist/utils/gemini-detector.d.ts +65 -0
  122. package/dist/utils/gemini-detector.d.ts.map +1 -0
  123. package/dist/utils/gemini-detector.js +340 -0
  124. package/dist/utils/gemini-detector.js.map +1 -0
  125. package/dist/utils/git-utils.d.ts +48 -0
  126. package/dist/utils/git-utils.d.ts.map +1 -0
  127. package/dist/utils/git-utils.js +110 -0
  128. package/dist/utils/git-utils.js.map +1 -0
  129. package/dist/utils/health-check.d.ts +32 -0
  130. package/dist/utils/health-check.d.ts.map +1 -0
  131. package/dist/utils/health-check.js +152 -0
  132. package/dist/utils/health-check.js.map +1 -0
  133. package/dist/utils/hooks-manager.d.ts +154 -0
  134. package/dist/utils/hooks-manager.d.ts.map +1 -0
  135. package/dist/utils/hooks-manager.js +359 -0
  136. package/dist/utils/hooks-manager.js.map +1 -0
  137. package/dist/utils/multi-auth-manager.d.ts +144 -0
  138. package/dist/utils/multi-auth-manager.d.ts.map +1 -0
  139. package/dist/utils/multi-auth-manager.js +588 -0
  140. package/dist/utils/multi-auth-manager.js.map +1 -0
  141. package/dist/utils/progress.d.ts +49 -0
  142. package/dist/utils/progress.d.ts.map +1 -0
  143. package/dist/utils/progress.js +209 -0
  144. package/dist/utils/progress.js.map +1 -0
  145. package/dist/utils/project-detection.d.ts +40 -0
  146. package/dist/utils/project-detection.d.ts.map +1 -0
  147. package/dist/utils/project-detection.js +230 -0
  148. package/dist/utils/project-detection.js.map +1 -0
  149. package/dist/utils/session-manager.d.ts +119 -0
  150. package/dist/utils/session-manager.d.ts.map +1 -0
  151. package/dist/utils/session-manager.js +389 -0
  152. package/dist/utils/session-manager.js.map +1 -0
  153. package/dist/utils/skills-manager.d.ts +113 -0
  154. package/dist/utils/skills-manager.d.ts.map +1 -0
  155. package/dist/utils/skills-manager.js +332 -0
  156. package/dist/utils/skills-manager.js.map +1 -0
  157. package/dist/utils/structured-output.d.ts +117 -0
  158. package/dist/utils/structured-output.d.ts.map +1 -0
  159. package/dist/utils/structured-output.js +191 -0
  160. package/dist/utils/structured-output.js.map +1 -0
  161. package/dist/utils/subagent-manager.d.ts +143 -0
  162. package/dist/utils/subagent-manager.d.ts.map +1 -0
  163. package/dist/utils/subagent-manager.js +326 -0
  164. package/dist/utils/subagent-manager.js.map +1 -0
  165. package/dist/utils/supabase-setup.d.ts +50 -0
  166. package/dist/utils/supabase-setup.d.ts.map +1 -0
  167. package/dist/utils/supabase-setup.js +151 -0
  168. package/dist/utils/supabase-setup.js.map +1 -0
  169. package/dist/utils/token-refresh.d.ts +21 -0
  170. package/dist/utils/token-refresh.d.ts.map +1 -0
  171. package/dist/utils/token-refresh.js +77 -0
  172. package/dist/utils/token-refresh.js.map +1 -0
  173. package/dist/utils/tos-warning.d.ts +115 -0
  174. package/dist/utils/tos-warning.d.ts.map +1 -0
  175. package/dist/utils/tos-warning.js +304 -0
  176. package/dist/utils/tos-warning.js.map +1 -0
  177. package/dist/utils/usage-monitor.d.ts +156 -0
  178. package/dist/utils/usage-monitor.d.ts.map +1 -0
  179. package/dist/utils/usage-monitor.js +296 -0
  180. package/dist/utils/usage-monitor.js.map +1 -0
  181. package/package.json +105 -0
  182. package/scripts/init.ps1 +73 -0
  183. package/scripts/init.sh +86 -0
  184. package/scripts/test-auth.sh +90 -0
  185. package/templates/feature_list.template.json +66 -0
  186. package/templates/progress.template.txt +51 -0
package/LICENSE ADDED
@@ -0,0 +1,81 @@
1
+ Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)
2
+
3
+ Copyright (c) 2025 Dobeu Tech Solutions LLC
4
+
5
+ This work is licensed under the Creative Commons Attribution-NonCommercial 4.0
6
+ International License. To view a copy of this license, visit:
7
+ https://creativecommons.org/licenses/by-nc/4.0/
8
+
9
+ ================================================================================
10
+ LICENSE SUMMARY
11
+ ================================================================================
12
+
13
+ You are free to:
14
+
15
+ SHARE - Copy and redistribute the material in any medium or format
16
+ ADAPT - Remix, transform, and build upon the material
17
+
18
+ Under the following terms:
19
+
20
+ ATTRIBUTION - You must give appropriate credit to Dobeu Tech Solutions LLC,
21
+ provide a link to the license, and indicate if changes were made. You may
22
+ do so in any reasonable manner, but not in any way that suggests the
23
+ licensor endorses you or your use.
24
+
25
+ NON-COMMERCIAL - You may not use the material for commercial purposes.
26
+ Commercial purposes include, but are not limited to:
27
+ - Selling the software or derivatives
28
+ - Using the software to provide paid services
29
+ - Incorporating the software into commercial products
30
+ - Any use intended for or directed toward commercial advantage or
31
+ monetary compensation
32
+
33
+ NO ADDITIONAL RESTRICTIONS - You may not apply legal terms or technological
34
+ measures that legally restrict others from doing anything the license permits.
35
+
36
+ ================================================================================
37
+ IMPORTANT NOTICES
38
+ ================================================================================
39
+
40
+ 1. OWNERSHIP
41
+ This software and all associated intellectual property rights are owned by
42
+ Dobeu Tech Solutions LLC. The "Monty Full-Stack Agent" name, branding, and
43
+ related trademarks are property of Dobeu Tech Solutions LLC.
44
+
45
+ 2. WARRANTY DISCLAIMER
46
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
47
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
48
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
49
+
50
+ 3. LIMITATION OF LIABILITY
51
+ IN NO EVENT SHALL DOBEU TECH SOLUTIONS LLC BE LIABLE FOR ANY CLAIM, DAMAGES
52
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
53
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
54
+ DEALINGS IN THE SOFTWARE.
55
+
56
+ 4. COMMERCIAL LICENSING
57
+ For commercial use, please contact Dobeu Tech Solutions LLC for licensing
58
+ options at: jeremyw@dobeu.net or https://github.com/dobeutech
59
+
60
+ Company Website: https://dobeu.net
61
+ Terms of Service: https://dobeu.net/tos
62
+ Privacy Policy: https://dobeu.net/privacy
63
+
64
+ 5. CONTRIBUTIONS
65
+ By contributing to this project, you agree that your contributions will be
66
+ licensed under the same CC BY-NC 4.0 license.
67
+
68
+ ================================================================================
69
+ ATTRIBUTION
70
+ ================================================================================
71
+
72
+ When using this software, please include the following attribution:
73
+
74
+ "Powered by Monty Full-Stack Agent by Dobeu Tech Solutions LLC"
75
+ or
76
+ "Built with Monty Full-Stack Agent (https://github.com/dobeutech/monty-ai-fullstackdev-coder)"
77
+
78
+ ================================================================================
79
+
80
+ For the full legal text of CC BY-NC 4.0, visit:
81
+ https://creativecommons.org/licenses/by-nc/4.0/legalcode
package/README.md ADDED
@@ -0,0 +1,608 @@
1
+ # Monty Full-Stack Agent
2
+
3
+ [![npm version](https://img.shields.io/npm/v/monty-autonomous-fullstack-dev-multillm.svg)](https://www.npmjs.com/package/monty-autonomous-fullstack-dev-multillm)
4
+ [![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0/)
5
+ [![Node.js Version](https://img.shields.io/node/v/monty-autonomous-fullstack-dev-multillm.svg)](https://nodejs.org)
6
+
7
+ An autonomous full-stack development agent powered by the Claude Agent SDK. Takes your project from **idea to production** with incremental progress tracking across multiple sessions.
8
+
9
+ Based on [Anthropic's best practices](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) for long-running agents.
10
+
11
+ ## Installation
12
+
13
+ ### Prerequisites
14
+
15
+ - **Node.js** >= 18.0.0
16
+ - **Claude Code Subscription** or **Anthropic API Key** - Sign in with `monty login` or get a key at [console.anthropic.com](https://console.anthropic.com)
17
+
18
+ ### Windows Installation
19
+
20
+ ```powershell
21
+ # 1. Install Node.js (if not installed)
22
+ # Download from https://nodejs.org or use winget:
23
+ winget install OpenJS.NodeJS.LTS
24
+
25
+ # 2. Install Monty globally
26
+ npm install -g monty-autonomous-fullstack-dev-multillm
27
+
28
+ # 3. Authenticate (RECOMMENDED - interactive login)
29
+ monty login
30
+
31
+ # 3b. Or set API key manually (PowerShell - current session)
32
+ $env:ANTHROPIC_API_KEY="your-api-key-here"
33
+
34
+ # 3c. Or set API key permanently (PowerShell - persistent)
35
+ [Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "your-api-key-here", "User")
36
+
37
+ # 4. Verify installation
38
+ monty --help
39
+ ```
40
+
41
+ ### macOS Installation
42
+
43
+ ```bash
44
+ # 1. Install Node.js (if not installed)
45
+ # Using Homebrew (recommended):
46
+ brew install node
47
+
48
+ # Or download from https://nodejs.org
49
+
50
+ # 2. Install Monty globally
51
+ npm install -g monty-autonomous-fullstack-dev-multillm
52
+
53
+ # 3. Authenticate (RECOMMENDED - interactive login)
54
+ monty login
55
+
56
+ # 3b. Or set API key manually (current session)
57
+ export ANTHROPIC_API_KEY="your-api-key-here"
58
+
59
+ # 3c. Or set API key permanently (add to ~/.zshrc or ~/.bash_profile)
60
+ echo 'export ANTHROPIC_API_KEY="your-api-key-here"' >> ~/.zshrc
61
+ source ~/.zshrc
62
+
63
+ # 4. Verify installation
64
+ monty --help
65
+ ```
66
+
67
+ ### Linux Installation
68
+
69
+ ```bash
70
+ # 1. Install Node.js (if not installed)
71
+ # Ubuntu/Debian:
72
+ curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
73
+ sudo apt-get install -y nodejs
74
+
75
+ # Fedora/RHEL:
76
+ sudo dnf install nodejs
77
+
78
+ # Arch Linux:
79
+ sudo pacman -S nodejs npm
80
+
81
+ # Or use nvm (all distros):
82
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
83
+ nvm install 20
84
+ nvm use 20
85
+
86
+ # 2. Install Monty globally
87
+ npm install -g monty-autonomous-fullstack-dev-multillm
88
+
89
+ # 3. Authenticate (RECOMMENDED - interactive login)
90
+ monty login
91
+
92
+ # 3b. Or set API key manually (current session)
93
+ export ANTHROPIC_API_KEY="your-api-key-here"
94
+
95
+ # 3c. Or set API key permanently (add to ~/.bashrc or ~/.zshrc)
96
+ echo 'export ANTHROPIC_API_KEY="your-api-key-here"' >> ~/.bashrc
97
+ source ~/.bashrc
98
+
99
+ # 4. Verify installation
100
+ monty --help
101
+ ```
102
+
103
+ ### Run Directly with npx (No Install)
104
+
105
+ ```bash
106
+ # Works on all platforms - no installation needed
107
+ npx monty-autonomous-fullstack-dev-multillm --help
108
+
109
+ # Initialize a new project
110
+ npx monty-autonomous-fullstack-dev-multillm init --spec="Build a todo app with React and Supabase"
111
+
112
+ # Continue development
113
+ npx monty-autonomous-fullstack-dev-multillm code
114
+ ```
115
+
116
+ ### Project-Level Installation
117
+
118
+ ```bash
119
+ # Add to an existing project
120
+ npm install --save-dev monty-autonomous-fullstack-dev-multillm
121
+
122
+ # Add scripts to package.json:
123
+ # "scripts": {
124
+ # "agent:init": "monty init",
125
+ # "agent:code": "monty code"
126
+ # }
127
+ ```
128
+
129
+ ### Alternative Package Managers
130
+
131
+ ```bash
132
+ # Yarn
133
+ yarn global add monty-autonomous-fullstack-dev-multillm
134
+
135
+ # pnpm
136
+ pnpm add -g monty-autonomous-fullstack-dev-multillm
137
+
138
+ # Bun
139
+ bun add -g monty-autonomous-fullstack-dev-multillm
140
+ ```
141
+
142
+ ## Quick Start
143
+
144
+ ### Starting a New Project
145
+
146
+ ```bash
147
+ # Create a new directory
148
+ mkdir my-awesome-app && cd my-awesome-app
149
+
150
+ # Initialize with your idea
151
+ monty init --spec="Build a modern todo app with React, TypeScript, Tailwind CSS, and Supabase backend. Include user authentication, real-time updates, and dark mode."
152
+
153
+ # Continue development
154
+ monty code
155
+ ```
156
+
157
+ ### Using with an Existing Codebase
158
+
159
+ ```bash
160
+ # Navigate to your existing project
161
+ cd your-existing-project
162
+
163
+ # Initialize Monty (it will detect your tech stack)
164
+ monty init --spec="Complete the authentication system and add user dashboard"
165
+
166
+ # The agent will analyze your codebase and create a feature list
167
+ # Continue with incremental development
168
+ monty code
169
+ ```
170
+
171
+ ### Resuming Work
172
+
173
+ ```bash
174
+ # Check project status
175
+ monty status
176
+
177
+ # Continue where you left off
178
+ monty code
179
+
180
+ # Add specific context for this session
181
+ monty code --context="Focus on fixing the login bug in auth.ts"
182
+ ```
183
+
184
+ ## Commands
185
+
186
+ | Command | Description |
187
+ |---------|-------------|
188
+ | `monty` | Auto-detect mode (shows help if not initialized) |
189
+ | `monty init` | Initialize a new project with feature list |
190
+ | `monty code` | Continue incremental development |
191
+ | `monty status` | Show project progress and feature status |
192
+ | `monty setup` | Set up Monty in current directory |
193
+ | `monty --help` | Show detailed help |
194
+
195
+ ### Authentication Commands
196
+
197
+ | Command | Description |
198
+ |---------|-------------|
199
+ | `monty login` | Sign in with Claude Code subscription or Anthropic API key |
200
+ | `monty logout` | Sign out and clear stored credentials |
201
+ | `monty whoami` | Show current authentication status |
202
+
203
+ ### Options
204
+
205
+ | Option | Description |
206
+ |--------|-------------|
207
+ | `--spec="..."` | Project specification for initialization |
208
+ | `--context="..."` | Additional context for coding session |
209
+ | `--help, -h` | Show help |
210
+ | `--version, -v` | Show version |
211
+
212
+ ## How It Works
213
+
214
+ ### Two-Agent Architecture
215
+
216
+ Monty uses a sophisticated two-agent system:
217
+
218
+ ```
219
+ ┌─────────────────┐ First Run ┌─────────────────┐
220
+ │ │ ───────────────── │ Initializer │
221
+ │ Your Idea │ │ Agent │
222
+ │ │ │ │
223
+ └─────────────────┘ └────────┬────────┘
224
+
225
+ │ Creates
226
+
227
+ ┌─────────────────┐
228
+ │ .agent/ │
229
+ │ - feature_list │
230
+ │ - progress.txt │
231
+ └────────┬────────┘
232
+
233
+ ┌─────────────────┐ Subsequent ┌────────▼────────┐
234
+ │ Production │ ◄──────────────── │ Coding │
235
+ │ Ready App │ Runs │ Agent │
236
+ │ │ │ │
237
+ └─────────────────┘ └─────────────────┘
238
+ ```
239
+
240
+ ### Initializer Agent (First Run)
241
+
242
+ When you first run `monty init`:
243
+
244
+ 1. Analyzes your project specification
245
+ 2. Detects existing tech stack (if any)
246
+ 3. Generates comprehensive `feature_list.json` with ALL features marked as `passes: false`
247
+ 4. Creates `claude-progress.txt` for session bridging
248
+ 5. Makes initial git commit
249
+
250
+ ### Coding Agent (Every Session)
251
+
252
+ When you run `monty code`:
253
+
254
+ 1. Reads progress file and git logs to understand current state
255
+ 2. Runs health checks and validates environment
256
+ 3. Selects highest-priority failing feature
257
+ 4. Implements feature incrementally
258
+ 5. Tests using browser automation
259
+ 6. Updates feature status and commits changes
260
+ 7. Logs progress for the next session
261
+
262
+ ## Feature Detection
263
+
264
+ Monty automatically detects and adapts to:
265
+
266
+ **Frameworks:** React, Next.js, Vue, Svelte, Angular, Vanilla JS
267
+ **Build Tools:** Vite, Webpack, Rollup, Turbopack
268
+ **Testing:** Vitest, Jest, Playwright, Cypress
269
+ **Backend:** Supabase, Express, Fastify, Next.js API
270
+ **Databases:** PostgreSQL, MySQL, MongoDB, SQLite
271
+ **Styling:** Tailwind CSS, CSS Modules, Styled Components, SASS
272
+ **Package Managers:** npm, yarn, pnpm, bun
273
+
274
+ ## Files Created
275
+
276
+ ```
277
+ your-project/
278
+ └── .agent/ # Monty's working directory
279
+ ├── feature_list.json # Feature tracking (immutable structure)
280
+ ├── claude-progress.txt # Session logs for context bridging
281
+ ├── error-log.json # Error history for recovery
282
+ └── checkpoints.json # Recovery checkpoints
283
+ ```
284
+
285
+ ## Feature List Format
286
+
287
+ ```json
288
+ {
289
+ "project": {
290
+ "name": "My App",
291
+ "description": "A modern todo application",
292
+ "created_at": "2025-01-15T00:00:00Z",
293
+ "stack": ["react", "typescript", "tailwind", "supabase"]
294
+ },
295
+ "features": [
296
+ {
297
+ "id": "feat-001",
298
+ "category": "functional",
299
+ "priority": 1,
300
+ "description": "User can create new todo items",
301
+ "steps": [
302
+ "Navigate to main interface",
303
+ "Click 'Add Todo' button",
304
+ "Enter todo text",
305
+ "Verify todo appears in list"
306
+ ],
307
+ "passes": false,
308
+ "last_tested": null,
309
+ "notes": ""
310
+ }
311
+ ]
312
+ }
313
+ ```
314
+
315
+ ### Feature Categories
316
+
317
+ - **functional** - Core application logic and features
318
+ - **ui** - User interface elements, styling, responsiveness
319
+ - **integration** - API calls, data flow, third-party services
320
+ - **performance** - Loading times, optimizations
321
+ - **accessibility** - Keyboard navigation, screen readers, ARIA
322
+
323
+ ## Poka-yoke Safeguards
324
+
325
+ The framework enforces these rules to prevent common agent failures:
326
+
327
+ 1. **Cannot delete features** from the feature list
328
+ 2. **Cannot modify test steps** (steps are immutable after creation)
329
+ 3. **Cannot modify descriptions** after creation
330
+ 4. **Must verify via browser** before marking features as passing
331
+ 5. **Must commit changes** before ending a session
332
+
333
+ ## Best Practices
334
+
335
+ Based on [Anthropic's documentation](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents):
336
+
337
+ | Best Practice | Implementation |
338
+ |--------------|----------------|
339
+ | Incremental Progress | Work on ONE feature at a time |
340
+ | Clean State | Always leave codebase in committable state |
341
+ | Browser Verification | Test as a human user would |
342
+ | Progress Logging | Document everything for the next session |
343
+ | Git Discipline | Descriptive commits for every change |
344
+
345
+ ## Failure Modes Addressed
346
+
347
+ | Problem | Solution |
348
+ |---------|----------|
349
+ | Agent declares victory too early | Feature list requires ALL features to pass |
350
+ | Leaves environment with bugs | Must verify via browser before marking done |
351
+ | Marks features done prematurely | Browser automation required for verification |
352
+ | Spends time figuring out setup | Automated project detection and init scripts |
353
+ | Loses context between sessions | claude-progress.txt + git logs |
354
+
355
+ ## Configuration
356
+
357
+ For advanced customization, modify `src/config/agent-config.ts`:
358
+
359
+ ```typescript
360
+ export const agentConfig = {
361
+ paths: {
362
+ agentDir: '.agent',
363
+ featureList: '.agent/feature_list.json',
364
+ progressFile: '.agent/claude-progress.txt',
365
+ },
366
+ tools: {
367
+ initializer: ['Read', 'Write', 'Bash', 'Glob'],
368
+ coding: ['Read', 'Edit', 'Bash', 'Glob', 'Browser'],
369
+ },
370
+ permissionMode: 'acceptEdits',
371
+ session: {
372
+ maxRetries: 3,
373
+ autoCommit: true,
374
+ },
375
+ };
376
+ ```
377
+
378
+ ## Development
379
+
380
+ ### Building from Source
381
+
382
+ ```bash
383
+ # Clone the repository
384
+ git clone https://github.com/dobeutech/monty-ai-fullstackdev-coder.git
385
+ cd monty-ai-fullstackdev-coder
386
+
387
+ # Install dependencies
388
+ npm install
389
+
390
+ # Build
391
+ npm run build
392
+
393
+ # Run in development mode
394
+ npm run dev
395
+ ```
396
+
397
+ ### Project Structure
398
+
399
+ ```
400
+ monty-fullstack-agent/
401
+ ├── bin/
402
+ │ └── cli.js # CLI entry point
403
+ ├── src/
404
+ │ ├── agents/
405
+ │ │ ├── initializer.ts # First-run setup agent
406
+ │ │ ├── coding.ts # Incremental progress agent
407
+ │ │ └── prompts/ # System prompts
408
+ │ ├── config/
409
+ │ │ ├── agent-config.ts # Shared configuration
410
+ │ │ └── mcp-config.ts # Browser automation settings
411
+ │ ├── utils/ # Utility modules
412
+ │ └── index.ts # Main entry point
413
+ ├── templates/ # File templates
414
+ └── scripts/ # Init scripts
415
+ ```
416
+
417
+ ## Authentication
418
+
419
+ Monty supports multiple authentication methods:
420
+
421
+ ### 1. Auto-Detection (Primary)
422
+
423
+ If you are already authenticated with [Claude Code](https://docs.anthropic.com/claude/docs/claude-code), Monty will automatically detect and import your credentials.
424
+
425
+ ```bash
426
+ monty login
427
+ # ✓ Found Claude Code credentials!
428
+ # ✓ Imported successfully
429
+ ```
430
+
431
+ ### 2. Interactive Login
432
+
433
+ ```bash
434
+ # Sign in with Claude Code subscription (OAuth) or Anthropic API key
435
+ monty login
436
+
437
+ # Check your authentication status
438
+ monty whoami
439
+
440
+ # Sign out when needed
441
+ monty logout
442
+ ```
443
+
444
+ The interactive login will:
445
+ 1. First attempt to auto-detect Claude Code credentials
446
+ 2. If not found, offer OAuth login (opens browser) or manual API Key entry
447
+ 3. Validate your credentials
448
+ 4. Store them securely in `~/.monty/credentials.json`
449
+
450
+ ### 3. Environment Variables
451
+
452
+ You can also authenticate using environment variables:
453
+
454
+ | Variable | Description | Required |
455
+ |----------|-------------|----------|
456
+ | `ANTHROPIC_API_KEY` | Anthropic API key | No (if using login) |
457
+ | `ANTHROPIC_SUBSCRIPTION_KEY` | Claude Code subscription key | No (if using login) |
458
+ | `FORCE_INIT` | Force initialization mode | No |
459
+
460
+ ### Authentication Priority
461
+
462
+ When multiple credential sources exist, the priority is:
463
+ 1. `ANTHROPIC_SUBSCRIPTION_KEY` environment variable
464
+ 2. `ANTHROPIC_API_KEY` environment variable
465
+ 3. Subscription key from `~/.monty/credentials.json`
466
+ 4. API key from `~/.monty/credentials.json`
467
+
468
+ ## Troubleshooting
469
+
470
+ ### Authentication Issues
471
+
472
+ #### "Authentication required"
473
+
474
+ You need to authenticate before using Monty. Choose one of these methods:
475
+
476
+ **Option 1: Auto-detect (recommended)** - If you have Claude Code CLI installed:
477
+ ```bash
478
+ # First, authenticate with Claude Code
479
+ claude login
480
+
481
+ # Then let Monty auto-detect your credentials
482
+ monty login
483
+ ```
484
+
485
+ **Option 2: Manual API Key**:
486
+ ```bash
487
+ # Interactive login
488
+ monty login
489
+ # Select "API Key" method
490
+ # Paste your key from console.anthropic.com
491
+
492
+ # OR set environment variable
493
+ export ANTHROPIC_API_KEY="sk-ant-..."
494
+ ```
495
+
496
+ **Option 3: Environment Variable** (for automation/CI):
497
+ ```bash
498
+ export ANTHROPIC_API_KEY="your-key-here"
499
+ monty init --spec="your project"
500
+ ```
501
+
502
+ #### "Token expired"
503
+
504
+ Monty automatically refreshes expired tokens if you authenticated via Claude Code CLI.
505
+
506
+ If auto-refresh fails, re-authenticate:
507
+ ```bash
508
+ monty logout
509
+ monty login
510
+ ```
511
+
512
+ #### "Could not validate credentials"
513
+
514
+ Your API key may be invalid or expired:
515
+
516
+ 1. **For Claude Code subscription**: Run `claude login` to refresh, then `monty login`
517
+ 2. **For API key**: Get a new key from [console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys)
518
+ 3. **Check your key**: Run `monty whoami` to verify authentication status
519
+
520
+ #### Debugging Authentication
521
+
522
+ Check your current authentication status:
523
+ ```bash
524
+ monty whoami
525
+ ```
526
+
527
+ This command shows:
528
+ - Authentication method (Claude subscription or API key)
529
+ - Token expiration (if applicable)
530
+ - Key preview (first 8 and last 4 characters)
531
+ - Credential source (environment variable or file)
532
+
533
+ If authentication is working but agents fail:
534
+ - Verify network connectivity to api.anthropic.com
535
+ - Check that credentials file permissions are correct:
536
+ - Unix/Mac: `ls -la ~/.monty/credentials.json` (should be `-rw-------`)
537
+ - Windows: Only current user should have access
538
+ - Try setting API key directly: `export ANTHROPIC_API_KEY="your-key"`
539
+
540
+ ### Other Issues
541
+
542
+ #### "Feature list not found"
543
+
544
+ Run `monty init` first to initialize the project:
545
+ ```bash
546
+ monty init --spec="Build a todo app with React"
547
+ ```
548
+
549
+ #### "Permission denied"
550
+
551
+ Ensure the CLI is executable:
552
+ ```bash
553
+ # Unix/Mac
554
+ chmod +x $(which monty)
555
+
556
+ # Windows (run as Administrator if needed)
557
+ # No action usually required on Windows
558
+ ```
559
+
560
+ #### Agent fails to start
561
+
562
+ 1. Check authentication: `monty whoami`
563
+ 2. Verify Node.js version: `node --version` (must be >= 18.0.0)
564
+ 3. Check for error messages in the output
565
+ 4. Try running with explicit auth: `ANTHROPIC_API_KEY="your-key" monty code`
566
+
567
+ ## Contributing
568
+
569
+ Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details.
570
+
571
+ 1. Fork the repository
572
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
573
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
574
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
575
+ 5. Open a Pull Request
576
+
577
+ ## References
578
+
579
+ - [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents)
580
+ - [Building Effective Agents](https://www.anthropic.com/engineering/building-effective-agents)
581
+ - [Demystifying Evals for AI Agents](https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents)
582
+ - [Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk)
583
+
584
+ ## License
585
+
586
+ This project is licensed under the **Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)**.
587
+
588
+ **You are free to:**
589
+ - Share and redistribute the material
590
+ - Adapt, remix, and build upon the material
591
+
592
+ **Under these terms:**
593
+ - **Attribution** - You must give appropriate credit to Dobeu Tech Solutions LLC
594
+ - **NonCommercial** - You may not use the material for commercial purposes
595
+
596
+ **For commercial licensing:**
597
+ - Email: jeremyw@dobeu.net
598
+ - Website: [dobeu.net](https://dobeu.net)
599
+ - Terms of Service: [dobeu.net/tos](https://dobeu.net/tos)
600
+ - Privacy Policy: [dobeu.net/privacy](https://dobeu.net/privacy)
601
+
602
+ See [LICENSE](LICENSE) for full details.
603
+
604
+ ---
605
+
606
+ Copyright (c) 2025 **[Dobeu Tech Solutions LLC](https://dobeu.net)** - All Rights Reserved
607
+
608
+ Made with Claude Agent SDK