feat(pi): add skills and improve AGENTS.md reading guidelines

- Add 'create-skill' skill for scaffolding new skill directories
- Add 'planning' skill for structured implementation workflows
- Add search-then-read pattern guidance to AGENTS.md
This commit is contained in:
2026-05-01 23:26:53 -04:00
parent e4d40d89d9
commit ba30222962
3 changed files with 141 additions and 0 deletions

View File

@@ -34,6 +34,23 @@ bash(command="cat > file.txt << 'EOF'\ncontent\nEOF")
write(path="file.txt", content="content")
```
## Reading Files
Prefer a **search → targeted read** pattern to minimize context usage:
1. **Search** with `grep -n` / `rg -n` to find relevant line numbers.
2. **Read** only the needed range using `read(path, offset, limit)` or `sed -n 'X,Yp'`.
```bash
# Find the relevant lines
bash(command="rg -n 'functionName' src/", timeout=10)
# Read just that region (e.g. lines 42-70)
read(path="src/foo.go", offset=42, limit=29)
```
Full-file reads are fine when genuinely needed (small files, needing full picture), but avoid them as the default reflex.
## Principles
1. **KISS / YAGNI** - Keep solutions simple and straightforward. Don't introduce abstractions, generics, or indirection unless there is a concrete, immediate need. Prefer obvious code over clever code.