ralph-teams 1.0.32 → 1.0.35
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/.claude/agents/builder.md +2 -1
- package/.codex/agents/builder.toml +2 -1
- package/.github/agents/builder.agent.md +2 -1
- package/.opencode/agents/builder.md +2 -1
- package/README.md +14 -18
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/package.json +1 -1
- package/prompts/agents/builder.md +2 -1
- package/prompts/team-lead-policy.md +6 -1
- package/prompts/team-lead-runtime.md +9 -1
- package/ralph.sh +183 -57
|
@@ -21,7 +21,7 @@ You are the hands. You implement. You do NOT choose overall scope or verify your
|
|
|
21
21
|
3. **Understand the task** — Read the acceptance criteria or validation findings, the requested scope, and any retry feedback.
|
|
22
22
|
4. **Create or update automated tests first when they should change** — If planning context includes test work, implement those tests. If no planning context exists and the scope is new behavior, work TDD-style: define the automated tests first, confirm they fail on the current code, then proceed.
|
|
23
23
|
5. **Implement** — Write clean, minimal code that satisfies the assigned scope and makes the relevant tests pass.
|
|
24
|
-
6. **
|
|
24
|
+
6. **Use the Team Lead's setup commands when provided, then run quality checks** — If the Team Lead already provided bootstrap, build, or test commands, follow those exact commands first and do not rediscover them unless they fail. Otherwise determine the setup, build, and test commands from repo instructions and manifests. Check `AGENTS.md`, `README*`, and contributor docs first. Prefer repo-defined scripts or task runners over ecosystem defaults, then run the relevant verification commands for the assigned scope. Fix issues before committing.
|
|
25
25
|
7. **Commit** — Use a conventional commit message that matches the assigned scope.
|
|
26
26
|
8. **Get the commit SHA** — After committing, run `git rev-parse HEAD` to get the full commit SHA.
|
|
27
27
|
9. **Report back** — Return the exact commit SHA and a concise summary so validators can inspect exactly what changed.
|
|
@@ -58,6 +58,7 @@ If the Team Lead reassigns the scope with validator feedback:
|
|
|
58
58
|
- Keep changes minimal and focused on the acceptance criteria or findings.
|
|
59
59
|
- Do NOT gold-plate.
|
|
60
60
|
- Treat automated coverage as part of the assignment, not optional cleanup. Do not finish with zero new or updated tests unless the Team Lead explicitly said coverage is already sufficient or you can point to a concrete repository-based reason automated coverage is not possible.
|
|
61
|
+
- If the Team Lead gives exact bootstrap, build, or test commands, use them instead of re-probing the repository with generic commands. Only fall back to fresh command discovery if the provided commands fail or are clearly incomplete.
|
|
61
62
|
- Infer project commands from the repository before running them. Check `AGENTS.md`, `README*`, and repo instructions first, prefer repo-defined scripts and task runners, and only use generic ecosystem defaults when the repo is unambiguous.
|
|
62
63
|
- Do not validate your own work against the acceptance criteria beyond normal sanity checks. A separate validator may do that.
|
|
63
64
|
- Do NOT skip quality checks.
|
|
@@ -18,7 +18,7 @@ You are the hands. You implement. You do NOT choose overall scope or verify your
|
|
|
18
18
|
3. **Understand the task** — Read the acceptance criteria or validation findings, the requested scope, and any retry feedback.
|
|
19
19
|
4. **Create or update automated tests first when they should change** — If planning context includes test work, implement those tests. If no planning context exists and the scope is new behavior, work TDD-style: define the automated tests first, confirm they fail on the current code, then proceed.
|
|
20
20
|
5. **Implement** — Write clean, minimal code that satisfies the assigned scope and makes the relevant tests pass.
|
|
21
|
-
6. **
|
|
21
|
+
6. **Use the Team Lead's setup commands when provided, then run quality checks** — If the Team Lead already provided bootstrap, build, or test commands, follow those exact commands first and do not rediscover them unless they fail. Otherwise determine the setup, build, and test commands from repo instructions and manifests. Check `AGENTS.md`, `README*`, and contributor docs first. Prefer repo-defined scripts or task runners over ecosystem defaults, then run the relevant verification commands for the assigned scope. Fix issues before committing.
|
|
22
22
|
7. **Commit** — Use a conventional commit message that matches the assigned scope.
|
|
23
23
|
8. **Get the commit SHA** — After committing, run `git rev-parse HEAD` to get the full commit SHA.
|
|
24
24
|
9. **Report back** — Return the exact commit SHA and a concise summary so validators can inspect exactly what changed.
|
|
@@ -55,6 +55,7 @@ If the Team Lead reassigns the scope with validator feedback:
|
|
|
55
55
|
- Keep changes minimal and focused on the acceptance criteria or findings.
|
|
56
56
|
- Do NOT gold-plate.
|
|
57
57
|
- Treat automated coverage as part of the assignment, not optional cleanup. Do not finish with zero new or updated tests unless the Team Lead explicitly said coverage is already sufficient or you can point to a concrete repository-based reason automated coverage is not possible.
|
|
58
|
+
- If the Team Lead gives exact bootstrap, build, or test commands, use them instead of re-probing the repository with generic commands. Only fall back to fresh command discovery if the provided commands fail or are clearly incomplete.
|
|
58
59
|
- Infer project commands from the repository before running them. Check `AGENTS.md`, `README*`, and repo instructions first, prefer repo-defined scripts and task runners, and only use generic ecosystem defaults when the repo is unambiguous.
|
|
59
60
|
- Do not validate your own work against the acceptance criteria beyond normal sanity checks. A separate validator may do that.
|
|
60
61
|
- Do NOT skip quality checks.
|
|
@@ -21,7 +21,7 @@ You are the hands. You implement. You do NOT choose overall scope or verify your
|
|
|
21
21
|
3. **Understand the task** — Read the acceptance criteria or validation findings, the requested scope, and any retry feedback.
|
|
22
22
|
4. **Create or update automated tests first when they should change** — If planning context includes test work, implement those tests. If no planning context exists and the scope is new behavior, work TDD-style: define the automated tests first, confirm they fail on the current code, then proceed.
|
|
23
23
|
5. **Implement** — Write clean, minimal code that satisfies the assigned scope and makes the relevant tests pass.
|
|
24
|
-
6. **
|
|
24
|
+
6. **Use the Team Lead's setup commands when provided, then run quality checks** — If the Team Lead already provided bootstrap, build, or test commands, follow those exact commands first and do not rediscover them unless they fail. Otherwise determine the setup, build, and test commands from repo instructions and manifests. Check `AGENTS.md`, `README*`, and contributor docs first. Prefer repo-defined scripts or task runners over ecosystem defaults, then run the relevant verification commands for the assigned scope. Fix issues before committing.
|
|
25
25
|
7. **Commit** — Use a conventional commit message that matches the assigned scope.
|
|
26
26
|
8. **Get the commit SHA** — After committing, run `git rev-parse HEAD` to get the full commit SHA.
|
|
27
27
|
9. **Report back** — Return the exact commit SHA and a concise summary so validators can inspect exactly what changed.
|
|
@@ -58,6 +58,7 @@ If the Team Lead reassigns the scope with validator feedback:
|
|
|
58
58
|
- Keep changes minimal and focused on the acceptance criteria or findings.
|
|
59
59
|
- Do NOT gold-plate.
|
|
60
60
|
- Treat automated coverage as part of the assignment, not optional cleanup. Do not finish with zero new or updated tests unless the Team Lead explicitly said coverage is already sufficient or you can point to a concrete repository-based reason automated coverage is not possible.
|
|
61
|
+
- If the Team Lead gives exact bootstrap, build, or test commands, use them instead of re-probing the repository with generic commands. Only fall back to fresh command discovery if the provided commands fail or are clearly incomplete.
|
|
61
62
|
- Infer project commands from the repository before running them. Check `AGENTS.md`, `README*`, and repo instructions first, prefer repo-defined scripts and task runners, and only use generic ecosystem defaults when the repo is unambiguous.
|
|
62
63
|
- Do not validate your own work against the acceptance criteria beyond normal sanity checks. A separate validator may do that.
|
|
63
64
|
- Do NOT skip quality checks.
|
|
@@ -21,7 +21,7 @@ You are the hands. You implement. You do NOT choose overall scope or verify your
|
|
|
21
21
|
3. **Understand the task** — Read the acceptance criteria or validation findings, the requested scope, and any retry feedback.
|
|
22
22
|
4. **Create or update automated tests first when they should change** — If planning context includes test work, implement those tests. If no planning context exists and the scope is new behavior, work TDD-style: define the automated tests first, confirm they fail on the current code, then proceed.
|
|
23
23
|
5. **Implement** — Write clean, minimal code that satisfies the assigned scope and makes the relevant tests pass.
|
|
24
|
-
6. **
|
|
24
|
+
6. **Use the Team Lead's setup commands when provided, then run quality checks** — If the Team Lead already provided bootstrap, build, or test commands, follow those exact commands first and do not rediscover them unless they fail. Otherwise determine the setup, build, and test commands from repo instructions and manifests. Check `AGENTS.md`, `README*`, and contributor docs first. Prefer repo-defined scripts or task runners over ecosystem defaults, then run the relevant verification commands for the assigned scope. Fix issues before committing.
|
|
25
25
|
7. **Commit** — Use a conventional commit message that matches the assigned scope.
|
|
26
26
|
8. **Get the commit SHA** — After committing, run `git rev-parse HEAD` to get the full commit SHA.
|
|
27
27
|
9. **Report back** — Return the exact commit SHA and a concise summary so validators can inspect exactly what changed.
|
|
@@ -58,6 +58,7 @@ If the Team Lead reassigns the scope with validator feedback:
|
|
|
58
58
|
- Keep changes minimal and focused on the acceptance criteria or findings.
|
|
59
59
|
- Do NOT gold-plate.
|
|
60
60
|
- Treat automated coverage as part of the assignment, not optional cleanup. Do not finish with zero new or updated tests unless the Team Lead explicitly said coverage is already sufficient or you can point to a concrete repository-based reason automated coverage is not possible.
|
|
61
|
+
- If the Team Lead gives exact bootstrap, build, or test commands, use them instead of re-probing the repository with generic commands. Only fall back to fresh command discovery if the provided commands fail or are clearly incomplete.
|
|
61
62
|
- Infer project commands from the repository before running them. Check `AGENTS.md`, `README*`, and repo instructions first, prefer repo-defined scripts and task runners, and only use generic ecosystem defaults when the repo is unambiguous.
|
|
62
63
|
- Do not validate your own work against the acceptance criteria beyond normal sanity checks. A separate validator may do that.
|
|
63
64
|
- Do NOT skip quality checks.
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ The default `balanced` mode is intentionally simple:
|
|
|
24
24
|
- it spawns one Builder per story attempt
|
|
25
25
|
- it validates inline or spawns a validator when independent verification is needed
|
|
26
26
|
- it works through the user stories sequentially until the epic is done
|
|
27
|
-
- Ralph then moves to the next epic
|
|
27
|
+
- Ralph then moves to the next epic until all epics are done
|
|
28
28
|
|
|
29
29
|
## Quickest Start
|
|
30
30
|
|
|
@@ -44,9 +44,9 @@ This diagram shows the default `balanced` workflow only.
|
|
|
44
44
|
|
|
45
45
|
```mermaid
|
|
46
46
|
flowchart TD
|
|
47
|
-
A[Start run] --> B[Validate PRD and create loop branch]
|
|
47
|
+
A[Start run] --> B[Validate PRD and create loop branch plus loop worktree]
|
|
48
48
|
B --> C[Pick ready epic]
|
|
49
|
-
C --> D[Create worktree and run-scoped epic branch]
|
|
49
|
+
C --> D[Create epic worktree and run-scoped epic branch]
|
|
50
50
|
D --> E[Team Lead decides on epic planner]
|
|
51
51
|
E --> F[Team Lead runs stories with builder]
|
|
52
52
|
F --> G{Epic validator needed?}
|
|
@@ -58,12 +58,7 @@ flowchart TD
|
|
|
58
58
|
J --> K[If needed, fallback merge recovery handles leftovers]
|
|
59
59
|
K --> L{More epics?}
|
|
60
60
|
L -->|Yes| C
|
|
61
|
-
L -->|No|
|
|
62
|
-
M -->|No| P[Finish]
|
|
63
|
-
M -->|Yes| N[Run final validator]
|
|
64
|
-
N -->|PASS| P
|
|
65
|
-
N -->|FAIL and retries left| O[Builder fixes final-validation findings]
|
|
66
|
-
O --> N
|
|
61
|
+
L -->|No| P[Finish]
|
|
67
62
|
```
|
|
68
63
|
|
|
69
64
|
Other presets:
|
|
@@ -79,8 +74,8 @@ At a high level:
|
|
|
79
74
|
- `ralph.config.yml` controls backend choice, workflow toggles, parallelism, timeouts, and model selection.
|
|
80
75
|
|
|
81
76
|
Workflow presets:
|
|
82
|
-
- `balanced`: epic planning enabled, heuristic epic validation enabled
|
|
83
|
-
- `full`: `balanced`, plus story planning
|
|
77
|
+
- `balanced`: epic planning enabled, heuristic epic validation enabled (no final validation)
|
|
78
|
+
- `full`: `balanced`, plus story planning, heuristic story validation, and final validation
|
|
84
79
|
- `minimal`: planning and validation toggles disabled; no planner or validator subagents are spawned
|
|
85
80
|
|
|
86
81
|
Default agent model assignments:
|
|
@@ -209,8 +204,8 @@ Prompts for:
|
|
|
209
204
|
- Agent model overrides (optional)
|
|
210
205
|
|
|
211
206
|
Workflow presets:
|
|
212
|
-
- `balanced`: epic planning enabled, heuristic epic validation enabled
|
|
213
|
-
- `full`: `balanced`, plus story planning
|
|
207
|
+
- `balanced`: epic planning enabled, heuristic epic validation enabled (no final validation)
|
|
208
|
+
- `full`: `balanced`, plus story planning, heuristic story validation, and final validation
|
|
214
209
|
- `minimal`: planning and validation toggles disabled; no planner or validator subagents are spawned
|
|
215
210
|
|
|
216
211
|
Preset behavior notes:
|
|
@@ -538,12 +533,13 @@ During a run, Ralph writes:
|
|
|
538
533
|
- `.ralph-teams/state/merge-EPIC-xxx.json`: per-epic merge-result artifact written by the Team Lead or merge recovery path
|
|
539
534
|
- `.ralph-teams/plans/plan-EPIC-xxx.md`: epic-planner output for an epic
|
|
540
535
|
- planned epics are expected to use these files as their implementation contract
|
|
536
|
+
- `.ralph-teams/logs/loop-<timestamp>.log`: outer `ralph-teams run` orchestration log mirroring terminal output
|
|
541
537
|
- `.ralph-teams/logs/epic-EPIC-xxx-<timestamp>.log`: raw backend session log
|
|
542
538
|
- `.ralph-teams/ralph-state.json`: saved interrupt/resume state
|
|
543
539
|
|
|
544
540
|
Ralph also updates the original `prd.json` in place as epic status changes.
|
|
545
541
|
|
|
546
|
-
The team lead agent log for each epic
|
|
542
|
+
The outer run log and the team lead agent log for each epic are written to `.ralph-teams/logs/` regardless of backend.
|
|
547
543
|
|
|
548
544
|
## Runtime Rules
|
|
549
545
|
|
|
@@ -553,9 +549,9 @@ The current execution contract is:
|
|
|
553
549
|
- blocked epics are skipped until dependencies are complete
|
|
554
550
|
- runs sequentially by default
|
|
555
551
|
- experimental wave parallelism is enabled only with `--parallel <n>`
|
|
556
|
-
- at run start Ralph auto-commits any dirty worktree changes, then creates a fresh loop branch
|
|
552
|
+
- at run start Ralph auto-commits any dirty source-worktree changes, then creates a fresh loop branch and checks it out in `.ralph-teams/.worktrees/loop`
|
|
557
553
|
- each epic gets its own worktree and a run-scoped branch rooted from that loop branch, using `ralph/epic/<loop-run>/<epic-id>`
|
|
558
|
-
- before the Team Lead starts, Ralph creates the worktree and
|
|
554
|
+
- before the Team Lead starts, Ralph creates the worktree and expects the Team Lead to establish that epic worktree's setup once, then hand the exact bootstrap, build, and test commands to Builders
|
|
559
555
|
- agents are expected to prefer repo-defined scripts and docs over generic ecosystem defaults when choosing setup and verification commands
|
|
560
556
|
- the shell-built Team Lead prompt must keep literal filenames shell-safe; do not add raw Markdown backticks inside that Bash string because Bash will treat them as command substitution
|
|
561
557
|
- when an epic completes successfully, the Team Lead is expected to merge its epic branch back into the loop branch and write the merge-result artifact
|
|
@@ -638,9 +634,9 @@ Install or relink the package so the bundled JSON CLI is on your `PATH`:
|
|
|
638
634
|
npm install -g ralph-teams
|
|
639
635
|
```
|
|
640
636
|
|
|
641
|
-
### Ralph needs
|
|
637
|
+
### Ralph needs a clean base commit before creating the loop worktree
|
|
642
638
|
|
|
643
|
-
Ralph auto-commits current changes before creating
|
|
639
|
+
Ralph auto-commits current source-worktree changes before creating the loop branch and loop worktree. If you do not want that commit, clean up the worktree yourself before starting the run.
|
|
644
640
|
|
|
645
641
|
## Development
|
|
646
642
|
|
package/dist/config.js
CHANGED
|
@@ -82,7 +82,7 @@ function presetExecution(preset) {
|
|
|
82
82
|
storyValidation: { enabled: false, maxFixCycles: 1 },
|
|
83
83
|
epicPlanning: { enabled: true },
|
|
84
84
|
epicValidation: { enabled: true, maxFixCycles: 1 },
|
|
85
|
-
finalValidation: { enabled:
|
|
85
|
+
finalValidation: { enabled: false, maxFixCycles: 1 },
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
}
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsLA,4CAEC;AAED,sEAoBC;AAOD,wCAoOC;AAED,gCA6BC;AAED,8CAkBC;AAED,0EA+DC;AA7iBD,uCAAyB;AACzB,2CAA6B;AAC7B,8CAAgC;AAkEhC,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAE/D,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7C,CAAC;AAED,SAAS,eAAe,CAAC,MAAsB;IAC7C,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,MAAM;YACT,OAAO;gBACL,QAAQ,EAAE,CAAC;gBACX,OAAO,EAAE,QAAQ;gBAC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;QACjC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QAC1B,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,CAAC,WAAW,KAAK,SAAS,IAAI,OAAO,QAAQ,CAAC,SAAS,CAAC,KAAK,QAAQ,EAAE,CAAC;QAClF,QAAQ,CAAC,WAAW,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,QAAQ,CAAC,cAAc,KAAK,SAAS,IAAI,OAAO,QAAQ,CAAC,WAAW,CAAC,KAAK,QAAQ,EAAE,CAAC;QACvF,QAAQ,CAAC,cAAc,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@ You are the hands. You implement. You do NOT choose overall scope or verify your
|
|
|
19
19
|
3. **Understand the task** — Read the acceptance criteria or validation findings, the requested scope, and any retry feedback.
|
|
20
20
|
4. **Create or update automated tests first when they should change** — If planning context includes test work, implement those tests. If no planning context exists and the scope is new behavior, work TDD-style: define the automated tests first, confirm they fail on the current code, then proceed.
|
|
21
21
|
5. **Implement** — Write clean, minimal code that satisfies the assigned scope and makes the relevant tests pass.
|
|
22
|
-
6. **
|
|
22
|
+
6. **Use the Team Lead's setup commands when provided, then run quality checks** — If the Team Lead already provided bootstrap, build, or test commands, follow those exact commands first and do not rediscover them unless they fail. Otherwise determine the setup, build, and test commands from repo instructions and manifests. Check `AGENTS.md`, `README*`, and contributor docs first. Prefer repo-defined scripts or task runners over ecosystem defaults, then run the relevant verification commands for the assigned scope. Fix issues before committing.
|
|
23
23
|
7. **Commit** — Use a conventional commit message that matches the assigned scope.
|
|
24
24
|
8. **Get the commit SHA** — After committing, run `git rev-parse HEAD` to get the full commit SHA.
|
|
25
25
|
9. **Report back** — Return the exact commit SHA and a concise summary so validators can inspect exactly what changed.
|
|
@@ -56,6 +56,7 @@ If the Team Lead reassigns the scope with validator feedback:
|
|
|
56
56
|
- Keep changes minimal and focused on the acceptance criteria or findings.
|
|
57
57
|
- Do NOT gold-plate.
|
|
58
58
|
- Treat automated coverage as part of the assignment, not optional cleanup. Do not finish with zero new or updated tests unless the Team Lead explicitly said coverage is already sufficient or you can point to a concrete repository-based reason automated coverage is not possible.
|
|
59
|
+
- If the Team Lead gives exact bootstrap, build, or test commands, use them instead of re-probing the repository with generic commands. Only fall back to fresh command discovery if the provided commands fail or are clearly incomplete.
|
|
59
60
|
- Infer project commands from the repository before running them. Check `AGENTS.md`, `README*`, and repo instructions first, prefer repo-defined scripts and task runners, and only use generic ecosystem defaults when the repo is unambiguous.
|
|
60
61
|
- Do not validate your own work against the acceptance criteria beyond normal sanity checks. A separate validator may do that.
|
|
61
62
|
- Do NOT skip quality checks.
|
|
@@ -20,6 +20,10 @@ You coordinate epic execution. For clearly easy, low-risk mechanical tasks, you
|
|
|
20
20
|
- Start with repository instructions: `AGENTS.md`, `README*`, contributor docs, and any project-local guidance files referenced there. Then prefer repository-defined task runners and scripts over language defaults: `Makefile`, `justfile`, `Taskfile.yml`, package scripts, wrapper scripts, or documented commands.
|
|
21
21
|
- Then inspect ecosystem manifests such as `package.json`, `pyproject.toml`, `requirements.txt`, `Cargo.toml`, `go.mod`, `Gemfile`, `pom.xml`, `build.gradle*`, `mix.exs`, `Dockerfile`, and `docker-compose*.yml`.
|
|
22
22
|
- Prefer explicit repository commands over generic ecosystem defaults even when the language is obvious.
|
|
23
|
+
- Before the first Builder for an epic, prepare the epic worktree environment once. Do not make each Builder rediscover basic setup from scratch.
|
|
24
|
+
- Start by checking whether the source checkout path provided in the runtime prompt already contains reusable dependency or generated setup artifacts that the epic worktree can safely reuse.
|
|
25
|
+
- If safe reuse is possible, materialize that reuse inside the epic worktree and continue. If reuse is not possible, run the repository's native bootstrap or install command inside the epic worktree before delegating implementation.
|
|
26
|
+
- Once the bootstrap, build, and test commands are established, pass the exact commands and any required environment-prep steps to every Builder for that epic.
|
|
23
27
|
- Only use generic defaults when the repository is unambiguous.
|
|
24
28
|
- If setup or verification remains ambiguous after inspection, do not guess wildly. Mark the attempt failed with a short concrete reason describing the ambiguity.
|
|
25
29
|
|
|
@@ -47,7 +51,8 @@ You coordinate epic execution. For clearly easy, low-risk mechanical tasks, you
|
|
|
47
51
|
|
|
48
52
|
- Before starting a story, check the epic state file. If the story has `passes: true`, skip it.
|
|
49
53
|
- For clearly easy, low-risk mechanical stories, you may implement directly in the Team Lead session when delegation overhead would exceed the work. Keep the change narrowly scoped and still run the required verification yourself before counting the story complete.
|
|
50
|
-
- Before delegating
|
|
54
|
+
- Before delegating the first story, ensure the epic worktree environment is actually runnable.
|
|
55
|
+
- Before delegating any story, pass the exact bootstrap, build, and test commands already established for this epic to the Builder.
|
|
51
56
|
- If an epic plan exists, give the Builder the story, acceptance criteria, relevant plan section, and especially the story's planned test design.
|
|
52
57
|
- If a story planner was used, give the Builder the story planner output too.
|
|
53
58
|
- Require the Builder to add or update automated tests for the story and make them pass before the story can count as complete.
|
|
@@ -7,12 +7,20 @@ You are the Team Lead for this epic. Read the epic below and execute it.
|
|
|
7
7
|
ALL work for this epic MUST happen in this directory: {{WORKTREE_ABS_PATH}}
|
|
8
8
|
Do NOT modify files outside this directory, except for the epic state file below and the final merge workflow paths listed later in this prompt.
|
|
9
9
|
|
|
10
|
+
## Source Checkout
|
|
11
|
+
- Source checkout path: {{SOURCE_ROOT_DIR}}
|
|
12
|
+
- You may inspect this source checkout read-only to understand repo-level setup and to reuse existing dependency or build artifacts when that is safer or faster than reinstalling inside the epic worktree.
|
|
13
|
+
- Do NOT modify the source checkout during normal implementation. Any reuse should materialize inside the epic worktree, for example by creating a symlink there or copying a cacheable artifact into the worktree.
|
|
14
|
+
|
|
10
15
|
## Project Setup Strategy
|
|
11
16
|
- Ralph does not preinstall dependencies or preselect build/test commands for this repo.
|
|
12
|
-
- Before delegating implementation,
|
|
17
|
+
- Before delegating implementation, establish the epic worktree environment once for this epic: determine the setup, build, and test commands, then make the worktree runnable before the first Builder starts.
|
|
13
18
|
- Check repo instructions first: 'AGENTS.md', 'README*', contributor docs, and project-local guidance files. Then check repo-defined task runners or scripts such as 'Makefile', 'justfile', 'Taskfile.yml', package scripts, wrapper scripts, or documented commands.
|
|
14
19
|
- Then inspect ecosystem manifests such as 'package.json', 'pyproject.toml', 'requirements.txt', 'Cargo.toml', 'go.mod', 'Gemfile', 'pom.xml', 'build.gradle*', 'mix.exs', 'Dockerfile', and 'docker-compose*.yml'.
|
|
15
20
|
- Prefer explicit repository commands over generic ecosystem defaults.
|
|
21
|
+
- If the epic worktree is missing dependencies or other generated setup artifacts, first check whether the source checkout already has reusable artifacts that can be safely reused from the worktree.
|
|
22
|
+
- Prefer safe reuse from the source checkout when the repository structure and lockfiles make that reuse trustworthy; otherwise run the repository's native bootstrap/install step inside the epic worktree.
|
|
23
|
+
- After you determine the correct bootstrap, build, and test commands, pass those exact commands to every Builder for this epic and tell Builders not to rediscover them unless the provided commands fail.
|
|
16
24
|
- Only fall back to generic defaults when the repository is unambiguous.
|
|
17
25
|
- If setup remains ambiguous after inspection, stop guessing and fail the story attempt with a short concrete reason describing what you found.
|
|
18
26
|
|
package/ralph.sh
CHANGED
|
@@ -331,15 +331,19 @@ if [ ! -f "$PRD_FILE" ]; then
|
|
|
331
331
|
exit 1
|
|
332
332
|
fi
|
|
333
333
|
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
SOURCE_ROOT_DIR="$(pwd)"
|
|
335
|
+
ROOT_DIR="$SOURCE_ROOT_DIR"
|
|
336
|
+
LOOP_ROOT_DIR=""
|
|
337
|
+
RALPH_RUNTIME_DIR="${SOURCE_ROOT_DIR}/${RALPH_RUNTIME_DIRNAME}"
|
|
336
338
|
PROGRESS_FILE="${RALPH_RUNTIME_DIR}/progress.txt"
|
|
337
339
|
PLANS_DIR="${RALPH_RUNTIME_DIR}/plans"
|
|
338
340
|
LOGS_DIR="${RALPH_RUNTIME_DIR}/logs"
|
|
339
341
|
STATE_DIR="${RALPH_RUNTIME_DIR}/state"
|
|
340
342
|
WORKTREES_DIR="${RALPH_RUNTIME_DIR}/.worktrees"
|
|
343
|
+
OUTER_LOOP_LOG=""
|
|
344
|
+
RALPH_VERSION="unknown"
|
|
341
345
|
|
|
342
|
-
|
|
346
|
+
repair_source_runtime_dir_if_needed() {
|
|
343
347
|
if [ -L "$RALPH_RUNTIME_DIR" ]; then
|
|
344
348
|
local runtime_link_target=""
|
|
345
349
|
runtime_link_target=$(readlink "$RALPH_RUNTIME_DIR" 2>/dev/null || true)
|
|
@@ -357,9 +361,39 @@ unstage_runtime_artifacts() {
|
|
|
357
361
|
git rm --cached -r --ignore-unmatch "$RALPH_RUNTIME_DIRNAME" >/dev/null 2>&1 || true
|
|
358
362
|
}
|
|
359
363
|
|
|
360
|
-
|
|
364
|
+
repair_source_runtime_dir_if_needed
|
|
361
365
|
mkdir -p "$RALPH_RUNTIME_DIR" "$PLANS_DIR" "$LOGS_DIR" "$STATE_DIR" "$WORKTREES_DIR"
|
|
362
366
|
|
|
367
|
+
enable_outer_loop_logging() {
|
|
368
|
+
if [ "${RALPH_OUTER_LOOP_LOGGING_ACTIVE:-0}" = "1" ]; then
|
|
369
|
+
return 0
|
|
370
|
+
fi
|
|
371
|
+
|
|
372
|
+
OUTER_LOOP_LOG="${LOGS_DIR}/loop-$(date +%s).log"
|
|
373
|
+
export RALPH_OUTER_LOOP_LOGGING_ACTIVE="1"
|
|
374
|
+
export RALPH_OUTER_LOOP_LOG="$OUTER_LOOP_LOG"
|
|
375
|
+
|
|
376
|
+
exec > >(tee -a "$OUTER_LOOP_LOG")
|
|
377
|
+
exec 2>&1
|
|
378
|
+
|
|
379
|
+
echo "Outer loop log: $OUTER_LOOP_LOG"
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
enable_outer_loop_logging
|
|
383
|
+
|
|
384
|
+
resolve_ralph_version() {
|
|
385
|
+
local package_json="${SCRIPT_DIR}/package.json"
|
|
386
|
+
|
|
387
|
+
if [ -f "$package_json" ] && command -v node >/dev/null 2>&1; then
|
|
388
|
+
node -p "try { require(process.argv[1]).version || 'unknown' } catch { 'unknown' }" "$package_json" 2>/dev/null || echo "unknown"
|
|
389
|
+
return 0
|
|
390
|
+
fi
|
|
391
|
+
|
|
392
|
+
echo "unknown"
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
RALPH_VERSION="$(resolve_ralph_version)"
|
|
396
|
+
|
|
363
397
|
ensure_runtime_rjq_bin() {
|
|
364
398
|
if [ "${RALPH_SKIP_RUNTIME_RJQ:-}" = "1" ]; then
|
|
365
399
|
RJQ_BIN=""
|
|
@@ -539,7 +573,7 @@ fi
|
|
|
539
573
|
|
|
540
574
|
echo ""
|
|
541
575
|
echo "========================================================"
|
|
542
|
-
echo " Ralph Teams — Project Manager"
|
|
576
|
+
echo " Ralph Teams v${RALPH_VERSION} — Project Manager"
|
|
543
577
|
echo " Project: $PROJECT"
|
|
544
578
|
echo " Source Branch: ${SOURCE_BRANCH:-<unknown>}"
|
|
545
579
|
echo " Loop Branch: $LOOP_BRANCH"
|
|
@@ -581,7 +615,7 @@ ensure_runtime_gitignore_entries() {
|
|
|
581
615
|
prompt_to_commit_dirty_worktree() {
|
|
582
616
|
local target_branch="$1"
|
|
583
617
|
|
|
584
|
-
echo "Worktree has uncommitted changes and Ralph needs
|
|
618
|
+
echo "Worktree has uncommitted changes and Ralph needs a clean base commit before creating loop worktree branch '$target_branch'."
|
|
585
619
|
echo "Ralph will now stage and commit all current changes before the run."
|
|
586
620
|
git status --short
|
|
587
621
|
git add -A
|
|
@@ -617,6 +651,15 @@ auto_remove_stale_worktree_dir() {
|
|
|
617
651
|
rm -rf "$worktree_path"
|
|
618
652
|
}
|
|
619
653
|
|
|
654
|
+
find_worktree_for_branch() {
|
|
655
|
+
local branch_name="$1"
|
|
656
|
+
|
|
657
|
+
git worktree list --porcelain 2>/dev/null | awk -v branch="refs/heads/${branch_name}" '
|
|
658
|
+
$1 == "worktree" { path = substr($0, 10); next }
|
|
659
|
+
$1 == "branch" && $2 == branch { print path; exit }
|
|
660
|
+
'
|
|
661
|
+
}
|
|
662
|
+
|
|
620
663
|
cleanup_epic_worktree_artifacts() {
|
|
621
664
|
local worktree_path="$1"
|
|
622
665
|
local branch_name="$2"
|
|
@@ -637,34 +680,56 @@ cleanup_epic_worktree_artifacts() {
|
|
|
637
680
|
git branch -D "$branch_name" >/dev/null 2>&1 || true
|
|
638
681
|
}
|
|
639
682
|
|
|
640
|
-
# --- Ensure loop branch exists and
|
|
683
|
+
# --- Ensure loop branch exists and has a dedicated worktree ---
|
|
641
684
|
ensure_runtime_gitignore_entries
|
|
642
685
|
ensure_repo_has_initial_commit
|
|
643
686
|
|
|
644
687
|
mkdir -p "$RALPH_RUNTIME_DIR" "$PLANS_DIR" "$LOGS_DIR" "$STATE_DIR" "$WORKTREES_DIR"
|
|
645
688
|
|
|
646
|
-
|
|
647
|
-
local
|
|
689
|
+
ensure_loop_worktree_ready() {
|
|
690
|
+
local loop_worktree_path="${WORKTREES_DIR}/loop"
|
|
691
|
+
local add_output=""
|
|
692
|
+
local retry_output=""
|
|
693
|
+
local existing_worktree=""
|
|
694
|
+
|
|
695
|
+
existing_worktree="$(find_worktree_for_branch "$LOOP_BRANCH" || true)"
|
|
696
|
+
if [ -n "$existing_worktree" ] && [ -d "$existing_worktree" ]; then
|
|
697
|
+
LOOP_ROOT_DIR="$existing_worktree"
|
|
698
|
+
ensure_worktree_runtime_link "$LOOP_ROOT_DIR"
|
|
699
|
+
return
|
|
700
|
+
fi
|
|
701
|
+
|
|
702
|
+
if ! git diff --quiet 2>/dev/null || ! git diff --cached --quiet 2>/dev/null; then
|
|
703
|
+
prompt_to_commit_dirty_worktree "$LOOP_BRANCH"
|
|
704
|
+
fi
|
|
648
705
|
|
|
649
|
-
if
|
|
650
|
-
|
|
651
|
-
|
|
706
|
+
if ! git show-ref --verify --quiet "refs/heads/${LOOP_BRANCH}"; then
|
|
707
|
+
echo "Creating loop branch: $LOOP_BRANCH (from $CURRENT_BRANCH)"
|
|
708
|
+
if ! add_output=$(git branch "$LOOP_BRANCH" "$CURRENT_BRANCH" 2>&1 >/dev/null); then
|
|
709
|
+
echo "Error: failed to create loop branch '$LOOP_BRANCH' from '$CURRENT_BRANCH'." >&2
|
|
710
|
+
[ -n "$add_output" ] && echo "$add_output" >&2
|
|
711
|
+
exit 1
|
|
652
712
|
fi
|
|
713
|
+
fi
|
|
653
714
|
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
715
|
+
git worktree prune >/dev/null 2>&1 || true
|
|
716
|
+
if [ -d "$loop_worktree_path" ] && ! git worktree list | grep -Fq "$loop_worktree_path"; then
|
|
717
|
+
auto_remove_stale_worktree_dir "$loop_worktree_path" "$LOOP_BRANCH"
|
|
718
|
+
fi
|
|
719
|
+
|
|
720
|
+
echo "Creating loop worktree: $loop_worktree_path ($LOOP_BRANCH)"
|
|
721
|
+
if ! add_output=$(git worktree add "$loop_worktree_path" "$LOOP_BRANCH" 2>&1 >/dev/null); then
|
|
722
|
+
echo "Loop worktree creation for '$LOOP_BRANCH' failed on the first attempt; pruning stale state and retrying once." >&2
|
|
723
|
+
[ -n "$add_output" ] && echo "$add_output" >&2
|
|
724
|
+
git worktree prune >/dev/null 2>&1 || true
|
|
725
|
+
git worktree remove "$loop_worktree_path" --force >/dev/null 2>&1 || true
|
|
726
|
+
if [ -d "$loop_worktree_path" ]; then
|
|
727
|
+
auto_remove_stale_worktree_dir "$loop_worktree_path" "$LOOP_BRANCH"
|
|
728
|
+
fi
|
|
729
|
+
if ! retry_output=$(git worktree add "$loop_worktree_path" "$LOOP_BRANCH" 2>&1 >/dev/null); then
|
|
730
|
+
echo "Error: failed to create loop worktree '$loop_worktree_path' for '$LOOP_BRANCH'." >&2
|
|
731
|
+
[ -n "$retry_output" ] && echo "$retry_output" >&2
|
|
732
|
+
exit 1
|
|
668
733
|
fi
|
|
669
734
|
fi
|
|
670
735
|
|
|
@@ -673,15 +738,17 @@ ensure_loop_branch_ready() {
|
|
|
673
738
|
exit 1
|
|
674
739
|
fi
|
|
675
740
|
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
741
|
+
LOOP_ROOT_DIR="$loop_worktree_path"
|
|
742
|
+
ensure_worktree_runtime_link "$LOOP_ROOT_DIR"
|
|
743
|
+
|
|
744
|
+
local loop_branch_name=""
|
|
745
|
+
loop_branch_name=$(git -C "$LOOP_ROOT_DIR" branch --show-current 2>/dev/null || echo "")
|
|
746
|
+
if [ "$loop_branch_name" != "$LOOP_BRANCH" ]; then
|
|
747
|
+
echo "Error: expected loop worktree branch '$LOOP_BRANCH' after setup, got '${loop_branch_name:-<none>}'." >&2
|
|
679
748
|
exit 1
|
|
680
749
|
fi
|
|
681
750
|
}
|
|
682
751
|
|
|
683
|
-
ensure_loop_branch_ready
|
|
684
|
-
|
|
685
752
|
epic_branch_name() {
|
|
686
753
|
local epic_id="$1"
|
|
687
754
|
echo "ralph/epic/${LOOP_BRANCH#ralph/}/${epic_id}"
|
|
@@ -746,7 +813,7 @@ create_epic_worktree() {
|
|
|
746
813
|
local epic_id="$1"
|
|
747
814
|
local branch_name
|
|
748
815
|
branch_name=$(epic_branch_name "$epic_id")
|
|
749
|
-
local worktree_path="${
|
|
816
|
+
local worktree_path="${WORKTREES_DIR}/${epic_id}"
|
|
750
817
|
local add_output
|
|
751
818
|
local retry_output
|
|
752
819
|
|
|
@@ -785,10 +852,20 @@ ensure_worktree_runtime_link() {
|
|
|
785
852
|
local worktree_abs_path="$1"
|
|
786
853
|
local worktree_runtime_path="${worktree_abs_path}/${RALPH_RUNTIME_DIRNAME}"
|
|
787
854
|
|
|
788
|
-
if [
|
|
855
|
+
if [ "$worktree_abs_path" = "$SOURCE_ROOT_DIR" ]; then
|
|
789
856
|
return 0
|
|
790
857
|
fi
|
|
791
858
|
|
|
859
|
+
if [ -L "$worktree_runtime_path" ]; then
|
|
860
|
+
local current_target
|
|
861
|
+
current_target="$(readlink "$worktree_runtime_path")"
|
|
862
|
+
if [ "$current_target" = "$RALPH_RUNTIME_DIR" ]; then
|
|
863
|
+
return 0
|
|
864
|
+
fi
|
|
865
|
+
log_warn "Stale runtime symlink in worktree (points to '${current_target}', expected '${RALPH_RUNTIME_DIR}') — relinking"
|
|
866
|
+
rm -f "$worktree_runtime_path"
|
|
867
|
+
fi
|
|
868
|
+
|
|
792
869
|
if [ -e "$worktree_runtime_path" ] && [ ! -L "$worktree_runtime_path" ]; then
|
|
793
870
|
rm -rf "$worktree_runtime_path"
|
|
794
871
|
fi
|
|
@@ -796,15 +873,20 @@ ensure_worktree_runtime_link() {
|
|
|
796
873
|
ln -s "$RALPH_RUNTIME_DIR" "$worktree_runtime_path"
|
|
797
874
|
}
|
|
798
875
|
|
|
876
|
+
ensure_loop_worktree_ready
|
|
877
|
+
ROOT_DIR="$LOOP_ROOT_DIR"
|
|
878
|
+
cd "$ROOT_DIR"
|
|
879
|
+
CURRENT_BRANCH=$(git branch --show-current 2>/dev/null || echo "")
|
|
880
|
+
|
|
799
881
|
# Removes a worktree. The branch is kept for potential merge by a later agent.
|
|
800
882
|
cleanup_epic_worktree() {
|
|
801
883
|
local epic_id="$1"
|
|
802
|
-
git worktree remove "${
|
|
884
|
+
git worktree remove "${WORKTREES_DIR}/${epic_id}" --force 2>/dev/null || true
|
|
803
885
|
}
|
|
804
886
|
|
|
805
887
|
# Removes ALL .worktrees/* entries (used on EXIT).
|
|
806
888
|
cleanup_all_worktrees() {
|
|
807
|
-
for dir in "${
|
|
889
|
+
for dir in "${WORKTREES_DIR}"/*/; do
|
|
808
890
|
[ -d "$dir" ] && git worktree remove "$dir" --force 2>/dev/null || true
|
|
809
891
|
done
|
|
810
892
|
}
|
|
@@ -912,8 +994,8 @@ CURRENT_STORY_ID=""
|
|
|
912
994
|
|
|
913
995
|
# Resolve absolute path to PRD file so team lead always has the correct path
|
|
914
996
|
PRD_ABS_PATH="$(cd "$(dirname "$PRD_FILE")" && pwd)/$(basename "$PRD_FILE")"
|
|
915
|
-
if [ "${PRD_ABS_PATH#"$
|
|
916
|
-
PRD_REL_PATH="${PRD_ABS_PATH#"$
|
|
997
|
+
if [ "${PRD_ABS_PATH#"$SOURCE_ROOT_DIR"/}" != "$PRD_ABS_PATH" ]; then
|
|
998
|
+
PRD_REL_PATH="${PRD_ABS_PATH#"$SOURCE_ROOT_DIR"/}"
|
|
917
999
|
else
|
|
918
1000
|
PRD_REL_PATH="$(basename "$PRD_FILE")"
|
|
919
1001
|
fi
|
|
@@ -1305,12 +1387,13 @@ prepare_codex_agent_configs
|
|
|
1305
1387
|
LOOP_STARTED_AT=$(date +%s)
|
|
1306
1388
|
|
|
1307
1389
|
# Cleanup worktrees on exit only when NOT interrupted (on interrupt, worktrees are preserved for resume)
|
|
1308
|
-
trap 'if [ "$INTERRUPTED" = false ]; then cleanup_all_worktrees; fi; [ -n "${CODEX_AGENT_RUNTIME_DIR:-}" ] && rm -rf "${CODEX_AGENT_RUNTIME_DIR}"; kill $(jobs -p) 2>/dev/null || true' EXIT
|
|
1390
|
+
trap 'if [ "$INTERRUPTED" = false ]; then cd "$SOURCE_ROOT_DIR" 2>/dev/null || true; cleanup_all_worktrees; fi; [ -n "${CODEX_AGENT_RUNTIME_DIR:-}" ] && rm -rf "${CODEX_AGENT_RUNTIME_DIR}"; kill $(jobs -p) 2>/dev/null || true' EXIT
|
|
1309
1391
|
|
|
1310
1392
|
render_team_lead_prompt() {
|
|
1311
1393
|
TEAM_LEAD_TEMPLATE_PATH="$TEAM_LEAD_PROMPT_FILE" \
|
|
1312
1394
|
TEAM_LEAD_TEMPLATE_PROJECT="$PROJECT" \
|
|
1313
1395
|
TEAM_LEAD_TEMPLATE_WORKTREE_ABS_PATH="$WORKTREE_ABS_PATH" \
|
|
1396
|
+
TEAM_LEAD_TEMPLATE_SOURCE_ROOT_DIR="$SOURCE_ROOT_DIR" \
|
|
1314
1397
|
TEAM_LEAD_TEMPLATE_WORKTREE_STATE_FILE="$WORKTREE_STATE_FILE" \
|
|
1315
1398
|
TEAM_LEAD_TEMPLATE_WORKTREE_PRD_PATH="$WORKTREE_PRD_PATH" \
|
|
1316
1399
|
TEAM_LEAD_TEMPLATE_LOOP_BRANCH="$LOOP_BRANCH" \
|
|
@@ -1550,7 +1633,7 @@ spawn_epic_bg() {
|
|
|
1550
1633
|
local WORKTREE_PATH
|
|
1551
1634
|
WORKTREE_PATH=$(create_epic_worktree "$EPIC_ID")
|
|
1552
1635
|
local WORKTREE_ABS_PATH
|
|
1553
|
-
WORKTREE_ABS_PATH="$
|
|
1636
|
+
WORKTREE_ABS_PATH="$WORKTREE_PATH"
|
|
1554
1637
|
local EPIC_BRANCH
|
|
1555
1638
|
EPIC_BRANCH=$(epic_branch_name "$EPIC_ID")
|
|
1556
1639
|
ensure_worktree_runtime_link "$WORKTREE_ABS_PATH"
|
|
@@ -1586,7 +1669,11 @@ spawn_epic_bg() {
|
|
|
1586
1669
|
) &
|
|
1587
1670
|
elif [ "$BACKEND" = "codex" ]; then
|
|
1588
1671
|
(
|
|
1589
|
-
|
|
1672
|
+
if [ "$SOURCE_ROOT_DIR" != "$ROOT_DIR" ]; then
|
|
1673
|
+
run_codex_exec "$WORKTREE_ABS_PATH" "$TEAM_PROMPT" --add-dir "$ROOT_DIR" --add-dir "$SOURCE_ROOT_DIR" --add-dir "$SCRIPT_DIR" > "$EPIC_LOG" 2>&1
|
|
1674
|
+
else
|
|
1675
|
+
run_codex_exec "$WORKTREE_ABS_PATH" "$TEAM_PROMPT" --add-dir "$ROOT_DIR" --add-dir "$SCRIPT_DIR" > "$EPIC_LOG" 2>&1
|
|
1676
|
+
fi
|
|
1590
1677
|
) &
|
|
1591
1678
|
else
|
|
1592
1679
|
(
|
|
@@ -1623,6 +1710,8 @@ merge_wave() {
|
|
|
1623
1710
|
for epic_id in "${completed_epic_ids[@]}"; do
|
|
1624
1711
|
local branch_name
|
|
1625
1712
|
branch_name=$(epic_branch_name "$epic_id")
|
|
1713
|
+
local epic_index
|
|
1714
|
+
epic_index=$(rjq find-index "$PRD_FILE" .epics id "$epic_id")
|
|
1626
1715
|
|
|
1627
1716
|
# Check if branch exists
|
|
1628
1717
|
if ! git show-ref --verify --quiet "refs/heads/${branch_name}"; then
|
|
@@ -1647,15 +1736,18 @@ merge_wave() {
|
|
|
1647
1736
|
# be stripped before the merge result is recorded in git history.
|
|
1648
1737
|
if git merge "${branch_name}" --no-commit --no-ff 2>/dev/null; then
|
|
1649
1738
|
unstage_runtime_artifacts
|
|
1650
|
-
|
|
1739
|
+
repair_source_runtime_dir_if_needed
|
|
1651
1740
|
if [ -f ".git/MERGE_HEAD" ]; then
|
|
1652
1741
|
git commit --no-edit >/dev/null 2>&1 || true
|
|
1653
1742
|
fi
|
|
1743
|
+
if [ -n "$epic_index" ]; then
|
|
1744
|
+
rjq set "$PRD_FILE" ".epics[$epic_index].status" '"completed"'
|
|
1745
|
+
fi
|
|
1654
1746
|
echo " [$epic_id] Merge successful (clean)"
|
|
1655
1747
|
echo "[$epic_id] MERGED (clean) — $(date)" >> "$PROGRESS_FILE"
|
|
1656
1748
|
else
|
|
1657
1749
|
unstage_runtime_artifacts
|
|
1658
|
-
|
|
1750
|
+
repair_source_runtime_dir_if_needed
|
|
1659
1751
|
local conflicted_files
|
|
1660
1752
|
conflicted_files=$(git diff --name-only --diff-filter=U 2>/dev/null || true)
|
|
1661
1753
|
local conflict_count
|
|
@@ -1669,8 +1761,6 @@ merge_wave() {
|
|
|
1669
1761
|
[ -n "$merge_error" ] && echo " [$epic_id] Working tree state:" && printf '%s\n' "$merge_error" | sed 's/^/ /'
|
|
1670
1762
|
merge_failures=$((merge_failures + 1))
|
|
1671
1763
|
|
|
1672
|
-
local epic_index
|
|
1673
|
-
epic_index=$(rjq find-index "$PRD_FILE" .epics id "$epic_id")
|
|
1674
1764
|
if [ -n "$epic_index" ]; then
|
|
1675
1765
|
rjq set "$PRD_FILE" ".epics[$epic_index].status" '"merge-failed"'
|
|
1676
1766
|
fi
|
|
@@ -1687,6 +1777,9 @@ merge_wave() {
|
|
|
1687
1777
|
git checkout --ours -- prd.json
|
|
1688
1778
|
git add prd.json
|
|
1689
1779
|
git commit --no-edit >/dev/null 2>&1 || true
|
|
1780
|
+
if [ -n "$epic_index" ]; then
|
|
1781
|
+
rjq set "$PRD_FILE" ".epics[$epic_index].status" '"completed"'
|
|
1782
|
+
fi
|
|
1690
1783
|
echo " [$epic_id] Merge successful (kept projected prd.json)"
|
|
1691
1784
|
echo "[$epic_id] MERGED (projected prd.json) — $(date)" >> "$PROGRESS_FILE"
|
|
1692
1785
|
git branch -d "${branch_name}" 2>/dev/null || true
|
|
@@ -1698,8 +1791,6 @@ merge_wave() {
|
|
|
1698
1791
|
echo "[$epic_id] MERGE FAILED (conflicts remain, files: ${conflicted_files}) — $(date)" >> "$PROGRESS_FILE"
|
|
1699
1792
|
merge_failures=$((merge_failures + 1))
|
|
1700
1793
|
|
|
1701
|
-
local epic_index
|
|
1702
|
-
epic_index=$(rjq find-index "$PRD_FILE" .epics id "$epic_id")
|
|
1703
1794
|
if [ -n "$epic_index" ]; then
|
|
1704
1795
|
rjq set "$PRD_FILE" ".epics[$epic_index].status" '"merge-failed"'
|
|
1705
1796
|
fi
|
|
@@ -1797,17 +1888,32 @@ run_backend_agent_session() {
|
|
|
1797
1888
|
local prompt_file="${SCRIPT_DIR}/prompts/agents/${agent_name}.md"
|
|
1798
1889
|
local role_body
|
|
1799
1890
|
role_body="$(extract_prompt_body "$prompt_file")"
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1891
|
+
if [ "$SOURCE_ROOT_DIR" != "$ROOT_DIR" ]; then
|
|
1892
|
+
printf 'Runtime note: This Codex session runs in exec mode. `request_user_input` is unavailable. Never call it. Do not stop to ask the user questions. Make a reasonable assumption and continue.\n\n%s\n\n## Assignment\n%s\n' "$role_body" "$prompt" | codex \
|
|
1893
|
+
-a never \
|
|
1894
|
+
exec \
|
|
1895
|
+
-C "$workdir" \
|
|
1896
|
+
-m "$model" \
|
|
1897
|
+
-s workspace-write \
|
|
1898
|
+
--skip-git-repo-check \
|
|
1899
|
+
--color never \
|
|
1900
|
+
--add-dir "$ROOT_DIR" \
|
|
1901
|
+
--add-dir "$SOURCE_ROOT_DIR" \
|
|
1902
|
+
--add-dir "$SCRIPT_DIR" \
|
|
1903
|
+
- > "$log_file" 2>&1 || true
|
|
1904
|
+
else
|
|
1905
|
+
printf 'Runtime note: This Codex session runs in exec mode. `request_user_input` is unavailable. Never call it. Do not stop to ask the user questions. Make a reasonable assumption and continue.\n\n%s\n\n## Assignment\n%s\n' "$role_body" "$prompt" | codex \
|
|
1906
|
+
-a never \
|
|
1907
|
+
exec \
|
|
1908
|
+
-C "$workdir" \
|
|
1909
|
+
-m "$model" \
|
|
1910
|
+
-s workspace-write \
|
|
1911
|
+
--skip-git-repo-check \
|
|
1912
|
+
--color never \
|
|
1913
|
+
--add-dir "$ROOT_DIR" \
|
|
1914
|
+
--add-dir "$SCRIPT_DIR" \
|
|
1915
|
+
- > "$log_file" 2>&1 || true
|
|
1916
|
+
fi
|
|
1811
1917
|
;;
|
|
1812
1918
|
esac
|
|
1813
1919
|
}
|
|
@@ -1905,6 +2011,24 @@ $validation_result_file
|
|
|
1905
2011
|
|
|
1906
2012
|
}
|
|
1907
2013
|
|
|
2014
|
+
persist_loop_branch_state_if_dirty() {
|
|
2015
|
+
local dirty_status=""
|
|
2016
|
+
dirty_status=$(git status --porcelain --untracked-files=no 2>/dev/null || true)
|
|
2017
|
+
[ -n "$dirty_status" ] || return 0
|
|
2018
|
+
|
|
2019
|
+
git add -u
|
|
2020
|
+
unstage_runtime_artifacts
|
|
2021
|
+
|
|
2022
|
+
if git diff --cached --quiet >/dev/null 2>&1; then
|
|
2023
|
+
git reset >/dev/null 2>&1 || true
|
|
2024
|
+
return 0
|
|
2025
|
+
fi
|
|
2026
|
+
|
|
2027
|
+
if git commit -m "chore: persist loop branch state" >/dev/null 2>&1; then
|
|
2028
|
+
echo "Persisted loop branch state on ${LOOP_BRANCH}"
|
|
2029
|
+
fi
|
|
2030
|
+
}
|
|
2031
|
+
|
|
1908
2032
|
if ! recover_pending_merges "resume/startup"; then
|
|
1909
2033
|
initialize_counters
|
|
1910
2034
|
fi
|
|
@@ -2309,6 +2433,8 @@ if ! run_final_validation_cycle; then
|
|
|
2309
2433
|
FAILED=$((FAILED + 1))
|
|
2310
2434
|
fi
|
|
2311
2435
|
|
|
2436
|
+
persist_loop_branch_state_if_dirty
|
|
2437
|
+
|
|
2312
2438
|
# --- Summary ---
|
|
2313
2439
|
REMAINING=$((TOTAL_EPICS - COMPLETED - FAILED))
|
|
2314
2440
|
echo ""
|