> 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/phase20-session02-cleanup-parity-signoff/tasks.md).

# Task Checklist

**Session ID**: `phase20-session02-cleanup-parity-signoff` **Total Tasks**: 22 **Estimated Duration**: 3-4 hours **Created**: 2026-06-02

***

## 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 | 10     | 10     | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **22** | **22** | **0**     |

***

## Setup (3 tasks)

Initial context capture and audit scaffolding.

* [x] T001 \[S2002] Verify Phase 16-20 prerequisite sessions and unresolved Phase 16 decisions in implementation notes (`.spec_system/specs/phase20-session02-cleanup-parity-signoff/implementation-notes.md`)
* [x] T002 \[S2002] Create Hermes parity audit matrix for endpoint, hook, route, docs, demo, and v2.3 inventory checks (`.spec_system/specs/phase20-session02-cleanup-parity-signoff/implementation-notes.md`)
* [x] T003 \[S2002] Run targeted static searches for Hermes raw fetch, setInterval, direct mutation, and unused scaffolding findings with false-positive notes (`.spec_system/specs/phase20-session02-cleanup-parity-signoff/implementation-notes.md`)

***

## Foundation (5 tasks)

Audit the core safety and reachability boundaries before changing code.

* [x] T004 \[S2002] \[P] Audit read bridge endpoint registration and public/sensitive gating (`scripts/lib/hermes-dev-bridge.ts`)
* [x] T005 \[S2002] \[P] Audit admin bridge write inventory, requirePreflight, confinePath, body bounds, spawn safety, confirmation, and redaction (`scripts/lib/hermes-admin-bridge.ts`)
* [x] T006 \[S2002] \[P] Audit read hook React Query ownership, document refetchInterval, token gating, and document file access (`src/hooks/use-hermes.ts`)
* [x] T007 \[S2002] \[P] Audit admin hook mutation ownership, in-flight refs, token/admin-disabled states, and query invalidation (`src/hooks/use-hermes-admin.ts`)
* [x] T008 \[S2002] \[P] Audit route composition for every Hermes tab, global status pill reachability, demo fixture routing, and state projections (`src/components/hermes/hermes-read-only-page.tsx`)

***

## Implementation (10 tasks)

Make only audit-backed cleanup, safety, test, and documentation changes.

* [x] T009 \[S2002] Remove confirmed dead route/component scaffolding and stale long-tail constants while preserving explicit loading, empty, error, offline, token-failure, and demo states (`src/components/hermes/hermes-read-only-page.tsx`, `src/components/hermes/hermes-long-tail-data.ts`)
* [x] T010 \[S2002] Fix any confirmed read-bridge parity drift with schema-bounded outputs, traversal-safe document access, and explicit error mapping (`scripts/lib/hermes-dev-bridge.ts`)
* [x] T011 \[S2002] Fix any confirmed admin-bridge parity drift with authorization enforced at the bridge boundary, bounded bodies, transaction-like file handling, and redacted failures (`scripts/lib/hermes-admin-bridge.ts`)
* [x] T012 \[S2002] Fix any confirmed read/admin hook bypass or polling drift with React Query-owned refetch, token-gated sensitive reads, duplicate-trigger prevention while in-flight, and scoped rollback/error handling (`src/hooks/use-hermes.ts`, `src/hooks/use-hermes-admin.ts`)
* [x] T013 \[S2002] \[P] Update bridge tests to lock read endpoint sensitivity and admin write safeguards, including token, loopback, method, body, traversal, spawn, confirmation, malformed payload, and redaction cases (`scripts/lib/__tests__/hermes-dev-bridge.test.ts`, `scripts/lib/__tests__/hermes-admin-bridge.test.ts`)
* [x] T014 \[S2002] \[P] Update hook tests for demo no-bridge behavior, no sensitive read before token, public-read sequencing, admin-disabled states, duplicate prevention, and invalidation (`src/hooks/__tests__/use-hermes.test.tsx`, `src/hooks/__tests__/use-hermes-admin.test.tsx`)
* [x] T015 \[S2002] \[P] Update Hermes component tests for all-tab reachability, demo/live parity, admin disabled states, redacted feedback, and long-text containment (`src/components/hermes/__tests__/hermes-sections.test.tsx`)
* [x] T016 \[S2002] \[P] Update Hermes browser parity coverage for all tabs, global status pill, demo no-bridge behavior, mocked live mode, and text overflow checks (`tests/e2e/hermes-agent.spec.ts`)
* [x] T017 \[S2002] \[P] Update README with completed Hermes surface, `~/.hermes` layout, admin gate boundaries, and no-overclaim parity notes (`README.md`)
* [x] T018 \[S2002] \[P] Update changelog with final Hermes v2.3 port sign-off and residual-gap notes (`docs/CHANGELOG.md`)

***

## Testing (4 tasks)

Verification and final sign-off evidence.

* [x] T019 \[S2002] Run focused Hermes bridge, hook, parser, component, and e2e tests and record exact commands/results (`.spec_system/specs/phase20-session02-cleanup-parity-signoff/implementation-notes.md`)
* [x] T020 \[S2002] Run quality gates for typecheck, script typecheck, lint, format check, full tests, build, and bundle budget with exact command/results (`.spec_system/specs/phase20-session02-cleanup-parity-signoff/implementation-notes.md`)
* [x] T021 \[S2002] Run side-by-side v2.3/AI OS visual parity review or documented Playwright/manual fallback with screenshots or notes (`.spec_system/specs/phase20-session02-cleanup-parity-signoff/implementation-notes.md`)
* [x] T022 \[S2002] Validate ASCII encoding and Unix LF line endings for session artifacts, changed source, docs, and tests (`.spec_system/specs/phase20-session02-cleanup-parity-signoff/implementation-notes.md`)

***

## Completion Checklist

Before marking session complete:

* [x] All tasks marked `[x]`
* [x] All tests passing or residual failures documented as unrelated/actionable
* [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 for independent sign-off.


---

# 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/phase20-session02-cleanup-parity-signoff/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.
