Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7174038
Preserve passing receipts across late check checkpoints
eowca Nov 26, 2026
e03566d
Persist observed check failures before final validation
eowca Nov 26, 2026
6712072
Keep an initial failed check from changing its own worktree status
eowca Nov 26, 2026
e47815b
Require ready and merge workflows to declare required CI
eowca Nov 26, 2026
9284ffc
Merge current main into the explicit required CI fix
eowca Nov 26, 2026
6f4151a
Merge main and persist observed failed stages through the locked writer
eowca Nov 26, 2026
584124e
Merge main and keep failed-stage checkpoints under the check lock
eowca Nov 26, 2026
c886a60
Merge remote-tracking branch 'origin/main' into lean178/1416-interrup…
eowca Nov 26, 2026
9884adb
Remove repeated wording from core delivery skills
eowca Nov 26, 2026
f81aa7a
Merge remote-tracking branch 'origin/main' into lean178/575-core-docs…
eowca Nov 26, 2026
d8e104b
Merge main and preserve explicit CI validation
eowca Nov 26, 2026
cd30986
Merge remote-tracking branch 'origin/main' into lean178/1388-explicit…
eowca Nov 26, 2026
77dbc45
Preserve the qualifiers flagged in primary review
eowca Nov 26, 2026
59b7b2f
Merge remote-tracking branch 'origin/main' into lean178/575-core-docs…
eowca Nov 26, 2026
4425f7e
Merge main and preserve the conflict-refresh rule
eowca Nov 26, 2026
bf1088a
Merge remote-tracking branch 'origin/main' into lean178/1388-explicit…
eowca Nov 26, 2026
9cc09c0
Merge of PR 1941
mergify[bot] Nov 26, 2026
cd8e0d4
Merge of PR 1426
mergify[bot] Nov 26, 2026
99f752b
Merge of PR 1788
mergify[bot] Nov 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 28 additions & 41 deletions core/skills/implement/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,20 @@ observations, trade-offs and limits in Notes or human Validation.
Primary review requires a completed passing `loopzero check` receipt at the pushed head.
Focused or ongoing checks are intermediate. Follow the [receipt reuse rules](../../CONTRACT.md#gate-execution-and-delivery-priority).

Run commands expected to take more than about two minutes detached as in
[Long-running jobs](../../../docs/DELEGATION.md#long-running-jobs).
Follow [wait and output](../../../docs/DELEGATION.md#briefs-and-ownership)
and [caps](../../../docs/DELEGATION.md#coordinator-rollover). Set
`runLimit 1` for thread reads. Do not end the turn, settle or
report done while a job you started has no `LOG.exit`, unless the unit is gone
and you report the job as killed and the result as failed. If the turn must
end, first schedule a one-shot wakeup (T3 `schedule:{type:once,runAt:<ISO time>}`)
that reads `LOG.exit` and resumes the delivery step it feeds.
Follow [long-running jobs](../../../docs/DELEGATION.md#long-running-jobs) for commands
expected to exceed about two minutes, and the [wait/output](../../../docs/DELEGATION.md#briefs-and-ownership)
and [caps](../../../docs/DELEGATION.md#coordinator-rollover) rules. Set `runLimit 1` on thread reads.
Do not end the turn, settle or report done before your job has `LOG.exit` unless the unit is gone and you report it killed and failed.
If you must yield, first schedule a one-shot T3 wakeup (`schedule:{type:once,runAt:<ISO time>}`)
to read `LOG.exit` and resume its delivery step.

Treat /tmp as disposable: only running-command logs, build output and browser
runs belong there. Keep receipts, evidence, review artifacts and handoffs on the
PR or issue, or in the durable scratch your repository's instructions name. Make
task checkouts as worktrees of an existing clone, not new clones. At task finish,
hand leftover worktrees and generated files to the periodic retention job named
in host or repository instructions (such as `scratch-retention`), without waiting
or scheduling wakeups. When verifying or operating that job, follow
[Leftover cleanup](../../../docs/DELEGATION.md#leftover-cleanup).
If no job is named or any condition is unproved, preserve the leftovers
and report cleanup to the owner. Successful `loopzero merge` already performs its
own cleanup under the delivery contract. For a confirmed-abandoned task outside
the job's scope, give the owner the
Use worktrees of an existing clone. Keep receipts, evidence, review artifacts and handoffs on the PR,
issue or named durable scratch. Reserve `/tmp` for running-command logs, builds and browser runs.
Merge already runs contract cleanup. At task finish, hand leftover worktrees and generated files to the periodic
retention job named in host or repo instructions, without waiting or scheduling wakeups.
Follow [Leftover cleanup](../../../docs/DELEGATION.md#leftover-cleanup) when verifying or operating it.
With no named job or unproved conditions, preserve leftovers and report cleanup to the owner.
For confirmed-abandoned tasks outside its scope, give the owner the
[manual worktree procedure](../../../SETUP.md#removing-an-abandoned-task-worktree).

Follow the contract's [delivery steps](../../CONTRACT.md#the-six-steps) and
Expand All @@ -65,29 +57,24 @@ Before the check and draft push for primary review, rebase your own commits onto
`[repo].base` (default `main`). For a stack, follow
[stacked delivery](../../../docs/DELEGATION.md#stacked-delivery).
Leave base merges out of a branch awaiting its delta.
For base or check-script changes after review, follow the
[Review budget](../../CONTRACT.md#review-budget).
After review, follow the [Review budget](../../CONTRACT.md#review-budget) for base or check-script
changes. Keep the primary as the delta's base and reserve the delta for post-review fixes.
If a reviewed branch needs a conflict refresh, confirm the review path and
merge the base before starting the check for the resolved head.
Preserve the primary for the delta and the delta for post-review fixes.

Never bypass the sandbox, change the check list or enable `[checks].network` to pass checks.
Report base failures without working around them. If a deterministic out-of-scope
defect requires a workaround, use a follow-up PR for a small test-only fix or file an `urgent` issue naming the
blocked PR. Commit yourself, never from checks, hooks or scripts. Update task and
PR before adding paths required by acceptance, and get scope decisions before
expanding proof seams or ownership. On interruption, preserve an adoptable diff
and report remaining acceptance, checks and findings per the contract.
Report base failures without working around them.
For a deterministic out-of-scope defect requiring a workaround, use a follow-up PR for a small
test-only fix or file an `urgent` issue naming the blocked PR. Commit yourself, outside checks, hooks
and scripts. Update task and PR before adding paths required by acceptance. Obtain scope decisions
before expanding proof seams or ownership. On interruption, preserve an adoptable diff and use the
contract to report outstanding acceptance, checks and findings.

A host or runner change that alters what jobs see (ports, env vars, paths,
services, labels) goes live only after the repository change consuming it is on
main, or stays compatible with current main; prove it with one green run of the
affected job on the changed host before enabling it for every runner. Before
parking a PR behind another, confirm that one does not wait on yours; never hold
two PRs on each other. A failure outside the contract's owner queue route goes
with its last-green comparison to [diagnose](../diagnose/SKILL.md) at
once; recording it is not handing it over.
Keep host and runner changes to ports, env, paths, services or labels compatible with current main,
or wait for the consuming change to land. Prove the affected job on the changed host with one green
run before enabling it for all runners. Before parking a PR, verify it does not wait on yours. Never park both on each other.
Immediately hand failures outside the contract's owner queue route and their last-green comparison
to [diagnose](../diagnose/SKILL.md). A log entry alone does not hand over the failure.

To requeue, unless a merge-authority hold applies, post `@mergifyio queue` as the
whole PR comment from the same login; `loopzero merge --wait` never requeues
by itself.
To requeue without a merge-authority hold, post `@mergifyio queue` as the whole PR comment from the
same login. Requeueing requires that comment even after `loopzero merge --wait`.
32 changes: 13 additions & 19 deletions core/skills/plan/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,19 @@ description: Plan outcome-sized tasks with observable acceptance, ownership, pat
Read [the contract](../../CONTRACT.md), repository guidance, the issue/task and
relevant code. Use [delegation guidance](../../../docs/DELEGATION.md) for executors.

Before slicing, restate the ask in one precise sentence and check it against the
issue or request. Size each task to one outcome someone can accept, or one
failure family, in one PR by default. Every PR pays a fixed check, review and
queue cost: keep tests, generated files, docs and related cleanup with their
change, and batch queued, non-urgent chores of one risk class and area, never
into a risky change or ahead of an urgent fix. Split an outcome only at a named
seam. The seam must be separate rollout or rollback, a measurement that could
change the design, a higher risk class (a destructive migration, a trust
boundary), separate ownership or a diff too wide to review reliably. Scale
planning depth to the cost of reversing a choice later: spend planning on
persisted state, CLI or config interfaces, trust boundaries, public APIs and
shared abstractions—asking "if this assumption changes after merge, what
existing state or callers must still work?" (use a compact state table when
transitions matter)—and settle cheap, reversible choices during implementation.
When a cheap observation on real data or the real environment could change the design
or its target, sequence that observation first and derive targets from it. Give
each task an objective, observable acceptance, affected paths, owners, governing
constraints and proving `workflow.toml` checks. Add checks only when existing
checks cannot cover behavior.
Restate the ask in one precise sentence and check it against the issue or request. Size work to one
independently acceptable outcome or failure family in one PR by default. Keep tests, generated files, docs and related
cleanup with their change to amortize checks, review and queueing. Batch non-urgent queued chores in
the same area and risk class, away from risky changes and behind urgent fixes. Split only at a named seam:
separate rollout or rollback, a design-changing measurement, higher risk (such as destructive migration
or a trust boundary), separate ownership or a diff too wide for reliable review.
Match planning depth to the cost of reversal. For persisted state, CLI/config interfaces, trust
boundaries, public APIs and shared abstractions, identify state and callers that must survive changes
to assumptions after merge. Use compact state tables for material transitions and settle cheap,
reversible choices during implementation. Make cheap design- or target-changing observations on real
data or environments first and derive targets from them. Record each task's objective, observable
acceptance, paths, owners, constraints and proving `workflow.toml` checks. Add checks only where existing
checks cannot cover the behavior.

When authorized to file slices from an active goal or planned blueprint, use its
tracking issue as the parent. Give each task a plain issue title and
Expand Down
27 changes: 10 additions & 17 deletions core/skills/refine-code/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,22 @@ description: Simplify a named or current-task diff, or delete evidenced dead cod

# Refine Code

Simplify the user-named or current-task diff while preserving observable behavior
and public contracts. Follow [the contract](../../CONTRACT.md) in the outer task's
worktree; confirm branch and task before editing. Prefer clear names, control
flow and established local patterns without unrelated cleanup or compatibility
layers.
Preserve observable behavior and public contracts in the user-named or current-task diff.
Confirm task and branch in the outer worktree and follow [the contract](../../CONTRACT.md).
Use clear names, control flow and local patterns without unrelated cleanup or compatibility layers.

Treat concurrency, exception timing, transactions, ordering, query predicates,
persistence, isolation, serialization, public imports, API shape and assertions
as semantic until equivalence is demonstrated. Route new behavior, abstraction
boundaries or weakened tests to [implement](../implement/SKILL.md).

Deletion of code outside the current task diff requires explicit requester
commissioning; an audit finding ([code health](../../../docs/CODE-HEALTH.md))
is a lead, not a commission. Choose a clean rollback commit before a deletion
batch; if any check fails, restore the whole batch to it before debugging.

For deletion, establish that supported consumers, including dynamic entry points,
registries, reflection, plugins, configuration, generated consumers and public
exports, do not reach the code. Inspect base and current tree; local edits cannot
prove base unreachability. Lint and coverage alone do not prove deadness, nor does
one dead symbol prove its module dead. Preserve uncertain candidates and explain
why. Keep removal recoverable in Git and validate affected runtime, build,
packaging, deployment and documentation boundaries.
Deletion outside the task diff requires explicit commissioning by the requester. Treat [code health](../../../docs/CODE-HEALTH.md)
findings as leads. Select a clean rollback commit and restore the whole batch before debugging any failed check.
Verify in the base and current trees that supported consumers cannot reach removed code. Check dynamic entry
points, registries, reflection, plugins, configuration, generated consumers and public exports.
Lint, coverage, post-edit searches and one dead symbol alone do not prove base or module unreachability.
Explain and preserve uncertain candidates. Keep removals recoverable in Git and validate affected runtime,
build, packaging, deployment and docs boundaries.

Explain the clarity gain and any apparently behavioral edit. Run focused success
and relevant failure/cancellation tests and [contract checks](../../CONTRACT.md#blockers); record evidence and
Expand Down
39 changes: 15 additions & 24 deletions core/skills/work-issue/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,16 @@ description: Own full delivery of a live GitHub issue through verified merge and

# Work Issue

Use [the contract](../../CONTRACT.md); the issue owns intake context, the PR owns
delivery evidence. Read live issue acceptance, comments, artifacts and linked
work. Before pickup, reconcile prior and partial deliveries, branches and
competing PRs with the issue's [dispatch authority](../../../docs/DELEGATION.md#team-roles).
Verify remote identity before mutation and connected environment before
relying on production claims. Before presenting counts, censuses or states for
a decision or requesting production-change approval, follow
[evidence for approval](reference.md#evidence-for-approval).
Before continuing an existing branch or PR, follow
[inherited-work guidance](reference.md#inherited-work).

Retain an inherited task worktree or use `loopzero start <task-slug>`.
Record observable acceptance and the issue link. Deliver through
[implement](../implement/SKILL.md). Follow the linked safeguards for
[API shape changes](reference.md#api-shape-changes),
[seeded browser state or changed prerequisites](reference.md#fresh-stack-proof),
and [implementation or repairs without a base merge queue](reference.md#integration-without-a-queue).
Follow [the contract](../../CONTRACT.md). The issue owns intake and the PR owns delivery evidence.
Read live acceptance, comments, artifacts and linked work. Reconcile prior and partial deliveries,
branches and competing PRs before pickup with the [dispatch authority](../../../docs/DELEGATION.md#team-roles).
Verify remote identity before mutation and connected environment before production claims.
Use [approval evidence](reference.md#evidence-for-approval) for decision counts, censuses or states
and production-change approval. Use [inherited-work guidance](reference.md#inherited-work) before continuing an existing branch or PR.
Keep the inherited worktree or use `loopzero start <task-slug>`. Record observable acceptance and link
the issue. Deliver through [implement](../implement/SKILL.md), applying the safeguards for
[API shape](reference.md#api-shape-changes), [changed stack prerequisites or seeded browser state](reference.md#fresh-stack-proof)
and [implementation or repairs without a merge queue](reference.md#integration-without-a-queue).

Before review, update docs as needed and record changes or evidence that none are needed.
Before publication, inspect the issue and links for its lifecycle blueprint and
Expand All @@ -46,10 +39,8 @@ Follow the linked safeguards when [partial delivery auto-closes the issue](refer
for [findings after completed acceptance](reference.md#late-findings), and for
[monitoring after shipped acceptance or deferred work](reference.md#monitoring-and-deferred-work).

Open the return with one plain sentence: what changed for the owner and whether
anything is needed from them. Then return evidence, PR/head or landed SHA,
remaining acceptance and next-action owner
with command or trigger to the dispatch authority on the issue/PR or through the
parent. Reconcile conflicts and scope-expanding or reserved choices with that
owner. Continue only an already commissioned successor after recording this
item's evidence and rechecking live state in a fresh task worktree.
Use [Reporting](../../CONTRACT.md#reporting) and open with one plain sentence covering owner impact
and any action needed. Send evidence, PR/head or landed SHA, outstanding acceptance and next-action
owner with command or trigger to dispatch authority on the issue/PR or through the parent.
Reconcile conflicts and scope-expanding or reserved choices with that owner. Continue only an
already commissioned successor after recording this item's evidence and rechecking live state in a fresh task worktree.
27 changes: 10 additions & 17 deletions core/skills/write-tests/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,17 @@ Follow [the contract](../../CONTRACT.md). Do not change product behavior merely
to increase coverage; route product repairs to [implement](../implement/SKILL.md)
and observed failures to [diagnose](../diagnose/SKILL.md).

Choose the cheapest faithful public boundary: unit tests for deterministic logic,
integration tests for real storage/adapters and end-to-end tests for journeys
that need the assembled system. Report missing seams rather than extracting
production code solely for testing convenience. Use independent oracles for
outputs, transitions and effects; mock calls, snapshots, internal steps or copied
implementation calculations alone are insufficient.
Choose the cheapest faithful public boundary: unit for deterministic logic, integration for real
storage/adapters, and end to end for assembled journeys. Report missing seams without extracting code
just for test convenience. Use independent oracles for outputs, transitions and effects. Mock calls,
snapshots, internal steps and copied calculations are insufficient alone.

Cover material success, denial/isolation, validation, transitions and failures.
Follow repository conventions with minimal, deterministic, isolated fixtures,
using the real producer where cheap and otherwise matching the consumed fields
and behavior of its public interface while avoiding shared mutable state,
timing tolerance and duplicate cases. For bug fixes,
observe the regression test fail on pre-fix code; only when that is impossible,
explain the oracle and its limits. Infrastructure failures do not demonstrate
regression detection.
A new or changed test blocks other changes only through the consumer's
admission rule; established critical assertions stay blocking.
Coverage-only tests may pass existing code.
Cover material success, denial/isolation, validation, transitions and failures. Follow repo conventions
with minimal deterministic, isolated fixtures. Prefer cheap real producers or match the public fields
and behavior consumed, avoiding shared mutable state, timing tolerance and duplicate cases.
For a bug fix, observe the regression test fail on pre-fix code. If impossible, explain the oracle and its limits.
Infrastructure failure cannot prove regression detection. New or changed tests block only through the
consumer's admission rule. Established critical assertions remain blocking. Coverage-only tests may pass existing code.

Run focused and affected neighboring tests, then [contract delivery checks](../../CONTRACT.md#blockers).
Record commands, results and limits in task Notes.
9 changes: 5 additions & 4 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,11 @@ the authoritative `checks.json` receipt. Checks lock the task state directory
through execution and receipt publication. A waiter can reuse a newly published
passing receipt when HEAD, settings and declared inputs match. Writers recheck
HEAD and atomically replace the receipt from a synced sibling temporary file.
Successful keyed stages are checkpointed in the same receipt
for reuse. A checkpoint cannot replace a clean pass for the same head and
settings or satisfy readiness before final worktree validation. Completed
failures still replace passes. Runners cannot select stages or mint receipts. Stage admission
Successful keyed stages are checkpointed in the same receipt for reuse.
A successful stage checkpoint preserves a clean pass for the same head,
settings and commands. A failed stage replaces an existing receipt immediately.
Final worktree validation is required before publishing a pass. Runners cannot
select stages or mint receipts. Stage admission
belongs to the runner: the outer `loopzero check`
must not hold a heavy slot when a runner is configured. Without a runner, the
existing local execution path is unchanged.
Expand Down
Loading
Loading