Skip to content

feat(orchestration): workers say what they ruled out and check before repeating - #90

Merged
ANT1OFF merged 1 commit into
mainfrom
feat/worker-prompt-tweaks
Nov 2, 2026
Merged

ANT1OFF merged 1 commit into
mainfrom
feat/worker-prompt-tweaks

Conversation

@ANT1OFF

@ANT1OFF ANT1OFF commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Stacked on #89, the prompt size budget; these additions stay within it. Merge after #89.

What changes

Small changes to role text that every orchestrator and worker reads. Each one is quoted below exactly as it now reads. Nothing else changes.

(a) A worker's report says what it ruled out (prompt.ts, worker role)

In the report line, "Keep the summary short and factual." now reads:

Keep the summary short and factual, and say what you tried and ruled out, not only what worked.

(b) Check before repeating an outside action after a restart or cut-off

New line in the worker role (prompt.ts), after "Report, then end your turn…":

  • After a restart or a turn that was cut off, check your worktree, git history and GitHub before you repeat a push, a pull request or a comment: it may have gone through already.

The cut-off notice a worker is sent when a restart continues it is restartContinuation in rules.ts, sent by the boot path (service/boot.ts → noteRestart). Its old phrase "Continue where you left off, after checking what state your work was left in." now reads:

Continue where you left off, after checking your worktree, git history and GitHub: don't repeat a push, a pull request or a comment that already went through.

The orchestrator's away-digest note on cut-off workers (restartNote in rules.ts) gains one sentence after the list of workers. Whether to set a worker going again stays the orchestrator's decision:

Before you set one going again, have it check its worktree, git history and GitHub so no push, pull request or comment goes out twice.

(c) Briefs attach the user's words and invent nothing (prompt.ts, orchestrator role)

The userMessages line used to read: "When the user pasted something the worker needs as it is (a log, a spec, an error, a long list), don't retype it into the brief: pass userMessages … The brief still says what to do with them." It now reads:

  • When a brief comes from what the user asked, attach their words rather than retyping them, above all a paste the worker needs as it is (a log, a spec, an error, a long list): pass userMessages with how many of the user's latest messages in this conversation to attach, and Gram copies them word for word after the brief. Do the same on send_message to a worker. The brief still says what to do with them, and adds no requirements, acceptance criteria or checklists the user didn't ask for.

The brief-writing guidance before it ("A worker sees only its brief… Write the brief so it stands alone: …") is unchanged. The orchestrator still writes briefs, and a test now asserts that line remains.

Size (characters, measured with the budget test's inputs)

Role System prompt before after Total after (prompt + tools) Limit from #89
orchestrator 20,112 20,243 (+131) 59,504 62,400
worker 5,998 6,237 (+239) 33,261 34,700
plain 302 302 22,669 23,900

Everything stays within budget, so nothing was trimmed. Tool definitions are unchanged.

Tests

  • rules.test.ts:
    • the worker prompt carries (a) and (b);
    • the orchestrator prompt carries (c) and still says "Write the brief so it stands alone";
    • restartContinuation carries the check;
    • restartNote's exact string is updated.
  • bun run test packages/server/src/orchestration/rules.test.ts packages/server/src/orchestration/service-restarts.test.ts packages/server/src/orchestration/prompt-budget.test.ts packages/server/src/orchestration/workspace-pause.test.ts: all passed (437 before the last wording change to restartNote; 431 on the final run, which left out the budget and pause files).
  • GOMEMLIMIT=2GiB bun run typecheck --singleThreaded, bun run lint, bun run fmt:check, bun run check:scaffold: pass

Known limits

  • Synthetic only: the text is asserted, not how live agents behave with it.
  • This is general harness behaviour, not Gram's own repo process: nothing here names a Gram-specific workflow.

Base automatically changed from feat/prompt-size-budget to main November 2, 2026 08:22
… repeating

A worker's report now says what it tried and ruled out. After a restart or
a cut-off turn, a worker checks its worktree, git history and GitHub before
repeating a push, a pull request or a comment; the continue notice and the
away digest's restart note say so too. The orchestrator attaches the user's
own words to a brief that comes from them, and adds no requirements,
acceptance criteria or checklists the user didn't ask for.
@ANT1OFF
ANT1OFF force-pushed the feat/worker-prompt-tweaks branch from ec003dd to e13d89a Compare November 2, 2026 08:23
@ANT1OFF
ANT1OFF merged commit 8bdce01 into main Nov 2, 2026
25 of 58 checks passed
@ANT1OFF
ANT1OFF deleted the feat/worker-prompt-tweaks branch November 2, 2026 08:57
ANT1OFF added a commit that referenced this pull request Nov 2, 2026
Desktop release metadata proposal only. Merging this PR does not publish
or tag Gram; follow docs/RELEASING.md to release.
---


## [1.4.0](v1.3.1...v1.4.0)
(2026-11-02)


### Features

* **agents:** identify Gram's Claude processes as the gram entrypoint
([#91](#91))
([f7dd703](f7dd703))
* **desktop:** run on Linux
([#82](#82))
([1d37deb](1d37deb))
* **desktop:** turn voice input off on Linux with one check
([#79](#79))
([470ff8b](470ff8b))
* **orchestration:** a person's PR comment wakes the worker that owns it
([#86](#86))
([19bdc1c](19bdc1c))
* **orchestration:** a wrap-up turn when a worker stops without
reporting ([#88](#88))
([36a07fb](36a07fb))
* **orchestration:** workers say what they ruled out and check before
repeating ([#90](#90))
([8bdce01](8bdce01))
* **release:** publish and update Linux AppImage and .deb
([#95](#95))
([c33c464](c33c464))
* **voice:** an accurate mode with a Parakeet pass on each pause
([#83](#83))
([2b04a52](2b04a52))
* **voice:** hold one key to talk, with a tone at each end
([#87](#87))
([1a9b3ef](1a9b3ef))
* **voice:** start capture at the press, and an opt-in ready microphone
([#81](#81))
([505d240](505d240))
* **web:** a Done section that keeps the last 7 days
([#65](#65))
([8c7bd49](8c7bd49))
* **web:** Done lists every finished chat
([#67](#67))
([c91d9ac](c91d9ac))
* **web:** one attention count, quieter rows, a sidebar and board that
agree ([#92](#92))
([f193da4](f193da4))
* **web:** orchestrator → workers in the sidebar, a board that matches
([#80](#80))
([686e737](686e737))


### Bug Fixes

* **desktop:** harden the Linux key vault and autostart entry
([#85](#85))
([4b35eac](4b35eac))
* **e2e:** hold the t-flaky turn while the smoke test reads its opening
line ([#93](#93))
([2edc4ac](2edc4ac))
* **e2e:** release the dictation tap as soon as a word is heard
([#94](#94))
([7781194](7781194))
* prepare only approved local-check sources
([#32](#32))
([af3fab7](af3fab7))
* repair main after [#32](#32)
([#68](#68))
([ce352e6](ce352e6))
* **voice:** keep the last word after release
([#78](#78))
([cc40a47](cc40a47))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: gram-release-please[bot] <351321620+gram-release-please[bot]@users.noreply.github.com>
Co-authored-by: Johan <32440065+ANT1OFF@users.noreply.github.com>
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