Coding Standards

April 19, 2026 · View on GitHub

Skills Integration

These standards are also available as a library skill in domain-kit:

plugins/domain-kit/skills/standards/references/
├── python.md
├── go.md
├── typescript.md
├── shell.md
├── yaml.md
├── json.md
├── rust.md
├── markdown.md
└── openai.md (+ related OpenAI references)

Skills like /bug-hunt and /complexity depend on the standards library for consistent language-specific guidance.


Standards Index

Language/FormatDocumentGatePre-commitAI-Friendly
Pythonpython-style-guide.mdCC ≤ 10ruff★★★★★
Shell/Bashshell-script-standards.mdshellcheckshellcheck★★★★★
Gogolang-style-guide.mdgolangci-lint, CC ≤ 10-★★★★★
Rustcargo clippy, CC ≤ 10-★★★★★
TypeScripttypescript-standards.mdtsc --stricteslint★★★★★
YAML/Helmyaml-helm-standards.mdyamllintyamllint★★★★★
Markdownmarkdown-style-guide.mdmarkdownlint-★★★★★
JSON/JSONLjson-jsonl-standards.mdjq/prettier-★★★★★
Documentation Tagstag-vocabulary.md--★★★★★

What Makes These Standards AI-Agent-Friendly

Every standard in this repository is optimized for AI agent execution:

FeatureImplementation
Tables over proseScannable, parallel parsing
Decision treesExecutable if/then logic
Common Errors tablesSymptom → Cause → Fix
Anti-Patterns (named)Recognizable error states
AI Agent GuidelinesALWAYS/NEVER rules
Explicit thresholdsNumbers, not "be careful"
Copy-paste examplesReady to use, not fragments

Complexity Requirements

All functions MUST meet complexity thresholds:

LanguageToolThresholdStyle Guide
Pythonradon/xenonCC ≤ 10Yes
GogocycloCC ≤ 10Yes
Rustcargo clippyClippy warnings = 0
ShellshellcheckPass allYes
TypeScripttsc --strictNo errorsYes
YAML/HelmyamllintPass allYes

Pre-commit Enforcement

Standards are enforced via pre-commit hooks where available.

Quick Start

# Install hooks (one-time)
pre-commit install

# Run manually
pre-commit run --all-files

# Or skip hooks (not recommended)
git commit --no-verify

Manual Validation Commands

LanguageCommand
Pythonruff check scripts/ && xenon scripts/ --max-absolute B
Gogolangci-lint run ./... && gocyclo -over 10 ./...
Rustcargo clippy --all-targets --all-features -- -D warnings && cargo test
Shellshellcheck scripts/*.sh
TypeScripttsc --noEmit && eslint . --ext .ts,.tsx
YAMLyamllint .
Markdownnpx markdownlint '**/*.md'
JSONjq empty config.json (validates syntax)

Standard Document Structure

Each standard follows a consistent format:

# Standard Name

## Quick Reference
[Table of key rules and values]

## [Topic Sections]
[Detailed guidance with examples]

## Common Errors
[Symptom | Cause | Fix table]

## Anti-Patterns
[Named patterns to avoid]

## AI Agent Guidelines
[ALWAYS/NEVER rules table]

## Summary
[Key takeaways list]

Common Configuration Files (Examples)

These are common config files you may choose to add to a project that adopts these standards. AgentOps does not require them, and this repository does not ship every file listed below.

FilePurpose
.pre-commit-config.yamlHook definitions
.yamllint.ymlYAML linting rules
.markdownlint.ymlMarkdown linting rules
.shellcheckrcShell linting rules
.prettierrcJSON/Markdown formatting
pyproject.tomlPython tool settings (ruff, pytest)
.golangci.ymlGo linting configuration
rustfmt.tomlRust formatting rules
clippy.tomlRust linting configuration
tsconfig.jsonTypeScript compiler settings
eslint.config.jsTypeScript/JS linting

Contributing

To update a standard:

  1. Edit the standard directly in docs/standards/
  2. Run validation to ensure format compliance

Adding a New Standard

  1. Follow the document structure template above
  2. Include: Quick Reference, Common Errors, Anti-Patterns, AI Guidelines
  3. Add to this README's index table
  4. Update related links in other standards

Created: 2024-12-30 Last Updated: 2026-02-09 Related: SKILL-TIERS.md