# ktncodes/icm-template architecture

> Architecture diagram of the GitHub repository ktncodes/icm-template, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ktncodes/icm-template
- Repository: https://github.com/ktncodes/icm-template

## Overview

ICM is a set of Claude Code skills for adding and maintaining a plain-text context structure in an existing workspace. The documented workflow is to scaffold the structure, route work through layered context, and keep that routing synchronized; a separate skill fills missing stage context. The README also describes a knowledge-compilation pattern and optional model adapters. No source excerpts were provided, so relationships below are limited to capabilities and flows explicitly documented in the README.

Main entry points: [`SKILLS/icm-scaffold/SKILL.md`](https://github.com/ktncodes/icm-template/blob/master/SKILLS/icm-scaffold/SKILL.md) (ICM scaffold), [`SKILLS/icm-sync/SKILL.md`](https://github.com/ktncodes/icm-template/blob/master/SKILLS/icm-sync/SKILL.md) (Routing sync), [`SKILLS/icm-context-scaffold/SKILL.md`](https://github.com/ktncodes/icm-template/blob/master/SKILLS/icm-context-scaffold/SKILL.md) (Context gap filler), [`IDENTITY.md`](https://github.com/ktncodes/icm-template/blob/master/IDENTITY.md) (Workspace map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Workspace setup"]
  node_scaffold["ICM scaffold<br/>[SKILL.md]"]
  node_context_scaffold["Context gap filler<br/>[SKILL.md]"]
end

subgraph group_routing["Context routing"]
  node_identity["Workspace map<br/>[IDENTITY.md]"]
  node_root_context["Task routing<br/>[CONTEXT.md]"]
  node_config["Reference rules"]
  node_sync["Routing sync<br/>[SKILL.md]"]
  node_stage_context["Stage instructions"]
end

subgraph group_compilation["Knowledge compilation"]
  node_raw_sources["Raw sources"]
  node_compile["Compile stage"]
  node_mapping["Section-source map"]
  node_compiled_articles["Compiled articles"]
  node_knowledge_index["Knowledge index"]
end

subgraph group_adapters["Model adapters"]
  node_adapter_guidance["Adapter guidance<br/>[model-adapters.md]"]
end

node_user(("Workspace maintainer"))
node_project["Existing project"]
node_model_tools(("AI tools"))

node_user -->|"runs skill"| node_scaffold
node_scaffold -->|"generates"| node_identity
node_scaffold -->|"generates"| node_root_context
node_scaffold -->|"generates"| node_config
node_user -->|"runs skill"| node_context_scaffold
node_context_scaffold -->|"fills gaps"| node_stage_context
node_user -->|"runs skill"| node_sync
node_sync -->|"syncs with disk"| node_identity
node_sync -->|"syncs with disk"| node_root_context
node_project -->|"receives ICM"| node_scaffold
node_raw_sources -->|"provides inputs"| node_compile
node_compile -->|"produces"| node_compiled_articles
node_compile -->|"uses mapping"| node_mapping
node_knowledge_index -->|"routes to"| node_compiled_articles
node_model_tools -.->|"uses setup guidance"| node_adapter_guidance

click node_scaffold "https://github.com/ktncodes/icm-template/blob/master/SKILLS/icm-scaffold/SKILL.md"
click node_identity "https://github.com/ktncodes/icm-template/blob/master/IDENTITY.md"
click node_root_context "https://github.com/ktncodes/icm-template/blob/master/CONTEXT.md"
click node_context_scaffold "https://github.com/ktncodes/icm-template/blob/master/SKILLS/icm-context-scaffold/SKILL.md"
click node_sync "https://github.com/ktncodes/icm-template/blob/master/SKILLS/icm-sync/SKILL.md"
click node_adapter_guidance "https://github.com/ktncodes/icm-template/blob/master/docs/model-adapters.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_scaffold,node_context_scaffold toneBlue
class node_identity,node_root_context,node_config,node_sync,node_stage_context toneAmber
class node_raw_sources,node_compile,node_mapping,node_compiled_articles,node_knowledge_index toneMint
class node_adapter_guidance toneRose
class node_user,node_project,node_model_tools toneIndigo
```

## Components

### Workspace setup

- [ICM scaffold](https://github.com/ktncodes/icm-template/blob/master/SKILLS/icm-scaffold/SKILL.md): `SKILLS/icm-scaffold/SKILL.md`
- [Context gap filler](https://github.com/ktncodes/icm-template/blob/master/SKILLS/icm-context-scaffold/SKILL.md): `SKILLS/icm-context-scaffold/SKILL.md`

### Context routing

- [Workspace map](https://github.com/ktncodes/icm-template/blob/master/IDENTITY.md): `IDENTITY.md`
- [Task routing](https://github.com/ktncodes/icm-template/blob/master/CONTEXT.md): `CONTEXT.md`
- **Reference rules**
- [Routing sync](https://github.com/ktncodes/icm-template/blob/master/SKILLS/icm-sync/SKILL.md): `SKILLS/icm-sync/SKILL.md`
- **Stage instructions**

### Knowledge compilation

- **Raw sources**
- **Compile stage**
- **Section-source map**
- **Compiled articles**
- **Knowledge index**

### Model adapters

- [Adapter guidance](https://github.com/ktncodes/icm-template/blob/master/docs/model-adapters.md): `docs/model-adapters.md`

### Other components

- **Workspace maintainer**
- **Existing project**
- **AI tools**

## Connections

- Workspace maintainer → ICM scaffold: runs skill (evidence: `README.md`)
- ICM scaffold → Workspace map: generates (evidence: `README.md`)
- ICM scaffold → Task routing: generates (evidence: `README.md`)
- ICM scaffold → Reference rules: generates (evidence: `README.md`)
- Workspace maintainer → Context gap filler: runs skill (evidence: `README.md`)
- Context gap filler → Stage instructions: fills gaps (evidence: `README.md`)
- Workspace maintainer → Routing sync: runs skill (evidence: `README.md`)
- Routing sync → Workspace map: syncs with disk (evidence: `README.md`)
- Routing sync → Task routing: syncs with disk (evidence: `README.md`)
- Existing project → ICM scaffold: receives ICM (evidence: `README.md`)
- Raw sources → Compile stage: provides inputs (evidence: `README.md`)
- Compile stage → Compiled articles: produces (evidence: `README.md`)
- Compile stage → Section-source map: uses mapping (evidence: `README.md`)
- Knowledge index → Compiled articles: routes to (evidence: `README.md`)
- AI tools → Adapter guidance: uses setup guidance (evidence: `README.md`)
