> 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/docs/ongoing-projects/todo.md).

# TODO.md

> Last reviewed: 2026-07-03. This file tracks active or deferred work. The current-state notes below are included only so implemented work does not keep getting rediscovered as TODO.

## Current Status

### General

* Aggregate refactor: mostly addressed at the entrypoint. `scripts/aggregate.ts` is a 23-line wrapper around `scripts/lib/aggregate-orchestration.ts`, but the extracted orchestration and local-agent assembly files are still broad. The remaining cleanup is about clearer host/local assembly boundaries and lower ownership inside `aggregate-orchestration.ts` and `local-agent-assembly.ts`, not about shrinking the entrypoint.
* Service/gateway system: implemented as local Vite middleware and loopback bridges, not as a general service gateway. Current local surfaces include live data, aggregate refresh/status, scoped Trend Finder run/status, Dream run control, Trend Finder Creator Lens, asset, source setup, scheduler status, and visibility bridges, Knowledge Graph/Graphify dev and admin bridges, Hermes dev/admin bridges, OpenClaw dev/admin bridges, operator photo proxy, time-saved config, install marker, and refresh token exchange. There is no public product API, daemon, remote gateway, browser scheduler API, hosted ingestion API, or hosted mutation API.
* Database / SQLite: not part of AI OS product storage today. A future AI OS observation-store database is planned, but the current platform uses generated JSON, gitignored cache snapshots/predictions/backtests/private diagnostics, private `data/` config JSON, scheduler state/log files, and local logs. AI Rogue has browser-local IndexedDB wallet/ledger/run-history storage, but that is extension-local game state, not the AI OS observation store. The only current SQLite code is read-only compatibility scanning of an external OpenClaw `tasks/runs.sqlite` file. See [sqlite-observation-store-transition-plan.md](/ai-os-and-trend-finder-docs/docs/ongoing-projects/sqlite-observation-store-transition-plan.md).
* Public demo fixtures: Cloudflare Pages is static and consumes committed fixtures from `demo-website/public/demo/`. The active work is tracked in [.spec\_system/PRD/phase\_33/PRD\_phase\_33.md](https://github.com/moshehbenavraham/ai-os/blob/main/.spec_system/PRD/phase_33/PRD_phase_33.md): preserve more real Trend Finder artifacts in the public snapshot, add a safe Dream Review projection, and keep the hosted demo honest about frozen data and disabled hosted runtimes.

### Hermes Phase 40 Closeout

Phase 40 Sessions 01-16 shipped the current AI OS Hermes semantic port. Do not rediscover the following as unfinished work:

* Model/provider readiness, shared redaction, chat overrides, MoA preset sends, sanitized `info` SSE events, `/__hermes_cmd`, `/__hermes_moa_save`, connection probes, catalog/context metadata, Ministry model intelligence, bundled pricing, provider assets, chat model selector, approximate context meter, compact carryover flow, command menu, slash actions, Ministry builder, Ministry analytics, config copy fallback, admin-gated MoA save UX, and voice broker respawn parity are implemented.
* Hermes Intelligence remains the portal name. Voice is the speech-control capability inside it. Current voice no-reprompt parity is environment-backed broker respawn from ignored local env, not browser OpenAI key persistence.
* Provider keys remain environment-only. `/__start_voice` accepts empty launches and rejects browser provider config. Public demo mode does not start live voice or perform local writes.
* AI OS package metadata remains `ai-os`; Session 17 does not require a package rename, dependency change, script change, or version change.
* `.gitignore` already ignores generated `graphify-out/`. Do not ignore or remove committed graph seed files at `src/data/graphs/index.json` and `src/data/graphs/ai-os.json`.

Deferred or intentionally skipped upstream items:

* Browser provider-key persistence, browser provider config bodies, standalone voice demo, `/api/sample` TTS path, obsolete upstream 3D component, internal merge notes, monolithic upstream Hermes file copies, hosted writes, public Hermes APIs, public voice APIs, and Dream engine-selection claims remain not shipped.
* Full Phase 40 validation and handoff is Session 18 ownership after the Session 17 documentation closeout. See [Phase 40 Port Closeout](/ai-os-and-trend-finder-docs/docs/phase-40-port-closeout.md).

### Trend Finder

Implemented pipeline:

Creator Lens -> reviewed direct public adapters and deterministic keyword-pack source setup -> bounded Apify fallbacks for reviewed configured sources -> deterministic normalization, signal identity, dedupe, and evidence quality -> optional AI analyst clustering/copy with strict validation -> deterministic fallback topic shaping and identity resolution -> deterministic opportunity scoring, source breakdowns, action recommendations, reception, corroboration, security relevance, lifecycle, sparklines, and source-local signals -> run narratives, demand clusters, industry events, outlier ideas, movement analysis, watchlist, predictions, retros, Story Log, backtest summary, Engine Replay, and static Brief export -> generated live data plus private local cache artifacts.

Current behavior:

* Creator Lens is saved as a browser draft and as gitignored extension cache state through the loopback Creator Lens bridge. It influences AI prompts, deterministic fallback copy, scoring inputs, demand defaults, watchlist reasons, and creator-facing angle packs.
* Source strategy is still reviewed and deterministic, not AI-planned. Direct adapters run against reviewed public APIs/feeds; deterministic keyword packs rotate reviewed search terms into allowlisted source fields; local Source Setup can edit reviewed source targets through a loopback bridge. AI does not choose sources, write raw Actor input, add new source IDs, or adapt source weights across runs.
* Apify Datasets stay in Apify. The collector reads bounded Dataset items, then stores browser-safe normalized evidence, source summaries, spend/cache labels, and private snapshots/prediction/backtest/diagnostic artifacts locally. Raw Dataset rows, Actor inputs, run IDs, Dataset IDs, prompts, provider responses, billing payloads, auth files, and private paths stay out of the browser payload.
* Normalization and first-pass evidence handling are deterministic. Source normalizers produce browser-safe URLs, titles, snippets, timestamps, metrics, relevance scores, source IDs, and source-local labels. Signal identity drops same-source duplicates and exposes only aggregate duplicate/syndication summaries. Evidence quality scores are deterministic, not AI-authored.
* Topic clustering is optional AI plus deterministic fallback. If runtime is ready, the analyst can return validated topics, angle packs, demand and industry briefs, theme labels, run narratives, and outlier ideas. If runtime is disabled, unavailable, invalid, or fails validation, deterministic fallback topics/copy are generated. The collector does not currently pass AI continuity hints into topic identity resolution.
* Opportunity scoring is deterministic across the six score factors and newer derived signals. AI can provide upstream topic factors and copy, but final numeric scores, action verdicts, source breakdowns, reliability caps, calibration labels, and visibility/suppression states are not AI-authored.
* History is more than `latest.json`: Trend Finder writes latest and dated private snapshots, loads an 84-day historical context, resolves topic identity, publishes bounded 12-week summaries and sparklines, tracks Hugging Face download deltas, writes predictions, grades retros, exposes calibration and Story Log rows, supports script-only backtests, and preserves bounded backtest aggregate summaries. There is still no SQLite-backed durable AI OS observation store.
* The shipped browser surfaces include Trends, Hidden Gems, Sources, Watchlist, Brief, Signal Workbench, Search Palette, visibility controls, local Source Setup, live run progress, Engine Replay/Reference, and static Brief export. Signal Radar now plots generated topics on meaningful axes, but some HUD copy remains visual-only and should be kept clearly non-telemetry.

## Active TODO

### General

| Work                         | Current State                                                                                  | Next Action                                                                                                                                                         |
| ---------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Aggregate orchestration trim | Entrypoint is tiny, but `aggregate-orchestration.ts` and `local-agent-assembly.ts` are broad.  | Split host/local assembly, usage, local-agent, extension orchestration, and write responsibilities only where it lowers real complexity.                            |
| Service boundary decision    | Local loopback middleware and bridges exist; no product API or daemon exists.                  | Decide whether the long-term boundary remains command-first local middleware, becomes a local daemon, or gets a public API, then document migration/security rules. |
| SQLite observation store     | Future plan only; no AI OS DB implementation exists.                                           | Start with storage/privacy guardrails, gitignore/private-artifact checks, and a small `bun:sqlite` helper before moving any product history.                        |
| Public demo real fixtures    | Static fixture path exists; Dream is still absent and some Trend Finder artifacts are omitted. | Execute the linked demo-fixtures plan, then scan and smoke-test the static Pages build before committing refreshed fixtures.                                        |

### Trend Finder Visual

| Work                | Current State                                                                                                                          | Next Action                                                                                                                                                         |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Signal Radar polish | Implemented as a selected-topic inspection surface with meaningful axes, selectable bubbles, lifecycle colors, and explicit fallbacks. | Remove or relabel simulated coordinate/frequency/HUD copy that can read as real telemetry; improve density, mobile behavior, reduced-motion behavior, and contrast. |

### Trend Finder Engine

| Work                                    | Status                                         | Next Action                                                                                                                                                                                                                                                                                               |
| --------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| AI source/run planner, proposal-only    | Not implemented                                | If added, make it propose diffs only against reviewed source IDs, keyword packs, and Source Setup fields after reviewing Creator Lens, source health, warnings, and recent outcomes. Require explicit operator approval.                                                                                  |
| Run history and evaluation ledger       | Partly implemented                             | Keep snapshots, 84-day context, daily series, predictions, retros, Story Log, backtests, source-death baselines, private diagnostics, and seed-candidate artifacts. Add a compact per-run ledger for source inputs, accepted/rejected counts, validation issues, warnings, runtime status, and decisions. |
| Dataset digest / sanitized sample cache | Partly implemented                             | Sources, Workbench, Brief, and Engine Replay show safe evidence/source summaries, but there is no per-source sanitized normalized-item digest. Add one only if source review needs more concrete samples without raw Dataset rows.                                                                        |
| Hybrid normalized evidence enrichment   | Partly implemented                             | Deterministic normalization, quality scoring, source-local labels, and outlier ideas exist. Add AI enrichment only for bounded title/snippet/tag/topic-hint/rejection-reason suggestions after public URL and schema validation.                                                                          |
| AI evidence quality critic              | Deterministic implementation exists; AI absent | Keep deterministic quality and dedupe primary. If useful, add an AI sidecar that flags weak, stale, spammy, duplicate, unrelated, or creator-misaligned evidence; deterministic code should decide score impact.                                                                                          |
| AI/hybrid topic clustering v2           | Partly implemented                             | Current AI analyst, deterministic fallback clustering, feature-hash theme fallback, reviewed seeds, and identity resolver work. Add AI merge/split/continuity hints only with strict evidence validation and no generic-topic merging.                                                                    |
| AI scoring critic                       | Deterministic implementation exists; AI absent | The `scoring-critic` trace stage and action consistency checks are deterministic. Add an AI critique sidecar only for counter-signals, confidence caveats, and "why this score may mislead" copy; keep score math deterministic.                                                                          |
| AI-assisted score calibration           | Partly implemented                             | Calibration metrics, action caps, predictions, retros, and backtests exist. Add offline recommendations for weights, caps, reliability, novelty, and confidence before changing production scoring.                                                                                                       |
| Creator Lens adaptive source emphasis   | Partly implemented                             | Creator Lens affects analysis, fallback, scoring, demand defaults, and some copy. Add visible, reversible source/keyword emphasis proposals from recent outcomes without letting AI mutate source config directly.                                                                                        |
| Creator opportunity brief refinement    | Mostly implemented                             | Brief, static Brief, angle packs, run narratives, demand clusters, industry events, and One to Watch exist. Treat any additional final synthesis pass as copy-quality refinement, not missing core product behavior.                                                                                      |


---

# 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/docs/ongoing-projects/todo.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.
