feat(FN-4074): add priority option to task creation in engine and extension

Adds task priority support to the task creation flow, spanning the engine runtime (`agent-tools.ts`, `triage.ts`), the CLI extension interface (`extension.ts`), and corresponding documentation and tests. The changeset bumps `@runfusion/fusion` as a minor version.

Fusion-Task-Id: FN-4074

Fusion-Task-Lineage: 726c0ae6-90fb-4c13-ace1-215a2becb2a9
This commit is contained in:
Fusion
2026-05-11 23:31:19 -07:00
committed by gsxdsm
parent 9d52cc4163
commit e9b8ba5c54
15 changed files with 126 additions and 5 deletions

View File

@@ -61,7 +61,7 @@ Based on the user's request, route to the appropriate workflow:
<quick_reference>
**Create a task:**
Use `fn_task_create` with a descriptive message. Include the problem AND desired outcome.
Use `fn_task_create` with a descriptive message. Include the problem AND desired outcome, and set `priority` (`low`/`normal`/`high`/`urgent`) when urgency matters.
**List tasks:**
Use `fn_task_list` to see all tasks grouped by column. Use `column` param to filter.

View File

@@ -11,7 +11,7 @@ These tools are **not** part of the user-invokable extension surface. They are i
| Tool | Agent Types | Purpose | Parameters |
|---|---|---|---|
| `fn_task_create` | triage, executor, heartbeat | Create a follow-up task from within an agent run | `description` (string), `dependencies?` (string[]) |
| `fn_task_create` | triage, executor, heartbeat | Create a follow-up task from within an agent run | `description` (string), `dependencies?` (string[]), `priority?` (`low` \| `normal` \| `high` \| `urgent`) |
| `fn_task_log` | executor, heartbeat | Write significant task log entries | `message` (string), `outcome?` (string) |
| `fn_task_document_write` | triage, executor, heartbeat | Save/update a named task document revision | `key` (string), `content` (string), `author?` (string) |
| `fn_task_document_read` | triage, executor, heartbeat | Read one task document or list all | `key?` (string) |

View File

@@ -17,6 +17,7 @@ Create a new task on the Fusion task board. The task enters the planning column
| `description` | string | ✓ | What needs to be done — be descriptive |
| `depends` | array | — | Task IDs this depends on (e.g. ['FN-001', 'FN-002']) |
| `agentId` | string | — | Agent ID to assign this task to (e.g. 'agent-abc123') |
| `priority` | string(enum) | — | Task priority (low, normal, high, urgent) |
### fn_task_update

View File

@@ -17,6 +17,7 @@ Use only the public `fn_*` extension tools in this workflow. Do not substitute i
- Include the problem AND the desired outcome
- Be specific — the AI triage agent uses your description to write the specification
- Optionally add dependencies with the `depends` parameter
- Optionally set urgency with `priority` (`low`, `normal`, `high`, `urgent`)
2. The task enters **triage** where the AI auto-generates a PROMPT.md with:
- Steps, file scope, acceptance criteria
@@ -29,7 +30,8 @@ Example:
```
fn_task_create({
description: "The login form doesn't validate email format before submission. Add client-side email validation that shows an inline error message when the email is invalid. Use the existing form validation pattern from the signup form.",
depends: ["FN-042"]
depends: ["FN-042"],
priority: "high"
})
```