{"id":47807565,"url":"https://github.com/welshwandering/doctrine","last_synced_at":"2026-04-03T17:50:22.314Z","repository":{"id":329155972,"uuid":"1111582919","full_name":"welshwandering/doctrine","owner":"welshwandering","description":"Doctrine 👩🏼‍💻 Tech Style Guide | Attempting to keep code, documentation and our approach to technical projects consistent. Useful for AI-assisted 🤖 development, just instruct Claude, Gemini and Codex to check they complied with Doctrine!","archived":false,"fork":false,"pushed_at":"2026-01-05T09:13:20.000Z","size":2534,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-25T14:57:11.512Z","etag":null,"topics":["ai-coding-assistant","best-practices","claude","code-quality","coding-standards","cursor-ai","developer-tools","docker","documentation","golang","linting","llm","prompt-engineering","python","rails","react","rust","style-guide","typescript"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/welshwandering.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2025-12-07T08:30:27.000Z","updated_at":"2026-02-03T18:11:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/welshwandering/doctrine","commit_stats":null,"previous_names":["agh/doctrine","welshwandering/doctrine"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/welshwandering/doctrine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welshwandering%2Fdoctrine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welshwandering%2Fdoctrine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welshwandering%2Fdoctrine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welshwandering%2Fdoctrine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/welshwandering","download_url":"https://codeload.github.com/welshwandering/doctrine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welshwandering%2Fdoctrine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31366843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:13:05.644Z","status":"ssl_error","status_checked_at":"2026-04-03T17:13:04.413Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai-coding-assistant","best-practices","claude","code-quality","coding-standards","cursor-ai","developer-tools","docker","documentation","golang","linting","llm","prompt-engineering","python","rails","react","rust","style-guide","typescript"],"created_at":"2026-04-03T17:50:21.566Z","updated_at":"2026-04-03T17:50:22.303Z","avatar_url":"https://github.com/welshwandering.png","language":"HTML","readme":"![Doctrine Style Guide](banner.svg)\n\n# Doctrine Style Guide\n\n**Version: 2.11.0** | [Changelog](CHANGELOG.md) | [AGENTS.md](AGENTS.md)\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\",\n\"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this\ndocument are to be interpreted as described in [RFC 2119](https://datatracker.ietf.org/doc/html/rfc2119).\n\nCanonical style guide for all projects. Vendored from\n[Google Style Guides](https://github.com/google/styleguide) with\nproject-specific tooling and conventions. Each tool was selected as the\nworld-class option for its ecosystem in 2025.\n\n**All projects MUST follow:**\n\n- [Semantic Versioning 2.0.0](https://semver.org/)\n- [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)\n- [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)\n\nSee [versioning guide](guides/process/versioning.md) for details.\n\n---\n\n## Language Guides\n\n| Language | Guide | Upstream |\n| -------- | ----- | -------- |\n| Python | [guides/languages/python.md](guides/languages/python.md) | [Google](reference/google/python.md) |\n| Ruby | [guides/languages/ruby.md](guides/languages/ruby.md) | Community |\n| Go | [guides/languages/go.md](guides/languages/go.md) | [Google](reference/google/go.md) |\n| Rust | [guides/languages/rust.md](guides/languages/rust.md) | Official |\n| TypeScript | [guides/languages/typescript.md](guides/languages/typescript.md) | [Google](reference/google/typescript.html) |\n| C# | [guides/languages/csharp.md](guides/languages/csharp.md) | [Google](reference/google/csharp.md) |\n| .NET | [guides/languages/dotnet.md](guides/languages/dotnet.md) | Microsoft |\n| SQL | [guides/languages/sql.md](guides/languages/sql.md) | Community |\n| Shell | [guides/languages/shell.md](guides/languages/shell.md) | [Google](reference/google/shell.md) |\n| CSS | [guides/languages/css.md](guides/languages/css.md) | [Google](reference/google/htmlcss.html) |\n\n## Framework Guides\n\n| Framework | Guide | Language |\n| --------- | ----- | -------- |\n| Axum | [guides/frameworks/axum.md](guides/frameworks/axum.md) | Rust |\n| Django | [guides/frameworks/django.md](guides/frameworks/django.md) | Python |\n| FastAPI | [guides/frameworks/fastapi.md](guides/frameworks/fastapi.md) | Python |\n| Flask | [guides/frameworks/flask.md](guides/frameworks/flask.md) | Python |\n| Gin | [guides/frameworks/gin.md](guides/frameworks/gin.md) | Go |\n| Hanami | [guides/frameworks/hanami.md](guides/frameworks/hanami.md) | Ruby |\n| Next.js | [guides/frameworks/nextjs.md](guides/frameworks/nextjs.md) | TypeScript |\n| Rails | [guides/frameworks/rails.md](guides/frameworks/rails.md) | Ruby |\n| React | [guides/frameworks/react.md](guides/frameworks/react.md) | TypeScript |\n| Sinatra | [guides/frameworks/sinatra.md](guides/frameworks/sinatra.md) | Ruby |\n| Strawberry | [guides/frameworks/strawberry.md](guides/frameworks/strawberry.md) | Python (GraphQL) |\n| Tailwind CSS | [guides/frameworks/tailwind.md](guides/frameworks/tailwind.md) | CSS |\n\n## AI-Assisted Development\n\n| Topic | Guide | Description |\n| ----- | ----- | ----------- |\n| Overview | [guides/ai/README.md](guides/ai/README.md) | When and how to use AI assistance |\n| **AI Workflows** | [guides/ai/ai-workflows.md](guides/ai/ai-workflows.md) | Hero Flow, TDD, Visual Iteration |\n| Claude | [guides/ai/claude.md](guides/ai/claude.md) | Anthropic Claude best practices |\n| **Claude Code** | [guides/ai/claude-code.md](guides/ai/claude-code.md) | CLI config: hooks, agents, commands |\n| **Code Agents** | [guides/ai/code-agents.md](guides/ai/code-agents.md) | 8 agents: review, perf, a11y, API |\n| **Security Agents** | [guides/ai/security-agents.md](guides/ai/security-agents.md) | 16 agents: threat modeling, compliance |\n| **System Agents** | [guides/ai/system-agents.md](guides/ai/system-agents.md) | 14 agents: Docker, Ansible, networking |\n| Local LLMs | [guides/ai/local-llms.md](guides/ai/local-llms.md) | Ollama, vLLM, Docker Model Runner |\n| AGENTS.md | [guides/ai/agents-md.md](guides/ai/agents-md.md) | Project instruction files |\n| Security | [guides/ai/security.md](guides/ai/security.md) | LLM security considerations |\n\n## API Design Guides\n\n| Protocol | Guide | Description |\n| -------- | ----- | ----------- |\n| GraphQL | [guides/api/graphql.md](guides/api/graphql.md) | Schema design, queries, mutations, security |\n| REST | [guides/api/rest.md](guides/api/rest.md) | Resources, HTTP methods, status codes, pagination |\n\n## Process Guides\n\n| Topic | Guide |\n| ----- | ----- |\n| Testing | [guides/process/testing.md](guides/process/testing.md) |\n| Versioning | [guides/process/versioning.md](guides/process/versioning.md) |\n| CI/CD | [guides/process/ci.md](guides/process/ci.md) |\n| GitHub Templates | [guides/process/github-templates.md](guides/process/github-templates.md) |\n\n## Design Guides\n\n| Topic | Guide | Description |\n| ----- | ----- | ----------- |\n| Overview | [guides/design/README.md](guides/design/README.md) | Design principles and process |\n| Design Systems | [guides/design/design-systems.md](guides/design/design-systems.md) | Tokens, typography, color, spacing |\n| Components | [guides/design/components.md](guides/design/components.md) | Reusable component patterns |\n| Accessibility | [guides/design/accessibility.md](guides/design/accessibility.md) | WCAG compliance and inclusive design |\n| Motion | [guides/design/motion.md](guides/design/motion.md) | Animation and interaction feedback |\n\n## Infrastructure Guides\n\n| Topic | Guide |\n| ----- | ----- |\n| Overview | [guides/infrastructure/README.md](guides/infrastructure/README.md) |\n| **Operating Systems** | |\n| Linux (Debian) | [guides/infrastructure/os/linux.md](guides/infrastructure/os/linux.md) |\n| **Services** | |\n| SSH | [guides/infrastructure/services/ssh.md](guides/infrastructure/services/ssh.md) |\n| NTP | [guides/infrastructure/services/ntp.md](guides/infrastructure/services/ntp.md) |\n| DNS | [guides/infrastructure/services/dns.md](guides/infrastructure/services/dns.md) |\n| Firewall (nftables) | [guides/infrastructure/services/nftables.md](guides/infrastructure/services/nftables.md) |\n| Logging | [guides/infrastructure/services/logging.md](guides/infrastructure/services/logging.md) |\n| **Infrastructure as Code** | |\n| Ansible | [guides/infrastructure/ansible.md](guides/infrastructure/ansible.md) |\n| Docker | [guides/infrastructure/docker.md](guides/infrastructure/docker.md) |\n\n## Documentation\n\n| Topic | Guide |\n| ----- | ----- |\n| Overview | [guides/docs/README.md](guides/docs/README.md) |\n| Markdown | [guides/docs/markdown.md](guides/docs/markdown.md) |\n| Specifications | [guides/docs/specifications.md](guides/docs/specifications.md) |\n\n---\n\n## What Each Language Guide Covers\n\nEvery language guide **MUST** include:\n\n| Category | Topics |\n| -------- | ------ |\n| **Code Quality** | Lint, Format, Type Check, Semantic Analysis, Dead Code |\n| **Testing** | Unit, Integration, E2E, Acceptance, Performance |\n| **Advanced Testing** | Thread Safety, Idempotence, Reliability, Compatibility |\n| **Specialized** | i18n/UTF-8, Data Integrity, A/B Testing, Feature Flags |\n| **Dependencies** | Package Manager, Lock Files, Vulnerability Scanning |\n\n---\n\n## Quick Reference: Tooling by Language\n\n| Language | Lint | Format | Type Check | Coverage | Fuzz |\n| -------- | ---- | ------ | ---------- | -------- | ---- |\n| Python | Ruff | Ruff | Mypy, Pyright | pytest-cov | Hypothesis |\n| Ruby | StandardRB | StandardRB | Sorbet | SimpleCov | - |\n| Go | golangci-lint | gofmt | built-in | go test -cover | native |\n| Rust | Clippy | rustfmt | built-in | cargo-tarpaulin | cargo-fuzz |\n| C# | Roslynator | dotnet format | built-in | coverlet | SharpFuzz |\n| TypeScript | Biome | Biome | built-in | c8 | - |\n| SQL | SQLFluff | SQLFluff | - | - | - |\n| Shell | shellcheck | shfmt | - | bashcov | - |\n| CSS | Stylelint | Prettier | - | - | - |\n\n---\n\n## Tool Selection Rationale\n\n### Python: Ruff\n\nRuff is a Python linter and formatter written in Rust, 10-100x faster than\nalternatives. It replaces Flake8, isort, Black, and many other tools with a\nsingle binary. Combined with uv for package management, this is the modern\nPython toolchain.\n\n### Ruby: StandardRB\n\nStandardRB provides zero-config linting built on RuboCop. It eliminates\nbikeshedding debates and provides sensible defaults. For teams needing custom\nrules, use RuboCop directly with StandardRB's config as a base.\n\n### Go: golangci-lint\n\ngolangci-lint is a meta-linter aggregating 120+ linters including Staticcheck,\ngosec, and govet. It is 5x faster than running linters separately and is the\nde facto standard used by Kubernetes, Prometheus, and Terraform.\n\n### Rust: Clippy + rustfmt\n\nClippy is the official Rust linter with 750+ lints. rustfmt is the official\nformatter. Both are included with the Rust toolchain. No alternatives come\nclose.\n\n### C#/.NET: Roslynator + dotnet format\n\nRoslynator provides 500+ analyzers and refactorings. dotnet format (built into\n.NET SDK 6+) handles formatting via EditorConfig. Add SonarAnalyzer.CSharp for\nsecurity analysis.\n\n### TypeScript: Biome\n\nBiome is 20x faster than ESLint+Prettier and combines linting and formatting.\nFor legacy projects or those needing extensive plugin ecosystems, ESLint\nremains viable.\n\n### SQL: SQLFluff\n\nSQLFluff is the most popular SQL linter, supporting PostgreSQL, MySQL, SQLite,\nand 20+ dialects. It parses SQL to catch syntax issues and auto-fixes most\nproblems.\n\n---\n\n## Configuration Files\n\nReady-to-copy configuration files:\n\n| Config | Path | Purpose |\n| ------ | ---- | ------- |\n| **Agents** | [agents/](agents/) | 53 agents across 6 families |\n| Ansible | [configs/ansible/](configs/ansible/) | Ansible configuration templates |\n| AGENTS.md | [configs/agents/AGENTS.md.template](configs/agents/AGENTS.md.template) | AI assistant context |\n| **Claude Code** | [configs/claude/](configs/claude/) | Hooks, settings, MCP config |\n| EditorConfig | [configs/editorconfig/.editorconfig](configs/editorconfig/.editorconfig) | Editor settings |\n| Pre-commit | [configs/pre-commit/.pre-commit-config.yaml](configs/pre-commit/.pre-commit-config.yaml) | Git hooks |\n| Prettier | [configs/prettier/.prettierrc](configs/prettier/.prettierrc) | Code formatting |\n| **Doctrine Sync** | [.github/workflows/sync-doctrine.yml](.github/workflows/sync-doctrine.yml) | Auto-sync configs to projects |\n\n---\n\n## Attribution\n\nGoogle style guides are licensed under CC-BY 3.0. Vendored copies in `reference/google/`.\n\nIndustry style guides vendored in `reference/` for comparison:\n\n- [Airbnb](reference/airbnb/) - JavaScript, React, CSS-in-JS, Ruby\n- [Uber](reference/uber/) - Go\n- [RuboCop](reference/rubocop/) - Ruby, Rails\n- [Shopify](reference/shopify/) - Ruby\n- [Holywell](reference/holywell/) - SQL\n- [Rust API Guidelines](reference/rust/) - Rust\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelshwandering%2Fdoctrine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwelshwandering%2Fdoctrine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelshwandering%2Fdoctrine/lists"}