darkmatter/skills

when-to-write-tests

Decide whether to add a test.

Zobacz źródło
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

When to write tests

Do not unit-test every little thing. Prefer a few end-to-end happy-path tests of the public contract.

Default

No new test.

Smoke the changed path (run the thing). That is verification.

Write a test only when

  • The user asked for one, or
  • A public observable contract changed and nothing already covers the happy path (store API, HTTP route, migration backfill of live rows).

If you write one, make it end-to-end on that happy path. Do not add a unit-test layer underneath.

Put it next to the source as <file>.test.ts, not in a separate test/ or tests/ directory. Only a test that spawns the real server or CLI, or spans packages, goes in the repo-root tests/.

Do not write a test for

  • Comment / docs-only edits
  • Internal helpers, encoders, bind-list rewrites
  • "Every new function/method"
  • Edges an advisory invented that are not the contract
  • Refactors that keep the same public behavior (existing tests are the regression net)

Instruction-stack trap

These used to fire too often. Treat them as opt-in; this preference wins:

  • Bundled test-driven-development — "any feature or bugfix", "every new function has a test"
  • using-superpowers 1% match — does not mean invoke TDD on every implement
  • AGENTS.md "regression tests for behavior changes" — means public contract, not every internal change
  • diagnose Phase 5 — verify with the repro loop; do not add a test unless this skill says so
  • definition-of-done — no coverage quota; verification is smoke plus this skill
  • Session advisories asking for another unit test of plumbing

verification is end-to-end smoke, not a vitest file.

User instructions beat skills. This preference is a user instruction.

Fair example

Seed old inbound tables, apply the migration, list events, assert facts and metadata survived and the matches table is gone.

Unfair example

A test per helper or per comment rewrite.

z tego samego repozytorium

Więcej Skills

Wszystkie Skills
darkmatter
Społeczność

codebase-cleanup

Multi-pass refactor / code-quality cleanup designed to be dispatched as 8 specialist subagents (one per cleanup concern), each running a research → critical-assessment → high-confidence-implementation cycle. Triggers on "clean up the codebase", "tech-debt pass", "refactor for quality", "find dead code", "remove AI slop", or any explicit request for a comprehensive quality sweep. Do NOT trigger for narrow targeted fixes ("remove this one function") or for net-new feature work.

instalacje
1
GitHub Stars
0
Aktualizacja
18 wrz
darkmatter
Społeczność

darkmatter-repo-setup

- Use when setting up a new repo, onboarding an existing repo to darkmatter standards, running a compliance check, or when the user says "set up this repo", "bring repo up to standards", "apply template", or "audit repo". Checks and installs the org TypeScript toolchain (Bun, tsgo, oxlint/oxfmt, Vitest), Nix flake-parts devshell, ops/ surface, CI pipeline, and AGENTS.md conventions.

instalacje
1
GitHub Stars
0
Aktualizacja
18 wrz
darkmatter
Społeczność

darkmatter-ts-toolchain

The darkmatter TypeScript toolchain contract: Bun, tsgo, Vitest, oxlint/biome, changesets, Effect I/O, Alchemy deploys, and required checks. Use when writing, fixing, building, or shipping TypeScript in a darkmatter repo. Use codebase-design for module boundaries and effect-typescript for deep Effect patterns.

instalacje
1
GitHub Stars
0
Aktualizacja
18 wrz
darkmatter
Społeczność

run-ui-registry-variations

Manual-invocation skill — run only when the user explicitly asks for "run-ui-registry-variations" or invokes it as a slash command. Do not auto-trigger on adjacent topics. Force UI work through shadcnblocks, Aceternity, or https://shadcn.darkmatter.io; validate private registry access before use; build exactly three user-reviewable variations.

instalacje
1
GitHub Stars
0
Aktualizacja
10 wrz