본문으로 건너뛰기
cccskills
무료GitHub에 공개

test-review

Propose the test(s) FIRST and get a human to sign off on the behaviour before writing the code — the test analog of /schema-review and /ui-proposal. For hand-written LOGIC in packages/* (apps opt-in, pocs exempt). Renders the proposed failing test as a reviewable contract, holds for lgtm/approve, then you write the code to make it green. Use when an agent is about to implement packages/* logic, or when asked to "write the test first", "TDD this", "agree on the test", run /test-review.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Test Review — agree on the test before you write the code

Turns "I'm about to write some logic" into a reviewable contract: the proposed failing test(s) — the cases being asserted, in plain language plus the actual test code — so a human can sign off on the behaviour before any implementation exists. The agreed test is the definition of done: "done" = that test passes.

This is the third sign-off gate (epic #774), alongside schema-review (#314, the data model) and ui-proposal (#307, the look). Pick the gate by what the change is: a data model → schema gate; how it looks → UI gate; hand-written logic → here. It reuses the same revision/approval loop and signal as the other two (#310/#572).

Why test-first? The test is cheap to change while it's just a proposal and expensive to change after the code is built around the wrong assumption. Agreeing on the cases first ("no double-booking; adjacent slots OK; buffer respected") means the code has one job — go green — instead of being a moving target.

Step 0 — Self-scope (skip when out of scope). This gate is deliberately narrow.

Decide by where the code currently lives (#779), then by what kind of change it is. Skip loudly (one line saying why + which gate, if any, fits instead) rather than gating everything.

By location — resolved from the stage model. Run node scripts/harness-stages.mjs <path> (or gateMode(path, 'test-first')) for the verdict (on / opt-in / off) rather than matching the folder by hand; the canonical source is harness.config.mjs (epic #952). The table below is the default profile rendered for humans:

Current homeStageAction
packages/*packageProceed (default — what we maintain; every consuming app inherits its correctness)
apps/*appSkip unless the app has explicitly opted in (may be another user's app — not ours to impose)
pocs/*pocSkip — the incubator must stay fast and safe-to-fail; a POC graduating to packages/* is the checkpoint to backfill its tests

By change kind (only once location is in scope):

  • Collection schema / data model → skip, use /schema-review (+ the e2e fixture smoke covers generated CRUD).
  • .vue component / layout / theme — how it looks → skip, use /ui-proposal.
  • Deterministic generated code (CLI output, templated CRUD) → skip, the e2e smoke harness owns it.
  • Hand-written logic — a composable rule, server util, permission check, calculation, layout-engine transform, a generator's own logic → proceed.

Rule of thumb: packages/* logic almost always proceeds; everything else almost always skips. When unsure whether something is "logic", ask: can a human just eyeball it for correctness? If yes, it probably doesn't need a test-first contract.

Step 1 — Pin down the behaviour

Before writing any test, state — in one or two plain sentences — what the logic must do, and enumerate the edge cases that matter. This list IS the thing being agreed on; the test code is just its executable form. Example (a slot-availability rule):

  • a booking that overlaps an existing one is rejected
  • two back-to-back bookings (end == next start) are both allowed
  • a booking inside another's buffer window is rejected
  • times are compared in the resource's timezone, not the server's

Step 2 — Write the proposed failing test(s)

Author the test next to the code it will cover, following the package's existing test layout (*.test.ts beside the source, or its __tests__/ dir — match the neighbours; see packages/crouton-core for examples). Vitest is the runner (pnpm test).

  • One describe per unit; one it per edge case from Step 1, named in plain language.
  • The test must fail first — it asserts against code that doesn't exist yet (or asserts the new behaviour the current code lacks). Red before green is the point; surface that.
  • Keep it a general contract (all valid inputs), never assertions reverse-engineered to pass a specific implementation.

Step 3 — Hand off for sign-off (review happens on the test itself)

The proposed test is the review surface. Present both the plain-language case list (Step 1) and the test code, so the reviewer agrees on behaviour, not syntax.

  • Interactive session: show the case list + test in chat and hold. The reviewer says lgtm/approve to proceed, or asks for changes (add a case, fix an expectation) → revise and re-show.
  • Agent pipeline / PR: commit the failing test (via /commit, scope = the package, e.g. test(crouton-core): …) so it lands in the PR's "Files changed". The reviewer comments inline on any it(...) to change a case. Set the issue to status:blocked while holding. Approval is a comment containing lgtm/approve — not a reaction or label (#572) — and it unblocks implementation.

Iterate Step 1–3 until approved. Do not write implementation code before the test is agreed.

Step 4 — Go green (only after approval)

Write the implementation to make the agreed test pass — and only that. Run pnpm test (and pnpm typecheck) until green. The agreed test is now the regression guard; it stays in the diff and ships with the code. Resume the normal workflow (typecheck → update issue → /commit).

Conventions

  • The case list (Step 1) is the contract; keep the test code honest to it — never quietly drop or weaken a case to make implementation easier (that's a re-negotiation → go back to Step 3).
  • One concern per test file, mirroring the source it covers.
  • Red first, then green. If the proposed test passes before you write any code, the behaviour already exists — say so and skip (nothing to build).
  • This is about order (test before code), not enforcement — the CI test job already hard-gates pnpm test.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

a11y

무료

Accessibility review for Vue surfaces — the code-cleaning analog of /code-review and /simplify, pointed at WCAG/ARIA. Reviews just your diff (or a package/file), rates findings by severity, and either comments inline on the PR (--comment) or applies the safe fixes for you (--fix). Steers the depth-aware `a11y` subagent. Use when asked to "check accessibility", "a11y this", "audit ARIA/keyboard", or run /a11y.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FriendlyInternet/nuxt-crouton102026년 10월 20일 업데이트

ask-human

무료

Emit a blocking question the owner can read in ~10 seconds and answer in one reply — the scannable, recommendation-first handoff every agent posts when it hits a fork it can't own. Leads with the one decision + a recommendation, carries the 🤖 provenance header, doubles as the

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FriendlyInternet/nuxt-crouton102026년 10월 20일 업데이트

audit

무료

Audit packages for documentation completeness, detect drift between code and docs, and maintain documentation quality across the monorepo. Use when checking package docs, running audits, or reviewing documentation health.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FriendlyInternet/nuxt-crouton102026년 10월 20일 업데이트

Author a placeable layout block that looks right at ANY pane size. The one hard rule — size to the PANE with container queries (@container), never the viewport — plus list/form playbooks and the sizing contract (minWidth etc.) the viability metric reads. Use when adding/converting a croutonLayoutBlocks block, or when a block overflows/breaks in a narrow pane.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FriendlyInternet/nuxt-crouton102026년 10월 20일 업데이트

When a bug or regression is reported, the FIRST step — before fixing — is to research how and when it was introduced (git archaeology), then record that finding on the tracking issue/PR. Use the moment a bug, error, broken build, or "this used to work" is reported, before writing a fix. Produces a first-bad-commit (or "not a code regression") note you paste onto the issue.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FriendlyInternet/nuxt-crouton102026년 10월 20일 업데이트

commit

무료

Smart, granular git commits following monorepo conventions. Analyzes changes, filters to session-relevant files, groups by intent, and uses conventional commit format. Use when committing code changes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FriendlyInternet/nuxt-crouton102026년 10월 20일 업데이트

FriendlyInternet의 스킬 모두 보기

이 스킬의 문제 신고