| name | semantic-clusters |
| description | Map software system capabilities using action-verb clusters that group components by what they DO rather than where they live. Produces behavioral architecture revealing capabilities, gaps, and architectural confusion. Use when you need to understand what a codebase does, explain a system to others, plan refactors, audit feature coverage, or understand cross-cutting concerns. Trigger phrases: 'what does this app actually do', 'walk me through the features', 'what are the main capabilities', 'map the system architecture', 'understand this codebase'. |
OpenClaw Integration: This skill is invoked by the Dojo Genesis plugin via /dojo run semantic-clusters.
The agent receives project context automatically via the before_agent_start hook.
Use dojo_get_context for full state, dojo_save_artifact to persist outputs,
and dojo_update_state to record phase transitions and decisions.
Semantic Clusters Skill
Version: 1.0
Created: 2026-02-08
Author: Cruz + Manus (Cowork)
Origin: Elevated from the repo-status skill's semantic clusters reference, which was codified from a live strategic-scout audit of Dojo Genesis (13 clusters, 333 Go files, 416 frontend files mapped).
Lineage: strategic-scout (exploration) → repo-status (formalization) → this standalone skill.
I. The Philosophy: Behavior Over Location
Every codebase has two architectures:
- The filesystem architecture — where files live. Directories, packages, modules. This is what
ls shows you.
- The behavioral architecture — what the system does. Capabilities that cross-cut directories, features that span layers.
Most people only see architecture #1. They think in terms of frontend/, backend/, utils/. But understanding comes from architecture #2 — the verbs.
A "chat" feature isn't in one directory. It's a component in the frontend, a handler in the backend, a state engine in a context, a streaming service, an SSE connection, and a set of tools. These parts live in 6 different directories. But they all serve one verb: CONVERSE.
Semantic clusters make the behavioral architecture visible. Each cluster is named with an action verb, and every significant component in the codebase maps to one (sometimes two) clusters. The result is a map of what the system can do — not just where its files happen to be.
II. When to Use This Skill
- Exploring a new codebase: Before diving into files, map the behavioral capabilities to build your mental model.
- Explaining a system: Clusters make better explanations than directory trees because they answer "what does it do?" not "where are the files?"
- Planning a refactor: Clusters reveal which components serve the same capability. Refactoring within a cluster is safer than across clusters.
- Auditing feature coverage: Clusters expose gaps — capabilities the system lacks or has only partially implemented.
- Identifying architectural confusion: If a component maps to 3+ clusters, it's probably doing too much. If a directory has components in 5 different clusters, it may need restructuring.
- Writing status documents: Section 4 of the
status-template skill uses clusters. This skill provides the methodology.
III. The Starter Verbs
These 13 action verbs cover most software systems. Read references/verb-catalog.md for detailed definitions, component examples, and signals for each.
| Verb | What It Means | Example Systems That Need It |
|---|
| CONVERSE | Real-time communication with users | Chat apps, messaging, support tools |
| REASON | Thinking, planning, deciding | AI agents, rule engines, recommendation systems |
| REMEMBER | Storing and recalling knowledge | Knowledge bases, caching, memory systems |
| OBSERVE | Watching and reporting | Monitoring, analytics, logging, tracing |
| LEARN | Adapting based on feedback | Calibration, A/B testing, preference learning |
| ACT | Executing side effects | Tool systems, API calls, file operations, cron |
| PROTECT | Enforcing boundaries | Auth, encryption, rate limiting, validation |
| CONNECT | Integrating externally | Plugins, APIs, webhooks, bots, OAuth |
| PRESENT | Rendering UI | Shells, layouts, component libraries, themes |
| PERSIST | Storing data durably | Databases, migrations, ORMs, caches |
| BUILD | Building, testing, shipping | CI/CD, Docker, scripts, test suites |
| THINK | Meta-cognition about itself | Skills, prompts, documentation, retrospectives |
| ORCHESTRATE | Coordinating multi-step work | DAG engines, task queues, workflows, sagas |
Not every project needs all 13. A simple CRUD app might only have CONVERSE, PERSIST, PRESENT, PROTECT, and BUILD. A complex AI platform might use all 13 plus custom ones.
IV. The Clustering Workflow
Step 1: Inventory First
You can't cluster what you haven't seen. Before clustering, you need a component inventory — a list of every significant component with its location, approximate LOC, and current status.
If you've already run the repo-status skill (Phase 2), use that inventory. Otherwise, walk the filesystem yourself:
ls -la project-root/
find project-root/src -type f | head -50
find project-root/backend -type d
find project-root/backend -name "*.go" | xargs wc -l | tail -1
Step 2: Assign Verbs
For each significant component in your inventory, ask: "What verb describes what this does?"
Rules of thumb:
- Most components map to one verb. If you can't decide, pick the one that best describes the component's primary purpose.
- Some components legitimately serve two verbs (cross-cluster). This is fine — note both.
- If a component maps to three or more verbs, it's probably doing too much. Flag it as an architectural concern.
- If a component doesn't fit any verb, it might be dead code, or you might need a new verb (see Section V).
Step 3: Build Cluster Tables
For each verb that has components, create a subsection:
### [emoji] VERB — [Short Description]
> [One sentence explaining what this capability means.]
| Component | Location | Status | LOC |
|-----------|----------|--------|-----|
| [Name] | [path/] | [emoji] | [~number] |
**Health:** [emoji] [one-line assessment]
**Audit Notes:** [technical details, constraints, risks — 1-2 lines]
Choosing emojis for verbs:
| Verb | Suggested Emoji |
|---|
| CONVERSE | 🗣️ |
| REASON | 🧠 |
| REMEMBER | 💾 |
| OBSERVE | 👁️ |
| LEARN | 📚 |
| ACT | 🔧 |
| PROTECT | 🛡️ |
| CONNECT | 🔌 |
| PRESENT | 🎨 |
| PERSIST | 💿 |
| BUILD | 🏗️ |
| THINK | 💭 |
| ORCHESTRATE | 🎼 |
Step 4: Identify Cross-Cluster Components
Some components serve multiple clusters. List these explicitly:
### Cross-Cluster Components
| Component | Directory | Primary Cluster | Secondary | Notes |
|-----------|-----------|----------------|-----------|-------|
| [Name] | [path/] | [VERB] | [VERB] | [Why] |
This table is gold for understanding coupling. Components that are cross-cluster are integration points — they're where changes in one capability can break another.
Step 5: Identify Orphans
Walk the directory tree and check: is every significant directory represented in at least one cluster?
Orphan directories — significant code that doesn't map to any cluster — signal one of three things:
- Dead code that should be removed.
- An emerging capability that deserves its own verb.
- A gap in your analysis that needs a second look.
Document orphans explicitly. Don't sweep them under the rug.
Step 6: Write Health Assessments
For each cluster, write a 2-line health assessment:
- Health line: Overall emoji + one-sentence verdict.
- Audit Notes line: Key constraints, risks, or technical details.
Be honest. A cluster with 85% test coverage and active development is ✅. A cluster with no tests and a known security gap is ⚠️. A cluster that's completely broken is ❌.
V. Creating New Verbs
The 13 starter verbs are a starting point. Your project may need verbs not on the list.
Good custom verbs are specific and immediately communicative:
| Verb | Use When |
|---|
| TRANSLATE | i18n-heavy apps, multi-language support |
| SIMULATE | Apps with simulation engines, digital twins |
| COMPOSE | Content creation tools, editors, IDEs |
| GOVERN | Apps with complex compliance, policy, approval workflows |
| DISCOVER | Search-heavy apps, recommendation engines, explorers |
| TRANSFORM | Data pipeline apps, ETL systems, media converters |
| SCHEDULE | Calendar-heavy apps, booking systems, cron managers |
| NOTIFY | Apps where notification delivery is a core capability |
Bad custom verbs are vague and don't tell you anything:
- MANAGE (manage what?)
- PROCESS (process what?)
- HANDLE (handle what?)
- DO (everything "does" something)
The test: can someone read just the verb name and guess what kinds of components belong in that cluster? If yes, it's a good verb.
VI. Common Pitfalls
1. Over-clustering. Don't create 20 clusters for a 30-file project. If a cluster has only 1-2 components, merge it with a related cluster. A good rule: 4-8 clusters for small projects, 8-15 for large ones.
2. Under-clustering. Don't dump everything into PRESENT and PERSIST. If a cluster has 25+ components, consider splitting it. PRESENT might split into PRESENT (layout) and COMPOSE (content editing).
3. Confusing location with behavior. A component in frontend/src/components/ isn't automatically PRESENT. A dashboard that displays traces belongs in OBSERVE. A form that manages API keys belongs in PROTECT. Let the behavior dictate the cluster, not the directory.
4. Ignoring tests. Tests belong in BUILD, not in the cluster of the code they test. They're infrastructure, not capabilities.
5. Forgetting infrastructure. CI/CD, Docker, and deployment configs are real capabilities. BUILD is a real cluster, not an afterthought.
6. Treating clusters as hierarchical. Clusters are flat. REASON is not "above" ACT. They're peers — different capabilities of the same system. The component tables within each cluster may have internal hierarchy, but the clusters themselves don't.
VII. Using Clusters Beyond Status Documents
Semantic clusters have applications beyond the status-template:
- Architecture Decision Records (ADRs): Frame decisions by which cluster they affect. "This ADR impacts REASON and ORCHESTRATE."
- Sprint planning: Assign work by cluster. "This sprint we're focused on OBSERVE and PRESENT."
- Code review: Ask "which cluster does this PR touch?" A PR that modifies 4+ clusters deserves extra scrutiny.
- Onboarding: Walk new team members through clusters, not directories. "Let me explain what this system can DO."
- Technical debt tracking: Rate each cluster's health independently. Focus debt reduction on ⚠️ and ❌ clusters.
VIII. Quality Checklist
Before delivering your semantic cluster map, confirm:
OpenClaw Tool Integration
When running inside the Dojo Genesis plugin:
- Start by calling
dojo_get_context to retrieve full project state, history, and artifacts
- During the skill, follow the workflow steps documented above
- Save outputs using
dojo_save_artifact with the artifacts output directory
- Update project state by calling
dojo_update_state to record skill completion and any phase transitions