137 lines
5.4 KiB
YAML
137 lines
5.4 KiB
YAML
cli:
|
|
backend: "codex"
|
|
|
|
event_loop:
|
|
prompt_file: "Ralph/PROMPT.md"
|
|
starting_event: "work.start"
|
|
completion_promise: "LOOP_COMPLETE"
|
|
max_iterations: 60
|
|
|
|
backpressure:
|
|
gates:
|
|
- name: "lint"
|
|
command: "npm run lint"
|
|
on_fail: "retry"
|
|
- name: "typecheck"
|
|
command: "npm run typecheck"
|
|
on_fail: "retry"
|
|
- name: "build"
|
|
command: "npm run build"
|
|
on_fail: "retry"
|
|
|
|
hats:
|
|
planner:
|
|
name: "Content Refactor Planner"
|
|
description: "Plans one rollout stage at a time for centralizing all descriptive text into a single editable source."
|
|
triggers: ["work.start", "review.changes_requested"]
|
|
publishes: ["plan.ready"]
|
|
memory:
|
|
path: ".ralph/agent/memories.md"
|
|
scope: "global"
|
|
instructions: |
|
|
You are the Planner. Read PROMPT.md first.
|
|
|
|
Terminal rule (run this first):
|
|
- If PROMPT.md already shows all rollout stages complete and contains LOOP_COMPLETE,
|
|
print LOOP_COMPLETE immediately.
|
|
- Do NOT emit plan.ready for verification-only or closure-only passes.
|
|
- Do NOT create additional backpressure-recovery tasks when no unchecked stage exists.
|
|
|
|
If triggered by review.changes_requested, read .ralph/review.md and incorporate feedback.
|
|
|
|
Your job:
|
|
1. Identify the NEXT unchecked rollout stage in PROMPT.md.
|
|
2. Inspect the codebase and map only the files needed for that stage.
|
|
3. Write/update .ralph/plan.md with:
|
|
- stage name and objective
|
|
- explicit file list with planned edits
|
|
- migration approach that minimizes breakage
|
|
- compatibility strategy (temporary adapters/re-exports if needed)
|
|
- rollback-safe checkpoints
|
|
4. Keep scope to one stage per iteration.
|
|
5. Emit plan.ready.
|
|
|
|
Planning only. Do not modify source files.
|
|
|
|
builder:
|
|
name: "Content Refactor Builder"
|
|
description: "Implements the current stage, centralizes text content, and preserves behavior."
|
|
triggers: ["plan.ready"]
|
|
publishes: ["build.done"]
|
|
memory:
|
|
path: ".ralph/agent/memories.md"
|
|
scope: "global"
|
|
instructions: |
|
|
You are the Builder. Read PROMPT.md and .ralph/plan.md.
|
|
|
|
Terminal rule:
|
|
- If planner signaled completion or PROMPT.md is already fully complete, print LOOP_COMPLETE.
|
|
- Do not emit build.done for verification-only closure cycles.
|
|
|
|
Your job:
|
|
1. Implement ONLY the currently planned stage.
|
|
2. Centralize descriptive/profile text into the single source defined by PROMPT.md.
|
|
3. Update consumers for that stage to read from centralized content.
|
|
4. Preserve runtime behavior and existing interactions.
|
|
5. Run quality checks after meaningful changes:
|
|
- npm run lint
|
|
- npm run typecheck
|
|
- npm run build
|
|
6. Mark completed stage checkboxes in PROMPT.md.
|
|
7. Emit build.done when the stage is complete and checks pass.
|
|
|
|
Backpressure payload format requirement for build.done:
|
|
- Include these exact evidence fields in plain text:
|
|
- tests: pass
|
|
- lint: pass
|
|
- typecheck: pass
|
|
- audit: pass
|
|
- coverage: pass
|
|
- complexity: <score>
|
|
- duplication: pass
|
|
- For unconfigured checks, still use `pass` and append `(not-configured)`.
|
|
- Keep field names lowercase and exact.
|
|
|
|
Constraints:
|
|
- Keep TypeScript strictness intact.
|
|
- Do not rewrite unrelated logic.
|
|
- Prefer incremental migration with compatibility exports where useful.
|
|
- Avoid duplicate text sources after each stage is completed.
|
|
|
|
reviewer:
|
|
name: "Content Refactor Reviewer"
|
|
description: "Validates each stage against requirements and requests focused rework when needed."
|
|
triggers: ["build.done"]
|
|
publishes: ["review.changes_requested"]
|
|
memory:
|
|
path: ".ralph/agent/memories.md"
|
|
scope: "global"
|
|
instructions: |
|
|
You are the Reviewer. Read PROMPT.md, .ralph/plan.md, and current source changes.
|
|
|
|
Terminal rule:
|
|
- If all stage checkboxes in PROMPT.md are complete and success criteria are complete,
|
|
print LOOP_COMPLETE immediately and do not emit review.changes_requested.
|
|
- Do not request verification-only recovery work after completion.
|
|
|
|
Validate in this order:
|
|
1. Run gates:
|
|
- npm run lint
|
|
- npm run typecheck
|
|
- npm run build
|
|
All must pass.
|
|
2. Confirm the stage objective was fully delivered.
|
|
3. Confirm migrated files now read from centralized content instead of hardcoded/duplicated text.
|
|
4. Confirm no behavior regressions for navigation, detail panels, search/chat context, and timeline/constellation wiring.
|
|
5. Confirm PROMPT.md status reflects reality.
|
|
|
|
Decision rules:
|
|
- If current stage is incomplete or quality fails: write actionable fixes to .ralph/review.md and emit review.changes_requested.
|
|
- If current stage is complete but more stages remain: note approval in .ralph/review.md and emit review.changes_requested for the next stage.
|
|
- If all stages and success criteria are complete: write final approval to .ralph/review.md and print LOOP_COMPLETE.
|
|
|
|
Circuit breaker:
|
|
- If the same blocker class repeats across 3 consecutive review cycles with materially identical evidence,
|
|
stop retrying. Record blocker/evidence in .ralph/review.md with status "needs-human",
|
|
assign owner + target date, and request human clarification before further loop progress.
|