{"id":26343593,"url":"https://github.com/CodyBontecou/typescript-llm4tdd-example","last_synced_at":"2025-03-16T05:02:46.882Z","repository":{"id":280542327,"uuid":"942352588","full_name":"CodyBontecou/typescript-llm4tdd-example","owner":"CodyBontecou","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-10T19:55:47.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T14:47:43.004Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodyBontecou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-04T01:23:36.000Z","updated_at":"2025-03-05T13:22:53.000Z","dependencies_parsed_at":"2025-03-04T02:28:28.254Z","dependency_job_id":"3d2ac632-44b1-48e6-99d5-dcae14e88e9e","html_url":"https://github.com/CodyBontecou/typescript-llm4tdd-example","commit_stats":null,"previous_names":["codybontecou/typescript-llm4tdd-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyBontecou%2Ftypescript-llm4tdd-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyBontecou%2Ftypescript-llm4tdd-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyBontecou%2Ftypescript-llm4tdd-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyBontecou%2Ftypescript-llm4tdd-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodyBontecou","download_url":"https://codeload.github.com/CodyBontecou/typescript-llm4tdd-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826790,"owners_count":20354220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-16T05:02:13.157Z","updated_at":"2025-03-16T05:02:46.877Z","avatar_url":"https://github.com/CodyBontecou.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# LLM4TDD: TypeScript Example\n\nThis project demonstrates Test-Driven Development (TDD) using Large Language Models (LLMs). The workflow consists of three main steps:\n\n1. **Generate Test Skeleton**: Create a basic structure for tests\n2. **Generate Complete Tests**: Flesh out the test skeleton with actual test cases\n3. **Generate Function Implementation**: Create a function that passes all the tests\n\n## Workflow\n\n```mermaid\ngraph TD\n    A[Test skeleton created] --\u003e B[Complete tests generated]\n    B --\u003e C[Function implementation generated]\n    C --\u003e D[Tests passing]\n```\n\n## Usage\n\nRun the complete TDD workflow:\n\n```bash\nnpm run tdd\n```\n\nThis will:\n1. Generate a test skeleton for a random function\n2. Generate a complete test file from the skeleton\n3. Generate a function implementation that passes all the tests\n\n## Individual Steps\n\nYou can also run each step individually:\n\n```bash\n# Generate a test skeleton\nnpx tsx generateTestSkeleton.ts\n\n# Generate a complete test from a skeleton\nnpx tsx generateTestFileFromSkeleton.ts\n\n# Generate a function implementation from a test file\nnpx tsx generateFunctionFromSpec.ts\n```\n\n## Utilities\n\nThe project includes several utility functions in the `utils` directory:\n\n- `generateTestSkeleton.ts`: Creates a test skeleton using OpenAI\n- `generateTestFromSkeleton.ts`: Generates complete tests from a skeleton\n- `generateFunctionFromSpec.ts`: Creates a function implementation that passes tests\n- `chat.ts`: Utility for interacting with OpenAI\n- `readFileContent.ts`: Utility for reading file content\n- `writeFileContent.ts`: Utility for writing file content\n- `runTests.ts`: Utility for running tests\n\n## Requirements\n\n- Node.js\n- npm\n- OpenAI API key (set as OPENAI_API_KEY environment variable)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCodyBontecou%2Ftypescript-llm4tdd-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCodyBontecou%2Ftypescript-llm4tdd-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCodyBontecou%2Ftypescript-llm4tdd-example/lists"}