Imported from marceloterra1983/Farol (
src/Web/Farol.Portal/ClientApp/AGENTS.md). Install upstream withnpx skills add marceloterra1983/Farol --skill ClientApp. Copyright stays with the author.
ClientApp/AGENTS.md
Merges with the root AGENTS.md. Only what is true inside the
browser app lives here, so the root does not carry it on every call.
Ownership is per module, and the fence checks it
A module directory under src/modules/<id>/ has one owner at a time. Editing another
module's directory means the branch is mis-scoped. Eleven modules exist today: agentes,
architecture, canonicos, datahub, ferramentas, health, host, manual, mercado,
publicacao and resources.
src/moduleBoundaries.test.ts is the fence, and the .NET twin of
ProjectReferenceBoundaryTests. It carries the src/lib ratchet.
Inside modules/mercado/, ownership is per subfolder. ADR-0032
is implemented locally: lwc/, kline/ and panels/ each have one owner. The internal
fence rejects imports between them, including type-only imports, with zero allowed debt.
chart/ remains shared; alerts/ and __fixtures__/ remain separate, and
RealTimePage.tsx and the hub/state/history infrastructure stay at the module root.
The two engines and their tests live with their owner. DrawingToolbar.css stays in
chart/ because both engines use it. Moving a path also moves its ratchet entry and
updates the tests that read source files and the realm plugin's build/dev entry paths.
Confirm the directories before describing them: earlier drafts claimed structure that did not exist. Local implementation does not imply deployment or GitHub publication.
Shared surfaces need coordination
No worktree isolates these; changing one affects every module:
modules/mercado/chart/, components/PortalComponents.tsx, hooks/usePolling.ts,
lib/http.ts, styles/tokens.css. Their .NET counterpart is PortalContracts.cs.
Two ratchets watch file size here
src/fileSizeRatchet.test.ts judges .ts and .tsx against the table shared with the .NET
side; each side scans only its own extensions. And TestFileRatchetTests covers the test
files, where the three largest in this app each exceed the module they test.
Commands
npm test -- --run for vitest; npm run build for the production bundle. The browser suites
are separate and slower: test:smoke, test:e2e, test:ativos:browser. Run the fast one on
every change and a browser suite only when the change is visual or navigational.
The compiler is not npx tsc
Without node_modules on the path, npx tsc reports zero errors because it fetches a bare
compiler that sees no project. Use ./node_modules/.bin/tsc --noEmit.