feat(cli): plan an issue into slices in llmkube foreman slice#1050
Merged
Conversation
Task 6b of the Sliced Workloads epic (defilantech#1033): make llmkube foreman slice hands-off. Given an ISSUE arg plus --repo and --planner-url, it fetches the issue, builds the pinning planner prompt (embedded) with an optional --repomap, calls the OpenAI-compatible planner model, parses the SlicePlan (fence-strip, UNSLICEABLE detection, YAML), and feeds it to the existing render. --plan FILE still short-circuits planning. The CLI overrides the plan's issue/repo header fields, which the planner routinely slips. The planner transport is injected (PlannerCaller) so parsing + HTTP are unit- tested without a live model: parseSlicePlan (bare/fenced/UNSLICEABLE/no-slices), httpPlannerCall via httptest, and resolveSlicePlan's input-mode validation. Part of defilantech#1033 Signed-off-by: Christopher Maher <chris@mahercode.io>
c8c57c9 to
ca05f9a
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
What
Task 6b of the Sliced Workloads epic (#1033): make
llmkube foreman slicehands-off.Given an
ISSUEargument plus--repoand--planner-url, it:--repomap,SlicePlan(strips a code fence, surfacesUNSLICEABLE, unmarshals YAML),--plan FILEstill short-circuits planning (Task 6a). The CLI overrides the plan'sissue/repoheader fields, which the planner routinely slips (seen repeatedly in the experiment).Why
Completes the "CLI plans + renders" design:
llmkube foreman slice 700 --repo ... --planner-url ...now goes from an issue number to an applied sliced Workload in one command, no hand-authored plan.How
The planner transport is injected (
PlannerCaller), so parsing + HTTP are unit-tested without a live model. A one-shotPOST /v1/chat/completions(not the streamingoai.Client, which is built for the agent loop) matches the experiment's curl.Testing
go test ./pkg/cli/—parseSlicePlan(bare / fenced /UNSLICEABLE/ no-slices),httpPlannerCallviahttptest, andresolveSlicePlaninput-mode validation, plus the 6a render tests. Build +golangci-lintclean.Scope / follow-ups
--repomapfile, as in the experiment).--planner-url.Stacked PR
Checklist
go test/golangci-lint/buildcleanPart of #1033
Assisted-by: Claude Code (Opus 4.8); reviewed and verified by the author.