Parent
Part of #204 (Phase 4: Hardening)
Problem
Agent commits currently show Toast (gastown) <toast@gastown.local> as both author and committer (agent-runner.ts:84-87). There's no trace of the human who initiated the work. On GitHub/GitLab, these commits look like they came from a bot â the human gets no contribution credit, and there's no provenance trail for compliance ("who authorized this code?").
Solution
Dual-attribute every agent commit: the human who initiated the work is the Author, the agent is the Committer. This way GitHub contribution graphs credit the human, while the agent identity remains traceable.
Git environment variables
Currently in agent-runner.ts:84-87:
GIT_AUTHOR_NAME: `${request.name} (gastown)`,
GIT_AUTHOR_EMAIL: `${request.name}@gastown.local`,
GIT_COMMITTER_NAME: `${request.name} (gastown)`,
GIT_COMMITTER_EMAIL: `${request.name}@gastown.local`,
Change to:
GIT_AUTHOR_NAME: request.userName, // "John Smith"
GIT_AUTHOR_EMAIL: request.userEmail, // "john@company.com"
GIT_COMMITTER_NAME: `${request.name} (Polecat)`,
GIT_COMMITTER_EMAIL: `${request.name}@gastown.kilo.ai`,
Data flow
The user's name and email need to flow from the initiating action through to the agent:
- Mayor message or
gt_sling: The userId of the human is already on the request. Resolve their name/email from the Kilo user record.
- Bead creation: Store
initiated_by_user_id on the bead (or use the existing created_by field if it stores the userId).
- Agent dispatch:
startAgentInContainer() passes userName and userEmail to the container alongside the existing agentName.
- Container:
agent-runner.ts sets GIT_AUTHOR_* to the human, GIT_COMMITTER_* to the agent.
Co-authored-by trailers
In addition to the Author/Committer split, append trailers to commit messages:
Co-authored-by: Toast (Polecat) <toast@gastown.kilo.ai>
Requested-by: John Smith <john@company.com>
Bead-ID: gt-abc-123
This requires either:
- Instructing the polecat's system prompt to include trailers in commit messages
- Or post-processing commits via a git hook in the worktree
The prompt approach is simpler and more flexible. Add to the polecat system prompt's "Commit & Push Hygiene" section.
Acceptance Criteria
Notes
Parent
Part of #204 (Phase 4: Hardening)
Problem
Agent commits currently show
Toast (gastown) <toast@gastown.local>as both author and committer (agent-runner.ts:84-87). There's no trace of the human who initiated the work. On GitHub/GitLab, these commits look like they came from a bot â the human gets no contribution credit, and there's no provenance trail for compliance ("who authorized this code?").Solution
Dual-attribute every agent commit: the human who initiated the work is the
Author, the agent is theCommitter. This way GitHub contribution graphs credit the human, while the agent identity remains traceable.Git environment variables
Currently in
agent-runner.ts:84-87:Change to:
Data flow
The user's name and email need to flow from the initiating action through to the agent:
gt_sling: TheuserIdof the human is already on the request. Resolve their name/email from the Kilo user record.initiated_by_user_idon the bead (or use the existingcreated_byfield if it stores the userId).startAgentInContainer()passesuserNameanduserEmailto the container alongside the existingagentName.agent-runner.tssetsGIT_AUTHOR_*to the human,GIT_COMMITTER_*to the agent.Co-authored-by trailers
In addition to the Author/Committer split, append trailers to commit messages:
This requires either:
The prompt approach is simpler and more flexible. Add to the polecat system prompt's "Commit & Push Hygiene" section.
Acceptance Criteria
GIT_AUTHOR_NAME/GIT_AUTHOR_EMAILset to the initiating user's name and emailGIT_COMMITTER_NAME/GIT_COMMITTER_EMAILset to the agent's identityCo-authored-byandBead-IDtrailersNotes
initiated_by_user_idmay differ per bead (different team members slinging different work)