export const AutoBeCompilerRealizeTemplate: Record = { ".claude/skills/add-feature/SKILL.md": "---\nname: add-feature\ndescription: Implement new feature with self-testing loop until 100% pass\nargument-hint: \"[feature-description]\"\nallowed-tools: Read, Edit, Write, Bash, Grep, Glob\n---\n\n# Add Feature\n\nImplement a new feature and iterate until all tests pass (100% success rate).\n\n## FORBIDDEN\n\n**NEVER use:**\n- `as` keyword (type assertion)\n- `any` type\n\n---\n\n## Feature Description\n\n$ARGUMENTS\n\n---\n\n## Workflow Overview\n\n```\n┌─────────────────────────────────────┐\n│ Phase 1: Implementation │\n│ - Controller │\n│ - Provider │\n│ - Collector/Transformer │\n│ - Interface │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Phase 2: Test Design │\n│ - Happy path tests │\n│ - Error case tests │\n│ - Edge case tests │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Phase 3: Test Loop │\n│ while (pass_rate < 100%) { │\n│ run tests │\n│ analyze failures │\n│ fix code │\n│ } │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Complete │\n│ All tests pass! │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Phase 1: Implementation\n\nSee: `flow-implement.md`\n\n1. **Analyze Requirements**\n - Understand the feature from `$ARGUMENTS`\n - Identify affected entities\n - Determine API endpoints needed\n\n2. **Create/Update Interface**\n - Define DTOs (ICreate, IUpdate, ISummary, IRequest)\n - Add typia tags for validation\n\n3. **Create/Update Collector**\n - Transform ICreate → Prisma.CreateInput\n\n4. **Create/Update Transformer**\n - Transform Prisma record → Interface\n\n5. **Create/Update Provider**\n - Implement business logic\n - Use Collector for create operations\n - Use Transformer for responses\n\n6. **Create/Update Controller**\n - Define routes with TypedRoute\n - Add authentication decorators\n - Connect to Provider\n\n7. **Verify Build**\n ```bash\n npm run build:main\n ```\n\n---\n\n## Phase 2: Test Design\n\nSee: `flow-test-design.md`\n\nDesign comprehensive test scenarios including:\n\n### Happy Path (Normal Cases)\n- ✅ Create entity successfully\n- ✅ Read entity successfully\n- ✅ Update entity successfully\n- ✅ Delete entity successfully\n- ✅ List entities with pagination\n\n### Error Cases\n- ❌ Create with missing required fields\n- ❌ Create with invalid field format\n- ❌ Read non-existent entity (404)\n- ❌ Update non-existent entity (404)\n- ❌ Delete non-existent entity (404)\n- ❌ Unauthorized access (401)\n- ❌ Forbidden action (403)\n\n### Edge Cases\n- ⚠️ Empty string input\n- ⚠️ Null values for optional fields\n- ⚠️ Maximum length strings\n- ⚠️ Minimum/maximum numeric values\n- ⚠️ Special characters in strings\n- ⚠️ Duplicate creation attempt\n- ⚠️ Concurrent modification\n- ⚠️ Parent entity doesn't exist\n- ⚠️ Circular reference attempt\n- ⚠️ Soft-deleted entity access\n\n---\n\n## Phase 3: Test Loop\n\nSee: `flow-test-loop.md`\n\n```\nREPEAT:\n 1. Build tests\n npm run build:test\n\n 2. Run tests\n npm run test -- --include \"{feature}\"\n\n 3. If all pass → DONE\n\n 4. If failures:\n a. Analyze failure reason\n b. Determine if test code issue or business logic issue\n c. Fix the appropriate code\n d. Go to step 1\n\nUNTIL: 100% pass rate\n```\n\n---\n\n## Exit Conditions\n\n✅ **Success Criteria:**\n- `npm run build:main` passes\n- `npm run build:test` passes\n- `npm run test` passes with 100% success rate\n- All happy path tests pass\n- All error case tests pass\n- All edge case tests pass\n\n❌ **Failure (requires manual intervention):**\n- Circular dependency detected\n- External service unavailable\n- Database schema change required\n- Requirements ambiguity\n\n---\n\n## Output\n\nWhen complete, provide:\n\n```markdown\n## Feature Implementation Complete\n\n### Summary\n- Feature: {description}\n- Files created/modified: X\n- Test scenarios: Y\n- Pass rate: 100%\n\n### Files Changed\n- src/api/structures/I{Entity}.ts\n- src/controllers/{path}/{Controller}.ts\n- src/providers/{provider}.ts\n- src/collectors/{Collector}.ts\n- src/transformers/{Transformer}.ts\n- test/prepare/prepare_random_{entity}.ts\n- test/generate/generate_random_{entity}.ts\n- test/features/api/{entity}/*.ts\n\n### Test Results\n- Total: X tests\n- Passed: X\n- Failed: 0\n```\n", ".claude/skills/add-feature/flow-implement.md": "# Phase 1: Implementation Flow\n\nDetailed steps for implementing the feature.\n\n---\n\n## Step 1.1: Analyze Requirements\n\nFrom `$ARGUMENTS`, extract:\n- **Entity name**: What is being created/managed?\n- **Operations**: CRUD? Special actions?\n- **Relationships**: Parent entities? Child entities?\n- **Constraints**: Validation rules? Business rules?\n\n---\n\n## Step 1.2: Update Prisma Schema (if needed)\n\nIf new entity or fields required:\n\n```prisma\nmodel {prefix}_{entities} {\n id String @id @db.Uuid\n\n // Fields\n name String\n status String // \"active\" | \"inactive\"\n\n // Foreign keys\n {parent}_id String @db.Uuid\n\n // Timestamps\n created_at DateTime @db.Timestamptz\n updated_at DateTime @db.Timestamptz\n deleted_at DateTime? @db.Timestamptz\n\n // Relations\n {parent} {prefix}_{parents} @relation(fields: [{parent}_id], references: [id], onDelete: Cascade)\n\n // Indexes\n @@index([{parent}_id, status])\n}\n```\n\nThen run:\n```bash\nnpm run build:prisma\n```\n\n---\n\n## Step 1.3: Create/Update Interface\n\nLocation: `/src/api/structures/I{Prefix}{Entity}.ts`\n\n```typescript\nimport { tags } from \"typia\";\n\nexport type I{Prefix}{Entity} = {\n id: string & tags.Format<\"uuid\">;\n name: string;\n status: \"active\" | \"inactive\";\n created_at: string & tags.Format<\"date-time\">;\n updated_at: string & tags.Format<\"date-time\">;\n deleted_at: (string & tags.Format<\"date-time\">) | null;\n};\n\nexport namespace I{Prefix}{Entity} {\n export type ICreate = {\n name: string;\n status?: \"active\" | \"inactive\";\n };\n\n export type IUpdate = {\n name?: string;\n status?: \"active\" | \"inactive\";\n };\n\n export type ISummary = {\n id: string & tags.Format<\"uuid\">;\n name: string;\n status: \"active\" | \"inactive\";\n };\n\n export type IRequest = {\n page?: number & tags.Minimum<1>;\n limit?: number & tags.Minimum<1> & tags.Maximum<100>;\n search?: string;\n status?: \"active\" | \"inactive\";\n };\n}\n```\n\n---\n\n## Step 1.4: Create Collector\n\nLocation: `/src/collectors/{Prefix}{Entity}Collector.ts`\n\n```typescript\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { Prisma } from \"@prisma/sdk\";\nimport { v4 } from \"uuid\";\n\nexport namespace {Prefix}{Entity}Collector {\n export function collect(props: {\n body: I{Prefix}{Entity}.ICreate;\n }): Prisma.{table_name}CreateInput {\n const id = v4();\n const now = new Date();\n\n return {\n id,\n name: props.body.name,\n status: props.body.status ?? \"active\",\n created_at: now,\n updated_at: now,\n deleted_at: null,\n };\n }\n}\n```\n\n---\n\n## Step 1.5: Create Transformer\n\nLocation: `/src/transformers/{Prefix}{Entity}Transformer.ts`\n\n```typescript\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { {table_name} } from \"@prisma/sdk\";\n\nimport { toISOStringSafe } from \"../utils/toISOStringSafe\";\n\nexport namespace {Prefix}{Entity}Transformer {\n export function transform(record: {table_name}): I{Prefix}{Entity} {\n return {\n id: record.id,\n name: record.name,\n status: record.status,\n created_at: toISOStringSafe(record.created_at),\n updated_at: toISOStringSafe(record.updated_at),\n deleted_at: record.deleted_at\n ? toISOStringSafe(record.deleted_at)\n : null,\n };\n }\n\n export function toSummary(record: {table_name}): I{Prefix}{Entity}.ISummary {\n return {\n id: record.id,\n name: record.name,\n status: record.status,\n };\n }\n\n export function transformMany(records: {table_name}[]): I{Prefix}{Entity}[] {\n return records.map(transform);\n }\n\n export function toSummaryList(records: {table_name}[]): I{Prefix}{Entity}.ISummary[] {\n return records.map(toSummary);\n }\n}\n```\n\n---\n\n## Step 1.6: Create Provider\n\nLocation: `/src/providers/post{Prefix}{Entity}.ts` (and get, patch, delete)\n\n```typescript\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { HttpException } from \"@nestjs/common\";\n\nimport { MyGlobal } from \"../MyGlobal\";\nimport { {Prefix}{Entity}Collector } from \"../collectors/{Prefix}{Entity}Collector\";\nimport { {Prefix}{Entity}Transformer } from \"../transformers/{Prefix}{Entity}Transformer\";\nimport { AdminPayload } from \"../decorators/payload/AdminPayload\";\n\nexport async function post{Prefix}{Entity}(props: {\n admin: AdminPayload;\n body: I{Prefix}{Entity}.ICreate;\n}): Promise {\n const data = {Prefix}{Entity}Collector.collect({ body: props.body });\n\n const created = await MyGlobal.prisma.{table_name}.create({\n data,\n });\n\n return {Prefix}{Entity}Transformer.transform(created);\n}\n```\n\n---\n\n## Step 1.7: Create Controller\n\nLocation: `/src/controllers/{prefix}/admin/{entities}/{Prefix}Admin{Entities}Controller.ts`\n\n```typescript\nimport { TypedBody, TypedParam, TypedRoute } from \"@nestia/core\";\nimport { Controller } from \"@nestjs/common\";\nimport { tags } from \"typia\";\n\nimport { I{Prefix}{Entity} } from \"../../../../api/structures/I{Prefix}{Entity}\";\nimport { AdminAuth } from \"../../../../decorators/AdminAuth\";\nimport { AdminPayload } from \"../../../../decorators/payload/AdminPayload\";\nimport { post{Prefix}{Entity} } from \"../../../../providers/post{Prefix}{Entity}\";\nimport { get{Prefix}{Entity} } from \"../../../../providers/get{Prefix}{Entity}\";\n\n@Controller(\"{prefix}/admin/{entities}\")\nexport class {Prefix}Admin{Entities}Controller {\n @TypedRoute.Post()\n @AdminAuth()\n async create(\n @AdminPayload() admin: AdminPayload,\n @TypedBody() body: I{Prefix}{Entity}.ICreate,\n ): Promise {\n return await post{Prefix}{Entity}({ admin, body });\n }\n\n @TypedRoute.Get(\":entityId\")\n @AdminAuth()\n async at(\n @AdminPayload() admin: AdminPayload,\n @TypedParam(\"entityId\") entityId: string & tags.Format<\"uuid\">,\n ): Promise {\n return await get{Prefix}{Entity}({ admin, entityId });\n }\n\n // ... other methods\n}\n```\n\n---\n\n## Step 1.8: Verify Build\n\n```bash\nnpm run build:main\n```\n\nIf errors, fix them before proceeding to Phase 2.\n", ".claude/skills/add-feature/flow-test-design.md": "# Phase 2: Test Design Flow\n\nDesign comprehensive test scenarios for the feature.\n\n---\n\n## Step 2.1: Create prepare_random Function\n\nLocation: `/test/prepare/prepare_random_{prefix}_{entity}.ts`\n\n```typescript\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { DeepPartial } from \"@ORGANIZATION/PROJECT-api/lib/typings/DeepPartial\";\nimport { RandomGenerator } from \"@nestia/e2e\";\nimport { randint } from \"tstl\";\nimport { v4 } from \"uuid\";\n\nexport function prepare_random_{prefix}_{entity}(\n input?: DeepPartial | undefined,\n): I{Prefix}{Entity}.ICreate {\n return {\n name: input?.name ?? RandomGenerator.name(2),\n status: input?.status ?? \"active\",\n // Add all required fields with random generators\n };\n}\n```\n\n---\n\n## Step 2.2: Create generate_random Function\n\nLocation: `/test/generate/generate_random_{prefix}_{entity}.ts`\n\n```typescript\nimport api from \"@ORGANIZATION/PROJECT-api\";\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { DeepPartial } from \"@ORGANIZATION/PROJECT-api/lib/typings/DeepPartial\";\n\nimport { prepare_random_{prefix}_{entity} } from \"../prepare/prepare_random_{prefix}_{entity}\";\n\nexport async function generate_random_{prefix}_{entity}(\n connection: api.IConnection,\n input?: DeepPartial | undefined,\n): Promise {\n const body = prepare_random_{prefix}_{entity}(input);\n return api.functional.{prefix}.admin.{entities}.create(connection, body);\n}\n```\n\n---\n\n## Step 2.3: Design Test Scenarios\n\n### Category 1: Happy Path Tests\n\n```typescript\n// test_api_{entity}_create_success.ts\nexport async function test_api_{entity}_create_success(\n connection: api.IConnection,\n): Promise {\n // 1. Prepare admin connection\n const admin = await authorize_admin(connection);\n\n // 2. Create entity\n const input = prepare_random_{prefix}_{entity}();\n const created = await api.functional.{prefix}.admin.{entities}.create(\n admin.connection,\n input,\n );\n\n // 3. Validate\n typia.assert(created);\n TestValidator.equals(\"name\", created.name, input.name);\n TestValidator.equals(\"status\", created.status, input.status ?? \"active\");\n}\n\n// test_api_{entity}_read_success.ts\nexport async function test_api_{entity}_read_success(\n connection: api.IConnection,\n): Promise {\n const admin = await authorize_admin(connection);\n const created = await generate_random_{prefix}_{entity}(admin.connection);\n\n const read = await api.functional.{prefix}.admin.{entities}.at(\n admin.connection,\n created.id,\n );\n\n typia.assert(read);\n TestValidator.equals(\"id\", read.id, created.id);\n}\n\n// test_api_{entity}_update_success.ts\n// test_api_{entity}_delete_success.ts\n// test_api_{entity}_list_success.ts\n```\n\n### Category 2: Error Case Tests\n\n```typescript\n// test_api_{entity}_create_missing_required.ts\nexport async function test_api_{entity}_create_missing_required(\n connection: api.IConnection,\n): Promise {\n const admin = await authorize_admin(connection);\n\n await TestValidator.httpError(\"missing name\", 400, async () => {\n await api.functional.{prefix}.admin.{entities}.create(\n admin.connection,\n // @ts-expect-error Testing missing required field\n { },\n );\n });\n}\n\n// test_api_{entity}_read_not_found.ts\nexport async function test_api_{entity}_read_not_found(\n connection: api.IConnection,\n): Promise {\n const admin = await authorize_admin(connection);\n const nonExistentId = v4();\n\n await TestValidator.httpError(\"not found\", 404, async () => {\n await api.functional.{prefix}.admin.{entities}.at(\n admin.connection,\n nonExistentId,\n );\n });\n}\n\n// test_api_{entity}_unauthorized.ts\nexport async function test_api_{entity}_unauthorized(\n connection: api.IConnection,\n): Promise {\n const input = prepare_random_{prefix}_{entity}();\n\n await TestValidator.httpError(\"unauthorized\", 401, async () => {\n await api.functional.{prefix}.admin.{entities}.create(\n connection, // No auth token\n input,\n );\n });\n}\n```\n\n### Category 3: Edge Case Tests\n\n```typescript\n// test_api_{entity}_create_empty_string.ts\nexport async function test_api_{entity}_create_empty_string(\n connection: api.IConnection,\n): Promise {\n const admin = await authorize_admin(connection);\n\n await TestValidator.httpError(\"empty name\", 400, async () => {\n await api.functional.{prefix}.admin.{entities}.create(\n admin.connection,\n { name: \"\" },\n );\n });\n}\n\n// test_api_{entity}_create_max_length.ts\nexport async function test_api_{entity}_create_max_length(\n connection: api.IConnection,\n): Promise {\n const admin = await authorize_admin(connection);\n const longName = \"a\".repeat(256); // Assuming 255 max\n\n await TestValidator.httpError(\"too long name\", 400, async () => {\n await api.functional.{prefix}.admin.{entities}.create(\n admin.connection,\n { name: longName },\n );\n });\n}\n\n// test_api_{entity}_create_duplicate.ts\nexport async function test_api_{entity}_create_duplicate(\n connection: api.IConnection,\n): Promise {\n const admin = await authorize_admin(connection);\n const created = await generate_random_{prefix}_{entity}(admin.connection);\n\n // If name should be unique\n await TestValidator.httpError(\"duplicate\", 409, async () => {\n await api.functional.{prefix}.admin.{entities}.create(\n admin.connection,\n { name: created.name },\n );\n });\n}\n\n// test_api_{entity}_create_invalid_parent.ts\nexport async function test_api_{entity}_create_invalid_parent(\n connection: api.IConnection,\n): Promise {\n const admin = await authorize_admin(connection);\n const nonExistentParentId = v4();\n\n await TestValidator.httpError(\"parent not found\", 404, async () => {\n await api.functional.{prefix}.admin.{entities}.create(\n admin.connection,\n {\n name: RandomGenerator.name(2),\n parent_id: nonExistentParentId,\n },\n );\n });\n}\n\n// test_api_{entity}_access_deleted.ts\nexport async function test_api_{entity}_access_deleted(\n connection: api.IConnection,\n): Promise {\n const admin = await authorize_admin(connection);\n const created = await generate_random_{prefix}_{entity}(admin.connection);\n\n // Delete entity\n await api.functional.{prefix}.admin.{entities}.erase(\n admin.connection,\n created.id,\n );\n\n // Try to access deleted entity\n await TestValidator.httpError(\"deleted entity\", 404, async () => {\n await api.functional.{prefix}.admin.{entities}.at(\n admin.connection,\n created.id,\n );\n });\n}\n```\n\n---\n\n## Step 2.4: Test File Organization\n\n```\ntest/features/api/{entity}/\n├── test_api_{entity}_create_success.ts\n├── test_api_{entity}_read_success.ts\n├── test_api_{entity}_update_success.ts\n├── test_api_{entity}_delete_success.ts\n├── test_api_{entity}_list_success.ts\n├── test_api_{entity}_create_missing_required.ts\n├── test_api_{entity}_read_not_found.ts\n├── test_api_{entity}_unauthorized.ts\n├── test_api_{entity}_create_empty_string.ts\n├── test_api_{entity}_create_max_length.ts\n├── test_api_{entity}_create_duplicate.ts\n├── test_api_{entity}_create_invalid_parent.ts\n└── test_api_{entity}_access_deleted.ts\n```\n\n---\n\n## Step 2.5: Verify Test Build\n\n```bash\nnpm run build:test\n```\n\nIf errors, fix them before proceeding to Phase 3.\n", ".claude/skills/add-feature/flow-test-loop.md": "# Phase 3: Test Loop Flow\n\nIterate until all tests pass (100% success rate).\n\n---\n\n## Loop Algorithm\n\n```\niteration = 0\nmax_iterations = 10\n\nWHILE iteration < max_iterations:\n iteration += 1\n\n # Step 1: Build\n result = run(\"npm run build:test\")\n IF result.failed:\n analyze_build_error(result)\n fix_build_error()\n CONTINUE\n\n # Step 2: Run Tests\n result = run(\"npm run test -- --include '{feature}'\")\n\n IF result.all_passed:\n PRINT \"✅ All tests passed!\"\n BREAK\n\n # Step 3: Analyze Failures\n failures = parse_failures(result)\n\n FOR each failure in failures:\n cause = diagnose(failure)\n\n IF cause.is_test_code_issue:\n fix_test_code(failure)\n ELSE IF cause.is_business_logic_issue:\n fix_business_logic(failure)\n ELSE:\n PRINT \"⚠️ Manual intervention required\"\n BREAK\n\nIF iteration >= max_iterations:\n PRINT \"❌ Max iterations reached. Manual intervention required.\"\n```\n\n---\n\n## Step 3.1: Run Build\n\n```bash\nnpm run build:test 2>&1\n```\n\nIf build fails:\n- Parse error message\n- Identify affected file\n- Fix syntax/type errors\n- Re-run build\n\n---\n\n## Step 3.2: Run Tests\n\n```bash\nnpm run test 2>&1\n```\n\nOr for specific feature:\n```bash\nnpm run test -- --include \"{feature_name}\"\n```\n\n---\n\n## Step 3.3: Analyze Failures\n\n### Failure Types\n\n| Symptom | Likely Cause | Fix Location |\n|---------|--------------|--------------|\n| `Expected 200, got 400` | Invalid test input | Test code |\n| `Expected 200, got 404` | Entity not created | Test setup |\n| `Expected 200, got 500` | Provider bug | Provider code |\n| `Property mismatch` | Transformer bug | Transformer code |\n| `Unauthorized` | Missing auth | Test setup |\n| `Type error` | Interface mismatch | Interface/Provider |\n\n### Diagnosis Process\n\n1. **Read error message carefully**\n - What was expected?\n - What was received?\n - Which assertion failed?\n\n2. **Check test code**\n - Is the test setup correct?\n - Are inputs valid?\n - Is the auth token present?\n\n3. **Check business logic**\n - Is the provider logic correct?\n - Is the transformer mapping correct?\n - Is the collector generating correct data?\n\n4. **Check interface**\n - Do types match?\n - Are required fields present?\n - Are typia tags correct?\n\n---\n\n## Step 3.4: Fix Strategies\n\n### Test Code Issues\n\n```typescript\n// Issue: Test expects wrong status code\n// Before\nawait TestValidator.httpError(\"not found\", 400, async () => { ... });\n// After\nawait TestValidator.httpError(\"not found\", 404, async () => { ... });\n\n// Issue: Missing auth setup\n// Before\nconst result = await api.functional.{prefix}.admin.{entities}.create(\n connection, // No auth!\n input,\n);\n// After\nconst admin = await authorize_admin(connection);\nconst result = await api.functional.{prefix}.admin.{entities}.create(\n admin.connection, // With auth\n input,\n);\n\n// Issue: Wrong assertion\n// Before\nTestValidator.equals(\"name\", result.name, \"hardcoded\");\n// After\nTestValidator.equals(\"name\", result.name, input.name);\n```\n\n### Business Logic Issues\n\n```typescript\n// Issue: Missing null check\n// Before\nreturn {Prefix}{Entity}Transformer.transform(record);\n// After\nif (!record) throw new HttpException(\"Not found\", 404);\nreturn {Prefix}{Entity}Transformer.transform(record);\n\n// Issue: Wrong status code\n// Before\nthrow new HttpException(\"Not found\", 400);\n// After\nthrow new HttpException(\"Not found\", 404);\n\n// Issue: Missing validation\n// Before\nconst data = Collector.collect({ body: props.body });\n// After\nif (!props.body.name) {\n throw new HttpException(\"Name is required\", 400);\n}\nconst data = Collector.collect({ body: props.body });\n```\n\n### Interface Issues\n\n```typescript\n// Issue: Missing nullable annotation\n// Before\ndescription: string;\n// After\ndescription: string | null;\n\n// Issue: Missing typia tag\n// Before\nid: string;\n// After\nid: string & tags.Format<\"uuid\">;\n```\n\n---\n\n## Step 3.5: Verify Fix\n\nAfter each fix:\n\n```bash\n# Quick check - just the failing test\nnpm run test -- --include \"{specific_test_name}\"\n\n# Full check - all feature tests\nnpm run test -- --include \"{feature_name}\"\n```\n\n---\n\n## Step 3.6: Exit Conditions\n\n### Success ✅\n```\nAll tests passed!\n- Total: X tests\n- Passed: X\n- Failed: 0\n- Pass rate: 100%\n```\n\n### Failure ❌ (Requires Manual Intervention)\n- Max iterations (10) reached\n- Circular dependency detected\n- External service required\n- Database migration needed\n- Requirements unclear\n\n---\n\n## Troubleshooting\n\n### Common Issues\n\n| Issue | Solution |\n|-------|----------|\n| Tests timing out | Increase timeout or optimize queries |\n| Flaky tests | Add retry logic or fix race condition |\n| Database state | Ensure test isolation, clean up after tests |\n| Auth token expired | Refresh token in test setup |\n| Port conflict | Use unique ports or wait for cleanup |\n\n### Debug Commands\n\n```bash\n# Run single test with verbose output\nnpm run test -- --include \"test_name\" --verbose\n\n# Check test logs\ncat test/logs/*.log\n```\n", ".claude/skills/fix-db/SKILL.md": "---\nname: fix-db\ndescription: Fix Prisma schema compilation errors\nallowed-tools: Read, Edit, Write, Bash, Grep, Glob\n---\n\n# Fix Database Schema Errors\n\nFix Prisma schema compilation errors according to code conventions.\n\n## FORBIDDEN\n\n**NEVER use:**\n- Prisma `enum` types (use String with TypeScript union types instead)\n\n---\n\n## Purpose\n\nFix compilation errors in Prisma schema files to ensure `npm run build:prisma` passes.\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Run Build │\n│ npm run build:prisma │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Parse Errors │\n│ - Syntax errors │\n│ - Relation errors │\n│ - Type errors │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Fix by Convention │\n│ Apply code conventions │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 4: Re-run Build │\n│ Loop until 0 errors │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Run Build\n\n```bash\nnpm run build:prisma 2>&1\n```\n\nCapture all error output.\n\n---\n\n## Step 2: Parse Errors\n\nCommon error types:\n- `Error parsing attribute`: Syntax error in decorator\n- `Error validating field`: Invalid field type\n- `Error validating relation`: Missing or invalid relation\n\n---\n\n## Step 3: Fix by Convention\n\n### Primary Key Convention\n```prisma\n// Standard\nid String @id @db.Uuid\n```\n\n### Timestamp Convention\n```prisma\ncreated_at DateTime @db.Timestamptz\nupdated_at DateTime @db.Timestamptz\ndeleted_at DateTime? @db.Timestamptz\n```\n\n### Foreign Key Convention\n```prisma\n{parent}_id String @db.Uuid\n{parent} {prefix}_{parents} @relation(fields: [{parent}_id], references: [id], onDelete: Cascade)\n```\n\n### Union Type Fields (NOT enum)\n```prisma\n// DO NOT use Prisma enum\nstatus String // \"active\" | \"inactive\" defined in TypeScript\n\n// WRONG - Never do this\n// enum Status { ACTIVE INACTIVE }\n```\n\n### Self-referential Relation\n```prisma\nparent_id String? @db.Uuid\nparent {Model}? @relation(\"recursive\", fields: [parent_id], references: [id], onDelete: Cascade)\nchildren {Model}[] @relation(\"recursive\")\n```\n\n### Index Convention\n```prisma\n@@index([{parent}_id, status])\n@@index([name(ops: raw(\"gin_trgm_ops\"))], type: Gin)\n```\n\n---\n\n## Step 4: Verify\n\n```bash\nnpm run build:prisma\n```\n\nRepeat Steps 2-4 until no errors.\n\n---\n\n## Common Fixes\n\n| Error Pattern | Fix |\n|---------------|-----|\n| Missing relation | Add `@relation` with fields and references |\n| Invalid type | Use correct Prisma types (String, Int, DateTime, etc.) |\n| Duplicate model | Remove duplicate or rename |\n| Missing @@map | Add table name mapping |\n| Enum error | Replace with String type |\n\n---\n\n## Exit Condition\n\n- `npm run build:prisma` completes with no errors\n- All models properly defined\n- All relations valid\n", ".claude/skills/fix-interface/SKILL.md": "---\nname: fix-interface\ndescription: Fix Interface and Controller compilation errors\nallowed-tools: Read, Edit, Write, Bash, Grep, Glob\n---\n\n# Fix Interface Errors\n\nFix interface and controller compilation errors according to code conventions.\n\n## FORBIDDEN\n\n**NEVER use:**\n- `as` keyword (type assertion)\n- `any` type\n\nFix type issues by properly defining interfaces.\n\n## DO NOT MODIFY\n\n**Leave as-is:**\n- `console.log` in Controller catch blocks\n- `console.error` in Controller catch blocks\n\nThese are intentional and should not be changed to NestJS Logger.\n\n---\n\n## Purpose\n\nFix compilation errors in interface and controller files to ensure `npm run build:main` passes.\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Run Build │\n│ npm run build:main │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Parse Interface Errors │\n│ - Empty interfaces {} │\n│ - Type mismatches │\n│ - Missing properties │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Fix by Convention │\n│ - Fill empty interfaces │\n│ - Add typia tags │\n│ - Fix nullable types │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 4: Re-run Build │\n│ Loop until 0 errors │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Run Build\n\n```bash\nnpm run build:main 2>&1 | head -100\n```\n\nCapture interface-related errors.\n\n---\n\n## Step 2: Parse Errors\n\nCommon error patterns:\n- `Type '{}' is not assignable` → Empty interface\n- `Property 'X' does not exist on type '{}'` → Empty interface\n- `Type 'string' is not assignable to type 'string & Format<\"uuid\">'` → Missing typia tag\n\n---\n\n## Step 3: Fix by Convention\n\n### Empty Interface Fix\nRead Prisma schema and fill interface:\n\n```typescript\n// Before\nexport type IEntity = {};\n\n// After\nimport { tags } from \"typia\";\n\nexport type IEntity = {\n id: string & tags.Format<\"uuid\">;\n name: string;\n status: \"active\" | \"inactive\";\n created_at: string & tags.Format<\"date-time\">;\n updated_at: string & tags.Format<\"date-time\">;\n deleted_at: (string & tags.Format<\"date-time\">) | null;\n};\n```\n\n### ICreate Convention\n```typescript\nexport namespace IEntity {\n export type ICreate = {\n name: string;\n status?: \"active\" | \"inactive\"; // optional with default\n };\n}\n```\n\n### IUpdate Convention\n```typescript\nexport namespace IEntity {\n export type IUpdate = {\n name?: string;\n status?: \"active\" | \"inactive\";\n };\n}\n```\n\n### ISummary Convention\n```typescript\nexport namespace IEntity {\n export type ISummary = {\n id: string & tags.Format<\"uuid\">;\n name: string;\n status: \"active\" | \"inactive\";\n created_at: string & tags.Format<\"date-time\">;\n };\n}\n```\n\n### IRequest Convention\n```typescript\nexport namespace IEntity {\n export type IRequest = {\n page?: number & tags.Minimum<1>;\n limit?: number & tags.Minimum<1> & tags.Maximum<100>;\n search?: string;\n status?: \"active\" | \"inactive\";\n };\n}\n```\n\n### Typia Tags\n```typescript\n// UUID\nid: string & tags.Format<\"uuid\">;\n\n// Email\nemail: string & tags.Format<\"email\">;\n\n// URL\nurl: string & tags.Format<\"uri\">;\n\n// DateTime\ncreated_at: string & tags.Format<\"date-time\">;\n\n// Numeric constraints\npage: number & tags.Minimum<1>;\nlimit: number & tags.Minimum<1> & tags.Maximum<100>;\n```\n\n### Nullable Types\n```typescript\n// Nullable field\ndeleted_at: (string & tags.Format<\"date-time\">) | null;\n\n// Optional nullable field\ndescription?: string | null;\n```\n\n### Path Naming Fix\nFix redundant path segments where the same word repeats:\n\n```typescript\n// Before - redundant word in path: /{word}/{word}s\n@Controller(\"{prefix}/{word}/{word}s\")\nexport class {Word}{Word}sController { ... }\n\n// After - remove redundant segment\n@Controller(\"{prefix}/{word}s\")\nexport class {Word}sController { ... }\n```\n\nPattern to fix:\n- `/{word}/{word}s` → `/{word}s`\n- `/{word}/{word}-*` → `/{word}-*` or `/{word}/*`\n\nWhen fixing paths, also update:\n1. Controller `@Controller()` decorator\n2. Controller class name\n3. Controller file name and directory\n4. Related provider function names\n5. Test file paths and API calls\n\n---\n\n## Step 4: Verify\n\n```bash\nnpm run build:main\n```\n\nRepeat Steps 2-4 until no interface errors.\n\n---\n\n## Common Fixes\n\n| Error Pattern | Fix |\n|---------------|-----|\n| Empty interface `{}` | Read Prisma schema, define all fields |\n| Missing typia tag | Add appropriate `tags.Format<>` |\n| Nullable mismatch | Add `\\| null` for nullable fields |\n| Missing namespace | Add namespace with ICreate, IUpdate, etc. |\n| Redundant path `/{word}/{word}s` | Remove duplication: `/{word}s` |\n\n---\n\n## Exit Condition\n\n- `npm run build:main` completes with no interface errors\n- All interfaces properly defined\n- All typia tags applied\n- No redundant path segments (`/{word}/{word}s` pattern)\n", ".claude/skills/fix-provider/SKILL.md": "---\nname: fix-provider\ndescription: Fix Provider, Collector, Transformer compilation errors\nallowed-tools: Read, Edit, Write, Bash, Grep, Glob\n---\n\n# Fix Provider Errors\n\nFix provider, collector, and transformer compilation errors according to code conventions.\n\n## FORBIDDEN\n\n**NEVER use:**\n- `as` keyword (type assertion)\n- `any` type\n\nFix type issues by properly defining Collectors and Transformers.\n\n---\n\n## Purpose\n\nFix compilation errors in provider files to ensure `npm run build:main` passes.\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Run Build │\n│ npm run build:main │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Parse Provider Errors │\n│ - as any usage │\n│ - Type mismatches │\n│ - Missing imports │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Fix by Convention │\n│ - Create Collectors │\n│ - Create Transformers │\n│ - Remove type assertions │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 4: Re-run Build │\n│ Loop until 0 errors │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Run Build\n\n```bash\nnpm run build:main 2>&1 | head -100\n```\n\nCapture provider-related errors.\n\n---\n\n## Step 2: Find Issues\n\n```bash\n# Find as any usage\ngrep -rn \"as any\" src/providers/ --include=\"*.ts\"\n\n# Find any type\ngrep -rn \": any\" src/providers/ --include=\"*.ts\"\n\n# Find type assertions\ngrep -rn \" as \" src/providers/ --include=\"*.ts\" | grep -v \"import\"\n```\n\n---\n\n## Step 3: Fix by Convention\n\n### Create Collector (if missing)\n\n```typescript\n// src/collectors/{Prefix}{Entity}Collector.ts\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { Prisma } from \"@prisma/sdk\";\nimport { v4 } from \"uuid\";\n\nexport namespace {Prefix}{Entity}Collector {\n export function collect(props: {\n body: I{Prefix}{Entity}.ICreate;\n }): Prisma.{table_name}CreateInput {\n const id = v4();\n const now = new Date();\n\n return {\n id,\n field_name: props.body.field_name,\n optional_field: props.body.optional_field ?? null,\n parent: props.body.parent_id\n ? { connect: { id: props.body.parent_id } }\n : undefined,\n created_at: now,\n updated_at: now,\n deleted_at: null,\n };\n }\n}\n```\n\n### Create Transformer (if missing)\n\n```typescript\n// src/transformers/{Prefix}{Entity}Transformer.ts\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { {table_name} } from \"@prisma/sdk\";\n\nexport namespace {Prefix}{Entity}Transformer {\n export function transform(record: {table_name}): I{Prefix}{Entity} {\n return {\n id: record.id,\n name: record.name,\n status: record.status,\n created_at: record.created_at.toISOString(),\n updated_at: record.updated_at.toISOString(),\n deleted_at: record.deleted_at\n ? record.deleted_at.toISOString()\n : null,\n };\n }\n\n export function toSummary(record: {table_name}): I{Prefix}{Entity}.ISummary {\n return {\n id: record.id,\n name: record.name,\n status: record.status,\n created_at: record.created_at.toISOString(),\n };\n }\n\n export function transformMany(records: {table_name}[]): I{Prefix}{Entity}[] {\n return records.map(transform);\n }\n\n export function toSummaryList(records: {table_name}[]): I{Prefix}{Entity}.ISummary[] {\n return records.map(toSummary);\n }\n}\n```\n\n### Fix POST Provider\n\n```typescript\n// Before\nconst createData: any = { ... };\nreturn { id: created.id as string & tags.Format<\"uuid\">, ... };\n\n// After\nimport { {Prefix}{Entity}Collector } from \"../collectors/{Prefix}{Entity}Collector\";\nimport { {Prefix}{Entity}Transformer } from \"../transformers/{Prefix}{Entity}Transformer\";\n\nexport async function post{Prefix}{Entity}(props: {\n body: I{Prefix}{Entity}.ICreate;\n}): Promise {\n const data = {Prefix}{Entity}Collector.collect({ body: props.body });\n const created = await MyGlobal.prisma.{table}.create({ data });\n return {Prefix}{Entity}Transformer.transform(created);\n}\n```\n\n### Fix GET Provider\n\n```typescript\n// Before\nreturn {\n id: record.id as string & tags.Format<\"uuid\">,\n ...\n};\n\n// After\nimport { {Prefix}{Entity}Transformer } from \"../transformers/{Prefix}{Entity}Transformer\";\n\nexport async function get{Prefix}{Entity}(props: { id: string }): Promise {\n const record = await MyGlobal.prisma.{table}.findUnique({ where: { id: props.id } });\n if (!record) throw new HttpException(\"Not found\", 404);\n return {Prefix}{Entity}Transformer.transform(record);\n}\n```\n\n---\n\n## Step 4: Verify\n\n```bash\nnpm run build:main\n```\n\nRepeat Steps 2-4 until no provider errors.\n\n---\n\n## Common Fixes\n\n| Error Pattern | Fix |\n|---------------|-----|\n| `as any` | Create proper Collector/Transformer |\n| Type assertion | Use Transformer for conversion |\n| Missing import | Add import statement |\n| Null reference | Add null check before transform |\n\n---\n\n## Exit Condition\n\n- `npm run build:main` completes with no errors\n- No `as any` in providers\n- No type assertions in providers\n- All providers use Collector + Transformer\n", ".claude/skills/fix-test/SKILL.md": "---\nname: fix-test\ndescription: Fix Test compilation errors\nallowed-tools: Read, Edit, Write, Bash, Grep, Glob\n---\n\n# Fix Test Errors\n\nFix test file compilation errors according to code conventions.\n\n## FORBIDDEN\n\n**NEVER use:**\n- `as` keyword (type assertion)\n- `any` type\n- `typia.random()` - generates invalid data\n\n---\n\n## Purpose\n\nFix compilation errors in test files to ensure `npm run build:test` passes.\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Run Build │\n│ npm run build:test │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Parse Test Errors │\n│ - Empty prepare functions │\n│ - Type mismatches │\n│ - Missing imports │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Fix by Convention │\n│ - Fill prepare functions │\n│ - Create generate functions │\n│ - Fix import paths │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 4: Re-run Build │\n│ Loop until 0 errors │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Run Build\n\n```bash\nnpm run build:test 2>&1 | head -100\n```\n\nCapture test-related errors.\n\n---\n\n## Step 2: Find Issues\n\n```bash\n# Find empty returns\ngrep -rn \"return {}\" test/prepare/ --include=\"*.ts\"\n\n# Find typia.random with potentially empty types\ngrep -rn \"typia.random<\" test/ --include=\"*.ts\"\n```\n\n---\n\n## Step 3: Fix by Convention\n\n### Fix Empty prepare_random Function\n\n```typescript\n// Before\nexport function prepare_random_{prefix}_{entity}(\n input?: DeepPartial | undefined,\n): I{Prefix}{Entity}.ICreate {\n return {}; // WRONG\n}\n\n// After\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { DeepPartial } from \"@ORGANIZATION/PROJECT-api/lib/typings/DeepPartial\";\nimport { RandomGenerator } from \"@nestia/e2e\";\nimport { randint } from \"tstl\";\nimport { v4 } from \"uuid\";\n\nexport function prepare_random_{prefix}_{entity}(\n input?: DeepPartial | undefined,\n): I{Prefix}{Entity}.ICreate {\n return {\n parent_id: input?.parent_id ?? v4(),\n name: input?.name ?? RandomGenerator.name(2),\n title: input?.title ?? RandomGenerator.paragraph(1),\n content: input?.content ?? RandomGenerator.paragraph(3),\n is_public: input?.is_public ?? true,\n status: input?.status ?? \"active\",\n };\n}\n```\n\n### Create Missing generate_random Function\n\n```typescript\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { DeepPartial } from \"@ORGANIZATION/PROJECT-api/lib/typings/DeepPartial\";\nimport api from \"@ORGANIZATION/PROJECT-api\";\n\nimport { prepare_random_{prefix}_{entity} } from \"../prepare/prepare_random_{prefix}_{entity}\";\n\nexport async function generate_random_{prefix}_{entity}(\n connection: api.IConnection,\n input?: DeepPartial | undefined,\n): Promise {\n const body = prepare_random_{prefix}_{entity}(input);\n return api.functional.{prefix}.{path}.create(connection, body);\n}\n```\n\n### Field Generation Patterns\n\n| Field Type | Generation Pattern |\n|------------|-------------------|\n| UUID | `v4()` |\n| Name/Title | `RandomGenerator.name(2)` |\n| Paragraph | `RandomGenerator.paragraph(1)` |\n| Email | `` `${RandomGenerator.string(8)}@example.com` `` |\n| URL | `` `https://example.com/${RandomGenerator.string(10)}` `` |\n| Integer | `randint(min, max)` |\n| Boolean | `Math.random() > 0.5` |\n| Date (ISO) | `new Date().toISOString()` |\n| Union Type | `([\"val1\", \"val2\"] as const)[randint(0, 1)]` |\n\n### Replace typia.random with prepare function\n\n```typescript\n// Before\nconst data = typia.random();\n\n// After\nimport { prepare_random_{prefix}_{entity} } from \"../prepare/prepare_random_{prefix}_{entity}\";\n\nconst data = prepare_random_{prefix}_{entity}({\n status: \"active\", // Can override specific values\n});\n```\n\n---\n\n## Step 4: Verify\n\n```bash\nnpm run build:test\n```\n\nRepeat Steps 2-4 until no test build errors.\n\n---\n\n## Common Fixes\n\n| Error Pattern | Fix |\n|---------------|-----|\n| Empty `return {}` | Fill with proper random generators |\n| `typia.random` | Use prepare_random function |\n| Missing generate function | Create matching generate_random |\n| Import error | Fix import path |\n\n---\n\n## Exit Condition\n\n- `npm run build:test` completes with no errors\n- All prepare functions return complete objects\n- All generate functions exist for prepare functions\n- No `typia.random` with empty types\n", ".claude/skills/validate-db/SKILL.md": "---\nname: validate-db\ndescription: Validate Prisma schema against requirements specification (read-only)\nallowed-tools: Read, Grep, Glob\n---\n\n# Validate Database Schema\n\nValidate that Prisma schema matches the requirements specification. This skill only checks for discrepancies - it does NOT modify any files.\n\n## Purpose\n\nCompare requirements documents with Prisma schema and report:\n- ✅ Matching items\n- ❌ Mismatching items (needs fix)\n- ⚠️ Items requiring review\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Read Requirements │\n│ /docs/analysis/*.md │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Read Prisma Schema │\n│ /prisma/schema/*.prisma │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Compare & Report │\n│ - Missing tables │\n│ - Missing columns │\n│ - Type mismatches │\n│ - Relationship issues │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Read Requirements\n\n```bash\nfind docs/analysis -name \"*.md\" -type f\n```\n\nExtract from each document:\n- Entity definitions\n- Field requirements (name, type, nullable, constraints)\n- Relationship descriptions\n- Business rules\n\n---\n\n## Step 2: Read Prisma Schema\n\n```bash\nfind prisma/schema -name \"*.prisma\" -type f\n```\n\nExtract from schema:\n- Model definitions\n- Field types and attributes\n- Relations and foreign keys\n- Indexes\n\n---\n\n## Step 3: Validation Checks\n\n### 3.1 Entity Coverage\nFor each entity in requirements:\n- ✅ Model exists in schema\n- ❌ Model missing from schema\n\n### 3.2 Field Coverage\nFor each required field:\n- ✅ Field exists with correct type\n- ❌ Field missing\n- ❌ Field has wrong type\n- ⚠️ Nullable mismatch\n\n### 3.3 Relationship Coverage\nFor each relationship:\n- ✅ Relation properly defined\n- ❌ Relation missing\n- ❌ Wrong cardinality (1:1, 1:N, N:M)\n- ⚠️ Missing onDelete cascade\n\n### 3.4 Naming Convention\n- ✅ Table names follow `{prefix}_{entities}` pattern\n- ❌ Inconsistent naming\n- ⚠️ Non-standard field names\n\n**Boolean fields:**\n- ✅ Boolean fields have `is_` prefix (e.g., `is_active`, `is_public`)\n- ❌ Boolean field missing `is_` prefix (e.g., `active` → `is_active`)\n\n**Field name consistency:**\n- ✅ Same-purpose fields have consistent names across tables\n- ❌ Inconsistent naming (e.g., `expires_at` in one table, `expired_at` in another)\n- Common fields to check: `*_at` timestamps, `*_id` foreign keys, status fields\n\n### 3.5 Table Necessity\nCompare with requirements to identify unnecessary tables:\n\n**Duplicate tables:**\n- ❌ Multiple tables serving same purpose\n- ⚠️ Tables with overlapping responsibilities\n\n**Unnecessary snapshot/history tables:**\n- ❌ Snapshot table exists but requirements say data should be directly editable\n- ❌ History table without audit/versioning requirement\n- ✅ Snapshot table exists and requirements specify versioning/history\n\n---\n\n## Output Format\n\n```markdown\n# Validation Report: Database Schema\n\n## Summary\n- Total entities in requirements: X\n- Entities found in schema: Y\n- Missing entities: Z\n\n## ✅ Valid Items\n- [Entity] `users` - All fields match\n- [Entity] `posts` - All fields match\n\n## ❌ Issues Found\n- [Missing Entity] `comments` - Defined in requirements but not in schema\n- [Missing Field] `users.phone` - Required but not defined\n- [Type Mismatch] `posts.view_count` - Expected Int, found String\n- [Naming] `users.active` - Boolean field should be `is_active`\n- [Naming] `sessions.expired_at` - Inconsistent with `tokens.expires_at`\n- [Unnecessary Table] `post_snapshots` - Requirements say posts are directly editable\n\n## ⚠️ Warnings\n- [Nullable] `users.bio` - Requirements say required, schema allows null\n- [Index] `posts` - Consider adding index on `created_at`\n- [Duplicate] `user_profiles` and `users` - May have overlapping responsibilities\n\n## Recommendation\nRun `/fix-db` to fix the issues above.\n```\n\n---\n\n## Important\n\n**This skill is READ-ONLY.**\n\n- Does NOT modify any files\n- Does NOT run any build commands\n- Only reports discrepancies\n\nTo fix issues, use `/fix-db` skill.\n", ".claude/skills/validate-interface/SKILL.md": "---\nname: validate-interface\ndescription: Validate Controllers and DTOs against requirements (read-only)\nallowed-tools: Read, Grep, Glob\n---\n\n# Validate Interface (Controllers, DTOs)\n\nValidate that Controllers and DTO interfaces match the requirements specification. This skill only checks for discrepancies - it does NOT modify any files.\n\n## Purpose\n\nCompare requirements documents with interface definitions and report:\n- ✅ Matching items\n- ❌ Mismatching items (needs fix)\n- ⚠️ Items requiring review\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Read Requirements │\n│ /docs/analysis/*.md │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Read Prisma Schema │\n│ /prisma/schema/*.prisma │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Read Interfaces & Controllers│\n│ /src/api/structures/ │\n│ /src/controllers/ │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 4: Compare & Report │\n│ - Missing APIs │\n│ - Empty interfaces │\n│ - Type mismatches │\n│ - Missing DTOs │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Read Requirements\n\n```bash\nfind docs/analysis -name \"*.md\" -type f\n```\n\nExtract required APIs:\n- HTTP methods (GET, POST, PATCH, PUT, DELETE)\n- URL paths\n- Request/response structures\n- Authentication requirements\n\n---\n\n## Step 2: Read Prisma Schema\n\n```bash\nfind prisma/schema -name \"*.prisma\" -type f\n```\n\nUnderstand data model for DTO validation.\n\n---\n\n## Step 3: Read Current Implementation\n\n```bash\n# Controllers\nfind src/controllers -name \"*Controller.ts\" -type f\n\n# Interfaces\nfind src/api/structures -name \"I*.ts\" -type f\n```\n\n---\n\n## Step 4: Validation Checks\n\n### 4.1 API Coverage\nFor each required API:\n- ✅ Controller method exists\n- ❌ API missing\n\n### 4.2 Interface Completeness\nFor each interface file:\n- ✅ All properties defined\n- ❌ Empty interface `{}`\n- ❌ Missing ICreate/IUpdate/ISummary\n\n### 4.3 Type Alignment with Prisma\nFor each DTO property:\n- ✅ Type matches Prisma field\n- ❌ Type mismatch\n- ❌ Missing nullable annotation\n- ⚠️ Missing typia tags\n\n### 4.4 Controller Structure\n- ✅ Proper decorators (@TypedRoute, @TypedBody)\n- ❌ Missing authentication decorator\n- ⚠️ Inconsistent naming\n\n### 4.5 Path Naming\nCheck for redundant path segments where the same word repeats:\n- ❌ `/{word}/{word}s` - e.g., `/admin/admins`, `/user/users`\n- ❌ `/{word}/{word}-*` - e.g., `/item/item-details`\n- ❌ `/{prefix}/{prefix}-*` - prefix repeated in resource path\n\nFix by removing redundant segment:\n- ✅ `/{word}s` - e.g., `/admins`, `/users`\n- ✅ `/{prefix}/{resources}` - no repetition\n\n---\n\n## Output Format\n\n```markdown\n# Validation Report: Interfaces\n\n## Summary\n- Required APIs: X\n- Implemented APIs: Y\n- Missing APIs: Z\n- Empty interfaces: W\n\n## ✅ Valid Items\n- [Controller] `AdminEntitiesController` - All methods present\n- [Interface] `IEntity` - Properly defined\n\n## ❌ Issues Found\n- [Missing API] `DELETE /admin/entities/:id` - Not implemented\n- [Empty Interface] `IEntity.ICreate` - No properties defined\n- [Type Mismatch] `IEntity.status` - Expected union type, found string\n\n## ⚠️ Warnings\n- [Missing Tag] `IEntity.id` - Should have `tags.Format<\"uuid\">`\n- [Nullable] `IEntity.deleted_at` - Should be `(string & tags.Format<\"date-time\">) | null`\n- [Path Naming] `/{word}/{word}s` pattern detected - Redundant path segment, remove duplication\n\n## Recommendation\nRun `/fix-interface` to fix the issues above.\n```\n\n---\n\n## Important\n\n**This skill is READ-ONLY.**\n\n- Does NOT modify any files\n- Does NOT run any build commands\n- Only reports discrepancies\n\nTo fix issues, use `/fix-interface` skill.\n", ".claude/skills/validate-provider/SKILL.md": "---\nname: validate-provider\ndescription: Validate Providers against interfaces (read-only)\nallowed-tools: Read, Grep, Glob\n---\n\n# Validate Providers\n\nValidate that Providers, Collectors, and Transformers properly implement the interfaces. This skill only checks for discrepancies - it does NOT modify any files.\n\n## Purpose\n\nCompare interface definitions with provider implementations and report:\n- ✅ Matching items\n- ❌ Mismatching items (needs fix)\n- ⚠️ Items requiring review\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Read Interfaces │\n│ /src/api/structures/ │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Read Providers │\n│ /src/providers/ │\n│ /src/collectors/ │\n│ /src/transformers/ │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Compare & Report │\n│ - Missing providers │\n│ - Missing collectors │\n│ - Missing transformers │\n│ - Type safety issues │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Read Interfaces\n\n```bash\nfind src/api/structures -name \"I*.ts\" -type f\n```\n\nFor each interface, identify:\n- Main entity type\n- ICreate subtype\n- IUpdate subtype\n- ISummary subtype\n\n---\n\n## Step 2: Read Implementation Files\n\n```bash\n# Providers\nfind src/providers -name \"*.ts\" -type f\n\n# Collectors\nfind src/collectors -name \"*Collector.ts\" -type f\n\n# Transformers\nfind src/transformers -name \"*Transformer.ts\" -type f\n```\n\n---\n\n## Step 3: Validation Checks\n\n### 3.1 Provider Coverage\nFor each interface:\n- ✅ POST provider exists (uses ICreate)\n- ✅ GET provider exists (returns Interface)\n- ✅ PATCH/PUT provider exists (uses IUpdate)\n- ✅ DELETE provider exists\n- ❌ Provider missing\n\n### 3.2 Collector Coverage\nFor each interface with ICreate:\n- ✅ Collector exists\n- ✅ Collector returns Prisma.CreateInput\n- ❌ Collector missing\n- ❌ Wrong return type\n\n### 3.3 Transformer Coverage\nFor each interface:\n- ✅ Transformer exists\n- ✅ transform() method defined\n- ✅ toSummary() method defined\n- ❌ Transformer missing\n- ❌ Methods missing\n\n### 3.4 Type Safety\nSearch for anti-patterns:\n- ❌ `as any` usage\n- ❌ `any` type annotations\n- ❌ Type assertions (`as Type`)\n- ⚠️ Inline transformations (should use Transformer)\n\n---\n\n## Output Format\n\n```markdown\n# Validation Report: Providers\n\n## Summary\n- Interfaces: X\n- Providers found: Y\n- Collectors found: Z\n- Transformers found: W\n\n## ✅ Valid Items\n- [Provider] `postEntity` - Uses Collector, returns via Transformer\n- [Collector] `EntityCollector` - Properly typed\n- [Transformer] `EntityTransformer` - All methods present\n\n## ❌ Issues Found\n- [Missing Collector] `AnotherEntity` - No collector for ICreate\n- [Missing Transformer] `AnotherEntity` - No transformer defined\n- [Type Safety] `postEntity.ts:27` - Uses `as any`\n- [Type Safety] `getEntity.ts:15` - Inline transformation instead of Transformer\n\n## ⚠️ Warnings\n- [Unused Import] `postEntity.ts` - Imports unused module\n- [Missing Null Check] `getEntity.ts:20` - Should check for null before transform\n\n## Recommendation\nRun `/fix-provider` to fix the issues above.\n```\n\n---\n\n## Important\n\n**This skill is READ-ONLY.**\n\n- Does NOT modify any files\n- Does NOT run any build commands\n- Only reports discrepancies\n\nTo fix issues, use `/fix-provider` skill.\n", ".claude/skills/validate-test/SKILL.md": "---\nname: validate-test\ndescription: Validate test coverage against providers (read-only)\nallowed-tools: Read, Grep, Glob\n---\n\n# Validate Test Infrastructure\n\nValidate that test infrastructure properly covers providers and interfaces. This skill only checks for discrepancies - it does NOT modify any files.\n\n## Purpose\n\nCompare interface/provider implementations with test coverage and report:\n- ✅ Matching items\n- ❌ Mismatching items (needs fix)\n- ⚠️ Items requiring review\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Read Interfaces │\n│ /src/api/structures/ (ICreate) │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Read Test Files │\n│ /test/prepare/ │\n│ /test/generate/ │\n│ /test/features/api/ │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Compare & Report │\n│ - Missing prepare functions │\n│ - Missing generate functions │\n│ - Missing test scenarios │\n│ - Empty implementations │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Extract ICreate Interfaces\n\n```bash\ngrep -r \"export type ICreate\\|\\.ICreate\" src/api/structures/ --include=\"*.ts\"\n```\n\nList all interfaces that need test data generators.\n\n---\n\n## Step 2: Read Test Files\n\n```bash\n# Prepare functions\nfind test/prepare -name \"prepare_random_*.ts\" -type f\n\n# Generate functions\nfind test/generate -name \"generate_random_*.ts\" -type f\n\n# Feature tests\nfind test/features/api -name \"*.ts\" -type f\n```\n\n---\n\n## Step 3: Validation Checks\n\n### 3.1 prepare_random Coverage\nFor each ICreate interface:\n- ✅ prepare_random_* function exists\n- ❌ Function missing\n- ❌ Function returns empty `{}`\n\n### 3.2 generate_random Coverage\nFor each prepare_random function:\n- ✅ generate_random_* function exists (1:1 mapping)\n- ❌ Function missing\n- ❌ Orphan generate without prepare\n\n### 3.3 Test Scenario Coverage\nFor each entity:\n- ✅ Create test exists\n- ✅ Read test exists\n- ✅ Update test exists\n- ✅ Delete test exists\n- ❌ Missing CRUD tests\n- ⚠️ Missing edge case tests\n\n### 3.4 Test Quality\n- ✅ Uses prepare_random (not hardcoded data)\n- ✅ Uses generate_random (not direct API calls)\n- ❌ Uses typia.random with empty type\n- ❌ Hardcoded UUIDs\n- ⚠️ Missing assertions\n\n---\n\n## Output Format\n\n```markdown\n# Validation Report: Test Infrastructure\n\n## Summary\n- ICreate interfaces: X\n- prepare_random functions: Y\n- generate_random functions: Z\n- Test files: W\n\n## ✅ Valid Items\n- [Prepare] `prepare_random_entity` - All fields generated\n- [Generate] `generate_random_entity` - Properly calls API\n- [Test] `test_entity_create` - Complete assertions\n\n## ❌ Issues Found\n- [Missing Prepare] `another_entity` - No prepare function for ICreate\n- [Missing Generate] `another_entity` - No generate function\n- [Empty Prepare] `prepare_random_thing.ts` - Returns `{}`\n- [Orphan Generate] `generate_random_old.ts` - No matching prepare function\n\n## ⚠️ Warnings\n- [Missing Test] `entity` - No delete test scenario\n- [Edge Case] `entity` - No validation error test\n- [Edge Case] `entity` - No unauthorized access test\n\n## Recommendation\nRun `/fix-test` to fix the issues above.\n```\n\n---\n\n## Important\n\n**This skill is READ-ONLY.**\n\n- Does NOT modify any files\n- Does NOT run any build commands\n- Only reports discrepancies\n\nTo fix issues, use `/fix-test` skill.\n", ".env.local": "API_PORT=37001\nJWT_SECRET_KEY=your_jwt_secret_key", ".github/workflows/build.yml": "name: build\non:\n pull_request:\n paths:\n - 'src/**'\n - 'test/**'\n - 'package.json'\njobs:\n Ubuntu:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - uses: actions/setup-node@v4\n with:\n node-version: 20.x\n - uses: pnpm/action-setup@v4\n with:\n version: 8\n \n - name: Install Backend-Server\n run: pnpm install\n\n - name: Build Swagger\n run: pnpm run build:swagger\n\n - name: Build SDK\n run: pnpm run build:sdk\n\n - name: Compile Backend-Server\n run: pnpm run build\n\n - name: Run Test Program\n run: pnpm run test -- --reset true --simultaneous 16\n\n - name: EsLint\n run: pnpm run eslint\n", "CLAUDE.md": "# AutoBE Generated Project\n\n## Overview\n\nThis is an **AutoBE-generated** NestJS backend API. The codebase was automatically generated by AutoBE (AI vibe coding agent) and may contain incomplete implementations that require manual fixes.\n\n## Tech Stack\n\n| Technology | Purpose |\n|------------|---------|\n| **NestJS** | Backend framework |\n| **Nestia** | SDK generation, type-safe API |\n| **Prisma** | ORM with PostgreSQL |\n| **Typia** | Runtime type validation |\n| **TypeScript** | Language |\n\n## Directory Structure\n\n```\n/prisma/schema/ # Prisma schema files (split by domain)\n├── main.prisma # Generator config, datasource\n├── schema-*.prisma # Domain-specific schemas\n\n/src/\n├── api/structures/ # TypeScript interfaces (DTOs)\n├── controllers/ # NestJS controllers (nested by route)\n├── providers/ # Business logic implementations\n├── collectors/ # ICreate → Prisma.CreateInput\n├── transformers/ # Prisma record → Interface\n├── decorators/ # Custom decorators (AdminAuth, etc.)\n├── prisma/ # Generated Prisma client\n├── utils/ # Utility functions\n└── MyModule.ts # Root NestJS module\n\n/test/\n├── prepare/ # Random data generators for tests\n├── generate/ # Entity creation helpers\n├── features/api/ # Feature tests by domain\n└── authorize/ # Auth test utilities\n```\n\n## Build Commands\n\nExecute in this order:\n\n```bash\nnpm run build:prisma # 1. Generate Prisma client\nnpm run build:main # 2. Compile TypeScript (src → lib)\nnpm run build:test # 3. Compile tests\nnpm run test # 4. Run tests\n```\n\nOther useful commands:\n```bash\nnpm run build:sdk # Generate Nestia SDK to packages/api\nnpm run dev # Watch mode for development\nnpm start # Run compiled server\n```\n\n## Known Issues (AutoBE Generated)\n\n### Critical Issues\n\n| Issue | Location | Impact |\n|-------|----------|--------|\n| Empty interface definitions `{}` | `/src/api/structures/` | Type safety broken |\n| Empty test prepare functions | `/test/prepare/` | Tests fail with empty data |\n| `as any` casting in providers | `/src/providers/` | Type safety bypassed |\n| console statements in business logic | `/src/providers/`, `/src/collectors/`, `/src/transformers/` | Should be removed |\n| Dual-parent FKs without constraints | attachments, reference_links | Data integrity risk |\n\n### How to Fix\n\nUse the provided Claude Skills (slash commands):\n\n#### [1] Validate Skills (Read-Only)\n\n| Command | Purpose |\n|---------|---------|\n| `/validate-db` | Validate Prisma schema against requirements |\n| `/validate-interface` | Validate Controllers, APIs, DTOs against requirements |\n| `/validate-provider` | Validate Collectors, Transformers, Providers |\n| `/validate-test` | Validate test infrastructure against interfaces |\n\n#### [2] Fix Skills (Compilation Errors)\n\n| Command | Purpose |\n|---------|---------|\n| `/fix-db` | Fix Prisma schema compilation errors |\n| `/fix-interface` | Fix interface/DTO compilation errors |\n| `/fix-provider` | Fix Collector/Transformer/Provider errors |\n| `/fix-test` | Fix test compilation errors |\n\n#### [3] Add Feature Skill\n\n| Command | Purpose |\n|---------|---------|\n| `/add-feature [description]` | Implement new feature with self-testing loop until 100% pass |\n\n## User Request Patterns\n\n| User Request | Action |\n|--------------|--------|\n| \"Review this project\", \"Validate everything\" | `/validate-db` → `/validate-interface` → `/validate-provider` → `/validate-test` (sequential) |\n| \"Validate DB schema\" | `/validate-db` |\n| \"Validate interfaces\", \"Check APIs\" | `/validate-interface` |\n| \"Validate providers\", \"Check collectors\" | `/validate-provider` |\n| \"Validate tests\" | `/validate-test` |\n| \"Fix build errors\", \"Fix compilation errors\" | `/fix-db` → `/fix-interface` → `/fix-provider` → `/fix-test` (sequential) |\n| \"Add new feature [description]\" | `/add-feature [description]` |\n\n## Naming Conventions\n\n| Category | Pattern | Example |\n|----------|---------|---------|\n| Interfaces | `I{Prefix}{Entity}` | `I{Prefix}User` |\n| Controllers | `{Prefix}{Entity}Controller` | `{Prefix}AdminUsersController` |\n| Providers | `verb{Prefix}{Entity}` | `post{Prefix}AdminUsers` |\n| DB Tables | `{prefix}_{entities}` | `{prefix}_users` |\n| Test Prepare | `prepare_random_{prefix}_{entity}` | `prepare_random_{prefix}_user` |\n\n## Type Usage\n\n### Typia Tags\n\nAlways use typia tags for validation:\n\n```typescript\nimport { tags } from \"typia\";\n\nexport type IExample = {\n id: string & tags.Format<\"uuid\">;\n email: string & tags.Format<\"email\">;\n url: string & tags.Format<\"uri\">;\n created_at: string & tags.Format<\"date-time\">;\n deleted_at: (string & tags.Format<\"date-time\">) | null;\n};\n```\n\n### Enum Types\n\nUse union types for enums:\n\n```typescript\nstatus: \"active\" | \"inactive\";\nrole: \"master\" | \"moderator\";\ntype: \"create\" | \"update\" | \"delete\";\n```\n\n## Utility Functions\n\n| Function | Location | Purpose |\n|----------|----------|---------|\n| `v4()` | `uuid` package | Generate UUIDs |\n| `PasswordUtil.hash()` | `/src/utils/PasswordUtil` | Hash passwords |\n| `PasswordUtil.compare()` | `/src/utils/PasswordUtil` | Compare passwords |\n\n## Key Files Reference\n\n| Purpose | File Path |\n|---------|-----------|\n| Main module | `/src/MyModule.ts` |\n| Global config | `/src/MyGlobal.ts` |\n| Auth decorator | `/src/decorators/AdminAuth.ts` |\n| Prisma entry | `/prisma/schema/main.prisma` |\n| Test entry | `/test/index.ts` |\n\n## Modification Guidelines\n\n### DO\n\n- Read the corresponding Prisma schema before modifying interfaces\n- Run `npm run build:main` after changes to verify\n- Use typia tags for all validation\n- Follow existing naming conventions\n- Update related tests when modifying interfaces\n\n### DON'T\n\n- Use `as any` type casting\n- Use `console` in providers, collectors, transformers (remove them)\n- Create orphaned attachments/reference_links (must have exactly one parent)\n- Skip interface definitions (empty `{}` types)\n- Use `typia.random()` in tests\n\n## Database Schema Patterns\n\n### Common Entity Structure\n\n```prisma\nmodel {prefix}_{entities} {\n id String @id @db.Uuid\n\n // Fields\n name String\n status String // \"active\" | \"inactive\"\n\n // Foreign keys\n {parent}_id String @db.Uuid\n\n // Timestamps\n created_at DateTime @db.Timestamptz\n updated_at DateTime @db.Timestamptz\n deleted_at DateTime? @db.Timestamptz\n\n // Relations\n {parent} {prefix}_{parents} @relation(fields: [{parent}_id], references: [id], onDelete: Cascade)\n\n // Indexes\n @@index([{parent}_id, status])\n @@map(\"{prefix}_{entities}\")\n}\n```\n\n### Relationship Pattern\n\n```\nParent (1) ──> (*) Child\nEntity (1) ──> (*) History\nEntity (1) ──> (*) Attachment\n```\n\n## API Endpoint Patterns\n\n| Domain | Base Path | Auth |\n|--------|-----------|------|\n| Auth | `/{prefix}/auth/admin` | Public |\n| Admin Profile | `/{prefix}/admin/profile` | Required |\n| Admin Resources | `/{prefix}/admin/{resources}` | Required |\n| Public Resources | `/{prefix}/{resources}` | Optional |\n", "src/MyConfiguration.ts": "import { ExceptionManager } from \"@nestia/core\";\nimport {\n ConflictException,\n InternalServerErrorException,\n NotFoundException,\n} from \"@nestjs/common\";\nimport { Prisma } from \"@prisma/sdk\";\nimport fs from \"fs\";\nimport path from \"path\";\n\nimport { MyGlobal } from \"./MyGlobal\";\n\nexport namespace MyConfiguration {\n export const API_PORT = () => Number(MyGlobal.env.API_PORT);\n export const ROOT = (() => {\n const split: string[] = __dirname.split(path.sep);\n return split.at(-1) === \"src\" && split.at(-2) === \"bin\"\n ? path.resolve(__dirname + \"/../..\")\n : fs.existsSync(__dirname + \"/.env\")\n ? __dirname\n : path.resolve(__dirname + \"/..\");\n })().replaceAll(\"\\\\\", \"/\");\n}\n\nExceptionManager.insert(Prisma.PrismaClientKnownRequestError, (exp) => {\n switch (exp.code) {\n case \"P2025\":\n return new NotFoundException(exp.message);\n case \"P2002\": // UNIQUE CONSTRAINT\n return new ConflictException(exp.message);\n default:\n return new InternalServerErrorException(exp.message);\n }\n});\n", "src/providers/authorize/jwtAuthorize.ts": "import { ForbiddenException, UnauthorizedException } from \"@nestjs/common\";\nimport jwt from \"jsonwebtoken\";\n\nimport { MyGlobal } from \"../../MyGlobal\";\n\nexport function jwtAuthorize(props: {\n request: {\n headers: { authorization?: string };\n };\n}) {\n if (!props.request.headers.authorization)\n throw new ForbiddenException(\"No token value exists\");\n\n // PARSE TOKEN\n try {\n if (\n props.request.headers.authorization.startsWith(BEARER_PREFIX) === true\n ) {\n const token: string = props.request.headers.authorization.substring(\n BEARER_PREFIX.length,\n );\n\n const verified = jwt.verify(token, MyGlobal.env.JWT_SECRET_KEY);\n\n return verified;\n } else {\n const token = props.request.headers.authorization;\n\n const verified = jwt.verify(token, MyGlobal.env.JWT_SECRET_KEY);\n\n return verified;\n }\n } catch {\n throw new UnauthorizedException(\"Invalid token\");\n }\n}\n\nconst BEARER_PREFIX = \"Bearer \";\n", "src/setup/MySetupWizard.ts": "import cp from \"child_process\";\n\nimport { MyConfiguration } from \"../MyConfiguration\";\nimport { MyGlobal } from \"../MyGlobal\";\n\nexport namespace MySetupWizard {\n export async function schema(): Promise {\n if (MyGlobal.testing === false)\n throw new Error(\n \"Error on MySetupWizard.schema(): unable to reset database in non-test mode.\",\n );\n const execute = (type: string) => (argv: string) =>\n cp.execSync(`npx prisma migrate ${type} --schema=prisma/schema ${argv}`, {\n stdio: \"ignore\",\n cwd: MyConfiguration.ROOT,\n });\n execute(\"reset\")(\"--force\");\n execute(\"dev\")(\"--name init\");\n }\n\n export async function seed(): Promise {}\n}\n", "src/utils/PasswordUtil.ts": "import crypto from \"crypto\";\n\nexport namespace PasswordUtil {\n /**\n * Common password utilities for consistent authentication Uses native crypto\n * module for password hashing\n */\n // Fixed salt for password hashing (consistent across all operations)\n export const FIXED_SALT: string = \"autobe-fixed-salt-2024\";\n\n /**\n * Hash a plain password using crypto.pbkdf2 All authentication operations\n * (join, login) MUST use this method\n *\n * @param plainPassword - The plain text password to hash\n * @returns The hashed password as hex string\n */\n export async function hash(plainPassword: string): Promise {\n return new Promise((resolve, reject) => {\n crypto.pbkdf2(\n plainPassword,\n PasswordUtil.FIXED_SALT,\n 10000,\n 64,\n \"sha512\",\n (err: Error | null, derivedKey: Buffer) => {\n if (err) reject(err);\n else resolve(derivedKey.toString(\"hex\"));\n },\n );\n });\n }\n\n /**\n * Verify a plain password against a hashed password Login operations MUST use\n * this method for password verification\n *\n * @param plainPassword - The plain text password to verify\n * @param hashedPassword - The hashed password from database\n * @returns True if passwords match, false otherwise\n */\n export async function verify(\n plainPassword: string,\n hashedPassword: string,\n ): Promise {\n const hash = await PasswordUtil.hash(plainPassword);\n return hash === hashedPassword;\n }\n}\n", "src/utils/toISOStringSafe.ts": "import { tags } from \"typia\";\n\n/**\n * Transforms a value that is either a Date or a string into an ISO 8601\n * formatted string. If it's already a string, it assumes it's already in ISO\n * format.\n */\nexport function toISOStringSafe(\n value: Date | (string & tags.Format<\"date-time\">),\n): string & tags.Format<\"date-time\"> {\n if (value instanceof Date) {\n return value.toISOString() as string & tags.Format<\"date-time\">;\n }\n return value;\n}\n", "test/servant.ts": "import { DynamicExecutor } from \"@nestia/e2e\";\nimport { Driver, WorkerServer } from \"tgrid\";\n\nimport { MyBackend } from \"../src/MyBackend\";\nimport { MyGlobal } from \"../src/MyGlobal\";\nimport { IAutoBeRealizeTestConfig } from \"./autobe/compiler/IAutoBeRealizeTestConfig\";\nimport { IAutoBeRealizeTestListener } from \"./autobe/compiler/IAutoBeRealizeTestListener\";\nimport { IAutoBeRealizeTestOperation } from \"./autobe/compiler/IAutoBeRealizeTestOperation\";\nimport { IAutoBeRealizeTestResult } from \"./autobe/compiler/IAutoBeRealizeTestResult\";\nimport { IAutoBeRealizeTestService } from \"./autobe/compiler/IAutoBeRealizeTestService\";\nimport { TestAutomation } from \"./helpers/TestAutomation\";\n\nclass AutoBeRealizeTestService implements IAutoBeRealizeTestService {\n public constructor(\n private readonly listener: Driver,\n ) {}\n\n public async execute(\n config: IAutoBeRealizeTestConfig,\n ): Promise {\n const start: Date = new Date();\n const operations: IAutoBeRealizeTestOperation[] = [];\n await TestAutomation.execute({\n open: async (): Promise => {\n const backend: MyBackend = new MyBackend();\n await backend.open();\n return backend;\n },\n close: (backend: MyBackend): Promise => backend.close(),\n options: {\n reset: config.reset ?? true,\n simultaneous: config.simultaneous ?? 1,\n },\n onComplete: (exec: DynamicExecutor.IExecution): void => {\n const op: IAutoBeRealizeTestOperation = {\n name: exec.name,\n location: exec.location,\n value: exec.value,\n error: exec.error,\n started_at: exec.started_at,\n completed_at: exec.completed_at,\n };\n this.listener.onOperation(op).catch(() => {});\n operations.push(op);\n },\n onReset: (): void => {\n this.listener.onReset().catch(() => {});\n },\n });\n return {\n reset: config.reset ?? true,\n simultaneous: config.simultaneous ?? 1,\n operations,\n started_at: start.toISOString(),\n completed_at: new Date().toISOString(),\n };\n }\n}\n\nconst main = async (): Promise => {\n const worker: WorkerServer<\n null,\n IAutoBeRealizeTestService,\n IAutoBeRealizeTestListener\n > = new WorkerServer();\n const listener: Driver = worker.getDriver();\n const service: AutoBeRealizeTestService = new AutoBeRealizeTestService(\n listener,\n );\n\n MyGlobal.testing = true;\n await worker.open(service);\n};\nmain().catch((error) => {\n console.log(error);\n process.exit(-1);\n});\n", "tsconfig.json": "{\n \"compilerOptions\": {\n /* Visit https://aka.ms/tsconfig to read more about this file */\n\n /* Projects */\n // \"incremental\": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */\n // \"composite\": true, /* Enable constraints that allow a TypeScript project to be used with project references. */\n // \"tsBuildInfoFile\": \"./.tsbuildinfo\", /* Specify the path to .tsbuildinfo incremental compilation file. */\n // \"disableSourceOfProjectReferenceRedirect\": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */\n // \"disableSolutionSearching\": true, /* Opt a project out of multi-project reference checking when editing. */\n // \"disableReferencedProjectLoad\": true, /* Reduce the number of projects loaded automatically by TypeScript. */\n\n /* Language and Environment */\n \"target\": \"ES2015\", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */\n \"lib\": [\n \"DOM\",\n \"ESNext\",\n ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */\n // \"jsx\": \"preserve\", /* Specify what JSX code is generated. */\n \"experimentalDecorators\": true, /* Enable experimental support for TC39 stage 2 draft decorators. */\n \"emitDecoratorMetadata\": true, /* Emit design-type metadata for decorated declarations in source files. */\n // \"jsxFactory\": \"\", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */\n // \"jsxFragmentFactory\": \"\", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */\n // \"jsxImportSource\": \"\", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */\n // \"reactNamespace\": \"\", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */\n // \"noLib\": true, /* Disable including any library files, including the default lib.d.ts. */\n // \"useDefineForClassFields\": true, /* Emit ECMAScript-standard-compliant class fields. */\n // \"moduleDetection\": \"auto\", /* Control what method is used to detect module-format JS files. */\n\n /* Modules */\n \"module\": \"commonjs\", /* Specify what module code is generated. */\n // \"rootDir\": \"./\", /* Specify the root folder within your source files. */\n // \"moduleResolution\": \"node\", /* Specify how TypeScript looks up a file from a given module specifier. */\n // \"baseUrl\": \"./\", /* Specify the base directory to resolve non-relative module names. */\n \"paths\": {\n \"@ORGANIZATION/PROJECT-api/lib/*\": [\"./src/api/*\"],\n \"@ORGANIZATION/PROJECT-api\": [\"./src/api\"],\n \"@prisma/sdk\": [\"./src/prisma/client.ts\"],\n }, /* Specify a set of entries that re-map imports to additional lookup locations. */\n // \"rootDirs\": [], /* Allow multiple folders to be treated as one when resolving modules. */\n // \"typeRoots\": [], /* Specify multiple folders that act like './node_modules/@types'. */\n // \"types\": [], /* Specify type package names to be included without being referenced in a source file. */\n // \"allowUmdGlobalAccess\": true, /* Allow accessing UMD globals from modules. */\n // \"moduleSuffixes\": [], /* List of file name suffixes to search when resolving a module. */\n // \"resolveJsonModule\": true, /* Enable importing .json files. */\n // \"noResolve\": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */\n\n /* JavaScript Support */\n // \"allowJs\": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */\n // \"checkJs\": true, /* Enable error reporting in type-checked JavaScript files. */\n // \"maxNodeModuleJsDepth\": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */\n\n /* Emit */\n // \"declaration\": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */\n // \"declarationMap\": true, /* Create sourcemaps for d.ts files. */\n // \"emitDeclarationOnly\": true, /* Only output d.ts files and not JavaScript files. */\n \"sourceMap\": true, /* Create source map files for emitted JavaScript files. */\n // \"outFile\": \"./\", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */\n \"outDir\": \"./lib\", /* Specify an output folder for all emitted files. */\n // \"removeComments\": true, /* Disable emitting comments. */\n // \"noEmit\": true, /* Disable emitting files from a compilation. */\n // \"importHelpers\": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */\n // \"importsNotUsedAsValues\": \"remove\", /* Specify emit/checking behavior for imports that are only used for types. */\n // \"downlevelIteration\": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */\n // \"sourceRoot\": \"\", /* Specify the root path for debuggers to find the reference source code. */\n // \"mapRoot\": \"\", /* Specify the location where debugger should locate map files instead of generated locations. */\n // \"inlineSourceMap\": true, /* Include sourcemap files inside the emitted JavaScript. */\n // \"inlineSources\": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */\n // \"emitBOM\": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */\n \"newLine\": \"lf\", /* Set the newline character for emitting files. */\n \"stripInternal\": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */\n // \"noEmitHelpers\": true, /* Disable generating custom helper functions like '__extends' in compiled output. */\n // \"noEmitOnError\": true, /* Disable emitting files if any type checking errors are reported. */\n // \"preserveConstEnums\": true, /* Disable erasing 'const enum' declarations in generated code. */\n // \"declarationDir\": \"./\", /* Specify the output directory for generated declaration files. */\n // \"preserveValueImports\": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */\n\n /* Interop Constraints */\n // \"isolatedModules\": true, /* Ensure that each file can be safely transpiled without relying on other imports. */\n // \"allowSyntheticDefaultImports\": true, /* Allow 'import x from y' when a module doesn't have a default export. */\n \"esModuleInterop\": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */\n // \"preserveSymlinks\": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */\n \"forceConsistentCasingInFileNames\": true, /* Ensure that casing is correct in imports. */\n\n /* Type Checking */\n \"strict\": true, /* Enable all strict type-checking options. */\n // \"noImplicitAny\": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */\n // \"strictNullChecks\": true, /* When type checking, take into account 'null' and 'undefined'. */\n // \"strictFunctionTypes\": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */\n // \"strictBindCallApply\": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */\n // \"strictPropertyInitialization\": true, /* Check for class properties that are declared but not set in the constructor. */\n // \"noImplicitThis\": true, /* Enable error reporting when 'this' is given the type 'any'. */\n // \"useUnknownInCatchVariables\": true, /* Default catch clause variables as 'unknown' instead of 'any'. */\n // \"alwaysStrict\": true, /* Ensure 'use strict' is always emitted. */\n \"noUnusedLocals\": false, /* Enable error reporting when local variables aren't read. */\n \"noUnusedParameters\": false, /* Raise an error when a function parameter isn't read. */\n // \"exactOptionalPropertyTypes\": true, /* Interpret optional property types as written, rather than adding 'undefined'. */\n \"noImplicitReturns\": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */\n \"noFallthroughCasesInSwitch\": true, /* Enable error reporting for fallthrough cases in switch statements. */\n // \"noUncheckedIndexedAccess\": true, /* Add 'undefined' to a type when accessed using an index. */\n // \"noImplicitOverride\": true, /* Ensure overriding members in derived classes are marked with an override modifier. */\n // \"noPropertyAccessFromIndexSignature\": true, /* Enforces using indexed accessors for keys declared using an indexed type. */\n // \"allowUnusedLabels\": true, /* Disable error reporting for unused labels. */\n // \"allowUnreachableCode\": true, /* Disable error reporting for unreachable code. */\n\n /* Completeness */\n // \"skipDefaultLibCheck\": true, /* Skip type checking .d.ts files that are included with TypeScript. */\n \"skipLibCheck\": true, /* Skip type checking all .d.ts files. */\n \"plugins\": [\n { \"transform\": \"typescript-transform-paths\" },\n { \"transform\": \"typia/lib/transform\" },\n { \n \"transform\": \"@nestia/core/lib/transform\",\n /**\n * Validate request body.\n * \n * - \"assert\": Use typia.assert() function\n * - \"is\": Use typia.is() function\n * - \"validate\": Use typia.validate() function\n * - \"assertEquals\": Use typia.assertEquals() function\n * - \"equals\": Use typia.equals() function\n * - \"validateEquals\": Use typia.validateEquals() function\n */\n \"validate\": \"validate\",\n /**\n * Validate JSON typed response body.\n * \n * - \"assert\": Use typia.assertStringify() function\n * - \"is\": Use typia.isStringify() function\n * - \"validate\": Use typia.validateStringify() function\n * - \"validate.log\": typia.validateStringify(), but do not throw and just log it\n * - \"stringify\": Use typia.stringify() function, but dangerous\n * - null: Just use JSON.stringify() function, without boosting\n */\n \"stringify\": \"assert\",\n },\n ]\n },\n \"include\": [\n \"src\"\n ],\n \"exclude\": [\n \"node_modules\",\n \"packages\",\n ]\n}\n", "test/autobe/compiler/IAutoBeRealizeTestOperation.ts": "//---------------------------------------------------\n// Cloned from @autobe/interface\n//---------------------------------------------------\nimport { tags } from \"typia\";\n\n/**\n * Detailed result interface representing the execution outcome of an individual\n * E2E test function during comprehensive backend implementation validation.\n *\n * This interface captures comprehensive information about a single test\n * operation execution, including identification details, execution results,\n * error conditions, and precise timing data. Each operation represents the\n * validation of a specific API endpoint or business scenario through Test\n * agent-generated E2E test functions executed against the fully implemented\n * backend application.\n *\n * The operation result provides granular visibility into test execution\n * outcomes, enabling detailed analysis of implementation quality, business\n * logic compliance, and performance characteristics at the individual test\n * level. This detailed tracking supports comprehensive validation reporting and\n * precise identification of implementation issues when they occur.\n *\n * @author Samchon\n */\nexport interface IAutoBeRealizeTestOperation {\n /**\n * Unique identifier name of the executed E2E test function.\n *\n * Specifies the function name that was executed during this test operation,\n * typically corresponding to the Test agent-generated test function\n * identifier. This name provides direct traceability between test results and\n * the specific business scenarios, API endpoints, or validation logic being\n * tested.\n *\n * The test function name serves as the primary identifier for correlating\n * execution results with the original test scenarios, enabling stakeholders\n * to understand which specific functionality was validated and whether the\n * implementation correctly fulfills the intended business requirements and\n * API contracts.\n */\n name: string;\n\n /**\n * File system path location of the executed test function source code.\n *\n * Specifies the relative or absolute path to the test file that contains the\n * executed function within the project structure. This location information\n * enables direct navigation to the test source code for detailed analysis,\n * debugging, result interpretation, or modification purposes.\n *\n * The file location provides essential context for understanding test\n * organization, enables developers to quickly locate and examine the specific\n * test implementation, and supports comprehensive test suite maintenance and\n * documentation activities.\n */\n location: string;\n\n /**\n * Return value or result data produced by the test function execution.\n *\n * Contains the actual value returned by the test function upon completion,\n * regardless of whether execution succeeded or failed. This could include API\n * response objects, validation results, test data, computed values, or any\n * other output that the test function produces as part of its business logic\n * validation or endpoint testing.\n *\n * For successful test executions, this value represents the expected result\n * that demonstrates correct implementation behavior. The return value\n * provides insight into the test execution flow and can be analyzed to verify\n * that API responses match expected formats, business logic produces correct\n * outcomes, and data transformations operate as intended.\n */\n value: unknown;\n\n /**\n * Error information captured during test function execution, if any occurred.\n *\n * Contains detailed error information when the test function encounters\n * exceptions, assertion failures, timeout conditions, or other error states\n * during execution. When null, it indicates that the test completed\n * successfully without encountering any error conditions. When present, the\n * error provides comprehensive diagnostic information for understanding\n * implementation issues or test failures.\n *\n * Error information is crucial for identifying implementation defects, API\n * contract violations, business logic errors, integration failures, or\n * performance issues that prevent the backend application from meeting its\n * requirements. The error details enable developers to pinpoint specific\n * problems and implement necessary corrections to achieve full compliance\n * with validation scenarios.\n */\n error: null | unknown;\n\n /**\n * Precise timestamp when this specific test operation began execution.\n *\n * Records the exact moment when this individual test function started\n * execution, providing the reference point for measuring test duration and\n * understanding the temporal sequence of test operations within the overall\n * validation process. This timestamp enables detailed performance analysis\n * and execution timeline reconstruction.\n *\n * The start timestamp is essential for identifying execution patterns,\n * analyzing test concurrency behavior, measuring individual test performance,\n * and understanding the temporal distribution of test execution within the\n * comprehensive validation suite.\n */\n started_at: string & tags.Format<\"date-time\">;\n\n /**\n * Precise timestamp when this specific test operation finished execution.\n *\n * Records the exact moment when this individual test function completed\n * execution, regardless of whether it succeeded or failed. Combined with the\n * start timestamp, this enables precise calculation of test execution\n * duration and provides completion reference for the overall test timeline.\n *\n * The completion timestamp is valuable for performance analysis of individual\n * test operations, identifying slow-performing test scenarios, understanding\n * test execution efficiency, and maintaining comprehensive audit trails of\n * the validation process. It supports optimization efforts and helps identify\n * potential bottlenecks in either the test implementation or the backend\n * application being validated.\n */\n completed_at: string & tags.Format<\"date-time\">;\n}\n", "test/autobe/compiler/IAutoBeRealizeTestConfig.ts": "//---------------------------------------------------\n// Cloned from @autobe/interface\n//---------------------------------------------------\n/**\n * Configuration interface defining the essential execution parameters required\n * for comprehensive E2E test suite validation against fully implemented backend\n * applications.\n *\n * This interface encapsulates the core execution settings and control\n * parameters necessary to orchestrate the final validation phase of the AutoBE\n * development pipeline. It provides streamlined configuration options that\n * control test execution behavior, database management, and performance\n * characteristics without requiring direct access to implementation files or\n * database schemas.\n *\n * The configuration assumes that the test execution environment has been\n * pre-configured with all necessary resources including generated\n * implementation files, database schemas, and package dependencies. This\n * interface focuses solely on runtime execution parameters that control how the\n * test suite operates within the prepared environment.\n *\n * This lightweight configuration approach enables flexible test execution\n * across different environments while maintaining clear separation between\n * resource provisioning and execution control, supporting both development and\n * production validation scenarios.\n *\n * @author Samchon\n */\nexport interface IAutoBeRealizeTestConfig {\n /**\n * Optional flag indicating whether to perform a complete database reset\n * before test execution.\n *\n * When true, specifies that the test execution should begin with a\n * comprehensive database reset, purging all existing data and reconstructing\n * tables to their initial schema-defined state. When false, test execution\n * proceeds with the current database state, which may contain residual data\n * from previous operations.\n *\n * Database reset is crucial for ensuring test isolation, reproducibility, and\n * deterministic results. Clean state testing eliminates interference from\n * residual data and guarantees that each test execution cycle operates under\n * identical baseline conditions, enabling accurate validation of backend\n * implementation behavior.\n *\n * @default true\n */\n reset?: boolean;\n\n /**\n * Optional specification of the maximum number of test functions to execute\n * concurrently during the test suite run.\n *\n * Defines the concurrent execution limit for E2E test functions to optimize\n * testing performance while maintaining system stability and resource\n * management. This value balances test execution speed with resource\n * consumption and helps prevent system overload during comprehensive\n * validation.\n *\n * Concurrent execution significantly reduces total testing time for large\n * test suites while validating the backend application's ability to handle\n * parallel requests correctly. The simultaneous limit ensures controlled load\n * conditions that provide meaningful performance insights while maintaining\n * test reliability and result accuracy.\n *\n * @default 1\n */\n simultaneous?: number;\n}\n", "test/autobe/compiler/IAutoBeRealizeTestResult.ts": "//---------------------------------------------------\n// Cloned from @autobe/interface\n//---------------------------------------------------\nimport { tags } from \"typia\";\n\nimport { IAutoBeRealizeTestOperation } from \"./IAutoBeRealizeTestOperation\";\n\n/**\n * Comprehensive result interface containing complete information about E2E test\n * suite execution for backend implementation validation.\n *\n * This interface represents the final consolidated results of executing the\n * entire Test agent-generated E2E test suite against the fully implemented\n * backend application. It encapsulates all aspects of the test execution\n * process including configuration parameters, individual operation results, and\n * timing information that collectively determine the validation outcome of the\n * generated backend implementation.\n *\n * The result structure provides stakeholders with comprehensive visibility into\n * the validation process, enabling detailed analysis of backend implementation\n * quality, compliance with requirements, and production readiness assessment\n * based on exhaustive functional testing.\n *\n * @author Samchon\n */\nexport interface IAutoBeRealizeTestResult {\n /**\n * Whether the test execution included a clean database reset before testing.\n *\n * Indicates if the test suite execution began with a complete database reset\n * to ensure clean testing conditions. When true, all existing data was purged\n * and database tables were reconstructed to their initial state before test\n * execution commenced, guaranteeing test isolation and reproducibility.\n *\n * Database reset is essential for ensuring that test results are\n * deterministic and accurately reflect the application's behavior under\n * controlled conditions, free from interference by residual data from\n * previous executions or development activities. This flag helps stakeholders\n * understand the testing conditions and trust the reliability of results.\n */\n reset: boolean;\n\n /**\n * Number of test functions that were executed simultaneously during the test\n * suite run.\n *\n * Specifies the concurrent execution limit that was applied during E2E test\n * function execution to optimize testing performance while maintaining system\n * stability. This value represents the balance between test execution speed\n * and resource consumption that was used to validate the backend\n * implementation's ability to handle concurrent requests.\n *\n * The simultaneous execution count provides insight into the load conditions\n * under which the backend application was validated, helping stakeholders\n * understand the concurrency testing coverage and the application's\n * performance characteristics under parallel request scenarios.\n */\n simultaneous: number;\n\n /**\n * Complete collection of individual test operation results with detailed\n * execution information.\n *\n * Contains the comprehensive array of {@link IAutoBeRealizeTestOperation}\n * results representing every E2E test function that was executed during the\n * validation process. Each operation result includes detailed information\n * about test execution outcomes, return values, error conditions, timing\n * data, and validation status for specific API endpoints or business\n * scenarios.\n *\n * This complete result set enables stakeholders to perform detailed analysis\n * of which functionality passed validation, which tests failed, what specific\n * issues were encountered, and how the backend implementation performs under\n * various test scenarios. The operation results serve as the authoritative\n * record of implementation quality and compliance with established\n * requirements.\n */\n operations: IAutoBeRealizeTestOperation[];\n\n /**\n * Timestamp when the comprehensive test suite execution was initiated.\n *\n * Records the exact moment when the E2E test suite execution began, marking\n * the start of the final validation phase in the AutoBE development pipeline.\n * This timestamp provides the reference point for understanding the complete\n * test execution timeline and measuring the duration of comprehensive backend\n * validation.\n *\n * The start timestamp is essential for performance analysis of the entire\n * validation process, enabling stakeholders to understand test execution\n * efficiency and identify potential optimization opportunities in the testing\n * infrastructure or backend implementation.\n */\n started_at: string & tags.Format<\"date-time\">;\n\n /**\n * Timestamp when the entire test suite execution was finalized.\n *\n * Records the exact moment when all planned E2E test operations finished\n * execution, marking the completion of the comprehensive validation process.\n * This timestamp represents the definitive end point of the AutoBE\n * development pipeline validation phase and provides the completion reference\n * for calculating total validation duration.\n *\n * The completion timestamp serves as the official validation completion\n * marker for stakeholders tracking project delivery milestones and provides\n * essential audit trail information for the complete development and\n * validation cycle. Combined with the start timestamp, it enables precise\n * measurement of the total time required for comprehensive backend\n * validation.\n */\n completed_at: string & tags.Format<\"date-time\">;\n}\n", "test/autobe/compiler/IAutoBeRealizeTestListener.ts": "//---------------------------------------------------\n// Cloned from @autobe/interface\n//---------------------------------------------------\nimport { IAutoBeRealizeTestOperation } from \"../compiler/IAutoBeRealizeTestOperation\";\n\n/**\n * Interface for Worker RPC event listener provided by client processes to\n * receive real-time E2E test execution events from worker processes.\n *\n * This interface defines the event handling contract for client processes that\n * delegate E2E test execution to dedicated worker processes. Client processes\n * provide an implementation of this interface to receive real-time\n * notifications about test operation progress, individual test completion\n * events, and database reset activities throughout the comprehensive test\n * execution pipeline.\n *\n * In TGrid's RPC paradigm, this listener acts as the Acceptor that client\n * processes expose to worker processes, enabling bidirectional communication\n * where workers can notify clients about test execution progress while\n * maintaining process isolation. The listener functions enable client processes\n * to provide interactive user experiences, display progress indicators, and\n * respond to the dynamic nature of test execution workflows.\n *\n * The listener interface focuses on critical test execution events that require\n * immediate client notification, ensuring optimal performance by transmitting\n * only essential progress information from worker to client processes without\n * overwhelming the communication channel.\n *\n * @author Samchon\n */\nexport interface IAutoBeRealizeTestListener {\n /**\n * Handles individual E2E test operation completion events from worker\n * processes.\n *\n * Called when each individual E2E test function completes execution in the\n * worker process, providing comprehensive details about the test operation\n * outcome including execution results, timing information, error conditions,\n * and progress tracking data. This enables client processes to display\n * real-time test execution progress and provide immediate feedback about test\n * validation outcomes.\n *\n * The operation events provide granular visibility into the test execution\n * pipeline, allowing client processes to:\n *\n * - Display individual test completion status and results\n * - Track overall test suite execution progress with completion counters\n * - Show specific test function names and execution locations for context\n * - Present detailed error information when test failures occur\n * - Calculate and display test execution performance metrics and timing data\n * - Provide real-time feedback about backend implementation quality assessment\n *\n * This event stream enables responsive user interfaces that keep stakeholders\n * informed about comprehensive validation progress while the actual test\n * execution occurs in isolated worker processes for optimal system\n * performance.\n *\n * @param event Complete test operation result containing execution details,\n * timing information, success/failure status, return values, error\n * conditions, and progress tracking data from the individual test function\n * execution in the worker process\n * @returns Promise that resolves when the client process has completed\n * handling the test operation event, enabling proper flow control and\n * ensuring client readiness for subsequent operation notifications\n */\n onOperation(event: IAutoBeRealizeTestOperation): Promise;\n\n /**\n * Handles database reset completion events from worker processes.\n *\n * Called when the worker process completes database reset operations before\n * test execution begins, indicating that the test environment has been\n * prepared with clean initial conditions. This event enables client processes\n * to display test preparation status and confirm that subsequent test\n * operations will execute under controlled, predictable database states.\n *\n * The reset event provides important timing information for client processes\n * to:\n *\n * - Display test preparation progress and database initialization status\n * - Confirm that clean testing conditions have been established\n * - Indicate the transition from setup phase to actual test execution\n * - Track the overall test execution timeline including preparation overhead\n * - Provide user feedback about test environment readiness and validation scope\n *\n * Database reset represents a critical preparation step that ensures test\n * isolation and reproducibility by eliminating interference from residual\n * data, making this event essential for client understanding of test\n * execution reliability and deterministic result conditions.\n *\n * @returns Promise that resolves when the client process has completed\n * handling the database reset notification, ensuring proper synchronization\n * between worker database preparation activities and client progress\n * display updates\n */\n onReset(): Promise;\n}\n", "test/autobe/compiler/IAutoBeRealizeTestService.ts": "//---------------------------------------------------\n// Cloned from @autobe/interface\n//---------------------------------------------------\nimport { IAutoBeRealizeTestResult } from \"../compiler/IAutoBeRealizeTestResult\";\nimport { IAutoBeRealizeTestConfig } from \"./IAutoBeRealizeTestConfig\";\n\n/**\n * Interface representing the Worker RPC service for executing comprehensive E2E\n * test validation against fully implemented backend applications.\n *\n * This interface defines the remote procedure call functions that can be\n * invoked on dedicated worker processes to execute complete E2E test suites\n * against generated backend implementations. The service enables comprehensive\n * validation of backend application quality and production readiness through\n * automated test execution workflows in isolated worker environments.\n *\n * In TGrid's RPC paradigm, this service acts as the Provider that worker\n * processes expose for test execution operations. The main process obtains a\n * `Driver` instance to delegate intensive test\n * execution tasks to worker processes, ensuring optimal performance and\n * resource isolation while maintaining system responsiveness during\n * comprehensive test validation workflows.\n *\n * The service orchestrates the complete test execution pipeline including\n * environment setup, database initialization, concurrent test function\n * execution, and comprehensive result collection to provide definitive\n * assessment of backend implementation quality and production deployment\n * readiness within dedicated worker process boundaries.\n *\n * @author Samchon\n */\nexport interface IAutoBeRealizeTestService {\n /**\n * Executes comprehensive E2E test suite against the fully implemented backend\n * application to validate production readiness.\n *\n * Performs complete test execution pipeline from environment setup through\n * test suite execution to result compilation, validating that the generated\n * backend implementation correctly fulfills all business requirements, API\n * contracts, and database integration specifications under realistic\n * operational conditions.\n *\n * The execution process encompasses:\n *\n * **Environment Preparation**:\n *\n * - Configuration of test environment with pre-loaded implementation files and\n * database schemas from the worker context\n * - Optional database reset for clean testing conditions that eliminate\n * interference from residual data\n * - Package dependency resolution and testing infrastructure setup\n * - Validation of all necessary resources for comprehensive test execution\n *\n * **Test Suite Execution**:\n *\n * - Systematic execution of Test agent-generated E2E test functions with\n * controlled concurrency for optimal performance\n * - Real-time monitoring of individual test operations with detailed progress\n * tracking and result collection\n * - Comprehensive error handling and result aggregation for both successful\n * validations and failure scenarios\n * - Integration testing of API endpoints, business logic, and database\n * operations under realistic load conditions\n *\n * **Quality Assessment**:\n *\n * - Validation of API contract compliance and response schema correctness\n * - Business logic verification through comprehensive scenario coverage\n * - Database integration testing with proper transaction handling\n * - Error condition testing to ensure robust error handling and recovery\n * - Performance validation under controlled concurrent request scenarios\n *\n * **Result Compilation**:\n *\n * - Detailed collection of individual test operation outcomes with timing and\n * performance data\n * - Comprehensive analysis of success rates, failure patterns, and\n * implementation quality metrics\n * - Production readiness assessment based on comprehensive validation results\n * - Detailed diagnostic information for any identified issues or failures\n *\n * The test execution provides the definitive assessment of whether the\n * generated backend application meets all specified requirements and is ready\n * for production deployment without manual debugging or modification. The\n * worker-based execution ensures optimal system performance by isolating\n * intensive test operations from the main process while maintaining\n * comprehensive validation accuracy.\n *\n * @param config Basic test execution configuration including database reset\n * and concurrency control settings. The worker process is expected to have\n * access to pre-loaded implementation files, database schemas, and package\n * configuration through its initialization context, requiring only\n * execution parameters for the test suite run.\n * @returns Promise resolving to comprehensive test execution results\n * including configuration details, individual operation outcomes, timing\n * information, success/failure analysis, and definitive production\n * readiness assessment from the isolated worker execution context\n */\n execute(config: IAutoBeRealizeTestConfig): Promise;\n}\n" };