- Archive 79 completed framework-dev tasks from tasks/ -> tasks/complete/ - status.py: add --cleanup-done and --install-cleanup-schedule commands - Add scripts/automaton-cleanup.sh for periodic task archiving - Dashboard: rename 'Background' tab -> 'Agent', 'Cleanup' agent -> 'Completed Task Archiver', remove redundant group headers and pill badges, dim inactive agent placeholders - .rules.md: add Self-Documenting UI Names rule - New tests: test_cleanup_done.py, expanded test_app.py and test_task.py
3.8 KiB
Add Decomposition Content to Dashboard Data Model
Goal
Add missing content fields to the Task model so the dashboard can display wave structure from DECOMPOSITION.md, parent task context from PARENT_SPEC.md, and VRAM constraints from VRAM_CONFIG.md.
Requirements
R1. Add decomposition_content to Task model
automaton/dashboard/core/task.py: The Task dataclass has six content fields (spec_content, verdict_content, bug_report_content, adversarial_bug_report_content, doc_review_content, design_content) but no decomposition_content. This is the root cause of the dashboard's inability to parse wave structure from DECOMPOSITION.md.
Fix:
- Add
decomposition_content: Optional[str] = Nonefield to theTaskdataclass (task.py:77-90) - In
discover_tasks()(task.py:243-286), loadDECOMPOSITION.mdcontent similar to how other artifacts are loaded - Add
"decomposition_content"to the/api/tasksresponse inui/app.py_serve_tasks()and_serve_task()
R2. Parse wave structure from DECOMPOSITION.md content
Currently dashboard.js:278-285 splits sub-tasks into waves using a 50/50 heuristic (half = Math.ceil(task.sub_tasks.length / 2)), completely ignoring the actual wave definitions in DECOMPOSITION.md.
Fix:
- Parse wave headers from
decomposition_content(Python side): extract### Wave 1:and### Wave 2:sections and their sub-task lists - Store parsed wave data as
waves: list[WaveGroup]on theTaskmodel or as structured data in the API response - Each wave group contains: wave number, label, sub-task names
- In
dashboard.js, use parsed wave data instead of 50/50 heuristic for wave statistics - Fall back to 50/50 heuristic only when
decomposition_contentis unavailable
R3. Add parent_spec_content and vram_config_content to Task model
Sub-tasks have PARENT_SPEC.md and VRAM_CONFIG.md but these are not in the ARTIFACTS dict and not visible in the API response or detail panel. The detail panel cannot show parent context or VRAM constraints.
Fix:
- Add
parent_spec_content: Optional[str] = Noneandvram_config_content: Optional[str] = NonetoTask - Load these in
discover_tasks()if the files exist - Include in the API response
- Display in the detail panel when present (e.g., "Parent Context" and "VRAM Configuration" sections)
R4. Add WaveGroup dataclass
Add a simple dataclass for wave metadata:
@dataclass
class WaveGroup:
wave_number: int
label: str
sub_task_names: list[str]
R5. Parse DECOMPOSITION.md wave sections
Add a parse_waves(content: str) -> list[WaveGroup] function that extracts wave definitions from DECOMPOSITION.md content. Pattern: ### Wave N: label followed by lines starting with - subtask-name.
Acceptance Criteria
Taskmodel hasdecomposition_content,parent_spec_content,vram_config_contentfields/api/tasksresponse includesdecomposition_contentwhen present/api/tasksresponse includesparent_spec_contentandvram_config_contentwhen presentparse_waves()correctly extracts wave structure from the templateDECOMPOSITION.mdintemplates/tasks/subtask-parent/- Dashboard JS uses parsed wave data for Wave 1/Wave 2 statistics instead of 50/50 split
- Detail panel shows "Parent Context" section when
parent_spec_contentexists - Detail panel shows "VRAM Configuration" section when
vram_config_contentexists - Existing tests pass
- New test:
parse_waveswith real DECOMPOSITION.md content - New test: task with PARENT_SPEC.md and VRAM_CONFIG.md has content fields populated
Non-Goals
- Not changing the DECOMPOSITION.md format
- Not applying VRAM constraints — display only
- Not modifying how sub-tasks are created or executed