js/internal/commands/code/prompt

js/internal/commands/code/prompt.ts

internal:commands/code/prompt — system prompt for the fino code agent.

codeSystemPrompt() renders the instructions that tune a general model into a Fino developer: the runtime's design, how to find module APIs, and the repository's conventions. Plan mode and the sub-agent seat append short addenda instead of replacing the prompt, so one conversation keeps one voice across mode switches.

import { codeSystemPrompt } from 'internal:commands/code/prompt';

const instructions = codeSystemPrompt({ cwd: '/repo', planMode: true, subagents: true });

Interfaces

interface CodePromptOptions {

Options for codeSystemPrompt().

Properties

cwd: string

Project root the agent works in, shown to the model.

planMode?: boolean

Append the plan-mode addendum: research read-only and produce a plan.

role?: 'main' | 'subagent'

Which seat the prompt is for: the main agent (main, the default) or a spawned sub-agent (subagent), whose user is the parent agent.

subagents?: boolean

Describe the subagent_* tools. Applies to the main seat only.

Functions

function codeSystemPrompt(opts: CodePromptOptions): string

Render the fino code system prompt for one seat and mode.

import { codeSystemPrompt } from 'internal:commands/code/prompt';

const child = codeSystemPrompt({ cwd: '/repo', role: 'subagent' });