/agent-outcomes:work-logfrom agent-outcomes
How a loop records its work in the agent-orchestration work log: a journal of how it made its design decisions (a record of each, written when it's made), the decision list derived from it at the end (one line per choice a person should know about), and a build entry of what it verified. When to write each, templates, the four categories, good and bad examples, what never goes in an entry, and the log-entry.sh calls. Load it in any run whose fire text carries a log_token (issue-build-loop, review-loop, rework-loop). Best effort: a failed write never stops the run.
Ships in agent-outcomes. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Each run leaves three kinds of entry on the issue or PR it worked, kept by the
Worker next to the label history (docs/agent-orchestration/16-work-log.md in
umbraco-mcp-ops):
| Kind | What | When |
|---|---|---|
| journal | A decision record for each design decision: the decision, the options considered, the rationale, what was rejected | Each time you choose, as you choose |
| decision | One line per choice a person should know about, derived from the journal by a fresh subagent, pointing back to it | Once, at the end of the run |
| build | What the run did and checked | Once, at the end of the run |
The journal is the rationale behind the change: a rework reads it so it doesn't undo a deliberate choice, and the review reads it to challenge one. The decision list is what a person reads first: the PR description's Decisions to check is built from it, with the journal behind each item for when the one line isn't enough to judge it. The build entry is the evidence.
Every journal entry and every decision has exactly one:
| Category | Use it when | The test |
|---|---|---|
assumption | The issue didn't say, and you assumed | "Would a different reasonable reading of the issue change this?" |
deviation | The issue, CLAUDE.md or an established pattern said X, and you did Y | "Is there a written rule or a clear precedent this doesn't follow?" |
workaround | The right fix wasn't possible here, so this gets around it | "Would you do it differently if the blocker were gone?" |
judgment-call | Several sound options, and you picked one | "Could a reviewer reasonably have picked another?" |
Write one each time you choose how to do something: between approaches, after trying one that didn't work, when you assume something, depart from the issue or a convention, or work around a problem. Write it then, not at the end from memory: by then the details are gone, and what's left is a justification.
Don't write one for a step with no real alternative (ran the tests, opened the PR, used the repo's language) or for every small edit. Write as many as the choices you actually made; logging steps anyone would have taken the same way buries the ones that matter.
Template (the body):
Decision: <what, one line>
Options: <the options considered, including an approach tried first and why it was dropped>
Rationale: <why this one, tied to the code, a test, the issue or a convention>
Rejected: <what you didn't do, and why not>
Options includes an approach tried and dropped: the failing test that ruled it out. It's often what a reviewer most needs. "Only this one" is a fine answer for a choice forced by an assumption or a blocker.
Examples
judgment-call — Decision: cursor pagination for list-form-entries. Options:
offset paging first, as the API's own docs show; the test adding entries mid-read skipped
rows. Rationale: entries can number in the thousands, and every other list tool in tools/
uses cursors. Rejected: offset paging, for the skipped rows.assumption — Decision: "archived forms" means forms in the recycle bin. Options:
a custom "archived" property, and the recycle bin. Rationale: Forms has no archive flag; the
recycle bin is the only state that hides a form from the list. Rejected: the property,
which the API can't filter on.deviation — Decision: the tool returns the raw validation error, not
confirmAction's summary. Options: the summary, then the raw error. Rationale: the summary
drops the field name, which is what the issue needs to show. Rejected: following the
convention, which hides the field.workaround — Decision: retry the export once on a 409. Options: waiting on a
status endpoint (there isn't one), polling, one retry. Rationale: the API returns 409 while a
previous export is still being written (reproduced locally). Rejected: polling, with
nothing to poll.Written by a fresh subagent, not the agent that made the choices, at the end of the
run, before the build entry. The one who chose tends to find all its choices obvious; fresh
eyes judge better which ones a person needs to know about. The run that owns the work
(issue-build-loop's orchestrator) spawns it, on a cheaper model (it reads and judges, it
doesn't code), with the log_token, the issue, and the diff. The subagent:
read the item, and the issue a PR closes), the issue and the
diff. It is not the builder, and has none of its context: the journal and the diff are
what it has.decision-review uses). Skip pure mechanics
(names, layout inside an agreed pattern). Several journal entries can make one decision;
many make none.(not journalled), with no --refs. How often this happens is one of
the trial's measures of how well the journal is kept.Template: one line, <what was decided> — <why it matters>, with its category and the
journal entries behind it (--refs).
Examples
judgment-call (refs #7, #9) — Cursor pagination for list-form-entries, not offset —
callers that page with offsets elsewhere will need changing.assumption (refs #8) — "Archived" read as "in the recycle bin" — if the issue meant
something else, the filter is wrong.deviation (no refs) — (not journalled) The list tool returns 50 rows, not the
convention's 100 — callers relying on the default page size get fewer.None worth a person's look: write no decisions. That's an answer too.
Once, as the run's last step before the outcome comment.
Template (the body):
Commit: <short sha>
Tests: <suite or command>: <run> run, <passed> passed (<failures, if any>)
Review: <what reviewed it, what it found, what was fixed>
Not verified: <what wasn't checked, and why> | none
Examples
npm run test:changed on SQL Server: 42 run, 42 passed ·
Review: pre-PR checks: 2 findings, both fixed (leftover text in a README, untested 404) · Not verified: the eval suite, which only
CI runs.review-loop) Commit: 3f9c2a1 · Tests: none (review only) · Review: round 1,
findings: 3 inline comments; challenges journal #7 (offset vs cursor) · Not verified: the
generated client, which wasn't in the diff.log_token), passwords, connection strings.An entry is capped at 4 KB; a decision is one line. A good journal entry is a few lines.
The fire text carries log_token=<token>. It names the issue or PR this run works and the
routine, and lets you add entries there and read any item in the repo. Pass it to any
subagent that writes entries; never put it in a comment, a commit, or an entry.
Call the script by its full path, exactly as below: a routine runs unattended, and only
this spelling is allowed to run without asking (cloud-skill-sync allows it). Don't put
the path in a variable or chain it after a cd: a refused call writes nothing.
# a journal entry, when you decide (the body on stdin); prints its id: "logged: journal … #7"
bash ~/.claude/skills/work-log/scripts/log-entry.sh --token "$TOKEN" add journal judgment-call <<'EOF'
Decision: …
Options: …
Rationale: …
Rejected: …
EOF
# at the end: the decision list, each pointing at its journal entries
bash ~/.claude/skills/work-log/scripts/log-entry.sh --token "$TOKEN" add decision judgment-call --refs 7,9 <<< "Cursor pagination, not offset — callers paging by offset elsewhere need changing"
# then the build entry
bash ~/.claude/skills/work-log/scripts/log-entry.sh --token "$TOKEN" add build <<'EOF'
Commit: …
Tests: …
Review: …
Not verified: …
EOF
# read an item's entries (the issue a PR closes, say)
bash ~/.claude/skills/work-log/scripts/log-entry.sh --token "$TOKEN" read 412
The script needs curl and jq, and finds the Worker from WORK_LOG_ENDPOINT, else from
AGENT_OUTCOMES_ENDPOINT. It always exits 0: on a failure it prints not logged: <why>
and you carry on. A run never stops, retries in a loop, or reports a different outcome
because of the log. No log_token in the fire text: skip this
skill.
What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
Other plugins' skills for the same job
npx claudepluginhub hifi-phil/umbraco-mcp-ops --plugin agent-outcomes