Gentle-AI
Gentle-AI

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.

Stable v3.4.0Go 1.25.10+License MIT16 supported agents
The first thing to understand

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 thisDo not do this
Run the installer and choose agents and a presetManually edit generated configuration files
Start programming with your agentMemorize SDD phases or commands
Let ODD resolve uncertainty; use formal SDD artifacts only after an explicit request or accepted proposalForce SDD for every small task
Trust Engram to store context when it is installed and activeInspect Engram storage unless you need engram sync or engram tui
Let startup hooks or sdd-init refresh the skill registryRescan skills manually unless you need --force
Say “use sdd” when you already know you want structured planningWorry about which SDD phase comes next
Run the installer again to update or change your setupManually patch skill files or persona instructions

Installation

Prerequisites

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/v3/cmd/gentle-ai@latest

Notice the /v3 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.

Windows installs from source

v3.4.0 publishes eight release assets and none of them is a Windows binary: four platform archives for macOS and Linux (darwin_amd64, darwin_arm64, linux_amd64, linux_arm64), gentle-ai-review-provider-contract-1.2.0.tar.gz, the release-provenance archive, and the checksums.txt / checksums.txt.minisig pair that authenticates them.

On Windows, install and update with go install and Go 1.25.10+. Building from source and CI/runtime tests are supported; official Windows binary distribution and Scoop remain unavailable. Windows installation and updates fail closed to that build-from-source path: they never download an unsigned Gentle AI executable or run a remote update script.

Synchronize after changing the binary

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.

CommandWhat it doesWhen to run it again
/sdd-initWhen you explicitly select SDD, records project context and detectable testing capabilities; detection does not enable Strict TDDWhen explicitly starting SDD in a new project, or when its project context needs refreshing
gentle-ai skill-registry refreshScans installed skills and project conventions, then builds the registryAfter installing or removing skills, or the first time in a new project

Only an explicitly selected SDD workflow may run /sdd-init automatically when it needs context. Detectable tests do not enable Strict TDD: resolve its mode, source, and exact runner from project/session configuration or an explicit choice. 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

ComponentIDDescription
EngramengramPersistent memory between sessions through MCP: project-name detection, full-text search, Git synchronization, and project consolidation
SDDsddSpecification-driven development workflow (10 phases, including sdd-onboard). Its formal artifacts begin only after an explicit request or accepted proposal
SkillsskillsCurated skills library
Context7context7MCP server with live framework and library documentation
PersonapersonaManaged Gentleman/neutral persona injection, or unmanaged custom-persona mode
PermissionspermissionsDefaults and safety barriers. Applied to Claude Code and OpenCode, the two adapters that support permission overlays
GGAggaGentleman Guardian Angel: AI provider switcher
ThemethemeGentleman Kanagawa theme overlay. Since v2.5.0 it 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
GGA behavior

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

PresetIDWhat it includes
Dev Stack + Polishfull-gentlemanAll components (Engram + SDD + Skills + Context7 + GGA + Permissions + Theme) and every skill
Dev Stackecosystem-onlyCore components (Engram + SDD + Skills + Context7 + GGA) and every skill
Memory OnlyminimalEngram and the SDD skills only
CustomcustomYou 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.

You do not need to do anything in day-to-day work

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

ToolWhat it does
mem_saveSaves 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_searchSearches memory by words and returns matching observations
mem_contextRetrieves the recent session history (called at session start)
mem_session_summarySaves an end-of-session summary so the next session has context
mem_get_observationRetrieves the full, untruncated content of an observation by ID
mem_save_promptSaves 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.

About capture_prompt

mem_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

ODD explores, resolves uncertainty, and tracks the work. Formal SDD artifacts begin only after an explicit request or accepted proposal.

You explicitly want SDD

Say "use sdd" and the agent starts the workflow.

The ten phases

