Repository navigation
Highlights: autonomous by default (your typed intent is the grant; no approve SN <code> line),
one-way doors cost one step (reply allow <door> <code> in chat; test-scoped DB drops just run, logged),
and kernel and user space (the loop's opinions are ejected into your repo and yours to change; modules
and distros extend the kernel, never weaken it). Also: mission layer (M9), agent habitat (M10), DeepSeek
Harness host. Upgrade: claude plugin marketplace update aloop-marketplace && claude plugin update aloop@aloop-marketplace.
Added
-
The README and the site lead with the owner's brand again (ROADMAP §4.11): #94, the owner's Aladdin design system, had sat unmerged since 2026-10-20, so master still carried the earlier invented gold kit; it is merged here, and the owner's Aladdin's loop infographic (
docs/diagrams/aladdins-loop.webp, genie included, as given) now heads the README and the site. The site's hero command was a shellaladdin "add CSV export to the report", which only records an intent; the site now has a quick start with the real install lines and/aladdin Add rate limiting to the API(the infographic's example; each line run on Claude Code 2.1.329 against the GitHub marketplace), and the roadmap through M12. Tests:site.test.py(the brand assets, the quick start's commands, the roadmap; red on the old page),readme.test.py(the infographic leads). -
Kernel and user space (M12). The loop's opinions (16 roles, skills, a kernel reference) are
ejected intodocs/agents/userspace/(tracked in git) on the first session oraloop init --apply,
and changed freely.aloop userspace(status,which,upgrade,diff,merge,accept,
reset,apply): home (~/.aloop/projects/<name>-<hash>/) > repo > plugin, every run logs the copy
used (userspace.applied), and plugin upgrades never overwrite an edit (three-way merge). The kernel
(gates, hooks, audit log) is never overridden: reference copies change nothing, a role name with no
gates is never loaded, and no agent, worker or live-sprint supervisor writes user space. -
Modules and distros (M12.7, M12.8). The host harness is the hardware, aloop is the kernel, and
modules plug into it:~/.aloop/modules/<name>/adds checks (a fact check, a brand-voice check) on
SubagentStop and Stop once a project adds it (aloop module addpins its sha256 in
docs/agents/userspace/distro.json). Modules run beside the core gates; a changed, missing, crashing
or timed-out module blocks, and every run is logged (module.run). A distro bundles a domain's
modules, roles and skills (software, the TDD loop, is the default). Build and share your own:
aloop module new,aloop distro new|check|install|use; how-to indocs/BUILD-A-MODULE.md. -
A one-way door costs the human one step, and a test resource is no door (ROADMAP M11.15). Dropping test-named databases on a local server (
dropdb recast_test_…,psql -c "DROP DATABASE … _test_…", destructive SQL inside a test-named database) is two-way: crossed with no question and logged asdoor.two_way(test-scoped); a non-test name, a mix, a remote host (flag,PGHOST, URI) or a name the gate cannot read stays one-way. EveryASK[door]now names a chat line,allow DOOR <code>(the code names the door and that exact action): the human types it where they already are, the gate finds it among the captured prompts, records a human ledger row citing it and crosses once; a reused, negated or forged line opens nothing and an agent still cannot authorize itself.doors authorizerefusals print the whole command to paste (flags filled, the newest stopped action's--once), and from an agent's!shell also the chat line. Reason: a field session needed a second terminal and three tries to drop 35 archived test databases. Test:mission-doors-consent.test.py. -
A task's diff stays in its planned fileset, with worker-declared exemptions (ROADMAP M11.12):
targets diffscope(GREEN and RED stop gates) judges the diff against the task's targets' paths and planned tests, literally. A new test file passes; an existing test outside the plan may only gain lines (GREEN and RED can no longer weaken or delete another task's test). A production file the plan missed passes only as a### Scope exemptionsline (- <path>: <reason>) in the worker's output.md block: a literal path, a reason of 4+ words, at most 3 (ALOOP_SCOPE_EXEMPT_MAX), never a one-way path (CI, VCS config, agent settings, secrets, migrations, licences, run data); each one taken is ascope.exemptedledger row, with no human step. The contract's SCOPE_GLOBS can only narrow the plan, a task with no targets gets no free scope,targets checkrefuses a glob path, a production file under a nestedtarget/(no Cargo.toml beside it) is judged, and non-ASCII paths are read unquoted. Test:scripts/test/task-scope.test.py. -
Plan approval is a gate (ROADMAP M0.9):
gate-dispatchstarts no execution role (RED, SCAFFOLD, GREEN, structural review, final gate) of a sprint until the human approved that sprint's plan as it is now.events authority --sprint Nexits 3 with the line to type,approve SN <code>(reviewed, the code naming the sha256 of the sprint's plan files, its intake and standards included) orautonomous SN <code>(autonomy for that sprint, re-plans included, the code naming the authority record); the task contract'sSTORY_DIRand task must be a live story and task of that plan's frozenids.json; the line must be among the human's captured prompts and typed after the sprint's last decision (M9.17's mechanism). A changed plan, a re-plan in reviewed mode, a roll-back to an old line, another sprint's line, a negated line and a hand-edited or emitted record all block (plan.approvedandhuman.approvalcannot beevents emitted); an approved autonomous mission grants its own sprints autonomy with no line.events approval SPRINT|TASK_IDis the check. Codex'sspawn_agent(agent_type,message) and OpenCode'stasknow reachgate-dispatchtoo, andclaude -p,codex execandopencode runfrom a tool call are blocked in every aloop project, not only where a mission is set.e2e-live.shpre-approves with anautonomous S1 <code>line in its prompt. Reason: the north star allows no human help beyond approval, and the approval was a playbook rule a supervisor could skip. A 4-lens adversarial review found 9 defects: 7 fixed with a check red on the first head (cross-sprint or unplannedSTORY_DIR, a retyped line kept stale, mission autonomy over a non-mission sprint,transcripts prunedropping the prompts grants cite,codex plugin addrefused, a code past column 200, a crash on a malformed run-log line), 2 in the playbook (intake reuses a mission's handed-off intent; a reviewed re-plan waits for the human's new line).transcripts prunenow keeps the human's prompts. Test:plan-approval.test.py(20 checks, red on master), plus the host suites. The approved plan's files include the sprint'sintake.mdandstandards.md, and a grant pins them file by file: GREEN's check for an unplanned dependency reads only the text the human's grant pins, the plan they approved or, under their autonomy grant, the plan as the planner's gate last passed it (gate-stage2-completerecordsplan.gatedon the planner's stop), as it was then, so text added later names nothing and a re-plan does not undo an approved dependency. -
Core agent principles and the one-way / two-way door rule (ROADMAP §4.12, M9.30): seven core principles from Amazon's Leadership Principles, the door rule first, go to every aloop agent at session start (
aloop mission principles show --core). A two-way door (a branch, a local edit, a test, a draft PR) is decided, not asked. A one-way door (aloop mission doors list: a push or merge to the default branch, a force-push, a release, a deploy, a message sent outside, a secret, dropped data, …) is stopped by a PreToolUse gate withASK[door] <id>until the human records an authorization in their own terminal (aloop mission doors authorize ID --by NAME --reason TEXT [--until DATE] [--once DIGEST], a hash-chained ledger row); a wall (switching a gate off, forging a human record) is never crossed. While a run is live, a question to the human must name a door the gate stopped and nobody authorized. Reason: Adeel's request that agents decide two-way doors themselves and ask only at a one-way door not already authorized. Test:mission-doors.test.py. Hardened by an adversarial review (15 findings, each a test): the gate reads Bash as the shell does (comments, line continuations, heredoc bodies,xargs,find -exec,echo … | sh), a branch condition reads the directory the command acts on (git -C,cd), settings are guarded wherever they live, dry runs andcommand -vare two-way, the newest decision by time counts and a revoke holds on every branch, a once-grant is crossed once under a lock, a broken ledger is named, anddoors authorizerefuses an agent's shell. -
DeepSeek Harness (dsh) host (ROADMAP §4.9):
aloop install dsh(aliasdeepseek;--project Por--global) renders adsh --profile aloopprofile in$DSH_HOMEand installs the skills. Its native plugin (plugin/hosts/dsh/aloop.mjs) runs the same gates as Claude Code on dsh's own events: a deny before a tool runs, a block after an invalid artifact write, and a stop gate that steers a role back up to 3 times before the supervisor is told it is BLOCKED (or STUCK, released unverified). Roles are agent presets on two subagent tools, one per model route (deepseek-v4-profor planning,deepseek-flashfor work by default;MODEL_PLANNING_DSH/MODEL_WORKER_DSHoverride). A writer'saloop bindmoves its working directory into its worktree, andhost-adapterconfines its commands, edits andworking_directorythere. Usage is recorded Claude-shaped per role, so budgets, the ledger andrun-summarywork unchanged.make e2e-live HOST=dshdrives it live and exits 2 with the fix when noDEEPSEEK_API_KEYis set. Reason: DeepSeek's own harness is the cheapest route to a strong model. The profile records the project it serves (or--global), so another project'saloop-initnever re-renders it, and gates get the worker shell's environment (no API key). The mission layer's six roles run on dsh too: presets on their route group's subagent tool,gate-mission-scopeon every write and command, andgate-mission-artifactat each role's start and stop; the mission skill installs asaloop-mission. A second review (3 lenses; 11 confirmed findings, each fixed with a test) closed: a working directory that vanished (dsh's tools move it back to the main tree, so the plugin judgesensure()'s directory andhost-adapterrefuses to run from a missing one), gate switches from the project's.env(dsh loads it;SKIP_HOOKS,GATE_RUN_TESTS,REPO_DIR,AGENTIC_*from it never reach a gate), an interrupted Stop that dropped the sprint-close notice, and the shared profile: its owner is the main tree, an older unrecorded profile is claimed only by the project that installed it, and a project it does not serve is told so byinstall status,aloop-initand the session itself. Tests:dsh-plugin.test.mjs(48 checks, emulated),dsh-runtime.test.mjs(53 checks on the real pinned dsh 0.2.1-rc.2 with a scripted model; the CI hosts and macos jobs install it) anddsh-install.test.py(10). -
dsh follow-ups (ROADMAP §4.9). One
aloop install dshserves every project: the plugin routes each role's requests through dsh'sagent/requestto its own project's model (aloop models resolve <role>), so gate-dispatch no longer refuses another project's roles until a re-install, and a role whose model cannot be resolved is refused (fail closed). Roles are no longer offeredsend_message, so dsh adds no "send your result" guidance and no call is spent on a deny. dsh compaction is recorded ascontext.compactedand the handoff comes back after it; the capability matrix marks dsh compaction and live messaging as advertised, proven on the real runtime. Two mission roles (one per subagent tool) run through both of their gates on the real runtime.run-summary --host dshreports a dollar cost: each logged call is priced from a dated, sourced DeepSeek table (plugin/bin/_prices.py; cache hit, cache miss, output, peak or off-peak), withcost_by_modelinsummary.json; an unpriced model id keeps its tokens and leaves the cost unmeasured, never guessed. -
Brand kit and repo front page on the owner's Aladdin design system (vendored in
docs/brand/design-system/: tokens, guidelines, the social preview and OG card sources): the wordmark (DM Sans 800 over the blue-red-green-gold loop bar) and its on-blue variant, the four-dot signature, an icon with a 16 px cut, light and dark README banners, favicons, app icons, the site's OG card and the GitHub social preview, all generated bydocs/brand/gen_brand.pyfrom the design system's colour tokens with WCAG checks (rules indocs/brand/README.md). No emoji on brand surfaces. The README leads with the mission layer, the agent principles and the door rule, the supported hosts and the measured demo runs; the site carries the favicon and Open Graph/Twitter card metadata;SECURITY.mdand bug/feature issue forms are new. -
The mission loop hands out a goal's commands only when the gate takes them (ROADMAP §4.12, M9.53): before
PLAN_INTENTS,mission tickruns the samegoal checkthatgoal intentsruns, beforeSPRINTall of whatgoal nextchecks (the next intent'sintent checkincluded), and before a met goal's close it asksgoal close's own rule. The loop's check of the next intent runs in process, sotick --peekandduestill record nothing (nointent.normalized); a goal with no intent to hand out, or a next intent whose check crashes, isBLOCKEDwith that reason. A refusal isBLOCKEDwith the gate's reason (for example "the mission changed since the goal was derived"), where the loop used to hand out the same command 3 times and then block naming no cause.goal closenow checks the ledger and the goal's content before it trusts agoal.metrecord, recordsgoal.metbefore it sets the status, and repairs a baremetstatus;goal nextrefuses a goal with agoal.metrecord. Test:mission-tickcheck 34 andmission-goalcheck 8; every goal in the tick suite that reaches a goal command is now a real one, derived throughaloop missionon the project's clock. -
A goal its sprints did not meet is retired, and the loop moves on (ROADMAP §4.12, M9.50):
aloop mission goal retire GOAL --eval EVALrecordsgoal.retiredin the committed ledger once every intent of the goal was sprinted and its sprints closed, and the newest eval of it, made after those closes from a state measured after them, still lists gaps. A retired goal takes no more intents, sprints or close.mission evaluatecovers the whole mission again, and the retired goal's own open gaps are held from the next goal until a new baseline version or the human's next approval of the mission, so the loop does not sprint the same gaps again; a regression is never held. When every gap is held,mission ticksaysBLOCKEDand the human'saloop mission tick --force --by NAMElifts it.mission tickhands this out asRETIRE_GOAL(rolemission-planner) where it used to stop atBLOCKEDfor the human. It asks the command's own rule first: a stale state or eval becomesASSESSorEVALUATE, and any other refusal isBLOCKEDwith its reason. 3 retired goals in a row still go to the human. The planner's stop takes a retired goal as its finding. Tests:mission-goalcheck 13,mission-tickchecks 28 and 33,mission-roles. -
A mission's gap lists count only as
mission evaluatecomputed them (ROADMAP §4.12, M9.27):evaluaterecordseval.completedin the committed ledger, andmission tick,evaluate checkandgoaltake the newest eval whose content that record covers, with a matching seal, in the ledger's order. An eval file written by hand, or edited (or re-stamped) after it was recorded, no longer sends the loop toRESEARCHas "goal met" or makesgoal deriverefuse what tick handed out, a clock that is behind no longer reorders them, and a fresh checkout derives and closes goals from the evals it committed. An eval or state named as journey or baseline evidence needs its record too. Tests:mission-tickcheck 32,mission-journeys. -
A mission's stop at a spend cap holds on a fresh checkout (ROADMAP §4.12, M9.24): the first
STOP_BUDGETtick records amission.budget_exhaustedledger row for the mission's content (once per content), andmission tickstops on it whatever the checkout's token ledger says, until a raised cap changes the content. -
Lifting a mission block is the human's own words (ROADMAP §4.12, M9.51):
aloop mission tick --force --bynow asks (exit 3) for the human's typedlift <mission> <code>line, the code bound to this occurrence of that block, and records amission.liftedledger row, so--byalone, a lift only the run log has (or a replayed one), an old line or a line typed for an earlier block lift nothing, a lift of 3 failed goals reaches only those goals whatever--nowsays, and a fresh checkout keeps a lifted block lifted./aloop:missioncounts a lift among the typed grants it relays. A lift recorded before this (run data only) no longer counts. -
The mission layer's six fixed roles (ROADMAP §4.12, M9.9):
market-researcher,product-tester,state-assessor,evaluator,mission-plannerandethics-reviewer, each a persona with a four-case eval suite, a model route (the four that judge on the planning route, the two that measure on the worker route), hook matchers on Claude Code, Codex, OpenCode and dsh, and Codex/OpenCode agents and dsh presets fromaloop install(which also renders the mission skill for OpenCode asaloop-missiononce it ships).plugin/mission/roles.jsonnames the paths each role writes.gate-mission-scope(PreToolUse) is the role path guard: a mission role never writes source, mission.json or another role's dir, never commits and never runs a human's approval; a builder never writesdocs/agents/mission/or runs a writingmissioncommand; the supervisor never hand-writes a role's artifact. No one hand-writesdocs/agents/mission/ledger.jsonlor the captured prompts a grant reads (<run data>/transcripts/), runs a hook'stranscripts prompt|record|…, or starts a host session (claude -p,codex exec,opencode run,dsh <profile>) from a tool call (in every aloop project since M0.9; its prompt would count as the human's words, M9.17), and no dispatched agent runsmission baseline restore,events authorityor anevents emitof a human event.gate-mission-artifactrecords what exists when a role starts and, at its stop, requires an artifact in its own paths that passes the core contract and its area's check, refuses a deleted artifact, a change to another role's or a ledger that no longer verifies, and recordsartifact.created|updatedas provenance. A mission write never arms the sprint lock. The scope gate reads a Bash command as the shell would (_shellread.py: quotes, comments, line continuations, heredocs, wrappers such astimeoutandenv,bash -c,eval, a script run by an interpreter, variables and$(mktemp)). Each area's check runs once per artifact with its id or subject, an ethics hard line is the reviewer's finding, not a defect, and a derived goal whose only blocks are its pending ethics review waits on the Ethics Reviewer, not on the planner. Test:mission-roles.test.py(33 checks, with each role run through the real journeys, baseline, assess, evaluate and ethics, goal, research and judge areas),mission-scope-bash.test.py(718 commands),opencode-plugin.test.mjs.- Its gates after a second adversarial review (each finding now a test) and M9.42: a human's confirm, restore or veto-window apply during a role's run, and what its command changed (journeys frozen, a version superseded), is no role's write and never blocks it, while a status no record explains still does. An overlapping run excuses only what it answers for as the file is now, and a run counts as open while it is active (its last tool call). The ledger is append-only during a run, with or without the run log. No role rewrites the human's or intake's intent, and a
source: missionintent is the Mission Planner's. A research report belongs to the role itsrolefield names, so the Product Tester files its own (research new --role product-tester); a judge run log and a usage report are the writing role's work, checked by their area; a draft in a role's own dir may be removed. The telemetry check's instrumentation problems and ledger problems that predate the run are notes, not the role's block; a malformed intent field and a timed-out check are ordinary blocks the stuck release can end; an OpenCode child continued for a new task starts a new run. Test:mission-roles.test.py(47 checks),opencode-plugin.test.mjs. - Its gates after a third review (each finding now a test with its allow-control): a human event, or intake's own
intent.received/intent.normalized, of the run that names an intent makes its change, a new intent or a deleted one theirs, while one no event names still blocks; the supervisor's restore of the ledger (HEAD's committed copy, or its rows before the first bad line) is no rewrite; a run counts as active by its last tool call in the transcript store, not by a file a role can touch; a judge run log or usage report counts only with its command's event of the run (judge.run,telemetry.report); a research snapshot belongs to the roles whose reports cite it; deleting an artifact another run's pass accepted during this run blocks; a run that wrote nothing on a ledger broken before it started gets a note. The Product Tester's eval suite namesbaseline new --supersedes, and every persona and eval verb is checked againstmission <area> --help. Test:mission-roles.test.py(57 checks).
- Its gates after a second adversarial review (each finding now a test) and M9.42: a human's confirm, restore or veto-window apply during a role's run, and what its command changed (journeys frozen, a version superseded), is no role's write and never blocks it, while a status no record explains still does. An overlapping run excuses only what it answers for as the file is now, and a run counts as open while it is active (its last tool call). The ledger is append-only during a run, with or without the run log. No role rewrites the human's or intake's intent, and a
-
The mission loop end to end, offline (ROADMAP §4.12, M9.13):
mission-e2e.test.pydrivesmission tickfrom a new mission through research, a journey, a confirmed baseline, a gap list, a goal, its intents and one Aladdin sprint per intent to GOAL MET and the next raise of the bar, with zero tokens and each step done through the CLI the way its role or the human does it. A fresh clone hands out the same action. Ethics reviews and hard lines are now ledger rows (M9.24), so a clone no longer asks for every review again or forgets a hard line; the ledger row wins over its run-log copy, and a broken ledger makes every ethics verdictbroken. Tests:mission-e2e.test.py,mission-ethics.test.py. -
A mission baseline binds the mission's direction (ROADMAP §4.12, M9.25):
direction_sha256covers the mission id, statement, mode and constraints, so raising a budget cap or changing the cadence (and approving it) keeps the confirmed baseline, while a new direction still asks for a new version. Reason: M9.8's budget test, a raised cap asked for a new baseline though "best" had not changed. Test:mission-baseline.test.py. -
Mission approvals are the human's own words (ROADMAP §4.12, M9.17):
mission approve,baseline confirm|restore,journeys approve,mission ethics consentandmission telemetry consentrecord only when a prompt theUserPromptSubmithook captured has a line such asapprove msn_… 3f2a9c1b(the verb and the first 8 hex of the content's sha256); until then they ask (exit 3) with that line.--byalone, a negated line, another code, a line older than a later decision about the subject (for a baseline, any version's confirmation) and a hand-appended ledger row without such a line grant nothing. Reason: an approval was only as strong as--by, so a role could approve its own mission change. Tests:mission-core.test.py,mission-baseline.test.py. -
Mission goals and the Aladdin handoff (ROADMAP §4.12, M9.11):
aloop mission goal deriveturns the Evaluator's gaps (in its own priority order) into a goal (autonomous: the top N; spoon-fed: the gaps the human picks with--pick … --by, which is the goal's approval) that names its targets and is bound to the mission's content, the eval, the principles block for the mission's mode and the Aladdin autonomy it maps to;goal checkholds every intent until the goal is the contentderiverecorded, the mission is unchanged and approved and the mission's and the goal's ethics pass;goal intentswrites one Intent Contract per gap (intent new --source mission --goal --gap, filled without a model, and refused for a goal that fails its check);goal nextnormalizes them one sprint at a time;goal closemarks an active goal met once an evaluation of it says so; goals come only from the latest recorded evaluation, whose statemission assessmeasured, andevents emitcan no longer forge the state, eval or intent records; a gap a hard line fixed is held out of every later goal;events tracewalks a commit back through intent → goal → eval → ethics → mission → its approver. Test:mission-goal.test.py. -
Mission layer hardening (ROADMAP §4.12, a second adversarial review of M9.0/M9.2/M9.3/M9.10, 31 unique findings, each now a test): gates decide from ledger records, not files. Frozen journeys, replacements and retirements, states (
state.assessed) and the active goal (goal.derived) are read from the ledger, so a hidden or edited file changes nothing. Nothing decides from a broken ledger or an edited current baseline, and a restore cannot be undone by a re-apply. The runner pins every project file it runs and refuses links, inline code and scripts outside the project. A judged metric pins its rubric by sha256. A veto binds the content in any order. An unknown flag exits 64. Text is UTF-8 in any locale. GA4's reserved names are one list, andethics.*andgoal.*decisions are ledger rows. Tests:mission-{core,journeys,baseline,evaluate}.test.py. -
Mission ethics (ROADMAP §4.12, M9.4):
aloop mission ethics new --subject mission|<goal_id>writes a review bound to the subject's sha256 with the topics a fixed screen matched;recordchecks and seals it;checkpasses a clear review, asks (exit 3) on a gray one untilmission ethics consent --by NAME --reason TEXTis recorded for exactly that content and review (stored inside the goal, never carried over), and blocks a hard line (illegal, deceptive, harmful) for good: no consent, later or edited review, deleted file, edited goal, the same words under a new goal id or a goal derived again from the same gap unlocks it, and the goal is retired (blocked). The screen reads normalized text and the mechanics a planner would write ("hide the unsubscribe link", "hack into"), andcheck --jsonnames the state the loop acts on.events emitrefuses human approvals and ethics verdicts, so only their own commands write them. Reason: the spec's three ethics tiers. Test:mission-ethics.test.py. -
Mission principles (ROADMAP §4.12, M9.7):
plugin/mission/principles.mdholds the standing principles in two variants, autonomous and spoon-fed, with the IBM autonomic loop as the engine and four Amazon-style tension pairs;aloop mission principles show --mode Mrenders the block a goal carries,hashits sha256, andcheckrefuses an edit that drops a principle, a variant or a pair. Reason: the spec's principles in both modes. Test:mission-principles.test.py. -
The mission loop (ROADMAP §4.12, M9.8):
aloop mission ticknames the one next action (research, baseline, journeys, ethics, goal, sprint, assess, evaluate, a human ask,WAITorBLOCKED) from the committed ledger (human decisions, the baseline asmission baselinedecides it, so a fresh checkout decides the same) and the files and events the harness owns, first match wins, and records it as amission.tickevent; it stops at the mission's token, USD or deadline cap from the token ledger, applies an autonomous replacement baseline after the mission's veto window, sprints an active goal's intents one by one, and hands the same action out at most 3 times on the same facts (then the human's--force --by).aloop mission duereads files only, soaloop mission cron --installruns a host session only when a tick is due, under a loop lock, and prints a human action once instead of starting one. Reason: the owner's "set and forget" mission mode. Test:mission-tick.test.py. -
The mission loop drives
aloop mission goal(ROADMAP §4.12, M9.28): a goal counts only with itsgoal.derived(orgoal.approved) record and is closed bygoal.met, so a goal file nobody derived is no goal; each handout names its command (goal derive, spoon-fedgoal optionsandderive --pick,goal intents,goal next,goal close --eval); an eval narrowed to a closed goal asks for a whole-mission eval; a goal sprinted with gaps open, or a hard-lined goalevaluatestill narrows to, goes to the human (gaps M9.29, M9.50). Test:mission-tick.test.py(29 checks, a real goal run on the real clock). -
The mission loop takes its ethics facts from
mission ethics's verdict (ROADMAP §4.12, M9.23): one rule for the loop and the gate, so a goal derived again with a hard-lined goal's words is hard at once (no fresh review is handed out), a review edited after it was recorded isBLOCKEDfor the human, and a gray content asks for the consentmission ethics consentrecords. Test:mission-tick.test.py(28 checks). -
Mission loop review fixes (ROADMAP §4.12, M9.8, 13 findings, each a test that failed before its fix): after the human's
baseline restorethe archived replacement is no longer handed out (it would undo the restore); a proposed version the gates would refuse to measure asks for a new version, or a journey that supersedes one whose runner changed; a raised bar after nothing to earn asks for a new version; a vetoed content is named (by, when, why) and keyed on the content under any id; everyBLOCKEDhas its own key, soduetells the human each new block; the ledger is folded by time, as the core reads it; a committed hard ethics review fails closed on a checkout without the run log; a state report needs itsstate.assessedrecord; only the grant that lifts "3 failed goals" resets that count; the facts fingerprint covers spend, reviews, intents, plan approvals, the sprint lock and grants. Test:mission-tick.test.py(27 checks). -
The
/aloop:missionskill (M9.12): the supervisor's playbook for the tick loop, one row per action with the role it dispatches, the exit-code contract, and the hard rules (approvals only on the human's explicit yes, no mission artifact by hand, hard lines final). Test:mission-skill.test.py. -
The mission layer's evaluation (ROADMAP §4.12, M9.2, M9.3, M9.10):
aloop mission journeys(user journeys with GA4-valid step events, metric query definitions, research-sourced refs, pass criteria that never gate on telemetry;diffnames every way a new version weakens an old one, and a frozen journey retires weaker only with a human approval),aloop mission baseline(bound to the approved mission, measured by running every pinned runner twice within tolerance, refused when every journey already passes, confirmed by a human, replaced only with evidence; an autonomous mission applies a replacement after its veto window unless vetoed), andaloop mission assess/evaluate(the state measured exactly as the baseline froze it, and a gap list thatevaluate checkrecomputes from its inputs). Every record a gate decides from (human decisions, measurements, retirements) is committed to the hash-chaineddocs/agents/mission/ledger.jsonl, and gates read those records, never a status field; an adversarial review's 43 findings (forged measurements, self-replacing journeys, rollbacks, NaN, unpinned runner scripts…) are each a test.aloop mission baseline restorereinstates an archived version. Tests:mission-{journeys,baseline,evaluate}.test.py. -
The mission layer core (ROADMAP §4.12, M9.0):
aloop mission init "<mission>" --mode autonomous|spoon-fed --budget-usd Nwrites a sealeddocs/agents/mission/mission.json;mission checkpasses only when its exact content carries a humanmission.approvedevent (mission approve --by NAME), so a changed mission or budget is caught;mission statusis the per-kind snapshot the loop decides from; areas are discovered fromplugin/mission/<area>.pyand their tests run by a Makefile glob, so the parallel M9 tracks add files instead of editing shared lists. Reason: the owner's "Missionary Aladdin Genie" spec. Test:mission-core.test.py. -
The planner persona gives the sprint
plan.mdstage quoted (stage: "1");persona-shapes.test.pyvalidates that shape againstplanning-artifacts.kdlas written. Reason: live runs 38, 39 and 41, a barestage: 1(a YAML number) got every sprint plan.md refused once (F020). -
targets: acreateof a test file takes itsplanned_symbolfrom the task's owntests(the firstfnlisted for that path). Reason: live runs 36–41 had 8 planner blocks "create needs planned_symbol" on a new test file whose tests the plan already named. Test:semantic-targets.test.py. -
RED is verified on JS: with
node --test(or npm/yarn/pnpm test, jest, vitest, bun, deno) in the gate matrix, a RED whose test file cannot load what it imports (a missing module, export or name) is blocked, like a Go build failure, and the red-worker persona says where each language keeps its shim.make e2e-live YES=1 INTENT=camelis the JS fixture (needsnodeandnpm). Test:any-language.test.pycheck 12,e2e-live-hosts.test.py5d. -
ensure-tools --resolveskips its own build when it is stale (older plugin version or tool sources), so a current binary on PATH wins, and with none the shim rebuilds. Reason: live runs 38 and 40, a worker'sselfcheck(noCLAUDE_PLUGIN_DATA) resolved a 0.11.0ctx-symbolsin~/.local/share/aloopahead of the session's current build, and the structural reviewer reported a false HIGH on.aladdin/worktrees/copies. Test:ensure-tools.test.py. -
GREEN may edit any language's test files (to drop RED's shims) besides its scope, not only Rust's
tests/*.rs; RED and GREEN shareDEFAULT_TEST_GLOBS. Reason: live run 39, a Go GREEN removing the shim fromroman_test.gowas blocked 10 times as out of scope. Test:any-language.test.py. -
make e2e-live YES=1 INTENT=romanruns the loop on a Go intent (Roman numerals; needsgo, checksfunc Test,go test ./...and not.Skip). Run 38, the first Go run: 12/12, 14m15s, $1.02. -
aloop budget contractgives the story's (or sprint's)init.mditstype: initfrontmatter: it creates the file with it, or puts it on top of a file without one, and never rewrites a file that has it. Reason: live run 38, the supervisor began the sprint dir'sinit.mdwith a dispatch block, andgate-structural-integrityblocked the reviewer 7 times (STUCK twice) on the missing header. Test:budget-contract.test.py. -
gate-standards-citedblocks astandards.mdwhose gate matrix the gates cannot run (no## Gate matrixheading followed by one fenced block of commands), and the standards persona states that format. Reason: live run 37, the first matrix was a table, it parsed empty and RED was blocked 3 times until standards was re-run. The matrix parser moved tobin/_matrix.sh, shared by both. Test:scripts/test/any-language.test.py. -
make e2e-live YES=1 INTENT=slugifyruns the loop on a Python intent: it seeds a Python package, needspython3andpytestinstead of cargo, and checks fordef test_, a passingpytestand no skips. Every intent's post-run checks now run to the end (run 37 died on an unboundSUPPRESS_RE; test:e2e-live-hosts.test.pycheck 7). -
RED is checked on any language, not only Rust. In a repo with no Cargo.toml,
gate-red-verifyruns the test command declared in the project'sstandards.mdgate matrix (pytest,go test, npm/yarn/pnpm test, jest, vitest, and others) and blocks a RED whose tests pass. With pytest it also blocks an import or collection error (exit 2) and an empty collection (exit 5); withgo testit blocks a build failure. The default RED test globs now cover Python, Go and JS test files and a top-leveltests/. Reason: a Python RED whose tests already passed used to be accepted with only a warning. Test:scripts/test/any-language.test.py. -
CI
macosjob:make test-hostsandmake conformanceon macos-latest. Reason: the v0.12.0 release run on a Mac found two bugs (symlinked temp dirs, another checkout's shims on PATH) that the Linux jobs never saw. -
gate-supervisor-scopeblocks the supervisor from writing an agent'soutput.mdblock, with Write/Edit or with a shell redirect orteewhile a sprint is live; it names the way out (re-dispatch the agent). Readingoutput.md, appendinginit.md, a dispatched agent's append and a worker's shell in its linked task worktree (Codex, OpenCode) all pass. Reason: live run 29, the supervisor appended a final-gate block itself after the final gate's report was lost; SKILL.md's prose rule is now a gate, like never-commit-on-main. Test:scripts/test/supervisor-scope.test.py. -
gate-finalnow checks comms for a final-gate worker dispatched under a task contract: its latestoutput.mdblock must be its own, with the shell-heredoc instruction when it is not. The final-gate persona gains a Report section and the finish order (append, then selfcheck). SKILL.md runs the planning roles in the foreground and says never to write an agent's block. Reason: live run 29, the final gate's Write was refused, its report stayed in a discarded worktree copy, its stop passed and the supervisor wrote the sign-off block itself; the supervisor also spent 5 turns polling for the planners' files. Test: two conformance cases (§6.6). -
aloop budget contract <TASK_ID> --role R --story DIR [--scope G] [--attempt N] [--symbols S]writes the supervisor's task contract (<run-data>/state/tasks/<TASK_ID>.env) withBASE_REF=HEADand the resolvedBUDGET_*(the story's tasks.mdbudget:line wins), refuses a run-data or missing story dir and an unknown role, and prints one line. SKILL.md tells the supervisor to use it instead of a heredoc. Reason: live run 26's supervisor hand-wrote 9 contracts (about 400 characters each of keys the harness owns), model output re-read on every later turn. Test:scripts/test/budget-contract.test.py. -
gate-dispatchnow refuses a dispatch of any aloop role whosemodelis not the project's confirmed one (aloop models resolve <role>, matched by model family sohaikuandclaude-haiku-5-5agree), or that passes no model (which would fall back to the agent file's default, opus for the planning roles). Reason: live e2e run 20 dispatched planners on opus and workers on sonnet against a project whose defaults.md said haiku for both, and cost $2.79 instead of $0.99 for the same 12/12 result. Test:scripts/test/dispatch.test.py. Live run 21 with the gate: 12/12, 8m17s, $0.66, every dispatch on haiku Run 23 on the two-storywordfreqintent: 13/13, 10m58s, $0.76, 0 gate blocks (ledger rows for runs 20–23 indocs/evidence/README.md). -
Evidence ledger (ROADMAP §4.11):
docs/evidence/README.mdlists every live run behind a public
number (intent, plugin version, checks, wall, cost, wakes, plugin reads, gate blocks, reproduce
command);bin/run-summary <run-dir>writes a run'ssummary.json,summary.mdand ledger row from
the session'sresultlines and the gate log, ande2e-live.shcalls it. README and the site link
every figure to the ledger;scripts/test/evidence.test.pyfails on an unsourced figure. -
run-summarycounts a<plugin>/schemas/…reference as schema use, not a plugin-source read, also
when the path is bound to a shell variable first (run 19: 5 → 0). -
e2e-live.sh --host codex|opencode(make e2e-live YES=1 HOST=…): the north-star run on the other
hosts:aloop install <host>into the seeded repo, thencodex exec --json --full-autoor
opencode run --format jsonwith the host's model routes, the same intent, approval and checks;
--dry-runprints the command.run-summary --hostrecords the host and names it in the reproduce
command; a transcript with noresultline records the cost as unmeasured (—), never $0.00.
Test:scripts/test/e2e-live-hosts.test.py. -
Natural-language auto-trigger (ROADMAP §4.11):
bin/intent-triggeron UserPromptSubmit adds context
to run a plain build/fix request as/aladdin "<intent>"when it lands in an aloop project with no
sprint running. Quiet for questions, slash commands, short replies, a live sprint lock and non-aloop
repos; switch off withALADDIN_AUTO_TRIGGER=offorintent: {auto_trigger: false}in
.aladdin/config.yaml. Wired for Claude Code and Codex (hooks.json) and OpenCode (chat.message). -
The planner's stop gate (
gate-stage2-completeon SubagentStop) now logs its verdicts togates.jsonland the event stream like every other gate, and the stuck release covers the planner: the same block three times in a row releases its stop unverified with astate/stuck/plan-sprintN.<agent>marker the supervisor acts on (a re-dispatch is a new agent id and starts over). A direct call (the supervisor's own check,selfcheck) is logged as a self-check and never releases. Reason: live e2e run 19's re-planning planner was blocked 9 times on one unchanged reason, none counted. Test:scripts/test/planner-stuck.test.py. -
run-summaryreportsselfcheck_blocks, the blocks a worker's ownselfcheckcaught before stopping (they never reach the supervisor), besidegate_blocks. All 3 of live run 27's blocks were such catches. Test:scripts/test/evidence.test.py. -
gate-dispatchcopies the task contract into a manual task worktree (aloop task-worktree add) on every dispatch, refreshing the role per stage, so the worker'saloop bindfinds it. Reason: in live run 28 the supervisor wrote only the main-tree contract, RED's bind failed, and its stop blocked twice in the shared tree. Test:scripts/test/dispatch.test.py. -
make conformancenow covers ROADMAP §6.1 and §6.10–6.20 (except 6.15) by running the focused test of the tool that holds each item. Before this, its report said those items "do not exist yet", though they shipped in v0.12.0. It now reports 74 checks across 19 of the 20 items. §6.15 (re-decomposition) stays explicit: it is measured by live runs. CI's rust job sets up Node 22 for the OpenCode test.
Fixed
make test-hostspasses with md-db installed.supply-chain.test.py(from M0.9's dependency grant) rangate-stage2-completeon planning docs md-db's schema rejects (noSprint goal,Pre-flightorscopesections), so it passed only where md-db was absent, as on CI's host jobs, and failed on a machine with the bundled tools. The fixture's docs now pass the schema, so the gate judges the same plan either way. Test: supply-chain, run with and without md-db on PATH.- The mission artifact gate (
gate-mission-artifact, ROADMAP §4.12, M9.9) after a fourth review (each finding now a test inmission-roles.test.py, with its allow-control): a ledger restore during a role's run is the supervisor's repair only when every row after HEAD's committed copy (or after the good rows of a ledger the run started broken) is one the run started with, byte for byte, or a command's append, so a row edited in place with its event_id kept and the chain hashed again blocks again; a run that wrote nothing on a ledger broken before it is a note only for a role whose own commands decide from the ledger (ledger_boundin roles.json, each checked to refuse); every file indocs/agents/intents/counts, so the human's wordsaladdinkeeps beside an intent (raw-*.txt) and a new*.jsonno intent id names (whichaladdin runwould pick) are no role's to write; an event names an intent only by its ownrefs.intentorintent_id, never by a ref its caller picks (intent new --raw-ref); the planner can no longer flip asource: missionintent to another source to pose it as the human's; and an intent a supervisor'sgit mergeorgit pullbrings in or removes during a role's run no longer blocks the role, while one the role then changes still does. - The mission artifact gate after the fourth review's second round (each finding a test in
mission-roles.test.py, with its allow-control): only agit mergeorgit pullduring a role's run brings a file intodocs/agents/intents/(the HEAD reflog entries since the run started say so, and for a merge it made the file is the other side's blob), so a commit of the working tree (the human'sgit commit -am, or one made on a branch and merged) no longer hides the Mission Planner's rewrite of the human's intent or its own invalid intent fromintent check; the Evaluator'sevaluateandgoal closedecide from the ledger (ledger_bound), so an Evaluator run that wrote nothing on a ledger broken before it is a note again, not a block every round until the stuck release, andmission evaluaterefuses on a broken ledger before it writes a gap list (it used to leave one noeval.completedrecord backs); and intake's fill may change an intent's source to another of the human's (prompttomixedafter a screenshot, with a question still open), soaladdin "<text>"during a role's run no longer tells the role to delete the human's request, while a change to or fromsource: missionstill blocks. Its over-block check and review found more: every command a role's persona, eval suite or handout names that refuses on a broken ledger is now in itsledger_bound(the Scout'sjourneys retire, the Product Tester'sbaseline measureand both measuring roles'baseline apply, and the planner'sgoal retirefrom M9.50), and the test checks the list is complete, so a run of any role that wrote nothing on a ledger broken before it is a note, as before these reviews. The note needs every ledger problem to be one the run started with, so a ledger event a role appends to the run log from a program, with no row, is no excuse. The wordsaladdinkeeps beside an intent still count in every role's run: a program's write (python3 -c) is invisible to the scope gate, andaladdin runreads them back as the request. - A dsh run's usage and cost include dsh's own compaction and session-title calls. The plugin logged
assistant/messageusage only, so the summary call of every compaction (which replays the whole prefix) and the session-title call were billed but never reached the usage log: the ledger, the time box andrun-summary --host dsh(cost_usd,cost_by_model) left them out and reported the rest as the run's total. The plugin now reads each call dsh makes outside the agent loop (llm/streamwith apurpose) from its own stream and logs it Claude-shaped, markedaux; an aux call is charged like any call but never becomes the context in use. Tests: dsh-runtime (priced calls = the 44 replies the endpoint served, title and compaction included; was 42), dsh-plugin, budget-meter, all failing before the fix. - A measured dsh cost under half a cent is no longer recorded as
$0.00.run-summaryrounded the dsh total to cents, so a short DeepSeek run measured at $0.0014 was stored ascost_usd: 0.0with an evidence row of$0.00, the cell reserved for nothing measured. For--host dshthe total keeps 6 decimals likecost_by_model, and the row cell 4 (<$0.0001below that, judged on the unrounded total, so a run under half a micro-dollar, stored as 0.0, is not$0.0000). The ledger check (evidence.test.py) required$N.NNon every row, which a four-place dsh cell would fail; it now takes exactly the cellsrun-summaryprints for a measured cost on the row's host (theHOST=of its reproduce command:$N.NNfor Claude Code,$N.NNNNor<$0.0001for dsh) and refuses an unmeasured one, as—or as a price on a Codex or OpenCode row (accepted before as$N.NN), and a README or site figure in the<$0.0001form must be a ledger row too. Tests: dsh-runtime (cost_usd> 0 and the sum ofcost_by_model), e2e-live-hosts (a $0.0015, a $0.000015 and a $0.00000015 run), evidence (run-summary's Claude and dsh rows pass the ledger check, another host's format or an unmeasured cost does not), all failing before the fix. - After a dsh compaction, the first request carries the handoff and the core principles. The plugin injected the SessionStart(compact) context into dsh's inbox, which dsh admits only on a step's first attempt, so after an overflow (compaction, then a retry of the same step) or a step-pressure compaction the next request held only dsh's summary, and the handoff arrived one step later. The context now joins the first request after the compaction (appended in
agent/requestbefore dsh builds it), once; a request whose signal is aborted, or a session log that refuses the append, gets it injected instead. Tests: dsh-runtime (the handoff, the core principles and the tools note asserted on the overflow retry itself, once), dsh-plugin (appended once, with the core principles; a role's own request after its compaction gets nothing), both failing before the fix; dsh-plugin also checks both inject fallbacks. - OpenCode judges the supervisor's and roles' shell commands with
gate-supervisor-scope, as every other host does. The OpenCode plugin ran the gate only for write, edit and apply_patch, so on OpenCode alone the supervisor could commit on main or append an agent'soutput.mdblock during a sprint, and a role could rewrite its task contract withsed -i.bashnow runs it, with the payload'scwdtaken from the command'sworkdir(a commit in a task worktree is a worker's). Tests: opencode-plugin (three refusals and the worktree pass), failing before the fix. - A NEEDS-HUMAN release can no longer be forged, carries no text in the gate's voice, and is told once on every host.
intent releaseneeds the intake's SubagentStop and a contractintent newissued (itsintent.received) indocs/agents/intents/; a role's own file or another role's stop records nothing. Each question is one quoted line in the notice and inASK[intent]lines, so an intake's text cannot start a[aloop gate]line.intent hookreports a record only to its own session and only while its contract is still the newest. dsh and OpenCode read a release from the gate's own marker line (the last one at a line start) and accept NEEDS-HUMAN only at the intake's stop (a question quotingSTUCK … NOT verifiedread as STUCK before); they tell the supervisor throughintent hook, which claims the record, so a later Claude Code or Codex session is not told again. Tests: intent-contract, dsh-plugin, opencode-plugin, all failing before the fix. - A gate with no doc named judges the project's planning doc, never a host's agent definition.
gate-intake,gate-standards-citedand the gate matrix lookup (standards_file) foundintake.md/standards.mdwithfind | head -1(or a locale-dependentsort | tail -1), so in an OpenCode project they could judge.opencode/agents/intake.mdinstead ofdocs/agents/sprintN/intake.md: on CI's file order the intake's Intent Contract was never checked and an open ask passed, and a worker's RED could run a matrix read from the standards agent file. The newagentic_find_doc(bin/_finddoc.sh) skips hidden dirs (every host's own config), linked worktrees,node_modulesandtarget, and takes the newest match. Tests: intent-contract (decoys in.opencode,.claude,.codex,.dsh, a worktree; the newest sprint wins) and any-language (a decoy matrix the RED would pass), both failing before the fix. - mission-core's "another code" case no longer flakes 1 run in 256:
approve <id> <code>ffis a valid longer prefix of the content's sha256 whenever its 9th and 10th hex digits areff; the case now appends two digits that never continue the sha. - An intake that stops to ask the human is released at once as NEEDS-HUMAN, on every host (ROADMAP §4.9).
gate-intakeblocked the stop while the Intent Contract had an unansweredaskquestion, which cost 3 fix rounds and a BLOCKED report on dsh and OpenCode (up to 8 blocks on Claude Code) and pushed the intake to answer for the human. Now the stop is released NOT verified, as a STUCK release is: the questions are recorded (intent release,<run data>/state/needs-human/,gate.failedwithreleased=needs-human) and the supervisor is toldintake <id>: NEEDS-HUMAN — released UNVERIFIED (not a pass)with them (injected on dsh, in thetaskresult on OpenCode, on the supervisor's next tool result on Claude Code and Codex through the new PostToolUse hookintent hook). The playbook says to ask the human, re-dispatch intake with the answers, and plan only once gate-intake passes. Self-checks, malformed contracts and incomplete intakes still block. - A planner is refused while the newest Intent Contract still has an unanswered
ask(ROADMAP §4.9). "Plan only once gate-intake passes" was prose only: a NEEDS-HUMAN release passes the intake's stop unverified andgate-dispatchadmitted the planner after its model check, so a supervisor that missed the notice, or had not had it yet (on Claude Code it rides a PostToolUse, which comes after the planner's call when the intake ran in the background), planned from an intent with nointent.normalized, andids freezelinked the plan to an older sprint's intent.gate-dispatchnow refuses that dispatch while the newintent openlists open asks on the newest contract (the one gate-intake judges), each question quoted on one line, and says to ask the human and re-dispatch intake with the answers. The intake, standards and every other role are dispatched as before, and a project with no contract plans as before. Tests:dispatch.test.py,intent-contract.test.py, both failing before the change. - Tool-event gates read their hook payload as JSON.
gate-supervisor-scopeandgate-validate-artifactread each field with a greedy sed over the raw payload, which took the last"<name>": "<value>"anywhere in it: a key in the model's arguments stood in for the host's field (anagent_typeexempted the supervisor; acwdmoved its shell into a task worktree, so its commit on main went unjudged), a later field'sfile_pathwon, and an escaped quote cut a path short. Both gates now parse the payload with python3; a payload that is not a JSON object blocks (gate-supervisor-scope: while a sprint lock exists). The OpenCode plugin buildstool_inputfrom each tool's declared arguments, so afile_pathbesidefilePathno longer hides the written path fromgate-supervisor-scopeandgate-mission-scope. Tests:supervisor-scope.test.py(34),opencode-plugin.test.mjs. - Gates no longer misjudge a report under load.
validate_comms,gate-red-verifyandgate-structural-integritychecked text withprintf|echo "$x" | grep -q(the role line throughhead -1) underpipefail, which failed whenever the reader stopped before the writer finished: a well-formed report was blocked now and then (the conformance §6.6 "missing '### Next'" flake) and almost every report longer than a pipe holds was blocked, at the role line ("not from ''"); aregressed=1RED got through now and then on a report short enough to fit in a pipe; a HIGH structural finding ahead of a long findings list always got through. They read here-strings now. 4 new conformance checks (82) give them text past twice a pipe's size. - The mission role path guard (
gate-mission-scope,_shellread.py) reads the shell idioms a second adversarial review found it missed or misjudged:if [[ … ]]; then, for/select loop variables, export/declare/local and array assignments, a script fed to a shell on stdin,xargs -I, perl-0pi, brace expansion,cdscoping,time -p --, su/setsid/runuser; downloads and installs, in-place tools and formatters, mv/rsync sources, removals reachingdocs/agents/mission/, the rest of the git writes; and it no longer blocks BSDsed -i '',find -exec … {}.bakor an unknowntar -C. No mission role or builder setsALOOP_JUDGE_CMD(M9.42), a non-planner role creates no Aladdin intent, and a builder runs no writingmission evaluate|assess. Test:mission-scope-bash.test.py(452 commands). - The mission role path guard after its round-4 review (
mission-scope-bash.test.py, 718 commands, none allowed that master blocks where a block is wanted): acdinside an if/case/loop body, a{ …; }group or a function, or after&&/||, may or may not have run, so the rest of the command is judged from each dir it may leave the shell in (a compound's own} > ffrom where it started); a loop body once per item; an unquoted$VARsplits into words;evalandsource /dev/stdinrun in the calling shell; a background job'scdstays in it; nesting past 8 levels, or more states or commands than the gate can judge in its time, blocks. find's -name tests bound a removal across-ogroups and negations but not after the action,-fprint/-flsare writes,wget --spider -O, a global npm install with--prefix,--global=false,os.environ.__setitem__/update,xargs -i, runuser's options andcommand -p exportare read.find … | xargs -I{} rm -f {}and the cleanup idioms with-prune -oor-not -pathare no longer blocked. - CI's macos job runs the real dsh runtime test, and
make conformanceno longer reads the caller's tools dir. The macos job ranmake test-hostswith no dsh installed, sodsh-runtime.test.mjsprinted "skip" and exited 0 while the README said macOS ran the same host tests; it now installs the pinned dsh exactly as the hosts job does and setsALOOP_REQUIRE_DSH=1, andreadme.test.pychecks that every CI job running the host tests does, with none of the plain edits that skip or forgive the install or the tests (if:orcontinue-on-error, quoted or not,defaults:or anothershell:,|| true, an env on the tests step other thanBASH32, such asMAKEFLAGS=-n), clearDSH_BINor setALOOP_REQUIRE_DSHto anything but 1 (workflow, job or step env, or a later$GITHUB_ENVwrite), and that the pin matches as a whole token (rc.20passed forrc.2); before, each of those passed it (an unquotedif:orcontinue-on-erroron the install step only when added in both jobs). It is a text check, so an edit written to hide (a YAML escape, an anchor) is left to review. The ci.yml header now counts its five jobs (it said four) and names the README section that lists them, and readme check 8 looks for each job's bullet inside that section. The conformance harness passed the caller'sCLAUDE_PLUGIN_DATAandXDG_DATA_HOMEthrough, and ensure-tools looks there before PATH, so an installed ctx-symbols stood in for the scripted one a case puts on PATH and for the grep fallback CI runs (a passing one underXDG_DATA_HOMEfailed 10 of 82 checks); it drops both, for the gates and for the focused suites it runs. PATH is still the caller's: a stale or broken ctx-symbols first on it still changes the result (anexit 0one fails 8 of 82; a current 0.12.0 one passes 82), an open ROADMAP §4.9 item. The §6.6 long-report case now has long notes after### Next, so that check put back alone in its oldprintf | grep -qform fails it (before, it passed and only the §6.3 regressed case caught it). Its first macos run caught a timing dependence in the runtime test: on the slower runner the state-assessor's run overlapped intake's fill of a just-made intent, which the mission artifact gate cannot attribute (ROADMAP M9.41), so the test now holds its intake's contract until the state-assessor has started. - A goal that crosses an ethics hard line no longer deadlocks the mission loop (ROADMAP §4.12, M9.29):
mission evaluateskips a hard-lined (retired) goal, so the next eval covers the whole mission, andmission tickhands out EVALUATE and then DERIVE_GOAL for the next gap; when a hard line holds every open gap, the loop asks the human instead of handing out a derive that would refuse. - The door gate (M9.30) and the shell reader (M9.38) after a third adversarial review (24 findings, each now a test): the reader ends a
$( … )where bash does (a here-string,<<inside$(( )),(( )),${…},$[…]or a#comment, acasepattern's), two heredocs on one line), sox=$(cd /tmp; cat <<<hi\n)no longer hides the next line from the scope gate either;[[ … ]]&&, a heredoc delimited by$Xor*,$((cmd) …)and((cmd); …)that are not arithmetic,for x do,coproc NAME {, a pipe into( bash ), the last stdin redirect, a python that execs its stdin,/dev/stdin, thealaddinandagenticentry points,bash SCRIPT, a ledger or run log reached throughcd, a glob or--in-place,npm -gwith option values or install aliases, and a secret value containing--helpno longer slip through;git switch -c x && git push -u origin HEADfrom the default branch,cd "$(git rev-parse --show-toplevel)", read-only perl filters and python readers that only print,gcloud … list,rm -rf /tmp/x/.aladdinandmv .agentic .aladdinare two-way; a 200 KB python heredoc is read in milliseconds, not past the 8 s deadline; a revoke recorded on another branch closes an authorization whose ledger time a fast clock pushed ahead (both are compared on the run log's clock). - The door gate (M9.30) after its second adversarial review (26 findings, each now a test): it reads Bash with the scope gate's
_shellread.py(M9.38), soV=$(cat VERSION); git push origin main, one-lineif/for/{ …; }bodies,cat <<< xbefore a push,git push origin 2>&1,find \( … \) -exec npm publishandbash -s <<EOFno longer slip through, and a commit message or PR body with a quote inside"$(cat <<'EOF' … )"is no longer stopped; reads and tests that mentionrecord_humanordoor.authorized, lint pipelines throughxargs,npm test -- -g, an app's ownmission/ledger.jsonland secret commands'--helpand dry runs are two-way;git push origin HEADon the default branch asks, and erasing the run log is a wall; the human's authorize or revoke no longer fails, and an authorized door is no longer denied, while another process writes the ledger; a read past 8 s fails closed. mission tick's CONFIRM_BASELINE and ASK_CONSENT hand-offs name the line the human types (confirm <id> <code>,consent <id> <code>, the same code the grant checks) and the command that then records it, like CONFIRM_MISSION already did;/aloop:missionrelays that line instead of waiting for a yes in other words (M9.17). Tests:mission-tick(typed from the hand-off),mission-skill,mission-e2e.host-adapterlifts a writer's confinement only for a barealoop bind <worktree>made of plain words (a redirect to/dev/nullor2>&1may follow): a bind in a comment, chained to another command (make gen; aloop bind /wt,aloop bind /wt;echo>x) or holding a$(…)used to skip every check on Codex. Test:host-adapter.test.py.gate-supervisor-scopetreats source inside a task worktree (.aladdin/worktrees/<id>/…) as production source, so a supervisor can no longer hand-edit a worker's code there during a sprint; the worktree's own marker dir stays a control file. It judges a path where the write lands (..and symlinks resolved), so.aladdin/../src/x.rsis source, and its task.env fallback exempts only a sub-agent, never the supervisor's hook run inside a worktree after acd(all hosts). Test:supervisor-scope.test.py.e2e-live.sh's seed init re-renders no host install (ALOOP_NO_HOST_RERENDER=1), so a run no longer rewrites the user's global Codex agents. Test:e2e-live-hosts.test.py.gate-validate-artifact,gate-intakeandgate-memorydefaultCLAUDE_PLUGIN_ROOTlike the other gates: without it (OpenCode, dsh) the first blocked every valid planning artifact with an unbound-variable crash and the other two skipped their schema check.capabilities.jsongives OpenCodegate_blocking: outer, matching its adapter'senforce_gate(its stop gates run through the outer controller);host-adapter.test.pynow fails when the matrix and an adapter disagree.- The gates find
standards.mdfrom a worker's worktree. The standards role writes it todocs/agents/sprintN/, which is git-ignored and so absent from every worktree, and the gates looked only in the worktree. Every RED, GREEN and final gate in a worktree therefore ran the default Rust matrix instead of the project's own. They now read it from the story's sprint (STORY_DIR), then this tree, then the main tree. A non-cargo project with no matrix at all now blocks with a message namingstandards.md, instead of runningcargo fmt. Found by live run 36 (Python). Test:scripts/test/any-language.test.py. ctx-symbols conflictsskips.aladdin/.aloop task-worktree addcheckouts live under.aladdin/worktrees/, and a merged one duplicated every symbol of main as HIGH findings (run 36: 4 structural-review rejections).- GREEN and the final gate refuse skipped tests in Python, Go and JS/TS, as they already did
#[ignore]in Rust:@pytest.mark.skip/skipif/xfail,pytest.skip(,@unittest.skip,t.Skip(,.skip(,xit(,xdescribe(. Before, the check scanned only*.rs. The final gate now also finds a planned Python or Go test by itsdeforfunc; before, it looked only forfnand so blocked every planned Python test as missing. Test:scripts/test/any-language.test.py. - The gate matrix in
standards.mdruns on stock macOS bash 3.2. It was read withmapfile, which bash 3.2 lacks, so the matrix came back empty and the default Rust matrix ran instead: a non-Rust project's workers were blocked oncargo fmt, and a Rust project's own matrix commands were skipped. Test:scripts/test/bash-portable.test.py, which also rejects any bash-4+ construct in the plugin's shell scripts. The macOS CI job runs it against/bin/bash. gate-supervisor-scopefails closed whendateprints a non-number. Before this fix, bash 3.2 (the default/bin/bashon macOS) treated the bad lock-age check as "stale" and allowed the write. The new macOS CI job caught it.e2e-live.shruns on a Mac: it used GNUtimeout, which macOS lacks, so the supervisor CLI never started. It now falls back togtimeout, then to a perl alarm. The new macOS CI job caught it.gate-red-verifysuggestspub fn(notpub struct) for a missing lowercase name on macOS: its[A-Z]*pattern also matched lowercase names in a UTF-8 locale. It now uses[[:upper:]]*. A failing conformance check now prints its full block. The new macOS CI job caught it.stats sprint-closeand the sprint charge compare story dirs by realpath, so a project reached through a symlink (every macOS temp dir:/var→/private/var) no longer counts 0 attempts, andsprint1no longer matchessprint10. Reason:budget-soft-telemetry.test.pyfailed on a Mac release run.ensure-tools --resolveskips any aloop pluginbin/on PATH, not only its own: another checkout'sctx-symbolsshim ahead on PATH mademake conformancehang. Reason: Mac release run.e2e-live.shruns the supervisor CLI without the parent Claude Code session's id, SDK URL, memory store and messaging socket. Reason: live runs 32-34, started from an agent session, reported that session's id and recalled its team memory, so the measured supervisor was not a clean one.- SKILL.md Part B states how one task's RED, SCAFFOLD and GREEN share a worktree on Claude Code: RED runs with
isolation: "worktree", thenaloop task-worktree add <TASK_ID> <RED's branch>, and SCAFFOLD/GREEN bind to that path and mergeagentic/<TASK_ID>. Reason: live runs 31-33 each rediscovered it. gate-supervisor-scopenow also matchesScheduleWakeupand blocks it for the supervisor while a sprint is live: a dispatched agent's result arrives on its own notification. Reason: live run 32 set a 1200s wakeup while the planner ran in the background and the headless session idled 12 minutes after the final gate.task-worktree <cmd> --helpprints usage instead of creating a worktree named--help, and a TASK_ID starting with-is refused (exit 64). Reason: live run 32.gate-scaffold-verifyno longer demands aSUB-AGENT-TODOpanic for a listed symbol that already existed atBASE_REF, in a file the scaffolder left unchanged: it implements nothing. A changed file with no stub is still rejected. Reason: live run 31 (semver), T2's tests called only T1's finishedparse, the scaffolder listed it, and the gate blocked it 4 times (stuck release, a second dispatch). Test: two conformance cases (§6.3).- SKILL.md's data-plane tree drew
sprintN/under.aladdin/(the run-data dir); it is now under
docs/agents/, and.aladdin/is drawn as run data only (live run 24's haiku supervisor put the
whole sprint in.aladdin/sprint1/).scripts/test/skill-layout.test.pychecks the tree and holds
SKILL.md to a 50 KB budget so the #43 trim does not grow back. gate-red-verify: when RED's tests do not compile, the block names each symbol they cannot find and the shim to add (pub fn <name>(…) -> … { todo!() }orpub struct <Name>;intests/common/mod.rs, marked// agentic:shim, called throughmod common;) instead of a bare "add mod-common shims". Reason: live run 26, a RED worker blocked 5 times and hit the stuck release. Test: conformance §6.3.- The comms gate's "latest output.md block is not from ''" block now says how to append the
report from a worktree (cat >> … <<'EOF'), like the missing-block one (live run 25: a GREEN worker
refused by the Write tool stopped three times on it and hit the stuck release). Conformance case. gate-stage2-completeandgate-dispatchrefuse a sprint (or aSTORY_DIR) inside the run-data dir (.aladdin/,.agentic/) and namedocs/agents/sprintN/; with no argument the stage-2 gate looks indocs/agents/first. Reason: live run 24 (a haiku-supervisor experiment) planned and built the whole sprint under.aladdin/sprint1/, which is git-ignored and never committed, and every gate passed it. Tests:scripts/test/planner-stuck.test.py,scripts/test/dispatch.test.py.- Final-gate persona: the suppression check is the gate's (
#[ignore],.skip(,xit(,
#[cfg(not(test))], run byselfcheck final-gate), not an open-ended list; an#[allow(dead_code)]
intests/common/is not a suppression (live run 22: the persona failed the sprint on it and cost a
GREEN re-dispatch). Test:scripts/test/suppression-contract.test.py; eval: final-gate #4. - RED, GREEN and SCAFFOLD worker prompts now give the finish order explicitly: append the
output.mdblock, commit, then runselfcheck. The old text named the commit and the block-first rule in two separate sentences, and in live run 27 two scaffolders ranselfcheckbefore committing. Test:scripts/test/dispatch.test.py. - Planner persona: a later task's RED tests must fail against what the earlier tasks leave on main, not only the empty tree (live run 19: three of T2's tests passed against T1's placeholder, costing a re-plan).
targets checkno longer rejects acreatechange whose file already exists and defines its planned symbol: that change has shipped. A mid-sprint re-plan re-runs the planner's stop gate over the whole plan, and live e2e run 19 blocked the planner 9 times on T1's mergedcreate tests/parse.rswhile its brief said not to touch T1.targetnow resolves such a change tofile:line. Test:scripts/test/semantic-targets.test.py.
Added
gate-supervisor-scopenow also enforces the supervisor never commits on main: agit commitfrom the main agent in the main tree while a sprint is live is blocked (a commit inside a task worktree, the initial commit of an unborn repo,task-worktree mergeand a stale lock pass). Reason: live e2e run 16'sTrack Cargo.lockcommit on main traced to nothing; the rule was prose in SKILL.md only. Test:scripts/test/supervisor-scope.test.py.
Fixed
budget hook: the worker'sTASK_IDis read from the first transcript line that names one, not
the firstuserline — Claude Code now prepends a session-context attachment, which left the
worker unbound and its firstselfcheckblocked "STORY_DIR unset" (live run 18).budget hook preseeds the story'soutput.mdwith itstype: outputfrontmatter before the
worker's first tool call, so a barecat >>of the report block no longer fails the comms gate
(live run 18: 4 blocks). An existingoutput.mdis never touched.budget hook: a structural reviewer or final gate dispatched without a worktree gets the contract
copy in the main tree for its dispatch (removed when it stops), so its ownselfcheckfinds the
task (live run 19: "STORY_DIR unset").gate-scaffold-verifyreads.aladdin/scaffold-symbolslines written in the### Scaffoldreport
shape (+ create fn crate::Foo @ src/lib.rs): markers, verbs and keywords are skipped and a crate
path is reduced to its name (live runs 18–19:createwas "defined 0 times", 4 blocks in run 19);
a zero-count block now names the file's expected shape.symbol_countgrep fallback (noctx-symbols): a no-match grep underpipefailprinted a second
0, so the scaffold gate's block text broke mid-sentence on CI-like hosts; it prints one number.
Changed
- Links, manifests (
homepage,repository), the installer's printed next steps and the site point atadeelahmad/aloop(the oldagentic-agileURL redirects). The workflow diagram, OVERVIEW and plugin README use the current names and run-data path (.aladdin/); OVERVIEW's north-star numbers now come from the evidence ledger; the Rust minimum is 1.85 everywhere. - The supervisor's playbook is 16% shorter: the sections a normal run does not need (Codex/OpenCode notes, the budget re-plan route and breach classes, review blind spots, the script list, transcripts, worktree hygiene) moved to
skills/aloop/reference.md, read on demand from one-line pointers; OpenCode installs copy it beside the skill. Reason: SKILL.md is re-read on every supervisor turn (run 26: 6k fewer tokens per turn). Test:aladdin-cli.test.py. - SKILL.md: a RED mandate names
tests/common/mod.rsas the shims' home, never asrc/path
(onegate-red-verifyblock per live run 14–18 came from a mandate saying "shim insrc/lib.rs").