{"id":50712185,"url":"https://github.com/awaterma/phronesis","last_synced_at":"2026-06-09T16:04:22.033Z","repository":{"id":362830084,"uuid":"1239354424","full_name":"awaterma/phronesis","owner":"awaterma","description":"A RETE rules engine for durable enforcement of project conventions in LLM-assisted work.","archived":false,"fork":false,"pushed_at":"2026-06-06T05:38:17.000Z","size":1040,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-06T06:17:30.529Z","etag":null,"topics":["claude-code","code-quality","developer-tools","llm","mcp","rete","rules-engine"],"latest_commit_sha":null,"homepage":"https://awaterma.github.io/phronesis/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awaterma.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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-15T02:33:25.000Z","updated_at":"2026-06-06T05:38:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/awaterma/phronesis","commit_stats":null,"previous_names":["awaterma/phronesis"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/awaterma/phronesis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaterma%2Fphronesis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaterma%2Fphronesis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaterma%2Fphronesis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaterma%2Fphronesis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awaterma","download_url":"https://codeload.github.com/awaterma/phronesis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaterma%2Fphronesis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34114462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":["claude-code","code-quality","developer-tools","llm","mcp","rete","rules-engine"],"created_at":"2026-06-09T16:04:19.898Z","updated_at":"2026-06-09T16:04:22.024Z","avatar_url":"https://github.com/awaterma.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phronesis\n\n**Practical wisdom for LLM-assisted work.**\n\nPhronesis (φρόνησις) is a domain-neutral RETE rules engine designed to provide durable, deterministic governance for non-deterministic AI agents. It addresses the \"contextual drift\" that occurs in long-running LLM sessions, where project-specific guidance (like `CLAUDE.md`) slowly fades as the context window fills and auto-compaction triggers.\n\nRules in Phronesis live on disk, are evaluated by lightweight hooks at the moment of action, and fire the same in token nine hundred thousand as they do in token eight hundred.\n\n## The Premise\n\nAnthropic's Claude Code, Google's Gemini CLI, and other LLM environments share a common pattern: they load project-level guidance at session start. As the session continues, that window fills with code, output, and conversation. The directive you most need at hour three may have last been read carefully in token eight hundred.\n\n**Phronesis moves enforcement out of the conversation entirely.** Rules live in `.phronesis/rules.json`, are re-read by hooks at every tool call, and fire from outside the context window. They cannot be compressed away because they were never loaded into context to begin with.\n\n## The Workspace\n\n- **`phronesis`** ([`crates/phronesis`](crates/phronesis)) — The core library: a high-performance, domain-neutral RETE rules engine (Alpha/Beta networks, P-states, join-sharing) with Consequence/Actor/Provenance primitives.\n- **`phronesis-mcp`** ([`crates/phronesis-mcp`](crates/phronesis-mcp)) — An MCP server that hosts the engine behind Claude Code / Gemini CLI hooks. Builds the `phr-mcp` binary.\n\n## Documentation\n\nRendered on GitHub Pages: **[awaterma.github.io/phronesis](https://awaterma.github.io/phronesis/)**\n\n- [**The Explainer**](https://awaterma.github.io/phronesis/explainer.html) — A long-form technical essay on the engine, the RETE algorithm, and the design intent. ([source](docs/explainer.html))\n- [**The Catalogue**](https://awaterma.github.io/phronesis/catalogue.html) — A visual reference of starter rules (Rust, LLM behavior, security) with rationale and examples. ([source](docs/catalogue.html))\n- [**Command Reference**](crates/phronesis-mcp/CLAUDE.md) — The full CLI surface and hook wiring details.\n- [**Specs**](docs/specs/) — Architectural roadmaps and technical debt management plans.\n\n## Quick Start\n\n```sh\n# 1. Install the binary\ncargo install --path crates/phronesis-mcp\n\n# 2. Register as a global MCP server\nphr-mcp install\n\n# 3. Initialize Phronesis in your project\ncd /your/project \u0026\u0026 phr-mcp init --packs llm,rust\n```\n\n## Lineage\n\nThe engine is a modern Rust implementation of the RETE algorithm (Forgy, 1982). It was extracted from a high-performance game logic system and repurposed for LLM-agent governance. \n\nAristotle distinguished **Episteme** (theoretical knowledge) from **Phronesis** (practical wisdom). Phronesis is the deliberative virtue of knowing what to do *here*, *now*, in this particular case. This project aims to preserve that wisdom across the \"fading\" boundaries of modern AI interaction.\n\n## License\n\nMIT. See [`LICENSE`](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawaterma%2Fphronesis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawaterma%2Fphronesis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawaterma%2Fphronesis/lists"}