Skip to content

feat(gitlabduo): add project workspace subagents in the shared .agents/agents/ - #3981

Merged
dyoshikawa merged 2 commits into
mainfrom
resolve-issue-3417-gitlabduo-subagents
Nov 26, 2026
Merged

dyoshikawa merged 2 commits into
mainfrom
resolve-issue-3417-gitlabduo-subagents

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Adds project-scope GitLab Duo workspace subagents. They went generally available in GitLab 19.6, with the files read from .agents/agents/*.md (docs). This settles the last open design question on #3417 (how gitlabduo shares .agents/agents/ with the Antigravity, Muse Code and agentsmd writers) by following the Muse Code precedent from #3919.

Changes

  • New GitlabduoSubagent (src/features/subagents/gitlabduo-subagent.ts) extends AntigravitySharedSubagent and writes to GITLABDUO_SUBAGENTS_DIR (= .agents/agents/). It is registered in the subagents processor and target tuple as project-only.
  • gitlabduo is added to AGENTS_DIR_SHARED_SUBAGENT_SECTION_KEYS at the lowest precedence, so every writer of the shared file renders identical bytes. The Antigravity global and plugin outputs still ignore it.
  • Warnings, which never change the output:
    • the merged file carries keys Duo does not document (anything other than name/description/tools)
    • tools is unset (Duo then gives the subagent no tools)
    • tools comes from a musecode/antigravity-* block (a Duo session fails to start on non-Developer-Flow tool names)
    • a gitlabduo value is overridden by a higher block
    • name > 64, description > 1,024 or prompt > 10,000 characters; file > 64 KB
    • more than 10 subagents target gitlabduo, via a new generic maxSubagents factory meta
  • Docs: a GitLab Duo note and a gitlabduo: frontmatter example in file-formats.md, plus updated Antigravity, Muse Code and .agents/agents/ ownership notes. Regenerated the tables and docs-content.ts.
  • Tests: gitlabduo-subagent.test.ts, a processor test for the count warning, and e2e generate and import entries.

Design decisions

  • Shared file, lowest precedence. Duo reads .agents/agents/ whichever --targets are set, so a separate or filtered file is not possible. Putting gitlabduo at the bottom of the merge means a file other writers produced before is unchanged, and the only cost is a warning when a higher block overrides a gitlabduo value.
  • Project scope only. The docs give no user-level location.
  • Warn, don't filter. Same reasoning as Muse Code: writing a reduced file for one writer would make the shared file depend on target order.
  • The 10-subagent warning counts subagents targeting gitlabduo in the run. Files other writers place in the same directory are not counted. The docs state this limit for CLI sessions only.
  • Duo tool names are not validated. The docs link to the tool list but don't enumerate it, so rulesync warns about the source of tools instead of checking the names.

Skipped

Refs #3417

🤖 Generated with Claude Code

https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4

dyoshikawa and others added 2 commits November 26, 2026 16:38
…s/agents/

GitLab Duo workspace subagents are GA in GitLab 19.6 and load from the
project .agents/agents/ directory. The gitlabduo section joins the shared
merge at the lowest precedence so every writer renders identical bytes,
and warnings flag undocumented keys, missing or foreign tools, overridden
values and Duo's field, file and subagent-count limits.

Refs #3417

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…tlabduo-subagents

# Conflicts:
#	src/generated/docs-content.ts
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