firebase/autonomous-tdd-loop
Orchestrates a strict TDD loop across subagents to build features.
npx skills add https://github.com/firebase/firebase-ios-sdk --skill autonomous-tdd-loop
This skill orchestrates a multi-agent workflow to implement code changes while
strictly enforcing test validation and code quality standards.
agents.md file at the root of the repository defines theVerifier and Reviewer personas and test commands. If absent, the workflow
will prompt the user for this information.
When this skill is invoked, follow these exact phases in order:
Before invoking the Verifier or Reviewer subagents, you MUST verify the
environment:
AGENTS.md,agents.md, or REVIEW_GUIDELINES.md file at the root.
work and explicitly ask the user to provide the exact commands needed to
build and run tests for this project. Do not proceed until you have this
information.
Verifier in subsequent phases, rather than guessing or assuming the
environment.
user's goal. Also assess the validation scope (e.g., does this need a
full xcodebuild suite, or just a quick ./scripts/check_whitespace.sh?).
If a test is not applicable, state the reason, record your validation
scope, and skip to Phase 4.
yet.*
Cancellation:** When writing tests to verify that an AsyncStream
properly cleans up resources or cancels underlying network requests on
termination, do not mock delays that naturally finish the task.
Buffering in URLSession will mask timeouts, and naturally finishing a
mocked operation will trigger system cleanup that masks missing explicit
cancellation.
Task, yield orTask.sleep for a tiny duration (e.g. 100ms) to allow initialization,
and explicitly call .cancel() on the consumer Task. Verify that the
underlying mocked resource receives the cancellation (e.g.,
stopLoading() is called).
invoke_subagent (Role: "ObjectiveCode Verifier").
agents.md for this repo (oruse the test commands provided by the user) to find the test execution
command. Run the tests. Your ONLY goal is to verify that the specific test
I just added currently FAILS. Do not try to fix it. Return a binary
pass/fail result based on this."
test until it does.
REVIEW_GUIDELINES.md (if it exists) to ensureyour implementation adheres to repository-specific coding standards.
tests/checks using the command from agents.md (or the commands provided
by the user), but optimize for the validation scope I determined in
Phase 1 (e.g., if it's just a whitespace fix, only run the style script
instead of the full test suite). Verify that the required checks now
PASS."
this phase.
*Skip this phase if no tests were added in Phase 1.*
Run the tests again and confirm that the *exact same tests* fail again."
invoke_subagent (Role: "RigorousCode Reviewer").
agents.md and anyREVIEW_GUIDELINES.md for this repo (if they exist). Perform a rigorous,
subjective code review on my changes. Focus on concurrency, memory
management, and API design. Flag any issues."
flaky simulator, a recurring build quirk, misleading existing
documentation), append it to the .agents/MEMORY.md file in the workspace
root.
quirk of the repository that all contributors should know about (rather
than a transient local machine issue), explicitly prompt the user: "I added
a note about [Topic] to your local .agents/MEMORY.md. I recommend we
permanently add this to the repository's agents.md file so all
contributors benefit from this knowledge. Would you like me to do that?"
CHANGELOG.mdfile with a description of the change under a new top-level # Unreleased section.
gh CLI to create a PR and waitfor CI/human feedback. Otherwise, notify the user that the loop is
complete.
Take firebase/autonomous-tdd-loop from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.