- Add RLButtons component with thumbs-up (+) and thumbs-down (−) buttons - Thumbs-up adds example, triggers async training, and decays noise - Thumbs-down changes outputs with spread-aware noise (moveWeights) - Add noise ring indicator on joystick: border shows noise level - No border at noise ≤ 0.01 - 3px orange border at noise > 0.01 (active) - 6px red border at noise > 0.15 (high) - Wire RLButtons into App.tsx, pass mlStore to Joystick for noise tracking - CSS matches old playground a-immersive.css noise-ring styling - 17 new e2e tests covering VAL-ML-011, VAL-ML-012, VAL-JOY-004 - All 121 Playwright tests pass Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
5.1 KiB
5.1 KiB
| name | description |
|---|---|
| solidjs-worker | General-purpose SolidJS feature implementation worker for the NISPS migration |
SolidJS Worker
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
When to Use This Skill
All feature implementation for the SolidJS migration. This worker builds components, stores, hooks, and transplants core modules from the old playground app.
Required Skills
- agent-browser: For manual verification of UI behavior in the browser. Use after implementation to verify component rendering and interactions.
- tuistory: NOT required for this mission.
Work Procedure
Step 1: Understand the Feature
- Read
mission.mdin the mission directory for overall mission context. - Read
.factory/library/architecture.mdfor system architecture. - Read
.factory/library/environment.mdfor environment details. - Read the assigned feature from
features.jsoncarefully — understand everyexpectedBehaviorandfulfillsassertion. - Read the relevant assertion descriptions from
validation-contract.md.
Step 2: Reference the Old Code
- The old playground app is at
playground/(READ-ONLY reference). playground/js/a-app.jsis the main app (~4300 lines, read in chunks).- Identify the exact behavior to replicate by reading the relevant old code sections.
- For transplanted modules (listed in
architecture.md), copy from the old code and adapt to TypeScript with minimal changes.
Step 3: Write Tests First (TDD)
- Write failing tests BEFORE implementation. Tests go in
tests/at the repo root. - For SolidJS components: use Playwright e2e tests against the Vite dev server (see
playwright-solidjs.config.ts). - For behavioral assertions matching the validation contract: write Playwright e2e tests that use the
window.__nispsdebug probe. - For transplanted core modules: write Playwright e2e tests verifying the same behavior as the old JS code.
- Run tests to confirm they fail (red).
Step 4: Implement
- Follow the architecture in
.factory/library/architecture.md. - Use SolidJS patterns from
.factory/library/solidjs-patterns.md. - For transplanted modules: copy from
playground/js/, add TypeScript types, adapt imports. - For new SolidJS code: use stores (createStore) for structured config, signals (createSignal) for Float32Arrays.
- Ensure all workers are cleaned up in
onCleanup(). - Ensure CSS uses the glass morphism design system (custom properties from
a-immersive.css).
Step 5: Verify
- Run all tests:
npm test(or the appropriate test command from services.yaml). - Run typecheck:
npx tsc --noEmit. - Start the Vite dev server:
npx vite --port 5174. - Use agent-browser to visually verify the feature:
- Navigate to
http://localhost:5174?debug=1 - Verify the UI renders correctly
- Interact with the component and verify behavior
- Take screenshots as evidence
- Navigate to
- Compare behavior against the old app at
http://localhost:7331/a-immersive.html?debug=1if needed. - Stop the dev server when done.
Step 6: Commit and Hand Off
- Stage and commit all changes with a descriptive message.
- Report all verification evidence in the handoff.
Example Handoff
{
"salientSummary": "Implemented Joystick component with pointer events and follow mode. Created input-store with joyX/joyY signals. Verified dragging updates position [0,1] and follow mode toggles on double-tap. All 5 tests pass, typecheck clean.",
"whatWasImplemented": "src/components/input/Joystick.tsx (pointer events, position tracking, follow mode toggle), src/stores/input-store.ts (joyX, joyY, isDragging, followMode), src/components/input/JoyMap.tsx (canvas minimap scaffold), tests/e2e/joystick.spec.js (3 tests: drag, follow, clamp)",
"whatWasLeftUndone": "JoyMap trail rendering deferred to layout milestone",
"verification": {
"commandsRun": [
{ "command": "npx tsc --noEmit", "exitCode": 0, "observation": "No type errors" },
{ "command": "npx vitest run tests/e2e/joystick.spec.js", "exitCode": 0, "observation": "3 tests passing" }
],
"interactiveChecks": [
{ "action": "Navigate to localhost:5174?debug=1, drag joystick", "observed": "Joystick dot follows pointer, probe.setInputs matches visual position" },
{ "action": "Double-tap joystick", "observed": "Follow badge appears, pulse animation starts" }
]
},
"tests": {
"added": [
{ "file": "tests/e2e/joystick.spec.js", "cases": [
{ "name": "drag updates position", "verifies": "VAL-JOY-001" },
{ "name": "double-tap toggles follow", "verifies": "VAL-JOY-002" },
{ "name": "input clamping", "verifies": "VAL-JOY-005" }
]}
]
},
"discoveredIssues": []
}
When to Return to Orchestrator
- Feature depends on infrastructure not yet built (e.g., a store that doesn't exist)
- Requirements are ambiguous — cannot determine correct behavior from old code or contract
- Existing bugs in the codebase block this feature
- Need to modify files in
playground/(off-limits without orchestrator approval) - Cannot complete within the session — return with
whatWasLeftUndonedetailed