112 lines
5.3 KiB
HTML
Raw Normal View History

2026-03-13 00:18:14 +00:00
{% extends "base.html" %}
{% import "macros/ui.html" as m %}
{% block title %}Dashboard — Ontoref{% endblock title %}
{% block nav_dashboard %}active{% endblock nav_dashboard %}
{% block content %}
<div class="mb-6">
<h1 class="text-2xl font-bold">Dashboard</h1>
<p class="text-base-content/60 text-sm font-mono mt-1">{{ project_root }}</p>
</div>
<!-- Daemon stats -->
<div class="stats stats-horizontal shadow w-full mb-4 bg-base-200 overflow-x-auto">
{{ m::stat(title="Uptime", value=uptime_secs ~ "s", desc="seconds since start") }}
{{ m::stat(title="Cache entries", value=cache_entries) }}
{{ m::stat(title="Cache hit rate", value=cache_hit_rate, desc=cache_hits ~ " hits / " ~ cache_misses ~ " misses", accent="success") }}
{{ m::stat(title="Sessions", value=active_actors, accent="primary") }}
{{ m::stat(title="Notifications", value=notification_count, accent="warning") }}
</div>
<!-- Project status -->
{% if backlog %}
<div class="stats stats-horizontal shadow w-full mb-8 bg-base-200 overflow-x-auto">
{{ m::stat(title="Backlog total", value=backlog.total) }}
{{ m::stat(title="Open", value=backlog.open, accent="warning") }}
{{ m::stat(title="In progress", value=backlog.inprog, accent="info") }}
{{ m::stat(title="Done", value=backlog.done, accent="success") }}
{{ m::stat(title="Critical", value=backlog.critical, accent="error") }}
{{ m::stat(title="ADRs", value=adr_count) }}
{{ m::stat(title="Modes", value=mode_count) }}
</div>
{% endif %}
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
<a href="{{ base_url }}/graph" class="card bg-base-200 hover:bg-base-300 transition-colors cursor-pointer">
<div class="card-body">
<h2 class="card-title text-primary">Ontology Graph</h2>
<p class="text-sm text-base-content/60">Nodes, edges, and relationships from <code>.ontology/core.ncl</code></p>
</div>
</a>
<a href="{{ base_url }}/sessions" class="card bg-base-200 hover:bg-base-300 transition-colors cursor-pointer">
<div class="card-body">
<h2 class="card-title text-secondary">Active Sessions</h2>
<p class="text-sm text-base-content/60">{{ active_actors }} actor(s) currently registered</p>
</div>
</a>
<a href="{{ base_url }}/notifications" class="card bg-base-200 hover:bg-base-300 transition-colors cursor-pointer">
<div class="card-body">
<h2 class="card-title text-warning">Notifications</h2>
<p class="text-sm text-base-content/60">{{ notification_count }} notification(s) in store</p>
</div>
</a>
<a href="{{ base_url }}/modes" class="card bg-base-200 hover:bg-base-300 transition-colors cursor-pointer">
<div class="card-body">
<h2 class="card-title text-accent">Reflection Modes</h2>
<p class="text-sm text-base-content/60">NCL DAG workflows in <code>reflection/modes/</code></p>
{% if mode_count %}<p class="text-xs text-base-content/40 mt-1">{{ mode_count }} modes</p>{% endif %}
</div>
</a>
<a href="{{ base_url }}/backlog" class="card bg-base-200 hover:bg-base-300 transition-colors cursor-pointer">
<div class="card-body">
<h2 class="card-title text-info">Backlog</h2>
{% if backlog %}
<p class="text-sm text-base-content/60">{{ backlog.open }} open · {{ backlog.inprog }} in progress · {{ backlog.critical }} critical</p>
{% else %}
<p class="text-sm text-base-content/60">Work items in <code>reflection/backlog.ncl</code></p>
{% endif %}
</div>
</a>
<a href="{{ base_url }}/search" class="card bg-base-200 hover:bg-base-300 transition-colors cursor-pointer">
<div class="card-body">
<h2 class="card-title">Search</h2>
<p class="text-sm text-base-content/60">Full-text across nodes, ADRs, and modes</p>
{% if adr_count %}<p class="text-xs text-base-content/40 mt-1">{{ adr_count }} ADRs</p>{% endif %}
</div>
</a>
<a href="{{ base_url }}/actions" class="card bg-base-200 hover:bg-base-300 transition-colors cursor-pointer">
<div class="card-body">
<h2 class="card-title text-primary">Quick Actions</h2>
<p class="text-sm text-base-content/60">Catalog of runnable tasks and workflows</p>
</div>
</a>
<a href="{{ base_url }}/qa" class="card bg-base-200 hover:bg-base-300 transition-colors cursor-pointer">
<div class="card-body">
<h2 class="card-title">Q&amp;A Bookmarks</h2>
<p class="text-sm text-base-content/60">Saved questions and answers about this project</p>
</div>
</a>
--- feat: API catalog surface, protocol v2 tooling, MCP expansion, on+re update ## Summary Session 2026-03-23. Closes the loop between handler code and discoverability across all three surfaces (browser, CLI, MCP agent) via compile-time inventory registration. Adds protocol v2 update tooling, extends MCP from 21 to 29 tools, and brings the self-description up to date. ## API Catalog Surface (#[onto_api] proc-macro) - crates/ontoref-derive: new proc-macro crate; `#[onto_api(method, path, description, auth, actors, params, tags)]` emits `inventory::submit!(ApiRouteEntry{...})` at link time - crates/ontoref-daemon/src/api_catalog.rs: `catalog()` — pure fn over `inventory::iter::<ApiRouteEntry>()`, zero runtime allocation - GET /api/catalog: returns full annotated HTTP surface as JSON - templates/pages/api_catalog.html: new page with client-side filtering by method, auth, path/description; detail panel per route (params table, feature flag); linked from dashboard card and nav - UI nav: "API" link (</> icon) added to mobile dropdown and desktop bar - inventory = "0.3" added to workspace.dependencies (MIT, zero transitive deps) ## Protocol Update Mode - reflection/modes/update_ontoref.ncl: 9-step DAG (5 detect parallel, 2 update idempotent, 2 validate, 1 report) — brings any project from protocol v1 to v2 by adding manifest.ncl and connections.ncl if absent, scanning ADRs for deprecated check_hint, validating with nickel export - reflection/templates/update-ontology-prompt.md: 8-phase reusable prompt for agent-driven ontology enrichment (infrastructure → audit → core.ncl → state.ncl → manifest.ncl → connections.ncl → ADR migration → validation) ## CLI — describe group extensions - reflection/bin/ontoref.nu: `describe diff [--fmt] [--file]` and `describe api [--actor] [--tag] [--auth] [--fmt]` registered as canonical subcommands with log-action; aliases `df` and `da` added; QUICK REFERENCE and ALIASES sections updated ## MCP — two new tools (21 → 29 total) - ontoref_api_catalog: filters catalog() output by actor/tag/auth; returns { routes, total } — no HTTP roundtrip, calls inventory directly - ontoref_file_versions: reads ProjectContext.file_versions DashMap per slug; returns BTreeMap<filename, u64> reload counters - insert_mcp_ctx: audited and updated from 15 to 28 entries in 6 groups - HelpTool JSON: 8 new entries (validate_adrs, validate, impact, guides, bookmark_list, bookmark_add, api_catalog, file_versions) - ServerHandler::get_info instructions updated to mention new tools ## Web UI — dashboard additions - Dashboard: "API Catalog" card (9th); "Ontology File Versions" section showing per-file reload counters from file_versions DashMap - dashboard_mp: builds BTreeMap<String, u64> from ctx.file_versions and injects into Tera context ## on+re update - .ontology/core.ncl: describe-query-layer and adopt-ontoref-tooling descriptions updated; ontoref-daemon updated ("11 pages", "29 tools", API catalog, per-file versioning, #[onto_api]); new node api-catalog-surface (Yang/Practice) with 3 edges; artifact_paths extended across 3 nodes - .ontology/state.ncl: protocol-maturity blocker updated (protocol v2 complete); self-description-coverage catalyst updated with session 2026-03-23 additions - ADR-007: "API Surface Discoverability via #[onto_api] Proc-Macro" — Accepted ## Documentation - README.md: crates table updated (11 pages, 29 MCP tools, ontoref-derive row); MCP representative table expanded; API Catalog, Semantic Diff, Per-File Versioning paragraphs added; update_ontoref onboarding section added - CHANGELOG.md: [Unreleased] section with 4 change groups - assets/web/src/index.html: tool counts 19→29 (EN+ES), page counts 12→11 (EN+ES), daemon description paragraph updated with API catalog + #[onto_api]
2026-03-23 00:58:27 +01:00
<a href="{{ base_url }}/api" class="card bg-base-200 hover:bg-base-300 transition-colors cursor-pointer">
<div class="card-body">
<h2 class="card-title text-secondary">API Catalog</h2>
<p class="text-sm text-base-content/60">Annotated HTTP surface — methods, auth, actors, params</p>
</div>
</a>
2026-03-13 00:18:14 +00:00
</div>
--- feat: API catalog surface, protocol v2 tooling, MCP expansion, on+re update ## Summary Session 2026-03-23. Closes the loop between handler code and discoverability across all three surfaces (browser, CLI, MCP agent) via compile-time inventory registration. Adds protocol v2 update tooling, extends MCP from 21 to 29 tools, and brings the self-description up to date. ## API Catalog Surface (#[onto_api] proc-macro) - crates/ontoref-derive: new proc-macro crate; `#[onto_api(method, path, description, auth, actors, params, tags)]` emits `inventory::submit!(ApiRouteEntry{...})` at link time - crates/ontoref-daemon/src/api_catalog.rs: `catalog()` — pure fn over `inventory::iter::<ApiRouteEntry>()`, zero runtime allocation - GET /api/catalog: returns full annotated HTTP surface as JSON - templates/pages/api_catalog.html: new page with client-side filtering by method, auth, path/description; detail panel per route (params table, feature flag); linked from dashboard card and nav - UI nav: "API" link (</> icon) added to mobile dropdown and desktop bar - inventory = "0.3" added to workspace.dependencies (MIT, zero transitive deps) ## Protocol Update Mode - reflection/modes/update_ontoref.ncl: 9-step DAG (5 detect parallel, 2 update idempotent, 2 validate, 1 report) — brings any project from protocol v1 to v2 by adding manifest.ncl and connections.ncl if absent, scanning ADRs for deprecated check_hint, validating with nickel export - reflection/templates/update-ontology-prompt.md: 8-phase reusable prompt for agent-driven ontology enrichment (infrastructure → audit → core.ncl → state.ncl → manifest.ncl → connections.ncl → ADR migration → validation) ## CLI — describe group extensions - reflection/bin/ontoref.nu: `describe diff [--fmt] [--file]` and `describe api [--actor] [--tag] [--auth] [--fmt]` registered as canonical subcommands with log-action; aliases `df` and `da` added; QUICK REFERENCE and ALIASES sections updated ## MCP — two new tools (21 → 29 total) - ontoref_api_catalog: filters catalog() output by actor/tag/auth; returns { routes, total } — no HTTP roundtrip, calls inventory directly - ontoref_file_versions: reads ProjectContext.file_versions DashMap per slug; returns BTreeMap<filename, u64> reload counters - insert_mcp_ctx: audited and updated from 15 to 28 entries in 6 groups - HelpTool JSON: 8 new entries (validate_adrs, validate, impact, guides, bookmark_list, bookmark_add, api_catalog, file_versions) - ServerHandler::get_info instructions updated to mention new tools ## Web UI — dashboard additions - Dashboard: "API Catalog" card (9th); "Ontology File Versions" section showing per-file reload counters from file_versions DashMap - dashboard_mp: builds BTreeMap<String, u64> from ctx.file_versions and injects into Tera context ## on+re update - .ontology/core.ncl: describe-query-layer and adopt-ontoref-tooling descriptions updated; ontoref-daemon updated ("11 pages", "29 tools", API catalog, per-file versioning, #[onto_api]); new node api-catalog-surface (Yang/Practice) with 3 edges; artifact_paths extended across 3 nodes - .ontology/state.ncl: protocol-maturity blocker updated (protocol v2 complete); self-description-coverage catalyst updated with session 2026-03-23 additions - ADR-007: "API Surface Discoverability via #[onto_api] Proc-Macro" — Accepted ## Documentation - README.md: crates table updated (11 pages, 29 MCP tools, ontoref-derive row); MCP representative table expanded; API Catalog, Semantic Diff, Per-File Versioning paragraphs added; update_ontoref onboarding section added - CHANGELOG.md: [Unreleased] section with 4 change groups - assets/web/src/index.html: tool counts 19→29 (EN+ES), page counts 12→11 (EN+ES), daemon description paragraph updated with API catalog + #[onto_api]
2026-03-23 00:58:27 +01:00
{% if file_versions and file_versions | length > 0 %}
<div class="mt-6">
<h2 class="text-sm font-semibold text-base-content/50 uppercase tracking-wider mb-2">Ontology File Versions</h2>
<div class="bg-base-200 rounded-lg p-3 font-mono text-xs grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-x-6 gap-y-1">
{% for file, ver in file_versions %}
<div class="flex justify-between gap-2">
<span class="text-base-content/70 truncate">{{ file }}</span>
<span class="text-primary font-bold flex-shrink-0">v{{ ver }}</span>
</div>
{% endfor %}
</div>
</div>
{% endif %}
2026-03-13 00:18:14 +00:00
{% endblock content %}