@runfusion/fusion 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +166 -0
- package/dist/bin.js +141453 -0
- package/dist/client/assets/addon-fit-C7jRorKK.js +1 -0
- package/dist/client/assets/addon-web-links-CkJwd4cQ.js +1 -0
- package/dist/client/assets/addon-webgl-BjvOw43o.js +58 -0
- package/dist/client/assets/index-Dr0THfBG.css +1 -0
- package/dist/client/assets/index-bkmXzXw5.js +1241 -0
- package/dist/client/assets/vendor-react-K0fH_qHe.js +49 -0
- package/dist/client/assets/vendor-xterm-DzcZoU0P.js +9 -0
- package/dist/client/assets/vendor-xterm-LZoznX6r.css +32 -0
- package/dist/client/icons/icon-192.png +0 -0
- package/dist/client/icons/icon-512.png +0 -0
- package/dist/client/index.html +90 -0
- package/dist/client/logo.svg +6 -0
- package/dist/client/manifest.json +23 -0
- package/dist/client/sw.js +90 -0
- package/dist/client/theme-data.css +3764 -0
- package/dist/extension.js +79879 -0
- package/package.json +86 -0
- package/skill/fusion/SKILL.md +103 -0
- package/skill/fusion/references/best-practices.md +91 -0
- package/skill/fusion/references/cli-commands.md +117 -0
- package/skill/fusion/references/extension-tools.md +296 -0
- package/skill/fusion/references/fusion-capabilities.md +121 -0
- package/skill/fusion/references/skill-patterns.md +38 -0
- package/skill/fusion/references/task-structure.md +158 -0
- package/skill/fusion/workflows/dashboard-cli.md +92 -0
- package/skill/fusion/workflows/specifications.md +124 -0
- package/skill/fusion/workflows/task-lifecycle.md +116 -0
- package/skill/fusion/workflows/task-management.md +90 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Fusion Capabilities Catalog
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Fusion (kb) is an AI-orchestrated task board. Tasks flow through columns:
|
|
6
|
+
Triage → Todo → In Progress → In Review → Done → Archived
|
|
7
|
+
|
|
8
|
+
## Pi Extension Tools (Available to Agents)
|
|
9
|
+
|
|
10
|
+
| Tool | Purpose |
|
|
11
|
+
|------|---------|
|
|
12
|
+
| `fn_task_create` | Create a new task in triage |
|
|
13
|
+
| `fn_task_update` | Update task title, description, or dependencies |
|
|
14
|
+
| `fn_task_list` | List all tasks grouped by column |
|
|
15
|
+
| `fn_task_show` | Show full task details, steps, log |
|
|
16
|
+
| `fn_task_attach` | Attach a file to a task |
|
|
17
|
+
| `fn_task_pause` | Pause automation for a task |
|
|
18
|
+
| `fn_task_unpause` | Resume automation for a task |
|
|
19
|
+
| `fn_task_retry` | Retry a failed task (clears error, moves to todo) |
|
|
20
|
+
| `fn_task_duplicate` | Duplicate a task (copy to triage) |
|
|
21
|
+
| `fn_task_refine` | Create refinement task for follow-up work |
|
|
22
|
+
| `fn_task_archive` | Archive a done task |
|
|
23
|
+
| `fn_task_unarchive` | Restore an archived task |
|
|
24
|
+
| `fn_task_delete` | Permanently delete a task |
|
|
25
|
+
| `fn_task_import_github` | Batch import GitHub issues as tasks |
|
|
26
|
+
| `fn_task_import_github_issue` | Import a single GitHub issue |
|
|
27
|
+
| `fn_task_browse_github_issues` | Browse GitHub issues before importing |
|
|
28
|
+
| `fn_task_plan` | Create task via AI-guided planning mode |
|
|
29
|
+
| `fn_mission_create` | Create a new mission |
|
|
30
|
+
| `fn_mission_list` | List all missions |
|
|
31
|
+
| `fn_mission_show` | Show mission hierarchy |
|
|
32
|
+
| `fn_mission_delete` | Delete a mission |
|
|
33
|
+
| `fn_milestone_add` | Add a milestone to a mission |
|
|
34
|
+
| `fn_slice_add` | Add a slice to a milestone |
|
|
35
|
+
| `fn_feature_add` | Add a feature to a slice |
|
|
36
|
+
| `fn_slice_activate` | Activate a pending slice |
|
|
37
|
+
| `fn_feature_link_task` | Link a feature to a task |
|
|
38
|
+
| `fn_agent_stop` | Stop (pause) a running agent |
|
|
39
|
+
| `fn_agent_start` | Start (resume) a stopped agent |
|
|
40
|
+
| `fn_skills_search` | Search skills.sh for agent skills |
|
|
41
|
+
| `fn_skills_install` | Install a skill from skills.sh |
|
|
42
|
+
|
|
43
|
+
## CLI Commands (fn)
|
|
44
|
+
|
|
45
|
+
### Dashboard
|
|
46
|
+
- `fn dashboard` — Start web UI + AI engine
|
|
47
|
+
- `fn dashboard --paused` — Start with automation paused
|
|
48
|
+
- `fn dashboard --dev` — Start web UI only (no AI engine)
|
|
49
|
+
|
|
50
|
+
### Task Management
|
|
51
|
+
- `fn task create "description"` — Create a new task
|
|
52
|
+
- `fn task plan "description"` — AI-guided planning mode
|
|
53
|
+
- `fn task list` — List all tasks
|
|
54
|
+
- `fn task show KB-001` — Show task details
|
|
55
|
+
- `fn task move KB-001 todo` — Move task to a column
|
|
56
|
+
- `fn task merge KB-001` — Merge an in-review task
|
|
57
|
+
- `fn task duplicate KB-001` — Duplicate a task
|
|
58
|
+
- `fn task refine KB-001 --feedback "..."` — Create refinement task
|
|
59
|
+
- `fn task archive/unarchive KB-001` — Archive/restore tasks
|
|
60
|
+
- `fn task delete KB-001` — Delete a task
|
|
61
|
+
- `fn task retry KB-001` — Retry a failed task
|
|
62
|
+
- `fn task comment KB-001 "..."` — Add a task comment
|
|
63
|
+
- `fn task steer KB-001 "..."` — Add steering comment
|
|
64
|
+
- `fn task pause/unpause KB-001` — Control automation
|
|
65
|
+
- `fn task logs KB-001` — View task agent logs
|
|
66
|
+
|
|
67
|
+
### GitHub Integration
|
|
68
|
+
- `fn task import owner/repo` — Batch import issues
|
|
69
|
+
- `fn task import owner/repo -i` — Interactive import
|
|
70
|
+
- `fn task pr-create KB-001` — Create PR for task
|
|
71
|
+
|
|
72
|
+
### Git Commands
|
|
73
|
+
- `fn git status/fetch/pull/push` — Git operations
|
|
74
|
+
|
|
75
|
+
### Settings
|
|
76
|
+
- `fn settings` — Show current settings
|
|
77
|
+
- `fn settings set key value` — Update a setting
|
|
78
|
+
|
|
79
|
+
## AI Engine Components
|
|
80
|
+
|
|
81
|
+
1. **TriageProcessor** — Auto-specifications for tasks in triage column
|
|
82
|
+
2. **Scheduler** — Dependency resolution, concurrency management
|
|
83
|
+
3. **TaskExecutor** — Creates worktrees, executes tasks with coding tools
|
|
84
|
+
|
|
85
|
+
## Task Storage Structure
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
.kb/
|
|
89
|
+
├── kb.db # SQLite database (WAL mode)
|
|
90
|
+
├── config.json # Board config
|
|
91
|
+
└── tasks/
|
|
92
|
+
└── KB-001/
|
|
93
|
+
├── PROMPT.md # Task specification
|
|
94
|
+
├── agent.log # Execution logs
|
|
95
|
+
└── attachments/ # File attachments
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Dashboard Features
|
|
99
|
+
|
|
100
|
+
- Real-time kanban board with drag-and-drop
|
|
101
|
+
- Board view and list view
|
|
102
|
+
- Task detail modal with tabs (Details, Spec, Model, Workflow, Comments)
|
|
103
|
+
- Git manager (commits, branches, worktrees)
|
|
104
|
+
- Activity log
|
|
105
|
+
- Settings modal
|
|
106
|
+
- Workflow step manager
|
|
107
|
+
- Scheduled tasks (automations)
|
|
108
|
+
- GitHub import modal
|
|
109
|
+
- Theme system (8+ themes, dark/light/system)
|
|
110
|
+
|
|
111
|
+
## Key Settings
|
|
112
|
+
|
|
113
|
+
| Setting | Default | Description |
|
|
114
|
+
|---------|---------|-------------|
|
|
115
|
+
| `maxConcurrent` | 2 | Concurrent task execution lanes (executor + merge). Triage/specification is controlled by `maxTriageConcurrent`. |
|
|
116
|
+
| `maxTriageConcurrent` | 2 | Concurrent triage/specification agents. Falls back to `maxConcurrent` when undefined. |
|
|
117
|
+
| `autoMerge` | true | Auto-merge completed tasks |
|
|
118
|
+
| `requirePlanApproval` | false | Manual approval for specs |
|
|
119
|
+
| `prCompletionMode` | direct | Completion: direct/pr-first |
|
|
120
|
+
| `taskStuckTimeoutMs` | — | Stuck task detection timeout |
|
|
121
|
+
| `recycleWorktrees` | false | Pool and reuse worktrees |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Skill Patterns Analysis
|
|
2
|
+
|
|
3
|
+
## Patterns Observed from High-Quality Skills
|
|
4
|
+
|
|
5
|
+
### 1. Router Pattern (create-skill)
|
|
6
|
+
|
|
7
|
+
- SKILL.md acts as a router with `<routing>` section
|
|
8
|
+
- Maps user intent to specific workflow files
|
|
9
|
+
- Essential principles are inline in SKILL.md (always loaded)
|
|
10
|
+
- Workflows have `<required_reading>`, `<process>`, `<success_criteria>`
|
|
11
|
+
- References contain reusable domain knowledge
|
|
12
|
+
|
|
13
|
+
### 2. Command Reference Pattern (agent-browser)
|
|
14
|
+
|
|
15
|
+
- Core workflow presented upfront (navigate → snapshot → interact → re-snapshot)
|
|
16
|
+
- Essential commands with examples inline
|
|
17
|
+
- Common patterns section for frequent use cases
|
|
18
|
+
- Deep-dive references linked at the bottom via table
|
|
19
|
+
- Templates for ready-to-use scripts
|
|
20
|
+
- Uses `allowed-tools` for Bash commands
|
|
21
|
+
|
|
22
|
+
### 3. Search & Discover Pattern (find-skills)
|
|
23
|
+
|
|
24
|
+
- Simple single-file skill (no router needed)
|
|
25
|
+
- Clear "When to Use" triggers section
|
|
26
|
+
- Step-by-step guidance for common flow
|
|
27
|
+
- Fallback guidance when primary path fails
|
|
28
|
+
- Tips section for optimization
|
|
29
|
+
|
|
30
|
+
## Key Takeaways for Fusion Skill
|
|
31
|
+
|
|
32
|
+
1. **Use router pattern** — Fusion has multiple distinct workflows (task management, lifecycle, specs, dashboard/CLI)
|
|
33
|
+
2. **No `allowed-tools` needed** — Fusion tools are registered via pi extension, not Bash CLI
|
|
34
|
+
3. **Inline essential concepts** — Task columns, workflow overview in SKILL.md
|
|
35
|
+
4. **Progressive disclosure** — SKILL.md routes to workflows, workflows reference detailed docs
|
|
36
|
+
5. **Pure XML structure** — No markdown headings (#, ##, ###) in body
|
|
37
|
+
6. **Triggers section** — Clear when-to-use criteria
|
|
38
|
+
7. **Under 500 lines** — Keep SKILL.md concise, split to workflows/references
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Fusion Task Storage Structure
|
|
2
|
+
|
|
3
|
+
## Database Architecture
|
|
4
|
+
|
|
5
|
+
Fusion uses a hybrid storage architecture: structured metadata in SQLite, large blobs on the filesystem.
|
|
6
|
+
|
|
7
|
+
**Project database:** `.fusion/fusion.db` (SQLite with WAL mode)
|
|
8
|
+
|
|
9
|
+
**Filesystem blobs:**
|
|
10
|
+
```
|
|
11
|
+
.fusion/
|
|
12
|
+
├── fusion.db # SQLite database (WAL mode)
|
|
13
|
+
├── config.json # Board config + workflow steps
|
|
14
|
+
└── tasks/
|
|
15
|
+
└── KB-001/
|
|
16
|
+
├── PROMPT.md # Task specification (generated by triage AI)
|
|
17
|
+
├── agent.log # Execution logs from the AI agent
|
|
18
|
+
└── attachments/ # File attachments
|
|
19
|
+
├── screenshot.png
|
|
20
|
+
└── data.json
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Task Metadata (in SQLite)
|
|
24
|
+
|
|
25
|
+
Key fields stored in the `tasks` table:
|
|
26
|
+
|
|
27
|
+
| Field | Type | Description |
|
|
28
|
+
|-------|------|-------------|
|
|
29
|
+
| `id` | string | Task ID (e.g., KB-001) |
|
|
30
|
+
| `title` | string? | Short title (optional, can be auto-generated) |
|
|
31
|
+
| `description` | string | Full task description |
|
|
32
|
+
| `column` | string | Current column: triage/todo/in-progress/in-review/done/archived |
|
|
33
|
+
| `status` | string? | Sub-status: failed, paused, awaiting-approval |
|
|
34
|
+
| `size` | string? | Size estimate: S, M, L |
|
|
35
|
+
| `reviewLevel` | number? | Review intensity: 0-3 |
|
|
36
|
+
| `currentStep` | number | Index of current execution step |
|
|
37
|
+
| `steps` | JSON | Array of step objects with name, status |
|
|
38
|
+
| `dependencies` | JSON | Array of task IDs this depends on |
|
|
39
|
+
| `log` | JSON | Array of log entries (action, outcome, timestamp) |
|
|
40
|
+
| `attachments` | JSON | Array of attachment metadata |
|
|
41
|
+
| `prInfo` | JSON? | GitHub PR info (number, url, state) |
|
|
42
|
+
| `issueInfo` | JSON? | GitHub issue info (number, url) |
|
|
43
|
+
| `modelProvider` | string? | Per-task executor model provider |
|
|
44
|
+
| `modelId` | string? | Per-task executor model ID |
|
|
45
|
+
| `validatorModelProvider` | string? | Per-task reviewer model provider |
|
|
46
|
+
| `validatorModelId` | string? | Per-task reviewer model ID |
|
|
47
|
+
| `enabledWorkflowSteps` | JSON | Array of workflow step IDs to run |
|
|
48
|
+
| `missionId` | string? | Linked mission ID |
|
|
49
|
+
| `sliceId` | string? | Linked slice ID |
|
|
50
|
+
| `paused` | boolean | Whether automation is paused |
|
|
51
|
+
| `createdAt` | string | ISO timestamp |
|
|
52
|
+
| `updatedAt` | string | ISO timestamp |
|
|
53
|
+
|
|
54
|
+
## PROMPT.md Specification Format
|
|
55
|
+
|
|
56
|
+
The AI triage agent generates this file with the following structure:
|
|
57
|
+
|
|
58
|
+
```markdown
|
|
59
|
+
# Task: KB-001 — Task Title
|
|
60
|
+
|
|
61
|
+
**Created:** 2026-03-31
|
|
62
|
+
**Size:** M
|
|
63
|
+
|
|
64
|
+
## Review Level: 2 (Plan and Code)
|
|
65
|
+
|
|
66
|
+
## Mission
|
|
67
|
+
|
|
68
|
+
What the task should accomplish.
|
|
69
|
+
|
|
70
|
+
## Dependencies
|
|
71
|
+
|
|
72
|
+
- KB-040 — Prerequisite task description
|
|
73
|
+
|
|
74
|
+
## Context to Read First
|
|
75
|
+
|
|
76
|
+
- `path/to/relevant/file.ts` — Why to read this file
|
|
77
|
+
|
|
78
|
+
## File Scope
|
|
79
|
+
|
|
80
|
+
- `src/components/LoginForm.tsx` (modified)
|
|
81
|
+
- `src/utils/validation.ts` (new)
|
|
82
|
+
- `tests/LoginForm.test.ts` (new)
|
|
83
|
+
|
|
84
|
+
## Steps
|
|
85
|
+
|
|
86
|
+
### Step 1: Research existing patterns
|
|
87
|
+
- [ ] Look at existing validation in SignupForm
|
|
88
|
+
- [ ] Identify the validation utility pattern
|
|
89
|
+
|
|
90
|
+
### Step 2: Implement email validation
|
|
91
|
+
- [ ] Add validation function
|
|
92
|
+
- [ ] Wire up to form submit
|
|
93
|
+
|
|
94
|
+
## Acceptance Criteria
|
|
95
|
+
|
|
96
|
+
- [ ] Email validation shows inline error
|
|
97
|
+
- [ ] Existing tests pass
|
|
98
|
+
- [ ] New validation has test coverage
|
|
99
|
+
|
|
100
|
+
## Do NOT
|
|
101
|
+
|
|
102
|
+
- Modify the API endpoints
|
|
103
|
+
- Change the form layout
|
|
104
|
+
|
|
105
|
+
## Testing Requirements
|
|
106
|
+
|
|
107
|
+
1. Unit tests for email validation function
|
|
108
|
+
2. Integration test for form submission with invalid email
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Config File
|
|
112
|
+
|
|
113
|
+
`.fusion/config.json` stores board settings and workflow step definitions:
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"nextId": 42,
|
|
118
|
+
"settings": {
|
|
119
|
+
"maxConcurrent": 2,
|
|
120
|
+
"autoMerge": true,
|
|
121
|
+
"prCompletionMode": "direct"
|
|
122
|
+
},
|
|
123
|
+
"workflowSteps": [
|
|
124
|
+
{
|
|
125
|
+
"id": "WS-001",
|
|
126
|
+
"name": "Documentation Review",
|
|
127
|
+
"prompt": "Review the task changes...",
|
|
128
|
+
"enabled": true,
|
|
129
|
+
"defaultOn": true,
|
|
130
|
+
"modelProvider": "anthropic",
|
|
131
|
+
"modelId": "claude-sonnet-4-5"
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
> **Note:** `maxConcurrent` applies to task-lane agents (triage, execution, merge) only. Utility AI workflows—planning mode, subtask breakdown, mission interviews, agent heartbeat/chat wake, and title summarization—run outside this limit on a dedicated control-plane lane.
|
|
138
|
+
|
|
139
|
+
## Global Settings
|
|
140
|
+
|
|
141
|
+
User-level settings at `~/.fusion/settings.json`:
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"themeMode": "dark",
|
|
146
|
+
"colorTheme": "default",
|
|
147
|
+
"defaultProvider": "anthropic",
|
|
148
|
+
"defaultModelId": "claude-sonnet-4-5",
|
|
149
|
+
"ntfyEnabled": false
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Central Database (Multi-Project)
|
|
154
|
+
|
|
155
|
+
For multi-project setups: `~/.fusion/fusion-central.db`
|
|
156
|
+
- Project registry
|
|
157
|
+
- Unified activity feed
|
|
158
|
+
- Global concurrency management
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<required_reading>
|
|
2
|
+
- references/cli-commands.md — Full CLI command reference
|
|
3
|
+
</required_reading>
|
|
4
|
+
|
|
5
|
+
<objective>
|
|
6
|
+
Guide the agent through using the Fusion dashboard and CLI for operations not available via pi extension tools.
|
|
7
|
+
</objective>
|
|
8
|
+
|
|
9
|
+
<process>
|
|
10
|
+
|
|
11
|
+
**Starting the dashboard:**
|
|
12
|
+
|
|
13
|
+
Use the `/fn` command (registered by the pi extension):
|
|
14
|
+
- `/fn` or `/fn 4040` — Start dashboard + AI engine on specified port (default 4040)
|
|
15
|
+
- `/fn stop` — Stop the dashboard
|
|
16
|
+
- `/fn status` — Check if dashboard is running
|
|
17
|
+
|
|
18
|
+
The dashboard provides:
|
|
19
|
+
- Real-time kanban board with drag-and-drop
|
|
20
|
+
- Task detail modal with tabs: Details, Spec, Model, Workflow, Comments
|
|
21
|
+
- Git manager (commits, branches, worktrees)
|
|
22
|
+
- Activity log
|
|
23
|
+
- Settings configuration
|
|
24
|
+
- Workflow step manager
|
|
25
|
+
- Mission hierarchy view (Cmd/Ctrl+Shift+M)
|
|
26
|
+
- GitHub import modal
|
|
27
|
+
- Theme system (8+ themes, dark/light/system)
|
|
28
|
+
|
|
29
|
+
**Operations that require CLI or dashboard:**
|
|
30
|
+
|
|
31
|
+
These cannot be done with pi extension tools:
|
|
32
|
+
|
|
33
|
+
| Operation | CLI Command | Dashboard |
|
|
34
|
+
|-----------|-------------|-----------|
|
|
35
|
+
| Move task to column | `fn task move KB-001 todo` | Drag card between columns |
|
|
36
|
+
| Merge completed task | `fn task merge KB-001` | Click merge in task detail |
|
|
37
|
+
| Add steering comment | `fn task steer KB-001 "Use TypeScript"` | Comments tab in task detail |
|
|
38
|
+
| Add general comment | `fn task comment KB-001 "Looks good"` | Comments tab in task detail |
|
|
39
|
+
| View agent logs | `fn task logs KB-001 --follow` | Agent log tab in task detail |
|
|
40
|
+
| Change settings | `fn settings set maxConcurrent 4` | Settings modal |
|
|
41
|
+
| Create workflow steps | — | Workflow Steps button in header |
|
|
42
|
+
| Git operations | `fn git status/fetch/pull/push` | Git manager panel |
|
|
43
|
+
|
|
44
|
+
**Settings overview:**
|
|
45
|
+
|
|
46
|
+
Key settings (configure via dashboard Settings or `fn settings set`):
|
|
47
|
+
|
|
48
|
+
| Setting | Default | Description |
|
|
49
|
+
|---------|---------|-------------|
|
|
50
|
+
| `maxConcurrent` | 2 | Concurrent task execution slots |
|
|
51
|
+
| `autoMerge` | true | Auto-merge completed tasks to main |
|
|
52
|
+
| `requirePlanApproval` | false | Manual approval for AI specifications |
|
|
53
|
+
| `prCompletionMode` | "direct" | How tasks complete: "direct" (squash merge) or "pr-first" (GitHub PR) |
|
|
54
|
+
| `recycleWorktrees` | false | Pool and reuse git worktrees |
|
|
55
|
+
| `taskStuckTimeoutMs` | — | Timeout for detecting stuck tasks (ms) |
|
|
56
|
+
| `autoBackupEnabled` | false | Automatic database backups |
|
|
57
|
+
| `ntfyEnabled` | false | Push notifications via ntfy.sh |
|
|
58
|
+
|
|
59
|
+
**Working with GitHub PRs:**
|
|
60
|
+
|
|
61
|
+
When `prCompletionMode` is set to "pr-first":
|
|
62
|
+
- Completed tasks create a GitHub PR instead of direct-merging
|
|
63
|
+
- Use `fn task pr-create KB-001` to manually create a PR for any in-review task
|
|
64
|
+
- PRs can be reviewed and merged through the normal GitHub workflow
|
|
65
|
+
|
|
66
|
+
**Backup operations:**
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
fn backup --create # Create a backup now
|
|
70
|
+
fn backup --list # List all backups
|
|
71
|
+
fn backup --restore <file> # Restore from backup
|
|
72
|
+
fn backup --cleanup # Remove old backups
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Multi-project support:**
|
|
76
|
+
|
|
77
|
+
If managing multiple projects, use `--project` flag:
|
|
78
|
+
```bash
|
|
79
|
+
fn task list --project my-app
|
|
80
|
+
fn task create "Fix bug" --project api-service
|
|
81
|
+
fn project list # List all registered projects
|
|
82
|
+
fn project add my-app /path # Register a project
|
|
83
|
+
fn project set-default main # Set default project
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
</process>
|
|
87
|
+
|
|
88
|
+
<success_criteria>
|
|
89
|
+
- Agent knows when to direct user to dashboard vs. CLI
|
|
90
|
+
- Settings are configured appropriately for the project's needs
|
|
91
|
+
- Dashboard is accessible and running when needed
|
|
92
|
+
</success_criteria>
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<required_reading>
|
|
2
|
+
- references/task-structure.md — PROMPT.md format and file structure
|
|
3
|
+
- references/best-practices.md — Tips for writing effective specifications
|
|
4
|
+
</required_reading>
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
Guide the agent through creating well-specified tasks and organizing work using the mission hierarchy for complex multi-phase projects.
|
|
8
|
+
</objective>
|
|
9
|
+
|
|
10
|
+
<process>
|
|
11
|
+
|
|
12
|
+
**Writing effective task descriptions:**
|
|
13
|
+
|
|
14
|
+
The AI triage agent uses your description to write a PROMPT.md specification. Better descriptions produce better specs:
|
|
15
|
+
|
|
16
|
+
1. **State the problem** — What's broken, missing, or needed?
|
|
17
|
+
2. **Describe the outcome** — What should the result look like?
|
|
18
|
+
3. **Add constraints** — Specific technologies, patterns, or files to use
|
|
19
|
+
4. **Mention scope** — What's in scope and what's explicitly not
|
|
20
|
+
|
|
21
|
+
Good example:
|
|
22
|
+
```
|
|
23
|
+
"The settings page loads all user preferences in a single API call, causing 3s delays.
|
|
24
|
+
Split into lazy-loaded sections that fetch only when the tab is opened.
|
|
25
|
+
Use React Suspense for loading states. Only affect the settings page — don't
|
|
26
|
+
change the API endpoints themselves."
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Bad example:
|
|
30
|
+
```
|
|
31
|
+
"Settings page is slow, fix it"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Understanding the PROMPT.md specification:**
|
|
35
|
+
|
|
36
|
+
After triage, each task gets a PROMPT.md at `.fusion/tasks/{ID}/PROMPT.md` containing:
|
|
37
|
+
|
|
38
|
+
- **Mission** — What the task should accomplish
|
|
39
|
+
- **Steps** — Ordered implementation steps with checkboxes
|
|
40
|
+
- **File Scope** — Which files can be modified
|
|
41
|
+
- **Acceptance Criteria** — How to verify the task is complete
|
|
42
|
+
- **Review Level** — How much review is needed (0-3)
|
|
43
|
+
- **Do NOT** — Explicit constraints and boundaries
|
|
44
|
+
- **Testing Requirements** — What tests to write/run
|
|
45
|
+
- **Dependencies** — Other tasks that must complete first
|
|
46
|
+
|
|
47
|
+
The executor agent follows this specification step by step.
|
|
48
|
+
|
|
49
|
+
**Using AI-guided planning:**
|
|
50
|
+
|
|
51
|
+
For complex or vague ideas, use `fn_task_plan`:
|
|
52
|
+
```
|
|
53
|
+
fn_task_plan({ description: "Build a notification system for the app" })
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The planning mode will:
|
|
57
|
+
1. Ask clarifying questions about scope, channels (email, push, in-app), users
|
|
58
|
+
2. Identify technical constraints and dependencies
|
|
59
|
+
3. Suggest breaking the work into multiple tasks if needed
|
|
60
|
+
4. Create a well-specified task (or multiple subtasks)
|
|
61
|
+
|
|
62
|
+
**Organizing with Missions:**
|
|
63
|
+
|
|
64
|
+
For large-scale projects spanning multiple tasks, use the mission hierarchy:
|
|
65
|
+
|
|
66
|
+
1. **Create a mission** — The high-level objective
|
|
67
|
+
```
|
|
68
|
+
fn_mission_create({ title: "Build Authentication System", description: "Complete auth with login, signup, password reset, and OAuth" })
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
2. **Add milestones** — Major phases
|
|
72
|
+
```
|
|
73
|
+
fn_milestone_add({ missionId: "M-001", title: "Database Schema" })
|
|
74
|
+
fn_milestone_add({ missionId: "M-001", title: "API Endpoints" })
|
|
75
|
+
fn_milestone_add({ missionId: "M-001", title: "UI Integration" })
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
3. **Add slices** — Parallel work units within milestones
|
|
79
|
+
```
|
|
80
|
+
fn_slice_add({ milestoneId: "MS-001", title: "User Tables" })
|
|
81
|
+
fn_slice_add({ milestoneId: "MS-001", title: "Token Storage" })
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
4. **Add features** — Individual deliverables
|
|
85
|
+
```
|
|
86
|
+
fn_feature_add({ sliceId: "SL-001", title: "User model", description: "Create user table with email, password hash, timestamps" })
|
|
87
|
+
fn_feature_add({ sliceId: "SL-001", title: "Session table", description: "Create session table with token, expiry, user FK" })
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
5. **Activate a slice** — Enable it for implementation
|
|
91
|
+
```
|
|
92
|
+
fn_slice_activate({ id: "SL-001" })
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
6. **Link features to tasks** — Connect features to kb tasks
|
|
96
|
+
```
|
|
97
|
+
fn_task_create({ description: "Create user model with email, password hash, and timestamps" })
|
|
98
|
+
# → Created KB-101
|
|
99
|
+
fn_feature_link_task({ featureId: "F-001", taskId: "KB-101" })
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Mission status flows automatically:**
|
|
103
|
+
- When linked tasks complete → feature status updates to done
|
|
104
|
+
- When all features in a slice are done → slice completes
|
|
105
|
+
- When all slices in a milestone are done → milestone completes
|
|
106
|
+
- When all milestones are done → mission completes
|
|
107
|
+
|
|
108
|
+
**Auto-advance:** Enable `autoAdvance` on a mission to automatically activate the next pending slice when the current one completes.
|
|
109
|
+
|
|
110
|
+
**Viewing mission progress:**
|
|
111
|
+
```
|
|
112
|
+
fn_mission_show({ id: "M-001" })
|
|
113
|
+
```
|
|
114
|
+
Shows the full hierarchy with status icons:
|
|
115
|
+
- `●` active, `○` pending, `✓` complete, `⚠` blocked
|
|
116
|
+
|
|
117
|
+
</process>
|
|
118
|
+
|
|
119
|
+
<success_criteria>
|
|
120
|
+
- Task descriptions are specific enough for the AI to generate a useful specification
|
|
121
|
+
- Complex work is broken down using missions when it spans 5+ tasks
|
|
122
|
+
- Mission hierarchy follows the correct nesting: Mission → Milestone → Slice → Feature → Task
|
|
123
|
+
- Features are linked to tasks after slice activation
|
|
124
|
+
</success_criteria>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<required_reading>
|
|
2
|
+
- references/task-structure.md — File structure and storage details
|
|
3
|
+
</required_reading>
|
|
4
|
+
|
|
5
|
+
<objective>
|
|
6
|
+
Help the agent understand how tasks flow through the Fusion board, what happens at each stage, and how to interpret task state.
|
|
7
|
+
</objective>
|
|
8
|
+
|
|
9
|
+
<process>
|
|
10
|
+
|
|
11
|
+
**Column flow:**
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Triage → Todo → In Progress → In Review → Done → Archived
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Each column transition is driven by the AI engine or user action:
|
|
18
|
+
|
|
19
|
+
**Triage (specification)**
|
|
20
|
+
- Task enters triage when created via `fn_task_create`
|
|
21
|
+
- The **TriageProcessor** reads the project context and writes a full PROMPT.md specification
|
|
22
|
+
- Specification includes: steps, file scope, acceptance criteria, review level, size estimate
|
|
23
|
+
- If `requirePlanApproval` is enabled, task stays in triage as "awaiting-approval" until manually approved
|
|
24
|
+
- After specification (and approval if required), task moves to **todo**
|
|
25
|
+
|
|
26
|
+
**Todo (scheduling)**
|
|
27
|
+
- The **Scheduler** watches the todo column
|
|
28
|
+
- Resolves dependency graphs — tasks with unmet deps wait
|
|
29
|
+
- Respects concurrency limits (default: 2 concurrent tasks)
|
|
30
|
+
- When deps are satisfied and a slot is available, moves task to **in-progress**
|
|
31
|
+
|
|
32
|
+
**In Progress (execution)**
|
|
33
|
+
- The **TaskExecutor** creates a git worktree for isolation
|
|
34
|
+
- Spawns a pi agent session with coding tools scoped to the worktree
|
|
35
|
+
- For each step in the PROMPT.md:
|
|
36
|
+
1. Plan the implementation
|
|
37
|
+
2. Review the plan (if review level requires it)
|
|
38
|
+
3. Execute the plan
|
|
39
|
+
4. Review the code (if review level requires it)
|
|
40
|
+
- If workflow steps are enabled, they run sequentially after all main steps
|
|
41
|
+
- On completion, task moves to **in-review**
|
|
42
|
+
|
|
43
|
+
**In Review (merge)**
|
|
44
|
+
- Task work is complete and ready for merge
|
|
45
|
+
- Depending on settings:
|
|
46
|
+
- `prCompletionMode: "direct"` — Auto squash-merge to main (default)
|
|
47
|
+
- `prCompletionMode: "pr-first"` — Creates a GitHub PR for manual review
|
|
48
|
+
- After merge, task moves to **done**
|
|
49
|
+
|
|
50
|
+
**Done**
|
|
51
|
+
- Work is merged to main branch
|
|
52
|
+
- Task is available for archival via `fn_task_archive`
|
|
53
|
+
- Can be refined with `fn_task_refine` to create follow-up work
|
|
54
|
+
|
|
55
|
+
**Archived**
|
|
56
|
+
- Removed from active board view
|
|
57
|
+
- Can be restored with `fn_task_unarchive`
|
|
58
|
+
- Can be cleaned up to free disk space (removes task directory, keeps metadata)
|
|
59
|
+
|
|
60
|
+
**Task statuses (within any column):**
|
|
61
|
+
|
|
62
|
+
| Status | Meaning |
|
|
63
|
+
|--------|---------|
|
|
64
|
+
| (none) | Normal state |
|
|
65
|
+
| `paused` | Automation suspended — scheduler/executor skip this task |
|
|
66
|
+
| `failed` | Execution error — use `fn_task_retry` to reset |
|
|
67
|
+
| `awaiting-approval` | Spec complete, waiting for manual approval (triage only) |
|
|
68
|
+
|
|
69
|
+
**Review levels:**
|
|
70
|
+
|
|
71
|
+
| Level | Description |
|
|
72
|
+
|-------|-------------|
|
|
73
|
+
| 0 | No reviews |
|
|
74
|
+
| 1 | Plan review only |
|
|
75
|
+
| 2 | Plan + code review |
|
|
76
|
+
| 3 | Full review (plan + code + tests) |
|
|
77
|
+
|
|
78
|
+
The AI triage agent sets the review level based on task complexity and risk assessment.
|
|
79
|
+
|
|
80
|
+
**Dependencies:**
|
|
81
|
+
|
|
82
|
+
- Tasks can depend on other tasks (by task ID)
|
|
83
|
+
- Dependent tasks wait in todo until all dependencies are in **done** or **archived**
|
|
84
|
+
- Circular dependencies are prevented
|
|
85
|
+
- Use `depends` parameter on `fn_task_create` to declare dependencies
|
|
86
|
+
|
|
87
|
+
**Interpreting `fn_task_show` output:**
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
KB-042: Fix login validation
|
|
91
|
+
Column: In Progress · Size: M · Review: 2
|
|
92
|
+
|
|
93
|
+
Steps (2/5):
|
|
94
|
+
[✓] 0: Research existing patterns
|
|
95
|
+
[✓] 1: Add email validation
|
|
96
|
+
[▸] 2: Add error display component ◀ (current step)
|
|
97
|
+
[ ] 3: Write tests
|
|
98
|
+
[ ] 4: Update documentation
|
|
99
|
+
|
|
100
|
+
Log (last 3):
|
|
101
|
+
14:30 Step 1 completed → Code review passed
|
|
102
|
+
14:32 Step 2 started
|
|
103
|
+
14:35 Plan approved for step 2
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- `[✓]` = done, `[▸]` = in progress, `[–]` = skipped, `[ ]` = pending
|
|
107
|
+
- `◀` marks the current step
|
|
108
|
+
- Log shows recent activity with timestamps
|
|
109
|
+
|
|
110
|
+
</process>
|
|
111
|
+
|
|
112
|
+
<success_criteria>
|
|
113
|
+
- Agent understands which column a task is in and why
|
|
114
|
+
- Agent can interpret task status, steps, and progress
|
|
115
|
+
- Agent knows when to intervene (pause, retry, refine) vs. let automation handle it
|
|
116
|
+
</success_criteria>
|