/** * Prompt Builder — composes layered prompts for agent sessions. * * Three layers: * 1. BASE_AGENT_PROMPT — constant instructions about session lifecycle, git workflow, PR handling * 2. Config-derived context — project name, repo, default branch, tracker info, reaction rules * 3. User rules — inline agentRules and/or agentRulesFile content * * buildPrompt() always returns the AO base guidance and project context so * bare launches still know about AO-specific commands such as PR claiming. */ import type { ProjectConfig } from "./types.js"; export declare const BASE_AGENT_PROMPT = "You are an AI coding agent managed by the Agent Orchestrator (ao).\n\n## Session Lifecycle\n- You are running inside a managed session. Focus on the assigned task.\n- When you finish your work, create a PR and push it. The orchestrator will handle CI monitoring and review routing.\n- If you're told to take over or continue work on an existing PR, run `ao session claim-pr ` from inside this session before making changes.\n- If CI fails, the orchestrator will send you the failures \u2014 fix them and push again.\n- If reviewers request changes, the orchestrator will forward their comments \u2014 address each one, push fixes, and reply to the comments.\n\n## Git Workflow\n- Always create a feature branch from the default branch (never commit directly to it).\n- Use conventional commit messages (feat:, fix:, chore:, etc.).\n- Push your branch and create a PR when the implementation is ready.\n- Keep PRs focused \u2014 one issue per PR.\n\n## PR Best Practices\n- Write a clear PR title and description explaining what changed and why.\n- Link the issue in the PR description so it auto-closes when merged.\n- If the repo has CI checks, make sure they pass before requesting review.\n- Respond to every review comment, even if just to acknowledge it."; export interface PromptBuildConfig { /** The project config from the orchestrator config */ project: ProjectConfig; /** The project ID (key in the projects map) */ projectId: string; /** Issue identifier (e.g. "INT-1343", "#42") — triggers Layer 1+2 */ issueId?: string; /** Pre-fetched issue context from tracker.generatePrompt() */ issueContext?: string; /** Explicit user prompt (appended last) */ userPrompt?: string; /** Decomposition context — ancestor task chain (from decomposer) */ lineage?: string[]; /** Decomposition context — sibling task descriptions (from decomposer) */ siblings?: string[]; } /** * Compose a layered prompt for an agent session. * * Always returns the AO base guidance plus project context, then layers on * issue context, user rules, and explicit instructions when available. */ export declare function buildPrompt(config: PromptBuildConfig): string; //# sourceMappingURL=prompt-builder.d.ts.map