Skip to content
This repository was archived by the owner on Mar 21, 2026. It is now read-only.

Commit 48ce566

Browse files
Merge pull request #9 from PromptExecution/copilot/sub-pr-7-again
Refactor duplicated task creation instructions in ralph.sh
2 parents 44b0852 + 07d3f06 commit 48ce566

1 file changed

Lines changed: 19 additions & 26 deletions

File tree

ralph.sh

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,23 @@ error() {
3737
exit 1
3838
}
3939

40+
# Display instructions for creating TaskMaster tasks
41+
show_task_creation_instructions() {
42+
echo ""
43+
echo "To create tasks with the prd skill, run your designated agent with this prompt:"
44+
echo ""
45+
cat <<'EOF'
46+
Use the prd skill to generate TaskMaster tasks.json for this repo.
47+
Requirements:
48+
- Output must be TaskMaster format with tasks[] and metadata.
49+
- Include 3-7 small, actionable tasks with acceptance criteria.
50+
- Use IETF 2119 MUST/SHOULD/MAY in acceptance criteria.
51+
- Set metadata.project and metadata.branchName appropriately.
52+
EOF
53+
echo ""
54+
echo "Then re-run: ./ralph.sh --agent <amp|claude|codex> [max_iterations]"
55+
}
56+
4057
# 1. Find git repository root
4158
find_git_root() {
4259
local dir="$PWD"
@@ -123,19 +140,7 @@ PY
123140
TASKS_FILE="$TASKMASTER_DIR/tasks/tasks.json"
124141
if [[ ! -f "$TASKS_FILE" ]]; then
125142
warn "TaskMaster tasks.json not found; nothing to do."
126-
echo ""
127-
echo "To create tasks with the prd skill, run your designated agent with this prompt:"
128-
echo ""
129-
cat <<'EOF'
130-
Use the prd skill to generate TaskMaster tasks.json for this repo.
131-
Requirements:
132-
- Output must be TaskMaster format with tasks[] and metadata.
133-
- Include 3-7 small, actionable tasks with acceptance criteria.
134-
- Use IETF 2119 MUST/SHOULD/MAY in acceptance criteria.
135-
- Set metadata.project and metadata.branchName appropriately.
136-
EOF
137-
echo ""
138-
echo "Then re-run: ./ralph.sh --agent <amp|claude|codex> [max_iterations]"
143+
show_task_creation_instructions
139144
exit 1
140145
fi
141146

@@ -156,19 +161,7 @@ PY
156161
TASKS_CHECK_EXIT=$?
157162
if [[ $TASKS_CHECK_EXIT -ne 0 ]]; then
158163
warn "TaskMaster tasks.json is empty or invalid; nothing to do."
159-
echo ""
160-
echo "To create tasks with the prd skill, run your designated agent with this prompt:"
161-
echo ""
162-
cat <<'EOF'
163-
Use the prd skill to generate TaskMaster tasks.json for this repo.
164-
Requirements:
165-
- Output must be TaskMaster format with tasks[] and metadata.
166-
- Include 3-7 small, actionable tasks with acceptance criteria.
167-
- Use IETF 2119 MUST/SHOULD/MAY in acceptance criteria.
168-
- Set metadata.project and metadata.branchName appropriately.
169-
EOF
170-
echo ""
171-
echo "Then re-run: ./ralph.sh --agent <amp|claude|codex> [max_iterations]"
164+
show_task_creation_instructions
172165
exit 1
173166
fi
174167

0 commit comments

Comments
 (0)