Replace os-me HeadlessClaude with a chat-backed decide adapter #1471
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1471
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
OsMe::HeadlessClaudeis a decision-model adapter that builds its own prompt, JSON schema, andRawReply.It runs through
OsMe::HeadlessRunner, which already callsLLM.chatonllm-stack(claude_codeprovider).OsMe::HeadlessResultis glue that turns the chat reply intoDecision::Model::Usageand raisesDecision::Model::ResponseError.cc-os
docs/llm-stack/spec.mdstep 5 says to replaceheadless_claude.rbwith a chat-backed decide adapter.Today os-me keeps decision-model reply logic that belongs in decision-model.
Blocked by: jared/decision-model#11
Approach
Depends on the decision-model ticket "Move decision-model transport onto llm-stack", which adds a chat-backed adapter to decision-model. UNKNOWN: its class name and keywords, set by the decision-model ADR. The sketch below uses
Decision::Model::Adapters::Chat.Relationship to #1286 (open, "Switch os-me decision-model callers to Jev as the default adapter"):
CloudflareJev. It keepsHeadlessClaudeas a comparison adapter.plugins/os-me/lib/os_me/row_labels.rb(RowLabels.build). The ticket that lands second rebases.HeadlessClaude.Scope:
headless_claude.rb,headless_result.rb, and the wiring inlabeler_client.rbandrow_labels.rb.UNKNOWN: whether
headless_runner.rbstays.decision_moment.rb,moment_extractor.rb, andverdict_readback.rbalso mentionHeadlessClaudeorHeadlessResult. Read each before you delete.Required work:
HeadlessClaudeclass — absentclass HeadlessClaudeinplugins/os-me/lib/os_me/*.rbHeadlessResultstruct — absentHeadlessResultinplugins/os-me/lib/os_me/*.rbRowLabels.build— presentAdapters::Chatinplugins/os-me/lib/os_me/row_labels.rbdecision-modelinplugins/os-me/Gemfile.lockHeadlessClaudeinplugins/os-me/test/*.rbOrchestrator work: bump the decision-model pin (ADR-0166) once D is released. Run
bin/refresh-plugins.Acceptance criteria
RowLabels.build, when it runs with a fake chat response, then it returns source and wrong-cost labels as before.Decision::Model::ResponseError.RawReplycarries the sameUsagevalues as before.OsMe::HeadlessClaudeorOsMe::HeadlessResult.eval_adapter.rb, when this ticket closes, then it is unchanged.Owner sketch
The adapter class and its keywords come from the decision-model ADR.
Non-goals
plugins/os-me/lib/os_me/eval_adapter.rb. It is eval harness code. It buildsSystemOne.ollama,CloudflareJev, andCloudflareAccount.Wire::QuestionEncoderout of decision-model.Retired tests
plugins/os-me/test/headless_claude_test.rb
Origin
headless_claude.rb.docs/llm-stack/spec.mdstep 5).VERDICT: CREATE
Note from decision-model#11 planning: the llm-stack
claude_codeprofile, used throughLLM::Client, may serve the HeadlessClaude replacement.This ticket covers only the HeadlessClaude part.
The error-class and Gemfile.lock changes that decision-model#11 forces on os-me are in jared/cc-os#1474.
decision-model#11 landed as 962bfe9 on main; decision-model now calls llm-stack
LLM::Client#decidethroughAdapters::Decider.