# mrtooher/fable-mode architecture

> Architecture diagram of the GitHub repository mrtooher/fable-mode, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mrtooher/fable-mode
- Repository: https://github.com/mrtooher/fable-mode

## Overview

1. This repository is a small collection of Claude “skills” written as Markdown prompt packages, not an application runtime. The architecture is documentation-driven: each skill directory is a deployable unit that Claude loads by name from its skills path.

2. The central subsystem is `fable-mode/`, which defines the default skill. Its job is procedural: force staged execution on complex tasks, require a written plan, require verifiable checks per stage, and add a skeptical self-review before final output.

3. `README.md` is the top-level architecture guide. It explains the shared operating loop, the intended use cases, and the boundaries of what the skill can and cannot do. It also defines the family relationship between the default skill and the variants.

4. `SKILL.md` at the repository root is the canonical implementation of the default `fable-mode` behavior. In architectural terms, this is the policy layer that shapes how the model works on a task, rather than a functional subsystem that produces domain-specific outputs.

5. `fable-sonnet/` and `fable-haiku/` are model-pinned variants of the same core workflow. They reuse the same stage planning, verification, and self-review discipline, but route work through a subagent pinned to a specific model tier.

6. The key boundary between variants is runtime capability. `fable-sonnet` and `fable-haiku` require a host runtime with an Agent tool, because they delegate the task to a spawned subagent. `fable-mode` stays inline on the current model and does not require that extra orchestration layer.

7. The primary data flow is procedural rather than data-centric: task request enters a skill, the skill emits a stage plan, stages are executed, each stage is checked against a failure-capable verification step, then the result is self-critiqued before delivery.

8. `EXAMPLE.md` serves as the behavioral test case and reference artifact. Its role is to show why the verification step matters: it demonstrates an error that would survive a one-shot attempt but gets caught by the staged process.

9. `writing-jokes/` appears to be a separate skill package in the same repository family. Since its contents are not described in the top-level README, it should be treated as an adjacent, standalone capability rather than part of the `fable-mode` core.

10. The main deployment boundary is the Claude skills directory. Installation is file-system based: each skill folder is placed where the Claude environment scans for skills, and the folder name must match the skill’s frontmatter `name` field.

11. From an architecture-diagram perspective, the important nodes are: the repository docs, the default skill package, the two model-specific variant packages, the example artifact, and the host Claude runtime that loads and optionally delegates to subagents.

