Repository navigation
Let a Planner open, list, instruct and index the documents it created - #1002
Merged
Merged
Conversation
A Planner that split work into many documents with create_document had no way back to them: it could not tell which documents it had made, see where each one's Planner and build stood, or ask them all to carry on, so resuming the work meant opening every document by hand. Each document a Planner creates now records the document it was created from (ChannelRecord.createdFrom, migration 054, cleared when that document is deleted), and the Planner gets a fan_out host tool, offered with create_document under the same rules (a turn a person's message drives, that person's login rechecked for write access). It reaches only unarchived top-level documents of the same repository created from its own document: - open creates up to 20 documents at once, each exactly as create_document does; - list gives each one's link, Planner (working, idle or stopped), open Decisions and build; - instruct posts one instruction, as the person's message, to all of them or the named ones, starting Planners that aren't running, and reports each outcome; - index keeps a table of them under its own heading in the creating document, refreshed by open and list and never rewritten when unchanged. Assistant-model: Claude Opus 5.5 (fast) Assistant-verification: bun run types Assistant-verification: bun test src/agent src/harness src/chat src/mcp src/storage/memory src/questions Assistant-verification: TEST_DATABASE_URL=<fresh database> bun test apps/server/src/storage/postgres/adapter.test.ts
lavaman131
force-pushed
the
planner-fan-out
branch
from
November 24, 2026 04:31
05331f2 to
6d94226
Compare
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.
A Planner that splits work into many documents with
create_documenthad no way back to them: it couldn't tell which documents it made, see where each one's Planner and build stood, or ask them all to carry on. Resuming meant opening every document by hand.Change
ChannelRecord.createdFrom, migration 054). Deleting the parent clears the link and keeps the children.fan_outhost tool, offered withcreate_documentunder the same rules (a turn a person's message drives; that person's login rechecked for write access). It reaches only unarchived top-level documents of the same repository created from this document:open: create up to 20 documents at once, each exactly ascreate_documentdoes (idempotent per key).list: each one's link, Planner (working,idle,stopped), open Decisions and build state.instruct: post one instruction, as the person's message, to all or named documents, starting Planners that aren't running; per-document outcome.index: keep a table of them under## Documents created from this onein this document, refreshed byopenandlist, never rewritten when unchanged.Limits
fan_outdoesn't see them.open,listorindexruns.Verification
fan-out.test.ts(12 tests, each operation, argument checks, build state, the index writer), afan_outcase intools.test.ts, and acreated-fromstorage contract run against the memory store and Postgres.bun test src/agent src/harness src/chat src/mcp src/storage/memory src/questions: 2842 pass. Postgres adapter tests onpostgres:17-alpine: 204 pass.bun run types,dprint checkclean.