create-hq 5.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 (310) hide show
  1. package/dist/deps.d.ts +4 -0
  2. package/dist/deps.d.ts.map +1 -0
  3. package/dist/deps.js +65 -0
  4. package/dist/deps.js.map +1 -0
  5. package/dist/git.d.ts +3 -0
  6. package/dist/git.d.ts.map +1 -0
  7. package/dist/git.js +19 -0
  8. package/dist/git.js.map +1 -0
  9. package/dist/index.d.ts +3 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +23 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/scaffold.d.ts +8 -0
  14. package/dist/scaffold.d.ts.map +1 -0
  15. package/dist/scaffold.js +130 -0
  16. package/dist/scaffold.js.map +1 -0
  17. package/dist/ui.d.ts +7 -0
  18. package/dist/ui.d.ts.map +1 -0
  19. package/dist/ui.js +36 -0
  20. package/dist/ui.js.map +1 -0
  21. package/package.json +41 -0
  22. package/template/.claude/CLAUDE.md +202 -0
  23. package/template/.claude/commands/checkpoint.md +127 -0
  24. package/template/.claude/commands/cleanup.md +307 -0
  25. package/template/.claude/commands/execute-task.md +440 -0
  26. package/template/.claude/commands/exit-plan.md +41 -0
  27. package/template/.claude/commands/handoff.md +97 -0
  28. package/template/.claude/commands/learn.md +218 -0
  29. package/template/.claude/commands/metrics.md +118 -0
  30. package/template/.claude/commands/newworker.md +162 -0
  31. package/template/.claude/commands/nexttask.md +67 -0
  32. package/template/.claude/commands/prd.md +238 -0
  33. package/template/.claude/commands/reanchor.md +51 -0
  34. package/template/.claude/commands/remember.md +126 -0
  35. package/template/.claude/commands/run-project.md +348 -0
  36. package/template/.claude/commands/run.md +110 -0
  37. package/template/.claude/commands/search-reindex.md +62 -0
  38. package/template/.claude/commands/search.md +100 -0
  39. package/template/.claude/commands/setup.md +381 -0
  40. package/template/.claude/scripts/pure-ralph-loop.ps1 +312 -0
  41. package/template/.claude/scripts/pure-ralph-loop.sh +859 -0
  42. package/template/CHANGELOG.md +220 -0
  43. package/template/LICENSE +21 -0
  44. package/template/MIGRATION.md +259 -0
  45. package/template/README.md +368 -0
  46. package/template/data/journal/.gitkeep +0 -0
  47. package/template/docs/images/ascii-banner-options.md +122 -0
  48. package/template/docs/images/hq-banner.svg +105 -0
  49. package/template/knowledge/Ralph/01-overview.md +71 -0
  50. package/template/knowledge/Ralph/02-core-concepts.md +114 -0
  51. package/template/knowledge/Ralph/03-how-ralph-works.md +184 -0
  52. package/template/knowledge/Ralph/04-back-pressure.md +222 -0
  53. package/template/knowledge/Ralph/05-specifications.md +210 -0
  54. package/template/knowledge/Ralph/06-agents-md.md +222 -0
  55. package/template/knowledge/Ralph/07-implementation.md +316 -0
  56. package/template/knowledge/Ralph/08-economics.md +182 -0
  57. package/template/knowledge/Ralph/09-resources.md +145 -0
  58. package/template/knowledge/Ralph/10-claude-code-workflow.md +212 -0
  59. package/template/knowledge/Ralph/11-team-training-guide.md +383 -0
  60. package/template/knowledge/Ralph/README.md +40 -0
  61. package/template/knowledge/ai-security-framework/CONTRIBUTING.md +139 -0
  62. package/template/knowledge/ai-security-framework/GLOSSARY.md +176 -0
  63. package/template/knowledge/ai-security-framework/LICENSE +21 -0
  64. package/template/knowledge/ai-security-framework/QUICK-START.md +172 -0
  65. package/template/knowledge/ai-security-framework/README.md +232 -0
  66. package/template/knowledge/ai-security-framework/checklists/browser-security.md +301 -0
  67. package/template/knowledge/ai-security-framework/checklists/credential-isolation.md +322 -0
  68. package/template/knowledge/ai-security-framework/checklists/incident-response.md +288 -0
  69. package/template/knowledge/ai-security-framework/checklists/pre-flight.md +249 -0
  70. package/template/knowledge/ai-security-framework/checklists/weekly-audit.md +159 -0
  71. package/template/knowledge/ai-security-framework/configs/audit-logging.md +372 -0
  72. package/template/knowledge/ai-security-framework/configs/kill-switches.md +354 -0
  73. package/template/knowledge/ai-security-framework/docs/01-core-principles.md +256 -0
  74. package/template/knowledge/ai-security-framework/docs/02-threat-landscape.md +326 -0
  75. package/template/knowledge/ai-security-framework/docs/03-security-posture.md +250 -0
  76. package/template/knowledge/ai-security-framework/templates/agents-security.md +233 -0
  77. package/template/knowledge/design-styles/README.md +42 -0
  78. package/template/knowledge/design-styles/american-industrial.md +136 -0
  79. package/template/knowledge/design-styles/ethereal-abstract.md +133 -0
  80. package/template/knowledge/design-styles/liminal-portal.md +111 -0
  81. package/template/knowledge/design-styles/swipes/american-industrial/G-3m4YPW0AADdu2.jpeg +0 -0
  82. package/template/knowledge/design-styles/swipes/american-industrial/G-JJlt5WwAABK3K.png +0 -0
  83. package/template/knowledge/design-styles/swipes/american-industrial/G-JJmj5W0AEbJ-7.png +0 -0
  84. package/template/knowledge/design-styles/swipes/american-industrial/G59fgNuXkAAKLJQ (1).jpeg +0 -0
  85. package/template/knowledge/design-styles/swipes/american-industrial/G59fgNuXkAAKLJQ.jpeg +0 -0
  86. package/template/knowledge/design-styles/swipes/american-industrial/G7fVkn3WEAAM-ST.jpeg +0 -0
  87. package/template/knowledge/design-styles/swipes/american-industrial/G8ECO5JWEAIksyn.png +0 -0
  88. package/template/knowledge/design-styles/swipes/american-industrial/G9-3GQSWoAA8eqZ.png +0 -0
  89. package/template/knowledge/design-styles/swipes/american-industrial/G9xEOqrXkAEZRcs.png +0 -0
  90. package/template/knowledge/design-styles/swipes/american-industrial/G_MVeJrXQAA8sx4.jpeg +0 -0
  91. package/template/knowledge/design-styles/swipes/american-industrial/G_RSkmGXkAAgAVZ.png +0 -0
  92. package/template/knowledge/design-styles/swipes/american-industrial/README.md +31 -0
  93. package/template/knowledge/design-styles/swipes/american-industrial/qyqtg7Dq.png +0 -0
  94. package/template/knowledge/dev-team/README.md +35 -0
  95. package/template/knowledge/dev-team/patterns/README.md +34 -0
  96. package/template/knowledge/dev-team/patterns/frontend/react-best-practices.md +178 -0
  97. package/template/knowledge/dev-team/troubleshooting/README.md +31 -0
  98. package/template/knowledge/dev-team/workflows/README.md +49 -0
  99. package/template/knowledge/hq/checkpoint-schema.json +51 -0
  100. package/template/knowledge/hq/index-md-spec.md +74 -0
  101. package/template/knowledge/hq/thread-schema.md +153 -0
  102. package/template/knowledge/hq-core/checkpoint-schema.json +51 -0
  103. package/template/knowledge/hq-core/index-md-spec.md +74 -0
  104. package/template/knowledge/hq-core/thread-schema.md +153 -0
  105. package/template/knowledge/loom/README.md +51 -0
  106. package/template/knowledge/loom/architecture.md +125 -0
  107. package/template/knowledge/loom/code-style.md +169 -0
  108. package/template/knowledge/loom/llm-proxy.md +132 -0
  109. package/template/knowledge/loom/state-machine.md +131 -0
  110. package/template/knowledge/loom/thread-system.md +117 -0
  111. package/template/knowledge/loom/tools.md +94 -0
  112. package/template/knowledge/loom/weaver.md +96 -0
  113. package/template/knowledge/loom/web-frontend.md +131 -0
  114. package/template/knowledge/projects/README.md +72 -0
  115. package/template/knowledge/projects/templates/README.template.md +28 -0
  116. package/template/knowledge/workers/README.md +195 -0
  117. package/template/knowledge/workers/ralph-loop-pattern.md +157 -0
  118. package/template/knowledge/workers/skill-schema.md +182 -0
  119. package/template/knowledge/workers/state-machine.md +102 -0
  120. package/template/knowledge/workers/templates/base-worker.yaml +73 -0
  121. package/template/knowledge/workers/templates/code-worker.yaml +85 -0
  122. package/template/knowledge/workers/templates/skill.yaml +49 -0
  123. package/template/knowledge/workers/templates/social-worker.yaml +70 -0
  124. package/template/modules/examples/full-manifest.yaml +92 -0
  125. package/template/modules/examples/minimal.yaml +14 -0
  126. package/template/modules/modules.yaml +59 -0
  127. package/template/projects/.gitkeep +0 -0
  128. package/template/projects/incorporate-workers-into-pure-ralph/prd.json +88 -0
  129. package/template/projects/pure-ralph-branch-isolation/README.md +114 -0
  130. package/template/projects/pure-ralph-branch-isolation/prd.json +123 -0
  131. package/template/projects/purist-ralph-loop/README.md +148 -0
  132. package/template/projects/purist-ralph-loop/prd.json +135 -0
  133. package/template/projects/ralph-test/prd.json +50 -0
  134. package/template/prompts/pure-ralph-base.md +551 -0
  135. package/template/settings/.gitkeep +0 -0
  136. package/template/settings/pure-ralph.json +42 -0
  137. package/template/social-content/drafts/INDEX.md +21 -0
  138. package/template/social-content/drafts/linkedin/.gitkeep +1 -0
  139. package/template/social-content/drafts/x/.gitkeep +1 -0
  140. package/template/social-content/images/.gitkeep +1 -0
  141. package/template/starter-projects/code-worker/README.md +97 -0
  142. package/template/starter-projects/code-worker/prd.json +45 -0
  143. package/template/starter-projects/personal-assistant/README.md +42 -0
  144. package/template/starter-projects/personal-assistant/prd.json +43 -0
  145. package/template/starter-projects/social-media/README.md +60 -0
  146. package/template/starter-projects/social-media/prd.json +43 -0
  147. package/template/workers/content-brand/README.md +59 -0
  148. package/template/workers/content-brand/skills/messaging-alignment.md +91 -0
  149. package/template/workers/content-brand/skills/tone-check.md +76 -0
  150. package/template/workers/content-brand/skills/voice-analysis.md +68 -0
  151. package/template/workers/content-brand/worker.yaml +81 -0
  152. package/template/workers/content-legal/README.md +80 -0
  153. package/template/workers/content-legal/skills/claim-substantiation.md +150 -0
  154. package/template/workers/content-legal/skills/compliance-scan.md +123 -0
  155. package/template/workers/content-legal/skills/disclaimer-check.md +146 -0
  156. package/template/workers/content-legal/worker.yaml +118 -0
  157. package/template/workers/content-product/README.md +77 -0
  158. package/template/workers/content-product/skills/claim-verification.md +96 -0
  159. package/template/workers/content-product/skills/feature-accuracy.md +117 -0
  160. package/template/workers/content-product/skills/stats-check.md +128 -0
  161. package/template/workers/content-product/worker.yaml +97 -0
  162. package/template/workers/content-sales/README.md +70 -0
  163. package/template/workers/content-sales/skills/conversion-analysis.md +96 -0
  164. package/template/workers/content-sales/skills/cta-audit.md +107 -0
  165. package/template/workers/content-sales/skills/value-prop-check.md +114 -0
  166. package/template/workers/content-sales/worker.yaml +93 -0
  167. package/template/workers/content-shared/cli.ts +242 -0
  168. package/template/workers/content-shared/index.ts +234 -0
  169. package/template/workers/content-shared/lib/accuracy-analyzer.ts +661 -0
  170. package/template/workers/content-shared/lib/analyze.ts +370 -0
  171. package/template/workers/content-shared/lib/brand-analyzer.ts +526 -0
  172. package/template/workers/content-shared/lib/cms-integration.ts +446 -0
  173. package/template/workers/content-shared/lib/compliance-analyzer.ts +655 -0
  174. package/template/workers/content-shared/lib/conversion-analyzer.ts +555 -0
  175. package/template/workers/content-shared/lib/github-integration.ts +582 -0
  176. package/template/workers/content-shared/lib/output.ts +373 -0
  177. package/template/workers/content-shared/lib/parser.ts +771 -0
  178. package/template/workers/content-shared/lib/priority.ts +439 -0
  179. package/template/workers/content-shared/lib/recommendations.ts +512 -0
  180. package/template/workers/content-shared/lib/reporter.ts +749 -0
  181. package/template/workers/content-shared/lib/restructure.ts +664 -0
  182. package/template/workers/content-shared/lib/scorer.ts +140 -0
  183. package/template/workers/content-shared/lib/types.ts +227 -0
  184. package/template/workers/content-shared/lib/variants.ts +595 -0
  185. package/template/workers/content-shared/package.json +51 -0
  186. package/template/workers/content-shared/pnpm-lock.yaml +39 -0
  187. package/template/workers/content-shared/test/sample-page.json +115 -0
  188. package/template/workers/content-shared/tsconfig.json +20 -0
  189. package/template/workers/dev-team/README.md +166 -0
  190. package/template/workers/dev-team/_template.yaml +70 -0
  191. package/template/workers/dev-team/architect/package.json +27 -0
  192. package/template/workers/dev-team/architect/skills/api-design.md +89 -0
  193. package/template/workers/dev-team/architect/skills/refactor-plan.md +96 -0
  194. package/template/workers/dev-team/architect/skills/system-design.md +100 -0
  195. package/template/workers/dev-team/architect/src/index.ts +49 -0
  196. package/template/workers/dev-team/architect/src/mcp-server.ts +122 -0
  197. package/template/workers/dev-team/architect/src/skills/api-design.ts +316 -0
  198. package/template/workers/dev-team/architect/src/skills/refactor-plan.ts +264 -0
  199. package/template/workers/dev-team/architect/src/skills/system-design.ts +212 -0
  200. package/template/workers/dev-team/architect/tsconfig.json +19 -0
  201. package/template/workers/dev-team/architect/worker.yaml +128 -0
  202. package/template/workers/dev-team/backend-dev/package-lock.json +1252 -0
  203. package/template/workers/dev-team/backend-dev/package.json +27 -0
  204. package/template/workers/dev-team/backend-dev/skills/implement-endpoint.md +70 -0
  205. package/template/workers/dev-team/backend-dev/skills/implement-service.md +62 -0
  206. package/template/workers/dev-team/backend-dev/src/index.ts +51 -0
  207. package/template/workers/dev-team/backend-dev/src/mcp-server.ts +109 -0
  208. package/template/workers/dev-team/backend-dev/src/skills/implement-endpoint.ts +122 -0
  209. package/template/workers/dev-team/backend-dev/src/skills/implement-service.ts +126 -0
  210. package/template/workers/dev-team/backend-dev/tsconfig.json +19 -0
  211. package/template/workers/dev-team/backend-dev/worker.yaml +128 -0
  212. package/template/workers/dev-team/code-reviewer/package-lock.json +1080 -0
  213. package/template/workers/dev-team/code-reviewer/package.json +24 -0
  214. package/template/workers/dev-team/code-reviewer/skills/merge-to-production.md +61 -0
  215. package/template/workers/dev-team/code-reviewer/skills/merge-to-staging.md +54 -0
  216. package/template/workers/dev-team/code-reviewer/skills/request-changes.md +63 -0
  217. package/template/workers/dev-team/code-reviewer/skills/review-pr.md +77 -0
  218. package/template/workers/dev-team/code-reviewer/src/index.ts +56 -0
  219. package/template/workers/dev-team/code-reviewer/src/mcp-server.ts +101 -0
  220. package/template/workers/dev-team/code-reviewer/tsconfig.json +19 -0
  221. package/template/workers/dev-team/code-reviewer/worker.yaml +90 -0
  222. package/template/workers/dev-team/database-dev/package.json +22 -0
  223. package/template/workers/dev-team/database-dev/skills/create-schema.md +48 -0
  224. package/template/workers/dev-team/database-dev/src/index.ts +50 -0
  225. package/template/workers/dev-team/database-dev/src/mcp-server.ts +76 -0
  226. package/template/workers/dev-team/database-dev/tsconfig.json +18 -0
  227. package/template/workers/dev-team/database-dev/worker.yaml +90 -0
  228. package/template/workers/dev-team/frontend-dev/package.json +22 -0
  229. package/template/workers/dev-team/frontend-dev/skills/create-component.md +26 -0
  230. package/template/workers/dev-team/frontend-dev/src/index.ts +50 -0
  231. package/template/workers/dev-team/frontend-dev/src/mcp-server.ts +77 -0
  232. package/template/workers/dev-team/frontend-dev/tsconfig.json +18 -0
  233. package/template/workers/dev-team/frontend-dev/worker.yaml +132 -0
  234. package/template/workers/dev-team/infra-dev/package.json +24 -0
  235. package/template/workers/dev-team/infra-dev/skills/add-monitoring.md +73 -0
  236. package/template/workers/dev-team/infra-dev/skills/configure-deployment.md +80 -0
  237. package/template/workers/dev-team/infra-dev/skills/create-dockerfile.md +62 -0
  238. package/template/workers/dev-team/infra-dev/skills/setup-cicd.md +63 -0
  239. package/template/workers/dev-team/infra-dev/src/index.ts +55 -0
  240. package/template/workers/dev-team/infra-dev/src/mcp-server.ts +82 -0
  241. package/template/workers/dev-team/infra-dev/tsconfig.json +19 -0
  242. package/template/workers/dev-team/infra-dev/worker.yaml +92 -0
  243. package/template/workers/dev-team/knowledge-curator/package.json +24 -0
  244. package/template/workers/dev-team/knowledge-curator/skills/curate-troubleshooting.md +63 -0
  245. package/template/workers/dev-team/knowledge-curator/skills/process-learnings.md +61 -0
  246. package/template/workers/dev-team/knowledge-curator/skills/sync-documentation.md +76 -0
  247. package/template/workers/dev-team/knowledge-curator/skills/update-patterns.md +63 -0
  248. package/template/workers/dev-team/knowledge-curator/src/index.ts +53 -0
  249. package/template/workers/dev-team/knowledge-curator/src/mcp-server.ts +92 -0
  250. package/template/workers/dev-team/knowledge-curator/tsconfig.json +19 -0
  251. package/template/workers/dev-team/knowledge-curator/worker.yaml +80 -0
  252. package/template/workers/dev-team/motion-designer/package.json +22 -0
  253. package/template/workers/dev-team/motion-designer/skills/add-animation.md +25 -0
  254. package/template/workers/dev-team/motion-designer/skills/generate-image.md +36 -0
  255. package/template/workers/dev-team/motion-designer/src/index.ts +63 -0
  256. package/template/workers/dev-team/motion-designer/src/mcp-server.ts +79 -0
  257. package/template/workers/dev-team/motion-designer/tsconfig.json +18 -0
  258. package/template/workers/dev-team/motion-designer/worker.yaml +84 -0
  259. package/template/workers/dev-team/product-planner/queue.json +4 -0
  260. package/template/workers/dev-team/product-planner/worker.yaml +220 -0
  261. package/template/workers/dev-team/project-manager/package-lock.json +1252 -0
  262. package/template/workers/dev-team/project-manager/package.json +27 -0
  263. package/template/workers/dev-team/project-manager/skills/create-prd.md +66 -0
  264. package/template/workers/dev-team/project-manager/skills/next-issue.md +51 -0
  265. package/template/workers/dev-team/project-manager/skills/project-status.md +59 -0
  266. package/template/workers/dev-team/project-manager/skills/update-learnings.md +65 -0
  267. package/template/workers/dev-team/project-manager/src/index.ts +54 -0
  268. package/template/workers/dev-team/project-manager/src/mcp-server.ts +207 -0
  269. package/template/workers/dev-team/project-manager/src/skills/create-prd.ts +86 -0
  270. package/template/workers/dev-team/project-manager/src/skills/next-issue.ts +137 -0
  271. package/template/workers/dev-team/project-manager/src/skills/project-status.ts +131 -0
  272. package/template/workers/dev-team/project-manager/src/skills/update-learnings.ts +94 -0
  273. package/template/workers/dev-team/project-manager/tsconfig.json +19 -0
  274. package/template/workers/dev-team/project-manager/worker.yaml +96 -0
  275. package/template/workers/dev-team/qa-tester/package.json +24 -0
  276. package/template/workers/dev-team/qa-tester/skills/create-demo-account.md +36 -0
  277. package/template/workers/dev-team/qa-tester/skills/run-tests.md +36 -0
  278. package/template/workers/dev-team/qa-tester/skills/write-test.md +27 -0
  279. package/template/workers/dev-team/qa-tester/src/index.ts +61 -0
  280. package/template/workers/dev-team/qa-tester/src/mcp-server.ts +88 -0
  281. package/template/workers/dev-team/qa-tester/tsconfig.json +18 -0
  282. package/template/workers/dev-team/qa-tester/worker.yaml +116 -0
  283. package/template/workers/dev-team/task-executor/package-lock.json +1252 -0
  284. package/template/workers/dev-team/task-executor/package.json +27 -0
  285. package/template/workers/dev-team/task-executor/skills/analyze-issue.md +101 -0
  286. package/template/workers/dev-team/task-executor/skills/execute.md +133 -0
  287. package/template/workers/dev-team/task-executor/skills/report-learnings.md +106 -0
  288. package/template/workers/dev-team/task-executor/skills/validate-completion.md +121 -0
  289. package/template/workers/dev-team/task-executor/src/index.ts +54 -0
  290. package/template/workers/dev-team/task-executor/src/mcp-server.ts +139 -0
  291. package/template/workers/dev-team/task-executor/src/skills/analyze-issue.ts +219 -0
  292. package/template/workers/dev-team/task-executor/src/skills/execute.ts +132 -0
  293. package/template/workers/dev-team/task-executor/src/skills/report-learnings.ts +119 -0
  294. package/template/workers/dev-team/task-executor/src/skills/validate-completion.ts +142 -0
  295. package/template/workers/dev-team/task-executor/tsconfig.json +19 -0
  296. package/template/workers/dev-team/task-executor/worker.yaml +110 -0
  297. package/template/workers/registry.yaml +171 -0
  298. package/template/workers/security-scanner/README.md +73 -0
  299. package/template/workers/security-scanner/skills/pre-deploy-check.md +205 -0
  300. package/template/workers/security-scanner/worker.yaml +26 -0
  301. package/template/workspace/checkpoints/.gitkeep +0 -0
  302. package/template/workspace/content-ideas/inbox.jsonl +0 -0
  303. package/template/workspace/drafts/.gitkeep +0 -0
  304. package/template/workspace/learnings/.gitkeep +3 -0
  305. package/template/workspace/orchestrator/.gitkeep +0 -0
  306. package/template/workspace/ralph-test/COMPLETE.md +18 -0
  307. package/template/workspace/ralph-test/hello.txt +2 -0
  308. package/template/workspace/reports/.gitkeep +0 -0
  309. package/template/workspace/scratch/.gitkeep +0 -0
  310. package/template/workspace/threads/.gitkeep +3 -0
