feat(agents): per-type system_prompt_template in agents.json #451
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#451
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As an operator, I want each agent type's system prompt to live as a template string in
agents.json, with${repo},${issue_number},${forgejo_url}, etc. interpolated, so that I can tune behaviour per role (e.g. "be terse", "always write tests first", "prefer Python") with no code edit.Why: the prompt in
agent-runner.ts:142is hardcoded, identical for every agent type. Different roles need different framing — designer needs Penpot-specific guidance, reviewer needs review-specific framing, dev should be told to keep PRs small.Acceptance criteria
Schema
agents.json::types.<TYPE>.system_prompt_template: stringadded${var}for safe interpolation; escape unknown vars (don't crash, render literally)repo,issue_number,forgejo_url,agent_name,agent_type,pr_number(when review-mode),parent_pr(when set)Code
agent-runner.ts:142reads template from resolved agent config, interpolates, falls back to current prompt if template missingConfig sample
config/agents.jsonupdated with the 6 default templates (boss/dev/reviewer/designer/design-reviewer/foreman)Out of scope
References
apps/server/src/domain/agent/agent-runner.ts:142