Harness Intelligence Wiki
SpecsCLIFrontend Composition Layer

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

TaskTask Result input identitiesParent Task GateReconciliationSummary blocker / next actionArchitecture CheckpointFinal acceptanceCode Review
T1 IP-518skills 21a3cac→6502c093; spec eb647c05passedcomplete—A1 (RAC-1, RAC-2 met)passedwaived by user
T3 IP-519HI 4969134b + worktree; spec eb647c05passedcomplete—A1 (RAC-3 met)passedwaived by user
T2 IP-520skills 6502c093→82a7667bpassedcomplete—A2 (RAC-4 met)passedwaived by user
T4 IP-521HI 917addf2→3a166f88passedcomplete—A2 (RAC-5 met)passedwaived by user
T5 IP-522skills tag 82a7667b; HI e699ee79passedcomplete—A3 (RAC-6 met)passedwaived by user
T6 IP-523HI aa0f5870passedcomplete—A4 (RAC-7 met)passedwaived by user

Provider Lifecycle Readback

DateTaskObserved factReadback
2026-10-22IP-518, IP-519Work started; draft PR #272 linkedstatus In Progress, startedAt set, PR link attached
2026-10-22IP-520Work startedstatus In Progress, startedAt 13:30:36Z
2026-10-22IP-521Work startedstatus In Progress, startedAt 13:36:13Z
2026-10-22IP-522Work startedstatus In Progress, startedAt 13:50:08Z
2026-10-22IP-523Work startedstatus In Progress, startedAt 13:55:02Z
2026-10-22IP-518–IP-523PR #272 ready for review (head 875a4044)see closeout readback

Summary

  • frontend-domain-structure now defines one fixed layer model with a top Composition layer and a ## Lint Rules table (skills 6502c093); consumer skills route to it (skills 82a7667b, tag sync/frontend-composition-layer-82a7667bef26).
  • HI ships plugin frontend-layers (7 rules) as lint asset react-frontend-layers on the react Pack; 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.md Unreleased describe the change; release classification selects baseline. No CLI version change: CLI 6.3.0 already evaluates when: { technologies } on Registry files.

