sokrates-virtual-landscapes
Skill3 starsChanged 31 days agoMITView on GitHub
Defines virtual landscapes, the virtualLandscapes section of _sokrates_landscape/config.json that groups repositories into sub-landscapes by name patterns, from the user's own grouping (products, teams, org units) or from what the analyses reveal (naming conventions, folders, technology, activity, contributor domains, shared committers, tags), with nesting and a script that measures every candidate grouping. Use to split a large landscape into meaningful sub-landscapes or group repositories by product, team or technology.
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Prefer patterns over name lists: if a proposal's groups coincide with a naming convention (payments-*, *-service, an org prefix), write the …
- Very specific: line 28
When folders already encode the structure, propose folder sub-landscapes instead (sokrates-landscape-config skill) — they need no …
- Very specific: line 29
Every nested level has its own remainder (<parent>/Remainder in the checker) — name it via the nested remainderLandscapeMetadata or extend …
- Very specific: line 33
Write and verify: Put the virtualLandscapes object into _sokrates_landscape/config.json (merge with existing settings.
- Very specific: line 43
Lifecycle view without maintenance: instead of an Archived virtual landscape, set ignoreRepositoriesLastUpdatedBefore on the main landscape …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sokrates virtual landscapes
A landscape with a hundred repositories is a list; a landscape split into a dozen meaningful sub-landscapes is a map. Sokrates has two ways to split: folder sub-landscapes (a _sokrates_landscape/ inside a folder of analyses — no config, but the folder structure must already be right) and virtual landscapes (virtualLandscapes in config.json: named groups defined by regexes on repository names, nestable, regenerated on every updateLandscape under _sokrates_landscape/landscapes/<name>/). This skill designs the virtual ones — from the organisation's own vocabulary when the user provides it, and from evidence in the analyses when they don't.
Semantics (from the Sokrates source, reference: ../sokrates-landscape-config/references/landscape-reference.md): a repository belongs to a virtual landscape when includeRepoNamePatterns is non-empty and its metadata.name (from the repository's _sokrates/config.json, not the folder) fully matches any include pattern and matches no exclude pattern; matching is case-sensitive (prefix a pattern with (?i) to relax it); a repository may be in several landscapes; those in none go to the Remainder (remainderLandscapeMetadata.name); nesting is unlimited; an invalid regex silently matches nothing; landscapes/ is wiped and regenerated on every run.
Workflow
- Ask what the map is for — or infer it from the request: by product line, by team/org unit, by platform/technology, by lifecycle (active vs archived), by customer, by compliance scope. If the user names the groups, that vocabulary wins; the analyses are then used to check coverage, not to invent groups.
- Measure the candidates (and the user's grouping, if given):
python3 <this-skill-path>/scripts/propose_virtual_landscapes.py <analysis-root> [--groups <scratch>/groups.json] -o <scratch>/virtual.jsongroups.jsonis either a flat map{"Platform": ["core-.*", "(?i).*-infra"], "Mobile": {"include": ["ios-.*"], "exclude": ["ios-legacy"]}}(regexes or exact names) or a realvirtualLandscapesobject with nesting — the latter is what you finally paste, so measure that shape last. Landscape thresholds from the existingconfig.json(repositoryThresholdLocMain,repositoryThresholdContributors,ignoreRepositoriesLastUpdatedBefore, duplicate names) are applied first so counts match what Sokrates will show; an existingvirtualLandscapesis measured as proposalexisting. The script discovers every repository analysis under the root, extracts name, description (the GitHub description Sokrates carries inanalysisResults.metadata— the primary signal for what the software is; the JSONrepository_tablehas it for every repository, and the console prints it for everything left in the remainder), links, folder, main LOC, dominant technology, tags, contributors (count, e-mail domains, top committers) and latest commit, and reports for each proposal its landscapes with members, LOC share, coverage (% of repositories placed) and the remainder:user— your grouping measured: empty groups, repositories in several groups, unmatched names (case!);organisations(fororg / reponames) andnaming— shared prefixes, suffixes, dotted extensions (*.gl) and tokens of the repository part of the name as real regex patterns — the only kind that classifies future repositories automatically; product families usually appear as suffix/extension conventions, org prefixes are just the folders again;folders,technology,activity(active / fading / dormant by latest commit),size,organisation(dominant contributor e-mail domain),teams(repositories sharing their main committers),tags(Sokrates tag rules that fired) — all as explicit name lists, i.e. snapshots that need regenerating when repositories come and go.
- Compose the landscapes. Rules of thumb:
- Prefer patterns over name lists: if a proposal's groups coincide with a naming convention (
payments-*,*-service, an org prefix), write the regex; keep explicit lists only for the exceptions (excludeRepoNamePatterns) or for one-off views. - 5–15 top-level landscapes; a landscape with one repository is noise, one with 60 % of the LOC needs nesting (
virtualLandscapesinside it — e.g. org → product → component libraries). - A repository may legitimately be in two landscapes (a shared library under both products that use it) — but say so, and keep the Remainder small and named honestly (
Other repositories,Unassigned — please classify). - Snapshot views (activity, size, technology) are best as a second grouping alongside the structural one, or replaced by landscape filters (
ignoreRepositoriesLastUpdatedBefore,repositoryThresholdLocMain) and tags, which Sokrates maintains itself. - When folders already encode the structure, propose folder sub-landscapes instead (
sokrates-landscape-configskill) — they need no configuration and survive renames. The script warns when folder sub-landscapes already exist: then the virtual landscapes must offer a different cut (by product family, not by org/folder again). - Every nested level has its own remainder (
<parent>/Remainderin the checker) — name it via the nestedremainderLandscapeMetadataor extend the nested patterns until it is empty; the script warns about non-empty nested remainders. - Repositories excluded by the landscape thresholds never appear in any landscape; if one belongs to a family anyway, lower the threshold rather than listing it.
- Name landscapes the way the organisation does (products, teams, platforms), give each a
description, and keep names stable: the generated sub-landscape URLs (landscapes/<name>/) are what people bookmark.
- Prefer patterns over name lists: if a proposal's groups coincide with a naming convention (
- Re-measure the final grouping with
--groupsuntil coverage, overlaps and remainder are what you intend; every pattern compiles; names match case-sensitively. - Write and verify. Put the
virtualLandscapesobject into_sokrates_landscape/config.json(merge with existing settings; keepremainderLandscapeMetadata), then run the landscape checker, which re-evaluates membership exactly as Sokrates will:python3 <config-skills-path>/sokrates-landscape-config/scripts/check_landscape.py <analysis-root> - Report: the landscape table (name, description, repositories, LOC share, pattern or list, nesting), overlaps and remainder (with the descriptions of what stayed unclassified), which proposals you rejected and why, and the next command —
sokrates updateLandscape -analysisRoot <root>(add-recursivewhen folder sub-landscapes exist).
Patterns
- Org / product / library hierarchy: top level from the name prefix (
(?i)payments[-_/ ].*), nested level from the second token ((?i)payments[-_/ ]api.*,…-web.*), libraries as a nestedShared librarieswith explicit names andexcludeRepoNamePatternson the products. - In-house vs community for open-source portfolios: the
organisationproposal's domain groups turned into two landscapes with explicit lists, refreshed by re-running the script. - Lifecycle view without maintenance: instead of an
Archivedvirtual landscape, setignoreRepositoriesLastUpdatedBeforeon the main landscape and create a second landscape folder (a separate_sokrates_landscape/with a different config over the same analyses) for the archive. - Names with
org / repoform (GitHub exports): tokens split on/and spaces too, so(?i)uber[-_./ ].*catchesuber / x,uber-go / y,uber-web / z; tighten with(?i)uber / .*when the org alone is meant.
In this repository27 other files it gives its agents.
- sokrates-decompositionsSkill
- sokrates-features-of-interestSkill
- sokrates-landscape-configSkill
- sokrates-people-configSkill
- sokrates-repo-configSkill
- sokrates-improveSkill
- architecture-scanSkill
- cicd-scanSkill
- configuration-scanSkill
- domain-language-scanSkill
- evolution-scanSkill
- full-scanSkill
- functionality-scanSkill
- iac-scanSkill
- landscape-synthesis-scanSkill
- maintainability-scanSkill
- network-scanSkill
- observability-scanSkill
- performance-scanSkill
- reliability-scanSkill
- risk-synthesis-scanSkill
- security-scanSkill
- sokrates-scan-coreSkill
- storage-scanSkill
- tech-stack-scanSkill
- testing-scanSkill
- sokratesSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

