agentleFS
HarambeeAIHarambeeAI/bayes-ship/skills/ship-execute/SKILL.md

ship-execute

Skill1 starsChanged 7 months agoMITView on GitHub

Execute a plan via fresh subagents with mandatory TDD and two-stage review (spec compliance then code quality) after every task. The core execution engine of Bayes Ship.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 8 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the plan file ONCE upfront.

    line 16
  2. Very specific:

    Write the failing test from <test-first> (RED)

    line 30
  3. Very specific:

    Write minimal implementation from <action> (GREEN)

    line 32
  4. Distinctive:

    If spec compliance FAILS: re-dispatch the implementer with specific feedback.

    line 57
  5. Distinctive:

    Only runs AFTER spec compliance passes.

    line 61
  6. Distinctive:

    After both reviews pass:

    line 77
  7. Very specific:

    Update progress.json (increment completed_tasks)

    line 79
  8. Distinctive:

    If multiple tasks in the current wave are independent, dispatch them in parallel.

    line 84
  9. Distinctive:

    After all tasks in the plan are done:

    line 88
  10. Very specific:

    Run typecheck on the full project

    line 89
  11. Distinctive:

    Run the full test suite

    line 90
  12. Distinctive:

    Every subagent gets a clean context window.

    line 98
  13. Very specific:

    Use the model specified in the task's model attribute when model_routing is auto.

    line 99

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Execute — Subagent-driven implementation with two-stage review

Pre-condition

A plan must exist in .claude/state/plans/phase-<n>/plan.md. If not, tell the user to run /bayes-ship:ship-plan first.

Process

Step 1: Load plan

Read the plan file ONCE upfront. Extract all task details so subagents never need to re-read the file.

Step 2: For each task in the plan

2a. Dispatch Implementer subagent (fresh context per task):

Provide the subagent with ONLY:

  • The task XML (extracted from the plan)
  • The relevant SKILL.md files referenced in <skill>
  • ARCHITECTURE.md for context
  • The test-driven-development skill
  • Nothing else. Never inherit session history.

The Implementer follows TDD:

  1. Write the failing test from <test-first> (RED)
  2. Watch it fail
  3. Write minimal implementation from <action> (GREEN)
  4. Watch tests pass
  5. Refactor if needed
  6. Report status signal:
    • DONE — ready for review
    • DONE_WITH_CONCERNS — complete but flagging issues
    • NEEDS_CONTEXT — blocked on a question (escalate to user)
    • BLOCKED — cannot proceed (escalate immediately)

On NEEDS_CONTEXT: check ARCHITECTURE.md and RESEARCH.md for the answer. If found, provide it and let the implementer continue. If not found, ask the user.

On BLOCKED: stop and alert the user immediately.

2b. Spec Compliance Review (fresh subagent):

Dispatch a spec-compliance-reviewer subagent with:

  • The original task XML from the plan
  • The git diff of the implementer's changes
  • The PRD acceptance criteria for this story

The reviewer is SKEPTICAL. It does NOT trust the implementer's self-report. It reads actual code and checks:

  • Does the implementation match the spec exactly?
  • Are there missing requirements?
  • Is there over-building (more than the spec requires)? YAGNI violations?

If spec compliance FAILS: re-dispatch the implementer with specific feedback. Do NOT proceed to code quality review.

2c. Code Quality Review (fresh subagent):

Only runs AFTER spec compliance passes. Wrong order wastes effort.

Dispatch a code-quality-reviewer subagent with:

  • The git SHAs from the implementer's commits
  • The coding-standards skill content (if installed)
  • The security skill content (if applicable to this task)

Reviews for: code style, patterns, bugs, security issues, test quality, naming, complexity.

Reports issues by severity:

  • Critical — blocks progress. Re-dispatch implementer.
  • Warning — should fix. Fix in current cycle.
  • Note — optional. Log for later.

2d. Commit and progress

After both reviews pass:

  1. Atomic git commit with conventional commit message
  2. Update progress.json (increment completed_tasks)
  3. Move to next task

Step 3: Wave parallelism

If multiple tasks in the current wave are independent, dispatch them in parallel. Wait for all tasks in a wave to complete before starting the next wave.

Step 4: Phase complete

After all tasks in the plan are done:

  1. Run typecheck on the full project
  2. Run the full test suite
  3. Report summary: tasks completed, commits, review pass/fail rates
  4. Output: "Phase N complete. Run /bayes-ship:ship-plan <next> for the next phase, or /bayes-ship:ship-test for full QA."

Rules

  • Two-stage review is MANDATORY. Never skip it. Never combine the two stages.
  • TDD is the default. If tdd_mode is strict, delete any code written before tests.
  • Every subagent gets a clean context window. No accumulated session garbage.
  • Use the model specified in the task's model attribute when model_routing is auto.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.