Rebuild repo Face turn review path
This commit is contained in:
parent
2b84082101
commit
d34675c971
18 changed files with 400 additions and 257 deletions
|
|
@ -62,11 +62,14 @@ export function buildDiscordReplyPrompt(
|
|||
context,
|
||||
sourceGroundingReminder,
|
||||
);
|
||||
const isRepoFaceHeartbeat = /standing repo Face heartbeat/i.test(context.prompt)
|
||||
|| context.prompt.includes("Repo Face identity doctrine:")
|
||||
|| context.prompt.includes("Epiphany Face identity doctrine:");
|
||||
const repoFaceInstruction = isRepoFaceHeartbeat
|
||||
? "- This job is for a repo Face identity. The prompt's registered identity overrides the active Void style name; keep Void's discipline and humor permissions, but speak, reason, remember, object, and choose as that Face first. Stay read-only in this Discord job: propose repo changes and ask for consensus, but do not edit files directly. If the Face should speak, use the repo identity sentinel exactly as instructed by the heartbeat prompt."
|
||||
const isRepoFaceParentReviewer = context.prompt.startsWith("You are the parent reviewer for one unattended repo Face turn.");
|
||||
const isRepoFaceTurn = !isRepoFaceParentReviewer && (
|
||||
/standing repo Face (?:turn|heartbeat)/i.test(context.prompt)
|
||||
|| context.prompt.includes("Repo Face identity doctrine:")
|
||||
|| context.prompt.includes("Epiphany Face identity doctrine:")
|
||||
);
|
||||
const repoFaceInstruction = isRepoFaceTurn
|
||||
? "- This job is for a repo Face identity. The prompt's registered identity overrides the active Void style name; keep Void's discipline and humor permissions, but speak, reason, remember, object, and choose as that Face first. Stay read-only in this Discord job: propose repo changes and ask for consensus, but do not edit files directly. If the Face should speak, use the Face action block exactly as instructed by the turn prompt."
|
||||
: undefined;
|
||||
const sleepProjection = context.voidSelfState?.projection;
|
||||
const sleepInstructions =
|
||||
|
|
@ -92,10 +95,10 @@ export function buildDiscordReplyPrompt(
|
|||
: [];
|
||||
|
||||
return [
|
||||
isRepoFaceHeartbeat ? "# Repo Face Heartbeat" : "# Owner Discord Reply",
|
||||
isRepoFaceTurn ? "# Repo Face Turn" : "# Owner Discord Reply",
|
||||
"",
|
||||
isRepoFaceHeartbeat
|
||||
? "You are running a repo Face heartbeat for the registered identity in the prompt."
|
||||
isRepoFaceTurn
|
||||
? "You are running a repo Face turn for the registered identity in the prompt."
|
||||
: "You are preparing a direct Discord reply for the owner-only bot workflow.",
|
||||
"",
|
||||
"Rules:",
|
||||
|
|
@ -143,8 +146,8 @@ export function buildDiscordReplyPrompt(
|
|||
"- Do not inspect .voidbot/rag/messages.json, .voidbot/rag/source-documents.json, .voidbot/history-vector-store.json, or .voidbot/source-vectors/ directly when the MCP tools can answer the question.",
|
||||
"- Avoid broad workspace scans for archived Discord history or indexed source repos unless the MCP tools are clearly insufficient.",
|
||||
"- Do not modify files, install packages, or require network access.",
|
||||
isRepoFaceHeartbeat
|
||||
? `- Do not emit ${HANDOFF_SENTINEL} for repo Face heartbeat jobs. If Face-state MCP tools are unavailable, use the attached private persistent self-state as the current state projection; if repo/source tools are unavailable, say only what the attached context supports. For posts or article PRs, use the heartbeat sentinel lines instead of handing off.`
|
||||
isRepoFaceTurn
|
||||
? `- Do not emit ${HANDOFF_SENTINEL} for repo Face turn jobs. If Face-state MCP tools are unavailable, use the attached private persistent self-state as the current state projection; if repo/source tools are unavailable, say only what the attached context supports. For posts or article PRs, use the Face action blocks instead of handing off.`
|
||||
: `- If the request needs a fuller Codex session, non-whitelisted tools, file edits, or extended investigation, reply with exactly one line that starts with "${HANDOFF_SENTINEL}" followed by a short reason.`,
|
||||
"- Do not use notify_owner in this Discord reply lane.",
|
||||
`- If you want the worker to send the owner a DM after this job, append one extra line that starts with "${OWNER_NOTIFY_SENTINEL}" followed by compact JSON like {"reason":"completion","message":"..."} .`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue