Loading...
Loading...
Explore a codebase with parallel Haiku agents. Modes - --fast (1 agent), default (3), --deep (5). Use when user says "learn [repo]", "explore codebase", "study this repo".
npx skill4agent add soul-brews-studio/oracle-skills-cli learn/learn [url] # Auto: clone via ghq, symlink origin/, then explore
/learn [slug] # Use slug from ψ/memory/slugs.yaml
/learn [repo-path] # Path to repo
/learn [repo-name] # Finds in ψ/learn/owner/repo
/learn --init # Restore all origins after git clone (like submodule init)| Flag | Agents | Files | Use Case |
|---|---|---|---|
| 1 | 1 overview | Quick scan, "what is this?" |
| (default) | 3 | 3 docs | Normal exploration |
| 5 | 5 docs | Master complex codebases |
/learn --fast [target] # Quick overview (1 agent, ~2 min)
/learn [target] # Standard (3 agents, ~5 min)
/learn --deep [target] # Deep dive (5 agents, ~10 min)ψ/learn/
├── .origins # Manifest of learned repos (committed)
└── owner/
└── repo/
├── origin # Symlink to ghq source (gitignored)
├── repo.md # Hub file - links to all sessions (committed)
└── YYYY-MM-DD/ # Date folder
├── 1349_ARCHITECTURE.md # Time-prefixed files
├── 1349_CODE-SNIPPETS.md
├── 1349_QUICK-REFERENCE.md
├── 1520_ARCHITECTURE.md # Second run same day
└── ...unlink ψ/learn/owner/repo/origin # Remove symlink
ghq rm owner/repo # Remove source
# Docs remain in ψ/learn/owner/repo/git submodule initROOT="$(pwd)"
# Read .origins manifest and restore symlinks
while read repo; do
ghq get -u "https://github.com/$repo"
OWNER=$(dirname "$repo")
REPO=$(basename "$repo")
mkdir -p "$ROOT/ψ/learn/$OWNER/$REPO"
ln -sf "$(ghq root)/github.com/$repo" "$ROOT/ψ/learn/$OWNER/$REPO/origin"
echo "✓ Restored: $repo"
done < "$ROOT/ψ/learn/.origins"date "+🕐 %H:%M %Z (%A %d %B %Y)"ROOT="$(pwd)"
echo "Learning from: $ROOT"origin/origin/READ from: .../ψ/learn/acme-corp/cool-library/origin/
WRITE to: .../ψ/learn/acme-corp/cool-library/2026-02-04/1349_[FILENAME].md# Replace [URL] with actual URL
URL="[URL]"
ROOT="$(pwd)" # CRITICAL: Save current directory!
ghq get -u "$URL" && \
GHQ_ROOT=$(ghq root) && \
OWNER=$(echo "$URL" | sed -E 's|.*github.com/([^/]+)/.*|\1|') && \
REPO=$(echo "$URL" | sed -E 's|.*/([^/]+)(\.git)?$|\1|') && \
mkdir -p "$ROOT/ψ/learn/$OWNER/$REPO" && \
ln -sf "$GHQ_ROOT/github.com/$OWNER/$REPO" "$ROOT/ψ/learn/$OWNER/$REPO/origin" && \
echo "$OWNER/$REPO" >> "$ROOT/ψ/learn/.origins" && \
sort -u -o "$ROOT/ψ/learn/.origins" "$ROOT/ψ/learn/.origins" && \
echo "✓ Ready: $ROOT/ψ/learn/$OWNER/$REPO/origin → source"ls -la "$ROOT/ψ/learn/$OWNER/$REPO/"Note: Grep tool doesn't follow symlinks. Use:rg -L "pattern" ψ/learn/owner/repo/origin/
# Find by name (searches origin symlinks)
find ψ/learn -name "origin" -type l | xargs -I{} dirname {} | grep -i "$INPUT" | head -1origin/specs/ψ/lib/--fast--deep--fast--deepTODAY = YYYY-MM-DD (e.g., 2026-02-04)
TIME = HHMM (e.g., 1349)
REPO_DIR = [ROOT]/ψ/learn/[OWNER]/[REPO]/
DOCS_DIR = [ROOT]/ψ/learn/[OWNER]/[REPO]/[TODAY]/ ← date folder
SOURCE_DIR = [ROOT]/ψ/learn/[OWNER]/[REPO]/origin/ ← symlink
FILE_PREFIX = [TIME]_ ← time prefix for files
Example:
- ROOT = /home/user/ghq/github.com/my-org/my-oracle
- OWNER = acme-corp
- REPO = cool-library
- TODAY = 2026-02-04, TIME = 1349
- DOCS_DIR = .../ψ/learn/acme-corp/cool-library/2026-02-04/
- Files: 1349_ARCHITECTURE.md, 1349_CODE-SNIPPETS.md, etc.date +%H%Mmkdir -p "$DOCS_DIR"You are exploring a codebase.
READ source code from: [SOURCE_DIR]
WRITE your output to: [DOCS_DIR]/[TIME]_OVERVIEW.md
⚠️ IMPORTANT: Write to DOCS_DIR (the date folder), NOT inside origin/!
Analyze:
- What is this project? (1 sentence)
- Key files to look at
- How to use it (install + basic example)
- Notable patterns or techREAD source code from: [SOURCE_DIR]
WRITE your output to: [DOCS_DIR]/[TIME]_[filename].md
⚠️ IMPORTANT: Write to DOCS_DIR (the date folder), NOT inside origin/![TIME]_ARCHITECTURE.md[TIME]_CODE-SNIPPETS.md[TIME]_QUICK-REFERENCE.mdREAD source code from: [SOURCE_DIR]
WRITE your output to: [DOCS_DIR]/[TIME]_[filename].md
⚠️ IMPORTANT: Write to DOCS_DIR (the date folder), NOT inside origin/![TIME]_ARCHITECTURE.md[TIME]_CODE-SNIPPETS.md[TIME]_QUICK-REFERENCE.md[TIME]_TESTING.md[TIME]_API-SURFACE.md# [REPO] Learning Index
## Source
- **Origin**: ./origin/
- **GitHub**: https://github.com/$OWNER/$REPO
## Explorations
### [TODAY] [TIME] ([mode])
- [[YYYY-MM-DD/HHMM_ARCHITECTURE|Architecture]]
- [[YYYY-MM-DD/HHMM_CODE-SNIPPETS|Code Snippets]]
- [[YYYY-MM-DD/HHMM_QUICK-REFERENCE|Quick Reference]]
- [[YYYY-MM-DD/HHMM_TESTING|Testing]] <!-- --deep only -->
- [[YYYY-MM-DD/HHMM_API-SURFACE|API Surface]] <!-- --deep only -->
**Key insights**: [2-3 things learned]
### [TODAY] [EARLIER-TIME] ([mode])
...## 📚 Quick Learn: [REPO]
**Mode**: fast (1 agent)
**Location**: ψ/learn/$OWNER/$REPO/[TODAY]/[TIME]_*.md
| File | Description |
|------|-------------|
| [REPO].md | Hub (links all sessions) |
| [TODAY]/[TIME]_OVERVIEW.md | Quick overview |## 📚 Learning Complete: [REPO]
**Mode**: default (3 agents)
**Location**: ψ/learn/$OWNER/$REPO/[TODAY]/[TIME]_*.md
| File | Description |
|------|-------------|
| [REPO].md | Hub (links all sessions) |
| [TODAY]/[TIME]_ARCHITECTURE.md | Structure |
| [TODAY]/[TIME]_CODE-SNIPPETS.md | Code examples |
| [TODAY]/[TIME]_QUICK-REFERENCE.md | Usage guide |
**Key Insights**: [2-3 things learned]## 📚 Deep Learning Complete: [REPO]
**Mode**: deep (5 agents)
**Location**: ψ/learn/$OWNER/$REPO/[TODAY]/[TIME]_*.md
| File | Description |
|------|-------------|
| [REPO].md | Hub (links all sessions) |
| [TODAY]/[TIME]_ARCHITECTURE.md | Structure & design |
| [TODAY]/[TIME]_CODE-SNIPPETS.md | Code examples |
| [TODAY]/[TIME]_QUICK-REFERENCE.md | Usage guide |
| [TODAY]/[TIME]_TESTING.md | Test patterns |
| [TODAY]/[TIME]_API-SURFACE.md | Public API |
**Key Insights**: [3-5 things learned]# Ignore origin symlinks only (source lives in ghq)
# Note: no trailing slash - origin is a symlink, not a directory
ψ/learn/**/origin.gitignore--fast--deeporigin/.origins--init