---
name: phasedrift-session-review
description: Begin scoped work, apply relevant guidance, and report results through PhaseDrift.
---

# PhaseDrift work loop

Run from the current project repo. The CLI resolves repo/session/tracker, fresh revision,
private persistence and retries. Do not create files, chmod, craft UUIDs or manage boundaries.
Task entry and closeout write private local tracker bookkeeping, not project source files, and make no paid analysis calls. Do them for read-only inspections too unless the user explicitly forbids tracker writes. Reading this skill is not task entry.
At each new meaningful objective, begin once:

```sh
phasedrift session start --task "short objective" --area "affected area"
```

This pins a small brief and the exact guidance versions delivered. Repeating the same start resumes your task.
A conversation can contain several objectives. Close the old objective before starting another.
Use --host opencode, grok-build, claude-code, gemini-cli or cursor when needed; use --host muse for explicit Muse work.
If no native identity is available, keep the returned attempt handle and add --attempt to review.
Hooks supply host identities where supported. Resume only your explicitly known --session or --attempt; never guess IDs.
Do not share a handle between concurrent agents. Native effort is collected separately; a report invents no tokens or runtime.
Check phasedrift session status for native collection, or phasedrift session start --attempt <returned-id> for this attempt.
Apply only relevant guidance. Delivery is not use. At completion, pause or handoff, submit:

```sh
phasedrift session review --task feature --stdin <<'JSON'
{"outcome":"What changed","verification":"Checks and actual results","friction":"Repeated obstacle, or none","learning":"What to do differently","areas":["verification"],"suggestions":[{"problem":"Browser verification starts before the app is reachable","change":"Check app reachability before browser tests","expectedEffect":"Fewer failed verification launches","applicability":"Browser integration tasks","metric":"Failed launches per eligible task","qualityGuardrail":"Still pass the actual browser checks"}]}
JSON
```

Replace example text with evidence. Use suggestions: [] when no concrete change is warranted.
For each delivered item, add contextUses: [{kind:"lesson" or "proposal",id,version,disposition,reason}].
Choose used, not_applicable, declined or unknown. Copy id/version only from your returned brief.
Missing dispositions stay unknown. Legacy lessonIds and interventionIds remain accepted.
If entry returns eligible observations, add observations: [{proposalId,issue,quality}].
Operation receipts are separate evidence. Do not add a task observation for a proposal absent from your returned eligibility list.
Issue is present, absent or unknown for that specific problem. Quality is passed, failed or unknown against its guardrail.
An absent issue is not a passing quality check. Unrelated tasks are excluded automatically.
Structured suggestions draft source-linked work without extra model calls; optionally give category and a stable issueKey.
For each suggestion, add summary: {title, before, after, benefit} in plain owner language. Use a short title and one sentence per field; label a proposed fix as proposed, not already implemented.
Keep outcomes concise. No raw logs, prompts, secrets, customer info or private reasoning.
Before an authorized commit, run existing project checks unchanged. This skill grants no commit permission.
Without exact check receipts, describe checks as agent-reported prose, not as measured pass.
If the tracker is unavailable, never block ordinary authorized work. The CLI retains closeouts privately.
Never auto-commit or claim hooks are installed from reading this skill. Setup --hooks installs project integrations.
If a retained submission ID needs retry, replay the frozen report:

```sh
phasedrift session retry <submission-id>
```

If a task closeout was explicitly rejected for invalid or ineligible fields, correct those fields with `phasedrift session review --attempt <attempt-id> --correct-rejected --task <same-task-kind> --stdin` (include the same `--trial` if used). This verifies the original rejection and preserves its private draft, code checkpoint and closeout time. Accepted reports, transport failures and uncertain responses cannot be replaced. Ordinary `session retry` still replays exact evidence.
