Bhawna Skills is designed to solve the problem that AI coding agents may forget or violate architectural decisions, project invariants, and tool choices in long-term projects, that is, architectural drift. It validates goals before implementation through repository-owned decisions and a pre-check mechanism.
Main capabilities include:
- Repository-owned constitution and invariant catalog: initialized via
bhawna init, which discovers objective facts and related catalog issues; confirmed decisions are stored in.bhawna/decisions.yaml, and only accepted invariants are copied to.bhawna/invariants.yamlfor enforcement. - InvariantGate check:
bhawna checkruns checks against confirmed invariants, scope rules, built-in safety policies, and recorded exceptions, with results classified as PASS, REVIEW, or BLOCKED. Unconfirmed catalog suggestions are not enforced. - Semantic evaluator: uses any OpenAI-compatible chat completion endpoint for semantic comparison; requires configuring
BHAWNA_MODEL_URLandBHAWNA_MODEL. - Configuration validation:
--config-onlyonly verifies that the guardrail files can be parsed; it does not claim that the goal is architecturally safe. - Agent/tool integration: the CLI can be run by any agent or human before implementation;
bhawna check;skills/invariant-gate/SKILL.mddescribes the same workflow for coding agents that load skills. - Output formats: supports JSON/SARIF output for CI and code scanning.
- Other features: decision catalog, relevance routing, guided/discovery-based onboarding, support for multiple independent evaluators, goal-to-invariant relevance selection to reduce prompts, ADR-aware pre-checks, agent skill packaging, drift regression suite, and project-specific policy plugins.
Usage:
- Initialize guardrails in the repository: run
bhawna init(or--guided/--quick), which creates.bhawna/and records candidates without silently overwriting accepted configuration. Use--answersto confirm, defer, reject, or mark as not applicable. - Create project invariants: edit the relevant files to describe the project's persistent rules (architecture, tooling, security, completion gates), and keep statements specific so goals can be judged.
- Configure the semantic evaluator: set an OpenAI-compatible endpoint.
- Check goals: run
bhawna check.
Installation: the current public path is installation from source. PyPI trusted publishing is prepared but not yet configured on pypi.org, so uvx --from bhawna-skills is unavailable until a one-time publisher is added. Once published to PyPI, the corresponding command can be used (note that uvx bhawna looks up a different distribution name).
Use cases: developers running coding agents on repositories maintained over the long term who want repository-owned decision memory and pre-implementation checks.
Limitations: semantic evaluation sends the goal, constitution, and invariant content to the configured model endpoint, which may contain proprietary information; review the provider's data processing terms first.--config-only only validates configuration validity and does not guarantee semantic safety. Unconfirmed catalog suggestions are not enforced.
The project uses the MIT license. The example project is located at examples/sample-project/,including the constitution, invariants, two goals, and runnable commands. CI runs the same commands as well as package build and post-install CLI smoke tests.