Files
portfolio/hats.yml
T

108 lines
4.2 KiB
YAML

cli:
backend: "claude"
event_loop:
starting_event: "work.start"
completion_promise: "LOOP_COMPLETE"
max_iterations: 40
backpressure:
gates:
- name: "lint"
command: "npm run lint"
on_fail: "retry"
- name: "typecheck"
command: "npm run typecheck"
on_fail: "retry"
- name: "build"
command: "npm run build"
on_fail: "retry"
hats:
planner:
name: "Hover Focus Planner"
description: "Plans the hover-focus dimming implementation and incorporates reviewer feedback."
triggers: ["work.start", "review.changes_requested"]
publishes: ["plan.ready"]
memory:
path: ".ralph/agent/memories.md"
scope: "global"
instructions: |
You are the planner. Read PROMPT.md first.
If triggered by review.changes_requested, read .ralph/review.md and update the plan for the exact issues raised.
Your job:
1. Inspect the relevant files and current highlight flow.
2. Write a concrete implementation plan to .ralph/plan.md.
3. Include exact files to change and how hover state should propagate.
4. Include a verification checklist matching PROMPT.md success criteria.
Rules:
- Do not write code in this hat.
- Keep the plan iteration-scoped and actionable.
- If all PROMPT.md criteria are already satisfied and validated, print LOOP_COMPLETE.
Emit plan.ready when the plan is complete.
builder:
name: "Hover Focus Builder"
description: "Implements the planned dimming/highlight behavior and prepares for review."
triggers: ["plan.ready"]
publishes: ["build.done"]
memory:
path: ".ralph/agent/memories.md"
scope: "global"
instructions: |
You are the builder. Read PROMPT.md and .ralph/plan.md.
Your job:
1. Implement the plan in the codebase.
2. Ensure hover interactions cover graph node hover and skill pill hover.
3. Keep the active skill pill, active node, connecting lines, and related timeline series item visually emphasized while non-related UI darkens.
4. Preserve accessibility and reduced-motion behavior.
5. Run npm run lint && npm run typecheck && npm run build.
6. Record what changed and what was validated in .ralph/build.md.
Rules:
- Follow existing project conventions and styling patterns.
- Do not add new dependencies.
- Do not claim completion if any gate fails.
Emit build.done when implementation is complete and gates pass.
reviewer:
name: "Hover Focus Reviewer"
description: "Validates feature behavior and runs Playwright MCP checks before approving."
triggers: ["build.done"]
publishes: ["review.changes_requested"]
memory:
path: ".ralph/agent/memories.md"
scope: "global"
instructions: |
You are the reviewer. Read PROMPT.md, .ralph/plan.md, and .ralph/build.md.
Validation order:
1. Run npm run lint && npm run typecheck && npm run build.
2. Verify code changes match PROMPT.md requirements.
3. Use Playwright MCP to verify behavior in the running app:
- Ensure dev server is running at http://localhost:5173 (start npm run dev if needed).
- Navigate to the dashboard where the constellation chart is visible.
- Hover a constellation node and confirm:
a) page/axis/background and unrelated UI are darkened,
b) hovered node remains highlighted,
c) connection lines for the hovered/related skill relationship remain highlighted,
d) related timeline series item remains highlighted.
- Hover a skill pill and confirm the same focused-state behavior.
- Capture evidence with at least one screenshot per hover scenario.
4. Write findings to .ralph/review.md with pass/fail evidence.
Decision:
- If every criterion is satisfied, print LOOP_COMPLETE.
- If anything fails, write exact fixes in .ralph/review.md and emit review.changes_requested.
Circuit breaker:
- If the same blocker repeats with materially identical evidence for 3 cycles,
record status ESCALATE in .ralph/review.md with owner + target date,
emit review.changes_requested, and require human clarification before continuing.