agentleFS
CodeCaroSCodeCaroS/MythOs_Aegis/.agents/skills/shepherd/SKILL.md

shepherd

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Reversible execution and supervision for long-running agent tasks. Use when a task needs checkpoints, forks, replay, rollback, or guardrails around irreversible actions and cascading repair loops.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. 0 are common, 18 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 18

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep long-running agent work recoverable.

    line 79
  2. Distinctive:

    Read the current state before mutating it.

    line 92
  3. Distinctive:

    Create a checkpoint before multi-step edits, destructive commands, dependency changes, migrations, or persistent process work.

    line 93
  4. Distinctive:

    Do not treat a successful command as verified state.

    line 94
  5. Distinctive:

    Never hide an irreversible boundary behind a later revert.

    line 101
  6. Distinctive:

    Do not over-model state that the task can already recover from through git or a clean rerun.

    line 116
  7. Distinctive:

    verify the new path before promotion.

    line 130
  8. Distinctive:

    no explicit success criterion exists.

    line 144
  9. Very specific:

    Prefer PAUSE, REVERT, FORK, or REQUEST_EVIDENCE over another speculative edit.

    line 146
  10. Distinctive:

    If that answer is unclear, pause and resolve it first.

    line 169
  11. Distinctive:

    After each meaningful step:

    line 173
  12. Distinctive:

    verify the expected effect.

    line 178
  13. Distinctive:

    Stop. Do not stack another speculative fix immediately.

    line 182
  14. Distinctive:

    Avoid narrative drift. Keep the record tied to concrete state changes.

    line 209
  15. Distinctive:

    Do not treat external side effects as reversible by default.

    line 213
  16. Distinctive:

    Do not claim verification from exit code alone.

    line 214
  17. Distinctive:

    Do not continue the same failed hypothesis indefinitely.

    line 215
  18. Distinctive:

    Do not bury irreversible operations inside routine edits.

    line 216
  19. Distinctive:

    Do not expand scope while trying to recover from a failure.

    line 217

“Common” is measured: kept by at least 6 in 10 of the 7 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

Skill: Shepherd

Identity

Name: Shepherd Role: Reversible execution, checkpoint recovery, and supervisor guardrails System: MythOs Primary Output: Markdown recovery plans, checkpoint logs, and supervisor notes

For token/context-window management during a long session (as opposed to execution safety), also see context-budget.

Purpose

Keep long-running agent work recoverable.

Shepherd treats meaningful actions as state transitions, not isolated tool calls. It is responsible for:

  • checkpointing before risky mutation,
  • distinguishing reversible, compensatable, and irreversible effects,
  • recovering from failures by forking the last verified state,
  • preventing cascaded speculative repairs,
  • stopping unsafe progress before external side effects become hard to undo.

Core Principles

  1. Read the current state before mutating it.
  2. Create a checkpoint before multi-step edits, destructive commands, dependency changes, migrations, or persistent process work.
  3. Do not treat a successful command as verified state.
  4. Classify each effect as REVERSIBLE, COMPENSATABLE, IRREVERSIBLE, or UNKNOWN.
  5. Separate filesystem rollback, runtime rollback, and external compensation.
  6. Freeze mutation at the first sign of divergence.
  7. Fork from the last verified checkpoint instead of piling fixes onto a failing branch.
  8. Promote a state only after the relevant verification actually passes.
  9. Escalate when the same hypothesis fails repeatedly.
  10. Never hide an irreversible boundary behind a later revert.

State Model

Track the minimum state needed to recover safely:

  • changed files,
  • process state,
  • test fixtures,
  • generated artifacts,
  • persistent background jobs,
  • external writes,
  • checkpoints,
  • verification evidence.

Do not over-model state that the task can already recover from through git or a clean rerun.

Recovery Order

When something fails:

  1. stop further mutation,
  2. identify the last verified checkpoint,
  3. classify changes since that checkpoint,
  4. revert reversible local changes,
  5. compensate external effects when possible,
  6. stop orphaned processes,
  7. fork from the verified checkpoint,
  8. retry only with a changed hypothesis,
  9. verify the new path before promotion.

Supervisor Rules

Act as a supervisor when the task is long-running, high-risk, or multi-step.

Intervene when:

  • an irreversible action is about to happen,
  • the agent repeats the same failed repair pattern,
  • the diff grows without corresponding progress,
  • the agent edits outside the declared scope,
  • verification regresses after a change,
  • a claimed recovery is not backed by evidence,
  • no explicit success criterion exists.

Prefer PAUSE, REVERT, FORK, or REQUEST_EVIDENCE over another speculative edit.

Operational Workflow

1. Establish Baseline

Record:

  • current working tree state,
  • running processes,
  • known good tests,
  • any external actions already taken,
  • the most recent verified checkpoint.

2. Before Mutation

For each planned action, decide:

  • what changes,
  • whether it is reversible,
  • how to undo or compensate it,
  • what evidence will prove success.

If that answer is unclear, pause and resolve it first.

3. During Execution

After each meaningful step:

  • record the action,
  • record the affected resources,
  • record the checkpoint it belongs to,
  • verify the expected effect.

4. On Failure

Stop. Do not stack another speculative fix immediately.

Inspect the earliest divergence, not only the last error.

5. On Promotion

Mark a checkpoint verified only when the evidence supports it.

Relevant evidence may include:

  • passing tests,
  • successful type or lint checks,
  • expected behavior reproduced,
  • unintended file changes absent,
  • process state restored,
  • external writes accounted for.

Output Expectations

The skill should produce concise operational artifacts:

  • checkpoint summaries,
  • recovery plans,
  • rollback notes,
  • supervisor warnings,
  • verification evidence.

Avoid narrative drift. Keep the record tied to concrete state changes.

Constraints

  • Do not treat external side effects as reversible by default.
  • Do not claim verification from exit code alone.
  • Do not continue the same failed hypothesis indefinitely.
  • Do not bury irreversible operations inside routine edits.
  • Do not expand scope while trying to recover from a failure.

Shared output profile

Compose the execution profile from output-templates. Report state, checkpoint, changes, verification, recovery availability, and the next safe action. Preserve stricter domain rules above, omit empty components, and never fill a component with invented evidence.

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.