Make handoff items machine-readable and remove Item::TAG #924
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#924
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
Jared ruled on closed ticket #906 on 2026-10-03 and called the shipped approach "flimsy".
Handoff
itemsentries are YAML strings that hold several fields as prose, andCommit::Itemreads a path out of that prose with a regex.The handoff container is already YAML; the defect is that one string holds several fields.
Jared's rule: the default is a machine-readable format (YAML or JSON, by context). Use prose only when a human reads it, or when prose serves an AI consumer better than a structured format.
He suspects YAML fits the template that the refactorer gets, and that structured items make the parsing, the object creation, and the actions clearer. A machine-readable format hardens the connection between the agent and the codebase.
This ticket needs a design ruling from Jared.
Observed
plugins/os-sdlc/lib/os_sdlc/parser/implementation/commit/item.rb:7definesTAG = /\A[a-z_]+:\s*/, and line 23 strips it:@entry.strip.sub(TAG, "").split(/\s/).first.to_s.gsub(DECORATION, "").Before #906 (commit
04fbc824) the refactorer wrote items asCHANGE: <path> :: <prose>.Judge agents write tagged items:
plugins/os-sdlc/agents/test-reviewer.md:33TEST: <path> :: <test name>., andcontract-auditor.md:30andbehavior-verifier.md:27("a list mixing these prefixes").#906 changed only
plugins/os-sdlc/agents/refactorer.md:46to plain paths ("one plain repository-relative path per entry, with no tag").The parser kept the lowercase
TAG.plugins/os-sdlc/tests/command/implementation/commit_test.rb:163still pinsitems: ["modified: lib/widget.rb -- extracted the row reader"]; the #906 prediction says no agent writes that format.plugins/os-sdlc/tests/parser/implementation/commit/item_test.rb:14checks paths withpath.match?(%r{\A[\w-]+(/[\w.-]+)*\.\w+\z}).Reproduce
n/a: design ticket; the format gap is visible by reading the files above.
Approach
Decide the item structure for every agent handoff template, then change parser, templates, and tests together.
pathand a kind or note field) and name which agents keep prose items because a human or AI reads them.Item::TAGand themodified:test atcommit_test.rb:163.os-adr:findbefore work starts. No Accepted ADR may be reversed silently.item_test.rb:14checks paths with a regex. DoesPathnameor a simpler assertion fit?Pathname.new("CHANGE:")is also a valid Pathname, soPathnamealone cannot reject a tag. An equality assertion against the expected paths is one alternative.Required work: none beyond the acceptance criteria.
Acceptance criteria
TAGis absent fromplugins/os-sdlc/lib/os_sdlc/parser/implementation/commit/item.rb.commit_test.rbruns, then no test pinsmodified:.Owner sketch
Origin
04fbc824) ← ADR-0171 decision 2 chose prose-shaped items parsed strictly (DESIGN: docs/adr/0171)VERDICT: CREATE
Ruling from Jared, 2026-10-03 (session a0dbd5c4): he scored the shipped #906 approach as "disagree". It improved on the original but did not challenge the problem deeply enough. The correct direction for this ticket: each field of a handoff item has a key, and no regex reads a path. The test compares the parsed paths with the expected list (an equality assertion). With structured items, the test needs no path validation. Jared: "This solution improves the code's resilience while simplifying it and making it more readable."