{"id":51824877,"url":"https://github.com/midspiral/lemmafit","last_synced_at":"2026-07-22T08:03:39.402Z","repository":{"id":344048386,"uuid":"1166135404","full_name":"midspiral/lemmafit","owner":"midspiral","description":"Make agents prove that their code is correct.","archived":false,"fork":false,"pushed_at":"2026-06-02T16:36:01.000Z","size":81,"stargazers_count":52,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-09T00:19:43.245Z","etag":null,"topics":["ai","claude-code","dafny","llm","reactjs","verification"],"latest_commit_sha":null,"homepage":"https://lemmafit.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/midspiral.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-24T23:04:04.000Z","updated_at":"2026-06-03T00:52:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/midspiral/lemmafit","commit_stats":null,"previous_names":["midspiral/lemmafit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/midspiral/lemmafit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midspiral%2Flemmafit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midspiral%2Flemmafit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midspiral%2Flemmafit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midspiral%2Flemmafit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/midspiral","download_url":"https://codeload.github.com/midspiral/lemmafit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midspiral%2Flemmafit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35753460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-22T02:00:06.236Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ai","claude-code","dafny","llm","reactjs","verification"],"created_at":"2026-07-22T08:03:38.858Z","updated_at":"2026-07-22T08:03:39.395Z","avatar_url":"https://github.com/midspiral.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lemmafit\n\nMake agents **prove** that their code is correct. \n\nRead our launch post: [Introducing lemmafit: A Verifier in the AI Loop](https://midspiral.com/blog/introducing-lemmafit-a-verifier-in-the-ai-loop/). \n\nLemmafit integrates [Dafny](https://dafny.org/) formal verification into your development workflow via [Claude Code](https://docs.anthropic.com/en/docs/claude-code). Business logic, state machines, and other logic are written in Dafny, mathematically verified, then auto-compiled to TypeScript for use in your React app.\n\n## Quick Start\n\n```bash\n# Install lemmafit globally\nnpm install -g lemmafit\n\n# Create a new project\nlemmafit init PROJECT_NAME\ncd PROJECT_NAME\n\n# Install deps (downloads Dafny automatically)\nnpm install\n\n# In one terminal, start the verification daemon\nnpm run daemon\n\n# In another terminal, start the Vite dev server\nnpm run dev\n\n# In a third terminal, open Claude Code\nclaude\n```\n\n## Use Cases / Considerations\n\n- lemmafit works with greenfield projects. You typically begin a project with `lemmafit init` though `lemmafit add` provides rudimentary support for existing codebases.\n\n- lemmafit compiles Dafny to Javascript/Typescript which then hooks into a runtime like a React app. In the future, we will support other languages.\n\n- lemmafit is optimized to work with Claude Code. In the future, lemmafit will be agent-agnostic. \n\n## How It Works\n\n1. Prompt Claude Code as you normally would. You may use a simple starting prompt or a structured prompting system. \n**Example: \"Create a pomodoro app I can use personally and locally.\"** \n2. The agent will write a `SPEC.yaml` and write verified logic in `lemmafit/dafny/Domain.dfy`\n3. The **daemon** watches `.dfy` files, runs `dafny verify`, and on success compiles to `src/dafny/Domain.cjs` + `src/dafny/app.ts`\n4. The agent will hook the generated TypeScript API into a React app — the logic is proven correct\n5. After proofs complete, run the `/guarantees` skill to activate claimcheck and generate a guarantees report\n\n## Project Structure\n\n```\nmy-app/\n├── SPEC.yaml                    # Your requirements\n├── lemmafit/\n│   ├── dafny/\n│   │   └── Domain.dfy           # Your verified Dafny logic\n│   │   └── Replay.dfy           # Generic Replay kernel\n│   ├── .vibe/\n│   │   ├── config.json           # Project config\n│   │   ├── modules.json          # Module registry (for multi-module projects)\n│   │   ├── status.json           # Verification status (generated)\n│   │   └── claims.json           # Proof obligations (generated)\n│   └── reports/\n│       └── guarantees.md         # Guarantee report (generated)\n├── src/\n│   ├── dafny/\n│   │   ├── Domain.cjs            # Compiled JS (generated)\n│   │   └── app.ts                # TypeScript API (generated - DO NOT EDIT)\n│   ├── App.tsx                   # Your React app\n│   └── main.tsx\n├── .claude/                      # Hooks \u0026 settings (managed by lemmafit)\n└── package.json\n```\n\n## CLI\n\n```bash\nlemmafit init [dir]                # Create project from template\nlemmafit add [Name]                # Add a verified module to an existing project\nlemmafit sync [dir]                # Re-sync system files (.claude/, hooks)\nlemmafit daemon [dir]              # Run verification daemon standalone\nlemmafit logs [dir]                # View daemon log\nlemmafit logs --clear [dir]        # Clear daemon log\n```\n\n## Updating\n\nSystem files sync automatically on install:\n\n```bash\nnpm update lemmafit\n# postinstall re-syncs .claude/settings.json, hooks, and instructions\n```\n\n## Requirements\n\n- Node.js 18+\n- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI\n- [claimcheck](https://github.com/metareflection/claimcheck) (`npm install -g claimcheck`) — needed for the `/guarantees` skill\n\nDafny and dafny2js are downloaded automatically during `npm install` to `~/.lemmafit/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidspiral%2Flemmafit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmidspiral%2Flemmafit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidspiral%2Flemmafit/lists"}