ccsetup 1.1.1 → 1.2.1
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/README.md +144 -342
- package/bin/create-project.js +1246 -90
- package/bin/lib/claudeInterface.js +209 -0
- package/lib/aiAgentSelector.js +155 -0
- package/lib/templates/README.md +176 -0
- package/lib/templates/catalog.js +230 -0
- package/lib/templates/filter.js +257 -0
- package/lib/templates/index.js +45 -0
- package/lib/templates/metadata/agents.json +413 -0
- package/lib/templates/metadata-extractor.js +329 -0
- package/lib/templates/search.js +356 -0
- package/package.json +13 -5
- package/template/{agents → .claude/agents}/checker.md +29 -0
- package/template/.claude/settings.json +32 -0
- package/template/.claude/skills/codex-review/SKILL.md +139 -0
- package/template/.claude/skills/prd/SKILL.md +343 -0
- package/template/.claude/skills/ralph/SKILL.md +339 -0
- package/template/.claude/skills/secops/SKILL.md +259 -0
- package/template/.codex/skills/codex-review/SKILL.md +139 -0
- package/template/.codex/skills/prd/SKILL.md +343 -0
- package/template/.codex/skills/ralph/SKILL.md +339 -0
- package/template/AGENTS.md +43 -0
- package/template/CLAUDE.md +141 -21
- package/template/CONTRIBUTING.md +37 -0
- package/template/agents/README.md +15 -171
- package/template/docs/ROADMAP.md +0 -36
- package/template/docs/agent-orchestration.md +24 -141
- package/template/docs/codex-setup.md +32 -0
- package/template/hooks/codex-review/index.js +105 -0
- package/template/hooks/workflow-selector/index.js +398 -0
- package/template/scripts/codex-review/codex-review.sh +266 -0
- package/template/scripts/ralph/CLAUDE.md +174 -0
- package/template/scripts/ralph/CODEX.md +76 -0
- package/template/scripts/ralph/ralph.sh +150 -0
- package/template/tickets/ticket-list.md +17 -68
- package/template/agents/ai-engineer.md +0 -31
- package/template/agents/api-documenter.md +0 -31
- package/template/agents/architect-review.md +0 -42
- package/template/agents/backend-architect.md +0 -29
- package/template/agents/business-analyst.md +0 -34
- package/template/agents/c-pro.md +0 -34
- package/template/agents/cloud-architect.md +0 -31
- package/template/agents/code-reviewer.md +0 -28
- package/template/agents/content-marketer.md +0 -34
- package/template/agents/context-manager.md +0 -63
- package/template/agents/cpp-pro.md +0 -37
- package/template/agents/customer-support.md +0 -34
- package/template/agents/data-engineer.md +0 -31
- package/template/agents/data-scientist.md +0 -28
- package/template/agents/database-admin.md +0 -31
- package/template/agents/database-optimizer.md +0 -31
- package/template/agents/debugger.md +0 -29
- package/template/agents/deployment-engineer.md +0 -31
- package/template/agents/devops-troubleshooter.md +0 -31
- package/template/agents/dx-optimizer.md +0 -62
- package/template/agents/error-detective.md +0 -31
- package/template/agents/frontend-developer.md +0 -30
- package/template/agents/golang-pro.md +0 -31
- package/template/agents/graphql-architect.md +0 -31
- package/template/agents/incident-responder.md +0 -73
- package/template/agents/javascript-pro.md +0 -34
- package/template/agents/legacy-modernizer.md +0 -31
- package/template/agents/ml-engineer.md +0 -31
- package/template/agents/mlops-engineer.md +0 -56
- package/template/agents/mobile-developer.md +0 -31
- package/template/agents/network-engineer.md +0 -31
- package/template/agents/payment-integration.md +0 -31
- package/template/agents/performance-engineer.md +0 -31
- package/template/agents/prompt-engineer.md +0 -58
- package/template/agents/python-pro.md +0 -31
- package/template/agents/quant-analyst.md +0 -31
- package/template/agents/risk-manager.md +0 -40
- package/template/agents/rust-pro.md +0 -34
- package/template/agents/sales-automator.md +0 -34
- package/template/agents/search-specialist.md +0 -58
- package/template/agents/security-auditor.md +0 -31
- package/template/agents/sql-pro.md +0 -34
- package/template/agents/terraform-specialist.md +0 -34
- package/template/agents/test-automator.md +0 -31
- /package/template/{agents → .claude/agents}/backend.md +0 -0
- /package/template/{agents → .claude/agents}/blockchain.md +0 -0
- /package/template/{agents → .claude/agents}/coder.md +0 -0
- /package/template/{agents → .claude/agents}/frontend.md +0 -0
- /package/template/{agents → .claude/agents}/planner.md +0 -0
- /package/template/{agents → .claude/agents}/researcher.md +0 -0
- /package/template/{agents → .claude/agents}/shadcn.md +0 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Ralph Agent Instructions
|
|
2
|
+
|
|
3
|
+
You are an autonomous coding agent working on a software project. You have access to Claude Code's full toolset including subagents.
|
|
4
|
+
|
|
5
|
+
## Your Task
|
|
6
|
+
|
|
7
|
+
1. Read the PRD at `prd.json` (in the same directory as this file)
|
|
8
|
+
2. Read the progress log at `progress.txt` (check Codebase Patterns section first)
|
|
9
|
+
3. Check you're on the correct branch from PRD `branchName`. If not, check it out or create from main.
|
|
10
|
+
4. Pick the **highest priority** user story where `passes: false`
|
|
11
|
+
5. Read the story's `notes` field for file hints and relevant context
|
|
12
|
+
6. Implement that single user story
|
|
13
|
+
7. Run quality checks using the exact commands from `prd.json` → `qualityChecks`
|
|
14
|
+
8. **Spawn a reviewer subagent** to independently verify the implementation (see Verification below)
|
|
15
|
+
9. If reviewer approves: commit ALL changes with message `feat: [Story ID] - [Story Title]`
|
|
16
|
+
10. If reviewer rejects: fix the issues, re-run quality checks, and re-verify
|
|
17
|
+
11. Update the PRD to set `passes: true` and populate `notes` with what was actually done
|
|
18
|
+
12. Update CLAUDE.md files if you discover reusable patterns (see below)
|
|
19
|
+
13. Append your progress to `progress.txt`
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Quality Checks — Use Exact Commands
|
|
24
|
+
|
|
25
|
+
The PRD's `qualityChecks` field contains the exact commands for this project:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
"qualityChecks": {
|
|
29
|
+
"typecheck": "npm run typecheck",
|
|
30
|
+
"lint": "npm run lint",
|
|
31
|
+
"test": "npm test"
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Run **every command** listed in `qualityChecks` using the Bash tool. Do not guess commands — use exactly what's in the PRD.
|
|
36
|
+
|
|
37
|
+
If `qualityChecks` is missing (older PRD format), fall back to detecting commands from `package.json` scripts, `Makefile`, or equivalent config files.
|
|
38
|
+
|
|
39
|
+
**All checks must pass before proceeding to verification.**
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Verification — Spawn a Reviewer Subagent
|
|
44
|
+
|
|
45
|
+
After implementing a story and passing quality checks, you MUST spawn a **checker subagent** using the Agent tool to independently verify the implementation. The implementing agent (you) should not be the sole judge of its own work.
|
|
46
|
+
|
|
47
|
+
### How to verify
|
|
48
|
+
|
|
49
|
+
Use the Agent tool with `subagent_type: "checker"` and a prompt like:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Review the implementation of user story [Story ID]: "[Story Title]"
|
|
53
|
+
|
|
54
|
+
## Acceptance Criteria to verify:
|
|
55
|
+
[paste the acceptance criteria from the story]
|
|
56
|
+
|
|
57
|
+
## Quality commands to run:
|
|
58
|
+
[paste from prd.json qualityChecks]
|
|
59
|
+
|
|
60
|
+
## Instructions:
|
|
61
|
+
1. Run `git diff` to see all changes made in the working tree
|
|
62
|
+
2. For each acceptance criterion, verify it is actually met by the code changes — not just that the code compiles
|
|
63
|
+
3. Run each quality check command and confirm they pass
|
|
64
|
+
4. If any acceptance criterion references UI changes, check that the component renders correctly (use browser tools if available)
|
|
65
|
+
5. Look for: missing edge cases, broken imports, unused variables, incomplete implementations
|
|
66
|
+
|
|
67
|
+
Report back with:
|
|
68
|
+
- PASS or FAIL for each acceptance criterion (with brief reasoning)
|
|
69
|
+
- Overall verdict: APPROVED or CHANGES_REQUESTED
|
|
70
|
+
- If CHANGES_REQUESTED: specific issues to fix
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Acting on the review
|
|
74
|
+
|
|
75
|
+
- **APPROVED**: Proceed to commit
|
|
76
|
+
- **CHANGES_REQUESTED**: Fix each issue raised, re-run quality checks, then spawn the reviewer again. Maximum 3 review cycles per story — if still failing after 3, log the issues in progress.txt and move on (do NOT mark `passes: true`)
|
|
77
|
+
|
|
78
|
+
### Why subagent verification matters
|
|
79
|
+
|
|
80
|
+
The implementing agent has tunnel vision — it wrote the code and is biased toward thinking it works. A fresh subagent context catches:
|
|
81
|
+
- Acceptance criteria that look met but aren't (e.g., criterion says "default 'pending'" but code defaults to null)
|
|
82
|
+
- Quality regressions in files you didn't intend to change
|
|
83
|
+
- Missing integrations (e.g., new API route exists but nothing calls it)
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Browser Testing
|
|
88
|
+
|
|
89
|
+
For any story with "Verify in browser using dev-browser skill" in its acceptance criteria:
|
|
90
|
+
|
|
91
|
+
1. Navigate to the relevant page
|
|
92
|
+
2. Verify the UI changes work as expected
|
|
93
|
+
3. Take a screenshot if helpful for the progress log
|
|
94
|
+
|
|
95
|
+
The reviewer subagent should also check UI stories if browser tools are available. If no browser tools are configured, note in your progress report that manual browser verification is needed.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Progress Report Format
|
|
100
|
+
|
|
101
|
+
APPEND to progress.txt (never replace, always append):
|
|
102
|
+
```
|
|
103
|
+
## [Date/Time] - [Story ID]
|
|
104
|
+
- What was implemented
|
|
105
|
+
- Files changed
|
|
106
|
+
- Review result: [APPROVED / CHANGES_REQUESTED → fixed → APPROVED]
|
|
107
|
+
- Review cycles: [1-3]
|
|
108
|
+
- **Learnings for future iterations:**
|
|
109
|
+
- Patterns discovered (e.g., "this codebase uses X for Y")
|
|
110
|
+
- Gotchas encountered (e.g., "don't forget to update Z when changing W")
|
|
111
|
+
- Useful context (e.g., "the evaluation panel is in component X")
|
|
112
|
+
- Reviewer catches (e.g., "reviewer caught missing default value on status column")
|
|
113
|
+
---
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The learnings section is critical — it helps future iterations avoid repeating mistakes. **Include what the reviewer caught** so future iterations avoid the same issues.
|
|
117
|
+
|
|
118
|
+
## Consolidate Patterns
|
|
119
|
+
|
|
120
|
+
If you discover a **reusable pattern** that future iterations should know, add it to the `## Codebase Patterns` section at the TOP of progress.txt (create it if it doesn't exist). This section should consolidate the most important learnings:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
## Codebase Patterns
|
|
124
|
+
- Example: Use `sql<number>` template for aggregations
|
|
125
|
+
- Example: Always use `IF NOT EXISTS` for migrations
|
|
126
|
+
- Example: Export types from actions.ts for UI components
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Only add patterns that are **general and reusable**, not story-specific details.
|
|
130
|
+
|
|
131
|
+
## Update CLAUDE.md Files
|
|
132
|
+
|
|
133
|
+
Before committing, check if any edited files have learnings worth preserving in nearby CLAUDE.md files:
|
|
134
|
+
|
|
135
|
+
1. **Identify directories with edited files** — Look at which directories you modified
|
|
136
|
+
2. **Check for existing CLAUDE.md** — Look for CLAUDE.md in those directories or parent directories
|
|
137
|
+
3. **Add valuable learnings** — If you discovered something future developers/agents should know:
|
|
138
|
+
- API patterns or conventions specific to that module
|
|
139
|
+
- Gotchas or non-obvious requirements
|
|
140
|
+
- Dependencies between files
|
|
141
|
+
- Testing approaches for that area
|
|
142
|
+
- Configuration or environment requirements
|
|
143
|
+
|
|
144
|
+
**Examples of good CLAUDE.md additions:**
|
|
145
|
+
- "When modifying X, also update Y to keep them in sync"
|
|
146
|
+
- "This module uses pattern Z for all API calls"
|
|
147
|
+
- "Tests require the dev server running on PORT 3000"
|
|
148
|
+
- "Field names must match the template exactly"
|
|
149
|
+
|
|
150
|
+
**Do NOT add:**
|
|
151
|
+
- Story-specific implementation details
|
|
152
|
+
- Temporary debugging notes
|
|
153
|
+
- Information already in progress.txt
|
|
154
|
+
|
|
155
|
+
Only update CLAUDE.md if you have **genuinely reusable knowledge** that would help future work in that directory.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Stop Condition
|
|
160
|
+
|
|
161
|
+
After completing a user story, check if ALL stories have `passes: true`.
|
|
162
|
+
|
|
163
|
+
If ALL stories are complete and passing, reply with:
|
|
164
|
+
<promise>COMPLETE</promise>
|
|
165
|
+
|
|
166
|
+
If there are still stories with `passes: false`, end your response normally (another iteration will pick up the next story).
|
|
167
|
+
|
|
168
|
+
## Important
|
|
169
|
+
|
|
170
|
+
- Work on ONE story per iteration
|
|
171
|
+
- Commit only after reviewer APPROVES
|
|
172
|
+
- Keep CI green — use the exact commands from `qualityChecks`
|
|
173
|
+
- Read the Codebase Patterns section in progress.txt before starting
|
|
174
|
+
- Read story `notes` for file hints before implementing
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Ralph Agent Instructions for Codex
|
|
2
|
+
|
|
3
|
+
You are an autonomous coding agent working on a software project through the Codex CLI.
|
|
4
|
+
|
|
5
|
+
## Your Task
|
|
6
|
+
|
|
7
|
+
1. Read the PRD at `prd.json` in this directory.
|
|
8
|
+
2. Read the progress log at `progress.txt` and check the `## Codebase Patterns` section first.
|
|
9
|
+
3. Check out or create the branch named in `prd.json` under `branchName`.
|
|
10
|
+
4. Pick the highest-priority user story where `passes` is `false`.
|
|
11
|
+
5. Read the story's `notes` for file hints and context.
|
|
12
|
+
6. Implement exactly that one story.
|
|
13
|
+
7. Run every exact quality check command from `prd.json` → `qualityChecks`.
|
|
14
|
+
8. Independently verify the implementation against the acceptance criteria.
|
|
15
|
+
9. If verification passes, commit all changes with `feat: [Story ID] - [Story Title]`.
|
|
16
|
+
10. If verification fails, fix the issues, rerun quality checks, and verify again.
|
|
17
|
+
11. Update `prd.json` to set `passes: true` and replace `notes` with what was actually done.
|
|
18
|
+
12. Add reusable learnings to nearby `AGENTS.md` files when they would help future work.
|
|
19
|
+
13. Append a progress entry to `progress.txt`.
|
|
20
|
+
|
|
21
|
+
## Quality Checks
|
|
22
|
+
|
|
23
|
+
- Use the exact commands in `qualityChecks`. Do not guess or substitute.
|
|
24
|
+
- If `qualityChecks` is missing, detect commands from project config files before proceeding.
|
|
25
|
+
- All quality checks must pass before verification.
|
|
26
|
+
|
|
27
|
+
## Verification
|
|
28
|
+
|
|
29
|
+
Verification must be independent from implementation. Review your changes against:
|
|
30
|
+
|
|
31
|
+
- every acceptance criterion in the selected story
|
|
32
|
+
- the exact files changed in the working tree
|
|
33
|
+
- the results of all quality checks
|
|
34
|
+
|
|
35
|
+
Report verification in your reasoning and in `progress.txt` as either:
|
|
36
|
+
|
|
37
|
+
- `APPROVED`
|
|
38
|
+
- `CHANGES_REQUESTED`
|
|
39
|
+
|
|
40
|
+
If changes are requested, fix them and repeat. Stop after 3 review cycles for one story. If it still fails, log the issues in `progress.txt` and leave `passes` as `false`.
|
|
41
|
+
|
|
42
|
+
For UI stories that include "Verify in browser using dev-browser skill", perform that verification if browser tools are available. Otherwise note that manual browser verification is still needed.
|
|
43
|
+
|
|
44
|
+
## Progress Entry Format
|
|
45
|
+
|
|
46
|
+
Append to `progress.txt`:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
## [Date/Time] - [Story ID]
|
|
50
|
+
- What was implemented
|
|
51
|
+
- Files changed
|
|
52
|
+
- Review result: [APPROVED / CHANGES_REQUESTED → fixed → APPROVED]
|
|
53
|
+
- Review cycles: [1-3]
|
|
54
|
+
- Learnings for future iterations:
|
|
55
|
+
- Patterns discovered
|
|
56
|
+
- Gotchas encountered
|
|
57
|
+
- Useful context
|
|
58
|
+
- Reviewer catches
|
|
59
|
+
---
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If you discover a reusable rule for future iterations, add it to the `## Codebase Patterns` section at the top of `progress.txt`.
|
|
63
|
+
|
|
64
|
+
## Stop Condition
|
|
65
|
+
|
|
66
|
+
After completing one story, check whether all stories in `prd.json` have `passes: true`.
|
|
67
|
+
|
|
68
|
+
- If all stories pass, output exactly `<promise>COMPLETE</promise>`.
|
|
69
|
+
- Otherwise end normally so the next iteration can continue.
|
|
70
|
+
|
|
71
|
+
## Important
|
|
72
|
+
|
|
73
|
+
- Work on one story per iteration.
|
|
74
|
+
- Commit only after verification approves the changes.
|
|
75
|
+
- Keep the repository green with the exact quality check commands.
|
|
76
|
+
- Read both `progress.txt` patterns and story `notes` before making changes.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Ralph Wiggum - Long-running AI agent loop
|
|
3
|
+
# Usage: ./ralph.sh [--tool claude|codex] [--model <model>] [max_iterations]
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
# Parse arguments
|
|
8
|
+
TOOL="claude"
|
|
9
|
+
MODEL=""
|
|
10
|
+
MAX_ITERATIONS=10
|
|
11
|
+
|
|
12
|
+
while [[ $# -gt 0 ]]; do
|
|
13
|
+
case $1 in
|
|
14
|
+
--tool)
|
|
15
|
+
TOOL="$2"
|
|
16
|
+
shift 2
|
|
17
|
+
;;
|
|
18
|
+
--tool=*)
|
|
19
|
+
TOOL="${1#*=}"
|
|
20
|
+
shift
|
|
21
|
+
;;
|
|
22
|
+
--model)
|
|
23
|
+
MODEL="$2"
|
|
24
|
+
shift 2
|
|
25
|
+
;;
|
|
26
|
+
--model=*)
|
|
27
|
+
MODEL="${1#*=}"
|
|
28
|
+
shift
|
|
29
|
+
;;
|
|
30
|
+
*)
|
|
31
|
+
# Assume it's max_iterations if it's a number
|
|
32
|
+
if [[ "$1" =~ ^[0-9]+$ ]]; then
|
|
33
|
+
MAX_ITERATIONS="$1"
|
|
34
|
+
fi
|
|
35
|
+
shift
|
|
36
|
+
;;
|
|
37
|
+
esac
|
|
38
|
+
done
|
|
39
|
+
|
|
40
|
+
# Validate tool choice
|
|
41
|
+
if [[ "$TOOL" != "claude" && "$TOOL" != "codex" ]]; then
|
|
42
|
+
echo "Error: Invalid tool '$TOOL'. Must be 'claude' or 'codex'."
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
46
|
+
PRD_FILE="$SCRIPT_DIR/prd.json"
|
|
47
|
+
PROGRESS_FILE="$SCRIPT_DIR/progress.txt"
|
|
48
|
+
ARCHIVE_DIR="$SCRIPT_DIR/archive"
|
|
49
|
+
LAST_BRANCH_FILE="$SCRIPT_DIR/.last-branch"
|
|
50
|
+
CLAUDE_PROMPT_FILE="$SCRIPT_DIR/CLAUDE.md"
|
|
51
|
+
CODEX_PROMPT_FILE="$SCRIPT_DIR/CODEX.md"
|
|
52
|
+
|
|
53
|
+
if ! command -v jq &>/dev/null; then
|
|
54
|
+
echo "Error: jq is required for Ralph. Install jq and try again."
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
if [[ "$TOOL" == "claude" ]]; then
|
|
59
|
+
if ! command -v claude &>/dev/null; then
|
|
60
|
+
echo "Error: claude CLI is not installed. Install Claude Code and try again."
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
else
|
|
64
|
+
if ! command -v codex &>/dev/null; then
|
|
65
|
+
echo "Error: codex CLI is not installed. Install it with: npm install -g @openai/codex"
|
|
66
|
+
exit 1
|
|
67
|
+
fi
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
# Archive previous run if branch changed
|
|
71
|
+
if [ -f "$PRD_FILE" ] && [ -f "$LAST_BRANCH_FILE" ]; then
|
|
72
|
+
CURRENT_BRANCH=$(jq -r '.branchName // empty' "$PRD_FILE" 2>/dev/null || echo "")
|
|
73
|
+
LAST_BRANCH=$(cat "$LAST_BRANCH_FILE" 2>/dev/null || echo "")
|
|
74
|
+
|
|
75
|
+
if [ -n "$CURRENT_BRANCH" ] && [ -n "$LAST_BRANCH" ] && [ "$CURRENT_BRANCH" != "$LAST_BRANCH" ]; then
|
|
76
|
+
# Archive the previous run
|
|
77
|
+
DATE=$(date +%Y-%m-%d)
|
|
78
|
+
# Strip "ralph/" prefix from branch name for folder
|
|
79
|
+
FOLDER_NAME=$(echo "$LAST_BRANCH" | sed 's|^ralph/||')
|
|
80
|
+
ARCHIVE_FOLDER="$ARCHIVE_DIR/$DATE-$FOLDER_NAME"
|
|
81
|
+
|
|
82
|
+
echo "Archiving previous run: $LAST_BRANCH"
|
|
83
|
+
mkdir -p "$ARCHIVE_FOLDER"
|
|
84
|
+
[ -f "$PRD_FILE" ] && cp "$PRD_FILE" "$ARCHIVE_FOLDER/"
|
|
85
|
+
[ -f "$PROGRESS_FILE" ] && cp "$PROGRESS_FILE" "$ARCHIVE_FOLDER/"
|
|
86
|
+
echo " Archived to: $ARCHIVE_FOLDER"
|
|
87
|
+
|
|
88
|
+
# Reset progress file for new run
|
|
89
|
+
echo "# Ralph Progress Log" > "$PROGRESS_FILE"
|
|
90
|
+
echo "Started: $(date)" >> "$PROGRESS_FILE"
|
|
91
|
+
echo "---" >> "$PROGRESS_FILE"
|
|
92
|
+
fi
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
# Track current branch
|
|
96
|
+
if [ -f "$PRD_FILE" ]; then
|
|
97
|
+
CURRENT_BRANCH=$(jq -r '.branchName // empty' "$PRD_FILE" 2>/dev/null || echo "")
|
|
98
|
+
if [ -n "$CURRENT_BRANCH" ]; then
|
|
99
|
+
echo "$CURRENT_BRANCH" > "$LAST_BRANCH_FILE"
|
|
100
|
+
fi
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
# Initialize progress file if it doesn't exist
|
|
104
|
+
if [ ! -f "$PROGRESS_FILE" ]; then
|
|
105
|
+
echo "# Ralph Progress Log" > "$PROGRESS_FILE"
|
|
106
|
+
echo "Started: $(date)" >> "$PROGRESS_FILE"
|
|
107
|
+
echo "---" >> "$PROGRESS_FILE"
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
MODEL_DISPLAY="${MODEL:-default}"
|
|
111
|
+
echo "Starting Ralph - Tool: $TOOL - Model: $MODEL_DISPLAY - Max iterations: $MAX_ITERATIONS"
|
|
112
|
+
|
|
113
|
+
for i in $(seq 1 $MAX_ITERATIONS); do
|
|
114
|
+
echo ""
|
|
115
|
+
echo "==============================================================="
|
|
116
|
+
echo " Ralph Iteration $i of $MAX_ITERATIONS ($TOOL${MODEL:+ - $MODEL})"
|
|
117
|
+
echo "==============================================================="
|
|
118
|
+
|
|
119
|
+
# Run the selected tool with the ralph prompt
|
|
120
|
+
if [[ "$TOOL" == "claude" ]]; then
|
|
121
|
+
# Claude Code: use --dangerously-skip-permissions for autonomous operation, --print for output
|
|
122
|
+
MODEL_FLAG=""
|
|
123
|
+
if [[ -n "$MODEL" ]]; then
|
|
124
|
+
MODEL_FLAG="--model $MODEL"
|
|
125
|
+
fi
|
|
126
|
+
OUTPUT=$(claude $MODEL_FLAG --dangerously-skip-permissions --chrome --print < "$CLAUDE_PROMPT_FILE" 2>&1 | tee /dev/stderr) || true
|
|
127
|
+
else
|
|
128
|
+
CMD_ARGS=()
|
|
129
|
+
if [[ -n "$MODEL" ]]; then
|
|
130
|
+
CMD_ARGS+=(--model "$MODEL")
|
|
131
|
+
fi
|
|
132
|
+
OUTPUT=$(codex exec ${CMD_ARGS[@]+"${CMD_ARGS[@]}"} "$(<"$CODEX_PROMPT_FILE")" 2>&1 | tee /dev/stderr) || true
|
|
133
|
+
fi
|
|
134
|
+
|
|
135
|
+
# Check for completion signal
|
|
136
|
+
if echo "$OUTPUT" | grep -q "<promise>COMPLETE</promise>"; then
|
|
137
|
+
echo ""
|
|
138
|
+
echo "Ralph completed all tasks!"
|
|
139
|
+
echo "Completed at iteration $i of $MAX_ITERATIONS"
|
|
140
|
+
exit 0
|
|
141
|
+
fi
|
|
142
|
+
|
|
143
|
+
echo "Iteration $i complete. Continuing..."
|
|
144
|
+
sleep 2
|
|
145
|
+
done
|
|
146
|
+
|
|
147
|
+
echo ""
|
|
148
|
+
echo "Ralph reached max iterations ($MAX_ITERATIONS) without completing all tasks."
|
|
149
|
+
echo "Check $PROGRESS_FILE for status."
|
|
150
|
+
exit 1
|
|
@@ -1,79 +1,28 @@
|
|
|
1
1
|
# Ticket List
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
|
-
This file
|
|
4
|
+
This file provides a quick overview of all tickets in the `/tickets` directory with their current status.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## Status Summary
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
- 🟡 **In Progress** - Currently being worked on
|
|
11
|
-
- 🟢 **Done** - Completed
|
|
12
|
-
- 🔵 **Blocked** - Waiting on dependencies or external factors
|
|
13
|
-
- ⚫ **Cancelled** - No longer needed
|
|
8
|
+
### ✅ Done (0)
|
|
9
|
+
- None
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
### 📋 Todo (0)
|
|
12
|
+
- None
|
|
16
13
|
|
|
17
|
-
###
|
|
18
|
-
|
|
14
|
+
### 🚧 In Progress (0)
|
|
15
|
+
- None
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
_No medium priority tickets yet_
|
|
17
|
+
## Detailed Ticket List
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
| Ticket ID | Title | Status | Priority |
|
|
20
|
+
|-----------|-------|--------|----------|
|
|
25
21
|
|
|
26
|
-
##
|
|
27
|
-
|
|
22
|
+
## Statistics
|
|
23
|
+
- **Total Tickets**: 0
|
|
24
|
+
- **Completed**: 0 (0%)
|
|
25
|
+
- **In Progress**: 0 (0%)
|
|
26
|
+
- **Todo**: 0 (0%)
|
|
28
27
|
|
|
29
|
-
##
|
|
30
|
-
_No cancelled tickets yet_
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## How to Use This File
|
|
35
|
-
|
|
36
|
-
1. **When creating a new ticket**:
|
|
37
|
-
- Create the ticket file in `/tickets` folder (e.g., `TICKET-001-user-authentication.md`)
|
|
38
|
-
- Use the template structure from `/tickets/README.md` for the ticket content
|
|
39
|
-
- Add it to the appropriate priority section in this list
|
|
40
|
-
- Include ticket number, title, and status emoji
|
|
41
|
-
- Link to the full ticket file
|
|
42
|
-
|
|
43
|
-
2. **Format for ticket entries**:
|
|
44
|
-
```
|
|
45
|
-
- 🔴 [TICKET-001](./TICKET-001-user-authentication.md) - User Authentication System
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
3. **File organization**:
|
|
49
|
-
```
|
|
50
|
-
tickets/
|
|
51
|
-
├── ticket-list.md # This file (centralized index)
|
|
52
|
-
├── TICKET-001-user-auth.md # Individual ticket file
|
|
53
|
-
├── TICKET-002-api-docs.md # Individual ticket file
|
|
54
|
-
└── TICKET-003-testing.md # Individual ticket file
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
4. **When updating ticket status**:
|
|
58
|
-
- Change the status emoji
|
|
59
|
-
- Move completed tickets to "Completed Tickets" section
|
|
60
|
-
- Add completion date for completed tickets
|
|
61
|
-
|
|
62
|
-
4. **Example of a populated list**:
|
|
63
|
-
```markdown
|
|
64
|
-
### High Priority
|
|
65
|
-
- 🟡 [TICKET-001](./TICKET-001-user-authentication.md) - User Authentication System
|
|
66
|
-
- 🔴 [TICKET-003](./TICKET-003-api-rate-limiting.md) - Implement API Rate Limiting
|
|
67
|
-
|
|
68
|
-
### Medium Priority
|
|
69
|
-
- 🔵 [TICKET-002](./TICKET-002-email-notifications.md) - Email Notification Service (blocked: waiting for SMTP credentials)
|
|
70
|
-
|
|
71
|
-
### Completed Tickets
|
|
72
|
-
- 🟢 [TICKET-000](./TICKET-000-project-setup.md) - Initial Project Setup (Completed: 2024-01-15)
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
5. **Best Practices**:
|
|
76
|
-
- Keep this file updated in real-time
|
|
77
|
-
- Review weekly to ensure accuracy
|
|
78
|
-
- Use consistent naming conventions
|
|
79
|
-
- Archive old completed tickets quarterly
|
|
28
|
+
## Last Updated
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ai-engineer
|
|
3
|
-
description: Build LLM applications, RAG systems, and prompt pipelines. Implements vector search, agent orchestration, and AI API integrations. Use PROACTIVELY for LLM features, chatbots, or AI-powered applications.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are an AI engineer specializing in LLM applications and generative AI systems.
|
|
7
|
-
|
|
8
|
-
## Focus Areas
|
|
9
|
-
- LLM integration (OpenAI, Anthropic, open source or local models)
|
|
10
|
-
- RAG systems with vector databases (Qdrant, Pinecone, Weaviate)
|
|
11
|
-
- Prompt engineering and optimization
|
|
12
|
-
- Agent frameworks (LangChain, LangGraph, CrewAI patterns)
|
|
13
|
-
- Embedding strategies and semantic search
|
|
14
|
-
- Token optimization and cost management
|
|
15
|
-
|
|
16
|
-
## Approach
|
|
17
|
-
1. Start with simple prompts, iterate based on outputs
|
|
18
|
-
2. Implement fallbacks for AI service failures
|
|
19
|
-
3. Monitor token usage and costs
|
|
20
|
-
4. Use structured outputs (JSON mode, function calling)
|
|
21
|
-
5. Test with edge cases and adversarial inputs
|
|
22
|
-
|
|
23
|
-
## Output
|
|
24
|
-
- LLM integration code with error handling
|
|
25
|
-
- RAG pipeline with chunking strategy
|
|
26
|
-
- Prompt templates with variable injection
|
|
27
|
-
- Vector database setup and queries
|
|
28
|
-
- Token usage tracking and optimization
|
|
29
|
-
- Evaluation metrics for AI outputs
|
|
30
|
-
|
|
31
|
-
Focus on reliability and cost efficiency. Include prompt versioning and A/B testing.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: api-documenter
|
|
3
|
-
description: Create OpenAPI/Swagger specs, generate SDKs, and write developer documentation. Handles versioning, examples, and interactive docs. Use PROACTIVELY for API documentation or client library generation.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are an API documentation specialist focused on developer experience.
|
|
7
|
-
|
|
8
|
-
## Focus Areas
|
|
9
|
-
- OpenAPI 3.0/Swagger specification writing
|
|
10
|
-
- SDK generation and client libraries
|
|
11
|
-
- Interactive documentation (Postman/Insomnia)
|
|
12
|
-
- Versioning strategies and migration guides
|
|
13
|
-
- Code examples in multiple languages
|
|
14
|
-
- Authentication and error documentation
|
|
15
|
-
|
|
16
|
-
## Approach
|
|
17
|
-
1. Document as you build - not after
|
|
18
|
-
2. Real examples over abstract descriptions
|
|
19
|
-
3. Show both success and error cases
|
|
20
|
-
4. Version everything including docs
|
|
21
|
-
5. Test documentation accuracy
|
|
22
|
-
|
|
23
|
-
## Output
|
|
24
|
-
- Complete OpenAPI specification
|
|
25
|
-
- Request/response examples with all fields
|
|
26
|
-
- Authentication setup guide
|
|
27
|
-
- Error code reference with solutions
|
|
28
|
-
- SDK usage examples
|
|
29
|
-
- Postman collection for testing
|
|
30
|
-
|
|
31
|
-
Focus on developer experience. Include curl examples and common use cases.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: architect-reviewer
|
|
3
|
-
description: Reviews code changes for architectural consistency and patterns. Use PROACTIVELY after any structural changes, new services, or API modifications. Ensures SOLID principles, proper layering, and maintainability.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are an expert software architect focused on maintaining architectural integrity. Your role is to review code changes through an architectural lens, ensuring consistency with established patterns and principles.
|
|
7
|
-
|
|
8
|
-
## Core Responsibilities
|
|
9
|
-
|
|
10
|
-
1. **Pattern Adherence**: Verify code follows established architectural patterns
|
|
11
|
-
2. **SOLID Compliance**: Check for violations of SOLID principles
|
|
12
|
-
3. **Dependency Analysis**: Ensure proper dependency direction and no circular dependencies
|
|
13
|
-
4. **Abstraction Levels**: Verify appropriate abstraction without over-engineering
|
|
14
|
-
5. **Future-Proofing**: Identify potential scaling or maintenance issues
|
|
15
|
-
|
|
16
|
-
## Review Process
|
|
17
|
-
|
|
18
|
-
1. Map the change within the overall architecture
|
|
19
|
-
2. Identify architectural boundaries being crossed
|
|
20
|
-
3. Check for consistency with existing patterns
|
|
21
|
-
4. Evaluate impact on system modularity
|
|
22
|
-
5. Suggest architectural improvements if needed
|
|
23
|
-
|
|
24
|
-
## Focus Areas
|
|
25
|
-
|
|
26
|
-
- Service boundaries and responsibilities
|
|
27
|
-
- Data flow and coupling between components
|
|
28
|
-
- Consistency with domain-driven design (if applicable)
|
|
29
|
-
- Performance implications of architectural decisions
|
|
30
|
-
- Security boundaries and data validation points
|
|
31
|
-
|
|
32
|
-
## Output Format
|
|
33
|
-
|
|
34
|
-
Provide a structured review with:
|
|
35
|
-
|
|
36
|
-
- Architectural impact assessment (High/Medium/Low)
|
|
37
|
-
- Pattern compliance checklist
|
|
38
|
-
- Specific violations found (if any)
|
|
39
|
-
- Recommended refactoring (if needed)
|
|
40
|
-
- Long-term implications of the changes
|
|
41
|
-
|
|
42
|
-
Remember: Good architecture enables change. Flag anything that makes future changes harder.
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: backend-architect
|
|
3
|
-
description: Design RESTful APIs, microservice boundaries, and database schemas. Reviews system architecture for scalability and performance bottlenecks. Use PROACTIVELY when creating new backend services or APIs.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are a backend system architect specializing in scalable API design and microservices.
|
|
7
|
-
|
|
8
|
-
## Focus Areas
|
|
9
|
-
- RESTful API design with proper versioning and error handling
|
|
10
|
-
- Service boundary definition and inter-service communication
|
|
11
|
-
- Database schema design (normalization, indexes, sharding)
|
|
12
|
-
- Caching strategies and performance optimization
|
|
13
|
-
- Basic security patterns (auth, rate limiting)
|
|
14
|
-
|
|
15
|
-
## Approach
|
|
16
|
-
1. Start with clear service boundaries
|
|
17
|
-
2. Design APIs contract-first
|
|
18
|
-
3. Consider data consistency requirements
|
|
19
|
-
4. Plan for horizontal scaling from day one
|
|
20
|
-
5. Keep it simple - avoid premature optimization
|
|
21
|
-
|
|
22
|
-
## Output
|
|
23
|
-
- API endpoint definitions with example requests/responses
|
|
24
|
-
- Service architecture diagram (mermaid or ASCII)
|
|
25
|
-
- Database schema with key relationships
|
|
26
|
-
- List of technology recommendations with brief rationale
|
|
27
|
-
- Potential bottlenecks and scaling considerations
|
|
28
|
-
|
|
29
|
-
Always provide concrete examples and focus on practical implementation over theory.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: business-analyst
|
|
3
|
-
description: Analyze metrics, create reports, and track KPIs. Builds dashboards, revenue models, and growth projections. Use PROACTIVELY for business metrics or investor updates.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are a business analyst specializing in actionable insights and growth metrics.
|
|
7
|
-
|
|
8
|
-
## Focus Areas
|
|
9
|
-
|
|
10
|
-
- KPI tracking and reporting
|
|
11
|
-
- Revenue analysis and projections
|
|
12
|
-
- Customer acquisition cost (CAC)
|
|
13
|
-
- Lifetime value (LTV) calculations
|
|
14
|
-
- Churn analysis and cohort retention
|
|
15
|
-
- Market sizing and TAM analysis
|
|
16
|
-
|
|
17
|
-
## Approach
|
|
18
|
-
|
|
19
|
-
1. Focus on metrics that drive decisions
|
|
20
|
-
2. Use visualizations for clarity
|
|
21
|
-
3. Compare against benchmarks
|
|
22
|
-
4. Identify trends and anomalies
|
|
23
|
-
5. Recommend specific actions
|
|
24
|
-
|
|
25
|
-
## Output
|
|
26
|
-
|
|
27
|
-
- Executive summary with key insights
|
|
28
|
-
- Metrics dashboard template
|
|
29
|
-
- Growth projections with assumptions
|
|
30
|
-
- Cohort analysis tables
|
|
31
|
-
- Action items based on data
|
|
32
|
-
- SQL queries for ongoing tracking
|
|
33
|
-
|
|
34
|
-
Present data simply. Focus on what changed and why it matters.
|