# gentleman-programming/gentle-shell architecture

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

- Interactive diagram: https://gitdiagram.com/gentleman-programming/gentle-shell
- Repository: https://github.com/gentleman-programming/gentle-shell

## Overview

gentle-shell is a Pi-native coding-agent workspace for controlled development. The documented user path runs from intent through ODD authorization, exploration, uncertainty resolution and task sizing, then implementation and verified evidence; substantial work can be tracked in a recoverable feature document. Focused agents support bounded exploration, writing and verification while the parent remains accountable. The graph also preserves native review, history, desktop/Tower, design and shell capabilities visible in the README and tree. Edges use README or package evidence; unsampled subsystem wiring is left unclaimed.

Main entry points: [`extensions/gentle-agents.ts`](https://github.com/gentleman-programming/gentle-shell/blob/main/extensions/gentle-agents.ts) (Implementation), [`extensions/gentle-guide.ts`](https://github.com/gentleman-programming/gentle-shell/blob/main/extensions/gentle-guide.ts) (ODD Workflow), [`lib/native-review-cli.ts`](https://github.com/gentleman-programming/gentle-shell/blob/main/lib/native-review-cli.ts) (Native Review), [`lib/desktop-rpc.ts`](https://github.com/gentleman-programming/gentle-shell/blob/main/lib/desktop-rpc.ts) (Desktop Feed and RPC)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["ODD Workflow"]
  node_odd["ODD Workflow<br/>[gentle-guide.ts]"]
  node_authorize["Authorize and Explore"]
  node_track["Feature Tracking"]
  node_implement["Implementation<br/>[gentle-agents.ts]"]
  node_tdd["TDD Evidence"]
end

subgraph group_agents["Agent Orchestration"]
  node_agents["Focused Agents<br/>[agents-runner.ts]"]
  node_agent_protocol["Agent Messaging<br/>[agents-protocol.ts]"]
  node_skills["Skill Discovery<br/>[skill-registry.ts]"]
end

subgraph group_review["Review and Evidence"]
  node_review["Native Review"]
  node_review_integration["Review Integration"]
  node_review_store[("Review Repository")]
end

subgraph group_workspace["Workspace Interfaces"]
  node_desktop["Desktop Feed and RPC<br/>[desktop-rpc.ts]"]
  node_herdr["Herdr Workspace UI<br/>[main.js]"]
  node_tower["Gentle Tower<br/>[main.ts]"]
  node_design["Design Tools<br/>[gentle-design.ts]"]
end

subgraph group_runtime["Pi Runtime"]
  node_extensions["Pi Extensions"]
  node_history["Prompt History<br/>[index.ts]"]
  node_shell["Shell Launcher"]
  node_gentle_ai["Gentle AI CLI"]
end

node_developer(("Developer"))
node_pi["Pi Host"]

node_developer -->|"gives intent"| node_pi
node_pi -->|"loads extensions"| node_extensions
node_developer -->|"authorizes work"| node_odd
node_odd -->|"clarifies scope"| node_authorize
node_authorize -->|"classifies work"| node_track
node_track -->|"guides tasks"| node_implement
node_odd -->|"small work inline"| node_implement
node_implement -->|"gathers proof"| node_tdd
node_implement -->|"delegates bounded work"| node_agents
node_agents -->|"returns results"| node_developer
node_developer -.->|"requests review"| node_review
node_review -->|"uses integration"| node_review_integration
node_review -.->|"uses repository"| node_review_store
node_pi -.->|"offers history"| node_history
node_desktop -.->|"supplies workspace state"| node_herdr
node_desktop -->|"serves live state"| node_tower
node_developer -.->|"uses design tools"| node_design
node_developer -.->|"launches workspace"| node_shell
node_shell -->|"starts CLI"| node_gentle_ai
node_extensions -.->|"provides discovery"| node_skills

click node_extensions "https://github.com/gentleman-programming/gentle-shell/tree/main/extensions"
click node_odd "https://github.com/gentleman-programming/gentle-shell/blob/main/extensions/gentle-guide.ts"
click node_authorize "https://github.com/gentleman-programming/gentle-shell/blob/main/lib/orchestrator-work.ts"
click node_track "https://github.com/gentleman-programming/gentle-shell/blob/main/lib/orchestrator-state.ts"
click node_implement "https://github.com/gentleman-programming/gentle-shell/blob/main/extensions/gentle-agents.ts"
click node_tdd "https://github.com/gentleman-programming/gentle-shell/blob/main/lib/delivered-test-lint.ts"
click node_agents "https://github.com/gentleman-programming/gentle-shell/blob/main/lib/agents-runner.ts"
click node_agent_protocol "https://github.com/gentleman-programming/gentle-shell/blob/main/lib/agents-protocol.ts"
click node_skills "https://github.com/gentleman-programming/gentle-shell/blob/main/extensions/skill-registry.ts"
click node_review "https://github.com/gentleman-programming/gentle-shell/blob/main/lib/native-review-cli.ts"
click node_review_integration "https://github.com/gentleman-programming/gentle-shell/blob/main/lib/review-integration-v2.ts"
click node_review_store "https://github.com/gentleman-programming/gentle-shell/blob/main/lib/review-repository.ts"
click node_history "https://github.com/gentleman-programming/gentle-shell/blob/main/extensions/history/index.ts"
click node_desktop "https://github.com/gentleman-programming/gentle-shell/blob/main/lib/desktop-rpc.ts"
click node_herdr "https://github.com/gentleman-programming/gentle-shell/blob/main/herdr/mods/gentle-chat/main.js"
click node_tower "https://github.com/gentleman-programming/gentle-shell/blob/main/web/tower/src/main.ts"
click node_design "https://github.com/gentleman-programming/gentle-shell/blob/main/lib/gentle-design.ts"
click node_shell "https://github.com/gentleman-programming/gentle-shell/blob/main/runtime/gentle-shell-launcher.mjs"
click node_gentle_ai "https://github.com/gentleman-programming/gentle-shell/blob/main/runtime/gentle-ai-binary.mjs"

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_odd,node_authorize,node_track,node_implement,node_tdd toneBlue
class node_agents,node_agent_protocol,node_skills toneAmber
class node_review,node_review_integration,node_review_store toneMint
class node_desktop,node_herdr,node_tower,node_design toneRose
class node_extensions,node_history,node_shell,node_gentle_ai,node_developer,node_pi toneIndigo
```

## Components

### ODD Workflow

- [ODD Workflow](https://github.com/gentleman-programming/gentle-shell/blob/main/extensions/gentle-guide.ts): `extensions/gentle-guide.ts`
- [Authorize and Explore](https://github.com/gentleman-programming/gentle-shell/blob/main/lib/orchestrator-work.ts): `lib/orchestrator-work.ts`
- [Feature Tracking](https://github.com/gentleman-programming/gentle-shell/blob/main/lib/orchestrator-state.ts): `lib/orchestrator-state.ts`
- [Implementation](https://github.com/gentleman-programming/gentle-shell/blob/main/extensions/gentle-agents.ts): `extensions/gentle-agents.ts`
- [TDD Evidence](https://github.com/gentleman-programming/gentle-shell/blob/main/lib/delivered-test-lint.ts): `lib/delivered-test-lint.ts`

### Agent Orchestration

- [Focused Agents](https://github.com/gentleman-programming/gentle-shell/blob/main/lib/agents-runner.ts): `lib/agents-runner.ts`
- [Agent Messaging](https://github.com/gentleman-programming/gentle-shell/blob/main/lib/agents-protocol.ts): `lib/agents-protocol.ts`
- [Skill Discovery](https://github.com/gentleman-programming/gentle-shell/blob/main/extensions/skill-registry.ts): `extensions/skill-registry.ts`

### Review and Evidence

- [Native Review](https://github.com/gentleman-programming/gentle-shell/blob/main/lib/native-review-cli.ts): `lib/native-review-cli.ts`
- [Review Integration](https://github.com/gentleman-programming/gentle-shell/blob/main/lib/review-integration-v2.ts): `lib/review-integration-v2.ts`
- [Review Repository](https://github.com/gentleman-programming/gentle-shell/blob/main/lib/review-repository.ts): `lib/review-repository.ts`

### Workspace Interfaces

- [Desktop Feed and RPC](https://github.com/gentleman-programming/gentle-shell/blob/main/lib/desktop-rpc.ts): `lib/desktop-rpc.ts`
- [Herdr Workspace UI](https://github.com/gentleman-programming/gentle-shell/blob/main/herdr/mods/gentle-chat/main.js): `herdr/mods/gentle-chat/main.js`
- [Gentle Tower](https://github.com/gentleman-programming/gentle-shell/blob/main/web/tower/src/main.ts): `web/tower/src/main.ts`
- [Design Tools](https://github.com/gentleman-programming/gentle-shell/blob/main/lib/gentle-design.ts): `lib/gentle-design.ts`

### Pi Runtime

- [Pi Extensions](https://github.com/gentleman-programming/gentle-shell/tree/main/extensions): `extensions`
- [Prompt History](https://github.com/gentleman-programming/gentle-shell/blob/main/extensions/history/index.ts): `extensions/history/index.ts`
- [Shell Launcher](https://github.com/gentleman-programming/gentle-shell/blob/main/runtime/gentle-shell-launcher.mjs): `runtime/gentle-shell-launcher.mjs`
- [Gentle AI CLI](https://github.com/gentleman-programming/gentle-shell/blob/main/runtime/gentle-ai-binary.mjs): `runtime/gentle-ai-binary.mjs`

### Other components

- **Developer**
- **Pi Host**

## Connections

- Developer → Pi Host: gives intent (evidence: `README.md`)
- Pi Host → Pi Extensions: loads extensions
- Developer → ODD Workflow: authorizes work (evidence: `README.md`)
- ODD Workflow → Authorize and Explore: clarifies scope (evidence: `README.md`)
- Authorize and Explore → Feature Tracking: classifies work (evidence: `README.md`)
- Feature Tracking → Implementation: guides tasks (evidence: `README.md`)
- ODD Workflow → Implementation: small work inline (evidence: `README.md`)
- Implementation → TDD Evidence: gathers proof (evidence: `README.md`)
- Implementation → Focused Agents: delegates bounded work (evidence: `README.md`)
- Focused Agents → Developer: returns results (evidence: `README.md`)
- Developer → Native Review: requests review
- Native Review → Review Integration: uses integration
- Native Review → Review Repository: uses repository
- Pi Host → Prompt History: offers history
- Desktop Feed and RPC → Herdr Workspace UI: supplies workspace state
- Desktop Feed and RPC → Gentle Tower: serves live state (evidence: `web/tower/src/main.ts`)
- Developer → Design Tools: uses design tools
- Developer → Shell Launcher: launches workspace
- Shell Launcher → Gentle AI CLI: starts CLI (evidence: `runtime/gentle-ai-binary.mjs`)
- Pi Extensions → Skill Discovery: provides discovery
