toleria-digital-twin
Extract and continuously sync codebase knowledge to Toleria vault. Digital twin keeps knowledge graph updated.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Extract and continuously sync codebase knowledge to Toleria vault. Digital twin keeps knowledge graph updated.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | toleria-digital-twin |
| description | Extract and continuously sync codebase knowledge to Toleria vault. Digital twin keeps knowledge graph updated. |
Scan repository. Extract decisions, patterns, tech debt, architecture. Sync to knowledge vault. Keep graph updated automatically.
/toleria-digital-twin [--repo /path/to/repo] [--continuous] [--schedule hourly|daily|weekly]
Ask user:
D1 — Configure digital twin
Project/branch/task: Toleria knowledge extraction
ELI10: Scan your codebase once, extract architectural knowledge (decisions, patterns, tech debt), store in searchable vault.
Recommendation: Start with defaults — can tune extraction templates later
Options:
Scan target directory (default: current repo):
.py, .js, .ts, .go, .rs filesDecision: → architectural decisionPattern: → design patternTech debt: → technical debtGenerate 30+ knowledge items in INBOX format.
Run Toleria pipeline:
VAULT_ROOT=~/Documents/Vault
# Classify + write
inbox.process <item>
# Validate schema
vault.validate $VAULT_ROOT
# Index for fast lookup
vault.index $VAULT_ROOT
Show extraction summary:
✓ Scanned: <repo path>
✓ Items extracted: 35
- Decisions: 8
- Patterns: 12
- Tech debt: 7
- Components: 8
✓ Items processed: 35
✓ Vault validated: OK
✓ INDEX generated: ready
Ask if user wants automatic updates:
D2 — Enable continuous sync
ELI10: Run extraction automatically so knowledge graph stays current as code changes.
Recommendation: Daily (once per day) — balances freshness vs overhead
Options:
If A or B: Create cron job that runs extraction script.
Define which file patterns and markers to extract from:
extraction_rules:
python:
patterns:
- "**/*.py"
markers:
- "Decision:"
- "Pattern:"
- "Tech debt:"
- "TODO:"
parse: "docstrings + comments"
javascript:
patterns:
- "**/*.js"
- "**/*.ts"
markers:
- "ARCHITECTURE:"
- "DESIGN:"
- "BUG:"
parse: "JSDoc + comments"
markdown:
patterns:
- "**/*.md"
markers:
- "# Architecture"
- "# Design"
- "# TODO"
parse: "heading sections"
Default: ~/Documents/Vault
Override: VAULT_ROOT=/custom/path /toleria-digital-twin
Track last sync: ~/.toleria/last-extract-<repo>.json
On re-run:
The digital twin skill wraps existing Toleria skills:
No new core skills needed. Reuses existing Toleria infrastructure.
Codebase
↓
[scan: find all source files]
↓
[extract: parse code for markers]
↓
Knowledge Items (JSON)
↓
[inbox.process: classify → generate ID → write to vault]
↓
Vault Files (DECISIONS/, PATTERNS/, EXECUTION/)
↓
[vault.validate: schema check]
↓
[vault.index: generate INDEX]
↓
Knowledge Graph (decisions.json, patterns.json)
/toleria-digital-twin --repo ~/workspace/developerscoffee.com/src/brewpress
Output:
✓ Scanned: ~/workspace/developerscoffee.com/src/brewpress
✓ Files analyzed: 19 Python modules
✓ Items extracted: 35
- Decisions: 5 (agent-based, atomic state, etc.)
- Patterns: 5 (tool-first, draft-first, etc.)
- Components: 6 (agents, state store, etc.)
- Tech debt: 5 (multilang, distributed state, etc.)
- Requirements: 4 (draft gen, approval, etc.)
- Metadata: 5 (project, stack, etc.)
✓ Processed: 35/35 items
✓ Vault: ~/Documents/Vault
✓ Ready to query:
jq '.[] | {id, type}' ~/Documents/Vault/INDEX/decisions.json
/toleria-digital-twin --repo ~/workspace/developerscoffee.com --schedule daily --continuous
Runs at midnight each day. If code changed, extracts new items. Idempotent (no duplicates).
After extraction, knowledge is indexed and queryable:
jq '.[] | {id, type}' ~/Documents/Vault/INDEX/decisions.json
jq -r '.[] | "# \(.id)\n\(.content)\n"' \
~/Documents/Vault/INDEX/decisions.json > decisions.md
jq '.[] | select(.type=="decision")' ~/Documents/Vault/INDEX/decisions.json
vault.read "DECISIONS/DECISION_xyz.md"
Current (Phase 1):
Future (Phase 2):
When user types /toleria-digital-twin:
The skill is a wrapper around Toleria's existing core skills.