Skip to content

feat(agentic): add configurable AI agent role/persona system (Harvester, Curator, Reviewer, Fixer, Delegator) #106

Description

@jbdevprimary

Summary

PR #41 (closed as superseded — its diff targeted the pre-restructure agentic-control package) proposed a generic roles module for @jbcom/agentic with configurable AI agent personas. Sage (Q&A, task decomposition, agent routing) has since been delivered via a different path — it's implemented in packages/triage/src/{tools,schemas,handlers,cli}/sage.ts (see #40, closed as satisfied).

The remaining five personas from #41's design were never implemented and represent real, still-wanted scope:

Role Purpose Trigger
Harvester PR lifecycle, review management, merging Schedule (15min)
Curator Nightly triage, issue assessment, agent spawning Schedule (2am)
Reviewer AI code review PR events, /review
Fixer CI failure resolution CI failure events
Delegator Issue → agent routing /cursor, /jules

Proposed design (from #41, adapted to the current package layout)

  • packages/agentic/src/roles/types.tsRoleDefinition, RoleConfig, RoleTrigger, AgentCapability
  • packages/agentic/src/roles/defaults.ts — default definitions for the five roles above
  • packages/agentic/src/roles/executor.tsexecuteRole, listRoles, findRoleByTrigger, getEffectiveRole
  • agentic roles CLI subcommands: list, info <role>, match <trigger>
  • AgenticConfig.roles config surface (per-role enabled/model overrides)

Notes for implementer

  • Should compose with the existing fleet/handoff/triage primitives in packages/agentic and packages/triage rather than duplicating them — Harvester/Reviewer/Fixer/Delegator overlap conceptually with packages/agentic/src/triage/pr-triage-agent.ts and packages/agentic/src/handoff/manager.ts; check for consolidation opportunities before adding new code paths.
  • feat(roles): Add configurable AI agent personas (Sage, Harvester, Curator, etc.) #41's original test plan left integration tests unchecked — write those as part of this work, not as a follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions