Skip to content

docs(agents): add Effect and UI review specs for /code-review - #64

Merged
allisonmahmood merged 2 commits into
mainfrom
docs/effect-review-skills
Aug 28, 2026
Merged

allisonmahmood merged 2 commits into
mainfrom
docs/effect-review-skills

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Aug 28, 2026 •

Copy link
Copy Markdown
Owner

The Effect v4 port map (#54) settled on no Macroscope: t3code's two review specs become repo skills that /code-review can run. Until now the Standards axis had nothing Effect-specific to read.

Adapted effect-service-conventions and ui-consistency into internal skills under .agents/skills/ (symlinked from .claude/skills/, outside skills/ so the CLI build does not ship them). Macroscope frontmatter, tools, and include globs are dropped; "do not demand unrelated repository-wide cleanup" is kept once per skill.

The Effect spec uses the capability package names #54 settled, notes that Effect is not yet imported and binds each package as the port lands, draws its examples from the real storage modules, and carries the settled port shapes (HttpApi in packages/api with typed error responses, @effect/sql-pg with SqlSchema, @effect/vitest layers over mocks, Config per capability, YAGNI until a second consumer).

The UI spec targets the server-rendered pages this repo actually serves: htmlPage for first-party chrome, renderDraftWrapper named as the standing exception it is, plus the draft frame's CSP, escaping, unwatched readers, and scroll ownership. t3code's component-app rules — fades, masks, scrollbar lanes, runtime theme tokens, tabs and swatches — are gone rather than hedged.

AGENTS.md gains a "Review specs" pointer telling the Standards axis which file to hand its sub-agent, and it is the single home for the per-skill triggers. docs/SKILL_DISTRIBUTION.md lists the new internal skills.

Resolves #59

Made by Claude Fable 5 via Claude Code (workflow subagent).

Adapt t3code's two Macroscope review specs into internal repo skills that
/code-review's Standards axis reads: effect-service-conventions and
ui-consistency, under .agents/skills with .claude/skills symlinks.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0191mSZ5Nrvn7FMoNMRbKxhS
@github-actions github-actions Bot added area:docs Touches the docs area size:m 100-500 changed lines labels Aug 28, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Two-axis review of origin/main...origin/docs/effect-review-skills (5152409), plus the extra passes asked for on this PR: issue #59 intent vs method, YAGNI, and whether these skills fit Patchy's Effect v4 port and UI direction rather than t3code's product.

Seven review agents ran in parallel (Standards, Spec, method, YAGNI, Effect fit, UI fit, writing-for-agents). Axes are not merged.


Standards

Wiring matches this repo: internal skills under .agents/skills/, metadata.internal, .claude/skills/ symlinks, outside public skills/ so the CLI bundle does not ship them. Commit title matches the convention.

Documented-standard (hard)

  • writing-for-agents / SKILL-MECHANICS.md — user-invoked description is a one-line human summary with trigger lists stripped. Both skill descriptions still encode the invocation branch ("Read by /code-review's Standards axis for diffs that create, move, refactor, or consume an Effect service" / "…touch rendered HTML, CSS, or page controls"). Those branches already live in AGENTS.md → Review specs. Same fact, two homes (skill-design-principles: one home per fact).

  • skill-design-principles — don't bandaid a class of problem. ui-consistency keeps t3code mechanics and papers over them: "where a rule assumes one that does not (a shared primitive, a build-time CSS pipeline), apply its ownership principle to the page shell and skip its mechanics." Same file still names tabs, resize handles, swatches. render.ts has htmlPage, pills, notes, and a sandboxed draft frame — not those controls. (writing-for-agents relevance.)

  • Cleanup guardrail restated three times (issue Turn t3code's Macroscope review specs into repo skills #59 asked to keep it once): each skill intro's "Do not demand unrelated repository-wide cleanup", plus UI Change discipline "Do not turn a focused PR into a demand for unrelated legacy cleanup."

  • effect-service-conventions Errors → "startup reconciliation that repairs multiple independent entities". writing-for-agents relevance: no such Effect service exists here; it is not in Effect v4 port map #54's settled list either.

Judgement (smells)

  • Duplicated Code — both Reporting sections are the same shape ("anchor… cite the rule… With no findings, report … on one line").

  • Speculative Generality — Effect skill lists packages/api, auth, patches, serving, sql that are not on disk. Intentional vs Effect v4 port map #54, but it will drift until the CONTEXT-MAP redraw (docs/agents/domain.md still says draft, @patchy/db).

  • AGENTS.md pointer — "alongside the smell baseline" caches /code-review's process (writing-for-agents: the environment is the source of truth). Cut that clause.


Spec

Quoted against issue #59: "adapt effect-service-conventions.md and ui-consistency.md into two skills under this repo's skills directory that /code-review can run, lightly adapted (no Macroscope frontmatter or tools; our package names; "do not demand unrelated repository-wide cleanup" kept). Wire them into the code-review skill's standards axis. Ship a writing-for-agents pass over both."

(a) Missing / partial

  • "Ship a writing-for-agents pass over both." Frontmatter is right (disable-model-invocation: true). The pass did not reach the bodies: descriptions still carry trigger lists; UI still ships fade/mask, runtime-token, filter on html/body, and "semantic color tokens" bullets that render.ts does not own.

(b) Scope creep

  • Spec asked for two skills + /code-review wiring. Diff also edits docs/SKILL_DISTRIBUTION.md. Adjacent (this is how the repo inventories internal skills), not requested.

(c) Looks implemented, implementation is off

  • "Lightly adapted" + our package names. Macroscope frontmatter/tools are gone; the cleanup sentence is kept; AGENTS.md Review specs correctly hands files to the Standards sub-agent (the in-repo way to wire an out-of-repo /code-review). Destination capability names (api, auth, patches, serving, sql) match Effect v4 port map #54, which is a fair reading of "our package names." The examples do not: PgPatchStore.ts / MemoryPatchStore.ts, makeS3BlobStore / layerS3 in BlobStore.ts. Live storage is filesystem + Azure, not S3; there is no in-memory patch store.

  • UI is not a light adapt, and not a rewrite either. Spec named the two t3code files. The UI skill retitles sections (htmlPage / render.ts / packages/serving) and adds "skip its mechanics," then still ships the inapplicable scroll-fade and theme-pipeline rules instead of deleting them.

Placement under .agents/skills/ (not published skills/) is the correct reading of "this repo's skills directory" given SKILL_DISTRIBUTION.md.


Method

Issue #59 asked for light adaptation of both. That method is right for Effect (t3code is the chosen Effect reference). It is the wrong method for UI (t3code is an Electron + Tailwind + Base UI app).

Effect mostly did the intended cut: Macroscope YAML gone, infra/relay exception gone, Atom runtimes gone, WorkspacePaths → PatchStore, Pty adapters → PgPatchStore / MemoryPatchStore, and the port caveat is the right sentence:

Effect is not yet imported in source: the Effect v4 port lands package by package (issue #54)

Dirt left in the method: examples invented from the map instead of the tree (S3, TokenStore barrel, MemoryPatchStore), and t3code's multi-entity startup-repair rule kept.

UI is the same seven sections in the same order with owners renamed. Real Patchy lines that landed: htmlPage, iframe sandbox/title, render.test.ts, draft-frame vs document scroll. Still t3code, not in render.ts: resize handle / swatch, emitted class-string dead-selector hunt, empty :is(), dynamic fade vs static mask, native scrollbar lane. Worse: renderDraftWrapper is a second document on purpose (own <head>, locked CSP). The spec's "reconstructed skeleton is a finding" rule would flag the one real exception. CSP, srcdoc, no-JS, form-action never appear.

Wiring method is correct: do not fork the external /code-review skill; the AGENTS pointer is how this repo hands standards files to it.


YAGNI

Effect skill is the real port contract with one t3code organ left in. Keep namespace imports, single-file Context.Service + inline interface + make/layer, Foo["Service"], yield* Foo.Foo, runPromise only at server/CLI/unported seams, Schema.TaggedErrorClass / catchTags, no shims, no mocks of core logic. Those are the next PRs.

Cut from Effect: the startup-reconciliation bullet (retry-before-readiness, isolate one bad entity, tests for both paths). Patchy startup is listen + an unref'd hourly sweep. Sweep already continues on per-draft failure and is not a readiness gate. Reviewers will invent a boot repair loop.

UI skill still reads like a component app pasted onto render.ts. Keep: htmlPage over a second skeleton with renderDraftWrapper named as the exception; shared pills/notes/panels; frame owns scroll; iframe sandbox/title; no filter on html/body; interpolated-template / empty-selector checks; tests in render.test.ts when structure/escaping change.

Cut from UI: tab / resize handle / swatch / image-target; fade, mask, scrollbar-lane; runtime token bridges; theme forks; light/dark evidence; safe-area; animations; hover/disabled color indirection; contrast-token mixing cookbook. Hedge "shared class when geometry repeats" for later auth chrome — do not invent a design system.

Both skills repeat change-discipline + reporting. Keep a two-line closer on each. Auth UI, when it arrives, is still a page shell, not primitives.


Effect v4 fit

Mostly Patchy's Effect style. It will not invent MCP, Atom, relay, or Electron. It will invent t3code-shaped ports, test fakes, and boot repair unless those lines go.

Kept as style: namespace effect/* imports; single-file Context.Service; yield* Foo.Foo; Schema.TaggedErrorClass; test layers not mocks; runPromise named as the port seam between a moved package and one that has not.

Still t3code product: the startup-reconciliation bullet. An agent will add retry/isolate-per-entity to limiter, sweep, or expiry.

Still t3code service shape:

  • Barrel example is still export * as TokenStore from "./tokenStore.ts".
  • Abstract-port mega-file: "makeS3BlobStore and layerS3 in BlobStore.ts." Storage here is filesystem + Azure in separate modules. Combined with "do not flag genuinely separate implementation/adapter modules," this recreates RelayClient-style ports.
  • MemoryPatchStore.ts next to PgPatchStore.ts pushes in-memory fakes over it.layer + real Postgres.

Missing for this port (an agent will improvise Fastify/pg/mocks): HttpApi (/api/* in packages/api) vs HttpRouter pages in serving, and HttpApi error mapping; @effect/sql-pg + SqlSchema, Effect Migrator, Postgres only; it.effect / it.layer, HttpApiTest, NodeHttpServer.layerTest, TestClock, Scope; Effect Config per capability / Redacted; YAGNI — a capability with one consumer stays a module; wire schemas in packages/api; core = html-policy + ids.

The smallest fix: delete the reconciliation bullet, retarget examples (PatchStore, filesystem/Azure, limiter/sweep), add four lines for HttpApi error mapping, SqlSchema, it.layer, and YAGNI-until-second-consumer. Do not turn this into an Effect handbook; node_modules/effect/AGENTS.md is that.


UI direction fit

The skill is t3code's desktop checklist with a Patchy caption. The hedge does not rewrite the rules.

Genuinely Patchy (thin): prefer htmlPage; keep iframe sandbox/title; served-draft frame owns scrolling (body { overflow: hidden }, iframe flexes, footer is flex: none); no filter on html/body (it would tint the iframe); test structure/escaping in render.test.ts.

t3code residue that will mis-train: resize handle, swatch, tab; fade/mask/scrollbar-lane; runtime token bridges; composable shadows; dark contrast; hover/disabled as a control library; empty :is(); "caller-provided class strings" (MenuPopup leftover). Goal still says "theming". Visual section: "a mock recreation does not validate the real page" — opposite of this repo's mock-then-publish rule.

Worst mismatch: "A page that re-emits its own <head> … instead of composing the shell is a concrete finding." renderDraftWrapper must be a separate document (locked CSP, no htmlPage paper/grid/glyph, form-action 'none' so the report form lives on another page). The skill would fail the correct architecture.

Missing Patchy lead-ins a product skill would open with: no JS on served drafts; wrapper form-action 'none'; unwatched readers (no cookies/session/analytics JS); escape user titles/HTML into attributes; user content vs first-party chrome; mocks before real UI; auth-later is still this HTML shell (forms, publishing keys), not Tailwind/SPA; no continuously-repainting CSS.

There will not be a built-in user-facing surface until the auth layer. That is not a reason to keep a component-library checklist. Auth pages should still compose htmlPage (or whatever packages/serving calls the shell), still be server-rendered, still sit next to the draft wrapper as the exception. Write the skill for that shape. Do not port Electron/Tailwind/Base UI.


Standards: 4 documented + 3 judgement. Worst: UI skill keeps t3code mechanics behind a "skip its mechanics" hedge.

Spec: 3 findings (WFA pass partial; examples are not ours; UI is neither light-adapt nor rewrite). Worst: the required writing-for-agents pass stopped at frontmatter.

Method / YAGNI / product-fit (requested extra): Effect skill is the right object with leftover t3code organs (startup repair, S3/Memory ports). UI skill does not fit Patchy's direction and should be rewritten around htmlPage vs renderDraftWrapper, CSP, escaping, and unwatched serving — not captioned and kept.

The two adapted specs still carried t3code shapes. The Effect spec's
examples named an S3 blob store, an in-memory patch store, and a token
store barrel, none of which exist here, and it kept a startup-repair
rule for a boot sequence Patchy does not have. The UI spec was t3code's
component-app checklist behind a hedge: fades, masks, scrollbar lanes,
runtime theme tokens, tabs and swatches, against a single-theme
server-rendered page shell. Worst, its "re-emitted <head> is a finding"
rule would have failed renderDraftWrapper, which is a separate document
on purpose.

Retargeted the Effect examples at the real storage modules, dropped the
startup-repair rule, and added the port shapes #54 settled (HttpApi in
packages/api with typed error responses, @effect/sql-pg with SqlSchema,
@effect/vitest layers over mocks, Config per capability, YAGNI until a
second consumer). Rewrote the UI spec around htmlPage versus
renderDraftWrapper, the draft frame's CSP and escaping, unwatched
readers, and scroll ownership. Both descriptions drop the trigger lists
that AGENTS.md already owns, and the AGENTS.md pointer stops caching
/code-review's own process.

Co-Authored-By: Claude Fable 5 <[email protected]>
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review pass on 3da3592. Everything the review called t3code residue was real — checked against apps/server/src/render.ts (699 lines, one light theme, no fades/masks/scrollbar lanes/tabs/swatches) and the actual tree (packages/{cli,config,core,db,storage}; storage is filesystem + Azure, no S3, no in-memory patch store).

Fixed

  • Effect examples retargeted: barrel is PatchStore, concrete modules are FilesystemBlobStore.ts / AzureBlobStore.ts, abstract-port example is makeAzureBlobStore / layerAzure.
  • Startup-reconciliation bullet deleted. Patchy startup is listen + an unref'd hourly sweep; the rule would have had reviewers demanding a boot repair loop.
  • UI skill rewritten around what is actually here: htmlPage vs renderDraftWrapper, no-JS served drafts, sandbox/title/escapeAttribute, unwatched readers, frame-owns-scroll. Cut fades, masks, scrollbar lanes, runtime token bridges, theme forks, safe-area, tabs/resize handles/swatches, the contrast-token cookbook, and "a mock recreation does not validate the real page" (this repo mocks first on purpose).
  • renderDraftWrapper is now named as the standing exception, so the shell rule can no longer fail the one correct architecture.
  • Both descriptions dropped their trigger lists; AGENTS.md Review specs is their single home. Dropped "alongside the smell baseline" from that pointer.
  • Cleanup guardrail now appears once per skill.
  • Added the four settled-by-Effect v4 port map #54 lines the spec was missing: HttpApi in packages/api with typed error responses vs HttpRouter pages in serving, @effect/sql-pg + SqlSchema + Migrator, @effect/vitest layers over mocks, Config per capability, and YAGNI-until-a-second-consumer.

Not changed

  • Package names not on disk (api, auth, patches, serving, sql). Intentional. Effect v4 port map #54 settled them as the destination and the skill already says Effect is not imported yet and binds each package as it moves. Renaming them at today's tree would need reverting at every port PR.
  • docs/SKILL_DISTRIBUTION.md edit is scope creep. Keeping it. That file is where this repo inventories internal skills; adding two and not listing them is how the doc goes stale.
  • Both Reporting sections share a shape. Not duplication in the writing-for-agents sense — the two skills load independently, and a closer that only exists in the sibling document is a closer the agent never sees. Both trimmed instead.

@allisonmahmood
allisonmahmood merged commit 45f247b into main Aug 28, 2026
7 checks passed
@allisonmahmood
allisonmahmood deleted the docs/effect-review-skills branch August 28, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Touches the docs area size:m 100-500 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Turn t3code's Macroscope review specs into repo skills

1 participant