Core concepts
Before diving deep into p0, familiarize yourself with the key concepts that shape how you work with the AI coding assistant. These building blocks work together to create a safe, productive development workflow.Foundational concepts
Workspaces
Workspaces
A workspace is a container for one or more git repositories, along with shared settings, coding standards, and plugins. Workspaces let you:- Work across multiple repos in a unified environment
- Define project-wide conventions and preferences
- Share context between sessions
- Install workspace-scoped plugins
Sessions
Sessions
A session represents a single coding task within a workspace. Each session:- Gets its own isolated git worktree for safety
- Has a dedicated chat thread for communication
- Can run in Plan mode (read-only) or Agent mode (full execution)
- Tracks all changes and tool executions
Modes
Plan vs Agent modes
p0 operates in two distinct modes:Plan mode (read-only):- Analyzes your codebase without making changes
- Generates detailed implementation plans
- Researches files and dependencies
- Safe for exploration and brainstorming
- Implements changes using real tools
- Runs bash commands, edits files, searches the web
- Shows real-time tool output
- Creates commits and manages git
Spec-driven workflow
Spec-driven workflow
p0 follows a five-phase pipeline for complex features:- Product spec: Define what you’re building and why
- Tech spec: Plan the technical implementation
- Implementation: Execute the changes
- Pull request: Review and merge
- Post-PR: Follow-up tasks and refinements
Tools
Real-time tools
When running in Agent mode, p0 uses tools to interact with your codebase:- Bash: Run terminal commands
- File operations: Read, write, edit files
- Web search: Research APIs and documentation
- Git operations: Commit, branch, diff
Sub-chats
Sub-chats
Complex sessions can have multiple conversation threads called sub-chats:- Break large tasks into focused discussions
- Work on parallel concerns simultaneously
- Keep related context together
- Switch between threads without losing progress
How it all fits together
Here’s how these concepts work together in a typical p0 workflow:- You create a workspace for your project and add repositories
- You start a session for a specific task (e.g., “Add user authentication”)
- p0 operates in Plan mode to analyze and create a plan
- You review the plan and switch to Agent mode for execution
- p0 uses tools (bash, file edits) to implement changes in an isolated git worktree
- For complex features, you follow the spec-driven workflow with multiple phases
- You use sub-chats to work on different aspects in parallel
- When complete, you review the diff and create a pull request
Git worktree isolation
One of p0’s most important safety features is git worktree isolation. Each session runs in its own worktree, which means:- Your main branch stays clean and untouched
- Multiple sessions can run concurrently without conflicts
- You can experiment freely without risk
- Failed sessions don’t pollute your workspace
Available models
p0 is powered by Anthropic’s Claude models. You can switch between models using the/model command or the model selector in the chat header:
- Claude Sonnet — fast, efficient performance for most coding tasks (default)
- Claude Opus — maximum capability for complex reasoning and planning
- Claude Haiku — lightweight model for quick tasks