Releases: eviweb/ai-rules
Release list
ai-rules 0.4.0
ai-rules 0.4.0
Summary
This release significantly expands the capabilities of the CLI, brings full
XDG Base Directory compliance, adds native Gemini support, and extends the
shared rule set with five new rule files.
New commands
ai-rules remove: inverse ofinstall— unlinks symlinks managed by
ai-rules and restores the most recent backup (file or config patch).ai-rules verify: checks that flat files are in sync with current rules;
exits 1 if stale — designed for CI use to catch forgottenai-rules generate.ai-rules update(extended): now combinesinstall+generate+
legacy backup migration in one step — the canonical command aftergit pull.
New global CLI options
--verbose/-v, --quiet/-q, --debug, --no-color (respects NO_COLOR),
--no-log, --log-dir <path>.
File logging is now enabled by default:
$XDG_STATE_HOME/ai-rules/logs/ai-rules-YYYY-MM-DD.log
Gemini native imports
Gemini now uses native @./path imports instead of a generated flat file,
matching the Claude Code integration. The rules/ directory is symlinked into
~/.gemini/ at install time.
Codex config patch
The Codex installer now patches ~/.codex/config.toml in-place to set
project_doc_max_bytes = 131072, with automatic backup and restore on remove.
No repo-tracked config.toml is required.
XDG Base Directory compliance
All files written by ai-rules now follow XDG:
- Backups:
$XDG_STATE_HOME/ai-rules/backups/<agent>/ - Logs:
$XDG_STATE_HOME/ai-rules/logs/
Migration: users upgrading from 0.3.x should run ai-rules update once —
it will automatically move legacy backups from agent install dirs to the XDG
state directory.
New rule files (5)
rules/quality.md: 11 project quality dimensions with definitions, implications, and red flagsrules/testing.md: test pyramid, AAA pattern, naming conventions, coverage floor, per-language guidancerules/api.md: REST API conventions — URL structure, HTTP methods, status codes, pagination, auth, rate limitingrules/error-handling.md: exit code table, error message format, per-language patternsrules/logging.md: application-level logging — levels, structured JSON, XDG log path, aggregation
Rule updates
rules/compatibility.md: XDG section clarified — scope condition, test isolation rule, Python examplerules/docs.md: "Keep docs in sync with the code" — docs must be updated in the same commit as the coderules/review.md:TODO.mdadded to self-review checklistrules/naming.md: Python, JavaScript/TypeScript, Go conventions addedrules/commits.md: prefer detailed commit messagesrules/cli.md: shell completion required for every CLI tool
CI improvements
ai-rules verifystep added to test job- Job timeouts enforced (lint: 5 min, test: 15 min)
- uv dependency cache keyed on
uv.lock - Coverage threshold: 80% enforced via
--cov-fail-under=80
Open source documentation
CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, SUPPORT.md,
AUTHORS.md, GitHub issue templates, pull request template.
Breaking changes
None. Installation is backward-compatible. Backup paths have changed (XDG),
but ai-rules update handles migration automatically.
Stats
104 tests · 95% coverage · Python 3.11 and 3.12
0.3.1
Added
.github/workflows/ci.yml: CI pipeline with lint (shellcheck + ruff) and
test (pytest on Python 3.11 and 3.12) jobs, triggered on push and PRruff>=0.4.0added to dev dependencies- CI badge added to
README.md
Fixed
- CI workflow: replace
uv pip install --systemwithuv sync+uv run
to comply with PEP 668 (externally managed Python on Debian/Ubuntu runners) - Unused imports removed in
tests/test_agent.py(ruff F401) rules/git.md: documentgit branch -Drequirement after GitHub squash/rebase mergeREADME.md: fix dev installation command (uv pip install→uv sync --extra dev)
0.3.0
Added
- Python CLI (
ai-rules) withinstall,update,status, andlistcommands src/ai_rules/package:agent.py,config.py,installer.py,cli.pypyproject.toml: hatchling build backend, typer, pytest dev dependenciesbin/ai-rules: development entry point (no installation required)agents.toml: agent registry with link declarations (Claude Code)agents/claude/CLAUDE.md: Claude Code entry point (moved from repo root)- 20 tests covering agent loading, repo root resolution, and install logic
tests/run-tests.sh: test runner wrapper- Shell completion support via
ai-rules --install-completion(bash/zsh/fish)
Changed
- Repository renamed from
claude-configtoai-rules CLAUDE.mdmoved toagents/claude/CLAUDE.mdREADME.mdrewritten to reflect new scope and CLI usage.gitignoreextended with Python artifact patterns
Removed
install.shreplaced by theai-rules installCLI command
0.2.0
Added
rules/principles.md: general coding principles (analyze before coding,
propose before implementing, propose options before deciding, clarify before
starting, prefer minimal diffs, no refactoring without request, no speculative
additions, no dead code, confirm before irreversible actions, explicit naming)scripts/extract-changelog.sh: extract release notes for a given version
from CHANGELOG.md — robust against semver metadata and end-of-file edge casesTODO.md: deferred items tracker (naming conventions, CI advanced topics,
logging, open source documentation)settings.jsonversioned in the repository with global Claude Code permissionsinstall.shnow deploys a symlink forsettings.jsoninto~/.claude/
Changed
rules/git.md: full branch workflow (permanent and short-lived branches,
rebase strategy, squash merge, workflows by case, merge conflict guidelines)rules/cli.md: add structured invocation format (namespace/command/subcommand)rules/commits.md: clarify commit message must cover all modified filesrules/security.md: add.env.examplepatternrules/review.md: restructure as full review guidelines with self-review
checklist and code review sections (solo vs team projects)rules/release.md: detail platform release workflow for GitHub and Forgejo,
replace inline sed withscripts/extract-changelog.shCLAUDE.md: addrules/principles.mdreference under new section
Fixed
- README structure now lists all 20 rule files including
principles.md