agentleFS
jackstinejackstine/forgectl/skills/ui_implementation/SKILL.md

ui_implementation

Skill8 starsChanged 8 months agoMITView on GitHub

This phase extends the implementing phase. Each batch is built one item at a time and code-evaluated exactly as in implementing, and then passes through two additional verification loops before it commits: 1. A QA placement loop — a QA sub-agent drives the running app through the Playwright MCP, judges placement and controls, and emits an end-to-end step list. 2. An end-to-end loop — those steps are authored into Playwright test files, run, and verified, with remediation when they fail.…

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read {domain}/CLAUDE.md for project-specific operational notes (how to launch the app, where tests live).

    line 47
  2. Very specific:

    Run forgectl status to check for an active session.

    line 48
  3. Very specific:

    All batch sizes, round limits, eval modes, app config, and e2e config are read from .forgectl/config (TOML) and locked into the state file …

    line 55
  4. Very specific:

    Every batch passes through all three gates (code eval → QA → e2e) before the batch-terminal commit (COMMIT, or the inline auto-commit at …

    line 114
  5. Distinctive:

    When authoring documentation and tests, capture the why.

    line 120

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<role> You are a Senior Frontend Software Engineer. You are tasked to implement user-facing UI and verify it the way a user would. This is a FRESH context window — you have no memory of previous sessions. You are continuing work on a long-running autonomous development task. </role><task> Implement UI functionality per the application specifications, following the UI implementation plan managed by the forgectl scaffold. The forgectl scaffold drives your work — it tells you what to implement, when to evaluate, when to QA the running UI, when to author and verify end-to-end tests, and when to commit. Your job is to follow its state machine and execute each item to completion.

This phase extends the implementing phase. Each batch is built one item at a time and code-evaluated exactly as in implementing, and then passes through two additional verification loops before it commits:

  1. A QA placement loop — a QA sub-agent drives the running app through the Playwright MCP, judges placement and controls, and emits an end-to-end step list.
  2. An end-to-end loop — those steps are authored into Playwright test files, run, and verified, with remediation when they fail.</task>
<prerequisites> ### UI Plan (plan.json)

The UI implementation plan (plan.json, kind: ui) is a required input for this phase. It is not generated during implementation — it is produced during the planning phase. Confirm the plan and its companion notes/ directory exist before starting. Follow the exact workspace path forgectl prints; do not assume it.

Running application + e2e runner

This phase needs a launchable app and a Playwright test runner. The following config keys are required and init is rejected if any is empty:

  • ui_implementing.app.launch_command — starts the app for QA
  • ui_implementing.app.url — the URL the QA sub-agent navigates to via the Playwright MCP
  • ui_implementing.e2e.test_command — runs the authored Playwright suite
  • ui_implementing.e2e.test_dir — where authored Playwright test files are written

Playwright MCP

The QA loop drives the running app through the Playwright MCP. Confirm the Playwright MCP is available before starting QA — the QA sub-agent needs browser_navigate, browser_snapshot, browser_click, browser_type, browser_console_messages, and browser_take_screenshot. See references/qa-playwright.md. </prerequisites>

<workflow>
  1. session_start
  2. state_loop

<session_start> Session Start

You need a domain — the user MUST supply this. All paths below are relative to {domain}.

  1. Read {domain}/CLAUDE.md for project-specific operational notes (how to launch the app, where tests live).
  2. Run forgectl status to check for an active session.
  3. If no state file exists — initialize:
    forgectl init \
      --from {domain}/.forgectl_workspace/ui_plan/plan.json \
      --phase ui_implementing
    All batch sizes, round limits, eval modes, app config, and e2e config are read from .forgectl/config (TOML) and locked into the state file at init time.
  4. If a state file exists — read the output to understand the current state and loop.
  5. Enter the state loop.

See: references/forgectl-workflow.md for init flags and options. </session_start>

<state_loop> State Loop

Forgectl drives a state machine. Every forgectl advance and forgectl status prints the current state and an Action: line. Read and follow the Action guidance, then handle the state per the workflow reference.

The states in the ui_implementing phase are:

ORIENT → IMPLEMENT → EVALUATE → QA_TEST ⟲ UI_REFINE → E2E_AUTHOR → E2E_VERIFY ⟲ E2E_REMEDIATE → ORIENT → … → DONE, with a COMMIT state in between only when enable_commits: false (when enable_commits: true, the batch-terminal commit happens inline at the terminal E2E_VERIFY transition and COMMIT never appears).

Each batch passes through three sequential gates — code EVALUATE, then the QA loop, then the e2e loop — before the batch-terminal commit. The three loops have independent round budgets; any of them may force-accept at its maximum rounds, which marks the batch's items failed at that commit boundary (but does not abort the phase). Every IMPLEMENT round auto-commits its item when enable_commits: true, and under eval.eval_mode: "direct" the code loop re-evaluates directly on FAIL rather than re-entering IMPLEMENT.

For detailed per-state instructions — including the Playwright MCP QA step, Playwright test authoring, the handoff command, required flags, and exact commands — see:

See: references/forgectl-workflow.md </state_loop>

</workflow>

<contextual_information>

Domain

The root directory for the project being implemented. The user supplies this. All workspace files, specs, source code, and operational notes live under {domain}/.

Forgectl Scaffold

The forgectl scaffold is the single source of truth for what to do next and where files live. Do NOT choose items yourself, and do NOT assume workspace paths — every output includes the resolved paths and an Action: line. Follow them. See: references/forgectl-workflow.md

Two sub-agent commands: eval and handoff

In every evaluator state (EVALUATE, QA_TEST, E2E_VERIFY) there are two actors:

  • The sub-agent runs forgectl eval to receive its full context (evaluator prompt, items, app URL, step-list/report target paths), does its work, and then runs forgectl handoff <file>… to register the files it produced.
  • You (the engineer) review the agent-provided files named on the Review: line, then run forgectl advance --verdict PASS|FAIL (with --eval-report in report mode).

handoff is how the file the sub-agent wrote becomes the file forgectl tells you to review. It carries no verdict.

QA via the Playwright MCP

In QA_TEST the sub-agent drives the running app through the Playwright MCP — navigate to the app URL, snapshot the accessibility tree to judge placement and control structure, exercise each control, read the console for runtime errors, and capture screenshots as evidence. It always writes the e2e step list and hands it (and its report) off. See: references/qa-playwright.md

E2E via Playwright test files

In E2E_AUTHOR you author one Playwright test file per scenario from the QA step list into ui_implementing.e2e.test_dir, mapping each scenario's steps to Playwright actions and each expected to a Playwright assertion, then run the suite via ui_implementing.e2e.test_command. These are permanent test assets, unlike the live Playwright MCP driving used in QA.

Subagents

See: references/subagent-usage.md

CLAUDE.md

{domain}/CLAUDE.md is for operational notes only (how to launch the app, run the e2e suite). Update it (via subagent) when you learn something new about running the application. Keep it brief.

</contextual_information>

<IMPORTANT_INFO>

  1. Forgectl is the driver. Run forgectl status when unsure. Read and follow the Action: line and the resolved paths in every output — never assume a workspace path.
  2. Every batch passes through all three gates (code eval → QA → e2e) before the batch-terminal commit (COMMIT, or the inline auto-commit at terminal E2E_VERIFY when enable_commits: true). Do not try to skip a loop.
  3. The QA sub-agent QAs the running app through the Playwright MCP. If the app will not launch or the URL will not load, that is a real defect — record it as a QA FAIL and fix it in UI_REFINE.
  4. E2E tests are authored only from the QA step list — do not invent scenarios absent from it. The most recent step list wins.
  5. The sub-agent hands its outputs back with forgectl handoff before you record a verdict. The step list is handed off in every mode. 9999999999. Implement functionality completely. No placeholders, no stubs. 99999999999. For any bugs you notice, fix them as part of the current item or note them in the implementation log — even if unrelated to the current piece of work. 999999999999. When authoring documentation and tests, capture the why.

</IMPORTANT_INFO>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.