P08 is a public guided and runnable Academy lesson in this preview. Its shared action cards are the public course route.
Complete P07 and begin in the prepared Academy clone. The website is the primary lesson surface.
Academy CLI is limited to Prepare, Check, and Reset. Use Git and the selected host for the work
between those transitions.
Keep the repository root open in a native terminal and in your chosen harness. A native-terminal
command is entered directly and has no !. A harness shell command begins with exactly one !.
Harness text is a request you type to the agent, not a shell command. An agent-owned codeArbiter
command belongs to the harness and has no !. The action cards label each case.
This lab authorizes observation, classification, a report draft, learner review, and a bounded
commit. It never authorizes deleting a branch, removing a worktree, pruning metadata, rewriting
history, or force operations.
You will preserve a complete inventory of the prepared live refs and worktrees. For each prepared ref,
the report records its full ref name, object ID, worktree state, merge containment relative to
main, unique commit count, classification, and recommendation. For each prepared worktree, it
records the path-free prepared identity, branch binding, head binding, presence, dirtiness,
classification, and recommendation.
The expected classifications are conservative. The current attempt, dirty unmerged state, and
unmerged unique history remain preserve. The clean merged fixture is only
eligible-for-explicit-review; it is not a deletion instruction. The agent drafts the report; you
review it before the bounded commit gate runs.
P07 ends on its preserved attempt branch. Return to clean main before P08 Prepare; the completed
P07 evidence stays reachable and is not part of the new attempt.
1
You
Return to main before preparing P08
After P07 passes, return to main in a native terminal and confirm the worktree is clean before preparing P08. Leave the completed P07 attempt branch intact.
Why this matters: Academy Prepare starts only from the clean base branch, while the completed P07 attempt remains available for inspection.
Windows
git switch main
git status --short
macOS
git switch main
git status --short
Linux
git switch main
git status --short
Expected result
The primary checkout is on clean main and the completed P07 attempt remains reachable.
Evidence
The current branch is main and Git prints no worktree changes before P08 Prepare.
If that does not happen
If Git refuses to switch or status prints a path, preserve the message and completed attempt. Do not force a switch, reset, rebase, delete the attempt branch, or hide the change.
2
You
Prepare the live hygiene fixture
Run the installed Academy Prepare command from the clean learner checkout. Use the attempt number Academy prints; do not type a placeholder branch name.
Why this matters: Prepare creates the externally recorded fixture and a numbered attempt without precomputing the learner report.
Academy creates and switches to academy/P08-repository-hygiene/<attempt> and reports the prepared fixture.
Evidence
The numbered branch is the only branch where P08 evidence may be committed.
If that does not happen
If Prepare refuses, preserve its message and return to the documented dirty-state or existing-attempt recovery before retrying.
Preparation creates the numbered attempt, live fixture refs, and linked worktrees. It does not give
you a precomputed inventory. Stay on the numbered attempt until Check passes or Reset preserves it
for a retry.
3
You
Freeze a native-terminal inventory
Record the complete local-head ref view and the porcelain worktree view before asking for a classification.
Why this matters: A complete observation prevents a report from silently omitting a prepared ref or worktree.
Windows
git for-each-ref --format='%(refname) %(objectname)' refs/heads
git worktree list --porcelain
macOS
git for-each-ref --format='%(refname) %(objectname)' refs/heads
git worktree list --porcelain
Linux
git for-each-ref --format='%(refname) %(objectname)' refs/heads
git worktree list --porcelain
Expected result
Git prints every local branch ref with its object ID and every registered worktree with its branch or HEAD binding.
Evidence
The observed sets are the source for the draft report and later learner review.
If that does not happen
If either command says this is not a repository, stop and return to the prepared learner checkout. Do not invent an inventory.
4
You
Inspect through a harness shell
Use this only when running the same Git inspection from the selected harness shell. The leading exclamation mark belongs only to the shell command.
Why this matters: The harness shell is a distinct execution surface from a native terminal and from codeArbiter commands.
Windows · Claude Code
!git for-each-ref --format='%(refname) %(objectname)' refs/heads; git worktree list --porcelain
macOS · Claude Code
!git for-each-ref --format='%(refname) %(objectname)' refs/heads && git worktree list --porcelain
Linux · Claude Code
!git for-each-ref --format='%(refname) %(objectname)' refs/heads && git worktree list --porcelain
Windows · Codex
!git for-each-ref --format='%(refname) %(objectname)' refs/heads; git worktree list --porcelain
macOS · Codex
!git for-each-ref --format='%(refname) %(objectname)' refs/heads && git worktree list --porcelain
Linux · Codex
!git for-each-ref --format='%(refname) %(objectname)' refs/heads && git worktree list --porcelain
Windows · Pi
!git for-each-ref --format='%(refname) %(objectname)' refs/heads; git worktree list --porcelain
macOS · Pi
!git for-each-ref --format='%(refname) %(objectname)' refs/heads && git worktree list --porcelain
Linux · Pi
!git for-each-ref --format='%(refname) %(objectname)' refs/heads && git worktree list --porcelain
Expected result
The harness returns the same complete ref and worktree inventory that a native-terminal command would return.
Evidence
The leading exclamation mark identifies this as a harness shell command, not an agent command.
If that does not happen
If the harness cannot run its shell, use the native-terminal inventory action instead. Do not use a codeArbiter command as a shell substitute.
The two inventory actions show the same Git evidence on different surfaces. Use one surface for the
actual inventory. Do not merge partial output from memory or from a previous attempt.
Run the agent-owned codeArbiter standup command. It begins with git fetch, which may refresh remote-tracking refs. Decline every proposed mutation, including an offered --ff-only pull and every cleanup action; limit the result to inventory and classification advice.
Why this matters: Standup can organize evidence but does not grant authority to discard live repository state.
Any OS · Claude Code
/ca:standup
Any OS · Codex
$ca-standup
Any OS · Pi
/ca-standup
Any OS · Pi
/skill:ca-standup
Expected result
The agent refreshes remote-tracking information, then presents current repository state for review without pulling, deleting, pruning, or rewriting any prepared local branch ref or worktree.
Evidence
The learner retains the before/after inventory comparison and the decision to accept or reject any later report draft.
If that does not happen
If the response offers an --ff-only pull or cleanup, decline it. Preserve the current state and take the post-fetch inventory before any report draft.
Standup begins with git fetch, so it may refresh remote-tracking refs before it organizes the inspection. It is not mutation authority: decline any offered --ff-only pull and every cleanup proposal, keep all prepared local branch refs and worktrees intact, and then capture the post-fetch inventory for the report.
6
You
Capture the post-standup inventory
Run the native-terminal inventory again after declining every standup mutation. This post-fetch result, not the earlier baseline, is the exact current inventory for the report draft.
Why this matters: A read-only fetch may legitimately refresh remote-tracking refs, so the report must bind the state that remains after the advisory step.
Windows
git for-each-ref --format='%(refname) %(objectname)' refs/heads; git worktree list --porcelain
macOS
git for-each-ref --format='%(refname) %(objectname)' refs/heads && git worktree list --porcelain
Linux
git for-each-ref --format='%(refname) %(objectname)' refs/heads && git worktree list --porcelain
Expected result
The current ref and worktree inventory is visible after fetch and before any draft; no local branch, commit, or worktree changed.
Evidence
The before/after inventory distinguishes an allowed fetch refresh from an unaccepted mutation.
If that does not happen
If any local state changed, stop before drafting. Preserve the attempt and use Reset rather than trying to reconstruct the fixture.
7
You
Request a harness-text report draft
Paste the text request into the active harness after standup. It is a request to the agent, not a shell command and not a codeArbiter command; draft from the post-fetch current inventory, not the earlier pre-fetch snapshot.
Why this matters: The agent may draft the canonical report, while the learner remains responsible for reviewing its classifications and commit boundary.
Any OS · Claude Code
Draft .codearbiter/reports/academy/P08-hygiene.json from the current live P08 refs and worktrees. Preserve every live resource. Do not delete, prune, force, or rewrite anything. Wait for my review before staging or committing.
Any OS · Codex
Draft .codearbiter/reports/academy/P08-hygiene.json from the current live P08 refs and worktrees. Preserve every live resource. Do not delete, prune, force, or rewrite anything. Wait for my review before staging or committing.
Any OS · Pi
Draft .codearbiter/reports/academy/P08-hygiene.json from the current live P08 refs and worktrees. Preserve every live resource. Do not delete, prune, force, or rewrite anything. Wait for my review before staging or committing.
Expected result
The agent creates a draft report without staging, committing, or changing the live fixture.
Evidence
A reviewable draft exists at the exact P08 report path before the commit gate is considered.
If that does not happen
If the agent changes state or drafts an incomplete report, preserve the attempt and request a corrected report from the current inventory.
The report path is .codearbiter/reports/academy/P08-hygiene.json. The agent must derive it from the
current live inventory, not copy a list from this page. It must include every prepared identity and
must not include an absolute local path.
8
You
Review the agent draft
Use the selected copyable request to review the draft against a fresh current inventory. Confirm all five refs and three worktrees are present, path-free, correctly bound, and conservatively classified before authorizing a commit.
Why this matters: A complete report is evidence of a learner-reviewed classification, not an agent decision delegated without inspection.
Any OS · Claude Code
Run git for-each-ref --format='%(refname) %(objectname)' refs/heads and git worktree list --porcelain, then review only .codearbiter/reports/academy/P08-hygiene.json against that current inventory. Account for all five refs and three worktrees: main, the current attempt, the prepared fixture refs, and the current-attempt, merged-clean, dirty-unmerged worktree roles. Identify any path-bearing, missing, stale, wrongly bound, or unsafe removable classification. Do not change files, stage, commit, delete, prune, pull, force, or clear the report; stop for my decision.
Any OS · Codex
Run git for-each-ref --format='%(refname) %(objectname)' refs/heads and git worktree list --porcelain, then review only .codearbiter/reports/academy/P08-hygiene.json against that current inventory. Account for all five refs and three worktrees: main, the current attempt, the prepared fixture refs, and the current-attempt, merged-clean, dirty-unmerged worktree roles. Identify any path-bearing, missing, stale, wrongly bound, or unsafe removable classification. Do not change files, stage, commit, delete, prune, pull, force, or clear the report; stop for my decision.
Any OS · Pi
Run git for-each-ref --format='%(refname) %(objectname)' refs/heads and git worktree list --porcelain, then review only .codearbiter/reports/academy/P08-hygiene.json against that current inventory. Account for all five refs and three worktrees: main, the current attempt, the prepared fixture refs, and the current-attempt, merged-clean, dirty-unmerged worktree roles. Identify any path-bearing, missing, stale, wrongly bound, or unsafe removable classification. Do not change files, stage, commit, delete, prune, pull, force, or clear the report; stop for my decision.
Expected result
You can identify each preserved resource and the one merged-clean item eligible only for explicit future review.
Evidence
The learner has reviewed the exact report that may become the sole evidence commit.
If that does not happen
If a fact is missing, stale, path-bearing, or classified as removable, reject the draft and preserve the fixture while requesting a correction.
Review all prepared identities before staging. Confirm that the merged-clean branch is classified as
eligible only for an explicit future review, that dirty and unique state is preserved, and that the
current attempt remains preserved. If the report is incomplete or stale, preserve the fixture and
ask for a corrected draft. Do not compensate by changing Git state.
9
You
Stage only the reviewed hygiene report
Run the native-terminal command for your operating system. It stages only the reviewed report; do not use git add . or add any other path.
Why this matters: The cached-diff review and commit gate require a precise, learner-controlled evidence boundary.
Git stages exactly .codearbiter/reports/academy/P08-hygiene.json and prints no output.
Evidence
The index now contains the one reviewed report that the cached diff must show.
If that does not happen
If staging fails, preserve the draft and confirm the exact report path. If another path is already staged, stop before review and preserve that work for the applicable recovery path.
Stage the reviewed draft from a native terminal before inspecting the cached diff. This path-scoped
step is required: the next action only reviews what is already in the Git index.
10
You
Review the staged evidence boundary
After the reviewed report is staged, inspect the staged path list and diff. Continue only when the report is the sole staged file.
Why this matters: P08 Check accepts one evidence commit containing only the canonical report.
The attempt has one post-Prepare evidence commit containing only
.codearbiter/reports/academy/P08-hygiene.json. Its report is canonical JSON generated from the
live fixture: five refs and three worktrees, with no local worktree path. The fixture itself stays
present and correctly bound. A clean git status --short result is required before Check.
Academy reports checkpoint P08-repository-hygiene: passed and records progress only when the exact fixture and report agree.
Evidence
A passing external verdict follows the exact report-only commit and live fixture verification.
If that does not happen
If Check fails, preserve every resource and read the failed predicate. Use Reset only for a separately retained retry.
A pass contains checkpoint P08-repository-hygiene: passed; progress: .academy/progress.json.
Check does not prove that the agent ran standup, read every terminal line, or made an independent
human judgment about a future cleanup. It verifies the installed-authority fixture, the current live
resources, the sole report commit, and the exact canonical report blob. A passing Check does not
make a deletion safe or authorize cleanup.
Check cannot prove personal understanding, agent invocation, or human review. It records only the
installed verifier’s state comparison; retain the terminal evidence and your review notes separately.
If Check fails, preserve every ref and worktree and read the reported predicate. Never make the
fixture look clean by deleting, pruning, rebasing, force-updating, or overwriting history. Use Reset
only when you need a new numbered attempt; it preserves the failed attempt for inspection.
Compare the complete ref and worktree inventory before and after standup. A classification based on one branch at a time can omit a prepared identity, and a pre-fetch snapshot is not the report’s final source of truth. Decline the offered fast-forward pull as well as cleanup: this exercise does not advance its sealed attempt.
Treat merge containment, dirtiness, and unique commits as separate facts. A merged branch
can still need preservation because its associated worktree is dirty.
Review the report after the agent drafts it and before the commit gate. The learner owns the
decision to accept the bounded evidence, even when the agent prepared the file.
14
You
Return to main after a passing attempt
Run this only after Check passes and the primary worktree is clean. Leave the completed attempt branch and linked worktrees intact.
Why this matters: Returning to main ends active work without deleting the evidence-bearing attempt.
Windows
git switch main
macOS
git switch main
Linux
git switch main
Expected result
The primary checkout is on main while the completed P08 attempt remains available for verification.
Evidence
The successful attempt remains intact after returning to main.
If that does not happen
If Git refuses to switch, preserve the message and inspect the current state. Do not remove a worktree or force a branch change.
15
You
Preserve a failed attempt and prepare a retry
Use Reset only after a failed attempt that you need to retain. It archives the attempt and prepares the next numbered one through installed Academy authority.
Why this matters: A numbered retry preserves evidence instead of rewriting the failed state.
Academy retains the failed P08 attempt and switches to a new numbered attempt with a fresh fixture.
Evidence
The failed attempt remains available and the retry has a distinct numbered branch.
If that does not happen
If Reset stops, preserve its message and return to the Recovery guidance. Do not manually remove refs or worktrees.
After a passing Check, return to main only when the worktree is clean and leave the completed
attempt intact. Next safe course step: start U01, Autonomous sprint.
P08 records external identities outside the learner checkout, then compares the final report with
the prepared live fixture. The report intentionally carries path-free worktree identities rather
than local paths. That makes a copied inventory, a missing resource, a moved resource, a rebound
branch, and a stale classification detectable.
The verifier is strict about the final state but narrow about the process. It can verify the exact
report, commit boundary, and current prepared resources. It cannot observe every conversation or
decide whether a future cleanup is appropriate. Preserve live state and require a separate explicit
review before any cleanup decision.