ganyuanran/long-task-continuation
Use when a task is multi-step, may span context resets or sessions, uses subagents, or risks losing state before completion.
npx skills add https://github.com/GanyuanRan/Aegis --skill long-task-continuation
Use this skill to keep long tasks checkpointed, resumable, drift-aware, and evidence-gated.
This is a protocol skill. It does not execute plans, dispatch subagents, run tests, or grant completion authority.
Current owner:
Not owned here:
GateDecisionUse this skill when any of these are true:
For short direct answers or one-command checks, do not force this protocol.
Maintain artifacts under docs/aegis/work/YYYY-MM-DD-<slug>/:
| Artifact | File | When |
|----------|------|------|
| TaskIntentDraft | 10-intent.md and optional task-intent-draft.json | Start protocol |
| BaselineReadSetHint | 10-intent.md (inline) | Start protocol |
| BaselineUsageDraft | 10-intent.md (inline) and optional baseline-usage-draft.json | Start protocol and when baseline usage changes |
| ImpactStatementDraft | 10-intent.md (inline) | Start protocol |
| TodoCheckpointDraft | 20-checkpoint.md and optional todo-checkpoint-draft.json | Each checkpoint |
| ResumeStateHint | 20-checkpoint.md (inline) | Each pause/handoff |
| DriftCheckDraft | 20-checkpoint.md (inline) and optional drift-check-draft.json | Per-slice protocol |
| EvidenceBundleDraft | 90-evidence.md and optional evidence-bundle-draft.json | Per-slice protocol |
| Reflection | 99-reflection.md | Completion candidate |
For medium+ complexity tasks only. Low-complexity tasks skip work/.
Execution Readiness View may be included inline in 10-intent.md or the
active checkpoint when the workstream is medium/high, subagent-driven,
handoff-prone, long-running, architecture / contract sensitive, or
compatibility / retirement sensitive. It is a human-readable rendering of
existing drafts and the parent plan, not a new JSON artifact type and not
completion authority.
Planless Slice Lane:
workstream and the current micro-slice only executes or refines one bounded
parent task.
Slice Card:
- Goal:
- Parent plan/spec:
- Files:
- Boundary:
- Verification:
- Stop:
Goal anchors slice-level completeness only.verification-before-completion Goal Closureagainst the parent plan/spec and any active goal frame, rendered through the
unified Aegis impact/safety receipt unless audit detail is requested.
parent plan, existing compatibility boundary, and known verification path.
state is needed.
architecture boundary, migration, persistence, security/permission,
distribution/release surface, or unclear verification boundary appears.
When durable architecture decisions are in scope, these work records are the
preferred ADR Auto Backfill source. Preserve ADR signals, source refs,
alternatives, compatibility boundaries, drift checks, retirement notes, and
baseline-sync questions in the work record instead of relying on memory at
completion time.
These are draft / hint / projection inputs. They are not authoritative runtime records.
When configured Aegis workspace support or installed Aegis workspace support is
available, use it for the target project workspace and lifecycle records:
python <aegis-workspace-helper> init --root <target-project-root>
creation over hand-created files:
python <aegis-workspace-helper> new-work --root <target-project-root> --date YYYY-MM-DD --slug <slug> --title "<title>" --requested-outcome "<outcome>" --scope "<scope>" --change-kind <kind>
python <aegis-workspace-helper> add-checkpoint --root <target-project-root> --work YYYY-MM-DD-<slug> ...
python <aegis-workspace-helper> add-baseline-usage --root <target-project-root> --work YYYY-MM-DD-<slug> ...
python <aegis-workspace-helper> add-evidence --root <target-project-root> --work YYYY-MM-DD-<slug> ...
python <aegis-workspace-helper> add-drift-check --root <target-project-root> --work YYYY-MM-DD-<slug> ...
bundle and check the workspace:
python <aegis-workspace-helper> bundle --root <target-project-root> --work YYYY-MM-DD-<slug>
python <aegis-workspace-helper> check --root <target-project-root>
These helper checks validate workspace structure, index coverage, and JSON
sidecar shape only. They do not determine evidence sufficiency, do not produce
authoritative GateDecision, and do not grant completion authority.
Before long-task execution:
non-goals. Stop condition must allow done, blocked, needs-verification, and
scope-exceeded outcomes.
an Execution Readiness View:
needs-baseline-readback.aegis-workspace.py new-work tocreate/index the first docs/aegis/work/ files and run `check --root
<target-project-root>` before continuing.
Before each work slice, restate:
Execution Readiness View alignment when one existsFor micro-slices under an existing parent plan, use the Planless Slice Lane and
state the Slice Card instead of opening a new planning/specification artifact.
After each work slice, update:
aegis-workspace.py add-checkpoint,aegis-workspace.py add-baseline-usage, aegis-workspace.py add-evidence, and aegis-workspace.py add-drift-check
when available
When patch-shape/ripple triage, an H-class finding, or a bounded compatibility
mitigation fired, a locally green result does not clear that direction. Reuse
checkpoint prose and evidence refs to retain PatchShape, CanonicalOwner,
UpwardDrillSignal, decision, latest outcome, and one bounded evidence ref;
do not copy raw logs or full diffs.
If no fresh evidence exists, the state is needs-verification or partial.
When resuming:
CONTEXT.md language for non-trivial work.Execution Readiness View if present.retirement, test, and review locks.
establishing-project-context for semantic conflict; otherwise pause or
return to planning.
10. Before an unplanned repair, read retained invariant, owner seam, patch shape,
and causal topology and route comparison to systematic-debugging; a new
carrier name alone does not prove a new direction.
Never resume from memory alone.
Answer these after each slice:
Execution Readiness View exists, does the active slice still matchits intent lock, scope fence, baseline lock, compatibility boundary,
retirement boundary, test obligations, and review gates?
Allowed decisions:
continuepause-for-userneeds-baseline-readbackneeds-verificationblockedForbidden decisions:
gate-passedcompletion-grantedauthoritatively-safeBefore saying work is complete:
--work YYYY-MM-DD-<slug>` if the helper is available and a work record
exists.
python <aegis-workspace-helper> check --root <target-project-root>if the helper is available and the task wrote docs/aegis/ records.
GateInputPack as future-runtime input only.proof bundle, drift checks, evidence refs, and ADR signals into
aegis:verification-before-completion for ADR Backfill Check.
Method Pack output is verified evidence and advisory judgment only. It is not authoritative completion.
Use this shape for long-task updates:
Aegis Visibility: why checkpoint, resume, drift, handoff, or parent-plandiscipline is shaping the next step
TodoCheckpointDraft: current todo, completed todos, active slice, next stepBaselineUsageDraft: required refs, acknowledged refs, cited refs, missing refs, decisionExecution Readiness View: present | absent | refreshed | stale, and thealignment signal when present
Evidence: commands, files, logs, or manual checksDriftCheckDraft: scope, compatibility, retirement, decisionRisk / Unknown: unresolved blockers or missing evidenceNext: the next smallest safe actionTake ganyuanran/long-task-continuation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.