Quick Ref / Command

Marketing Kit

/ak:handoff

Portable handoff contract

Creates one portable, redacted Markdown continuation contract so a fresh coding agent can resume safely without reading a transcript dump.

01

Parse target

02

Check focus safety

03

Probe workspace

04

Choose path

Rule 01

A handoff is a continuation contract, not a transcript or status report.

Rule 02

Observed workspace facts must be distinguished from session assertions.

Rule 03

The required sections stay present even when some facts are unresolved.

Rule 04

Secrets and private URLs must be redacted before write and never printed inline.

Execution Map

Core lanes from input to output, aligned with the command's real execution path.

01

Start

Input, scope, route

  1. 1 Parse target Accept a bare invocation, optional task focus, output path, diff/status inclusion, or force overwrite flag.
  2. 2 Check focus safety Refuse if the task focus string itself appears to contain credentials or secret-looking values.
02

Work

Agent / skill execution

  1. 3 Probe workspace Run bounded read-only git probes for repo, toplevel, branch, HEAD, status, and optional diff evidence.
  2. 4 Choose path Use plans/reports/handoff-YYYYMMDD-HHmm-<slug>.md, or ask for a safe project-local output path if no plans directory exists.
03

Verify

Gate, review, validation

  1. 5 Guard collision If the target exists, refuse unless --force was explicitly passed.
  2. 6 Draft schema Write the required sections: Goal, Why This Matters, Current State, Key Decisions and Why, Rejected Approaches and Traps, Verification Status, Relevant Files and Pointers, and Open Work and Dependencies.
04

Close

Report, handoff, artifact

  1. 7 Redact secrets Apply redaction patterns to the artifact and optional diff/status blocks before writing.
  2. 8 Return handoff Return one concise fenced Markdown block, save the same content, and include a fresh-agent prompt that requires source verification.

Don't skip the required step

Each item contrasts a tempting shortcut with the required approach.

Tempting shortcut

A transcript dump is safest.

Do this instead

Raw transcripts are forbidden; capture only task-relevant, actionable facts.

Tempting shortcut

If --output is explicit, overwrite it.

Do this instead

Overwrite requires --force; explicit output alone never implies replacement.

Tempting shortcut

Unknown sections can be skipped.

Do this instead

All required sections must remain, marking missing evidence as unresolved instead of fabricating facts.

Sample Prompt

Concrete invocations for each flag, subcommand, mode, or route available in the live workflow.

Bare handoff Recommended
/ak:handoff
Use when:
The current session needs a successor-ready continuation contract.
Expected:
Writes an auto-named artifact under plans/reports and returns the same fenced Markdown body plus continuation instruction.
Focused handoff
/ak:handoff "continue the OAuth callback fix"
Use when:
A specific task focus should appear in the goal and filename slug.
Expected:
Creates a focused continuation contract for that task with current state, constraints, and next action.
Include evidence
/ak:handoff --include-diff --include-status
Use when:
The successor needs bounded dirty-workspace evidence.
Expected:
Adds redacted status and diff summaries with truncation markers when needed for safe continuation.
Explicit path
/ak:handoff --output plans/reports/handoff-oauth-callback.md --force
Use when:
The artifact should overwrite a known handoff path intentionally.
Expected:
Writes the exact requested path only because --force permits overwrite of the existing handoff.

Handled Scope

  • Parse target
  • Check focus safety
  • Probe workspace
  • Choose path
  • Guard collision
  • Draft schema

Next