feat(consolidation): cache-segment planner; curator+toolset CLI; docs - #242
Merged
Conversation
Completes the A (cache planning) and C (consolidation) items from the cocoindex/hermes adoption queue. Cache-segment planner (internal/engine/cache_planner.go): - planCache segments the stable prefix (system prompt, tool catalog), emits one breakpoint per segment, and applies measured break-even economics (Anthropic 5m: write=1.25x, read=0.1x; caching pays off for reuse >= 2). Returns a structured CachePlan with costs and saving so hosts can log/observe the decision. - Fixes an economics bug vs the old gate's arithmetic: read cost is 0.1x per reused turn (the old comment conflated the discount with the cost). cacheDecision now delegates to planCache at default reuse; behavior is preserved for existing tests (non-anthropic off, small prefix off, large prefix on). - Empty tool catalogs no longer create a phantom 'tools' segment from json.Marshal(nil). Consolidation CLI surfaces: - hawk skills curator [status|run|pin|unpin|archive]: exposes the Hermes- style background skill curator as an explicit CLI (ForceReview bypasses the inactivity interval for on-demand runs). - hawk toolset [name]: lists or resolves named composable tool groups. Docs: - New 'Adopted Capabilities' README table mapping every env-gated feature/flag/command added across the adoption series so they are discoverable in one place. Verification: new planner tests (6) green; engine/cmd/skillcurator/ toolset suites pass incl. updated golden help; golangci-lint 0 issues; gofmt clean; go build ./... clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the A (cache planning) and C (consolidation) items from the adoption queue.
Cache-segment planner —
internal/engine/cache_planner.goplanCachesegments the stable prefix (system prompt + tool catalog), emits one breakpoint per segment, and applies measured break-even economics (Anthropic 5m: write=1.25x, read=0.1x → caching pays off for reuse ≥ 2)CachePlan(segments, breakpoints, write bytes, costs, saving) so hosts can log/observe decisionsjson.Marshal(nil)cacheDecisionnow delegates toplanCacheat default reuse; existing behavior preservedConsolidation CLI surfaces
hawk skills curator [status|run|pin|unpin|archive]— exposes the Hermes-style background skill curator as an explicit CLI (ForceReviewbypasses the inactivity interval for on-demand runs)hawk toolset [name]— lists or resolves named composable tool groupsDocs
Testing