name: ui_workflow description: Execute the repo-local Figma-backed UI implementation workflow, including governed design mapping, current-state audit, targeted implementation, verification, iteration, and runtime memory management outside the repository. examples: - "$ui_workflow MER-5258" - "Use ui_workflow for this Jira ticket; the design is in Figma" - "Run ui_workflow against this Figma link before implementing the UI" when_to_use: - "A ticket or feature includes a Figma design and the implementation needs fidelity to that source." - "UI implementation should be compared iteratively against the design source." - "A work item needs governed design mapping plus implementation and QA, not just a brief." when_not_to_use: - "The task is backend-only." - "There is no external design source and local code inspection alone is sufficient." - "The work only needs governed design mapping with no implementation or iteration."
Required Resources
Always load before running:
.agents/ui-workflow/README.md.agents/ui-workflow/runtime-contract.md.agents/commands/ui-plan.md.agents/commands/ui-implement.md.agents/commands/ui-qa.md.agents/commands/ui-fix.md.agents/commands/ui-reflect.md.agents/agents/ui-jira-figma-resolver.md.agents/agents/ui-browser-readiness-checker.md.agents/agents/ui-current-state-auditor.md.agents/agents/ui-implementer.md.agents/agents/ui-layout-verifier.md.agents/agents/ui-visual-verifier.md.agents/agents/ui-reviewer.md.agents/agents/ui-retrospective-updater.md.agents/skills/implement_ui/SKILL.md
Load when needed:
.agents/skills/implement_ui/references/workflow.md.agents/skills/implement_ui/references/repo_waypoints.md.agents/skills/implement_ui/references/guardrails.md.agents/skills/implement_ui/references/target_organization.md.agents/skills/implement_ui/references/design_system_sources.md.agents/skills/implement_ui/references/icon_mapping.md.agents/skills/implement_ui/references/fidelity_rules.md.agents/skills/implement_ui/references/responsive_validation.md.agents/skills/implement_ui/assets/templates/ui_implementation_brief_template.md
Mission
This skill is the canonical entrypoint for Figma-backed UI implementation work in this repository.
It owns:
- governed design mapping
- canonical brief creation
- current-state auditing
- targeted UI implementation
- layout and visual verification
- iterative review
- runtime workflow memory under
~/.codex/memories/oli-torus-ng/ui-work/
The workflow should validate the Browser MCP window after the human prepares the correct route, role, and app state for browser-based QA.
Entry Modes
Choose the narrowest matching mode:
plan- when the scope has not been normalized yet
- creates the canonical brief and runtime state
implement- when a scope already has a brief and should move through audit, implementation, and iteration
qa- when implementation already happened and verification should run again
fix- when one or more existing deltas should be corrected without widening scope
reflect- when the scope produced a reusable workflow or implementation learning
If the request does not specify a mode:
- prefer
planwhen no runtime state exists yet - otherwise prefer
implement
Canonical Sequence
- Resolve the UI source of truth from Jira and/or Figma.
- Initialize or reuse the runtime scope directory under
~/.codex/memories/oli-torus-ng/ui-work/<scope>/. - Run the governed design-mapping phase to create the canonical brief.
- Audit the current implementation and produce structured deltas.
- Implement targeted fixes against the active delta set.
- Run browser-readiness, then layout and visual verification when available.
- Review the result and decide
done,iterating, orneeds-human-review. - Record iteration outputs in runtime memory.
- Capture generalized workflow learnings back into the repo when warranted.
Operational Procedure
Mode: plan
Use .agents/commands/ui-plan.md as the execution contract.
The skill should:
- Normalize the input using
ui-jira-figma-resolver. - Determine a stable
<scope>name. - Create or reuse the runtime directory.
- Run the governed design-mapping phase.
- Write:
session.jsonsource_refs.jsonbrief.md
- Set
session.jsonto a planned state.
Mode: implement
Use .agents/commands/ui-implement.md as the execution contract.
The skill should:
- Load the existing runtime state.
- Run
ui-current-state-auditor. - Update
audit.md. - Generate or update
deltas.json. - Run
ui-implementer. - Run
ui-browser-readiness-checkerbefore browser-based QA when required by the runtime policy. - Run
ui-layout-verifierwhen the relevant data is available and browser readiness is confirmed. - Run
ui-visual-verifierwhen the relevant data is available and browser readiness is confirmed. - Run
ui-reviewer. - Write a new iteration record.
- Update
session.json.
Mode: qa
Use .agents/commands/ui-qa.md as the execution contract.
The skill should:
- Reuse the canonical brief and current runtime state.
- Re-run
ui-browser-readiness-checker. - Re-run the available verification stages.
- Run
ui-reviewer. - Write a new iteration record and update
session.json.
Mode: fix
Use .agents/commands/ui-fix.md as the execution contract.
The skill should:
- Load
deltas.json. - Narrow the active delta set if the user specified ids or categories.
- Run
ui-implementeronly against that targeted scope. - Run
ui-browser-readiness-checkerbefore browser-based QA when needed. - Run the available verification stages.
- Run
ui-reviewer. - Write a new iteration record and update
session.json.
Mode: reflect
Use .agents/commands/ui-reflect.md as the execution contract.
The skill should:
- Read the current scope state and iteration history.
- Capture the local learning in
learnings.md. - If the learning affects future workflow behavior, update the repo-local workflow files in the same task.
Scope Resolution
Use this precedence when choosing the runtime scope id:
- explicit Jira issue key
- explicit user-provided scope name
- stable slug derived from the Figma-backed surface
Examples:
MER-5258MER-5258--student-dashboard-overviewstudent-dashboard-overview
Adding Figma Nodes
During execution, the human may add one or more Figma nodes to the active scope.
The workflow should accept either:
- natural language, for example
Add this Figma node to MER-5254 as "close button modal" - or an explicit form such as
$ui_workflow add-node MER-5254 <figma-url> alias="close button modal"
The workflow must not assume the human already knows the add-node name.
If the workflow detects that the current Figma reference is missing a specific node or is too ambiguous for reliable implementation or QA, it should suggest both options explicitly.
When a node is added:
- update
source_refs.json - preserve any useful human-friendly alias
- refresh the brief or downstream runtime state only when the added node materially changes the source of truth
State Transitions
session.json should move through these states as appropriate:
plannedauditingimplementingiteratingneeds-human-reviewdone
Prefer explicit state transitions over implicit assumptions.
Relationship To implement_ui
implement_ui is not the canonical entrypoint for Figma-backed implementation work.
Within this skill, it is treated as part of the governed design-mapping phase and its useful rules must be preserved:
- token mapping
- icon reuse
- shared-vs-local component placement
design_tokens/extraction decisions- surface classification
- responsive ambiguity handling
- explicit file targeting
Output Expectations
The skill must produce or maintain runtime state under:
~/.codex/memories/oli-torus-ng/ui-work/<scope>/
At minimum, the active scope should have:
session.jsonsource_refs.jsonbrief.md
And, once implementation begins:
audit.mddeltas.jsoniterations/*.mdqa/*.jsonwhen verification runs
Verification Policy
When verification stages are available:
- run layout verification before visual verification
- let
ui-reviewerdecide the final workflow status - do not let visual similarity override the canonical brief or governed-design rules
- if the browser lands on login or otherwise lacks a valid session, stop and tell the user which role-specific session is required before continuing
- use Browser MCP for live inspection in the human-prepared QA browser window
- use Figma MCP for design-source inspection
If verification is not yet available for a given scope, continue to use the brief, audit, and reviewer decision explicitly rather than pretending verification happened.
Browser Readiness Contract
The workflow should ask the human to prepare the Browser MCP window before deep QA and then treat that window as the canonical QA browser for the active scope.
If authentication, navigation, or role selection is still required:
- stop QA
- tell the human which role is required
- tell the human to log in and navigate to the intended surface in that same Browser MCP window
- re-run browser readiness before continuing
Guardrails
- Do not bypass the canonical brief.
- Do not treat visual similarity as a reason to ignore token, icon, or component-governance rules.
- Do not invent missing states, interactions, or responsive behavior.
- Do not commit runtime iteration files to the repository.
- If a workflow learning changes future behavior, update the repo-local workflow in the same task.
Handoff
Typical next actions:
- after
plan→ continue withimplement - after
implementwith open deltas → continue withfixorqa - after
doneorneeds-human-review→ runreflectif there is a reusable learning