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,182 @@
1
+ # Skill Interface Schema
2
+
3
+ Formalized skill structure for consistent tooling and discovery. Inspired by Loom's tool system.
4
+
5
+ ## Skill Definition
6
+
7
+ Skills can be defined as YAML (in worker.yaml) or as standalone .md files with YAML frontmatter.
8
+
9
+ ### Inline in worker.yaml
10
+
11
+ ```yaml
12
+ worker:
13
+ id: cfo-worker
14
+ # ...
15
+
16
+ skills:
17
+ - id: mrr
18
+ name: "MRR Report"
19
+ description: "Current MRR from Stripe subscriptions"
20
+
21
+ interface:
22
+ inputs:
23
+ - name: months
24
+ type: number
25
+ default: 1
26
+ description: "Months to include"
27
+ outputs:
28
+ - name: report
29
+ type: markdown
30
+ destination: workspace/reports/finance/
31
+
32
+ verification:
33
+ - command: "test -f {output}"
34
+ description: "Output file exists"
35
+
36
+ mutating: false
37
+ ```
38
+
39
+ ### Standalone Skill File
40
+
41
+ `workers/{worker-id}/skills/{skill-id}.md`:
42
+
43
+ ```yaml
44
+ ---
45
+ skill:
46
+ id: mrr
47
+ name: "MRR Report"
48
+ description: "Current MRR from Stripe subscriptions"
49
+
50
+ interface:
51
+ inputs:
52
+ - name: months
53
+ type: number
54
+ default: 1
55
+ outputs:
56
+ - name: report
57
+ type: markdown
58
+ destination: workspace/reports/finance/
59
+
60
+ verification:
61
+ - command: "test -f {output}"
62
+
63
+ mutating: false
64
+ ---
65
+
66
+ # MRR Report Skill
67
+
68
+ Instructions for executing this skill...
69
+ ```
70
+
71
+ ## Schema Reference
72
+
73
+ ### Core Fields
74
+
75
+ | Field | Type | Required | Description |
76
+ |-------|------|----------|-------------|
77
+ | `id` | string | yes | Unique skill identifier |
78
+ | `name` | string | yes | Human-readable name |
79
+ | `description` | string | yes | Brief description |
80
+ | `mutating` | boolean | no | Triggers PostToolsHook if true |
81
+
82
+ ### Interface
83
+
84
+ ```yaml
85
+ interface:
86
+ inputs:
87
+ - name: string # parameter name
88
+ type: string # string, number, boolean, array
89
+ required: boolean # default: false
90
+ default: any # default value
91
+ description: string # help text
92
+
93
+ outputs:
94
+ - name: string # output name
95
+ type: string # markdown, json, file, git_commit
96
+ destination: string # output path pattern
97
+ ```
98
+
99
+ ### Verification
100
+
101
+ ```yaml
102
+ verification:
103
+ - command: string # shell command (use {output} placeholder)
104
+ description: string # what this verifies
105
+ must_pass: boolean # default: true
106
+ ```
107
+
108
+ ### Mutating Flag
109
+
110
+ If `mutating: true`:
111
+ - PostToolsHook runs after execution
112
+ - Thread auto-saved
113
+ - Metrics logged
114
+
115
+ Mutating skills typically:
116
+ - Write files
117
+ - Make git commits
118
+ - Modify external state
119
+
120
+ ## Input Types
121
+
122
+ | Type | Description | Example |
123
+ |------|-------------|---------|
124
+ | `string` | Text input | `"customer-cube"` |
125
+ | `number` | Numeric | `6` |
126
+ | `boolean` | True/false | `true` |
127
+ | `array` | List | `["a", "b"]` |
128
+ | `date` | ISO date | `"2026-01-23"` |
129
+ | `path` | File path | `"workspace/reports/"` |
130
+
131
+ ## Output Types
132
+
133
+ | Type | Description |
134
+ |------|-------------|
135
+ | `markdown` | Markdown file |
136
+ | `json` | JSON file |
137
+ | `file` | Generic file |
138
+ | `git_commit` | Creates commit |
139
+ | `console` | Prints to console |
140
+
141
+ ## Example Skills
142
+
143
+ ### Read-Only (non-mutating)
144
+
145
+ ```yaml
146
+ skills:
147
+ - id: mrr
148
+ name: "MRR Report"
149
+ description: "Current MRR"
150
+ interface:
151
+ outputs:
152
+ - type: console
153
+ verification: []
154
+ mutating: false
155
+ ```
156
+
157
+ ### File-Generating (mutating)
158
+
159
+ ```yaml
160
+ skills:
161
+ - id: monthly-report
162
+ name: "Monthly Report"
163
+ description: "Generate monthly financial report"
164
+ interface:
165
+ inputs:
166
+ - name: month
167
+ type: string
168
+ required: true
169
+ outputs:
170
+ - name: report
171
+ type: markdown
172
+ destination: "workspace/reports/finance/{month}-report.md"
173
+ verification:
174
+ - command: "test -f workspace/reports/finance/{month}-report.md"
175
+ mutating: true
176
+ ```
177
+
178
+ ## See Also
179
+
180
+ - [Worker Framework](./README.md)
181
+ - [State Machine](./state-machine.md)
182
+ - [Loom Tools](../loom/tools.md) - Inspiration
@@ -0,0 +1,102 @@
1
+ # Worker State Machine
2
+
3
+ Workers follow an explicit state machine for predictable execution. Inspired by Loom's agent FSM.
4
+
5
+ ## States
6
+
7
+ ```
8
+ Idle → Loading → Planning → Executing → Verifying → PostHook → Completed
9
+
10
+ Error → (retry or fail)
11
+ ```
12
+
13
+ | State | Description |
14
+ |-------|-------------|
15
+ | `idle` | Worker ready, no active task |
16
+ | `loading` | Loading context (worker.yaml, knowledge files) |
17
+ | `planning` | Analyzing task, determining approach |
18
+ | `executing` | Running skill logic |
19
+ | `verifying` | Running verification checks |
20
+ | `post_hook` | Auto-checkpoint, metrics logging |
21
+ | `completed` | Skill finished successfully |
22
+ | `error` | Recoverable error, may retry |
23
+
24
+ ## State Transitions
25
+
26
+ | From | Event | To |
27
+ |------|-------|----|
28
+ | idle | skill_requested | loading |
29
+ | loading | context_loaded | planning |
30
+ | loading | load_failed | error |
31
+ | planning | plan_ready | executing |
32
+ | executing | execution_done | verifying |
33
+ | executing | execution_failed | error |
34
+ | verifying | verification_passed | post_hook |
35
+ | verifying | verification_failed | error |
36
+ | post_hook | hook_complete | completed |
37
+ | error | retry | loading |
38
+ | error | max_retries | completed (with error) |
39
+
40
+ ## State in Thread
41
+
42
+ When saving a thread, capture current worker state:
43
+
44
+ ```json
45
+ {
46
+ "worker": {
47
+ "id": "{worker-id}",
48
+ "skill": "mrr",
49
+ "state": "completed",
50
+ "started_at": "ISO8601",
51
+ "completed_at": "ISO8601",
52
+ "error": null
53
+ }
54
+ }
55
+ ```
56
+
57
+ ## Hooks
58
+
59
+ ### post_execute
60
+
61
+ Runs after successful execution, before completion:
62
+ - `auto_checkpoint` - Save thread to workspace/threads/
63
+ - `log_metrics` - Append to workspace/metrics/metrics.jsonl
64
+
65
+ ### on_error
66
+
67
+ Runs when entering error state:
68
+ - `log_error` - Record error details
69
+ - `checkpoint_error_state` - Save thread with error info
70
+
71
+ ## worker.yaml Schema Addition
72
+
73
+ ```yaml
74
+ worker:
75
+ id: example-worker
76
+ # ... existing fields ...
77
+
78
+ state_machine:
79
+ enabled: true
80
+ max_retries: 1
81
+
82
+ hooks:
83
+ post_execute:
84
+ - auto_checkpoint
85
+ - log_metrics
86
+ on_error:
87
+ - log_error
88
+ - checkpoint_error_state
89
+ ```
90
+
91
+ ## Benefits
92
+
93
+ 1. **Predictable** - Every worker follows same lifecycle
94
+ 2. **Debuggable** - State captured in threads
95
+ 3. **Resilient** - Retry logic built-in
96
+ 4. **Observable** - Metrics on state transitions
97
+
98
+ ## See Also
99
+
100
+ - [Thread Schema](../hq-core/thread-schema.md) - Thread format
101
+ - [Loom State Machine](../loom/state-machine.md) - Inspiration
102
+ - [Worker Framework](./README.md) - Worker docs
@@ -0,0 +1,73 @@
1
+ # Base Worker Template
2
+ # Copy and customize for your worker
3
+
4
+ worker:
5
+ id: my-worker # unique identifier
6
+ name: "My Worker" # human-readable name
7
+ type: CodeWorker # CodeWorker, SocialWorker, ResearchWorker, OpsWorker
8
+ version: "1.0"
9
+
10
+ identity:
11
+ # Choose one:
12
+ # persona: your-name
13
+ # company_context: companies/acme/
14
+ # voice_guide: knowledge/my-brand/voice-style.md
15
+
16
+ execution:
17
+ mode: on-demand # on-demand, scheduled, event-triggered
18
+ # schedule: "0 9 * * *" # cron format (if scheduled)
19
+ max_runtime: 15m
20
+ retry_attempts: 3
21
+
22
+ context:
23
+ base: # always loaded
24
+ - path/to/required/file.md
25
+ dynamic: # loaded per task
26
+ - path/to/task/context/
27
+ exclude: # never load
28
+ - "*.test.*"
29
+ - node_modules/
30
+
31
+ verification:
32
+ pre_execute: [] # checks before starting
33
+ post_execute: # checks before marking done
34
+ - check: output_valid
35
+ approval_required: false # true = human reviews before action
36
+
37
+ tasks:
38
+ source: path/to/tasks.json # or prd.json
39
+ format: simple # simple, prd
40
+ one_at_a_time: true # always true (Ralph principle)
41
+
42
+ output:
43
+ destination: path/to/output/
44
+ format: markdown # markdown, json, git_commit
45
+
46
+ audit:
47
+ log: workers/logs/my-worker.log
48
+ progress: workers/progress/my-worker.txt
49
+
50
+ # State Machine (Loom pattern)
51
+ state_machine:
52
+ enabled: true
53
+ max_retries: 1
54
+
55
+ hooks:
56
+ post_execute:
57
+ - auto_checkpoint # save thread to workspace/threads/
58
+ - log_metrics # append to workspace/metrics/metrics.jsonl
59
+ on_error:
60
+ - log_error
61
+ - checkpoint_error_state
62
+
63
+ instructions: |
64
+ Worker-specific instructions go here.
65
+
66
+ Protocol:
67
+ 1. Step one
68
+ 2. Step two
69
+ 3. Step three
70
+
71
+ Never:
72
+ - Thing to avoid
73
+ - Another thing to avoid
@@ -0,0 +1,85 @@
1
+ # Code Worker Template
2
+ # For implementing features, fixing bugs, refactoring
3
+
4
+ worker:
5
+ id: code-{project}
6
+ name: "{Project} Code Worker"
7
+ type: CodeWorker
8
+ version: "1.0"
9
+
10
+ identity:
11
+ company_context: companies/{company}/
12
+
13
+ execution:
14
+ mode: on-demand
15
+ max_runtime: 30m
16
+ retry_attempts: 3
17
+
18
+ context:
19
+ base:
20
+ - companies/{company}/README.md
21
+ dynamic:
22
+ - repos/{visibility}/{repo}/src/
23
+ exclude:
24
+ - "*.test.*"
25
+ - node_modules/
26
+ - dist/
27
+ - .git/
28
+
29
+ verification:
30
+ pre_execute:
31
+ - check: branch_clean
32
+ command: "git status --porcelain"
33
+ post_execute:
34
+ - check: tests
35
+ command: "npm test"
36
+ - check: lint
37
+ command: "npm run lint"
38
+ - check: typecheck
39
+ command: "npm run typecheck"
40
+ - check: build
41
+ command: "npm run build"
42
+ approval_required: false # auto-commit if all pass
43
+
44
+ tasks:
45
+ source: workers/code/{id}/prd.json
46
+ format: prd
47
+ one_at_a_time: true
48
+
49
+ output:
50
+ destination: null # commits directly to repo
51
+ format: git_commit
52
+
53
+ audit:
54
+ log: workers/code/logs/{id}.log
55
+ progress: workers/code/progress/{id}.txt
56
+
57
+ instructions: |
58
+ You are a code worker for {project}.
59
+
60
+ Tech Stack:
61
+ - [List technologies]
62
+
63
+ Protocol:
64
+ 1. Read PRD, find first item where passes: false
65
+ 2. Implement ONLY that feature
66
+ 3. Write tests for new functionality
67
+ 4. Run all verification checks
68
+ 5. If ALL pass: commit with conventional message, update PRD
69
+ 6. If ANY fail: fix and retry (up to retry_attempts)
70
+ 7. Log progress
71
+
72
+ Commit Format:
73
+ feat(scope): short description
74
+
75
+ - Detail 1
76
+ - Detail 2
77
+
78
+ Implements: {feature-id}
79
+
80
+ Never:
81
+ - Modify multiple features per iteration
82
+ - Skip tests
83
+ - Use `any` type (TypeScript)
84
+ - Leave console.logs in production
85
+ - Commit without passing all checks
@@ -0,0 +1,49 @@
1
+ # Skill Template
2
+ # Use as YAML frontmatter in .md skill files, or inline in worker.yaml
3
+
4
+ skill:
5
+ id: my-skill # unique within worker
6
+ name: "My Skill" # human-readable name
7
+ description: "What this skill does"
8
+
9
+ interface:
10
+ inputs:
11
+ - name: param1
12
+ type: string # string, number, boolean, array, date, path
13
+ required: false
14
+ default: "default-value"
15
+ description: "Parameter description"
16
+
17
+ - name: param2
18
+ type: number
19
+ required: false
20
+ default: 1
21
+
22
+ outputs:
23
+ - name: report
24
+ type: markdown # markdown, json, file, git_commit, console
25
+ destination: "workspace/reports/{name}.md" # path pattern
26
+
27
+ verification:
28
+ - command: "test -f {output}"
29
+ description: "Output file exists"
30
+ must_pass: true
31
+
32
+ # Triggers PostToolsHook (auto-checkpoint, metrics) if true
33
+ mutating: false
34
+
35
+ # --- Below this line goes in the .md file body ---
36
+ #
37
+ # # My Skill
38
+ #
39
+ # ## Purpose
40
+ # What this skill accomplishes.
41
+ #
42
+ # ## Process
43
+ # 1. First step
44
+ # 2. Second step
45
+ # 3. Third step
46
+ #
47
+ # ## Notes
48
+ # - Important consideration
49
+ # - Another note
@@ -0,0 +1,70 @@
1
+ # Social Worker Template
2
+ # For X/Twitter, LinkedIn, etc.
3
+
4
+ worker:
5
+ id: social-{platform}-{persona}
6
+ name: "{Persona}'s {Platform} Worker"
7
+ type: SocialWorker
8
+ version: "1.0"
9
+
10
+ identity:
11
+ persona: {persona}
12
+ voice_guide: knowledge/{persona}/voice-style.md
13
+
14
+ execution:
15
+ mode: scheduled
16
+ schedule: "0 9,14,19 * * *" # 9am, 2pm, 7pm
17
+ max_runtime: 10m
18
+ retry_attempts: 2
19
+
20
+ context:
21
+ base:
22
+ - knowledge/{persona}/voice-style.md
23
+ - knowledge/{persona}/profile.md
24
+ dynamic:
25
+ - social-content/trends/
26
+ - social-content/drafts/{platform}/
27
+
28
+ verification:
29
+ post_execute:
30
+ - check: character_count
31
+ max: 280 # adjust per platform
32
+ - check: voice_consistency
33
+ reference: knowledge/{persona}/voice-style.md
34
+ approval_required: true # always review before posting
35
+
36
+ tasks:
37
+ source: workers/social/{id}/queue.json
38
+ format: simple
39
+ one_at_a_time: true
40
+
41
+ output:
42
+ destination: social-content/drafts/{platform}/
43
+ format: markdown
44
+ naming: "{date}-{time}-draft.md"
45
+
46
+ audit:
47
+ log: workers/social/logs/{id}.log
48
+ progress: workers/social/progress/{id}.txt
49
+
50
+ instructions: |
51
+ You are {persona}'s {platform} worker.
52
+
53
+ Task Types:
54
+ - generate: Create original post on given topic
55
+ - respond: Draft reply to specified thread
56
+ - curate: Find content to repost with commentary
57
+
58
+ Protocol:
59
+ 1. Check queue for pending task
60
+ 2. Execute based on task type
61
+ 3. Save draft to output destination
62
+ 4. Log progress
63
+
64
+ Style Guidelines:
65
+ - [Add platform-specific style notes]
66
+
67
+ Never:
68
+ - Post without approval
69
+ - Use corporate jargon
70
+ - Over-explain
@@ -0,0 +1,92 @@
1
+ # Example: Full HQ Modules Manifest
2
+ # Shows various module configurations for different use cases
3
+
4
+ version: "1.0"
5
+
6
+ modules:
7
+ # =============================================================================
8
+ # CORE MODULE
9
+ # Official HQ updates - recommended for all users
10
+ # =============================================================================
11
+ - name: hq-core
12
+ repo: https://github.com/coreyepstein/hq-starter-kit.git
13
+ branch: main
14
+ strategy: merge
15
+ access: public
16
+ paths:
17
+ # Core knowledge bases
18
+ knowledge/Ralph: knowledge/Ralph
19
+ knowledge/workers: knowledge/workers
20
+ # Commands and configuration
21
+ .claude/commands: .claude/commands
22
+ # Worker templates
23
+ workers/examples: workers/examples
24
+
25
+ # =============================================================================
26
+ # COMPANY MODULES
27
+ # Shared across your organization
28
+ # =============================================================================
29
+
30
+ # Company-wide shared resources
31
+ - name: acme-shared
32
+ repo: https://github.com/acme-corp/hq-shared.git
33
+ branch: main
34
+ strategy: link
35
+ access: team
36
+ paths:
37
+ # Company knowledge
38
+ knowledge/company: knowledge/acme
39
+ knowledge/processes: knowledge/acme/processes
40
+ # Shared worker configurations
41
+ workers/shared: workers/acme-shared
42
+ # Company templates
43
+ templates: templates/acme
44
+
45
+ # Engineering team module
46
+ - name: acme-engineering
47
+ repo: https://github.com/acme-corp/hq-engineering.git
48
+ branch: main
49
+ strategy: merge
50
+ access: "role:engineer"
51
+ paths:
52
+ # Tech stack documentation
53
+ knowledge/tech-stack: knowledge/tech-stack
54
+ # Code review guidelines
55
+ knowledge/code-review: knowledge/engineering/code-review
56
+ # Engineering-specific workers
57
+ workers/code: workers/engineering
58
+
59
+ # Design team module
60
+ - name: acme-design
61
+ repo: https://github.com/acme-corp/hq-design.git
62
+ branch: main
63
+ strategy: copy
64
+ access: "role:designer"
65
+ paths:
66
+ knowledge/design-system: knowledge/design-system
67
+ knowledge/brand: knowledge/brand
68
+
69
+ # =============================================================================
70
+ # COMMUNITY/THIRD-PARTY MODULES
71
+ # Optional integrations
72
+ # =============================================================================
73
+
74
+ # Social media management extension
75
+ - name: social-pro
76
+ repo: https://github.com/hq-community/social-pro.git
77
+ branch: stable
78
+ strategy: merge
79
+ access: public
80
+ paths:
81
+ workers/social: workers/social-extended
82
+ knowledge/social-strategy: knowledge/social
83
+
84
+ # Research and analysis tools
85
+ - name: research-toolkit
86
+ repo: https://github.com/hq-community/research-toolkit.git
87
+ branch: main
88
+ strategy: copy
89
+ access: public
90
+ paths:
91
+ workers/research: workers/research
92
+ knowledge/research-methods: knowledge/research
@@ -0,0 +1,14 @@
1
+ # Example: Minimal modules.yaml
2
+ # Just the essentials for getting started
3
+
4
+ version: "1.0"
5
+
6
+ modules:
7
+ - name: hq-core
8
+ repo: https://github.com/coreyepstein/hq-starter-kit.git
9
+ branch: main
10
+ strategy: merge
11
+ access: public
12
+ paths:
13
+ knowledge/Ralph: knowledge/Ralph
14
+ .claude/commands: .claude/commands