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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

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

opened this

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 creates docs/VISION.md if the file is missing. It commits on a vision-<id> branch and opens the pull through the existing editFiles. 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 a proposed entry with pull set 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: replyUnder under the thought, the /asked row, and MCP thought {id} all use placed[].pull. The first two link to /pulls/N instead of /issues/N, and MCP shows pull in the placement. streamJson carries pull too.
  • 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 with docs/VISION.md and 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.

Closes #5833

commented

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 creates docs/VISION.md if the file is missing. It commits on a vision-<id> branch and opens the pull through the existing editFiles. 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 a proposed entry with pull set 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: replyUnder under the thought, the /asked row, and MCP thought {id} all use placed[].pull. The first two link to /pulls/N instead of /issues/N, and MCP shows pull in the placement. streamJson carries pull too.
  • 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 with docs/VISION.md and 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.

Approved

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:

  1. 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.
  2. 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.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs