@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
47 lines • 4.55 kB
TypeScript
import { type BuildDynamicSystemPromptOptions } from "../../../dynamic-prompt/build.ts";
export type Gpt56ExecutionRuleId = "eval-first-routing" | "evidence-comparison" | "perceived-state-loop" | "stay-direct-exceptions" | "delegation" | "todo-granularity" | "test-decision" | "atomic-commits" | "lsp-symbol-routing";
export type Gpt56ExecutionConcern = "tool-orchestration" | "delegation" | "todo-discipline" | "tests" | "commit-discipline" | "symbol-routing";
export interface Gpt56ExecutionRule {
id: Gpt56ExecutionRuleId;
concern: Gpt56ExecutionConcern;
directive: string;
}
export declare const GPT56_EXECUTION_RULES: readonly [{
readonly id: "eval-first-routing";
readonly concern: "tool-orchestration";
readonly directive: "When a code-execution tool is available, batch the independent reads, searches, symbol lookups, and commands of a step in one cell: enumerate them first, dispatch them together with the runtime's parallel helper, and inspect every result; an extra read-only call in that wave costs almost nothing, while acting on a stale assumption costs the whole turn. Edits, side-effecting commands, approvals, waits, and any call whose input is another call's result stay sequential, one action observed before the next.";
}, {
readonly id: "evidence-comparison";
readonly concern: "tool-orchestration";
readonly directive: "Before running a cell, name the state it should produce; when it returns, compare the returned evidence with that state and check that a mutating cell changed nothing beyond it. A result that hides a failed item or a truncated tail is not evidence.";
}, {
readonly id: "perceived-state-loop";
readonly concern: "tool-orchestration";
readonly directive: "A result that must be seen rather than read - a page, a component, an image, a 3D scene, a layout - gets one change, a render or screenshot, a look, then the next change; a 3D scene is checked from several angles and a page at desktop and mobile widths. Compare what you see with the reference or the stated intent; ask only where two readings of that intent diverge.";
}, {
readonly id: "stay-direct-exceptions";
readonly concern: "tool-orchestration";
readonly directive: "Call tools directly instead when one call is enough, the output is already small, each result decides the next call, semantic judgment sits between calls, or the action needs approval - and after two failed cell strategies for the same fact, or an empty or suspiciously narrow result, fall back to direct calls and one or two meaningful alternatives before concluding nothing exists.";
}, {
readonly id: "delegation";
readonly concern: "delegation";
readonly directive: "When subagent or task tools are available, fan sizeable independent tracks out to them in one wave - each brief naming its deliverable, scope, observable stop condition, and the evidence it returns for you to verify - and keep work you can finish in a few calls yourself.";
}, {
readonly id: "todo-granularity";
readonly concern: "todo-discipline";
readonly directive: "Split the work to the finest actionable grain - one item per edit plus the check that proves it - and drive every transition the moment it happens: start it, complete it, append newly discovered steps, drop abandoned ones, never batch the updates.";
}, {
readonly id: "test-decision";
readonly concern: "tests";
readonly directive: "Existing tests are the behavior of record: update those your change makes stale; one wrong before your change is a finding, not a test to edit green. The run proves the change: add a test only where the repository keeps tests for this behavior and a regression would otherwise pass unnoticed - sized like its neighbors, never restating the change.";
}, {
readonly id: "atomic-commits";
readonly concern: "commit-discipline";
readonly directive: "When commits are authorized, commit atomically per verified increment, in the repository's existing message convention, each commit green on its own - never one omnibus commit at the end.";
}, {
readonly id: "lsp-symbol-routing";
readonly concern: "symbol-routing";
readonly directive: "Route symbol work through the language server when LSP tools are available - definitions, references, rename impact, and diagnostics on the files you changed - and keep text search for text, filenames, and history.";
}];
export declare function buildGpt56Prompt(options: BuildDynamicSystemPromptOptions): string;
//# sourceMappingURL=gpt-5.6.d.ts.map