PhaseWhat it does
sdd-initInitializes SDD context in a project
sdd-exploreInvestigates the code before committing to a change
sdd-proposeCreates the change proposal with intent, scope, and approach
sdd-specWrites specifications with requirements and scenarios
sdd-designCreates the technical design with architectural decisions
sdd-tasksBreaks the change into ordered implementation tasks
sdd-applyImplements tasks according to the specs and design
sdd-verifyValidates that the implementation matches the specs
sdd-archiveSynchronizes delta specs with the main specs and archives them
sdd-onboardRuns 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:

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.

  1. The orchestrator keeps them focused. It resolves the skill registry once, passes relevant SKILL.md paths in each sub-agent prompt, and gives it a concrete role. Sub-agents read the exact skill files instead of receiving generated summaries.
  2. They adapt to your project. An sdd-apply sub-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.
  3. 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 — optional evidence

Research is optional read-only work for a named uncertainty. It can inform ODD or explicitly selected SDD, but it is not an SDD phase or administrative contract.

How to use it

State the question and use only actually available, authorized tools. Prefer primary sources when they answer the question; do not infer access from a tool name or from an unavailable source class. When delegated, the dedicated collector is an output-only evidence collector: it does not read local artifacts or repository state, and the orchestrator supplies code context.

What it returns

Return concise, attributed evidence: material claims link to source URLs or code locations and distinguish verified facts, assumptions, contradictions, freshness, and explicit gaps. The parent handles any authorized persistence under existing project practices.

How it informs a proposal

Research supports a recommendation, tradeoffs, open questions, and implementation implications. Missing evidence is disclosed rather than invented; only an unsafe decision that depends on it pauses. Research does not create an SDD phase, contract, admission grant, persistence requirement, readiness gate, or proposal block.


OpenSpec — openspec/config.yaml

openspec/config.yaml is a documented project-level convention for SDD when you work in openspec or hybrid persistence mode.

Current convention, not a stable contract

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

Which phases reference it

PhaseHow it uses the configuration
sdd-initIn OpenSpec mode, prompt instructions direct the agent to create the file and write the detected context, rules, and testing sections
sdd-exploreReads it as part of context discovery
sdd-proposeApplies rules.proposal when present
sdd-designApplies rules.design when present
sdd-specApplies rules.specs when present
sdd-tasksApplies rules.tasks when present
sdd-applyReads strict_tdd, testing, and rules.apply when present
sdd-verifyReads strict_tdd, testing, and rules.verify when present
sdd-archiveApplies 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:

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

Resolve Strict TDD from project/session configuration or an explicit choice, with its source and exact runner. Detectable test support alone does not activate it.

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

SkillIDDescription
Go Testinggo-testingGo testing patterns, including Bubbletea TUI testing
Skill Creatorskill-creatorCreates new skills following the Agent Skills specification
Skill Improverskill-improverAudits and improves existing skills against the repository style guide
Branch & PRbranch-prPull-request workflow with conventional commits, branch names, and the issue-first rule
Issue Creationissue-creationWorkflow for creating issues with bug and feature-request templates
Skill Registryskill-registryBuilds an index of installed skills with triggers, scopes, and exact SKILL.md paths
Chained PRchained-prPlans and creates reviewable chained pull requests
Cognitive Doc Designcognitive-doc-designWrites documentation that reduces review and onboarding cognitive load
Comment Writercomment-writerWrites warm, direct collaboration comments and review replies
Work Unit Commitswork-unit-commitsSplits implementation into reviewable work units
RDD Defect Workflowrdd-defect-workflowGuides 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

FieldMeaning
SkillThe frontmatter name, or the directory name as a fallback
Trigger / descriptionThe complete description, including folded multiline YAML descriptions
Scopeproject or user
PathThe exact SKILL.md file to load
Why use an index instead of compact rules

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

PersonaIDDescription
GentlemangentlemanA teaching-oriented mentor persona: it challenges poor practices and explains why
NeutralneutralThe same teacher and philosophy, without regional language: warm and professional
CustomcustomKeeps 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 creates formal SDD artifacts only after an explicit request or an accepted proposal.

Every change takes exactly one route

