agentleFS
kody-wkody-w/rappterbook/.claude/skills/resume-session/SKILL.md

resume-session

Skill18 starsChanged 6 months agoMITView on GitHub

Read-only cold-start pickup for a Rappterbook session. Reconstruct only the context needed for the current task and report what is running without changing shared services, artifacts, dashboards, or schedules.

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat a shared checkout as live.

    line 25
  2. Very specific:

    After the notebook, read AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, and the nearest scoped instruction file as relevant to the …

    line 36
  3. Distinctive:

    If the current task explicitly concerns seeds, the following is a read-only summary:

    line 41
  4. Very specific:

    Never invoke scripts/copilot-infinite.sh from this skill.

    line 132
  5. Distinctive:

    Never restart a simulator or shared fleet merely because a PID or log is absent.

    line 133
  6. Very specific:

    Never use nohup, anonymous background jobs, or broad process killing.

    line 134
  7. Distinctive:

    Do not treat an isolated artifact build or a status answer as authorization to touch shared services.

    line 135
  8. Distinctive:

    Only perform one of these when the current user request names that operation and its target:

    line 143
  9. Distinctive:

    Keep the result concise and distinguish facts from skipped or unavailable checks:

    line 156
  10. Distinctive:

    Never report a service as healthy, an artifact as harvested, or a schedule as active unless this session measured or performed that exact …

    line 168

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

Reconstruct only enough state to answer the current request. The default is observational: do not write files, start or stop processes, harvest artifacts, rebuild dashboards, create schedules, or touch another agent's work.

1. Bind the check to the active repository and task

Resolve the repository from the current checkout; never assume a username or an old memory path:

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd -P)"
printf 'Repository: %s\n' "$REPO_ROOT"
git -C "$REPO_ROOT" status --short --branch

Treat a shared checkout as live. Do not reset, switch branches, clean files, or inspect unrelated project/artifact trees. If the user's task is unrelated to the simulator or fleet, skip all simulator and fleet checks.

2. Read only relevant continuity

For a Rappterbook session, read LAB_NOTEBOOK.md first—every entry, newest first—including the current recommended next move. This is mandatory continuity even for a task-scoped check. It informs what the experiment is currently attempting, but it does not authorize unrelated work or a notebook write.

After the notebook, read AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, and the nearest scoped instruction file as relevant to the current task. Use the notebook, current branch/status, and recent history as the sources of truth. Do not crawl home-directory memory stores or assume files from a previous machine still exist.

If the current task explicitly concerns seeds, the following is a read-only summary:

(
  cd "$REPO_ROOT" || exit 1
  SEEDS_PATH="${SEEDS_PATH:-$REPO_ROOT/state/seeds.json}" \
  PYTHONPATH="$REPO_ROOT/scripts" \
  python3 -c '
import contextlib
import io
import json
import os
from pathlib import Path

from state_io import load_json

path = Path(os.environ["SEEDS_PATH"])

def unknown(reason):
    print(json.dumps({"status": "UNKNOWN", "source": str(path), "reason": reason}))
    raise SystemExit(2)

if not path.is_file():
    unknown("seed state is missing")

try:
    with path.open("rb") as stream:
        stream.read(1)
except OSError as exc:
    unknown(f"seed state is unreadable: {exc}")

diagnostics = io.StringIO()
try:
    with contextlib.redirect_stderr(diagnostics):
        state = load_json(path)
except (OSError, RuntimeError, ValueError) as exc:
    unknown(f"seed state could not be loaded: {exc}")

warning = diagnostics.getvalue().strip()
if warning:
    unknown(warning)
if not isinstance(state, dict):
    unknown("seed state root is not an object")

missing = object()
active_value = state.get("active", missing)
if active_value is missing:
    active = {}
    no_active = False
elif active_value is None:
    active = {}
    no_active = True
elif isinstance(active_value, dict):
    active = active_value
    no_active = False
else:
    unknown("active seed is neither an object nor null")

convergence = active.get("convergence")
if convergence is None:
    convergence = {}
elif not isinstance(convergence, dict):
    unknown("active convergence is neither an object nor null")

queue = state.get("queue")
queued = len(queue) if isinstance(queue, list) else "UNKNOWN"
summary = {
    "seed": None if no_active else active.get("id", "UNKNOWN"),
    "frames": None if no_active else active.get("frames_active", "UNKNOWN"),
    "convergence": None if no_active else convergence.get("score", "UNKNOWN"),
    "resolved": None if no_active else convergence.get("resolved", "UNKNOWN"),
    "queued": queued,
}
status = "UNKNOWN" if "UNKNOWN" in summary.values() else "OK"
print(json.dumps({
    "status": status,
    **summary,
}))
raise SystemExit(0 if status == "OK" else 2)
'
)

Missing, unreadable, corrupt, or structurally invalid state prints a visible UNKNOWN result and exits 2. An absent or null active seed is handled as no active seed; an absent or non-list queue is UNKNOWN, never zero.

3. Keep platform and engine ownership intact

The private engine owns long-running simulation and fleet lifecycle. In particular:

  • Never invoke scripts/copilot-infinite.sh from this skill.
  • Never restart a simulator or shared fleet merely because a PID or log is absent.
  • Never use nohup, anonymous background jobs, or broad process killing.
  • Do not treat an isolated artifact build or a status answer as authorization to touch shared services.

For a task that explicitly asks for engine health, use the owner-documented read-only health surface. If none is available, report that health was not measured.

4. Require precise authorization for every mutation

Only perform one of these when the current user request names that operation and its target:

OperationRequired before acting
Restart/start/stopConfirm the exact owned service and use its supported managed or foreground command. Never kill by name.
HarvestConfirm the exact project and destination, run its documented dry-run first, show the result, then ask before the real harvest if not already explicit. Never push or publish implicitly.
Rebuild a dashboardConfirm the named dashboard is in scope and that the files are not owned by another live agent.
Create a scheduleConfirm the exact job, cadence, duration, and owner. Never create recurring jobs as session setup.

Authorization for one operation does not authorize the others.

5. Report observed state

Keep the result concise and distinguish facts from skipped or unavailable checks:

SESSION CONTEXT
Repository/worktree: [...]
Branch and local changes: [...]
Task-relevant state: [...]
Shared services: [observed / not checked]
Mutations performed: none
Next authorized action: [...]

Never report a service as healthy, an artifact as harvested, or a schedule as active unless this session measured or performed that exact action.

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.