python-factory-plugin/skills/ralph-execute/SKILL.md
Autonomous execution pipeline. Parses plan phases, executes selected phases via agents (execute → verify-tests → verify → docs → commit → drift review). Usage: /ralph-execute [review-iterations=5] [phase=N|phases=N-M|phases=N,M] plan-file
npx skillsauth add ghiret/python-template ralph-executeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Parse arguments:
phase=N may appear before the plan file: /ralph-execute phase=2 agent_docs/plans/my-plan.htmlphase N may appear before the plan file: /ralph-execute phase 2 agent_docs/plans/my-plan.htmlphases=N-M runs an inclusive range: /ralph-execute phases=2-4 agent_docs/plans/my-plan.htmlphases=N,M,K runs an explicit ordered list: /ralph-execute phases=1,3 agent_docs/plans/my-plan.html/ralph-execute 3 phase=2 agent_docs/plans/my-plan.htmlWhen reading companion skills, prefer .agents/skills/<name>/SKILL.md if it exists
(Codex layout). Otherwise use .claude/skills/<name>/SKILL.md (Claude layout).
Also read the shared conventions before setup:
_shared/html-conventions.md for HTML plan parsing and report artifact locations_shared/testing-conventions.md for test speed budgets enforced by execute and verifyYOU MUST PROCESS THE REQUESTED SCOPE IN STRICT PHASE CYCLES.
The ONLY valid reasons to stop are:
.html plans, extract phases from <section data-phase="N" data-title="...">, tasks from <ul class="tasks"><li>..., and verification from <section class="verification">..md plans, extract phases by finding ## Phase N: Title headings, - [ ] tasks, and ### Verification subsections.phase=N or phase N is provided: selected_phases = [N]phases=N-M is provided: selected_phases = [N, N+1, ..., M]phases=N,M,K is provided: selected_phases = [N, M, K] in the requested orderFor each phase i in selected_phases (you MUST go in order, one at a time):
Every selected phase MUST repeat Step A and Step B as distinct passes:
Create task "Phase {i}/{P}: Execute — {phase_title}" and set to IN_PROGRESS
Announce: "=== PHASE {i} OF {P}: EXECUTE — {phase_title} ==="
Extract the tasks and verification steps for ONLY this phase from the plan
Spawn an Agent with subagent_type "general-purpose" and this prompt:
You are executing Phase {i} of an implementation plan.
Plan file: {plan_file}
Read the
executecompanion skill using the Skill Path Resolution rule above and follow its process to implement ONLY the following phase:{paste the full phase content here, including tasks and verification subsection}
IMPORTANT:
- The source plan may be HTML or Markdown. Preserve and follow the parsed phase content exactly.
- Do NOT implement tasks from any other phase. ONLY implement the tasks listed above.
- Run AUTONOMOUSLY — do NOT stop for feedback or ask for confirmation. Execute all tasks to completion.
- Keep tests bounded and fast. Do NOT add unit tests that can exceed 60 seconds; mark long integration/e2e tests explicitly.
- Only stop if you hit an unrecoverable blocker (3+ failed attempts on the same issue). When done, announce "Phase {i} execution complete."
Wait for the agent to complete
Update task to COMPLETED
Create task "Phase {i}/{P}: Verify tests" and set to IN_PROGRESS
Announce: "=== PHASE {i} OF {P}: VERIFY TESTS ==="
Spawn an Agent with subagent_type "general-purpose" and this prompt:
You are verifying test quality for Phase {i} of a plan.
Plan file: {plan_file}
Read the
verify-testscompanion skill using the Skill Path Resolution rule above and execute its fast test-quality audit. Do NOT run the full test suite by default. Use static inspection first and targeted tests only when needed. Write the test-quality report artifact underagent_docs/reports/verify/and include a stableTEST QUALITY PASSEDorTEST QUALITY FAILEDmarker.If test quality FAILS:
- Attempt to fix the test design issues you find once
- Re-run the fast test-quality audit once more
- Report the final result clearly: "TEST QUALITY PASSED" or "TEST QUALITY FAILED: {issues}"
Wait for the agent to complete
Parse the result:
Update task to COMPLETED
You are verifying the implementation of Phase {i} of a plan.
Plan file: {plan_file}
Read the
verifycompanion skill using the Skill Path Resolution rule above and execute its full verification process. Focus on whether Phase {i} was implemented correctly, but also check for regressions in earlier phases. Write the verification report artifact underagent_docs/reports/verify/and include a stableVERIFICATION PASSEDorVERIFICATION FAILEDmarker.If verification FAILS:
- Attempt to fix the issues you find
- Re-run the verification once more
- Report the final result clearly: "VERIFICATION PASSED" or "VERIFICATION FAILED: {issues}"
This step has 4 sub-steps. The review runs always; the fixes run only if the review flags issues.
Create task "Phase {i}/{P}: Review docs" and set to IN_PROGRESS
Announce: "=== PHASE {i} OF {P}: REVIEW DOCS ==="
Spawn an Agent with subagent_type "general-purpose" and this prompt:
You are reviewing documentation after Phase {i} of an implementation.
Read the
review-docscompanion skill using the Skill Path Resolution rule above and execute its full drift analysis. Write the Documentation Drift Report artifact underagent_docs/reports/drift/and include tagged actions: [FIX-DOCS], [GENERATE-DIAGRAMS], [GENERATE-IMAGES].
Wait for the agent to complete
Save the drift report output and artifact path from agent_docs/reports/drift/ for the next sub-steps
Update task to COMPLETED
Create task "Phase {i}/{P}: Fix docs" and set to IN_PROGRESS
Spawn an Agent with subagent_type "general-purpose" and this prompt:
You are fixing text documentation after Phase {i} of an implementation.
Read the
fix-docscompanion skill using the Skill Path Resolution rule above and apply fixes for these findings:{paste the [FIX-DOCS] items from the drift report}
If findings are not available in the conversation, read the latest drift report from
agent_docs/reports/drift/.
Wait for the agent to complete
Update task to COMPLETED
Create task "Phase {i}/{P}: Generate diagrams" and set to IN_PROGRESS
Spawn an Agent with subagent_type "general-purpose" and this prompt:
You are updating architecture diagrams after Phase {i} of an implementation.
Read the
generate-diagramscompanion skill using the Skill Path Resolution rule above and update diagrams for these findings:{paste the [GENERATE-DIAGRAMS] items from the drift report}
Wait for the agent to complete
Update task to COMPLETED
Create task "Phase {i}/{P}: Generate images" and set to IN_PROGRESS
Spawn an Agent with subagent_type "general-purpose" and this prompt:
You are generating AI documentation images after Phase {i} of an implementation.
Read the
generate-imagescompanion skill using the Skill Path Resolution rule above and generate images for these findings:{paste the [GENERATE-IMAGES] items from the drift report}
Wait for the agent to complete
Update task to COMPLETED
Documentation issues from D2-D4 are warnings, not blockers — note them but proceed to Step E.
uv run pre-commit run --all-files
git diff --name-only and git ls-files --others --exclude-standard to list changes.env, credentials, or large binariesgit add <file1> <file2> ...feat:, fix:, refactor:, etc.Phase {i}/{P}: {phase_title} in the commit bodySelected-phase Ralph run: requested phases {selected_phases} of {P} in the commit bodyCo-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>git commit -m "<message>" using a HEREDOC for the messageralph-review companion skill using the Skill Path Resolution rule above and execute its full review process with {review_iterations} iterations on {plan_file}
agent_docs/reports/reviews/After completion (or failure), output:
| Phase | Title | Execute | Test Quality | Verify | Docs Review | Fix Docs | Diagrams | Images | Commit | Drift Review |
|-------|--------------------|---------|--------------|--------|-------------|----------|----------|--------|--------|---------------------|
| 1/P | Set up models | Done | PASSED | PASSED | 2 issues | Fixed | Skipped | Skipped| abc123 | APPROVED (iter 2) |
| 2/P | API endpoints | Done | PASSED | PASSED | Clean | Skipped | Updated | Skipped| def456 | REQUEST CHANGES (5) |
| 3/P | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
COMPLETION IS NON-NEGOTIABLE. The requested scope MUST be processed. Without a phase selector, every phase in the plan MUST be processed. With a phase selector, exactly the selected phase(s) MUST be processed.
agent_docs/reports/development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
development
Post-execution QA. Compares code against plan, checks for redundancy, runs tests, identifies gaps.
testing
Fast test-quality audit. Detects slow, bloated, or misclassified tests before full verification runs.
testing
Lead Architect review of implementation plans. Checks for redundancy, architectural fit, and testability. Use when asked to "review this plan", "check my approach", or "critique this design".