> 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/phase31-session04-extensions-and-agent-routes/tasks.md).

# Task Checklist

**Session ID**: `phase31-session04-extensions-and-agent-routes` **Total Tasks**: 21 **Estimated Duration**: 3-4 hours **Created**: 2026-06-24

***

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

***

## Progress Summary

| Metric           | Value    |
| ---------------- | -------- |
| Tasks Completed  | 21 / 21  |
| Percent Complete | 100%     |
| Current Task     | Complete |

***

## Setup (2 tasks)

* [x] T001 \[S3104] Verify Phase 31 Session 01-03 prerequisites and Session 04 scope from the PRD artifacts (`.spec_system/PRD/phase_31/PRD_phase_31.md`)
* [x] T002 \[S3104] Review the Session 04 endpoint inventory against current route and hook fetch paths (`.spec_system/PRD/phase_31/session_04_extensions_and_agent_routes.md`)

***

## Foundation (4 tasks)

* [x] T003 \[S3104] Create public-demo route test helpers that record fetch paths and fail on `/__*` bridge requests (`src/routes/__tests__/public-demo-routes.test.tsx`)
* [x] T004 \[S3104] \[P] Add any missing hosted-demo copy keys for route-level unavailable states (`src/lib/public-demo.ts`)
* [x] T005 \[S3104] \[P] Add focused Trend Finder static asset test coverage for public-demo media URLs and no token fetches (`src/extensions/trend-finder/components/__tests__/evidence-asset-preview.test.tsx`)
* [x] T006 \[S3104] \[P] Add AI Rogue public-demo route expectations for browser-local status and extension visibility (`src/extensions/ai-rogue/__tests__/client.test.tsx`)

***

## Implementation (11 tasks)

* [x] T007 \[S3104] Force Hermes hosted public-demo mode before live bridge hooks can construct status, token, chat, document, mission, upload, or admin URLs with state reset on re-entry (`src/components/hermes/hermes-read-only-page.tsx`)
* [x] T008 \[S3104] Force Claude Code hosted public-demo Mission Control behavior before admin-gated mission actions can construct bridge URLs (`src/components/hermes/claude-code-mission-page.tsx`)
* [x] T009 \[S3104] Force OpenClaw hosted public-demo mode before status, token, dashboard, and admin action hooks can construct bridge URLs (`src/components/openclaw/openclaw-read-only-page.tsx`)
* [x] T010 \[S3104] Force Knowledge Graph public-demo graph fixtures through read, token, admin, and route page wiring with authorization enforced at the demo boundary (`src/components/knowledge-graph/knowledge-graph-page.tsx`)
* [x] T011 \[S3104] Keep grounded Hermes chat demo/read-only when Knowledge Graph is public-demo so chat admin writes and local bridge calls stay unavailable (`src/components/knowledge-graph/knowledge-graph-grounded-chat.tsx`)
* [x] T012 \[S3104] Skip Trend Finder visibility file bridge loading in public-demo mode while retaining browser-local visibility settings with state reset on re-entry (`src/extensions/trend-finder/use-visibility-settings.ts`)
* [x] T013 \[S3104] Allow only `/demo/trend-finder-assets/*` static asset URLs alongside existing local bridge asset URLs in the browser-safe Trend Finder schema (`src/extensions/trend-finder/schema.ts`)
* [x] T014 \[S3104] Split Trend Finder evidence asset view models between static public asset URLs and local bridge URLs with exhaustive fallback labels (`src/extensions/trend-finder/view-model.ts`)
* [x] T015 \[S3104] Render static Trend Finder asset previews directly in public-demo mode and keep bridge previews behind token fetches only outside public-demo mode with cleanup on scope exit (`src/extensions/trend-finder/components/evidence-asset-preview.tsx`)
* [x] T016 \[S3104] Tune Trend Finder public-demo provenance and unavailable-state labels on Trends, Sources, and Engine Replay without adding diagnostic endpoint copy to product surfaces (`src/extensions/trend-finder/views/trends-view.tsx`)
* [x] T017 \[S3104] Label AI Rogue public-demo state as browser-local across Play and Ledger while preserving duplicate-trigger prevention for save, claim, and reset actions (`src/extensions/ai-rogue/views/view-shell.tsx`)

***

## Testing (4 tasks)

* [x] T018 \[S3104] Extend agent route tests to prove Hermes, Claude Code, and OpenClaw public-demo routes do not request local bridge endpoints (`src/routes/__tests__/agents.test.tsx`)
* [x] T019 \[S3104] Extend Knowledge Graph and extension route tests to prove demo graph, Trend Finder, and AI Rogue public-demo routes avoid `/__*` requests (`src/routes/__tests__/knowledge-graph.test.tsx`)
* [x] T020 \[S3104] Run focused Vitest suites for public-demo route, Trend Finder asset, agent, Knowledge Graph, extension, and AI Rogue behavior (`bun run test -- src/routes/__tests__/public-demo-routes.test.tsx src/routes/__tests__/agents.test.tsx src/routes/__tests__/knowledge-graph.test.tsx src/routes/__tests__/extensions-routes.test.tsx src/extensions/trend-finder/components/__tests__/evidence-asset-preview.test.tsx src/extensions/ai-rogue/__tests__/client.test.tsx`)
* [x] T021 \[S3104] Run typecheck, diff whitespace, ASCII, and LF validation for changed app and test files (`bun run typecheck && git diff --check && files=$(git ls-files --modified --others --exclude-standard); if [ -n "$files" ]; then LC_ALL=C rg -n '[^\x00-\x7F]' $files; test $? -eq 1; rg -n $'\r' $files; test $? -eq 1; fi`)

***

## 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` to inspect and repair uncommitted changes before validation

***

## Next Steps

Run the `creview` 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/archive/sessions/phase31-session04-extensions-and-agent-routes/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.
