🐍 🏠 🍎 🪟 🐧 - Deterministically decompose text into classified semantic units with authority, risk and…
Decompose
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**Stop prompting. Start decomposing.**
Deterministic text classification for AI agents. Decompose turns any text into classified, structured semantic units — instantly. No LLM. No setup. One function call.
---
Before: your agent reads this
After: your agent reads this
Every unit classified. Every standard extracted. Every risk scored. Your agent knows what matters.
---
Install
Use as MCP Server
Add to your agent's MCP config (Claude Code, Cursor, Windsurf, etc.):
Your agent gets two tools:
- **decompose_text** — decompose any text
- **decompose_url** — fetch a URL and decompose its content
OpenClaw
Install the skill from ClawHub or configure directly:
Or install the skill: clawdhub install decompose-mcp
Use as CLI
Use as Library
---
What Each Field Means
| Field | Values | What It Tells Your Agent |
|-------|--------|--------------------------|
| authority | mandatory, prohibitive, directive, permissive, conditional, informational | Is this a hard requirement or background? |
| risk | safety_critical, security, compliance, financial, contractual, advisory, informational | How much does this matter? |
| type | requirement, definition, reference, constraint, narrative, data | What kind of content is this? |
| irreducible | true/false | Must this be preserved verbatim? |
| attention | 0.0 - 10.0 | How much compute should the agent spend here? |
| entities | standards, codes, regulations | What formal references are cited? |
| actionable | true/false | Does someone need to do something? |
---
What to Build With This
Decompose is not the destination. It's the step before the LLM that most developers skip — not because it's hard, but because nobody showed them it exists. Documents have structure. That structure is classifiable. And classification should happen before reasoning.
Filter: built-in LLM pre-filter
filter_for_llm() keeps mandatory, safety-critical, financial, and compliance units — drops boilerplate before it reaches your LLM or vector store.
Route: risk-based processing
Safety-critical content goes to one chain. Financial content goes to another. Boilerplate gets skipped.
See examples/ for runnable scripts.
---
Why No LLM?
Decompose runs on pure regex and heuristics. No Ollama, no API key, no GPU, no inference cost.
This is intentional:
- **Fast**: <500ms for a 50-page spec
- **Deterministic**: Same input always produces same output
- **Offline**: Works air-gapped, on a plane, on CI
- **Composable**: Your agent's LLM reasons over the structured output — decompose handles the preprocessing
The LLM is what *your agent* uses. Decompose makes whatever model you're running work better.
---
Built by Echology
Decompose is built by Echology and extracted from AECai, a document intelligence platform for Architecture, Engineering, and Construction firms. The classification patterns, entity extraction, and irreducibility detection are battle-tested against thousands of real AEC documents — specs, contracts, RFIs, inspection reports, pay applications.