Repository navigation
M9.8 mission loop (tick, due, cron, budget caps) and M9.12 /aloop:mission skill - #75
Merged
Merged
Conversation
… from the ledger `aloop mission tick` names the one next action from the files and events the harness owns (first match wins, like sweep) and records it as mission.tick; it stops at the token, USD or deadline cap and blocks an action handed out 3 times on unchanged facts. `due` reads files only, so the cron line starts a host session only when a tick is due. Test: scripts/test/mission-tick.test.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aw6CiQcdpzdzZZXKf8WbUM
One row per action tick hands out, with the role it dispatches, the exit-code contract, the hard rules and a trigger/eval suite. Test: scripts/test/mission-skill.test.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aw6CiQcdpzdzZZXKf8WbUM
…8, M9.19 Budget before the mission's review, BLOCKED and the repeat guard, mid-sprint assess on the cadence, raise the bar once per cadence. New items: spend from mission sessions only (M9.18) and a current price table (M9.19). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aw6CiQcdpzdzZZXKf8WbUM
…ount; due never runs past a cap
- due exits 2 with BLOCK[mission-due] when the facts cannot be read, instead
of 1 ("not due"), and the cron line logs due as well as the host session.
- At STOP_BUDGET due starts no session: it records the stop once itself.
- The token cap counts cache writes (on Claude Code nearly all new input).
- Stray event lines, a null sprints list, string counts in the ledger, a
mistyped cap or cadence, an unreadable mission.json: SET_MISSION or the
next step, never a traceback (_events.read skips non-object lines).
- Dotted, routed and Bedrock (global., us-gov.) model ids are priced.
- Second-resolution stamps tie toward "after".
- Gap items renumbered M9.19, M9.20 (#74 takes M9.18); new M9.21 (fast mode
and web search are not in the ledger).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aw6CiQcdpzdzZZXKf8WbUM
adeelahmad
marked this pull request as ready for review
October 20, 2026 02:49
… evaluate Areas that run bare use master's NO_ARGS (was BARE). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aw6CiQcdpzdzZZXKf8WbUM
… does tick reads human decisions from docs/agents/mission/ledger.jsonl (the newest approval per subject, role human), so a fresh checkout decides the same, and an approval only the run log has is none. The baseline follows baseline.py: the current version is the newest confirmation record; a version needs a measured record for its content; a veto binds content; an autonomous replacement applies after the mission's veto_window_h; a flaky or nothing-to-earn measurement is re-measured or raises the bar, and the repeat guard binds the version's content. A broken ledger or confirmed baseline blocks. An active goal's intents are sprinted one by one; spoon-fed plans wait for APPROVE_PLAN; --force needs --by and is recorded. due exits 3 once per human action and never starts a session for it; cron's line runs `cron --fire` under a loop lock with the host session. The tick test now builds real baselines through `aloop mission` (20 checks). New gaps: M9.22 (ethics verdict), M9.23 (grants and reviews in the ledger), M9.24 (a budget raise asks for a new baseline). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aw6CiQcdpzdzZZXKf8WbUM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aw6CiQcdpzdzZZXKf8WbUM
The loop's gap items move to M9.20-M9.25: master took M9.18 and M9.19. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aw6CiQcdpzdzZZXKf8WbUM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aw6CiQcdpzdzZZXKf8WbUM
adeelahmad
pushed a commit
that referenced
this pull request
Oct 20, 2026
…ates to its areas - An area's check runs once per artifact with its id or subject (roles.json `area_checks`): `mission ethics check` needs `--subject`, so every Ethics Reviewer stop failed with exit 64. An ethics hard line (exit 2, state hard) is the reviewer's finding, a note, not a defect. - A status change an event of the run explains is not another role's write: a human's step, or the role's own command (M9.8's tick hands `baseline apply` to the State Assessor, which freezes the researcher's journeys; a hard line blocks the planner's goal). Anything else still blocks. - No dispatched agent hand-emits a mission-layer event (mission.*, artifact.*, the areas'). - ROADMAP: my gap rows move to M9.26 and M9.27 (master took M9.18/M9.19, #75 takes M9.20–25). Test: mission-roles.test.py (32 checks; the new one runs the real ethics, baseline apply and journeys retire), mission-scope-bash.test.py (202 rows); make ci and conformance 78/78 pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197nSutKR1QAAqgJhFZ8fPj
adeelahmad
pushed a commit
that referenced
this pull request
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012rsDo9GYzNx8tXucywZHnA
adeelahmad
pushed a commit
that referenced
this pull request
Oct 20, 2026
…the human's typed line Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018RxETAY6S1gcmdctBK8a8Z
adeelahmad
pushed a commit
that referenced
this pull request
Oct 20, 2026
Docs only: ROADMAP takes master's M9.8 and M9.20–M9.25 rows beside this track's M9.9, M9.26 and M9.27; TRACKING marks both M9.8 and M9.9 implemented. make ci (conformance 78/78) passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197nSutKR1QAAqgJhFZ8fPj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Before: a mission could be set and approved (M9.0). Its baseline, journeys, assessments, evals and ethics reviews could be recorded (M9.2–M9.4, M9.10). But nothing decided what to do next, nothing stopped spending at the budget, and nothing woke the loop up on a schedule.
After:
aloop mission ticknames the one next action and records it as amission.tickevent. It reads the committed ledger, the artifacts and Aladdin's sprint files, so a fresh checkout decides the same. It stops at the mission's token, USD or deadline cap.aloop mission cron --installputs in a crontab line that spends no tokens until a tick is due, then starts a Claude Code, Codex or OpenCode session under a loop lock./aloop:missionis the supervisor's playbook: run the tick, do the one action it names (dispatching the role), and tick again.How.
plugin/mission/tick.pyis a first-match-wins decider. The order isSET_MISSION→CONFIRM_MISSION→STOP_BUDGET→ mission ethics →RESEARCH→DEFINE_JOURNEYS→ baseline → the open goal (its ethics, thenOFFER_OPTIONSorPLAN_INTENTS, thenSPRINT,APPROVE_PLANorWAIT) →ASSESS→EVALUATE→ goal met?RESEARCHto raise the bar :DERIVE_GOAL.docs/agents/mission/ledger.jsonl. The newest approval per subject counts, recorded with role human and--by. An approval only the run log has is not one.baseline.py:baseline.measuredrecord for its content.veto_window_h.BLOCKED.intent.receivedgoal_id →plan.createdintent_id). A sprint silent for 12h isBLOCKED.BLOCKEDuntil the human runsmission tick --force --by NAME, which is recorded.due.pyspends zero tokens. It exits 0 when due, 1 when not, and 2 when it cannot read the facts. A human action exits 3 once (it records the tick itself, so no session starts just to say it). An interactive handout is leased for 2h. A cron session holding the loop lock makes nothing due.cron.py. The crontab line runsaloop mission cron --fire, which decides likedueunder a flock and logs to<run data>/logs/mission-cron.log. Codex gets network and web search.%is escaped.--jsongives a routine spec on the cadence.Calls I made (reversible; recorded in ROADMAP).
BLOCKED,APPROVE_PLANand the repeat guard.New gap items (in §4.12, each with a one-line reason):
mission ethics's verdict, now that Mission layer M9.4 ethics and M9.7 principles #72 is in.--forcegrants and ethics reviews are run data.Evidence.
mission-tick.test.py: 20 checks, on real baselines proposed, measured twice and confirmed throughaloop mission. They cover:--force --by;cron --firewith fake hosts;mission-skill.test.py: 8 checks; the action table matchestick.ROLESexactly.mission-*.test.pypasses locally after merging master (ethics, principles, telemetry), as domake test-hosts,pycheck,json,eval-validate,version-checkandcheck-tracking.A live run needs M9.9's six roles (#74).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Aw6CiQcdpzdzZZXKf8WbUM