# Corpus Inventory

> Teaches agents how to read, query, and contribute to the corpus inventory wiki. Provides the classification taxonomy, wiki page contracts, and update protocols for maintaining the multi-agent knowledge index.

- Skill: `0sxd/corpus-inventory` (Agent Skill)
- Install (CLI): `npx skillmds@latest add 0sxd/corpus-inventory`
- Raw SKILL.md: https://api.skillmd.com/api/skills/0sxd/corpus-inventory/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: 0SxD (https://skillmd.com/u/0sxd)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/0sxd/corpus-inventory

---


# SKILL: Corpus Inventory Wiki

> **Root Directory:** `corpus_inventory_wiki_rag_vector/`
> All paths below are relative to that root.

## Purpose

This wiki is a **model-agnostic RAG index** — any agent from any provider can read these markdown files to understand what books and documents exist in the 0sXai corpus, where they're located, and what topics they cover. No embeddings, no vector DB — just structured markdown that any LLM can parse.

## Execution Flow

1. **Boot:** Read `system_directive.md` → `knowledge/skill_context.md` → this file.
2. **Orient:** Read `wiki/index.md` for the full corpus map, then `wiki/hot.md` for recent changes.
3. **Query:** Navigate to the relevant category page in `wiki/categories/` for detailed book listings.
4. **Report:** If you discover new files or reclassifications, append to `working_doc.md`.

## Wiki Structure

```
corpus_inventory_wiki_rag_vector/
├── system_directive.md              # Governance (read FIRST)
├── SANDBOX_RULES.md                 # Project rules
├── working_doc.md                   # Living changelog + recommendations
├── knowledge/
│   └── skill_context.md             # Environment map (read SECOND)
├── skills/
│   └── corpus-inventory/
│       └── SKILL.md                 # This file (read THIRD)
├── wiki/
│   ├── index.md                     # Master catalog — entry point for all agents
│   ├── hot.md                       # Recent changes cache (~500 tokens)
│   ├── corpus_health.md             # Dedup report, gap analysis, metrics
│   └── categories/                  # One page per topic domain
│       ├── architecture.md
│       ├── agile_planning.md
│       ├── software_dev.md
│       ├── ai_ml.md
│       ├── blockchain_defi.md
│       ├── security.md
│       ├── math_physics.md
│       ├── cloud_infra.md
│       ├── data_engineering.md
│       ├── quant_trading.md
│       └── uncategorized.md
├── inventory/                       # Machine-readable data
│   ├── full_inventory.json          # Complete deduped inventory
│   └── classification_report.json   # Heuristic results per file
├── session_logs/                    # Operational diary
│   └── session_log_YYYY-MM-DD.md
└── scripts/                         # Inventory generation scripts
    └── build_inventory.py
```

## Category Taxonomy

| ID | Category | Keywords | Agent Use Cases |
|:---|:---|:---|:---|
| CAT-01 | Architecture | architect, design pattern, microservice, system design, clean code, DDD, distributed | System design agents, code review agents |
| CAT-02 | Agile/Planning | agile, scrum, kanban, sprint, lean, project management, devops | Project planning agents, sprint orchestrators |
| CAT-03 | Software Dev | programming, python, javascript, react, flutter, web dev, API, full-stack | Coding agents, development assistants |
| CAT-04 | AI/ML | artificial intelligence, machine learning, deep learning, neural, NLP, LLM, transformer | Research agents, ML pipeline agents |
| CAT-05 | Blockchain/DeFi | blockchain, solidity, smart contract, defi, crypto, bitcoin, web3, dao | DeFi agents, smart contract auditors |
| CAT-06 | Security | security, cybersecurity, hacking, penetration, zero trust, red team, OWASP | Security auditor agents, red team agents |
| CAT-07 | Math/Physics | mathematics, calculus, algebra, statistics, probability, physics, quantum, topology | Research agents, quant agents |
| CAT-08 | Cloud/Infra | aws, azure, gcp, kubernetes, docker, terraform, infrastructure, serverless | DevOps agents, infrastructure agents |
| CAT-09 | Data Engineering | data science, database, sql, spark, kafka, airflow, etl, analytics | Data pipeline agents, analytics agents |
| CAT-10 | Quant/Trading | <sanitized_trading_doc_1> | Trading bot agents, quant researchers |
| CAT-99 | Uncategorized | (no match) | Flagged for human review |

## Must Do
- ALWAYS read `wiki/index.md` before answering corpus questions.
- ALWAYS cite the category page and book entry when recommending a source.
- ALWAYS append discoveries to `working_doc.md`.
- ALWAYS use Obsidian `[[wikilinks]]` for cross-references.

## Must NOT Do
- NEVER modify source files on disk.
- NEVER guess book contents from titles alone — use the heuristic confidence score.
- NEVER merge categories without updating the taxonomy table above.
- NEVER skip the confidence level field — LOW is acceptable, missing is not.

## Book Entry Format (Wiki Category Pages)

Each book in a category page follows this structure:

```markdown
### [Book Title]
- **Author:** [Author name or "Unknown"]
- **Year:** [Publication year or "Unknown"]
- **Size:** [X.X MB]
- **Format:** [PDF/EPUB/MOBI]
- **Confidence:** [HIGH/MEDIUM/LOW]
- **Keywords:** [keyword1, keyword2, keyword3]
- **Heuristic Layers:** [L1-Filename, L3-Year, L5-Size]
- **Source Path:** `[canonical path]`
- **Copies Found:** [N] locations
- **Agent Relevance:** [Which agents should read this]
- **Cross-refs:** [[related_category]], [[related_book]]
```

## Working Doc Update Protocol

After every session that touches this project, append to `working_doc.md`:

```markdown
## Update: YYYY-MM-DD HH:MM TZ

### Changes
- [What was added/modified/reclassified]

### Corpus Health Snapshot
- Total unique files: [N]
- Classified: [N] | Unclassified: [N]
- Duplicates removed: [N]
- Categories with gaps: [list]

### Recommendations
- [Suggested fixes, reorganization, missing coverage]

### Open Questions
- [Questions that need human answers to proceed]
```

