Add the structure-change map and structure-changer agent #1107
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#1107
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
No map fits a structure-only ticket (rename, move, split).
Such tickets run on
poodr-ticket-implementation, which asks for a red round, or bypass the pipeline by hand.Runs 58 and 60 are the recurring misfit for which map-router drafts maps.
Reproduce
n/a: new map; nothing exists to reproduce.
Approach
Add
plugins/os-sdlc/maps/structure-change.yaml:requires_category: structure, entries[structure-changer], and afits:sentence so map-router can pick it on a reroute.The map has one node:
agent: structure-changer,verdict.source: gate, gates[required-work, lint, test-lint, suite, unchanged].Decision (retired tests): the map sets
ticket_shape: true, soretire_test_files!inlib/os_sdlc/implementation/open.rbdeletes the tests listed under## Retired testsat open, and theunchangedgate subtracts the same list. The structure-changer never deletes listed tests. A structure ticket therefore carries Approach, Acceptance criteria and Owner sketch sections.Edges:
passtomerge-ready;failto a self-loop with bound 2;escalate;error.Add
plugins/os-sdlc/agents/structure-changer.md(model sonnet). It copies the wave 4 and wave 5 steps ofskills/crc-refactor/references/prompts/implementation.mdword for word, without the ledger columns:issue-show. Confirm that every old path and constant exists and every new one does not. Otherwise escalatestale_ticket.git mvthe file and rename the constant with ast-grep throughos-sdlc:code-write. Grep for the old paths, including.rubocop.ymlExcludeglobs.os-sdlc-gate DISPATCH_IDuntil it is green. The agent gets two repair attempts.In
skills/implement/SKILL.mdline 55 (a prose rule; no lib code resolves it), state: MAP is themapargument when given, elsestructure-changewhen the ticket has labelcategory/structure, elsepoodr-ticket-implementation. Addstructure-changeto the allowed values.implementation-openalready refuses a category mismatch (check_category!), so a wrong label fails loudly.Required work:
requires_category: structureinplugins/os-sdlc/maps/structure-change.yamlstale_ticketinplugins/os-sdlc/agents/structure-changer.mdstructure-changeinplugins/os-sdlc/skills/implement/SKILL.mdticket_shape: trueinplugins/os-sdlc/maps/structure-change.yamlbound: 2inplugins/os-sdlc/maps/structure-change.yamlunchangedinplugins/os-sdlc/maps/structure-change.yamlos-sdlc-gateinplugins/os-sdlc/agents/structure-changer.mdAcceptance criteria
category/structure, when/os-sdlc:implementruns without amapargument, then the run opens onstructure-change.category/code-change, whenos-sdlc-implementation-openruns withstructure-change, then it refuses the run.stale_ticket.merge-ready.## Retired testssection, when the run starts, then the listed tests are retired as the recorded decision says.Owner sketch
Blocking edges
Blocked by #1105 (category/structure and the categorize gate) and by #1106 (the unchanged gate).
Origin
VERDICT: CREATE
Work started on branch ticket-1107 via /os-sdlc:implement. Blockers #1105 and #1106 are closed.
Run 67 escalated at change-auditor: the ticket deferred the retired-tests decision and AC2-AC5 had no checks. Decision recorded as ticket_shape: true on the map. Required work 4-7 added. Rerouting.
Resolution
Done: maps/structure-change.yaml: one structure-changer node, requires_category structure, ticket_shape true, gates [required-work, lint, test-lint, suite, unchanged], fail self-loop bound 2, fits sentence for map-router. agents/structure-changer.md (sonnet): stale_ticket precheck, git mv plus ast-grep rename through code-write, rubocop Exclude glob check, mirrored test move, two repairs. /os-sdlc:implement defaults MAP to structure-change when the ticket carries category/structure.
Evidence: ticket-1107 branch: Runner commit (map + open_structure_change_test + structure_change_routing_test) plus hand commit for the agent and SKILL.md; run 67: 14 dispatches, 2 retries, 12 min 1 s; suite 2115 runs green on re-run (first run tripped the 47s budget at 49.1s, load 1.4); contract-auditor pass.
Follow-ups: Batch intake (several structure tickets per run) and CRC-loop retirement wait on Jared's rulings 2 and 3 (predicted: splits are structure; one route). Runner commit omitted files not in the handoff items; captured this session. Suite wall-time budget 47s is at its edge after #1104 (49.1s then 34.2s); not filed, watch.