Repository navigation
feat(goal): exploration mode: read-only scout turns, a direction ledger, docs and skill 5.5.0 - #1591
Merged
Merged
Conversation
…d scope A scout turn is supposed to end with a direction proposal, but nothing in the envelope forbade implementation work: a measured turn spent ~50 tool calls editing files before it recorded anything, and still passed the gate because a proposal was recorded in the end. Asking the model to behave does not bind it. compose_scout_contract now states the constraint explicitly — READ-ONLY, no edits to existing files, no implementation, the proposal ledger as the only write and evidence notes as the only files — and carries the turn's declared scope as a READ scope (byte-capped at 160 bytes, so a directory-heavy declaration cannot compete with the contract for the prompt), or 'none declared — make no file writes at all' when the todo declares nothing. Exploration turns also stop receiving the ordinary 'Declared write set … stay within these paths' paragraph, which contradicted the contract and invited the implementation it forbids. The delivery paragraph is unchanged for advancement work. Fixed text stays under the 1500-byte budget, now asserted for a bare scout AND for one carrying a long scope. Test: scout_contract_states_read_only_and_its_read_scope (red without the new clause), scout_contract_stays_within_its_budget (extended to both cases).
… the proposal link Two separate defects in the direction ledger's CLI surface, both in this file. 1. `--candidate "title|scout|fork|kill"` is the five-field form with a field missing, but the four-field branch read field 2 as the route and answered "has relation `scout` (field 3)" — a field number that does not exist in the spec the caller typed, describing a mistake they did not make. A class token in field 2 is now reported as a missing field, naming field 2, both shapes and the legal values; a genuine bad route reports field 2 in the four-field form and field 3 in the five-field one. The parse errors no longer use the internal word "relation" for a value the CLI calls a route. 2. `status --format json` dropped `origin_proposal`, the only machine-readable link from an accepted direction to the work it became, so a script could see the proposal in the ledger or the todo on the board but not connect them. The projection now carries it, `direction list` prints the todo each accepted candidate became (`; todo=<id>`) and adds `accepted_todos` to its JSON, and both are derived through one helper (`accepted_candidate_todos`, keyed the same way accept's idempotency check is) so the two surfaces cannot disagree. The projection also moved out of the printer (`status_json_value`) because a test cannot assert on stdout. Tests: four_field_spec_with_a_class_points_at_field_two and status_json_exposes_the_proposal_a_todo_came_from, both red when the fix is reverted.
The exploration mode shipped with no operator or design documentation: the only entry point was `future goal direction --help`, which is why it was reported as 'does it exist?'. Add an architecture section covering the scout class and its required kill_when, propose/list/accept/reject/expire, validate-before-write, the completion gate, revise:T as blocked_by rather than in-place editing, origin_proposal as the decision→work link, exploration_gap as a projection that never creates a scout, and the read-only turn contract with its 1500-byte budget. Both language versions get the section. The candidate spec's two shapes are documented against the parser as it now behaves (five fields title|class|route|kill_when|acceptance; the four-field legacy form), not against an older three-field summary. Cross-language dedupe is recorded as a KNOWN LIMITATION: dedupe normalizes titles only (English verb prefixes plus containment), so Chinese and English phrasings of one direction stay two directions. Normalizing across languages needs a lexicon or a model and the benefit does not pay for it yet.
futuregene/future-skills#123 documents the exploration mode that shipped in the goal control plane without an operator or design doc: the scout class and its required kill_when, the direction ledger (propose/accept/reject/expire), the completion gate, the read-only turn contract and the known dedupe limitation. The pointer moves to the squash commit on that repository's main (e2c3b536a3f586145dc2be58f399e59663950f5f), not to the feature branch, so any clone can resolve it.
huichen
enabled auto-merge (squash)
November 12, 2026 02:21
`scout_contract_states_read_only_and_its_read_scope` asserted that the envelope contained the literal `papers/route-a.md`. The contract echoes the scope the workspace guard resolved (canonicalized parent + relative tail), so on Windows the goal root `/tmp` resolves onto the current drive and the line reads `D:\tmp\papers\route-a.md` — no forward slash, so the assertion failed there while passing on Linux and macOS (where the tail happens to keep `/`). The test now locates the `Read scope for this turn (read it, never modify it): ` line and compares its whole payload against the same resolver's output for the declared scope — a stronger check than a substring, and platform-spelled on both sides by construction — plus a separator-normalized `ends_with` on the declared relative tail, which holds on every platform and fails if the contract echoes any other path. The production composer is unchanged: the resolved form is what the guard enforces and what the delivery write-set paragraph already prints. Verified red under a mutation that echoes the raw declaration instead of the resolved scope; green under the real implementation. No other test in the branch makes a POSIX-separator assumption (the remaining path assertions are against resolved values or relative text that is never normalized).
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.
Exploration becomes a first-class, accountable kind of work in the goal control plane: a
scouttodo now gets a read-only turn contract and returns a direction proposal instead of an artifact, and the proposal is recorded in a direction ledger the operator accepts, rejects or expires. Together these make "which way should we go" dispatchable without letting a scout turn quietly start implementing.Commits
compose_scout_contractnow states the turn is READ-ONLY and echoes the declared read scope (byte-capped), so the constraint and thedirection proposecommand arrive together.--candidatewhose field 2 carries a class now reports a missing field and both legal shapes instead of calling the class a broken route; the route error names the position that the caller's own spec actually has.direction listnames the todo each accepted candidate became.exploration_gapprojection and the known cross-language dedupe limitation (EN + zh-CN).Verification
Run in a detached worktree at the branch tip
a554ba3cb, rustc pinned to 1.99.1 fromrust-toolchain.toml(Homebrew 1.96.0 shadows it on this host),ulimit -n 8192:cargo fmt --all -- --check— cleancargo clippy -p future-goal --all-targets -- -D warnings— cleancargo test -p future-goal— all targets pass, 0 failed (unit, direction/work-item integration, CLI tests, doc-tests)make check-docs— 417 docs, placement / bilingual pairing / links / script paths / fences OK, 0 pairs pending, provider matrix 13 rowsUser-visible changes
--class scouttodo's turn prompt is now a read-only contract (no editing existing files, no building the implementation; the only permitted writes are evidence notes inside the declared scope, and none at all when no scope is declared). Goals that never create a scout todo are unaffected — no default changed.future goal direction propose|list|accept|reject|expire. A proposal never creates a todo by itself; accepting is an explicit operator decision. A scout todo cannot be completed until at least one proposal names it (--forceremains the reviewed override).--candidatespec that puts a class token in field 2 now refuses with "field 2 is the class … the class belongs to the 5-field form" instead of "routescoutis invalid". Nothing that used to be accepted is now refused.56182b20d(read-only contract),7392a6723(spec field naming),6b8596ffe(docs),7fa177da8(skill pointer),80ff03e64(separator-agnostic test).