@@ -0,0 +1,316 @@
1
+ # Practical Implementation
2
+
3
+ ## Prerequisites
4
+
5
+ Before implementing Ralph, you need:
6
+
7
+ 1. **AI Coding Tool**
8
+ - Claude Code (Anthropic)
9
+ - Cursor
10
+ - Other CLI-based AI tools
11
+
12
+ 2. **Project Setup**
13
+ - Version control (git)
14
+ - Test framework
15
+ - Linter
16
+ - Type checking (if applicable)
17
+
18
+ 3. **Specification Files**
19
+ - PRD in JSON format
20
+ - agents.md configuration
21
+ - Progress tracking file
22
+
23
+ ## Basic Ralph Script
24
+
25
+ ### Minimal Implementation
26
+
27
+ ```bash
28
+ #!/bin/bash
29
+ # ralph.sh - Basic Ralph loop
30
+
31
+ ITERATIONS=${1:-10} # Default 10 iterations
32
+
33
+ for i in $(seq 1 $ITERATIONS); do
34
+ echo "=== Ralph Loop Iteration $i ==="
35
+
36
+ claude --print "Read plans/prd.json and find the first feature where passes is false.
37
+
38
+ Implement ONLY that feature.
39
+
40
+ Then run these commands in order:
41
+ 1. npm test
42
+ 2. npm run lint
43
+ 3. npm run typecheck
44
+ 4. npm run build
45
+
46
+ If ALL pass:
47
+ 1. Commit the changes with a descriptive message
48
+ 2. Update plans/prd.json to set passes: true for this feature
49
+ 3. Append progress to progress.txt
50
+
51
+ If ANY fail:
52
+ 1. Fix the issues
53
+ 2. Try again
54
+
55
+ Exit when done with this ONE feature."
56
+
57
+ echo "Completed iteration $i"
58
+ sleep 2
59
+ done
60
+
61
+ echo "Ralph loop complete!"
62
+ ```
63
+
64
+ ### Running It
65
+
66
+ ```bash
67
+ chmod +x ralph.sh
68
+ ./ralph.sh 20 # Run 20 iterations
69
+ ```
70
+
71
+ ## File Structure
72
+
73
+ ```
74
+ project/
75
+ ├── ralph.sh # The loop script
76
+ ├── agents.md # Agent configuration
77
+ ├── plans/
78
+ │ └── prd.json # Product requirements
79
+ ├── progress.txt # Progress log
80
+ ├── src/ # Source code
81
+ ├── tests/ # Test files
82
+ ├── package.json # Dependencies
83
+ └── tsconfig.json # TypeScript config
84
+ ```
85
+
86
+ ## Sample PRD Template
87
+
88
+ ```json
89
+ {
90
+ "project": "my-project",
91
+ "updated": "2026-01-13",
92
+ "features": [
93
+ {
94
+ "id": "init-001",
95
+ "title": "Project Setup",
96
+ "description": "Initialize project with basic structure",
97
+ "acceptance_criteria": [
98
+ "package.json exists with correct dependencies",
99
+ "TypeScript configured with strict mode",
100
+ "Jest configured for testing",
101
+ "ESLint configured with recommended rules"
102
+ ],
103
+ "passes": true
104
+ },
105
+ {
106
+ "id": "feat-001",
107
+ "title": "User Authentication",
108
+ "description": "Implement login functionality",
109
+ "acceptance_criteria": [
110
+ "Login form with email and password",
111
+ "Form validation for required fields",
112
+ "API call to /auth/login endpoint",
113
+ "Error handling for failed login",
114
+ "Redirect to dashboard on success"
115
+ ],
116
+ "passes": false
117
+ }
118
+ ]
119
+ }
120
+ ```
121
+
122
+ ## Sample agents.md Template
123
+
124
+ ```markdown
125
+ # Project: My Project
126
+
127
+ ## Tech Stack
128
+ - TypeScript 5.x
129
+ - React 18.x
130
+ - Jest for testing
131
+ - ESLint for linting
132
+
133
+ ## Commands
134
+ | Command | Purpose |
135
+ |---------|---------|
136
+ | `npm run dev` | Start dev server |
137
+ | `npm run build` | Production build |
138
+ | `npm test` | Run all tests |
139
+ | `npm run lint` | Run linter |
140
+ | `npm run typecheck` | Type check |
141
+
142
+ ## Task Protocol
143
+
144
+ ### When implementing a feature:
145
+ 1. Read the feature spec from plans/prd.json
146
+ 2. Implement the minimum code to satisfy acceptance criteria
147
+ 3. Write tests for the new functionality
148
+ 4. Run verification: `npm test && npm run lint && npm run typecheck`
149
+ 5. If verification passes, commit and update PRD
150
+ 6. Log progress to progress.txt
151
+
152
+ ### Commit message format:
153
+ ```
154
+ feat(scope): short description
155
+
156
+ - Bullet point details
157
+
158
+ Implements: feature-id
159
+ ```
160
+
161
+ ### Never:
162
+ - Modify multiple features in one iteration
163
+ - Skip running tests
164
+ - Use `any` type
165
+ - Leave console.logs in production code
166
+
167
+ ## Project Structure
168
+ - src/components/ - React components
169
+ - src/hooks/ - Custom hooks
170
+ - src/services/ - API services
171
+ - src/types/ - TypeScript types
172
+ - tests/ - Test files
173
+ ```
174
+
175
+ ## Advanced: Visual Feedback Loop
176
+
177
+ For frontend applications, add browser automation:
178
+
179
+ ### MCP Configuration
180
+
181
+ ```json
182
+ {
183
+ "mcpServers": {
184
+ "chrome-devtools": {
185
+ "command": "npx",
186
+ "args": ["@anthropic/mcp-server-chrome-devtools"],
187
+ "env": {
188
+ "CHROME_DEBUG_URL": "http://localhost:9222"
189
+ }
190
+ }
191
+ }
192
+ }
193
+ ```
194
+
195
+ ### Chrome Launch Script
196
+
197
+ ```bash
198
+ #!/bin/bash
199
+ # start-chrome-debug.sh
200
+ google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug
201
+ ```
202
+
203
+ ### Updated Ralph Script with Visual
204
+
205
+ ```bash
206
+ #!/bin/bash
207
+ # ralph-visual.sh - Ralph with visual feedback
208
+
209
+ # Start Chrome in debug mode (background)
210
+ ./start-chrome-debug.sh &
211
+ CHROME_PID=$!
212
+
213
+ # Wait for Chrome to start
214
+ sleep 3
215
+
216
+ for i in $(seq 1 $ITERATIONS); do
217
+ claude --print "Read plans/prd.json, find first incomplete feature.
218
+
219
+ Implement the feature, then:
220
+ 1. Run npm test, lint, typecheck
221
+ 2. Use Chrome DevTools MCP to take screenshots
222
+ 3. Verify the UI looks correct
223
+ 4. If all checks pass, commit
224
+ 5. Update PRD and progress.txt"
225
+ done
226
+
227
+ # Cleanup
228
+ kill $CHROME_PID
229
+ ```
230
+
231
+ ## Running Overnight
232
+
233
+ ### With tmux
234
+
235
+ ```bash
236
+ # Start a tmux session
237
+ tmux new-session -d -s ralph
238
+
239
+ # Run Ralph in the session
240
+ tmux send-keys -t ralph './ralph.sh 100' Enter
241
+
242
+ # Detach and go to sleep
243
+ # Next morning:
244
+ tmux attach-session -t ralph
245
+ ```
246
+
247
+ ### With nohup
248
+
249
+ ```bash
250
+ nohup ./ralph.sh 100 > ralph.log 2>&1 &
251
+ echo $! > ralph.pid
252
+
253
+ # Check progress
254
+ tail -f ralph.log
255
+
256
+ # Stop if needed
257
+ kill $(cat ralph.pid)
258
+ ```
259
+
260
+ ## Monitoring Progress
261
+
262
+ ### Simple Progress Check
263
+
264
+ ```bash
265
+ # See current status
266
+ cat progress.txt | tail -20
267
+
268
+ # Count completed features
269
+ grep -c '"passes": true' plans/prd.json
270
+ ```
271
+
272
+ ### Progress Dashboard Script
273
+
274
+ ```bash
275
+ #!/bin/bash
276
+ # status.sh
277
+
278
+ echo "=== Ralph Status ==="
279
+ echo ""
280
+ echo "Completed features:"
281
+ grep -c '"passes": true' plans/prd.json
282
+
283
+ echo ""
284
+ echo "Remaining features:"
285
+ grep -c '"passes": false' plans/prd.json
286
+
287
+ echo ""
288
+ echo "Recent progress:"
289
+ tail -10 progress.txt
290
+
291
+ echo ""
292
+ echo "Git log:"
293
+ git log --oneline -5
294
+ ```
295
+
296
+ ## Troubleshooting
297
+
298
+ ### Loop Gets Stuck
299
+ - Check if tests are flaky
300
+ - Verify acceptance criteria is achievable
301
+ - Look at progress.txt for error patterns
302
+
303
+ ### Context Window Exhaustion
304
+ - Make features smaller
305
+ - Clear conversation between iterations
306
+ - Use `--print` flag for fresh context
307
+
308
+ ### Slow Iterations
309
+ - Optimize test suite
310
+ - Use faster type checker settings
311
+ - Consider language choice (TypeScript > Rust)
312
+
313
+ ### Quality Issues
314
+ - Add more specific acceptance criteria
315
+ - Strengthen back pressure (more tests)
316
+ - Add code review step for critical features
@@ -0,0 +1,182 @@
1
+ # Economic Impact
2
+
3
+ ## The New Economics of Software Development
4
+
5
+ Ralph fundamentally changes the cost structure of software development.
6
+
7
+ > "Software development now costs $10.42 US an hour. It's less than you would pay a fast food retail worker. It's cheap. And not only is it cheap, you can do it autonomously."
8
+ > — Geoffrey Huntley
9
+
10
+ ## Cost Comparison
11
+
12
+ ### Traditional Software Development
13
+
14
+ | Role | Hourly Rate (USD) | Annual Cost |
15
+ |------|------------------|-------------|
16
+ | Junior Developer | $35-50 | $70-100K |
17
+ | Senior Developer | $75-150 | $150-300K |
18
+ | Staff Engineer | $150-250 | $300-500K |
19
+ | Team (5 people) | $350-750 | $700K-1.5M |
20
+
21
+ ### Ralph-Based Development
22
+
23
+ | Component | Cost |
24
+ |-----------|------|
25
+ | AI API costs | ~$10/hour |
26
+ | Compute | ~$0.50/hour |
27
+ | **Total** | **~$10.50/hour** |
28
+
29
+ Running 24/7: ~$250/day or ~$7,500/month
30
+
31
+ ## The Disruption Model
32
+
33
+ Geoffrey references Clayton Christensen's "Disruptive Innovation":
34
+
35
+ > "This is going to be coming. If you don't think this is not going to be coming, well, one, you should be the one doing it because the opportunity, it's the opportunity of a lifetime right now. Go do it."
36
+ > — Geoffrey Huntley
37
+
38
+ ### The Disruption Pattern
39
+
40
+ 1. **Incumbent**: Large team, high costs, slow iteration
41
+ 2. **Disruptor**: Small team + Ralph, low costs, fast iteration
42
+
43
+ > "What happens when there's a couple people that just in their 20s, they go to Bali and they run the Z80 and Ralph and instead of charging $100,000 a month for the enterprise SaaS, they go after your product and they charge $1,000 a month and they can turn things around faster."
44
+ > — Geoffrey Huntley
45
+
46
+ ## Time Multiplication
47
+
48
+ Ralph doesn't just reduce costs—it multiplies output:
49
+
50
+ > "You get weeks worth of work of potentially multiple co-workers in a couple hours."
51
+ > — Geoffrey Huntley
52
+
53
+ ### Traditional Timeline
54
+ ```
55
+ Feature request → Planning → Development → Review → QA → Deploy
56
+ 1 day 2 days 1-2 weeks 3 days 2 days 1 day
57
+ Total: 3-4 weeks
58
+ ```
59
+
60
+ ### Ralph Timeline
61
+ ```
62
+ Feature spec → Ralph overnight → Human review → Deploy
63
+ 30 min 8 hours 2 hours 30 min
64
+ Total: ~12 hours
65
+ ```
66
+
67
+ ## Impact on Companies
68
+
69
+ ### Startups
70
+ - Can compete with well-funded incumbents
71
+ - Need smaller teams
72
+ - Faster time to market
73
+ - Lower burn rate
74
+
75
+ ### Enterprises
76
+ - Must adapt or face disruption
77
+ - Over-hired engineering teams become liability
78
+ - Need to transform workflows
79
+
80
+ > "What about all these companies that raise these massive rounds and they've got so many people working for them? That's the old world."
81
+ > — Geoffrey Huntley
82
+
83
+ ### Individuals
84
+ - Solo developers can build enterprise-grade products
85
+ - Location independence ("chill on a beach in Bali")
86
+ - Skills shift from coding to directing
87
+
88
+ ## The Moat Question
89
+
90
+ Ralph raises questions about competitive advantages:
91
+
92
+ > "What is a moat in open source and SaaS now? What is a moat in SaaS now? What are software licenses now? If you can literally just create some plausible deniability."
93
+ > — Geoffrey Huntley
94
+
95
+ ### Traditional Moats (Weakening)
96
+ - Codebase size
97
+ - Team expertise
98
+ - Development velocity
99
+ - Technical debt tolerance
100
+
101
+ ### New Moats (Strengthening)
102
+ - Distribution / GTM
103
+ - Customer relationships
104
+ - Brand / trust
105
+ - Domain expertise
106
+ - Data advantages
107
+ - Regulatory compliance
108
+
109
+ ## Clean Room Economics
110
+
111
+ Ralph enables legal product cloning through clean room design:
112
+
113
+ > "The way we came to have Intel and AMD CPUs is because of what was called a clean room design technique."
114
+ > — Geoffrey Huntley
115
+
116
+ Process:
117
+ 1. Analyze competitor's public behavior (spec generation)
118
+ 2. Generate specifications (new IP)
119
+ 3. Run Ralph forward on specs (clean implementation)
120
+ 4. Result: Similar functionality, original code
121
+
122
+ This threatens:
123
+ - SaaS businesses with replicable features
124
+ - Open source with restrictive licenses (BSL, SSPL)
125
+ - Products relying on implementation complexity as moat
126
+
127
+ ## Founder Perspective
128
+
129
+ > "Right now, founders are scared. Absolutely scared."
130
+ > — Geoffrey Huntley
131
+
132
+ Why founders are concerned:
133
+ 1. Unit economics changed overnight
134
+ 2. Competitive advantages eroding
135
+ 3. Small teams can challenge large ones
136
+ 4. Time-to-clone shrinking
137
+
138
+ ## Career Implications
139
+
140
+ ### Skills That Matter More
141
+ - System design
142
+ - Prompt engineering / AI orchestration
143
+ - Domain expertise
144
+ - Product sense
145
+ - Quality assurance
146
+
147
+ ### Skills That Matter Less
148
+ - Raw coding speed
149
+ - Language-specific expertise
150
+ - Memorizing APIs
151
+ - Typing speed
152
+
153
+ > "If you're a senior software engineer right now and you're just picking up the tools now, how much is your paycheck? How much is a junior's paycheck? They got six months advantage on you."
154
+ > — Geoffrey Huntley
155
+
156
+ ## The Opportunity
157
+
158
+ > "The opportunity of a lifetime right now. Go do it."
159
+ > — Geoffrey Huntley
160
+
161
+ For individuals:
162
+ - Build products with near-zero marginal development cost
163
+ - Compete in markets previously requiring large teams
164
+ - Work from anywhere
165
+ - Own the output
166
+
167
+ For companies:
168
+ - Transform development workflows
169
+ - Reduce costs dramatically
170
+ - Increase iteration speed
171
+ - Stay competitive
172
+
173
+ ## Timeline Predictions
174
+
175
+ Based on Geoffrey's observations (as of early 2026):
176
+ - **Now**: Early adopters seeing 10-100x productivity gains
177
+ - **6-12 months**: Mainstream adoption
178
+ - **1-2 years**: Companies that didn't adapt struggling
179
+ - **2-5 years**: Software development unrecognizable
180
+
181
+ > "The economics of software development has forever changed."
182
+ > — Geoffrey Huntley
@@ -0,0 +1,145 @@
1
+ # Resources
2
+
3
+ ## Primary Sources
4
+
5
+ ### Original Article
6
+ - **Ralph by Geoffrey Huntley**: https://ghuntley.com/ralph/
7
+ - The original article introducing the Ralph methodology
8
+
9
+ ### Video Resources
10
+
11
+ #### By Geoffrey Huntley (Creator)
12
+
13
+ 1. **"The Ralph Wiggum Loop from 1st principles"**
14
+ - URL: https://www.youtube.com/watch?v=4Nna09dG_c0
15
+ - Duration: 36:13
16
+ - Key content: Fundamental explanation of Ralph as an orchestrator pattern for mallocing context windows
17
+ - Published: January 11, 2026
18
+
19
+ 2. **"AI Giants Interview with Geoffrey Huntley, Creator of the /ralph loop"**
20
+ - URL: https://www.youtube.com/watch?v=lQ2ihlUzlfs
21
+ - Duration: 1:08:45
22
+ - Key content: Comprehensive interview covering Ralph's creation, philosophy, and implications
23
+ - Published: January 13, 2026
24
+
25
+ 3. **"fundamental skills and knowledge you must have in 2026 for SWE"**
26
+ - URL: https://www.youtube.com/watch?v=Jr2auYrBDA4
27
+ - Duration: 39:29
28
+ - Key content: Context on AI adoption stages, the Z80 experiment, and software development economics
29
+ - Published: January 13, 2026
30
+
31
+ 4. **"the history of agents.md, the problems with agents.md and what makes a good one"**
32
+ - URL: https://www.youtube.com/watch?v=8gotGDhQKeQ
33
+ - Duration: 22:35
34
+ - Key content: Deep dive into agents.md configuration, common problems, and best practices
35
+ - Published: January 12, 2026
36
+
37
+ #### By Matt Pocock
38
+
39
+ 5. **"Ship working code while you sleep with the Ralph Wiggum technique"**
40
+ - URL: https://www.youtube.com/watch?v=_IK18goX4X8
41
+ - Duration: 16:23
42
+ - Key content: Practical implementation guide with actual code examples
43
+ - Published: January 5, 2026
44
+ - Additional resources: https://www.aihero.dev/tips-for-ai-coding
45
+
46
+ 6. **"Frontend is HARDER for AI than backend (here's how to fix it)"**
47
+ - URL: https://www.youtube.com/watch?v=pSritFeoYFo
48
+ - Duration: 5:29
49
+ - Key content: Adding visual feedback loops to Ralph for frontend development
50
+ - Published: January 12, 2026
51
+
52
+ 7. **"How I use Claude Code for real engineering"**
53
+ - URL: https://www.youtube.com/watch?v=kZ-zzHVUrO4
54
+ - Duration: 10:11
55
+ - Key content: Complete workflow for multi-phase projects using Claude Code's plan mode
56
+ - Published: October 27, 2025
57
+ - Topics: Plan mode, context window management, multi-phase execution, GitHub issues for plan persistence, concision rules, auto-accept mode
58
+
59
+ ### Anthropic Documentation
60
+ - **"Effective harnesses for long-running agents"**: Referenced by Matt Pocock
61
+ - Best practices for autonomous agent loops
62
+ - JSON PRD format recommendations
63
+ - Browser automation for verification
64
+
65
+ ## Tools & Dependencies
66
+
67
+ ### AI Tools
68
+ - **Claude Code** (Anthropic): https://www.anthropic.com/claude-code
69
+ - Primary tool for running Ralph loops
70
+ - **Cursor**: https://cursor.sh/
71
+ - Alternative AI coding environment
72
+
73
+ ### MCP Servers (for visual feedback)
74
+ - **Chrome DevTools MCP**: Browser automation
75
+ - **Playwright MCP**: Cross-browser automation
76
+ - **dev-browser**: https://github.com/SawyerHood/dev-browser
77
+ - **playwriter**: https://github.com/remorses/playwriter
78
+
79
+ ### Supporting Tools
80
+ - **pre-commit**: https://pre-commit.com/
81
+ - For automating back pressure hooks
82
+ - **Jest**: https://jestjs.io/
83
+ - JavaScript testing framework
84
+ - **ESLint**: https://eslint.org/
85
+ - JavaScript linting
86
+ - **TypeScript**: https://www.typescriptlang.org/
87
+ - Type checking
88
+
89
+ ## Community
90
+
91
+ ### Geoffrey Huntley
92
+ - Website: https://ghuntley.com/
93
+ - YouTube: https://www.youtube.com/@GeoffreyHuntley
94
+ - Background: Former React Extensions maintainer, open source advocate, goat farmer
95
+
96
+ ### Matt Pocock
97
+ - Website: https://www.mattpocock.com/
98
+ - AI Hero: https://www.aihero.dev/
99
+ - YouTube: https://www.youtube.com/@maaborern
100
+ - Background: TypeScript educator, creator of Total TypeScript
101
+
102
+ ## Further Reading
103
+
104
+ ### Concepts Referenced
105
+ - **Clayton Christensen's Disruptive Innovation**
106
+ - Book: "The Innovator's Dilemma"
107
+ - Explains how small players disrupt incumbents
108
+
109
+ - **Clean Room Design**
110
+ - Legal technique for reverse engineering
111
+ - How AMD created x86 compatible CPUs
112
+
113
+ ### Related Techniques
114
+ - **Test-Driven Development (TDD)**
115
+ - Writing tests before code
116
+ - Foundation for back pressure
117
+
118
+ - **Continuous Integration (CI)**
119
+ - Automated testing on commit
120
+ - Infrastructure for verification
121
+
122
+ ## Glossary Quick Reference
123
+
124
+ | Term | Definition |
125
+ |------|------------|
126
+ | Ralph | Autonomous AI coding loop methodology |
127
+ | Mallocing | Managing context window allocation |
128
+ | Context Rot | Degradation of AI performance over long conversations |
129
+ | Compaction | Context filled with irrelevant information |
130
+ | Back Pressure | Automated verification that catches AI errors |
131
+ | PRD | Product Requirements Document (JSON format) |
132
+ | agents.md | Configuration file for AI coding agents |
133
+ | AFK Coding | Running AI agents without supervision |
134
+ | Z80 | Geoffrey's original proof-of-concept experiment |
135
+ | Clean Room | Legal technique for implementing specs without copying code |
136
+
137
+ ## Version History
138
+
139
+ This knowledge repository compiled: January 2026
140
+
141
+ Based on publicly available videos and talks through January 13, 2026.
142
+
143
+ ---
144
+
145
+ *Note: URLs and resources current as of compilation date. Check original sources for updates.*