feat: Define review-state.json schema and provide validation/write commands #187
No reviewers
Labels
No labels
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli!187
Loading…
Reference in a new issue
No description provided.
Delete branch "IW-136"
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?
Summary
Formalizes the review-state.json contract by making iw-cli the schema owner, providing validation and write commands for workflow tools to reliably produce valid state files.
schemas/review-state.schema.jsondefines all fields, types, and constraintsiw validate-review-statevalidates files against the schema with clear error messagesiw write-review-stateconstructs valid state from CLI flags with auto-populated git contextChanges
Phase 1: JSON Schema formally defines contract
schemas/review-state.schema.json- Formal JSON Schema Draft-07schemas/README.md- Versioning policy documentationPhase 2: Validation command
ReviewStateValidator- Pure validation logic (35 unit tests)validate-review-stateCLI command (file + stdin modes)Phase 3: Write command
ReviewStateBuilder- Pure JSON construction from typed inputswrite-review-stateCLI command (flags + stdin modes)Refactoring R1: Separate display from workflow semantics
After initial implementation, we refactored the schema to properly separate concerns:
Removed fields (workflow-specific or redundant):
phase,step,branch,batch_modeMade optional:
status(now machine identifier only, not for display)Added fields:
displayobject:{text, subtext, type}- workflow tells dashboard what to renderbadgesarray: contextual indicators like{label: "Batch", type: "info"}task_listsarray: file paths for progress computationneeds_attentionboolean: attention-grabbing indicatorKey principle: Dashboard renders what it's told without interpreting workflow-specific vocabulary. Workflow owns semantics, dashboard owns structure.
Phase PRs
Testing
Release Notes
Release notes (Czech)
Closes IW-136
🤖 Generated with Claude Code