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.
- package/dist/deps.d.ts +4 -0
- package/dist/deps.d.ts.map +1 -0
- package/dist/deps.js +65 -0
- package/dist/deps.js.map +1 -0
- package/dist/git.d.ts +3 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +19 -0
- package/dist/git.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/scaffold.d.ts +8 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +130 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/ui.d.ts +7 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +36 -0
- package/dist/ui.js.map +1 -0
- package/package.json +41 -0
- package/template/.claude/CLAUDE.md +202 -0
- package/template/.claude/commands/checkpoint.md +127 -0
- package/template/.claude/commands/cleanup.md +307 -0
- package/template/.claude/commands/execute-task.md +440 -0
- package/template/.claude/commands/exit-plan.md +41 -0
- package/template/.claude/commands/handoff.md +97 -0
- package/template/.claude/commands/learn.md +218 -0
- package/template/.claude/commands/metrics.md +118 -0
- package/template/.claude/commands/newworker.md +162 -0
- package/template/.claude/commands/nexttask.md +67 -0
- package/template/.claude/commands/prd.md +238 -0
- package/template/.claude/commands/reanchor.md +51 -0
- package/template/.claude/commands/remember.md +126 -0
- package/template/.claude/commands/run-project.md +348 -0
- package/template/.claude/commands/run.md +110 -0
- package/template/.claude/commands/search-reindex.md +62 -0
- package/template/.claude/commands/search.md +100 -0
- package/template/.claude/commands/setup.md +381 -0
- package/template/.claude/scripts/pure-ralph-loop.ps1 +312 -0
- package/template/.claude/scripts/pure-ralph-loop.sh +859 -0
- package/template/CHANGELOG.md +220 -0
- package/template/LICENSE +21 -0
- package/template/MIGRATION.md +259 -0
- package/template/README.md +368 -0
- package/template/data/journal/.gitkeep +0 -0
- package/template/docs/images/ascii-banner-options.md +122 -0
- package/template/docs/images/hq-banner.svg +105 -0
- package/template/knowledge/Ralph/01-overview.md +71 -0
- package/template/knowledge/Ralph/02-core-concepts.md +114 -0
- package/template/knowledge/Ralph/03-how-ralph-works.md +184 -0
- package/template/knowledge/Ralph/04-back-pressure.md +222 -0
- package/template/knowledge/Ralph/05-specifications.md +210 -0
- package/template/knowledge/Ralph/06-agents-md.md +222 -0
- package/template/knowledge/Ralph/07-implementation.md +316 -0
- package/template/knowledge/Ralph/08-economics.md +182 -0
- package/template/knowledge/Ralph/09-resources.md +145 -0
- package/template/knowledge/Ralph/10-claude-code-workflow.md +212 -0
- package/template/knowledge/Ralph/11-team-training-guide.md +383 -0
- package/template/knowledge/Ralph/README.md +40 -0
- package/template/knowledge/ai-security-framework/CONTRIBUTING.md +139 -0
- package/template/knowledge/ai-security-framework/GLOSSARY.md +176 -0
- package/template/knowledge/ai-security-framework/LICENSE +21 -0
- package/template/knowledge/ai-security-framework/QUICK-START.md +172 -0
- package/template/knowledge/ai-security-framework/README.md +232 -0
- package/template/knowledge/ai-security-framework/checklists/browser-security.md +301 -0
- package/template/knowledge/ai-security-framework/checklists/credential-isolation.md +322 -0
- package/template/knowledge/ai-security-framework/checklists/incident-response.md +288 -0
- package/template/knowledge/ai-security-framework/checklists/pre-flight.md +249 -0
- package/template/knowledge/ai-security-framework/checklists/weekly-audit.md +159 -0
- package/template/knowledge/ai-security-framework/configs/audit-logging.md +372 -0
- package/template/knowledge/ai-security-framework/configs/kill-switches.md +354 -0
- package/template/knowledge/ai-security-framework/docs/01-core-principles.md +256 -0
- package/template/knowledge/ai-security-framework/docs/02-threat-landscape.md +326 -0
- package/template/knowledge/ai-security-framework/docs/03-security-posture.md +250 -0
- package/template/knowledge/ai-security-framework/templates/agents-security.md +233 -0
- package/template/knowledge/design-styles/README.md +42 -0
- package/template/knowledge/design-styles/american-industrial.md +136 -0
- package/template/knowledge/design-styles/ethereal-abstract.md +133 -0
- package/template/knowledge/design-styles/liminal-portal.md +111 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G-3m4YPW0AADdu2.jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G-JJlt5WwAABK3K.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G-JJmj5W0AEbJ-7.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G59fgNuXkAAKLJQ (1).jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G59fgNuXkAAKLJQ.jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G7fVkn3WEAAM-ST.jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G8ECO5JWEAIksyn.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G9-3GQSWoAA8eqZ.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G9xEOqrXkAEZRcs.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G_MVeJrXQAA8sx4.jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G_RSkmGXkAAgAVZ.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/README.md +31 -0
- package/template/knowledge/design-styles/swipes/american-industrial/qyqtg7Dq.png +0 -0
- package/template/knowledge/dev-team/README.md +35 -0
- package/template/knowledge/dev-team/patterns/README.md +34 -0
- package/template/knowledge/dev-team/patterns/frontend/react-best-practices.md +178 -0
- package/template/knowledge/dev-team/troubleshooting/README.md +31 -0
- package/template/knowledge/dev-team/workflows/README.md +49 -0
- package/template/knowledge/hq/checkpoint-schema.json +51 -0
- package/template/knowledge/hq/index-md-spec.md +74 -0
- package/template/knowledge/hq/thread-schema.md +153 -0
- package/template/knowledge/hq-core/checkpoint-schema.json +51 -0
- package/template/knowledge/hq-core/index-md-spec.md +74 -0
- package/template/knowledge/hq-core/thread-schema.md +153 -0
- package/template/knowledge/loom/README.md +51 -0
- package/template/knowledge/loom/architecture.md +125 -0
- package/template/knowledge/loom/code-style.md +169 -0
- package/template/knowledge/loom/llm-proxy.md +132 -0
- package/template/knowledge/loom/state-machine.md +131 -0
- package/template/knowledge/loom/thread-system.md +117 -0
- package/template/knowledge/loom/tools.md +94 -0
- package/template/knowledge/loom/weaver.md +96 -0
- package/template/knowledge/loom/web-frontend.md +131 -0
- package/template/knowledge/projects/README.md +72 -0
- package/template/knowledge/projects/templates/README.template.md +28 -0
- package/template/knowledge/workers/README.md +195 -0
- package/template/knowledge/workers/ralph-loop-pattern.md +157 -0
- package/template/knowledge/workers/skill-schema.md +182 -0
- package/template/knowledge/workers/state-machine.md +102 -0
- package/template/knowledge/workers/templates/base-worker.yaml +73 -0
- package/template/knowledge/workers/templates/code-worker.yaml +85 -0
- package/template/knowledge/workers/templates/skill.yaml +49 -0
- package/template/knowledge/workers/templates/social-worker.yaml +70 -0
- package/template/modules/examples/full-manifest.yaml +92 -0
- package/template/modules/examples/minimal.yaml +14 -0
- package/template/modules/modules.yaml +59 -0
- package/template/projects/.gitkeep +0 -0
- package/template/projects/incorporate-workers-into-pure-ralph/prd.json +88 -0
- package/template/projects/pure-ralph-branch-isolation/README.md +114 -0
- package/template/projects/pure-ralph-branch-isolation/prd.json +123 -0
- package/template/projects/purist-ralph-loop/README.md +148 -0
- package/template/projects/purist-ralph-loop/prd.json +135 -0
- package/template/projects/ralph-test/prd.json +50 -0
- package/template/prompts/pure-ralph-base.md +551 -0
- package/template/settings/.gitkeep +0 -0
- package/template/settings/pure-ralph.json +42 -0
- package/template/social-content/drafts/INDEX.md +21 -0
- package/template/social-content/drafts/linkedin/.gitkeep +1 -0
- package/template/social-content/drafts/x/.gitkeep +1 -0
- package/template/social-content/images/.gitkeep +1 -0
- package/template/starter-projects/code-worker/README.md +97 -0
- package/template/starter-projects/code-worker/prd.json +45 -0
- package/template/starter-projects/personal-assistant/README.md +42 -0
- package/template/starter-projects/personal-assistant/prd.json +43 -0
- package/template/starter-projects/social-media/README.md +60 -0
- package/template/starter-projects/social-media/prd.json +43 -0
- package/template/workers/content-brand/README.md +59 -0
- package/template/workers/content-brand/skills/messaging-alignment.md +91 -0
- package/template/workers/content-brand/skills/tone-check.md +76 -0
- package/template/workers/content-brand/skills/voice-analysis.md +68 -0
- package/template/workers/content-brand/worker.yaml +81 -0
- package/template/workers/content-legal/README.md +80 -0
- package/template/workers/content-legal/skills/claim-substantiation.md +150 -0
- package/template/workers/content-legal/skills/compliance-scan.md +123 -0
- package/template/workers/content-legal/skills/disclaimer-check.md +146 -0
- package/template/workers/content-legal/worker.yaml +118 -0
- package/template/workers/content-product/README.md +77 -0
- package/template/workers/content-product/skills/claim-verification.md +96 -0
- package/template/workers/content-product/skills/feature-accuracy.md +117 -0
- package/template/workers/content-product/skills/stats-check.md +128 -0
- package/template/workers/content-product/worker.yaml +97 -0
- package/template/workers/content-sales/README.md +70 -0
- package/template/workers/content-sales/skills/conversion-analysis.md +96 -0
- package/template/workers/content-sales/skills/cta-audit.md +107 -0
- package/template/workers/content-sales/skills/value-prop-check.md +114 -0
- package/template/workers/content-sales/worker.yaml +93 -0
- package/template/workers/content-shared/cli.ts +242 -0
- package/template/workers/content-shared/index.ts +234 -0
- package/template/workers/content-shared/lib/accuracy-analyzer.ts +661 -0
- package/template/workers/content-shared/lib/analyze.ts +370 -0
- package/template/workers/content-shared/lib/brand-analyzer.ts +526 -0
- package/template/workers/content-shared/lib/cms-integration.ts +446 -0
- package/template/workers/content-shared/lib/compliance-analyzer.ts +655 -0
- package/template/workers/content-shared/lib/conversion-analyzer.ts +555 -0
- package/template/workers/content-shared/lib/github-integration.ts +582 -0
- package/template/workers/content-shared/lib/output.ts +373 -0
- package/template/workers/content-shared/lib/parser.ts +771 -0
- package/template/workers/content-shared/lib/priority.ts +439 -0
- package/template/workers/content-shared/lib/recommendations.ts +512 -0
- package/template/workers/content-shared/lib/reporter.ts +749 -0
- package/template/workers/content-shared/lib/restructure.ts +664 -0
- package/template/workers/content-shared/lib/scorer.ts +140 -0
- package/template/workers/content-shared/lib/types.ts +227 -0
- package/template/workers/content-shared/lib/variants.ts +595 -0
- package/template/workers/content-shared/package.json +51 -0
- package/template/workers/content-shared/pnpm-lock.yaml +39 -0
- package/template/workers/content-shared/test/sample-page.json +115 -0
- package/template/workers/content-shared/tsconfig.json +20 -0
- package/template/workers/dev-team/README.md +166 -0
- package/template/workers/dev-team/_template.yaml +70 -0
- package/template/workers/dev-team/architect/package.json +27 -0
- package/template/workers/dev-team/architect/skills/api-design.md +89 -0
- package/template/workers/dev-team/architect/skills/refactor-plan.md +96 -0
- package/template/workers/dev-team/architect/skills/system-design.md +100 -0
- package/template/workers/dev-team/architect/src/index.ts +49 -0
- package/template/workers/dev-team/architect/src/mcp-server.ts +122 -0
- package/template/workers/dev-team/architect/src/skills/api-design.ts +316 -0
- package/template/workers/dev-team/architect/src/skills/refactor-plan.ts +264 -0
- package/template/workers/dev-team/architect/src/skills/system-design.ts +212 -0
- package/template/workers/dev-team/architect/tsconfig.json +19 -0
- package/template/workers/dev-team/architect/worker.yaml +128 -0
- package/template/workers/dev-team/backend-dev/package-lock.json +1252 -0
- package/template/workers/dev-team/backend-dev/package.json +27 -0
- package/template/workers/dev-team/backend-dev/skills/implement-endpoint.md +70 -0
- package/template/workers/dev-team/backend-dev/skills/implement-service.md +62 -0
- package/template/workers/dev-team/backend-dev/src/index.ts +51 -0
- package/template/workers/dev-team/backend-dev/src/mcp-server.ts +109 -0
- package/template/workers/dev-team/backend-dev/src/skills/implement-endpoint.ts +122 -0
- package/template/workers/dev-team/backend-dev/src/skills/implement-service.ts +126 -0
- package/template/workers/dev-team/backend-dev/tsconfig.json +19 -0
- package/template/workers/dev-team/backend-dev/worker.yaml +128 -0
- package/template/workers/dev-team/code-reviewer/package-lock.json +1080 -0
- package/template/workers/dev-team/code-reviewer/package.json +24 -0
- package/template/workers/dev-team/code-reviewer/skills/merge-to-production.md +61 -0
- package/template/workers/dev-team/code-reviewer/skills/merge-to-staging.md +54 -0
- package/template/workers/dev-team/code-reviewer/skills/request-changes.md +63 -0
- package/template/workers/dev-team/code-reviewer/skills/review-pr.md +77 -0
- package/template/workers/dev-team/code-reviewer/src/index.ts +56 -0
- package/template/workers/dev-team/code-reviewer/src/mcp-server.ts +101 -0
- package/template/workers/dev-team/code-reviewer/tsconfig.json +19 -0
- package/template/workers/dev-team/code-reviewer/worker.yaml +90 -0
- package/template/workers/dev-team/database-dev/package.json +22 -0
- package/template/workers/dev-team/database-dev/skills/create-schema.md +48 -0
- package/template/workers/dev-team/database-dev/src/index.ts +50 -0
- package/template/workers/dev-team/database-dev/src/mcp-server.ts +76 -0
- package/template/workers/dev-team/database-dev/tsconfig.json +18 -0
- package/template/workers/dev-team/database-dev/worker.yaml +90 -0
- package/template/workers/dev-team/frontend-dev/package.json +22 -0
- package/template/workers/dev-team/frontend-dev/skills/create-component.md +26 -0
- package/template/workers/dev-team/frontend-dev/src/index.ts +50 -0
- package/template/workers/dev-team/frontend-dev/src/mcp-server.ts +77 -0
- package/template/workers/dev-team/frontend-dev/tsconfig.json +18 -0
- package/template/workers/dev-team/frontend-dev/worker.yaml +132 -0
- package/template/workers/dev-team/infra-dev/package.json +24 -0
- package/template/workers/dev-team/infra-dev/skills/add-monitoring.md +73 -0
- package/template/workers/dev-team/infra-dev/skills/configure-deployment.md +80 -0
- package/template/workers/dev-team/infra-dev/skills/create-dockerfile.md +62 -0
- package/template/workers/dev-team/infra-dev/skills/setup-cicd.md +63 -0
- package/template/workers/dev-team/infra-dev/src/index.ts +55 -0
- package/template/workers/dev-team/infra-dev/src/mcp-server.ts +82 -0
- package/template/workers/dev-team/infra-dev/tsconfig.json +19 -0
- package/template/workers/dev-team/infra-dev/worker.yaml +92 -0
- package/template/workers/dev-team/knowledge-curator/package.json +24 -0
- package/template/workers/dev-team/knowledge-curator/skills/curate-troubleshooting.md +63 -0
- package/template/workers/dev-team/knowledge-curator/skills/process-learnings.md +61 -0
- package/template/workers/dev-team/knowledge-curator/skills/sync-documentation.md +76 -0
- package/template/workers/dev-team/knowledge-curator/skills/update-patterns.md +63 -0
- package/template/workers/dev-team/knowledge-curator/src/index.ts +53 -0
- package/template/workers/dev-team/knowledge-curator/src/mcp-server.ts +92 -0
- package/template/workers/dev-team/knowledge-curator/tsconfig.json +19 -0
- package/template/workers/dev-team/knowledge-curator/worker.yaml +80 -0
- package/template/workers/dev-team/motion-designer/package.json +22 -0
- package/template/workers/dev-team/motion-designer/skills/add-animation.md +25 -0
- package/template/workers/dev-team/motion-designer/skills/generate-image.md +36 -0
- package/template/workers/dev-team/motion-designer/src/index.ts +63 -0
- package/template/workers/dev-team/motion-designer/src/mcp-server.ts +79 -0
- package/template/workers/dev-team/motion-designer/tsconfig.json +18 -0
- package/template/workers/dev-team/motion-designer/worker.yaml +84 -0
- package/template/workers/dev-team/product-planner/queue.json +4 -0
- package/template/workers/dev-team/product-planner/worker.yaml +220 -0
- package/template/workers/dev-team/project-manager/package-lock.json +1252 -0
- package/template/workers/dev-team/project-manager/package.json +27 -0
- package/template/workers/dev-team/project-manager/skills/create-prd.md +66 -0
- package/template/workers/dev-team/project-manager/skills/next-issue.md +51 -0
- package/template/workers/dev-team/project-manager/skills/project-status.md +59 -0
- package/template/workers/dev-team/project-manager/skills/update-learnings.md +65 -0
- package/template/workers/dev-team/project-manager/src/index.ts +54 -0
- package/template/workers/dev-team/project-manager/src/mcp-server.ts +207 -0
- package/template/workers/dev-team/project-manager/src/skills/create-prd.ts +86 -0
- package/template/workers/dev-team/project-manager/src/skills/next-issue.ts +137 -0
- package/template/workers/dev-team/project-manager/src/skills/project-status.ts +131 -0
- package/template/workers/dev-team/project-manager/src/skills/update-learnings.ts +94 -0
- package/template/workers/dev-team/project-manager/tsconfig.json +19 -0
- package/template/workers/dev-team/project-manager/worker.yaml +96 -0
- package/template/workers/dev-team/qa-tester/package.json +24 -0
- package/template/workers/dev-team/qa-tester/skills/create-demo-account.md +36 -0
- package/template/workers/dev-team/qa-tester/skills/run-tests.md +36 -0
- package/template/workers/dev-team/qa-tester/skills/write-test.md +27 -0
- package/template/workers/dev-team/qa-tester/src/index.ts +61 -0
- package/template/workers/dev-team/qa-tester/src/mcp-server.ts +88 -0
- package/template/workers/dev-team/qa-tester/tsconfig.json +18 -0
- package/template/workers/dev-team/qa-tester/worker.yaml +116 -0
- package/template/workers/dev-team/task-executor/package-lock.json +1252 -0
- package/template/workers/dev-team/task-executor/package.json +27 -0
- package/template/workers/dev-team/task-executor/skills/analyze-issue.md +101 -0
- package/template/workers/dev-team/task-executor/skills/execute.md +133 -0
- package/template/workers/dev-team/task-executor/skills/report-learnings.md +106 -0
- package/template/workers/dev-team/task-executor/skills/validate-completion.md +121 -0
- package/template/workers/dev-team/task-executor/src/index.ts +54 -0
- package/template/workers/dev-team/task-executor/src/mcp-server.ts +139 -0
- package/template/workers/dev-team/task-executor/src/skills/analyze-issue.ts +219 -0
- package/template/workers/dev-team/task-executor/src/skills/execute.ts +132 -0
- package/template/workers/dev-team/task-executor/src/skills/report-learnings.ts +119 -0
- package/template/workers/dev-team/task-executor/src/skills/validate-completion.ts +142 -0
- package/template/workers/dev-team/task-executor/tsconfig.json +19 -0
- package/template/workers/dev-team/task-executor/worker.yaml +110 -0
- package/template/workers/registry.yaml +171 -0
- package/template/workers/security-scanner/README.md +73 -0
- package/template/workers/security-scanner/skills/pre-deploy-check.md +205 -0
- package/template/workers/security-scanner/worker.yaml +26 -0
- package/template/workspace/checkpoints/.gitkeep +0 -0
- package/template/workspace/content-ideas/inbox.jsonl +0 -0
- package/template/workspace/drafts/.gitkeep +0 -0
- package/template/workspace/learnings/.gitkeep +3 -0
- package/template/workspace/orchestrator/.gitkeep +0 -0
- package/template/workspace/ralph-test/COMPLETE.md +18 -0
- package/template/workspace/ralph-test/hello.txt +2 -0
- package/template/workspace/reports/.gitkeep +0 -0
- package/template/workspace/scratch/.gitkeep +0 -0
- package/template/workspace/threads/.gitkeep +3 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# HQ Modules Manifest
|
|
2
|
+
# Declares external modules to sync into your HQ instance
|
|
3
|
+
#
|
|
4
|
+
# Modules allow you to pull in functionality from other repos:
|
|
5
|
+
# - Core HQ updates (workers, commands, knowledge)
|
|
6
|
+
# - Company-specific modules (team workflows, shared knowledge)
|
|
7
|
+
# - Community modules (third-party integrations)
|
|
8
|
+
|
|
9
|
+
version: "1.0"
|
|
10
|
+
|
|
11
|
+
modules:
|
|
12
|
+
# Core HQ module - official updates and improvements
|
|
13
|
+
- name: hq-core
|
|
14
|
+
repo: https://github.com/coreyepstein/hq-starter-kit.git
|
|
15
|
+
branch: main
|
|
16
|
+
strategy: merge # merge updates with local changes
|
|
17
|
+
access: public
|
|
18
|
+
paths:
|
|
19
|
+
knowledge/Ralph: knowledge/Ralph
|
|
20
|
+
knowledge/workers: knowledge/workers
|
|
21
|
+
.claude/commands: .claude/commands
|
|
22
|
+
|
|
23
|
+
# Example: Company shared module
|
|
24
|
+
# - name: acme-workflows
|
|
25
|
+
# repo: https://github.com/acme-corp/hq-module.git
|
|
26
|
+
# branch: main
|
|
27
|
+
# strategy: link # symlink for real-time sync
|
|
28
|
+
# access: team
|
|
29
|
+
# paths:
|
|
30
|
+
# knowledge/company: knowledge/acme
|
|
31
|
+
# workers/shared: workers/acme
|
|
32
|
+
|
|
33
|
+
# Example: Role-specific module
|
|
34
|
+
# - name: engineering-tools
|
|
35
|
+
# repo: https://github.com/acme-corp/engineering-hq.git
|
|
36
|
+
# branch: main
|
|
37
|
+
# strategy: copy # one-time copy, no ongoing sync
|
|
38
|
+
# access: "role:engineer"
|
|
39
|
+
# paths:
|
|
40
|
+
# workers/code: workers/engineering
|
|
41
|
+
# knowledge/tech-stack: knowledge/tech-stack
|
|
42
|
+
|
|
43
|
+
# Schema Reference:
|
|
44
|
+
#
|
|
45
|
+
# modules[]:
|
|
46
|
+
# name: string # Unique identifier for this module
|
|
47
|
+
# repo: string # Git repository URL
|
|
48
|
+
# branch: string # Branch to sync from (default: main)
|
|
49
|
+
# strategy: enum # Sync strategy:
|
|
50
|
+
# # - link: symlink (real-time, requires local clone)
|
|
51
|
+
# # - merge: git merge (preserves local changes)
|
|
52
|
+
# # - copy: one-time copy (no ongoing sync)
|
|
53
|
+
# access: string # Access level for future RBAC:
|
|
54
|
+
# # - public: anyone can use
|
|
55
|
+
# # - team: team members only
|
|
56
|
+
# # - role:X: specific role required (e.g., role:admin)
|
|
57
|
+
# paths: object # Source path -> destination path mappings
|
|
58
|
+
# # Keys are paths in the source repo
|
|
59
|
+
# # Values are paths in your local HQ
|
|
File without changes
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"project": "incorporate-workers-into-pure-ralph",
|
|
3
|
+
"goal": "Enhance pure-ralph to select and invoke the appropriate dev-team worker for each task",
|
|
4
|
+
"success_criteria": "Each task executed by specialist worker with audit trail and optional PRD overrides",
|
|
5
|
+
"target_repo": "C:/my-hq",
|
|
6
|
+
"has_ui": false,
|
|
7
|
+
"features": [
|
|
8
|
+
{
|
|
9
|
+
"id": "US-001",
|
|
10
|
+
"title": "Add worker selection logic to pure-ralph-base.md",
|
|
11
|
+
"description": "Add instructions for selecting the appropriate dev-team worker for each task based on keywords, files, and PRD hints",
|
|
12
|
+
"acceptance_criteria": [
|
|
13
|
+
"prompts/pure-ralph-base.md includes Worker Selection section",
|
|
14
|
+
"Instructions specify: after picking task, determine best worker",
|
|
15
|
+
"Selection criteria documented: task keywords, target files, PRD hints",
|
|
16
|
+
"Lists available dev-team workers with their specialties",
|
|
17
|
+
"Explains when each worker type applies"
|
|
18
|
+
],
|
|
19
|
+
"files": ["prompts/pure-ralph-base.md"],
|
|
20
|
+
"passes": true,
|
|
21
|
+
"notes": "Worker: knowledge-curator. Selection reason: Documentation/prompt update task. Added Worker Selection section with: selection criteria (PRD hints, target files, keywords), table of all 12 dev-team workers with specialties/keywords/file patterns, usage guidelines for when to use each worker, and 4-step selection process."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "US-002",
|
|
25
|
+
"title": "Add PRD worker override support",
|
|
26
|
+
"description": "Document optional worker field in PRD task JSON for manual override of automatic selection",
|
|
27
|
+
"acceptance_criteria": [
|
|
28
|
+
"prompts/pure-ralph-base.md documents optional worker field in task JSON",
|
|
29
|
+
"If worker field present, use that worker instead of auto-selecting",
|
|
30
|
+
"If worker field absent, Claude selects based on criteria",
|
|
31
|
+
"Example shown in prompt: worker: backend-dev"
|
|
32
|
+
],
|
|
33
|
+
"files": ["prompts/pure-ralph-base.md"],
|
|
34
|
+
"passes": true,
|
|
35
|
+
"notes": "Worker: knowledge-curator. Selection reason: Documentation/prompt update task. Added PRD Task Schema section with full JSON schema showing optional worker field. Documented override behavior (present=use it, absent=auto-select). Added use cases and example overrides including backend-dev."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "US-003",
|
|
39
|
+
"title": "Add worker invocation instructions to prompt",
|
|
40
|
+
"description": "Document how to fully invoke a worker within the loop - loading worker.yaml and following skills",
|
|
41
|
+
"acceptance_criteria": [
|
|
42
|
+
"prompts/pure-ralph-base.md includes Worker Invocation section",
|
|
43
|
+
"Instructions: read worker.yaml from workers/dev-team/{worker}/",
|
|
44
|
+
"Instructions: follow worker's skills and execution patterns",
|
|
45
|
+
"Instructions: apply worker's knowledge base if referenced",
|
|
46
|
+
"Worker context is used for implementation, not just reference"
|
|
47
|
+
],
|
|
48
|
+
"files": ["prompts/pure-ralph-base.md"],
|
|
49
|
+
"dependsOn": ["US-001"],
|
|
50
|
+
"passes": true,
|
|
51
|
+
"notes": "Worker: knowledge-curator. Selection reason: Documentation/prompt update task. Added Worker Invocation section with: 4-step invocation process (load definition, load context, apply instructions, use skills), YAML examples showing context.base and instructions fields, checklist for pre-implementation verification, emphasis that worker context shapes HOW to implement."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "US-004",
|
|
55
|
+
"title": "Add worker selection reasoning to task notes",
|
|
56
|
+
"description": "Specify that task notes must include which worker was selected and why for audit trail",
|
|
57
|
+
"acceptance_criteria": [
|
|
58
|
+
"prompts/pure-ralph-base.md specifies notes format includes worker info",
|
|
59
|
+
"Notes must include: Worker: {worker-id}",
|
|
60
|
+
"Notes must include: Selection reason: {brief explanation}",
|
|
61
|
+
"Example provided in prompt"
|
|
62
|
+
],
|
|
63
|
+
"files": ["prompts/pure-ralph-base.md"],
|
|
64
|
+
"dependsOn": ["US-001"],
|
|
65
|
+
"passes": true,
|
|
66
|
+
"notes": "Worker: knowledge-curator. Selection reason: Documentation/prompt update task. Added 'Notes Format (Required)' subsection to PRD Updates with: required format spec (Worker + Selection reason + summary), three concrete examples for different worker types (backend-dev, frontend-dev, knowledge-curator), and separated required vs optional note content."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "US-005",
|
|
70
|
+
"title": "Create worker selection reference table",
|
|
71
|
+
"description": "Add quick reference table mapping keywords and file patterns to recommended workers",
|
|
72
|
+
"acceptance_criteria": [
|
|
73
|
+
"prompts/pure-ralph-base.md includes worker reference table",
|
|
74
|
+
"Table maps: keywords/patterns to recommended worker",
|
|
75
|
+
"Covers all 12 dev-team workers",
|
|
76
|
+
"Includes file extension hints (e.g., .tsx to frontend-dev, .sql to database-dev)"
|
|
77
|
+
],
|
|
78
|
+
"files": ["prompts/pure-ralph-base.md"],
|
|
79
|
+
"passes": true,
|
|
80
|
+
"notes": "Worker: knowledge-curator. Selection reason: Documentation/prompt update task. Added 'Worker Quick Reference' section with three tables: (1) By File Extension - 17 extension patterns mapped to workers including .tsx to frontend-dev, .sql to database-dev, .test.ts to qa-tester, etc. (2) By Directory Pattern - 12 directory patterns mapped to workers. (3) By Keyword Pattern - 35 keyword patterns mapped to all 12 dev-team workers. Covers architect, backend-dev, frontend-dev, database-dev, qa-tester, infra-dev, motion-designer, code-reviewer, knowledge-curator, project-manager, task-executor, and product-planner."
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"metadata": {
|
|
84
|
+
"created_at": "2026-01-26T20:15:00Z",
|
|
85
|
+
"created_by": "stefan",
|
|
86
|
+
"purpose": "Integrate dev-team workers into pure-ralph loop"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Pure Ralph Branch Isolation
|
|
2
|
+
|
|
3
|
+
**Goal:** Ensure pure-ralph never commits to main, always uses feature branches, creates PRs on completion, and prevents concurrent execution conflicts.
|
|
4
|
+
|
|
5
|
+
**Success:** Safe parallel execution of multiple pure-ralph loops on different PRDs without conflicts, with clean PR workflow.
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Currently pure-ralph commits directly to whatever branch is checked out (usually main). This causes:
|
|
10
|
+
- Messy commit history on main
|
|
11
|
+
- No PR review workflow
|
|
12
|
+
- Conflicts when running multiple loops on same repo
|
|
13
|
+
|
|
14
|
+
This project adds:
|
|
15
|
+
1. **Automatic feature branch creation** - `feature/{project-name}`
|
|
16
|
+
2. **Main branch protection** - Never commit directly to main
|
|
17
|
+
3. **PR creation on completion** - Ready for review
|
|
18
|
+
4. **Lock file mechanism** - Prevent concurrent runs on same target repo
|
|
19
|
+
5. **Conflict detection** - Warn if another loop is already running
|
|
20
|
+
|
|
21
|
+
## Quality Gates
|
|
22
|
+
|
|
23
|
+
- None (documentation/config changes only)
|
|
24
|
+
|
|
25
|
+
## User Stories
|
|
26
|
+
|
|
27
|
+
### US-001: Add branch creation to pure-ralph prompt
|
|
28
|
+
**Description:** As a pure-ralph user, I want the loop to automatically create and use a feature branch so that main stays clean.
|
|
29
|
+
|
|
30
|
+
**Acceptance Criteria:**
|
|
31
|
+
- [ ] `prompts/pure-ralph-base.md` includes "Branch Management" section
|
|
32
|
+
- [ ] On session start: check if on feature branch for this project
|
|
33
|
+
- [ ] If not: create `feature/{project-name}` from main and switch to it
|
|
34
|
+
- [ ] If branch exists: switch to it
|
|
35
|
+
- [ ] All commits go to the feature branch, never main
|
|
36
|
+
|
|
37
|
+
### US-002: Add main branch protection to prompt
|
|
38
|
+
**Description:** As a pure-ralph user, I want the system to refuse to commit to main so that I don't accidentally pollute the main branch.
|
|
39
|
+
|
|
40
|
+
**Acceptance Criteria:**
|
|
41
|
+
- [ ] `prompts/pure-ralph-base.md` includes check before commit
|
|
42
|
+
- [ ] If current branch is main/master: ERROR, do not commit
|
|
43
|
+
- [ ] Provide clear error message: "Cannot commit to main. Create feature branch first."
|
|
44
|
+
- [ ] This is a hard block, not a warning
|
|
45
|
+
|
|
46
|
+
### US-003: Add PR creation on project completion
|
|
47
|
+
**Description:** As a pure-ralph user, I want a PR automatically created when all tasks complete so that changes can be reviewed.
|
|
48
|
+
|
|
49
|
+
**Acceptance Criteria:**
|
|
50
|
+
- [ ] `prompts/pure-ralph-base.md` includes PR creation step
|
|
51
|
+
- [ ] When all tasks pass: push branch to origin
|
|
52
|
+
- [ ] Create PR using `gh pr create` (if gh CLI available)
|
|
53
|
+
- [ ] PR title: `feat: {project-name} - {goal from PRD}`
|
|
54
|
+
- [ ] PR body: list of completed tasks with notes
|
|
55
|
+
- [ ] If gh not available: output push command and PR URL for manual creation
|
|
56
|
+
|
|
57
|
+
### US-004: Add lock file mechanism to orchestrator scripts
|
|
58
|
+
**Description:** As a pure-ralph user, I want the system to prevent concurrent runs on the same target repo so that conflicts are avoided.
|
|
59
|
+
|
|
60
|
+
**Acceptance Criteria:**
|
|
61
|
+
- [ ] `.claude/scripts/pure-ralph-loop.ps1` creates lock file on start
|
|
62
|
+
- [ ] Lock file location: `{target_repo}/.pure-ralph.lock`
|
|
63
|
+
- [ ] Lock file contains: project name, PID, start timestamp
|
|
64
|
+
- [ ] On exit (success or failure): remove lock file
|
|
65
|
+
- [ ] `.claude/scripts/pure-ralph-loop.sh` has same behavior
|
|
66
|
+
|
|
67
|
+
### US-005: Add conflict detection on loop start
|
|
68
|
+
**Description:** As a pure-ralph user, I want to be warned if another loop is already running on the same repo so that I don't cause conflicts.
|
|
69
|
+
|
|
70
|
+
**Acceptance Criteria:**
|
|
71
|
+
- [ ] On loop start: check for existing `.pure-ralph.lock` in target repo
|
|
72
|
+
- [ ] If lock exists: read contents, show warning with project name and duration
|
|
73
|
+
- [ ] Prompt user: "Another pure-ralph is running on this repo. Continue anyway? (y/N)"
|
|
74
|
+
- [ ] Default to N (abort)
|
|
75
|
+
- [ ] If user chooses to continue: proceed but log warning
|
|
76
|
+
|
|
77
|
+
### US-006: Update pure-ralph prompt with conflict awareness
|
|
78
|
+
**Description:** As a pure-ralph session, I need to be aware of potential conflicts so that I can handle them gracefully.
|
|
79
|
+
|
|
80
|
+
**Acceptance Criteria:**
|
|
81
|
+
- [ ] `prompts/pure-ralph-base.md` mentions checking for lock file
|
|
82
|
+
- [ ] If lock file found during session: warn and check if other process still running
|
|
83
|
+
- [ ] If lock is stale (process dead): safe to remove and continue
|
|
84
|
+
- [ ] Add learned pattern about conflict handling
|
|
85
|
+
|
|
86
|
+
### US-007: Document branch workflow in knowledge base
|
|
87
|
+
**Description:** As an HQ user, I want documentation on the branch workflow so that I understand how pure-ralph manages git.
|
|
88
|
+
|
|
89
|
+
**Acceptance Criteria:**
|
|
90
|
+
- [ ] `knowledge/pure-ralph/branch-workflow.md` created
|
|
91
|
+
- [ ] Documents: automatic branch creation
|
|
92
|
+
- [ ] Documents: PR creation process
|
|
93
|
+
- [ ] Documents: lock file mechanism
|
|
94
|
+
- [ ] Documents: handling concurrent execution attempts
|
|
95
|
+
- [ ] Documents: manual recovery if lock file becomes stale
|
|
96
|
+
|
|
97
|
+
## Non-Goals
|
|
98
|
+
|
|
99
|
+
- CI/CD integration (that's separate infrastructure)
|
|
100
|
+
- Automatic merge after PR approval
|
|
101
|
+
- Branch naming customization (use standard `feature/{project}` pattern)
|
|
102
|
+
- Multiple PRDs on same branch (one branch per project)
|
|
103
|
+
|
|
104
|
+
## Technical Considerations
|
|
105
|
+
|
|
106
|
+
- Requires `gh` CLI for automatic PR creation (graceful fallback if missing)
|
|
107
|
+
- Lock file must be cleaned up even on script crash (trap signals)
|
|
108
|
+
- Branch name derived from project name in PRD
|
|
109
|
+
- Must handle case where branch already exists from previous partial run
|
|
110
|
+
|
|
111
|
+
## Open Questions
|
|
112
|
+
|
|
113
|
+
- Should we support custom branch prefixes (e.g., `fix/` vs `feature/`)?
|
|
114
|
+
- Should lock file include expected completion time for better UX?
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"project": "pure-ralph-branch-isolation",
|
|
3
|
+
"goal": "Ensure pure-ralph never commits to main, always uses feature branches, creates PRs on completion, and prevents concurrent execution conflicts",
|
|
4
|
+
"success_criteria": "Safe parallel execution of multiple pure-ralph loops on different PRDs without conflicts, with clean PR workflow",
|
|
5
|
+
"target_repo": "C:/my-hq",
|
|
6
|
+
"has_ui": false,
|
|
7
|
+
"features": [
|
|
8
|
+
{
|
|
9
|
+
"id": "US-001",
|
|
10
|
+
"title": "Add branch creation to pure-ralph prompt",
|
|
11
|
+
"description": "Automatically create and use feature branch so main stays clean",
|
|
12
|
+
"acceptance_criteria": [
|
|
13
|
+
"prompts/pure-ralph-base.md includes Branch Management section",
|
|
14
|
+
"On session start: check if on feature branch for this project",
|
|
15
|
+
"If not on correct branch: create feature/{project-name} from main and switch to it",
|
|
16
|
+
"If branch exists: switch to it",
|
|
17
|
+
"All commits go to the feature branch, never main"
|
|
18
|
+
],
|
|
19
|
+
"files": ["prompts/pure-ralph-base.md"],
|
|
20
|
+
"passes": true,
|
|
21
|
+
"notes": "Added Branch Management section to pure-ralph-base.md. Section includes: session start instructions for checking/creating feature branch, branch rules (never commit to main, naming convention, branch from main), and updated job steps to include BRANCH as step 1. Also added learned pattern about verifying branch first."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "US-002",
|
|
25
|
+
"title": "Add main branch protection to prompt",
|
|
26
|
+
"description": "Refuse to commit to main/master branch",
|
|
27
|
+
"acceptance_criteria": [
|
|
28
|
+
"prompts/pure-ralph-base.md includes check before commit",
|
|
29
|
+
"If current branch is main/master: ERROR, do not commit",
|
|
30
|
+
"Provide clear error message: Cannot commit to main",
|
|
31
|
+
"This is a hard block, not a warning"
|
|
32
|
+
],
|
|
33
|
+
"files": ["prompts/pure-ralph-base.md"],
|
|
34
|
+
"dependsOn": ["US-001"],
|
|
35
|
+
"passes": true,
|
|
36
|
+
"notes": "Added 'Commit Safety' section with hard block for main/master commits. Includes: bash check script, clear ERROR message, recovery steps (stash, switch branch, pop, commit). Added learned pattern about verifying branch before every commit."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "US-003",
|
|
40
|
+
"title": "Add PR creation on project completion",
|
|
41
|
+
"description": "Automatically create PR when all tasks complete",
|
|
42
|
+
"acceptance_criteria": [
|
|
43
|
+
"prompts/pure-ralph-base.md includes PR creation step",
|
|
44
|
+
"When all tasks pass: push branch to origin",
|
|
45
|
+
"Create PR using gh pr create if available",
|
|
46
|
+
"PR title format: feat: {project-name}",
|
|
47
|
+
"PR body: list of completed tasks with notes",
|
|
48
|
+
"If gh not available: output manual instructions"
|
|
49
|
+
],
|
|
50
|
+
"files": ["prompts/pure-ralph-base.md"],
|
|
51
|
+
"dependsOn": ["US-001"],
|
|
52
|
+
"passes": true,
|
|
53
|
+
"notes": "Added 'PR Creation (When All Tasks Complete)' section with: push to origin instructions, gh pr create command with title format 'feat: {project-name}', PR body format including summary from PRD goal and list of completed tasks with notes, manual instructions fallback if gh CLI not available, updated step 7 in 'Your Job' to include PR creation check when all tasks complete."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "US-004",
|
|
57
|
+
"title": "Add lock file mechanism to orchestrator scripts",
|
|
58
|
+
"description": "Prevent concurrent runs on same target repo using lock file",
|
|
59
|
+
"acceptance_criteria": [
|
|
60
|
+
".claude/scripts/pure-ralph-loop.ps1 creates lock file on start",
|
|
61
|
+
"Lock file location: {target_repo}/.pure-ralph.lock",
|
|
62
|
+
"Lock file contains: project name, PID, start timestamp",
|
|
63
|
+
"On exit (success or failure): remove lock file",
|
|
64
|
+
".claude/scripts/pure-ralph-loop.sh has same behavior"
|
|
65
|
+
],
|
|
66
|
+
"files": [".claude/scripts/pure-ralph-loop.ps1", ".claude/scripts/pure-ralph-loop.sh"],
|
|
67
|
+
"passes": true,
|
|
68
|
+
"notes": "Added lock file mechanism to both scripts. PowerShell: Create-LockFile and Remove-LockFile functions with try/finally for cleanup. Bash: create_lock_file and remove_lock_file functions with EXIT trap for cleanup. Lock file at {target_repo}/.pure-ralph.lock contains JSON with project name, PID, and ISO timestamp."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "US-005",
|
|
72
|
+
"title": "Add conflict detection on loop start",
|
|
73
|
+
"description": "Warn if another loop is already running on same repo",
|
|
74
|
+
"acceptance_criteria": [
|
|
75
|
+
"On loop start: check for existing .pure-ralph.lock in target repo",
|
|
76
|
+
"If lock exists: read contents, show warning with project name and duration",
|
|
77
|
+
"Prompt user: Another pure-ralph is running. Continue anyway? (y/N)",
|
|
78
|
+
"Default to N (abort)",
|
|
79
|
+
"If user chooses to continue: proceed but log warning"
|
|
80
|
+
],
|
|
81
|
+
"files": [".claude/scripts/pure-ralph-loop.ps1", ".claude/scripts/pure-ralph-loop.sh"],
|
|
82
|
+
"dependsOn": ["US-004"],
|
|
83
|
+
"passes": true,
|
|
84
|
+
"notes": "Added Check-ExistingLock function to PowerShell and check_existing_lock function to Bash. Both: (1) parse lock file JSON for project/PID/timestamp, (2) calculate and display duration, (3) check if process is still running (shows 'RUNNING' or 'stale lock'), (4) prompt user with y/N defaulting to abort, (5) log warning if user continues. Called before Create-LockFile in both scripts."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "US-006",
|
|
88
|
+
"title": "Update pure-ralph prompt with conflict awareness",
|
|
89
|
+
"description": "Make Claude sessions aware of potential conflicts",
|
|
90
|
+
"acceptance_criteria": [
|
|
91
|
+
"prompts/pure-ralph-base.md mentions checking for lock file",
|
|
92
|
+
"If lock file found during session: warn and check if process still running",
|
|
93
|
+
"If lock is stale (process dead): safe to remove and continue",
|
|
94
|
+
"Add learned pattern about conflict handling"
|
|
95
|
+
],
|
|
96
|
+
"files": ["prompts/pure-ralph-base.md"],
|
|
97
|
+
"dependsOn": ["US-004"],
|
|
98
|
+
"passes": true,
|
|
99
|
+
"notes": "Added 'Conflict Awareness' section with: lock file location, session start check instructions, handling logic for lock file detection (read contents, check PID running status), stale lock removal instructions, important notes clarifying orchestrator vs Claude responsibilities. Added learned pattern '[Conflict] Stale Lock Detection' for distinguishing active vs stale locks."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "US-007",
|
|
103
|
+
"title": "Document branch workflow in knowledge base",
|
|
104
|
+
"description": "Create documentation on the branch workflow",
|
|
105
|
+
"acceptance_criteria": [
|
|
106
|
+
"knowledge/pure-ralph/branch-workflow.md created",
|
|
107
|
+
"Documents: automatic branch creation",
|
|
108
|
+
"Documents: PR creation process",
|
|
109
|
+
"Documents: lock file mechanism",
|
|
110
|
+
"Documents: handling concurrent execution attempts",
|
|
111
|
+
"Documents: manual recovery if lock file becomes stale"
|
|
112
|
+
],
|
|
113
|
+
"files": ["knowledge/pure-ralph/branch-workflow.md"],
|
|
114
|
+
"passes": true,
|
|
115
|
+
"notes": "Created comprehensive branch-workflow.md documentation covering: (1) Automatic branch creation with naming convention and session start process, (2) PR creation process including gh CLI commands and manual fallback, (3) Lock file mechanism with location, contents, and lifecycle, (4) Concurrent execution handling with detection and user prompts, (5) Manual recovery for stale locks with verification steps for both bash and PowerShell. Includes summary diagram and related files reference."
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"metadata": {
|
|
119
|
+
"created_at": "2026-01-26T20:30:00Z",
|
|
120
|
+
"created_by": "stefan",
|
|
121
|
+
"purpose": "Add branch isolation and conflict prevention to pure-ralph"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Purist Ralph Loop
|
|
2
|
+
|
|
3
|
+
**Goal:** Create an external terminal orchestrator that runs a canonical Ralph loop with fresh context per task and self-improving prompts.
|
|
4
|
+
|
|
5
|
+
**Success:** `/pure-ralph my-project` opens terminal, executes PRD tasks autonomously, completes with zero intervention, and evolves its base prompt with learnings.
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
The current `/run-project` command runs the orchestrator inside Claude's session, causing context accumulation and eventual compression. This project creates a true external orchestrator:
|
|
10
|
+
|
|
11
|
+
1. **External loop** - Bash/PowerShell `while` loop runs outside Claude
|
|
12
|
+
2. **Fresh context per task** - Each `claude -p` invocation starts clean
|
|
13
|
+
3. **Self-modifying** - Loop can update its own prompts and CLAUDE.md
|
|
14
|
+
4. **PRD as source of truth** - `passes` field = state, `notes` field = context
|
|
15
|
+
5. **Cross-platform** - Works on Windows, Mac, Linux with remembered terminal preference
|
|
16
|
+
|
|
17
|
+
## Quality Gates
|
|
18
|
+
|
|
19
|
+
- None for MVP (shell scripts + markdown)
|
|
20
|
+
- Task verification: `passes: true` + `notes` populated + git commit exists
|
|
21
|
+
|
|
22
|
+
## User Stories
|
|
23
|
+
|
|
24
|
+
### US-001: Create base prompt file
|
|
25
|
+
**Description:** As a user, I want a low-fi base prompt that instructs Claude on Ralph principles so each spawned session knows the methodology.
|
|
26
|
+
|
|
27
|
+
**Acceptance Criteria:**
|
|
28
|
+
- [ ] `prompts/pure-ralph-base.md` exists in my-hq
|
|
29
|
+
- [ ] Contains Ralph principles: one task, fresh context, update PRD, commit
|
|
30
|
+
- [ ] Includes instructions for self-modification (how to update this file)
|
|
31
|
+
- [ ] Under 500 lines (minimal, focused)
|
|
32
|
+
|
|
33
|
+
**Files:** `prompts/pure-ralph-base.md`
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
### US-002: Create terminal settings mechanism
|
|
38
|
+
**Description:** As a user, I want to set my preferred terminal once and have it remembered for subsequent runs.
|
|
39
|
+
|
|
40
|
+
**Acceptance Criteria:**
|
|
41
|
+
- [ ] `settings/pure-ralph.json` stores terminal preference
|
|
42
|
+
- [ ] First run prompts user to choose terminal type
|
|
43
|
+
- [ ] Supports: PowerShell (Windows), Windows Terminal, bash (Mac/Linux), iTerm (Mac)
|
|
44
|
+
- [ ] Setting persists across sessions
|
|
45
|
+
|
|
46
|
+
**Files:** `settings/pure-ralph.json`
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
### US-003: Create PowerShell loop script
|
|
51
|
+
**Description:** As a Windows user, I want a PowerShell script that runs the canonical Ralph loop.
|
|
52
|
+
|
|
53
|
+
**Acceptance Criteria:**
|
|
54
|
+
- [ ] `.claude/scripts/pure-ralph-loop.ps1` exists
|
|
55
|
+
- [ ] Reads PRD path and target repo as arguments
|
|
56
|
+
- [ ] Spawns fresh `claude -p` per task with base prompt
|
|
57
|
+
- [ ] Updates PRD `passes` and `notes` fields
|
|
58
|
+
- [ ] Creates git commit per completed task
|
|
59
|
+
- [ ] Logs to `workspace/orchestrator/{project}/pure-ralph.log`
|
|
60
|
+
|
|
61
|
+
**Files:** `.claude/scripts/pure-ralph-loop.ps1`
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### US-004: Create bash loop script
|
|
66
|
+
**Description:** As a Mac/Linux user, I want a bash script that runs the canonical Ralph loop.
|
|
67
|
+
|
|
68
|
+
**Acceptance Criteria:**
|
|
69
|
+
- [ ] `.claude/scripts/pure-ralph-loop.sh` exists
|
|
70
|
+
- [ ] Same functionality as PowerShell version
|
|
71
|
+
- [ ] Works on macOS and Linux
|
|
72
|
+
- [ ] Executable permissions set
|
|
73
|
+
|
|
74
|
+
**Files:** `.claude/scripts/pure-ralph-loop.sh`
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### US-005: Create /pure-ralph slash command
|
|
79
|
+
**Description:** As a user, I want to run `/pure-ralph my-project` to launch the external orchestrator.
|
|
80
|
+
|
|
81
|
+
**Acceptance Criteria:**
|
|
82
|
+
- [ ] `.claude/commands/pure-ralph.md` exists
|
|
83
|
+
- [ ] Accepts project name as argument
|
|
84
|
+
- [ ] Prompts for target repo if not in PRD metadata
|
|
85
|
+
- [ ] Checks terminal preference, prompts if not set
|
|
86
|
+
- [ ] Spawns appropriate terminal with loop script
|
|
87
|
+
- [ ] Provides feedback on how to monitor progress
|
|
88
|
+
|
|
89
|
+
**Files:** `.claude/commands/pure-ralph.md`
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### US-006: Add self-modification capability
|
|
94
|
+
**Description:** As a user, I want the loop to improve its own prompts based on learnings so it gets better over time.
|
|
95
|
+
|
|
96
|
+
**Acceptance Criteria:**
|
|
97
|
+
- [ ] Base prompt includes section for "Learned Patterns"
|
|
98
|
+
- [ ] Each task completion can append to learned patterns
|
|
99
|
+
- [ ] CLAUDE.md gets updated with cross-project learnings
|
|
100
|
+
- [ ] Changes are committed with clear messages
|
|
101
|
+
|
|
102
|
+
**Files:** `prompts/pure-ralph-base.md`, `.claude/CLAUDE.md`
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### US-007: Add learnings aggregation
|
|
107
|
+
**Description:** As a user, I want learnings from completed projects aggregated into the knowledge base.
|
|
108
|
+
|
|
109
|
+
**Acceptance Criteria:**
|
|
110
|
+
- [ ] On project completion, learnings extracted from all task notes
|
|
111
|
+
- [ ] Written to `knowledge/pure-ralph/learnings.md`
|
|
112
|
+
- [ ] Patterns categorized (workflow, technical, gotchas)
|
|
113
|
+
- [ ] Base prompt updated with high-value patterns
|
|
114
|
+
|
|
115
|
+
**Files:** `knowledge/pure-ralph/learnings.md`, `prompts/pure-ralph-base.md`
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### US-008: Add beads integration
|
|
120
|
+
**Description:** As a user, I want the loop to sync with beads for task tracking visibility.
|
|
121
|
+
|
|
122
|
+
**Acceptance Criteria:**
|
|
123
|
+
- [ ] Loop checks if `bd` CLI is available
|
|
124
|
+
- [ ] If available, syncs PRD tasks to beads on start
|
|
125
|
+
- [ ] Updates bead status as tasks complete
|
|
126
|
+
- [ ] Graceful fallback if beads not installed
|
|
127
|
+
|
|
128
|
+
**Files:** `.claude/scripts/pure-ralph-loop.ps1`, `.claude/scripts/pure-ralph-loop.sh`
|
|
129
|
+
|
|
130
|
+
## Non-Goals
|
|
131
|
+
|
|
132
|
+
- GUI interface (this is CLI-focused)
|
|
133
|
+
- Parallel task execution (sequential is intentional for Ralph purity)
|
|
134
|
+
- Support for non-Claude AI providers
|
|
135
|
+
- Real-time streaming output (batch per task is fine)
|
|
136
|
+
|
|
137
|
+
## Technical Considerations
|
|
138
|
+
|
|
139
|
+
- Cross-platform terminal detection is tricky - use environment variables and fallbacks
|
|
140
|
+
- Self-modification requires careful prompting to avoid runaway changes
|
|
141
|
+
- Git commits should be atomic per task, not batched
|
|
142
|
+
- Base prompt should stay small to leave room for task context
|
|
143
|
+
|
|
144
|
+
## Open Questions
|
|
145
|
+
|
|
146
|
+
- Should there be a `--dry-run` flag to preview without executing?
|
|
147
|
+
- Max iterations safety limit?
|
|
148
|
+
- How to handle task failures - retry, skip, or pause?
|