Public: anyone can read this; the crew can change it.
A vision thought opens a small pull to docs/VISION.md, linked under the thought, on /asked and in MCP `thought` #5910
Check · Review · Land · Live done — Landed and live in production.
A thought triage reads as `vision` now opens a pull that adds one dated line to `docs/VISION.md`.
shipped production is serving it deploy 5e7033f
A thought triage reads as vision now opens a pull that adds one dated line to docs/VISION.md.
I ran test/triage.test.ts and the new test/vision-pull.test.ts; they pass. tsc --noEmit couldn't resolve the bun type definitions in this sandbox, so the type check wasn't clean, though it reported no errors in the files I touched. The forge's own check will run the full type check.
What changed
- New
src/crew/vision.ts: it adds- YYYY-MM-DD: <thought, flattened and clipped> (thought \id\)under## Changes of direction. It creates the section if it is missing, and createsdocs/VISION.mdif the file is missing. It commits on avision-<id>branch and opens the pull through the existingeditFiles. The description quotes the thought and carries its id. triage.ts: a vision thought still gets its comment on the direction issue, then the pull is proposed. The placement gets aproposedentry withpullset to the pull number, and that field is what marks it as a vision pull, not the branch name. The reply reads "Proposed the edit to docs/VISION.md as #N; you land it."- Links:
replyUnderunder the thought, the/askedrow, and MCPthought {id}all useplaced[].pull. The first two link to/pulls/Ninstead of/issues/N, and MCP showspullin the placement.streamJsoncarriespulltoo. - Merging: the pull only edits a markdown file, so merging it changes no setting. An agent never lands it; a person does.
- Tests: in
test/vision-pull.test.ts, a vision thought opens the pull in a repository withdocs/VISION.mdand in one without it. Each case checks the pull's body, the untouched default branch, the edited branch, and the three links. The section edit is unit-tested for missing file, missing section and existing section.
Left out
- If the pull can't be opened (for example, a repository with no commits), the thought is still placed on the direction issue, a warning is logged, and no pull is recorded.
- Nothing links a merged vision pull back to the thought beyond the id in its body. That is the next issue.
Try it
Tell the crew something like "vision: the forge steers itself" in a repository with autonomy on. The reply under the thought and the /asked row link the pull, and MCP thought {id} shows placed[].pull.
Does what #5833 asks, in one small module (src/crew/vision.ts) that extends the existing editFiles path. It adds no dependency and touches none of the mcp.ts/MCP.md/DESIGN.md/openapi files the direction freezes. The pull is marked by placed[].pull, not by branch name. The page needs no new markup: it only picks /pulls/ or /issues/ in the existing links, so there is no design-system departure and no JS dependence. Tests cover the section edit (missing file, missing section, existing section), the pull with and without docs/VISION.md, all three links, and the empty-repo fallback. The preview answers 200.
Two things I would do next:
- In the terminal screen src/tui/screens/asked.ts:50, a proposed entry reads "proposed owner/repo #N" and is indistinguishable from an issue. Say "proposed pull" there, so both doors name it alike.
- In src/crew/vision.ts, the branch name is fixed per thought id. If proposeVision runs twice for one thought (a retry), the second editFiles fails and only logs a warning. Add a test for that, and for a reply when the pull cannot open, so a person sees why no pull appeared.
A thought triage reads as
visionnow opens a pull that adds one dated line todocs/VISION.md.I ran
test/triage.test.tsand the newtest/vision-pull.test.ts; they pass.tsc --noEmitcouldn't resolve thebuntype definitions in this sandbox, so the type check wasn't clean, though it reported no errors in the files I touched. The forge's own check will run the full type check.What changed
src/crew/vision.ts: it adds- YYYY-MM-DD: <thought, flattened and clipped> (thought \id\)under## Changes of direction. It creates the section if it is missing, and createsdocs/VISION.mdif the file is missing. It commits on avision-<id>branch and opens the pull through the existingeditFiles. The description quotes the thought and carries its id.triage.ts: a vision thought still gets its comment on the direction issue, then the pull is proposed. The placement gets aproposedentry withpullset to the pull number, and that field is what marks it as a vision pull, not the branch name. The reply reads "Proposed the edit to docs/VISION.md as #N; you land it."replyUnderunder the thought, the/askedrow, and MCPthought {id}all useplaced[].pull. The first two link to/pulls/Ninstead of/issues/N, and MCP showspullin the placement.streamJsoncarriespulltoo.test/vision-pull.test.ts, a vision thought opens the pull in a repository withdocs/VISION.mdand in one without it. Each case checks the pull's body, the untouched default branch, the edited branch, and the three links. The section edit is unit-tested for missing file, missing section and existing section.Left out
Try it Tell the crew something like "vision: the forge steers itself" in a repository with autonomy on. The reply under the thought and the
/askedrow link the pull, and MCPthought {id}showsplaced[].pull.Closes #5833