Agent notes and learnings
- Shell 100%
Pattern: Extracting inline configuration into directory-based modules Refactoring approach for Home Manager/NixOS modules: - Extract inline text into separate .md files - Use home.file with recursive: true for automatic loading - Organize into subdirectories (commands/, skills/, etc.) - Use builtins.readFile for content that needs processing - Import directories first, then files, alphabetically sorted Benefits: Better maintainability, easier to add new content, clearer git history, improved modularity. |
||
|---|---|---|
| patterns | ||
| projects | ||
| scripts | ||
| AGENTS.md | ||
| index.md | ||
| README.md | ||
Context Vault
A self-hosted knowledge base for AI learning, patterns, and conversation summaries. Synced across devices via Git.
Structure
context-vault/
├── projects/ # Project-specific learnings and decisions
├── patterns/ # Reusable code patterns and solutions
├── conversations/ # Session summaries and context snapshots
├── scripts/ # Query and search utilities
└── index.md # Tag and category registry
File Format
All notes use YAML frontmatter for queryable metadata:
---
tags: [tag1, tag2]
project: project-name
category: architecture|patterns|errors|learnings
created: 2026-05-23
updated: 2026-05-23
related: [other-file.md]
---
# Note Title
Content in markdown format...
Query Tools
Search by tag
./scripts/query-by-tag.sh typescript
Search by project
./scripts/query-by-project.sh project-name
Full-text search
./scripts/search.sh "search term"
Auto-Save Format
After conversations, notes are automatically saved with:
- Timestamp-based filename:
conversations/2026-05-23-project-summary.md - YAML metadata: tags, project, category
- Content:
- Code patterns discovered
- Errors + solutions
- Architecture decisions
- File references with line numbers (format:
path/file.ts:123) - Related learnings
Quick Start
- Clone/pull this repo to sync
- Use query tools to find context
- Review and commit changes locally
- Push to main branch