Quick Start¶
This guide walks you through your first ContextHarness session.
1. Analyze Your Project (First Time Only)¶
This analyzes your codebase and generates:
PROJECT-CONTEXT.md— Information about your project's structure, patterns, and conventionsAGENTS.md— AI agent instructions for working with your codebase
PROJECT-CONTEXT.md— Information about your project's structure, patterns, and conventionsCLAUDE.md— AI agent instructions for working with your codebase
Working in a Monorepo?
Use --path to analyze specific projects:
apps/frontend/PROJECT-CONTEXT.md and the appropriate memory file for that specific project. 2. Start a Session¶
This:
- Creates a new session at
.context-harness/sessions/login-feature/ - Creates a git branch
feature/login-feature(ifghis available) - Initializes
SESSION.mdfor tracking your work
3. Do Your Work¶
Work on your feature as usual. The agent will:
- Track modified files
- Record important decisions
- Save documentation references
4. Save Your Context¶
Manually save your progress:
Automatic Compaction
ContextHarness automatically compacts every 2nd user interaction, so you don't always need to run this manually.
5. Create a Pull Request¶
When you're done:
This creates a GitHub PR with:
- Summary from your session context
- List of changes
- Link to related issue (if created with
/issue)
Typical Workflow¶
Same Commands, Same Workflow
ContextHarness commands work identically in both OpenCode and Claude Code. The only differences are the folder structure and configuration files.
Switching Sessions¶
You can work on multiple features:
/ctx login-feature # Work on login
/ctx api-refactor # Switch to API work (login context saved)
/contexts # List all sessions
/ctx login-feature # Return to login (context restored)
Next Steps¶
- Commands Reference — All available commands
- Sessions — Deep dive into session management