Claude Code Workflow
fp is designed to be the task backbone for Claude Code sessions. This guide covers the recommended workflow patterns.
First, configure Claude Code integration:
fp initfp setup claudeThis installs skills and hooks that teach Claude Code how to use fp automatically.
The Work Session Flow
Section titled “The Work Session Flow”The standard agent workflow follows this pattern:
1. Find Work
Section titled “1. Find Work”fp issue list --status todo2. Claim an Issue
Section titled “2. Claim an Issue”fp issue update --status in-progress FP-abcdThis captures the current commit as the base reference.
3. Work and Log Progress
Section titled “3. Work and Log Progress”# After each milestonefp comment FP-abcd "Implemented the data model"fp comment FP-abcd "Added validation layer"4. Attach Commits
Section titled “4. Attach Commits”fp issue assign FP-abcd --rev HEAD5. Complete
Section titled “5. Complete”fp issue update --status done FP-abcdThis captures the tip commit, enabling fp issue diff to show exactly what changed.
AGENTS.md Integration
Section titled “AGENTS.md Integration”Add fp rules to your AGENTS.md so all agents follow the same workflow:
## Issue Tracking
This project uses **fp** for issue tracking. AI agents must follow these rules.
### Task Tracking
- Use `fp issue` for all task tracking — do not use built-in todo tools- Create subissues with `--parent` flag — never use markdown checklists- Break work into atomic tasks (1-3 hours each)
### Work Session Flow
1. `fp issue list --status todo` — find available work2. `fp issue update --status in-progress <id>` — claim before starting3. Work and commit frequently4. `fp comment <id> "progress..."` — log at every milestone5. `fp issue assign <id> --rev <commit>` — attach commits6. `fp issue update --status done <id>` — mark complete
### Commit Discipline
- Commit early and often with descriptive messages- Always commit before session endsPlanning with Agents
Section titled “Planning with Agents”Ask Claude Code to plan features:
“Plan out the authentication feature”
The agent creates a hierarchy:
FP-abcd [todo] Add authentication├── FP-efgh [todo] Design auth flow├── FP-ijkl [todo] Implement OAuth provider├── FP-mnop [todo] Add session management└── FP-qrst [todo] Write testsEach sub-issue is scoped to 1-3 hours of work — small enough for a single agent session.
Reviewing Agent Work
Section titled “Reviewing Agent Work”After an agent completes work, review what changed:
fp issue diff FP-ijkl # Diff for one issuefp issue files FP-ijkl # Files changedfp issue diff FP-abcd # Parent aggregates all childrenfp tree # Overview of all progress- Always log progress —
fp commentcreates an audit trail of what the agent did and why - Use priorities —
--priority highhelps agents pick the most important work first - Break work down — Smaller issues = better agent performance and easier review
- Commit before ending — Ensure no work is lost if a session ends unexpectedly