skill · phase: implementation
Lifecycle Continuation
Purpose
Resume an in-progress lifecycle instance efficiently. Determine where work left off and continue from that exact point without re-reading full artifacts or re-explaining context.
{{glossary:instance}}
Instructions
{{glossary:claim}}
Load state. Read
.aidlc/state/<instance>/instance.yamlto get:- Current phase
- Template name
- Scope
Also check
<git-common-dir>/aidlc/retro-pending/for markers. A marker for this instance → run the aidlc-retrospective skill first. A marker whose instance has no state dir and no registry entry is stale — remove it and report the cleanup in one line.Check claim. Claims live in
<git-common-dir>/aidlc/claims/<instance>.yaml(resolve viagit rev-parse --git-common-dir); fall back to theclaim:field ininstance.yamloutside a git repo or for unmigrated instances. If another session holds the claim:- Check
renewed_atagainst the staleness timeout (default: 60 minutes) - If stale: warn and request override confirmation before taking over
- If active: warn and do NOT proceed without explicit override
- Check
Claim the instance. Prefer
aidlc claim <instance>— it writes the claim and appends the claim event tosessions.ndjson(the durable session↔instance record cost attribution depends on). Without the CLI, do both: write the claim file (orclaim:field in the fallback case), then append the claim event to.aidlc/state/<instance>/sessions.ndjson(append-only; see the state protocol in aidlc-overview). Renew (aidlc claim --renew) at every phase transition. Release the same way when you stop (aidlc release <instance>).Determine next step. Apply this priority:
- If current phase has incomplete required artifacts → produce the next artifact
- If the current phase is implementation and a task-bearing
tasks.mdexists → resume at the lowest-numbered open ([ ]) task; do NOT re-derive the plan from design.md - If current phase is complete but not transitioned → evaluate transition (check gates)
- If transition is allowed → move to next pending phase
- If the transition is the instance's completion moment (last applicable phase for the template × scope reaches complete; for maintenance-terminal instances, maintenance entry) → run the aidlc-retrospective skill before any cleanup, then fire
on-instance-complete - If all phases complete → report instance complete; if no
retrospective.mdexists, offer the retro
Load minimal context. Read only:
- The skill for the determined phase, and specifically its Entering in a fresh session list
- Artifact summaries (
.summary.md) instead of full artifacts where available - Compact state files, not full transition history
Say where context stands when a phase boundary was just crossed. If step 4 moved the instance to a new phase, run
aidlc cost contextand report the line it prints. Crossing a boundary is the one moment a fresh session is free, and the reading is what makes that visible instead of leaving it to be noticed on the bill. Over budget is information, never a blocker — see The context rule in aidlc-overview.Execute. Follow the phase skill for the determined step.
Multiple Instances
When multiple instances are active and the user did not specify which one:
- List all active instances: name, current phase, completion percentage
- Ask the user to select one
- Resume the selected instance
Exit Criteria
- The next step is identified and executed (or the instance is reported as complete)
- State is updated to reflect progress
- Claim is held for the duration of work
Security Confirmation
If continuation leads to a phase that involves sensitive operations (Deployment, infrastructure changes), apply the security confirmation rules of that phase's skill before executing.
Token Efficiency
- Do NOT re-read unchanged files from prior sessions
- Use state fields to determine progress, not artifact content
- Load artifact summaries in place of full documents when summaries exist