# Consolidated index.localhost — Design

**Decision log from brainstorming session.**

## Problem

Three separate index/homepage pages with overlapping content, different grouping taxonomies, no search:

| Page | Tech | Shows |
|------|------|-------|
| `index.localhost` | Static rewrite to `present/index.html` | ~300 HTML reports grouped by function |
| Gradio index app (port 7800, no Caddy entry) | `index/app.py` | Service cards + start/stop |
| `static.localhost` root | `static/server.py` | ~60 shared directories |

## Decisions

1. **NiceGUI** for the new app (not Gradio)
2. **Hybrid C with B lean** — search bar always visible, but dashboard is rich enough to browse/discover without knowing what to search for
3. **Kill `present/index.html`** — reports fold into catalog. Keep `static.localhost` root (it's a functional directory browser)
4. **Separate sections by type** — Services (Forge/Intake/Knowledge), Recent Reports, Tools & Reference. Search unifies them.

## Layout

```
+--------------------------------------------------+
|  Rivus                             [ search... ]  |
+--------------------------------------------------+
|                                                   |
|  -- Services ------------------------------------  |
|  Three columns: Forge | Intake | Knowledge        |
|  Compact cards: dot + emoji + name + port         |
|  Click -> opens. Start/stop buttons.              |
|  Auto-refresh 5s.                                 |
|                                                   |
|  -- Recent Reports ------------------------------  |
|  Last ~10 reports, sorted by date.                |
|  Title + path + date. "Browse all N ->" expands.  |
|                                                   |
|  -- Tools & Reference ---------------------------  |
|  Skills, CLI tools, docs. Collapsed by default.   |
|                                                   |
+--------------------------------------------------+
|  Search results (replaces dashboard when typing)  |
|  Grouped by type with colored badges.             |
|  Empty search -> dashboard returns.               |
+--------------------------------------------------+
```

## Catalog Sources (~300+ entries)

| Source | ~Count | How |
|--------|--------|-----|
| Services | ~20 | `registry.discover_services()` |
| Static dirs | ~50 | `static.share.find_share_files()` |
| HTML reports | ~150 | Scan `.share` dirs, extract `<title>` |
| Skills | ~49 | Parse `~/.claude/skills/*/SKILL.md` YAML frontmatter |
| CLI tools | ~10 | Hardcoded from CLAUDE.md table |
| Docs | ~15 | `Glob("**/CLAUDE.md")` |

## What Dies

- `present/build_index.py` — dead code, delete
- `present/index.html` — generated file, delete
- `index/app.py` — rewrite from Gradio to NiceGUI
- Caddy `index.localhost` block — change from static rewrite to reverse_proxy :7800
