#534 A: Project: target keyword required; JSON round-trip #537

Closed
opened 2026-09-08 20:14:46 +00:00 by jared · 2 comments
Owner

Context

Child of #534 (ADR-0169). Parent design points and comments on #534. Lands after #535.

Tasks

  • Project.load requires target: keyword; bare call raises ArgumentError
  • Project.from_json(root, json) rebuilds from JSON with root from cwd, never from JSON (ADR-0055)
  • Project#to_json returns relative paths only; does not include root or map
  • Flat yaml: target: may be nil only when file has no targets: key (existing validate_flat!)

Acceptance criteria

  • load without keyword raises ArgumentError
  • from_json(to_json) round-trips every attribute
  • to_json never contains root

Blocking edges

Blocked by: #535

Origin

  • Trigger: Agent-initiated from ticket-skeptic gate (CREATE verdict)
  • Improvised this session: none
  • Chain: DESIGN ← ADR-0169
  • Root candidate: #534
  • Where: n/a
  • Session: 1a3b7fd0-0319-465b-8414-0ab70560de3d
  • Transcript: (from session context)
  • Judge: claude-sonnet-5 on 2026-09-08; user-decided reframe recorded in ADR-0169; former child G merged into B
## Context Child of #534 (ADR-0169). Parent design points and comments on #534. Lands after #535. ## Tasks - [ ] Project.load requires target: keyword; bare call raises ArgumentError - [ ] Project.from_json(root, json) rebuilds from JSON with root from cwd, never from JSON (ADR-0055) - [ ] Project#to_json returns relative paths only; does not include root or map - [ ] Flat yaml: target: may be nil only when file has no targets: key (existing validate_flat!) ## Acceptance criteria - [ ] load without keyword raises ArgumentError - [ ] from_json(to_json) round-trips every attribute - [ ] to_json never contains root ## Blocking edges Blocked by: #535 ## Origin - Trigger: Agent-initiated from ticket-skeptic gate (CREATE verdict) - Improvised this session: none - Chain: DESIGN ← ADR-0169 - Root candidate: #534 - Where: n/a - Session: 1a3b7fd0-0319-465b-8414-0ab70560de3d - Transcript: (from session context) - Judge: claude-sonnet-5 on 2026-09-08; user-decided reframe recorded in ADR-0169; former child G merged into B
Author
Owner

Work started via /os-sdlc:implement on branch ticket-537 (session d233a2f7-977a-419d-99ea-011b6e1e66f8).

Work started via /os-sdlc:implement on branch ticket-537 (session d233a2f7-977a-419d-99ea-011b6e1e66f8).
Author
Owner

Resolution

Done: Project.load requires the target: keyword; a bare call raises ArgumentError; flat projects pass target: nil. Project#to_json emits relative paths only, never root or map. Project.from_json(root, json) rebuilds with root from the caller, never from JSON (ADR-0055). Lib callers outside implementation-open (autocorrect_prepass, brief_facts, tea_tracker) pass target: nil for now; #539 removes them.

Evidence: Pipeline /os-sdlc:implement 537, implementation 4, session d233a2f7-977a-419d-99ea-011b6e1e66f8, dispatches 77-98, ended implementation_complete. Commits 1f8bb6c (feat) and 1e7b6f4 (history row) on branch ticket-537, merged to main on 2026-09-09. Suite 1092 runs green; new tests in plugins/os-sdlc/tests/project_json_round_trip_test.rb. Deviations: (1) test-side conflict, 36 bare Project.load test call sites updated by hand to pass target: nil because programmer-repair may not edit tests (#544 shape); (2) #534 hot-patch applied to main's brief_facts.rb for the run so the SubagentStart hook could write dispatch rows, restored before finish; (3) one suite-check red was a getcwd race flake that passed on rerun.

Follow-ups: none new; #538 (next child), #539 (remove target: nil lib callers), #544 (test-side conflict routing) already track the rest

## Resolution **Done:** Project.load requires the target: keyword; a bare call raises ArgumentError; flat projects pass target: nil. Project#to_json emits relative paths only, never root or map. Project.from_json(root, json) rebuilds with root from the caller, never from JSON (ADR-0055). Lib callers outside implementation-open (autocorrect_prepass, brief_facts, tea_tracker) pass target: nil for now; #539 removes them. **Evidence:** Pipeline /os-sdlc:implement 537, implementation 4, session d233a2f7-977a-419d-99ea-011b6e1e66f8, dispatches 77-98, ended implementation_complete. Commits 1f8bb6c (feat) and 1e7b6f4 (history row) on branch ticket-537, merged to main on 2026-09-09. Suite 1092 runs green; new tests in plugins/os-sdlc/tests/project_json_round_trip_test.rb. Deviations: (1) test-side conflict, 36 bare Project.load test call sites updated by hand to pass target: nil because programmer-repair may not edit tests (#544 shape); (2) #534 hot-patch applied to main's brief_facts.rb for the run so the SubagentStart hook could write dispatch rows, restored before finish; (3) one suite-check red was a getcwd race flake that passed on rerun. **Follow-ups:** none new; #538 (next child), #539 (remove target: nil lib callers), #544 (test-side conflict routing) already track the rest
jared closed this issue 2026-09-09 14:29:35 +00:00
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#537
No description provided.