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