Expand description
Prompt construction.
These strings are the actual product. The graph only moves bytes around; how well a run goes is decided by what the judges are asked to look at and what they are forbidden to speculate about.
Two rules run through all of them:
- No authorship. Nothing an agent receives names a model or a vendor, and every prompt that could invite a guess explicitly forbids guessing.
- Checkable claims. Judges and reviewers are told to verify assertions against the repository, and to name a trigger for every defect. That is what makes an unread patch defensible.
Structs§
- Candidate
View - One candidate as presented to a judge.
- Chat
Task Notice - What
chat_task_noticereports; every field is plain data magi read. - Conduct
Answer - One answered question, for
ConductTask::answersand [ConductOutcome::answers]. - Conduct
Finding - One finding, as shown to the conductor across every review round — not
only the last one. See
ConductOutcome::roundsfor why every round matters here. - Conduct
Finished - A
Failed/Heldtask together with how its last run ended. - Conduct
Outcome - How a task’s last run ended, for a
Failed/Heldtask the conductor has not yet been shown — the “終わったタスク” the whole feature exists for. - Conduct
Rejection - One finding the fixer declined, and why — see
ConductRound::rejected. - Conduct
Round - One review round’s findings and how the fixer treated each one, for
ConductOutcome::rounds. - Conduct
Task - A task shown to
crate::conduct: either runnable (a dependency-blocking target), orRunningpast the stall threshold with no live daemon claiming it.priorityis shown so the conductor can see the order the loop already runs in — never so it can change it: nothing incrate::conduct::Decisioncarries a priority back. - Deputy
Prompt - What a conductor question’s deputy is told.
- Notice
Display - Display-only snapshot of an automatic event, separate from agent instructions.
- Rebase
Conflict - What the fixer is told when a rebase of the winning branch stopped on a conflict.
- Review
Ctx - Everything a reviewer needs to know about the patch under review.
- Review
Patch - The patch text a stateless reconsideration call restates. See
ReviewReconsiderCtx::patch. - Review
Reconsider Ctx - Everything a reviewer needs to reconsider its vote after a split round.
- Review
Seat Report - One reviewer seat’s report, as shown to the rest of the panel during
reconsideration. Seats stay numbered, never named — the same convention
reviewitself uses for panel size, not a disclosure of identity. - Turn
- A judge’s contribution to the deliberation transcript.
Enums§
- Lens
- One of the fixed angles a reviewer seat is assigned.
- Owner
Word - What the owner said, handed to the agent that asked.
Constants§
- CHANGE_
SUMMARY_ HEADING - Heading of the whole-change summary prompt (the end-to-end mock greps it).
- CHAT_
CONSULT_ DEFUSED - Opening sentence that only a defused (current) consult carries; the
no-break space is what
consult::owner_wordslooks for. - CHAT_
CONSULT_ END - The last words of every generated consult text, used to find where it ends.
- CHAT_
CONSULT_ HEADING - Heading of the turn that hands a question to the chat it came from.
- CHAT_
TASK_ NOTICE_ HEADING - Heading of the automatic turn that reports a chat-filed task’s final state
to the conversation. The briefing names it, and
consultleaves it out of the owner’s words. - CHAT_
WATCH_ NOTICE_ HEADING - Heading shared by watch draft detection and owner-message filtering.
- DEPUTY_
HEADING - Heading of the deputy prompt, which the end-to-end mock agent greps for.
- DUPES_
JUDGE_ HEADING - Heading of the duplicate-work judge’s prompt; the test mock agent dispatches on it.
- DUPES_
JUDGE_ MAX_ CHARS - Longest instruction the duplicate-work judge is given, in characters. A longer one keeps its head and tail, with the cut marked.
- GITHUB_
ENGLISH_ HEADING - Heading of the fixed rule below; tests and callers key on it.
- GITHUB_
LANGUAGE_ HEADING - Heading of the rule used when
[graph] github_languageis not English. - MAX_
PATCH_ BYTES - Patches above this size are truncated in the prompt; the judge is pointed at the branch instead. Agent context windows are large but not free, and a 10 MB vendored-dependency diff is not read by anyone anyway.
- QUESTION_
RESUMED_ HEADING - Heading of
question_resumed; the mock agent intests/commonkeys on it. - WORK_
IN_ PLACE_ HEADING - Heading of the section that tells a seat not to build a second checkout.
- WORK_
IN_ PLACE_ RULE - The one sentence group every seat that works in a magi-made worktree is given. Tool-agnostic on purpose: the repository’s own instructions may name any worktree / workspace helper, and magi has already made the worktree with plain git. It must not name a vendor (the judge prompt is checked for that) nor any heading the test mock dispatches on.
Functions§
- advisor
- Prompt for one advisor seat in the design-deliberation stage
(
crate::graph::Runner::advise), run before any implementer touches the repository. - build_
cache_ note - What a seat is told about the shared build cache — one of two notes, chosen by whether the seat may write at all.
- change_
summary - Ask a read-only agent to describe the whole change between
baseandheadfor a reviewer who has seen neither the task nor the conversation. The commit list and diff stat are orientation only; the agent must read the diff itself and the code around it. - change_
summary_ in change_summarywith[graph] github_language.- chat_
consult - The operator turn that puts an open question in front of the chat agent.
- chat_
consult_ display - User-facing consultation snapshot, without the instructions sent to the agent.
- chat_
task_ notice - The automatic message that tells a chat how a task it filed ended.
- chat_
task_ report - Build agent input and display snapshot from the same sanitized facts.
- chat_
watch_ notice - Fixed English report; command output is quoted data, scrubbed and bounded.
- chat_
watch_ report - Build agent input and display snapshot from the same sanitized facts.
- child_
run_ ownership - Fixed guidance for child seats, including paths that bypass the wave launcher. This is prompt guidance, not command enforcement; keep control-plane use valid.
- conduct
- Prompt for
crate::conduct’s single seat. - defuse
- Make the consult markers unrecognisable in text that is only quoted.
- deliberate
- Prompt for one deliberation turn.
- deputy
- See
DeputyPrompt. - dupes_
judge - The brief for the one-shot duplicate-work judge.
claimsare the rendered matches (which task / run / pull request owns what) with the owner’s own work in one line (empty when unknown);instructionis the text of the work being filed. The text is data: the judge is told not to obey anything inside it. - final_
vote - Prompt for the private final vote.
- fix
- Prompt for the fixer, given a round’s findings.
- fix_in
fixwith[graph] github_language.- gate_
fix - Prompt for the fixer when the final
verify.gatefailed on a tree the reviewers had already cleared. - gate_
fix_ in gate_fixwith[graph] github_language.- github_
english - The rule that everything landing on GitHub is English, whatever
[graph] languagesays and whatever language the task was written in. - github_
english_ finding_ titles github_englishfor a reviewer: the only thing of theirs that reaches GitHub is a finding’stitle, which the pull request body lists.- github_
finding_ titles_ rule github_rulefor a reviewer’s finding titles.- github_
rule github_englishfor a configured[graph] github_language. English is byte-for-byte the fixed rule above; any other language names it for pull request / issue titles, bodies and comments, keeps commit messages English and leaves the quality and confidentiality rules untouched.- graft
- What the fixer is told in the graft round: port the named strengths of the losing candidates onto the winner, and nothing else.
- implement
- Prompt for an implementer.
- implement_
in implementwith[graph] github_language.- is_
completion_ notice - Recognize automatic completion reports in a conversation message.
- judge
- Prompt for a blind judge.
- legacy_
notice_ display - Strict compatibility reader, called only after provenance has been verified. Unknown completion templates retain their original text; old consultations use a generic placeholder because no display snapshot was saved.
- nudge
- Follow-up when a reply could not be parsed.
- operator_
fix - Prompt for a targeted, operator-triggered fix: specific, already-recorded findings routed to a fixer outside the normal review round sequence.
- operator_
fix_ in operator_fixwith[graph] github_language.- question_
resumed - The prompt that resumes a seat whose
magi askis gone, so the owner’s word still reaches the agent that already holds the context. - rebase_
conflict - See
RebaseConflict. - recovery_
fix - The fixer’s prompt for the one repair a verification-only failure earns:
fixwith the failed verification placed ahead of the task. - recovery_
review - The section a reviewer of the first round after a takeover is shown.
- resume_
after_ drop - Follow-up when the CLI hung up before delivering an answer.
- resume_
incomplete - Follow-up when the CLI’s own turn ended cleanly — a usable, non-empty, exit-0 reply — but held none of the structured report this step reads back.
- review
- Prompt for a reviewer of the winning patch.
- review_
reconsider - Prompt for the one round of reconsideration a split review vote earns.
- synthesize_
brief - Prompt for the synthesis seat that blends the advisors’ proposals into a
design brief carried in the implementer’s prompt
(
crate::prompt::implement’sbriefargument). - with_
overlay - Append the project’s overlay for a node, under a heading of its own.