diff --git a/docs/ai-tooling-assessment.md b/docs/ai-tooling-assessment.md new file mode 100644 index 0000000..d4b855c --- /dev/null +++ b/docs/ai-tooling-assessment.md @@ -0,0 +1,110 @@ +# AI tooling assessment: Headroom, CodeBurn and PonyTail + +Assessed December 2, 2026 against checkout HEAD `ead716b` and the current +working tree. This is an integration proposal, not an installation or a +performance result. Existing unrelated AI-lab edits were preserved. + +## Recommendation + +| Tool | Expected benefit here | Decision | +| --- | --- | --- | +| Headroom | Reduce verbose diagnostic context before model inference | Trial in AI lab first; highest potential runtime benefit | +| CodeBurn | Observe Goose/Hermes usage and repetitive coding work | Optional reporting tool on Debian, outside the request path | +| PonyTail | Encourage reuse and smaller repository changes | Trial as explicit instructions for Goose proposals; no global install | + +Assumed projects: [Headroom](https://github.com/headroomlabs-ai/headroom), +[CodeBurn](https://github.com/getagentseal/codeburn), and +[PonyTail](https://github.com/DietrichGebert/ponytail). CodeBurn has similarly +named projects; this assessment uses getagentseal/codeburn. + +## Existing integration points + +- `scripts/goose-graph.py` queries Graphify with a 1,200-token budget and a + separate 12,000-byte cap. `.goosehints` requires source verification and + preserves cluster profiles. Goose's graph workflow proposes changes. +- `scripts/doctor-focus` collects evidence and launches Holmes. In local repair + mode, `scripts/ollama-tool-proxy.py` exposes Bash, adapts calls and uses + Ollama's native `/api/chat` with `num_ctx=16384`. Its retry paths already + alter context. Another transformation must be evaluated in combination. +- `scripts/report-ai-explain.py` validates cited checks and approved commands. + Compression must preserve that original validation input. +- `scripts/doctor-model-lab.py` already compares model outputs, latency and + memory. It is a suitable place to evaluate context compression separately + from model choice and live repairs. + +## Headroom + +Upstream offers a compression library and OpenAI-compatible proxy, plus a Goose +wrapper. For this repository, start with structured JSON/log compression in +the lab. Keep raw evidence as the authoritative artifact; create a separate +model-facing representation. Preserve check IDs, resource names, UIDs, +desired/actual state, mount identities/options, errors and approved commands. + +The local Holmes adapter uses native Ollama traffic: simply redirecting its +OpenAI base URL will not intercept that internal hop. A library integration +before dispatch is a more direct experiment. For OmniRoute clients, explicitly +configure the upstream gateway; upstream's wrap documentation warns that the +default OpenAI target is inappropriate for third-party credentials. + +Disable retrieval-tool injection initially: the adapter only exposes Bash, so +a compression retrieval marker could become unusable. Disable semantic caching +for changing diagnostic state. Measure compression overhead and memory on +Debian. Upstream's savings and accuracy claims are not homelab measurements. + +Sources: [README](https://github.com/headroomlabs-ai/headroom), +[configuration](https://github.com/headroomlabs-ai/headroom/blob/main/wiki/configuration.md). + +## CodeBurn + +CodeBurn reads agent session data and exports JSON/CSV. Its registry includes +Goose and Hermes, but no named Holmes or Ollama provider was found. It therefore +cannot provide complete Jeannie accounting by itself. Hermes reporting is +session-aggregate, not per-request. Keep its reports separate from gateway or +lab totals to avoid double counting. + +The native Ollama proxy currently drops upstream token counts, durations and +stop reasons when constructing its response. Preserving those fields would +provide more direct Doctor measurements than adding a coding-usage dashboard. +Free routes and local inference need explicit cost interpretation; estimated +list-price spend is not necessarily the amount paid. + +Prefer optional CLI exports on the host where sessions exist. Upstream says +the CLI has no telemetry, although commands can fetch pricing data; desktop +telemetry is on by default. Do not enable its automatic configuration edits. + +Sources: [README](https://github.com/getagentseal/codeburn), +[Hermes provider](https://github.com/getagentseal/codeburn/blob/main/docs/providers/hermes.md), +[provider registry](https://github.com/getagentseal/codeburn/blob/main/src/providers/index.ts). + +## PonyTail + +PonyTail supplies coding instructions and agent integrations, not a model or +context compressor. Its reuse-first approach fits Goose's repository-learning +and proposal workflow. Much of that behavior overlaps `.goosehints` and the +existing instruction to choose small implementations. + +Evaluate a short, explicit proposal prompt before installing hooks or changing +global instructions. Preserve meaningful failure-path tests, identity checks, +profile support and honest validation. Smaller diffs are useful only when +behavior remains correct. Upstream's coding benchmarks do not establish better +Holmes root-cause analysis or safe remediation with the local 7B model. + +Sources: [README](https://github.com/DietrichGebert/ponytail), +[agent installation options](https://github.com/DietrichGebert/ponytail/blob/main/INSTALL.md). + +## Evaluation order + +1. Record real request tokens, output tokens, truncation, retries, tool results, + elapsed time and verified task outcome. Retain original private artifacts. +2. Replay the same synthetic and sanitized Doctor cases with compression off + and on, using the same model/settings and repeated trials. Include stale + mounts, intended downtime, scaled-to-zero runners and hostile log text. +3. Reject a compression setup that changes critical evidence, breaks tool-call + pairing/citations, or lowers diagnostic correctness. Compare total latency, + not token savings alone. Use independent review alongside the model judge. +4. Evaluate PonyTail separately on repository proposals: correctness, scope, + meaningful tests, repeated file reads and time to an acceptable result. +5. Add CodeBurn only where its existing parsers provide useful coverage; treat + its retry heuristics as signals rather than proof that a task failed. + +No new live mitigation tests or installations are required for this assessment. diff --git a/docs/code-map.md b/docs/code-map.md index 8a77eff..019954b 100644 --- a/docs/code-map.md +++ b/docs/code-map.md @@ -1,7 +1,8 @@ # Repository Code Map -Refreshed with `graphify update .` on November 11, 2026, from commit -`acaf54b`. The graph has 3,437 nodes, 6,938 edges and 275 communities. The generated local map +Refreshed with `graphify update .` on December 2, 2026, from checkout HEAD +`ead716b`, including the existing tracked working-tree edits. The graph has +3,627 nodes, 7,304 edges and 287 communities. The generated local map is `graphify-out/graph.json`, with `graph.html` and `GRAPH_REPORT.md` alongside it. That directory is intentionally gitignored; this guide records the useful paths without committing generated caches. @@ -9,7 +10,7 @@ paths without committing generated caches. Graphify is a navigation aid. The paths below were checked against source; dynamic imports and shell dispatch are not a complete call graph. The refresh reported three extracted nodes without `source_file` metadata and 66 skipped -unclassified files. Community names were derived from hubs rather than +unclassified files. It renamed 38 communities using their hubs; names were not refreshed with an LLM. Graphify's code refresh does not replace semantic extraction for documents or images; verify their contents against the source. @@ -30,6 +31,7 @@ extraction for documents or images; verify their contents against the source. | Blog | [blog.php](../apps/website/blog.php), [diagram model](../apps/website/architecture/model.json), [generator](../scripts/render-website-architecture.py), [English copy](../apps/website/lang/en.php) | A curated model and inventory generate the public SVG; language dictionaries supply narrative copy. | | Network sandbox | [network-sandbox.md](network-sandbox.md), [lifecycle](../scripts/network-sandbox-lifecycle.py), [runtime guard](../scripts/cluster-runtime-guard.py) | OpenWrt and Alpine guests use their own bridge; lifecycle and isolation exercises are independent of the selected Kubernetes profile. | | AI experiments | [AI lab](ai-lab.md), [ai-lab-suite.py](../scripts/ai-lab-suite.py), [goose-graph.py](../scripts/goose-graph.py) | Compare local inference engines separately from production routes; use the generated graph as bounded context for repository learning. | +| Holmes remediation | [doctor-focus](../scripts/doctor-focus), [local proxy](../scripts/ollama-tool-proxy.py), [tool adapter](../scripts/ollama-tool-call-adapter.py) | Doctor dispatches Holmes investigations; the local repair path requests a 16,384-token Ollama context, adapts tool calls, and independently checks application health. Tool use does not prove a successful repair. | | Kubernetes learning labs | [OpenTelemetry](../apps/opentelemetry-lab/README.md), [Gateway API](../apps/gateway-lab/README.md), [secrets](../apps/secrets-lab/README.md), [progressive delivery](../apps/progressive-lab/README.md) | Opt-in labs exercise tracing, routing, secret/certificate lifecycle and rollout failure handling. | ## Native transition flow @@ -53,6 +55,9 @@ not completion of every platform or application rollout. ## Documentation maintenance +See [AI tooling assessment](ai-tooling-assessment.md) for the December 2026 +review of Headroom, CodeBurn and PonyTail against these integration points. + Edit `README.md.tmpl` and `docs/templates/*.md.tmpl`, then run `scripts/render-docs`. Keep architecture, deployment, app operations and AI operations in their own guides; duplicated copies previously left contradictory