Name the agent's role in the footer of posted texts #39

Merged
dario merged 1 commit from dario/role-footer into main 2026-11-20 13:42:36 +01:00 AGit
Owner

With a personal account, every text the factory posts ended with "Written by an AI agent (factory) using this account", whichever role wrote it. On #28, the implementer's comments and the reviewer's reviews looked the same.

Changes

  • The footer now names the role: "🤖 Written by the factory's reviewer, an AI agent, using this account." Inline review comments say "🤖 factory reviewer".
    • The names are implementer, reviewer, documentation writer and improver (config.RoleAuthor).
    • factory forge run from a shell keeps "agent".
  • internal/forge/policy.go: the new Policy.Author field. It accepts only lowercase words; anything else gives "agent", so no markup gets into the footer.
  • The dispatcher sets Author for its own reports, and passes it to the MCP server as FACTORY_AUTHOR.
  • The hidden marker <!-- factory:agent --> is unchanged, so improve-factory still recognizes these texts.
  • Docs: README, docs/tokens.md, ADR 0011.

Note for #28: it adds the refine role. TestRoleAuthor fails until that role gets a name (e.g. "refiner"), so a new role can't go out unnamed.

Test evidence

  • just check: passes (gofmt, vet, staticcheck, govulncheck, go test -race ./...)
  • New: TestRoleAuthor; TestPersonalAccount covers the role in the footer and inline comments, and the fallback for invalid names; the dispatch test checks FACTORY_AUTHOR.

🤖 Generated with Claude Code

With a personal account, every text the factory posts ended with "Written by an AI agent (factory) using this account", whichever role wrote it. On #28, the implementer's comments and the reviewer's reviews looked the same. ## Changes - The footer now names the role: "🤖 Written by the factory's **reviewer**, an AI agent, using this account." Inline review comments say "🤖 factory reviewer". - The names are implementer, reviewer, documentation writer and improver (`config.RoleAuthor`). - `factory forge` run from a shell keeps "agent". - `internal/forge/policy.go`: the new `Policy.Author` field. It accepts only lowercase words; anything else gives "agent", so no markup gets into the footer. - The dispatcher sets `Author` for its own reports, and passes it to the MCP server as `FACTORY_AUTHOR`. - The hidden marker `<!-- factory:agent -->` is unchanged, so `improve-factory` still recognizes these texts. - Docs: README, `docs/tokens.md`, ADR 0011. Note for #28: it adds the `refine` role. `TestRoleAuthor` fails until that role gets a name (e.g. "refiner"), so a new role can't go out unnamed. ## Test evidence - `just check`: passes (gofmt, vet, staticcheck, govulncheck, `go test -race ./...`) - New: `TestRoleAuthor`; `TestPersonalAccount` covers the role in the footer and inline comments, and the fallback for invalid names; the dispatch test checks `FACTORY_AUTHOR`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With a personal account, every text the factory posts said only that
"an AI agent" wrote it. The footer now names the role: implementer,
reviewer, documentation writer or improver. The dispatcher passes it to
the MCP server as FACTORY_AUTHOR; `factory forge` from a shell keeps
"agent".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dario merged commit 465e7ea7f3 into main 2026-11-20 13:42:36 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dario/factory!39
No description provided.