| name | FP Workflow |
| description | This skill should be used when the user asks to "start working on issue", "what should I work on", "pick up task", "continue work", "find next task", "hand off", or "end session". Provides agent work session patterns for the FP CLI including claiming work, logging progress, and VCS-based change tracking. |
FP Workflow Skill
Agent work session patterns for the FP CLI
Core Workflow Concepts
Issue Status Lifecycle
Issues have three states:
- todo - Planned, not yet started (no VCS tracking)
- in-progress - Actively being worked on (VCS base captured)
- done - Completed (VCS tip captured)
Issue Priority
Issues can have an optional priority: low, medium, high, or critical.
- Priority affects display order: within the same status, higher priority issues appear first
- Sort order: critical → high → medium → low → (no priority)
- Use
--priority flag when creating or updating issues
VCS-Based Change Tracking
FP automatically tracks changes using your version control system (git or jj):
- When issue becomes
in-progress: Captures current VCS ref as the base commit
- When issue becomes
done: Captures current VCS ref as the tip commit
- Range (base..tip): Shows exactly what changed for this issue
This replaces manual snapshots - VCS handles all change tracking automatically.
Work Session Flow
1. Session Start → Get your agent name
2. Find Work → Discover next actionable task (status: todo)
3. Claim Work → Mark issue as in-progress (captures base ref)
4. Do Work → Implement, test, iterate
5. COMMIT → Commit changes before logging (enforced by hooks)
6. Log Progress → Add comments after committing
7. Complete → Mark as done (captures tip ref)
8. Hand Off → Log final status before session ends
Commit-First Rule
You must commit before logging progress. The plugin enforces this with PreToolUse hooks that block fp comment and fp issue update calls when uncommitted changes exist.
The workflow rhythm is: code → commit → log → repeat
This ensures:
- VCS history accurately reflects progress
- Comments reference committed work, not in-flight changes
- Context survives compaction (commits are durable)
Essential Commands
1. Identify Yourself
Check who you are:
fp agent whoami
This tells you your agent name (e.g., "swift-falcon"). Your identity is set automatically when your session starts and stored in the $FP_AGENT_NAME environment variable.
Note: Use $FP_AGENT_NAME in commands. If the variable is not set (e.g., in subagents), get your name with:
FP_AGENT_NAME=$(fp agent whoami 2>&1 | grep "Name:" | awk '{print $2}')
2. Find Next Task
See the full issue tree:
fp tree
This shows all issues with their hierarchy, status, and dependencies.
List tasks by status:
fp issue list --status todo
fp issue list --status in-progress
fp issue list --status done
fp issue list
Analyze dependencies:
When looking at the tree output, identify tasks that:
- Have no dependencies, OR
- Have all dependencies in "done" status
- Are not already being worked on (check recent activity)
3. Claim Work
Start working on an issue:
fp issue update --status in-progress FP-2
When you mark an issue as in-progress, the system automatically:
- Captures the current VCS ref as the base commit
- Sets this as your current issue in the workspace
Log that you're starting:
fp comment FP-2 "Starting work. First step: [describe what you'll do]"
4. View Changes
See what's changed since you started:
fp issue diff FP-2
fp issue diff FP-2 --stat
List changed files:
fp issue files FP-2
For parent issues with children, these commands automatically aggregate changes from all descendants.
5. Manually Assign Commits
If automatic VCS tracking missed commits (e.g., you forgot to mark the issue as in-progress before starting work), use fp issue assign to retroactively link commits:
fp issue assign FP-2
fp issue assign FP-2 --rev abc123
fp issue assign FP-2 --rev a1,b2
fp issue assign FP-2 --reset
This adds an Issue: FP-2 trailer to the commit message and updates the issue's revision tracking.
6. Log Progress
Add comments as you make progress:
fp comment FP-2 "Completed schema design. Added User, Session, Token models to src/models/"
7. Mark Completion
When work is done:
fp issue update --status done FP-2
fp comment FP-2 "Task completed. [Summary of what was done]"
This automatically captures the current VCS ref as the tip commit.
Best Practices
Starting a Session
-
Check your identity:
fp agent whoami
-
Review recent activity:
fp log --limit 10
-
Check the current state:
fp tree
-
Look for available work:
fp issue list --status todo
fp issue list --status in-progress
-
If continuing work, load context:
fp context FP-2
This shows the issue details.
During Work
-
Comment frequently - At minimum:
- When you start a task
- When you complete a significant milestone
- When you discover important information
- When you encounter problems
-
Check your progress:
fp issue diff FP-2 --stat
fp issue files FP-2
-
Keep status current:
todo when not yet started
in-progress when actively working
done when complete
Ending a Session
-
Log your progress:
fp comment FP-2 "End of session. Completed: [list]. Next steps: [list]"
-
Update status appropriately:
- If done:
--status done
- If partially done: keep as
in-progress with clear comment about state
-
Don't leave issues in limbo - Always leave a comment explaining state
Common Patterns
Pattern: Pick Up Where You Left Off
fp issue list --status in-progress
fp context FP-5
fp log FP-5 --limit 5
fp issue diff FP-5 --stat
fp comment FP-5 "Resuming work. Current focus: [what you're doing]"
Pattern: Taking Over From Another Agent
fp issue show FP-3
fp log FP-3
fp issue diff FP-3 --stat
fp context FP-3
fp comment FP-3 "Taking over. Will continue with: [next steps]"
Pattern: Breaking Down Work
fp issue create --title "Authentication middleware" --parent FP-4
fp issue create --title "Authorization checks" --parent FP-4
fp issue create --title "Token refresh logic" --parent FP-4
fp comment FP-4 "Broke down into sub-tasks: FP-10, FP-11, FP-12. Will work on these sequentially."
fp issue update --status in-progress FP-10
Pattern: Checking Parent Issue Progress
fp issue diff FP-1 --stat
fp issue files FP-1
Pattern: Fixing Tracking After the Fact
If you made commits before marking an issue as in-progress (so the base ref wasn't captured), use fp issue assign to manually link commits:
jj log
fp issue assign FP-5 --rev abc123,def456
fp issue diff FP-5 --stat
Anti-Patterns (Avoid These)
❌ Logging before committing
fp comment FP-2 "Added auth middleware"
jj describe -m "Add auth middleware" && jj new
fp comment FP-2 "Committed: Added auth middleware"
❌ Silent progress (no comments)
jj describe -m "Create base models" && jj new
fp comment FP-2 "Committed: Created base models"
jj describe -m "Add validation logic" && jj new
fp comment FP-2 "Committed: Added validation logic"
❌ Leaving work in ambiguous state
fp issue update --status in-progress FP-2
fp comment FP-2 "End of session. Completed auth middleware. TODO: Add rate limiting. File: src/middleware/auth.ts is 80% done."
❌ Not using VCS tracking
fp issue diff FP-2 --stat
fp issue files FP-2
Integration with Context Commands
Loading Context for Work
Use fp context to get issue details:
fp context FP-2
fp context FP-2 --include-children
fp context FP-2 --format json
Session Start Context
When your session starts, the SessionStart hook automatically runs:
fp context --session-start --session-id <id>
This provides:
- Your agent identity
- Current open issues
- Recent activity summary
Pre-Compact Context
Before context compaction, the PreCompact hook runs:
fp context --current --format compact
This preserves critical information about what you were working on.
Querying Activity
View Recent Activity
fp log
fp log --limit 50
fp log FP-2
fp log --author swift-falcon
fp log --author $FP_AGENT_NAME
Understanding Activity Log
The activity log shows:
- Timestamp
- Author (agent or user)
- Issue ID
- Action type and details
Use this to:
- Understand what happened while you were away
- See who worked on what
- Track status transitions
- Find recent comments
Quick Reference
Start Session Checklist
During Work Checklist
End Session Checklist
Troubleshooting
"I don't know what to work on"
fp tree
fp issue list --status todo
fp issue list --status in-progress
"Lost context after compaction"
fp context FP-X
fp log FP-X --limit 10
fp issue diff FP-X --stat
fp tree
"What changed in this issue?"
fp issue diff FP-X
fp issue diff FP-X --stat
fp issue files FP-X
Summary
The FP workflow is designed for seamless agent collaboration:
- Always identify yourself with
fp agent whoami
- Find actionable work using
fp tree and fp issue list --status todo
- Claim with status in-progress to start VCS tracking
- Code → Commit → Log (commit-first is enforced by hooks)
- View changes with
fp issue diff and fp issue files
- Mark done when complete (captures final commit ref)
- Hand off cleanly with clear final comments
The commit-first rule ensures VCS history accurately reflects progress and comments reference durable, committed work.