split-architecture
Skill45 starsChanged 4 days agoMITView on GitHub
This skill should be used when converting a single-file architecture doc to directory-based format for better organization of large architecture documents
In this repository43 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- build-unplannedSkill
- check-specs-alignmentSkill
- create-tasksSkill
- debugSkill
- design-architectureSkill
- design-it-twiceSkill
- design-productSkill
- domain-modelingSkill
- doubt-driven-developmentSkill
- finalize-taskSkill
- groundwork-checkSkill
- groundwork-helpSkill
- handoffSkill
- implement-taskSkill
- instrument-observabilitySkill
- just-do-itSkill
- just-do-it-swarmingSkill
- plan-taskSkill
- review-prSkill
- select-projectSkill
- setup-repoSkill
- shipSkill
- skillsSkill
- source-architecture-from-codeSkill
- source-product-specs-from-codeSkill
- source-ux-design-from-codeSkill
- split-specsSkill
- staged-rolloutSkill
- statuslineSkill
- swarm-debugSkill
- swarm-design-architectureSkill
- task-validation-loopSkill
- test-driven-developmentSkill
- understanding-feature-requestsSkill
- use-git-worktreeSkill
- using-groundworkSkill
- ux-designSkill
- validateSkill
- vertical-sliceSkill
- work-on-next-taskSkill
- work-onSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Manually: when the user invokes /split-architecture
- Very specific: line 18
If yes → Is {{project_name}} non-empty?
- Very specific: line 19
If empty → Invoke Skill(skill="groundwork:select-project") to select a project, then restart this skill.
- Very specific: line 20
If set → Project is {{project_name}}, specs at {{specs_dir}}/.
- Distinctive: line 21
If no → Continue (single-project repo).
- Very specific: line 27
If missing → output "No single-file architecture doc found at {{specs_dir}}/architecture.md.
- Very specific: line 29
If it exists → output "Architecture doc is already in directory format at {{specs_dir}}/architecture/.
- Distinctive: line 106
If a section is missing from the source file, skip that output file (don't create empty files).
- Very specific: line 107
If non-standard numbered sections exist beyond 13, include them as NN-slug.md files.
- Distinctive: line 113
After all directory files are written and verified:
- Distinctive: line 138
When invoked automatically (not by the user), the caller has already verified that at least one threshold is crossed:
- Distinctive: line 143
No user confirmation is needed — the split happens silently and the caller reports what happened.
- Distinctive: line 145
When invoked manually by the user, skip threshold checks and split unconditionally.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Split Architecture Skill
Converts a single-file architecture document ({{specs_dir}}/architecture.md) into a directory-based format ({{specs_dir}}/architecture/) for better organization and targeted context loading.
When to Use
- Automatically by
design-architectureandsource-architecture-from-codewhen the single-file architecture doc crosses 500 lines or 10 decision records (sections matching### DR-\d+) - Manually when the user invokes
/split-architecture
Step 0: Resolve Project Context
- Monorepo check: Does
.groundwork.ymlexist at the repo root?- If yes → Is
{{project_name}}non-empty?- If empty → Invoke
Skill(skill="groundwork:select-project")to select a project, then restart this skill. - If set → Project is
{{project_name}}, specs at{{specs_dir}}/.
- If empty → Invoke
- If no → Continue (single-project repo).
- If yes → Is
- Proceed with the resolved project context.
Step 1: Validate Preconditions
- Check single file exists:
{{specs_dir}}/architecture.mdmust exist- If missing → output "No single-file architecture doc found at
{{specs_dir}}/architecture.md. Nothing to split." and stop.
- If missing → output "No single-file architecture doc found at
- Check directory does NOT exist:
{{specs_dir}}/architecture/must not already exist- If it exists → output "Architecture doc is already in directory format at
{{specs_dir}}/architecture/. Nothing to do." and stop.
- If it exists → output "Architecture doc is already in directory format at
- Read the file and count lines and decision records (sections matching
^### DR-\d+).
Step 2: Split the File
Parse the single-file architecture doc into sections and write each to its own file under {{specs_dir}}/architecture/.
Directory Structure
{{specs_dir}}/architecture/
├── _index.md # Header, metadata
├── 01-executive-summary.md # Section 1: Executive Summary
├── 02-architectural-drivers.md # Section 2: Architectural Drivers
├── 03-system-overview.md # Section 3: System Overview
├── 04-components/ # Section 4: One file per component
│ ├── _index.md # Section 4 header ("## 4) Component Details")
│ └── <component-slug>.md # e.g., cli.md, query-router.md
├── 05-data.md # Section 5: Data Architecture
├── 06-integration.md # Section 6: Integration Architecture
├── 07-security.md # Section 7: Security Architecture
├── 08-infrastructure.md # Section 8: Infrastructure & Deployment
├── 09-observability.md # Section 9: Observability
├── 10-cost-model.md # Section 10: Cost Model
├── 11-decisions/ # Section 11: One file per DR
│ ├── _index.md # Section 11 header ("## 11) Decision Records")
│ └── DR-NNN.md # e.g., DR-001.md, DR-015.md
├── 12-open-questions.md # Section 12: Open Questions & Risks
└── 13-appendices.md # Section 13: AppendicesParsing Rules
_index.md— Everything from the start of the file up to (but not including)## 1). This includes the header block (Version, Last updated, Status, Owner).01-executive-summary.md— From## 1)up to (but not including)## 2).02-architectural-drivers.md— From## 2)up to (but not including)## 3).03-system-overview.md— From## 3)up to (but not including)## 4).04-components/_index.md— The## 4)heading line and any text before the first### 4.subsection. Typically just:## 4) Component Details04-components/<component-slug>.md— One file per### 4.Nsubsection. The filename is a slug of the component name:### 4.1 CLI→cli.md### 4.2 Query Router→query-router.md### 4.15 MCP Server→mcp-server.md- Preserve the full
### 4.N ...heading in the file
05-data.md— From## 5)up to (but not including)## 6).06-integration.md— From## 6)up to (but not including)## 7).07-security.md— From## 7)up to (but not including)## 8).08-infrastructure.md— From## 8)up to (but not including)## 9).09-observability.md— From## 9)up to (but not including)## 10).10-cost-model.md— From## 10)up to (but not including)## 11).11-decisions/_index.md— The## 11)heading line and any text before the first### DR-subsection.11-decisions/DR-NNN.md— One file per### DR-NNNsubsection. The filename matches the DR number:### DR-001: Project Structure→DR-001.md### DR-015: Call Graph Data Model [V3]→DR-015.md- Preserve the full
### DR-NNN: ...heading in the file
12-open-questions.md— From## 12)up to (but not including)## 13).13-appendices.md— From## 13)to the end of the file.
Edge Cases
- If a section is missing from the source file, skip that output file (don't create empty files).
- If non-standard numbered sections exist beyond 13, include them as
NN-slug.mdfiles. - Preserve all horizontal rules (
---) as they appear in the source. - Preserve trailing newlines — each output file should end with a single newline.
Step 3: Delete the Single File
After all directory files are written and verified:
- Verify — Read back
_index.md, at least one component file, and at least one DR file to confirm they look correct. - Delete — Remove
{{specs_dir}}/architecture.mdusingrm. - Confirm — Output a summary:
Split architecture.md into directory format:
{{specs_dir}}/architecture/
├── _index.md
├── 01-executive-summary.md
├── 02-architectural-drivers.md
├── 03-system-overview.md
├── 04-components/ (N component files)
├── 05-data.md
├── ...
├── 11-decisions/ (N decision records)
├── 12-open-questions.md
└── 13-appendices.md
The single file has been removed. All skills (design-architecture, source-architecture-from-code, etc.) already support directory mode.Auto-Split Thresholds
When invoked automatically (not by the user), the caller has already verified that at least one threshold is crossed:
- Line count:
wc -lon{{specs_dir}}/architecture.md>= 500 - Decision record count: Number of
### DR-\d+headings >= 10
No user confirmation is needed — the split happens silently and the caller reports what happened.
When invoked manually by the user, skip threshold checks and split unconditionally.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

