{"owner":"nizos","repo":"tdd-guard","hasSkills":true,"totalSkillsCount":4,"totalTokensCount":2576,"categories":["marketplace","plugin-manifest","claude-rule","anthropic-skill"],"hasMcp":false,"mcpConfig":null,"found":[".claude-plugin/marketplace.json","plugin/.claude-plugin/plugin.json","CLAUDE.md","plugin/skills/setup/SKILL.md"],"skills":{".claude-plugin/marketplace.json":"{\n  \"name\": \"tdd-guard\",\n  \"owner\": {\n    \"name\": \"Nizar Selander\"\n  },\n  \"plugins\": [\n    {\n      \"name\": \"tdd-guard\",\n      \"source\": \"./plugin\",\n      \"description\": \"Automated Test-Driven Development enforcement\"\n    }\n  ]\n}\n","plugin/.claude-plugin/plugin.json":"{\n  \"name\": \"tdd-guard\",\n  \"version\": \"1.3.0\",\n  \"description\": \"Automated Test-Driven Development enforcement\",\n  \"author\": {\n    \"name\": \"Nizar Selander\"\n  },\n  \"repository\": \"https://github.com/nizos/tdd-guard\",\n  \"license\": \"MIT\",\n  \"keywords\": [\n    \"tdd\",\n    \"test-driven-development\",\n    \"testing\",\n    \"hooks\",\n    \"code-quality\"\n  ]\n}\n","CLAUDE.md":"# TDD Guard\n\n## Project Goal\n\nTDD Guard is a Claude Code hook that enforces Test-Driven Development by intercepting file operations.\nWhen Claude Code attempts to edit or write files, TDD Guard:\n\n1. **Captures**: Intercepts Edit, MultiEdit, and Write operations\n2. **Analyzes**: Examines test results, file paths, and code changes\n3. **Validates**: Checks TDD compliance using an AI model\n4. **Blocks**: Prevents operations that skip tests or over-implement\n5. **Guides**: Explains violations and suggests corrections\n\nThis automated enforcement maintains code quality without cluttering prompts with TDD reminders.\n\n## Development Workflow\n\n### Commit Guidelines\n\n- **Atomic commits**: Each commit represents one logical change with its tests\n- **Test and implementation together**: Never separate tests from the code they test\n- **Explain why, not what**: Commit messages should explain the reason for the change\n- **Conventional format**: Use prefixes to categorize changes: feat, fix, refactor, test, chore, docs\n\nExample: `feat: add network request filtering to reduce noise in captured data` (explains why, not just what)\n\n## Project Structure\n\nThe codebase is organized with core functionality in src/ and language-specific reporters:\n\n```\nreporters/                        # Language-specific test reporters\n├── go/                           # tdd-guard-go - Go test reporter\n├── jest/                         # tdd-guard-jest - Jest reporter (npm)\n├── minitest/                     # tdd-guard-minitest - Minitest reporter (gem)\n├── phpunit/                      # tdd-guard/phpunit - PHPUnit reporter (composer)\n├── pytest/                       # tdd-guard-pytest - Pytest reporter (pip)\n├── rspec/                        # tdd-guard-rspec - RSpec reporter (gem)\n├── rust/                         # tdd-guard-rust - Rust test reporter (crates.io)\n├── storybook/                    # tdd-guard-storybook - Storybook test-runner reporter (npm)\n├── test/                         # Shared test artifacts and integration tests\n└── vitest/                       # tdd-guard-vitest - Vitest reporter (npm)\n\nsrc/                              # Main CLI application\n├── cli/                          # Hook entry point and context builder\n├── config/                       # Configuration management\n├── contracts/                    # Types and Zod schemas\n├── guard/                        # Guard enable/disable management\n├── hooks/                        # Claude Code hook parsing and processing\n├── linters/                      # ESLint integration for code quality\n├── processors/                   # Test result and lint processing\n├── providers/                    # Model and linter client factories\n├── storage/                      # Storage abstractions\n├── validation/                   # TDD principle validation\n│   ├── validator.ts              # Sends context to AI model and parses response\n│   ├── context/                  # Formats operations for AI validation\n│   ├── prompts/                  # TDD validation rules and AI instructions\n│   └── models/                   # Claude SDK and Anthropic API clients\n└── index.ts                      # Package entry point\n\ntest/                             # Main test suite (hooks, integration, utils)\ndocs/                             # Documentation (ADRs, configuration, etc.)\n```\n\n### Architecture\n\nTDD Guard is organized as a TypeScript project with integrated language-specific reporters:\n\n- **src/**: Core functionality including contracts, config, storage, and validation\n- **reporters/**: Language-specific test reporters (go, jest, minitest, phpunit, pytest, rspec, rust, storybook, vitest)\n- **test/**: Comprehensive test suite with integration tests and utilities\n\n### Testing\n\n#### Guidelines\n\n- **Use test helpers**: Extract setup logic into helper functions placed at the bottom of test files\n- **Use test factories**: Always use factories from `test/utils/` instead of creating data inline\n- **Group tests effectively**: Use `describe` blocks and `beforeEach` for common setup\n- **Keep tests concise**: Keep as little logic in the tests themselves as possible\n\n#### Commands\n\n```bash\nnpm run build             # Build main package and workspace reporters (jest, storybook, vitest)\nnpm run test              # All unit tests and base integration tests\nnpm run test:unit         # Fast unit tests only\nnpm run test:reporters    # Test all reporter implementations\nnpm run lint              # Check code style and quality\nnpm run format            # Auto-format code with Prettier\nnpm run checks            # Run all checks: typecheck, lint, format, and test\n```\n\n### Key Design Principles\n\n- **Interface-driven**: Core functionality defined by interfaces (`Storage`, `ModelClient`)\n- **Dependency injection**: Components receive dependencies as parameters\n- **Single responsibility**: Each module has one clear purpose\n- **Type safety**: Comprehensive TypeScript types with runtime validation\n","plugin/skills/setup/SKILL.md":"---\ndescription: Set up or update TDD Guard for the current project. Detects the test framework, installs or updates the matching reporter, and configures or migrates its configuration to match the current specification.\ndisable-model-invocation: true\nallowed-tools: [Read, Glob, Grep]\n---\n\n# TDD Guard Setup\n\nSet up TDD Guard for the current project. Your goal is to:\n\n1. Identify the test framework(s) used in this project\n2. Install the matching TDD Guard reporter, or update it if already present\n3. Configure the reporter, or migrate an existing configuration to match the current specification\n\n## Reporter packages\n\n| Framework | Reporter package                                         | Registry   |\n| --------- | -------------------------------------------------------- | ---------- |\n| Vitest    | tdd-guard-vitest                                         | npm        |\n| Jest      | tdd-guard-jest                                           | npm        |\n| Storybook | tdd-guard-storybook                                      | npm        |\n| pytest    | tdd-guard-pytest                                         | PyPI       |\n| PHPUnit   | tdd-guard/phpunit                                        | Packagist  |\n| Go        | github.com/nizos/tdd-guard/reporters/go/cmd/tdd-guard-go | go install |\n| Rust      | tdd-guard-rust                                           | crates.io  |\n| RSpec     | tdd-guard-rspec                                          | RubyGems   |\n| Minitest  | tdd-guard-minitest                                       | RubyGems   |\n\n## Reporter configuration\n\nAll reporters write test results to `.claude/tdd-guard/data/test.json` relative to the project root.\n\n**Vitest** — Add the reporter entry to the `reporters` array with `projectRoot` in the options object.\n\n```typescript\nreporters: [\n  'default',\n  ['tdd-guard-vitest', { projectRoot: '/absolute/path/to/project' }],\n]\n```\n\n**Jest** — Add reporter entry to the `reporters` array with `projectRoot` option.\n\n```typescript\nreporters: [\n  'default',\n  ['tdd-guard-jest', { projectRoot: '/absolute/path/to/project' }],\n]\n```\n\n**Storybook** — Construct `StorybookReporter` in `.storybook/test-runner.ts` and wire it into the `postVisit` hook.\n\n```typescript\n// .storybook/test-runner.ts\nimport { StorybookReporter } from 'tdd-guard-storybook'\n\nconst reporter = new StorybookReporter({\n  projectRoot: '/absolute/path/to/project',\n})\n\nmodule.exports = {\n  async postVisit(page, context) {\n    await reporter.onStoryResult(context)\n  },\n}\n\nprocess.on('exit', () => {\n  reporter.onComplete()\n})\n```\n\n**pytest** — Set `tdd_guard_project_root` in pytest config (`pyproject.toml`, `pytest.ini`, or `setup.cfg`).\n\n```toml\n[tool.pytest.ini_options]\ntdd_guard_project_root = \"/absolute/path/to/project\"\n```\n\n**PHPUnit** — Add extension (PHPUnit 10+) or listener (PHPUnit 9.x) to `phpunit.xml` with project root path.\n\n```xml\n<!-- PHPUnit 10+ -->\n<extensions>\n    <bootstrap class=\"TddGuard\\PHPUnit\\TddGuardExtension\">\n        <parameter name=\"projectRoot\" value=\"/absolute/path/to/project\"/>\n    </bootstrap>\n</extensions>\n\n<!-- PHPUnit 9.x -->\n<listeners>\n    <listener class=\"TddGuard\\PHPUnit\\TddGuardListener\">\n        <arguments>\n            <string>/absolute/path/to/project</string>\n        </arguments>\n    </listener>\n</listeners>\n```\n\n**Go** — Add a test target using the piped command below. Update an existing Makefile, Taskfile, or similar build system if one exists.\n\n```bash\ngo test -json ./... 2>&1 | tdd-guard-go -project-root /absolute/path/to/project\n```\n\n**Rust** — Add a test target using the piped command below. Update an existing Makefile, Taskfile, or similar build system if one exists.\n\n```bash\ncargo nextest run 2>&1 | tdd-guard-rust --project-root /absolute/path/to/project --passthrough\n```\n\n**RSpec** — Add the formatter to `.rspec` and set `TDD_GUARD_PROJECT_ROOT` environment variable to the absolute project root path.\n\n```\n--format TddGuardRspec::Formatter\n```\n\n```bash\nexport TDD_GUARD_PROJECT_ROOT=\"/absolute/path/to/project\"\n```\n\n**Minitest** — Require `tdd_guard_minitest/autorun` from `test/test_helper.rb` (or pass `-rtdd_guard_minitest/autorun` via `Rake::TestTask` ruby_opts) and set `TDD_GUARD_PROJECT_ROOT` to the absolute project root path.\n\n```ruby\n# test/test_helper.rb\nrequire \"tdd_guard_minitest/autorun\"\n```\n\n```bash\nexport TDD_GUARD_PROJECT_ROOT=\"/absolute/path/to/project\"\n```\n\n## Guidelines\n\nYour scope is limited to installing, updating, configuring, and migrating a TDD Guard reporter. Do not make changes beyond that.\n\n- **Always use absolute paths** when configuring the project root in reporters.\n- **Do not install, update, or modify test frameworks**, build tools, or any other project dependencies. Only install or update the TDD Guard reporter itself.\n- **Do not modify existing test configuration** beyond the TDD Guard reporter entry. Migrate any drifted reporter configuration to match the current specification, preserving the user's project root value and leaving unrelated entries untouched. If the existing configuration cannot be migrated without guessing — for example, because it is wrapped in user-defined code or intermingled with custom logic — inform the user and let them decide.\n- **If a TDD Guard reporter is already installed and its configuration matches this skill's specification**, inform the user that everything is up to date and stop.\n- **If multiple frameworks are detected**, ask the user which to configure.\n- **If something goes wrong or is unclear**, inform the user rather than attempting to fix it. Do not install additional packages or make extra changes to resolve issues.\n\n## After setup\n\nOnce complete, inform the user of what was done and that:\n\n- TDD Guard validates changes against TDD principles\n- They can type `tdd-guard off` / `tdd-guard on` to toggle it mid-session\n- They can customize validation rules by editing `.claude/tdd-guard/data/instructions.md`\n- More help and configuration options are available at https://github.com/nizos/tdd-guard\n"},"files":{".claude-plugin/marketplace.json":"{\n  \"name\": \"tdd-guard\",\n  \"owner\": {\n    \"name\": \"Nizar Selander\"\n  },\n  \"plugins\": [\n    {\n      \"name\": \"tdd-guard\",\n      \"source\": \"./plugin\",\n      \"description\": \"Automated Test-Driven Development enforcement\"\n    }\n  ]\n}\n","plugin/.claude-plugin/plugin.json":"{\n  \"name\": \"tdd-guard\",\n  \"version\": \"1.3.0\",\n  \"description\": \"Automated Test-Driven Development enforcement\",\n  \"author\": {\n    \"name\": \"Nizar Selander\"\n  },\n  \"repository\": \"https://github.com/nizos/tdd-guard\",\n  \"license\": \"MIT\",\n  \"keywords\": [\n    \"tdd\",\n    \"test-driven-development\",\n    \"testing\",\n    \"hooks\",\n    \"code-quality\"\n  ]\n}\n","CLAUDE.md":"# TDD Guard\n\n## Project Goal\n\nTDD Guard is a Claude Code hook that enforces Test-Driven Development by intercepting file operations.\nWhen Claude Code attempts to edit or write files, TDD Guard:\n\n1. **Captures**: Intercepts Edit, MultiEdit, and Write operations\n2. **Analyzes**: Examines test results, file paths, and code changes\n3. **Validates**: Checks TDD compliance using an AI model\n4. **Blocks**: Prevents operations that skip tests or over-implement\n5. **Guides**: Explains violations and suggests corrections\n\nThis automated enforcement maintains code quality without cluttering prompts with TDD reminders.\n\n## Development Workflow\n\n### Commit Guidelines\n\n- **Atomic commits**: Each commit represents one logical change with its tests\n- **Test and implementation together**: Never separate tests from the code they test\n- **Explain why, not what**: Commit messages should explain the reason for the change\n- **Conventional format**: Use prefixes to categorize changes: feat, fix, refactor, test, chore, docs\n\nExample: `feat: add network request filtering to reduce noise in captured data` (explains why, not just what)\n\n## Project Structure\n\nThe codebase is organized with core functionality in src/ and language-specific reporters:\n\n```\nreporters/                        # Language-specific test reporters\n├── go/                           # tdd-guard-go - Go test reporter\n├── jest/                         # tdd-guard-jest - Jest reporter (npm)\n├── minitest/                     # tdd-guard-minitest - Minitest reporter (gem)\n├── phpunit/                      # tdd-guard/phpunit - PHPUnit reporter (composer)\n├── pytest/                       # tdd-guard-pytest - Pytest reporter (pip)\n├── rspec/                        # tdd-guard-rspec - RSpec reporter (gem)\n├── rust/                         # tdd-guard-rust - Rust test reporter (crates.io)\n├── storybook/                    # tdd-guard-storybook - Storybook test-runner reporter (npm)\n├── test/                         # Shared test artifacts and integration tests\n└── vitest/                       # tdd-guard-vitest - Vitest reporter (npm)\n\nsrc/                              # Main CLI application\n├── cli/                          # Hook entry point and context builder\n├── config/                       # Configuration management\n├── contracts/                    # Types and Zod schemas\n├── guard/                        # Guard enable/disable management\n├── hooks/                        # Claude Code hook parsing and processing\n├── linters/                      # ESLint integration for code quality\n├── processors/                   # Test result and lint processing\n├── providers/                    # Model and linter client factories\n├── storage/                      # Storage abstractions\n├── validation/                   # TDD principle validation\n│   ├── validator.ts              # Sends context to AI model and parses response\n│   ├── context/                  # Formats operations for AI validation\n│   ├── prompts/                  # TDD validation rules and AI instructions\n│   └── models/                   # Claude SDK and Anthropic API clients\n└── index.ts                      # Package entry point\n\ntest/                             # Main test suite (hooks, integration, utils)\ndocs/                             # Documentation (ADRs, configuration, etc.)\n```\n\n### Architecture\n\nTDD Guard is organized as a TypeScript project with integrated language-specific reporters:\n\n- **src/**: Core functionality including contracts, config, storage, and validation\n- **reporters/**: Language-specific test reporters (go, jest, minitest, phpunit, pytest, rspec, rust, storybook, vitest)\n- **test/**: Comprehensive test suite with integration tests and utilities\n\n### Testing\n\n#### Guidelines\n\n- **Use test helpers**: Extract setup logic into helper functions placed at the bottom of test files\n- **Use test factories**: Always use factories from `test/utils/` instead of creating data inline\n- **Group tests effectively**: Use `describe` blocks and `beforeEach` for common setup\n- **Keep tests concise**: Keep as little logic in the tests themselves as possible\n\n#### Commands\n\n```bash\nnpm run build             # Build main package and workspace reporters (jest, storybook, vitest)\nnpm run test              # All unit tests and base integration tests\nnpm run test:unit         # Fast unit tests only\nnpm run test:reporters    # Test all reporter implementations\nnpm run lint              # Check code style and quality\nnpm run format            # Auto-format code with Prettier\nnpm run checks            # Run all checks: typecheck, lint, format, and test\n```\n\n### Key Design Principles\n\n- **Interface-driven**: Core functionality defined by interfaces (`Storage`, `ModelClient`)\n- **Dependency injection**: Components receive dependencies as parameters\n- **Single responsibility**: Each module has one clear purpose\n- **Type safety**: Comprehensive TypeScript types with runtime validation\n","plugin/skills/setup/SKILL.md":"---\ndescription: Set up or update TDD Guard for the current project. Detects the test framework, installs or updates the matching reporter, and configures or migrates its configuration to match the current specification.\ndisable-model-invocation: true\nallowed-tools: [Read, Glob, Grep]\n---\n\n# TDD Guard Setup\n\nSet up TDD Guard for the current project. Your goal is to:\n\n1. Identify the test framework(s) used in this project\n2. Install the matching TDD Guard reporter, or update it if already present\n3. Configure the reporter, or migrate an existing configuration to match the current specification\n\n## Reporter packages\n\n| Framework | Reporter package                                         | Registry   |\n| --------- | -------------------------------------------------------- | ---------- |\n| Vitest    | tdd-guard-vitest                                         | npm        |\n| Jest      | tdd-guard-jest                                           | npm        |\n| Storybook | tdd-guard-storybook                                      | npm        |\n| pytest    | tdd-guard-pytest                                         | PyPI       |\n| PHPUnit   | tdd-guard/phpunit                                        | Packagist  |\n| Go        | github.com/nizos/tdd-guard/reporters/go/cmd/tdd-guard-go | go install |\n| Rust      | tdd-guard-rust                                           | crates.io  |\n| RSpec     | tdd-guard-rspec                                          | RubyGems   |\n| Minitest  | tdd-guard-minitest                                       | RubyGems   |\n\n## Reporter configuration\n\nAll reporters write test results to `.claude/tdd-guard/data/test.json` relative to the project root.\n\n**Vitest** — Add the reporter entry to the `reporters` array with `projectRoot` in the options object.\n\n```typescript\nreporters: [\n  'default',\n  ['tdd-guard-vitest', { projectRoot: '/absolute/path/to/project' }],\n]\n```\n\n**Jest** — Add reporter entry to the `reporters` array with `projectRoot` option.\n\n```typescript\nreporters: [\n  'default',\n  ['tdd-guard-jest', { projectRoot: '/absolute/path/to/project' }],\n]\n```\n\n**Storybook** — Construct `StorybookReporter` in `.storybook/test-runner.ts` and wire it into the `postVisit` hook.\n\n```typescript\n// .storybook/test-runner.ts\nimport { StorybookReporter } from 'tdd-guard-storybook'\n\nconst reporter = new StorybookReporter({\n  projectRoot: '/absolute/path/to/project',\n})\n\nmodule.exports = {\n  async postVisit(page, context) {\n    await reporter.onStoryResult(context)\n  },\n}\n\nprocess.on('exit', () => {\n  reporter.onComplete()\n})\n```\n\n**pytest** — Set `tdd_guard_project_root` in pytest config (`pyproject.toml`, `pytest.ini`, or `setup.cfg`).\n\n```toml\n[tool.pytest.ini_options]\ntdd_guard_project_root = \"/absolute/path/to/project\"\n```\n\n**PHPUnit** — Add extension (PHPUnit 10+) or listener (PHPUnit 9.x) to `phpunit.xml` with project root path.\n\n```xml\n<!-- PHPUnit 10+ -->\n<extensions>\n    <bootstrap class=\"TddGuard\\PHPUnit\\TddGuardExtension\">\n        <parameter name=\"projectRoot\" value=\"/absolute/path/to/project\"/>\n    </bootstrap>\n</extensions>\n\n<!-- PHPUnit 9.x -->\n<listeners>\n    <listener class=\"TddGuard\\PHPUnit\\TddGuardListener\">\n        <arguments>\n            <string>/absolute/path/to/project</string>\n        </arguments>\n    </listener>\n</listeners>\n```\n\n**Go** — Add a test target using the piped command below. Update an existing Makefile, Taskfile, or similar build system if one exists.\n\n```bash\ngo test -json ./... 2>&1 | tdd-guard-go -project-root /absolute/path/to/project\n```\n\n**Rust** — Add a test target using the piped command below. Update an existing Makefile, Taskfile, or similar build system if one exists.\n\n```bash\ncargo nextest run 2>&1 | tdd-guard-rust --project-root /absolute/path/to/project --passthrough\n```\n\n**RSpec** — Add the formatter to `.rspec` and set `TDD_GUARD_PROJECT_ROOT` environment variable to the absolute project root path.\n\n```\n--format TddGuardRspec::Formatter\n```\n\n```bash\nexport TDD_GUARD_PROJECT_ROOT=\"/absolute/path/to/project\"\n```\n\n**Minitest** — Require `tdd_guard_minitest/autorun` from `test/test_helper.rb` (or pass `-rtdd_guard_minitest/autorun` via `Rake::TestTask` ruby_opts) and set `TDD_GUARD_PROJECT_ROOT` to the absolute project root path.\n\n```ruby\n# test/test_helper.rb\nrequire \"tdd_guard_minitest/autorun\"\n```\n\n```bash\nexport TDD_GUARD_PROJECT_ROOT=\"/absolute/path/to/project\"\n```\n\n## Guidelines\n\nYour scope is limited to installing, updating, configuring, and migrating a TDD Guard reporter. Do not make changes beyond that.\n\n- **Always use absolute paths** when configuring the project root in reporters.\n- **Do not install, update, or modify test frameworks**, build tools, or any other project dependencies. Only install or update the TDD Guard reporter itself.\n- **Do not modify existing test configuration** beyond the TDD Guard reporter entry. Migrate any drifted reporter configuration to match the current specification, preserving the user's project root value and leaving unrelated entries untouched. If the existing configuration cannot be migrated without guessing — for example, because it is wrapped in user-defined code or intermingled with custom logic — inform the user and let them decide.\n- **If a TDD Guard reporter is already installed and its configuration matches this skill's specification**, inform the user that everything is up to date and stop.\n- **If multiple frameworks are detected**, ask the user which to configure.\n- **If something goes wrong or is unclear**, inform the user rather than attempting to fix it. Do not install additional packages or make extra changes to resolve issues.\n\n## After setup\n\nOnce complete, inform the user of what was done and that:\n\n- TDD Guard validates changes against TDD principles\n- They can type `tdd-guard off` / `tdd-guard on` to toggle it mid-session\n- They can customize validation rules by editing `.claude/tdd-guard/data/instructions.md`\n- More help and configuration options are available at https://github.com/nizos/tdd-guard\n"},"items":[{"name":"SKILL.md","path":"plugin/skills/setup/SKILL.md","rawUrl":"https://raw.githubusercontent.com/nizos/tdd-guard/HEAD/plugin/skills/setup/SKILL.md","title":"setup","category":"anthropic-skill","format":"markdown","content":"---\ndescription: Set up or update TDD Guard for the current project. Detects the test framework, installs or updates the matching reporter, and configures or migrates its configuration to match the current specification.\ndisable-model-invocation: true\nallowed-tools: [Read, Glob, Grep]\n---\n\n# TDD Guard Setup\n\nSet up TDD Guard for the current project. Your goal is to:\n\n1. Identify the test framework(s) used in this project\n2. Install the matching TDD Guard reporter, or update it if already present\n3. Configure the reporter, or migrate an existing configuration to match the current specification\n\n## Reporter packages\n\n| Framework | Reporter package                                         | Registry   |\n| --------- | -------------------------------------------------------- | ---------- |\n| Vitest    | tdd-guard-vitest                                         | npm        |\n| Jest      | tdd-guard-jest                                           | npm        |\n| Storybook | tdd-guard-storybook                                      | npm        |\n| pytest    | tdd-guard-pytest                                         | PyPI       |\n| PHPUnit   | tdd-guard/phpunit                                        | Packagist  |\n| Go        | github.com/nizos/tdd-guard/reporters/go/cmd/tdd-guard-go | go install |\n| Rust      | tdd-guard-rust                                           | crates.io  |\n| RSpec     | tdd-guard-rspec                                          | RubyGems   |\n| Minitest  | tdd-guard-minitest                                       | RubyGems   |\n\n## Reporter configuration\n\nAll reporters write test results to `.claude/tdd-guard/data/test.json` relative to the project root.\n\n**Vitest** — Add the reporter entry to the `reporters` array with `projectRoot` in the options object.\n\n```typescript\nreporters: [\n  'default',\n  ['tdd-guard-vitest', { projectRoot: '/absolute/path/to/project' }],\n]\n```\n\n**Jest** — Add reporter entry to the `reporters` array with `projectRoot` option.\n\n```typescript\nreporters: [\n  'default',\n  ['tdd-guard-jest', { projectRoot: '/absolute/path/to/project' }],\n]\n```\n\n**Storybook** — Construct `StorybookReporter` in `.storybook/test-runner.ts` and wire it into the `postVisit` hook.\n\n```typescript\n// .storybook/test-runner.ts\nimport { StorybookReporter } from 'tdd-guard-storybook'\n\nconst reporter = new StorybookReporter({\n  projectRoot: '/absolute/path/to/project',\n})\n\nmodule.exports = {\n  async postVisit(page, context) {\n    await reporter.onStoryResult(context)\n  },\n}\n\nprocess.on('exit', () => {\n  reporter.onComplete()\n})\n```\n\n**pytest** — Set `tdd_guard_project_root` in pytest config (`pyproject.toml`, `pytest.ini`, or `setup.cfg`).\n\n```toml\n[tool.pytest.ini_options]\ntdd_guard_project_root = \"/absolute/path/to/project\"\n```\n\n**PHPUnit** — Add extension (PHPUnit 10+) or listener (PHPUnit 9.x) to `phpunit.xml` with project root path.\n\n```xml\n<!-- PHPUnit 10+ -->\n<extensions>\n    <bootstrap class=\"TddGuard\\PHPUnit\\TddGuardExtension\">\n        <parameter name=\"projectRoot\" value=\"/absolute/path/to/project\"/>\n    </bootstrap>\n</extensions>\n\n<!-- PHPUnit 9.x -->\n<listeners>\n    <listener class=\"TddGuard\\PHPUnit\\TddGuardListener\">\n        <arguments>\n            <string>/absolute/path/to/project</string>\n        </arguments>\n    </listener>\n</listeners>\n```\n\n**Go** — Add a test target using the piped command below. Update an existing Makefile, Taskfile, or similar build system if one exists.\n\n```bash\ngo test -json ./... 2>&1 | tdd-guard-go -project-root /absolute/path/to/project\n```\n\n**Rust** — Add a test target using the piped command below. Update an existing Makefile, Taskfile, or similar build system if one exists.\n\n```bash\ncargo nextest run 2>&1 | tdd-guard-rust --project-root /absolute/path/to/project --passthrough\n```\n\n**RSpec** — Add the formatter to `.rspec` and set `TDD_GUARD_PROJECT_ROOT` environment variable to the absolute project root path.\n\n```\n--format TddGuardRspec::Formatter\n```\n\n```bash\nexport TDD_GUARD_PROJECT_ROOT=\"/absolute/path/to/project\"\n```\n\n**Minitest** — Require `tdd_guard_minitest/autorun` from `test/test_helper.rb` (or pass `-rtdd_guard_minitest/autorun` via `Rake::TestTask` ruby_opts) and set `TDD_GUARD_PROJECT_ROOT` to the absolute project root path.\n\n```ruby\n# test/test_helper.rb\nrequire \"tdd_guard_minitest/autorun\"\n```\n\n```bash\nexport TDD_GUARD_PROJECT_ROOT=\"/absolute/path/to/project\"\n```\n\n## Guidelines\n\nYour scope is limited to installing, updating, configuring, and migrating a TDD Guard reporter. Do not make changes beyond that.\n\n- **Always use absolute paths** when configuring the project root in reporters.\n- **Do not install, update, or modify test frameworks**, build tools, or any other project dependencies. Only install or update the TDD Guard reporter itself.\n- **Do not modify existing test configuration** beyond the TDD Guard reporter entry. Migrate any drifted reporter configuration to match the current specification, preserving the user's project root value and leaving unrelated entries untouched. If the existing configuration cannot be migrated without guessing — for example, because it is wrapped in user-defined code or intermingled with custom logic — inform the user and let them decide.\n- **If a TDD Guard reporter is already installed and its configuration matches this skill's specification**, inform the user that everything is up to date and stop.\n- **If multiple frameworks are detected**, ask the user which to configure.\n- **If something goes wrong or is unclear**, inform the user rather than attempting to fix it. Do not install additional packages or make extra changes to resolve issues.\n\n## After setup\n\nOnce complete, inform the user of what was done and that:\n\n- TDD Guard validates changes against TDD principles\n- They can type `tdd-guard off` / `tdd-guard on` to toggle it mid-session\n- They can customize validation rules by editing `.claude/tdd-guard/data/instructions.md`\n- More help and configuration options are available at https://github.com/nizos/tdd-guard\n","frontmatter":{"description":"Set up or update TDD Guard for the current project. Detects the test framework, installs or updates the matching reporter, and configures or migrates its configuration to match the current specification.","disable-model-invocation":true,"allowed-tools":["Read","Glob","Grep"],"allowedTools":["Read","Glob","Grep"],"disableModelInvocation":true},"allowedTools":["Read","Glob","Grep"],"isInternal":false,"tokens":1363,"sizeBytes":6055},{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/nizos/tdd-guard/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"# TDD Guard\n\n## Project Goal\n\nTDD Guard is a Claude Code hook that enforces Test-Driven Development by intercepting file operations.\nWhen Claude Code attempts to edit or write files, TDD Guard:\n\n1. **Captures**: Intercepts Edit, MultiEdit, and Write operations\n2. **Analyzes**: Examines test results, file paths, and code changes\n3. **Validates**: Checks TDD compliance using an AI model\n4. **Blocks**: Prevents operations that skip tests or over-implement\n5. **Guides**: Explains violations and suggests corrections\n\nThis automated enforcement maintains code quality without cluttering prompts with TDD reminders.\n\n## Development Workflow\n\n### Commit Guidelines\n\n- **Atomic commits**: Each commit represents one logical change with its tests\n- **Test and implementation together**: Never separate tests from the code they test\n- **Explain why, not what**: Commit messages should explain the reason for the change\n- **Conventional format**: Use prefixes to categorize changes: feat, fix, refactor, test, chore, docs\n\nExample: `feat: add network request filtering to reduce noise in captured data` (explains why, not just what)\n\n## Project Structure\n\nThe codebase is organized with core functionality in src/ and language-specific reporters:\n\n```\nreporters/                        # Language-specific test reporters\n├── go/                           # tdd-guard-go - Go test reporter\n├── jest/                         # tdd-guard-jest - Jest reporter (npm)\n├── minitest/                     # tdd-guard-minitest - Minitest reporter (gem)\n├── phpunit/                      # tdd-guard/phpunit - PHPUnit reporter (composer)\n├── pytest/                       # tdd-guard-pytest - Pytest reporter (pip)\n├── rspec/                        # tdd-guard-rspec - RSpec reporter (gem)\n├── rust/                         # tdd-guard-rust - Rust test reporter (crates.io)\n├── storybook/                    # tdd-guard-storybook - Storybook test-runner reporter (npm)\n├── test/                         # Shared test artifacts and integration tests\n└── vitest/                       # tdd-guard-vitest - Vitest reporter (npm)\n\nsrc/                              # Main CLI application\n├── cli/                          # Hook entry point and context builder\n├── config/                       # Configuration management\n├── contracts/                    # Types and Zod schemas\n├── guard/                        # Guard enable/disable management\n├── hooks/                        # Claude Code hook parsing and processing\n├── linters/                      # ESLint integration for code quality\n├── processors/                   # Test result and lint processing\n├── providers/                    # Model and linter client factories\n├── storage/                      # Storage abstractions\n├── validation/                   # TDD principle validation\n│   ├── validator.ts              # Sends context to AI model and parses response\n│   ├── context/                  # Formats operations for AI validation\n│   ├── prompts/                  # TDD validation rules and AI instructions\n│   └── models/                   # Claude SDK and Anthropic API clients\n└── index.ts                      # Package entry point\n\ntest/                             # Main test suite (hooks, integration, utils)\ndocs/                             # Documentation (ADRs, configuration, etc.)\n```\n\n### Architecture\n\nTDD Guard is organized as a TypeScript project with integrated language-specific reporters:\n\n- **src/**: Core functionality including contracts, config, storage, and validation\n- **reporters/**: Language-specific test reporters (go, jest, minitest, phpunit, pytest, rspec, rust, storybook, vitest)\n- **test/**: Comprehensive test suite with integration tests and utilities\n\n### Testing\n\n#### Guidelines\n\n- **Use test helpers**: Extract setup logic into helper functions placed at the bottom of test files\n- **Use test factories**: Always use factories from `test/utils/` instead of creating data inline\n- **Group tests effectively**: Use `describe` blocks and `beforeEach` for common setup\n- **Keep tests concise**: Keep as little logic in the tests themselves as possible\n\n#### Commands\n\n```bash\nnpm run build             # Build main package and workspace reporters (jest, storybook, vitest)\nnpm run test              # All unit tests and base integration tests\nnpm run test:unit         # Fast unit tests only\nnpm run test:reporters    # Test all reporter implementations\nnpm run lint              # Check code style and quality\nnpm run format            # Auto-format code with Prettier\nnpm run checks            # Run all checks: typecheck, lint, format, and test\n```\n\n### Key Design Principles\n\n- **Interface-driven**: Core functionality defined by interfaces (`Storage`, `ModelClient`)\n- **Dependency injection**: Components receive dependencies as parameters\n- **Single responsibility**: Each module has one clear purpose\n- **Type safety**: Comprehensive TypeScript types with runtime validation\n","isInternal":false,"tokens":1039,"sizeBytes":5136},{"name":"marketplace.json","path":".claude-plugin/marketplace.json","rawUrl":"https://raw.githubusercontent.com/nizos/tdd-guard/HEAD/.claude-plugin/marketplace.json","title":"tdd-guard","category":"marketplace","format":"json","content":"{\n  \"name\": \"tdd-guard\",\n  \"owner\": {\n    \"name\": \"Nizar Selander\"\n  },\n  \"plugins\": [\n    {\n      \"name\": \"tdd-guard\",\n      \"source\": \"./plugin\",\n      \"description\": \"Automated Test-Driven Development enforcement\"\n    }\n  ]\n}\n","frontmatter":{"name":"tdd-guard","owner":{"name":"Nizar Selander"},"plugins":[{"name":"tdd-guard","source":"./plugin","description":"Automated Test-Driven Development enforcement"}]},"isInternal":false,"tokens":68,"sizeBytes":229},{"name":"plugin.json","path":"plugin/.claude-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/nizos/tdd-guard/HEAD/plugin/.claude-plugin/plugin.json","title":"tdd-guard","category":"plugin-manifest","format":"json","content":"{\n  \"name\": \"tdd-guard\",\n  \"version\": \"1.3.0\",\n  \"description\": \"Automated Test-Driven Development enforcement\",\n  \"author\": {\n    \"name\": \"Nizar Selander\"\n  },\n  \"repository\": \"https://github.com/nizos/tdd-guard\",\n  \"license\": \"MIT\",\n  \"keywords\": [\n    \"tdd\",\n    \"test-driven-development\",\n    \"testing\",\n    \"hooks\",\n    \"code-quality\"\n  ]\n}\n","frontmatter":{"name":"tdd-guard","version":"1.3.0","description":"Automated Test-Driven Development enforcement","author":{"name":"Nizar Selander"},"repository":"https://github.com/nizos/tdd-guard","license":"MIT","keywords":["tdd","test-driven-development","testing","hooks","code-quality"]},"isInternal":false,"tokens":106,"sizeBytes":346}],"systemPromptSnippet":"<yakaai_skills repo=\"nizos/tdd-guard\">\n<!-- File: plugin/skills/setup/SKILL.md (Tokens: ~1363 | Category: anthropic-skill) -->\n---\ndescription: Set up or update TDD Guard for the current project. Detects the test framework, installs or updates the matching reporter, and configures or migrates its configuration to match the current specification.\ndisable-model-invocation: true\nallowed-tools: [Read, Glob, Grep]\n---\n\n# TDD Guard Setup\n\nSet up TDD Guard for the current project. Your goal is to:\n\n1. Identify the test framework(s) used in this project\n2. Install the matching TDD Guard reporter, or update it if already present\n3. Configure the reporter, or migrate an existing configuration to match the current specification\n\n## Reporter packages\n\n| Framework | Reporter package                                         | Registry   |\n| --------- | -------------------------------------------------------- | ---------- |\n| Vitest    | tdd-guard-vitest                                         | npm        |\n| Jest      | tdd-guard-jest                                           | npm        |\n| Storybook | tdd-guard-storybook                                      | npm        |\n| pytest    | tdd-guard-pytest                                         | PyPI       |\n| PHPUnit   | tdd-guard/phpunit                                        | Packagist  |\n| Go        | github.com/nizos/tdd-guard/reporters/go/cmd/tdd-guard-go | go install |\n| Rust      | tdd-guard-rust                                           | crates.io  |\n| RSpec     | tdd-guard-rspec                                          | RubyGems   |\n| Minitest  | tdd-guard-minitest                                       | RubyGems   |\n\n## Reporter configuration\n\nAll reporters write test results to `.claude/tdd-guard/data/test.json` relative to the project root.\n\n**Vitest** — Add the reporter entry to the `reporters` array with `projectRoot` in the options object.\n\n```typescript\nreporters: [\n  'default',\n  ['tdd-guard-vitest', { projectRoot: '/absolute/path/to/project' }],\n]\n```\n\n**Jest** — Add reporter entry to the `reporters` array with `projectRoot` option.\n\n```typescript\nreporters: [\n  'default',\n  ['tdd-guard-jest', { projectRoot: '/absolute/path/to/project' }],\n]\n```\n\n**Storybook** — Construct `StorybookReporter` in `.storybook/test-runner.ts` and wire it into the `postVisit` hook.\n\n```typescript\n// .storybook/test-runner.ts\nimport { StorybookReporter } from 'tdd-guard-storybook'\n\nconst reporter = new StorybookReporter({\n  projectRoot: '/absolute/path/to/project',\n})\n\nmodule.exports = {\n  async postVisit(page, context) {\n    await reporter.onStoryResult(context)\n  },\n}\n\nprocess.on('exit', () => {\n  reporter.onComplete()\n})\n```\n\n**pytest** — Set `tdd_guard_project_root` in pytest config (`pyproject.toml`, `pytest.ini`, or `setup.cfg`).\n\n```toml\n[tool.pytest.ini_options]\ntdd_guard_project_root = \"/absolute/path/to/project\"\n```\n\n**PHPUnit** — Add extension (PHPUnit 10+) or listener (PHPUnit 9.x) to `phpunit.xml` with project root path.\n\n```xml\n<!-- PHPUnit 10+ -->\n<extensions>\n    <bootstrap class=\"TddGuard\\PHPUnit\\TddGuardExtension\">\n        <parameter name=\"projectRoot\" value=\"/absolute/path/to/project\"/>\n    </bootstrap>\n</extensions>\n\n<!-- PHPUnit 9.x -->\n<listeners>\n    <listener class=\"TddGuard\\PHPUnit\\TddGuardListener\">\n        <arguments>\n            <string>/absolute/path/to/project</string>\n        </arguments>\n    </listener>\n</listeners>\n```\n\n**Go** — Add a test target using the piped command below. Update an existing Makefile, Taskfile, or similar build system if one exists.\n\n```bash\ngo test -json ./... 2>&1 | tdd-guard-go -project-root /absolute/path/to/project\n```\n\n**Rust** — Add a test target using the piped command below. Update an existing Makefile, Taskfile, or similar build system if one exists.\n\n```bash\ncargo nextest run 2>&1 | tdd-guard-rust --project-root /absolute/path/to/project --passthrough\n```\n\n**RSpec** — Add the formatter to `.rspec` and set `TDD_GUARD_PROJECT_ROOT` environment variable to the absolute project root path.\n\n```\n--format TddGuardRspec::Formatter\n```\n\n```bash\nexport TDD_GUARD_PROJECT_ROOT=\"/absolute/path/to/project\"\n```\n\n**Minitest** — Require `tdd_guard_minitest/autorun` from `test/test_helper.rb` (or pass `-rtdd_guard_minitest/autorun` via `Rake::TestTask` ruby_opts) and set `TDD_GUARD_PROJECT_ROOT` to the absolute project root path.\n\n```ruby\n# test/test_helper.rb\nrequire \"tdd_guard_minitest/autorun\"\n```\n\n```bash\nexport TDD_GUARD_PROJECT_ROOT=\"/absolute/path/to/project\"\n```\n\n## Guidelines\n\nYour scope is limited to installing, updating, configuring, and migrating a TDD Guard reporter. Do not make changes beyond that.\n\n- **Always use absolute paths** when configuring the project root in reporters.\n- **Do not install, update, or modify test frameworks**, build tools, or any other project dependencies. Only install or update the TDD Guard reporter itself.\n- **Do not modify existing test configuration** beyond the TDD Guard reporter entry. Migrate any drifted reporter configuration to match the current specification, preserving the user's project root value and leaving unrelated entries untouched. If the existing configuration cannot be migrated without guessing — for example, because it is wrapped in user-defined code or intermingled with custom logic — inform the user and let them decide.\n- **If a TDD Guard reporter is already installed and its configuration matches this skill's specification**, inform the user that everything is up to date and stop.\n- **If multiple frameworks are detected**, ask the user which to configure.\n- **If something goes wrong or is unclear**, inform the user rather than attempting to fix it. Do not install additional packages or make extra changes to resolve issues.\n\n## After setup\n\nOnce complete, inform the user of what was done and that:\n\n- TDD Guard validates changes against TDD principles\n- They can type `tdd-guard off` / `tdd-guard on` to toggle it mid-session\n- They can customize validation rules by editing `.claude/tdd-guard/data/instructions.md`\n- More help and configuration options are available at https://github.com/nizos/tdd-guard\n\n<!-- File: CLAUDE.md (Tokens: ~1039 | Category: claude-rule) -->\n# TDD Guard\n\n## Project Goal\n\nTDD Guard is a Claude Code hook that enforces Test-Driven Development by intercepting file operations.\nWhen Claude Code attempts to edit or write files, TDD Guard:\n\n1. **Captures**: Intercepts Edit, MultiEdit, and Write operations\n2. **Analyzes**: Examines test results, file paths, and code changes\n3. **Validates**: Checks TDD compliance using an AI model\n4. **Blocks**: Prevents operations that skip tests or over-implement\n5. **Guides**: Explains violations and suggests corrections\n\nThis automated enforcement maintains code quality without cluttering prompts with TDD reminders.\n\n## Development Workflow\n\n### Commit Guidelines\n\n- **Atomic commits**: Each commit represents one logical change with its tests\n- **Test and implementation together**: Never separate tests from the code they test\n- **Explain why, not what**: Commit messages should explain the reason for the change\n- **Conventional format**: Use prefixes to categorize changes: feat, fix, refactor, test, chore, docs\n\nExample: `feat: add network request filtering to reduce noise in captured data` (explains why, not just what)\n\n## Project Structure\n\nThe codebase is organized with core functionality in src/ and language-specific reporters:\n\n```\nreporters/                        # Language-specific test reporters\n├── go/                           # tdd-guard-go - Go test reporter\n├── jest/                         # tdd-guard-jest - Jest reporter (npm)\n├── minitest/                     # tdd-guard-minitest - Minitest reporter (gem)\n├── phpunit/                      # tdd-guard/phpunit - PHPUnit reporter (composer)\n├── pytest/                       # tdd-guard-pytest - Pytest reporter (pip)\n├── rspec/                        # tdd-guard-rspec - RSpec reporter (gem)\n├── rust/                         # tdd-guard-rust - Rust test reporter (crates.io)\n├── storybook/                    # tdd-guard-storybook - Storybook test-runner reporter (npm)\n├── test/                         # Shared test artifacts and integration tests\n└── vitest/                       # tdd-guard-vitest - Vitest reporter (npm)\n\nsrc/                              # Main CLI application\n├── cli/                          # Hook entry point and context builder\n├── config/                       # Configuration management\n├── contracts/                    # Types and Zod schemas\n├── guard/                        # Guard enable/disable management\n├── hooks/                        # Claude Code hook parsing and processing\n├── linters/                      # ESLint integration for code quality\n├── processors/                   # Test result and lint processing\n├── providers/                    # Model and linter client factories\n├── storage/                      # Storage abstractions\n├── validation/                   # TDD principle validation\n│   ├── validator.ts              # Sends context to AI model and parses response\n│   ├── context/                  # Formats operations for AI validation\n│   ├── prompts/                  # TDD validation rules and AI instructions\n│   └── models/                   # Claude SDK and Anthropic API clients\n└── index.ts                      # Package entry point\n\ntest/                             # Main test suite (hooks, integration, utils)\ndocs/                             # Documentation (ADRs, configuration, etc.)\n```\n\n### Architecture\n\nTDD Guard is organized as a TypeScript project with integrated language-specific reporters:\n\n- **src/**: Core functionality including contracts, config, storage, and validation\n- **reporters/**: Language-specific test reporters (go, jest, minitest, phpunit, pytest, rspec, rust, storybook, vitest)\n- **test/**: Comprehensive test suite with integration tests and utilities\n\n### Testing\n\n#### Guidelines\n\n- **Use test helpers**: Extract setup logic into helper functions placed at the bottom of test files\n- **Use test factories**: Always use factories from `test/utils/` instead of creating data inline\n- **Group tests effectively**: Use `describe` blocks and `beforeEach` for common setup\n- **Keep tests concise**: Keep as little logic in the tests themselves as possible\n\n#### Commands\n\n```bash\nnpm run build             # Build main package and workspace reporters (jest, storybook, vitest)\nnpm run test              # All unit tests and base integration tests\nnpm run test:unit         # Fast unit tests only\nnpm run test:reporters    # Test all reporter implementations\nnpm run lint              # Check code style and quality\nnpm run format            # Auto-format code with Prettier\nnpm run checks            # Run all checks: typecheck, lint, format, and test\n```\n\n### Key Design Principles\n\n- **Interface-driven**: Core functionality defined by interfaces (`Storage`, `ModelClient`)\n- **Dependency injection**: Components receive dependencies as parameters\n- **Single responsibility**: Each module has one clear purpose\n- **Type safety**: Comprehensive TypeScript types with runtime validation\n\n<!-- File: .claude-plugin/marketplace.json (Tokens: ~68 | Category: marketplace) -->\n{\n  \"name\": \"tdd-guard\",\n  \"owner\": {\n    \"name\": \"Nizar Selander\"\n  },\n  \"plugins\": [\n    {\n      \"name\": \"tdd-guard\",\n      \"source\": \"./plugin\",\n      \"description\": \"Automated Test-Driven Development enforcement\"\n    }\n  ]\n}\n\n<!-- File: plugin/.claude-plugin/plugin.json (Tokens: ~106 | Category: plugin-manifest) -->\n{\n  \"name\": \"tdd-guard\",\n  \"version\": \"1.3.0\",\n  \"description\": \"Automated Test-Driven Development enforcement\",\n  \"author\": {\n    \"name\": \"Nizar Selander\"\n  },\n  \"repository\": \"https://github.com/nizos/tdd-guard\",\n  \"license\": \"MIT\",\n  \"keywords\": [\n    \"tdd\",\n    \"test-driven-development\",\n    \"testing\",\n    \"hooks\",\n    \"code-quality\"\n  ]\n}\n</yakaai_skills>"}