Sync ctx 3643cc5
Browse filesGitHub commit: 3643cc5dbe6b3004713ad9c82c73308c7eb1ff5d
- README.md +8 -5
- docs/dashboard.md +11 -5
- docs/entity-onboarding.md +1 -1
- docs/harness/attaching-to-hosts.md +28 -3
- docs/harness/loopflow-adapter-demo.md +21 -0
- docs/index.md +5 -4
- docs/knowledge-graph.md +4 -3
- docs/marketplace-registry.md +2 -2
- docs/qa/dashboard-user-story-status.csv +3 -2
- docs/qa/feature-user-story-status.csv +5 -5
- docs/telemetry.md +21 -2
README.md
CHANGED
|
@@ -18,7 +18,7 @@ tags:
|
|
| 18 |
[](LICENSE)
|
| 19 |
[](https://python.org)
|
| 20 |
[](https://pypi.org/project/claude-ctx/)
|
| 21 |
-
[](https://stevesolun.github.io/ctx/knowledge-graph/)
|
| 23 |
[](https://stevesolun.github.io/ctx/catalog/?type=skill)
|
| 24 |
[](https://stevesolun.github.io/ctx/catalog/?type=agent)
|
|
@@ -59,9 +59,11 @@ Current shipped snapshot:
|
|
| 59 |
|
| 60 |
The canonical QA tracker is
|
| 61 |
[`qa/feature_status.csv`](qa/feature_status.csv). The supporting feature ledger
|
| 62 |
-
[`docs/qa/feature-user-story-status.csv`](docs/qa/feature-user-story-status.csv)
|
| 63 |
-
|
| 64 |
-
[`docs/qa/dashboard-user-story-status.csv`](docs/qa/dashboard-user-story-status.csv)
|
|
|
|
|
|
|
| 65 |
are supporting detail ledgers that feed that root tracker; canonical status and
|
| 66 |
release readiness stay in `qa/feature_status.csv`.
|
| 67 |
Rows for public MkDocs pages use the exact `docs/...md` path from `mkdocs.yml`
|
|
@@ -136,6 +138,7 @@ ctx-harness-install text-to-cad --dry-run # inspect before cloning/running any
|
|
| 136 |
ctx-harness-install text-to-cad # install after reviewing the plan
|
| 137 |
ctx-harness-install text-to-cad --update --dry-run
|
| 138 |
ctx-harness-install text-to-cad --uninstall --dry-run
|
|
|
|
| 139 |
python -m ctx --help # same run/resume/sessions CLI as the ctx script
|
| 140 |
python -m ctx.adapters.loopflow --goal "fix checkout e2e" --permissions skills,agents,mcps
|
| 141 |
ctx-skill-quality list # four-signal quality score for every skill
|
|
@@ -160,7 +163,7 @@ docs tracker checks before the strict MkDocs build. Use `--profile full` before
|
|
| 160 |
release work to force the source/package gates even for docs-only or graph-only
|
| 161 |
changes.
|
| 162 |
|
| 163 |
-
The **`ctx-monitor`** dashboard shows currently loaded skills, agents, MCP servers, installed harness records, and generic-harness validation/escalation state. It provides load/unload buttons where ctx owns the live action, a graph view (`/graph?slug=...`), the LLM-wiki entity browser (`/wiki/<slug>`), a filterable skills grid, a session timeline, audit/runtime log views, and a live SSE event stream. Installed harness records appear in `/loaded`; harness pages appear in `/wiki` and `/graph`. Harness install/update/uninstall actions stay in `ctx-harness-install`.
|
| 164 |
|
| 165 |
When `ctx-skill-add`, `ctx-agent-add`, `ctx-mcp-add`, or `ctx-harness-add`
|
| 166 |
finds an existing entity, ctx prints a benefits/risks update review and skips
|
|
|
|
| 18 |
[](LICENSE)
|
| 19 |
[](https://python.org)
|
| 20 |
[](https://pypi.org/project/claude-ctx/)
|
| 21 |
+
[](https://github.com/stevesolun/ctx/actions/workflows/test.yml)
|
| 22 |
[](https://stevesolun.github.io/ctx/knowledge-graph/)
|
| 23 |
[](https://stevesolun.github.io/ctx/catalog/?type=skill)
|
| 24 |
[](https://stevesolun.github.io/ctx/catalog/?type=agent)
|
|
|
|
| 59 |
|
| 60 |
The canonical QA tracker is
|
| 61 |
[`qa/feature_status.csv`](qa/feature_status.csv). The supporting feature ledger
|
| 62 |
+
[`docs/qa/feature-user-story-status.csv`](docs/qa/feature-user-story-status.csv),
|
| 63 |
+
dashboard-specific ledger
|
| 64 |
+
[`docs/qa/dashboard-user-story-status.csv`](docs/qa/dashboard-user-story-status.csv),
|
| 65 |
+
and tool-selection/token-history ledger
|
| 66 |
+
[`qa/tool-selection-token-history/tracker.csv`](qa/tool-selection-token-history/tracker.csv)
|
| 67 |
are supporting detail ledgers that feed that root tracker; canonical status and
|
| 68 |
release readiness stay in `qa/feature_status.csv`.
|
| 69 |
Rows for public MkDocs pages use the exact `docs/...md` path from `mkdocs.yml`
|
|
|
|
| 138 |
ctx-harness-install text-to-cad # install after reviewing the plan
|
| 139 |
ctx-harness-install text-to-cad --update --dry-run
|
| 140 |
ctx-harness-install text-to-cad --uninstall --dry-run
|
| 141 |
+
ctx-recommend "fix FastAPI auth" --selected skill:fastapi-pro --json # related suggestions
|
| 142 |
python -m ctx --help # same run/resume/sessions CLI as the ctx script
|
| 143 |
python -m ctx.adapters.loopflow --goal "fix checkout e2e" --permissions skills,agents,mcps
|
| 144 |
ctx-skill-quality list # four-signal quality score for every skill
|
|
|
|
| 163 |
release work to force the source/package gates even for docs-only or graph-only
|
| 164 |
changes.
|
| 165 |
|
| 166 |
+
The **`ctx-monitor`** dashboard shows currently loaded skills, agents, MCP servers, installed harness records, selectable recommendations (`/recommend`), and generic-harness validation/escalation plus tool-selection/token-usage state (`/runtime`). It provides load/unload buttons where ctx owns the live action, a graph view (`/graph?slug=...`), the LLM-wiki entity browser (`/wiki/<slug>`), a filterable skills grid, a session timeline, audit/runtime log views, and a live SSE event stream. Installed harness records appear in `/loaded`; harness pages appear in `/wiki` and `/graph`. Harness install/update/uninstall actions stay in `ctx-harness-install`.
|
| 167 |
|
| 168 |
When `ctx-skill-add`, `ctx-agent-add`, `ctx-mcp-add`, or `ctx-harness-add`
|
| 169 |
finds an existing entity, ctx prints a benefits/risks update review and skips
|
docs/dashboard.md
CHANGED
|
@@ -28,9 +28,14 @@ servers, and harness pages in wiki/graph views. Harness installation,
|
|
| 28 |
update, and uninstall run through `ctx-harness-install`; dashboard
|
| 29 |
load/unload POSTs reject harnesses with the exact dry-run command to use.
|
| 30 |
Quality scoring is shown for sidecar-backed skills, agents, and MCP servers.
|
|
|
|
|
|
|
|
|
|
| 31 |
Generic/API/local harnesses that call ctx-core validation tools write to
|
| 32 |
the runtime lifecycle ledger. The dashboard exposes that ledger at
|
| 33 |
-
`/runtime` and as JSON at `/api/runtime.json`
|
|
|
|
|
|
|
| 34 |
|
| 35 |
### Smoke-test the dashboard
|
| 36 |
|
|
@@ -191,11 +196,11 @@ yet), the page shows a helpful empty-state pointing at
|
|
| 191 |
|
| 192 |
### Top navigation
|
| 193 |
|
| 194 |
-
Every page shows the same nav bar. The
|
| 195 |
dashboard-supported observable surface of ctx:
|
| 196 |
|
| 197 |
```
|
| 198 |
-
Home · Loaded · Skills · Wiki · Graph · Manage · Harness Setup · Docs · Config · Status · KPIs · Runtime · Sessions · Logs · Live
|
| 199 |
```
|
| 200 |
|
| 201 |
### HTML views
|
|
@@ -218,13 +223,14 @@ per-process monitor token injected into the rendered page.
|
|
| 218 |
| `/wiki/<slug>?type=<entity>` | Dashboard-supported wiki entity page rendered: markdown body + full frontmatter table + grade banner + deep links to sidecar and graph-neighborhood views. The optional `type` query disambiguates duplicate slugs such as `langgraph`. |
|
| 219 |
| `/graph` | **Graph explorer landing page** - node/edge count header, a "Popular seed slugs" block (18 highest-degree skill/agent/MCP/harness entities as clickable chips), search box for any skill/agent/MCP/harness slug, and the built-in graph list panel. Clicking a seed chip navigates to `/graph?slug=<slug>&type=<entity>`. |
|
| 220 |
| `/graph?slug=<slug>&type=<entity>` | **Built-in** 1-hop neighborhood around the target skill/agent/MCP/harness slug. Entity pills identify skill, agent, MCP server, and harness rows. Tap any node to navigate to that entity's typed wiki page. Type and tag filters run client-side. |
|
|
|
|
| 221 |
| `/manage` | Search, inspect, edit, delete, and manually import skill/agent/MCP/harness wiki entities through the same safe-name and mutation-token checks as live load/unload. Manual skill upserts run the required static SkillSpector gate before the wiki page is written or queued for graph refresh. |
|
| 222 |
| `/harness` | Harness Setup wizard for non-Claude/custom API/local model users: collects model, goals, tool needs, safety constraints, and shows the harness recommendation/install path. |
|
| 223 |
| `/docs` | Local repo docs rendered inside the dashboard with MkDocs-like tabs, sidebar table of contents, in-dashboard search, and source links. |
|
| 224 |
| `/config` | Effective ctx config with defaults, required markers, field explanations, and editable user overrides where supported. |
|
| 225 |
| `/status` | Durable queue, artifact, and telemetry status: job counts by state, recent queue jobs, graph/wiki artifact sizes, crash-safe promotion metadata, local spool counts, and exporter degradation details. |
|
| 226 |
| `/kpi` | **KPI dashboard** — total entity count with subject breakdown, grade distribution pills, two-column tables for grade counts and lifecycle tiers (active · watch · demote · archive), hard-floor reasons with counts, **By category** table (count · avg score · A/B/C/D/F mix per category), **Top demotion candidates** (active/watch entries graded D or F, sorted by consecutive-D streak desc then score asc), and the **Archived** list. Same shape as `python -m kpi_dashboard render` but HTML |
|
| 227 |
-
| `/runtime` | Generic harness runtime ledger from `CTX_RUNTIME_LIFECYCLE_DIR` or `~/.ctx/runtime/events.jsonl`: validation totals, failed/error checks, recent
|
| 228 |
| `/sessions` | Index of every session (audit + skill-events), first/last seen, counts of skills loaded/unloaded, agents loaded/unloaded, MCPs loaded/unloaded, and lifecycle transitions |
|
| 229 |
| `/session/<id>` | Per-session audit timeline showing the load → score_updated → unload triad with timestamps |
|
| 230 |
| `/logs` | Last 500 audit events in a filterable table (client-side filter on event name, subject, session id) |
|
|
@@ -240,7 +246,7 @@ per-process monitor token injected into the rendered page.
|
|
| 240 |
| `GET /api/skill/<slug>.json` | Raw sidecar for one slug |
|
| 241 |
| `GET /api/graph/<slug>.json?type=<entity>&hops=1&limit=40` | Dashboard-shaped skill/agent/MCP/harness `{nodes, edges, center}`; `type` is optional but recommended for duplicate slugs, `hops` is [1, 3], `limit` is [5, 150]. |
|
| 242 |
| `GET /api/kpi.json` | `DashboardSummary` passthrough — `{total, by_subject, grade_counts, lifecycle_counts, category_breakdown, hard_floor_counts, low_quality_candidates, archived, generated_at}`. Returns `{total: 0, detail: "no sidecars yet"}` when the quality directory is empty |
|
| 243 |
-
| `GET /api/runtime.json` | Runtime lifecycle summary: source path, validation count, failed/error count, open-escalation count, latest validation, recent validations, open escalations,
|
| 244 |
| `GET /api/config.json` | Effective/default/user config payload used by the Config tab. |
|
| 245 |
| `GET /api/entities/search.json?q=<text>&type=<entity>&limit=80` | Wiki entity search results for Manage, Config, and entity picker flows. |
|
| 246 |
| `GET /api/entity/<slug>.json?type=<entity>` | Frontmatter and Markdown body for one wiki entity. |
|
|
|
|
| 28 |
update, and uninstall run through `ctx-harness-install`; dashboard
|
| 29 |
load/unload POSTs reject harnesses with the exact dry-run command to use.
|
| 30 |
Quality scoring is shown for sidecar-backed skills, agents, and MCP servers.
|
| 31 |
+
The `/recommend` page exposes the same selectable recommendation flow as the
|
| 32 |
+
CLI/API: query, top-k, selected and rejected IDs, select-all/select-none helpers,
|
| 33 |
+
TLDR/reason text, and related suggestions for partially selected bundles.
|
| 34 |
Generic/API/local harnesses that call ctx-core validation tools write to
|
| 35 |
the runtime lifecycle ledger. The dashboard exposes that ledger at
|
| 36 |
+
`/runtime` and as JSON at `/api/runtime.json`, including validation and
|
| 37 |
+
escalation state, tool-selection totals, selected-vs-system source counts, token
|
| 38 |
+
usage totals, attribution counts, and recent per-tool usage rows.
|
| 39 |
|
| 40 |
### Smoke-test the dashboard
|
| 41 |
|
|
|
|
| 196 |
|
| 197 |
### Top navigation
|
| 198 |
|
| 199 |
+
Every page shows the same nav bar. The tabs cover the
|
| 200 |
dashboard-supported observable surface of ctx:
|
| 201 |
|
| 202 |
```
|
| 203 |
+
Home · Loaded · Skills · Wiki · Graph · Recommend · Manage · Harness Setup · Docs · Config · Status · KPIs · Runtime · Sessions · Logs · Live
|
| 204 |
```
|
| 205 |
|
| 206 |
### HTML views
|
|
|
|
| 223 |
| `/wiki/<slug>?type=<entity>` | Dashboard-supported wiki entity page rendered: markdown body + full frontmatter table + grade banner + deep links to sidecar and graph-neighborhood views. The optional `type` query disambiguates duplicate slugs such as `langgraph`. |
|
| 224 |
| `/graph` | **Graph explorer landing page** - node/edge count header, a "Popular seed slugs" block (18 highest-degree skill/agent/MCP/harness entities as clickable chips), search box for any skill/agent/MCP/harness slug, and the built-in graph list panel. Clicking a seed chip navigates to `/graph?slug=<slug>&type=<entity>`. |
|
| 225 |
| `/graph?slug=<slug>&type=<entity>` | **Built-in** 1-hop neighborhood around the target skill/agent/MCP/harness slug. Entity pills identify skill, agent, MCP server, and harness rows. Tap any node to navigate to that entity's typed wiki page. Type and tag filters run client-side. |
|
| 226 |
+
| `/recommend` | Selectable recommendation page: query and top-k controls, repeated selected/rejected ID inputs, select-all/select-none helpers, recommendation state, TLDR/reason text, and graph-backed related suggestions for partial selections. |
|
| 227 |
| `/manage` | Search, inspect, edit, delete, and manually import skill/agent/MCP/harness wiki entities through the same safe-name and mutation-token checks as live load/unload. Manual skill upserts run the required static SkillSpector gate before the wiki page is written or queued for graph refresh. |
|
| 228 |
| `/harness` | Harness Setup wizard for non-Claude/custom API/local model users: collects model, goals, tool needs, safety constraints, and shows the harness recommendation/install path. |
|
| 229 |
| `/docs` | Local repo docs rendered inside the dashboard with MkDocs-like tabs, sidebar table of contents, in-dashboard search, and source links. |
|
| 230 |
| `/config` | Effective ctx config with defaults, required markers, field explanations, and editable user overrides where supported. |
|
| 231 |
| `/status` | Durable queue, artifact, and telemetry status: job counts by state, recent queue jobs, graph/wiki artifact sizes, crash-safe promotion metadata, local spool counts, and exporter degradation details. |
|
| 232 |
| `/kpi` | **KPI dashboard** — total entity count with subject breakdown, grade distribution pills, two-column tables for grade counts and lifecycle tiers (active · watch · demote · archive), hard-floor reasons with counts, **By category** table (count · avg score · A/B/C/D/F mix per category), **Top demotion candidates** (active/watch entries graded D or F, sorted by consecutive-D streak desc then score asc), and the **Archived** list. Same shape as `python -m kpi_dashboard render` but HTML |
|
| 233 |
+
| `/runtime` | Generic harness runtime ledger from `CTX_RUNTIME_LIFECYCLE_DIR` or `~/.ctx/runtime/events.jsonl`: validation totals, failed/error checks, tool-selection totals, active selected loads, user/system/host source split, token totals, exact/estimated/unavailable attribution counts, recent tool usage rows, and open escalations. Grouped token history is available in `/api/runtime.json`. |
|
| 234 |
| `/sessions` | Index of every session (audit + skill-events), first/last seen, counts of skills loaded/unloaded, agents loaded/unloaded, MCPs loaded/unloaded, and lifecycle transitions |
|
| 235 |
| `/session/<id>` | Per-session audit timeline showing the load → score_updated → unload triad with timestamps |
|
| 236 |
| `/logs` | Last 500 audit events in a filterable table (client-side filter on event name, subject, session id) |
|
|
|
|
| 246 |
| `GET /api/skill/<slug>.json` | Raw sidecar for one slug |
|
| 247 |
| `GET /api/graph/<slug>.json?type=<entity>&hops=1&limit=40` | Dashboard-shaped skill/agent/MCP/harness `{nodes, edges, center}`; `type` is optional but recommended for duplicate slugs, `hops` is [1, 3], `limit` is [5, 150]. |
|
| 248 |
| `GET /api/kpi.json` | `DashboardSummary` passthrough — `{total, by_subject, grade_counts, lifecycle_counts, category_breakdown, hard_floor_counts, low_quality_candidates, archived, generated_at}`. Returns `{total: 0, detail: "no sidecars yet"}` when the quality directory is empty |
|
| 249 |
+
| `GET /api/runtime.json` | Runtime lifecycle summary: source path, validation count, failed/error count, open-escalation count, latest validation, recent validations, open escalations, session IDs, `tool_selection`, `token_usage`, `token_usage_history`, and `recent_tool_usage`. |
|
| 250 |
| `GET /api/config.json` | Effective/default/user config payload used by the Config tab. |
|
| 251 |
| `GET /api/entities/search.json?q=<text>&type=<entity>&limit=80` | Wiki entity search results for Manage, Config, and entity picker flows. |
|
| 252 |
| `GET /api/entity/<slug>.json?type=<entity>` | Frontmatter and Markdown body for one wiki entity. |
|
docs/entity-onboarding.md
CHANGED
|
@@ -61,7 +61,7 @@ the update is treated like a release step.
|
|
| 61 |
|
| 62 |
```bash
|
| 63 |
python src/import_skills_sh_catalog.py --from-api-union <raw.json> \
|
| 64 |
-
--catalog-out graph/
|
| 65 |
--wiki-tar graph/wiki-graph.tar.gz \
|
| 66 |
--update-wiki-tar
|
| 67 |
```
|
|
|
|
| 61 |
|
| 62 |
```bash
|
| 63 |
python src/import_skills_sh_catalog.py --from-api-union <raw.json> \
|
| 64 |
+
--catalog-out graph/skills-sh-catalog.json.gz \
|
| 65 |
--wiki-tar graph/wiki-graph.tar.gz \
|
| 66 |
--update-wiki-tar
|
| 67 |
```
|
docs/harness/attaching-to-hosts.md
CHANGED
|
@@ -32,9 +32,11 @@ This puts `ctx-mcp-server` on your PATH. Then wire it into your host:
|
|
| 32 |
claude mcp add ctx-wiki -- ctx-mcp-server
|
| 33 |
```
|
| 34 |
|
| 35 |
-
The tools `ctx__recommend_bundle`, `
|
| 36 |
-
`
|
| 37 |
-
|
|
|
|
|
|
|
| 38 |
|
| 39 |
### Claude Agent SDK (Python)
|
| 40 |
|
|
@@ -149,6 +151,7 @@ For custom harnesses that aren't MCP-native but can import Python:
|
|
| 149 |
```python
|
| 150 |
from ctx import (
|
| 151 |
recommend_bundle, # free-text → ranked skill/agent/MCP bundle
|
|
|
|
| 152 |
graph_query, # walk from seed entities
|
| 153 |
wiki_search, # keyword search entity pages
|
| 154 |
wiki_get, # fetch one entity by slug
|
|
@@ -161,6 +164,10 @@ def on_user_turn(query: str):
|
|
| 161 |
for entry in bundle:
|
| 162 |
print(f" [{entry['type']:>11}] {entry['name']} (score {entry['score']:.1f})")
|
| 163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
# User asks about a specific slug you saw in the bundle:
|
| 165 |
page = wiki_get("fastapi-pro")
|
| 166 |
if page:
|
|
@@ -262,6 +269,8 @@ The adapter emits a JSON contract with:
|
|
| 262 |
allows ctx-core tools;
|
| 263 |
- ranked skill, agent, and MCP recommendations from the `ctx-recommend`
|
| 264 |
engine;
|
|
|
|
|
|
|
| 265 |
- optional harness recommendations only when the loop declares a user-owned,
|
| 266 |
API, or local model.
|
| 267 |
|
|
@@ -278,6 +287,22 @@ written that file; omit it on the first run. The adapter uses that failure text
|
|
| 278 |
for recommendation ranking and returns only `context.last_failure_present`, not
|
| 279 |
the raw failure.
|
| 280 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 281 |
The returned payload includes LoopFlow-ready hints for the granted groups:
|
| 282 |
|
| 283 |
```loop
|
|
|
|
| 32 |
claude mcp add ctx-wiki -- ctx-mcp-server
|
| 33 |
```
|
| 34 |
|
| 35 |
+
The tools `ctx__recommend_bundle`, `ctx__recommend_related`,
|
| 36 |
+
`ctx__graph_query`, `ctx__wiki_search`, and `ctx__wiki_get` appear to
|
| 37 |
+
Claude on the next turn, alongside runtime lifecycle tools such as
|
| 38 |
+
`ctx__load_entity`, `ctx__mark_entity_used`, and `ctx__session_state`.
|
| 39 |
+
Ask "What skills help with FastAPI auth?" and it will call them.
|
| 40 |
|
| 41 |
### Claude Agent SDK (Python)
|
| 42 |
|
|
|
|
| 151 |
```python
|
| 152 |
from ctx import (
|
| 153 |
recommend_bundle, # free-text → ranked skill/agent/MCP bundle
|
| 154 |
+
recommend_related, # selected IDs → graph-related suggestions
|
| 155 |
graph_query, # walk from seed entities
|
| 156 |
wiki_search, # keyword search entity pages
|
| 157 |
wiki_get, # fetch one entity by slug
|
|
|
|
| 164 |
for entry in bundle:
|
| 165 |
print(f" [{entry['type']:>11}] {entry['name']} (score {entry['score']:.1f})")
|
| 166 |
|
| 167 |
+
related = recommend_related(["skill:fastapi-pro"], rejected=[], top_n=3)
|
| 168 |
+
for entry in related:
|
| 169 |
+
print(f" related: {entry['id']} - {entry['reason']}")
|
| 170 |
+
|
| 171 |
# User asks about a specific slug you saw in the bundle:
|
| 172 |
page = wiki_get("fastapi-pro")
|
| 173 |
if page:
|
|
|
|
| 269 |
allows ctx-core tools;
|
| 270 |
- ranked skill, agent, and MCP recommendations from the `ctx-recommend`
|
| 271 |
engine;
|
| 272 |
+
- `related_recommendations` after the loop passes selected and rejected
|
| 273 |
+
recommendation IDs;
|
| 274 |
- optional harness recommendations only when the loop declares a user-owned,
|
| 275 |
API, or local model.
|
| 276 |
|
|
|
|
| 287 |
for recommendation ranking and returns only `context.last_failure_present`, not
|
| 288 |
the raw failure.
|
| 289 |
|
| 290 |
+
After the loop accepts or rejects part of the first bundle, pass those decisions
|
| 291 |
+
back before the next plan:
|
| 292 |
+
|
| 293 |
+
```bash
|
| 294 |
+
python -m ctx.adapters.loopflow \
|
| 295 |
+
--loop-file rate-limit.loop \
|
| 296 |
+
--permissions skills,agents,mcps \
|
| 297 |
+
--selected local-ollama-file-operations \
|
| 298 |
+
--rejected legacy-reviewer
|
| 299 |
+
```
|
| 300 |
+
|
| 301 |
+
Selected and rejected values may be recommendation IDs such as
|
| 302 |
+
`mcp-server:ollama` or bare names. Returned `related_recommendations` exclude
|
| 303 |
+
both sets and keep the same `id`, `tldr`, `reason`, `selected`, and
|
| 304 |
+
`selection_state` semantics as the ctx API/core toolbox.
|
| 305 |
+
|
| 306 |
The returned payload includes LoopFlow-ready hints for the granted groups:
|
| 307 |
|
| 308 |
```loop
|
docs/harness/loopflow-adapter-demo.md
CHANGED
|
@@ -14,6 +14,8 @@ return a read-only JSON contract:
|
|
| 14 |
|
| 15 |
- what the loop is allowed to load;
|
| 16 |
- which skills, agents, MCP servers, and harnesses fit the current goal;
|
|
|
|
|
|
|
| 17 |
- the `ctx-mcp-server` command and tool list for MCP-aware runners;
|
| 18 |
- a dry-run harness install command only when the user declares their own
|
| 19 |
local/API model.
|
|
@@ -41,6 +43,8 @@ python -m ctx.adapters.loopflow \
|
|
| 41 |
--own-llm \
|
| 42 |
--model-provider ollama \
|
| 43 |
--model ollama/llama3.1 \
|
|
|
|
|
|
|
| 44 |
--top-k 2
|
| 45 |
```
|
| 46 |
|
|
@@ -86,6 +90,7 @@ stable.
|
|
| 86 |
"tools": [
|
| 87 |
"ctx__recommend_bundle",
|
| 88 |
"ctx__graph_query",
|
|
|
|
| 89 |
"ctx__wiki_search",
|
| 90 |
"ctx__wiki_get",
|
| 91 |
"ctx__observe_dev_event",
|
|
@@ -122,6 +127,17 @@ stable.
|
|
| 122 |
{"name": "langfuse", "type": "harness", "fit_score": 1.0}
|
| 123 |
]
|
| 124 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
"agent_loop": {
|
| 126 |
"before_act": "Load only the granted capability groups from capabilities.*.",
|
| 127 |
"on_failure": "Pass the latest failure back as last_failure before the next plan.",
|
|
@@ -145,6 +161,8 @@ ctx_payload = recommend_for_loop(
|
|
| 145 |
look_at=loop.look_at,
|
| 146 |
done_when=loop.done_when,
|
| 147 |
last_failure=loop.last_failure_text,
|
|
|
|
|
|
|
| 148 |
permissions={"skills", "agents", "mcps", "harnesses"},
|
| 149 |
own_llm=runner.uses_user_owned_model,
|
| 150 |
model_provider=runner.model_provider,
|
|
@@ -161,6 +179,9 @@ if ctx_payload["mcp_server"]["command"]:
|
|
| 161 |
|
| 162 |
if ctx_payload["loopflow"]["use_skills"]:
|
| 163 |
loop.add_planning_hint(ctx_payload["loopflow"]["use_skills"])
|
|
|
|
|
|
|
|
|
|
| 164 |
```
|
| 165 |
|
| 166 |
After a failed observe step, LoopFlow passes the new failure text back into the
|
|
|
|
| 14 |
|
| 15 |
- what the loop is allowed to load;
|
| 16 |
- which skills, agents, MCP servers, and harnesses fit the current goal;
|
| 17 |
+
- which related recommendations fit after the loop accepts or rejects part of a
|
| 18 |
+
previous bundle;
|
| 19 |
- the `ctx-mcp-server` command and tool list for MCP-aware runners;
|
| 20 |
- a dry-run harness install command only when the user declares their own
|
| 21 |
local/API model.
|
|
|
|
| 43 |
--own-llm \
|
| 44 |
--model-provider ollama \
|
| 45 |
--model ollama/llama3.1 \
|
| 46 |
+
--selected local-ollama-file-operations \
|
| 47 |
+
--rejected legacy-reviewer \
|
| 48 |
--top-k 2
|
| 49 |
```
|
| 50 |
|
|
|
|
| 90 |
"tools": [
|
| 91 |
"ctx__recommend_bundle",
|
| 92 |
"ctx__graph_query",
|
| 93 |
+
"ctx__recommend_related",
|
| 94 |
"ctx__wiki_search",
|
| 95 |
"ctx__wiki_get",
|
| 96 |
"ctx__observe_dev_event",
|
|
|
|
| 127 |
{"name": "langfuse", "type": "harness", "fit_score": 1.0}
|
| 128 |
]
|
| 129 |
},
|
| 130 |
+
"related_recommendations": [
|
| 131 |
+
{
|
| 132 |
+
"id": "mcp-server:ollama",
|
| 133 |
+
"name": "ollama",
|
| 134 |
+
"type": "mcp-server",
|
| 135 |
+
"tldr": "mcp-server recommendation.",
|
| 136 |
+
"reason": "related via local-ollama-file-operations; normalized score 1.000",
|
| 137 |
+
"selected": false,
|
| 138 |
+
"selection_state": "suggested_related"
|
| 139 |
+
}
|
| 140 |
+
],
|
| 141 |
"agent_loop": {
|
| 142 |
"before_act": "Load only the granted capability groups from capabilities.*.",
|
| 143 |
"on_failure": "Pass the latest failure back as last_failure before the next plan.",
|
|
|
|
| 161 |
look_at=loop.look_at,
|
| 162 |
done_when=loop.done_when,
|
| 163 |
last_failure=loop.last_failure_text,
|
| 164 |
+
selected=loop.selected_ctx_ids,
|
| 165 |
+
rejected=loop.rejected_ctx_ids,
|
| 166 |
permissions={"skills", "agents", "mcps", "harnesses"},
|
| 167 |
own_llm=runner.uses_user_owned_model,
|
| 168 |
model_provider=runner.model_provider,
|
|
|
|
| 179 |
|
| 180 |
if ctx_payload["loopflow"]["use_skills"]:
|
| 181 |
loop.add_planning_hint(ctx_payload["loopflow"]["use_skills"])
|
| 182 |
+
|
| 183 |
+
for row in ctx_payload["related_recommendations"]:
|
| 184 |
+
loop.add_planning_hint(f"consider related ctx recommendation: {row['id']}")
|
| 185 |
```
|
| 186 |
|
| 187 |
After a failed observe step, LoopFlow passes the new failure text back into the
|
docs/index.md
CHANGED
|
@@ -169,9 +169,10 @@ ones are flagged. New ones self-ingest.
|
|
| 169 |
|
| 170 |
`ctx-monitor serve` opens a local HTTP dashboard with live graph,
|
| 171 |
skill grades + four-signal scores, session timelines, one-click
|
| 172 |
-
load/unload for skills, agents, and MCP servers,
|
| 173 |
-
|
| 174 |
-
|
|
|
|
| 175 |
|
| 176 |
[:octicons-arrow-right-24: Dashboard reference](dashboard.md)
|
| 177 |
|
|
@@ -218,7 +219,7 @@ ones are flagged. New ones self-ingest.
|
|
| 218 |
---
|
| 219 |
|
| 220 |
Current main is **v1.0.20** — MIT, CI-matrixed (Ubuntu 3.12 plus Windows/macOS 3.11/3.12),
|
| 221 |
-
4,
|
| 222 |
ships console scripts including `ctx-init`,
|
| 223 |
`ctx-monitor` (local dashboard with graph + wiki + load/unload for
|
| 224 |
skills, agents, and MCP servers, plus Harness Setup for user-owned LLMs),
|
|
|
|
| 169 |
|
| 170 |
`ctx-monitor serve` opens a local HTTP dashboard with live graph,
|
| 171 |
skill grades + four-signal scores, session timelines, one-click
|
| 172 |
+
load/unload for skills, agents, and MCP servers, selectable
|
| 173 |
+
recommendations, runtime token history, plus harness wiki and graph
|
| 174 |
+
browsing. It is served by stdlib `http.server` and renders repo docs with
|
| 175 |
+
MkDocs-compatible Markdown extensions.
|
| 176 |
|
| 177 |
[:octicons-arrow-right-24: Dashboard reference](dashboard.md)
|
| 178 |
|
|
|
|
| 219 |
---
|
| 220 |
|
| 221 |
Current main is **v1.0.20** — MIT, CI-matrixed (Ubuntu 3.12 plus Windows/macOS 3.11/3.12),
|
| 222 |
+
4,433 test inventory. Adds enterprise OpenTelemetry-ready telemetry and
|
| 223 |
ships console scripts including `ctx-init`,
|
| 224 |
`ctx-monitor` (local dashboard with graph + wiki + load/unload for
|
| 225 |
skills, agents, and MCP servers, plus Harness Setup for user-owned LLMs),
|
docs/knowledge-graph.md
CHANGED
|
@@ -197,9 +197,10 @@ The helper `resolve_graph.load_graph()` does this for you.
|
|
| 197 |
|
| 198 |
The graph backs these recommendation paths:
|
| 199 |
|
| 200 |
-
- Execution recommendation surfaces (`ctx.recommend_bundle`,
|
| 201 |
-
`
|
| 202 |
-
|
|
|
|
| 203 |
repo-scan advisory output) share
|
| 204 |
`ctx.core.resolve.recommendations.recommend_by_tags` for skills,
|
| 205 |
agents, and MCP servers. That engine ranks candidates by
|
|
|
|
| 197 |
|
| 198 |
The graph backs these recommendation paths:
|
| 199 |
|
| 200 |
+
- Execution recommendation surfaces (`ctx.recommend_bundle`,
|
| 201 |
+
`ctx.recommend_related`, MCP `ctx__recommend_bundle` /
|
| 202 |
+
`ctx__recommend_related`, generic harness tools, LoopFlow/agent-loop
|
| 203 |
+
adapter capability and related recommendations, Claude Code hook suggestions, and
|
| 204 |
repo-scan advisory output) share
|
| 205 |
`ctx.core.resolve.recommendations.recommend_by_tags` for skills,
|
| 206 |
agents, and MCP servers. That engine ranks candidates by
|
docs/marketplace-registry.md
CHANGED
|
@@ -13,7 +13,7 @@ name: ctx-shipped-graph
|
|
| 13 |
type: compressed-runtime
|
| 14 |
paths:
|
| 15 |
graph: graph/wiki-graph-runtime.tar.gz
|
| 16 |
-
skills: graph/
|
| 17 |
refresh: release-time
|
| 18 |
priority: 1
|
| 19 |
```
|
|
@@ -45,7 +45,7 @@ still require an explicit review if replacement content is proposed.
|
|
| 45 |
name: shipped-skills
|
| 46 |
type: shipped-index
|
| 47 |
shipped_entries: 67024
|
| 48 |
-
local_index: graph/
|
| 49 |
hydrated_wiki: external-catalogs/<source>/catalog.json
|
| 50 |
refresh: on-demand
|
| 51 |
priority: 3
|
|
|
|
| 13 |
type: compressed-runtime
|
| 14 |
paths:
|
| 15 |
graph: graph/wiki-graph-runtime.tar.gz
|
| 16 |
+
skills: graph/skills-sh-catalog.json.gz
|
| 17 |
refresh: release-time
|
| 18 |
priority: 1
|
| 19 |
```
|
|
|
|
| 45 |
name: shipped-skills
|
| 46 |
type: shipped-index
|
| 47 |
shipped_entries: 67024
|
| 48 |
+
local_index: graph/skills-sh-catalog.json.gz
|
| 49 |
hydrated_wiki: external-catalogs/<source>/catalog.json
|
| 50 |
refresh: on-demand
|
| 51 |
priority: 3
|
docs/qa/dashboard-user-story-status.csv
CHANGED
|
@@ -5,13 +5,14 @@ DASH-PAGE-003,Dashboard Page,Skills,/skills,src/ctx/monitor/pages/skills.py,As a
|
|
| 5 |
DASH-PAGE-004,Dashboard Page,SkillSpector,/skillspector,src/ctx/monitor/pages/skillspector.py,As a dashboard user I can review SkillSpector findings,SkillSpector page renders audit records severity filters and remediation context from the audit service,ctx-monitor running with audit data,Open /skillspector and verify filters counts and empty state,Tested Pass,"PASS: live Playwright page probe opened /skillspector, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 6 |
DASH-PAGE-005,Dashboard Page,Wiki,/wiki,src/ctx/monitor/pages/wiki.py,As a dashboard user I can browse wiki entities,Wiki page shows searchable skill agent MCP and harness tiles with type filters and entity links,ctx-monitor running with wiki data,Open /wiki and validate search filters tiles and links,Tested Pass,"PASS: live Playwright page probe opened /wiki, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 7 |
DASH-PAGE-006,Dashboard Page,Graph,/graph,src/ctx/monitor/pages/graph.py,As a dashboard user I can explore the knowledge graph,Graph page shows correct top-line counts live slug search interactive neighborhood filters and readable relationship details,ctx-monitor running with graph artifact,Open /graph and test focus search graph render filters click hover double click and match range,Tested Pass,"PASS: live Playwright page probe opened /graph, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
|
|
|
| 8 |
DASH-PAGE-007,Dashboard Page,Manage,/manage,src/ctx/monitor/pages/manage.py,As a dashboard user I can manage entities,Manage page supports search inspect edit delete and manual import flows guarded by mutation tokens,ctx-monitor running with mutation token,Open /manage and validate search edit delete and import UI without unsafe mutation,Tested Pass,"PASS: live Playwright page probe opened /manage, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 9 |
DASH-PAGE-008,Dashboard Page,Harness Setup,/harness,src/ctx/monitor/pages/harness.py,As a custom model user I can run harness setup from the dashboard,Harness Setup interviews model provider goal runtime tools privacy and presents fit or no-fit guidance,ctx-monitor running with harness catalog,Open /harness and test wizard fields validation and dry-run recommendation,Tested Pass,"PASS: live Playwright page probe opened /harness, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 10 |
DASH-PAGE-009,Dashboard Page,Docs,/docs,src/ctx/monitor/pages/docs.py,As a dashboard user I can read repo docs inside the monitor,Docs page renders markdown as readable docs with tabs sidebar table of contents and local dashboard search behavior,ctx-monitor running,Open /docs and verify tabs TOC hierarchy search and markdown rendering,Tested Pass,"PASS: live Playwright page probe opened /docs, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 11 |
DASH-PAGE-010,Dashboard Page,Config,/config,src/ctx/monitor/pages/config.py,As a dashboard user I can inspect and edit ctx configuration,Config page shows required settings descriptions examples defaults and validates saves or clears through the config API,ctx-monitor running with mutation token,Open /config and validate required fields defaults save clear and error states,Tested Pass,"PASS: live Playwright page probe opened /config, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 12 |
DASH-PAGE-011,Dashboard Page,Status,/status,src/ctx/monitor/pages/ops.py,As a dashboard user I can inspect system status,Status page shows graph wiki config backup and queue health with actionable error text,ctx-monitor running,Open /status and verify status sections and stale artifact messages,Tested Pass,"PASS: live Playwright page probe opened /status, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 13 |
DASH-PAGE-012,Dashboard Page,KPI,/kpi,src/ctx/monitor/pages/ops.py,As a dashboard user I can inspect dashboard KPIs,KPI page shows usage quality load and recommendation metrics with readable number formatting,ctx-monitor running,Open /kpi and verify metric cards charts and empty states,Tested Pass,"PASS: live Playwright page probe opened /kpi, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 14 |
-
DASH-PAGE-013,Dashboard Page,Runtime,/runtime,src/ctx/monitor/pages/
|
| 15 |
DASH-PAGE-014,Dashboard Page,Sessions,/sessions,src/ctx/monitor/pages/activity.py,As a dashboard user I can browse ctx sessions,Sessions page lists sessions links details and handles empty history cleanly,ctx-monitor running with or without sessions,Open /sessions and verify list empty state and detail links,Tested Pass,"PASS: live Playwright page probe opened /sessions, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 16 |
DASH-PAGE-015,Dashboard Page,Logs,/logs,src/ctx/monitor/pages/activity.py,As a dashboard user I can inspect audit logs,Logs page tails audit JSONL entries and handles missing logs without a blank page,ctx-monitor running,Open /logs and verify log rows empty state and formatting,Tested Pass,"PASS: live Playwright page probe opened /logs, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 17 |
DASH-PAGE-016,Dashboard Page,Live Events,/events,src/ctx/monitor/pages/activity.py,As a dashboard user I can watch live events,Live page connects to server-sent events and shows either audit events or a clear waiting state,ctx-monitor running,Open /events and verify SSE connection and empty state,Retested Pass,FAIL: /api/events.stream did not send initial bytes within 10 seconds so the Live page could remain blank.,,,,PASS: /events returned HTTP 200 and /api/events.stream returned : connected promptly after the SSE fix.,2026-06-25,
|
|
@@ -33,7 +34,7 @@ DASH-API-003,Dashboard API,Status API,/api/status.json,src/ctx/monitor/api/reado
|
|
| 33 |
DASH-API-004,Dashboard API,KPI API,/api/kpi.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can fetch KPI data,API returns metric payloads that match the KPI page,ctx-monitor running,GET /api/kpi.json and compare with page expectations,Tested Pass,PASS: /api/kpi.json returned HTTP 200 JSON with generated_at total and grade summary keys.,,,,,2026-06-25,
|
| 34 |
DASH-API-005,Dashboard API,Grades API,/api/grades.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can fetch grade summaries,API returns quality grade summaries for skills agents MCPs and harnesses,ctx-monitor running,GET /api/grades.json and validate JSON shape,Tested Pass,PASS: /api/grades.json returned HTTP 200 JSON with grades and total keys.,,,,,2026-06-25,
|
| 35 |
DASH-API-006,Dashboard API,Sidecars API,/api/sidecars.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can fetch searchable card data,API supports q type grade floor and limit filters with bounded output,ctx-monitor running,GET /api/sidecars.json?q=review&type=agent&limit=5,Tested Pass,PASS: /api/sidecars.json?q=review&type=agent&limit=5 returned HTTP 200 JSON with items total and pagination keys.,,,,,2026-06-25,
|
| 36 |
-
DASH-API-007,Dashboard API,Runtime API,/api/runtime.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can fetch runtime diagnostics,API returns
|
| 37 |
DASH-API-008,Dashboard API,SkillSpector API,/api/skillspector.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can fetch SkillSpector findings,API returns audit records filtered by severity and query,ctx-monitor running,GET /api/skillspector.json?severity=HIGH&q=prompt,Tested Pass,PASS: /api/skillspector.json?severity=HIGH&q=prompt returned HTTP 200 JSON with summary filters and records keys.,,,,,2026-06-25,
|
| 38 |
DASH-API-009,Dashboard API,Config API,/api/config.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can fetch effective config,API returns defaults overrides required metadata and no secrets,ctx-monitor running,GET /api/config.json and validate required fields,Tested Pass,PASS: /api/config.json returned HTTP 200 JSON with defaults user effective and path keys.,,,,,2026-06-25,
|
| 39 |
DASH-API-010,Dashboard API,Entity Search API,/api/entities/search.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can search entities for autocomplete,API returns typed entity suggestions for search terms and rejects unsafe queries cleanly,ctx-monitor running,GET /api/entities/search.json?q=github&type=skill,Tested Pass,PASS: /api/entities/search.json?q=github&type=skill&limit=5 returned HTTP 200 JSON with results and total keys.,,,,,2026-06-25,
|
|
|
|
| 5 |
DASH-PAGE-004,Dashboard Page,SkillSpector,/skillspector,src/ctx/monitor/pages/skillspector.py,As a dashboard user I can review SkillSpector findings,SkillSpector page renders audit records severity filters and remediation context from the audit service,ctx-monitor running with audit data,Open /skillspector and verify filters counts and empty state,Tested Pass,"PASS: live Playwright page probe opened /skillspector, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 6 |
DASH-PAGE-005,Dashboard Page,Wiki,/wiki,src/ctx/monitor/pages/wiki.py,As a dashboard user I can browse wiki entities,Wiki page shows searchable skill agent MCP and harness tiles with type filters and entity links,ctx-monitor running with wiki data,Open /wiki and validate search filters tiles and links,Tested Pass,"PASS: live Playwright page probe opened /wiki, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 7 |
DASH-PAGE-006,Dashboard Page,Graph,/graph,src/ctx/monitor/pages/graph.py,As a dashboard user I can explore the knowledge graph,Graph page shows correct top-line counts live slug search interactive neighborhood filters and readable relationship details,ctx-monitor running with graph artifact,Open /graph and test focus search graph render filters click hover double click and match range,Tested Pass,"PASS: live Playwright page probe opened /graph, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 8 |
+
DASH-PAGE-006A,Dashboard Page,Recommend,/recommend,src/ctx/monitor/pages/recommend.py,As a dashboard user I can choose and refine ctx recommendations,Recommend page renders query top-k selected and rejected controls plus recommendation state TLDR reason and related suggestions,ctx-monitor running with recommendation fixture,Open /recommend?q=python&top_k=3 and test select all select none selected rejected and related output,Tested Pass,"PASS: focused pytest covers /recommend route navigation selected checkbox parsing TLDR reason rendering and related suggestion rows.",,,,,2026-07-02,Phase 5B dashboard recommendation slice; deeper live browser pass remains part of the final feature loop.
|
| 9 |
DASH-PAGE-007,Dashboard Page,Manage,/manage,src/ctx/monitor/pages/manage.py,As a dashboard user I can manage entities,Manage page supports search inspect edit delete and manual import flows guarded by mutation tokens,ctx-monitor running with mutation token,Open /manage and validate search edit delete and import UI without unsafe mutation,Tested Pass,"PASS: live Playwright page probe opened /manage, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 10 |
DASH-PAGE-008,Dashboard Page,Harness Setup,/harness,src/ctx/monitor/pages/harness.py,As a custom model user I can run harness setup from the dashboard,Harness Setup interviews model provider goal runtime tools privacy and presents fit or no-fit guidance,ctx-monitor running with harness catalog,Open /harness and test wizard fields validation and dry-run recommendation,Tested Pass,"PASS: live Playwright page probe opened /harness, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 11 |
DASH-PAGE-009,Dashboard Page,Docs,/docs,src/ctx/monitor/pages/docs.py,As a dashboard user I can read repo docs inside the monitor,Docs page renders markdown as readable docs with tabs sidebar table of contents and local dashboard search behavior,ctx-monitor running,Open /docs and verify tabs TOC hierarchy search and markdown rendering,Tested Pass,"PASS: live Playwright page probe opened /docs, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 12 |
DASH-PAGE-010,Dashboard Page,Config,/config,src/ctx/monitor/pages/config.py,As a dashboard user I can inspect and edit ctx configuration,Config page shows required settings descriptions examples defaults and validates saves or clears through the config API,ctx-monitor running with mutation token,Open /config and validate required fields defaults save clear and error states,Tested Pass,"PASS: live Playwright page probe opened /config, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 13 |
DASH-PAGE-011,Dashboard Page,Status,/status,src/ctx/monitor/pages/ops.py,As a dashboard user I can inspect system status,Status page shows graph wiki config backup and queue health with actionable error text,ctx-monitor running,Open /status and verify status sections and stale artifact messages,Tested Pass,"PASS: live Playwright page probe opened /status, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 14 |
DASH-PAGE-012,Dashboard Page,KPI,/kpi,src/ctx/monitor/pages/ops.py,As a dashboard user I can inspect dashboard KPIs,KPI page shows usage quality load and recommendation metrics with readable number formatting,ctx-monitor running,Open /kpi and verify metric cards charts and empty states,Tested Pass,"PASS: live Playwright page probe opened /kpi, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 15 |
+
DASH-PAGE-013,Dashboard Page,Runtime,/runtime,src/ctx/monitor/pages/activity.py and src/ctx/monitor/services/runtime.py,As a dashboard user I can inspect runtime lifecycle state,Runtime page shows validations escalations tool selection token usage and recent usage metadata without raw evidence strings or secrets,ctx-monitor running,Open /runtime and verify lifecycle state token usage and no raw evidence leakage,Retested Pass,"PASS: focused runtime monitor tests cover tool selection token usage and privacy-safe recent usage metadata.",,,,,2026-07-02,Retested in the tool-selection/token-history canonical loop.
|
| 16 |
DASH-PAGE-014,Dashboard Page,Sessions,/sessions,src/ctx/monitor/pages/activity.py,As a dashboard user I can browse ctx sessions,Sessions page lists sessions links details and handles empty history cleanly,ctx-monitor running with or without sessions,Open /sessions and verify list empty state and detail links,Tested Pass,"PASS: live Playwright page probe opened /sessions, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 17 |
DASH-PAGE-015,Dashboard Page,Logs,/logs,src/ctx/monitor/pages/activity.py,As a dashboard user I can inspect audit logs,Logs page tails audit JSONL entries and handles missing logs without a blank page,ctx-monitor running,Open /logs and verify log rows empty state and formatting,Tested Pass,"PASS: live Playwright page probe opened /logs, found expected page markers, and detected no traceback or server-error text; dashboard_smoke also returned HTTP 200.",,,,,2026-06-25,Deeper controls are tracked in dedicated function/API/mutation rows.
|
| 18 |
DASH-PAGE-016,Dashboard Page,Live Events,/events,src/ctx/monitor/pages/activity.py,As a dashboard user I can watch live events,Live page connects to server-sent events and shows either audit events or a clear waiting state,ctx-monitor running,Open /events and verify SSE connection and empty state,Retested Pass,FAIL: /api/events.stream did not send initial bytes within 10 seconds so the Live page could remain blank.,,,,PASS: /events returned HTTP 200 and /api/events.stream returned : connected promptly after the SSE fix.,2026-06-25,
|
|
|
|
| 34 |
DASH-API-004,Dashboard API,KPI API,/api/kpi.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can fetch KPI data,API returns metric payloads that match the KPI page,ctx-monitor running,GET /api/kpi.json and compare with page expectations,Tested Pass,PASS: /api/kpi.json returned HTTP 200 JSON with generated_at total and grade summary keys.,,,,,2026-06-25,
|
| 35 |
DASH-API-005,Dashboard API,Grades API,/api/grades.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can fetch grade summaries,API returns quality grade summaries for skills agents MCPs and harnesses,ctx-monitor running,GET /api/grades.json and validate JSON shape,Tested Pass,PASS: /api/grades.json returned HTTP 200 JSON with grades and total keys.,,,,,2026-06-25,
|
| 36 |
DASH-API-006,Dashboard API,Sidecars API,/api/sidecars.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can fetch searchable card data,API supports q type grade floor and limit filters with bounded output,ctx-monitor running,GET /api/sidecars.json?q=review&type=agent&limit=5,Tested Pass,PASS: /api/sidecars.json?q=review&type=agent&limit=5 returned HTTP 200 JSON with items total and pagination keys.,,,,,2026-06-25,
|
| 37 |
+
DASH-API-007,Dashboard API,Runtime API,/api/runtime.json,src/ctx/monitor/api/readonly.py and src/ctx/monitor/services/runtime.py,As a dashboard client I can fetch runtime lifecycle diagnostics,API returns validation escalation selection token usage and recent usage metadata without raw evidence strings or secrets,ctx-monitor running,GET /api/runtime.json and scan for secret-like fields plus raw evidence strings,Retested Pass,PASS: focused runtime monitor test asserts recent_tool_usage exposes evidence_present/evidence_length and not the raw evidence value.,,,,,2026-07-02,
|
| 38 |
DASH-API-008,Dashboard API,SkillSpector API,/api/skillspector.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can fetch SkillSpector findings,API returns audit records filtered by severity and query,ctx-monitor running,GET /api/skillspector.json?severity=HIGH&q=prompt,Tested Pass,PASS: /api/skillspector.json?severity=HIGH&q=prompt returned HTTP 200 JSON with summary filters and records keys.,,,,,2026-06-25,
|
| 39 |
DASH-API-009,Dashboard API,Config API,/api/config.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can fetch effective config,API returns defaults overrides required metadata and no secrets,ctx-monitor running,GET /api/config.json and validate required fields,Tested Pass,PASS: /api/config.json returned HTTP 200 JSON with defaults user effective and path keys.,,,,,2026-06-25,
|
| 40 |
DASH-API-010,Dashboard API,Entity Search API,/api/entities/search.json,src/ctx/monitor/api/readonly.py,As a dashboard client I can search entities for autocomplete,API returns typed entity suggestions for search terms and rejects unsafe queries cleanly,ctx-monitor running,GET /api/entities/search.json?q=github&type=skill,Tested Pass,PASS: /api/entities/search.json?q=github&type=skill&limit=5 returned HTTP 200 JSON with results and total keys.,,,,,2026-06-25,
|
docs/qa/feature-user-story-status.csv
CHANGED
|
@@ -50,9 +50,9 @@ CLI-048,CLI,Harness update and uninstall controls,ctx-harness-install --update a
|
|
| 50 |
CLI-049,CLI,LoopFlow and agent-loop adapter,python -m ctx.adapters.loopflow,src/ctx/adapters/loopflow.py and src/tests/test_loopflow_adapter.py,As a DSL runner or custom agent-loop author I can ask ctx for scoped planning capabilities before each loop plan,Adapter emits a JSON contract with permission-gated skills agents MCPs ctx MCP server metadata and gated harness recommendations only when a user-owned/API/local model is declared,Graph/wiki available or recommendation functions mocked,python -m pytest src/tests/test_loopflow_adapter.py -q,Tested Pass,test_loopflow_adapter.py covers loop-file parsing permission filtering MCP tool metadata harness gating shell-quoted harness install commands CLI JSON output and empty permission fail-closed behavior.,,,,,2026-06-30,Tracks the module entry point documented in docs/harness/attaching-to-hosts.md.
|
| 51 |
HOOK-001,Hooks,Backup PostToolUse runtime hook,hooks/backup_on_change.py,hooks/backup_on_change.py and src/tests/test_quality_hook.py,As a Claude Code user I can snapshot tracked config changes from a PostToolUse hook,The hook reads stdin JSON detects tracked files runs snapshot-if-changed and always exits 0 so edits are not blocked,Temp Claude home and tracked config fixture needed,python -m pytest src/tests/test_quality_hook.py -q,Tested Pass,test_quality_hook.py covers root backup hook stdin parsing tracked-file dispatch snapshot reason shaping and nonblocking exit even when snapshot returns nonzero.,,,,,2026-06-30,Validated in Phase 2 runtime hook behavior slice without increasing the test inventory count.
|
| 52 |
HOOK-002,Hooks,Quality Stop runtime hook,hooks/quality_on_session_end.py,hooks/quality_on_session_end.py and src/tests/test_quality_hook.py,As a Claude Code user I can refresh touched skill quality on session stop without blocking shutdown,The hook reads event state recomputes bounded touched slugs writes audit state and always exits 0 on advisory failures,Temp Claude home and skill event fixture needed,python -m pytest src/tests/test_quality_hook.py -q,Tested Pass,test_quality_hook.py covers touched slug selection state cutoff max slug cap missing file behavior and main nonblocking exit when recompute fails.,,,,,2026-06-30,Validated in Phase 2 runtime hook behavior slice without increasing the test inventory count.
|
| 53 |
-
PYAPI-001,Python API,Public Python API,ctx.api and ctx top-level re-exports,src/ctx/api.py and src/ctx/__init__.py,As a harness author I can import ctx from Python without depending on internal modules,recommend_bundle graph_query wiki_search wiki_get list_all_entities default_wiki_dir and CtxCoreToolbox keep stable signatures safe defaults and top-level re-exports,Runtime wiki or synthetic fixture available,pytest src/tests/test_public_api.py -q,Tested Pass,test_public_api.py covers __all__ exports top-level re-exports signatures happy paths empty paths and telemetry privacy payloads.,,,,,2026-
|
| 54 |
-
MCP-001,MCP/Core Tools,Read/query tool catalog,"ctx__recommend_bundle, ctx__graph_query, ctx__wiki_search, ctx__wiki_get",src/ctx/adapters/generic/ctx_core_tools.py and src/ctx/mcp_server/server.py,As an MCP or generic harness client I can call ctx read tools consistently,Read tools return recommendations graph neighborhoods wiki search and wiki entity payloads through both generic toolbox and MCP stdio surfaces,Synthetic graph/wiki fixture available,pytest src/tests/test_harness_ctx_core.py src/tests/test_mcp_server.py -q,Tested Pass,test_harness_ctx_core.py and test_mcp_server.py pin the read tool names schemas dispatch success paths and JSON-RPC tools/list exposure.,,,,,2026-
|
| 55 |
-
MCP-002,MCP/Core Tools,Lifecycle and session tool catalog,"ctx__observe_dev_event, ctx__load_entity, ctx__mark_entity_used, ctx__record_validation, ctx__record_escalation, ctx__unload_entity, ctx__session_end, ctx__session_state",src/ctx/adapters/generic/ctx_core_tools.py and ctx.runtime_lifecycle.record,As an MCP or generic harness client I can record runtime lifecycle evidence,Lifecycle tools append privacy-safe
|
| 56 |
MCP-003,MCP Router,Trusted third-party MCP attachment,McpClient and McpRouter,src/ctx/adapters/generic/tools/mcp_router.py,As a generic harness user I can attach trusted third-party MCP servers safely,Router starts MCP subprocesses with isolated environment namespaces tools handles timeouts and redacts secrets from errors,Fake MCP server fixture available,pytest src/tests/test_mcp_router.py -q,Tested Pass,test_mcp_router.py covers client start stop tool listing calls namespace routing timeout crash handling environment isolation and stderr secret redaction.,,,,,2026-06-29,Added because third-party MCP attachment is user-facing host functionality not just internal plumbing.
|
| 57 |
MCP-004,MCP/Core Tools,Response format negotiation,output_format and _response_format,src/ctx/adapters/generic/ctx_core_tools.py,As a tool caller I can request JSON or GCF output from read tools,Read tool schemas expose optional output_format and _response_format aliases and fall back to JSON errors when GCF codec is unavailable,Generic toolbox fixture available,pytest src/tests/test_harness_ctx_core.py -q,Tested Pass,test_harness_ctx_core.py covers optional schema fields JSON default GCF opt-in public alias and codec-missing fallback.,,,,,2026-06-29,Tracks a schema-visible behavior exposed to MCP/tool clients.
|
| 58 |
DASH-001,Dashboard,Home page,/,src/ctx/monitor/routes.py,As a user I can land on a useful dashboard home,Home shows current counts and high-value entry points without stale numbers,Monitor running,GET /,Tested Pass,GET / returned 200 in 1506ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
|
@@ -69,7 +69,7 @@ DASH-010,Dashboard,Docs page,/docs,src/ctx/monitor/routes.py,As a user I can rea
|
|
| 69 |
DASH-011,Dashboard,Config page,/config,src/ctx/monitor/routes.py,As a user I can view/edit important config,Config shows explanations defaults required fields validation and safe save,Monitor running,GET /config and POST /api/config,Tested Pass,GET /config returned 200 in 12ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 70 |
DASH-012,Dashboard,Status page,/status,src/ctx/monitor/routes.py,As a user I can see system health,Status reports graph/wiki/cache/session health with actionable errors,Monitor running,GET /status,Tested Pass,GET /status returned 200 in 3750ms after restart; functional but slower than core pages.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 71 |
DASH-013,Dashboard,KPI page,/kpi,src/ctx/monitor/routes.py,As a user I can inspect recommendation effectiveness,KPIs show usage score quality and lifecycle trends without slow unbounded render,Monitor running,GET /kpi,Tested Pass,GET /kpi returned 200 in 107ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 72 |
-
DASH-014,Dashboard,Runtime page,/runtime,src/ctx/monitor/
|
| 73 |
DASH-015,Dashboard,Sessions page,/sessions,src/ctx/monitor/routes.py,As a user I can inspect sessions,Sessions page lists transcripts and details without leaking secrets,Monitor running,GET /sessions,Tested Pass,GET /sessions returned 200 in 269ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 74 |
DASH-016,Dashboard,Logs page,/logs,src/ctx/monitor/routes.py,As a user I can inspect logs,Logs render audit/log files or clear empty state,Monitor running,GET /logs,Tested Pass,GET /logs returned 200 in 132ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 75 |
DASH-017,Dashboard,Live events,/events and /live,src/ctx/monitor/routes.py,As a user I can tail live events,Live page connects SSE and shows clear empty/disconnected states,Monitor running,GET /events and /api/events.stream,Tested Pass,GET /live returned 200 in 87ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
|
@@ -80,7 +80,7 @@ API-002,Dashboard API,Manifest API,/api/manifest.json,src/ctx/monitor/routes.py,
|
|
| 80 |
API-003,Dashboard API,Status API,/api/status.json,src/ctx/monitor/routes.py,As a dashboard client I can fetch health JSON,Endpoint returns graph/wiki/cache health with correct status code,Monitor running,GET /api/status.json,Tested Pass,GET /api/status.json returned 200 in 4303ms after restart; functional but slower than core APIs.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 81 |
API-004,Dashboard API,KPI API,/api/kpi.json,src/ctx/monitor/routes.py,As a dashboard client I can fetch KPI JSON,Endpoint returns bounded KPI payload quickly,Monitor running,GET /api/kpi.json,Tested Pass,GET /api/kpi.json returned 200 in 105ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 82 |
API-005,Dashboard API,Grades API,/api/grades.json,src/ctx/monitor/routes.py,As a dashboard client I can fetch grades JSON,Endpoint returns score and grade payload with explanations,Monitor running,GET /api/grades.json,Retested Pass,Initial dashboard sweep: GET /api/grades.json returned 200 but took 16833ms for a tiny payload.,CTX-AZ-005,Grades API ignored cached KPI grade_counts and rescanned all quality sidecars on demand.,Fixed,"After routing through cached KPI summary, GET /api/grades.json returned 200 in 92ms after restart.",2026-06-23,Fallback full sidecar scan remains for missing KPI summary.
|
| 83 |
-
API-006,Dashboard API,Runtime API,/api/runtime.json,src/ctx/monitor/
|
| 84 |
API-007,Dashboard API,Entity search API,/api/entities/search.json,src/ctx/monitor/routes.py,As a dashboard client I can search entities,Endpoint supports live query type filters and useful fuzzy results,Monitor running,GET /api/entities/search.json?q=review&type=agent,Tested Pass,PASS: endpoint returned 200 in 28ms with agent review results,,,,,2026-06-23,
|
| 85 |
API-008,Dashboard API,Entity detail API,/api/entity/<slug>.json,src/ctx/monitor/routes.py,As a dashboard client I can fetch entity details,Endpoint returns canonical entity docs frontmatter and graph sidecar,Monitor running,GET /api/entity/github.json?type=mcp-server,Tested Pass,GET /api/entity/github.json?type=mcp-server returned 200 in 27ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 86 |
API-009,Dashboard API,Graph neighborhood API,/api/graph/<slug>.json,src/ctx/monitor/routes.py,As a dashboard client I can fetch a graph neighborhood,Endpoint returns bounded nodes edges scores and reasons fast after runtime install,Monitor running,GET /api/graph/github.json?type=skill&limit=20,Tested Pass,PASS: endpoint returned 200 in 2295ms with nodes/edges JSON,,,,,2026-06-23,
|
|
|
|
| 50 |
CLI-049,CLI,LoopFlow and agent-loop adapter,python -m ctx.adapters.loopflow,src/ctx/adapters/loopflow.py and src/tests/test_loopflow_adapter.py,As a DSL runner or custom agent-loop author I can ask ctx for scoped planning capabilities before each loop plan,Adapter emits a JSON contract with permission-gated skills agents MCPs ctx MCP server metadata and gated harness recommendations only when a user-owned/API/local model is declared,Graph/wiki available or recommendation functions mocked,python -m pytest src/tests/test_loopflow_adapter.py -q,Tested Pass,test_loopflow_adapter.py covers loop-file parsing permission filtering MCP tool metadata harness gating shell-quoted harness install commands CLI JSON output and empty permission fail-closed behavior.,,,,,2026-06-30,Tracks the module entry point documented in docs/harness/attaching-to-hosts.md.
|
| 51 |
HOOK-001,Hooks,Backup PostToolUse runtime hook,hooks/backup_on_change.py,hooks/backup_on_change.py and src/tests/test_quality_hook.py,As a Claude Code user I can snapshot tracked config changes from a PostToolUse hook,The hook reads stdin JSON detects tracked files runs snapshot-if-changed and always exits 0 so edits are not blocked,Temp Claude home and tracked config fixture needed,python -m pytest src/tests/test_quality_hook.py -q,Tested Pass,test_quality_hook.py covers root backup hook stdin parsing tracked-file dispatch snapshot reason shaping and nonblocking exit even when snapshot returns nonzero.,,,,,2026-06-30,Validated in Phase 2 runtime hook behavior slice without increasing the test inventory count.
|
| 52 |
HOOK-002,Hooks,Quality Stop runtime hook,hooks/quality_on_session_end.py,hooks/quality_on_session_end.py and src/tests/test_quality_hook.py,As a Claude Code user I can refresh touched skill quality on session stop without blocking shutdown,The hook reads event state recomputes bounded touched slugs writes audit state and always exits 0 on advisory failures,Temp Claude home and skill event fixture needed,python -m pytest src/tests/test_quality_hook.py -q,Tested Pass,test_quality_hook.py covers touched slug selection state cutoff max slug cap missing file behavior and main nonblocking exit when recompute fails.,,,,,2026-06-30,Validated in Phase 2 runtime hook behavior slice without increasing the test inventory count.
|
| 53 |
+
PYAPI-001,Python API,Public Python API,ctx.api and ctx top-level re-exports,src/ctx/api.py and src/ctx/__init__.py,As a harness author I can import ctx from Python without depending on internal modules,recommend_bundle recommend_related graph_query wiki_search wiki_get list_all_entities default_wiki_dir and CtxCoreToolbox keep stable signatures safe defaults and top-level re-exports,Runtime wiki or synthetic fixture available,pytest src/tests/test_public_api.py -q,Tested Pass,test_public_api.py covers __all__ exports top-level re-exports signatures happy paths empty paths and telemetry privacy payloads.,,,,,2026-07-02,Added during canonical feature inventory gap pass and updated when related recommendations became public API.
|
| 54 |
+
MCP-001,MCP/Core Tools,Read/query tool catalog,"ctx__recommend_bundle, ctx__recommend_related, ctx__graph_query, ctx__wiki_search, ctx__wiki_get",src/ctx/adapters/generic/ctx_core_tools.py and src/ctx/mcp_server/server.py,As an MCP or generic harness client I can call ctx read tools consistently,Read tools return recommendations related suggestions graph neighborhoods wiki search and wiki entity payloads through both generic toolbox and MCP stdio surfaces,Synthetic graph/wiki fixture available,pytest src/tests/test_harness_ctx_core.py src/tests/test_mcp_server.py -q,Tested Pass,test_harness_ctx_core.py and test_mcp_server.py pin the read tool names schemas dispatch success paths and JSON-RPC tools/list exposure.,,,,,2026-07-02,Canonical tracker row for the first-class ctx-core read tools; ctx__recommend_related adds partial-selection suggestions.
|
| 55 |
+
MCP-002,MCP/Core Tools,Lifecycle and session tool catalog,"ctx__observe_dev_event, ctx__load_entity, ctx__mark_entity_used, ctx__record_validation, ctx__record_escalation, ctx__unload_entity, ctx__session_end, ctx__session_state",src/ctx/adapters/generic/ctx_core_tools.py and ctx.runtime_lifecycle.record,As an MCP or generic harness client I can record runtime lifecycle evidence,Lifecycle tools append privacy-safe runtime events enforce bound session IDs hash telemetry identifiers and expose local session state with caller-facing slugs for usability,Temp runtime lifecycle directory available,pytest src/tests/test_harness_ctx_core.py src/tests/test_mcp_server.py -q,Tested Pass,test_harness_ctx_core.py covers lifecycle append order bound session enforcement telemetry hashing and test_mcp_server.py covers lifecycle tools/call round-trip.,,,,,2026-07-02,Canonical tracker row for lifecycle/session tools exposed in the MCP/core toolbox catalog.
|
| 56 |
MCP-003,MCP Router,Trusted third-party MCP attachment,McpClient and McpRouter,src/ctx/adapters/generic/tools/mcp_router.py,As a generic harness user I can attach trusted third-party MCP servers safely,Router starts MCP subprocesses with isolated environment namespaces tools handles timeouts and redacts secrets from errors,Fake MCP server fixture available,pytest src/tests/test_mcp_router.py -q,Tested Pass,test_mcp_router.py covers client start stop tool listing calls namespace routing timeout crash handling environment isolation and stderr secret redaction.,,,,,2026-06-29,Added because third-party MCP attachment is user-facing host functionality not just internal plumbing.
|
| 57 |
MCP-004,MCP/Core Tools,Response format negotiation,output_format and _response_format,src/ctx/adapters/generic/ctx_core_tools.py,As a tool caller I can request JSON or GCF output from read tools,Read tool schemas expose optional output_format and _response_format aliases and fall back to JSON errors when GCF codec is unavailable,Generic toolbox fixture available,pytest src/tests/test_harness_ctx_core.py -q,Tested Pass,test_harness_ctx_core.py covers optional schema fields JSON default GCF opt-in public alias and codec-missing fallback.,,,,,2026-06-29,Tracks a schema-visible behavior exposed to MCP/tool clients.
|
| 58 |
DASH-001,Dashboard,Home page,/,src/ctx/monitor/routes.py,As a user I can land on a useful dashboard home,Home shows current counts and high-value entry points without stale numbers,Monitor running,GET /,Tested Pass,GET / returned 200 in 1506ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
|
|
|
| 69 |
DASH-011,Dashboard,Config page,/config,src/ctx/monitor/routes.py,As a user I can view/edit important config,Config shows explanations defaults required fields validation and safe save,Monitor running,GET /config and POST /api/config,Tested Pass,GET /config returned 200 in 12ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 70 |
DASH-012,Dashboard,Status page,/status,src/ctx/monitor/routes.py,As a user I can see system health,Status reports graph/wiki/cache/session health with actionable errors,Monitor running,GET /status,Tested Pass,GET /status returned 200 in 3750ms after restart; functional but slower than core pages.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 71 |
DASH-013,Dashboard,KPI page,/kpi,src/ctx/monitor/routes.py,As a user I can inspect recommendation effectiveness,KPIs show usage score quality and lifecycle trends without slow unbounded render,Monitor running,GET /kpi,Tested Pass,GET /kpi returned 200 in 107ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 72 |
+
DASH-014,Dashboard,Runtime page,/runtime,src/ctx/monitor/pages/activity.py and src/ctx/monitor/services/runtime.py,As a user I can inspect runtime lifecycle artifacts,Runtime shows validation escalation tool-selection token-usage and recent usage metadata without raw evidence strings,Monitor running,GET /runtime and focused runtime lifecycle tests,Retested Pass,PASS: runtime lifecycle tests cover token usage and privacy-safe recent usage metadata.,,,,,2026-07-02,Retested in the tool-selection/token-history canonical loop.
|
| 73 |
DASH-015,Dashboard,Sessions page,/sessions,src/ctx/monitor/routes.py,As a user I can inspect sessions,Sessions page lists transcripts and details without leaking secrets,Monitor running,GET /sessions,Tested Pass,GET /sessions returned 200 in 269ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 74 |
DASH-016,Dashboard,Logs page,/logs,src/ctx/monitor/routes.py,As a user I can inspect logs,Logs render audit/log files or clear empty state,Monitor running,GET /logs,Tested Pass,GET /logs returned 200 in 132ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 75 |
DASH-017,Dashboard,Live events,/events and /live,src/ctx/monitor/routes.py,As a user I can tail live events,Live page connects SSE and shows clear empty/disconnected states,Monitor running,GET /events and /api/events.stream,Tested Pass,GET /live returned 200 in 87ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
|
|
|
| 80 |
API-003,Dashboard API,Status API,/api/status.json,src/ctx/monitor/routes.py,As a dashboard client I can fetch health JSON,Endpoint returns graph/wiki/cache health with correct status code,Monitor running,GET /api/status.json,Tested Pass,GET /api/status.json returned 200 in 4303ms after restart; functional but slower than core APIs.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 81 |
API-004,Dashboard API,KPI API,/api/kpi.json,src/ctx/monitor/routes.py,As a dashboard client I can fetch KPI JSON,Endpoint returns bounded KPI payload quickly,Monitor running,GET /api/kpi.json,Tested Pass,GET /api/kpi.json returned 200 in 105ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 82 |
API-005,Dashboard API,Grades API,/api/grades.json,src/ctx/monitor/routes.py,As a dashboard client I can fetch grades JSON,Endpoint returns score and grade payload with explanations,Monitor running,GET /api/grades.json,Retested Pass,Initial dashboard sweep: GET /api/grades.json returned 200 but took 16833ms for a tiny payload.,CTX-AZ-005,Grades API ignored cached KPI grade_counts and rescanned all quality sidecars on demand.,Fixed,"After routing through cached KPI summary, GET /api/grades.json returned 200 in 92ms after restart.",2026-06-23,Fallback full sidecar scan remains for missing KPI summary.
|
| 83 |
+
API-006,Dashboard API,Runtime API,/api/runtime.json,src/ctx/monitor/api/readonly.py and src/ctx/monitor/services/runtime.py,As a dashboard client I can fetch runtime JSON,Endpoint returns lifecycle selection token usage and recent usage metadata without raw evidence strings,Monitor running,GET /api/runtime.json and scan for raw evidence strings,Retested Pass,PASS: runtime lifecycle test asserts private evidence text is absent from recent_tool_usage.,,,,,2026-07-02,Retested in the tool-selection/token-history canonical loop.
|
| 84 |
API-007,Dashboard API,Entity search API,/api/entities/search.json,src/ctx/monitor/routes.py,As a dashboard client I can search entities,Endpoint supports live query type filters and useful fuzzy results,Monitor running,GET /api/entities/search.json?q=review&type=agent,Tested Pass,PASS: endpoint returned 200 in 28ms with agent review results,,,,,2026-06-23,
|
| 85 |
API-008,Dashboard API,Entity detail API,/api/entity/<slug>.json,src/ctx/monitor/routes.py,As a dashboard client I can fetch entity details,Endpoint returns canonical entity docs frontmatter and graph sidecar,Monitor running,GET /api/entity/github.json?type=mcp-server,Tested Pass,GET /api/entity/github.json?type=mcp-server returned 200 in 27ms after restart.,,,,,2026-06-23,Dashboard route sweep; no mutation performed.
|
| 86 |
API-009,Dashboard API,Graph neighborhood API,/api/graph/<slug>.json,src/ctx/monitor/routes.py,As a dashboard client I can fetch a graph neighborhood,Endpoint returns bounded nodes edges scores and reasons fast after runtime install,Monitor running,GET /api/graph/github.json?type=skill&limit=20,Tested Pass,PASS: endpoint returned 200 in 2295ms with nodes/edges JSON,,,,,2026-06-23,
|
docs/telemetry.md
CHANGED
|
@@ -12,15 +12,20 @@ or runs an export.
|
|
| 12 |
Events use the `ctx.telemetry.v1` envelope and OpenTelemetry-style naming:
|
| 13 |
|
| 14 |
- `ctx.api.recommend_bundle`
|
|
|
|
| 15 |
- `ctx.mcp.request`
|
| 16 |
- `ctx.core.recommend_bundle`
|
|
|
|
| 17 |
- `ctx.runtime_lifecycle.record`
|
| 18 |
- `ctx.cli.run`
|
| 19 |
- `ctx.cli.resume`
|
| 20 |
|
| 21 |
Outcome and dimensions live in attributes such as `otel.status_code`,
|
| 22 |
-
`ctx.operation`, `ctx.tool.name`, `ctx.result.count`,
|
| 23 |
-
`ctx.
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
Every recorded event gets a generated OpenTelemetry-compatible `trace_id` and
|
| 26 |
`span_id` when the caller does not provide one. OTLP export maps those to the
|
|
@@ -45,6 +50,20 @@ Metrics use a separate spool, checkpoint, and status file:
|
|
| 45 |
Metric checkpointing is independent from event/log checkpointing, so replaying
|
| 46 |
or repairing one signal does not advance the other.
|
| 47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
## Privacy Defaults
|
| 49 |
|
| 50 |
The shipped config keeps telemetry local:
|
|
|
|
| 12 |
Events use the `ctx.telemetry.v1` envelope and OpenTelemetry-style naming:
|
| 13 |
|
| 14 |
- `ctx.api.recommend_bundle`
|
| 15 |
+
- `ctx.api.recommend_related`
|
| 16 |
- `ctx.mcp.request`
|
| 17 |
- `ctx.core.recommend_bundle`
|
| 18 |
+
- `ctx.core.recommend_related`
|
| 19 |
- `ctx.runtime_lifecycle.record`
|
| 20 |
- `ctx.cli.run`
|
| 21 |
- `ctx.cli.resume`
|
| 22 |
|
| 23 |
Outcome and dimensions live in attributes such as `otel.status_code`,
|
| 24 |
+
`ctx.operation`, `ctx.tool.name`, `ctx.result.count`,
|
| 25 |
+
`ctx.selection.selected.count`, `ctx.selection.rejected.count`,
|
| 26 |
+
`ctx.selection.source`, `ctx.selection.selected`, `ctx.usage.attribution`, and
|
| 27 |
+
hashed identifiers like `ctx.query.hash`, `ctx.slug.hash`, or
|
| 28 |
+
`ctx.session.hash`.
|
| 29 |
|
| 30 |
Every recorded event gets a generated OpenTelemetry-compatible `trace_id` and
|
| 31 |
`span_id` when the caller does not provide one. OTLP export maps those to the
|
|
|
|
| 50 |
Metric checkpointing is independent from event/log checkpointing, so replaying
|
| 51 |
or repairing one signal does not advance the other.
|
| 52 |
|
| 53 |
+
Runtime lifecycle token usage emits OTel-style metric names when a host records
|
| 54 |
+
`ctx__mark_entity_used.token_usage`:
|
| 55 |
+
|
| 56 |
+
- `ctx.tool_usage.records` counts usage records by entity type and attribution.
|
| 57 |
+
- `ctx.tool_usage.tokens` counts total tokens when the record has a
|
| 58 |
+
non-negative `total_tokens` value.
|
| 59 |
+
- `ctx.tool_usage.tokens_per_record` observes the same total as a histogram.
|
| 60 |
+
|
| 61 |
+
Attribution is always explicit through `ctx.usage.attribution`:
|
| 62 |
+
`exact`, `estimated`, or `unavailable`. The built-in `ctx run` provider totals
|
| 63 |
+
are session-scoped and are labeled as unavailable for per-tool attribution; ctx
|
| 64 |
+
does not split session totals across selected tools. Exact per-tool rows require
|
| 65 |
+
the host or runner to provide usage for that specific entity.
|
| 66 |
+
|
| 67 |
## Privacy Defaults
|
| 68 |
|
| 69 |
The shipped config keeps telemetry local:
|