Sync ctx 0a04cb6
Browse filesGitHub commit: 0a04cb681b600359207835d19ab2669a49aa2d53
- CHANGELOG.md +6 -0
- README.md +8 -5
- docs/SKILL.md +5 -4
- docs/harness/attaching-to-hosts.md +95 -5
- docs/harness/loopflow-adapter-demo.md +200 -0
- docs/index.md +10 -8
- docs/knowledge-graph.md +8 -6
- docs/qa/feature-user-story-status.csv +2 -0
- docs/skill-router/index.md +5 -5
- graph/README.md +3 -2
CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ Format loosely follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
| 5 |
|
| 6 |
## [Unreleased]
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
### Changed
|
| 9 |
|
| 10 |
- Hardened docs deploy and release publish gates so feature and dashboard
|
|
|
|
| 5 |
|
| 6 |
## [Unreleased]
|
| 7 |
|
| 8 |
+
### Added
|
| 9 |
+
|
| 10 |
+
- Added the LoopFlow/custom agent-loop adapter
|
| 11 |
+
(`python -m ctx.adapters.loopflow`) for permissioned pre-plan skill, agent,
|
| 12 |
+
MCP, ctx MCP server, and user-owned model harness recommendations.
|
| 13 |
+
|
| 14 |
### Changed
|
| 15 |
|
| 16 |
- Hardened docs deploy and release publish gates so feature and dashboard
|
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)
|
|
@@ -36,9 +36,10 @@ burn fewer tokens and local models waste less CPU/GPU work.
|
|
| 36 |
|
| 37 |
ctx watches what you are building, walks a **79,958-node** graph, and
|
| 38 |
recommends a small, top-scored bundle of skills, agents, and MCP servers for
|
| 39 |
-
the current task. If you use your own local/API model instead of Claude Code
|
| 40 |
-
|
| 41 |
-
|
|
|
|
| 42 |
|
| 43 |
Current shipped snapshot:
|
| 44 |
|
|
@@ -73,6 +74,7 @@ Examples from that tracker:
|
|
| 73 |
| --- | --- | --- |
|
| 74 |
| `CLI-002` | As a user I can ask ctx for current repo recommendations. | `ctx-recommend` returns a capped, graph-scored bundle of relevant skills, agents, and MCP servers from the shared recommendation engine. |
|
| 75 |
| `CLI-026` | As a local/API model user I can get harness recommendations and install one. | `ctx-harness-install --dry-run` interviews model/goals/tools/privacy, recommends a fitting harness above threshold, or emits a no-fit custom harness PRD. |
|
|
|
|
| 76 |
| `API-011` | As a dashboard user I can manually add, edit, or delete entities. | `/api/entity/upsert` and `/api/entity/delete` validate type, slug, and body, then queue safe graph/wiki updates instead of mutating blindly. |
|
| 77 |
|
| 78 |
## Install
|
|
@@ -95,7 +97,7 @@ Graph-backed recommendations need the pre-built graph. By default, `ctx-init
|
|
| 95 |
in source checkouts, or the matching GitHub release asset from pip installs.
|
| 96 |
It contains `graphify-out/*`, the shipped skill index needed for
|
| 97 |
recommendations, and the 207 harness pages needed by
|
| 98 |
-
`ctx-harness-install`:
|
| 99 |
|
| 100 |
```bash
|
| 101 |
ctx-init --graph
|
|
@@ -133,6 +135,7 @@ ctx-harness-install text-to-cad --dry-run # inspect before cloning/running any
|
|
| 133 |
ctx-harness-install text-to-cad # install after reviewing the plan
|
| 134 |
ctx-harness-install text-to-cad --update --dry-run
|
| 135 |
ctx-harness-install text-to-cad --uninstall --dry-run
|
|
|
|
| 136 |
ctx-skill-quality list # four-signal quality score for every skill
|
| 137 |
ctx-skill-quality explain python-patterns # drill into a single skill
|
| 138 |
ctx-skill-health dashboard # structural health + drift detection
|
|
|
|
| 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)
|
|
|
|
| 36 |
|
| 37 |
ctx watches what you are building, walks a **79,958-node** graph, and
|
| 38 |
recommends a small, top-scored bundle of skills, agents, and MCP servers for
|
| 39 |
+
the current task. If you use your own local/API model instead of Claude Code or
|
| 40 |
+
run an external loop such as LoopFlow, ctx has separate harness and adapter
|
| 41 |
+
flows: tell it the model and goal, review recommendations, and keep installs
|
| 42 |
+
behind dry-run/update/uninstall controls.
|
| 43 |
|
| 44 |
Current shipped snapshot:
|
| 45 |
|
|
|
|
| 74 |
| --- | --- | --- |
|
| 75 |
| `CLI-002` | As a user I can ask ctx for current repo recommendations. | `ctx-recommend` returns a capped, graph-scored bundle of relevant skills, agents, and MCP servers from the shared recommendation engine. |
|
| 76 |
| `CLI-026` | As a local/API model user I can get harness recommendations and install one. | `ctx-harness-install --dry-run` interviews model/goals/tools/privacy, recommends a fitting harness above threshold, or emits a no-fit custom harness PRD. |
|
| 77 |
+
| `CLI-049` | As a DSL runner or custom agent-loop author I can ask ctx for scoped planning capabilities before each loop plan. | `python -m ctx.adapters.loopflow` emits a permission-gated JSON contract with skill, agent, MCP, ctx MCP server, and gated harness recommendations. |
|
| 78 |
| `API-011` | As a dashboard user I can manually add, edit, or delete entities. | `/api/entity/upsert` and `/api/entity/delete` validate type, slug, and body, then queue safe graph/wiki updates instead of mutating blindly. |
|
| 79 |
|
| 80 |
## Install
|
|
|
|
| 97 |
in source checkouts, or the matching GitHub release asset from pip installs.
|
| 98 |
It contains `graphify-out/*`, the shipped skill index needed for
|
| 99 |
recommendations, and the 207 harness pages needed by
|
| 100 |
+
`ctx-harness-install` and LoopFlow adapter harness recommendations:
|
| 101 |
|
| 102 |
```bash
|
| 103 |
ctx-init --graph
|
|
|
|
| 135 |
ctx-harness-install text-to-cad # install after reviewing the plan
|
| 136 |
ctx-harness-install text-to-cad --update --dry-run
|
| 137 |
ctx-harness-install text-to-cad --uninstall --dry-run
|
| 138 |
+
python -m ctx.adapters.loopflow --goal "fix checkout e2e" --permissions skills,agents,mcps
|
| 139 |
ctx-skill-quality list # four-signal quality score for every skill
|
| 140 |
ctx-skill-quality explain python-patterns # drill into a single skill
|
| 141 |
ctx-skill-health dashboard # structural health + drift detection
|
docs/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
---
|
| 2 |
name: skill-router
|
| 3 |
-
description: "Repo-aware recommendation manager for ctx. Scans the active repository, identifies stack and workflow signals, recommends a capped set of skills, agents, and MCP servers, and unloads helpers that no longer match the current work after user confirmation. Harnesses are recommended by the custom-model onboarding flow and then attach to the same recommendation layer."
|
| 4 |
---
|
| 5 |
|
| 6 |
# Skill Router
|
|
@@ -17,8 +17,9 @@ The router manages runtime recommendations for:
|
|
| 17 |
- MCP servers
|
| 18 |
|
| 19 |
Harnesses are separate catalog entities. They are recommended when a user wants
|
| 20 |
-
to run ctx with a non-Claude-Code host, local model,
|
| 21 |
-
the harness calls the same skills/agents/MCP
|
|
|
|
| 22 |
|
| 23 |
## Problem
|
| 24 |
|
|
@@ -38,7 +39,7 @@ ctx/
|
|
| 38 |
|-- src/scan_repo.py # Repo scanner -> stack profile
|
| 39 |
|-- src/ctx/core/resolve/resolve_skills.py # Profile -> load/unload manifest
|
| 40 |
|-- src/ctx/core/resolve/recommendations.py # Shared scoring/ranking engine
|
| 41 |
-
|-- src/ctx/adapters/ #
|
| 42 |
|-- src/harness_install.py # Custom-model harness install flow
|
| 43 |
`-- graph/wiki-graph-runtime.tar.gz # Shipped graph/wiki runtime
|
| 44 |
```
|
|
|
|
| 1 |
---
|
| 2 |
name: skill-router
|
| 3 |
+
description: "Repo-aware recommendation manager for ctx. Scans the active repository, identifies stack and workflow signals, recommends a capped set of skills, agents, and MCP servers, and unloads helpers that no longer match the current work after user confirmation. Harnesses are recommended by the custom-model onboarding flow or loop adapters and then attach to the same recommendation layer."
|
| 4 |
---
|
| 5 |
|
| 6 |
# Skill Router
|
|
|
|
| 17 |
- MCP servers
|
| 18 |
|
| 19 |
Harnesses are separate catalog entities. They are recommended when a user wants
|
| 20 |
+
to run ctx with a non-Claude-Code host, local model, API model, or external loop
|
| 21 |
+
adapter. Once attached, the harness calls the same skills/agents/MCP
|
| 22 |
+
recommendation engine.
|
| 23 |
|
| 24 |
## Problem
|
| 25 |
|
|
|
|
| 39 |
|-- src/scan_repo.py # Repo scanner -> stack profile
|
| 40 |
|-- src/ctx/core/resolve/resolve_skills.py # Profile -> load/unload manifest
|
| 41 |
|-- src/ctx/core/resolve/recommendations.py # Shared scoring/ranking engine
|
| 42 |
+
|-- src/ctx/adapters/ # Host adapters + generic tools
|
| 43 |
|-- src/harness_install.py # Custom-model harness install flow
|
| 44 |
`-- graph/wiki-graph-runtime.tar.gz # Shipped graph/wiki runtime
|
| 45 |
```
|
docs/harness/attaching-to-hosts.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# Attaching ctx to any LLM host
|
| 2 |
|
| 3 |
-
`ctx` ships
|
| 4 |
already supports:
|
| 5 |
|
| 6 |
| Your host | Use |
|
|
@@ -8,10 +8,11 @@ already supports:
|
|
| 8 |
| MCP-native (Claude Code, Claude Agent SDK, Cline, Goose, OpenHands, Continue) | **MCP server** — no Python, just spawn `ctx-mcp-server` |
|
| 9 |
| Anything that isn't MCP-native but runs Python | **Python library** — `from ctx import recommend_bundle, ...` |
|
| 10 |
| "I just want to run an agent and get recommendations" | **`ctx run` CLI** — our built-in harness |
|
|
|
|
| 11 |
|
| 12 |
-
All
|
| 13 |
-
quality scoring.
|
| 14 |
-
|
| 15 |
|
| 16 |
---
|
| 17 |
|
|
@@ -242,6 +243,94 @@ process environment; secret values are not stored in the session log.
|
|
| 242 |
|
| 243 |
---
|
| 244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
## Installed harness attachment
|
| 246 |
|
| 247 |
`ctx-harness-install <slug>` creates `.ctx/attach/` inside the installed
|
|
@@ -280,8 +369,9 @@ ctx-harness-install --recommend \
|
|
| 280 |
| You're comparing models and need a harness | 3 (CLI) |
|
| 281 |
| No catalog harness fits your model/goal | generated custom harness plan |
|
| 282 |
| You're building an IDE extension | 1 if the IDE speaks MCP (most do), else 2 |
|
|
|
|
| 283 |
|
| 284 |
-
All
|
| 285 |
corpus, so your recommendations are consistent regardless of the
|
| 286 |
integration you pick.
|
| 287 |
|
|
|
|
| 1 |
# Attaching ctx to any LLM host
|
| 2 |
|
| 3 |
+
`ctx` ships four integration surfaces. Pick based on what your host
|
| 4 |
already supports:
|
| 5 |
|
| 6 |
| Your host | Use |
|
|
|
|
| 8 |
| MCP-native (Claude Code, Claude Agent SDK, Cline, Goose, OpenHands, Continue) | **MCP server** — no Python, just spawn `ctx-mcp-server` |
|
| 9 |
| Anything that isn't MCP-native but runs Python | **Python library** — `from ctx import recommend_bundle, ...` |
|
| 10 |
| "I just want to run an agent and get recommendations" | **`ctx run` CLI** — our built-in harness |
|
| 11 |
+
| LoopFlow or another loop that already owns plan/act/observe | **LoopFlow adapter** — `python -m ctx.adapters.loopflow` before planning |
|
| 12 |
|
| 13 |
+
All four paths consume the **same** knowledge graph, llm-wiki, and
|
| 14 |
+
quality scoring inputs. Output shape and grouping can differ by host
|
| 15 |
+
surface; the transport and permission contract decide what each loop sees.
|
| 16 |
|
| 17 |
---
|
| 18 |
|
|
|
|
| 243 |
|
| 244 |
---
|
| 245 |
|
| 246 |
+
## 4. LoopFlow and agent-loop adapter path
|
| 247 |
+
|
| 248 |
+
DSL runners such as [LoopFlow](https://loopflow.live/) and custom agent loops
|
| 249 |
+
already own the control flow: plan, act, observe, reflect, and stop when their
|
| 250 |
+
gate passes. Use `python -m ctx.adapters.loopflow` when that loop should ask
|
| 251 |
+
ctx which capabilities it may load before planning.
|
| 252 |
+
|
| 253 |
+
For a presenter-ready walkthrough, see
|
| 254 |
+
[LoopFlow adapter demo](loopflow-adapter-demo.md).
|
| 255 |
+
|
| 256 |
+
The adapter emits a JSON contract with:
|
| 257 |
+
|
| 258 |
+
- explicit permission grants for `skills`, `agents`, `mcps`, and `harnesses`;
|
| 259 |
+
- the `ctx-mcp-server` command and ctx tool names when the permission contract
|
| 260 |
+
allows ctx-core tools;
|
| 261 |
+
- ranked skill, agent, and MCP recommendations from the `ctx-recommend`
|
| 262 |
+
engine;
|
| 263 |
+
- optional harness recommendations only when the loop declares a user-owned,
|
| 264 |
+
API, or local model.
|
| 265 |
+
|
| 266 |
+
For LoopFlow, keep the `.loop` file in charge and call ctx before the plan:
|
| 267 |
+
|
| 268 |
+
```bash
|
| 269 |
+
python -m ctx.adapters.loopflow \
|
| 270 |
+
--loop-file rate-limit.loop \
|
| 271 |
+
--permissions skills,agents,mcps
|
| 272 |
+
```
|
| 273 |
+
|
| 274 |
+
Add `--last-failure-file .loopflow/last-failure.txt` only after the loop has
|
| 275 |
+
written that file; omit it on the first run. The adapter uses that failure text
|
| 276 |
+
for recommendation ranking and returns only `context.last_failure_present`, not
|
| 277 |
+
the raw failure.
|
| 278 |
+
|
| 279 |
+
The returned payload includes LoopFlow-ready hints for the granted groups:
|
| 280 |
+
|
| 281 |
+
```loop
|
| 282 |
+
use skills: security-review, code-review
|
| 283 |
+
```
|
| 284 |
+
|
| 285 |
+
Only installed/local skill rows are named in `loopflow.use_skills`. Installable
|
| 286 |
+
catalog skills remain under `capabilities.skills` with `status: available` and
|
| 287 |
+
their `install_command` metadata.
|
| 288 |
+
|
| 289 |
+
When the LoopFlow run uses its own LLM rather than a hosted Claude Code
|
| 290 |
+
session, grant harnesses and pass the model profile:
|
| 291 |
+
|
| 292 |
+
```bash
|
| 293 |
+
python -m ctx.adapters.loopflow \
|
| 294 |
+
--loop-file private-agent.loop \
|
| 295 |
+
--permissions skills,agents,mcps,harnesses \
|
| 296 |
+
--own-llm \
|
| 297 |
+
--model-provider ollama \
|
| 298 |
+
--model ollama/llama3.1 \
|
| 299 |
+
--harness-runtime "local workstation" \
|
| 300 |
+
--harness-tools "filesystem, shell, browser" \
|
| 301 |
+
--harness-privacy "no cloud prompts"
|
| 302 |
+
```
|
| 303 |
+
|
| 304 |
+
Other harness matching hints use the same names as the install flow:
|
| 305 |
+
`--harness-autonomy`, `--harness-verify`, `--harness-attach-mode`, and
|
| 306 |
+
`--api-key-env`.
|
| 307 |
+
|
| 308 |
+
Generic agent loops can import the same adapter directly:
|
| 309 |
+
|
| 310 |
+
```python
|
| 311 |
+
from ctx.adapters.loopflow import recommend_for_loop
|
| 312 |
+
|
| 313 |
+
plan_context = recommend_for_loop(
|
| 314 |
+
goal="fix checkout e2e flake",
|
| 315 |
+
loop_kind="agent-loop",
|
| 316 |
+
look_at=["tests/e2e", "playwright config"],
|
| 317 |
+
done_when=['"pytest tests/e2e -q" passes'],
|
| 318 |
+
last_failure=last_failure_text,
|
| 319 |
+
permissions={"skills", "agents", "mcps", "harnesses"},
|
| 320 |
+
own_llm=True,
|
| 321 |
+
model_provider="openrouter",
|
| 322 |
+
model="anthropic/claude-opus-4.7",
|
| 323 |
+
)
|
| 324 |
+
```
|
| 325 |
+
|
| 326 |
+
Load only the groups that are explicitly granted in `permissions`. If
|
| 327 |
+
`harnesses` is granted without `--own-llm`, `--model-provider`, or `--model`,
|
| 328 |
+
the adapter returns a warning and no harness recommendations. The ctx MCP
|
| 329 |
+
command and tool list are also permission-filtered; ctx tools that can operate
|
| 330 |
+
across all capability groups only appear when all of those groups are granted.
|
| 331 |
+
|
| 332 |
+
---
|
| 333 |
+
|
| 334 |
## Installed harness attachment
|
| 335 |
|
| 336 |
`ctx-harness-install <slug>` creates `.ctx/attach/` inside the installed
|
|
|
|
| 369 |
| You're comparing models and need a harness | 3 (CLI) |
|
| 370 |
| No catalog harness fits your model/goal | generated custom harness plan |
|
| 371 |
| You're building an IDE extension | 1 if the IDE speaks MCP (most do), else 2 |
|
| 372 |
+
| You're building a DSL runner or agent loop | 4 (LoopFlow adapter) |
|
| 373 |
|
| 374 |
+
All four paths share `~/.claude/skill-wiki/` as the source-of-truth
|
| 375 |
corpus, so your recommendations are consistent regardless of the
|
| 376 |
integration you pick.
|
| 377 |
|
docs/harness/loopflow-adapter-demo.md
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LoopFlow adapter demo
|
| 2 |
+
|
| 3 |
+
Use this page as presenter notes for the LoopFlow owner. The short version:
|
| 4 |
+
LoopFlow stays the control language; ctx becomes a permissioned recommendation
|
| 5 |
+
sidecar that tells the loop which skills, agents, MCP tools, and user-owned LLM
|
| 6 |
+
harnesses are worth loading before the next plan.
|
| 7 |
+
|
| 8 |
+
## 30-second pitch
|
| 9 |
+
|
| 10 |
+
LoopFlow already owns the loop: `goal:`, `look at:`, plan, act, observe,
|
| 11 |
+
reflect, and `done when`. ctx should not replace that. ctx should run before
|
| 12 |
+
planning, read the same goal, verification checks, and failure context, and
|
| 13 |
+
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.
|
| 20 |
+
|
| 21 |
+
## Demo loop
|
| 22 |
+
|
| 23 |
+
```loop
|
| 24 |
+
loop "select ctx capabilities":
|
| 25 |
+
goal: mcp agent loop local ollama filesystem
|
| 26 |
+
look at: the repo plan, AGENTS.md, and the last failure
|
| 27 |
+
done when "pytest src/tests/test_loopflow_adapter.py -q" passes
|
| 28 |
+
each cycle: plan, then act, then observe
|
| 29 |
+
when it fails: reflect, then plan again
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
## Demo command
|
| 33 |
+
|
| 34 |
+
Run ctx immediately before LoopFlow plans:
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
python -m ctx.adapters.loopflow \
|
| 38 |
+
--goal "mcp agent loop local ollama filesystem" \
|
| 39 |
+
--loop-name "ctx capability selection" \
|
| 40 |
+
--permissions skills,agents,mcps,harnesses \
|
| 41 |
+
--own-llm \
|
| 42 |
+
--model-provider ollama \
|
| 43 |
+
--model ollama/llama3.1 \
|
| 44 |
+
--top-k 2
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
The same call can read a real `.loop` file:
|
| 48 |
+
|
| 49 |
+
```bash
|
| 50 |
+
python -m ctx.adapters.loopflow \
|
| 51 |
+
--loop-file select-capabilities.loop \
|
| 52 |
+
--permissions skills,agents,mcps,harnesses \
|
| 53 |
+
--own-llm \
|
| 54 |
+
--model-provider ollama \
|
| 55 |
+
--model ollama/llama3.1
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
Add `--last-failure-file .loopflow/last-failure.txt` after LoopFlow has written
|
| 59 |
+
that file.
|
| 60 |
+
|
| 61 |
+
## Example payload
|
| 62 |
+
|
| 63 |
+
This excerpt is from the live adapter against the current ctx catalog. Exact
|
| 64 |
+
recommendation names can change as the graph changes, but the contract shape is
|
| 65 |
+
stable.
|
| 66 |
+
|
| 67 |
+
```json
|
| 68 |
+
{
|
| 69 |
+
"version": "ctx.loop_adapter.v1",
|
| 70 |
+
"adapter": "loopflow",
|
| 71 |
+
"permissions": {
|
| 72 |
+
"skills": true,
|
| 73 |
+
"agents": true,
|
| 74 |
+
"mcps": true,
|
| 75 |
+
"harnesses": true
|
| 76 |
+
},
|
| 77 |
+
"loopflow": {
|
| 78 |
+
"before_plan": "Call python -m ctx.adapters.loopflow before planning and inject this JSON as read-only context.",
|
| 79 |
+
"use_tools": "use tools from the \"ctx\" server",
|
| 80 |
+
"use_skills": "use skills: oocx-tfplan2md-agent-model-selection",
|
| 81 |
+
"harness_rule": "Only load harnesses when the loop runs on a user-owned/API/local LLM."
|
| 82 |
+
},
|
| 83 |
+
"mcp_server": {
|
| 84 |
+
"name": "ctx",
|
| 85 |
+
"command": "ctx-mcp-server",
|
| 86 |
+
"tools": [
|
| 87 |
+
"ctx__recommend_bundle",
|
| 88 |
+
"ctx__graph_query",
|
| 89 |
+
"ctx__wiki_search",
|
| 90 |
+
"ctx__wiki_get",
|
| 91 |
+
"ctx__observe_dev_event",
|
| 92 |
+
"ctx__load_entity",
|
| 93 |
+
"ctx__mark_entity_used",
|
| 94 |
+
"ctx__record_validation",
|
| 95 |
+
"ctx__record_escalation",
|
| 96 |
+
"ctx__unload_entity",
|
| 97 |
+
"ctx__session_end",
|
| 98 |
+
"ctx__session_state"
|
| 99 |
+
]
|
| 100 |
+
},
|
| 101 |
+
"capabilities": {
|
| 102 |
+
"skills": [
|
| 103 |
+
{"name": "oocx-tfplan2md-agent-model-selection", "type": "skill", "status": "installed"},
|
| 104 |
+
{
|
| 105 |
+
"name": "nickcrew-claude-ctx-plugin-tool-selection",
|
| 106 |
+
"type": "skill",
|
| 107 |
+
"status": "available",
|
| 108 |
+
"source_catalog": "skill-index",
|
| 109 |
+
"install_command": "ctx-skill-install nickcrew-claude-ctx-plugin-tool-selection"
|
| 110 |
+
}
|
| 111 |
+
],
|
| 112 |
+
"agents": [
|
| 113 |
+
{"name": "oss-investigator-local-git-agent", "type": "agent"},
|
| 114 |
+
{"name": "loop-operator", "type": "agent"}
|
| 115 |
+
],
|
| 116 |
+
"mcps": [
|
| 117 |
+
{"name": "local-ollama-file-operations", "type": "mcp-server"},
|
| 118 |
+
{"name": "multi-model-advisor-ollama", "type": "mcp-server"}
|
| 119 |
+
],
|
| 120 |
+
"harnesses": [
|
| 121 |
+
{"name": "autogen", "type": "harness", "fit_score": 1.0},
|
| 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.",
|
| 128 |
+
"harness_install": "ctx-harness-install --dry-run '--goal=mcp agent loop local ollama filesystem' --model-provider=ollama --model=ollama/llama3.1 -- autogen"
|
| 129 |
+
},
|
| 130 |
+
"warnings": []
|
| 131 |
+
}
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
## How LoopFlow would consume it
|
| 135 |
+
|
| 136 |
+
The smallest integration is a pre-plan hook:
|
| 137 |
+
|
| 138 |
+
```python
|
| 139 |
+
from ctx.adapters.loopflow import recommend_for_loop
|
| 140 |
+
|
| 141 |
+
ctx_payload = recommend_for_loop(
|
| 142 |
+
goal=loop.goal,
|
| 143 |
+
loop_name=loop.name,
|
| 144 |
+
loop_kind="loopflow",
|
| 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,
|
| 151 |
+
model=runner.model,
|
| 152 |
+
)
|
| 153 |
+
|
| 154 |
+
loop.add_readonly_context("ctx", ctx_payload)
|
| 155 |
+
|
| 156 |
+
if ctx_payload["mcp_server"]["command"]:
|
| 157 |
+
runner.register_mcp_server(
|
| 158 |
+
name=ctx_payload["mcp_server"]["name"],
|
| 159 |
+
command=ctx_payload["mcp_server"]["command"],
|
| 160 |
+
)
|
| 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
|
| 167 |
+
next adapter call. That is the agent-loop back edge: LoopFlow keeps the retry
|
| 168 |
+
logic, and ctx refreshes recommendations based on what just failed.
|
| 169 |
+
|
| 170 |
+
## Permission model
|
| 171 |
+
|
| 172 |
+
The adapter fails closed:
|
| 173 |
+
|
| 174 |
+
- `--permissions skills` only returns skill recommendations.
|
| 175 |
+
- `--permissions mcps` only returns MCP server recommendations unless all
|
| 176 |
+
capability groups are granted, which lets ctx MCP tools operate safely across
|
| 177 |
+
skills, agents, MCPs, and harnesses.
|
| 178 |
+
- `--permissions harnesses` returns no harnesses unless `--own-llm`,
|
| 179 |
+
`--model-provider`, or `--model` is present.
|
| 180 |
+
- `agent_loop.harness_install` is always a `--dry-run` command. It shows what
|
| 181 |
+
would be installed; it does not mutate the host.
|
| 182 |
+
|
| 183 |
+
This lets a LoopFlow user decide whether a loop may use skills, agents, MCPs,
|
| 184 |
+
or harnesses without giving ctx authority to bypass the loop's own gates.
|
| 185 |
+
|
| 186 |
+
## Owner ask
|
| 187 |
+
|
| 188 |
+
The integration proposal for LoopFlow is intentionally small:
|
| 189 |
+
|
| 190 |
+
1. Add an optional `ctx` pre-plan hook in the LoopFlow runner.
|
| 191 |
+
2. Let `.loop` users grant capability groups: `skills`, `agents`, `mcps`,
|
| 192 |
+
and `harnesses`.
|
| 193 |
+
3. Inject the returned JSON as read-only context before planning.
|
| 194 |
+
4. Register the ctx MCP server only when the adapter returns an MCP command.
|
| 195 |
+
5. Surface `agent_loop.harness_install` as an explicit user action, not an
|
| 196 |
+
automatic install.
|
| 197 |
+
|
| 198 |
+
That gives LoopFlow the ctx graph, llm-wiki, MCP server, skill recommender, and
|
| 199 |
+
user-owned model harness recommendations while preserving LoopFlow's language,
|
| 200 |
+
human gates, and `done when` verification model.
|
docs/index.md
CHANGED
|
@@ -16,10 +16,10 @@ burn fewer tokens and local models waste less CPU/GPU work.
|
|
| 16 |
|
| 17 |
Watches what you develop, walks a knowledge graph of **68,494 skill pages, 467 agents, 10,790 MCP servers, and 207 cataloged harnesses**, and recommends the
|
| 18 |
right execution bundle on the fly. The live execution bundle is skills,
|
| 19 |
-
agents, and MCP servers only; custom/API/local model users
|
| 20 |
-
harness
|
| 21 |
-
what to load, install, or adopt. Powered by a Karpathy LLM wiki
|
| 22 |
-
memory that gets smarter every session.
|
| 23 |
|
| 24 |
!!! tip "Install"
|
| 25 |
|
|
@@ -126,8 +126,9 @@ graph-based discovery:
|
|
| 126 |
stack signals, walks the graph, and **recommends** relevant skills,
|
| 127 |
agents, and MCP servers in real time — **nothing loads or
|
| 128 |
installs without your approval**.
|
| 129 |
-
- During custom/API/local model onboarding
|
| 130 |
-
`ctx-harness-install`
|
|
|
|
| 131 |
above the configured harness match floor.
|
| 132 |
|
| 133 |
The result: you always know what skills, agents, and MCP servers are available
|
|
@@ -190,7 +191,8 @@ ones are flagged. New ones self-ingest.
|
|
| 190 |
|
| 191 |
Scans the active repo, detects the stack from file signatures, walks
|
| 192 |
the stack matrix, loads exactly the skills that apply, and can
|
| 193 |
-
recommend supporting agents and MCP servers.
|
|
|
|
| 194 |
|
| 195 |
[:octicons-arrow-right-24: Router overview](skill-router/index.md) ·
|
| 196 |
[Stack signatures](stack-signatures.md) ·
|
|
@@ -214,7 +216,7 @@ ones are flagged. New ones self-ingest.
|
|
| 214 |
---
|
| 215 |
|
| 216 |
Current main is **v1.0.20** — MIT, CI-matrixed (Ubuntu 3.12 plus Windows/macOS 3.11/3.12),
|
| 217 |
-
4,
|
| 218 |
ships console scripts including `ctx-init`,
|
| 219 |
`ctx-monitor` (local dashboard with graph + wiki + load/unload for
|
| 220 |
skills, agents, and MCP servers, plus Harness Setup for user-owned LLMs),
|
|
|
|
| 16 |
|
| 17 |
Watches what you develop, walks a knowledge graph of **68,494 skill pages, 467 agents, 10,790 MCP servers, and 207 cataloged harnesses**, and recommends the
|
| 18 |
right execution bundle on the fly. The live execution bundle is skills,
|
| 19 |
+
agents, and MCP servers only; custom/API/local model users and external loop
|
| 20 |
+
adapters get separate harness recommendations based on model choice and task
|
| 21 |
+
goal. You decide what to load, install, or adopt. Powered by a Karpathy LLM wiki
|
| 22 |
+
with persistent memory that gets smarter every session.
|
| 23 |
|
| 24 |
!!! tip "Install"
|
| 25 |
|
|
|
|
| 126 |
stack signals, walks the graph, and **recommends** relevant skills,
|
| 127 |
agents, and MCP servers in real time — **nothing loads or
|
| 128 |
installs without your approval**.
|
| 129 |
+
- During custom/API/local model onboarding and LoopFlow/agent-loop adapter
|
| 130 |
+
calls, `ctx-init`, `ctx-harness-install`, and
|
| 131 |
+
`python -m ctx.adapters.loopflow` use the same graph to recommend harnesses
|
| 132 |
above the configured harness match floor.
|
| 133 |
|
| 134 |
The result: you always know what skills, agents, and MCP servers are available
|
|
|
|
| 191 |
|
| 192 |
Scans the active repo, detects the stack from file signatures, walks
|
| 193 |
the stack matrix, loads exactly the skills that apply, and can
|
| 194 |
+
recommend supporting agents and MCP servers. Loop adapters can call
|
| 195 |
+
the same recommender before each plan.
|
| 196 |
|
| 197 |
[:octicons-arrow-right-24: Router overview](skill-router/index.md) ·
|
| 198 |
[Stack signatures](stack-signatures.md) ·
|
|
|
|
| 216 |
---
|
| 217 |
|
| 218 |
Current main is **v1.0.20** — MIT, CI-matrixed (Ubuntu 3.12 plus Windows/macOS 3.11/3.12),
|
| 219 |
+
4,421 test inventory. Adds enterprise OpenTelemetry-ready telemetry and
|
| 220 |
ships console scripts including `ctx-init`,
|
| 221 |
`ctx-monitor` (local dashboard with graph + wiki + load/unload for
|
| 222 |
skills, agents, and MCP servers, plus Harness Setup for user-owned LLMs),
|
docs/knowledge-graph.md
CHANGED
|
@@ -189,11 +189,12 @@ The helper `resolve_graph.load_graph()` does this for you.
|
|
| 189 |
|
| 190 |
### Via recommendation paths
|
| 191 |
|
| 192 |
-
The graph backs
|
| 193 |
|
| 194 |
- Execution recommendation surfaces (`ctx.recommend_bundle`, MCP
|
| 195 |
-
`ctx__recommend_bundle`, generic harness tools,
|
| 196 |
-
|
|
|
|
| 197 |
`ctx.core.resolve.recommendations.recommend_by_tags` for skills,
|
| 198 |
agents, and MCP servers. That engine ranks candidates by
|
| 199 |
slug-token matches, tag overlap, graph degree, and semantic-cache
|
|
@@ -204,9 +205,10 @@ The graph backs two recommendation paths:
|
|
| 204 |
extracted wiki has the skill index JSON but no graph nodes for
|
| 205 |
those records, the same recommender falls back to the index file.
|
| 206 |
- Harness recommendations are a separate path for custom/API/local
|
| 207 |
-
model onboarding (`ctx-init --model-mode custom ...`)
|
| 208 |
-
`ctx-harness-install`
|
| 209 |
-
|
|
|
|
| 210 |
- Repository scans still start from stack detections, then turn that profile
|
| 211 |
into the same tag/query bundle used by the execution recommender. If a
|
| 212 |
shipped graph is unavailable, scan output falls back to the legacy installed
|
|
|
|
| 189 |
|
| 190 |
### Via recommendation paths
|
| 191 |
|
| 192 |
+
The graph backs these recommendation paths:
|
| 193 |
|
| 194 |
- Execution recommendation surfaces (`ctx.recommend_bundle`, MCP
|
| 195 |
+
`ctx__recommend_bundle`, generic harness tools, LoopFlow/agent-loop
|
| 196 |
+
adapter capability recommendations, Claude Code hook suggestions, and
|
| 197 |
+
repo-scan advisory output) share
|
| 198 |
`ctx.core.resolve.recommendations.recommend_by_tags` for skills,
|
| 199 |
agents, and MCP servers. That engine ranks candidates by
|
| 200 |
slug-token matches, tag overlap, graph degree, and semantic-cache
|
|
|
|
| 205 |
extracted wiki has the skill index JSON but no graph nodes for
|
| 206 |
those records, the same recommender falls back to the index file.
|
| 207 |
- Harness recommendations are a separate path for custom/API/local
|
| 208 |
+
model onboarding (`ctx-init --model-mode custom ...`),
|
| 209 |
+
`ctx-harness-install`, and LoopFlow/agent-loop adapter calls that declare a
|
| 210 |
+
user-owned/API/local model. They use the same graph filtered to `harness`
|
| 211 |
+
nodes and the higher harness match floor from `config.json`.
|
| 212 |
- Repository scans still start from stack detections, then turn that profile
|
| 213 |
into the same tag/query bundle used by the execution recommender. If a
|
| 214 |
shipped graph is unavailable, scan output falls back to the legacy installed
|
docs/qa/feature-user-story-status.csv
CHANGED
|
@@ -47,6 +47,7 @@ CLI-045,CLI,Backup mirror CLI,"python -m backup_mirror create, snapshot-if-chang
|
|
| 47 |
CLI-046,CLI,Generic harness planner evaluator and contract modes,"ctx run --planner, ctx run --evaluator, ctx run --contract","src/ctx/cli/run.py, src/tests/test_harness_planner.py, src/tests/test_harness_evaluator.py, src/tests/test_harness_contract.py",As a model-agnostic harness user I can run planning evaluation and contract review modes,ctx.cli.run exposes --planner --evaluator and --contract modes while preserving session and runtime semantics,Provider fixture or local test provider available,"python -m pytest src/tests/test_harness_planner.py src/tests/test_harness_evaluator.py src/tests/test_harness_contract.py -q",Tested Pass,harness planner evaluator and contract tests cover CLI parser runtime dispatch and persisted outputs.,,,,,2026-06-29,Split from broad CLI-001 so deep ctx.cli.run modes are explicit.
|
| 48 |
CLI-047,CLI,Resume MCP restoration safety,ctx resume --restore-session-mcp and credential_env,src/ctx/cli/run.py and src/tests/test_harness_cli_run.py,As a returning harness user I can resume without restoring executable MCP metadata unless I opt in,ctx resume skips recorded MCP command and env metadata by default and restores credential_env only with explicit --restore-session-mcp,Recorded session fixture,python -m pytest src/tests/test_harness_cli_run.py -q,Tested Pass,test_harness_cli_run.py covers default skip restore opt-in and credential_env behavior.,,,,,2026-06-29,Tracks resume security semantics inside broad CLI-001.
|
| 49 |
CLI-048,CLI,Harness update and uninstall controls,ctx-harness-install --update and ctx-harness-install --uninstall,src/harness_install.py and src/tests/test_harness_install.py,As a harness user I can dry-run update or uninstall an installed harness safely,Update and uninstall flows detect installed harness state show planned changes and avoid destructive surprises,Installed harness fixture,python -m pytest src/tests/test_harness_install.py -q,Tested Pass,test_harness_install.py covers update dry-run uninstall safety and missing-record behavior.,,,,,2026-06-29,Split from CLI-026 so install recommend update and uninstall semantics are separately tracked.
|
|
|
|
| 50 |
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.
|
| 51 |
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.
|
| 52 |
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-06-29,Added during canonical feature inventory gap pass.
|
|
@@ -106,6 +107,7 @@ DOC-NAV-005,Docs,Entity onboarding page,docs/entity-onboarding.md,mkdocs.yml nav
|
|
| 106 |
DOC-NAV-006,Docs,Dashboard page,docs/dashboard.md,mkdocs.yml nav,As a dashboard user I can understand the local monitor,The page documents dashboard routes data sources and expected monitor workflows,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-29,Added for public MkDocs nav coverage enforcement.
|
| 107 |
DOC-NAV-007,Docs,Telemetry page,docs/telemetry.md,mkdocs.yml nav,As an enterprise operator I can configure telemetry safely,The page documents OpenTelemetry configuration exporters privacy defaults and operational checks,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-29,Added for public MkDocs nav coverage enforcement.
|
| 108 |
DOC-NAV-008,Docs,Harness host attachment page,docs/harness/attaching-to-hosts.md,mkdocs.yml nav,As a harness integrator I can attach ctx to supported hosts,The page describes host attachment expectations and verification steps for harness adoption,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-29,Added for public MkDocs nav coverage enforcement.
|
|
|
|
| 109 |
DOC-NAV-009,Docs,Clean-host contract page,docs/harness/clean-host-contract.md,mkdocs.yml nav,As a release reviewer I can understand the clean host contract,The page documents clean environment install checks and what must pass for release confidence,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-29,Added for public MkDocs nav coverage enforcement.
|
| 110 |
DOC-NAV-010,Docs,Toolbox overview page,docs/toolbox/index.md,mkdocs.yml nav,As a toolbox user I can understand toolbox capabilities,The page introduces toolbox configuration council execution hooks and related workflows,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-29,Added for public MkDocs nav coverage enforcement.
|
| 111 |
DOC-NAV-011,Docs,Toolbox configuration page,docs/toolbox/configuration.md,mkdocs.yml nav,As a toolbox user I can configure ctx toolboxes,The page documents configuration files fields and expected toolbox behavior,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-29,Added for public MkDocs nav coverage enforcement.
|
|
|
|
| 47 |
CLI-046,CLI,Generic harness planner evaluator and contract modes,"ctx run --planner, ctx run --evaluator, ctx run --contract","src/ctx/cli/run.py, src/tests/test_harness_planner.py, src/tests/test_harness_evaluator.py, src/tests/test_harness_contract.py",As a model-agnostic harness user I can run planning evaluation and contract review modes,ctx.cli.run exposes --planner --evaluator and --contract modes while preserving session and runtime semantics,Provider fixture or local test provider available,"python -m pytest src/tests/test_harness_planner.py src/tests/test_harness_evaluator.py src/tests/test_harness_contract.py -q",Tested Pass,harness planner evaluator and contract tests cover CLI parser runtime dispatch and persisted outputs.,,,,,2026-06-29,Split from broad CLI-001 so deep ctx.cli.run modes are explicit.
|
| 48 |
CLI-047,CLI,Resume MCP restoration safety,ctx resume --restore-session-mcp and credential_env,src/ctx/cli/run.py and src/tests/test_harness_cli_run.py,As a returning harness user I can resume without restoring executable MCP metadata unless I opt in,ctx resume skips recorded MCP command and env metadata by default and restores credential_env only with explicit --restore-session-mcp,Recorded session fixture,python -m pytest src/tests/test_harness_cli_run.py -q,Tested Pass,test_harness_cli_run.py covers default skip restore opt-in and credential_env behavior.,,,,,2026-06-29,Tracks resume security semantics inside broad CLI-001.
|
| 49 |
CLI-048,CLI,Harness update and uninstall controls,ctx-harness-install --update and ctx-harness-install --uninstall,src/harness_install.py and src/tests/test_harness_install.py,As a harness user I can dry-run update or uninstall an installed harness safely,Update and uninstall flows detect installed harness state show planned changes and avoid destructive surprises,Installed harness fixture,python -m pytest src/tests/test_harness_install.py -q,Tested Pass,test_harness_install.py covers update dry-run uninstall safety and missing-record behavior.,,,,,2026-06-29,Split from CLI-026 so install recommend update and uninstall semantics are separately tracked.
|
| 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-06-29,Added during canonical feature inventory gap pass.
|
|
|
|
| 107 |
DOC-NAV-006,Docs,Dashboard page,docs/dashboard.md,mkdocs.yml nav,As a dashboard user I can understand the local monitor,The page documents dashboard routes data sources and expected monitor workflows,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-29,Added for public MkDocs nav coverage enforcement.
|
| 108 |
DOC-NAV-007,Docs,Telemetry page,docs/telemetry.md,mkdocs.yml nav,As an enterprise operator I can configure telemetry safely,The page documents OpenTelemetry configuration exporters privacy defaults and operational checks,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-29,Added for public MkDocs nav coverage enforcement.
|
| 109 |
DOC-NAV-008,Docs,Harness host attachment page,docs/harness/attaching-to-hosts.md,mkdocs.yml nav,As a harness integrator I can attach ctx to supported hosts,The page describes host attachment expectations and verification steps for harness adoption,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-29,Added for public MkDocs nav coverage enforcement.
|
| 110 |
+
DOC-NAV-027,Docs,LoopFlow adapter demo page,docs/harness/loopflow-adapter-demo.md,mkdocs.yml nav,As a LoopFlow integrator I can follow a presenter-ready adapter demo,The page documents permissioned adapter setup JSON output and safe host consumption,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-30,Added for public MkDocs nav coverage enforcement.
|
| 111 |
DOC-NAV-009,Docs,Clean-host contract page,docs/harness/clean-host-contract.md,mkdocs.yml nav,As a release reviewer I can understand the clean host contract,The page documents clean environment install checks and what must pass for release confidence,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-29,Added for public MkDocs nav coverage enforcement.
|
| 112 |
DOC-NAV-010,Docs,Toolbox overview page,docs/toolbox/index.md,mkdocs.yml nav,As a toolbox user I can understand toolbox capabilities,The page introduces toolbox configuration council execution hooks and related workflows,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-29,Added for public MkDocs nav coverage enforcement.
|
| 113 |
DOC-NAV-011,Docs,Toolbox configuration page,docs/toolbox/configuration.md,mkdocs.yml nav,As a toolbox user I can configure ctx toolboxes,The page documents configuration files fields and expected toolbox behavior,Docs build environment available,python -m mkdocs build --strict --quiet plus tracker nav coverage test,Tested Pass,python -m mkdocs build --strict --quiet passed; tracker nav coverage test passed.,,,,,2026-06-29,Added for public MkDocs nav coverage enforcement.
|
docs/skill-router/index.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
|
| 3 |
The skill router decides which skills, agents, and MCP servers are useful for
|
| 4 |
the active repository and current development task. Harnesses are recommended in
|
| 5 |
-
the custom-model onboarding flow; after a harness is attached,
|
| 6 |
-
skills/agents/MCP recommendation layer can be used by that host.
|
| 7 |
|
| 8 |
## Problem
|
| 9 |
|
|
@@ -23,7 +23,7 @@ ctx/
|
|
| 23 |
|-- src/scan_repo.py # Repo scanner -> stack profile
|
| 24 |
|-- src/ctx/core/resolve/resolve_skills.py # Profile -> load/unload manifest
|
| 25 |
|-- src/ctx/core/resolve/recommendations.py # Shared recommendation engine
|
| 26 |
-
|-- src/ctx/adapters/ #
|
| 27 |
`-- graph/wiki-graph-runtime.tar.gz # Shipped graph/wiki runtime
|
| 28 |
```
|
| 29 |
|
|
@@ -37,8 +37,8 @@ ctx/
|
|
| 37 |
5. Usage and quality signals are recorded so future recommendations improve.
|
| 38 |
|
| 39 |
The same recommender is used by the CLI, MCP/library tools, Claude Code hooks,
|
| 40 |
-
and attached harness hosts. Entry points should
|
| 41 |
-
confirmation UX, not in ranking logic.
|
| 42 |
|
| 43 |
## Reference Pages
|
| 44 |
|
|
|
|
| 2 |
|
| 3 |
The skill router decides which skills, agents, and MCP servers are useful for
|
| 4 |
the active repository and current development task. Harnesses are recommended in
|
| 5 |
+
the custom-model onboarding flow or loop adapters; after a harness is attached,
|
| 6 |
+
the same capped skills/agents/MCP recommendation layer can be used by that host.
|
| 7 |
|
| 8 |
## Problem
|
| 9 |
|
|
|
|
| 23 |
|-- src/scan_repo.py # Repo scanner -> stack profile
|
| 24 |
|-- src/ctx/core/resolve/resolve_skills.py # Profile -> load/unload manifest
|
| 25 |
|-- src/ctx/core/resolve/recommendations.py # Shared recommendation engine
|
| 26 |
+
|-- src/ctx/adapters/ # Host adapters + generic tools
|
| 27 |
`-- graph/wiki-graph-runtime.tar.gz # Shipped graph/wiki runtime
|
| 28 |
```
|
| 29 |
|
|
|
|
| 37 |
5. Usage and quality signals are recorded so future recommendations improve.
|
| 38 |
|
| 39 |
The same recommender is used by the CLI, MCP/library tools, Claude Code hooks,
|
| 40 |
+
LoopFlow/agent-loop adapter, and attached harness hosts. Entry points should
|
| 41 |
+
differ only in transport and confirmation UX, not in ranking logic.
|
| 42 |
|
| 43 |
## Reference Pages
|
| 44 |
|
graph/README.md
CHANGED
|
@@ -15,10 +15,11 @@ Current snapshot:
|
|
| 15 |
- Long skill bodies are kept behind the configured micro-skill line gate; the
|
| 16 |
shipped tarball excludes raw `SKILL.md.original` backups.
|
| 17 |
|
| 18 |
-
The runtime recommendation paths use this graph in
|
| 19 |
|
| 20 |
- Development recommendations return skills, agents, and MCP servers only.
|
| 21 |
-
- Custom/API/local model onboarding
|
|
|
|
| 22 |
|
| 23 |
## Files
|
| 24 |
|
|
|
|
| 15 |
- Long skill bodies are kept behind the configured micro-skill line gate; the
|
| 16 |
shipped tarball excludes raw `SKILL.md.original` backups.
|
| 17 |
|
| 18 |
+
The runtime recommendation paths use this graph in these ways:
|
| 19 |
|
| 20 |
- Development recommendations return skills, agents, and MCP servers only.
|
| 21 |
+
- Custom/API/local model onboarding and LoopFlow/agent-loop adapter calls
|
| 22 |
+
recommend harnesses using the higher harness fit floor in `src/config.json`.
|
| 23 |
|
| 24 |
## Files
|
| 25 |
|