OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

[SuperAgent] Relayed worker draft: workers.md says "send as written", natural-writing says its rules cover everything the router sends

Open openviking-superagent opened this issue 1 week ago • 0 comments

Summary

When the router relays a [task report], agent/workers.md tells it to "Send the draft as written". agent/natural-writing.md says its rules "apply to everything you send", and the router is the one sending. So a relayed draft is simultaneously "text to pass through unchanged" and "text the router may not write like an AI essay".

Three prompt files give three different answers about what the router may touch, and nothing in the policy says which one wins for a relay.

This concerns SuperAgent's workers scheduler under superagent/, not OpenViking server-side ingestion or session commit.

The three rules

Checked against feat/vika at 7d5dfdd882964338d94f6ed12f00f727e23f632a.

  1. workers.md:17 — "Send the draft as written unless something that happened since must be merged in."
  2. natural-writing.md:3 — "These rules apply to everything you send, in any language. The Role's voice and the delivery rules come first."
  3. worker.md:13,19 — the draft is "ready to send as is", and "The router may shorten or merge your draft."

(1) allows exactly one edit: merging in something that happened since. (3) allows shortening and merging as well. Neither allows the edits the writing rules ask for (dropping "一句话总结", "首先/其次", closing offers), and (2) does not carve out relayed text.

Assembly order makes it worse, not better

In assembleConversationPolicy, naturalWritingSection is joined at L325 and workersSection at L328. The section saying "as written" is the later one, so read top to bottom it looks like the more specific instruction that follows and narrows the earlier one, and nothing in either text says otherwise.

natural-writing.md also claims precedence only for "the Role's voice and the delivery rules". The relay rule lives in workers.md, not under agent/delivery/, so whether it counts as a delivery rule is undecidable from the prompt.

This is not a niche configuration: naturalWriting defaults to on (OV_SUPERAGENT_NATURAL_WRITING, config.mjs:222-223), so every workers-scheduler instance that relays a report hits the choice.

Why it bites in practice

  • natural-writing.md is prompt text only. There is no checker and no post-processing, so worker drafts do arrive carrying the phrasing it forbids. Workers get the same section (assembleWorkerPolicy, L247) and the same lack of enforcement, so the router cannot rely on the draft already being clean.
  • The router therefore has to pick, at every report, between two written instructions: relay verbatim and ship style it was told not to produce, or edit and break the relay rule. On our instance (0.5.4-preview, scheduler workers) it edits the surface, taking out template headings or split-and-rejoining an answer, while leaving the conclusion, evidence, numbers and question alone. That behavior is sanctioned nowhere in the prompt text; it is the router deciding which rule to break.
  • "As written" is also not literally implementable. tasks.mjs:1062 clips the stored draft to 20,000 characters, so a very long draft reaches the router already truncated and something has to be reconstructed around it.

Suggested direction

Pick one and write it where the router reads it:

  • Fix the content, allow surface edits. Replace "Send the draft as written" with what is meant, e.g. "relay the draft without changing its conclusion, evidence, numbers, artifacts or question; you may cut, merge or re-style it to fit the channel and the writing rules." This matches the permission worker.md:19 already grants the router and removes the contradiction.
  • Or make the draft the worker's text explicitly. State that the natural-writing rules cover the router's own writing, and that a relayed draft is exempt. Style quality then belongs to the worker alone, which is where the unenforced prompt already leaves it.
  • Either way, align worker.md:19 with the wording chosen for workers.md, and extend the staffed assertion in conversation-policy.test.mjs so the boundary is pinned and visible to the next person editing either file.

One cost to plan for: workers.md is part of the assembled policy, so any change moves policyHash and starts a fresh session on existing workers-scheduler instances. Worth doing once rather than twice.

How this was found

Read of the three prompt files plus the assembly and storage code on the commit above; no reproduction harness and no source patch. It is a text contradiction in the policy, not a behavior that needs a fixture to demonstrate, though the router's actual choice in the second bullet is observable in any instance that has relayed a poorly written draft.

openviking-superagent avatar Nov 23 '26 08:11 openviking-superagent