docs: Update documentation for Agent Skills system
Document the new Skills system introduced in recent commits: - docs/architecture.md: Add Skills System section with discovery priority, embedded skills, script extraction, and key types - docs/skills.md: New comprehensive guide covering SKILL.md format, discovery priority, embedded skills, research skill usage, and troubleshooting - README.md: Update Agent Skills section with correct priority order, add embedded skills info, research skill usage, and link to Skills Guide in Documentation Map - AGENTS.md: Add skill creation to Adding Features, skill extraction to Dangerous Code Paths, and new Skills System Entry Points section All documentation links validated - no broken links or orphan files. Agent: lamport
This commit is contained in:
23
AGENTS.md
23
AGENTS.md
@@ -30,6 +30,7 @@
|
||||
- **New tool**: Add definition in `tool_definitions.rs`, implement in `tools/`, add dispatch case
|
||||
- **New provider**: Implement `LLMProvider` trait in `g3-providers`
|
||||
- **New CLI mode**: Add to CLI args, implement handler in `g3-cli`
|
||||
- **New skill**: Create `skills/<name>/SKILL.md`, optionally add to `embedded.rs` for binary inclusion
|
||||
- **New config option**: Add to `g3-config` structs
|
||||
|
||||
## Dangerous Code Paths
|
||||
@@ -43,6 +44,7 @@ These areas have subtle bugs if modified incorrectly:
|
||||
| **Tool dispatch** | Missing dispatch cases cause silent failures |
|
||||
| **Retry logic** | Aggressive retries hit rate limits harder |
|
||||
| **Parser sanitization** | Inline JSON can trigger false tool call detection |
|
||||
| **Skill extraction** | Version hash mismatch causes stale scripts; path issues on Windows |
|
||||
|
||||
## Do's and Don'ts
|
||||
|
||||
@@ -82,3 +84,24 @@ The `analysis/deps/` directory contains static analysis artifacts generated by t
|
||||
| `limitations.md` | What could not be observed and what may invalidate conclusions |
|
||||
|
||||
These artifacts are useful for understanding coupling, planning refactors, and identifying architectural boundaries.
|
||||
|
||||
## Skills System Entry Points
|
||||
|
||||
The skills system (`crates/g3-core/src/skills/`) provides extensible agent capabilities:
|
||||
|
||||
| File | Purpose |
|
||||
|------|--------|
|
||||
| `mod.rs` | Public API: `Skill`, `discover_skills`, `generate_skills_prompt` |
|
||||
| `parser.rs` | SKILL.md parsing with YAML frontmatter validation |
|
||||
| `discovery.rs` | Multi-location discovery with priority ordering |
|
||||
| `embedded.rs` | Compile-time skill embedding via `include_str!` |
|
||||
| `extraction.rs` | Script extraction to `.g3/bin/` with version tracking |
|
||||
| `prompt.rs` | Generates `<available_skills>` XML for system prompt |
|
||||
|
||||
**Key invariants for skills**:
|
||||
- Skill names must be 1-64 chars, lowercase + hyphens only
|
||||
- SKILL.md must have valid YAML frontmatter with `name` and `description`
|
||||
- Embedded scripts are extracted lazily (on first use)
|
||||
- Version tracking uses content hash, not timestamps
|
||||
- Higher priority locations override lower (repo > workspace > global > embedded)
|
||||
- Script extraction is Unix-only (chmod 755); Windows support is incomplete
|
||||
|
||||
Reference in New Issue
Block a user