@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
49 lines • 3.94 kB
TypeScript
import type { PromptSurface, SharedSections, TerminalOrApp } from "./types.ts";
export interface HandoffSectionOptions {
/**
* The caller's core already states a text-only turn-end rule ("check your last paragraph"),
* so the block drops its own "a Next with nothing after it is a defect" clause instead of
* stating that rule twice.
*/
turnEndRuleStatedElsewhere?: boolean;
/**
* The caller's core states the reply language in its Style section (`REPLY_LANGUAGE_RULE`), so the block
* keeps only the label half of its language rule: stated inside the Handoff section, the whole rule read as
* a rule for the handoff block alone and other replies drifted into English (senpi#7113).
*/
languageRuleStatedElsewhere?: boolean;
/**
* The model under-reports during long tool chains by default (Claude Fable 5.1 guide, "Ask for
* user-facing progress updates": remove narration-suppressing lines, then say when user-facing
* text is wanted and what each update contains), so the quiet-between-handoffs sentence becomes a
* brief-update instruction naming the moment and the shape. Rendered by the Claude Fable 5.1 and 5.2
* presets (senpi#2681) and the Claude Opus 5.5 preset (senpi#7113).
*/
briefUpdatesBetweenHandoffs?: boolean;
/** The app surface has no routing line, so the block stops referring to one; chat has no block at all. */
surface?: PromptSurface;
sharedSections?: SharedSections;
}
/**
* The handoff and routing-line templates are English sentences that Claude copies verbatim, which pulls
* the whole reply into English (senpi#2366). The labels stay fixed because the ttsr repetitive-turns
* detector parses `Ask:` through `For you:` / `Now:` in model output; everything filled in follows the user.
*/
export declare const HANDOFF_LANGUAGE_RULE = "Labels Ask, wanted, For you, Now, Next: exactly as written. Everything else (routing line, slot contents, todo labels, reply) in user's language (named in their instructions, else the one they write in); Now/Next repeat todo labels verbatim.";
/** `HANDOFF_LANGUAGE_RULE` as worded before the senpi#5335 diet, rendered for `sharedSections: "full"` (senpi#5665). */
export declare const FULL_HANDOFF_LANGUAGE_RULE = "Keep the labels Ask, wanted, For you, Now, and Next exactly as written; write everything else - the routing line, slot contents, todo labels, and the reply itself - in the user's language (the one their instructions name, else the one they write in), with Now and Next repeating the todo labels verbatim.";
/**
* The reply-language half, stated in a core's Style section so it covers every reply (senpi#7113). Chat has
* no handoff block and states the language in `CHAT_REPLY_RULE`.
*/
export declare const REPLY_LANGUAGE_RULE: Record<TerminalOrApp, string>;
/**
* On `chat` each reply is posted to the people in a conversation (senpi#2398): the reply is the answer,
* with no handoff block or ledger for a chat room to read. Shared by every core that states handoffs.
*/
export declare const CHAT_REPLY_RULE = "Each reply is posted as a chat message to the people in the conversation. Write the answer itself in their language, with no status block, todo labels, or progress ledger; the plan and its progress live in the todo tool only.";
export declare const CHAT_REPLIES_SECTION = "## Replies\n\nEach reply is posted as a chat message to the people in the conversation. Write the answer itself in their language, with no status block, todo labels, or progress ledger; the plan and its progress live in the todo tool only.";
/** Opens a core's final-message rule on `chat`, in place of "The final message opens with the Handoff block". */
export declare const CHAT_FINAL_MESSAGE = "The final message is the answer itself";
export declare function buildHandoffSection(options?: HandoffSectionOptions): string;
//# sourceMappingURL=handoff.d.ts.map