# avinthaf/ways architecture

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

- Interactive diagram: https://gitdiagram.com/avinthaf/ways
- Repository: https://github.com/avinthaf/ways

## Overview

ways is a Claude Code plugin that makes generated text easier to read by applying a user-selected mode, and offers commands for changing that mode, rewriting existing text, and presenting plans section by section. Its documented runtime centers on mode selection and prompt-time rule injection; on-demand rephrasing is a separate path. Relationships below are based on the README only; no source excerpts were provided.

Main entry points: [`hooks/scripts/inject-mode.sh`](https://github.com/avinthaf/ways/blob/main/hooks/scripts/inject-mode.sh) (Mode injection), [`skills/ways-rephrase/SKILL.md`](https://github.com/avinthaf/ways/blob/main/skills/ways-rephrase/SKILL.md) (On-demand rephrase), [`commands/ways-mode.md`](https://github.com/avinthaf/ways/blob/main/commands/ways-mode.md) (Mode selection), [`commands/ways-plan.md`](https://github.com/avinthaf/ways/blob/main/commands/ways-plan.md) (Sectioned planning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commands["User commands"]
  node_mode_command["Mode selection<br/>[ways-mode.md]"]
  node_plan_command["Sectioned planning<br/>[ways-plan.md]"]
  node_rephrase_command["On-demand rephrase<br/>[SKILL.md]"]
end

subgraph group_injection["Prompt-time steering"]
  node_saved_mode[("Saved mode config")]
  node_hooks["Session and prompt hooks<br/>[hooks.json]"]
  node_inject_script["Mode injection<br/>[inject-mode.sh]"]
end

subgraph group_rules["Rewrite rules"]
  node_shared_rules["Shared mode rules<br/>[_shared.md]"]
  node_adhd_rules["ADHD rules<br/>[adhd.md]"]
  node_dyslexia_rules["Dyslexia rules<br/>[dyslexia.md]"]
  node_simple_rules["Simplification rules<br/>[dumb-it-down.md]"]
end

node_user(("User"))
node_claude["Claude Code"]

node_user -->|"selects mode"| node_mode_command
node_mode_command -->|"saves selection"| node_saved_mode
node_user -->|"requests plan"| node_plan_command
node_user -->|"requests rewrite"| node_rephrase_command
node_hooks -->|"runs hook"| node_inject_script
node_inject_script -->|"reads mode"| node_saved_mode
node_inject_script -.->|"injects rules"| node_adhd_rules
node_inject_script -.->|"injects rules"| node_dyslexia_rules
node_inject_script -.->|"injects rules"| node_simple_rules
node_inject_script -->|"steers generation"| node_claude
node_rephrase_command -->|"requests rewrite"| node_claude
node_plan_command -->|"presents sections"| node_claude
node_rephrase_command -.->|"uses mode rules"| node_shared_rules

click node_mode_command "https://github.com/avinthaf/ways/blob/main/commands/ways-mode.md"
click node_plan_command "https://github.com/avinthaf/ways/blob/main/commands/ways-plan.md"
click node_rephrase_command "https://github.com/avinthaf/ways/blob/main/skills/ways-rephrase/SKILL.md"
click node_hooks "https://github.com/avinthaf/ways/blob/main/hooks/hooks.json"
click node_inject_script "https://github.com/avinthaf/ways/blob/main/hooks/scripts/inject-mode.sh"
click node_shared_rules "https://github.com/avinthaf/ways/blob/main/skills/ways-rephrase/modes/_shared.md"
click node_adhd_rules "https://github.com/avinthaf/ways/blob/main/skills/ways-rephrase/modes/adhd.md"
click node_dyslexia_rules "https://github.com/avinthaf/ways/blob/main/skills/ways-rephrase/modes/dyslexia.md"
click node_simple_rules "https://github.com/avinthaf/ways/blob/main/skills/ways-rephrase/modes/dumb-it-down.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_mode_command,node_plan_command,node_rephrase_command,node_user toneBlue
class node_saved_mode,node_hooks,node_inject_script toneAmber
class node_shared_rules,node_adhd_rules,node_dyslexia_rules,node_simple_rules toneMint
class node_claude toneIndigo
```

## Components

### User commands

- [Mode selection](https://github.com/avinthaf/ways/blob/main/commands/ways-mode.md): `commands/ways-mode.md`
- [Sectioned planning](https://github.com/avinthaf/ways/blob/main/commands/ways-plan.md): `commands/ways-plan.md`
- [On-demand rephrase](https://github.com/avinthaf/ways/blob/main/skills/ways-rephrase/SKILL.md): `skills/ways-rephrase/SKILL.md`

### Prompt-time steering

- **Saved mode config**
- [Session and prompt hooks](https://github.com/avinthaf/ways/blob/main/hooks/hooks.json): `hooks/hooks.json`
- [Mode injection](https://github.com/avinthaf/ways/blob/main/hooks/scripts/inject-mode.sh): `hooks/scripts/inject-mode.sh`

### Rewrite rules

- [Shared mode rules](https://github.com/avinthaf/ways/blob/main/skills/ways-rephrase/modes/_shared.md): `skills/ways-rephrase/modes/_shared.md`
- [ADHD rules](https://github.com/avinthaf/ways/blob/main/skills/ways-rephrase/modes/adhd.md): `skills/ways-rephrase/modes/adhd.md`
- [Dyslexia rules](https://github.com/avinthaf/ways/blob/main/skills/ways-rephrase/modes/dyslexia.md): `skills/ways-rephrase/modes/dyslexia.md`
- [Simplification rules](https://github.com/avinthaf/ways/blob/main/skills/ways-rephrase/modes/dumb-it-down.md): `skills/ways-rephrase/modes/dumb-it-down.md`

### Other components

- **User**
- **Claude Code**

## Connections

- User → Mode selection: selects mode (evidence: `README.md`)
- Mode selection → Saved mode config: saves selection (evidence: `README.md`)
- User → Sectioned planning: requests plan (evidence: `README.md`)
- User → On-demand rephrase: requests rewrite (evidence: `README.md`)
- Session and prompt hooks → Mode injection: runs hook (evidence: `README.md`)
- Mode injection → Saved mode config: reads mode (evidence: `README.md`)
- Mode injection → ADHD rules: injects rules
- Mode injection → Dyslexia rules: injects rules
- Mode injection → Simplification rules: injects rules
- Mode injection → Claude Code: steers generation (evidence: `README.md`)
- On-demand rephrase → Claude Code: requests rewrite (evidence: `README.md`)
- Sectioned planning → Claude Code: presents sections (evidence: `README.md`)
- On-demand rephrase → Shared mode rules: uses mode rules
