sokrates-decompositions

Designs logical component decompositions for Sokrates repository analyses and writes them into config.json.

3|1|Updated Aug 26, 2026
One-click install
npx skills add https://github.com/zeljkoobrenovic/sokrates-skills --skill sokrates-decompositions-zeljkoobrenovic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sokrates-decompositions
Source: https://github.com/zeljkoobrenovic/sokrates-skills/tree/main/skills/config/sokrates-decompositions
Command: npx skills add https://github.com/zeljkoobrenovic/sokrates-skills --skill sokrates-decompositions-zeljkoobrenovic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Sokrates' default folder-depth-1 component view is wrong for most repositories: one folder holding 95% of the code, hundreds of fragments, or a src/ split that matches nothing anyone thinks in. This Skill produces logicalDecompositions that match how teams actually divide the codebase, so component size, dependency, duplication, and ownership views become meaningful. ## Core Features & Use Cases - Measured proposals: A script evaluates folder-depth, mixed-depth, build-modules (Cargo, Maven, Gradle, npm workspaces, Bazel, Go, Python, .NET), grouped-modules, CODEOWNERS ownership, architectural layers, and technology candidates against the real tree, scoring each for balance and emitting ready-to-paste config. - Guided composition: Rules of thumb for choosing the primary decomposition vocabulary (modules, domains, teams, layers), targeting 5-25 components with no dominant share, plus secondary decompositions like by-layer or by-team. - Verification workflow: Mandatory preview with the repo-config checker to eliminate Multiple Classifications, Unclassified files, and regex errors before writing config. - Use Case: A monorepo with 80 Cargo crates shows one giant component in Sokrates. Run the proposal script, group modules using an architecture-scan component map into 12 named components, verify with the preview, and get dependency and duplication views that reflect the real structure. ## Quick Start Ask the AI to propose better Sokrates component decompositions for this repository and write them into _sokrates/config.json.

Frequently Asked Questions about sokrates-decompositions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a Sokrates component view that shows one big blob?

Run the propose_decompositions.py script against _sokrates/config.json to measure folder-depth, mixed-depth, and build-module candidates on the real tree. Pick the vocabulary that matches the repository (modules, teams, or layers), then verify with the repo-config preview before writing logicalDecompositions.

How do I create Sokrates components from build modules?

The proposal script detects Cargo packages, Maven and Gradle modules, npm workspaces, Bazel packages, Go modules, Python packages, and .NET projects, emitting one component per module with exception filters for nested modules. With more than about 25 modules, use the grouped-modules proposal and re-group by architecture or naming conventions.

Can Sokrates have multiple decompositions at once?

Yes, several logicalDecompositions can coexist, each producing its own component views. Common secondaries are by-layer, by-team from CODEOWNERS, by-technology for polyglot repos, and by-product for monorepos; two or three total is the practical limit.

Why does Sokrates report Multiple Classifications for my components?

Multiple Classifications appear when a file matches more than one component's filters, since Sokrates filters have no ordering. Resolve overlaps by adding exception filters to the broader component, or use metaComponents with path-based name extraction for layer views.

What is a good number of components in a Sokrates decomposition?

Aim for 5 to 25 components with none above roughly 40% of LOC and none below about 1% unless genuinely separate. Merge tiny components into a named group rather than leaving files Unclassified.