CLI Reference
Felix 2.2.0 CLI: Legacy Field Guide
Felix 2.2.0 legacy documentation: These commands describe the final Felix 2 release and are retained for existing V2 projects. Felix 3 is a breaking-change successor with separate setup and command paths. Start with the Felix 3 preview notes, use felix v3 setup --harness <claude-code|opencode|codex> for new projects, or preview a V2 migration with felix v3 migrate. Felix Cloud users must move to Felix 3 at the announced Cloud cutover. The V2.2.0 release is the final V2 release.
Overview
Felix 2.2.0 legacy documentation: These commands describe the final Felix 2 release and are retained for existing V2 projects. Felix 3 is a breaking-change successor with separate setup and command paths. Start with the Felix 3 preview notes, use felix v3 setup --harness <claude-code|opencode|codex> for new projects, or preview a V2 migration with felix v3 migrate. Felix Cloud users must move to Felix 3 at the announced Cloud cutover. The V2.2.0 release is the final V2 release.
What You're Actually Looking At
Think of Felix like having a tireless junior developer who never gets distracted, never needs coffee breaks, and follows instructions precisely—but also needs very specific commands to know what to do. The Felix CLI is how you talk to this junior dev.
Unlike traditional CLIs that just execute single commands and exit, Felix orchestrates multi-step workflows that can run for hours: reading specs, analyzing code, making changes, running tests, committing to git, and validating results. It's more like a deployment pipeline than a simple command-line tool.
The Core Commands: Your Daily Drivers
What it does: Tells the agent "work on this specific requirement until it's done or you hit a wall."
felix run S-0001When to use it:
- You have a specific requirement ready to implement
- You want focused, controlled execution
- You're testing a new spec before letting the agent loose
Real-world example:
# Execute requirement with rich terminal output (default)
felix run S-0042
# Get JSON events for parsing in scripts
felix run S-0042 --format json
# Push artifacts to backend server
felix run S-0042 --syncWhat happens when it runs: Felix iterates on the requirement until it completes, is blocked by tests/validation, or hits an error. Control verbosity with --format, --verbose, and --quiet.
Exit codes tell the story:
0= Success (requirement completed and validated)1= Error (agent crashed or hit an unexpected failure)2= Blocked by backpressure (tests failed too many times)3= Blocked by validation (acceptance criteria failed)
What it does: Autonomously processes all planned/in-progress requirements until the backlog is empty or you stop it.
felix loopWhen to use it:
- Friday afternoon before the weekend (let it work while you're gone)
- You have 20 small requirements and don't want to babysit each one
- You trust your specs and backpressure tests
When NOT to use it:
- Your specs are half-baked or vague
- You haven't validated your test suite catches regressions
- It's Monday morning and your boss wants a demo at 10 AM
Options:
# Limit to 5 requirements then stop
felix loop --max-iterations 5
# Continuously sync artifacts to backend
felix loop --sync
# Skip git commits (useful for reviewing before committing)
felix loop --no-commitPro tip: Loop mode creates lock files in .felix/.locks/loop-<PID>.lock to prevent multiple loops from colliding. If Felix crashes and leaves a stale lock, you'll need to manually clean it up.
Tip: Clear acceptance criteria and stable tests make loop mode far more reliable.
What it does: Finds the next available requirement and runs it immediately — server-assigned in team mode, locally-picked in solo mode.
felix run-next
felix run-next --sync # enable sync for this run
felix run-next --format jsonRemote mode (sync enabled): claims work from the server so multiple agents on the same project never collide. Marks it reserved, then transitions to in_progress when the agent starts.
Local mode: picks the next in_progress then planned requirement from requirements.json, sorted by ID.
Exit codes:
| Code | Meaning |
|---|---|
0 | Requirement completed successfully |
2/3 | Blocked — claim auto-released back to planned |
5 | No work available — nothing planned or already all claimed |
The 5 exit code is designed for CI poll loops:
while ($true) {
felix run-next --sync
if ($LASTEXITCODE -eq 5) { Start-Sleep 60 } # nothing to do, wait
elseif ($LASTEXITCODE -ne 0) { break } # error or block needs attention
}Status & Visibility Commands
Check on everything:
felix statusCheck one requirement:
felix status S-0001Get machine-readable output:
felix status --format jsonWhat you'll see:
- Current requirement status (planned, in_progress, complete, blocked)
- Agent name and last execution time
- Validation results
- Git commit associated with completion
Why this matters: When your agent has been churning for 30 minutes and you're wondering if it's actually working or stuck in a loop, felix status is your reality check.
All requirements:
felix listFilter by status:
felix list --status planned
felix list --status complete
felix list --status blockedFilter by priority:
felix list --priority high
felix list --priority lowFilter by tags (comma-separated):
felix list --tags backend
felix list --tags backend,authShow requirements blocked by incomplete dependencies:
felix list --blocked-by incomplete-depsInclude dependency details in output:
felix list --with-depsJSON for scripting:
felix list --format json | jq '.[] | select(.status == "blocked")'Useful patterns:
# Morning standup: what got done overnight?
felix list --status complete
# Planning: what's ready to work on?
felix list --status planned
# What's stuck on unfinished dependencies?
felix list --blocked-by incomplete-deps
# Troubleshooting: what's stuck?
felix list --status blockedValidation & Dependencies
What it does: Runs the validation criteria from the requirement spec without running the full agent loop.
What question it answers:
- Did we achieve what this requirement says should be true?
- Do the concrete checks in the spec pass right now?
How it works:
- Reads the requirement's spec file
- Looks at
## Validation Criteria(or## Acceptance Criteria) - Runs the commands listed there
- Compares outcomes against expected exit codes/status
- Returns pass/fail with reasons and output
Important: felix validate is a requirement-level done check, not a generic quality score.
felix validate S-0001Why you need this:
- Testing your acceptance criteria before letting the agent loose
- Debugging failures - run validation in isolation to see what's actually broken
- Post-deployment checks - validate requirements still work after merging
Practical impact:
- Validation is only as strong as your criteria
- Vague or manual-only criteria can pass without strong proof
- Explicit runnable checks (
pytest, API checks, UI smoke tests) make it a strong completion gate
Distinction:
felix validate= requirement-level acceptance verification- Backpressure in
felix run/felix loop= iteration-level safety gate (tests/build/lint before committing)
Validation criteria format (from your spec file):
## Validation Criteria
- [ ] Backend starts: `python app/backend/main.py` (exit code 0)
- [ ] Health endpoint responds: `curl http://localhost:8080/health` (status 200)
- [ ] Tests pass: `pytest app/backend/tests` (exit code 0)Critical rule: Only use backticks for actual executable commands. If it's not meant to run in a shell, don't wrap it in backticks. We learned this the hard way when someone wrote:
- [ ] File exists: `app/backend/config.py`The validator tried to execute "app/backend/config.py" as a command and exploded. Correct version:
- [ ] File exists: **app/backend/config.py** (file exists)Show dependencies for one requirement:
felix deps S-0001Check if dependencies are satisfied:
felix deps S-0001 --checkSee the full dependency tree:
felix deps --treeFind what's blocking progress:
felix deps --incompleteWhy dependencies matter: Requirements have depends_on relationships. If S-0005 depends on S-0003 and S-0004, the agent won't start S-0005 until both dependencies are complete. This prevents building features on top of features that don't exist yet.
Dependency resolution is smart:
- Transitive dependencies work (A depends on B, B depends on C → A waits for C)
- Circular dependencies are detected and rejected
- Incomplete dependencies automatically block execution
Specification Management
Interactive mode (asks questions):
felix spec create "Add user authentication"Quick mode (makes reasonable assumptions):
felix spec create "Add user authentication" --quickWhat --quick does:
- Skips asking for detailed description (uses the title)
- Defaults to planned status
- No dependencies
- Generates minimal acceptance criteria
Interactive mode asks:
- Do you want to provide a detailed description? (y/N)
- What status should this be? (planned/draft/in-progress)
- Does this depend on other requirements? (comma-separated IDs)
- Do you want to generate acceptance criteria with the agent? (y/N)
What it creates: A new spec file in specs/ with a new requirement ID and frontmatter. In interactive mode it can also help draft acceptance criteria.
Pro tip: Use --quick for small, obvious requirements. Use interactive mode for complex features that need detailed planning.
Scan specs folder and fix alignment:
felix spec fixAuto-rename duplicate spec IDs:
felix spec fix --fix-duplicatesWhat this does: Scans all S-*.md files in specs/ and reconciles them against .felix/requirements.json:
- Adds entries for spec files that are missing from
requirements.json - Removes stale entries for requirements that no longer have a spec file
- With
--fix-duplicates: detects duplicateS-NNNNIDs and renames files to the next available ID
When to use:
- After manually creating or deleting spec files without using
felix spec create/delete - After cloning a repo where
requirements.jsonis out of sync withspecs/ - When you see "requirement not found" errors that don't match your spec files
Delete with confirmation:
felix spec delete S-0001What gets deleted:
- The spec file (
specs/S-NNNN.md) - The requirement entry in
.felix/requirements.json
What stays:
- Historical run artifacts in
runs/(for audit trail) - Git history (no force deletion)
Safety: Prompts for confirmation unless you're piping input or using --force.
Change the status of a requirement:
felix spec status S-0042 planned
felix spec status S-0042 in_progress
felix spec status S-0042 complete
felix spec status S-0042 blockedWhat it does: Updates the status field for the given requirement in .felix/requirements.json. Useful for manually overriding status without hand-editing the JSON file.
Common use cases:
- Unblocking a blocked requirement:
felix spec status S-0042 planned - Manually marking something complete:
felix spec status S-0042 complete - Forcing a requirement back into the queue:
felix spec status S-0042 in_progress
Equivalent to: opening .felix/requirements.json and editing "status" directly, but without the risk of malforming the JSON.
Pull all specs that are out of date:
felix spec pullPreview without writing any files:
felix spec pull --dry-runForce overwrite of local files even if they exist:
felix spec pull --forceAlso delete local specs that no longer exist on the server:
felix spec pull --deleteWhat it does:
- Sends a manifest of local file hashes to the server
- Server responds with which files are missing, outdated, or current
- Downloads only the files that differ (
.mdspecs and.meta.jsonsidecars) - Writes them to
specs/in the project
What are `.meta.json` sidecars?
Each spec has an accompanying specs/S-NNNN-name.meta.json file containing rich metadata stored by the server:
{
"priority": "high",
"tags": ["backend", "auth"],
"depends_on": ["S-0001", "S-0002"],
"updated_at": "2026-02-23"
}- Generated automatically on
spec createandspec fix - Gitignored (
specs/*.meta.json) so they don't pollute version control - Used by the agent loop to resolve
depends_onfor the current requirement - Downloaded fresh each time via
felix spec pull
When to use it:
- Before starting work in remote/team mode to get the latest server state
- When another team member has updated spec priorities or dependencies
- After
felix setupon a new clone — pull specs before running the loop
Authentication: Requires sync.api_key in .felix/config.json or FELIX_SYNC_KEY env var.
# Typical workflow before running the agent loop in team mode
felix spec pull
felix loopUpload all specs:
felix spec pushPreview without uploading:
felix spec push --dry-runRe-upload all even if unchanged:
felix spec push --forceWhat it does: Reads all *.md files from specs/, encodes them as base64, and sends them to the server in a single batch for storage.
Added support and clarified behavior:
felix spec pushuploads localspecs/*.mdfiles to the backend viaPOST /api/sync/specs/upload.felix spec push --dry-runpreviews files that would be uploaded without sending.felix spec push --forcedoes two things:- Re-uploads all local specs.
- Requests server-side create-if-missing requirement mappings for specs that do not yet exist remotely.
Important: --force depends on backend support. If the server does not implement create-if-missing for spec upload, the CLI logs this clearly and explains that local spec fix only updates local requirements.json.
Authentication: Requires sync.api_key in .felix/config.json or FELIX_SYNC_KEY env var.
When to use:
- After creating or editing specs locally that you want remote agents to pick up
- Before starting a distributed team session — push local changes so others get them via
felix spec pull - After bulk-creating specs with
felix spec create --quick
Typical team workflow:
# Developer A: create and push specs
felix spec create "Add rate limiting" --quick
felix spec push
# Agent on another machine: pull and work
felix spec pull
felix loopContext Management
Standard build:
felix context buildInclude hidden files:
felix context build --include-hiddenSkip overwrite confirmation:
felix context build --forceWhat it does: Launches the agent to autonomously analyze your project and generate CONTEXT.md - a comprehensive document describing:
- Project purpose and architecture
- Tech stack and dependencies
- File structure and organization
- Key components and how they connect
- Development setup and workflows
Why this exists: Every project needs a "README for your brain" that explains the big picture. Rather than manually maintaining this (and watching it go stale), let the agent regenerate it periodically.
Pro tip: Run this after major architectural changes or before onboarding new team members. The agent will analyze file patterns, dependency graphs, import statements, and configuration files to understand your stack.
Time commitment: Usually takes 2-5 minutes depending on project size.
felix context showDisplays CONTEXT.md content in your terminal. Useful for quick reference without opening an editor.
Upload all three docs:
felix context pushPreview without uploading:
felix context push --dry-runRe-upload even if content is unchanged:
felix context push --forceWhat it does: Reads README.md, CONTEXT.md, and AGENTS.md from the repo root, skips files that haven't changed since the last push (using .felix/manifest-hashes.json as the cache), and uploads changed files to the server.
Authentication: Requires sync.api_key in .felix/config.json or FELIX_SYNC_KEY env var.
When to use:
- After updating
CONTEXT.mdto reflect architectural changes - After modifying
AGENTS.mdwith new agent instructions - Keeping the UI project page and remote agents in sync with your local docs
Download changed docs:
felix context pullPreview without writing files:
felix context pull --dry-runOverwrite local files not in the manifest cache:
felix context pull --forceWhat it does: Fetches the latest manifest from the server, compares it against the cached values in .felix/manifest-hashes.json (written after the last pull or push), and writes only the files that have changed. Shows [SKIP] for up-to-date files and [OK] for files that were updated.
Authentication: Requires sync.api_key in .felix/config.json or FELIX_SYNC_KEY env var.
When to use:
- When another team member has updated docs and pushed them
- Before a work session to ensure you have the latest
AGENTS.md - After another machine has run
felix context push
Typical workflow:
# Morning sync before starting work
felix context pull
felix spec pull
felix loopPlugin Architecture
Felix plugins let you extend the CLI without modifying the core engine. The plugin system is open source and designed around lifecycle hooks so you can add observability, notifications, or custom policy checks in a controlled way.
Where plugins run:
- Pre-iteration and post-iteration
- During context gathering
- Before and after the LLM runs
- After validation completes
- When backpressure fails
How plugins are packaged:
- PowerShell scripts with a JSON manifest
- Permissions defined per plugin (so extensions can be sandboxed)
- Stored in the Felix install
plugins/directory or project-local.felix/plugins/
What a manifest typically includes:
- Plugin name and version
- Entry point script
- Declared permissions (files, network, commands)
- Which hooks the plugin listens to
How plugins are enabled:
- Add them under the
pluginssection in.felix/config.json - Turn them on per project so teams can opt in without a global install change
Failure behavior:
- Plugins run inside the Felix lifecycle and are isolated from the core loop
- Failures surface as warnings; the run continues unless the plugin is configured as required
Built-in examples:
metrics-collectorfor iteration metricsprompt-enhancerfor context augmentationslack-notifierfor status notifications
Use plugins when you want to integrate Felix into existing tooling without forking the CLI.
Project Setup
felix setupWhat it does: Guided wizard for configuring a Felix project from scratch (or reconfiguring an existing one). Safe to re-run — idempotent, never overwrites files that already exist.
Steps:
- Confirm project folder — defaults to current directory; accepts a different path
- Mode choice — local (no server) or remote (server-backed team mode)
- Remote config — prompts for server URL, project git URL, and API key
- Bootstrap — runs
spec pull+spec fixto download and align requirements from the server - Agent configuration — interactive: prompts for LLM provider and model, writes
.felix/agents.json - Scaffold — creates
policies/,specs/,config.json,requirements.json,state.jsonfrom the engine template if missing - Test command — prompts for backpressure test command and mode
When to use:
- Bootstrapping a brand-new project
- Onboarding a new team member on an existing project
- After a global
felix installto set up a project without copying engine files
Agent Management
felix agent listOutput:
Available Agents:
* ID: ag_ee77df894 - claude
Provider: claude
Executable: claude
Adapter: claude
ID: ag_16fffb5a4 - codex
Provider: codex
Executable: codex
Adapter: codexThe * marks your current agent (configured in .felix/config.json). Agent IDs are generated automatically from agent config.
felix agent currentShows the currently configured agent with full details.
felix agent setupInteractive configuration for agents and default models. This writes or updates .felix/agents.json with selected agents and models.
felix agent use claudeInteractive selection:
felix agent useWhat it does: Updates .felix/config.json to use a different agent profile from .felix/agents.json.
Why you'd switch:
droidis fast and cheap, good for bulk workclaudehas better reasoning for complex problemscodexuses a diff-based workflow (different UX)geminiif you want to test Google's model
Agents are interchangeable from the CLI's perspective; switch to match cost, speed, or reasoning quality.
felix agent test droidWhat it does: Runs a quick smoke test to verify:
- Executable is in PATH
- Agent responds to commands
- JSON event stream works
- Basic code generation works
When to use this: After installing a new agent executable or updating versions.
felix agent registerWhat it does: Registers the current agent profile (from .felix/agents.json) with the sync server so it appears in the UI Fleet view and can claim work.
- Shows the target URL and API key prefix before attempting
- Prompts to proceed if sync is disabled in config
- Safe to re-run — repeated calls just refresh metadata
- Surfaces backend error detail inline: key mismatch, git URL mismatch, DB errors
Agent IDs are generated automatically, so .felix/agents.json only needs name, provider, and model. felix setup generates a correct agents.json automatically.
Process Management
felix procs
felix procs listShows:
- Session ID (run identifier)
- Requirement being executed
- Agent name
- Process ID (PID)
- Running duration
- Status (running/paused)
Example output:
Active Sessions:
Session: S-0042-20260217-143022-it1
Requirement: S-0042
Agent: droid
PID: 18432
Duration: 12:34
Status: runningWhy this matters: Sometimes you spawn felix loop in a background terminal and forget about it. felix procs shows you it's still churning away.
felix procs kill S-0042-20260217-143022-it1Kill all running sessions at once:
felix procs kill allWhat it does: Gracefully terminates an agent process:
- Sends termination signal
- Waits for agent to finish current iteration
- Cleans up lock files
- Updates requirement status
When you need this:
- Agent is stuck in an infinite loop
- You realized the spec is wrong mid-execution
- You need to free up CPU/memory for something else
Safety: This is a graceful shutdown. The agent finishes its current LLM call before exiting and commits any pending changes.
Utility Commands
felix tuiAlso available as:
felix dashboardWhat it does: Launches an interactive terminal UI (built with .NET/Spectre.Console) that provides:
- Visual requirement status and progress tracking
- Interactive command menu (run, loop, validate, etc.)
- Real-time status visualization
Navigation:
| Key | Action |
|---|---|
1-5 | Quick actions |
/ | Show all commands |
? | Help screen |
q | Quit dashboard |
Requirements: .NET SDK (dotnet CLI) must be installed. The TUI is the C# src/Felix.Cli project and is separate from the PowerShell CLI.
felix versionDisplays the Felix CLI version, current git branch, and short commit hash. Useful for bug reports and confirming which version is installed.
Example output:
Felix CLI v0.3.0-alpha (Phase 1: PowerShell)
Repository: C:\dev\myproject
Branch: main
Commit: a3f8c12felix help
felix help run
felix help loop
felix help spec
felix help context
felix help agent
felix help deps
felix help procs
felix help tuiPrints usage, options, and examples for any command. Running felix help with no argument prints the full command list.
Global Options: The Switches That Work Everywhere
JSON (machine-readable):
felix run S-0001 --format jsonEvery event as a complete JSON object on one line. Perfect for:
- Parsing in scripts
- Piping to other tools
- Remote execution / headless environments
Plain (human-readable text):
felix run S-0001 --format plainSimple colored text output. Good for:
- Basic terminal environments
- Log files
- CI/CD pipelines where colors might break
Rich (default, fancy):
felix run S-0001 --format richEnhanced visuals with:
- Progress indicators
- Colored output
- Formatted tables
- Statistics summary
Default: Rich format for interactive terminals, JSON for scripts/pipelines.
felix run S-0001 --verboseWhat you get:
- Debug-level log messages
- Internal state transitions
- LLM prompt construction details
- File I/O operations
- Git command execution
When to use it:
- Debugging agent behavior
- Understanding why a requirement failed
- Learning how Felix works internally
Warning: VERY chatty. Your terminal will scroll like the Matrix.
felix run S-0001 --quietWhat gets suppressed:
- Info-level messages
- Progress indicators
- Statistics
What you still see:
- Errors (obviously)
- Warnings
- Final status
Use case: Background jobs, cron tasks, CI/CD where you only want to know if it failed.
felix run S-0001 --no-statsNormally Felix shows a summary at the end:
=== Run Statistics ===
Events: 1,247
Errors: 2
Warnings: 5
Tasks completed: 8
Validations passed: 3
Duration: 4m 32sWith --no-stats, this is suppressed. Useful for:
- JSON output mode (stats would break parsing)
- Scripted execution where you don't care
- Minimalist aesthetic preferences
Advanced Switches: The Power User Tools
Operating Modes: Local vs Team
Felix runs in one of two modes depending on sync.enabled in .felix/config.json.
No server required. Everything runs from local files.
- Work selection reads
requirements.jsondirectly in_progressrequirements resume first, thenplanned, sorted by ID- Dependencies (
depends_on) read fromspecs/*.meta.jsonsidecars or inline inrequirements.json - No network calls during the agent loop
{
"sync": {
"enabled": false
}
}Requires a running Felix backend. Enables server-side work allocation so multiple agents can collaborate on the same project without stepping on each other.
{
"sync": {
"enabled": true,
"base_url": "http://localhost:8080",
"api_key": "fsk_..."
}
}How work allocation works:
Felix claims work from the server when you run felix loop and releases it if a run is blocked, so multiple agents can collaborate safely. Typical remote mode workflow:
# 1. Pull latest specs and metadata from server
felix spec pull
# 2. Start the autonomous loop (uses server work allocation)
felix loop
# Terminal 2 — second agent works in parallel on different requirements
felix loopEnvironment variable overrides (useful for CI/CD):
$env:FELIX_SYNC_ENABLED = "true"
$env:FELIX_SYNC_URL = "https://felix.company.com"
$env:FELIX_SYNC_KEY = "fsk_prod_key_here"
felix loopAdvanced Switches: The Power User Tools
Usage:
felix run S-0001 --sync
felix loop --syncWhat it does: Enables artifact mirroring to a remote backend for this run only, overriding the sync.enabled setting in .felix/config.json.
Why temporary override?
- You normally run locally without sync (faster, no network dependency)
- But for important requirements you want artifacts backed up
- Or you're showing progress to stakeholders who don't have local access
What gets synced:
- Agent registration (hostname, platform, version)
- Run creation (requirement ID, start time)
- Events (full NDJSON stream)
- Output files (logs, diffs, reports)
- Run completion (status, exit code)
Architecture:
CLI Agent → Writes locally to runs/ → Queues to .felix/outbox/*.jsonl
→ Background sync uploads to backend
→ Retry on failure (exponential backoff)Sync failure handling:
- Non-blocking: Agent continues even if sync fails
- Queued: Failed uploads retry later when backend comes back
- Eventual consistency: All artifacts eventually reach the backend
- Duplicate uploads are skipped
Configuration hierarchy:
--syncflag (highest priority - this run only)$env:FELIX_SYNC_ENABLEDenvironment variable.felix/config.jsonsync.enabled setting (persistent)
Pro tip: Set up sync for production/staging environments but disable for local dev:
# Production deployment
$env:FELIX_SYNC_ENABLED = "true"
$env:FELIX_SYNC_URL = "https://felix.company.com"
$env:FELIX_SYNC_KEY = "fsk_prod_key_here"
felix loop# Local development (no sync)
felix run S-0001Troubleshooting: If sync isn't working, check .felix/outbox/ for queued files. If you see hundreds of *.jsonl files, the agent couldn't reach the backend. Clean them up or let them retry when the network recovers.
Usage:
felix spec create "Add user authentication" --quickWhat it skips:
- Detailed description prompts
- Dependency questions
- Status selection (defaults to "planned")
- Acceptance criteria generation
What you get:
- Spec file with title only
- Minimal frontmatter
- Ready to edit manually
When to use it:
- You know exactly what you want
- You'll flesh out details later
- You have 20 small requirements to batch-create
Time savings: Interactive mode: ~2-3 minutes per spec. Quick mode: ~5 seconds.
Usage:
felix run S-0001 --no-commitWhat it does: Agent makes all code changes but skips git commit at the end.
When to use it:
- Testing a new spec for the first time
- Prototyping agent behavior
- You want to review changes before committing
Why this exists: Early on, we'd test a spec and Felix would commit broken code with a message like "Implement feature X [Claude]". Then we'd have to git reset --hard and lose the changes. --no-commit lets you see what the agent did before deciding to keep it.
Pro tip: Combine with --format plain for testing:
felix run S-0001 --no-commit --format plain | tee test-output.logReview changes, then either commit manually or discard:
# Keep it
git add -A
git commit -m "Implement S-0001 (manually verified)"
# Discard it
git reset --hardThe Exit Code Contract: What They Mean
Felix uses exit codes to communicate status in scripts/CI:
| Code | Meaning | What to Do |
|---|---|---|
0 | Success | Requirement complete, tests pass, validated |
1 | Error | Agent crashed, unexpected failure, infrastructure issue |
2 | Blocked (Backpressure) | Tests failed 3 times, agent gave up |
3 | Blocked (Validation) | Acceptance criteria failed 2 times |
5 | No Work Available | Nothing planned — used by felix run-next; safe in CI |
Why this matters for automation:
felix run S-0042
$exitCode = $LASTEXITCODE
if ($exitCode -eq 0) {
# Success - deploy to staging
deploy-to-staging
}
elseif ($exitCode -eq 2 -or $exitCode -eq 3) {
# Blocked - manual intervention needed
send-slack-notification "S-0042 blocked, needs attention"
}
else {
# Error - retry later
schedule-retry
}Unblocking requirements:
When Felix exits with code 2 or 3, it marks the requirement as "blocked" in .felix/requirements.json. To unblock:
- Fix the underlying issue (broken tests, wrong acceptance criteria)
- Edit
.felix/requirements.jsonand change status from"blocked"to"planned" - Run Felix again - it will pick up the unblocked requirement
Common causes:
- Exit 2: Flaky tests, missing test data, environment issues
- Exit 3: Vague acceptance criteria, feature genuinely incomplete
Troubleshooting Quick Hits
Symptom: Felix refuses to start with "Another process is running."
Fix: Confirm nothing is running:
felix procs listIf nothing is running:
Remove-Item .felix/run.lockSymptom: Output contains strange characters or unreadable arrows.
Fix (PowerShell 5.1):
chcp 65001 | Out-Null
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8Symptom: --sync enabled but nothing appears on the server.
Fix: Verify FELIX_SYNC_URL and FELIX_SYNC_KEY, then check for queued uploads in .felix/outbox/.
Best Practices: How Good Engineers Use Felix
Bad:
- [ ] User authentication worksGood:
- [ ] Login endpoint responds: `curl -X POST http://localhost:8080/api/auth/login -d '{"username":"test","password":"test"}' -H "Content-Type: application/json"` (status 200)
- [ ] Invalid credentials rejected: `curl -X POST http://localhost:8080/api/auth/login -d '{"username":"test","password":"wrong"}' -H "Content-Type: application/json"` (status 401)
- [ ] Auth tests pass: `pytest app/backend/tests/test_auth.py` (exit code 0)Don't:
# Write 50 requirements
# Run felix loop
# Go on vacation
# Come back to 47 failuresDo:
# Write 3 requirements
# Run felix run S-0001
# Verify it works
# Adjust your spec style based on what worked
# Write 5 more requirements
# Run felix loop --max-iterations 5
# Verify those work
# Now scale upWhen you have a mental model of 20 small requirements:
# Create them all with --quick
felix spec create "Add user login" --quick
felix spec create "Add password reset" --quick
felix spec create "Add email verification" --quick
# ... 17 more ...
# Go back and flesh out details for complex ones
felix spec fix S-0042
felix spec fix S-0051Don't just fire and forget:
# Terminal 1: Run the loop
felix loop --sync
# Terminal 2: Watch progress
watch -n 30 'felix status'
# Terminal 3: Check for blockages
felix deps --incompleteLocal dev: No sync (fast, no network dependency)
felix run S-0001Integration environment: Sync for troubleshooting
felix run S-0001 --syncProduction automation: Always sync
$env:FELIX_SYNC_ENABLED = "true"
felix loopTrack agent configuration changes in git:
git add .felix/agents.json
git commit -m "Switch default agent to claude for better reasoning"Why? When a requirement fails, you want to know which agent ran it and with what configuration.
Run artifacts accumulate fast:
runs/
2026-02-01T10-30-00/
2026-02-01T11-15-22/
2026-02-01T14-45-10/
... 500 more ...Periodically archive:
# Move runs older than 30 days to archive
$cutoff = (Get-Date).AddDays(-30)
Get-ChildItem runs/* | Where-Object { $_.CreationTime -lt $cutoff } | Move-Item -Destination archive/runs/Before letting the agent work on a requirement:
# Run the validation commands yourself
python app/backend/main.py # Does it start?
curl http://localhost:8080/health # Does the endpoint work?
pytest app/backend/tests/ # Do the tests pass?
# If any fail, your criteria are wrong
felix validate S-0042 # Confirm with the validatorCommon Workflows
Monday morning:
# Review what's ready
felix list --status planned
# Check dependencies
felix deps --tree
# Start the first batch
felix run S-0042
felix run S-0043
felix run S-0044CI/CD pipeline:
# .github/workflows/felix.yml
- name: Run Felix requirements
run: |
felix loop --max-iterations 10 --format json --sync
env:
FELIX_SYNC_ENABLED: "true"
FELIX_SYNC_URL: ${{ secrets.FELIX_BACKEND_URL }}
FELIX_SYNC_KEY: ${{ secrets.FELIX_API_KEY }}Before leaving Friday:
# Start loop in background
nohup felix loop --sync > felix-loop.log 2>&1 &
# Check progress Monday morning
felix status
grep -i error felix-loop.log
felix list --status blockedProduction is down, need quick fix:
# Create requirement
felix spec create "Fix authentication timeout issue" --quick
# Edit spec with exact criteria
code specs/S-0078.md
# Run focused execution, no distractions
felix run S-0078 --format plain --no-stats
# Verify fix
felix validate S-0078
# Deploy
git pushDebugging Guide: When Things Go Wrong
Error: "Another process is running"
Check:
felix procs listFix if stale:
Remove-Item .felix/run.lockCheck:
# See what it's doing
felix status S-0042 --format json | jq .current_iteration
# If iteration count keeps growing...
felix procs kill <session-id>Common causes:
- Vague acceptance criteria that are never satisfied
- Flaky tests that sometimes pass/fail
- Agent making changes that break tests in a cycle
Symptoms: No artifacts appear in backend
Check local queue:
Get-ChildItem .felix\outbox\*.jsonl | Measure-ObjectIf empty: Sync disabled or failing silently
If hundreds: Network issue or backend down
Test backend connectivity:
curl http://localhost:8080/healthEnable debug logging:
felix run S-0001 --sync --verbose 2>&1 | Select-String -Pattern "sync"Problem: Acceptance criteria look right, but validation fails
Debug:
# Run validation with verbose output
felix validate S-0042 --verbose
# Manually run the failing command
python app/backend/main.py # Does it actually work?
# Check for environmental issues
echo $PATH
which python
python --versionCommon gotchas:
- Wrong Python version
- Missing environment variables
- Database not running
- Port already in use
Putting It All Together: A Real Example
Let's implement a complete feature using Felix:
# 1. Create the requirement
felix spec create "Add rate limiting to API endpoints"
# 2. Review auto-generated spec
code specs/S-0042.md
# 3. Flesh out acceptance criteria with agent help
felix spec fix S-0042
# Agent asks questions, generates detailed criteria
# 4. Check dependencies (might need auth requirement first)
felix deps S-0042 --check
# 5. Run focused execution
felix run S-0042 --sync
# 6. Check results
felix status S-0042
# 7. If blocked, investigate
felix validate S-0042
cat runs/*/output.log | grep -i error
# 8. Fix issues and retry
felix run S-0042
# 9. When complete, verify in staging
felix list --status completeNext Steps
- Install Felix and run
felix setupto configure your project - Create a small spec with
felix spec createand validate it withfelix validate - Run a single requirement with
felix run <requirement-id>before switching tofelix loop - Use
felix statusandfelix listto track progress and keep the queue healthy
Conclusion: Running Felix with Confidence
Felix works best when you start small, validate early, and scale up once your specs and tests are solid. Keep the core loop tight:
- Create a spec with
felix spec create - Validate it with
felix validate - Run it with
felix run - Track progress with
felix statusandfelix list - Scale with
felix looponce the workflow is stable
Happy automating!