用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill execute命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | execute |
| description | >- Use when this capability is needed. |
This skill takes a plan created by /plan and works through it step by step on a dedicated git branch. It uses a two-tier verification system:
A companion journal records everything — implementation details, verification results, fixes, and commit hashes.
When this skill is invoked:
templates/journal-template.md to understand the journal formatexamples/example-journal.md to see the expected qualitydocs/features/ for available plans. Show what exists and ask which to execute./plan first.php artisan test, npm test, pytest)phpstan, eslint, pint, ruff)vue-tsc, tsc --noEmit, mypy)Detect whether this is the new multi-file story format or the old monolithic iteration format:
if plan.md path contains "/stories/" → NEW FORMAT
→ multi-file consumption (plan.md + design.md + prd.md + brief.md)
→ update feature README on completion
→ create PR via gh pr create
→ update GitHub ticket status throughout
elif plan.md path contains "/iterations/" → OLD FORMAT
→ monolithic parsing (sections 1-7 in one file)
→ write journal.md only
→ do NOT update README, create PR, or touch GitHub
else → UNKNOWN
→ ask the user which format to use
Record the detected format in the journal header.
Before execution begins, validate that the inputs are sufficient. This prevents starting with incomplete planning artifacts.
| Document | Check | Enforcement |
|---|---|---|
plan.md | Has ## Implementation Roadmap with at least one ### Step | Hard requirement — refuse to execute without steps |
design.md | Has ## File Manifest section | Hard requirement — can't verify completeness without knowing all files |
prd.md | Has ## Acceptance Criteria section | Soft requirement — warn but proceed. Ralph loop AC verification will be limited |
brief.md | Exists | Optional — note in journal if missing. Business context only, not needed for execution |
Validation sequence:
If a hard requirement fails, tell the user what's missing and suggest they run /plan to create it.
| Document | Check | Enforcement |
|---|---|---|
plan.md | Has implementation steps (Section 7 or similar) | Hard requirement |
Old format has everything in one file — no multi-file validation needed.
/execute reads:
1. plan.md → Implementation roadmap (steps, order, dependencies) — PRIMARY
2. design.md → File manifest, data model, integration points — REFERENCE
3. prd.md → Acceptance criteria for ralph loop verification — REFERENCE
4. brief.md → Business context (for understanding intent) — OPTIONAL
Cross-referencing during execution:
Read plan.md as a monolithic document. Parse sections 1-7 from the single file.
git status. If uncommitted changes exist, ask the user to commit or stash before proceeding.feature/{feature-name}/{change-name}git checkout -b feature/{feature-name}/{change-name}git rev-parse --short HEADEvery commit message must include the story name so commits are self-describing in git log:
{story-name} step {N}: {task name}{story-name} step {N}: {task name} (verified after {X} ralph iterations){story-name} ralph review: {description} or {story-name} ralph adversarial: {description}{story-name}: complete - add execution journalExample: add-oauth2 step 3: create token refresh job
Always record the hash (git rev-parse --short HEAD) in the journal.
Skip all GitHub operations for old-format iterations.
If the plan.md header contains a **Ticket**: #{number}, update the ticket:
# Assign to yourself and comment that work is starting
~/.local/bin/gh issue edit {ticket-number} \
--repo ABilenduke/content-engine \
--add-assignee @me
~/.local/bin/gh issue comment {ticket-number} \
--repo ABilenduke/content-engine \
--body "Execution started. Branch: feature/{feature}/{change}"
Note: Status is tracked via the project board columns (Backlog → Ready → In Progress → Review → Done), not via labels. Move the ticket on the board manually or via project field updates if needed.
# When a step's sub-issue is being worked on, optionally comment progress:
~/.local/bin/gh issue comment {sub-issue-number} \
--repo ABilenduke/content-engine \
--body "Working on Step {N}. Branch: feature/{feature}/{change}"
# Create PR with detailed summary
~/.local/bin/gh pr create \
--repo ABilenduke/content-engine \
--title "{story-name}" \
--label "type:story,area:{area}" \
--body "$(cat <<'EOF'
## Summary
{1-3 sentences from journal summary}
## Changes
{list of key files changed, grouped by step}
## Story Documents
- Brief: {path}/brief.md
- PRD: {path}/prd.md
- Design: {path}/design.md
- Plan: {path}/plan.md
- Journal: {path}/journal.md
## Acceptance Criteria Verification
{from ralph loop Phase 2 — each AC with ✅/⚠️/❌ status}
## Testing
- Ralph loop: {iterations} step loops, {fixes} fixes
- Final ralph: {phases} phases, {adversarial-tests} adversarial tests
- All checks passing: ✅ | ⚠️ {issues}
EOF
)"
# Comment on the story ticket that PR is ready for review
~/.local/bin/gh issue comment {ticket-number} \
--repo ABilenduke/content-engine \
--body "PR #{pr-number} created. Ready for review."
After implementing each plan step, run a quick verification loop. The goal is fast feedback, not comprehensive review. Keep these tight.
Implement step
│
▼
Run quick checks: ◄──────────────┐
• Tests related to step │
• Lint changed files │
• Step-specific validation │
│ │
Pass? ─── No ──► iteration < 5? ─ Yes ─►│ Fix
│ │ │
Yes No │
│ │ │
▼ Commit with │
Evaluate work: notes, move on │
• Re-read plan step │
• Compare implementation │
• Check test coverage │
│ │
Gaps found? ─── No ──► Commit │
│ │
Yes │
│ │
iteration < 5? ─── Yes ─► Fix ──────────┘
│
No
│
Commit with notes, move on
Scope the checks narrowly:
After checks pass, evaluate the work:
Passing tests are necessary but not sufficient. Before committing, do a quick evaluation:
This prevents the "green bar illusion" where tests pass but the work is incomplete or the tests themselves are weak.
Max 5 iterations (checks + evaluations combined). After 5, commit with notes and move on.
After ALL plan steps are complete, run a structured multi-phase review. This is where the real quality comes from. Even if every test passes on the first check, the self-review and adversarial phases give the loop substantive work.
The final ralph loop has three mandatory phases, followed by fix-and-verify iterations if issues are found:
Phase 1: Automated Checks
│
▼
Phase 2: Self-Review
│
▼
Phase 3: Adversarial Testing
│
▼
Issues found? ─── No ──► Complete (minimum 3 iterations guaranteed)
│
Yes
│
▼
Phase 4-5: Fix & Re-verify (up to 2 more iterations)
Run the full verification stack against the entire project:
php artisan docs:generate and commit any changes to docs/generated/.If failures exist, fix them and commit: {story-name} ralph check: {description}
Proceed to Phase 2 regardless (even if Phase 1 was clean).
Re-read every file you created or modified. Compare against the plan. This is a code review of your own work.
Check for:
Journal everything found. Fix issues and commit: {story-name} ralph review: {description}
Proceed to Phase 3 regardless (even if Phase 2 was clean).
Actively try to break your own code. Write NEW tests that target edge cases, failure modes, and the "what if" scenarios from the plan's edge cases section.
Source of edge cases (format-dependent):
Techniques:
Write the tests. Don't just think about edge cases — write actual test cases, run them, and see what breaks.
Journal everything found. Fix issues and commit: {story-name} ralph adversarial: {description}
If Phases 2 or 3 found issues that required fixes, re-run the full automated checks to make sure fixes didn't break anything else. Up to 2 more iterations.
If issues remain after Phase 5 (iteration 5 total), stop and journal what's unresolved.
## Final Ralph Loop
### Phase 1: Automated Checks
**Checks run**: [full test suite, lint, type check, custom]
**Results**: [pass/fail details]
**Fixes**: [if any]
**Commit**: `{story-name} ralph check: {desc}` → `[hash]` (or "No fixes needed")
### Phase 2: Self-Review
**Files reviewed**: [list of files examined]
**Findings**:
- [Finding 1 — severity, description, fix applied]
- [Finding 2 — ...]
**Acceptance criteria check**:
- AC-1: ✅ Verified by test_xxx
- AC-2: ✅ Verified by test_yyy
- AC-3: ⚠️ Requires manual verification — [why]
**Commit**: `{story-name} ralph review: {desc}` → `[hash]` (or "No issues found")
### Phase 3: Adversarial Testing
**Tests written**: [count] new test cases
**Targeting**: [what scenarios were tested]
**Failures found**:
- [Failure 1 — edge case, what broke, fix applied]
- [Failure 2 — ...]
**Commit**: `{story-name} ralph adversarial: {desc}` → `[hash]` (or "All adversarial tests passed")
### Phase 4: Re-verification (if needed)
**Checks run**: [re-run of full suite including new adversarial tests]
**Result**: All checks pass ✅ | [remaining issues]
**Commit**: [hash or "Clean pass"]
For each step in the plan's implementation roadmap:
## Step N: [Task Name] with timestampabc1234, ralph clean). Moving to Step N+1: [name]."## Final Ralph Loop in journalDuring steps:
🔨 Executing [{feature} / {change-name}]: Step N of M — [Task Name]
[██████░░░░░░░░] N/M complete
Branch: feature/{feature}/{change} | Last commit: {hash}
During final ralph loop:
🔄 Final Ralph Loop [{feature} / {change-name}]: Phase N — [Phase Name]
Branch: feature/{feature}/{change} | Last commit: {hash}
When the final ralph loop completes:
## Summary section to the journal (see below)gh pr create with the format shown in GitHub Integration above{story-name}: complete - add execution journal and update feature docsdocs/features/index.md with latest story infofeature/{name}. [N] commits, [N] ralph fixes, [N] adversarial tests added. [All checks pass / N issues remain.] PR #{number} created. Journal at [path]."## Summary section to the journaldocs/features/index.md if neededfeature/{name}. [N] commits, [N] ralph fixes, [N] adversarial tests added. [All checks pass / N issues remain.] Journal at [path]."## Summary
**Delivered**: [1-3 sentences]
**Branch**: `feature/{feature}/{change-name}`
**Commits**: [total count]
**Final commit**: `[short hash]`
**Ralph loop stats**:
- Step loops: [iterations] iterations, [fixes] fixes
- Final loop — Phase 1 (checks): [pass/fix count]
- Final loop — Phase 2 (self-review): [findings count] findings, [fixes] fixes
- Final loop — Phase 3 (adversarial): [tests written] tests written, [failures] failures caught
- Verification result: All passing ✅ | [N] issues remaining ⚠️
**Adversarial tests added**: [count] — covering [brief description]
**Deviations from plan**: [Count — brief summary]
**Open items**:
- [Anything left undone or needing follow-up]
**Lessons learned**:
- [What would you do differently?]
After completing execution, update the feature's living documentation:
Stories table: Add a new row to the stories table in docs/features/{feature}/README.md:
| {date} | [{story-name}](stories/{date}_{story-name}/) | [#{ticket}](link) | Complete |
Architecture section: If the story changed the feature's architecture (new models, routes, components), update the "Current Architecture" section in the README.
Known Issues: If the ralph loop found unresolved issues, add them to the "Known Issues" section.
If the feature README doesn't exist yet, create one using .claude/skills/feature/templates/feature-readme-v2.md.
{story-name} step {N} (partial): {reason}update plan: {what changed}$ARGUMENTS
Converted and distributed by TomeVault — claim your Tome and manage your conversions.