docs(agents): refresh hierarchical AGENTS.md with team-mode coverage

Update root + 43 directory-level AGENTS.md files to reflect current state:
- Root AGENTS.md rewritten with accurate counts (1967 TS files, 1304 source +
  663 test, 278k LOC, 120 barrel index.ts), 7-step init flow, 5-tier hook
  composition, and full Team Mode section (12 team_* tools, eligibility,
  storage layout, config gate)
- src/AGENTS.md adds team-mode init step, current per-subdir file/LOC table
- src/tools/AGENTS.md documents conditional gates (team-mode +12, task
  system +4, hashline +1, interactive_bash +1, look_at +1) with always-on
  baseline of 20
- src/hooks/AGENTS.md splits into 5 tiers + 4 conditional team-mode hooks
- src/features/team-mode/AGENTS.md surfaces 12 tools, eligible agents,
  spawn-race-safe invariants, and integration points
- src/features/builtin-skills/AGENTS.md tracks 10 skills incl. team-mode
- src/agents/AGENTS.md, src/plugin/AGENTS.md, src/config/AGENTS.md updated
  for team-mode awareness, accurate counts, and current schema field list
- All other AGENTS.md files refreshed to 2026-05-08 generation date
This commit is contained in:
YeonGyu-Kim
2026-05-08 12:08:42 +09:00
parent cd31d2a1a8
commit 838b5ae216
44 changed files with 909 additions and 648 deletions
+60 -29
View File
@@ -1,50 +1,81 @@
# src/features/builtin-skills/ -- 8 Built-in Skills
# src/features/builtin-skills/ — 10 Built-in Skill Files
**Generated:** 2026-04-11
**Generated:** 2026-05-08
## OVERVIEW
24 files. 8 built-in skills registered via `createBuiltinSkills()`. Each skill implements `BuiltinSkill` interface with name, description, content, and optional MCP config.
Skills shipped inside the plugin (always available, no install). Registered via `createBuiltinSkills()`. Each skill implements the `BuiltinSkill` interface with name, description, content, and optional MCP config. Loaded by `opencode-skill-loader` with priority: project > opencode > user > **builtin**. User-installed skills with the same name override built-ins.
## STRUCTURE
```
builtin-skills/
├── index.ts # Barrel exports
├── skills.ts # createBuiltinSkills() factory
├── skills.ts # createBuiltinSkills() factory — registers all 10 below
├── types.ts # BuiltinSkill interface
├── git-master/ # SKILL.md + resources
├── frontend-ui-ux/ # SKILL.md
├── agent-browser/ # SKILL.md
├── dev-browser/ # SKILL.md
└── skills/ # Skill implementations as .ts files
├── git-master-sections/ # Git master prompt sections
├── playwright.ts # Playwright + agent-browser + playwright-cli + dev-browser
├── frontend-ui-ux.ts # Frontend UI/UX skill
├── review-work.ts # 5-agent parallel review orchestrator
── ai-slop-remover.ts # AI code smell remover
├── skills/
│ ├── git-master.ts # 1111 LOC
│ ├── git-master-skill-metadata.ts # Companion to git-master
│ ├── playwright.ts # MCP variant + agent-browser
│ ├── playwright-cli.ts # CLI variant
├── dev-browser.ts # Persistent page state
├── frontend-ui-ux.ts # Design-first UI guidance
├── review-work.ts # 5-agent post-implementation review
├── ai-slop-remover.ts # Remove AI-generated code patterns
── team-mode.ts # 12 team_* tool documentation (gated)
│ ├── git-master-sections/ # Git-master prompt sub-sections
│ └── index.ts # skill barrel
├── git-master/ # Resources for git-master skill
├── frontend-ui-ux/ # Resources for frontend-ui-ux skill
├── agent-browser/ # Resources for agent-browser variant
└── dev-browser/ # Resources for dev-browser
```
## SKILL CATALOG
| Skill | LOC | MCP | Purpose |
|-------|-----|-----|---------|
| **git-master** | 1111 | -- | Atomic commits, rebase, history search |
| **playwright** | 312 | @playwright/mcp | Browser automation via MCP |
| **playwright-cli** | 268 | -- | Browser automation via CLI |
| **agent-browser** | (in playwright.ts) | -- | Browser via agent-browser tool |
| **dev-browser** | 221 | -- | Persistent page state browser |
| **frontend-ui-ux** | 79 | -- | Design-first UI development |
| **review-work** | ~500 | -- | 5-agent post-implementation review |
| **ai-slop-remover** | ~300 | -- | Remove AI code patterns |
| Skill | Approx LOC | MCP | Notes |
|-------|------------|-----|-------|
| `git-master` | 1111 | | Atomic commits, rebase, history search; included by default for delegate-task `git` category |
| `playwright` | 312 | `@playwright/mcp` | Browser automation via MCP |
| `playwright-cli` | 268 | | Browser automation via shell CLI (no MCP) |
| `agent-browser` | (in playwright.ts) | | Browser via `agent-browser:*` Bash commands |
| `dev-browser` | 221 | | Persistent page state browser for dev work |
| `frontend-ui-ux` | 79 | | Design-first UI development guidance |
| `review-work` | ~500 | | Post-implementation review orchestrator (5 parallel agents) |
| `ai-slop-remover` | ~300 | | Remove AI-generated code smells |
| `team-mode` | — | — | **Conditional** — only loaded when `team_mode.enabled`; documents the 12 `team_*` tools and lifecycle |
## BROWSER VARIANT SELECTION
Config `browser_automation_engine` selects which browser skill loads:
- `"playwright"` (default) -> playwright with @playwright/mcp
- `"playwright-cli"` -> CLI-based playwright
- `"agent-browser"` -> agent-browser tool
## SKILL LOADING
| Value | Skill Loaded |
|-------|-------------|
| `"playwright"` (default) | playwright (MCP-backed) |
| `"playwright-cli"` | playwright-cli (CLI-backed) |
| `"agent-browser"` | agent-browser (in playwright.ts) |
Skills loaded by `opencode-skill-loader` with priority: project > opencode > user > builtin. User-installed skills with same name override built-ins.
Only one browser skill is active per session — non-selected variants are skipped.
## TEAM-MODE SKILL GATING
The `team-mode` skill is registered unconditionally but only **rendered** when `team_mode.enabled: true`:
```typescript
// skills/team-mode.ts (paraphrase)
const teamModeSkill: BuiltinSkill = {
name: "team-mode",
shouldLoad: (config) => config.team_mode?.enabled === true,
// ...
}
```
When disabled, the skill is filtered out before agent prompt assembly so agents do not see `team_*` tool docs they cannot use.
## ADDING A NEW BUILT-IN SKILL
1. Create `skills/{name}.ts` exporting a `BuiltinSkill` object
2. Register in `skills.ts` `createBuiltinSkills()` factory
3. Add resources (if any) under a sibling directory: `{name}/SKILL.md`, prompt sections, etc.
4. If the skill is conditional, set `shouldLoad: (config) => …`
5. Optionally declare an MCP server in the skill (loaded by `skill-mcp-manager` per session)