TypeScript Code One Task
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Carry out a single task’s implementation, tests, and checkbox update against the real codebase — nothing else.
This is the narrowest execution unit in the iru-code pipeline: iru-typescript-code-one-task-group calls it
once per task in a bucket (potentially many at once, in parallel agents).
Purpose
iru-typescript-code-one-task is the TypeScript-specific implementation worker iru-typescript-code-one-task-group
calls once per task. Given one task’s own text (what to build, the named file(s)/component(s)/function(s), the
described behavior, its exact implementation_plan.md checkbox line(s), and any sub-tasks), it first detects the
project’s framework from package.json (and, for a Maven-hosted frontend, the root pom.xml) — plain npm/TypeScript
library, React, Angular, Ionic, or a Vaadin Hilla frontend; a React Native app (expo or react-native) now has
its own key, so when iru-react-native-code-one-task is installed the task is handed to it and this skill stops,
with only a minimal built-in fallback otherwise — then loads only the matching guidance from
its own bundled reference/ directory, re-checks the current code state, implements exactly what’s specified, and
writes/updates tests. If the task didn’t stop on a blocker, it then immediately checks off that task’s own checkbox
(and its sub-tasks') in implementation_plan.md with a "group validation pending" note, before reporting back — so
an interrupted run doesn’t re-attempt work that already landed. License headers, TSDoc audits, scoped tests,
coverage, the full suite, code-quality regression checks, and replacing the pending note with the final validation
outcome all happen once per task group in iru-typescript-code-one-task-group instead of once per task. It hands
back only a short summary; it never captures a quality baseline or runs any test/coverage/quality check itself.
Equivalent to iru-java-code-one-task for npm/TypeScript projects.
For a task that adds or changes UI (any framework except a plain library) it also applies the catalog’s UI contract (see Building user interfaces): it writes the Screen > Region > Component decomposition first, builds leaves first with presentational components taking props/inputs and emitting typed events, uses the framework’s virtualizing container for collections and logical CSS properties for right-to-left, and writes the UI tests (stories per visual state, Playwright component, screen and flow specs that capture every direction x theme and run the accessibility check) without running them.
The bundled reference library
This skill ships a reference/ directory alongside its SKILL.md, holding this catalog’s general TypeScript
code agreements — strict typing with no any, readonly and discriminated unions, named exports, ESM, error
handling, and async conventions — plus one file per supported framework for the conventions that only apply
there. It is read by progressive disclosure: reference/README.md is a short routing table, code-style.md
is always read, and everything else only when the task’s shape and detected framework call for it, so a one-line
change inside a plain library doesn’t pay for React, Angular, or Hilla guidance it will never use.
| File | Read when | Covers |
|---|---|---|
|
Always |
Strict typing with no |
|
The task adds or changes an exported function, class, interface, type alias, or enum |
Full TSDoc as a hard requirement — |
|
The task writes or updates tests — nearly every task |
Matching the existing test style in the same directory (Vitest or Jest, Testing Library query priority, mocking
with |
|
The task adds or changes a screen, component, list or other UI (any framework except library); read in addition to the framework file |
The catalog-wide UI rules (decomposition, composition, inputs/events, virtualized collections, UI tests, screenshots, accessibility) mapped onto React, Angular, Ionic and Hilla, Storybook stories and Playwright. |
|
Detected framework is react ( |
Component/state/testing conventions for a Vite+React project. |
|
Detected framework is angular ( |
Component/state/testing conventions for an Angular CLI project. |
|
Detected framework is react-native and |
A pointer to the |
|
Detected framework is ionic ( |
Component/state/testing conventions for an Ionic/Capacitor project. |
|
Detected framework is hilla-frontend ( |
Component/state/testing conventions for a Vaadin Hilla frontend. |
reference/README.md also notes that the full React Native guidance and its sources live in
iru-react-native-code-one-task/reference/.
Exactly one framework file is read — the one matching the detected framework — never more than one, and none at
all when the classification is library; the UI pair is read in addition for UI tasks. The skill also notes the test runner (Vitest, Jest, or ng test) and
package manager (npm, pnpm, or yarn) while detecting the framework, since reference/testing.md and the task’s
own shell commands depend on both. If reference/ is missing entirely, the skill falls back to the repository’s
own CLAUDE.md conventions and the surrounding code’s existing style, and says so in its report rather than
guessing at what the reference would have said.
Every file states the same override: the rules are the default for new code, and a file that consistently does something else wins. A divergence is reported rather than silently converted, because restyling untouched code turns a two-line change into an unreviewable diff.
Plugin
Shipped by the iru-typescript plugin of the ai-catalog marketplace (install with /plugin install iru-typescript@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
Yes |
The task’s full text as written in |
None — this skill has nothing to do without a task description. |
|
No |
The skill’s own bundled reference directory ( |
Bundled with the skill |
Outputs
-
Source and test files created/modified per the task, following the bundled
reference/agreements — strict typing with noany,readonly/immutability defaults, named exports, full TSDoc on every exported symbol, and the detected framework’s own component/state/testing conventions — plus this repository’s ownCLAUDE.mdconventions where they are more specific, and the surrounding file’s existing style wherever it consistently differs. -
Tests added/updated (Vitest or Jest, matching the detected runner) covering the new/changed behavior, including a case per documented
@throws— not run by this skill; the caller runs them once for the whole bucket. -
For UI work: a story per visual state next to each added/changed component (minimal, typical, many-items/long-content and right-to-left fixtures), a Playwright component spec (behaviour once, then
captureUiMatrixper state with the accessibility check), a screen spec and, for a new flow, a flow spec, usinge2e/support/ui-screenshots.ts(created fromreference/ui-screenshots.tswith@axe-core/playwrightas a dev dependency when missing). With no Playwright setup at all it writes behaviour tests only and reports the gap as a deviation. Captures go under.ui-screenshots/<kind>/<Id>/<state>--<direction>--<theme>.pngwhen the group’s UI stage runs them. -
implementation_plan.mdwith this task’s own checkbox (and its sub-tasks') checked off and a "group validation pending" note, written immediately once the task finishes cleanly — before this skill reports back, and before the caller’s own group-wide validation runs. Left untouched if the task stopped on a blocker. -
For a React Native task with
iru-react-native-code-one-taskinstalled: that skill’s report, relayed as this skill’s Step 7 report with a note about the hand-off (and that the plan should tag such tasksreact-native). -
A short summary handed back to the caller: the detected framework and which
reference/file(s) were actually read (for react-native, whether the task was handed over or the minimal fallback was used), the file(s) touched, tests added/updated, for UI work the decomposition tree, the stories and UI specs added and the screenshot states they will capture, whether the run stopped on a blocker, and any deliberate deviation fromreference/(a file that still usesany, a default export kept because the framework requires one, a file whose existing member order or style already diverges) so it reads as a decision rather than an oversight.
Execution flow
A conflict between reference/ and the surrounding code is deliberately not a stop condition — the skill
follows the surrounding code and reports the divergence in Step 7.
Dependencies
Invokes
-
React Native Code One Task — Step 1, when the detected framework is
react-nativeand that skill is installed; it receives the task’s full text unchanged and this skill stops after relaying its report.
Otherwise it calls no other skill in this catalog. It reads its own reference/ directory and edits the code and test files the task names. License headers, TSDoc audits,
scoped tests, coverage, and quality checks all live in iru-typescript-code-one-task-group.
Invoked by
-
TypeScript Code One Task Group — Step 2, once per task in a
typescriptbucket (concurrently, in a single batch ofAgentcalls, when the group is markedParallelizable: yes; one at a time otherwise), via theiru-isolated-skill-executoragent, passing that task’s full text including its exact checkbox line(s). That caller re-readsimplementation_plan.mdafterward to confirm the checkbox this skill already flipped landed, backfilling it only if a rare concurrent- write race clobbered it, then replaces the "pending" note with the final validation outcome once the whole bucket’s validation passes. -
React Native Code One Task — names this skill as its counterpart and the basis for its conventions; it does not invoke it.
Source
SKILL.md on GitHub — the file this page was generated from. The bundled TypeScript code agreements live alongside it under reference/.