{"id":30415491,"url":"https://github.com/amuta/kumi","last_synced_at":"2025-11-11T18:25:01.087Z","repository":{"id":301460777,"uuid":"1009349530","full_name":"amuta/kumi","owner":"amuta","description":"A declarative logic and rules engine framework with static analysis for Ruby","archived":false,"fork":false,"pushed_at":"2025-09-07T06:58:09.000Z","size":2166,"stargazers_count":51,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-07T08:39:55.617Z","etag":null,"topics":["brms","business-rules-engine","declarative-language","dependency-graph","dsl","framework","rails","ruby","ruby-gem","rules-engine"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/amuta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2025-06-27T01:47:04.000Z","updated_at":"2025-09-05T04:27:29.000Z","dependencies_parsed_at":"2025-06-27T02:06:35.201Z","dependency_job_id":"241454f2-66aa-42e3-ad12-fb6163f1cb6e","html_url":"https://github.com/amuta/kumi","commit_stats":null,"previous_names":["amuta/trait-engine","amuta/kumi"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/amuta/kumi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amuta%2Fkumi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amuta%2Fkumi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amuta%2Fkumi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amuta%2Fkumi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amuta","download_url":"https://codeload.github.com/amuta/kumi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amuta%2Fkumi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274095422,"owners_count":25221433,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"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":["brms","business-rules-engine","declarative-language","dependency-graph","dsl","framework","rails","ruby","ruby-gem","rules-engine"],"created_at":"2025-08-22T04:02:23.206Z","updated_at":"2025-11-11T18:25:01.082Z","avatar_url":"https://github.com/amuta.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Kumi\n\n[![CI](https://github.com/amuta/kumi/workflows/CI/badge.svg)](https://github.com/amuta/kumi/actions)\n[![Gem Version](https://badge.fury.io/rb/kumi.svg)](https://badge.fury.io/rb/kumi)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n**[Try the interactive demo →](https://kumi-play-web.fly.dev/)**\n\n---\n\n## What is Kumi?\n\nKumi is a **declarative DSL for building calculation systems**.\n\nSchemas define:\n- Input shape (scalars, arrays, nested structures)\n- Declarations (computed values and boolean conditions)\n- Dependencies between declarations\n\nThe compiler:\n- Performs type checking\n- Detects unsatisfiable constraints\n- Determines evaluation order\n- Generates code for Ruby or JavaScript\n\n## Use Cases\n\nCalculation systems appear in: tax engines, pricing models, financial projections, compliance systems, insurance underwriting, shipping rate calculators.\n\n---\n\n**Status**: experimental. Public API may change. Typing and some static checks are still evolving.\n\n**Feedback**: have a use case or hit a rough edge? Open an issue or reach out (andremuta+kumi@gmail.com).\n\n---\n\n## Examples\n\n- **US Tax Calculator (2024)** — a single schema computes federal, state, and FICA taxes across multiple filing statuses. [Open in the demo](https://kumi-play-web.fly.dev/?example=us-federal-tax-2024).\n- **Monte Carlo Portfolio** — demonstrates probabilistic simulations and table visualizations. [Open in the demo](https://kumi-play-web.fly.dev/?example=monte-carlo-simulation).\n- **Conway's Game of Life** — showcases array operations powering a grid-based simulation. [Open in the demo](https://kumi-play-web.fly.dev/?example=game-of-life).\n\n---\n\n## Install\n\n```bash\ngem install kumi\n```\n\nRequires Ruby 3.1+. Runtime dependencies: `mutex_m` and `zeitwerk` (bundled via Rubygems).\n\n## Quick Start\n\n```ruby\nrequire 'kumi'\n\nmodule Double\n  extend Kumi::Schema\n\n  schema do\n    input { integer :x }\n    value :doubled, input.x * 2\n  end\nend\n\n# Execute in Ruby\nresult = Double.from(x: 5)\nresult[:doubled]  # =\u003e 10\n\n# or just call the method directly\nDouble._doubled(x: 5) # =\u003e 10\n\n# Export to JavaScript (same logic)\nDouble.write_source(\"output.mjs\", platform: :javascript)\n# ./output.mjs\n# export function _doubled(input) {\n#   let t1 = input[\"x\"];\n#   let t3 = t1 * 2;\n#   return t3;\n# }\n```\n\nYou can also override the compilation strategy without touching code by setting\n`KUMI_COMPILATION_MODE` to `jit` or `aot` (e.g. `export KUMI_COMPILATION_MODE=aot`).\n\nTry the [interactive demo](https://kumi-play-web.fly.dev/) (no setup required).\n\n---\n\n## Documentation\n\n- **[Syntax Reference](docs/SYNTAX.md)** - DSL syntax, types, operators, functions, and schema imports\n- **[Functions Reference](docs/FUNCTIONS.md)** - Auto-generated docs for all functions and kernels\n- **[functions-reference.json](docs/functions-reference.json)** - Machine-readable format for IDEs (VSCode, Monaco, etc.)\n- **[Development Guide](docs/DEVELOPMENT.md)** - Testing, debugging, and contributing\n\nTo regenerate function docs: `bin/kumi-doc-gen`\n\n---\n\n## License\n\nMIT License. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famuta%2Fkumi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famuta%2Fkumi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famuta%2Fkumi/lists"}