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

tdd-cycle

Run a complete RED -> GREEN -> REFACTOR cycle for a single test

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

Chemaclass/bashdepスター 19(GitHub 19 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md2.0 KB

SKILL.md(原文)

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

TDD Cycle

Execute a complete RED -> GREEN -> REFACTOR cycle for one test.

Workflow

1. Verify Task File

Check for .tasks/YYYY-MM-DD-*.md. If missing for a non-trivial change, create one before proceeding.

2. RED - Write Failing Test

  1. Show the test inventory from the task file; ask which test to implement
  2. Read the surrounding tests in tests/unit/bashdep_test.sh to match style:
    • Pure-logic test (no filesystem) → add near the top
    • Filesystem test → add near the bottom; use $TEST_DIR and the _seed_lock / _seed_installed helpers
  3. Reset BASHDEP_* globals in the test body if it depends on a mode flag
  4. Run: lib/bashunit tests --filter <test_name> - must fail
  5. Verify the failure is for the RIGHT reason (assertion mismatch, not syntax error or missing function)
  6. Update the task file: current red bar + logbook entry

3. GREEN - Make It Pass

  1. Write minimal code in bashdep - only enough to satisfy THIS test
  2. Run: lib/bashunit tests --filter <test_name> - must pass
  3. Run the full suite: make test - nothing else regressed
  4. Update the task file: tick the test + logbook entry

4. REFACTOR - Improve Code

  1. Improve readability, naming, extract duplication - no behavior changes
  2. Run make test after each change
  3. Quality checks: make sa && make lint
  4. Update the task file with refactoring notes

5. Next Test

Show the updated test inventory. Ask whether to continue or stop.

Critical Rules

  • Never skip RED - always verify the test fails first
  • Minimal code in GREEN - resist scope creep
  • All tests green during REFACTOR - revert immediately if broken
  • Bash 3.2+ - see .claude/rules/bash-style.md
  • Honor modes - any new mutating code must respect BASHDEP_DRY_RUN, BASHDEP_SILENT, BASHDEP_VERBOSE, BASHDEP_FORCE

レビュー

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

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Add a new bashdep:: lifecycle command with TDD

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

Chemaclass/bashdep192026年10月20日 更新

commit

無料

Stage and commit changes using conventional commits format

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

Chemaclass/bashdep192026年10月20日 更新

Coverage gap analysis for the bashdep public API plus a bashdep::doctor audit

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

Chemaclass/bashdep192026年10月20日 更新

fix-test

無料

Debug and fix failing bashdep tests systematically

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

Chemaclass/bashdep192026年10月20日 更新

gh-issue

無料

Fetch a GitHub issue, create a branch, plan and implement with TDD, then open a PR

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

Chemaclass/bashdep192026年10月20日 更新

pr

無料

Push branch and create a GitHub PR following the bashdep PR template

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

Chemaclass/bashdep192026年10月20日 更新

Chemaclass のスキルをすべて見る

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