Add the takedown-implement map and make takedown designs emit complete code #972

Closed
opened 2026-10-09 17:30:53 +00:00 by jared · 6 comments
Owner

Problem

A takedown design ends at a failing test plus a sketch, so implementation must run the front half of poodr-ticket-implementation again (change-auditor, seam-designer, test-writer, programmer). Past implement failures were mostly in that front half. The owner ruled on 2026-10-09 (handoff docs/handoffs/2026-10-09-takedown-implement-path.md, rulings 1, 2, 3, 7) that the design holds complete code and that a new map places it.

Reproduce

n/a: design and feature ticket.

Approach

Handoff build-order steps 2 to 5. Ruling 1: design.json holds failing_tests: [{path, content}], code_files: [{path, content}] (whole files) and deleted_files. Ruling 2: reuse the existing os-sdlc-gate gates; build no gate-check command. Ruling 3: map selection only; poodr-ticket-implementation stays the default. Ruling 7: the map is data and needs no ADR; one ADR amends ADR-0276 §5 and §9.

Required work:

  1. Add plugins/os-sdlc/maps/takedown-implement.yaml with nodes place-tests, place-code, programmer-repair, behavior-verifier, suite-check, contract-auditor, refactorer, as in the handoff table — check: present place-tests in plugins/os-sdlc/maps/takedown-implement.yaml
  2. Add an optional map argument to plugins/os-sdlc/skills/implement/SKILL.md; the default stays poodr-ticket-implementation.
  3. Change the design schema and cards (design.json, revision.json, blind-designer.md, blind-designer-apply.md, reviser.md, skills/ticket-takedown/references/design-template.md) to emit complete code.
  4. Delete the harness --implement mode (Flow#implement, red_check_step.rb, green_check_step.rb, model/test_batch.rb, adapter/changed_tests.rb, cards/implementer.md, schemas/implement.json, StepProfile.implementation) — check: absent StepProfile.implementation in plugins/os-sdlc/eval/ticket-takedown/**/*.rb
  5. Resolve the design-time red-check question: keep one classifier only (the os-sdlc gate code), never two.
  6. Takedown section 4: a Ruby presenter writes the ticket body from final-design.json (## Approach with Required work:, ## Acceptance criteria, ## Owner sketch); the skill calls implement with takedown-implement.
  7. place-code fails loudly when a file differs from the design's base.

Orchestrator work: record one ADR that amends ADR-0276 §5 and §9, through /os-adr:create. Prove the map on one small code-change ticket with a hand-written final-design.json (tracer) before steps 3 to 6.

Acceptance criteria

  1. Given /os-sdlc:implement with no map argument, when it opens a ticket, then it uses poodr-ticket-implementation.
  2. Given /os-sdlc:implement with the argument takedown-implement, when it opens a ticket, then the first node is place-tests.
  3. Given a design with failing_tests and code_files, when place-tests and place-code run, then the tests are red first and green after, with the design tests unmodified.
  4. Given a file whose content differs from the design's base, when place-code runs, then it fails with a message that names the file.
  5. Given the takedown harness, when it runs, then no --implement mode exists.

Owner sketch

class Takedown::Presenter::TicketBody
  def render(final_design)
end

Non-goals

Live grading (separate ticket). Ticket categories (separate ticket). Trial runs (separate ticket).

Origin

  • Trigger: Owner rulings of 2026-10-09 recorded in docs/handoffs/2026-10-09-takedown-implement-path.md.
  • Improvised this session: none
  • Chain: takedown design ends at a sketch ← ADR-0276 §5 and §9 (DESIGN, docs/adr/0276-ticket-takedown-runs-one-pipeline-the-eval-harness-flow-is-the-production-pipeline-live-mode.md)
  • Root candidate: none
  • Where: plugins/os-sdlc/eval/ticket-takedown/, plugins/os-sdlc/maps/, plugins/os-sdlc/skills/implement/SKILL.md
  • Session: 58499175-8e67-4b3a-8cfe-ed601216e8da
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-prism-architect/58499175-8e67-4b3a-8cfe-ed601216e8da.jsonl

VERDICT: CREATE

## Problem A takedown design ends at a failing test plus a sketch, so implementation must run the front half of `poodr-ticket-implementation` again (change-auditor, seam-designer, test-writer, programmer). Past implement failures were mostly in that front half. The owner ruled on 2026-10-09 (handoff `docs/handoffs/2026-10-09-takedown-implement-path.md`, rulings 1, 2, 3, 7) that the design holds complete code and that a new map places it. ## Reproduce n/a: design and feature ticket. ## Approach Handoff build-order steps 2 to 5. Ruling 1: `design.json` holds `failing_tests: [{path, content}]`, `code_files: [{path, content}]` (whole files) and `deleted_files`. Ruling 2: reuse the existing `os-sdlc-gate` gates; build no gate-check command. Ruling 3: map selection only; `poodr-ticket-implementation` stays the default. Ruling 7: the map is data and needs no ADR; one ADR amends ADR-0276 §5 and §9. Required work: 1. Add `plugins/os-sdlc/maps/takedown-implement.yaml` with nodes place-tests, place-code, programmer-repair, behavior-verifier, suite-check, contract-auditor, refactorer, as in the handoff table — check: present `place-tests` in `plugins/os-sdlc/maps/takedown-implement.yaml` 2. Add an optional map argument to `plugins/os-sdlc/skills/implement/SKILL.md`; the default stays `poodr-ticket-implementation`. 3. Change the design schema and cards (`design.json`, `revision.json`, `blind-designer.md`, `blind-designer-apply.md`, `reviser.md`, `skills/ticket-takedown/references/design-template.md`) to emit complete code. 4. Delete the harness `--implement` mode (`Flow#implement`, `red_check_step.rb`, `green_check_step.rb`, `model/test_batch.rb`, `adapter/changed_tests.rb`, `cards/implementer.md`, `schemas/implement.json`, `StepProfile.implementation`) — check: absent `StepProfile.implementation` in `plugins/os-sdlc/eval/ticket-takedown/**/*.rb` 5. Resolve the design-time red-check question: keep one classifier only (the os-sdlc gate code), never two. 6. Takedown section 4: a Ruby presenter writes the ticket body from `final-design.json` (`## Approach` with `Required work:`, `## Acceptance criteria`, `## Owner sketch`); the skill calls implement with `takedown-implement`. 7. place-code fails loudly when a file differs from the design's base. Orchestrator work: record one ADR that amends ADR-0276 §5 and §9, through `/os-adr:create`. Prove the map on one small `code-change` ticket with a hand-written `final-design.json` (tracer) before steps 3 to 6. ## Acceptance criteria 1. Given `/os-sdlc:implement` with no map argument, when it opens a ticket, then it uses `poodr-ticket-implementation`. 2. Given `/os-sdlc:implement` with the argument `takedown-implement`, when it opens a ticket, then the first node is place-tests. 3. Given a design with `failing_tests` and `code_files`, when place-tests and place-code run, then the tests are red first and green after, with the design tests unmodified. 4. Given a file whose content differs from the design's base, when place-code runs, then it fails with a message that names the file. 5. Given the takedown harness, when it runs, then no `--implement` mode exists. ## Owner sketch ```ruby class Takedown::Presenter::TicketBody def render(final_design) end ``` ## Non-goals Live grading (separate ticket). Ticket categories (separate ticket). Trial runs (separate ticket). ## Origin - Trigger: Owner rulings of 2026-10-09 recorded in `docs/handoffs/2026-10-09-takedown-implement-path.md`. - Improvised this session: none - Chain: takedown design ends at a sketch ← ADR-0276 §5 and §9 (DESIGN, `docs/adr/0276-ticket-takedown-runs-one-pipeline-the-eval-harness-flow-is-the-production-pipeline-live-mode.md`) - Root candidate: none - Where: `plugins/os-sdlc/eval/ticket-takedown/`, `plugins/os-sdlc/maps/`, `plugins/os-sdlc/skills/implement/SKILL.md` - Session: 58499175-8e67-4b3a-8cfe-ed601216e8da - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-prism-architect/58499175-8e67-4b3a-8cfe-ed601216e8da.jsonl VERDICT: CREATE
Author
Owner

Step 2 tracer done (main fe5584e0 + status commit). Map takedown-implement and /os-sdlc:implement <ticket> [map] shipped in f2196435. #839 ran implementation 35 to merge-ready: 5 dispatches, 0 retries, 108 s; placed files byte-identical to the design. Triage for step 1: docs/triage/2026-10-09-ticket-categories.json (57 of 163 code-change). Next: steps 3-5.

Step 2 tracer done (main fe5584e0 + status commit). Map `takedown-implement` and `/os-sdlc:implement <ticket> [map]` shipped in f2196435. #839 ran implementation 35 to merge-ready: 5 dispatches, 0 retries, 108 s; placed files byte-identical to the design. Triage for step 1: docs/triage/2026-10-09-ticket-categories.json (57 of 163 code-change). Next: steps 3-5.
Author
Owner

Step 3 done (2026-10-09).

  • 4666804c: design.json and revision.json emit whole files: code_files [{path, content}], failing_tests [{path, content}], deleted_files []. test_files removed. Cards blind-designer, blind-designer-apply, reviser and design-template.md updated. DesignText gives critic and grader full file contents.
  • ca702689: final design record stamps ticket and base. base = ScratchRepo#base_sha, resolved once at setup.
  • 94e110b3: ADR-0283 amends ADR-0276 decisions 5 and 9. The step-4 red-check question is recorded as open.
  • Ruling 5: critic.md already measures against the best possible design, and run_critique.rb sends revise on any meaningful objection. No change.
  • rake test (eval/ticket-takedown): 466 runs, 0 failures.
    Open: the grader input changed (full file contents), so grader calibration (ADR-0278) is likely invalid. Proposed for step 4. 01-setup.json does not record base. --implement mode still uses the old shape and is slated for deletion.
Step 3 done (2026-10-09). - 4666804c: design.json and revision.json emit whole files: code_files [{path, content}], failing_tests [{path, content}], deleted_files []. test_files removed. Cards blind-designer, blind-designer-apply, reviser and design-template.md updated. DesignText gives critic and grader full file contents. - ca702689: final design record stamps ticket and base. base = ScratchRepo#base_sha, resolved once at setup. - 94e110b3: ADR-0283 amends ADR-0276 decisions 5 and 9. The step-4 red-check question is recorded as open. - Ruling 5: critic.md already measures against the best possible design, and run_critique.rb sends revise on any meaningful objection. No change. - rake test (eval/ticket-takedown): 466 runs, 0 failures. Open: the grader input changed (full file contents), so grader calibration (ADR-0278) is likely invalid. Proposed for step 4. 01-setup.json does not record base. --implement mode still uses the old shape and is slated for deletion.
Author
Owner

Step 4 done (2026-10-09).

  • 2165dd78: the eval red check calls OsSdlc::Gate::StepOutcome#classify(expect_red: true) through Takedown::GateRed. There is one classifier. The gate is stricter: a nonzero exit with 0 failures and 0 errors, or with 0 runs, is no longer red.
  • b5d7eefe: the harness --implement mode is deleted (38 files, -561 lines).
  • af859df7: ADR-0283 decision 4 records Jared's ruling of 2026-10-09: keep the design-time red check, with one classifier.
  • Grader: Jared ruled no change and no new calibration run. The grader reads only the design prose. If the grades get worse, the first thing to adjust is the short ## Code changes and ## Tests prose versus the full ruling prose.
  • rake test (eval/ticket-takedown): 437 runs, 0 failures.
    Follow-up: StepProfile and ClaudeExecutor edits/acceptEdits plumbing is now always false.
Step 4 done (2026-10-09). - 2165dd78: the eval red check calls OsSdlc::Gate::StepOutcome#classify(expect_red: true) through Takedown::GateRed. There is one classifier. The gate is stricter: a nonzero exit with 0 failures and 0 errors, or with 0 runs, is no longer red. - b5d7eefe: the harness --implement mode is deleted (38 files, -561 lines). - af859df7: ADR-0283 decision 4 records Jared's ruling of 2026-10-09: keep the design-time red check, with one classifier. - Grader: Jared ruled no change and no new calibration run. The grader reads only the design prose. If the grades get worse, the first thing to adjust is the short `## Code changes` and `## Tests` prose versus the full ruling prose. - rake test (eval/ticket-takedown): 437 runs, 0 failures. Follow-up: StepProfile and ClaudeExecutor edits/acceptEdits plumbing is now always false.
Author
Owner

Step 5 done on branch prism-architect (not merged): presenter bin/takedown-implement-body (0c91ad0a); requires_section map header + reroute refusal without ## Design (f97cd11b); design-base guard in implementation-open (77e8fe5d); place-code card transforms (1c3518a9); edits plumbing deleted (fc4b0c66). Tests: takedown 447/0, os-sdlc 1513/0. Live checks: #976, #977.

Step 5 done on branch prism-architect (not merged): presenter bin/takedown-implement-body (0c91ad0a); requires_section map header + reroute refusal without ## Design (f97cd11b); design-base guard in implementation-open (77e8fe5d); place-code card transforms (1c3518a9); edits plumbing deleted (fc4b0c66). Tests: takedown 447/0, os-sdlc 1513/0. Live checks: #976, #977.
Author
Owner

Resolution

Done: Steps 2-5 and acceptance criteria 1-5 done; stale-base guard is in implementation-open, not place-code

Evidence: commits fe5584e0..40ac5805 on prism-architect; takedown rake test 447/0; os-sdlc tests 1513/0

Follow-ups: #976 #977

## Resolution **Done:** Steps 2-5 and acceptance criteria 1-5 done; stale-base guard is in implementation-open, not place-code **Evidence:** commits fe5584e0..40ac5805 on prism-architect; takedown rake test 447/0; os-sdlc tests 1513/0 **Follow-ups:** #976 #977
jared closed this issue 2026-10-09 20:25:02 +00:00
Author
Owner

AC4 says the stale-base check runs when place-code runs. ADR-0284 supersedes that wording. The check (OsSdlc::DesignBase) runs at implementation-open, before any dispatch. Jared ruled this on 2026-10-10. Uncommitted edits to a design's code_files or deleted_files also count as changes.

AC4 says the stale-base check runs when place-code runs. ADR-0284 supersedes that wording. The check (OsSdlc::DesignBase) runs at implementation-open, before any dispatch. Jared ruled this on 2026-10-10. Uncommitted edits to a design's code_files or deleted_files also count as changes.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#972
No description provided.