> 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-session02-mission-schema-version-legacy-compatibility/tasks.md).

# Task Checklist

**Session ID**: `phase25-session02-mission-schema-version-legacy-compatibility` **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 | 9      | 9      | 0         |
| Testing        | 3      | 3      | 0         |
| **Total**      | **20** | **20** | **0**     |

***

## Setup (3 tasks)

Initial configuration and environment preparation.

* [x] T001 \[S2502] Verify Session 01 prerequisite artifacts and PASS validation (`.spec_system/specs/phase25-session01-mission-write-contract-preview-commit/validation.md`)
* [x] T002 \[S2502] \[P] Capture the legacy and v2.3 mission fixture matrix for read-bridge coverage (`scripts/lib/__tests__/hermes-dev-bridge.test.ts`)
* [x] T003 \[S2502] \[P] Create session implementation notes for commands, decisions, and state repair (`.spec_system/specs/phase25-session02-mission-schema-version-legacy-compatibility/implementation-notes.md`)

***

## Foundation (5 tasks)

Core structures and base implementations.

* [x] T004 \[S2502] Define the current mission schema version and add it to read-side mission summaries (`scripts/lib/hermes-dev-bridge.ts`)
* [x] T005 \[S2502] \[P] Add `schema_version` to browser read types and mission parser with types matching the declared contract and exhaustive status handling (`src/lib/hermes-types.ts`)
* [x] T006 \[S2502] \[P] Add `schema_version` to admin mission types and parser with schema-validated response parsing and explicit error mapping (`src/lib/hermes-admin-types.ts`)
* [x] T007 \[S2502] \[P] Update demo mission fixtures with current schema versions for parser parity (`src/lib/hermes-demo-data.ts`)
* [x] T008 \[S2502] \[P] Document the AI OS mission envelope, schema version, and raw v2.3 endpoint incompatibility (`docs/data-contract.md`)

***

## Implementation (9 tasks)

Main feature implementation.

* [x] T009 \[S2502] Harden mission goal normalization for missing `full_prompt`, missing `estimate`, missing `done_when`, and unknown status values with schema-validated input and explicit fallbacks (`scripts/lib/hermes-dev-bridge.ts`)
* [x] T010 \[S2502] Harden mission store normalization for malformed mission entries, invalid active pointers, bounded mission counts, and deterministic archived ordering (`scripts/lib/hermes-dev-bridge.ts`)
* [x] T011 \[S2502] Add read-bridge coverage for v2.3-shaped stores, missing schema versions, and optional field upgrades (`scripts/lib/__tests__/hermes-dev-bridge.test.ts`)
* [x] T012 \[S2502] Add read-bridge coverage for malformed entries, active mismatch, unknown statuses, and sanitized browser output (`scripts/lib/__tests__/hermes-dev-bridge.test.ts`)
* [x] T013 \[S2502] Write current `schema_version` on mission create, optimize preview, and commit with authorization enforced at the bridge boundary (`scripts/lib/hermes-admin-bridge.ts`)
* [x] T014 \[S2502] Normalize existing mission store records during admin reads so the next authorized write persists upgraded shapes through atomic file boundaries (`scripts/lib/hermes-admin-bridge.ts`)
* [x] T015 \[S2502] Add admin bridge coverage for schema persistence and legacy-store upgrade on create, commit, tick, and clear writes (`scripts/lib/__tests__/hermes-admin-bridge.test.ts`)
* [x] T016 \[S2502] Add read parser tests for valid and malformed mission `schema_version` payloads (`src/lib/__tests__/hermes-types.test.ts`)
* [x] T017 \[S2502] Add admin parser tests for valid and malformed mission `schema_version` payloads across write, optimize, and commit responses (`src/lib/__tests__/hermes-admin-types.test.ts`)

***

## Testing (3 tasks)

Verification and quality assurance.

* [x] T018 \[S2502] Run focused Hermes bridge and parser tests and record results (`.spec_system/specs/phase25-session02-mission-schema-version-legacy-compatibility/implementation-notes.md`)
* [x] T019 \[S2502] Run `bun run typecheck` and `bun run typecheck:scripts` and record results (`.spec_system/specs/phase25-session02-mission-schema-version-legacy-compatibility/implementation-notes.md`)
* [x] T020 \[S2502] Validate ASCII/LF output and complete the session security review for schema and write boundaries (`.spec_system/specs/phase25-session02-mission-schema-version-legacy-compatibility/security-compliance.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-session02-mission-schema-version-legacy-compatibility/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.
