[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77ZZ85NNKA4PAFEX6GQY9TH":3,"skill-same:01M77ZZ85NNKA4PAFEX6GQY9TH":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M77ZZ85NNKA4PAFEX6GQY9TH","effect-v4-house-style",null,"The house style for Effect v4 library code — module layout, naming, typed-error taxonomy, API-surface and TSDoc habits, layer conventions, test organization, and observability posture. Use when writing or reviewing any Effect v4 module and deciding how to lay out files, name things, shape errors, document exports, wire layers, or organize tests — or when asked why this codebase \"looks the way it does\". Distilled from the @effected kit with the DX-north-star package (semver), a parser engine (toml), a boundary package (config-file) and the app plane (app) as the evidence base. Cross-cutting rules only; Schema depth lives in effect-v4-schema, hardening in hardening-a-parser-port.","spencerbeggs\u002Feffected","spencerbeggs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F109114?v=4","01M77ZTHB70K5Y2VVTRCFY50A5","C. Spencer Beggs","01M77ZTHCC41NXBT3X906K6QM1",8,"MIT","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fbuilds\u002Fclaude\u002Fskills\u002Feffect-v4-house-style\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: effect-v4-house-style\ndescription: The house style for Effect v4 library code — module layout, naming, typed-error taxonomy, API-surface and TSDoc habits, layer conventions, test organization, and observability posture. Use when writing or reviewing any Effect v4 module and deciding how to lay out files, name things, shape errors, document exports, wire layers, or organize tests — or when asked why this codebase \"looks the way it does\". Distilled from the @effected kit with the DX-north-star package (semver), a parser engine (toml), a boundary package (config-file) and the app plane (app) as the evidence base. Cross-cutting rules only; Schema depth lives in effect-v4-schema, hardening in hardening-a-parser-port.\n---\n\n# Effect v4 house style\n\nThe rules that make the code read as one hand's work. Each rule is stated\nonce here (or linked to the skill that owns it); when writing new code, match\nthese before inventing a local convention.\n\n## Module layout\n\n- **One PascalCase file per public concept; the file name IS the API name.**\n  `SemVer.ts` exports `SemVer`. No generic suffixes (`SemVerParserLive.ts`),\n  no one-class error files — an error class rides in the file of the concept\n  that raises it.\n- **`src\u002Findex.ts` is the ONLY re-exporting module.** Flat named re-exports,\n  types marked explicitly (per-line `export type { X }` or inline\n  `export { type X, Y }` — both occur in the kit), no `export *`. Every other module\n  imports explicitly from the defining module. A barrel anywhere else — or a\n  namespace object collecting cross-module implementations — is forbidden:\n  a namespace object that gathers implementations pulling different engines\n  kills tree-shaking silently (measured in this kit: 506 bytes vs 129.4 kB).\n- **Grouped statics are the sanctioned exception, and their form is a static\n  class**: same-module variants of one concept ship as\n  `export class X { private constructor() {} static readonly a = a; … }`,\n  never as an `as const` object — an `as const` object's member types are\n  inferred in the built `.d.ts`, which silently drops every member's TSDoc.\n  The line is *same module, one concept* — never cross-module, never\n  one-per-engine. A same-named **interface** never blocks the class form,\n  generic or not: the class merges with it when it declares the same type\n  parameters (same count and names, no conflicting defaults; variance\n  annotations are optional — a mismatch is TS2428), under a `biome-ignore`\n  for `noUnsafeDeclarationMerging`. `ResolvedTsconfig` and `GitHubFixtures`\n  (a statics-only class merged with the fixture-map interface) are the\n  precedents; `ActionsOidc` is the plain case with no same-named type at all.\n  **The holdout rule, stated once:**\n  - **A same-named `type` alias forces a holdout.** A class cannot share its\n    name with a `type` (TS2300, duplicate identifier) and a `type` cannot\n    merge, so the value stays a `const` — `as const`, or explicitly typed when\n    its members need declared signatures — with the rationale and every\n    member's TSDoc on the const. Forced: `SpdxExpression` (`@effected\u002Fspdx`),\n    `EncryptedCodecKey` (`@effected\u002Fconfig-file`) and `UiKey`\n    (`@effected\u002Fcli-kit`, whose same-named union is the key model itself).\n  - **A by-choice holdout is a same-named interface that describes the\n    *values* the container builds** — a strategy's `name`\u002F`resolve`, a\n    version accessor's `get`\u002F`set`, an event descriptor, an envelope. Merging\n    it onto a statics-only class would hang those members on the class's\n    instance type, which nothing ever constructs, so the `as const` object is\n    allowed for exactly that reason and no other. By choice: `MergeStrategy`\n    and `VersionAccess` (`@effected\u002Fconfig-file`), `Envelope` and `JsonlEvent`\n    (`@effected\u002Fjsonl`).\n  - Everything else is the static class; a module-private `as const` lookup\n    table that is never exported is not a container and needs no exemption.\n- **`src\u002Finternal\u002F` holds the engine; `index.ts` never exports from it.**\n  Composition-only packages own no `internal\u002F` at all — \"no engine, only\n  composition\" is a legitimate shape.\n- **The cycle firewall**: the internal engine throws\u002Freturns raw untyped\n  carriers (`{ code, message, offset, length }` records, plain `Error`\n  subclasses); the facade catches, triages with ordered `isX` guards, and\n  materializes the public Schema classes. The dependency edge runs facade →\n  engine only. Sanctioned exception: the engine may import leaf value\n  classes with no outward edges (a `TomlNode` that imports only `effect`).\n- **File splits can be load-bearing for bundles, not just readability**: two\n  sibling modules that must not drag each other's dependencies (config vs\n  SQLite) simply never import each other — document that the split is\n  deliberate.\n\n## Naming\n\n- **No floating functions.** Instance methods are canonical; cross-cutting\n  operations with no instance counterpart are `Function.dual` statics on the\n  owning class (`Range.satisfies`, `SemVer.truncate`). Never give a static the\n  same name as an instance method: API Extractor cannot resolve a `{@link}` to\n  either, so derive data-last forms from an `Order` instead.\n- **Copy a class instance by spreading it.** A transform that must preserve\n  every field but one is `X.make({ ...x, field: next })`, never a hand-listed\n  literal that drops whatever field is added next — see `effect-v4-schema`.\n- **`Schema.Class` member placement — one rule.** Anything that **produces or\n  classifies** a value is a `static`: constructors and parsers (`parse` \u002F\n  `parseResult` — `make` is reserved, see `effect-v4-schema`), decoders,\n  combinators over the type, and stateless taxonomy\u002Fpredicates on raw inputs.\n  Anything that **operates on an already-decoded instance** is an instance\n  method. Worked precedents in the kit: `Manifest` (static `schema`\u002F`decode`,\n  instance `resolve()`\u002F`toRecord()`) and `ReleaseAgeGate` (static\n  `combine`\u002F`matchesExclude`, instance `isExcluded`\u002F`filterVersions`). Note\n  `matchesExclude` appears in both shapes deliberately — the static takes the\n  patterns as an argument, the instance method reads `this.exclude`; when both\n  are useful, the instance method delegates to the static rather than\n  duplicating it. Two implementation agents each had to infer this rule by\n  reading `Manifest`, which is why it is written down here.\n- **Service shape interfaces are `\u003CConcept>Shape`** (`VersionCacheShape`,\n  `ConfigFileShape\u003CA>`). **Options records are `\u003CConcept>Options`**, all\n  fields `readonly`, non-obvious defaults documented per field.\n- **Errors are `\u003CConcept>\u003CFailureNoun>Error`** — never `Exception`, never\n  `Failure`. Structured code fields get a parallel `\u003CConcept>\u003CStage>ErrorCode`\n  literal-union schema.\n- **Per-operation failure unions are type-only aliases named\n  `\u003COperation>Error`** (`ConfigLoadError = A | B | C`), each with TSDoc\n  stating exactly what is excluded and why. A type-only union costs nothing\n  and is not a namespace object.\n- **String codecs are class statics named `FromString`**, explicitly typed\n  `Schema.Codec\u003CSelf, string>` (the annotation breaks circular inference).\n- Static-namespace facades: `class X { private constructor() {} }` with\n  `static readonly` members, for schema\u002Fparse AND layer-factory facades\n  alike — never the `as const` object form, whose member TSDoc does not\n  survive into the built `.d.ts`. The grouped-statics rule above is the one\n  statement of which holdouts exist and why. Do not invent a third shape.\n\n## Typed error taxonomy\n\n- **Never a free-form `reason: string` field.** The token appears in TSDoc\n  `@remarks` only as the anti-pattern being named. A `reason` field typed\n  as a `Schema.Literals` union (glob, lockfiles, tsconfig-json do this) is\n  fine — the rule bans free-form strings, not the field name; new code should\n  still prefer the `\u003CConcept>\u003CStage>ErrorCode` naming below. Structured\n  diagnostics carry a positional core:\n  `code` (literal union), `message`, `offset`\u002F`length`, `line`\u002F`character` —\n  the same shape across every format package, deliberately.\n- **Foreign failures ride in `cause: Schema.Defect()`**, never stringified —\n  the original `Error` instance survives to the consumer. Schema issues ride\n  in `issue: Schema.Defect()` (v4 exposes no `Schema` for `Issue`; say so in\n  the remarks). Normalize `SchemaError` to a domain error at the boundary\n  with `Effect.catchTag(\"SchemaError\", ...)`.\n- **`message` is always a getter derived from structured fields at read\n  time** — never a stored, preformatted string.\n- **Failure vs defect, the house line**: malformed *input* fails through the\n  typed error channel, always (see `hardening-a-parser-port`); bad *wiring*\n  (an invalid namespace at layer construction, a NaN depth cap) dies as a\n  defect, deliberately, and gets a regression test asserting it dies. A\n  recoverable environmental failure (missing directory) must surface typed\n  even when the underlying platform API would defect — never `orDie` it away.\n- **Caller-supplied callbacks**: decide absorb-vs-defect by one rule — does\n  the callback's RESULT participate in the operation's outcome? A migration\n  `up` or a `validate` (yes) stays a defect on throw — a contract violation;\n  a fire-and-forget event hook (no — `Effect\u003Cvoid>`, discarded) is absorbed\n  and `logDebug`'d. Wrap callback invocation in `Effect.suspend` so a throw\n  during construction dies the same way as one during execution.\n- **Decorators widen, never flatten**: a wrapper over a codec\u002Fservice is\n  generic in the inner error and returns `Inner\u003CE | NewError>` — the inner\n  error type survives in the union.\n- **A parse failure carries an ARRAY of diagnostics** even when only one is\n  populated today — the array is the cross-package contract.\n\n## Sum types: a domain-named discriminant on `Schema.Class` variants\n\nThe kit's model for a sum type — production-proven by\n`@effected\u002Fgithub-actions`' `InstalledPackageManager` and named \"the model\"\nby its first consumer — is two (or more) `Schema.Class` variants carrying\n`Schema.tag` on a **domain-named** discriminant (`source`, not `_tag`),\nunioned via `Schema.Union`. Narrowing needs no ceremony\n(`x.source === \"tool-cache\"` narrows), `Schema.tag` auto-fills the\ndiscriminant in `make` so a double cannot mint a mismatched variant, and an\nimpossible state becomes unrepresentable rather than guarded (the consumer\ndeleted an `Effect.die` guard and its test on adoption). Prefer this over\none class with `optionalKey` fields plus a prose invariant.\n\nTwo adoption traps, both hit live and both documented on the worked\nprecedent's union TSDoc (`PackageManagerInstaller.ts`): the union's\ninherited `make` typechecks against **both** variants and yields a\nconfusing two-branch error — construct the variant classes; and\n`Partial\u003CVariant>` includes the auto-filled tag field, so overrides-style\ndoubles want `Partial\u003COmit\u003Ctypeof Variant.Type, \"source\">>`. The\n`Schema.tag` mechanics live in `effect-v4-schema`'s foreign-contracts\nsection.\n\n## API surface and TSDoc\n\n- **Every exported symbol carries `@public`; everything in `internal\u002F`\n  carries `@internal`.** The inline class-factory + scoped `_base`\n  suppression idiom that keeps API Extractor at zero warnings is owned by\n  `effect-api-extractor-bases` — a package with no class factories carries\n  no suppression at all.\n- **`@remarks` record WHY, not what** — including naming the anti-pattern the\n  shape rules out (\"a flattened `reason: String(e)` loses the cause\") and the\n  looks-right-but-isn't traps. Signature restatement is noise.\n- **`@example` blocks are runnable and minimal**: pure APIs end with\n  `console.log` and a `\u002F\u002F =>` comment showing the literal output; boundary\n  APIs show the layer-composition shape instead.\n- **The bind-to-a-const warning is boilerplate, verbatim, on every\n  factory**: any schema-producing or layer-returning function's TSDoc repeats\n  the house phrase — each call mints fresh derivation\u002Fmemoization identity;\n  bind the result to a `const` or the resource builds twice. Consistent\n  wording beats novel prose.\n\n### When misuse is SILENT, document the wrong spelling and what it cost\n\nFor any API whose wrong call sequence **typechecks, runs, and reports\nsuccess**, ordinary \"here is the right way\" documentation does not work. The\nreader is not looking anything up — they already believe they know the shape,\nand nothing will contradict them. `GitBranch.upsert`\n(`packages\u002Fgithub\u002Fsrc\u002FGitBranch.ts`) is the worked example, mirrored as a\n\"Never\" in `packages\u002Fgithub\u002FCLAUDE.md`. Three ingredients, all cheap:\n\n1. **Spell out the wrong sequence literally** — \"never `upsert(branch,\n   targetHead)` followed by `commitFiles`\". It must match what the reader is\n   *about to write*, not only what they should write instead. Prose describing\n   the correct shape never collides with a plan; the wrong spelling does.\n2. **State what it cost, concretely.** The ~3-second window where the branch\n   equals its base, an open PR with an empty diff, GitHub auto-closing it, a\n   consumer losing its release PR while the run reported success. Severity is\n   what converts \"noted\" into \"stop\".\n3. **Name the consumer that hit it.** That is how a reader recognizes their\n   own code in the description.\n\nIt works. A port onto the kit read that docstring, recognized the sequence in\nthe action it was porting, and flagged it as a decision needing a human ruling\n— finding a live bug instead of faithfully reproducing it. Literal parity\nwould have carried the defect forward.\n\nApply it deliberately to the other ordering-sensitive and upsert-shaped\nsurfaces, not just where someone has already been burned. The test for whether\nan API qualifies: **would the wrong call go green?** If yes, the anti-pattern\nbelongs in the docstring.\n\n## Services and layers\n\nThe mechanics live in `effect-v4-services-layers`; the house habits:\n\n- **A service's layer(s) live in the same file as the service** (`static\n  readonly layer` on the class). Naming: `layer`, `layerTest`, `layerConfig`,\n  `layerSqlite` — never `Default`\u002F`Live`.\n- **`Layer.unwrap(Effect.gen(...))` is the idiom** for a layer that must read\n  an ambient service before constructing its own value.\n- **Composition vocabulary**: `Layer.mergeAll` for independent siblings,\n  `Layer.provideMerge` to satisfy AND expose, `Layer.provide` to satisfy\n  without exposing.\n- **Require core contracts in `R`; never own a platform backend.** No\n  `node:` imports in production `src\u002F` — platform packages appear only as\n  devDependencies for integration tests, and the consumer provides one\n  platform layer at the edge.\n- **Test layers provide their platform internally** (`Layer.provide`, not\n  merge) so `R = never` by construction, not by cast — pin it with a test\n  comment: \"if this fixture ever needs a platform import, the layer stopped\n  doing its job.\"\n- **Ambient identity over parameters**: when two sibling layers must agree\n  on an identity string (a namespace), the second reads it from the ambient\n  service the first established — never a second string parameter that can\n  drift. Pin the absence of the parameter with a regression test.\n\n## Test organization\n\nThe false-green catalogue and `@effect\u002Fvitest` mechanics live in\n`effect-v4-testing`; the house habits:\n\n- Tests in `__test__\u002F`, never co-located: `*.test.ts` units at the top,\n  `integration\u002F*.int.test.ts`, `e2e\u002F*.e2e.test.ts`. `assert.*` exclusively —\n  `expect` does not appear. `it.effect` is the default mode.\n- **Shared setup is one top-level `layer(...)((it) => {...})` per group** —\n  not `Effect.provide` repeated per test body. Sanctioned deviation: when\n  fixtures genuinely differ per test (different files on disk per case), a\n  `layerFor(...)` helper per test is correct — but say so.\n- **Fakes, not mocks — and fakes deliberately missing methods.** A read-only\n  fake filesystem implements exactly the operations the read path uses, so a\n  test that unexpectedly writes fails loudly. Document each fake's\n  restriction where it is defined.\n- **Shared guard-case fixtures**: one exported case-matrix function\n  (`filenameGuardCases`) consumed by every module with the same option, so a\n  new rejected shape is added once and pins every guard.\n- **Property tests state the invariant as a sentence** (\"round-trips\n  decode(encode(v))\") over the class schema as the arbitrary; comments cite\n  the review\u002Fbug that motivated an exact bound.\n- **Corpus\u002Fcompliance suites are loop-generated** (one `it.effect` per corpus\n  file, name = relative path) and FIRST assert the corpus walk found the\n  expected counts — a silently-empty walk is a false green.\n- **A differential oracle is one pinned devDependency imported by exactly\n  one test file**, with the tiebreak written down: the spec corpus wins on\n  disagreement.\n- Integration tests assert on real side effects at the joined path, never an\n  echoed option value — and include the \"naive composition\" control proving\n  the defect the package exists to prevent.\n\n## Observability posture\n\nDetails in `effect-v4-observability`; the house numbers:\n\n- **`Effect.fn(\"Concept.op\")` on every fallible public boundary; nothing\n  else.** Pure\u002Ftotal helpers are plain functions; never-failing service\n  methods are plain arrows; internal helpers shared by public spans are NOT\n  wrapped, with a comment stating the caller already opened the span.\n- **Log density is near zero.** The one sanctioned `Effect.log*` shape in a\n  library is `logDebug` recording a deliberately absorbed defect. No\n  metrics in libraries — those belong to boundaries apps own. Libraries stay\n  telemetry-agnostic; apps compose OTel at the edge.\n- A consumer-facing event stream (a domain `PubSub`) is a FEATURE, not the\n  observability channel — keep it separate from spans and say so in TSDoc.\n\n## Related skills\n\n`effect-v4-schema` (Schema depth: Class-vs-Struct, optionality, make-vs-new,\nbrands — plus its `references\u002Fhouse-style.md` for Schema-specific house\npatterns), `effect-v4-services-layers` (memoization discipline),\n`effect-v4-testing` (false greens), `effect-api-extractor-bases` (the `_base`\nidiom), `hardening-a-parser-port` (input hardening), `effected-packages`\n(what the kit ships).\n","# Effect v4 house style\n\nThe rules that make the code read as one hand's work. Each rule is stated\nonce here (or linked to the skill that owns it); when writing new code, match\nthese before inventing a local convention.\n\n## Module layout\n\n- **One PascalCase file per public concept; the file name IS the API name.**\n  `SemVer.ts` exports `SemVer`. No generic suffixes (`SemVerParserLive.ts`),\n  no one-class error files — an error class rides in the file of the concept\n  that raises it.\n- **`src\u002Findex.ts` is the ONLY re-exporting module.** Flat named re-exports,\n  types marked explicitly (per-line `export type { X }` or inline\n  `export { type X, Y }` — both occur in the kit), no `export *`. Every other module\n  imports explicitly from the defining module. A barrel anywhere else — or a\n  namespace object collecting cross-module implementations — is forbidden:\n  a namespace object that gathers implementations pulling different engines\n  kills tree-shaking silently (measured in this kit: 506 bytes vs 129.4 kB).\n- **Grouped statics are the sanctioned exception, and their form is a static\n  class**: same-module variants of one concept ship as\n  `export class X { private constructor() {} static readonly a = a; … }`,\n  never as an `as const` object — an `as const` object's member types are\n  inferred in the built `.d.ts`, which silently drops every member's TSDoc.\n  The line is *same module, one concept* — never cross-module, never\n  one-per-engine. A same-named **interface** never blocks the class form,\n  generic or not: the class merges with it when it declares the same type\n  parameters (same count and names, no conflicting defaults; variance\n  annotations are optional — a mismatch is TS2428), under a `biome-ignore`\n  for `noUnsafeDeclarationMerging`. `ResolvedTsconfig` and `GitHubFixtures`\n  (a statics-only class merged with the fixture-map interface) are the\n  precedents; `ActionsOidc` is the plain case with no same-named type at all.\n  **The holdout rule, stated once:**\n  - **A same-named `type` alias forces a holdout.** A class cannot share its\n    name with a `type` (TS2300, duplicate identifier) and a `type` cannot\n    merge, so the value stays a `const` — `as const`, or explicitly typed when\n    its members need declared signatures — with the rationale and every\n    member's TSDoc on the const. Forced: `SpdxExpression` (`@effected\u002Fspdx`),\n    `EncryptedCodecKey` (`@effected\u002Fconfig-file`) and `UiKey`\n    (`@effected\u002Fcli-kit`, whose same-named union is the key model itself).\n  - **A by-choice holdout is a same-named interface that describes the\n    *values* the container builds** — a strategy's `name`\u002F`resolve`, a\n    version accessor's `get`\u002F`set`, an event descriptor, an envelope. Merging\n    it onto a statics-only class would hang those members on the class's\n    instance type, which nothing ever constructs, so the `as const` object is\n    allowed for exactly that reason and no other. By choice: `MergeStrategy`\n    and `VersionAccess` (`@effected\u002Fconfig-file`), `Envelope` and `JsonlEvent`\n    (`@effected\u002Fjsonl`).\n  - Everything else is the static class; a module-private `as const` lookup\n    table that is never exported is not a container and needs no exemption.\n- **`src\u002Finternal\u002F` holds the engine; `index.ts` never exports from it.**\n  Composition-only packages own no `internal\u002F` at all — \"no engine, only\n  composition\" is a legitimate shape.\n- **The cycle firewall**: the internal engine throws\u002Freturns raw untyped\n  carriers (`{ code, message, offset, length }` records, plain `Error`\n  subclasses); the facade catches, triages with ordered `isX` guards, and\n  materializes the public Schema classes. The dependency edge runs facade →\n  engine only. Sanctioned exception: the engine may import leaf value\n  classes with no outward edges (a `TomlNode` that imports only `effect`).\n- **File splits can be load-bearing for bundles, not just readability**: two\n  sibling modules that must not drag each other's dependencies (config vs\n  SQLite) simply never import each other — document that the split is\n  deliberate.\n\n## Naming\n\n- **No floating functions.** Instance methods are canonical; cross-cutting\n  operations with no instance counterpart are `Function.dual` statics on the\n  owning class (`Range.satisfies`, `SemVer.truncate`). Never give a static the\n  same name as an instance method: API Extractor cannot resolve a `{@link}` to\n  either, so derive data-last forms from an `Order` instead.\n- **Copy a class instance by spreading it.** A transform that must preserve\n  every field but one is `X.make({ ...x, field: next })`, never a hand-listed\n  literal that drops whatever field is added next — see `effect-v4-schema`.\n- **`Schema.Class` member placement — one rule.** Anything that **produces or\n  classifies** a value is a `static`: constructors and parsers (`parse` \u002F\n  `parseResult` — `make` is reserved, see `effect-v4-schema`), decoders,\n  combinators over the type, and stateless taxonomy\u002Fpredicates on raw inputs.\n  Anything that **operates on an already-decoded instance** is an instance\n  method. Worked precedents in the kit: `Manifest` (static `schema`\u002F`decode`,\n  instance `resolve()`\u002F`toRecord()`) and `ReleaseAgeGate` (static\n  `combine`\u002F`matchesExclude`, instance `isExcluded`\u002F`filterVersions`). Note\n  `matchesExclude` appears in both shapes deliberately — the static takes the\n  patterns as an argument, the instance method reads `this.exclude`; when both\n  are useful, the instance method delegates to the static rather than\n  duplicating it. Two implementation agents each had to infer this rule by\n  reading `Manifest`, which is why it is written down here.\n- **Service shape interfaces are `\u003CConcept>Shape`** (`VersionCacheShape`,\n  `ConfigFileShape\u003CA>`). **Options records are `\u003CConcept>Options`**, all\n  fields `readonly`, non-obvious defaults documented per field.\n- **Errors are `\u003CConcept>\u003CFailureNoun>Error`** — never `Exception`, never\n  `Failure`. Structured code fields get a parallel `\u003CConcept>\u003CStage>ErrorCode`\n  literal-union schema.\n- **Per-operation failure unions are type-only aliases named\n  `\u003COperation>Error`** (`ConfigLoadError = A | B | C`), each with TSDoc\n  stating exactly what is excluded and why. A type-only union costs nothing\n  and is not a namespace object.\n- **String codecs are class statics named `FromString`**, explicitly typed\n  `Schema.Codec\u003CSelf, string>` (the annotation breaks circular inference).\n- Static-namespace facades: `class X { private constructor() {} }` with\n  `static readonly` members, for schema\u002Fparse AND layer-factory facades\n  alike — never the `as const` object form, whose member TSDoc does not\n  survive into the built `.d.ts`. The grouped-statics rule above is the one\n  statement of which holdouts exist and why. Do not invent a third shape.\n\n## Typed error taxonomy\n\n- **Never a free-form `reason: string` field.** The token appears in TSDoc\n  `@remarks` only as the anti-pattern being named. A `reason` field typed\n  as a `Schema.Literals` union (glob, lockfiles, tsconfig-json do this) is\n  fine — the rule bans free-form strings, not the field name; new code should\n  still prefer the `\u003CConcept>\u003CStage>ErrorCode` naming below. Structured\n  diagnostics carry a positional core:\n  `code` (literal union), `message`, `offset`\u002F`length`, `line`\u002F`character` —\n  the same shape across every format package, deliberately.\n- **Foreign failures ride in `cause: Schema.Defect()`**, never stringified —\n  the original `Error` instance survives to the consumer. Schema issues ride\n  in `issue: Schema.Defect()` (v4 exposes no `Schema` for `Issue`; say so in\n  the remarks). Normalize `SchemaError` to a domain error at the boundary\n  with `Effect.catchTag(\"SchemaError\", ...)`.\n- **`message` is always a getter derived from structured fields at read\n  time** — never a stored, preformatted string.\n- **Failure vs defect, the house line**: malformed *input* fails through the\n  typed error channel, always (see `hardening-a-parser-port`); bad *wiring*\n  (an invalid namespace at layer construction, a NaN depth cap) dies as a\n  defect, deliberately, and gets a regression test asserting it dies. A\n  recoverable environmental failure (missing directory) must surface typed\n  even when the underlying platform API would defect — never `orDie` it away.\n- **Caller-supplied callbacks**: decide absorb-vs-defect by one rule — does\n  the callback's RESULT participate in the operation's outcome? A migration\n  `up` or a `validate` (yes) stays a defect on throw — a contract violation;\n  a fire-and-forget event hook (no — `Effect\u003Cvoid>`, discarded) is absorbed\n  and `logDebug`'d. Wrap callback invocation in `Effect.suspend` so a throw\n  during construction dies the same way as one during execution.\n- **Decorators widen, never flatten**: a wrapper over a codec\u002Fservice is\n  generic in the inner error and returns `Inner\u003CE | NewError>` — the inner\n  error type survives in the union.\n- **A parse failure carries an ARRAY of diagnostics** even when only one is\n  populated today — the array is the cross-package contract.\n\n## Sum types: a domain-named discriminant on `Schema.Class` variants\n\nThe kit's model for a sum type — production-proven by\n`@effected\u002Fgithub-actions`' `InstalledPackageManager` and named \"the model\"\nby its first consumer — is two (or more) `Schema.Class` variants carrying\n`Schema.tag` on a **domain-named** discriminant (`source`, not `_tag`),\nunioned via `Schema.Union`. Narrowing needs no ceremony\n(`x.source === \"tool-cache\"` narrows), `Schema.tag` auto-fills the\ndiscriminant in `make` so a double cannot mint a mismatched variant, and an\nimpossible state becomes unrepresentable rather than guarded (the consumer\ndeleted an `Effect.die` guard and its test on adoption). Prefer this over\none class with `optionalKey` fields plus a prose invariant.\n\nTwo adoption traps, both hit live and both documented on the worked\nprecedent's union TSDoc (`PackageManagerInstaller.ts`): the union's\ninherited `make` typechecks against **both** variants and yields a\nconfusing two-branch error — construct the variant classes; and\n`Partial\u003CVariant>` includes the auto-filled tag field, so overrides-style\ndoubles want `Partial\u003COmit\u003Ctypeof Variant.Type, \"source\">>`. The\n`Schema.tag` mechanics live in `effect-v4-schema`'s foreign-contracts\nsection.\n\n## API surface and TSDoc\n\n- **Every exported symbol carries `@public`; everything in `internal\u002F`\n  carries `@internal`.** The inline class-factory + scoped `_base`\n  suppression idiom that keeps API Extractor at zero warnings is owned by\n  `effect-api-extractor-bases` — a package with no class factories carries\n  no suppression at all.\n- **`@remarks` record WHY, not what** — including naming the anti-pattern the\n  shape rules out (\"a flattened `reason: String(e)` loses the cause\") and the\n  looks-right-but-isn't traps. Signature restatement is noise.\n- **`@example` blocks are runnable and minimal**: pure APIs end with\n  `console.log` and a `\u002F\u002F =>` comment showing the literal output; boundary\n  APIs show the layer-composition shape instead.\n- **The bind-to-a-const warning is boilerplate, verbatim, on every\n  factory**: any schema-producing or layer-returning function's TSDoc repeats\n  the house phrase — each call mints fresh derivation\u002Fmemoization identity;\n  bind the result to a `const` or the resource builds twice. Consistent\n  wording beats novel prose.\n\n### When misuse is SILENT, document the wrong spelling and what it cost\n\nFor any API whose wrong call sequence **typechecks, runs, and reports\nsuccess**, ordinary \"here is the right way\" documentation does not work. The\nreader is not looking anything up — they already believe they know the shape,\nand nothing will contradict them. `GitBranch.upsert`\n(`packages\u002Fgithub\u002Fsrc\u002FGitBranch.ts`) is the worked example, mirrored as a\n\"Never\" in `packages\u002Fgithub\u002FCLAUDE.md`. Three ingredients, all cheap:\n\n1. **Spell out the wrong sequence literally** — \"never `upsert(branch,\n   targetHead)` followed by `commitFiles`\". It must match what the reader is\n   *about to write*, not only what they should write instead. Prose describing\n   the correct shape never collides with a plan; the wrong spelling does.\n2. **State what it cost, concretely.** The ~3-second window where the branch\n   equals its base, an open PR with an empty diff, GitHub auto-closing it, a\n   consumer losing its release PR while the run reported success. Severity is\n   what converts \"noted\" into \"stop\".\n3. **Name the consumer that hit it.** That is how a reader recognizes their\n   own code in the description.\n\nIt works. A port onto the kit read that docstring, recognized the sequence in\nthe action it was porting, and flagged it as a decision needing a human ruling\n— finding a live bug instead of faithfully reproducing it. Literal parity\nwould have carried the defect forward.\n\nApply it deliberately to the other ordering-sensitive and upsert-shaped\nsurfaces, not just where someone has already been burned. The test for whether\nan API qualifies: **would the wrong call go green?** If yes, the anti-pattern\nbelongs in the docstring.\n\n## Services and layers\n\nThe mechanics live in `effect-v4-services-layers`; the house habits:\n\n- **A service's layer(s) live in the same file as the service** (`static\n  readonly layer` on the class). Naming: `layer`, `layerTest`, `layerConfig`,\n  `layerSqlite` — never `Default`\u002F`Live`.\n- **`Layer.unwrap(Effect.gen(...))` is the idiom** for a layer that must read\n  an ambient service before constructing its own value.\n- **Composition vocabulary**: `Layer.mergeAll` for independent siblings,\n  `Layer.provideMerge` to satisfy AND expose, `Layer.provide` to satisfy\n  without exposing.\n- **Require core contracts in `R`; never own a platform backend.** No\n  `node:` imports in production `src\u002F` — platform packages appear only as\n  devDependencies for integration tests, and the consumer provides one\n  platform layer at the edge.\n- **Test layers provide their platform internally** (`Layer.provide`, not\n  merge) so `R = never` by construction, not by cast — pin it with a test\n  comment: \"if this fixture ever needs a platform import, the layer stopped\n  doing its job.\"\n- **Ambient identity over parameters**: when two sibling layers must agree\n  on an identity string (a namespace), the second reads it from the ambient\n  service the first established — never a second string parameter that can\n  drift. Pin the absence of the parameter with a regression test.\n\n## Test organization\n\nThe false-green catalogue and `@effect\u002Fvitest` mechanics live in\n`effect-v4-testing`; the house habits:\n\n- Tests in `__test__\u002F`, never co-located: `*.test.ts` units at the top,\n  `integration\u002F*.int.test.ts`, `e2e\u002F*.e2e.test.ts`. `assert.*` exclusively —\n  `expect` does not appear. `it.effect` is the default mode.\n- **Shared setup is one top-level `layer(...)((it) => {...})` per group** —\n  not `Effect.provide` repeated per test body. Sanctioned deviation: when\n  fixtures genuinely differ per test (different files on disk per case), a\n  `layerFor(...)` helper per test is correct — but say so.\n- **Fakes, not mocks — and fakes deliberately missing methods.** A read-only\n  fake filesystem implements exactly the operations the read path uses, so a\n  test that unexpectedly writes fails loudly. Document each fake's\n  restriction where it is defined.\n- **Shared guard-case fixtures**: one exported case-matrix function\n  (`filenameGuardCases`) consumed by every module with the same option, so a\n  new rejected shape is added once and pins every guard.\n- **Property tests state the invariant as a sentence** (\"round-trips\n  decode(encode(v))\") over the class schema as the arbitrary; comments cite\n  the review\u002Fbug that motivated an exact bound.\n- **Corpus\u002Fcompliance suites are loop-generated** (one `it.effect` per corpus\n  file, name = relative path) and FIRST assert the corpus walk found the\n  expected counts — a silently-empty walk is a false green.\n- **A differential oracle is one pinned devDependency imported by exactly\n  one test file**, with the tiebreak written down: the spec corpus wins on\n  disagreement.\n- Integration tests assert on real side effects at the joined path, never an\n  echoed option value — and include the \"naive composition\" control proving\n  the defect the package exists to prevent.\n\n## Observability posture\n\nDetails in `effect-v4-observability`; the house numbers:\n\n- **`Effect.fn(\"Concept.op\")` on every fallible public boundary; nothing\n  else.** Pure\u002Ftotal helpers are plain functions; never-failing service\n  methods are plain arrows; internal helpers shared by public spans are NOT\n  wrapped, with a comment stating the caller already opened the span.\n- **Log density is near zero.** The one sanctioned `Effect.log*` shape in a\n  library is `logDebug` recording a deliberately absorbed defect. No\n  metrics in libraries — those belong to boundaries apps own. Libraries stay\n  telemetry-agnostic; apps compose OTel at the edge.\n- A consumer-facing event stream (a domain `PubSub`) is a FEATURE, not the\n  observability channel — keep it separate from spans and say so in TSDoc.\n\n## Related skills\n\n`effect-v4-schema` (Schema depth: Class-vs-Struct, optionality, make-vs-new,\nbrands — plus its `references\u002Fhouse-style.md` for Schema-specific house\npatterns), `effect-v4-services-layers` (memoization discipline),\n`effect-v4-testing` (false greens), `effect-api-extractor-bases` (the `_base`\nidiom), `hardening-a-parser-port` (input hardening), `effected-packages`\n(what the kit ships).\n",{"name":5,"description":7},"main","11d6b3ae59538b0e16ad67c315ecb0c25fcb0125","plugin\u002Fbuilds\u002Fclaude\u002Fskills\u002Feffect-v4-house-style",2,"https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected","https:\u002F\u002Fgithub.com\u002Fspencerbeggs","2026-11-14 07:03:25",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add spencerbeggs\u002Feffected --skill effect-v4-house-style",{"tool":37,"command":38},"bunx","bunx skills add spencerbeggs\u002Feffected --skill effect-v4-house-style",{"tool":40,"command":41},"pnpm","pnpm dlx skills add spencerbeggs\u002Feffected --skill effect-v4-house-style","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fbuilds\u002Fclaude\u002Fskills\u002Feffect-v4-house-style\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M780NVTD800KMFV869YNZED6","testing-actions","Use when writing or reviewing tests for @effected\u002Fgithub-actions, @effected\u002Fgithub, @effected\u002Fsbom or @effected\u002Fcommands — stubbing the GitHub API, writing a service's layerTest or makeTest double, testing the pre\u002Fmain\u002Fpost lifecycle through Action.run, or debugging why a test hits the real network or hangs.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Ftesting-actions\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M780NPDSGFC0FCP7696NW11J","supply-chain-attestation","Use when generating a CycloneDX SBOM, checking NTIA minimum elements, building an in-toto statement or a SLSA provenance predicate, signing into a Sigstore DSSE bundle, or uploading an attestation to GitHub.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fsupply-chain-attestation\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M780NGP4QNZDH8T8Q8WZ18SA","structuring-an-action","Use when laying out a new GitHub Action repository on the @effected suite, deciding where a piece of code belongs (an entry point, a step, a shared service, a shim), or reviewing an existing action's file structure against the canonical shape.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fstructuring-an-action\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M780NCD52H1Y03FS83WJ8BT5","running-commands-and-tools","Use when running a subprocess in Effect v4, spawning a command, capturing stdout\u002Fstderr\u002Fexit code, checking whether a CLI tool is installed or which copy to run, running a package-manager script through the project's launcher, detaching a background process, or redacting a secret from argv or captured output.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Frunning-commands-and-tools\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M780N823DWNRMSY5X2NT5MSR","release-and-publish","Use when publishing a package to npm, reading the npm registry from Effect v4, checking whether a version is already published, cutting a release tag or GitHub release from an action, applying a release-age gate, or deriving tracking tags for GitHub Actions distribution.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Frelease-and-publish\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M780MXRF6H20KCESTSSFB3HQ","hardening-a-parser-port","Use when porting or writing a recursive-descent parser, lexer, or tree-walker over untrusted text in the @effected monorepo — the class of hardening the cloud reviewer scans for on every migration. Covers stack-overflow depth guards (on EVERY recursion surface, which a facade has N of — not two), numeric bound guards that must reject NaN and non-integers, code-point range checks scoped to formats with wide escapes, prototype-pollution, control-character rejection, and the invariant that malformed input must fail through the typed error channel, never as an unhandled defect.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fhardening-a-parser-port\u002FSKILL.md",[],[]]