File counts, changed lines, size, or perceived risk never select SDD by themselves. Only an explicit request or an accepted proposal does.

ODD is the mandatory default protocol

Organic Driven Development (ODD) handles authorized work by default. SDD remains an explicitly selected workflow, separate from RDD.

When a trigger in the Delegation stop rules table fires, delegation is mandatory; the table defines those triggers without changing the implementation route.

The three routes

RouteWhen it is usedWhat happens
Direct inlineDeciding or verifying requires 1 to 3 files; or the change is one already-understood mechanical file, with no research or outstanding design decisionsThe bounded action stays inline
Direct delegationUnderstanding requires 4 or more files; reading prepares a write; broad research is needed; or 2 or more non-trivial files must be writtenDelegate bounded exploration and/or one writer for that action
Optional SDDThe user explicitly requests formal planning or accepts a proposal; ambiguity remains in ODDSDD creates proposal, specification, design, and task artifacts

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 resolves it in ODD through research, clarification, or Needs your decision; it does not offer or select formal SDD artifacts from ambiguity alone.

Delegation stop rules

The orchestrator must stop acting as a monolithic executor when complexity appears. These triggers are mandatory, not advisory:

RuleTrigger
Four-file ruleReading 4 or more files to understand a flow requires delegating one bounded exploration before deciding or writing
Multi-file writing ruleTouching 2 or more non-trivial files requires one bounded writer
Preparation triggerReading that prepares a write, broad research, or context compression requires delegation together with or ahead of the write
Incident ruleAfter an incorrect cwd, a worktree/Git accident, merge recovery, a confusing test command, or an environment workaround: delegate a separate diagnosis before resuming
Long-session ruleAfter about 20 tool calls, 5 exploratory reads, or 2 non-mechanical edits without any delegation: pause and delegate the next bounded unit of work
Route declarationFor substantial work, record the chosen route and trigger evidence per task so skipped delegation is observable
Verification ruleUse a fresh verification worker for test, build, lint, or other verification commands; only a 1-to-3-file read-only check stays inline

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 the gentle-ai.sdd-status/v2 contract. Runtime state carries planning, task, verification, selected-untracked, and attempt truth, and it does not project active review bindings or receipts. Historical runtime records containing binding, receipt, or binding/set refuse rather than being replayed.

StateMeaning
Working workingImplementation can still change
Checking checkingGentle AI is running the applicable functional test and bounded review
Ready readyThe exact candidate has sufficient evidence for the selected delivery route
Needs your decision needs your decisionSafe 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.

The switch is a switch, and it starts off

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>
CommandEffect
review mode statusReports the global source, local clone source, deciding source, and effective mode — without mutating anything
review mode enable --scope globalEnables RDD globally for future candidates. It is the only command that turns it on
review mode disableDisables RDD globally
review mode disable --scope cloneDisables it only for this clone; no other clone inherits the override
review mode enable --scope cloneClears 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 → terminal capture → approved pending exact acknowledgement → acknowledgement burns authority → ordinary repository policy

A terminal reviewer, refuter, validator, correction-plan, or zero-lens result records approved; the approved authority remains pending its exact acknowledgement. There is no separate FINALIZE step. No compact receipt or delivery authority survives.

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 and review capture-result carries those exact tokens. After terminal approval, bound STATUS reoffers the same acknowledgement while the authority remains pending. The parent routes only from the returned next_transition:

TransitionParent action
executeRuns the exact operation and ordered arguments, unchanged
collectProvides only the named input through its exact capture operation, then queries STATUS again
stopRuns 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 awaits acknowledgement

Native code returns approved with one exact acknowledgement continuation. Only the exact acknowledgement continuation burns the authority: it validates the bound lineage, target, revision, and token, then removes that authority and its artifacts. A wrong, stale, or failed acknowledgement is non-mutating; bound STATUS reoffers the pending continuation. No compact receipt or delivery authority survives. Other lineages and worktrees remain intact.

An unclean terminal capture is not approval

