discover

Maps repository structure, API surfaces, and governance rules through read-only exploration.

Updated May 31, 2026
One-click install
npx skills add https://github.com/AlexanderNarbaev/agi --skill discover-alexandernarbaev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: discover
Source: https://github.com/AlexanderNarbaev/agi/tree/main/.opencode/skills/discover
Command: npx skills add https://github.com/AlexanderNarbaev/agi --skill discover-alexandernarbaev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Before writing or modifying code, developers need a clear picture of the repository: its structure, public API surfaces, complexity hotspots, and project governance rules. This Skill automates that discovery phase so implementation work starts from verified context instead of guesswork. ## Core Features & Use Cases - Explorer Delegation: Delegates read-only repository discovery to the swarm's explorer agent, with an optional second pass focused on hidden requirements, unstated assumptions, and scope risks. - API Surface Analysis: Runs symbols and batch_symbols tools on key files to map public interfaces, plus complexity_hotspots to flag modules needing security review or full gates. - Governance Extraction: Locates project governance files (project-instructions.md, CONTRIBUTING.md, INSTRUCTIONS.md) in priority order, extracts MUST and SHOULD rules, and writes them to .swarm/context.md under a Project Governance section. - Use Case: Before implementing a new feature in an unfamiliar monorepo, run the discover protocol to collect API surfaces, risk areas, and mandatory contribution rules into a shared context file for the whole agent swarm. ## Quick Start Ask the architect agent to run MODE: DISCOVER on this repository so it maps the codebase, API surfaces, and governance rules before any implementation begins.

Frequently Asked Questions about discover

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I explore an unfamiliar codebase before making changes?▼

Delegate discovery to an explorer agent that reads the repository without modifying it, then run symbols analysis on key files to map public API surfaces. A second explorer pass focused on risks and hidden requirements catches unstated assumptions before implementation starts.

What is the difference between symbols and batch_symbols for code analysis?▼

The symbols tool inspects the public API surface of individual files, while batch_symbols processes multiple files in one call. For multi-file module surveys, batch_symbols is preferred over sequential single-file symbols calls to reduce overhead.

How do I extract coding rules from CONTRIBUTING.md files?▼

Locate the governance file using glob patterns in priority order: project-instructions.md, docs/project-instructions.md, CONTRIBUTING.md, then INSTRUCTIONS.md. Read the first match and extract all MUST (mandatory) and SHOULD (recommended) rules into a summary section.

Does the discover protocol modify any repository files?▼

The discovery itself is read-only; the explorer agent only reads repository content. The single write operation is appending extracted governance rules to the .swarm/context.md file under a Project Governance section.

When should complexity_hotspots analysis be run during discovery?▼

Run complexity_hotspots during discovery only if it was not already executed in Phase 0; check context.md for existing analysis first. Modules flagged with security_review or full_gates recommendations should be noted in context.md for later phases.