- skills/reconcile-docs/: preserve local-only doc reconciliation, scope optional read-only PR/milestone/Projects v2 board reads to GitHub via `gh repo view --json url`, replace `gt pr`/`implement-slice` references, and route handoffs to `projects` and `implement` - skills/git-manager/SKILL.md: update `gitea-pr` references to `implement` (Draft PRs) and `verify` (promotion and merge) while keeping `git-manager` unchanged - skills/tdd/SKILL.md: update `verify-slice` references and `Suggested Next Step` routing to `verify` - skills/gt-usage/SKILL.md: document standalone ad-hoc Gitea CLI role outside the GitHub core delivery loop and remove legacy `gitea-plan`/`gitea-pr` handoffs - README.md: update architecture overview, active skill table, canonical flows, CLI prerequisites (`gh` primary, `gt` optional standalone), and regression test summary for the 4-skill GitHub loop - profile/AGENTS.md: update homogeneous operational checkpoint wording from Gitea issues to GitHub issues
4.4 KiB
4.4 KiB
name, description
| name | description |
|---|---|
| tdd | Guides test-driven development through public interface seams (Mode A: write-time Red-Green vertical slices) and standalone test-suite audit and hardening (Mode B) across Python, TypeScript, Bash, Rust, and Java. Use when the user types /tdd, asks for test-first implementation or bug reproduction, or requests hardening an existing test file, branch, or PR suite. Do not use for trivial fixes, styling, copy, declarative configuration, or read-only multi-axis diff review (code-review). |
Test-Driven Development
Use when
/tddfor Mode A (test-first implementation, red-green vertical slices, or failing bug reproduction)./tdd <test-path|branch|PR>for Mode B (active audit and hardening of existing tests against seams-and-mocking and test-quality).- Not for trivial two-line fixes, copy, styling, declarative config, or pure wiring: edit directly instead.
- Not for read-only pre-merge multi-axis diff inspection (
code-review) or live runtime/browser QA (verify).
Steps
- Check applicability and select mode. Confirm the task tests observable logic at a testable boundary (skip and edit directly for trivial config/copy when
/tddwas not requested). Read project domain docs (GLOSSARY.mdor local ADRs) if present. Select Mode A when adding new behavior, reproducing a bug, or writing a new test; select Mode B when asked to audit/harden existing tests or fixcode-reviewAxis 3 findings, and follow the Mode B checklist in test-quality. - Establish the public seam. Identify the public interface where callers observe behavior without reaching into internals (see seams-and-mocking). If the seam already exists and is unambiguous, proceed directly. Pause to confirm with the human owner when introducing a new public interface, changing a production signature, or introducing test doubles.
- Write one failing tracer bullet (Red). Write a focused test at the agreed seam describing what capability or invariant holds, not how internals work (see test-quality). Derive expected values from independent spec literals, never by importing production value constants or mirroring implementation logic.
- Verify observable failure. Run the targeted test command and confirm the test fails for the expected behavioral reason, not a syntax, import, or fixture setup error.
- Write the minimal implementation (Green). Write only enough production code to make the failing test pass. Avoid speculative abstractions or untested branches.
- Cover negative, conflict, and boundary cases. Once the happy-path slice passes, run red-to-green cycles for material failure modes, two-sided/one-sided boundary edges, and deterministic async/teardown behavior per test-quality.
- Clean up and hand off. Remove duplication and clarify test names while keeping the suite green.
Your call
- New seams, signatures, and mock boundaries: approve proposed public seams, external doubles vs. real lightweight fixtures, and any Mode B production signature widening (such as adding an injected timing/clock callable) before editing production interfaces.
- Coverage depth: decide when edge-case and negative-path slices are sufficient for the risk level of the change.
Done when
- Mode A: Every targeted test was observed failing for the expected reason before passing, all tests verify public seams without tautologies, and the suite passes cleanly.
- Mode B: Every rewritten/hardened test is verified sensitive to its target invariant (observed failing under fault/boundary check before passing green) and the suite passes cleanly.
Hands off to
code-review: to inspect the resulting diff, smells, invariants, and Axis 3 test integrity (Suggested Next Step: /code-review <base>..HEAD).verify: when the slice also needs live runtime, browser DOM, or multi-service verification (Suggested Next Step: /verify).diagnose: when an unexpected test or fixture failure needs root-cause investigation (Suggested Next Step: /diagnose <failing-test>).git-manager: for branch isolation or committing cohesive vertical slices.- Emit one outcome-matched
Suggested Next Stepon standalone turns; suppress when delegated (per skeleton).