Skip to content

feat(agents): add project roles and agent mentions - #1470

Merged
nixuuu merged 7 commits into
devfrom
feat/agent-definition-ui-controls
Nov 29, 2026
Merged

nixuuu merged 7 commits into
devfrom
feat/agent-definition-ui-controls

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Change

Project roles are off by default. An owner can enable them globally and let each project inherit, opt in or opt out. Ordinary delegation and file mentions work independently of project role settings.

Define an agent role in the project's .agents/agents/ directory or import an existing plugin's Markdown definition in Settings → Projects → Agent roles. Start a thread with its role, provider, model and reasoning settings, or mention @role in a message to ask the current agent to delegate.

The agent bus lists project roles and accepts spawn_thread.role. The gateway resolves the definition against the target checkout and retains the admitted instructions and tool policy with the thread. The worker preserves imported metadata and detects stale edits. Claude sessions can honor supported tool restrictions and required skills. Worker and linked-gateway capabilities gate these features.

When a role has a native Claude tool allowlist, it cannot request an advisor consultation through MCP. Owner-configured automatic reviews still apply independently. The advisor schema now exposes the tool to Claude sessions that allow it, while the call handler continues to require a question or review.

Fixes: #1471 (Claude advisor tool discovery)

Verification

  • Ran focused gateway/worker integration tests for catalogue scope, Markdown import, edit conflicts, real Git worktrees, role discovery, explicit mentions and side-thread creation. Ran the affected draft, agent bus and Claude harness tests.
  • Tested the sample ITSOL Svelte reviewer with a real Claude CLI and a local inference fixture. The request contained the role and skill and exposed the four declared tools.
  • Verified role creation writes Markdown, imported the original ITSOL file, selected a role and submitted a message mentioning a different role in the real web app with a disposable database and worker. Checked @ suggestions and the missing-model state at 390 px as well as desktop layout.
  • Verified opt-in using the real web settings and gateway. A fresh account made zero catalogue requests, offered only files at @, and the gateway rejected a named launch. Tested both directions of the project override and changing the inherited account default back to off. Integration tests cover settings sync, catalogue and execution gates, ordinary delegation, and compatibility with older linked computers.
  • Checked the native role picker and mentions on an Android emulator with sample data. Verified the account switch on the normal Settings → Threads → Sandbox and subagents screen, including its accessibility label and narrow layout. The paired gateway was offline. Project setting writes and end-to-end launch on mobile were not exercised.
  • Verified coexistence with model advisors in a running web app. A draft kept its previously selected advisor when the project opted into roles. After submitting the new thread, the gateway returned the code reviewer role, high reasoning effort and the selected advisor.
  • Restored a web draft after its role was changed to subagent-only on disk. Send stayed disabled with its role and text intact. Choosing No role enabled Send and preserved the task.
  • Verified stored-session validation with Claude absent from PATH.
  • Generated the contracts; scoped package typechecks and lint passed. Full CI checks run on the PR revision.

Copy audit

The web settings, role editor, picker, role mentions and mobile role controls use the existing Canopy terms. “Agent role” and “role” are documented in the glossary. Creation and import use action labels. Missing models, incompatible effort and conflicting edits give a recovery action. Verified descriptions with short, typical and long content and checked accessible control labels and selection states.

@nixuuu
nixuuu force-pushed the feat/agent-definition-ui-controls branch 2 times, most recently from ba1d397 to 5bda3a9 Compare November 29, 2026 15:13
@nixuuu
nixuuu marked this pull request as ready for review November 29, 2026 15:13
@nixuuu
nixuuu enabled auto-merge (squash) November 29, 2026 15:13
@nixuuu
nixuuu marked this pull request as draft November 29, 2026 15:14
auto-merge was automatically disabled November 29, 2026 15:14

Pull request was converted to draft

@nixuuu
nixuuu marked this pull request as ready for review November 29, 2026 15:15
@nixuuu
nixuuu enabled auto-merge (squash) November 29, 2026 15:16
@nixuuu
nixuuu force-pushed the feat/agent-definition-ui-controls branch from 8652869 to df05df6 Compare November 29, 2026 15:29
@nixuuu
nixuuu merged commit 734b601 into dev Nov 29, 2026
24 checks passed
@nixuuu
nixuuu deleted the feat/agent-definition-ui-controls branch November 29, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant