2026-06-14 11:24:36 -04:00
# Contract: Interactive Web Dashboard for Automaton Framework
2026-06-12 23:59:21 -04:00
## Goal
2026-06-14 11:24:36 -04:00
Build an interactive web dashboard that visualizes and monitors task progress within the automaton framework. The dashboard is **scope-aware** : when opened in `~/.automaton/` , it tracks framework development tasks; when opened in any project root (a project that has installed automaton), it tracks that project's tasks.
2026-06-12 23:59:21 -04:00
## Requirements
### 1. Scope-Aware Context Detection
- **1.1** The dashboard detects its scope by walking up the directory tree from the current working directory to find the nearest `.automaton/` folder.
- **1.2** If the nearest `.automaton/` folder is `~/.automaton/` , the dashboard operates in **framework mode** (tracks framework development).
- **1.3** If the nearest `.automaton/` folder is inside a project root, the dashboard operates in **project mode** (tracks that project's tasks).
- **1.4** The current scope is displayed in the dashboard header.
### 2. Kanban Board View (Primary View)
2026-06-14 11:24:36 -04:00
- **2.1** The board displays tasks as cards organized into phase groups:
- **Planning** — Backlog, Research, Decomposition
- **Design** — Design, Test Design
- **Implementation** — Implement
- **Verification** — Bug Find, Adversarial Bug Find, Doc Review, Referee
- **Blocked** — VERDICT.md with FAIL or NEEDS_REVIEW
- **Resolution** — VERDICT.md with PASS
- **2.2** Tasks with sub-tasks show a progress indicator (e.g., `[3/5]` ) showing sub-task completion progress.
- **2.3** Columns are horizontally scrollable if they overflow the viewport.
2026-06-12 23:59:21 -04:00
### 3. Task Cards
- **3.1** Each task card displays:
- Task name (kebab-case folder name, human-readable)
2026-06-14 11:24:36 -04:00
- Current phase
2026-06-12 23:59:21 -04:00
- Sub-task progress indicator (if applicable)
2026-06-14 11:24:36 -04:00
- Status indicator (✅ PASS, ❌ FAIL/BLOCKED, 🔄 IN PROGRESS)
- Review status badge
- **3.2** Cards are clickable to open a detail panel.
2026-06-12 23:59:21 -04:00
### 4. Task Detail Panel
2026-06-14 11:24:36 -04:00
- **4.1** When a task card is clicked, a modal panel shows:
- Full task name
- Current state and phase group
- List of artifacts present with status
- Sub-task list with individual statuses
- Review buttons (approve / request changes)
2026-06-12 23:59:21 -04:00
- VERDICT.md content (if present)
- BUG_REPORT.md content (if present)
2026-06-14 11:24:36 -04:00
- SPEC.md content (if present)
2026-06-12 23:59:21 -04:00
### 5. Statistics View
2026-06-14 11:24:36 -04:00
- **5.1** A statistics view accessible via tab or keybinding shows:
2026-06-12 23:59:21 -04:00
- Total tasks count
2026-06-14 11:24:36 -04:00
- Tasks per phase group and per state (bar charts)
2026-06-12 23:59:21 -04:00
- Pass/Fail/Blocked rate
2026-06-14 11:24:36 -04:00
- Current WIP (tasks in progress)
- Sub-task progress
- Wave progress
2026-06-12 23:59:21 -04:00
### 6. Timeline View
2026-06-14 11:24:36 -04:00
- **6.1** A timeline view shows each task's progress through the lifecycle.
- **6.2** Sub-task completion is shown per task.
2026-06-12 23:59:21 -04:00
### 7. Filtering and Search
2026-06-14 11:24:36 -04:00
- **7.1** Filter tasks by phase/status.
- **7.2** Filter tasks by review status.
- **7.3** Filter tasks by whether they have sub-task waves.
- **7.4** Search tasks by name.
2026-06-12 23:59:21 -04:00
### 8. Keyboard Navigation
2026-06-14 11:24:36 -04:00
- **8.1** `Space` cycles through views (Board → Statistics → Timeline).
- **8.2** `1` , `2` , `3` switch to Board/Stats/Timeline views.
- **8.3** `t` cycles themes (default → dark → light).
- **8.4** `r` manually refreshes data.
- **8.5** `f` toggles the filter bar.
- **8.6** `s` focuses the search input.
- **8.7** `Esc` closes modals and clears search.
- **8.8** `?` shows keybindings help.
2026-06-12 23:59:21 -04:00
### 9. Auto-Refresh
2026-06-14 11:24:36 -04:00
- **9.1** The dashboard auto-refreshes via client-side polling (configurable interval).
- **9.2** Default auto-refresh interval: 2 seconds.
- **9.3** Manual refresh triggered by `r` key or refresh button.
2026-06-12 23:59:21 -04:00
### 10. Configuration
- **10.1** Dashboard settings stored in `{project}/.automaton/dashboard-config.json` :
- `auto_refresh_interval` : seconds between auto-refreshes (default: 2)
- `default_view` : which view to show on startup ("board", "statistics", "timeline")
- `column_width` : minimum width of each column in characters (default: 30)
2026-06-14 11:24:36 -04:00
- `show_timelines` : show elapsed time indicators (default: true)
2026-06-12 23:59:21 -04:00
- `theme` : color theme ("default", "dark", "light")
### 11. Color Theme
2026-06-14 11:24:36 -04:00
- **11.1** Three themes are supported via CSS variables: default (dark), dark, light.
- **11.2** Theme is switchable via keybinding (`t` ) or configuration.
2026-06-12 23:59:21 -04:00
### 12. Sub-Task Visualization
- **12.1** For decomposed tasks, sub-tasks are shown as indented items under the parent task card.
2026-06-14 11:24:36 -04:00
- **12.2** Sub-task progress is shown as a fraction (e.g., `[3/5]` ).
- **12.3** Sub-task statuses are shown in the detail panel and timeline.
2026-06-12 23:59:21 -04:00
### 13. Performance
- **13.1** Dashboard renders within 500ms of a refresh (for projects with up to 100 tasks).
- **13.2** No blocking I/O during rendering.
### 14. Error Handling
- **14.1** If `tasks/` directory is missing, show a "No tasks found" message.
2026-06-14 11:24:36 -04:00
- **14.2** If a task artifact file is corrupted or unreadable, show a warning indicator.
2026-06-12 23:59:21 -04:00
- **14.3** If the dashboard is opened outside any automaton project, show an error and exit gracefully.
### 15. Documentation
- **15.1** README.md in the dashboard module with usage instructions.
- **15.2** Keybindings reference accessible via `?` in the dashboard.
- **15.3** Configuration schema documented with default values.
---
## Non-Goals
2026-06-14 11:24:36 -04:00
- Terminal/TUI implementation.
- Real-time collaboration — single-user only.
- Task creation/editing — dashboard is read-only for task state.
- Notification system — no push notifications or alerts.
- Calendar integration — no date-based scheduling.
- Integration with external PM tools — standalone only.
2026-06-12 23:59:21 -04:00
---
## Acceptance Criteria
- [ ] Dashboard detects scope (framework vs. project) correctly based on cwd
2026-06-14 11:24:36 -04:00
- [ ] Board view displays all tasks in correct phase groups based on state machine
- [ ] Task cards show name, phase, status, review badge, and sub-task progress
2026-06-12 23:59:21 -04:00
- [ ] Task detail panel shows full task information when selected
2026-06-14 11:24:36 -04:00
- [ ] Statistics view shows correct counts per phase group and state
- [ ] Timeline view shows task progress
- [ ] Filter bar filters tasks by phase, review status, waves, and search
- [ ] Keyboard bindings `Space` , `1` , `2` , `3` , `t` , `r` , `f` , `s` , `Esc` , `?` work correctly
- [ ] Auto-refresh works with configurable interval
2026-06-12 23:59:21 -04:00
- [ ] Dashboard configuration file is created and read correctly
- [ ] Color themes cycle correctly with 3 themes
2026-06-14 11:24:36 -04:00
- [ ] Sub-task visualization shows progress fraction and statuses
2026-06-12 23:59:21 -04:00
- [ ] Dashboard renders within 500ms for 100 tasks
- [ ] Error handling works for missing tasks/ directory and corrupted artifacts
- [ ] Documentation includes usage instructions and keybindings reference
---
## Risks & Mitigations
2026-06-14 11:24:36 -04:00
- **Risk 1**: Web rendering performance degrades with many tasks
- Mitigation: Efficient DOM updates, client-side filtering, pagination if needed
- **Risk 2**: Concurrent reads while agent writes artifacts
- Mitigation: Handle read errors gracefully; agents write atomically where possible
2026-06-12 23:59:21 -04:00
- **Risk 3**: Task state determination is inconsistent with Orchestrator
2026-06-14 11:24:36 -04:00
- Mitigation: Use the same artifact-based state machine logic as `orchestrate.md`
2026-06-12 23:59:21 -04:00
- **Risk 4**: Dashboard breaks when automaton framework is upgraded
2026-06-14 11:24:36 -04:00
- Mitigation: Dashboard reads state from the same artifacts the Orchestrator reads
2026-06-12 23:59:21 -04:00
---
## Notes
2026-06-14 11:24:36 -04:00
- The dashboard is a separate module under `~/.automaton/automaton/dashboard/` .
- The dashboard uses the same layered file system approach as the Orchestrator.
- Task names in the dashboard should be human-readable.
- The dashboard is a **read-only** view of task state.
2026-06-12 23:59:21 -04:00
---
## Stop Condition
When all checkboxes are checked and the dashboard is fully functional, output "CONTRACT_MET" and stop.