Main entry points: [`SKILL.md`](https://github.com/mrtooher/fable-mode/blob/main/SKILL.md) (SKILL.md), [`README.md`](https://github.com/mrtooher/fable-mode/blob/main/README.md) (README.md), [`fable-sonnet/SKILL.md`](https://github.com/mrtooher/fable-mode/blob/main/fable-sonnet/SKILL.md) (fable-sonnet), [`fable-haiku/SKILL.md`](https://github.com/mrtooher/fable-mode/blob/main/fable-haiku/SKILL.md) (fable-haiku)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_docs["Docs"]
  node_readme["README.md<br/>guide<br/>[README.md]"]
  node_example["EXAMPLE.md<br/>[EXAMPLE.md]"]
end

subgraph group_default["Default skill"]
  node_root_skill["SKILL.md<br/>policy<br/>[SKILL.md]"]
  node_plan["Plan stages<br/>procedure"]
  node_verify["Verify stage<br/>check"]
  node_review["Self-review<br/>critique"]
end

subgraph group_variants["Variants"]
  node_sonnet_skill["fable-sonnet<br/>variant skill<br/>[SKILL.md]"]
  node_sonnet_agent["Sonnet subagent<br/>pinned subagent"]
  node_haiku_skill["fable-haiku<br/>variant skill<br/>[SKILL.md]"]
  node_haiku_agent["Haiku subagent<br/>pinned subagent"]
end

subgraph group_runtime["Host runtime"]
  node_loader["Skill loader<br/>runtime loader"]
  node_agent_tool["Agent tool<br/>runtime tool"]
end

subgraph group_adjacent["Adjacent skill"]
  node_writing_jokes["writing-jokes<br/>adjacent skill<br/>[SKILL.md]"]
end

node_readme -->|"describes"| node_root_skill
node_readme -->|"families"| node_sonnet_skill
node_readme -->|"families"| node_haiku_skill
node_readme -->|"adjacent"| node_writing_jokes
node_example -->|"demonstrates"| node_verify
node_root_skill -->|"requires"| node_plan
node_root_skill -->|"requires"| node_verify
node_root_skill -->|"requires"| node_review
node_plan -->|"feeds"| node_verify
node_verify -->|"precedes"| node_review
node_loader -->|"loads"| node_root_skill
node_loader -->|"loads"| node_sonnet_skill
node_loader -->|"loads"| node_haiku_skill
node_loader -->|"loads"| node_writing_jokes
node_sonnet_skill -->|"delegates"| node_sonnet_agent
node_haiku_skill -->|"delegates"| node_haiku_agent
node_sonnet_agent -->|"needs"| node_agent_tool
node_haiku_agent -->|"needs"| node_agent_tool

click node_readme "https://github.com/mrtooher/fable-mode/blob/main/README.md"
click node_example "https://github.com/mrtooher/fable-mode/blob/main/EXAMPLE.md"
click node_root_skill "https://github.com/mrtooher/fable-mode/blob/main/SKILL.md"
click node_sonnet_skill "https://github.com/mrtooher/fable-mode/blob/main/fable-sonnet/SKILL.md"
click node_haiku_skill "https://github.com/mrtooher/fable-mode/blob/main/fable-haiku/SKILL.md"
click node_writing_jokes "https://github.com/mrtooher/fable-mode/blob/main/writing-jokes/SKILL.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_readme,node_example toneBlue
class node_root_skill,node_plan,node_verify,node_review toneAmber
class node_sonnet_skill,node_sonnet_agent,node_haiku_skill,node_haiku_agent toneMint
class node_loader,node_agent_tool toneRose
class node_writing_jokes toneIndigo
```

## Components

### Docs

Top-level repository guide and behavior example

- [README.md](https://github.com/mrtooher/fable-mode/blob/main/README.md): guide · Architecture and usage guide for the skill family · `README.md`
- [EXAMPLE.md](https://github.com/mrtooher/fable-mode/blob/main/EXAMPLE.md): example · Behavioral reference showing why staged verification matters · `EXAMPLE.md`

### Default skill

Canonical inline fable-mode workflow

- [SKILL.md](https://github.com/mrtooher/fable-mode/blob/main/SKILL.md): policy · Canonical default fable-mode behavior implemented as a prompt package · `SKILL.md`
- **Plan stages**: procedure · Forces complex work into explicit staged execution
- **Verify stage**: check · Requires a failure-capable check after each stage
- **Self-review**: critique · Adds skeptical final review before output

### Variants

Model-pinned skill packages

- [fable-sonnet](https://github.com/mrtooher/fable-mode/blob/main/fable-sonnet/SKILL.md): variant skill · Sonnet-pinned variant that delegates work to a subagent · `fable-sonnet/SKILL.md`
- **Sonnet subagent**: pinned subagent · Worker agent pinned to the Sonnet tier
- [fable-haiku](https://github.com/mrtooher/fable-mode/blob/main/fable-haiku/SKILL.md): variant skill · Haiku-pinned variant that delegates work to a subagent · `fable-haiku/SKILL.md`
- **Haiku subagent**: pinned subagent · Worker agent pinned to the Haiku tier

### Host runtime

Claude environment that loads skills and can spawn subagents

- **Skill loader**: runtime loader · Claude scans the skills directory and loads packages by name
- **Agent tool**: runtime tool · Host capability required for spawning delegated subagents

### Adjacent skill

Separate capability in the same repository family

- [writing-jokes](https://github.com/mrtooher/fable-mode/blob/main/writing-jokes/SKILL.md): adjacent skill · Separate skill package in the same repository family · `writing-jokes/SKILL.md`

## Connections

- README.md → SKILL.md: describes · Explains the default workflow and its boundaries
- README.md → fable-sonnet: families · Documents the model-pinned variants
- README.md → fable-haiku: families · Documents the model-pinned variants
- README.md → writing-jokes: adjacent · Mentions another skill package in the repository
- EXAMPLE.md → Verify stage: demonstrates · Shows the value of staged verification
- SKILL.md → Plan stages: requires · Task execution starts with an explicit stage plan
- SKILL.md → Verify stage: requires · Every stage must be checked against failure
- SKILL.md → Self-review: requires · Final output must pass skeptical self-review
- Plan stages → Verify stage: feeds · Each planned stage is verified after execution
- Verify stage → Self-review: precedes · Successful checks lead into final critique
- Skill loader → SKILL.md: loads · Loads the canonical skill package inline
- Skill loader → fable-sonnet: loads · Loads the variant package by name
- Skill loader → fable-haiku: loads · Loads the variant package by name
- Skill loader → writing-jokes: loads · Loads the adjacent skill package by name
- fable-sonnet → Sonnet subagent: delegates · Routes work through a pinned subagent
- fable-haiku → Haiku subagent: delegates · Routes work through a pinned subagent
- Sonnet subagent → Agent tool: needs · Subagent spawning depends on the Agent tool
- Haiku subagent → Agent tool: needs · Subagent spawning depends on the Agent tool