Surprises and Decisions

  • T3 plugin reading of the spec: layer-order flags only imports of a higher layer; cross-domain imports within one layer (other than features, covered by no-peer-feature) are governed by public-entrypoint, not forbidden. Matches the Lint Rules table "targets a higher layer".
  • public-entrypoint checks 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-imports flags any non-composition import from a route file, including a relative CSS import such as import "./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 skills main above T2. Parent pushed only 82a7667 (git push origin 82a7667:refs/heads/main, fast-forward from 21a3cac) and tagged sync/frontend-composition-layer-82a7667bef26; 710f140 stays local for its owner.

  • V4.6 (#270, CLI 6.3.0) landed on main with skills pin 21a3cac. Parent merged origin/main into 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.ts added to T4 owned paths. The publisher gave source files a when only from language Packs, so the plugin would install in every Software Scope; AC-010 requires react-only. Fix reuses dependencyCondition when no language Pack selects the asset; anti-slop unchanged.

  • T4 adds ignorePatterns: ["tools/oxlint/frontend-layers/**"] to the asset: in a React package without src/, the installed plugin copy under tools/ would otherwise trip known-top-level against 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

TaskSkillStatusHow/whereNot-applicable reason and assessment location
T1writing-for-agentsappliedDescription 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")
T1tddappliedContract test changed first; RED 0/5 → GREEN 5/5
T1wait-whatappliedNew prose in ASD-STE100 with glossary terms
T3tddappliedRule-by-rule RED→GREEN through real oxlint; tracer-time branches proven by mutation
T3codebase-designappliedPublic seam = plugin rule names; scope lookup, locate, resolve, monorepo probe, importRule/folderRule factories private
T3quality-typesappliedTests spawn oxlint 1.86.0 and decode JSON with effect/Schema; no mocked context
T2writing-for-agentsappliedOnly routing sentences changed; pointers name $frontend-domain-structure; guard test forbids restating rule ids; positive phrasing
T2tddapplied5 new assertions RED first, then GREEN 379/379
T2wait-whatappliedASD-STE100 wording with glossary terms
T4codebase-designappliedReused anti-slop asset shape; publisher fix reuses dependencyCondition, no new seam
T4tddappliedPackaging test RED first (twice); builder test recovered
T5tddappliedParity test written first; RED against old synced copy; GREEN after sync
T6docs-ingest-phaseappliedPrivate/internal path: owning pages, index check (no change needed), one log entry, both wiki checks
T6wait-whatappliedGlossary terms, ASD-STE100 sentences
T6writing-for-agentsappliedPages 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 idTarget ownership topology observed stateDeclared dependency graph observed stateDue criterion ids, evidence, prior-met regression statusPublic seam deltaMigration ledger deltaValidation evidenceVerdict or exact drift
A1Skill structure.md owns layers and Lint Rules; plugin owns mechanicsplugin imports only node:fs, node:path, @oxlint/pluginsRAC-1, RAC-2, RAC-3 metLint Rules table; plugin rule names (7, equal sets)noneskills 373/373; plugin 20/20conformant
A2Consumers reference the skill; catalog owns reachreact Pack → asset → plugin; frontend Pack unchangedRAC-4, RAC-5 met; RAC-1..3 regression greenasset id react-frontend-layersnoneskills 379/379; publisher/builder 50/50conformant
A3Parity test is the only reader of both sidessynced copy → parity ← pluginRAC-6 met; prior greennonenoneparity 2/2; skills/prompt tests 79/79conformant
A4Docs and changelogpages point to skill and hi-cliRAC-7 met; all prior greennoneledger emptywiki 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

CriterionStatusNotes
AC-001metstructure.md § Layers, § Route Layer, § Server; skills contract test
AC-002met§ Composition
AC-003met§ Features, § Composition, § Integrations
AC-004met§ Domains and Public Entrypoints, § Layers, § UI, § Server
AC-005met## Lint Rules with the seven ids; parity test
AC-006metreact/structure.md § Composition Placement
AC-007metSKILL.md Workflow steps 1 and 6, Completion
AC-008metopenai.yaml, create-plan, implement-spec, ask-hi, hi-cli; skills suite 379/379
AC-009metpublisher test: pack-react depends on lint-react-frontend-layers, pack-frontend does not
AC-010metbyte-identical copy at ~/{{scope.path}}/tools/oxlint/frontend-layers/index.mjs, when: {technologies:["react"]}
AC-011metfrontend-layers.test.ts pass/fail tree per rule (real oxlint 1.86.0)
AC-012metno-route-layer package → zero diagnostics
AC-013metno-src/ root; export from, import(), require(), relative and @/
AC-014metworkspaces and pnpm monorepos flag ui/; single repo allows src/ui/
AC-015met*.test.ts, *.stories.tsx reported
AC-016metplugin test (rule off) and builder test with frontend-layers/ and frontend-layers-apps-web/ keys
AC-017metskill-parity.test.ts: equal sets pass; in-memory missing id fails
AC-018metskill-packs, skill-reference, hooks, runbook; BASELINE_CHANGELOG.md Unreleased

Behavior Verification Evidence

Story and criterionRefChannelScenarioStatusDurable evidence or exact blocker
IP-516 AC-011–AC-016pluginCLI (real oxlint 1.86.0)generated fixture trees per rule and edge casepassapps/cli/src/data/lint/frontend-layers/frontend-layers.test.ts
IP-516 AC-016builderCLI (real oxlint on Built config)local off override at . and apps/webpassapps/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

AreaCheckHow to performExpected result
SkillRead apps/cli/skills/agnostic/frontend/frontend-domain-structure/references/structure.mdCompare Layers table and Lint Rules with SPEC AC-001–AC-005Same model; seven rule ids
PluginRun plugin testsbun run --cwd apps/cli vitest run --config vitest.config.ts src/data/lint/frontend-layers22 pass
Real appLint a React app, e.g. pegasus apps/web, with the pluginadd asset via hi update after Baseline release, run managed lintErrors name frontend-layers/<rule>; non-React packages silent
OverrideSet frontend-layers-apps-web/route-imports: "off" in apps/web/oxlint.local.tsrerun lintThat rule silent
ReleaseBaseline classificationnode apps/cli/scripts/classify-release-impact.mjs --base origin/main --head HEADreleaseKind: baseline

Out of Scope Observations

  • ask-hi references/baseline.md:159 says 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-cli managed-lint says a JS-plugin rule in oxlint.local.ts must name a plugin alias that file declares; the new off override 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

DateFeedbackChanges
2026-10-22User rule: every prompt/skill edit goes through writing-for-agentsAdded to T1, T2, T6 guidance; evidence rows recorded
2026-10-22User waived the delivery Code Review gate ("fuck that step just go through now") after the two-axis Codex review ran 47 min without outputReview run review-fbbc40c71b27af76-ordinal-1 stopped; no report retained; review_count stays 0; PR marked ready without a review report
2026-10-22User-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 classificationPlanned 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 710f140 hi-cli change).
  • Docs ingest: no-op; T6 already updated the owning wiki pages and log.

On this page