Workflow Guide
Use .agent as the concise, durable source of truth for ongoing work. This skill coordinates state through files; it does not itself authorize spawning subagents, changing task scope, or committing files.
Locate the workspace
- In a Git worktree, use the repository top level (
git rev-parse --show-toplevel). Otherwise use the current working directory.
- Check for
<workspace>/.agent before substantive work.
- If
.agent exists, do not ask whether to initialize it. Read .agent/README.md, then PROGRESS.md, PLAN.md, and HANDOFF.md; consult DECISIONS.md, ANALYSIS.md, and FAILURES.md as relevant. Reconcile stale notes against the actual workspace and the user's latest instructions.
- If
.agent does not exist, ask the user one concise question before creating it: “This workspace has no .agent memory. Should I enable persistent agent orchestration here?” Do not create it unless the user agrees.
- After agreement, run
python3 <skill-dir>/scripts/init_agent_memory.py --root <workspace>. Never replace an existing .agent wholesale.
If the user already explicitly requested creation or setup of .agent, that is agreement; initialize without asking again. For a trivial read-only question where no continuing work is implied, mentioning the option is enough and initialization may be deferred.
Resume before acting
Treat the files as a handoff from another capable agent, not as unquestionable truth.
- Follow the newest explicit user instruction when it conflicts with stored notes.
- Verify important claims against files, Git state, tests, or other authoritative sources.
- Preserve useful history. Correct stale information explicitly instead of silently rewriting history.
- Continue the first actionable item in
HANDOFF.md or PLAN.md when it remains valid.
- If the task recorded there is already complete, say so and update the memory rather than repeating work.
Maintain memory during work
Keep the files concise and useful to an agent with no conversation history:
PROGRESS.md: current objective, status, completed outcomes, active work, blockers, and verification results. This is the primary snapshot.
PLAN.md: ordered work items with stable IDs and statuses (pending, in_progress, blocked, done). Keep only the active plan plus a short completed section.
ANALYSIS.md: durable findings, constraints, hypotheses, evidence, and small relevant log excerpts with commands or file locations.
DECISIONS.md: consequential decisions, alternatives considered, rationale, and implications.
FAILURES.md: failed approaches, exact symptoms, likely cause, and what should or should not be retried.
HANDOFF.md: the smallest restart packet—where things stand, exact next action, files to inspect, commands to run, and open questions.
Update memory at meaningful checkpoints: after planning, after a significant discovery or decision, after a failure that could recur, after verification, and before ending or handing off. Do not log every command or narrate routine actions. Prefer timestamps with timezone and append chronological entries where history matters; rewrite snapshot sections when the current truth changes.
Before pausing or finishing, ensure:
PROGRESS.md accurately distinguishes done, active, and blocked work.
PLAN.md statuses match reality.
- Reusable evidence, decisions, and failures are captured in their canonical files.
HANDOFF.md names one concrete next action, or says that no action remains and records the verification proving completion.
Safety and repository hygiene
- Never store credentials, tokens, private keys, personal data, or unredacted sensitive logs in
.agent.
- Keep large logs, generated artifacts, and binary files elsewhere; record a path and a short redacted excerpt instead.
- Do not invent work history. Label uncertainty and record only observed or user-provided facts.
- Avoid duplicating the same fact across files; link to the canonical entry.
- Do not add
.agent to .gitignore or commit it without the user's request. The user decides whether this memory is shared through version control.
- Preserve user edits and unknown custom files inside an existing
.agent.
1---2name: workflow-guide3description: Establish and maintain a workspace-local `.agent` directory as durable project memory so work can resume across cleared contexts, agent changes, or later sessions. Use when beginning work in any Git repository or ordinary directory, when the user asks for agent orchestration or persistent progress tracking, or when an existing `.agent` should be resumed.4---56# Workflow Guide78Use `.agent` as the concise, durable source of truth for ongoing work. This skill coordinates state through files; it does not itself authorize spawning subagents, changing task scope, or committing files.910## Locate the workspace11121. In a Git worktree, use the repository top level (`git rev-parse --show-toplevel`). Otherwise use the current working directory.132. Check for `<workspace>/.agent` before substantive work.143. If `.agent` exists, do not ask whether to initialize it. Read `.agent/README.md`, then `PROGRESS.md`, `PLAN.md`, and `HANDOFF.md`; consult `DECISIONS.md`, `ANALYSIS.md`, and `FAILURES.md` as relevant. Reconcile stale notes against the actual workspace and the user's latest instructions.154. If `.agent` does not exist, ask the user one concise question before creating it: “This workspace has no `.agent` memory. Should I enable persistent agent orchestration here?” Do not create it unless the user agrees.165. After agreement, run `python3 <skill-dir>/scripts/init_agent_memory.py --root <workspace>`. Never replace an existing `.agent` wholesale.1718If the user already explicitly requested creation or setup of `.agent`, that is agreement; initialize without asking again. For a trivial read-only question where no continuing work is implied, mentioning the option is enough and initialization may be deferred.1920## Resume before acting2122Treat the files as a handoff from another capable agent, not as unquestionable truth.2324- Follow the newest explicit user instruction when it conflicts with stored notes.25- Verify important claims against files, Git state, tests, or other authoritative sources.26- Preserve useful history. Correct stale information explicitly instead of silently rewriting history.27- Continue the first actionable item in `HANDOFF.md` or `PLAN.md` when it remains valid.28- If the task recorded there is already complete, say so and update the memory rather than repeating work.2930## Maintain memory during work3132Keep the files concise and useful to an agent with no conversation history:3334- `PROGRESS.md`: current objective, status, completed outcomes, active work, blockers, and verification results. This is the primary snapshot.35- `PLAN.md`: ordered work items with stable IDs and statuses (`pending`, `in_progress`, `blocked`, `done`). Keep only the active plan plus a short completed section.36- `ANALYSIS.md`: durable findings, constraints, hypotheses, evidence, and small relevant log excerpts with commands or file locations.37- `DECISIONS.md`: consequential decisions, alternatives considered, rationale, and implications.38- `FAILURES.md`: failed approaches, exact symptoms, likely cause, and what should or should not be retried.39- `HANDOFF.md`: the smallest restart packet—where things stand, exact next action, files to inspect, commands to run, and open questions.4041Update memory at meaningful checkpoints: after planning, after a significant discovery or decision, after a failure that could recur, after verification, and before ending or handing off. Do not log every command or narrate routine actions. Prefer timestamps with timezone and append chronological entries where history matters; rewrite snapshot sections when the current truth changes.4243Before pausing or finishing, ensure:44451. `PROGRESS.md` accurately distinguishes done, active, and blocked work.462. `PLAN.md` statuses match reality.473. Reusable evidence, decisions, and failures are captured in their canonical files.484. `HANDOFF.md` names one concrete next action, or says that no action remains and records the verification proving completion.4950## Safety and repository hygiene5152- Never store credentials, tokens, private keys, personal data, or unredacted sensitive logs in `.agent`.53- Keep large logs, generated artifacts, and binary files elsewhere; record a path and a short redacted excerpt instead.54- Do not invent work history. Label uncertainty and record only observed or user-provided facts.55- Avoid duplicating the same fact across files; link to the canonical entry.56- Do not add `.agent` to `.gitignore` or commit it without the user's request. The user decides whether this memory is shared through version control.57- Preserve user edits and unknown custom files inside an existing `.agent`.