Getting Started · 04

Session Hygiene

Every session starts with /startwork and ends with /handoff. This is the single most important habit in HQ.

Session Lifecycle

/startwork

  • resolve company
  • load policies
  • surface workers
  • resume context

work

  • create files
  • run workers
  • execute tasks
  • auto-checkpoints

/handoff

  • commit state
  • write thread
  • save pointer
  • queue follow-ups
next session picks up from handoff

Why /startwork matters

01

Without /startwork, your AI tool starts cold — no company context, no policies, no knowledge of your prior work. With it, the session loads everything: company policies (including hard-enforcement rules), available workers and skills, active projects with incomplete stories, and your last session's handoff state.

The slug you pass determines what context loads. Use a company name for broad work, a project name to pick up where you left off, a repo name for focused coding, or describe a task in plain English and HQ classifies it and proposes a worker pipeline.

Slug
Example
What it loads
company
/startwork acme
Loads company context: repos, workers, policies, knowledge
project
/startwork acme-dashboard
Loads project PRD, incomplete stories, branch state
repo
/startwork my-api
Loads repo git state, owning company, related projects
task
/startwork "build user settings page"
Classifies intent, proposes worker pipeline, offers direct exec
(empty)
/startwork
Resume mode — reads handoff.json for prior session context
HQ / Acme

Session started — Acme Corp

  • Policies: 4 company, 2 repo (1 hard-enforcement)
  • Workers: design, backend, deploy, content (8 total)
  • Active: acme-dashboard — 5/12 stories done
  • Last session: fixed auth middleware token expiry

Pick a story, describe a task, or run a worker.

Local HQ main | worktree
/startwork acme
Auto modeOpus 4.8 · High

Always end with /handoff

02

/handoff is how HQ gets smarter. The foreground pass is minimal — it commits pending changes, writes a thread file capturing everything about this session (what you did, what's next, what you learned), and saves a small handoff pointer. Index regeneration, learning capture, document updates, and search reindexing all run as background follow-ups.

The next session reads handoff.json (a small pointer file) and picks up exactly where you left off. No context lost. No re-explaining. No "where was I?"

On a long session, run /checkpoint mid-session to save state without ending — the in-flight counterpart to /startwork/handoff.

What /handoff saves

Thread file

Full session summary, next steps, decisions made

Git state

Branch, commit hash, dirty flag, files touched

Worker state

Which worker was active, skill, completion status

Learnings

Mistakes caught, patterns that worked, corrections

Indexes

Thread + orchestrator INDEX — regenerated in background

handoff.json

Pointer to thread — small file, instant resume

HQ / Acme

Handoff complete

  • Thread: T-20260519-143052-auth-fix
  • 5 files committed on feature/acme-dashboard
  • Handoff pointer saved
  • Indexing + learnings queued in background...

Start a new session and run /startwork to resume.

Local HQ main | worktree
/handoff
Auto modeOpus 4.8 · High

The compound effect

03

Each /startwork → work → /handoff cycle makes HQ smarter. Learnings accumulate as policies. Knowledge indexes grow richer. Thread history gives every future session a map of your team's decisions, mistakes, and patterns. After a few weeks, your AI tools know your codebase, your conventions, and your team's preferences — not because they were trained on it, but because you built the context.

/startworkwork/handofflearningspoliciesknowledgesmarter next session
Previous03 · HQ Cloud ConceptsNext05 · Development Concepts