# oracle-samples/clara-rules

Forward-chaining rules in Clojure(Script)

Repository: https://github.com/oracle-samples/clara-rules
Canonical: https://ross.abutalabs.com/products/clara-rules
Homepage: http://www.clara-rules.org
Language: Clojure
License: Apache-2.0
License Family: permissive
Last push: 2026-04-27T17:59:42+00:00

## Health v2 (maintenance only)
Score: 68/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 79, release rhythm 35, longevity 100
- inputs: {"age_days": 4786, "days_push": 128, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1233, forks 114 (observed 2026-08-28T04:04:04.637200+00:00)

## What it is
Clara Rules is a forward-chaining rules engine written in Clojure and ClojureScript, with Java interoperability for using JavaBeans as facts. It lets developers express domain knowledge as declarative rules with truth maintenance, accumulators, session durability, and inspection tooling.

## Use cases
- encode business rules as declarative logic in Clojure
- run a forward-chaining expert system on the JVM
- infer derived facts with automatic retraction via truth maintenance
- apply business policies like order approval or customer classification
- use a rules engine from Java code
- reason over collections of facts with accumulators

## When to choose
- you want rules as plain Clojure code instead of a limited DSL or enterprise rule tool
- you need truth maintenance so derived facts stay consistent
- you need a rules engine usable from both Clojure/ClojureScript and Java

## When to avoid
- your rules are simple conditionals better expressed as ordinary functions
- you need a business-user-facing rule authoring UI
- you are not working on the JVM or with Clojure

## Facets
- artifact type: library
- maturity: active
- function: interpreter, developer-tools
- domain: developer-tools
- platform: jvm, jvm-scripting, cross-platform
- tags: rules-engine, forward-chaining, expert-systems, clojurescript, truth-maintenance, business-rules, automation, algorithms

## Member repositories
- oracle-samples/clara-rules (main) score 68

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:04.637200+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T08:22:17.390844+00:00, confidence not recorded.
  - readme: https://github.com/oracle-samples/clara-rules (fetched 2026-08-28T04:04:04.637200+00:00, sha d4b8cf50e4a2)
  - homepage: http://www.clara-rules.org (fetched 2026-08-29T12:21:51.529789+00:00, sha 00d13f465dba)
  - site_page: http://www.clara-rules.org/docs/firststeps (fetched 2026-08-29T12:21:51.538762+00:00, sha 7036bee75150)
  - site_page: http://www.clara-rules.org/docs/java (fetched 2026-08-29T12:21:51.540661+00:00, sha 206046689a86)
  - site_page: http://www.clara-rules.org/docs/approach (fetched 2026-08-29T12:21:51.542317+00:00, sha 9db4db85fc77)
  - site_page: http://www.clara-rules.org/docs/truthmaint (fetched 2026-08-29T12:21:51.544215+00:00, sha 7cf5455ee7d5)
  - site_page: http://www.clara-rules.org/docs/durability (fetched 2026-08-29T12:21:51.545839+00:00, sha 76a43d6af266)
  - site_page: http://www.clara-rules.org/docs/inspection (fetched 2026-08-29T12:21:51.547652+00:00, sha f4afbd3b7098)
  - site_page: http://www.clara-rules.org/docs/accumulators (fetched 2026-08-29T12:21:51.549185+00:00, sha 3c5cfe10fa8c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
