[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71G1FDZMN1DD9HGHQEW6QWC":3,"skill-same:01M71G1FDZMN1DD9HGHQEW6QWC":66},{"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":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":14,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M71G1FDZMN1DD9HGHQEW6QWC","audit-typescript-test",null,"TypeScript test-evidence audit methodology — judges the TypeScript tests in scope against the product-tree and TypeScript-specific evidence properties.","outcomeeng\u002Fplugins","outcomeeng","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257335685?v=4","01M71FRVRF36XYR3HRSCGFHK2R","Outcome Engineering","01M71FRVS4BZG17DWANFJ7EPNY",1,"MIT","https:\u002F\u002Fgithub.com\u002Foutcomeeng\u002Fplugins\u002Fblob\u002Fmain\u002Fsrc\u002Fplugins\u002Ftypescript\u002Fskills\u002Faudit-typescript-test\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"audit","audit typescript test","typescript","test","Bash","audit methodology","use","methodology","tests","git","grep","tool","read","scope","product","diff","properties","evidence","tree","2026-11-10 10:12:30",false,"---\nname: audit-typescript-test\ndescription: >-\n  TypeScript test-evidence audit methodology — judges the TypeScript tests in\n  scope against the product-tree and TypeScript-specific evidence properties.\nallowed-tools: Read, Grep, Glob, Bash(git diff:*), {{! tool('use_skill') !}}\n---\n\n\u003Cobjective>\n\nA verdict on TypeScript test evidence — APPROVED, or REJECTED with each finding naming the assertion or evidence artifact, the failed evidence property, and the evidence gap.\n\n\u003C\u002Fobjective>\n\n\u003Cconstraints>\n\nThis audit is read-only. Produce a verdict over test evidence; never edit tests, production code, specs, fixtures, harnesses, generators, or project configuration.\n\n\u003C\u002Fconstraints>\n\n\u003Caudit_workflow>\n\n\u003Cprerequisites>\n\n{!% require_skill 'typescript:typescript-code-standards' %!}\n\n{!% require_skill 'typescript:typescript-test-standards' %!}\n\n{!% require_skill 'product-tree:audit-tests' %!}\n\n{!% require_skill 'product-tree:test' %!}\n\nRead local overlay files — each routes skill behavior to the product's governing specs and decisions; overlays supplement skills and do not supersede them:\n\nRead `spx\u002Flocal\u002Ftypescript.md` if it exists; otherwise apply the loaded skills only.\nRead `spx\u002Flocal\u002Ftypescript-tests.md` if it exists; otherwise apply the loaded skills only.\n\nUse skill `product-tree:contextualize` on the spec node under audit — `\u003CPRODUCT_TREE_CONTEXT>` marker must be present before Gate 1.\n\nThis audit runs no deterministic verification — no `spx validation literal`, test, type-check, or coverage command. Cross-file literal laundering is judged by reading.\n\n\u003C\u002Fprerequisites>\n\n\u003Caudit_scope>\n\nBegin with the current governing spec and its current evidence links. A deleted TypeScript test or test-infrastructure path belongs to this audit only when a current `[test]` assertion still links it or a current linked test still imports it. When the current spec carries no `[test]` link to the deleted path and no current evidence chain references it, classify the retired path as outside current TypeScript test-evidence scope and return `NOT_APPLICABLE` for that path. Never demand restoration of deterministic evidence solely because the base revision or changeset deletion names the retired path. When a current `[test]` assertion still links a missing path, report missing evidence against that current assertion.\n\nUse read-only `git diff` only when the supplied changeset scope requires confirming whether an evidence path was deleted. Run no other shell command from this concern skill.\n\n\u003C\u002Faudit_scope>\n\n\u003Cstructural_reading>\n\nBefore Gate 1, read each in-scope test filename. Canonical TypeScript evidence files match `\u003Csubject>.\u003Cevidence>.\u003Clevel>[.\u003Crunner>].test.ts`, where `\u003Cevidence>` is `scenario`, `mapping`, `conformance`, `property`, or `compliance` and `\u003Clevel>` is `l1`, `l2`, or `l3`. Reject `.unit.test.ts`, `.integration.test.ts`, `.e2e.test.ts`, and `.spec.ts` as a Gate 1 `filename_policy` finding carrying property `alignment` from the base `\u002Faudit-tests` enum — a filename that misdeclares its evidence type or level misaligns the file with the assertion it claims to evidence. Fold this reading observation into Gate 1 rather than running a naming-convention command.\n\n\u003C\u002Fstructural_reading>\n\n\u003Cliteral_laundering_by_reading>\n\nCross-file literal laundering is judged by reading the test's literals against their sources, not by running `spx validation literal`. The two laundering shapes the validator surfaces are read in Gate 1:\n\n| Shape                                                          | What to read                                                                                                    | Judged in                      |\n| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------ |\n| src-reuse — a test literal also present in a production module | Read the literal at its test callsite and search the production module the assertion governs for the same value | Gate 1 step `mocks` \u002F `oracle` |\n| test-dupe — a literal duplicated across test files             | Read the literal at its callsite and the sibling test files in scope for the same value                         | Gate 1 step `four_properties`  |\n\nA test literal that re-declares a production-owned value instead of importing it is laundered coupling → REJECT. Fixture-as-module and generator-laundering shapes are read in Gate 1 step `harness_chain`.\n\n\u003C\u002Fliteral_laundering_by_reading>\n\n\u003Ctest_file_declarations>\n\nExecuted TypeScript test files are typed assertion files. Before judging the assertion method, read every `const`, `let`, `var`, framework fixture parameter, property-generated parameter, local function, predicate, and assertion API call. Accept bindings that only receive actual results, source-owned contracts, generated values, harness observations, callback inputs, resource handles, or fixture paths and introduce no data or policy. Reject bindings that choose cases, expectations, configuration, setup policy, generator domains, fixture contents, or verdict rules. Reject local functions when they own those choices — property `declarations` — or when they move a predicate or assertion call out of the linked test function or callback — property `predicate-ownership`, rule `assertion-seam`, remediation target `test-file`.\n\nDo not use naming style or declaration shape as a proxy. `MAPPING_RUNS`, `mappingRuns`, `runs`, and `function mappingRuns()` are the same failure when the declaration owns a run count, and all are valid when they only alias an observation selected elsewhere. The finding carries property `declarations` and the base `\u002Faudit-tests` rule label the choice matches — `test-owned configuration` or `test-owned data` — and the message names the right semantic owner.\n\nProperty-based tests must route the property assertion through a harness or wrapper that owns seed selection, `numRuns`, and replay diagnostics. A TypeScript property test is rejected when failure output would not include the seed and replay path, or when the test file owns the seed\u002Frun-count itself.\n\n\u003C\u002Ftest_file_declarations>\n\n\u003Cgate_1_assertion>\n\nEntry point is the spec, not the test file.\n\nFor each assertion in the spec's Assertions section, execute steps 1–8 in order. First step failure rejects that assertion and moves to the next.\n\n\u003Cstep name=\"challenge\">\n\n**Step 1 — Challenge the assertion**\n\n- Does the assertion derive from a PDR\u002FADR claim in the node's ancestors (from `\u003CPRODUCT_TREE_CONTEXT>`), or is it floating?\n- Is the assertion type (Scenario \u002F Mapping \u002F Conformance \u002F Property \u002F Compliance) the right one for the claim? A behavioral rule is not a Scenario.\n- Does the assertion overlap with another assertion in the same node or a parent (redundancy)?\n\nRecord any issue as a `challenge` finding carrying property `alignment` from the base `\u002Faudit-tests` enum — the claim itself is malformed or misaligned with its governing decision — and continue to step 2. Challenge issues do not short-circuit the remaining steps unless the assertion type is provably wrong (which invalidates step 4).\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"scope\">\n\n**Step 2 — Scope coverage: enumerate clauses**\n\nDecompose the assertion text into testable clauses. Examples:\n\n| Assertion                                                             | Clauses                                                     |\n| --------------------------------------------------------------------- | ----------------------------------------------------------- |\n| \"MUST reject expired requests with HTTP 410 and an error-schema body\" | (1) reject, (2) HTTP 410, (3) body schema conforms          |\n| \"Outputs OKLCH colors meeting WCAG AA at AA-Large text weights\"       | (1) OKLCH format, (2) WCAG AA contrast, (3) AA-Large sizing |\n\nThe test must exercise every clause with at least one `expect`. Single `expect` for a multi-clause assertion → REJECT this assertion with a `scope` finding carrying property `coverage` from the base `\u002Faudit-tests` enum — clauses of the claim go unexercised.\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"test_file_declarations\">\n\n**Step 3 — Test-file declarations**\n\nApply `\u003Ctest_file_declarations>` to each linked TypeScript test file before inspecting the property\u002Fmapping\u002Fscenario method. Any `const`, `let`, `var`, framework fixture parameter, or property-generated parameter that chooses data or policy is a `declarations` finding, ruled `test-owned configuration` for runner, seed, retry, setup, or lifecycle policy and `test-owned data` for hand-picked data, expectations, fixture contents, or generator domains. Any local `function` declaration that owns data, configuration, setup, reusable cases, fixtures, generators, harness behavior, diagnostics, credentials, or source vocabulary carries the same property and whichever of the two labels fits. A local `function` that instead moves a predicate or assertion call out of the linked test is a `predicate-ownership` finding, ruled `assertion-seam` with remediation target `test-file`. For property assertions, missing seed\u002Freplay reporting is a `missing property seed reporting` finding, spelled as the base skill spells it.\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"evidence\">\n\n**Step 4 — Assertion type and method**\n\n| Type        | Required TypeScript pattern                                                                                                                                               | REJECT if                                               |\n| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |\n| Scenario    | Concrete non-trivial inputs; assertions on assertion-relevant state                                                                                                       | Only `toBeDefined` \u002F `toBeTruthy` \u002F `expect.any`        |\n| Mapping     | `it.each` \u002F `describe.each` \u002F `test.each` over ≥2 cases                                                                                                                   | Single example for a claimed mapping                    |\n| Conformance | Schema validator (`zod.parse`, `ajv`, JSON Schema)                                                                                                                        | Manual `toEqual({...hardcoded...})` with no validator   |\n| Property    | `assertProperty(namedProperty())` — meaningful arbitrary, invariant body, seed, and replay output live in the imported property harness                                   | `fc.constant`, body `return true`, only \"doesn't throw\" |\n| Compliance  | `[test]`: exercises a violating fixture; `[audit:{rule-slug}]` or the pathless `[audit]` that the foundation admits for a toolchain without slug support: skip this audit | `[test]` with no violating fixture                      |\n\nInspect the arbitrary's domain for Property assertions. `fc.constant(...)`, `fc.oneof(fc.constant(a), fc.constant(b))` with 2–3 hardcoded values, or narrow ranges like `fc.nat(1)` reduce the property to examples → REJECT.\n\nIf a generator's only behavior is `fc.constant(...)` for a source-owned singleton, REJECT the generator and require a source-owned constructor or registry import instead. A constant branch inside a larger meaningful arbitrary is allowed only when it expands boundary coverage and source-owned values still come from source APIs.\n\nFor Property assertions, also verify the property call goes through the seed-reporting harness or wrapper required by `\u003Ctest_file_declarations>`. A meaningful arbitrary without reproducible failure output is still incomplete evidence.\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"mocks\">\n\n**Step 5 — Scan for mocks and judge against `\u002Ftest` exceptions**\n\nFor each `vi.mock`, `vi.spyOn`, `vi.fn`, or similar mock pattern in this test file:\n\n1. Identify which `\u002Ftest` exception (1–7) applies:\n\n   | Exception                | Legitimate TypeScript pattern              |\n   | ------------------------ | ------------------------------------------ |\n   | 1. Failure modes         | Class implementing interface; throws       |\n   | 2. Interaction protocols | Class with call-recording array            |\n   | 3. Time\u002Fconcurrency      | `vi.useFakeTimers()` or injected clock     |\n   | 4. Safety                | Class that records but does not execute    |\n   | 5. Combinatorial cost    | Configurable class mirroring real behavior |\n   | 6. Observability         | Class capturing request details            |\n   | 7. Contract testing      | Stub validated against a schema            |\n\n2. No exception applies → coupling severed → REJECT the assertion with a `mocks` finding.\n3. Passthrough partial mocks — `vi.mock(m, async () => ({ ...await vi.importActual(m), x: vi.fn() }))` — preserve coupling for every export except `x`. REJECT only if the assertion targets `x`.\n4. `vi.spyOn(obj, \"m\")` without `.mockReturnValue()` \u002F `.mockImplementation(() => ...)` observes only — coupling preserved.\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"oracle\">\n\n**Step 6 — Oracle independence**\n\nIdentify the source of each `expect`'s expected value.\n\n- REJECT with an `oracle` finding if the expected value is derived from the module under test. Example: `expect(encode(decode(x))).toBe(x)` where both `encode` and `decode` live in the audited module — a shared bug (both strip trailing whitespace) passes the test.\n- Proceed if the expected value comes from a source the module did not produce: a canonical constant imported from a different module, an external standard (schema, RFC, spec document), or a value hand-computed in the test independently of the module.\n\nThe test proves correctness against an independent oracle, not self-consistency.\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"harness_chain\">\n\n**Step 7 — Harness chain tracing**\n\nFor every import from `@testing\u002Fharnesses\u002F*`, `@testing\u002Ffixtures\u002F*`, or `@testing\u002Fgenerators\u002F*`:\n\n1. Open the imported test-infrastructure file.\n2. Search for `vi.mock`, `vi.doMock`, `vi.hoisted` with mock, `vi.stubGlobal`, `vi.stubEnv`, `jest.mock`, `msw.setupServer`, `nock(...)` — any mocking pattern — inside the harness module body or its setup path.\n3. If the import targets `@testing\u002Ffixtures\u002F*`, REJECT with a `fixture_import` finding. Fixtures are inert files: tests may read, copy, or pass fixture paths, but executed tests must not import fixture modules or consume fixture exports.\n4. If the harness mocks the module the assertion is about → coupling severed through the harness → REJECT with a `harness_chain` finding.\n5. If a generator's only behavior is returning arbitrary literals or `fc.constant(...)` wrappers that duplicate source-owned vocabulary or singleton shapes, REJECT with a `generator_laundering` finding.\n6. If a property harness or wrapper owns `numRuns` or seed policy, verify it reports seed and replay details on failure; otherwise REJECT with `missing property seed reporting`, spelled as the base skill spells it.\n7. If the test-infrastructure file imports another test-infrastructure file, trace one level at a time until the chain terminates at a non-test module.\n\nIf an executed test imports a local test-adjacent module that carries harness, generator, or fixture behavior outside the canonical `@testing\u002F` path, REJECT with a `noncanonical_test_infrastructure` finding. Product Tree `tests\u002F` directories contain typed assertion files only.\n\nThe test's own imports look clean when the mock lives in a harness, the hardcoded value lives in a generator, or a fixture masquerades as a module. Always open the test-infrastructure module. When recording audit findings, cite the stable step name `harness_chain` and finding code, not numbered checklist item positions.\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"four_properties\">\n\n**Step 8 — 4-property evidence check**\n\nApply the supplements in `\u003Ctypescript_supplements>` for each property:\n\n- **Coupling** — the nine executable coupling categories in `\u003Ctypescript_supplements>`, barrel resolution, type-only import handling.\n- **Falsifiability** — incorporates step 5 (mocks) judgments, plus snapshot rules.\n- **Oracle independence** — step 6 (oracle) findings carry property `oracle-independence` and remediation target `independent-oracle`, matching the base `\u002Faudit-tests` enum. Do not fold them into Falsifiability: an expected result derived from the production path that produces the actual result is a distinct defect from a test that no mutation can break.\n- **Alignment** — incorporates step 2 (clause enumeration) and step 4 (assertion type).\n- **Coverage** — read whether the test drives execution into the assertion-relevant path; no coverage tooling is run.\n\nFirst property failure at this step → REJECT the assertion; move to the next.\n\n\u003C\u002Fstep>\n\nGate 1 status:\n\n- PASS if every assertion's per-assertion verdict is PASS.\n- FAIL if any assertion's per-assertion verdict is REJECT.\n\n\u003C\u002Fgate_1_assertion>\n\n\u003Cgate_2_architectural>\n\nRuns only if Gate 1 is PASS. Scans in-scope test files for repeated setup patterns that belong in shared harnesses.\n\nTrigger: two or more in-scope tests sharing any of these patterns:\n\n- `await page.goto(\"\u002F\u003Csame-path>\")` across tests\n- Server \u002F dev-server startup\n- `vi.useFakeTimers(...)` with the same initial date\n- `fetch` \u002F HTTP-client configuration identical across tests\n- Fixture-dir or temp-dir creation\n- Browser-context setup\n- Test-user creation with the same role or id shape\n\nEach finding names the pattern, lists ≥2 occurrences (file + line), and proposes an extraction target under `testing\u002Fharnesses\u002F\u003Cname>.ts`. One-occurrence patterns are not DRY violations.\n\nGate 2 status:\n\n- PASS if no pattern appears in two or more in-scope tests.\n- FAIL if any pattern appears in two or more.\n\n\u003C\u002Fgate_2_architectural>\n\n\u003Ctypescript_supplements>\n\nApplied at step 8 of Gate 1.\n\n\u003Csupplement property=\"coupling\">\n\nThis supplement specializes each category of the coupling taxonomy `\u002Faudit-tests` owns to TypeScript imports. Classify from the table below rather than restating a subset of it; every category the canonical taxonomy names appears here, so a category missing from this table would silently narrow the verdict.\n\n| Category           | Definition                                                                                         | Verdict                                         |\n| ------------------ | -------------------------------------------------------------------------------------------------- | ----------------------------------------------- |\n| Direct             | Test imports the module under test                                                                 | Proceed                                         |\n| Indirect           | Test imports a harness wrapping the module                                                         | Proceed — step 7 traced the chain               |\n| Transitive         | Test imports a consumer of the module                                                              | Proceed — verify test level                     |\n| Laundered indirect | Imports a test-infrastructure module that exists only to expose hardcoded values back to the test  | REJECT — laundering                             |\n| False              | Imports the module but never calls assertion-relevant symbols                                      | REJECT                                          |\n| Partial            | Calls functions on wrong inputs or wrong code paths                                                | REJECT                                          |\n| None               | Test imports only its test framework — `vitest`, `@testing-library\u002F*` — with zero codebase imports | REJECT — tautology                              |\n| Severed            | Imports the module and replaces behavior with `vi.mock`, stubbed spies, or fakes                   | REJECT — coupling severed                       |\n| Prose-coupling     | Reads an authored prose\u002Fdoc body and asserts its content                                           | REJECT — couples to authored text, not behavior |\n\nProse-coupling holds full-chain in TypeScript as elsewhere: a harness that exposes the authored path as a constant, or a reader function performing the `readFile` inside test infrastructure, does not convert a prose assertion into behavioral coupling. Follow the read to its source and classify by what is ultimately exercised. Reading an authored *source* file for a structural lint that exercises a rule is not prose-coupling.\n\n**Type-only imports do not count.**\n\n```typescript\nimport type { ThemeColor } from \"..\u002Fsrc\u002Ftheme\"; \u002F\u002F erased at runtime\n```\n\nAll codebase imports are `import type` → tautology → REJECT.\n\n**Barrel re-exports mask false coupling.** Resolve:\n\n- `export * from \".\u002Fx\"` — trace to source file\n- `export { y } from \".\u002Fx\"` — resolve re-exported symbol\n- `export * as ns from \".\u002Fx\"` — trace namespace resolution\n- `package.json` `\"exports\"` field — apply export-map resolution\n\nIf the test imports from a barrel and the assertion-relevant symbol is a sibling never called → False coupling → REJECT.\n\n**Deep relative imports** (`..\u002F..\u002F..\u002F..\u002Ftesting\u002F`) are a tracing cue. They signal the test may be reaching a harness that wraps a different module. Step 7 (`harness_chain`) traces the chain regardless.\n\n\u003C\u002Fsupplement>\n\n\u003Csupplement property=\"falsifiability\">\n\nApply step 5 (mocks). Step 6 (oracle) is judged separately and filed under `oracle-independence`, never folded in here.\n\nFor each codebase import, name a concrete mutation to the imported module that would cause this test to fail. Record the mutation in the assertion's finding detail:\n\n```text\nModule: src\u002Fconfig-parser.ts\nMutation: parseConfig returns empty object instead of parsed sections\nImpact: expect(result.section.key).toBe(\"value\") fails\n```\n\nCannot name a mutation → unfalsifiable → REJECT.\n\n**Snapshot rules:**\n\n- `toMatchSnapshot()` \u002F `toMatchInlineSnapshot()` satisfy falsifiability only if the snapshot content expresses the assertion's claim. A snapshot of `expect.any(Object)` is a tautology.\n- Snapshots auto-updated in CI (`--update`, `-u`, update-on-CI flags) sever falsifiability — the test cannot fail.\n- `expect(x).toMatchObject({...})` is falsifiable only on listed fields; extra fields are ignored by design.\n- Sole assertion is `expect(x).toBeDefined()` \u002F `.toBeTruthy()` \u002F `.not.toBeNull()` \u002F `expect.any(...)` → REJECT (trivial).\n\n\u003C\u002Fsupplement>\n\n\u003Csupplement property=\"alignment\">\n\nApply step 2 (clauses) and step 4 (assertion type).\n\nAlignment passes when:\n\n1. Every clause in the assertion is exercised by at least one `expect`.\n2. The test's evidence method matches the assertion type.\n3. The test's inputs exercise the domain the assertion claims to cover.\n\nAlignment fails when clauses are collapsed, evidence method mismatches the type, or inputs are trivial literals that do not express the claimed domain.\n\n\u003C\u002Fsupplement>\n\n\u003Csupplement property=\"coverage\">\n\nEstablish coverage by reading, never by running `vitest --coverage` or any other coverage tool. This audit runs no deterministic verification.\n\nTrace, by reading, whether the test drives execution into the assertion-relevant code path:\n\n1. Read the production module the assertion governs and identify the assertion-relevant functions, branches, and lines.\n2. Read the test and follow what it calls into that module.\n3. Judge whether the test's execution reaches the assertion-relevant path.\n\nInterpret the trace:\n\n- Reaches the assertion-relevant path — the test exercises the behavior the assertion claims, pass.\n- Imports the module but never drives execution into the assertion-relevant path → REJECT; name the specific path the test fails to reach, traced from the code.\n- The assertion-relevant path is trivially total — annotate `saturated` in the finding detail.\n\nCoverage here is execution breadth (does the test reach the assertion-relevant lines), traced by reading — never a measured percentage and never an unbacked \"probably covers.\" A property-based test with a broader input domain adds evidence a line count would not.\n\n\u003C\u002Fsupplement>\n\n\u003C\u002Ftypescript_supplements>\n\n\u003C\u002Faudit_workflow>\n\n\u003Cverdict_format>\n\nThis skill composes the base `\u002Faudit-tests` verdict: the row names (`gate-1-assertion`, `gate-2-architectural`) and the JSON schema are defined in its `\u003Cverdict_format>` and are not redefined here. This skill contributes TypeScript-specific finding detail into those rows. Literal-laundering finding IDs: L3 (src-reuse), L4 (test-dupe) — judged by reading per `\u003Cliteral_laundering_by_reading>`, not by running a validator. Gate 2 extraction target: `testing\u002Fharnesses\u002F{name}.ts`.\n\nWhen `\u003Caudit_scope>` finds that a retired path has no current `[test]` assertion or current evidence-chain owner, emit this alternate concern result instead of the inherited rows:\n\n```json\n{\n  \"status\": \"NOT_APPLICABLE\",\n  \"subjects\": [\"\u003Cretired-repository-relative-path>\"],\n  \"explanation\": \"No current [test] assertion or evidence chain references the retired path.\"\n}\n```\n\nEmit this shape only when every supplied subject is outside current TypeScript test-evidence scope. A current broken `[test]` link remains applicable and produces the inherited `REJECTED` verdict.\n\n\u003C\u002Fverdict_format>\n\n\u003Cfailure_modes>\n\n**Failure 1 — Contradiction resolution followed operational guide over canonical standard**\n\nWhat happened: The standard in `\u002Ftypescript-test-standards` rejects `.e2e.test.ts`, `.unit.test.ts`, `.integration.test.ts`. A prior version of this skill said filename conventions were \"deferred as standards issues.\" Both rules were visible. Claude followed the audit skill because it was the operational guide for *this task*, resolving the contradiction by authority-of-specificity. Five files with legacy suffixes shipped approved.\n\nWhy it failed: Claude treated a narrower operational prompt as authority over the canonical standards reference.\n\nHow to avoid: `\u002Ftypescript-test-standards` defines the filename convention. `\u003Cstructural_reading>` rejects every legacy suffix before Gate 1; the deferral carveout no longer exists.\n\n**Failure 2 — Harness coupling camouflage: the mock lives in the harness**\n\nWhat happened: A test imported `posthogHarness` from `@testing\u002Fharnesses\u002Fposthog` and used it across scenarios. No `vi.mock` appeared in the test, so Claude classified coupling as indirect. The harness file contained `vi.mock(\"posthog-js\", () => ({ ...fake... }))` at module load, severing coupling for every consumer.\n\nWhy it failed: The audit stopped at the test file and never inspected the imported harness that replaced production behavior.\n\nHow to avoid: Gate 1 step 7 opens every imported harness file and traces mock calls one level deep. The test's imports look clean when the mock lives in a harness. Always open the harness.\n\n**Failure 3 — Oracle inside the module under test: self-consistency passes shared bugs**\n\nWhat happened: Claude approved `expect(encode(decode(value))).toBe(value)` as a roundtrip property. Both functions lived in the audited module, and a shared trailing-whitespace bug made the roundtrip hold for every input.\n\nWhy it failed: The module under test produced both the observed value and its oracle, allowing shared defects to cancel out.\n\nHow to avoid: Gate 1 step 6 requires the expected value to derive from a source the module under test did not produce — a canonical constant imported from a different module, an external standard, or a value hand-computed in the test.\n\n**Failure 4 — Partial alignment through clause collapse**\n\nWhat happened: The spec required rejection, HTTP 410, and an error-schema body. Claude marked `expect(handler(expiredRequest).rejected).toBe(true)` aligned even though it covered only the first clause.\n\nWhy it failed: Claude collapsed a multi-clause assertion into its first observable outcome.\n\nHow to avoid: Gate 1 step 2 enumerates clauses from the assertion text *before* matching to test `expect`s. A single `expect` for a three-clause assertion is REJECT, not \"close enough.\"\n\n**Failure 5 — Property-shaped example disguised by fast-check syntax**\n\nWhat happened: Claude approved `fc.assert(fc.property(fc.constant({ user: \"admin\", role: \"root\" }), (x) => validate(x).ok))` because the file and framework looked property-shaped. The arbitrary held one value.\n\nWhy it failed: Framework syntax and filename classification replaced inspection of the generated domain.\n\nHow to avoid: Gate 1 step 4 inspects the arbitrary's domain. `fc.constant`, small `fc.oneof` over hardcoded values, or narrow ranges like `fc.nat(1)` reduce the property to examples → REJECT the Property assertion.\n\n**Failure 6 — Literal laundering moved into generator modules**\n\nWhat happened: Claude approved a literal-free test importing `arbitraryAbsentConfig()` from `@testing\u002Fgenerators\u002Fconfig`. The generator returned `fc.constant({ kind: CONFIG_FILE_READ_KIND.ABSENT })`, adding no variability, shrinking, or stronger oracle.\n\nWhy it failed: The audit checked literal location rather than whether the generator added a variable evidence domain.\n\nHow to avoid: Gate 1 step 7 opens generator modules. Generators whose only behavior is returning a source-owned singleton shape are REJECT. Require a source-owned constructor or registry import.\n\n**Failure 7 — Fixture imported as executable test code**\n\nWhat happened: An executed test imported `VALID_CASES` from `@testing\u002Ffixtures\u002Frule-cases.ts`. The runner compiled the fixture and consumed its exports as shared test-owned data.\n\nWhy it failed: File placement was mistaken for fixture semantics even though executed test code imported its exports.\n\nHow to avoid: Gate 1 step 7 rejects imports from `@testing\u002Ffixtures\u002F*`. Fixture files may be read from disk, copied into temp projects, or passed by path to the code under test. They are never imported by executed test code.\n\n**Failure 8 — Runner configuration hidden in a renamed test variable**\n\nWhat happened: Validation rejected `const MAPPING_RUNS = 12`, and Claude renamed it to `mappingRuns`. The property run count remained in the executed test file and the audit approved it.\n\nWhy it failed: A naming convention was used as a proxy for ownership, allowing configuration to remain in the assertion file.\n\nHow to avoid: Gate 1 step 3 rejects test-owned declarations by ownership, not casing. Property run counts, seeds, replay output, and diagnostics belong in a seed-reporting harness or wrapper.\n\n**Failure 9 — Property failure could not be replayed**\n\nWhat happened: A property used a meaningful `arbitraryPath()`, but no harness owned the seed and failure output carried no seed or replay command. Claude approved the incomplete debugging evidence.\n\nWhy it failed: Domain quality was judged without checking reproducibility of a generated failure.\n\nHow to avoid: Gate 1 steps 3 and 7 require seed-reporting property infrastructure. Approve property evidence only when failure output exposes the seed and replay path.\n\n\u003C\u002Ffailure_modes>\n\n\u003Csuccess_criteria>\n\nThe TypeScript test verdict is sound when:\n\n- Every applicable rule was judged: each in-scope test received the filename-policy structural reading, and each in-scope assertion received all eight Gate 1 steps — test-file declaration ownership, coupling, falsifiability, alignment, coverage (by reading), oracle independence, harness-chain tracing, and literal laundering; Gate 2 was judged when Gate 1 passed and omitted only when Gate 1 rejected the evidence.\n- Every deleted TypeScript test or test-infrastructure path was classified from current spec links and current evidence chains, with retired evidence returned as `NOT_APPLICABLE` and current broken `[test]` links reported as missing evidence.\n- Applicable scope states an overall `APPROVED` \u002F `REJECTED` with no assertion left unevaluated; a composition-only retired-path scope emits the defined `NOT_APPLICABLE` result.\n- Each `REJECT` finding is falsifiable: it names the assertion or evidence artifact, the failed property, the gate and step, and how the test could pass while the assertion is unfulfilled.\n- The same test node yields the same verdict regardless of run order (reproducible).\n\n\u003C\u002Fsuccess_criteria>\n","\u003Cobjective>\n\nA verdict on TypeScript test evidence — APPROVED, or REJECTED with each finding naming the assertion or evidence artifact, the failed evidence property, and the evidence gap.\n\n\u003C\u002Fobjective>\n\n\u003Cconstraints>\n\nThis audit is read-only. Produce a verdict over test evidence; never edit tests, production code, specs, fixtures, harnesses, generators, or project configuration.\n\n\u003C\u002Fconstraints>\n\n\u003Caudit_workflow>\n\n\u003Cprerequisites>\n\n{!% require_skill 'typescript:typescript-code-standards' %!}\n\n{!% require_skill 'typescript:typescript-test-standards' %!}\n\n{!% require_skill 'product-tree:audit-tests' %!}\n\n{!% require_skill 'product-tree:test' %!}\n\nRead local overlay files — each routes skill behavior to the product's governing specs and decisions; overlays supplement skills and do not supersede them:\n\nRead `spx\u002Flocal\u002Ftypescript.md` if it exists; otherwise apply the loaded skills only.\nRead `spx\u002Flocal\u002Ftypescript-tests.md` if it exists; otherwise apply the loaded skills only.\n\nUse skill `product-tree:contextualize` on the spec node under audit — `\u003CPRODUCT_TREE_CONTEXT>` marker must be present before Gate 1.\n\nThis audit runs no deterministic verification — no `spx validation literal`, test, type-check, or coverage command. Cross-file literal laundering is judged by reading.\n\n\u003C\u002Fprerequisites>\n\n\u003Caudit_scope>\n\nBegin with the current governing spec and its current evidence links. A deleted TypeScript test or test-infrastructure path belongs to this audit only when a current `[test]` assertion still links it or a current linked test still imports it. When the current spec carries no `[test]` link to the deleted path and no current evidence chain references it, classify the retired path as outside current TypeScript test-evidence scope and return `NOT_APPLICABLE` for that path. Never demand restoration of deterministic evidence solely because the base revision or changeset deletion names the retired path. When a current `[test]` assertion still links a missing path, report missing evidence against that current assertion.\n\nUse read-only `git diff` only when the supplied changeset scope requires confirming whether an evidence path was deleted. Run no other shell command from this concern skill.\n\n\u003C\u002Faudit_scope>\n\n\u003Cstructural_reading>\n\nBefore Gate 1, read each in-scope test filename. Canonical TypeScript evidence files match `\u003Csubject>.\u003Cevidence>.\u003Clevel>[.\u003Crunner>].test.ts`, where `\u003Cevidence>` is `scenario`, `mapping`, `conformance`, `property`, or `compliance` and `\u003Clevel>` is `l1`, `l2`, or `l3`. Reject `.unit.test.ts`, `.integration.test.ts`, `.e2e.test.ts`, and `.spec.ts` as a Gate 1 `filename_policy` finding carrying property `alignment` from the base `\u002Faudit-tests` enum — a filename that misdeclares its evidence type or level misaligns the file with the assertion it claims to evidence. Fold this reading observation into Gate 1 rather than running a naming-convention command.\n\n\u003C\u002Fstructural_reading>\n\n\u003Cliteral_laundering_by_reading>\n\nCross-file literal laundering is judged by reading the test's literals against their sources, not by running `spx validation literal`. The two laundering shapes the validator surfaces are read in Gate 1:\n\n| Shape                                                          | What to read                                                                                                    | Judged in                      |\n| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------ |\n| src-reuse — a test literal also present in a production module | Read the literal at its test callsite and search the production module the assertion governs for the same value | Gate 1 step `mocks` \u002F `oracle` |\n| test-dupe — a literal duplicated across test files             | Read the literal at its callsite and the sibling test files in scope for the same value                         | Gate 1 step `four_properties`  |\n\nA test literal that re-declares a production-owned value instead of importing it is laundered coupling → REJECT. Fixture-as-module and generator-laundering shapes are read in Gate 1 step `harness_chain`.\n\n\u003C\u002Fliteral_laundering_by_reading>\n\n\u003Ctest_file_declarations>\n\nExecuted TypeScript test files are typed assertion files. Before judging the assertion method, read every `const`, `let`, `var`, framework fixture parameter, property-generated parameter, local function, predicate, and assertion API call. Accept bindings that only receive actual results, source-owned contracts, generated values, harness observations, callback inputs, resource handles, or fixture paths and introduce no data or policy. Reject bindings that choose cases, expectations, configuration, setup policy, generator domains, fixture contents, or verdict rules. Reject local functions when they own those choices — property `declarations` — or when they move a predicate or assertion call out of the linked test function or callback — property `predicate-ownership`, rule `assertion-seam`, remediation target `test-file`.\n\nDo not use naming style or declaration shape as a proxy. `MAPPING_RUNS`, `mappingRuns`, `runs`, and `function mappingRuns()` are the same failure when the declaration owns a run count, and all are valid when they only alias an observation selected elsewhere. The finding carries property `declarations` and the base `\u002Faudit-tests` rule label the choice matches — `test-owned configuration` or `test-owned data` — and the message names the right semantic owner.\n\nProperty-based tests must route the property assertion through a harness or wrapper that owns seed selection, `numRuns`, and replay diagnostics. A TypeScript property test is rejected when failure output would not include the seed and replay path, or when the test file owns the seed\u002Frun-count itself.\n\n\u003C\u002Ftest_file_declarations>\n\n\u003Cgate_1_assertion>\n\nEntry point is the spec, not the test file.\n\nFor each assertion in the spec's Assertions section, execute steps 1–8 in order. First step failure rejects that assertion and moves to the next.\n\n\u003Cstep name=\"challenge\">\n\n**Step 1 — Challenge the assertion**\n\n- Does the assertion derive from a PDR\u002FADR claim in the node's ancestors (from `\u003CPRODUCT_TREE_CONTEXT>`), or is it floating?\n- Is the assertion type (Scenario \u002F Mapping \u002F Conformance \u002F Property \u002F Compliance) the right one for the claim? A behavioral rule is not a Scenario.\n- Does the assertion overlap with another assertion in the same node or a parent (redundancy)?\n\nRecord any issue as a `challenge` finding carrying property `alignment` from the base `\u002Faudit-tests` enum — the claim itself is malformed or misaligned with its governing decision — and continue to step 2. Challenge issues do not short-circuit the remaining steps unless the assertion type is provably wrong (which invalidates step 4).\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"scope\">\n\n**Step 2 — Scope coverage: enumerate clauses**\n\nDecompose the assertion text into testable clauses. Examples:\n\n| Assertion                                                             | Clauses                                                     |\n| --------------------------------------------------------------------- | ----------------------------------------------------------- |\n| \"MUST reject expired requests with HTTP 410 and an error-schema body\" | (1) reject, (2) HTTP 410, (3) body schema conforms          |\n| \"Outputs OKLCH colors meeting WCAG AA at AA-Large text weights\"       | (1) OKLCH format, (2) WCAG AA contrast, (3) AA-Large sizing |\n\nThe test must exercise every clause with at least one `expect`. Single `expect` for a multi-clause assertion → REJECT this assertion with a `scope` finding carrying property `coverage` from the base `\u002Faudit-tests` enum — clauses of the claim go unexercised.\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"test_file_declarations\">\n\n**Step 3 — Test-file declarations**\n\nApply `\u003Ctest_file_declarations>` to each linked TypeScript test file before inspecting the property\u002Fmapping\u002Fscenario method. Any `const`, `let`, `var`, framework fixture parameter, or property-generated parameter that chooses data or policy is a `declarations` finding, ruled `test-owned configuration` for runner, seed, retry, setup, or lifecycle policy and `test-owned data` for hand-picked data, expectations, fixture contents, or generator domains. Any local `function` declaration that owns data, configuration, setup, reusable cases, fixtures, generators, harness behavior, diagnostics, credentials, or source vocabulary carries the same property and whichever of the two labels fits. A local `function` that instead moves a predicate or assertion call out of the linked test is a `predicate-ownership` finding, ruled `assertion-seam` with remediation target `test-file`. For property assertions, missing seed\u002Freplay reporting is a `missing property seed reporting` finding, spelled as the base skill spells it.\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"evidence\">\n\n**Step 4 — Assertion type and method**\n\n| Type        | Required TypeScript pattern                                                                                                                                               | REJECT if                                               |\n| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |\n| Scenario    | Concrete non-trivial inputs; assertions on assertion-relevant state                                                                                                       | Only `toBeDefined` \u002F `toBeTruthy` \u002F `expect.any`        |\n| Mapping     | `it.each` \u002F `describe.each` \u002F `test.each` over ≥2 cases                                                                                                                   | Single example for a claimed mapping                    |\n| Conformance | Schema validator (`zod.parse`, `ajv`, JSON Schema)                                                                                                                        | Manual `toEqual({...hardcoded...})` with no validator   |\n| Property    | `assertProperty(namedProperty())` — meaningful arbitrary, invariant body, seed, and replay output live in the imported property harness                                   | `fc.constant`, body `return true`, only \"doesn't throw\" |\n| Compliance  | `[test]`: exercises a violating fixture; `[audit:{rule-slug}]` or the pathless `[audit]` that the foundation admits for a toolchain without slug support: skip this audit | `[test]` with no violating fixture                      |\n\nInspect the arbitrary's domain for Property assertions. `fc.constant(...)`, `fc.oneof(fc.constant(a), fc.constant(b))` with 2–3 hardcoded values, or narrow ranges like `fc.nat(1)` reduce the property to examples → REJECT.\n\nIf a generator's only behavior is `fc.constant(...)` for a source-owned singleton, REJECT the generator and require a source-owned constructor or registry import instead. A constant branch inside a larger meaningful arbitrary is allowed only when it expands boundary coverage and source-owned values still come from source APIs.\n\nFor Property assertions, also verify the property call goes through the seed-reporting harness or wrapper required by `\u003Ctest_file_declarations>`. A meaningful arbitrary without reproducible failure output is still incomplete evidence.\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"mocks\">\n\n**Step 5 — Scan for mocks and judge against `\u002Ftest` exceptions**\n\nFor each `vi.mock`, `vi.spyOn`, `vi.fn`, or similar mock pattern in this test file:\n\n1. Identify which `\u002Ftest` exception (1–7) applies:\n\n   | Exception                | Legitimate TypeScript pattern              |\n   | ------------------------ | ------------------------------------------ |\n   | 1. Failure modes         | Class implementing interface; throws       |\n   | 2. Interaction protocols | Class with call-recording array            |\n   | 3. Time\u002Fconcurrency      | `vi.useFakeTimers()` or injected clock     |\n   | 4. Safety                | Class that records but does not execute    |\n   | 5. Combinatorial cost    | Configurable class mirroring real behavior |\n   | 6. Observability         | Class capturing request details            |\n   | 7. Contract testing      | Stub validated against a schema            |\n\n2. No exception applies → coupling severed → REJECT the assertion with a `mocks` finding.\n3. Passthrough partial mocks — `vi.mock(m, async () => ({ ...await vi.importActual(m), x: vi.fn() }))` — preserve coupling for every export except `x`. REJECT only if the assertion targets `x`.\n4. `vi.spyOn(obj, \"m\")` without `.mockReturnValue()` \u002F `.mockImplementation(() => ...)` observes only — coupling preserved.\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"oracle\">\n\n**Step 6 — Oracle independence**\n\nIdentify the source of each `expect`'s expected value.\n\n- REJECT with an `oracle` finding if the expected value is derived from the module under test. Example: `expect(encode(decode(x))).toBe(x)` where both `encode` and `decode` live in the audited module — a shared bug (both strip trailing whitespace) passes the test.\n- Proceed if the expected value comes from a source the module did not produce: a canonical constant imported from a different module, an external standard (schema, RFC, spec document), or a value hand-computed in the test independently of the module.\n\nThe test proves correctness against an independent oracle, not self-consistency.\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"harness_chain\">\n\n**Step 7 — Harness chain tracing**\n\nFor every import from `@testing\u002Fharnesses\u002F*`, `@testing\u002Ffixtures\u002F*`, or `@testing\u002Fgenerators\u002F*`:\n\n1. Open the imported test-infrastructure file.\n2. Search for `vi.mock`, `vi.doMock`, `vi.hoisted` with mock, `vi.stubGlobal`, `vi.stubEnv`, `jest.mock`, `msw.setupServer`, `nock(...)` — any mocking pattern — inside the harness module body or its setup path.\n3. If the import targets `@testing\u002Ffixtures\u002F*`, REJECT with a `fixture_import` finding. Fixtures are inert files: tests may read, copy, or pass fixture paths, but executed tests must not import fixture modules or consume fixture exports.\n4. If the harness mocks the module the assertion is about → coupling severed through the harness → REJECT with a `harness_chain` finding.\n5. If a generator's only behavior is returning arbitrary literals or `fc.constant(...)` wrappers that duplicate source-owned vocabulary or singleton shapes, REJECT with a `generator_laundering` finding.\n6. If a property harness or wrapper owns `numRuns` or seed policy, verify it reports seed and replay details on failure; otherwise REJECT with `missing property seed reporting`, spelled as the base skill spells it.\n7. If the test-infrastructure file imports another test-infrastructure file, trace one level at a time until the chain terminates at a non-test module.\n\nIf an executed test imports a local test-adjacent module that carries harness, generator, or fixture behavior outside the canonical `@testing\u002F` path, REJECT with a `noncanonical_test_infrastructure` finding. Product Tree `tests\u002F` directories contain typed assertion files only.\n\nThe test's own imports look clean when the mock lives in a harness, the hardcoded value lives in a generator, or a fixture masquerades as a module. Always open the test-infrastructure module. When recording audit findings, cite the stable step name `harness_chain` and finding code, not numbered checklist item positions.\n\n\u003C\u002Fstep>\n\n\u003Cstep name=\"four_properties\">\n\n**Step 8 — 4-property evidence check**\n\nApply the supplements in `\u003Ctypescript_supplements>` for each property:\n\n- **Coupling** — the nine executable coupling categories in `\u003Ctypescript_supplements>`, barrel resolution, type-only import handling.\n- **Falsifiability** — incorporates step 5 (mocks) judgments, plus snapshot rules.\n- **Oracle independence** — step 6 (oracle) findings carry property `oracle-independence` and remediation target `independent-oracle`, matching the base `\u002Faudit-tests` enum. Do not fold them into Falsifiability: an expected result derived from the production path that produces the actual result is a distinct defect from a test that no mutation can break.\n- **Alignment** — incorporates step 2 (clause enumeration) and step 4 (assertion type).\n- **Coverage** — read whether the test drives execution into the assertion-relevant path; no coverage tooling is run.\n\nFirst property failure at this step → REJECT the assertion; move to the next.\n\n\u003C\u002Fstep>\n\nGate 1 status:\n\n- PASS if every assertion's per-assertion verdict is PASS.\n- FAIL if any assertion's per-assertion verdict is REJECT.\n\n\u003C\u002Fgate_1_assertion>\n\n\u003Cgate_2_architectural>\n\nRuns only if Gate 1 is PASS. Scans in-scope test files for repeated setup patterns that belong in shared harnesses.\n\nTrigger: two or more in-scope tests sharing any of these patterns:\n\n- `await page.goto(\"\u002F\u003Csame-path>\")` across tests\n- Server \u002F dev-server startup\n- `vi.useFakeTimers(...)` with the same initial date\n- `fetch` \u002F HTTP-client configuration identical across tests\n- Fixture-dir or temp-dir creation\n- Browser-context setup\n- Test-user creation with the same role or id shape\n\nEach finding names the pattern, lists ≥2 occurrences (file + line), and proposes an extraction target under `testing\u002Fharnesses\u002F\u003Cname>.ts`. One-occurrence patterns are not DRY violations.\n\nGate 2 status:\n\n- PASS if no pattern appears in two or more in-scope tests.\n- FAIL if any pattern appears in two or more.\n\n\u003C\u002Fgate_2_architectural>\n\n\u003Ctypescript_supplements>\n\nApplied at step 8 of Gate 1.\n\n\u003Csupplement property=\"coupling\">\n\nThis supplement specializes each category of the coupling taxonomy `\u002Faudit-tests` owns to TypeScript imports. Classify from the table below rather than restating a subset of it; every category the canonical taxonomy names appears here, so a category missing from this table would silently narrow the verdict.\n\n| Category           | Definition                                                                                         | Verdict                                         |\n| ------------------ | -------------------------------------------------------------------------------------------------- | ----------------------------------------------- |\n| Direct             | Test imports the module under test                                                                 | Proceed                                         |\n| Indirect           | Test imports a harness wrapping the module                                                         | Proceed — step 7 traced the chain               |\n| Transitive         | Test imports a consumer of the module                                                              | Proceed — verify test level                     |\n| Laundered indirect | Imports a test-infrastructure module that exists only to expose hardcoded values back to the test  | REJECT — laundering                             |\n| False              | Imports the module but never calls assertion-relevant symbols                                      | REJECT                                          |\n| Partial            | Calls functions on wrong inputs or wrong code paths                                                | REJECT                                          |\n| None               | Test imports only its test framework — `vitest`, `@testing-library\u002F*` — with zero codebase imports | REJECT — tautology                              |\n| Severed            | Imports the module and replaces behavior with `vi.mock`, stubbed spies, or fakes                   | REJECT — coupling severed                       |\n| Prose-coupling     | Reads an authored prose\u002Fdoc body and asserts its content                                           | REJECT — couples to authored text, not behavior |\n\nProse-coupling holds full-chain in TypeScript as elsewhere: a harness that exposes the authored path as a constant, or a reader function performing the `readFile` inside test infrastructure, does not convert a prose assertion into behavioral coupling. Follow the read to its source and classify by what is ultimately exercised. Reading an authored *source* file for a structural lint that exercises a rule is not prose-coupling.\n\n**Type-only imports do not count.**\n\n```typescript\nimport type { ThemeColor } from \"..\u002Fsrc\u002Ftheme\"; \u002F\u002F erased at runtime\n```\n\nAll codebase imports are `import type` → tautology → REJECT.\n\n**Barrel re-exports mask false coupling.** Resolve:\n\n- `export * from \".\u002Fx\"` — trace to source file\n- `export { y } from \".\u002Fx\"` — resolve re-exported symbol\n- `export * as ns from \".\u002Fx\"` — trace namespace resolution\n- `package.json` `\"exports\"` field — apply export-map resolution\n\nIf the test imports from a barrel and the assertion-relevant symbol is a sibling never called → False coupling → REJECT.\n\n**Deep relative imports** (`..\u002F..\u002F..\u002F..\u002Ftesting\u002F`) are a tracing cue. They signal the test may be reaching a harness that wraps a different module. Step 7 (`harness_chain`) traces the chain regardless.\n\n\u003C\u002Fsupplement>\n\n\u003Csupplement property=\"falsifiability\">\n\nApply step 5 (mocks). Step 6 (oracle) is judged separately and filed under `oracle-independence`, never folded in here.\n\nFor each codebase import, name a concrete mutation to the imported module that would cause this test to fail. Record the mutation in the assertion's finding detail:\n\n```text\nModule: src\u002Fconfig-parser.ts\nMutation: parseConfig returns empty object instead of parsed sections\nImpact: expect(result.section.key).toBe(\"value\") fails\n```\n\nCannot name a mutation → unfalsifiable → REJECT.\n\n**Snapshot rules:**\n\n- `toMatchSnapshot()` \u002F `toMatchInlineSnapshot()` satisfy falsifiability only if the snapshot content expresses the assertion's claim. A snapshot of `expect.any(Object)` is a tautology.\n- Snapshots auto-updated in CI (`--update`, `-u`, update-on-CI flags) sever falsifiability — the test cannot fail.\n- `expect(x).toMatchObject({...})` is falsifiable only on listed fields; extra fields are ignored by design.\n- Sole assertion is `expect(x).toBeDefined()` \u002F `.toBeTruthy()` \u002F `.not.toBeNull()` \u002F `expect.any(...)` → REJECT (trivial).\n\n\u003C\u002Fsupplement>\n\n\u003Csupplement property=\"alignment\">\n\nApply step 2 (clauses) and step 4 (assertion type).\n\nAlignment passes when:\n\n1. Every clause in the assertion is exercised by at least one `expect`.\n2. The test's evidence method matches the assertion type.\n3. The test's inputs exercise the domain the assertion claims to cover.\n\nAlignment fails when clauses are collapsed, evidence method mismatches the type, or inputs are trivial literals that do not express the claimed domain.\n\n\u003C\u002Fsupplement>\n\n\u003Csupplement property=\"coverage\">\n\nEstablish coverage by reading, never by running `vitest --coverage` or any other coverage tool. This audit runs no deterministic verification.\n\nTrace, by reading, whether the test drives execution into the assertion-relevant code path:\n\n1. Read the production module the assertion governs and identify the assertion-relevant functions, branches, and lines.\n2. Read the test and follow what it calls into that module.\n3. Judge whether the test's execution reaches the assertion-relevant path.\n\nInterpret the trace:\n\n- Reaches the assertion-relevant path — the test exercises the behavior the assertion claims, pass.\n- Imports the module but never drives execution into the assertion-relevant path → REJECT; name the specific path the test fails to reach, traced from the code.\n- The assertion-relevant path is trivially total — annotate `saturated` in the finding detail.\n\nCoverage here is execution breadth (does the test reach the assertion-relevant lines), traced by reading — never a measured percentage and never an unbacked \"probably covers.\" A property-based test with a broader input domain adds evidence a line count would not.\n\n\u003C\u002Fsupplement>\n\n\u003C\u002Ftypescript_supplements>\n\n\u003C\u002Faudit_workflow>\n\n\u003Cverdict_format>\n\nThis skill composes the base `\u002Faudit-tests` verdict: the row names (`gate-1-assertion`, `gate-2-architectural`) and the JSON schema are defined in its `\u003Cverdict_format>` and are not redefined here. This skill contributes TypeScript-specific finding detail into those rows. Literal-laundering finding IDs: L3 (src-reuse), L4 (test-dupe) — judged by reading per `\u003Cliteral_laundering_by_reading>`, not by running a validator. Gate 2 extraction target: `testing\u002Fharnesses\u002F{name}.ts`.\n\nWhen `\u003Caudit_scope>` finds that a retired path has no current `[test]` assertion or current evidence-chain owner, emit this alternate concern result instead of the inherited rows:\n\n```json\n{\n  \"status\": \"NOT_APPLICABLE\",\n  \"subjects\": [\"\u003Cretired-repository-relative-path>\"],\n  \"explanation\": \"No current [test] assertion or evidence chain references the retired path.\"\n}\n```\n\nEmit this shape only when every supplied subject is outside current TypeScript test-evidence scope. A current broken `[test]` link remains applicable and produces the inherited `REJECTED` verdict.\n\n\u003C\u002Fverdict_format>\n\n\u003Cfailure_modes>\n\n**Failure 1 — Contradiction resolution followed operational guide over canonical standard**\n\nWhat happened: The standard in `\u002Ftypescript-test-standards` rejects `.e2e.test.ts`, `.unit.test.ts`, `.integration.test.ts`. A prior version of this skill said filename conventions were \"deferred as standards issues.\" Both rules were visible. Claude followed the audit skill because it was the operational guide for *this task*, resolving the contradiction by authority-of-specificity. Five files with legacy suffixes shipped approved.\n\nWhy it failed: Claude treated a narrower operational prompt as authority over the canonical standards reference.\n\nHow to avoid: `\u002Ftypescript-test-standards` defines the filename convention. `\u003Cstructural_reading>` rejects every legacy suffix before Gate 1; the deferral carveout no longer exists.\n\n**Failure 2 — Harness coupling camouflage: the mock lives in the harness**\n\nWhat happened: A test imported `posthogHarness` from `@testing\u002Fharnesses\u002Fposthog` and used it across scenarios. No `vi.mock` appeared in the test, so Claude classified coupling as indirect. The harness file contained `vi.mock(\"posthog-js\", () => ({ ...fake... }))` at module load, severing coupling for every consumer.\n\nWhy it failed: The audit stopped at the test file and never inspected the imported harness that replaced production behavior.\n\nHow to avoid: Gate 1 step 7 opens every imported harness file and traces mock calls one level deep. The test's imports look clean when the mock lives in a harness. Always open the harness.\n\n**Failure 3 — Oracle inside the module under test: self-consistency passes shared bugs**\n\nWhat happened: Claude approved `expect(encode(decode(value))).toBe(value)` as a roundtrip property. Both functions lived in the audited module, and a shared trailing-whitespace bug made the roundtrip hold for every input.\n\nWhy it failed: The module under test produced both the observed value and its oracle, allowing shared defects to cancel out.\n\nHow to avoid: Gate 1 step 6 requires the expected value to derive from a source the module under test did not produce — a canonical constant imported from a different module, an external standard, or a value hand-computed in the test.\n\n**Failure 4 — Partial alignment through clause collapse**\n\nWhat happened: The spec required rejection, HTTP 410, and an error-schema body. Claude marked `expect(handler(expiredRequest).rejected).toBe(true)` aligned even though it covered only the first clause.\n\nWhy it failed: Claude collapsed a multi-clause assertion into its first observable outcome.\n\nHow to avoid: Gate 1 step 2 enumerates clauses from the assertion text *before* matching to test `expect`s. A single `expect` for a three-clause assertion is REJECT, not \"close enough.\"\n\n**Failure 5 — Property-shaped example disguised by fast-check syntax**\n\nWhat happened: Claude approved `fc.assert(fc.property(fc.constant({ user: \"admin\", role: \"root\" }), (x) => validate(x).ok))` because the file and framework looked property-shaped. The arbitrary held one value.\n\nWhy it failed: Framework syntax and filename classification replaced inspection of the generated domain.\n\nHow to avoid: Gate 1 step 4 inspects the arbitrary's domain. `fc.constant`, small `fc.oneof` over hardcoded values, or narrow ranges like `fc.nat(1)` reduce the property to examples → REJECT the Property assertion.\n\n**Failure 6 — Literal laundering moved into generator modules**\n\nWhat happened: Claude approved a literal-free test importing `arbitraryAbsentConfig()` from `@testing\u002Fgenerators\u002Fconfig`. The generator returned `fc.constant({ kind: CONFIG_FILE_READ_KIND.ABSENT })`, adding no variability, shrinking, or stronger oracle.\n\nWhy it failed: The audit checked literal location rather than whether the generator added a variable evidence domain.\n\nHow to avoid: Gate 1 step 7 opens generator modules. Generators whose only behavior is returning a source-owned singleton shape are REJECT. Require a source-owned constructor or registry import.\n\n**Failure 7 — Fixture imported as executable test code**\n\nWhat happened: An executed test imported `VALID_CASES` from `@testing\u002Ffixtures\u002Frule-cases.ts`. The runner compiled the fixture and consumed its exports as shared test-owned data.\n\nWhy it failed: File placement was mistaken for fixture semantics even though executed test code imported its exports.\n\nHow to avoid: Gate 1 step 7 rejects imports from `@testing\u002Ffixtures\u002F*`. Fixture files may be read from disk, copied into temp projects, or passed by path to the code under test. They are never imported by executed test code.\n\n**Failure 8 — Runner configuration hidden in a renamed test variable**\n\nWhat happened: Validation rejected `const MAPPING_RUNS = 12`, and Claude renamed it to `mappingRuns`. The property run count remained in the executed test file and the audit approved it.\n\nWhy it failed: A naming convention was used as a proxy for ownership, allowing configuration to remain in the assertion file.\n\nHow to avoid: Gate 1 step 3 rejects test-owned declarations by ownership, not casing. Property run counts, seeds, replay output, and diagnostics belong in a seed-reporting harness or wrapper.\n\n**Failure 9 — Property failure could not be replayed**\n\nWhat happened: A property used a meaningful `arbitraryPath()`, but no harness owned the seed and failure output carried no seed or replay command. Claude approved the incomplete debugging evidence.\n\nWhy it failed: Domain quality was judged without checking reproducibility of a generated failure.\n\nHow to avoid: Gate 1 steps 3 and 7 require seed-reporting property infrastructure. Approve property evidence only when failure output exposes the seed and replay path.\n\n\u003C\u002Ffailure_modes>\n\n\u003Csuccess_criteria>\n\nThe TypeScript test verdict is sound when:\n\n- Every applicable rule was judged: each in-scope test received the filename-policy structural reading, and each in-scope assertion received all eight Gate 1 steps — test-file declaration ownership, coupling, falsifiability, alignment, coverage (by reading), oracle independence, harness-chain tracing, and literal laundering; Gate 2 was judged when Gate 1 passed and omitted only when Gate 1 rejected the evidence.\n- Every deleted TypeScript test or test-infrastructure path was classified from current spec links and current evidence chains, with retired evidence returned as `NOT_APPLICABLE` and current broken `[test]` links reported as missing evidence.\n- Applicable scope states an overall `APPROVED` \u002F `REJECTED` with no assertion left unevaluated; a composition-only retired-path scope emits the defined `NOT_APPLICABLE` result.\n- Each `REJECT` finding is falsifiable: it names the assertion or evidence artifact, the failed property, the gate and step, and how the test could pass while the assertion is unfulfilled.\n- The same test node yields the same verdict regardless of run order (reproducible).\n\n\u003C\u002Fsuccess_criteria>\n",{"name":5,"description":7,"allowed-tools":43},"Read, Grep, Glob, Bash(git diff:*), {{! tool('use_skill') !}}","main","978d51c51d68c99cffb2ba48f7cad9d2f07e5738","src\u002Fplugins\u002Ftypescript\u002Fskills\u002Faudit-typescript-test","https:\u002F\u002Fgithub.com\u002Foutcomeeng\u002Fplugins","https:\u002F\u002Fgithub.com\u002Foutcomeeng","https:\u002F\u002Foutcome.engineering","Spec-driven development for AI-assisted engineering","2026-11-14 20:33:56",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add outcomeeng\u002Fplugins --skill audit-typescript-test",{"tool":58,"command":59},"bunx","bunx skills add outcomeeng\u002Fplugins --skill audit-typescript-test",{"tool":61,"command":62},"pnpm","pnpm dlx skills add outcomeeng\u002Fplugins --skill audit-typescript-test","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Foutcomeeng\u002Fplugins\u002Fblob\u002Fmain\u002Fsrc\u002Fplugins\u002Ftypescript\u002Fskills\u002Faudit-typescript-test\u002FSKILL.md",true,[],[67,73,100,116,127,137],{"skillNo":68,"name":69,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":38},"01M71G25RZTPQG9KJ00JCHC1F7","plugin","https:\u002F\u002Fgithub.com\u002Foutcomeeng\u002Fplugins\u002Fblob\u002Fmain\u002Fsrc\u002Ftemplates\u002Fplugin\u002FSKILL.md",[],[69],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":38},"01M71G23DCX3SV60H63HBBKQ6J","sanitize-powerpoint","ALWAYS invoke this skill when sanitizing, cleaning up, auditing, or aligning a PowerPoint (.pptx) deck — slide-master and layout structure, layout type attributes, stray fonts, non-theme colors, or layout naming. NEVER hand-edit pptx XML without this skill.","https:\u002F\u002Fgithub.com\u002Foutcomeeng\u002Fplugins\u002Fblob\u002Fmain\u002Fsrc\u002Fplugins\u002Fwork\u002Fskills\u002Fsanitize-powerpoint\u002FSKILL.md",[],[80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],"sanitize powerpoint","powerpoint","sanitize","fonts","type","cleaning","structure","never","attributes","theme","pptx","naming","layout","deck","up","edit","xml","master","invoke","when",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":38},"01M71G21PQKBCDECHGVYSKPJW5","draw-excalidraw","ALWAYS invoke this skill when creating Excalidraw diagrams, visualizing workflows, architectures, or concepts. NEVER generate Excalidraw JSON without this skill.","https:\u002F\u002Fgithub.com\u002Foutcomeeng\u002Fplugins\u002Fblob\u002Fmain\u002Fsrc\u002Fplugins\u002Fwork\u002Fskills\u002Fdraw-excalidraw\u002FSKILL.md",[],[107,108,109,110,111,87,98,112,113,99,114,115],"draw excalidraw","excalidraw","draw","diagrams","architectures","generate","workflows","concepts","json",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":38},"01M71G1ZMNGFD37RZYM620XM2C","typescript-test-standards","TypeScript test standards enforced across all skills. Loaded by other skills, not invoked directly.","https:\u002F\u002Fgithub.com\u002Foutcomeeng\u002Fplugins\u002Fblob\u002Fmain\u002Fsrc\u002Fplugins\u002Ftypescript\u002Fskills\u002Ftypescript-test-standards\u002FSKILL.md",[],[21,123,22,124,125,31,126],"typescript test standards","standards","false","across",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":38},"01M71G1XBH0X1VCTR7269MDGSY","typescript-code-standards","TypeScript code standards enforced across all skills. Loaded by other skills, not invoked directly.","https:\u002F\u002Fgithub.com\u002Foutcomeeng\u002Fplugins\u002Fblob\u002Fmain\u002Fsrc\u002Fplugins\u002Ftypescript\u002Fskills\u002Ftypescript-code-standards\u002FSKILL.md",[],[21,134,135,136,124,125,31,126],"code","typescript code standards","code standards",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":38},"01M71G1TQ3VN45SJ75DFMJDB9W","typescript-architecture-standards","TypeScript ADR conventions enforced across architect and auditor skills. Loaded by other skills, not invoked directly.","https:\u002F\u002Fgithub.com\u002Foutcomeeng\u002Fplugins\u002Fblob\u002Fmain\u002Fsrc\u002Fplugins\u002Ftypescript\u002Fskills\u002Ftypescript-architecture-standards\u002FSKILL.md",[],[144,124,145,146,21,147,148,126,31,149,125,150],"architecture standards","typescript architecture standards","architecture","adr","architect","auditor","conventions"]