sova
AGENTS.md2 starsChanged 3 months agoApache-2.0View on GitHub
This file provides cross-cutting guidance for any AI agent (Claude Code, Cursor, CodeRabbit, etc.) working in this repository. SOVA (Software Orchestration Via Agents) is a standalone application that any software project can install to gain autonomous AI-assisted development capabilities. It takes issues from your tracker, develops solutions using TDD, self-reviews, creates PRs, monitors CI, addresses review feedback, and learns from mistakes. The system is written in Python (CLI, roles, scheduler, dashboard).
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository18 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- dashboard-designSkill
- database-patternsSkill
- source-command-extract-knowledgeSkill
- source-command-rearrange-commitsSkill
- testing-patternsSkill
- visual-auditSkill
- dashboard-designSkill
- database-patternsSkill
- design-tasteSkill
- issue-templateSkill
- testing-patternsSkill
- visual-auditSkill
- design-systemSkill
- issue-templateSkill
- testing-patternsSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
33 rules. About 0 are common, 15 are distinctive, and 18 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
18
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 97
GitHub account: use the github_user configured in sova.toml (verify with gh auth status)
- Very specific: line 103
Create feature branch: feat/<name>, fix/<name>, or refactor/<name>
- Very specific: line 106
After merge: run /after-merge
- Very specific: line 112
Quoting: always double-quote variables ("$var", "${arr[@]}")
- Very specific: line 113
Functions: use snake_case, declare local variables
- Very specific: line 115
ShellCheck: all bash scripts must pass shellcheck with no warnings
- Very specific: line 116
No bashisms in shebangs: use #!/usr/bin/env bash
- Distinctive: line 121
No emojis: not in code or documentation
- Very specific: line 125
Falsy-default trap: never use x or default when x can be a legitimate falsy non-None value (0, "", [], False).
- Very specific: line 130
Headings: use ATX style (#, ##, ###)
- Distinctive: line 131
No emojis: not in documentation
- Very specific: line 132
Code blocks: always specify language (`
bash,`python, etc.) - Very specific: line 138
Bash script contract: every script under invariants/ and .github/scripts/ must handle --help gracefully and stay executable (CI enforces …
- Distinctive: line 148
Keep docs concise: document what exists, not plans
- Very specific: line 165
Always assign PRs to the user configured as github_user in sova.toml
- Distinctive: line 167
Never include "Generated with Claude Code" or similar AI branding in PR descriptions
- Very specific: line 173
Run shellcheck on changed bash scripts before committing
- Distinctive: line 174
Run tests and linters before creating PRs
- Distinctive: line 176
Read any file in the repo to understand context
- Distinctive: line 177
Create feature branches from main
- Distinctive: line 182
Add, remove, or upgrade dependencies
- Distinctive: line 183
Delete files or branches
- Distinctive: line 186
Run commands that affect external services (GitHub API writes, notifications)
- Distinctive: line 189
Add AI co-author lines or AI branding in commits/PRs
- Very specific: line 191
Commit secrets (.env, credentials, API keys)
- Very specific: line 192
Commit generated files (.DS_Store, __pycache__/, *.pyc, dashboard/.venv/)
- Distinctive: line 193
Use fix-on-fix commits -- squash fixes into the commit they fix
- Distinctive: line 194
Create separate doc commits for changes in the same PR
- Distinctive: line 195
Use emojis in code, documentation, or commit messages
- Distinctive: line 204
Before any push: ask the user for explicit approval
- Very specific: line 205
After any merge: run /after-merge (pull main, delete branches, update memory)
- Very specific: line 206
Before creating PR: run /review (lint, test, review changes)
- Very specific: line 207
Commit policy: no fix-on-fix, no separate doc commits for changes in the same PR.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI Agent Guidance for SOVA
This file provides cross-cutting guidance for any AI agent (Claude Code, Cursor, CodeRabbit, etc.) working in this repository.
SOVA (Software Orchestration Via Agents) is a standalone application that any software project can install to gain autonomous AI-assisted development capabilities. It takes issues from your tracker, develops solutions using TDD, self-reviews, creates PRs, monitors CI, addresses review feedback, and learns from mistakes. The system is written in Python (CLI, roles, scheduler, dashboard).
Context Index
| File | Purpose |
CLAUDE.md | Claude Code-specific commands, run instructions, knowledge system |
AGENTS.md | Cross-cutting conventions for all AI tools (this file) |
README.md | Project overview, installation, usage |
docs/VISION.md | Product vision and roadmap |
.claude/rules/architecture.md | Project structure, key paths, design decisions |
docs/architecture-deep-dive.md | On-demand: full narrative entries indexed (not duplicated) in architecture.md's "Supporting Modules" and "Key Design Decisions" sections |
.claude/rules/bash-patterns.md | Shell scripting conventions and gotchas |
.claude/rules/workflow.md | Development workflow and task finding |
docs/model-selection-architecture.md | LLM model routing, provider abstraction, design details |
docs/model-selection-risk-assessment.md | Model selection risks, migration path, rollback strategy |
docs/model-selection-migration-guide.md | Config shape for openai/ollama/vertex provider types |
docs/security-guidelines.md | Credential handling, input sanitization, subprocess safety |
docs/performance-guidelines.md | Timeouts, caching, concurrency, async patterns |
docs/error-handling-guidelines.md | Exceptions, logging, retries, fallbacks, circuit breakers |
docs/api-contracts-guidelines.md | Dashboard API, adapter ABC, LLM output formats |
docs/database-guidelines.md | ORM models, session management, migrations |
docs/testing-guidelines.md | pytest patterns, fixtures, mocking, test isolation |
docs/integration-guidelines.md | GitHub/Jira/SonarCloud integration, handoff protocol |
docs/jira-configuration-guide.md | Jira Cloud setup, JQL filters, status mapping, troubleshooting |
Project Structure
sova/
sova/ # Python package (SOVA)
cli/ # Typer CLI (sova run, sova triage, etc.)
app.py # Main app, subcommand registration
commands/ # Command modules (run, triage, harden, project, pr, admin, briefing, memory, migrate, commands, server, mcp, supervisor)
core/ # Workflow engine, steps, state machine, context, output writer, DAG executor
roles/ # Agent roles (triage, researcher, developer, reviewer, custom, planner, dispatcher)
adapters/ # Task source plugins (github; jira, linear, manual planned)
llm/ # Claude CLI wrapper, cost tracking
git/ # Git operations (branch, pr, rebase), worktree management
ipc/ # Inter-process: handoff protocol, process control, notifications
agents/ # RuntimeAdapter ABC: where each coding-agent runtime (claude-code, codex) reads its commands/skills from on disk
knowledge/ # Memory CRUD, tier loading, personas, review patterns
scheduler/ # Watch loop, parallel executor, server daemon
dashboard/ # FastAPI web UI
app.py # App factory
routers/ # 33 API routers (auth, overview, runs, costs, briefing, control, feed, handoff, lifecycle, memory, models, logs, tasks, queue, quota, reliability, settings, setup, agents, work, roles, spec, prs, dependencies, dependency_health, resources, supervisor, oversight, fleet_manager, fleet_insights, telemetry, a2a, mcp)
services/ # 49 services (run, cost, memory, models, control, feed, handoff, lifecycle, queue, batch, reliability, work, work_item, work_state, work_verdict, task, log, settings, setup, agent_lifecycle, agent_output, agent_recovery, agent_handoff, agent_pool, agent_db, agent_status, agent_context, agent_progress, agent_validation, agent_approval, agent_finalize, agent_resource, output, role, spec, pr, pr_metrics, resource, llm_suggestion, output_stream, fleet, fleet_manager, supervisor, oversight, telemetry_push, merge_queue_monitor, mcp_service, awareness, dependency_health)
templates/ # Jinja2 HTML (Catppuccin dark + Tailwind)
static/ # JS + CSS + favicon + logo
a2a/ # A2A (Agent-to-Agent) protocol: agent card generation, task state mapping
mcp/ # MCP stdio server (provider-agnostic agent tools via Model Context Protocol)
dashboard/routers/mcp.py # MCP HTTP endpoint for agent self-inspection (read-only runtime queries)
dashboard/services/mcp_service.py # MCP token generation/validation and tool handlers
awareness/ # Awareness subsystem (AwarenessProvider ABC, AwarenessItem, ItemCategory, provider registry, BriefingService aggregation engine, rendering models, rendering/cli_renderer.py Rich terminal output)
oversight/ # Oversight agent: background daemon, operations persona (user-maintained LLM guidance)
supervisor/ # Supervisor-level services (TaskProgressionEngine, CodeRabbit quota, task dependency graph)
gates/ # Gate check functions (one per module): rate_limit, connectivity, memory_pressure, dependency, human_involvement, quota, ci_budget, slots, budget, already_running, repeated_failure, ownership, merge_conflict, file_conflict, circuit_breaker, review_completed
commands/ # Command + guideline distribution (catalog, templates, manifest, distribution)
config/ # Pydantic Settings + TOML config + project registry + request context
monitoring/ # Resource monitoring (psutil-based CPU, memory, I/O tracking)
db/ # SQLAlchemy ORM models + async session
utils/ # Logging, shell, formatting
commands/ # 28 standardized commands (markdown with category frontmatter)
.claude/commands/ # Rendered copy Claude Code loads (generated by `make commands-render`)
.claude-plugin/marketplace.json # Claude Code plugin marketplace manifest (direct-install source, points at plugins/sova)
plugins/sova/ # Standalone Claude Code plugin: subset of commands (develop, spec, review, pr, debug, test) adapted for any project without installing SOVA
.githooks/ # Git hooks (tracked, mirroring CI checks)
.github/scripts/ # CI gate scripts (bash, unit-tested from tests/)
invariants/ # Pre-push constraint check scripts (bash)
guidelines/ # Distributable guideline templates (installed to .claude/rules/)
skills/ # Distributable skill templates (installed to .claude/skills/)
personas/ # Tech-stack-specific guidance (markdown)
knowledge/
KNOWLEDGE.md # 4-tier knowledge management system
templates/ # Project scaffolding templates
deploy/ # systemd + launchd service files
tests/ # pytest suite (10400+ tests)
docs/
VISION.md # Product vision and roadmap
ARCHITECTURE.md # Architecture overview (points to .claude/rules/)
*-guidelines.md # Domain-specific guidelines (7 files)
design-system.md # Dashboard design system reference
handoff-protocol.md # Agent handoff protocol
naming-journey.md # How SOVA got its name
assets/
agent-icon.png # Notification iconProject Tracker
This project uses GitHub Issues with a project board.
- GitHub account: use the
github_userconfigured insova.toml(verify withgh auth status) - Issue templates:
.github/ISSUE_TEMPLATE/(bug.md, feature.md, task.md) - Labels:
type:(feature/task/infra/bug/epic),priority:(critical/high/medium/low),area:(agent/dashboard/commands/personas/invariants/knowledge/docs),agent:(triaged/researched/ready/in-progress/in-review/needs-spec/needs-research/human-only)
Ticket workflow
- Pick an open issue
- Create feature branch:
feat/<name>,fix/<name>, orrefactor/<name> - Develop using TDD approach (
/develop,/test) - PR links to issue via
Closes #<number> - After merge: run
/after-merge
Key Conventions
Code Patterns: Bash (invariants)
- set -euo pipefail at the top of every script
- Quoting: always double-quote variables (
"$var","${arr[@]}") - Functions: use
snake_case, declarelocalvariables - Exit codes: 0 = success, 1 = error, 2 = usage error
- ShellCheck: all bash scripts must pass
shellcheckwith no warnings - No bashisms in shebangs: use
#!/usr/bin/env bash
Code Patterns: Python (CLI, agent, dashboard)
- Type hints: required on all function signatures
- f-strings: preferred for string formatting
- No emojis: not in code or documentation
- No double dashes: never use
--as a separator in prose, comments, descriptions, PR bodies, review comments, or any text output. Use a colon, period, comma, or parentheses instead. Example:Fixed: updated type hintnotFixed -- updated type hint. This applies everywhere: code comments, commit messages, PR descriptions, review findings, issue bodies, command descriptions, and documentation. - Line length: 120 max
- Formatter: Ruff (lint + format) when available
- Falsy-default trap: never use
x or defaultwhenxcan be a legitimate falsy non-Nonevalue (0,"",[],False). It silently discards the real value. Usex if x is not None else defaultor an explicit membership/identity check instead. - Reading text files: always specify
encoding="utf-8"and catch(OSError, UnicodeDecodeError): barepath.read_text()uses the platform default encoding, andUnicodeDecodeErroris not a subclass ofOSError, so anexcept OSErrorguard alone still crashes on a non-UTF-8 file. This applies to any "read a file, returnNoneon failure" helper, and equally to any read inside a loop over many files where one bad file must not abort the whole batch. Confirmed three times:sova/core/steps/spec.py(PR #680),sova/dashboard/services/settings_service.py(PR #1070), andsova/commands/distribution.py:_reverse_diff_files()(issue #695, a per-file loop where the guardcontinues past the unreadable file instead of returningNone). By the third confirmation the pattern was extracted into a single shared helper,read_text_or_none()insova/utils/files.py, used bysova/commands/distribution.py(_diff_files,_reverse_diff_files,_update_files) andsova/dashboard/services/settings_service.py, rather than adding a fourth and fifth hand-rolled copy in the same PR that documented the convention (issue #695 review).
Code Patterns: Markdown (commands, personas, knowledge)
- Frontmatter: commands use YAML frontmatter (
name,description,user-invocable) - Headings: use ATX style (
#,##,###) - No emojis: not in documentation
- Code blocks: always specify language (
bash,python, etc.)
Testing
- All checks:
make check(lint + test, CI-equivalent) - Bash scripts:
make lint-bash(shellcheck oninvariants/+.github/scripts/) +make test-bash(--helpsmoke test on both) - Python:
make test-py(pytest suite intests/covering allsova/modules) - Bash script contract: every script under
invariants/and.github/scripts/must handle--helpgracefully and stay executable (CI enforces both) - Commands: validate markdown structure (frontmatter, sections)
Documentation
- Every code change must leave docs accurate -- verify before committing
README.md-- update when project structure, features, usage, or commands changeCLAUDE.md-- update when run commands, knowledge tiers, or workflow changeAGENTS.md-- update when conventions, testing, or tooling change.claude/rules/architecture.md-- update when components, config, or design decisions changedocs/VISION.md-- update when roadmap phases change- Keep docs concise: document what exists, not plans
- The
/reviewcommand checks doc freshness automatically -- stale docs score 4/10+
Commit Messages
Conventional commits format: type(scope): short description.
Types: feat, fix, refactor, test, docs, chore, ci.
Scopes: dashboard, commands, personas, invariants, knowledge, cli, docs, scheduler, ipc, adapters, roles, core, config, supervisor, mcp, monitoring, db, awareness, oversight.
The ci type is scopeless (repo-wide infrastructure); all other types require a scope.
Examples:
feat(adapters): add Linear task source adapterfix(dashboard): correct cost tracking calculationrefactor(cli): simplify argument parsingci: add invariants job to CI pipelinedocs(readme): update installation instructions
Pull Requests
- Always assign PRs to the user configured as
github_userinsova.toml - Link to issue via
Closes #<number>in PR body - Never include "Generated with Claude Code" or similar AI branding in PR descriptions
- Include a Test Plan section
Agent Autonomy Boundaries
Always do (no approval needed):
- Run
shellcheckon changed bash scripts before committing - Run tests and linters before creating PRs
- Fix lint/shellcheck warnings in code you wrote
- Read any file in the repo to understand context
- Create feature branches from main
Ask first (requires explicit user approval):
- Push to remote / create PRs
- Modify database schemas or migration files
- Add, remove, or upgrade dependencies
- Delete files or branches
- Modify CI/CD pipeline configuration
- Change project configuration files (
sova.toml,.claude/settings.json) - Run commands that affect external services (GitHub API writes, notifications)
Never do:
- Add AI co-author lines or AI branding in commits/PRs
- Force-push to main/master
- Commit secrets (
.env, credentials, API keys) - Commit generated files (
.DS_Store,__pycache__/,*.pyc,dashboard/.venv/) - Use fix-on-fix commits -- squash fixes into the commit they fix
- Create separate doc commits for changes in the same PR
- Use emojis in code, documentation, or commit messages
- Skip pre-commit hooks (
--no-verify)
Role Chaining and Circuit Breaker
Agents chain autonomously: Developer -> Reviewer -> Developer (address review) -> Reviewer (re-review). The address-review circuit breaker prevents infinite bot re-review loops (e.g., CodeRabbit repeatedly requesting changes). It counts completed address cycles for a PR: a developer run with an address_review StepExecution, or a command:address-pr run, so both the autonomous pipeline and the /address-pr command consume the same budget. When the count reaches pipeline.max_address_review_cycles (default 2, 0=unlimited), auto-execution is blocked and a manual-only handoff is written so the dashboard shows "Address Review (manual)" and "Integrate PR" buttons; the supervisor's own SPAWN_ADDRESS_PR/SPAWN_ADDRESS_REVIEW actions are blocked by the same gate. See .claude/rules/architecture.md for full details.
Development Workflow
- SSH: repo-level
core.sshCommandis configured for the personal key - Before any push: ask the user for explicit approval
- After any merge: run
/after-merge(pull main, delete branches, update memory) - Before creating PR: run
/review(lint, test, review changes) - Commit policy: no fix-on-fix, no separate doc commits for changes in the same PR. Use
/rearrange-commitsbefore pushing.
Agentic Workflow Commands
This repo has Claude Code commands in .claude/commands/:
Planning
/spec-- produce a structured spec document for an issue; approving it guides/develop
Core Development
/develop-- implement a feature or fix (TDD approach)/develop-full-- full workflow: TDD, lint, test, self-review, commit organization/test-- run linter and tests iteratively/review-- pre-push code review with scoring and auto-fix (>=3/10)/review-full-- full pre-push pipeline: simplify -> review -> rearrange-commits/debug-- systematic debugging workflow
Pull Requests
/pr-- create PR with standard template (supports AI feedback + incremental workflows)/rearrange-commits-- reorganize branch commits into clean steps
Shipping Pipeline
/integrate-pr-- full pipeline: rebase, CI, merge, cleanup, learn (one click)/approve-merge-- merge PR (squash), delete branch, post-merge cleanup/agent-resume-- smart router: assess PR state and decide next action
Post-Work
/after-merge-- post-merge cleanup/ingest-review-- extract review feedback into agent memory/extract-knowledge-- promote learnings across knowledge tiers
Project Management
/new-feature-- set up a new feature branch/standup-- daily context summary/find-task-- browse GitHub Issues backlog
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

