> 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/specs/phase41-session03-hermes-route-modes-and-hooks/tasks.md).

# Task Checklist

**Session ID**: `phase41-session03-hermes-route-modes-and-hooks` **Total Tasks**: 19 **Estimated Duration**: 3-4 hours **Created**: 2026-07-03

***

Legend: `[x]` completed; `[ ]` pending; `[P]` parallelizable; `[SNNMM]` session ref; `TNNN` task ID.

***

## Setup (3 tasks)

* [x] T001 \[S4103] Verify Session 02 validation, analyzer state, and current ready route/admin hook behavior (`src/hooks/use-hermes.ts`)
* [x] T002 \[S4103] \[P] Inspect route-mode consumers for compile-sensitive `HermesRouteMode` assumptions (`src/components/hermes/hermes-cli-cheatsheet.tsx`)
* [x] T003 \[S4103] \[P] Inspect hook and parser tests that assert ready `read-only`, `adminEnabled`, token success, and token failure behavior (`src/hooks/__tests__/use-hermes.test.tsx`)

***

## Foundation (4 tasks)

* [x] T004 \[S4103] Replace the ready `read-only` route-mode union member with `live-local` and add a central route-mode helper with exhaustive state mapping (`src/lib/hermes-types.ts`)
* [x] T005 \[S4103] \[P] Add route-mode helper tests for live-local, demo-only, setup-required, offline, endpoint-error, and token-failure mapping (`src/lib/__tests__/hermes-types.test.ts`)
* [x] T006 \[S4103] Update Hermes admin status parser assertions so `adminEnabled` remains a compatibility mirror for `writeReady` instead of a manual local gate (`src/lib/__tests__/hermes-admin-types.test.ts`)
* [x] T007 \[S4103] Update shared hook fixtures to represent local all-access readiness, named blockers, and fixture-only tokens without private data (`src/hooks/__tests__/use-hermes-admin.test.tsx`)

***

## Implementation (7 tasks)

* [x] T008 \[S4103] Update `useHermes()` to use the route-mode helper and return `live-local` for ready local Hermes with explicit loading, offline, setup, endpoint, demo, and token-failure states (`src/hooks/use-hermes.ts`)
* [x] T009 \[S4103] Preserve public read and sensitive read query gating so token-gated reads run only after automatic token success and token failures fail closed (`src/hooks/use-hermes.ts`)
* [x] T010 \[S4103] Update demo fallback eligibility so live-local mode does not advertise demo as the normal path while blocked states can still offer demo fallback (`src/hooks/use-hermes.ts`)
* [x] T011 \[S4103] Update `useHermesAdmin()` to derive write capability from parsed `writeReady` plus same-run token readiness, with authorization enforced at the hook boundary closest to mutations (`src/hooks/use-hermes-admin.ts`)
* [x] T012 \[S4103] Preserve admin mutation duplicate-trigger prevention while in-flight across chat, persona, image, command, MoA, mission, Pantheon, document, and Obsidian actions (`src/hooks/use-hermes-admin.ts`)
* [x] T013 \[S4103] Update route-mode consumer logic to compile with `live-local` and treat it as ready without broad shell copy or component rename changes (`src/components/hermes/hermes-cli-cheatsheet.tsx`)
* [x] T014 \[S4103] Adjust status-bar readiness support only where needed so live local readiness does not depend on legacy read-only route wording (`src/components/hermes/hermes-status-bar.tsx`)

***

## Testing (5 tasks)

* [x] T015 \[S4103] Update Hermes read hook tests for ready `live-local`, token bootstrap success, token bootstrap failure, demo, offline, setup, and endpoint-error states (`src/hooks/__tests__/use-hermes.test.tsx`)
* [x] T016 \[S4103] Update Hermes admin hook tests for writeReady capability, token missing, local access disabled, offline, status failure, and duplicate-trigger prevention (`src/hooks/__tests__/use-hermes-admin.test.tsx`)
* [x] T017 \[S4103] Update Hermes route tests only where mocked ready local state or metadata assertions depend on the old ready route-mode contract (`src/routes/__tests__/agents.test.tsx`)
* [x] T018 \[S4103] Run focused automated checks for route-mode, read hook, admin hook, parser, and route tests (`bun run test -- src/lib/__tests__/hermes-types.test.ts src/hooks/__tests__/use-hermes.test.tsx src/hooks/__tests__/use-hermes-admin.test.tsx src/lib/__tests__/hermes-admin-types.test.ts src/routes/__tests__/agents.test.tsx`)
* [x] T019 \[S4103] Run type and text hygiene checks for touched files, including `bun run typecheck`, ASCII validation, and LF validation (`package.json`)

***

## Completion Checklist

* [x] All tasks marked `[x]`
* [x] All tests and checks passing
* [x] All files ASCII-encoded with LF line endings
* [x] implementation-notes.md updated
* [x] Ready for `creview` (next step in the implement -> creview -> validate sequence)

***

## Next Steps

Run the `implement` workflow step.


---

# 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/specs/phase41-session03-hermes-route-modes-and-hooks/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.
