Skip to content

Commit f07222a

Browse files
committed
feat(agents): add subagent filtering via frontmatter
Add 'subagents:' frontmatter to primary agents that specifies which subagents should appear in the Task tool description. This reduces token overhead by filtering 220 subagents down to 3-30 per agent. Changes: - Add parse_frontmatter() to generate-opencode-agents.sh - Generate permission.task deny-list rules from subagents list - Add subagents frontmatter to all 13 primary agents Token savings: ~6-10k tokens per conversation by hiding irrelevant subagents from the Task tool description. Related: anomalyco/opencode#7271
1 parent 5865abd commit f07222a

14 files changed

Lines changed: 287 additions & 3 deletions

.agent/accounts.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
name: accounts
33
description: Financial operations and accounting - QuickFile integration, invoicing, expense tracking
44
mode: subagent
5+
subagents:
6+
- quickfile
7+
- general
8+
- explore
59
---
610

711
# Accounts - Main Agent

.agent/aidevops.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,42 @@
22
name: aidevops
33
description: AI DevOps framework operations - setup, configuration, meta-agents, troubleshooting
44
mode: subagent
5+
subagents:
6+
# Framework internals
7+
- setup
8+
- troubleshooting
9+
- architecture
10+
- add-new-mcp-to-aidevops
11+
- mcp-integrations
12+
- mcp-troubleshooting
13+
- configs
14+
- providers
15+
# Agent development
16+
- build-agent
17+
- agent-review
18+
- build-mcp
19+
- server-patterns
20+
- api-wrapper
21+
- transports
22+
- deployment
23+
# Workflows
24+
- git-workflow
25+
- release
26+
- version-bump
27+
- preflight
28+
- postflight
29+
# Code quality
30+
- code-standards
31+
- linters-local
32+
- secretlint
33+
# Credentials
34+
- api-key-setup
35+
- api-key-management
36+
- vaultwarden
37+
- list-keys
38+
# Built-in
39+
- general
40+
- explore
541
---
642

743
# AI DevOps - Framework Main Agent

.agent/build-plus.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,44 @@
22
name: build-plus
33
description: Enhanced build agent with semantic codebase search and context tools
44
mode: subagent
5+
subagents:
6+
# Core workflows
7+
- git-workflow
8+
- branch
9+
- preflight
10+
- postflight
11+
- release
12+
- version-bump
13+
- pr
14+
- conversation-starter
15+
- error-feedback
16+
# Code quality
17+
- code-standards
18+
- code-simplifier
19+
- best-practices
20+
- auditing
21+
- secretlint
22+
- qlty
23+
# Context tools
24+
- osgrep
25+
- augment-context-engine
26+
- context-builder
27+
- context7
28+
- toon
29+
# Browser/testing
30+
- playwright
31+
- stagehand
32+
- pagespeed
33+
# Git platforms
34+
- github-cli
35+
- gitlab-cli
36+
- github-actions
37+
# Deployment
38+
- coolify
39+
- vercel
40+
# Built-in
41+
- general
42+
- explore
543
---
644

745
# Build+ - Enhanced Build Agent

.agent/content.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22
name: content
33
description: Content creation and management - copywriting, guidelines, editorial workflows
44
mode: subagent
5+
subagents:
6+
# Content
7+
- guidelines
8+
- summarize
9+
# SEO integration
10+
- keyword-research
11+
- eeat-score
12+
# WordPress publishing
13+
- wp-admin
14+
- mainwp
15+
# Research
16+
- context7
17+
- crawl4ai
18+
# Built-in
19+
- general
20+
- explore
521
---
622

723
# Content - Main Agent

.agent/health.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
name: health
33
description: Health and wellness domain - medical information, fitness, nutrition guidance
44
mode: subagent
5+
subagents:
6+
# Research
7+
- context7
8+
- crawl4ai
9+
# Built-in
10+
- general
11+
- explore
512
---
613

714
# Health - Main Agent

.agent/legal.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
name: legal
33
description: Legal compliance and documentation - contracts, policies, regulatory guidance
44
mode: subagent
5+
subagents:
6+
# Research
7+
- context7
8+
- crawl4ai
9+
# Content
10+
- guidelines
11+
# Built-in
12+
- general
13+
- explore
514
---
615

716
# Legal - Main Agent

.agent/marketing.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@ tools:
1010
glob: true
1111
grep: true
1212
webfetch: true
13+
subagents:
14+
# CRM
15+
- fluentcrm
16+
# Content
17+
- guidelines
18+
- summarize
19+
# SEO
20+
- keyword-research
21+
- serper
22+
- dataforseo
23+
# Social
24+
- bird
25+
# Analytics
26+
- google-search-console
27+
# Built-in
28+
- general
29+
- explore
1330
---
1431

1532
# Marketing - Main Agent

.agent/onboarding.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22
name: onboarding
33
description: Interactive onboarding wizard - discover services, check credentials, configure integrations
44
mode: subagent
5+
subagents:
6+
# Setup/config
7+
- setup
8+
- troubleshooting
9+
- api-key-setup
10+
- list-keys
11+
- mcp-integrations
12+
# Services overview
13+
- services
14+
- service-links
15+
# Built-in
16+
- general
17+
- explore
518
---
619

720
# Onboarding Wizard - aidevops Configuration

.agent/plan-plus.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22
name: plan-plus
33
description: Read-only planning agent with semantic codebase search - analysis without modifications
44
mode: subagent
5+
subagents:
6+
# Context/search (read-only)
7+
- osgrep
8+
- augment-context-engine
9+
- context-builder
10+
- context7
11+
# Planning workflows
12+
- plans
13+
- plans-quick
14+
- prd-template
15+
- tasks-template
16+
# Architecture review
17+
- architecture
18+
- code-standards
19+
- best-practices
20+
# Built-in
21+
- general
22+
- explore
523
---
624

725
# Plan+ - Enhanced Plan Agent

.agent/research.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22
name: research
33
description: Research and analysis - data gathering, competitive analysis, market research
44
mode: subagent
5+
subagents:
6+
# Context/docs
7+
- context7
8+
- augment-context-engine
9+
- osgrep
10+
# Web research
11+
- crawl4ai
12+
- serper
13+
- outscraper
14+
# Summarization
15+
- summarize
16+
# Built-in
17+
- general
18+
- explore
519
---
620

721
# Research - Main Agent

0 commit comments

Comments
 (0)