Long Task Continuation
Overview
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.
Authority Boundary
Current owner:
- Method Pack protocol discipline
Not owned here:
- plan execution
- subagent dispatch
- host daemon / watchdog / automatic retry
- authoritative
GateDecision
- evidence sufficiency final judgment
- completion authority
When To Use
Use this skill when any of these are true:
- the task has multiple phases or more than one meaningful work slice
- the task may be interrupted, compacted, resumed, or handed off
- the task uses subagents
- the user explicitly asks for long-task continuity, resume safety, or avoiding drift
- the task changes architecture, contracts, shared workflows, or verification gates
For short direct answers or one-command checks, do not force this protocol.
Multi-step, todo-driven, or subagent-using tasks do not force durable records by themselves; keep an inline checkpoint unless the task also crosses sessions, needs handoff, or requires resumable state.
Required Artifacts
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:
Use this lane when a parent plan or parent spec already owns the long-task
workstream and the current micro-slice only executes or refines one bounded
parent task.
Record a compact Slice Card instead of creating another durable plan/spec:
Slice Card:
- Goal:
- Parent plan/spec:
- Files:
- Boundary:
- Verification:
- Stop:
Slice Card Goal anchors slice-level completeness only.
It does not by itself grant whole-task completion.
Final completion still requires verification-before-completion Goal Closure
against the parent plan/spec and any active goal frame, rendered through the
unified Aegis impact/safety receipt unless audit detail is requested.
Do not create new plan/spec files for micro-slices that stay inside the
parent plan, existing compatibility boundary, and known verification path.
Update the existing checkpoint, evidence, and drift records when persistent
state is needed.
Escalate out of this lane only when a new owner, contract, schema, public API,
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.
Workspace Helper Protocol
When configured Aegis workspace support or installed Aegis workspace support is
available, use it for the target project workspace and lifecycle records:
Initialize before writing work records:
python <aegis-workspace-helper> init --root <target-project-root>
For a new medium+ task process trail, prefer helper-backed lifecycle
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>
After each slice, update checkpoint, evidence, and drift through the helper:
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-attempt --root <target-project-root> --work YYYY-MM-DD-<slug> --slice-id <slice-id> --attempt-id <attempt-id> --attempt-status failed ...
python <aegis-workspace-helper> add-evidence --root <target-project-root> --work YYYY-MM-DD-<slug> --slice-id <slice-id> --evidence-status <terminal-status> ...
python <aegis-workspace-helper> add-drift-check --root <target-project-root> --work YYYY-MM-DD-<slug> ...
Use add-attempt for a failed verification retry inside the current slice.
Use add-evidence only after the slice reaches evidence-finalized,
blocked, or abandoned. Do not let a failed attempt create another slice
or a formal evidence sidecar.
Before pause, handoff, or completion candidate, assemble a structural proof
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.
Start Protocol
Before long-task execution:
- State the requested outcome, scope, non-goals, and risk hints.
- If goal framing exists, restate goal, success evidence, stop condition, and
non-goals. Stop condition must allow done, blocked, needs-verification, and
scope-exceeded outcomes.
- Identify baseline refs that must be read before changing files.
- Record baseline usage state:
- required baseline refs
- optionally delivered context refs when the host can project them
- acknowledged before plan refs
- cited in plan refs
- missing refs
- Create or update the todo map.
- If the parent plan or workstream needs an execution handoff, render or link
an
Execution Readiness View:
- intent lock
- scope fence
- baseline lock
- owner / contract constraints
- compatibility boundary
- retirement boundary
- task batches
- test obligations
- review gates
- drift / rewind rules
- evidence required before completion
- advisory boundary
- Create the first checkpoint:
- current todo
- active slice
- completed todos
- evidence refs
- blocked-on items
- next step
- If baseline refs are missing, pause in
needs-baseline-readback.
- If the workspace helper is available, use
aegis-workspace.py new-work to
create/index the first docs/aegis/work/ files and run check --root <target-project-root> before continuing.
Retry Convergence Protocol
A failed verification is another attempt in the current slice, not a new slice.
- Reuse the current
activeSlice as the --slice-id.
- Record each retry with
add-attempt, not add-evidence.
- Do not append failed attempts to
90-evidence.md.
- Do not create a normal commit for attempt telemetry.
- A process-only diff under
docs/aegis/ does not restart completed business-code verification.
- When
add-attempt reports process-artifact-pressure, stop auto-retry and route to systematic-debugging or verification-before-completion.
Only terminal evidence (evidence-finalized, blocked, or abandoned) is
eligible for bundle.
Per-Slice Protocol
Before each work slice, restate:
- current goal
- current todo
- intended edits
- explicit non-edits
- verification command or manual check
Execution Readiness View alignment when one exists
For 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:
- completed todos
- evidence refs
- baseline usage if newly required refs were acknowledged, cited, or found missing
- blockers
- next step
- drift check
- helper-backed JSON sidecars through
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
- failed verification:
add-attempt with the current --slice-id; do not add
terminal evidence or create a process-only commit
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.
Resume Protocol
When resuming:
- Read latest checkpoint.
- Read latest resume hint if present.
- Re-read original task intent.
- Re-read required baseline refs.
- Passively re-read relevant active
CONTEXT.md language for non-trivial work.
- Re-read the
Execution Readiness View if present.
- Compare current worktree state with checkpoint claims.
- Compare the slice with the view's intent, scope, baseline, compatibility,
retirement, test, and review locks.
- If any disagreement exists among the checkpoint, baseline, context, view, and
worktree, compose
establishing-project-context for a semantic conflict; for
any other disagreement, pause or return to planning.
- 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.
Drift Check
Answer these after each slice:
- Does the current work still serve the original task intent?
- Does the current work still serve the goal and stop condition?
- Did the slice stay inside the compatibility boundary?
- Did any new owner, fallback, adapter, or branch appear?
- Is the retirement track still explicit?
- Did the evidence bundle grow enough to support the next claim?
- If an
Execution Readiness View exists, does the active slice still match
its intent lock, scope fence, baseline lock, compatibility boundary,
retirement boundary, test obligations, and review gates?
Allowed decisions:
continue
pause-for-user
needs-baseline-readback
needs-verification
blocked
Forbidden decisions:
gate-passed
completion-granted
authoritatively-safe
Completion Candidate Protocol
Before saying work is complete:
- Use aegis:verification-before-completion.
- Confirm every todo has a status.
- Confirm blockers are resolved or externalized.
- Confirm evidence refs cover the acceptance criteria.
- Confirm drift check has no blocking state.
- Run
python <aegis-workspace-helper> bundle --root <target-project-root> --work YYYY-MM-DD-<slug> if the helper is available and a work record
exists.
- Run
python <aegis-workspace-helper> check --root <target-project-root>
if the helper is available and the task wrote docs/aegis/ records.
- Treat the generated
GateInputPack as future-runtime input only.
- If durable architecture decisions were in scope, pass the work record,
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.
Minimal Reporting Shape
Use this shape for long-task updates:
Aegis Visibility: why checkpoint, resume, drift, handoff, or parent-plan
discipline is shaping the next step
TodoCheckpointDraft: current todo, completed todos, active slice, next step
BaselineUsageDraft: required refs, acknowledged refs, cited refs, missing refs, decision
Execution Readiness View: present | absent | refreshed | stale, and the
alignment signal when present
Evidence: commands, files, logs, or manual checks
Process Artifact Pressure: attempted slices, retry count, terminal state,
and whether convergence-stop is active
DriftCheckDraft: scope, compatibility, retirement, decision
Risk / Unknown: unresolved blockers or missing evidence
Next: the next smallest safe action
1---
2name: long-task-continuation
3description: "Use when a task is multi-step, may span context resets or sessions, uses subagents, or risks losing state before completion."
4metadata:
5 source: https://skillmd.com/skills/ganyuanran/long-task-continuation
6---
7
8# Long Task Continuation
9
10## Overview
11
12Use this skill to keep long tasks checkpointed, resumable, drift-aware, and evidence-gated.
13
14This is a protocol skill. It does not execute plans, dispatch subagents, run tests, or grant completion authority.
15
16## Authority Boundary
17
18Current owner:
19
20- Method Pack protocol discipline
21
22Not owned here:
23
24- plan execution
25- subagent dispatch
26- host daemon / watchdog / automatic retry
27- authoritative `GateDecision`
28- evidence sufficiency final judgment
29- completion authority
30
31## When To Use
32
33Use this skill when any of these are true:
34
35- the task has multiple phases or more than one meaningful work slice
36- the task may be interrupted, compacted, resumed, or handed off
37- the task uses subagents
38- the user explicitly asks for long-task continuity, resume safety, or avoiding drift
39- the task changes architecture, contracts, shared workflows, or verification gates
40
41For short direct answers or one-command checks, do not force this protocol.
42
43Multi-step, todo-driven, or subagent-using tasks do not force durable records by themselves; keep an inline checkpoint unless the task also crosses sessions, needs handoff, or requires resumable state.
44
45## Required Artifacts
46
47Maintain artifacts under `docs/aegis/work/YYYY-MM-DD-<slug>/`:
48
49| Artifact | File | When |
50|----------|------|------|
51| TaskIntentDraft | `10-intent.md` and optional `task-intent-draft.json` | Start protocol |
52| BaselineReadSetHint | `10-intent.md` (inline) | Start protocol |
53| BaselineUsageDraft | `10-intent.md` (inline) and optional `baseline-usage-draft.json` | Start protocol and when baseline usage changes |
54| ImpactStatementDraft | `10-intent.md` (inline) | Start protocol |
55| TodoCheckpointDraft | `20-checkpoint.md` and optional `todo-checkpoint-draft.json` | Each checkpoint |
56| ResumeStateHint | `20-checkpoint.md` (inline) | Each pause/handoff |
57| DriftCheckDraft | `20-checkpoint.md` (inline) and optional `drift-check-draft.json` | Per-slice protocol |
58| EvidenceBundleDraft | `90-evidence.md` and optional `evidence-bundle-draft.json` | Per-slice protocol |
59| Reflection | `99-reflection.md` | Completion candidate |
60
61For medium+ complexity tasks only. Low-complexity tasks skip work/.
62
63`Execution Readiness View` may be included inline in `10-intent.md` or the
64active checkpoint when the workstream is medium/high, subagent-driven,
65handoff-prone, long-running, architecture / contract sensitive, or
66compatibility / retirement sensitive. It is a human-readable rendering of
67existing drafts and the parent plan, not a new JSON artifact type and not
68completion authority.
69
70Planless Slice Lane:
71
72- Use this lane when a parent plan or parent spec already owns the long-task
73 workstream and the current micro-slice only executes or refines one bounded
74 parent task.
75- Record a compact Slice Card instead of creating another durable plan/spec:
76
77 ```text
78 Slice Card:
79 - Goal:
80 - Parent plan/spec:
81 - Files:
82 - Boundary:
83 - Verification:
84 - Stop:
85 ```
86
87- Slice Card `Goal` anchors slice-level completeness only.
88- It does not by itself grant whole-task completion.
89- Final completion still requires `verification-before-completion` Goal Closure
90 against the parent plan/spec and any active goal frame, rendered through the
91 unified Aegis impact/safety receipt unless audit detail is requested.
92
93- Do not create new plan/spec files for micro-slices that stay inside the
94 parent plan, existing compatibility boundary, and known verification path.
95- Update the existing checkpoint, evidence, and drift records when persistent
96 state is needed.
97- Escalate out of this lane only when a new owner, contract, schema, public API,
98 architecture boundary, migration, persistence, security/permission,
99 distribution/release surface, or unclear verification boundary appears.
100
101When durable architecture decisions are in scope, these work records are the
102preferred ADR Auto Backfill source. Preserve ADR signals, source refs,
103alternatives, compatibility boundaries, drift checks, retirement notes, and
104baseline-sync questions in the work record instead of relying on memory at
105completion time.
106
107These are draft / hint / projection inputs. They are not authoritative runtime records.
108
109## Workspace Helper Protocol
110
111When configured Aegis workspace support or installed Aegis workspace support is
112available, use it for the target project workspace and lifecycle records:
113
1141. Initialize before writing work records:
115
116 ```bash
117 python <aegis-workspace-helper> init --root <target-project-root>
118 ```
119
1202. For a new medium+ task process trail, prefer helper-backed lifecycle
121 creation over hand-created files:
122
123 ```bash
124 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>
125 ```
126
1273. After each slice, update checkpoint, evidence, and drift through the helper:
128
129 ```bash
130 python <aegis-workspace-helper> add-checkpoint --root <target-project-root> --work YYYY-MM-DD-<slug> ...
131 python <aegis-workspace-helper> add-baseline-usage --root <target-project-root> --work YYYY-MM-DD-<slug> ...
132 python <aegis-workspace-helper> add-attempt --root <target-project-root> --work YYYY-MM-DD-<slug> --slice-id <slice-id> --attempt-id <attempt-id> --attempt-status failed ...
133 python <aegis-workspace-helper> add-evidence --root <target-project-root> --work YYYY-MM-DD-<slug> --slice-id <slice-id> --evidence-status <terminal-status> ...
134 python <aegis-workspace-helper> add-drift-check --root <target-project-root> --work YYYY-MM-DD-<slug> ...
135 ```
136
137 Use `add-attempt` for a failed verification retry inside the current slice.
138 Use `add-evidence` only after the slice reaches `evidence-finalized`,
139 `blocked`, or `abandoned`. Do not let a failed attempt create another slice
140 or a formal evidence sidecar.
141
1424. Before pause, handoff, or completion candidate, assemble a structural proof
143 bundle and check the workspace:
144
145 ```bash
146 python <aegis-workspace-helper> bundle --root <target-project-root> --work YYYY-MM-DD-<slug>
147 python <aegis-workspace-helper> check --root <target-project-root>
148 ```
149
150These helper checks validate workspace structure, index coverage, and JSON
151sidecar shape only. They do not determine evidence sufficiency, do not produce
152authoritative `GateDecision`, and do not grant completion authority.
153
154## Start Protocol
155
156Before long-task execution:
157
1581. State the requested outcome, scope, non-goals, and risk hints.
1592. If goal framing exists, restate goal, success evidence, stop condition, and
160 non-goals. Stop condition must allow done, blocked, needs-verification, and
161 scope-exceeded outcomes.
1623. Identify baseline refs that must be read before changing files.
1634. Record baseline usage state:
164 - required baseline refs
165 - optionally delivered context refs when the host can project them
166 - acknowledged before plan refs
167 - cited in plan refs
168 - missing refs
1695. Create or update the todo map.
1706. If the parent plan or workstream needs an execution handoff, render or link
171 an `Execution Readiness View`:
172 - intent lock
173 - scope fence
174 - baseline lock
175 - owner / contract constraints
176 - compatibility boundary
177 - retirement boundary
178 - task batches
179 - test obligations
180 - review gates
181 - drift / rewind rules
182 - evidence required before completion
183 - advisory boundary
1847. Create the first checkpoint:
185 - current todo
186 - active slice
187 - completed todos
188 - evidence refs
189 - blocked-on items
190 - next step
1918. If baseline refs are missing, pause in `needs-baseline-readback`.
1929. If the workspace helper is available, use `aegis-workspace.py new-work` to
193 create/index the first `docs/aegis/work/` files and run `check --root
194 <target-project-root>` before continuing.
195
196## Retry Convergence Protocol
197
198A failed verification is another attempt in the current slice, not a new slice.
199
200- Reuse the current `activeSlice` as the `--slice-id`.
201- Record each retry with `add-attempt`, not `add-evidence`.
202- Do not append failed attempts to `90-evidence.md`.
203- Do not create a normal commit for attempt telemetry.
204- A process-only diff under `docs/aegis/` does not restart completed business-code verification.
205- When `add-attempt` reports `process-artifact-pressure`, stop auto-retry and route to `systematic-debugging` or `verification-before-completion`.
206
207Only terminal evidence (`evidence-finalized`, `blocked`, or `abandoned`) is
208eligible for `bundle`.
209
210## Per-Slice Protocol
211
212Before each work slice, restate:
213
2141. current goal
2152. current todo
2163. intended edits
2174. explicit non-edits
2185. verification command or manual check
2196. `Execution Readiness View` alignment when one exists
220
221For micro-slices under an existing parent plan, use the Planless Slice Lane and
222state the Slice Card instead of opening a new planning/specification artifact.
223
224After each work slice, update:
225
2261. completed todos
2272. evidence refs
2283. baseline usage if newly required refs were acknowledged, cited, or found missing
2294. blockers
2305. next step
2316. drift check
2327. helper-backed JSON sidecars through `aegis-workspace.py add-checkpoint`,
233 `aegis-workspace.py add-baseline-usage`, `aegis-workspace.py add-evidence`, and `aegis-workspace.py add-drift-check`
234 when available
2358. failed verification: `add-attempt` with the current `--slice-id`; do not add
236 terminal evidence or create a process-only commit
237
238When patch-shape/ripple triage, an H-class finding, or a bounded compatibility
239mitigation fired, a locally green result does not clear that direction. Reuse
240checkpoint prose and evidence refs to retain `PatchShape`, `CanonicalOwner`,
241`UpwardDrillSignal`, decision, latest outcome, and one bounded evidence ref;
242do not copy raw logs or full diffs.
243
244If no fresh evidence exists, the state is `needs-verification` or `partial`.
245
246## Resume Protocol
247
248When resuming:
249
2501. Read latest checkpoint.
2512. Read latest resume hint if present.
2523. Re-read original task intent.
2534. Re-read required baseline refs.
2545. Passively re-read relevant active `CONTEXT.md` language for non-trivial work.
2556. Re-read the `Execution Readiness View` if present.
2567. Compare current worktree state with checkpoint claims.
2578. Compare the slice with the view's intent, scope, baseline, compatibility,
258 retirement, test, and review locks.
2599. If any disagreement exists among the checkpoint, baseline, context, view, and
260 worktree, compose `establishing-project-context` for a semantic conflict; for
261 any other disagreement, pause or return to planning.
26210. Before an unplanned repair, read retained invariant, owner seam, patch shape,
263 and causal topology and route comparison to `systematic-debugging`; a new
264 carrier name alone does not prove a new direction.
265
266Never resume from memory alone.
267
268## Drift Check
269
270Answer these after each slice:
271
272- Does the current work still serve the original task intent?
273- Does the current work still serve the goal and stop condition?
274- Did the slice stay inside the compatibility boundary?
275- Did any new owner, fallback, adapter, or branch appear?
276- Is the retirement track still explicit?
277- Did the evidence bundle grow enough to support the next claim?
278- If an `Execution Readiness View` exists, does the active slice still match
279 its intent lock, scope fence, baseline lock, compatibility boundary,
280 retirement boundary, test obligations, and review gates?
281
282Allowed decisions:
283
284- `continue`
285- `pause-for-user`
286- `needs-baseline-readback`
287- `needs-verification`
288- `blocked`
289
290Forbidden decisions:
291
292- `gate-passed`
293- `completion-granted`
294- `authoritatively-safe`
295
296## Completion Candidate Protocol
297
298Before saying work is complete:
299
3001. Use aegis:verification-before-completion.
3012. Confirm every todo has a status.
3023. Confirm blockers are resolved or externalized.
3034. Confirm evidence refs cover the acceptance criteria.
3045. Confirm drift check has no blocking state.
3056. Run `python <aegis-workspace-helper> bundle --root <target-project-root>
306 --work YYYY-MM-DD-<slug>` if the helper is available and a work record
307 exists.
3087. Run `python <aegis-workspace-helper> check --root <target-project-root>`
309 if the helper is available and the task wrote `docs/aegis/` records.
3108. Treat the generated `GateInputPack` as future-runtime input only.
3119. If durable architecture decisions were in scope, pass the work record,
312 proof bundle, drift checks, evidence refs, and ADR signals into
313 aegis:verification-before-completion for ADR Backfill Check.
314
315Method Pack output is verified evidence and advisory judgment only. It is not authoritative completion.
316
317## Minimal Reporting Shape
318
319Use this shape for long-task updates:
320
321- `Aegis Visibility`: why checkpoint, resume, drift, handoff, or parent-plan
322 discipline is shaping the next step
323- `TodoCheckpointDraft`: current todo, completed todos, active slice, next step
324- `BaselineUsageDraft`: required refs, acknowledged refs, cited refs, missing refs, decision
325- `Execution Readiness View`: present | absent | refreshed | stale, and the
326 alignment signal when present
327- `Evidence`: commands, files, logs, or manual checks
328- `Process Artifact Pressure`: attempted slices, retry count, terminal state,
329 and whether convergence-stop is active
330- `DriftCheckDraft`: scope, compatibility, retirement, decision
331- `Risk / Unknown`: unresolved blockers or missing evidence
332- `Next`: the next smallest safe action