Prerequisites
- Gemini CLI installed and configured
- Git installed for cloning the repository
- Access to
~/.gemini/directory GEMINI_SYSTEM_MD=1environment variable set
Installation Steps
Configure system prompt
Gemini CLI requires the system prompt to be enabled via environment variable.Add to your shell profile (Apply changes:
~/.bashrc, ~/.zshrc, etc.):Add orchestrator to GEMINI.md
Open or create the Gemini system prompt file:Append the contents from
If the file doesn’t exist, create it. This file contains system-level instructions for Gemini CLI.
examples/gemini-cli/GEMINI.md to your existing file.View orchestrator instructions
View orchestrator instructions
The orchestrator section teaches Gemini CLI to:
- Detect SDD triggers and commands
- Read skill files from
~/.gemini/skills/sdd-*/SKILL.md - Execute skills inline (within current context)
- Track state between phases
- Follow artifact storage policies
- Operating Mode (delegate-only principle)
- Artifact Store Policy
- Commands table
- Command → Skill Mapping
- Engram Artifact Convention
Configuration Locations
Skills Directory
~/.gemini/skills/sdd-*/Contains 9 skill folders + _shared/ conventionsSystem Prompt
~/.gemini/GEMINI.mdOrchestrator instructions and system configurationEnvironment
~/.gemini/.envMust contain GEMINI_SYSTEM_MD=1How Inline Execution Works
Unlike Claude Code or OpenCode, Gemini CLI doesn’t have a Task tool for sub-agent delegation. Instead: Key differences:- Skills run in the same context window as the orchestrator
- No fresh context per phase (more context usage)
- Still provides structured workflow and artifact management
- Planning phases work well; implementation may hit context limits on large features
Example Usage
Initialize SDD
Start a New Feature
Fast-Forward Planning
Artifact Storage
- engram (Recommended)
- openspec
- none
mem_observe tool if the MCP server is installed and running.Storage format:System Prompt Setup
Gemini CLI requires the system prompt to be explicitly enabled:Option 1: Environment Variable (Global)
Add to shell profile:Option 2: .env File (Per-Session)
Create or edit~/.gemini/.env:
Verify System Prompt is Loaded
GEMINI.md.
Verification Checklist
Troubleshooting
Command not recognized
Command not recognized
Problem: Gemini doesn’t recognize
/sdd-initSolutions:- Check
GEMINI_SYSTEM_MD=1is set:echo $GEMINI_SYSTEM_MD - Verify
~/.gemini/GEMINI.mdcontains SDD orchestrator instructions - Restart terminal session to reload environment variables
- Try alternative phrasing: “Initialize SDD for this project”
Skills not found
Skills not found
Problem: Gemini can’t read skill filesSolutions:
- Verify skills are in
~/.gemini/skills/sdd-*/ - Check file permissions allow reading
- Ensure each skill has
SKILL.mdfile - Try absolute path in orchestrator instructions
System prompt not loading
System prompt not loading
Problem: Orchestrator instructions not activeSolutions:
- Set environment variable:
export GEMINI_SYSTEM_MD=1 - Add to shell profile for persistence
- Verify
~/.gemini/GEMINI.mdexists and is readable - Restart Gemini CLI after making changes
Context window issues
Context window issues
Problem: Errors about context length on large featuresSolutions:
- Use
/sdd-explorefirst to understand scope before committing - Break large features into smaller changes
- Use
noneartifact mode to reduce context usage - Consider using Claude Code or OpenCode for large features (true sub-agents)
Limitations vs Claude Code/OpenCode
| Feature | Gemini CLI | Claude Code / OpenCode |
|---|---|---|
| Sub-agent delegation | ❌ Inline execution | ✅ Fresh context per phase |
| Context isolation | ❌ Shared context | ✅ Isolated per sub-agent |
| Large feature support | ⚠️ Context limits | ✅ Scales better |
| Setup complexity | ✅ Simple | ⚠️ Requires Task tool |
| Planning phases | ✅ Works well | ✅ Works well |
| Implementation | ⚠️ May hit limits | ✅ Batched execution |
For the best sub-agent experience with fresh context windows, consider using Claude Code or OpenCode.
Next Steps
Quick Start
Learn the SDD workflow
Commands Reference
Complete command documentation
Engram Setup
Install recommended persistence
Upgrade to OpenCode
Get true sub-agent support