
Gentle AI Documentation
Gentle AI equips the AI coding agents already on your machine with persistent memory, specification-driven development, curated skills, MCP servers, model routing, a teaching-oriented persona, and native bounded review.
Gentle AI does not install AI coding agents. It adapts the runtimes already on your machine. If you select an agent that is not installed, Gentle AI refuses and shows the exact command you need to run yourself.
What is Gentle AI
It is an ecosystem configurator. It takes your AI coding agent and adds the pieces it needs to become more than a chatbot that writes code.
Before
“I installed Claude Code / OpenCode / Cursor, but it is only a chatbot that writes code.”
After
Your agent now has memory, skills, workflow, MCP tools, and a persona that also teaches you.
The golden rule
Gentle AI configures your agent with memory, skills, workflows, and a persona — then gets out of the way. Its own documentation says: the less you think about Gentle AI after installation, the better it is working.
| Do this | Do not do this |
|---|---|
| Run the installer and choose agents and a preset | Manually edit generated configuration files |
| Start programming with your agent | Memorize SDD phases or commands |
| Let the agent propose SDD when the task warrants it | Force SDD for every small task |
| Trust Engram to store context when it is installed and active | Inspect Engram storage unless you need engram sync or engram tui |
Let startup hooks or sdd-init refresh the skill registry | Rescan skills manually unless you need --force |
| Say “use sdd” when you already know you want structured planning | Worry about which SDD phase comes next |
| Run the installer again to update or change your setup | Manually patch skill files or persona instructions |
Installation
Prerequisites
- Git 2.38+ on every platform.
- Go 1.25.10+ to build from source (required on Windows because installation there uses
go install). - Node.js 18+ and npm:
gentle-ai installverifies them as requirements on every platform and provides a distribution-specific installation suggestion if either is missing. It does not install them for you. - macOS: Homebrew on the
PATH. If the tap requests trust, runbrew trust --formula gentleman-programming/tap/gentle-aionce. - Ubuntu/Debian, Arch, Fedora/RHEL: the corresponding package manager (
apt-get,pacman,dnf) andsudoaccess. - Pi: if you select the Pi agent,
pimust be installed and available on thePATH.
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/Gentleman-Programming/gentle-ai/main/scripts/install.sh | bash
Homebrew
brew tap Gentleman-Programming/homebrew-tap brew trust --formula gentleman-programming/tap/gentle-ai brew install gentle-ai
Go install (any platform with Go 1.25.10+)
go install github.com/gentleman-programming/gentle-ai/v2/cmd/gentle-ai@latest
Notice the /v2 suffix in the module path: Go requires it for major version 2 and later. Releases before v2.0.0 use the path without the suffix.
Building from source and CI/runtime tests remain supported, but official Windows binary distribution and Scoop are temporarily unavailable. Windows installation and updates require Go 1.25.10+ and fail closed to the build-from-source guidance: they never download an unsigned Gentle AI executable or run a remote update script.
The candidate publishes a windows_amd64.exe release asset. arm64 is still absent, and the stable v2.4.0 release publishes no Windows asset at all — verified against the release assets on 2026-08-26.
After replacing or updating the gentle-ai binary, run gentle-ai sync to refresh its managed assets. Review and runtime assets are tied to the binary version: until sync succeeds, review-cycle operations fail closed when managed-writer provenance is missing or does not match.
Installation scope
By default, gentle-ai install writes per-agent files to the global configuration directory of each selected agent. To keep the stack isolated to one project:
gentle-ai install --scope=workspace
The workspace scope applies to per-agent files: system prompts, skills, SDD agents, and persona files are written to the current project root when the agent supports local configuration. Integrations that exist only globally — such as package installation or settings that an agent reads only from its global configuration — remain global by design. You can also set GENTLE_AI_INSTALL_SCOPE for CI or non-interactive use.
Project context
After configuring your agents, open an agent in a project. These two commands register project context. Neither is required for basic use.
| Command | What it does | When to run it again |
|---|---|---|
/sdd-init | Detects the stack and testing capabilities; enables Strict TDD when available | When the project adds or removes test frameworks, or the first time in a new project |
gentle-ai skill-registry refresh | Scans installed skills and project conventions, then builds the registry | After installing or removing skills, or the first time in a new project |
The SDD orchestrator runs /sdd-init automatically when it does not detect context. Startup hooks usually keep the skill registry current for agents that support hooks — Codex, Claude Code, OpenCode, and Pi through gentle-pi. Starting Pi with pi -ns skips skill loading and startup hooks, so refresh the registry manually in that case.
At any time, you can run gentle-ai doctor, a read-only ecosystem health check.
Components, skills, and presets
Components
| Component | ID | Description |
|---|---|---|
| Engram | engram | Persistent memory between sessions through MCP: project-name detection, full-text search, Git synchronization, and project consolidation |
| SDD | sdd | Specification-driven development workflow (10 phases, including sdd-onboard). The agent handles it organically when appropriate or when you request it |
| Skills | skills | Curated skills library |
| Context7 | context7 | MCP server with live framework and library documentation |
| Persona | persona | Managed Gentleman/neutral persona injection, or unmanaged custom-persona mode |
| Permissions | permissions | Defaults and safety barriers. Applied to Claude Code and OpenCode, the two adapters that support permission overlays |
| GGA | gga | Gentleman Guardian Angel: AI provider switcher |
| Theme | theme | Gentleman Kanagawa theme overlay. v2.5.0-rc.1 installs selectable Gentleman and Gentleman-Cute themes for Claude Code and OpenCode, across four managed assets, preserving the active theme, unrelated settings, and third-party themes |
Default-denied sensitive-path list
The permissions component applies this deny list:
~/.ssh/* ~/.ssh/**/* **/*.pem **/*.key **/.env* ~/.credentials/* ~/.aws/credentials ~/.config/gh/hosts.yml ~/Library/Keychains/* **/secrets/* **/*.p12 **/*.pfx
gentle-ai install --component gga installs the gga binary globally on your machine. It does not run project-level hook configuration (gga init / gga install), because that must be an explicit decision for each repository.
Presets
| Preset | ID | What it includes |
|---|---|---|
| Dev Stack + Polish | full-gentleman | All components (Engram + SDD + Skills + Context7 + GGA + Permissions + Theme) and every skill |
| Dev Stack | ecosystem-only | Core components (Engram + SDD + Skills + Context7 + GGA) and every skill |
| Memory Only | minimal | Engram and the SDD skills only |
| Custom | custom | You choose components and skills manually; any existing persona or setting remains unmanaged |
The persona is selected separately on its own screen and is applied independently of the preset.
Engram — persistent memory
Engram is your agent's persistent memory. It stores decisions, discoveries, bug fixes, and context between sessions automatically. The agent manages it through MCP tools.
The agent manages memory on its own. The commands exist for the occasions when you want to inspect, share, or repair your memories manually.
Everyday commands
# Browse memories visually: search, filter, and open each observation engram tui # Search from the terminal without opening the TUI engram search "auth refactor" # Export project memories to .engram/ so they can be committed to Git engram sync
engram tui is the fastest way to see what your agent has been saving. Start there.
Project management
Since v1.11.0, Engram groups memories by project name, automatically detected from your Git remote. Sometimes one project ends up with duplicate names ("my-app" vs "My-App" vs "my-app-frontend"). These commands resolve that:
engram projects list # List all projects with their observation count engram projects consolidate # Interactively merge duplicate names
The MCP equivalent is mem_merge_projects, which the agent can call directly when it detects naming drift.
How project detection works
Since v1.11.0, Engram reads the Git remote URL at startup, normalizes it to lowercase, and uses it as the project name. If it finds similar existing names, it notifies you. This prevents the most common problem: the same project accumulating memories under slightly different names. Outside a Git repository, Engram uses the directory name.
Sharing with the team
By default, memories remain local. To share them through Git:
# After a work session: export to .engram/ in your repository engram sync # On another machine: import memories after cloning engram sync --import
Add .engram/ to the repository and commit it. When someone clones the repository and runs engram sync --import, they receive the complete project context. This is especially useful for onboarding: new teammates start with the accumulated knowledge.
Core MCP tools
| Tool | What it does |
|---|---|
mem_save | Saves a decision, bug fix, discovery, or convention. From Engram v1.15.3+, it captures the user prompt on a best-effort basis when prompt context already exists for the same project and session |
mem_search | Searches memory by words and returns matching observations |
mem_context | Retrieves the recent session history (called at session start) |
mem_session_summary | Saves an end-of-session summary so the next session has context |
mem_get_observation | Retrieves the full, untruncated content of an observation by ID |
mem_save_prompt | Saves the user prompt and feeds session activity so a later mem_save can capture and deduplicate it |
Advanced tools — mem_update, mem_suggest_topic_key, mem_session_start/mem_session_end, mem_stats, mem_delete, mem_timeline, mem_capture_passive, and mem_merge_projects — are rarely needed, but available.
capture_promptmem_save accepts the optional capture_prompt parameter. Leave it undefined for ordinary human or proactive saves. Use capture_prompt: false only for automated artifacts: SDD proposal, spec, design, task, apply, verify, archive, and init reports; testing-capability caches; onboarding or state artifacts; or skill-registry output. If the MCP server has no prompt context, mem_save still succeeds and does not invent text.
SDD — specification-driven development
SDD is a structured planning workflow for substantial features. It has phases, but you do not need to learn any of them.
Small request
The agent does it. No ceremony.
Substantial feature
The agent suggests SDD to plan it properly: explore the code, propose an approach, design the architecture, and then implement it step by step.
You explicitly want SDD
Say "use sdd" and the agent starts the workflow.
The ten phases
| Phase | What it does |
|---|---|
sdd-init | Initializes SDD context in a project |
sdd-explore | Investigates the code before committing to a change |
sdd-propose | Creates the change proposal with intent, scope, and approach |
sdd-spec | Writes specifications with requirements and scenarios |
sdd-design | Creates the technical design with architectural decisions |
sdd-tasks | Breaks the change into ordered implementation tasks |
sdd-apply | Implements tasks according to the specs and design |
sdd-verify | Validates that the implementation matches the specs |
sdd-archive | Synchronizes delta specs with the main specs and archives them |
sdd-onboard | Runs an end-to-end guided tour of the real codebase |
This is joined by Judgment Day (judgment-day): a parallel adversarial review in which two independent judges review the same objective.
Where artifacts live
SDD artifacts can be persisted in three modes:
- Engram — memory between sessions.
- OpenSpec — versioned files in the repository.
- Hybrid — both.
Sub-agents: smarter than they seem
When the orchestrator delegates work to a sub-agent, that sub-agent is not a simple script executor. It is a complete agent with its own session, tools, and context.
- The orchestrator keeps them focused. It resolves the skill registry once, passes relevant
SKILL.mdpaths in each sub-agent prompt, and gives it a concrete role. Sub-agents read the exact skill files instead of receiving generated summaries. - They adapt to your project. An
sdd-applysub-agent working with React receives React patterns. The same sub-agent working with Go receives Go testing conventions. Rules depend on the registry and task context, not a hard-coded list. - They persist phase artifacts when the backend supports it. In Engram-backed SDD workflows, phase agents save artifacts before returning. The next phase can continue from the saved proposal, spec, design, tasks, or apply progress — even across sessions.
SDD Research — the evidence lane
This lane does not exist on v2.4.0, the current stable line. The ten phases above are unchanged: research is offered alongside them, never inserted into them.
SDD had local exploration but no first-class lane for auditable external evidence. Research is offered immediately after sdd-explore, and it is optional — but selecting it makes its admission and persistence checks mandatory.
flowchart TD
A["sdd-explore"] --> B{"Select the research lane?"}
B -->|"no"| G["Propose"]
B -->|"yes"| C["Declare capability
documentation / open-web"]
C --> D["Collect sources
claims - contradictions - uncertainty"]
D --> E["Persist the artifact
OpenSpec - Engram - both"]
E --> F{"Evidence done - store ready
decisions confirmed?"}
F -->|"no"| H["Blocked
no validated claim"]
H --> D
F -->|"yes"| G
G --> I["Spec - Design - Tasks"]
style G fill:#2B3328,stroke:#98BB6C,color:#DCD7BA
style H fill:#43242B,stroke:#D27E99,color:#DCD7BA
How it is declared
On installs that expose the slash command, /sdd-research <questions> runs the lane after Session Preflight and sdd-init have established the active change, the requested source classes, the artifact store, and the runtime capability declaration.
Research accepts only the versioned gentle-ai.sdd-research-capability/v1 declaration, with an exact grant for documentation or open-web. Nothing else opens the lane.
What it persists
It writes a gentle-ai.sdd-research/v1 artifact recording questions, grants, sources, claim-to-source mappings, contradictions, uncertainty, freshness, and separate non-authoritative product choices.
| Store | Location | Validation |
|---|---|---|
| OpenSpec | openspec/changes/{change-name}/research.md | Validates the selected backend |
| Engram | sdd/{change-name}/research | Validates the selected backend |
| Hybrid | Both | Requires the same revision and the same bytes in both |
A one-sided hybrid failure recovers only from retained pre-write intent and canonical content. Otherwise the research and the proposal stay blocked — the system never prefers one copy over the other. No-store research cannot make a proposal ready.
The proposal gate
Once research is selected, propose requires done evidence, valid references, a ready backend, and confirmed product decisions. This is the part worth internalizing: choosing the lane is optional, finishing it is not.
Bash, generic MCP, persistence access, undeclared tools, unknown source classes, invalid sources, partial evidence, and failed admission. None of them create a validated claim, and none of them admit a proposal.
OpenSpec — openspec/config.yaml
openspec/config.yaml is a documented project-level convention for SDD when you work in openspec or hybrid persistence mode.
Support today is primarily prompt-driven. SDD skills and orchestrator prompts tell agents to read or write this file, and sdd-init shows the forms agents are expected to create.
What is NOT true today: there is no Go-side parser or validator enforcing a canonical schema, and no strong compatibility contract guarantees that every documented field is consumed consistently in every phase. The exact shape is best understood as the repository's current convention, not a fixed public specification.
What you can customize
- Project context reused between phases.
- Strict TDD activation.
- Phase-specific rules for proposal, specs, design, tasks, apply, verify, and archive.
- Testing-command and coverage overrides used by apply/verify prompts.
- A cache of detected testing capabilities for apply/verify workflows.
Which phases reference it
| Phase | How it uses the configuration |
|---|---|
sdd-init | In OpenSpec mode, prompt instructions direct the agent to create the file and write the detected context, rules, and testing sections |
sdd-explore | Reads it as part of context discovery |
sdd-propose | Applies rules.proposal when present |
sdd-design | Applies rules.design when present |
sdd-spec | Applies rules.specs when present |
sdd-tasks | Applies rules.tasks when present |
sdd-apply | Reads strict_tdd, testing, and rules.apply when present |
sdd-verify | Reads strict_tdd, testing, and rules.verify when present |
sdd-archive | Applies rules.archive when present |
Example structure
Combining the shared convention document, the sdd-init guide, and apply/verify references, the practical top-level structure looks like this:
schema: spec-driven
context: |
Tech stack: ...
Architecture: ...
Testing: ...
Style: ...
strict_tdd: true
rules:
proposal:
- Include rollback plan for risky changes
specs:
- Use Given/When/Then for scenarios
design:
- Document architecture decisions with rationale
tasks:
- Keep tasks completable in one session
apply:
- Follow existing code patterns
verify:
test_command: ""
build_command: ""
coverage_threshold: 0
archive:
- Warn before merging destructive deltas
testing:
strict_tdd: true
detected: "YYYY-MM-DD"
runner:
command: "go test ./..."
framework: "Go standard testing"Treat this as a practical synthesis of fields that the prompt layer can read or emit today, not as a strict schema definition.
Known inconsistencies
The file shape is not yet uniform. Current examples show:
sdd-initpresentsrules.applyandrules.verifyas flat instruction lists.- The shared convention document presents
rules.applywithtddandtest_command, andrules.verifywith structured override keys. sdd-apply/strict-tdd.mdrefers torules.apply.test_command.sdd-verifyrefers torules.verify.test_command,rules.verify.build_command, andrules.verify.coverage_threshold.
In other words, rules.apply and rules.verify are currently treated as if they can contain structured keys, while other examples show the same phase rules as flat lists.
Strict TDD
Strict TDD mode is enabled when the project has detectable testing support.
/sdd-initdetects the project's testing capabilities and enables Strict TDD when they are available.- When Strict TDD is active,
sdd-applyworks test-first. sdd-verifyaudits RED/GREEN evidence and runs verification.- The
strict_tddflag inopenspec/config.yamlenables or disables it;sdd-init, orchestrator prompts,sdd-apply, andsdd-verifyreference it. - The
testingsection caches detected capabilities so apply/verify workflows do not need to rediscover them every time. - It can also be enabled when synchronizing with
gentle-ai sync --strict-tdd.
In Pi, support assets live in .pi/gentle-ai/support/strict-tdd.md and .pi/gentle-ai/support/strict-tdd-verify.md.
Skills and the skill registry
Two skill layers
Gentle AI installs SDD skills and base skills (workflow and testing patterns) directly in your agent's skills directory. They are embedded in the binary and always current. There are 22 skill files.
For code skills — React 19, Angular, TypeScript, Tailwind 4, Zod 4, Playwright, and more — the community maintains a separate repository: Gentleman-Programming/Gentleman-Skills. Install them manually:
git clone https://github.com/Gentleman-Programming/Gentleman-Skills.git cp -r Gentleman-Skills/curated/react-19 ~/.claude/skills/ cp -r Gentleman-Skills/curated/typescript ~/.claude/skills/ # ... or copy the entire curated/ directory
Once installed, the agent detects what you are working on and loads relevant skills automatically. You do not need to activate or invoke them.
Included base skills
| Skill | ID | Description |
|---|---|---|
| Go Testing | go-testing | Go testing patterns, including Bubbletea TUI testing |
| Skill Creator | skill-creator | Creates new skills following the Agent Skills specification |
| Skill Improver | skill-improver | Audits and improves existing skills against the repository style guide |
| Branch & PR | branch-pr | Pull-request workflow with conventional commits, branch names, and the issue-first rule |
| Issue Creation | issue-creation | Workflow for creating issues with bug and feature-request templates |
| Skill Registry | skill-registry | Builds an index of installed skills with triggers, scopes, and exact SKILL.md paths |
| Chained PR | chained-pr | Plans and creates reviewable chained pull requests |
| Cognitive Doc Design | cognitive-doc-design | Writes documentation that reduces review and onboarding cognitive load |
| Comment Writer | comment-writer | Writes warm, direct collaboration comments and review replies |
| Work Unit Commits | work-unit-commits | Splits implementation into reviewable work units |
| RDD Defect Workflow | rdd-defect-workflow | Guides work on RDD defects with truthful evidence and bounded authority |
The skill registry
The registry is a local project index that lets every supported agent find the same skills without rewriting them. It stores names, full descriptions, scopes, and exact SKILL.md paths.
gentle-ai skill-registry refresh # Only if you explicitly need to rescan everything: gentle-ai skill-registry refresh --force gentle-ai skill-registry refresh --cwd /path/to/project --quiet
Refresh flow
gentle-ai skill-registry refresh │ ├─ Scan project skill roots first │ skills/, .opencode/skills/, .claude/skills/, .github/skills/, ... │ ├─ Then scan global agent roots │ ~/.config/opencode/skills/, ~/.claude/skills/, ... │ ├─ Deduplicate by skill name │ the project skill takes precedence over the global skill │ ├─ Parse frontmatter │ name + full description + path + scope │ └─ Write .atl/skill-registry.md + cache
Runtime flow
User task │ ▼ The orchestrator reads .atl/skill-registry.md │ ▼ Compares the task and file context against full descriptions │ ▼ Passes exact SKILL.md paths to the sub-agent │ ▼ The sub-agent reads complete skills before working │ ▼ The sub-agent executes with the skill's original intent intact
Registry contract
| Field | Meaning |
|---|---|
Skill | The frontmatter name, or the directory name as a fallback |
Trigger / description | The complete description, including folded multiline YAML descriptions |
Scope | project or user |
Path | The exact SKILL.md file to load |
Compact summaries were cheaper per delegation, but could distort skills. The index-first design spends tokens only when a sub-agent actually needs a skill and preserves the complete runtime contract.
Excluded skills
The registry never indexes _shared, skill-registry, or any sdd-* skill. The first two are internal plumbing; sdd-* skills are managed by the SDD workflow, not the delegator. The exclusion is intentional and silent, so a user skill whose name collides with these prefixes is discarded without warning.
Inspect without writing
gentle-ai skill-registry list # name<TAB>scope<TAB>path gentle-ai skill-registry list --json # machine-readable, including descriptions
The cache uses a fingerprint that includes the schema version plus the path, mtime, and size of every discovered SKILL.md, so a normal startup is a cheap cache hit when skills have not changed.
Personas
| Persona | ID | Description |
|---|---|---|
| Gentleman | gentleman | A teaching-oriented mentor persona: it challenges poor practices and explains why |
| Neutral | neutral | The same teacher and philosophy, without regional language: warm and professional |
| Custom | custom | Keeps your existing persona or configuration unmanaged: Gentle AI does not inject a persona |
custom is a compatibility and ownership choice, not a persona editor. Use it when you already have persona instructions and want Gentle AI to leave them untouched.
Organic implementation routing
Ask for the outcome. Gentle AI keeps already-understood work inline, delegates only actions that benefit from fresh context, and offers SDD only when durable planning materially reduces uncertainty.
File counts, changed lines, size, or perceived risk never select SDD by themselves. Only an explicit request or an accepted proposal does.
The three routes
| Route | When it is used | What happens |
|---|---|---|
| Direct inline | Deciding or verifying requires 1 to 3 files; or the change is one already-understood mechanical file, with no research or outstanding design decisions | The bounded action stays inline |
| Direct delegation | Understanding requires 4 or more files; reading prepares a write; broad research is needed; or 2 or more non-trivial files must be written | Delegate bounded exploration and/or one writer for that action |
| Optional SDD | The work has substantial ambiguity, or durable proposal, specification, design, or task artifacts would materially reduce uncertainty | SDD is proposed. It is selected only after an explicit request or an accepted proposal |
File counts describe the context needed for the current action, not a risk score or an SDD threshold. Risk may strengthen native verification or review, but never forces SDD.
Delegation also applies per action: tests, builds, installations, and native review actors may use fresh workers without changing the implementation route or creating an SDD run. Direct and delegated work do not create SDD artifacts, phase attempts, or synthetic SDD cycles.
If apparently simple work reveals substantial ambiguity, Gentle AI can offer SDD at the next safe boundary. Declining it leads to safely reduced scope, a justified direct or delegated route, or Needs your decision — never silent SDD enrollment.
Delegation stop rules
The orchestrator must stop acting as a monolithic executor when complexity appears:
| Rule | Trigger |
|---|---|
| Four-file rule | Reading 4 or more files to understand a flow requires delegating exploration or running an exploration phase |
| Multi-file writing rule | Touching 2 or more non-trivial files requires one writer, or fresh review before completion |
| PR rule | Review can provide fresh evidence for a commit, push, or PR, but never authorizes delivery |
| Incident rule | After an incorrect cwd, a worktree/Git accident, merge recovery, a confusing test command, or an environment workaround: run a fresh audit before continuing |
| Long-session rule | After about 20 tool calls, 5 exploratory reads, or 2 non-mechanical edits with increasing complexity: pause and delegate, replan, or explain why not |
| Fresh-review rule | Use fresh context for adversarial review of diffs, conflicts, PR preparation, and incidents when the agent platform supports it |
Public states
Normal interaction reports only four states. The user does not choose internal review states, hashes, receipts, or lifecycle transitions.
The SDD status projection is now the clean gentle-ai.sdd-status/v2 contract. Runtime state keeps planning, task, verification, selected-untracked, and attempt truth, and no longer projects active review bindings or receipts. Historical runtime records containing binding, receipt, or binding/set refuse rather than being replayed.
| State | Meaning |
|---|---|
| Working working | Implementation can still change |
| Checking checking | Gentle AI is running the applicable functional test and bounded review |
| Ready ready | The exact candidate has sufficient evidence for the selected delivery route |
| Needs your decision needs your decision | Safe automatic convergence is impossible; Gentle AI presents the cause, impact, and concrete options |
A question is necessary only when the answer changes requested scope, destructive or irreversible impact, permission or security exposure, verification cost or external side effects, accepted residual risk, or delivery.
RDD — Receipt-Driven Development
RDD reviews a completed candidate without taking ownership of delivery. It is deliberately small: native code freezes a worktree candidate, coordinates bounded review, burns completed authority, and returns control to the human.
The model in three sentences
Review follows the work
The candidate exists before review begins. The parent asks native STATUS to preflight only the current worktree.
Native code owns the mechanics
Go derives risk, frozen trees, lenses, provider bindings, admission, refutation, one bounded correction, repository evidence, and targeted validation.
The human owns delivery
Approval never commits, pushes, opens a PR, or overrides repository policy.
RDD is opt-in. Until someone runs gentle-ai review mode enable --scope global, it does not govern the candidate. Nothing blocks or conditions delivery: ordinary repository policy applies. Enabling RDD revalidates the current candidate instead of resuming old obligations.
Turning RDD on and off
gentle-ai review mode status --cwd <repo> gentle-ai review mode enable --scope global --cwd <repo> gentle-ai review mode disable --cwd <repo> gentle-ai review mode disable --scope clone --cwd <repo> gentle-ai review mode enable --scope clone --cwd <repo>
| Command | Effect |
|---|---|
review mode status | Reports the global source, local clone source, deciding source, and effective mode — without mutating anything |
review mode enable --scope global | Enables RDD globally for future candidates. It is the only command that turns it on |
review mode disable | Disables RDD globally |
review mode disable --scope clone | Disables it only for this clone; no other clone inherits the override |
review mode enable --scope clone | Clears this clone's disabled override. It does not turn RDD on by itself |
Any disabled source wins. A clone can opt out, but it cannot require review from the user, so global scope is the only way to opt in. With no source expressing an opinion, the effective mode is off, reported as decided by default.
Interactive starts ask before review work, once per clone. Accepting records that choice; "not now" applies only to that candidate and does not change review mode. Non-interactive tier-1/tier-2 starts proceed without asking and report how to disable review mode.
While RDD is disabled, work continues through direct inline routing, direct delegation, or optional SDD, without starting, retrying, or reactivating review on its own. Native delivery gates report disabled/unmanaged when no exact receipt applies, and never fabricate approval.
The atomic cycle
STATUS without a selector → exact START → bounded collection/finalize → approved + burn → ordinary repository policy
The candidate closes the review at its last causal event. A terminal reviewer, refuter, validator, correction-plan, or zero-lens result closes the transaction and burns its lineage directly — there is no separate FINALIZE step, no compact receipt publication, and no delivery gate afterwards. The cycle described below is the one that runs on v2.4.0, the current stable line.
1. STATUS without a selector only performs preflight
STATUS without a selector evaluates only the current worktree candidate and renders one exact START invocation. It does not discover ambient authority, resume another worktree, recover history, or select an old lineage. The parent runs only the returned next_transition and its ordered tokens.
gentle-ai review status \ --cwd <repo> \ --contract gentle-ai.review-integration/v2 \ --agent claude-code \ --next-transition
This prevents historical authority, a sibling worktree, or a stale lifecycle response from directing the current candidate.
2. START freezes an independent transaction
START freezes the candidate in a compact transaction explicitly bound to its lineage, worktree, and target. It selects risk and lenses natively. The parent captures the returned lineage, revision, and target tokens.
An exact replay of an active START can return replayed. A genuinely new START is independent. A burned lineage is never reused.
3. Bound calls manage the transaction
Every subsequent STATUS, review capture-result, and FINALIZE carries those exact tokens. The parent routes only from the returned next_transition:
FINALIZE is no longer one of the bound calls. STATUS and review capture-result still carry the exact tokens; the terminal capture itself closes the transaction.
| Transition | Parent action |
|---|---|
execute | Runs the exact operation and ordered arguments, unchanged |
collect | Provides only the named input through its exact capture operation, then queries STATUS again |
stop | Runs no lifecycle operation. It does not infer recovery from text |
A forecast is descriptive, not a route. It is fully reported, but only next_transition is executed.
4. Approval burns authority
On success, native code reads back terminal approval and then burns the exact lineage and its artifacts before returning approved. No terminal receipt, tombstone, witness, mirror, or delivery authority survives. Other lineages and worktrees remain intact.
This includes malformed or empty output, transport failure, post-mutation ambiguity, and the case where terminal authority may already be committed. The parent keeps the exact lineage, revision, and target, queries bound STATUS once, and follows only the returned action. It never falls back to ambient recovery or invents another lineage.
With no FINALIZE step, this failure shape disappears. The equivalent care applies to the terminal capture instead: a malformed, incomplete, or unavailable result never burns authority, and the parent issues one target-bound STATUS rather than inventing a lineage.
Cross-repository continuity
A session rooted in repository A can review a user-explicitly-authorized nested target in unrelated repository B. Go resolves the requested path to B's canonical worktree root; adapters remain opaque and never parse authorization or roots.
| Rule | Contract |
|---|---|
| Lifecycle root | Once B is selected, the host keeps canonical B from STATUS through consent, collection, correction, validation, FINALIZE, and burn. A is never a fallback |
| Commands | Provider-issued tokens run unchanged. If a command omits --cwd, it runs with B as its process cwd |
| Opaque capture | repository_context may be materialized or captured from another process cwd, but remains bound to B |
| Isolation | Identical lineage text in A and B names independent transactions. Approval burns only B; A remains intact |
| Delivery | Ordinary repository policy and any explicit delivery authorization name B |
This lifecycle is available only to Claude Code, Codex, OpenCode, and Pi. Unsupported runtimes fail before any repository or authority mutation.
Risk and lenses
START classifies risk once from repository evidence and freezes it. A correction cannot recalculate risk downward to escape review, or upward to create more work.
| Risk | Selected lenses | Behavior |
|---|---|---|
| Low | 0 lenses | Structural readback. Silent, without consent question |
| Standard | 1 focus lens | One focused pass, with consent |
| High | Canonical 4R | Risk, Resilience, Readability, and Reliability, with consent and a cost forecast |
That 0, 1, or 4 shape is structural cost control. A documentation-only change should not pay for four broad model calls. A normal code change benefits from one focused pass. Authentication, payments, service tokens, security-sensitive paths, or a large change deserve four independent perspectives.
Lenses are read-only
Each selected lens is read-only and separate from authorship. It reads the candidate, judges one concern, emits a strict JSON result, and stops. No lens edits files, creates a corrector, or advances lifecycle state. As Chapter 21 says: the jury is not the contractor.
Reviewers receive provider-issued immutable context, not live workspace state. They inspect only provider-bound immutable trees: never the live worktree, index, HEAD, or another review. Candidate bytes must not pass through /tmp, a repository scratch file, or GENTLE_AI_FROZEN_CANDIDATE_CONTEXT.
The shape of a reviewer result
{
"findings": [
{
"location": "internal/auth/token.go:84",
"severity": "CRITICAL",
"claim": "the candidate accepts an expired service token",
"proof_refs": [
"TestExpiredToken passes on base and fails on candidate"
],
"evidence_class": "deterministic",
"causal_disposition": "introduced"
}
],
"evidence": [
"inspected the complete candidate diff and ran the focused differential test"
]
}The omission is deliberate: no finding ID, lens name, hash, or lineage metadata. The facade already knows which lens result arrived in which selected position. Go fills missing IDs, canonicalizes order, validates required proof, and rejects unknown fields. A model is good at claims and evidence; it is a poor choice for constructing canonical bytes.
Independent evidence
Review opinion and verification evidence are different things. A lens can say "the tests look adequate." Evidence says go test ./... succeeded, the build completed, and acceptance examples passed.
If the same model says "I reviewed the code" and then writes "the tests passed" without a tool result, you have two statements from one interested party. The facade cannot turn narration into truth. It can only bind real evidence bytes that another mechanism produced.
Bounded correction
Only severe findings caused by the candidate can block. Pre-existing or base-only findings become follow-ups; unknown findings escalate; WARNING and SUGGESTION remain information.
An ordinary review permits exactly one correction transaction. START freezes the correction budget at min(200, ceil(original_changed_lines / 2)).
- Before editing, a positive forecast is provided, and work continues only through the provider's returned next transition.
- After the bounded edit, a read-only fix validator runs only when the exact collection input requests it.
- A validator that cannot inspect immutable trees has no verdict. Report that block instead of submitting failed validation: an inconclusive check recorded as failed irreversibly consumes the single correction attempt.
- Once the attempt is accepted — even with a measured zero-line delta — the ordinary correction is exhausted. A later change requires an authorized successor.
- Later observations are follow-ups, not another correction.
Delivery and gates
The terminal review state is informative. Commit, push, PR, release, and archive follow ordinary repository policy and require their own explicit authorization.
Compact receipts and their delivery gates are retired outright. Delivery follows ordinary repository policy, and no retired receipt state counts as an approval. On the candidate, the gate results described below no longer apply.
gentle-ai review validate and its named gates — post-apply, pre-commit, pre-push, pre-pr, and release — are compatibility and information commands. They never discover authority or decide delivery:
| RDD mode | Informative result |
|---|---|
| Enabled | invalidated/unmanaged |
| Disabled | disabled/unmanaged |
They never permit, approve, block, commit, push, or open a pull request.
Candidate projections
gentle-ai review start uses the workspace projection by default. For a monorepo or shared worktree, you can review exactly what is in the Git index:
git add apps/mi-servicio git diff --cached gentle-ai review start --projection staged
The staged projection freezes the complete existing index, including every already-staged path. It excludes unstaged and untracked worktree content, and does not modify the live index or worktree when deriving evidence. It starts review, but does not by itself issue an approved receipt.
Compact receipts are retired, so no projection issues one. A projection still selects which bytes are frozen at START; it simply has no receipt to withhold.
Existing authority never converts automatically between projections. Recovery inherits the predecessor's projection when --projection is omitted.
Stop codes
A stop carries exactly one reason code and no executable transition. These are some common codes and their continuation:
| Code | Continuation |
|---|---|
rdd_disabled | Run the exact gentle-ai review mode enable command rendered by STATUS, then rerun its exact repository-bound STATUS command |
corrected_candidate_unavailable | Change the correction candidate and query STATUS again with the captured lineage and target. Do not reuse the pre-correction target |
correction_repository_verification_failed | Change the open correction candidate and query STATUS again for fresh repository evidence |
unchanged_or_unverified_authority | Terminal. A review start on an unchanged candidate only resumes the same lineage. Change content first |
lens_context_budget_exceeded | Terminal. Immutable reviewer context cannot be truncated. Reduce candidate scope and start a new transaction |
corrupted_or_unverifiable_authority | Terminal. Authority is unreadable or unsupported. Ask a maintainer to inspect it |
manual_intervention_required | Terminal. Authority state is outside the negotiated lifecycle |
original_finalize_request_required retired in v2.5.0-rc.1 | Rerun gentle-ai review finalize --lineage <id> with the exact original content-bound payload |
native_stop_required | Terminal. The lineage escalated and has no native continuation |
empty_base_diff_bootstrap_required | Terminal. The committed base has no reviewable paths |
recovery_scope_unchanged | Change the target so its identity differs, then retry the exact returned review recover invocation |
For every clone-scoped exit, gentle-ai review mode disable --scope clone --cwd <repo> returns delivery to ordinary repository policy. No stop code is resolved by changing runtime, provider, or toolchain.
Trust boundaries
The mental model comes from Chapter 21 — Verifiable Trust:
"The model judges the candidate. The facade constructs authority. The gate re-derives truth."
The central separation: Go does deterministic work; the model does judgment work. The model does not invent a lineage ID, calculate hashes, serialize operation payloads for fifteen state transitions, freeze ledgers by hand, or construct gate contexts.
Protocol complexity is a reliability problem. Every manual operation is another instruction that can be buried in token 140,000, discarded by compaction, called in the wrong order, or convincingly narrated without being executed.
What the threat model protects — and what it does not
The compact review store protects valid authority from accidental corruption and concurrent writers. It does not claim to authenticate state against a malicious local actor with the same user and filesystem access: without an external trust anchor, that actor can rewrite state, the receipt, the Git repository, or the binary.
| Scenario | In scope? | Required result |
|---|---|---|
| Truncated, malformed, or semantically invalid state | Yes | Validation fails closed; existing authority remains intact |
| Interrupted replacement | Yes | Atomic replacement and filesystem synchronization preserve either the old valid record or the new one |
| Concurrent or stale writer | Yes | A lock plus expected revision rejects stale transitions; an exact retry is idempotent |
| Repository changes after review | Yes | Evidence is re-derived from live Git, and scope or identity changes are reported for review repair |
| Terminal authority needs another review | Yes | review recover requires its scope and state predicates; predecessor state, receipt, journal, and evidence bytes remain immutable |
| Malicious local actor with the same user | No | No authenticity or tamper-resistance claim is made |
Retained controls
- Strict schema and semantic validation before accepting or replacing authority.
- Legal-transition validation against the currently locked state and repository-derived evidence.
- Atomic file replacement, with file and directory synchronization where practical.
- A writer lock and expected revision to detect concurrent writers.
- A shared maintenance lock at
<git-common-dir>/gentle-ai/REVIEW-MAINTENANCE.lock, outside the replaceable authority subtree. It coordinates only cooperative Gentle AI participants; it is not a defense against a malicious actor with the same user. - Recognition of exact retries for idempotent operations.
- Re-derivation of context from live Git instead of trusting persisted mirrors.
- Checksums only where useful for detecting accidental corruption: they are not authentication.
Input schemas
Versioned JSON schemas can be printed:
gentle-ai review schema reviewer gentle-ai review schema refuter gentle-ai review schema validator gentle-ai review schema verification-evidence-record gentle-ai review schema final-verification-incident
Raw verification evidence remains arbitrary non-empty bytes, but by itself is never result authority. Native capture persists a strict gentle-ai.review-verification-evidence/v2 record with a closed outcome and immutable candidate, revision, payload, path, and ledger bindings.
Review store maintenance
Review authority accumulates without limit: every candidate leaves a lineage behind and nothing removes one already delivered, so a long-lived clone eventually has hundreds of lineages and hundreds of megabytes of candidate checkouts.
| Command | Effect |
|---|---|
review store-reset --cwd <repo> | Reports by category what a reset would remove and preserve. It removes nothing |
review store-reset --cwd <repo> --confirm | Removes review-lineage state for this clone. Irreversible |
... --confirm --include-in-flight | Also removes reviews that did not reach a terminal state |
... --confirm --include-adapter-reviews | Also removes the adapter-written reviews/ graph store |
review store-reset --cwd <repo> --json | The same machine-readable report |
--confirm is required to remove anything: the operation is irreversible and clone-wide, so the invocation one writes from memory must be the one that only looks. It is clone-scoped and never touches a global or machine location.
Removes candidate-views/ and the v1, v2, quarantine, effect-markers, and incidents subtrees of review-transactions/.
Preserves the RDD switch — in both review-mode/ and the pre-#2882 mirror — together with sdd-runtime/, defect-reports/, review-artifacts/, incidents/, and REVIEW-MAINTENANCE.lock. Reviews that were off remain off. The list is allowlisted, so any path the command does not recognize — including one added by a future release — is reported and left in place instead of guessed at.
Retains reviews/, the graph store written by the gentle-pi adapter, and removes it only with --include-adapter-reviews. A default run cannot distinguish a dead graph from a live review, and a destructive command does not delete what it cannot guarantee.
The TUI exposes the same action as Reset review store in the main menu, between Manage backups and Managed uninstall, with its confirmation cursor starting on Cancel. The TUI has no equivalent for --include-in-flight or --include-adapter-reviews: when open reviews exist it refuses and prints the CLI invocation, so destroying in-flight work is never one keystroke away.
Complete organic workflow
The agent chooses the smallest useful route, and RDD enters at the end over the frozen candidate.
flowchart TD
A["The user requests a change"] --> B{"Implementation
route"}
B -->|"decide/verify
1-3 files"| C["Inline direct"]
B -->|"explore 4+ files
or write 2+ non-trivial ones"| D["Delegated direct
(one bounded worker)"]
C --> E["Implementation + tests"]
D --> E
E --> F{"Is RDD enabled?
(user opt-in)"}
F -->|"off (default)"| Z["Ordinary delivery
reports disabled/unmanaged"]
F -->|"enabled"| G["review status --next-transition
(provider-negotiated route)"]
G --> H{"Risk frozen
at START"}
H -->|"low"| I["Structural reading
0 lenses - silent"]
H -->|"standard"| J["1 focus lens
+ consent"]
H -->|"high"| K["Canonical 4R + consent
+ cost forecast"]
J --> L["Reviewers inspect
the immutable candidate"]
K --> L
L --> M{"Severe findings
caused by the candidate?"}
I --> N["Result: approved
(informative)"]
M -->|"no"| N
M -->|"yes"| O["One bounded correction
(frozen budget)"]
O --> P["Fix validator
(read-only)"]
P -->|"passes"| N
P -->|"fails with evidence"| Q["Escalation"]
P -->|"no diff access"| R["Inconclusive: the attempt
is not consumed"]
R --> P
Q --> S["review recover
(authorized successor)"]
N --> T["Ordinary repository
policy"]
T --> U["Commit → Push → PR"]
Z --> U
style N fill:#2B3328,stroke:#98BB6C,color:#DCD7BA
style Q fill:#49443C,stroke:#FF9E3B,color:#DCD7BA
style U fill:#43242B,stroke:#D27E99,color:#DCD7BA
style Z fill:#1F1F28,stroke:#54546D,color:#727169
Complete SDD workflow
First come durable planning artifacts, then apply, independent verification, and an optional RDD review offer. Archiving and delivery follow ordinary repository policy.
flowchart TD
A["sdd-new / sdd-explore
(or sdd-ff to advance planning)"] --> B["Explore
investigate code and approaches"]
B --> C["Propose
intent - scope - approach"]
C --> D{"Does the user approve
the proposal?"}
D -->|"no"| B
D -->|"yes"| E["Spec
requirements + scenarios"]
E --> F["Design
architecture decisions"]
F --> G["Tasks
ordered checklist"]
G --> H["Apply
the sub-agent implements
against the specs"]
H --> Q["Verify
independent verification against
spec - design - tasks"]
Q -->|"fails"| H
Q -->|"passes"| I["Optional RDD review offer"]
I --> J{"Risk"}
J -->|"low"| K["Structural reading"]
J -->|"standard / high"| L["1 lens or canonical 4R + consent"]
L --> M{"Severe findings?"}
M -->|"yes"| N["One bounded correction
+ fix validator"]
M -->|"no"| O["Result: approved
(informative)"]
K --> O
N -->|"validates"| O
N -->|"fails"| P["Escalation → recover"]
O --> R["Archive
merges delta specs - closes the cycle"]
R --> S["Ordinary repository policy"]
S --> T["Commit → Push → PR"]
style O fill:#2B3328,stroke:#98BB6C,color:#DCD7BA
style P fill:#49443C,stroke:#FF9E3B,color:#DCD7BA
style T fill:#43242B,stroke:#D27E99,color:#DCD7BA
Supported agent matrix
| Agent | ID | Skills | MCP | Delegation | Config path |
|---|---|---|---|---|---|
| Claude Code | claude-code | Yes | Yes | Full (Task tool) | ~/.claude |
| OpenCode | opencode | Yes | Yes | Full (multi-mode overlay) | ~/.config/opencode |
| Kilo Code | kilocode | Yes | Yes | Full (multi-mode overlay) | ~/.config/kilo |
| Gemini CLI | gemini-cli | Yes | Yes | Full (experimental) | ~/.gemini |
| Cursor | cursor | Yes | Yes | Full (native sub-agents) | ~/.cursor |
| VS Code Copilot | vscode-copilot | Yes | Yes | Full (runSubagent) | ~/.copilot + user profile |
| Codex | codex | Yes | Yes | Native multi-agent (default; single-agent fallback) | ~/.codex |
| Windsurf | windsurf | Yes (native) | Yes | Single-agent | ~/.codeium/windsurf |
| Antigravity | antigravity | Yes (native) | Yes | Single-agent + Mission Control | ~/.gemini/antigravity |
| Kimi Code | kimi | Yes | Yes | Full (native custom agents) | ~/.kimi |
| Qwen Code | qwen-code | Yes | Yes | Full (native sub-agents) | ~/.qwen |
| Kiro IDE | kiro-ide | Yes | Yes | Full (native sub-agents) | ~/.kiro |
| OpenClaw | openclaw | Yes | Yes | Single-agent | ~/.openclaw |
| Trae | trae-ide | Yes | Yes | Single-agent | ~/.trae |
| Pi | pi | Yes | Yes | Full (package sub-agents) | ~/.pi |
| Hermes | hermes | Yes | Yes | Full (ephemeral delegate_task) | ~/.hermes |
Multi-mode SDD support
All agents support the SDD orchestrator and single-mode SDD. Multi-mode — assigning different models to each SDD phase — is supported by:
- OpenCode and Kilo Code, through the OpenCode-compatible multi-mode overlay.
- Kiro IDE, through native sub-agent
model:frontmatter. - Pi, where multi-mode is a package property:
gentle-piinstalls SDD agents and chains in.pi/agents/and.pi/chains/, and model overrides live in those files or chain steps.
All other agents run in single mode: the orchestrator handles everything with the model the agent is already using. Single mode is not a downgrade: it is the simplest default and works well. Multi-mode is useful when you deliberately want to trade off cost, speed, or reasoning by phase.
Delegation models
| Model | How it works | Agents |
|---|---|---|
| Full (sub-agents) | Each SDD phase runs in an isolated context window through native delegation, package sub-agents, or an OpenCode-compatible overlay. The orchestrator coordinates; sub-agents execute | Claude Code, OpenCode, Kilo Code, Gemini CLI, Cursor, VS Code Copilot, Kimi Code, Kiro IDE, Qwen Code, Pi |
| Full (delegate_task) | The orchestrator uses Hermes's native delegate_task primitive to create ephemeral workers in fresh context windows. Workers receive only a self-contained mission; the parent receives only their final summary | Hermes |
| Native multi-agent | The orchestrator delegates through the agent's native collaboration tools when they are configured and available, with inline execution as a graceful fallback | Codex |
| Single-agent | All SDD phases run inline in the same conversation. The orchestrator IS the executor. Engram provides persistence between phases | Windsurf, Antigravity, OpenClaw, Trae |
Notes by agent
Claude Code
- Sub-agents through the native Task tool with isolated context windows.
- MCP servers configured as plugins in
~/.claude/mcp/. - Output styles in
~/.claude/output-styles/. - System prompt through Markdown sections in
~/.claude/CLAUDE.md.
OpenCode
- Full multi-agent overlay with 11 named agents in
opencode.json:gentle-orchestratorplus 10 SDD phase agents. - Slash commands for SDD phases (
/sdd-new,/sdd-explore, etc.). - Managed background execution is configured with
--opencode-background-subagents=auto|on|offorGENTLE_AI_OPENCODE_BACKGROUND_SUBAGENTS. CLI precedence is: flag, non-empty environment, prior managed state, thenauto. - Background jobs are process-local and non-durable, have no filesystem isolation, and must not be used for dependent phases or parallel writers in the same worktree.
- Custom models in
opencode.jsonmust explicitly declaretool_call: trueto appear as selectable SDD-capable options. - Multi-mode requirement: connect your AI providers first, then run
opencode models --refresh. - Gentle AI sets SDD agent sharing to
disabledby default for privacy; user-managedsharevalues such asmanualorautoare preserved.
Codex
- Native CLI agent with TOML configuration in
~/.codex/config.toml. - Model-selection profiles written as separate files in
~/.codex/<nombre>.config.toml. GPT-5.6 defaults require Codex >= 0.144.0. - The three lanes are divided by what the phase actually does:
sdd-strongreasons about supplied context,sdd-midwrites code in an agentic loop where effort matters more than raw model strength, andsdd-cheapperforms structured transcription with short context and verifiable output — so it buys effort instead of a larger model. - Multi-agent delegation is enabled by default:
features.multi_agent = true,agents.max_threads = 4, andagents.max_depth = 2are written. If configuration or native tools are unavailable, orchestration gracefully falls back to inline single-agent execution.
Cursor
- Native sub-agents in
~/.cursor/agents/sdd-{fase}.md(10 files). Cursor Agent delegates automatically to the correct sub-agent according to the YAML frontmatterdescriptionfield. sdd-exploreandsdd-verifyrun withreadonly: falseso they can inspect code and run verification commands.- Skills in
~/.cursor/skills/, system prompt in~/.cursor/rules/gentle-ai.mdc, MCP in~/.cursor/mcp.json.
Kiro IDE
- Detection: the
kirobinary on thePATH. A configuration directory alone does not mark Kiro as installed. - Steering file at
~/.kiro/steering/gentle-ai.mdwithinclusion: alwaysfrontmatter. - MCP configuration is always at a separate root:
~/.kiro/settings/mcp.json. - Kiro's native specs flow:
.kiro/specs/<feature>/requirements.md,design.md,tasks.md, with approval gates before the apply and archive phases. - Manual installation only from kiro.dev/downloads.
Windsurf
- Runs as a single agent and uses native features: Plan Mode (persistent plan documents that can be @mentioned between sessions, ideal for spec and design artifacts), Code Mode, and native workflows (
sdd-newavailable in.windsurf/workflows/sdd-new.md). - The orchestrator routes tasks through Small/Medium/Large decision paths.
Hermes
- Detect-only: Gentle AI cannot install Hermes. Install it manually first, then run
gentle-ai install --agent hermes. - Ephemeral delegation is adjusted in
~/.hermes/config.yamlunder thedelegationkey:max_spawn_depth(2),max_concurrent_children(4),max_iterations,child_timeout_seconds,inherit_mcp_toolsets(false), andsubagent_auto_approve(false). - Toolsets, MCP servers, and skills are not inherited automatically from the parent: pass them explicitly in the mission.
- Worker output is treated as self-report: verify file writes, test results, URLs, and external effects before reporting success.
OpenCode SDD profiles
They let you assign different models to different SDD phases: a powerful one for design, a fast one for implementation, and an inexpensive one for exploration. OpenCode uses gentle-orchestrator as the base SDD conductor.
# Create a "cheap" profile with a free model for every phase gentle-ai sync --profile cheap:openrouter/qwen/qwen3-30b-a3b:free # Override the design phase with a stronger model gentle-ai sync --profile-phase cheap:sdd-design:anthropic/claude-sonnet-4-20250514 # Create several profiles in one command gentle-ai sync \ --profile cheap:openrouter/qwen/qwen3-30b-a3b:free \ --profile premium:anthropic/claude-sonnet-4-20250514
After creating a profile, open OpenCode and press Tab to switch between gentle-orchestrator and your custom profiles.
| What you need | Use this |
|---|---|
| Default SDD conductor | gentle-orchestrator |
| Legacy configurations | sdd-orchestrator migrates to gentle-orchestrator during sync |
| Named model profiles | sdd-orchestrator-cheap, sdd-orchestrator-premium, etc. |
If you prefer a runtime profile manager that keeps profiles outside opencode.json, Gentle AI also supports it: during sync, OpenCode can auto-detect external profile files in ~/.config/opencode/profiles/*.json and switch to a safer compatibility path that preserves the active gentle-orchestrator prompt instead of overwriting it. Enable it with --sdd-profile-strategy external-single-active.
Pi and the gentle-pi harness
Selecting Pi installs the first-class gentle-pi harness, which owns the persona, model controls, SDD assets, chains, and memory wiring inside Pi.
Installation
Pi must be installed and available as pi on the PATH. Then:
gentle-ai install --agent pi pi
If Pi is the only selected agent, the installer still provisions the real Engram component, but skips persona, ecosystem-component selection, and Strict TDD questions because gentle-pi owns those decisions inside Pi.
Packages it installs
pi install npm:gentle-pi pi install npm:gentle-engram pi install npm:pi-mcp-adapter npm exec --yes --package gentle-engram@latest -- pi-engram init pi install npm:pi-subagents-j0k3r pi install npm:@juicesharp/rpiv-ask-user-question pi install npm:pi-web-access pi install npm:@juicesharp/rpiv-todo pi install npm:pi-btw
| Package | What it adds |
|---|---|
gentle-pi | Gentleman persona, SDD/OpenSpec flow, Strict TDD support, security policy, skills, prompts, SDD agents, and SDD chains |
gentle-engram | Pi integration with Engram session memory and its MCP tools. It is not the Engram binary |
pi-mcp-adapter | Lets Pi expose MCP servers, including Engram, through Pi's MCP runtime |
pi-engram init | Initializes Engram's MCP configuration form for Pi, owned by gentle-engram |
pi-subagents-j0k3r | Discovers and runs SDD agents from .pi/agents/ |
@juicesharp/rpiv-ask-user-question | Lets Pi child agents ask the active user session for clarification |
pi-web-access, @juicesharp/rpiv-todo, pi-btw | Web access, task tracking, and companion-flow support |
Pi commands
| Command | What it does |
|---|---|
/gentle-ai:status | Shows package, SDD asset, OpenSpec, and model configuration status |
/gentleman:persona | Switches between the gentleman and neutral personas |
/gentleman:models | Opens Pi's native model-assignment modal |
/sdd-init | Initializes or refreshes openspec/config.yaml |
/gentle-ai:install-sdd | Reinstalls SDD assets without overwriting local files |
/gentle-ai:install-sdd --force | Forces a refresh of installed SDD assets, replacing local copies |
/gentle-ai:persona and /gentle-ai:models continue to work as compatibility aliases.
Recommended model assignment
| Agent type | Recommended model shape |
|---|---|
| Explore, propose, archive | Fast and inexpensive is usually enough |
| Spec, design, tasks | Strong reasoning model, because these phases shape implementation |
| Apply | Strong coding model with reliable tool use |
| Verify / review agents | Strong model with fresh context. Verification benefits from independence |
| Small utility agents | Inherit the active model unless they become a bottleneck |
Project files
During a normal session_start, gentle-pi copies local project assets without overwriting local edits:
.pi/agents/sdd-*.md .pi/chains/sdd-*.chain.md .pi/gentle-ai/support/strict-tdd.md .pi/gentle-ai/support/strict-tdd-verify.md
pi -nsStarting Pi with pi -ns skips skill loading and startup hooks. It is useful for a clean or faster session, but it also means that gentle-pi's startup work — asset checking and skill-registry refresh — does not run automatically.
Troubleshooting
| Symptom | Solution |
|---|---|
| Gentle AI says Pi is missing | Install Pi first and make sure pi is on the PATH |
| SDD agents are missing in Pi | Start Pi normally in the project so it runs session_start, or run /gentle-ai:install-sdd |
| The persona did not change immediately | Run /reload or start a new Pi session |
| You want to remove a model override | Open /gentleman:models and choose Inherit active/default model |
Memory tools or /mcp are missing | Run gentle-ai install --agent pi again and check /gentle-ai:status |
gentle-engram installed but Engram is unavailable | Run gentle-ai install --agent pi again so the real Engram component is provisioned |
CLI reference
Interactive TUI
gentle-ai
The Bubbletea TUI guides agent, component, skill, preset, and managed-uninstall selection. Before modifying any managed file, Gentle AI creates a backup snapshot.
install
# Complete ecosystem for several agents gentle-ai install \ --agent claude-code,opencode,gemini-cli \ --preset full-gentleman # Minimal setup for Cursor gentle-ai install --agent cursor --preset minimal # Choose specific components and skills gentle-ai install \ --agent claude-code \ --component engram,sdd,skills,context7,persona,permissions \ --skill go-testing,skill-creator,branch-pr,issue-creation \ --persona gentleman # Preview without applying changes gentle-ai install --dry-run --agent claude-code,opencode --preset full-gentleman
When installing one agent with --agent X, Gentle AI merges the new agent into the existing installed_agents list in state.json and preserves any existing model_assignments. It does not overwrite the complete state.
install flags
| Flag | Description |
|---|---|
--agent, --agents | Agents to configure, separated by commas |
--component, --components | Components to install, separated by commas |
--skill, --skills | Skills to install, separated by commas |
--persona | gentleman, neutral, or custom |
--preset | full-gentleman, ecosystem-only, minimal, or custom |
--sdd-mode | SDD orchestrator mode: single or multi |
--scope | global (default) or workspace |
--dry-run | Preview the plan without applying changes |
sync
Refreshes managed assets to the current version. Run it after replacing or updating the binary, including with brew upgrade, gentle-ai upgrade, or go install. It does not reinstall binaries: it only updates prompts, skills, MCP configurations, and SDD orchestrators.
gentle-ai sync --dry-run # Preview the scope gentle-ai sync # Agents registered in state.json gentle-ai sync --agent claude-code --agent opencode # Only specific agents
gentle-ai sync updates agents registered as installed by Gentle AI, not every agent configuration directory on your machine. The selection is saved in ~/.gentle-ai/state.json. Preview the active scope with gentle-ai sync --dry-run.
Sync is safe and idempotent: running it twice produces no changes the second time. It does not support --component; for opt-in components excluded from the default scope, use --include-permissions and --include-theme.
sync flags
| Flag | Description |
|---|---|
--agent, --agents | Agents to synchronize (default: all installed agents) |
--skill, --skills | Skills to synchronize |
--sdd-mode | single or multi |
--strict-tdd | Enable Strict TDD mode for SDD agents |
--profile | Create or update an SDD profile: nombre:proveedor/modelo |
--profile-phase | Override a specific phase: nombre:fase:proveedor/modelo |
--sdd-profile-strategy | generated-multi or external-single-active |
--include-permissions | Include permission synchronization (opt-in) |
--include-theme | Include theme synchronization (opt-in) |
--dry-run | Preview the plan without applying changes |
uninstall
Removes only configuration managed by Gentle AI from one or more agents. It does not uninstall external packages or binaries. A backup snapshot is created before any change is applied.
gentle-ai uninstall --agent claude-code --agent opencode gentle-ai uninstall --agent claude-code --component sdd,persona,context7 gentle-ai uninstall --all gentle-ai uninstall --agent cursor --component skills --yes
When --component is omitted from a partial uninstall, all managed uninstallable components are removed from the selected agent set.
update / upgrade
gentle-ai update # Check whether a newer version is available gentle-ai upgrade # Update to the latest release
After any update or manual binary replacement, run gentle-ai sync.
| Situation | Behavior |
|---|---|
| Interactive terminal (TTY) | Always asks Apply now? [Y/n]. An empty Enter accepts |
| Non-TTY (CI, pipe, script) | Automatically declines. It never hangs |
GENTLE_AI_YES=1 | Automatically accepts without asking. Child processes inherit the variable, so scope it to one invocation |
GENTLE_AI_NO_SELF_UPDATE=1 | Completely skips the self-update check |
If GitHub rate-limits update checks, export GITHUB_TOKEN or GH_TOKEN before running update/upgrade.
doctor
gentle-ai doctor
Read-only health diagnostics: it makes no changes to your configuration.
| Check | What it verifies |
|---|---|
| Tool binaries | Required tools are present on the PATH; detects shadowing (the wrong binary resolving first) |
state.json validity | Parses ~/.gentle-ai/state.json and reports schema problems or corruption |
| Engram MCP reachability | Confirms that the Engram MCP server responds |
| Disk space | Warns when available space is critically low |
Every check reports pass, warn, or fail, with an optional remediation suggestion. Run doctor first when something differs from the expected result.
Typical workflow
# First time: install everything brew install gentleman-programming/tap/gentle-ai gentle-ai install --agent claude-code,cursor --preset full-gentleman # After a new release: upgrade and synchronize brew upgrade gentle-ai gentle-ai sync # Remove only the managed SDD and persona configuration from one agent gentle-ai uninstall --agent claude-code --component sdd,persona # Add a new agent later gentle-ai install --agent windsurf --preset full-gentleman
Backups and rollback
The backup system takes a snapshot of your configuration files before every install, sync, and upgrade. Backups are compressed, deduplicated, and automatically pruned.
How it works
- Calculates a checksum for every file to back up.
- Skips the backup if it would be identical to the most recent one (deduplication).
- Creates a compressed snapshot (
snapshot.tar.gz) with all your configuration files. - Prunes old backups: retains the 5 most recent and deletes the rest.
Snapshot contents
manifest.json— metadata: origin, timestamp, file count, checksum, pin state.snapshot.tar.gz— compressed archive containing every backed-up file.- For paths that did not exist before the operation, the manifest records
existed=false.
Pre-upgrade and pre-sync snapshots cover only agents listed in state.InstalledAgents (~/.gentle-ai/state.json). Agent configuration directories installed outside Gentle AI are not included.
Retention policy
| Setting | Default | Behavior |
|---|---|---|
| Number to retain | 5 | The 5 most recent unpinned backups are kept |
| Pinned backups | Never deleted | Survive pruning regardless of count |
| Duplicates | Skipped | If the configuration did not change, no new backup is created |
| Compression | Always | New backups use tar.gz (~75% smaller) |
Managing from the TUI
| Key | Action |
|---|---|
j / k | Navigate up/down |
Enter | Restore the selected backup |
p | Pin/unpin (protects from pruning) |
r | Rename (add a description) |
d | Delete |
Esc | Go back |
Restore behavior
- If
existed=true: restores the snapshot file to its original path. - If
existed=false: removes the file, reverting files created during installation. - Restoration is atomic per file write: there are no partial restores.
- Works with compressed (tar.gz) backups and legacy ones before v1.16 (the
files/directory with flat copies).
Packages installed via brew install, apt-get install, or pacman -S are not uninstalled during rollback. The snapshot system manages configuration files only. To undo a package installation, use your platform's package manager.
If verification fails
- Review the failed checks in the verification report.
- Restore from the latest snapshot through the TUI or
gentle-ai restore latest. - Run install again with
--dry-runto validate the plan. - Run install again after fixing external dependencies.
Release verification
Official macOS and Linux release files require an authenticated checksums.txt. The built-in updater verifies its Minisign signature, its exact binding to Gentleman-Programming/gentle-ai plus the release tag, and the selected file checksum before replacing the installed binary.
The candidate ships SHA256SUMS.txt and no Minisign signature file. The stable v2.4.0 release publishes checksums.txt together with checksums.txt.minisig; the candidate publishes neither. The verification procedure below therefore has nothing to verify against on the candidate, and its binaries are published raw rather than as .tar.gz archives. Verified against the release assets on 2026-08-26.
Release files have a 128 MiB cap, including chunked or unknown-length responses. Missing, oversized, malformed, untrusted, or padding key material fails closed without changing the installed binary.
minisign -VQm checksums.txt -x checksums.txt.minisig -P "$GENTLE_AI_MINISIGN_PUBLIC_KEY" # Expected output: repo=Gentleman-Programming/gentle-ai;tag=vX.Y.Z sha256sum --check --strict --ignore-missing checksums.txt
Obtain the production public key and its fingerprint from a maintainer-controlled channel, and only then download checksums.txt and checksums.txt.minisig from the same release.
Windows release files and Scoop publication remain omitted until publicly trusted RSA Authenticode signing is provisioned, both executables (amd64 and arm64) are signed before assets and checksums are generated, and release verification fails if either is unsigned.
Partially superseded on the candidate, which publishes a signed-status-unknown windows_amd64.exe. The arm64 executable named by this paragraph is still not published.
Version policy
RDD began in gentle-ai v1.47.0 (2026-07-10) with the first bounded native review transactions, and became the supported stable path in v2.2.0. The negotiated public review contract was published in v2.1.6.
The README, quickstart.md, and trigger-rules.md still identify v2.3.0 as stable and v2.4.0-rc.1 as a prerelease. The release list says otherwise: v2.4.0 was published as stable on 2026-08-17, superseding the candidate series that reached v2.4.0-rc.8 (2026-08-14). A new candidate line then opened on 2026-08-26 with v2.5.0-rc.1. This table follows releases, not documents.
Verified against the releases page on 2026-08-26. Versions change: always confirm with gentle-ai version and that page.
| Channel | Version | Installation |
|---|---|---|
| Stable | v2.4.0 2026-08-17 | go install github.com/gentleman-programming/gentle-ai/v2/cmd/gentle-ai@latest |
| Prerelease | v2.5.0-rc.1 2026-08-26 | go install github.com/gentleman-programming/gentle-ai/v2/cmd/gentle-ai@v2.5.0-rc.1 |
| Development | main | go install github.com/gentleman-programming/gentle-ai/v2/cmd/gentle-ai@main |
A candidate line is open ahead of v2.4.0, so @latest and the latest RC no longer point at the same line: @latest still resolves to stable, and v2.5.0-rc.1 is reached only through its exact pin. The managed installer follows the newest channel version and does not accept an arbitrary release pin, so use go install to run the candidate, or whenever reproducibility requires an exact version. Use @main only to test changes that are not part of a release.
The beta-channel managed installer follows main and requires Go 1.25.10+:
# macOS / Linux curl -fsSL https://raw.githubusercontent.com/Gentleman-Programming/gentle-ai/main/scripts/install.sh | bash -s -- --channel beta # Windows (PowerShell) $env:GENTLE_AI_CHANNEL="beta"; go install github.com/gentleman-programming/gentle-ai/v2/cmd/gentle-ai@main
Glossary
- Candidate candidate
- The exact set of bytes to be reviewed. It exists before the review begins and is frozen at START.
- Lineage lineage
- The identifier of a review transaction. It is captured at START and replicated unchanged in every later call. A burned lineage is never reused.
- Receipt
- The terminal evidence of a completed review transaction. It is informative: it never authorizes delivery. On approval, it is burned together with the authority. Retired in
v2.5.0-rc.1, where the review closes at its terminal event without publishing one. - Lens lens
- A read-only reviewer that judges one concern and emits strict JSON. The four canonical lenses are Risk, Resilience, Readability, and Reliability (4R).
- Burn burn
- The removal of the exact authority and its artifacts when a review is approved. No receipt, tombstone, witness, or mirror survives.
- Projection projection
- What START freezes:
workspace(the entire workspace, default) orstaged(exactly the Git index). - Gate
- A named checkpoint —
post-apply,pre-commit,pre-push,pre-pr,release. These are informative compatibility commands: they never allow or block delivery. Retired inv2.5.0-rc.1together with compact receipts. - Candidate-caused finding
- A finding introduced by the change. Only severe findings of this class can block. Pre-existing findings become follow-ups.
- Correction budget
- The line limit for the single permitted correction:
min(200, ceil(original_changed_lines / 2)). It is frozen at START and is not recalculated. - Delta-spec
- The partial specification for a change in progress. At archive time, it is merged into the project's main specs.
- Escalated escalated
- The state of a lineage whose correction failed with evidence. No other reviewer, refuter, correction, or validator starts: it requires an authorized successor through
review recover.
Official documentation
| Your task | Start here |
|---|---|
| Understand the Gentle AI mental model | Intended Usage |
| Choose direct, delegated, or optional SDD routing | Organic Implementation Routing |
| Understand the RDD architecture | Organic RDD |
| Review or deliver a change safely | Review Integration Contract |
| Know the technical limits of review authority | Review Authority Threat Model |
| Configure a supported agent | Agents |
| Use the Pi harness | Pi Agent |
| Version SDD artifacts as files | OpenSpec Config |
| Find or share persistent context | Engram Commands |
| Recover an installation | Backup & Rollback |
| Understand verifiable trust | Chapter 21 — Verifiable Trust |
| Browse the source code | Gentleman-Programming/gentle-ai |
This page summarizes the official Gentle AI documentation. If there is any discrepancy, the linked repository documents above are the source of truth. Gentle AI is distributed under the MIT License.