Frontend Composition Layer Implementation Notes
Implementation Notes
Parent-owned canonical record. Pair: spec eb647c05, architecture f5991916;
plan 4969134b. Draft PR #272
(head t3/frontend-domain-structure-layers, base main, draft, readback
2026-10-22). Skills source /home/stefan/repos/skills main @ 21a3cac.
Execution Reconciliation
| Task | Task Result input identities | Parent Task Gate | Reconciliation | Summary blocker / next action | Architecture Checkpoint | Final acceptance | Code Review |
|---|---|---|---|---|---|---|---|
| T1 IP-518 | skills 21a3cac→6502c093; spec eb647c05 | passed | complete | — | A1 (RAC-1, RAC-2 met) | passed | waived by user |
| T3 IP-519 | HI 4969134b + worktree; spec eb647c05 | passed | complete | — | A1 (RAC-3 met) | passed | waived by user |
| T2 IP-520 | skills 6502c093→82a7667b | passed | complete | — | A2 (RAC-4 met) | passed | waived by user |
| T4 IP-521 | HI 917addf2→3a166f88 | passed | complete | — | A2 (RAC-5 met) | passed | waived by user |
| T5 IP-522 | skills tag 82a7667b; HI e699ee79 | passed | complete | — | A3 (RAC-6 met) | passed | waived by user |
| T6 IP-523 | HI aa0f5870 | passed | complete | — | A4 (RAC-7 met) | passed | waived by user |
Provider Lifecycle Readback
| Date | Task | Observed fact | Readback |
|---|---|---|---|
| 2026-10-22 | IP-518, IP-519 | Work started; draft PR #272 linked | status In Progress, startedAt set, PR link attached |
| 2026-10-22 | IP-520 | Work started | status In Progress, startedAt 13:30:36Z |
| 2026-10-22 | IP-521 | Work started | status In Progress, startedAt 13:36:13Z |
| 2026-10-22 | IP-522 | Work started | status In Progress, startedAt 13:50:08Z |
| 2026-10-22 | IP-523 | Work started | status In Progress, startedAt 13:55:02Z |
| 2026-10-22 | IP-518–IP-523 | PR #272 ready for review (head 875a4044) | see closeout readback |
Summary
frontend-domain-structurenow defines one fixed layer model with a top Composition layer and a## Lint Rulestable (skills6502c093); consumer skills route to it (skills82a7667b, tagsync/frontend-composition-layer-82a7667bef26).- HI ships plugin
frontend-layers(7 rules) as lint assetreact-frontend-layerson thereactPack; the publisher installs detected-Pack source files only where that Pack applies; a parity test binds the synced skill table to the plugin rule names. - Wiki and
BASELINE_CHANGELOG.mdUnreleaseddescribe the change; release classification selects baseline. No CLI version change: CLI 6.3.0 already evaluateswhen: { technologies }on Registry files.
Surprises and Decisions
- T3 plugin reading of the spec:
layer-orderflags only imports of a higher layer; cross-domain imports within one layer (other than features, covered byno-peer-feature) are governed bypublic-entrypoint, not forbidden. Matches the Lint Rules table "targets a higher layer". public-entrypointchecks targets in composition, features, modules, integrations;ui/exempt; a file directly under a layer counts as its own domain.- Prototype/mock folder names match case-insensitively; folder rules fire only for folders that hold lintable files.
route-importsflags any non-composition import from a route file, including a relative CSS import such asimport "./globals.css"in a Next root layout. This follows Q2 and AC-001 exactly; adopting apps move global CSS into Composition or import it from the shared UI package (package imports are ignored).- Parent removed the plugin LICENSE the worker created: the plugin is first-party code, and the anti-slop LICENSE exists only because that plugin is vendored from dmmulroy/anti-slop.
Deviations From Plan
-
Skills publication: another session committed
710f140(PR #271 docs) on local skillsmainabove T2. Parent pushed only82a7667(git push origin 82a7667:refs/heads/main, fast-forward from21a3cac) and taggedsync/frontend-composition-layer-82a7667bef26;710f140stays local for its owner. -
V4.6 (#270, CLI 6.3.0) landed on
mainwith skills pin21a3cac. Parent mergedorigin/maininto this branch (7f3ba6c3) instead of rebasing, to keep the retained spec/architecture commit SHAs reachable; wiki index conflicts resolved by keeping both entries. The pin bump 21a3cac→82a7667 now carries only this delivery's two skills commits. -
T4 scope transfer:
apps/cli/src/registry/publisher/sources/lint.tsadded to T4 owned paths. The publisher gave source files awhenonly from language Packs, so the plugin would install in every Software Scope; AC-010 requires react-only. Fix reusesdependencyConditionwhen no language Pack selects the asset; anti-slop unchanged. -
T4 adds
ignorePatterns: ["tools/oxlint/frontend-layers/**"]to the asset: in a React package withoutsrc/, the installed plugin copy undertools/would otherwise tripknown-top-levelagainst itself. -
User steering 2026-10-22: all prompt/skill edits go through
writing-for-agents; added to T1, T2, T6 guidance and forwarded to the running T1 worker.
Skill Application Evidence
| Task | Skill | Status | How/where | Not-applicable reason and assessment location |
|---|---|---|---|---|
| T1 | writing-for-agents | applied | Description is a front-loaded pointer; SKILL.md steps with checkable completion; rules only in structure.md (Layers table doubles as classifier); positive phrasing for scoped application; removed sediment (peer exception, "labels may differ", "Framework folders vary") | |
| T1 | tdd | applied | Contract test changed first; RED 0/5 → GREEN 5/5 | |
| T1 | wait-what | applied | New prose in ASD-STE100 with glossary terms | |
| T3 | tdd | applied | Rule-by-rule RED→GREEN through real oxlint; tracer-time branches proven by mutation | |
| T3 | codebase-design | applied | Public seam = plugin rule names; scope lookup, locate, resolve, monorepo probe, importRule/folderRule factories private | |
| T3 | quality-types | applied | Tests spawn oxlint 1.86.0 and decode JSON with effect/Schema; no mocked context | |
| T2 | writing-for-agents | applied | Only routing sentences changed; pointers name $frontend-domain-structure; guard test forbids restating rule ids; positive phrasing | |
| T2 | tdd | applied | 5 new assertions RED first, then GREEN 379/379 | |
| T2 | wait-what | applied | ASD-STE100 wording with glossary terms | |
| T4 | codebase-design | applied | Reused anti-slop asset shape; publisher fix reuses dependencyCondition, no new seam | |
| T4 | tdd | applied | Packaging test RED first (twice); builder test recovered | |
| T5 | tdd | applied | Parity test written first; RED against old synced copy; GREEN after sync | |
| T6 | docs-ingest-phase | applied | Private/internal path: owning pages, index check (no change needed), one log entry, both wiki checks | |
| T6 | wait-what | applied | Glossary terms, ASD-STE100 sentences | |
| T6 | writing-for-agents | applied | Pages point to the skill for rules and to hi-cli for alias mapping; rule ids appear only in the skill |
Architecture Conformance Evidence
| Architecture wave id | Target ownership topology observed state | Declared dependency graph observed state | Due criterion ids, evidence, prior-met regression status | Public seam delta | Migration ledger delta | Validation evidence | Verdict or exact drift |
|---|---|---|---|---|---|---|---|
| A1 | Skill structure.md owns layers and Lint Rules; plugin owns mechanics | plugin imports only node:fs, node:path, @oxlint/plugins | RAC-1, RAC-2, RAC-3 met | Lint Rules table; plugin rule names (7, equal sets) | none | skills 373/373; plugin 20/20 | conformant |
| A2 | Consumers reference the skill; catalog owns reach | react Pack → asset → plugin; frontend Pack unchanged | RAC-4, RAC-5 met; RAC-1..3 regression green | asset id react-frontend-layers | none | skills 379/379; publisher/builder 50/50 | conformant |
| A3 | Parity test is the only reader of both sides | synced copy → parity ← plugin | RAC-6 met; prior green | none | none | parity 2/2; skills/prompt tests 79/79 | conformant |
| A4 | Docs and changelog | pages point to skill and hi-cli | RAC-7 met; all prior green | none | ledger empty | wiki checks no new finding; classification baseline; final src/data+src/registry 540/540, check-types, lint, registry:build (185 items) | zero drift |
Acceptance Criteria Status
| Criterion | Status | Notes |
|---|---|---|
| AC-001 | met | structure.md § Layers, § Route Layer, § Server; skills contract test |
| AC-002 | met | § Composition |
| AC-003 | met | § Features, § Composition, § Integrations |
| AC-004 | met | § Domains and Public Entrypoints, § Layers, § UI, § Server |
| AC-005 | met | ## Lint Rules with the seven ids; parity test |
| AC-006 | met | react/structure.md § Composition Placement |
| AC-007 | met | SKILL.md Workflow steps 1 and 6, Completion |
| AC-008 | met | openai.yaml, create-plan, implement-spec, ask-hi, hi-cli; skills suite 379/379 |
| AC-009 | met | publisher test: pack-react depends on lint-react-frontend-layers, pack-frontend does not |
| AC-010 | met | byte-identical copy at ~/{{scope.path}}/tools/oxlint/frontend-layers/index.mjs, when: {technologies:["react"]} |
| AC-011 | met | frontend-layers.test.ts pass/fail tree per rule (real oxlint 1.86.0) |
| AC-012 | met | no-route-layer package → zero diagnostics |
| AC-013 | met | no-src/ root; export from, import(), require(), relative and @/ |
| AC-014 | met | workspaces and pnpm monorepos flag ui/; single repo allows src/ui/ |
| AC-015 | met | *.test.ts, *.stories.tsx reported |
| AC-016 | met | plugin test (rule off) and builder test with frontend-layers/ and frontend-layers-apps-web/ keys |
| AC-017 | met | skill-parity.test.ts: equal sets pass; in-memory missing id fails |
| AC-018 | met | skill-packs, skill-reference, hooks, runbook; BASELINE_CHANGELOG.md Unreleased |
Behavior Verification Evidence
| Story and criterion | Ref | Channel | Scenario | Status | Durable evidence or exact blocker |
|---|---|---|---|---|---|
| IP-516 AC-011–AC-016 | plugin | CLI (real oxlint 1.86.0) | generated fixture trees per rule and edge case | pass | apps/cli/src/data/lint/frontend-layers/frontend-layers.test.ts |
| IP-516 AC-016 | builder | CLI (real oxlint on Built config) | local off override at . and apps/web | pass | apps/cli/src/registry/builders/lint.test.ts |
No UI surface changed; UI Evidence not applicable. No runtime boundary beyond the oxlint CLI; runtime validation not required.
Manual Review Checklist
| Area | Check | How to perform | Expected result |
|---|---|---|---|
| Skill | Read apps/cli/skills/agnostic/frontend/frontend-domain-structure/references/structure.md | Compare Layers table and Lint Rules with SPEC AC-001–AC-005 | Same model; seven rule ids |
| Plugin | Run plugin tests | bun run --cwd apps/cli vitest run --config vitest.config.ts src/data/lint/frontend-layers | 22 pass |
| Real app | Lint a React app, e.g. pegasus apps/web, with the plugin | add asset via hi update after Baseline release, run managed lint | Errors name frontend-layers/<rule>; non-React packages silent |
| Override | Set frontend-layers-apps-web/route-imports: "off" in apps/web/oxlint.local.ts | rerun lint | That rule silent |
| Release | Baseline classification | node apps/cli/scripts/classify-release-impact.mjs --base origin/main --head HEAD | releaseKind: baseline |
Out of Scope Observations
-
ask-hireferences/baseline.md:159says lint assets copy under.devpunks/specs/lint/assets/; local JS plugins (anti-slop, frontend-layers) install at<scope>/tools/oxlint/. Pre-existing wording, outside this task. -
hi-climanaged-lint says a JS-plugin rule inoxlint.local.tsmust name a plugin alias that file declares; the newoffoverride uses the alias the Built config declares. T4's AC-016 builder test proves the behavior. -
HI PostToolUse lint hook reports "Lint input paths must be repository-relative" when editing files in
/home/stefan/repos/skills; harmless, the files are outside this worktree.
Steering
| Date | Feedback | Changes |
|---|---|---|
| 2026-10-22 | User rule: every prompt/skill edit goes through writing-for-agents | Added to T1, T2, T6 guidance; evidence rows recorded |
| 2026-10-22 | User waived the delivery Code Review gate ("fuck that step just go through now") after the two-axis Codex review ran 47 min without output | Review run review-fbbc40c71b27af76-ordinal-1 stopped; no report retained; review_count stays 0; PR marked ready without a review report |
| 2026-10-22 | User-approved request (scoped AGENTS.md thread): at closeout, after review, re-pin skills to 710f140 (tag sync/scoped-skills-catalogue-710f140e2ff8), sync, update 82a7667 quotes, add one BASELINE_CHANGELOG.md Unreleased line, re-run release classification | Planned closeout step; outside the frozen review target. Verified: tag on remote resolves to 710f140e2ff8; delta 82a7667..710f140 is only skills/agnostic/cli/hi-cli/references/post-command-flow.md and tests/scoped-agent-guidance.contract.test.mjs |
Remaining Work
- None in this delivery. Code Review waived by the user; no review report exists. Merge of #272 publishes the Baseline (frontend composition layer plus the
710f140hi-cli change). - Docs ingest: no-op; T6 already updated the owning wiki pages and log.