> 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-session07-mission-archive-actions/tasks.md).

# Task Checklist

**Session ID**: `phase25-session07-mission-archive-actions` **Total Tasks**: 22 **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     | 6      | 6      | 0         |
| Implementation | 9      | 9      | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **22** | **22** | **0**     |

***

## Setup (3 tasks)

Initial configuration and environment preparation.

* [x] T001 \[S2507] Verify Phase 25 prerequisites, analyzer state, Session 06 completion evidence, and Mission archive file paths (`.spec_system/PRD/phase_25/session_07_mission_archive_actions.md`)
* [x] T002 \[S2507] \[P] Create implementation notes scaffold for set-active decisions, command output, manual checks, and known follow-ups (`.spec_system/specs/phase25-session07-mission-archive-actions/implementation-notes.md`)
* [x] T003 \[S2507] \[P] Create security compliance scaffold for active-pointer writes, admin gate review, and browser-visible archive data boundaries (`.spec_system/specs/phase25-session07-mission-archive-actions/security-compliance.md`)

***

## Foundation (6 tasks)

Core structures and base implementations.

* [x] T004 \[S2507] \[P] Add mission set-active request/response types and parser with types matching the declared contract and exhaustive mission validation (`src/lib/hermes-admin-types.ts`)
* [x] T005 \[S2507] Add parser coverage for set-active success, missing active ID, malformed mission document, and wrong `ok` shape (`src/lib/__tests__/hermes-admin-types.test.ts`)
* [x] T006 \[S2507] Add set-active endpoint registration and request body validation shell with schema-validated input and explicit error mapping (`scripts/lib/hermes-admin-bridge.ts`)
* [x] T007 \[S2507] Extend mission admin actions with set-active mutation state, action signature, and shared mission busy aggregation (`src/hooks/use-hermes-admin.ts`)
* [x] T008 \[S2507] Add archive action presentation state, target selection state, and confirmation state model with state reset or revalidation on re-entry (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T009 \[S2507] Extend Mission Control presentation copy for archive active markers, set-active success, confirmation, and Claude Code parity labels (`src/components/hermes/hermes-mission-control.tsx`)

***

## Implementation (9 tasks)

Main feature implementation.

* [x] T010 \[S2507] Implement bridge set-active logic over `missions.json.active` with authorization enforced at the boundary closest to the resource (`scripts/lib/hermes-admin-bridge.ts`)
* [x] T011 \[S2507] Preserve mission documents during set-active writes with idempotency protection, atomic store boundaries, and no document schema mutation (`scripts/lib/hermes-admin-bridge.ts`)
* [x] T012 \[S2507] Implement hook `setActiveMission` mutation against `/__hermes_missions/set-active` with duplicate-trigger prevention while in-flight (`src/hooks/use-hermes-admin.ts`)
* [x] T013 \[S2507] Wire parent `handleSetActiveMission` through existing feedback, busy, redaction, local-cleared-active, selected-goal, and query invalidation paths (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T014 \[S2507] Render active archive markers and inactive Set active/Reactivate controls with platform-appropriate accessibility labels, focus management, and input support (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T015 \[S2507] Add replacement confirmation UI with explicit typed confirmation, disabled submit until valid, and state reset on close or successful mutation (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T016 \[S2507] Guard archive actions in demo, offline, token-failure, admin-disabled, and any mission-write busy state with denied/restricted/revoked handling and fallback behavior (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T017 \[S2507] Keep archive failure feedback bounded and redacted through existing display helpers with explicit error mapping (`src/components/hermes/hermes-mission-control.tsx`)
* [x] T018 \[S2507] Confirm Hermes and Claude Code archive action parity without adding route-specific bridge behavior (`src/components/hermes/hermes-mission-control.tsx`)

***

## Testing (4 tasks)

Verification and quality assurance.

* [x] T019 \[S2507] \[P] Add bridge tests for set-active success, pointer integrity, current-active no-op, invalid ID, missing target, confirmation, closed gate, invalid token, and remote rejection (`scripts/lib/__tests__/hermes-admin-bridge.test.ts`)
* [x] T020 \[S2507] \[P] Add hook tests for set-active request body, parser path, duplicate prevention, success invalidation, and error surfacing (`src/hooks/__tests__/use-hermes-admin.test.tsx`)
* [x] T021 \[S2507] \[P] Add component tests for archive active markers, confirmation flow, busy/disabled states, redacted failures, state reset, and Claude Code parity (`src/components/hermes/__tests__/hermes-mission-control.test.tsx`)
* [x] T022 \[S2507] Run focused tests, typecheck, lint, ASCII validation, and manual desktop/mobile archive overflow review (`package.json`)

***

## 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-session07-mission-archive-actions/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.
