> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase25-session04-multi-goal-authoring-preview-ui/tasks.md).

# Task Checklist

**Session ID**: `phase25-session04-multi-goal-authoring-preview-ui` **Total Tasks**: 20 **Estimated Duration**: 3-4 hours **Created**: 2026-06-08

***

## Legend

* `[x]` = Completed
* `[ ]` = Pending
* `[P]` = Parallelizable (can run with other \[P] tasks)
* `[SNNMM]` = Session reference (NN=phase number, MM=session number)
* `TNNN` = Task ID

***

## Progress Summary

| Category       | Total  | Done   | Remaining |
| -------------- | ------ | ------ | --------- |
| Setup          | 3      | 3      | 0         |
| Foundation     | 5      | 5      | 0         |
| Implementation | 8      | 8      | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **20** | **20** | **0**     |

***

## Setup (3 tasks)

Initial configuration and environment preparation.

* [x] T001 \[S2504] Verify Sessions 01-03 validation artifacts and Mission Control prerequisites are present (`.spec_system/specs/phase25-session03-safe-planning-prompt-authorized-write/validation.md`)
* [x] T002 \[S2504] \[P] Re-confirm current single-goal create form, optimize feedback path, and admin mission action contracts before editing (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T003 \[S2504] \[P] Create implementation notes and session security review placeholders (`.spec_system/specs/phase25-session04-multi-goal-authoring-preview-ui/implementation-notes.md`)

***

## Foundation (5 tasks)

Core structures and base implementations.

* [x] T004 \[S2504] Create manual mission draft types, defaults, stable row IDs, and shared 4-10 goal plus 7-42 day limits (`src/lib/hermes-mission-authoring.ts`)
* [x] T005 \[S2504] Implement manual draft validation and `HermesMissionCreateRequest` payload conversion with schema-validated input and explicit error mapping (`src/lib/hermes-mission-authoring.ts`)
* [x] T006 \[S2504] Implement optimized preview projection helpers for title, binary outcome, deadline, actor split, and sorted mini-goals with types matching declared contracts (`src/lib/hermes-mission-authoring.ts`)
* [x] T007 \[S2504] \[P] Add unit tests for draft defaults, add/remove bounds, required fields, actor values, deadlines, goal counts, and optional `full_prompt` payloads (`src/lib/__tests__/hermes-mission-authoring.test.ts`)
* [x] T008 \[S2504] \[P] Add unit tests for optimized preview projection, deterministic goal ordering, and actor split summaries (`src/lib/__tests__/hermes-mission-authoring.test.ts`)

***

## Implementation (8 tasks)

Main feature implementation.

* [x] T009 \[S2504] Replace the single-goal `CreateDraft` state with multi-goal authoring state and reset-on-close/re-entry behavior (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T010 \[S2504] Build dynamic mini-goal rows with add/remove controls, actor selection, estimate, done-when, and optional full-prompt input with accessibility labels, focus management, and input support (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T011 \[S2504] Wire manual create submit through `admin.missions.createMission` with authorization enforced through `canEdit`, duplicate-trigger prevention while in-flight, redacted errors, and query invalidation on success (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T012 \[S2504] Split manual lightweight creation, optimize-from-prompt, and import surfaces into scannable modes with explicit disabled, pending, empty, and error states (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T013 \[S2504] Store optimize results as local preview state instead of success-only feedback, with no mission query invalidation or active-state mutation before commit (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T014 \[S2504] Render optimized preview details and mini-goals with bounded labels, actor split, deadline metadata, explicit loading/error feedback, and accessible commit/discard controls (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T015 \[S2504] Wire preview commit and discard actions through `admin.missions.commitMission` and local state reset with duplicate-trigger prevention while in-flight, query invalidation on commit, and scoped rollback on error (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T016 \[S2504] Preserve Hermes/Claude Code presentation parity and existing copy prompt, import, tick, clear, refresh, demo, offline, token-failure, and admin-disabled behavior (`src/components/hermes/hermes-mission-control.tsx`)

***

## Testing (4 tasks)

Verification and quality assurance.

* [x] T017 \[S2504] Add component coverage for manual add/remove, actor selection, optional `full_prompt`, validation bounds, create payload shape, disabled gates, and duplicate-submit prevention (`src/components/hermes/__tests__/hermes-mission-control.test.tsx`)
* [x] T018 \[S2504] Add component coverage for optimize preview render, no invalidation on optimize, commit payload, invalidation on commit, discard behavior, reset on re-entry, and redacted commit errors (`src/components/hermes/__tests__/hermes-mission-control.test.tsx`)
* [x] T019 \[S2504] Run focused authoring helper and Mission Control tests, then confirm existing import, tick, clear, Hermes, and Claude Code presentation tests still pass (`src/components/hermes/__tests__/hermes-mission-control.test.tsx`)
* [x] T020 \[S2504] Run `bun run typecheck`, `bun run lint`, validate ASCII/LF output, and update implementation notes plus security review (`.spec_system/specs/phase25-session04-multi-goal-authoring-preview-ui/implementation-notes.md`)

***

## Completion Checklist

Before marking session complete:

* [x] All tasks marked `[x]`
* [x] All tests passing
* [x] All files ASCII-encoded
* [x] implementation-notes.md updated
* [x] security-compliance.md updated
* [x] Ready for the validate workflow step

***

## Next Steps

Run the validate workflow step to verify session completeness.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase25-session04-multi-goal-authoring-preview-ui/tasks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
