Load this skill when you are about to work on a large project that will span multiple sessions / context windows and you need continuity, atomic handoffs, and recovery from broken states.
The skill gives you a tiny CLI (scripts/lra_cli.py) that maintains a .lra/
directory: a machine-readable feature-list.json (atomic features with
acceptance criteria and status) and a human/agent-readable progress.txt
(session log). The protocol turns “one big vague task” into a sequence of
small, fully-tested, check-pointed features.
AI agents working across many context windows hit three failure modes:
LRA fixes this with: structured init, one atomic feature per session, an
explicit test gate before done, and a checkpoint after every feature so the
next session can recover.
lra, checkpoint, feature list, long running,
продолжи работу над проектом, долгая сессия, план фич, статус проекта.If the task is small and finishes in one session, you do not need this skill — just do the work.
PATH (the CLI is pure stdlib, no dependencies)..lra/ there).python3 scripts/lra_cli.py init "Short project description"
Creates .lra/feature-list.json ({"project": ..., "features": [], "created": <date>})
and .lra/progress.txt with a header. Refuses (exit 1) if .lra/ already
exists, so you never clobber an in-progress project.
Add atomic, testable features. Each gets an id (f1, f2, …), a name,
a priority (high/medium/low), and criteria (acceptance criteria).
python3 scripts/lra_cli.py add "User registration endpoint" --priority high \
--criteria "POST /api/auth/register accepts email+password; validates email; hashes password; returns JWT"
Rule: a feature must be completable in one session and have concrete acceptance criteria. “Build the user system” is too big — split it.
status and read .lra/progress.txt to see where you are.todo (or wip you abandoned).mark f<N> done only after verification passes.checkpoint "Implemented X and Y; tests green".python3 scripts/lra_cli.py mark f1 done
python3 scripts/lra_cli.py checkpoint "User registration: endpoint + validation + tests"
checkpoint "<message>" appends a timestamped line to progress.txt.
Always checkpoint at the end of a session, even for partial work.recover prints the last 10 progress lines plus a summary of wip
features — use it at the start of a session or after a broken state to see
what was in flight.status prints a table of all features (id, name, priority, status) sorted
todo → wip → done, so you always know the current state at a glance.
feature-list.json before closing the session — mark status,
add notes, add newly discovered sub-features with add.add --criteria.done until its criteria are
verified end-to-end.done without verification. Marking done on unverified
work poisons the next session’s context..lra/. init refuses if it exists; recover from the
log instead of recreating.SKILL.md — this fileskill.json — manifestscripts/lra_cli.py — the stdlib CLI (init, add, mark, checkpoint,
status, recover)references/lra-workflow.md — full reference: .lra/ file structure, JSON
schemas, a worked example, the session checklist, and troubleshooting# For opencode
cp -r skills/long-running-agent-workflow ~/.config/opencode/skills/
# For other agents: copy the folder to your skills directory; requires Python 3.
Key principle: leave the codebase in a testable, working state at the end of every session. The next session (and the next agent) picks up from the last checkpoint, not from amnesia.