FN-5762: add mission hierarchy delete tools with linked-task guards

Add mission delete tooling across core, dashboard routes, and CLI extension surfaces.

- Add `fn_feature_delete`, `fn_slice_delete`, and `fn_milestone_delete` tools to the CLI extension with `force` override support.
- Enforce live-task linkage guards for feature/slice/milestone deletes in mission store logic and expose conflict behavior through mission routes.
- Extend coverage and docs for delete behavior, allowlist/gating metadata, and published Fusion skill/tool references.

Files changed:
 .changeset/fn-5762-feature-delete.md               |   7 +
 docs/missions.md                                   |  15 +++
 packages/cli/skill/fusion/SKILL.md                 |   2 +-
 .../cli/skill/fusion/references/extension-tools.md |  27 ++++
 .../skill/fusion/references/fusion-capabilities.md |   3 +
 packages/cli/src/__tests__/extension.test.ts       |  34 +++++
 packages/cli/src/extension.ts                      | 106 +++++++++++++++
 packages/core/src/__tests__/mission-store.test.ts  | 146 ++++++++++++++++++++-
 packages/core/src/mission-store.ts                 |  98 ++++++++++++--
 .../dashboard/src/__tests__/mission-e2e.test.ts    |  62 +++++++--
 packages/dashboard/src/mission-routes.ts           |  42 +++++-
 .../workflow-step-readonly-allowlist.test.ts       |   3 +
 packages/engine/src/gating-classifications.ts      |   3 +
 13 files changed, 514 insertions(+), 34 deletions(-)

Fusion-Task-Id: FN-5762
Fusion-Task-Lineage: 9c6eceff-dcb4-4a2b-90c6-59cb0228ca6d
This commit is contained in:
gsxdsm
2026-05-30 23:55:05 -07:00
parent 93d3a58cb8
commit 0ffe7f0604
13 changed files with 516 additions and 36 deletions

View File

@@ -29,7 +29,7 @@ Mission → Milestone → Slice → Feature → Task
<!-- BEGIN: tool-categories (auto-generated by scripts/sync-fusion-skill-tools.mjs — do not edit by hand) -->
- **Task tools** — `fn_task_create`, `fn_task_update`, `fn_task_list`, `fn_task_show`, `fn_task_attach`, `fn_task_pause`, `fn_task_unpause`, `fn_task_retry`, `fn_task_duplicate`, `fn_task_refine`, `fn_task_archive`, `fn_task_unarchive`, `fn_task_delete`, `fn_task_plan`
- **GitHub tools** — `fn_task_import_github`, `fn_task_import_github_issue`, `fn_task_browse_github_issues`
- **Mission tools** — `fn_mission_create`, `fn_mission_list`, `fn_mission_show`, `fn_mission_delete`, `fn_mission_update`, `fn_milestone_add`, `fn_slice_add`, `fn_feature_add`, `fn_slice_activate`, `fn_feature_link_task`, `fn_feature_update`, `fn_milestone_update`
- **Mission tools** — `fn_mission_create`, `fn_mission_list`, `fn_mission_show`, `fn_mission_delete`, `fn_mission_update`, `fn_milestone_add`, `fn_slice_add`, `fn_feature_add`, `fn_feature_delete`, `fn_slice_delete`, `fn_milestone_delete`, `fn_slice_activate`, `fn_feature_link_task`, `fn_feature_update`, `fn_milestone_update`
- **Goal tools** — `fn_goal_list`, `fn_goal_create`, `fn_goal_archive`, `fn_goal_show`
- **Agent tools** — `fn_agent_stop`, `fn_agent_start`, `fn_agent_create`, `fn_agent_delete`, `fn_list_agents`, `fn_delegate_task`, `fn_agent_show`, `fn_agent_org_chart`
- **Skills tools** — `fn_skills_search`, `fn_skills_install`

View File

@@ -245,6 +245,33 @@ Add a feature to a slice. Features are deliverables that can be linked to tasks.
| `description` | string | — | Feature description |
| `acceptanceCriteria` | string | — | Acceptance criteria for completing the feature |
### fn_feature_delete
Delete a feature. Rejects deletion when linked to a live task unless force=true.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `featureId` | string | ✓ | Feature ID to delete (e.g., F-001) |
| `force` | boolean | — | Override linked-task guard |
### fn_slice_delete
Delete a slice and its features. Rejects deletion when child features link to live tasks unless force=true.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sliceId` | string | ✓ | Slice ID to delete (e.g., SL-001) |
| `force` | boolean | — | Override linked-task guard |
### fn_milestone_delete
Delete a milestone and all descendant slices/features. Rejects deletion when child features link to live tasks unless force=true.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `milestoneId` | string | ✓ | Milestone ID to delete (e.g., MS-001) |
| `force` | boolean | — | Override linked-task guard |
### fn_slice_activate
Activate a pending slice for implementation. Sets status to 'active' and enables task linking for its features.

View File

@@ -53,6 +53,9 @@ All skill/extension tool invocations in this catalog use the public `fn_*` names
| `fn_milestone_add` | Add a milestone to a mission. Milestones represent phases of work. |
| `fn_slice_add` | Add a slice to a milestone. Slices are work units that can be activated for implementation. |
| `fn_feature_add` | Add a feature to a slice. Features are deliverables that can be linked to tasks. |
| `fn_feature_delete` | Delete a feature. Rejects deletion when linked to a live task unless force=true. |
| `fn_slice_delete` | Delete a slice and its features. Rejects deletion when child features link to live tasks unless force=true. |
| `fn_milestone_delete` | Delete a milestone and all descendant slices/features. Rejects deletion when child features link to live tasks unless force=true. |
| `fn_slice_activate` | Activate a pending slice for implementation. Sets status to 'active' and enables task linking for its features. |
| `fn_feature_link_task` | Link a feature to a fn task for implementation. Updates the feature status to 'triaged' and associates it with the task. If the target task is not on the active board (for example archived, deleted, or never created), the tool returns a clear validation error indicating that only active tasks can be linked. |
| `fn_feature_update` | Update an existing feature's title, description, or acceptance criteria. Partial patches leave untouched fields intact. |