8000 Mission approvals are the human's own words (M9.17) by adeelahmad · Pull Request #82 · adeelahmad/aloop · GitHub
[go: up one dir, main page]

Skip to content

Mission approvals are the human's own words (M9.17) - #82

Merged
adeelahmad merged 5 commits into
masterfrom
claude/mission-layer-plan-6re55w
Oct 20, 2026
Merged

adeelahmad merged 5 commits into
masterfrom
claude/mission-layer-plan-6re55w

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Before: any session could run mission approve --by Adeel, baseline confirm --by Adeel or journeys approve --by Adeel and record a human approval. An approval was only as strong as --by, so a role could approve its own mission change, confirm its own baseline, or restore an old one.

After: a grant counts only when the human has typed it. Without that, the command exits 3 and prints the line to reply, for example approve msn_… 3f2a9c1b. The code is the first 8 hex of the content's sha256, so the line names exactly what the human saw. The role relays the line, the human pastes it, and the role runs the command again.

How:

  • Grant check (_mission.py)
    • record_human looks for a captured line before it records any grant.
    • The prompts come from the UserPromptSubmit hook (transcripts prompt), which is already wired on Claude Code, Codex and OpenCode.
    • A matching line starts with the grant's verb (approve, confirm, restore, retire or consent) and names the code.
    • Grant records carry prompt: {ts, sha256, session, line}.
  • What grants nothing:
    • --by alone;
    • another code or verb;
    • a negated line ("don't approve …");
    • a line captured before a later decision about the same subject, such as other content granted, a veto or a revocation;
    • for a baseline, a line captured before any version's confirmation, so an old restore never rolls back the current version.
  • Ordering: every human decision records how many prompts the checkout had captured, so the order holds even within one second.
  • Ledger: a human grant row whose line does not grant its content is a ledger problem, so a hand-appended row needs the words too.
  • Vetoes and the veto window need no words, because refusing is always safe.
  • Messages: mission check names the line to reply.
  • Telemetry: telemetry.revoked is now a human decision the ledger accepts.
  • Tests: mission_fixture.as_human gives the tests a human who types every line a grant asks for, which is the real flow.

Open with M9.9, recorded in ROADMAP: the prompt log is run data. A shell can append to it or feed transcripts prompt directly, and a headless host session started by a role fires the hook too. M9.9's path guard denies roles all three.

Evidence

  • mission-core check 13 and mission-baseline check 14, both written RED first. On master, mission approve --by Adeel exits 0. Without the cross-version rule, an old restore line restores again.
  • All 8 mission suites pass: core 13, baseline 14, journeys 11, evaluate 8, ethics, telemetry and principles.
  • make ci passes locally (78/78 conformance checks).

Generated by Claude Code

A grant (mission approve, baseline confirm/restore, journeys approve,
ethics and telemetry consent) records only when a prompt the
UserPromptSubmit hook captured has a line that starts with its verb and
names the content's code (the first 8 hex of its sha256). Until then the
command asks (exit 3) with that exact line. A negated line, another code
or verb, and a line captured before a later decision about the subject
(for a baseline, any version's confirmation) grant nothing; each human
decision records the prompt count it saw, so the order holds within a
second. A human grant row without such a line is a ledger problem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018RxETAY6S1gcmdctBK8a8Z
@adeelahmad adeelahmad self-assigned this Oct 20, 2026
adeelahmad pushed a commit that referenced this pull request Oct 20, 2026
…rgery paths

PR #82 (M9.17) makes a mission grant need the human's own words: a prompt line the
UserPromptSubmit hook captured. gate-mission-scope now denies the ways around that, for every
agent and the supervisor:
- a write (Write/Edit/patch or a Bash write) under <run data>/transcripts/, the captured prompts;
- a Bash `transcripts prompt|record|snapshot|stop|stage-in`, the hooks' own commands;
- where a mission is set, a host session started from a tool call (`claude -p`, `codex exec`,
  `opencode run`, or any prompt), since its prompt fires UserPromptSubmit too. A host's tools
  (`claude plugin validate`, `--version`, `opencode models`) stay allowed; no mission, no rule.

Test: mission-scope-bash.test.py (220 rows; 13 of the 18 new ones fail on the previous gate),
mission-roles.test.py (32 checks); make ci, conformance 78/78 and plugin validate --strict pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197nSutKR1QAAqgJhFZ8fPj
@adeelahmad
adeelahmad marked this pull request as ready for review October 20, 2026 04:00
…the human's typed line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018RxETAY6S1gcmdctBK8a8Z
… the human's line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018RxETAY6S1gcmdctBK8a8Z
… waits for the human's typed line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018RxETAY6S1gcmdctBK8a8Z
@adeelahmad
adeelahmad merged commit d01ae3e into master Oct 20, 2026
5 checks passed
adeelahmad pushed a commit that referenced this pull request Oct 20, 2026
The section B approvals now go through the human's captured words,
as M9.17 requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197nSutKR1QAAqgJhFZ8fPj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0