Skip to content

feat(goal): exploration mode: read-only scout turns, a direction ledger, docs and skill 5.5.0 - #1591

Merged
huichen merged 7 commits into
mainfrom
pr/huichen
Nov 12, 2026
Merged

huichen merged 7 commits into
mainfrom
pr/huichen

Conversation

@huichen

@huichen huichen commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Exploration becomes a first-class, accountable kind of work in the goal control plane: a scout todo 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

  • feat(goal): make an exploration turn a read-only contract with a named scope — compose_scout_contract now states the turn is READ-ONLY and echoes the declared read scope (byte-capped), so the constraint and the direction propose command arrive together.
  • fix(goal): name the real field in a 4-field candidate spec and expose the proposal link — a four-field --candidate whose 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 list names the todo each accepted candidate became.
  • docs(goal): document the exploration mode (scout + direction ledger) — architecture section for exploration nodes, the ledger operations, the completion gate, the exploration_gap projection and the known cross-language dedupe limitation (EN + zh-CN).
  • chore(skills): bump the future-goal skill to 5.5.0 (exploration mode) — submodule pointer to the skill that documents the same workflow.
  • test(goal): assert the scout read scope separator-agnostically — the read-scope line is compared against the same resolver the composer uses (whole payload) plus a separator-normalized tail check, so the test is identical on Windows, Linux and macOS instead of matching a POSIX literal.

Verification

Run in a detached worktree at the branch tip a554ba3cb, rustc pinned to 1.99.1 from rust-toolchain.toml (Homebrew 1.96.0 shadows it on this host), ulimit -n 8192:

  • cargo fmt --all -- --check — clean
  • cargo clippy -p future-goal --all-targets -- -D warnings — clean
  • cargo 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 rows

User-visible changes

  • New: a --class scout todo'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.
  • New: 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 (--force remains the reviewed override).
  • Changed text only, same rejection: a four-field --candidate spec 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 "route scout is invalid". Nothing that used to be accepted is now refused.
  • Revert: 56182b20d (read-only contract), 7392a6723 (spec field naming), 6b8596ffe (docs), 7fa177da8 (skill pointer), 80ff03e64 (separator-agnostic test).

…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
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).
@huichen
huichen merged commit 2ada2cb into main Nov 12, 2026
14 checks passed
@huichen
huichen deleted the pr/huichen branch November 12, 2026 02:49
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.

1 participant