Claude Context Library
Context Library
The examples/claude/ directory contains the actual configuration files that power the Claude Code environment across 15 spoke repositories. These are the source-of-truth files — what Claude reads when it enters any domus repo.
CLAUDE.md Files (Per-Repository)
| File | Lines | Scope |
|---|---|---|
|
441 |
Chronicle system — worklogs, partials, document prefixes, project structure |
|
357 |
Hub aggregator — Antora playbook, deployment pipeline, build system |
|
208 |
Infrastructure ops — HA status, VMs, BIND DNS, VyOS, Vault |
|
187 |
802.1X EAP-TLS — certificate workflow, wpa_supplicant, NetworkManager |
|
174 |
Mathematical content — LaTeX, notation conventions, problem sets |
|
170 |
Ansible, Terraform, CI/CD patterns |
|
102 |
SIEM — QRadar, Sentinel, Wazuh, Monad ETL |
|
99 |
Linux administration patterns |
|
79 |
ISE policy, profiling, deployment |
|
62 |
Identity — SAML, Keycloak, FreeIPA |
|
38 |
Windows 802.1X EAP-TLS |
|
25 |
Windows/PowerShell administration |
|
872 |
Global config — role, style, CLI mastery, AsciiDoc standards (stowed to |
Context Files (Domain-Specific)
Context files provide domain expertise that Claude loads on demand. They supplement the per-repo CLAUDE.md with deep knowledge for specific tasks.
| File | Purpose |
|---|---|
|
CISSP certification — 8 domains mapped to real experience, study schedule |
|
Infrastructure operations — HA status, VMs, services, network topology |
|
Mathematics curriculum — algebra, notation, problem-solving methodology |
|
Neovim + Lua development — plugin architecture, LSP, domus-nvim config |
|
Python development — uv, click, API clients, testing patterns |
|
RHCSA certification — exam objectives mapped to lab exercises |
|
Spanish acquisition — DELE B2 prep, vocabulary, grammar patterns |
|
Unix pipeline mastery — awk, sed, grep, find, xargs coaching methodology |
Global Baselines
| File | Purpose |
|---|---|
|
Current global CLAUDE.md snapshot — the active |
|
Previous version — retained for diff and evolution tracking |
|
Earliest archived version |
Accessing Context Files
Context files are loaded via include::example$claude/<filename>[] in documentation, or referenced directly by Claude Code when operating in the relevant domain.
# List all Claude context files
ls examples/claude/context-*.md
# View a specific context
cat examples/claude/context-infrastructure-ops.md
# Include in documentation
# Domus Captures - Claude Context
## Identity
- **Repository:** domus-captures
- **Component:** `captures`
- **Author:** Evan Rosado
- **Domain:** captures.domusdigitalis.dev
- **Last Updated:** 2026-03-24
## Purpose
Lifelong chronicle system and personal knowledge management. Contains:
- Daily worklogs (WRKLOG-*)
- Meeting notes (MTG-*)
- Research documents (DOC-*)
- Education tracking (certifications, languages, technical skills)
- Case studies (TAC, incidents, changes, deployments)
- CLI codex (command patterns, drills, reference)
- Literature study (Don Quijote - 126 chapters)
---
## Hub-Spoke Architecture
domus-captures is a **spoke** in a multi-repository documentation system.
### The Hub
| Component | Repository | Purpose |
|-----------|------------|---------|
| **domus-docs** | Hub/Aggregator | Antora playbook, UI bundle, builds unified site |
**Site URL:** https://docs.domusdigitalis.dev
### All Spokes (15 repos)
| Component | Antora Name | Purpose |
|-----------|-------------|---------|
| domus-captures | `captures` | Worklogs, chronicles, education, codex |
| domus-infra-ops | `infra-ops` | Infrastructure runbooks, diagrams, inventory |
| domus-ise-linux | `ise-linux` | Linux 802.1X EAP-TLS methodology |
| domus-ise-windows | `ise-windows` | Windows 802.1X EAP-TLS methodology |
| domus-ise-ops | `ise-ops` | ISE policy, profiling, deployment |
| domus-netapi-docs | `netapi` | Network automation CLI (netapi) docs |
| domus-secrets-ops | `secrets-ops` | Secrets management (dsec, gopass, Vault) |
| domus-linux-ops | `linux-ops` | Linux administration patterns |
| domus-windows-ops | `windows-ops` | Windows/PowerShell administration |
| domus-python | `python` | Python tools and automation |
| domus-identity-ops | `identity-ops` | Identity & SSO (SAML, Keycloak, FreeIPA) |
| domus-automation-ops | `automation-ops` | Templates, GitOps, Ansible |
| domus-siem-ops | `siem-ops` | SIEM (QRadar, Sentinel, Wazuh, Splunk) |
| domus-o11y-ops | `o11y-ops` | Observability (Prometheus, Grafana, Loki) |
| domus-antora-ui | N/A | Custom Antora UI bundle |
### Non-Aggregated Repos
| Repository | Purpose |
|------------|---------|
| domus-gabriel-docs | Standalone docs for Gabriel (separate Antora site) |
| domus-math | Mathematical content (standalone) |
| domus-musica | Music notation, LilyPond scores |
### Deployment Pipeline
```
Spoke Repos (domus-captures, domus-infra-ops, etc.)
↓ git push to GitHub triggers Cloudflare Pages directly
Cloudflare Pages (auto-build)
↓ fetches all repos via HTTPS at build time
https://docs.domusdigitalis.dev
```
**To deploy changes:**
1. Commit and push spoke repo - Cloudflare Pages triggers automatically
**NO NEED to push domus-docs separately.** Cloudflare watches all spoke repos.
Only push to domus-docs when:
- Changing `antora-playbook.yml` (adding/removing components)
- Updating `ui-bundle.zip` (UI changes)
- Modifying hub-specific content
```bash
# Just push the spoke - that's it
git -C ~/atelier/_bibliotheca/domus-captures push origin main
```
---
## domus-captures Blueprint
### Directory Structure
```
domus-captures/
├── .claude/
│ └── CLAUDE.md # This file - Claude context
├── docs/
│ └── modules/ROOT/
│ ├── pages/ # Main content
│ │ ├── YYYY/MM/ # Chronological captures
│ │ │ ├── WRKLOG-*.adoc
│ │ │ ├── MTG-*.adoc
│ │ │ ├── DOC-*.adoc
│ │ │ └── diagrams/
│ │ ├── case-studies/ # TAC, incidents, changes
│ │ │ ├── tac/
│ │ │ ├── incidents/
│ │ │ ├── changes/
│ │ │ ├── rca/
│ │ │ └── deployments/
│ │ ├── codex/ # CLI patterns & reference
│ │ ├── education/ # Certifications, languages, literature
│ │ │ ├── literature/quijote/ # 126 chapters
│ │ │ ├── languages/
│ │ │ ├── mathematics/
│ │ │ └── rhcsa/
│ │ ├── patterns/ # Reusable patterns
│ │ ├── projects/ # Project documentation
│ │ ├── reference/ # Quick references
│ │ ├── runbooks/ # Operational runbooks
│ │ └── trackers/ # Progress tracking pages
│ ├── partials/ # Reusable content fragments
│ │ ├── trackers/ # Single source of truth
│ │ │ ├── education/ # 50+ trackers (certs, skills, languages)
│ │ │ ├── work/ # ITSM, priorities, projects, adhoc
│ │ │ ├── personal/ # Life admin, infrastructure
│ │ │ ├── meta/ # Meta trackers
│ │ │ └── operations/
│ │ ├── worklog/ # Worklog section includes
│ │ │ ├── urgent.adoc
│ │ │ ├── morning.adoc
│ │ │ ├── work-chla.adoc
│ │ │ ├── education.adoc
│ │ │ ├── personal.adoc
│ │ │ ├── infrastructure.adoc
│ │ │ └── quick-commands.adoc
│ │ ├── attributes.adoc
│ │ └── codex/
│ └── examples/ # Code snippets for include::
│ ├── codex/ # CLI command examples
│ ├── lab/ # Experimentation
│ ├── music/ # LilyPond scores
│ ├── regex-drills/
│ ├── jq-drills/
│ ├── python-drills/
│ └── monad/
├── scripts/
│ ├── remarkable/ # reMarkable workbook generators
│ ├── audit-worklogs.sh
│ ├── migrate-quijote.sh
│ └── sync-worklog-nav.sh
├── supplemental-ui/
│ ├── css/custom.css
│ └── img/
└── Makefile
```
### Partials System (Single Source of Truth)
**Work Trackers** (`partials/trackers/work/`):
| File | Purpose | Tags |
|------|---------|------|
| `adhoc.adoc` | Carryover backlog, TAC cases | `carryover`, `tac`, `resolved` |
| `priorities.adoc` | Daily checkboxes | `current`, `secondary` |
| `itsm-tickets.adoc` | SR, INC, CR tracking | `service-requests`, `incidents`, `changes-*` |
| `projects.adoc` | Project priorities | `p0`, `p1`, `p2` |
| `peoplesoft-codes.adoc` | Time entry codes | |
**Personal Trackers** (`partials/trackers/personal/`):
| File | Purpose | Tags |
|------|---------|------|
| `life-admin.adoc` | Medical, financial, legal, housing | `urgent`, `completed`, `medical`, etc. |
| `infrastructure.adoc` | Home infra status | |
**Education Trackers** (`partials/trackers/education/`):
- 50+ files for certifications, languages, technical skills
- Key files: `certifications-deadlines.adoc`, `claude-code.adoc`, `linguistics.adoc`, `don-quijote.adoc`
### Worklog System (Sustainable)
**Create new worklog:**
```bash
make new-day
```
**What it creates:**
```asciidoc
= WRKLOG-YYYY-MM-DD
:description: [DAY] - [SUMMARY]
:revdate: YYYY-MM-DD
== Summary
include::partial$worklog/urgent.adoc[]
include::partial$worklog/morning.adoc[]
include::partial$worklog/work-chla.adoc[]
== Session Accomplishments (Claude Code)
include::partial$worklog/personal.adoc[]
include::partial$worklog/education.adoc[]
include::partial$worklog/infrastructure.adoc[]
include::partial$worklog/quick-commands.adoc[]
include::partial$worklog/related.adoc[]
```
**Daily maintenance:**
1. Update day counts in `trackers/work/adhoc.adoc`
2. Update day counts in `trackers/work/priorities.adoc`
3. Fill in accomplishments
4. Update `Last updated:` comments in partials
---
## Document Prefixes
| Prefix | Type | Example |
|--------|------|---------|
| WRKLOG | Daily worklog | WRKLOG-2026-03-24.adoc |
| MTG | Meeting notes | MTG-2026-02-02-ciso-strategy-session.adoc |
| DOC | Research/analysis | DOC-2026-03-23-session-knowledge-capture.adoc |
| PLAN | Roadmaps | PLAN-2026-02-security-tools-learning-roadmap.adoc |
| REF | Quick reference | REF-2026-02-command-reference.adoc |
| SETUP | Config guides | SETUP-2026-02-01-zfold7-mobile-workflow.adoc |
| DEPLOY | Deployment record | DEPLOY-2026-01-26-shahab-linux-workstation.adoc |
| MONTHLY | Month summary | MONTHLY-2026-01-chla-infosec-january.adoc |
| LRN | Learning/draft | LRN-2026-02-14-cli-data-processing.adoc |
| INC | Incident report | INC-2026-03-16-001.adoc |
| CR | Change request | CR-2026-03-12-p50-arch-to-ubuntu.adoc |
| TAC | Vendor TAC case | TAC-2026-03-chla-8021x-auth-failures.adoc |
| RCA | Root cause analysis | RCA-2026-03-13-001.adoc |
---
## Build Commands
```bash
make # Build Antora site
make serve # Build + local server (port 8000)
make new-day # Create today's worklog from template
make new-mtg # Create meeting notes template
make push # Push to GitHub, GitLab, Gitea
# Export formats
make pdf FILE=path/to/file.adoc [PDF_THEME=dark|light|catppuccin]
make html FILE=path/to/file.adoc
make docx FILE=path/to/file.adoc
make epub FILE=path/to/file.adoc
make export-today # All formats for today's worklog
# reMarkable workbooks
make rm-mastery # Generate mastery workbooks
make rm-upload # Upload to reMarkable
```
---
## Cross-References
**Same component:**
```asciidoc
xref:education/rhcsa/index.adoc[RHCSA Study]
```
**Other components (DOUBLE colon):**
```asciidoc
xref:infra-ops::runbooks/vyos-deployment.adoc[VyOS Deployment]
xref:ise-linux::02-pki/certificate-enrollment.adoc[Certificate Enrollment]
xref:netapi::cli/ise/backup.adoc[ISE Backup CLI]
xref:secrets-ops::vault/ssh-certificates.adoc[Vault SSH]
```
**CRITICAL:** Use full paths from pages/ root for xrefs in nested directories.
---
## Sensitive Content
- Redact passwords, API keys, tokens with `<REDACTED>`
- No plaintext credentials in any document
- Use `dsource`/`dsec` references for credential loading examples
- gopass paths are OK: `gopass show v3/personal/storage/extra-space`
---
## Scripts
| Script | Purpose |
|--------|---------|
| `scripts/remarkable/generate-*.py` | reMarkable workbook generators |
| `scripts/remarkable/pdf-template-linked.py` | PDF template with navigation |
| `scripts/audit-worklogs.sh` | Audit worklog completeness |
| `scripts/migrate-quijote.sh` | Don Quijote chapter migration |
| `scripts/sync-worklog-nav.sh` | Sync nav.adoc with worklogs |
---
## reMarkable Workbook System
### Environment Variable
```bash
# Add to ~/.zshrc for large workbook generation
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
```
### Workbook Generators
Location: `scripts/remarkable/`
| Script | Purpose | Pages |
|--------|---------|-------|
| `generate-asciidoc-complete-reference.py` | AsciiDoc syntax reference | 126+ |
| `generate-regex-mastery-workbook.py` | Regex proficiency training | 110+ |
| `generate-sed-mastery-workbook.py` | sed mastery | TBD |
| `generate-vim-mastery-workbook.py` | Vim mastery | TBD |
| `generate-idea-capture-enhanced.py` | 10-category idea capture | 332 |
| `pdf-template-linked.py` | Template for custom workbooks | - |
### Upload to reMarkable
```bash
cd scripts/remarkable/
python generate-regex-mastery-workbook.py
rmapi put --force regex-mastery-workbook.pdf Domus/Reference/
```
### Design Principles
1. **Progressive learning** - Ordered sections building from basics to advanced
2. **Bidirectional navigation** - Every page links back to index
3. **Color-coded categories** - Visual organization by topic
4. **Practice exercises** - Drills with collapsible solutions
5. **Tool-specific sections** - How to use concepts in grep, sed, awk, Python
---
## Remotes
- **origin:** github.com/EvanusModestus/domus-captures
- **gitlab:** gitlab.com/EvanusModestus/domus-captures
- **gitea:** gitea-01.inside.domusdigitalis.dev/evanusmodestus/domus-captures
---
## Attributes
All documents should include shared attributes:
```asciidoc
include::partial$attributes.adoc[]
```
**Never hardcode:**
- IP addresses
- Hostnames
- User names
- Policy names
Use attributes defined in `docs/modules/ROOT/partials/attributes.adoc`.
---
## Diagrams
- Store D2 sources in `pages/YYYY/MM/diagrams/` or `examples/diagrams/`
- Use external files with attribute substitution
- Kroki extension enabled for rendering
- LilyPond scores in `examples/music/`
---
## Lessons Learned
### Kroki Auto-Stop (2026-02-14)
domus-docs Makefile now auto-stops Kroki after build:
```makefile
all: diagrams local kroki-stop
```
### Orphaned Process Detection
```bash
ps aux --sort=-%cpu | head -10
ps -eo pid,ppid,stat,%cpu,etime,cmd --sort=-%cpu | awk '$2==1 && $4>5'
```
### Hyprland CPU Burn
The `animation = borderangle, 1, 120, linear, loop` causes 59% CPU. Comment it out.
### Antora xref Resolution (RCA-2026-03-19-001)
**Problem:** Relative xrefs fail in nested directories.
**Solution:** Always use full paths from pages/ root:
```asciidoc
// WRONG
xref:capitulo-001.adoc[I]
// CORRECT
xref:education/literature/quijote/primera-parte/capitulo-001.adoc[I]
```
---
## Root Cause Analysis Log
### RCA-2026-03-19-001: Don Quijote xrefs unresolved
**Date:** 2026-03-19
**Severity:** Build Warning (pages rendered but links broken)
**Root Cause:** Used relative xrefs in subdirectories. Antora requires full paths from pages/ root.
**Fix:**
```bash
sed -i 's|xref:capitulo-|xref:education/literature/quijote/primera-parte/capitulo-|g' \
primera-parte/index.adoc
```
**Prevention:**
1. Always use full paths from pages/ root for xrefs in subdirectories
2. Run `make 2>&1 | grep -i "xref not found"` before committing
---
## Current Active Tracks
| Track | Status | Progress |
|-------|--------|----------|
| Claude Code Certification | **ACTIVE** | 26:49 / 4:00:00 (Nick Saraev course) |
| RHCSA 9 | ACTIVE | Ch 1-2 / 20 |
| Spanish DELE C1 | ACTIVE | Don Quijote study |
| Terminal Mastery | Ongoing | awk/sed/jq patterns |
---
## Deferred Discussion
**After Linux AD Auth project completes:**
- User has concerns about "home lab" → "home enterprise" terminology (2026-02-13)
- Scope: All domus-* repos batch-updated
Related
-
Claude Config Codex — overview and layering model
-
CLAUDE.md Patterns — what belongs in CLAUDE.md vs elsewhere
-
Full Inventory — every CLAUDE.md with contents
-
STD-007: Delegation Boundary — the standard these configs enforce