Next.js Code One Task Group

This documentation was generated with the assistance of AI. Please report any inaccuracies.

Implement one bucket of Next.js tasks from a plan’s task group end to end: one quality baseline up front, each task implemented via iru-nextjs-code-one-task (in parallel where safe), then a single consolidated validation that includes a production build and the end-to-end suite.

Purpose

iru-nextjs-code-one-task-group is the Next.js counterpart to iru-typescript-code-one-task-group and reuses the TypeScript gate skills, each run through an iru-gate-runner agent. It detects the project profile once (Next.js 14/15/16, App vs Pages Router, cacheComponents, output mode, Vitest or Jest, Playwright, package manager), captures a quality baseline and, when the bucket modifies existing routes, a baseline next build route table.

Validation runs cheapest first: license headers, TSDoc, scoped unit tests, an 80% coverage gate measured from unit tests alone (thin async Server Component pages and framework wiring are named exceptions), the full unit suite, and ESLint/Biome plus next typegen and tsc --noEmit diffed against the baseline. Then one next build whose route table is parsed and compared against the baseline and each task’s declared intent, flagging unexpected rendering-mode changes, and last the Playwright suite, which doubles as the UI stage of the catalog’s UI contract (see Building user interfaces) when the bucket touched UI. Because builds and Playwright’s web server cannot run concurrently, both stages sit behind the atomic mkdir-based .integration-test.lock (stale after 60 minutes, bounded wait of about 45 minutes, released on every exit path). A missing browser, occupied port or unavailable environment variable is reported as unverified, never as a pass. With accessibility: none in .ui-quality.yml (opted out entirely), the accessibility rules and checks are neither applied nor required and are reported as "accessibility: opted out" in the group report, never unverified or failed; off still applies the rules but skips the automated checks. When .ui-quality.yml is missing in a repository that already has UI code, it doesn’t assume enforce: before the first UI task it asks once, pre-selected from iru-explore’s `Accessibility: line, and writes the file.

Plugin

Shipped by the iru-nextjs plugin of the ai-catalog marketplace (install with /plugin install iru-nextjs@ai-catalog; see Plugins).

Invocation

/iru-nextjs-code-one-task-group <bucket text>

Inputs

Argument Required Description Default

Bucket text

Yes

Every Next.js task/sub-task in the bucket with its own text, the group’s Parallelizable verdict, and any relevant "Current code state" context.

None — always invoked with a specific bucket’s text, by iru-code-one-task-group.

Outputs

  • Source and test files created or modified per task, via iru-nextjs-code-one-task.

  • License headers and TSDoc validated once for the bucket.

  • Unit tests with at least 80% line coverage for changed files, measured from unit tests only.

  • For a bucket that touched UI: the screenshot matrix check against .ui-screenshots/ (every added/changed page and Client Component captured for each visual state × .ui-quality.yml direction × theme), the accessibility (axe) result at the configured enforce/report/off/none level, and each task’s Screen › Region › Component tree — or an explicit "unverified (no component gallery / no Playwright)".

  • A parsed next build route table for the bucket’s routes, with every unexpected rendering-mode change resolved or recorded, and a Playwright result (passed, failed-and-fixed, flaky, not configured, or unverified).

  • implementation_plan.md with each task’s checkbox checked and its pending note replaced by the final outcome.

  • A bucket summary for the caller: detected profile, per-task results, route-table result, accepted coverage exceptions, e2e result, lock behavior and blockers.

Execution flow

flowchart TD S0["Step 0: serialization rules read first"] --> S1["Step 1: detect profile once;\ncapture quality baseline"] S1 --> RB{"Bucket modifies existing routes?"} RB -- yes --> BB["Baseline next build route table\nunder the lock"] RB -- no --> P BB --> P{"Bucket Parallelizable?"} P -- yes --> S2a["Step 2: implement all tasks concurrently\nprovider before consumer"] P -- no --> S2b["Step 2: implement tasks one at a time"] S2a --> C["Confirm/backfill each task's box; notify user"] S2b --> C C --> V["Step 3.1-3.6: license, TSDoc, unit tests,\n80% unit coverage, full suite, quality vs baseline"] V -- failure traced to a task --> FIX["Fix that task; re-run affected checks"] FIX --> V V --> L["3.7a: acquire .integration-test.lock\nwait or break stale lock"] L -- wait timeout --> U["Build and e2e reported unverified"] L --> B["3.7: one next build;\nparse and compare route table"] B -- environment failure --> U B --> E{"Playwright configured and port free?"} E -- no --> U E -- yes --> PW["3.8: Playwright e2e, CI=1;\nUI stage: screenshot matrix + axe\nat the .ui-quality.yml level"] PW --> R["3.8b: release lock"] U --> R R --> S4["Step 4: finalize progress notes; notify user"] S4 --> S5["Step 5: report bucket outcome to caller"]

Dependencies

Invokes

Each of the following runs via the iru-gate-runner agent:

Invoked by

Source

SKILL.md on GitHub — the file this page was generated from.