create-hq 5.3.2 → 6.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 +2 -2
- package/dist/deps.d.ts.map +1 -1
- package/dist/deps.js +29 -138
- package/dist/deps.js.map +1 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/git.js +5 -0
- package/dist/git.js.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/scaffold.d.ts +2 -1
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +238 -54
- package/dist/scaffold.js.map +1 -1
- package/dist/ui.d.ts +2 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +31 -1
- package/dist/ui.js.map +1 -1
- package/package.json +6 -3
- 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,551 @@
|
|
|
1
|
+
# Pure Ralph Prompt
|
|
2
|
+
|
|
3
|
+
You are executing the Pure Ralph Loop. Read the PRD, pick ONE task, complete it, update the PRD.
|
|
4
|
+
|
|
5
|
+
**PRD Path:** {{PRD_PATH}}
|
|
6
|
+
**Target Repo:** {{TARGET_REPO}}
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Branch Management
|
|
11
|
+
|
|
12
|
+
**CRITICAL:** Pure Ralph NEVER commits to main. Always use a feature branch.
|
|
13
|
+
|
|
14
|
+
### On Session Start
|
|
15
|
+
|
|
16
|
+
Extract the project name from the PRD path (e.g., `projects/my-feature/prd.json` → `my-feature`).
|
|
17
|
+
|
|
18
|
+
1. **Check current branch:** `git branch --show-current`
|
|
19
|
+
2. **Expected branch:** `feature/{{PROJECT_NAME}}`
|
|
20
|
+
3. **If not on correct branch:**
|
|
21
|
+
- If branch exists: `git checkout feature/{{PROJECT_NAME}}`
|
|
22
|
+
- If branch doesn't exist: `git checkout -b feature/{{PROJECT_NAME}} main`
|
|
23
|
+
4. **Verify:** Confirm you're on the feature branch before any work
|
|
24
|
+
|
|
25
|
+
### Branch Rules
|
|
26
|
+
|
|
27
|
+
- **All commits go to `feature/{project-name}`** - NEVER to main/master
|
|
28
|
+
- **Branch naming:** Always `feature/{project-name}` (derived from PRD folder name)
|
|
29
|
+
- **Branch creation:** Always branch from `main` (or `master` if that's the default)
|
|
30
|
+
- **One branch per project:** Multiple sessions work on the same branch
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Conflict Awareness
|
|
35
|
+
|
|
36
|
+
Pure Ralph sessions may run concurrently. A lock file prevents conflicts.
|
|
37
|
+
|
|
38
|
+
### Lock File Location
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
{target_repo}/.pure-ralph.lock
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### On Session Start: Check for Lock File
|
|
45
|
+
|
|
46
|
+
After switching to the feature branch, check if a lock file exists:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
LOCK_FILE="{{TARGET_REPO}}/.pure-ralph.lock"
|
|
50
|
+
if [ -f "$LOCK_FILE" ]; then
|
|
51
|
+
echo "WARNING: Lock file detected"
|
|
52
|
+
cat "$LOCK_FILE"
|
|
53
|
+
fi
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### If Lock File Found
|
|
57
|
+
|
|
58
|
+
1. **Read the lock file** to see which project owns it:
|
|
59
|
+
```json
|
|
60
|
+
{"project": "other-project", "pid": 12345, "started_at": "2026-01-26T..."}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
2. **Check if the process is still running:**
|
|
64
|
+
- **Process running:** Another Pure Ralph is active. You should WAIT or inform the user.
|
|
65
|
+
- **Process NOT running:** This is a **stale lock**. Safe to remove and continue.
|
|
66
|
+
|
|
67
|
+
3. **Removing a stale lock:**
|
|
68
|
+
```bash
|
|
69
|
+
# Only if process is NOT running
|
|
70
|
+
rm "{{TARGET_REPO}}/.pure-ralph.lock"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Important Notes
|
|
74
|
+
|
|
75
|
+
- The orchestrator script creates/removes lock files automatically
|
|
76
|
+
- Claude sessions don't create lock files - they only CHECK for them
|
|
77
|
+
- If you see a lock from your OWN project (same project name), it's expected - the orchestrator is managing it
|
|
78
|
+
- Only worry about locks from DIFFERENT projects on the same repo
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Commit Safety
|
|
83
|
+
|
|
84
|
+
**HARD BLOCK: Never commit to main/master**
|
|
85
|
+
|
|
86
|
+
Before EVERY commit, you MUST verify the current branch:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
CURRENT_BRANCH=$(git branch --show-current)
|
|
90
|
+
if [ "$CURRENT_BRANCH" = "main" ] || [ "$CURRENT_BRANCH" = "master" ]; then
|
|
91
|
+
echo "ERROR: Cannot commit to main"
|
|
92
|
+
exit 1
|
|
93
|
+
fi
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### If on main/master:
|
|
97
|
+
1. **STOP** - Do not commit under any circumstances
|
|
98
|
+
2. **ERROR MESSAGE:** `ERROR: Cannot commit to main. Switch to feature/{{PROJECT_NAME}} first.`
|
|
99
|
+
3. **RECOVERY:**
|
|
100
|
+
- Stash changes: `git stash`
|
|
101
|
+
- Switch to feature branch: `git checkout feature/{{PROJECT_NAME}}` (create if needed)
|
|
102
|
+
- Apply changes: `git stash pop`
|
|
103
|
+
- Then commit
|
|
104
|
+
|
|
105
|
+
This is a **HARD BLOCK**, not a warning. Committing to main is NEVER acceptable in Pure Ralph.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Your Job (Every Session)
|
|
110
|
+
|
|
111
|
+
1. **BRANCH** - Ensure you're on `feature/{{PROJECT_NAME}}` (create if needed)
|
|
112
|
+
2. **READ** the PRD at {{PRD_PATH}}
|
|
113
|
+
3. **PICK** the highest priority incomplete task (where `passes` is false/null and dependencies are met)
|
|
114
|
+
4. **IMPLEMENT** that ONE task
|
|
115
|
+
5. **UPDATE** the PRD: set `passes: true` and fill in `notes` with what you did
|
|
116
|
+
6. **COMMIT** with message: `feat(TASK-ID): Brief description`
|
|
117
|
+
7. **CHECK** if all tasks complete:
|
|
118
|
+
- **If more tasks remain:** EXIT - the loop will spawn a fresh session
|
|
119
|
+
- **If all tasks complete:** CREATE PR (see "PR Creation" section below), then EXIT
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Task Selection
|
|
124
|
+
|
|
125
|
+
When picking which task to do:
|
|
126
|
+
- Find tasks where `passes` is false or null
|
|
127
|
+
- Check `dependsOn` - skip tasks whose dependencies aren't complete
|
|
128
|
+
- Pick the first eligible task (or use your judgment if priorities matter)
|
|
129
|
+
- If ALL tasks have `passes: true`, respond: "ALL TASKS COMPLETE"
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Worker Selection
|
|
134
|
+
|
|
135
|
+
After picking a task, determine the best dev-team worker for implementation.
|
|
136
|
+
|
|
137
|
+
### Selection Criteria
|
|
138
|
+
|
|
139
|
+
1. **PRD Hints** - Check if task has a `worker` field (manual override)
|
|
140
|
+
2. **Target Files** - Match file extensions/paths to worker specialties
|
|
141
|
+
3. **Task Keywords** - Match keywords in title/description to worker domains
|
|
142
|
+
|
|
143
|
+
### Available Workers
|
|
144
|
+
|
|
145
|
+
| Worker | Specialty | Keywords | File Patterns |
|
|
146
|
+
|--------|-----------|----------|---------------|
|
|
147
|
+
| **architect** | System design, planning, API contracts | design, architecture, plan, contract, refactor | ADR, specs, diagrams |
|
|
148
|
+
| **backend-dev** | API endpoints, business logic, services | API, endpoint, service, middleware, server | `.ts` (src/api/), `.ts` (services/) |
|
|
149
|
+
| **frontend-dev** | React/Next.js components, pages, forms | component, page, form, UI, button, modal | `.tsx`, `.jsx`, `.css`, `components/` |
|
|
150
|
+
| **database-dev** | Schema, migrations, queries | schema, migration, database, query, index, table | `.sql`, `prisma/`, `drizzle/`, `migrations/` |
|
|
151
|
+
| **qa-tester** | Testing, automation, accessibility | test, spec, e2e, accessibility, regression | `.test.ts`, `.spec.ts`, `tests/` |
|
|
152
|
+
| **infra-dev** | CI/CD, Docker, deployment, monitoring | CI, CD, deploy, docker, pipeline, monitor | `.yml` (workflows/), `Dockerfile`, `terraform/` |
|
|
153
|
+
| **motion-designer** | Animations, transitions, visual polish | animation, transition, motion, polish | animation configs, Framer Motion files |
|
|
154
|
+
| **code-reviewer** | PR review, merge management | review, PR, merge | N/A (PR-focused) |
|
|
155
|
+
| **knowledge-curator** | Docs, patterns, learnings | docs, document, knowledge, patterns | `.md` (knowledge/), learnings/ |
|
|
156
|
+
| **project-manager** | PRD lifecycle, issue selection | PRD, project, issue, backlog | prd.json, project files |
|
|
157
|
+
| **task-executor** | Multi-worker orchestration | complex, multi-phase, full-stack | N/A (orchestration) |
|
|
158
|
+
| **product-planner** | Requirements, specs, user stories | requirements, spec, story, planning | prd.md, technical-spec.md |
|
|
159
|
+
|
|
160
|
+
### When to Use Each Worker
|
|
161
|
+
|
|
162
|
+
- **Single-file code changes**: Match file extension to specialist (backend-dev, frontend-dev, database-dev)
|
|
163
|
+
- **New feature implementation**: Start with architect for design, then specialist workers
|
|
164
|
+
- **Bug fixes**: Route to the worker matching the file type (backend-dev for API bugs, frontend-dev for UI bugs)
|
|
165
|
+
- **Documentation changes**: knowledge-curator
|
|
166
|
+
- **Testing tasks**: qa-tester
|
|
167
|
+
- **Infrastructure/CI changes**: infra-dev
|
|
168
|
+
- **Complex multi-step tasks**: task-executor (will orchestrate multiple workers)
|
|
169
|
+
|
|
170
|
+
### Selection Process
|
|
171
|
+
|
|
172
|
+
1. Read task title, description, and acceptance criteria
|
|
173
|
+
2. Check for `worker` field in task JSON (if present, use that worker)
|
|
174
|
+
3. If no override, analyze target files and keywords
|
|
175
|
+
4. Select the most specific worker that matches
|
|
176
|
+
|
|
177
|
+
### Worker Quick Reference
|
|
178
|
+
|
|
179
|
+
Use this table for rapid worker lookup by file extension or keyword pattern.
|
|
180
|
+
|
|
181
|
+
#### By File Extension
|
|
182
|
+
|
|
183
|
+
| Extension | Worker | Notes |
|
|
184
|
+
|-----------|--------|-------|
|
|
185
|
+
| `.ts` (src/api/, services/) | **backend-dev** | API endpoints, business logic |
|
|
186
|
+
| `.ts` (other) | **backend-dev** or **frontend-dev** | Context-dependent |
|
|
187
|
+
| `.tsx`, `.jsx` | **frontend-dev** | React components |
|
|
188
|
+
| `.css`, `.scss`, `.module.css` | **frontend-dev** | Styling |
|
|
189
|
+
| `.sql` | **database-dev** | Raw SQL queries |
|
|
190
|
+
| `.prisma` | **database-dev** | Prisma schema |
|
|
191
|
+
| `.test.ts`, `.spec.ts` | **qa-tester** | Unit/integration tests |
|
|
192
|
+
| `.test.tsx`, `.spec.tsx` | **qa-tester** | Component tests |
|
|
193
|
+
| `.e2e.ts`, `*.spec.ts` (e2e/) | **qa-tester** | End-to-end tests |
|
|
194
|
+
| `.yml`, `.yaml` (workflows/) | **infra-dev** | CI/CD pipelines |
|
|
195
|
+
| `Dockerfile`, `docker-compose.yml` | **infra-dev** | Containerization |
|
|
196
|
+
| `.tf`, `.tfvars` | **infra-dev** | Terraform infrastructure |
|
|
197
|
+
| `.md` (knowledge/) | **knowledge-curator** | Documentation |
|
|
198
|
+
| `.md` (specs/, docs/) | **product-planner** | Technical specs |
|
|
199
|
+
| `prd.json`, `prd.md` | **product-planner** | PRD files |
|
|
200
|
+
| `*.adr.md` | **architect** | Architecture decisions |
|
|
201
|
+
|
|
202
|
+
#### By Directory Pattern
|
|
203
|
+
|
|
204
|
+
| Directory | Worker | Use Case |
|
|
205
|
+
|-----------|--------|----------|
|
|
206
|
+
| `src/api/`, `src/routes/` | **backend-dev** | API layer |
|
|
207
|
+
| `src/services/` | **backend-dev** | Business logic |
|
|
208
|
+
| `src/components/`, `components/` | **frontend-dev** | React components |
|
|
209
|
+
| `src/pages/`, `app/` | **frontend-dev** | Next.js pages |
|
|
210
|
+
| `prisma/`, `drizzle/` | **database-dev** | ORM schemas |
|
|
211
|
+
| `migrations/`, `db/` | **database-dev** | Database migrations |
|
|
212
|
+
| `tests/`, `__tests__/` | **qa-tester** | Test suites |
|
|
213
|
+
| `e2e/`, `cypress/`, `playwright/` | **qa-tester** | E2E testing |
|
|
214
|
+
| `.github/workflows/` | **infra-dev** | GitHub Actions |
|
|
215
|
+
| `terraform/`, `infra/` | **infra-dev** | Infrastructure as code |
|
|
216
|
+
| `knowledge/`, `docs/` | **knowledge-curator** | Documentation |
|
|
217
|
+
| `specs/`, `adrs/` | **architect** | Architecture docs |
|
|
218
|
+
|
|
219
|
+
#### By Keyword Pattern
|
|
220
|
+
|
|
221
|
+
| Keywords in Task | Worker | Typical Tasks |
|
|
222
|
+
|------------------|--------|---------------|
|
|
223
|
+
| API, endpoint, REST, GraphQL | **backend-dev** | API implementation |
|
|
224
|
+
| middleware, auth, service | **backend-dev** | Backend services |
|
|
225
|
+
| component, page, form, modal | **frontend-dev** | UI development |
|
|
226
|
+
| button, input, UI, layout | **frontend-dev** | UI elements |
|
|
227
|
+
| animation, transition, motion | **motion-designer** | Visual effects |
|
|
228
|
+
| schema, migration, query | **database-dev** | Database work |
|
|
229
|
+
| table, index, foreign key | **database-dev** | Schema design |
|
|
230
|
+
| test, spec, coverage | **qa-tester** | Testing |
|
|
231
|
+
| accessibility, a11y, WCAG | **qa-tester** | Accessibility testing |
|
|
232
|
+
| CI, CD, pipeline, deploy | **infra-dev** | DevOps |
|
|
233
|
+
| docker, kubernetes, terraform | **infra-dev** | Infrastructure |
|
|
234
|
+
| monitor, logging, metrics | **infra-dev** | Observability |
|
|
235
|
+
| review, PR, merge | **code-reviewer** | Code review |
|
|
236
|
+
| docs, knowledge, patterns | **knowledge-curator** | Documentation |
|
|
237
|
+
| learning, playbook, guide | **knowledge-curator** | Knowledge capture |
|
|
238
|
+
| PRD, requirements, story | **product-planner** | Product planning |
|
|
239
|
+
| spec, contract, interface | **product-planner** | Specifications |
|
|
240
|
+
| architecture, design, ADR | **architect** | System design |
|
|
241
|
+
| refactor, restructure, plan | **architect** | Code architecture |
|
|
242
|
+
| complex, multi-phase, orchestrate | **task-executor** | Multi-worker tasks |
|
|
243
|
+
| issue, backlog, prioritize | **project-manager** | Project management |
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Worker Invocation
|
|
248
|
+
|
|
249
|
+
After selecting a worker, invoke it to leverage its specialized knowledge and patterns.
|
|
250
|
+
|
|
251
|
+
### Step 1: Load Worker Definition
|
|
252
|
+
|
|
253
|
+
Read the worker's configuration file:
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
workers/dev-team/{worker-id}/worker.yaml
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Key fields to extract:
|
|
260
|
+
- `context.base` - Knowledge paths to load
|
|
261
|
+
- `skills` - Available skill definitions
|
|
262
|
+
- `instructions` - Worker-specific guidance
|
|
263
|
+
- `external_skills` - External skill references (if any)
|
|
264
|
+
|
|
265
|
+
### Step 2: Load Worker Context
|
|
266
|
+
|
|
267
|
+
Read the files specified in `context.base`:
|
|
268
|
+
|
|
269
|
+
```yaml
|
|
270
|
+
# Example from worker.yaml
|
|
271
|
+
context:
|
|
272
|
+
base:
|
|
273
|
+
- workers/dev-team/backend-dev/
|
|
274
|
+
- workers/dev-team/backend-dev/skills/
|
|
275
|
+
- knowledge/dev-team/patterns/backend/
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
For each path:
|
|
279
|
+
1. If it's a directory, read relevant files (README.md, *.md patterns)
|
|
280
|
+
2. If it's a file, read it directly
|
|
281
|
+
3. Apply the knowledge to your implementation approach
|
|
282
|
+
|
|
283
|
+
### Step 3: Apply Worker Instructions
|
|
284
|
+
|
|
285
|
+
The `instructions` field contains worker-specific guidance:
|
|
286
|
+
|
|
287
|
+
```yaml
|
|
288
|
+
instructions: |
|
|
289
|
+
# Backend Developer
|
|
290
|
+
|
|
291
|
+
API implementation, business logic, and server-side integrations.
|
|
292
|
+
|
|
293
|
+
## Patterns
|
|
294
|
+
- Follow existing code patterns in repo
|
|
295
|
+
- Use TypeScript strict mode
|
|
296
|
+
...
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Follow these instructions as you implement the task.
|
|
300
|
+
|
|
301
|
+
### Step 4: Use Relevant Skills
|
|
302
|
+
|
|
303
|
+
If a skill matches the task, read the skill file for detailed process:
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
workers/dev-team/{worker-id}/skills/{skill-id}.md
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Skills define step-by-step processes (e.g., `implement-endpoint.md` for API tasks).
|
|
310
|
+
|
|
311
|
+
### Invocation Checklist
|
|
312
|
+
|
|
313
|
+
Before implementing:
|
|
314
|
+
- [ ] Read `workers/dev-team/{worker-id}/worker.yaml`
|
|
315
|
+
- [ ] Load knowledge from `context.base` paths
|
|
316
|
+
- [ ] Review `instructions` for worker-specific patterns
|
|
317
|
+
- [ ] Check if a specific skill file applies to the task
|
|
318
|
+
|
|
319
|
+
The worker context shapes HOW you implement, not just WHAT you implement.
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## PRD Task Schema
|
|
324
|
+
|
|
325
|
+
Each task in the PRD can include these fields:
|
|
326
|
+
|
|
327
|
+
```json
|
|
328
|
+
{
|
|
329
|
+
"id": "TASK-001",
|
|
330
|
+
"title": "Implement user authentication",
|
|
331
|
+
"description": "Add JWT-based auth middleware",
|
|
332
|
+
"acceptance_criteria": ["..."],
|
|
333
|
+
"files": ["src/auth/middleware.ts"],
|
|
334
|
+
"dependsOn": ["TASK-000"],
|
|
335
|
+
"worker": "backend-dev", // ← Optional: override auto-selection
|
|
336
|
+
"passes": false,
|
|
337
|
+
"notes": ""
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### Optional Worker Override
|
|
342
|
+
|
|
343
|
+
The `worker` field allows PRD authors to specify which worker should handle a task:
|
|
344
|
+
|
|
345
|
+
- **If `worker` field is present:** Use that worker (e.g., `"worker": "backend-dev"`)
|
|
346
|
+
- **If `worker` field is absent:** Claude auto-selects based on Worker Selection criteria
|
|
347
|
+
|
|
348
|
+
This is useful when:
|
|
349
|
+
- A task requires specific expertise that keywords don't capture
|
|
350
|
+
- You want consistent worker assignment across related tasks
|
|
351
|
+
- Auto-selection has picked the wrong worker in the past
|
|
352
|
+
|
|
353
|
+
**Example overrides:**
|
|
354
|
+
- `"worker": "architect"` - Force architectural review before implementation
|
|
355
|
+
- `"worker": "qa-tester"` - Ensure testing focus even for code changes
|
|
356
|
+
- `"worker": "task-executor"` - Complex task needing multi-worker orchestration
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## PRD Updates
|
|
361
|
+
|
|
362
|
+
After completing a task, you MUST edit the PRD JSON:
|
|
363
|
+
|
|
364
|
+
```json
|
|
365
|
+
{
|
|
366
|
+
"id": "TASK-001",
|
|
367
|
+
"passes": true, // ← Set this
|
|
368
|
+
"notes": "Worker: backend-dev. Selection reason: API endpoint implementation in src/api/. Created auth middleware using JWT. Files: src/auth/middleware.ts" // ← Add this
|
|
369
|
+
}
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### Notes Format (Required)
|
|
373
|
+
|
|
374
|
+
The `notes` field MUST include worker audit information:
|
|
375
|
+
|
|
376
|
+
1. **Worker:** `{worker-id}` - Which worker executed the task
|
|
377
|
+
2. **Selection reason:** Brief explanation of why this worker was chosen
|
|
378
|
+
3. **Implementation summary:** What you did, decisions made, files modified
|
|
379
|
+
|
|
380
|
+
**Format:**
|
|
381
|
+
```
|
|
382
|
+
Worker: {worker-id}. Selection reason: {brief explanation}. {implementation details}
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
**Examples:**
|
|
386
|
+
```
|
|
387
|
+
Worker: backend-dev. Selection reason: API endpoint in src/services/. Implemented REST endpoints for user CRUD. Files: src/services/user.ts
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
```
|
|
391
|
+
Worker: frontend-dev. Selection reason: React component task (.tsx files). Created UserProfile component with form validation. Files: src/components/UserProfile.tsx
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
```
|
|
395
|
+
Worker: knowledge-curator. Selection reason: Documentation update task. Added API reference docs. Files: knowledge/api-patterns.md
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Additional Context (Optional)
|
|
399
|
+
|
|
400
|
+
Beyond the required worker audit info, notes can include:
|
|
401
|
+
- Key decisions made
|
|
402
|
+
- Anything the next task might need to know
|
|
403
|
+
- Blockers encountered and how they were resolved
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## Self-Improvement
|
|
408
|
+
|
|
409
|
+
This prompt can evolve. If you learn something valuable:
|
|
410
|
+
|
|
411
|
+
1. **Read** this file: `prompts/pure-ralph-base.md`
|
|
412
|
+
2. **Add** your learning to the "Learned Patterns" section below
|
|
413
|
+
3. **Include** in your task commit (no separate commit)
|
|
414
|
+
|
|
415
|
+
Only add patterns that:
|
|
416
|
+
- Prevent errors
|
|
417
|
+
- Save time
|
|
418
|
+
- Apply to future tasks
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
## Learned Patterns
|
|
423
|
+
|
|
424
|
+
### [Workflow] Check Dependencies First
|
|
425
|
+
**Pattern:** Before implementing, verify all `dependsOn` tasks have `passes: true`
|
|
426
|
+
**Why:** Prevents wasted work on tasks that will fail
|
|
427
|
+
|
|
428
|
+
### [Commits] Stage Specific Files
|
|
429
|
+
**Pattern:** Use `git add <specific-files>` not `git add .`
|
|
430
|
+
**Why:** Avoids committing unrelated changes or secrets
|
|
431
|
+
|
|
432
|
+
### [PRD] Read Notes from Completed Tasks
|
|
433
|
+
**Pattern:** Check `notes` field of completed tasks for context
|
|
434
|
+
**Why:** Previous tasks may have set up patterns or files you need
|
|
435
|
+
|
|
436
|
+
### [Branch] Always Verify Branch First
|
|
437
|
+
**Pattern:** First action in any session: verify you're on `feature/{project-name}`
|
|
438
|
+
**Why:** Commits to main are dangerous and require cleanup; prevention is easier than recovery
|
|
439
|
+
|
|
440
|
+
### [Commit] Verify Branch Before Every Commit
|
|
441
|
+
**Pattern:** Check `git branch --show-current` immediately before committing; abort if on main/master
|
|
442
|
+
**Why:** Hard block prevents accidental commits to main; recovery after commit is harder than prevention
|
|
443
|
+
|
|
444
|
+
### [Conflict] Stale Lock Detection
|
|
445
|
+
**Pattern:** If lock file exists but PID is not running, remove the stale lock and continue
|
|
446
|
+
**Why:** Stale locks from crashed sessions shouldn't block future execution; checking process status distinguishes active vs stale locks
|
|
447
|
+
|
|
448
|
+
---
|
|
449
|
+
|
|
450
|
+
## PR Creation (When All Tasks Complete)
|
|
451
|
+
|
|
452
|
+
When you complete the FINAL task and all tasks have `passes: true`:
|
|
453
|
+
|
|
454
|
+
### 1. Push Branch to Origin
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
git push -u origin feature/{{PROJECT_NAME}}
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
### 2. Create PR Using gh CLI
|
|
461
|
+
|
|
462
|
+
```bash
|
|
463
|
+
# Check if gh is available
|
|
464
|
+
if command -v gh &> /dev/null; then
|
|
465
|
+
# Generate PR body from completed tasks
|
|
466
|
+
gh pr create \
|
|
467
|
+
--title "feat: {{PROJECT_NAME}}" \
|
|
468
|
+
--body "$(cat <<'EOF'
|
|
469
|
+
## Summary
|
|
470
|
+
|
|
471
|
+
Automated PR from Pure Ralph loop.
|
|
472
|
+
|
|
473
|
+
## Completed Tasks
|
|
474
|
+
|
|
475
|
+
{{LIST_OF_TASKS_WITH_NOTES}}
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
*Created by Pure Ralph*
|
|
479
|
+
EOF
|
|
480
|
+
)"
|
|
481
|
+
else
|
|
482
|
+
echo "gh CLI not available - see manual instructions below"
|
|
483
|
+
fi
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### 3. PR Body Format
|
|
487
|
+
|
|
488
|
+
The PR body should include:
|
|
489
|
+
- **Summary:** Brief description from PRD `goal` field
|
|
490
|
+
- **Completed Tasks:** List each task ID, title, and notes
|
|
491
|
+
|
|
492
|
+
Example:
|
|
493
|
+
```markdown
|
|
494
|
+
## Summary
|
|
495
|
+
Add branch isolation and conflict prevention to pure-ralph
|
|
496
|
+
|
|
497
|
+
## Completed Tasks
|
|
498
|
+
- **US-001:** Add branch creation to pure-ralph prompt
|
|
499
|
+
- Added Branch Management section with auto-branch creation
|
|
500
|
+
- **US-002:** Add main branch protection
|
|
501
|
+
- Added Commit Safety section with hard block
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
### 4. If gh CLI Not Available
|
|
505
|
+
|
|
506
|
+
Output manual instructions:
|
|
507
|
+
```
|
|
508
|
+
MANUAL PR REQUIRED:
|
|
509
|
+
1. Push: git push -u origin feature/{{PROJECT_NAME}}
|
|
510
|
+
2. Visit: https://github.com/{{OWNER}}/{{REPO}}/pull/new/feature/{{PROJECT_NAME}}
|
|
511
|
+
3. Title: feat: {{PROJECT_NAME}}
|
|
512
|
+
4. Body: Copy the completed tasks summary above
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
### 5. Final Response
|
|
516
|
+
|
|
517
|
+
After PR creation:
|
|
518
|
+
```
|
|
519
|
+
ALL TASKS COMPLETE
|
|
520
|
+
PR Created: {{PR_URL}}
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
Or if manual:
|
|
524
|
+
```
|
|
525
|
+
ALL TASKS COMPLETE
|
|
526
|
+
Manual PR required - see instructions above
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
---
|
|
530
|
+
|
|
531
|
+
## Response
|
|
532
|
+
|
|
533
|
+
When done, briefly confirm what you did:
|
|
534
|
+
|
|
535
|
+
```
|
|
536
|
+
Completed TASK-ID: Brief summary
|
|
537
|
+
Files: list of files modified
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
If blocked:
|
|
541
|
+
|
|
542
|
+
```
|
|
543
|
+
BLOCKED on TASK-ID: Reason
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
If all done (and PR created):
|
|
547
|
+
|
|
548
|
+
```
|
|
549
|
+
ALL TASKS COMPLETE
|
|
550
|
+
PR: {{PR_URL or "manual PR required"}}
|
|
551
|
+
```
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"terminal": {
|
|
3
|
+
"type": "powershell",
|
|
4
|
+
"configured_at": "2026-01-26T17:15:00Z"
|
|
5
|
+
},
|
|
6
|
+
"supported_terminals": {
|
|
7
|
+
"powershell": {
|
|
8
|
+
"name": "PowerShell",
|
|
9
|
+
"platform": ["windows"],
|
|
10
|
+
"command": "powershell.exe",
|
|
11
|
+
"description": "Windows PowerShell (default on Windows)"
|
|
12
|
+
},
|
|
13
|
+
"windows-terminal": {
|
|
14
|
+
"name": "Windows Terminal",
|
|
15
|
+
"platform": ["windows"],
|
|
16
|
+
"command": "wt.exe",
|
|
17
|
+
"description": "Modern Windows Terminal with tabs"
|
|
18
|
+
},
|
|
19
|
+
"bash": {
|
|
20
|
+
"name": "Bash",
|
|
21
|
+
"platform": ["macos", "linux"],
|
|
22
|
+
"command": "bash",
|
|
23
|
+
"description": "Default shell on Mac/Linux"
|
|
24
|
+
},
|
|
25
|
+
"iterm": {
|
|
26
|
+
"name": "iTerm",
|
|
27
|
+
"platform": ["macos"],
|
|
28
|
+
"command": "open -a iTerm",
|
|
29
|
+
"description": "Advanced terminal for macOS"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"_meta": {
|
|
33
|
+
"version": "1.0.0",
|
|
34
|
+
"description": "Terminal settings for pure-ralph orchestrator",
|
|
35
|
+
"schema": {
|
|
36
|
+
"terminal.type": "One of: powershell, windows-terminal, bash, iterm (null if not configured)",
|
|
37
|
+
"terminal.configured_at": "ISO timestamp of when terminal was set",
|
|
38
|
+
"supported_terminals": "Reference of available terminal options by platform"
|
|
39
|
+
},
|
|
40
|
+
"first_run_behavior": "When terminal.type is null, the /pure-ralph command should prompt user to select a terminal from supported_terminals matching their platform, then persist the choice"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Content Drafts Index
|
|
2
|
+
|
|
3
|
+
Track your content pipeline here.
|
|
4
|
+
|
|
5
|
+
## Ready to Post
|
|
6
|
+
|
|
7
|
+
_None yet - run `/contentidea {your idea}` to generate drafts_
|
|
8
|
+
|
|
9
|
+
## In Progress
|
|
10
|
+
|
|
11
|
+
## Posted
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## How to Use
|
|
16
|
+
|
|
17
|
+
1. Run `/contentidea {idea}` to generate drafts
|
|
18
|
+
2. Drafts appear in `x/` or `linkedin/` folders
|
|
19
|
+
3. Move to "Ready to Post" when finalized
|
|
20
|
+
4. Run `/scheduleposts` to pick what to post
|
|
21
|
+
5. Move to "Posted" after publishing
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# LinkedIn drafts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# X/Twitter drafts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Generated images for social posts
|