feat(pipeline): add Unix toolbox orientation to pipeline skills
- Add Orientation sections to housekeeping, reflect, evolve with shell commands (find -mtime, grep -c, git diff, wc -c) for efficient scoping - Update CLAUDE.md memory retrieval to use domain-scoped L0 grep Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,26 @@ Measure (don't edit content):
|
|||||||
- `memory/cog-meta/patterns.md`
|
- `memory/cog-meta/patterns.md`
|
||||||
- Any domain satellite pattern files (e.g. `work/*/patterns.md`)
|
- Any domain satellite pattern files (e.g. `work/*/patterns.md`)
|
||||||
|
|
||||||
|
## Orientation (run FIRST, before any file reads)
|
||||||
|
|
||||||
|
Use these shell commands to see exactly what changed since last run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# What did housekeeping and reflect change recently?
|
||||||
|
git diff HEAD~1 --stat memory/
|
||||||
|
|
||||||
|
# Detailed diff of architectural files (what you care about)
|
||||||
|
git diff HEAD~1 memory/cog-meta/patterns.md memory/hot-memory.md CLAUDE.md
|
||||||
|
|
||||||
|
# What changed in the last 24h?
|
||||||
|
find memory/ -type f -name "*.md" -mtime -1 | sort
|
||||||
|
|
||||||
|
# Current prompt weight components (quick file sizes)
|
||||||
|
wc -c memory/hot-memory.md memory/cog-meta/patterns.md memory/cog-meta/briefing-bridge.md 2>/dev/null
|
||||||
|
```
|
||||||
|
|
||||||
|
Use git diffs to understand what housekeeping/reflect actually did, instead of re-reading entire files.
|
||||||
|
|
||||||
## Process
|
## Process
|
||||||
|
|
||||||
### 1. Architecture Review
|
### 1. Architecture Review
|
||||||
|
|||||||
@@ -1,5 +1,23 @@
|
|||||||
Use this skill to perform memory housekeeping. Trigger if the user says "housekeeping", "clean up memory", "prune memory", "archive old data", or similar maintenance requests.
|
Use this skill to perform memory housekeeping. Trigger if the user says "housekeeping", "clean up memory", "prune memory", "archive old data", or similar maintenance requests.
|
||||||
|
|
||||||
|
## 0. Orientation (run FIRST, before any file reads)
|
||||||
|
|
||||||
|
Use these shell commands to scope your work before reading files:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# What changed since last run? Focus here first.
|
||||||
|
find memory/ -type f -name "*.md" -mtime -1 | sort
|
||||||
|
|
||||||
|
# Quick entry counts for archival threshold checks (>50 = archive)
|
||||||
|
# Add paths for any domain observations files that exist
|
||||||
|
grep -c "^- " memory/cog-meta/self-observations.md memory/personal/observations.md memory/*/observations.md memory/*/*/observations.md 2>/dev/null
|
||||||
|
|
||||||
|
# Completed action items count (>10 = archive)
|
||||||
|
grep -c "^\- \[x\]" memory/personal/action-items.md memory/*/action-items.md memory/*/*/action-items.md 2>/dev/null
|
||||||
|
```
|
||||||
|
|
||||||
|
Only read files that need work based on these results. Skip unchanged files.
|
||||||
|
|
||||||
## 1. Garbage Collect Memory
|
## 1. Garbage Collect Memory
|
||||||
|
|
||||||
Review and archive stale data per CLAUDE.md glacier rules. All glacier files must have YAML frontmatter.
|
Review and archive stale data per CLAUDE.md glacier rules. All glacier files must have YAML frontmatter.
|
||||||
|
|||||||
@@ -11,6 +11,23 @@ If you spot issues in these files, note them in self-observations and evolve wil
|
|||||||
|
|
||||||
Self-improvement — pattern recognition, memory maintenance, knowledge base quality.
|
Self-improvement — pattern recognition, memory maintenance, knowledge base quality.
|
||||||
|
|
||||||
|
## Orientation (run FIRST, before any file reads)
|
||||||
|
|
||||||
|
Use these shell commands to scope your work before reading files:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# What changed since last run? Focus here.
|
||||||
|
find memory/ -type f -name "*.md" -mtime -1 | sort
|
||||||
|
|
||||||
|
# L0 summaries for all domains — quick routing without opening INDEX.md files
|
||||||
|
grep -rn "<!-- L0:" memory/ --include="*.md" | grep -v glacier/ | sort
|
||||||
|
|
||||||
|
# Entry counts for files approaching archival threshold
|
||||||
|
grep -c "^- " memory/cog-meta/self-observations.md memory/personal/observations.md memory/*/observations.md memory/*/*/observations.md 2>/dev/null
|
||||||
|
```
|
||||||
|
|
||||||
|
Focus on recently-changed files. Skip files that haven't been modified since last run.
|
||||||
|
|
||||||
## Memory Files
|
## Memory Files
|
||||||
|
|
||||||
Read these files on activation:
|
Read these files on activation:
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ The `/reflect` skill reads recent session transcripts to review interactions, ca
|
|||||||
When responding to any query:
|
When responding to any query:
|
||||||
|
|
||||||
1. **Identify domain** — match query to a domain via file structure knowledge
|
1. **Identify domain** — match query to a domain via file structure knowledge
|
||||||
2. **L0 scan if uncertain** — if multiple files could be relevant, grep L0 headers in the domain directory before opening files
|
2. **L0 scan** — once you know the domain, run `grep -rn "<!-- L0:" memory/{domain}/` to get all file summaries in one call. This replaces reading INDEX.md — faster and fewer tokens. Use this to pick the right file(s) before opening anything.
|
||||||
3. **Select files by query type:**
|
3. **Select files by query type:**
|
||||||
- Schedule, tasks → action-items.md + calendar.md
|
- Schedule, tasks → action-items.md + calendar.md
|
||||||
- Person, "who is" → entities.md
|
- Person, "who is" → entities.md
|
||||||
|
|||||||
Reference in New Issue
Block a user