This includes malformed or empty output, transport failure, post-mutation ambiguity, and the case where terminal authority may already be committed. A result in any of those shapes never burns authority. 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.

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.

RuleContract
Lifecycle rootOnce B is selected, the host keeps canonical B from STATUS through consent, collection, correction, validation, acknowledgement, and burn. A is never a fallback
CommandsProvider-issued tokens run unchanged. If a command omits --cwd, it runs with B as its process cwd
Opaque capturerepository_context may be materialized or captured from another process cwd, but remains bound to B
IsolationIdentical lineage text in A and B names independent transactions. The exact acknowledgement burns only B; A remains intact
DeliveryOrdinary 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.

RiskSelected lensesBehavior
Low0 lensesStructural readback. Silent, without consent question
Standard1 focus lensOne focused pass, with consent
HighCanonical 4RRisk, 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.

Why independence matters

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 compact review permits exactly one correction transaction. START freezes its correction budget at 0 for zero original lines; otherwise max(2, min(200, ceil(original_changed_lines / 2))). The old min(200, ceil(original_changed_lines / 2)) formula remains only for historical and non-compact authority.

Delivery and gates

Review never authorizes delivery

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. Delivery follows ordinary repository policy, and no receipt state counts as an approval.

gentle-ai review validate and its named gates — post-apply, pre-commit, pre-push, pre-pr, and release — survive only as compatibility and information commands. They never discover authority or decide delivery:

RDD modeInformative result
Enabledinvalidated/unmanaged
Disableddisabled/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. A projection only selects which bytes are frozen at START: compact receipts are retired, so no projection issues one.

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:

CodeContinuation
rdd_disabledRun the exact gentle-ai review mode enable command rendered by STATUS, then rerun its exact repository-bound STATUS command
corrected_candidate_unavailableChange the correction candidate and query STATUS again with the captured lineage and target. Do not reuse the pre-correction target
correction_repository_verification_failedChange the open correction candidate and query STATUS again for fresh repository evidence
unchanged_or_unverified_authorityTerminal. A review start on an unchanged candidate only resumes the same lineage. Change content first
lens_context_budget_exceededTerminal. Immutable reviewer context cannot be truncated. Reduce candidate scope and start a new transaction
corrupted_or_unverifiable_authorityTerminal. Authority is unreadable or unsupported. Ask a maintainer to inspect it
manual_intervention_requiredTerminal. Authority state is outside the negotiated lifecycle
original_finalize_request_requiredRun the exact original-finalize replay bound to the stop; do not reconstruct a command or payload
native_stop_requiredTerminal. The lineage escalated and has no native continuation
empty_base_diff_bootstrap_requiredTerminal. The committed base has no reviewable paths
recovery_scope_unchangedChange 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.

Why insist on the short path

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.

ScenarioIn scope?Required result
Truncated, malformed, or semantically invalid stateYesValidation fails closed; existing authority remains intact
Interrupted replacementYesAtomic replacement and filesystem synchronization preserve either the old valid record or the new one
Concurrent or stale writerYesA lock plus expected revision rejects stale transitions; an exact retry is idempotent
Repository changes after reviewYesEvidence is re-derived from live Git, and scope or identity changes are reported for review repair
Terminal authority needs another reviewYesreview recover requires its scope and state predicates; predecessor state, receipt, journal, and evidence bytes remain immutable
Malicious local actor with the same userNoNo authenticity or tamper-resistance claim is made

Retained controls

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

Successful acknowledgement burns and removes approved authority. Retained, open, or degraded lineages can accumulate in a long-lived clone, so reset remains available for the authority that still exists.

CommandEffect
review store-reset --cwd <repo>Reports by category what a reset would remove and preserve. It removes nothing
review store-reset --cwd <repo> --confirmRemoves review-lineage state for this clone. Irreversible
... --confirm --include-in-flightAlso removes reviews that did not reach a terminal state
... --confirm --include-adapter-reviewsAlso removes the adapter-written reviews/ graph store
review store-reset --cwd <repo> --jsonThe same machine-readable report
Preview is the default

--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

