with one click
knowledge-tree
Query and update project knowledge tree for navigation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Query and update project knowledge tree for navigation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
The Code reporting discipline AND the reporting-system operations command. Discipline half — the "one spine" rule (every reportable unit of work lands one Weekly Work Tracker row, Source-tagged), field mapping, Bridge auto-mirror tie-in. Operations half (proposal 07) — /reporting status (registry tail, trust metrics, drift, next scheduled runs, log locations), /reporting run <pipeline>, /reporting heal. Use when finishing reportable work, when asked "how should I report this" / "log this for the report", at session end to capture unreported work, or for pipeline ops — "/reporting", "reporting status", "is reporting healthy", "run the health check", "why is a report row missing/stale".
Generate the weekly FourthOS sponsor update package for Carly (VP) and Christian (CTO). Pulls live portfolio data from the FourthOS Notion cockpit, refreshes the Notion Update Package page, renders a progressive-disclosure HTML artifact set (Tier 1 briefing dashboard, Tier 2 teaching deep-dive), stages it UNLISTED to the ai-enablement-decks GitHub Pages site, and notifies Dave to review before promoting it live. Use when asked to generate, build, preview, or promote the FourthOS weekly sponsor update, or when the CCv3-FourthOS-Weekly scheduled task runs. Triggers on "fourthos weekly", "sponsor update", "Carly update", "Christian update", "weekly portfolio update".
Run a feature through the full tri-model Game Plan pipeline — rostered roles (Claude hub, Grok builder/researcher, Codex reviewer/fixer), a workroom disk bus, and human gates. Use when the user types /game-plan [feature], says "run the game plan on X", "full crew on this", "roster this feature", or wants a multi-milestone feature built with cross-model build/review separation. Opt-in orchestrator on top of /workroom; for one-shot tasks use /grok or /codex directly, for trivial edits use neither.
Audit and curate the memory system -- identify signal vs noise, score entries, and archive low-quality learnings.
Detect drift between the continuous-claude repo and the active ~/.claude/ directory
Initialize Continuous Claude v3 for a new project with full toolset activation. Creates project CLAUDE.md (interview-driven, 8 sections), ROADMAP.md, knowledge tree, Serena code intelligence, and project registry entry. Use when opening a new project folder for the first time, starting a new project, setting up CCv3 in an existing repo, or the user says "init project", "setup project", "new project", "initialize", "start new project".
| name | knowledge-tree |
| description | Query and update project knowledge tree for navigation |
| allowed-tools | ["Bash","Read"] |
| metadata | {"triggers":["/knowledge-tree","project structure","where to add","project goals"]} |
Navigate and query the project's knowledge tree - a persistent map of what the project is about, how it's structured, and what you're working on.
/knowledge-tree query "where to add API endpoint")/knowledge-tree structure)/knowledge-tree goals)/knowledge-tree describe)/knowledge-tree refresh)# Generate or update the knowledge tree
uv run python $CLAUDE_OPC_DIR/scripts/core/knowledge_tree.py --project .
# Query the tree
uv run python $CLAUDE_OPC_DIR/scripts/core/query_tree.py --project . --query "where to add tests"
# Show current goals
uv run python $CLAUDE_OPC_DIR/scripts/core/query_tree.py --project . --goals
# Show project description
uv run python $CLAUDE_OPC_DIR/scripts/core/query_tree.py --project . --describe
# Show structure
uv run python $CLAUDE_OPC_DIR/scripts/core/query_tree.py --project . --structure
# JSON output for processing
uv run python $CLAUDE_OPC_DIR/scripts/core/query_tree.py --project . --query "auth" --json
{project}/.claude/knowledge-tree.json{project}/ROADMAP.md (goals source)| Query | Purpose |
|---|---|
where to add API endpoint | Find route/controller locations |
where to add test | Find test directories |
where to add component | Find UI component locations |
how does auth work | Find authentication component |
what is this project | Get project description |
current goal | Show current focus from ROADMAP |
The tree is regenerated on demand via hooks rather than a background daemon:
tree-invalidate.ts (PostToolUse) marks the tree stale on Edit/Writesession-start-init-check.ts (SessionStart) regenerates if missing or stalepageindex-watch.ts triggers regeneration when PageIndex content changesManual commands:
# Regenerate tree for a project
cd $CLAUDE_OPC_DIR && PYTHONPATH=. uv run python scripts/core/knowledge_tree.py --project <project-dir> --verbose
# Validate tree schema
cd $CLAUDE_OPC_DIR && PYTHONPATH=. uv run python scripts/core/tree_schema.py --validate <project-dir>/.claude/knowledge-tree.json
An earlier design called for a tree_daemon.py watcher process; it was never built. The lazy/hook-driven approach is the canonical implementation.
The planning hook automatically maintains ROADMAP.md:
# Project Roadmap
## Current Focus
**Feature name**
- Description of what's being worked on
- Started: 2026-01-24
## Completed
- [x] Previous feature (2026-01-20)
## Planned
- [ ] Next feature (high priority)
## Recent Planning Sessions
### 2026-01-24: Session title
- Decision made
- Approach chosen
{
"version": "1.0",
"project": {
"name": "project-name",
"description": "What the project does",
"type": "web-app|cli|library",
"stack": ["typescript", "react"]
},
"structure": {
"root": "/path/to/project",
"directories": {
"src/": { "purpose": "Source code", "key_files": [...] }
}
},
"components": [
{ "name": "Auth", "type": "feature", "files": [...] }
],
"navigation": {
"common_tasks": { "add_api_endpoint": ["routes/", "controllers/"] },
"entry_points": { "main": "src/index.ts" }
},
"goals": {
"source": "ROADMAP.md",
"current": { "title": "...", "description": "..." },
"completed": [...],
"planned": [...]
}
}
knowledge_tree.py --project . to generate treequery_tree.py to find locationspip install watchdog)