agentleFS
EmeaAppGbbEmeaAppGbb/spec2cloud/.github/skills/resume/SKILL.md

resume

Skill100 starsChanged 7 months agoMITView on GitHub

Resume a spec2cloud session from saved state. Read state.json, determine position, re-validate by running tests, handle human edits during pause. Use at CLI session start, after interruption, or when continuing work from a previous session.

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 48 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If it does not exist → start from Phase 0

    line 13
  2. Distinctive:

    If it exists → read it and resume

    line 14
  3. Very specific:

    If in increment-delivery, parse currentIncrement and find the current step

    line 18
  4. Distinctive:

    Run the test suite appropriate for the current position:

    line 22
  5. Distinctive:

    If validation matches state → continue

    line 30
  6. Distinctive:

    If validation differs → update state to reflect actual results, log the discrepancy, then continue

    line 31
  7. Distinctive:

    Treat re-validation results as the new ground truth

    line 36
  8. Distinctive:

    Do not revert human edits — adjust your plan to the new state

    line 37
  9. Very specific:

    BLOCKING: If state.json is missing or unparseable, the orchestrator must initialize from Phase 0 (not guess).

    line 52

“Common” is measured: kept by at least 6 in 10 of the 48 edited versions of this file we could read. “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

Resume Protocol

On every CLI session start, check for existing state.

Steps

  1. Check for .spec2cloud/state.json.
    • If it does not exist → start from Phase 0
    • If it exists → read it and resume
  2. Read state and determine position.
    • Parse currentPhase — are we in setup, discovery, or increment-delivery?
    • If in increment-delivery, parse currentIncrement and find the current step
    • Identify what was last completed and what's next
  3. Re-validate.
    • Run the test suite appropriate for the current position:
      • Phase 1b: verify prototype HTML files exist in specs/ui/prototypes/
      • Phase 1c: verify specs/increment-plan.md exists
      • Phase 1d: verify specs/tech-stack.md exists, skills referenced are present
      • Step 1 (tests): verify test files exist and compile
      • Step 2 (contracts): verify contract files exist and shared types compile
      • Step 3 (implementation): run test suite for current slice, compare results to state
      • Step 4 (verification): check deployment status, run smoke tests
    • If validation matches state → continue
    • If validation differs → update state to reflect actual results, log the discrepancy, then continue
  4. Handle human edits during pause.
    • Humans may edit specs, tests, or code while the agent is paused
    • On resume, re-validation catches these changes
    • Treat re-validation results as the new ground truth
    • Do not revert human edits — adjust your plan to the new state
  5. Continue the Ralph loop from the determined position.

Mandatory Completion Checklist

The orchestrator MUST verify ALL of the following before resuming work:

  • .spec2cloud/state.json exists and is valid JSON
  • Current phase and increment are determined from state
  • Re-validation ran for the current step (tests compile, builds pass, deployment status checked — as appropriate)
  • If re-validation results differ from state, state was updated to reflect reality
  • Human edits during pause (if any) are detected and treated as ground truth — not reverted
  • Audit log entry records the resume event with any discrepancies found

BLOCKING: If state.json is missing or unparseable, the orchestrator must initialize from Phase 0 (not guess). If re-validation fails, the orchestrator must update state before proceeding — never resume from stale state.

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.