Capability identity:apps/wiki/content/docs/project/specs/cli/entities-layer-model.
The capability replaces the Modules-as-domain layer model of
frontend-domain-structure with a repository-like Entity layer below
Feature, makes Module business-agnostic, enforces the model with the
frontend-layers lint plugin, renames the ci-solution-structure package
tiers to the same words, ships the change as one Registry Baseline, and
adopts it in three consumer repositories
(Q1,
Q7,
Q13,
Q18,
Q52).
Actors and outcome: an operating agent places frontend code with the
skill; managed lint reports each misplacement; reviewers (CTO, team) check
one structure; consumer maintainers receive the rules through hi update
and migrate by running the skill. Outcome: every frontend file has one legal
owner by layer and domain, and the same words name app layers and package
tiers.
In scope:
wearedevpunks/skills: skills/agnostic/frontend/frontend-domain-structure/**
and the restatements of Q30.
collective-intelligence-platform/ci-app: packages/public/lint/skills/ci-solution-structure/**,
README, CHANGELOG.md, release of @collective-intelligence/lint 0.2.0
(Q29,
Q43).
wearedevpunks/harness-intelligence: apps/cli/src/data/lint/frontend-layers/**,
the react-frontend-layers asset, the oxfmt ignore merge, both skill sync
pins, HI wiki restatements, BASELINE_CHANGELOG.md, the Baseline release.
Consumers, one pull request each
(Q51):
wearedevpunks/devpunks-intelligence PR #79,
collective-intelligence-solutions/emera-platform,
Collective-Intelligence-Solutions/apito.
Non-goals: a warn transition for new rules
(Q41); a local
plugin-copy stopgap (Q42);
restating the app layer model inside ci-solution-structure
(Q43); stricter
lint presets in the devpunks-intelligence workspaces
(Q48); a lint
check for product terms in Modules
(Q24); renaming
pages/ (Q5).
Composition: the top frontend layer: global root providers, proxy and
routing (access, shells, pages).
Shell: the layout of one route group in composition/routing/shells/<name>/.
It replaces Surface.
Page Template: the component a route renders, in composition/routing/pages/<page>/.
Feature: a user-facing capability that combines Entities.
Entity: a repository-like domain of one business entity.
Data Source: a port implementation in a remote/ or simulated/
subpath of an Entity or Feature.
Module: business-agnostic code with no product terms.
Integration: a third-party adapter.
UI: primitives; only the shared UI package holds them in a monorepo.
Axioms: each layer imports only lower layers (app or routes →
composition → features → entities → modules → integrations → ui); no Feature
imports a Feature and no Entity imports an Entity; only Composition and tests
import a Data Source; a remote/ Data Source exposes browser code through
index.ts and server code through server.ts; an index file only
re-exports.
HI apps/cli/src/data/lint/frontend-layers/{index.mjs,frontend-layers.test.ts,skill-parity.test.ts}; apps/cli/src/data/catalog/lint.ts:237-270; packs.ts:333
HI .github/workflows/release.yml; apps/wiki/content/docs/project/runbooks/ci-verification-and-publication.md#registry-publication; apps/cli/scripts/{sync-skills-repo,sync-package-skills}.mjs; apps/cli/src/data/catalog/package-skills.ts:18
Anchors: Q12,
Q29,
Q41,
Q43,
Q52; S6, S7, S9.
Conclusion: the rule text and the rule code ship in one Baseline, so a
consumer never receives rules that its installed skill does not explain; the
consumers start only after the Registry publishes that Baseline.
Block selector / component
Owner
State and authority
Interface / dependency
Supported constraint and source
ARC-001 Layer model text
wearedevpunks/skills
frontend-domain-structure is the authority for layer meaning; structure.md## Lint Rules table is the rule-id authority
Synced into HI apps/cli/skills/agnostic/frontend/frontend-domain-structure/ at tag sync/entities-layer-model-<sha12>
One legal owner per file; Q1–Q11, Q19, Q20, Q23, Q24, Q44, Q50
ARC-002 frontend-layers plugin
HI apps/cli
Plugin rule ids equal the skill table (skill-parity.test.ts)
Copied to <scope>/tools/oxlint/frontend-layers/index.mjs by the react-frontend-layers asset of the react Pack
Enforcement; Q12, Q26, Q27, Q41, Q42, Q50
ARC-003 Copied-plugin formatting
HI installer
Managed JSON merge into an existing consumer .oxfmtrc.json only
ignorePatterns += **/tools/oxlint/**; otherwise a report row
Copies stay byte-current; Q28, Q49
ARC-004 Restatements and migration map
wearedevpunks/skills, HI wiki
references/migration.md is the migration authority; BASELINE_CHANGELOG.md links it
Q30 file list
Q30, Q41, Q45
ARC-005 Package tiers
ci-app
ci-solution-structure names tiers; lint code has no tier names
npm @collective-intelligence/lint 0.2.0 → HI collectiveIntelligenceLintVersion → sync:package-skills
Same words app/package; Q13, Q21, Q29, Q43
ARC-006 Baseline release
HI main
A changed BASELINE_CHANGELOG.md on main selects a Registry Baseline; latest never moves back
FLOW-001-STEP-001: skills text and migration map merge; the sync tag pins them (Q45, Q30).
FLOW-001-STEP-002: ci-app merges the tier rename and publishes 0.2.0 (Q29).
FLOW-001-STEP-003: HI updates the plugin, the asset, the oxfmt merge and both pins; parity holds (Q26, Q28, Q43).
FLOW-001-STEP-004: the HI merge to main publishes the Baseline; publication is complete only after readback (S9).
FLOW-001-STEP-005: each consumer runs hi update; new rules arrive as error (Q41).
FLOW-001-STEP-006: the consumer migrates by the skill (Q41, Q52).
FLOW-001-STEP-007: managed lint, type-check, tests and build pass; one PR stays open for review (Q51).
Conclusion: STEP-003 depends on STEP-001 and STEP-002 because the parity test
and the package-skill pin need their published sources; STEP-005 depends on
STEP-004 because consumers read only the published Registry.
app/ | routes/ route layer; imports only composition/composition/ providers/ global root providers only Q3 proxy/ routing/ one per app Q20 index.ts access/ shells/<name>/ one layout per folder Q4 pages/<page>/ index.ts, route.tsx, template; Q5 components/ hooks/ when neededfeatures/<capability>/[<sub>/] remote/ simulated/ when owned Q6 Q23entities/<entity>/[<sub>/] contract, port, providers, Q7 Q44 remote/{index,server}.ts, simulated/, views/modules/<x>/ no product terms Q8 Q24integrations/<x>/ third-party only Q8ui/ shared UI package in a monorepo Q19server/ outside the layers
An import targets a higher layer (rank route 0, composition 1, features 2, entities 3, modules 4, integrations 5, ui 6), or a file outside entities/*/remote/, features/*/remote/ and app/api/ imports server/.
route-imports
unchanged
A route file imports a folder other than composition/; an app/api/ handler imports a folder other than server/.
no-peer-feature
unchanged
features/<a>/ imports features/<b>/.
no-peer-entity
new
entities/<a>/ imports entities/<b>/.
public-entrypoint
changed
A cross-domain import targets a file other than a domain or subpath index.ts(x), or remote/server.ts; ui/ is exempt.
data-source-imports
new
A non-test file outside composition/ and outside the same Data Source imports a remote/ or simulated/ subpath, also of its own domain; a domain or subpath index re-export counts (#299).
index-reexports-only
new
An index.ts(x) holds a statement other than an import or re-export.
no-self-index-import
new
A non-test file imports its own folder's ./index or ..
layout-placement
new
A layout.tsx exists outside composition/routing/shells/<name>/ (route-layer app/**/layout.tsx files that import only composition stay legal).
composition-shape
new
A composition/ child is not providers, proxy or routing.
no-prefix-siblings
new
Two top-level domains of one layer share a <word>- prefix.
no-prototype-folder
changed
A folder named *prototype* or mock* exists anywhere.
known-top-level
changed
A top-level folder is not app, routes, composition, features, entities, modules, integrations, ui or server.
ui-placement
unchanged
An app-local ui/ folder exists in a monorepo.
A test file has a base name that contains .test., .spec. or .stories.;
only data-source-imports and no-self-index-import exempt it
(Q27).
Plugin helpers needed: subpath-aware locate, a file-name-aware path rule, a
Program.body content rule, a test-file predicate
(Q26 code consequence).
The layout-placement route-layer clarification follows from
Q19 (route files
stay legal) and is recorded here as an interpretation, not a new decision.
Consumers receive rules only through hi update (FLOW-001-STEP-005); skill text through sync tags; ci-solution skill through npm pin (R2 checkpoint, Q43)
Rule text equals rule code
None
2. Critical execution paths
FLOW-001 order: skills and ci-app before HI; HI release before consumers (S9)
Parity test and pins resolve
None
3. State ownership and authority
Skill table owns rule ids; Registry owns published Baseline; consumer owns its layout (ARC-001, ARC-006)
One authority per artifact
None
4. Transaction and side-effect boundaries
One HI merge publishes one Baseline carrying both skill and plugin (R1 checkpoint)
No half-shipped rule set
None
5. Concurrency and stale state
Not applicable: no shared runtime writer; Registry latest never moves back (S9)
—
None
6. Idempotency and retries
registry:publish converges on rerun; hi update converges on rerun (S9)
Safe re-release
None
7. Partial failure and recovery
Kept local edits and missing oxfmt config are reported (Q28, Q49); consumer PR stays open until checks pass (Q51)
Visible residual state
None
8. Execution lifetime and durability
Not applicable: static source and config changes
—
None
9. Lifecycle and dependency transitions
Consumers on old paths get error findings and a migration map (Q41, Q45); emera tier tags migrate in this delivery (Q52)
Migration is discoverable
None
10. Completion and observability
Registry readback, managed lint, hi checkcurrent, one PR per consumer (S9, Q51)
Spec-code coverage: complete for OUT-001…OUT-006 and AC-001…AC-016.
Models: no accepted flow matches the model-checking trigger (no two writers on shared state, no retry over client state, no delivery guarantee); section removed.
Mermaid parsing: mermaid@11.15.0mermaid.parse in Node parsed the FLOW-001 sequence diagram; the system-map flowchart needs a DOM (DOMPurify.addHook), which is unavailable in this Node run (no jsdom installed). Flowchart syntax was checked by reading; wiki rendering is the remaining check.
Existing spec agreement: SPEC.md compiled from this artifact; codes validated as one pair.
Remaining limits: consumer source trees beyond the portal (emera-platform, apito) are migrated by the skill at delivery; their exact moves are not design inputs.