{"id":42992006,"url":"https://github.com/w4ffl35/curlee","last_synced_at":"2026-02-18T02:07:14.187Z","repository":{"id":334961179,"uuid":"1142146595","full_name":"w4ffl35/curlee","owner":"w4ffl35","description":"curlee programming language","archived":false,"fork":false,"pushed_at":"2026-01-31T20:00:16.000Z","size":397,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-01T13:25:08.934Z","etag":null,"topics":["agentic-ai","agentic-programming","ai","ai-agent","ai-programming","automated-programming","automation","programming-language","python"],"latest_commit_sha":null,"homepage":"","language":"C++","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/w4ffl35.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-01-26T02:23:46.000Z","updated_at":"2026-01-31T20:00:23.000Z","dependencies_parsed_at":"2026-02-01T04:00:53.110Z","dependency_job_id":null,"html_url":"https://github.com/w4ffl35/curlee","commit_stats":null,"previous_names":["w4ffl35/curlee"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/w4ffl35/curlee","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w4ffl35%2Fcurlee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w4ffl35%2Fcurlee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w4ffl35%2Fcurlee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w4ffl35%2Fcurlee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/w4ffl35","download_url":"https://codeload.github.com/w4ffl35/curlee/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w4ffl35%2Fcurlee/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29092699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["agentic-ai","agentic-programming","ai","ai-agent","ai-programming","automated-programming","automation","programming-language","python"],"created_at":"2026-01-31T03:07:25.879Z","updated_at":"2026-02-18T02:07:14.181Z","avatar_url":"https://github.com/w4ffl35.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Curlee\n\n![status: production-readiness](https://img.shields.io/badge/status-production--readiness-blue)\n\nCurlee is an experimental **verification-first programming language** and C++23 compiler/runtime.\n\nCurlee is a safety harness for AI-generated (and human-written) code: it refuses to run a program unless it can prove your declared contracts within a small, decidable verification scope.\n\n---\n\n## Why build Curlee?\n\nModern LLMs can generate a lot of code quickly - but a common failure mode is \"almost correct\" logic that compiles, runs, and silently does the wrong thing.\n\nCurlee's goal is to be a **safety harness**:\n\n- You write *intent* as machine-checkable contracts (`requires` / `ensures`) and refinements (`where`).\n- The compiler uses an SMT solver (Z3) to prove obligations.\n- If an obligation can't be proven (or the contract is outside the supported logic), Curlee **fails the build**.\n\nThis shifts trust from \"I hope the generated code is safe\" to \"I have a proof (or the program doesn't run)\".\n\n---\n\n## What problem does it solve?\n\n### The core problem\n\nAI-generated code is often:\n\n- syntactically valid,\n- type-correct,\n- but logically wrong in edge cases.\n\nCurlee introduces a new default:\n\n\u003e **No proof, no run.**\n\n### The bigger picture: multi-agent sovereignty\n\nCurlee aims to support a world where agents exchange tasks safely.\n\n- An agent can send another agent a *bundle* (bytecode + metadata + declared capabilities).\n- The receiver re-verifies the bundle deterministically before executing.\n- Execution is capability-scoped (no ambient authority) and resource-bounded (fuel/gas).\n\n---\n\n## Key ideas (at a glance)\n\n| Theme | Python/JS baseline | Curlee target |\n| --- | --- | --- |\n| Correctness | Tests + review + runtime errors | Compile-time contract proofs |\n| Security | Ambient authority + sandboxing | Capabilities + proofs + fuel |\n| AI-generated code | \"Probably ok\" | \"Prove it or reject it\" |\n| Interop | Big ecosystems | \"Shield\" legacy ecosystems via explicit `unsafe` boundaries |\n\n---\n\n## Architecture\n\nCurlee is structured as a compiler toolchain.\n\n```mermaid\nflowchart LR\n  S[SourceFile] --\u003e L[Lexer]\n  L --\u003e P[Parser]\n  P --\u003e R[Resolver]\n  R --\u003e T[Type Checker]\n  T --\u003e V[Verifier Z3]\n  V --\u003e|only after verification succeeds| C[Bytecode Compiler]\n  C --\u003e M[Deterministic VM fuel bounded]\n```\n\n### Contracts and proof obligations\n\nExample (intended syntax):\n\n```curlee\nfn add(a: Int, b: Int) -\u003e Int\n  [ requires a \u003e 0;\n    requires b \u003e 0;\n    ensures result \u003e a \u0026\u0026 result \u003e b; ]\n{\n  return a + b;\n}\n```\n\nThe compiler checks obligations like:\n\n- At call sites: prove the callee's `requires` from the caller's facts.\n- At returns: prove the function's `ensures`.\n\nThe MVP logic fragment is intentionally small and decidable.\n\n---\n\n## Project status\n\nCurlee is in **production-readiness stabilization**.\n\nCurrent expectations:\n\n- The language and bytecode are not stable yet.\n- Diagnostics, CLI output, and tests are expected to evolve.\n- Verification is intentionally limited to a small fragment; out-of-scope contracts are rejected.\n- If Curlee cannot prove a contract, it will not run the program.\n\n### Production support policy (v1 target)\n\nThe production support matrix and exit-alpha criteria are tracked in the wiki:\n\n- https://github.com/w4ffl35/curlee/wiki/Release-Checklist-and-Versioning\n\nCanonical policy anchors:\n\n- `Production support matrix`\n- `Exit-alpha criteria`\n\n### MVP scope (current)\n\nCurlee currently supports two useful workflows:\n\n- **MVP-check**: `curlee check \u003cfile.curlee\u003e` runs lex -\u003e parse -\u003e resolve -\u003e type-check -\u003e verify (Z3). If a proof obligation can't be discharged (or is out of scope), Curlee fails with a diagnostic.\n- **MVP-run**: `curlee run \u003cfile.curlee\u003e` (or `curlee \u003cfile.curlee\u003e`) runs `check` first, then executes a small verified subset on the deterministic VM (fuel-bounded).\n\nThe runnable subset is intentionally small:\n\nThe supported fragment evolves quickly; the **wiki is the source of truth**:\n\n- Supported fragment + runnable subset: https://github.com/w4ffl35/curlee/wiki/Stability-and-Supported-Fragment\n- Syntax reference: https://github.com/w4ffl35/curlee/wiki/Language-Syntax\n- Modules/imports: https://github.com/w4ffl35/curlee/wiki/Modules-and-Imports\n- Execution model (fuel, capabilities, interop): https://github.com/w4ffl35/curlee/wiki/Running-Programs\n\nAt a high level:\n\n- `curlee check` supports imports (including aliasing and module-qualified calls) and function parameters, and verifies contracts within the MVP scope.\n- `curlee run` executes a conservative, deterministic subset on the VM after successful verification (see the wiki for the exact runnable subset).\n\n---\n\n## Docs\n\nUser-facing documentation lives in the GitHub wiki:\n\n- https://github.com/w4ffl35/curlee/wiki\n- Supported fragment + stability: https://github.com/w4ffl35/curlee/wiki/Stability-and-Supported-Fragment\n- C++23 code quality standards: https://github.com/w4ffl35/curlee/wiki/C%2B%2B23-Code-Quality-Standards\n\n## Datasets\n\n- `tests/correct_samples/` is the small, deterministic corpus of verified samples used by tests.\n- `training_data.txt` is a **generated export** for downstream RAG/training workflows and is intentionally **gitignored**.\n  - Regenerate via `python3 scripts/generate_correct_samples.py` (writes both `tests/correct_samples/` and `training_data.txt`).\n\n---\n\n## Build \u0026 run (Linux)\n\n### Dependencies (Ubuntu/Debian)\n\n```bash\nsudo apt-get update\nsudo apt-get install -y cmake ninja-build g++ libz3-dev pkg-config\n```\n\nBy default, Curlee uses the system Z3 if available. To force the vendored build:\n\n```bash\ncmake --preset linux-debug -DCURLEE_USE_SYSTEM_Z3=OFF\n```\n\n### Configure\n\n```bash\ncmake --preset linux-debug\n```\n\n### Build\n\n```bash\ncmake --build --preset linux-debug\n```\n\n### Run\n\n```bash\n./build/linux-debug/curlee --help\n./build/linux-debug/curlee check examples/mvp_run_int.curlee\n./build/linux-debug/curlee run examples/mvp_run_control_flow.curlee\n```\n\n### Smoke test\n\nFor a quick end-to-end confidence loop (build + basic CLI + proof fixtures + a small targeted test run):\n\n```bash\nbash scripts/smoke.sh\n```\n\nYou can also run both debug + release presets:\n\n```bash\nbash scripts/smoke.sh --both\n```\n\n### Coverage (unit tests)\n\nTo generate a coverage report from unit tests, Curlee provides a coverage preset + helper script.\n\nDependencies (Ubuntu/Debian):\n\n```bash\nsudo apt-get update\nsudo apt-get install -y gcovr\n```\n\nRun:\n\n```bash\nbash scripts/coverage.sh\n```\n\nThis will:\n\n- Configure/build/test with the `linux-debug-coverage` preset.\n- Generate an HTML report at `build/coverage/coverage.html`.\n- Fail the run if line coverage is below the threshold (default: 100%).\n\nNote: the gcovr report excludes `throw` and unreachable branches by default (so branch coverage isn't dominated by exception edges). You can opt back in with:\n\n```bash\nbash scripts/coverage.sh --include-throw-branches\nbash scripts/coverage.sh --include-unreachable-branches\n```\n\nAdjust threshold or disable failing:\n\n```bash\nbash scripts/coverage.sh --fail-under 95\nbash scripts/coverage.sh --no-fail\n```\n\n---\n\n## Quick start examples\n\n### 1) Small program that runs\n\nCreate `hello.curlee`:\n\n```curlee\nfn main() -\u003e Int {\n  return 1 + 2;\n}\n```\n\nThen:\n\n```bash\n./build/linux-debug/curlee check hello.curlee\n./build/linux-debug/curlee hello.curlee\n```\n\n### 2) Contracts that fail (expected)\n\nThese fixtures are in the repo and should produce a diagnostic:\n\n```bash\n./build/linux-debug/curlee check tests/fixtures/check_requires_fail.curlee\n./build/linux-debug/curlee check tests/fixtures/check_ensures_fail.curlee\n```\n\n`curlee run` is verification-gated, so this should fail with the same diagnostic:\n\n```bash\n./build/linux-debug/curlee run tests/fixtures/check_ensures_fail.curlee\n```\n\n---\n\n## License\n\nMIT. See LICENSE.\n\n---\n\n## Contributing / development rules\n\n- Curlee is verification-first: unsupported constructs must produce clear errors (no guessing).\n- Keep changes small and test-driven.\n- Prefer golden tests for diagnostics and verification failures.\n\n### GitHub CLI: `gh pr edit` workaround\n\nIn this repo, `gh pr edit` may fail due to a GraphQL error involving deprecated classic project cards.\n\nWorkaround: patch the PR body via the REST API using:\n\n```bash\nscripts/gh_pr_patch_body.sh \u003cpr-number\u003e \u003cbody-file\u003e\n```\n\nFor agent guidance, see [.github/copilot-instructions.md](.github/copilot-instructions.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw4ffl35%2Fcurlee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fw4ffl35%2Fcurlee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw4ffl35%2Fcurlee/lists"}