本文へ移動
cccskills
無料GitHub で公開

test-discipline

Update tests when changing APIs — no exceptions

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Context

When APIs or public interfaces change, tests must be updated in the same commit. When test assertions reference file counts or expected arrays, they must be kept in sync with disk reality. Stale tests block CI for other contributors.

Patterns

  • API changes → test updates (same commit): If you change a function signature, public interface, or exported API, update the corresponding tests before committing
  • Test assertions → disk reality: When test files contain expected counts (e.g., EXPECTED_FEATURES, EXPECTED_SCENARIOS), they must match the actual files on disk
  • Add files → update assertions: When adding docs pages, features, or any counted resource, update the test assertion array in the same commit
  • CI failures → check assertions first: Before debugging complex failures, verify test assertion arrays match filesystem state

Examples

✓ Correct:

  • Changed auth API signature → updated auth.test.ts in same commit
  • Added distributed-mesh.md to features/ → added 'distributed-mesh' to EXPECTED_FEATURES array
  • Deleted two scenario files → removed entries from EXPECTED_SCENARIOS

✗ Incorrect:

  • Changed spawn parameters → committed without updating casting.test.ts (CI breaks for next person)
  • Added built-in-roles.md → left EXPECTED_FEATURES at old count (PR blocked)
  • Test says "expected 7 files" but disk has 25 (assertion staleness)

Anti-Patterns

  • Committing API changes without test updates ("I'll fix tests later")
  • Treating test assertion arrays as static (they evolve with content)
  • Assuming CI passing means coverage is correct (stale assertions can pass while being wrong)
  • Leaving gaps for other agents to discover

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Standard collaboration patterns for all squad agents — worktree awareness, decisions, cross-agent communication

日本語の概要は準備中です。原文の説明を表示しています。

github/gh-aw5,3812026年10月11日 更新

Shared hard rules enforced across all squad agents

日本語の概要は準備中です。原文の説明を表示しています。

github/gh-aw5,3812026年10月11日 更新

Route gh-aw design, creation, diagnosis, patching, active debugging, and upgrade requests to the right strategies.

日本語の概要は準備中です。原文の説明を表示しています。

github/gh-aw5,3812026年10月11日 更新

How to write comprehensive architectural proposals that drive alignment before code is written

日本語の概要は準備中です。原文の説明を表示しています。

github/gh-aw5,3812026年10月11日 更新

Upgrade gh-aw to latest gh-aw-firewall release and identify follow-up spec tasks.

日本語の概要は準備中です。原文の説明を表示しています。

github/gh-aw5,3812026年10月11日 更新

Review code that performs git or gh operations against repository checkouts in gh-aw, checking that the right credentials are available at the right time and that sparseness, shallowness and credential-free factors are properly considered.

日本語の概要は準備中です。原文の説明を表示しています。

github/gh-aw5,3812026年10月11日 更新

github のスキルをすべて見る

このスキルの問題を報告する