- Rename all pi extension tool registrations from kb_* to fn_* across task, mission, and agent tool families - Update extension and skill-sync tests plus Fusion skill docs/workflows to assert and document the new fn_* tool names - Align product-identity strings across core, dashboard, and CLI references, including GitHub import examples, User-Agent headers, and terminal TERM_PROGRAM - Add a @gsxdsm/fusion minor changeset describing the extension tool-prefix rename
3.6 KiB
3.6 KiB
Best Practices for Working with Fusion
Writing Task Descriptions
Do:
- State the problem AND desired outcome
- Include specific file paths, technologies, or patterns to use
- Mention what's out of scope to prevent scope creep
- Reference related tasks by ID if there are dependencies
- Include "current behavior" vs "expected behavior" for bugs
Don't:
- Write one-liner descriptions like "fix the bug"
- Include implementation details the AI should figure out
- Create tasks that are too large (break into smaller tasks or use missions)
- Duplicate existing tasks — check
fn_task_listfirst
Task Size Guidelines
| Size | Scope | Examples |
|---|---|---|
| S | Single file change, simple fix | Fix typo, update config, add CSS rule |
| M | 2-5 files, moderate complexity | Add form validation, create API endpoint |
| L | 5+ files, significant feature | New page/component, refactor module, add auth |
For work larger than L, use missions to break it into phases.
When to Use Each Tool
| Scenario | Tool |
|---|---|
| Quick task with clear scope | fn_task_create |
| Vague idea needing refinement | fn_task_plan |
| Large project with phases | fn_mission_create + hierarchy |
| Task failed, needs retry | fn_task_retry |
| Task needs manual intervention | fn_task_pause |
| Completed task needs follow-up | fn_task_refine |
| Clean up done tasks | fn_task_archive |
| Import external work | fn_task_import_github* |
Dependency Management
- Declare dependencies at creation time using the
dependsparameter - Dependencies must be valid task IDs that exist
- Tasks wait in todo until all dependencies are in done or archived
- Circular dependencies are rejected
- Use missions for complex dependency graphs across many tasks
Working with the AI Engine
- Don't fight the automation — let triage, scheduler, and executor do their jobs
- Pause if needed — use
fn_task_pausewhen you want manual control - Steer don't micromanage — use steering comments (via CLI
fn task steer) to guide the AI without rewriting the spec - Check progress — use
fn_task_showto monitor step completion - Let it fail and retry — if a task fails, check the log, then
fn_task_retry
Mission Planning Tips
- Start with the mission — define the high-level goal first
- Milestones are phases — order them chronologically (what comes first?)
- Slices are parallel tracks — within a milestone, what can be done independently?
- Features are deliverables — each feature should map to one task
- Activate slices sequentially — only activate what's ready for implementation
- Use auto-advance — enable on the mission to automatically progress through slices
Common Patterns
Bug fix flow:
fn_task_createwith bug description (current vs expected behavior)- Wait for triage to generate specification
- Monitor with
fn_task_showuntil done
Feature development flow:
fn_task_planto refine requirements- Check the task in triage → todo → in-progress
- Review in
fn_task_showwhen in-review - Task auto-merges to main
Large project flow:
fn_mission_createwith project overview- Add milestones for each phase
- Add slices and features for the first milestone
- Activate first slice, create and link tasks
- As tasks complete, features auto-complete
- Activate next slice (or use auto-advance)
GitHub issue triage flow:
fn_task_browse_github_issuesto see what's openfn_task_import_github_issuefor high-priority issues- Tasks enter triage and get AI-specified
- Monitor board as AI works through them