ODD follows seven stages: authorize the request, explore, resolve uncertainty, classify the work, track substantial work before the first write, implement task by task, and close with verified results.

flowchart TD
    A["1. Authorize
change or read-only request"] --> B{"Authorized
implementation?"} B -->|"no"| Z["Read-only outcome"] B -->|"yes"| C["2. Explore
code and requirements"] C --> D["3. Resolve uncertainty
research, clarification, or challenge"] D --> E["4. Classify
small or substantial"] E -->|"substantial"| F["5. Track before the first write
feature document + Engram mirror"] E -->|"small"| G["6. Implement task by task
configured TDD + applicable checks"] F --> G G --> H["7. Close
verified outcome, checks, next step"] style H fill:#2B3328,stroke:#98BB6C,color:#DCD7BA style Z fill:#1F1F28,stroke:#54546D,color:#727169

Complete SDD workflow

First come durable planning artifacts, then apply. Verify is optional and does not gate Archive. It may suggest returning to Apply, but any report can proceed to Archive actual state. Archive can record unfinished work when the user chooses it. SDD never invokes RDD. 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["Optional Verify
practical diagnostics against
spec - design - tasks"] H --> R["Archive
merges delta specs - closes the cycle"] Q -->|"suggests rework"| H Q -->|"reports findings"| R Q -->|"complete"| R R --> S["Ordinary repository policy"] S --> T["Commit → Push → PR"] style R fill:#2B3328,stroke:#98BB6C,color:#DCD7BA style T fill:#43242B,stroke:#D27E99,color:#DCD7BA

Supported agent matrix

AgentIDSkillsMCPDelegationConfig path
Claude Codeclaude-codeYesYesFull (Task tool)~/.claude
OpenCodeopencodeYesYesFull (multi-mode overlay)~/.config/opencode
Kilo CodekilocodeYesYesFull (multi-mode overlay)~/.config/kilo
Gemini CLIgemini-cliYesYesFull (experimental)~/.gemini
CursorcursorYesYesFull (native sub-agents)~/.cursor
VS Code Copilotvscode-copilotYesYesFull (runSubagent)~/.copilot + user profile
CodexcodexYesYesNative multi-agent (default; single-agent fallback)~/.codex
WindsurfwindsurfYes (native)YesSingle-agent~/.codeium/windsurf
AntigravityantigravityYes (native)YesSingle-agent + Mission Control~/.gemini/antigravity
Kimi CodekimiYesYesFull (native custom agents)~/.kimi
Qwen Codeqwen-codeYesYesFull (native sub-agents)~/.qwen
Kiro IDEkiro-ideYesYesFull (native sub-agents)~/.kiro
OpenClawopenclawYesYesSingle-agent~/.openclaw
Traetrae-ideYesYesSingle-agent~/.trae
PipiYesYesFull (package sub-agents)~/.pi
HermeshermesYesYesFull (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:

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

ModelHow it worksAgents
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 executeClaude 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 summaryHermes
Native multi-agentThe orchestrator delegates through the agent's native collaboration tools when they are configured and available, with inline execution as a graceful fallbackCodex
Single-agentAll SDD phases run inline in the same conversation. The orchestrator IS the executor. Engram provides persistence between phasesWindsurf, Antigravity, OpenClaw, Trae

Notes by agent

Claude Code

OpenCode

Codex

Cursor

Kiro IDE

Windsurf

Hermes

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 needUse this
Default SDD conductorgentle-orchestrator
Legacy configurationssdd-orchestrator migrates to gentle-orchestrator during sync
Named model profilessdd-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

Pi is managed through packages, not only configured

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:@juicesharp/rpiv-ask-user-question
pi install npm:pi-web-access
pi install npm:pi-btw
PackageWhat it adds
gentle-piGentleman persona, ODD and optional SDD/OpenSpec, configured TDD support, safety policy, skills, prompts, SDD agents, and SDD chains
gentle-engramPi integration for Engram session memory and MCP tools. It is not the Engram binary
pi-mcp-adapterLets Pi expose MCP servers, including Engram, through Pi's MCP runtime
pi-engram initInitializes the Pi Engram MCP configuration shape owned by gentle-engram
@juicesharp/rpiv-ask-user-questionLets Pi child agents ask the active user session for clarification when they need human input
pi-web-accessAdds web access tools for Pi
pi-btwAdds BTW companion workflow support for Pi

Discovering and running SDD agents from .pi/agents/ is provided by gentle-pi's Gentle Agents, which ships the same subagent_* tools that the retired companion package provided. When a settings file pins gentle-pi below 2.5.0, Gentle AI keeps npm:pi-subagents-j0k3r. For a current or unpinned install, or a gentle-pi pin at 2.5.0 or later, it removes npm:pi-subagents-j0k3r and npm:@juicesharp/rpiv-todo from settings.json on the next install or update so Pi uninstalls them on its next package sync.

Pi commands

CommandWhat it does
/gentle:statusShows package, SDD asset, OpenSpec, and model configuration status
/gentle:personaSwitches between the gentleman and neutral personas
/gentle:modelsOpens Pi's native model-assignment modal
/gentle-sdd-initBootstraps or refreshes openspec/config.yaml
/gentle:install-sddReinstalls SDD assets without overwriting local files
/gentle:install-sdd --forceForce-refreshes installed SDD assets. Use this when you explicitly want package assets to replace local copies.

Recommended model assignment

Agent typeRecommended model shape
Explore, propose, archiveFast and inexpensive is usually enough
Spec, design, tasksStrong reasoning model, because these phases shape implementation
ApplyStrong coding model with reliable tool use
Verify / review agentsStrong model with fresh context. Verification benefits from independence
Small utility agentsInherit 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
About pi -ns

Starting 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

SymptomSolution
Gentle AI says Pi is missingInstall Pi first and make sure pi is on the PATH
SDD agents are missing in PiStart Pi normally in the project so gentle-pi can run session_start, or run /gentle:install-sdd. If you used pi -ns, startup hooks were skipped.
The persona did not change immediatelyRun /reload or start a new Pi session
You want to remove a model overrideOpen /gentle:models and choose Inherit active/default model
Memory tools or /mcp are missingRun gentle-ai install --agent pi again to refresh .pi/agent/settings.json, .pi/npm/package.json, and the pi-engram init wiring, then check /gentle:status
gentle-engram installed but Engram is unavailableRun 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

FlagDescription
--agent, --agentsAgents to configure, separated by commas
--component, --componentsComponents to install, separated by commas
--skill, --skillsSkills to install, separated by commas
--personagentleman, neutral, or custom
--presetfull-gentleman, ecosystem-only, minimal, or custom
--sdd-modeSDD orchestrator mode: single or multi
--scopeglobal (default) or workspace
--dry-runPreview 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
Sync scope

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

FlagDescription
--agent, --agentsAgents to synchronize (default: all installed agents)
--skill, --skillsSkills to synchronize
--sdd-modesingle or multi
--strict-tddEnable Strict TDD mode for SDD agents
--profileCreate or update an SDD profile: nombre:proveedor/modelo
--profile-phaseOverride a specific phase: nombre:fase:proveedor/modelo
--sdd-profile-strategygenerated-multi or external-single-active
--include-permissionsInclude permission synchronization (opt-in)
--include-themeInclude theme synchronization (opt-in)
--dry-runPreview 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.

SituationBehavior
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=1Automatically accepts without asking. Child processes inherit the variable, so scope it to one invocation
GENTLE_AI_NO_SELF_UPDATE=1Completely 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.

CheckWhat it verifies
Tool binariesRequired tools are present on the PATH; detects shadowing (the wrong binary resolving first)
state.json validityParses ~/.gentle-ai/state.json and reports schema problems or corruption
Engram MCP reachabilityConfirms that the Engram MCP server responds
Disk spaceWarns 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

  1. Calculates a checksum for every file to back up.
  2. Skips the backup if it would be identical to the most recent one (deduplication).
  3. Creates a compressed snapshot (snapshot.tar.gz) with all your configuration files.
  4. Prunes old backups: retains the 5 most recent and deletes the rest.

Snapshot contents

Backup scope

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

SettingDefaultBehavior
Number to retain5The 5 most recent unpinned backups are kept
Pinned backupsNever deletedSurvive pruning regardless of count
DuplicatesSkippedIf the configuration did not change, no new backup is created
CompressionAlwaysNew backups use tar.gz (~75% smaller)

Managing from the TUI

KeyAction
j / kNavigate up/down
EnterRestore the selected backup
pPin/unpin (protects from pruning)
rRename (add a description)
dDelete
EscGo back

Restore behavior

What rollback does NOT cover

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

  1. Review the failed checks in the verification report.
  2. Restore from the latest snapshot through the TUI or gentle-ai restore latest.
  3. Run install again with --dry-run to validate the plan.
  4. Run install again after fixing external dependencies.

Release verification

v3.4.0 publishes eight assets under one signed checksum manifest: four platform .tar.gz archives for macOS and Linux (amd64 and arm64), gentle-ai-review-provider-contract-1.2.0.tar.gz, the release-provenance archive, checksums.txt, and checksums.txt.minisig. The checksum manifest covers the six archives and is authenticated by the Minisign signature.

Official macOS and Linux release files require that 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.

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 trusted comment on v3.4.0: repo=Gentleman-Programming/gentle-ai;tag=v3.4.0
sha256sum --check --strict --ignore-missing checksums.txt
Do not establish trust from a key delivered beside what it verifies

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. Until then, Windows installs from source with go install.

Version policy

v3.4.0 was released as stable on 2026-09-19. This page is a pinned snapshot of that release; its provider contract remains byte-frozen at 1.2.0.

ChannelVersionInstallation
Stablev3.4.0 2026-09-19go install github.com/gentleman-programming/gentle-ai/v3/cmd/gentle-ai@latest
Developmentmaingo install github.com/gentleman-programming/gentle-ai/v3/cmd/gentle-ai@main

@latest describes the stable channel and @main describes unreleased development. For this reproducible snapshot, install the exact release instead: go install github.com/gentleman-programming/gentle-ai/v3/cmd/gentle-ai@v3.4.0.

Upgrading to v3.4.0

What's new

Breaking change: the RTK integration is retired.

Six fixes: OpenCode V1 lens-capture provider-task relay; VictoriaMetrics 64 MiB scrape ceiling; telemetry dedup retention and daily compaction; no OpenCode configuration when it is unselected; the native Claude discovery test gated at CLI v2.1.154; and Windows Full Suite test fixes.

After replacing the binary, run gentle-ai sync to install matching managed assets. The 1.2.0 provider contract remains byte-frozen.


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 bound call, including the pending acknowledgement. A burned lineage is never reused.
Approval
The terminal approved state pending its exact acknowledgement. It is not delivery authority.
Receipt
A historical terminal record. Compact review does not publish a receipt, and no receipt authorizes delivery.
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 after the exact acknowledgement succeeds. It is not a compact receipt or delivery authority.
Projection projection
What START freezes: workspace (the entire workspace, default) or staged (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 in v2.5.0 together 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 compact correction: 0 for zero original lines; otherwise max(2, min(200, ceil(original_changed_lines / 2))). It is frozen at START; the old formula applies only to historical and non-compact authority.
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 taskStart here
Understand the Gentle AI mental modelIntended Usage
Choose direct, delegated, or optional SDD routingOrganic Implementation Routing
Understand the RDD architectureOrganic RDD
Review or deliver a change safelyReview Integration Contract
Know the technical limits of review authorityReview Authority Threat Model
Configure a supported agentAgents
Use the Pi harnessPi Agent
Version SDD artifacts as filesOpenSpec Config
Find or share persistent contextEngram Commands
Recover an installationBackup & Rollback
Understand verifiable trustChapter 21 — Verifiable Trust
Browse the source codeGentleman-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.