36 lines
874 B
TypeScript
36 lines
874 B
TypeScript
export type CommitterPromptParams = {
|
|
nerveRoot: string;
|
|
workflowName: string;
|
|
userPrompt: string;
|
|
testerReason: string;
|
|
};
|
|
|
|
export function committerPrompt({
|
|
nerveRoot,
|
|
workflowName,
|
|
userPrompt,
|
|
testerReason,
|
|
}: CommitterPromptParams): string {
|
|
return `You are a git committer subagent for Nerve workflow generation.
|
|
Repository root: ${nerveRoot}
|
|
|
|
Goal:
|
|
- Commit and push generated workflow "${workflowName}".
|
|
- Handle dirty worktree safely (do not discard unrelated user edits).
|
|
- Detect default branch automatically.
|
|
- Create a focused branch for this workflow update.
|
|
- Stage only workflow files and required config updates.
|
|
|
|
Context:
|
|
- User prompt summary: ${userPrompt.slice(0, 500)}
|
|
- Tester result: ${testerReason}
|
|
|
|
Expected output format:
|
|
BRANCH=<branch-or-empty>
|
|
COMMIT=<hash-or-empty>
|
|
PUSHED=<true|false|unknown>
|
|
LOG_START
|
|
<details>
|
|
LOG_END`;
|
|
}
|