{"_id":"@ailoom/tdd","name":"@ailoom/tdd","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@ailoom/tdd","version":"0.1.0","description":"Test-driven development framework for AI coding assistants","keywords":["tdd","test-driven","cli","ai","development","testing"],"homepage":"https://github.com/AILoom/tdd","repository":{"type":"git","url":"git+https://github.com/AILoom/tdd.git"},"license":"MIT","author":{"name":"TDD Contributors"},"type":"module","publishConfig":{"access":"public"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"bin":{"tdd":"bin/tdd.js"},"scripts":{"lint":"eslint src/","build":"node build.js","dev":"tsc --watch","dev:cli":"pnpm build && node bin/tdd.js","test":"vitest run","test:watch":"vitest","test:coverage":"vitest --coverage","prepublishOnly":"npm run build"},"engines":{"node":">=20.0.0"},"devDependencies":{"@types/node":"^22.0.0","eslint":"^9.0.0","typescript":"^5.7.0","typescript-eslint":"^8.0.0","vitest":"^3.0.0"},"dependencies":{"@inquirer/prompts":"^7.0.0","chalk":"^5.4.0","commander":"^13.0.0","fast-glob":"^3.3.0","ora":"^8.2.0","yaml":"^2.7.0","zod":"^3.24.0"},"gitHead":"82c778260a337fa8c544fa2b71f74dbfd520f6f3","_id":"@ailoom/tdd@0.1.0","bugs":{"url":"https://github.com/AILoom/tdd/issues"},"_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-1J5MsNDW1uu6JbQiK3dLTzJhOTW2pWdV/7k61nE0UdxVPTMQGwV3nfia2H/KGlI52mqRKkxHJ8aCyCg9L/t2aA==","shasum":"01d06faa30442c96492e0748f039bbaa2b614010","tarball":"https://registry.npmjs.org/@ailoom/tdd/-/tdd-0.1.0.tgz","fileCount":51,"unpackedSize":80665,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCBxWMGf/H7gEVkI6BtyiuEGwMycPt437nstbTWp54jEAIhAMflmBk/AK1NKxyNdJJKv+OXlnl6IV6F75B+UnlLuc0M"}]},"_npmUser":{"name":"harshabikkavilli","email":"harshabikkavilli@gmail.com"},"directories":{},"maintainers":[{"name":"harshabikkavilli","email":"harshabikkavilli@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tdd_0.1.0_1771799071424_0.6716772580234975"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-22T22:24:31.313Z","0.1.0":"2026-02-22T22:24:31.551Z","modified":"2026-02-22T22:24:31.806Z"},"maintainers":[{"name":"harshabikkavilli","email":"harshabikkavilli@gmail.com"}],"description":"Test-driven development framework for AI coding assistants","homepage":"https://github.com/AILoom/tdd","keywords":["tdd","test-driven","cli","ai","development","testing"],"repository":{"type":"git","url":"git+https://github.com/AILoom/tdd.git"},"author":{"name":"TDD Contributors"},"bugs":{"url":"https://github.com/AILoom/tdd/issues"},"license":"MIT","readme":"# Test-Driven Development : TDD\n\n**Get your AI to write tests first.** A small CLI and set of slash commands that wire Red/Green/Refactor into your existing AI assistant (Cursor, Claude Code, Copilot, and others).\n\n---\n\n## The problem\n\nAssistants are great at writing code and weak at writing tests. They tend to implement first and test later or skip tests. This framework keeps the cycle explicit: **plan tests → write failing tests → implement → refactor**, with one change per folder and coverage tracked in the repo.\n\n---\n\n## Install and run\n\nNode.js 20+ required.\n\n```bash\nnpm install -g @ailoom/tdd\ncd your-project\ntdd init\n```\n\nPick your tools when prompted (or use `tdd init --tools cursor,claude`). Then in chat: `**/tdd:new add-thing**` to start a change.\n\n---\n\n## What you get\n\nEach change lives in `tdd/changes/<name>/` with:\n\n\n| File           | Role                                              |\n| -------------- | ------------------------------------------------- |\n| `intent.md`    | Why we’re doing this, scope, impact               |\n| `test-plan.md` | Scenarios to implement as tests (Given/When/Then) |\n| `design.md`    | How we’ll build it (optional)                     |\n| `tasks.md`     | Checklist: RED → GREEN → REFACTOR                 |\n\n\nThe flow:\n\n1. **Plan** — `/tdd:ff` (or `/tdd:continue`) fills intent → test-plan → design → tasks.\n2. **RED** — `/tdd:red`: AI writes **only** tests from the plan; they must fail.\n3. **GREEN** — `/tdd:green`: AI writes the smallest code that makes those tests pass.\n4. **REFACTOR** — `/tdd:refactor`: AI cleans up; you re-run tests after each step.\n5. **Done** — `/tdd:archive` moves the change to the archive and updates `tdd/coverage/`.\n\nSo the contract is the **test plan**; the loop is always Red → Green → Refactor.\n\n---\n\n## Slash commands (in your AI chat)\n\n\n| Command         | Use it to                                  |\n| --------------- | ------------------------------------------ |\n| `/tdd:new`      | Start a new change                         |\n| `/tdd:ff`       | Generate all planning docs in one go       |\n| `/tdd:continue` | Generate the next doc step-by-step         |\n| `/tdd:red`      | Write failing tests (no implementation)    |\n| `/tdd:green`    | Implement until tests pass                 |\n| `/tdd:refactor` | Refactor while keeping tests green         |\n| `/tdd:verify`   | Check implementation vs plan and run tests |\n| `/tdd:archive`  | Archive the change and update coverage     |\n\n\nThere are also `/tdd:explore` (before committing to a change) and `/tdd:sync` (merge coverage without archiving). Full list and behavior are in [Commands](docs/commands.md).\n\n---\n\n## Terminal commands\n\n```bash\ntdd init [--tools ...] [--schema test-driven]\ntdd change new <name>\ntdd list | tdd show <name> | tdd status | tdd view\ntdd validate <name>\ntdd archive <name> [--no-sync]\ntdd schema list | init | fork | validate\ntdd update [--tools ...]\n```\n\nDetails: [CLI reference](docs/cli.md). Tool list and install paths: [Supported tools](docs/supported-tools.md).\n\n---\n\n## Why this exists\n\n- **Tests first** — The plan is “what tests to write”; the AI is constrained to that before writing production code.\n- **Red then green** — RED phase is tests-only; GREEN is minimal implementation. No “implement and test later.”\n- **Refactor with guardrails** — REFACTOR runs with “tests must stay green” built into the instructions.\n- **One change, one folder** — Same idea as “one change, one folder” in spec-driven tools, but the content is test-plan + tasks, and the apply step is split into red/green/refactor.\n- **Coverage as docs** — `tdd/coverage/` (and per-change deltas) record what’s tested; archiving merges that into the main coverage docs.\n\n---\n\n## Docs\n\n- [Getting started](docs/getting-started.md)\n- [Concepts](docs/concepts.md)\n- [Commands](docs/commands.md)\n- [Workflows](docs/workflows.md)\n- [CLI](docs/cli.md)\n- [Customization](docs/customization.md)\n\n---\n\n## Development\n\n```bash\nnpm install\nnpm run build\nnpm test\n```\n\nMIT","readmeFilename":"README.md","_rev":"1-b3885374c0d538a9b5c1675f13b4dd2a"}