ClineBashGeneral AI
Docker Compose Architecture Rules for Cline
SEO-ready Cline rules for Docker Compose architecture with copy-paste instructions, testing guardrails, and production-safe patterns.
.clinerules
# Docker Compose Architecture Rules for Cline Place this in `.clinerules` so Cline follows these conventions consistently. ## Core standards - Keep all generated code production-ready and strongly typed where applicable. - Prefer small focused files and functions over large mixed-responsibility modules. - Match existing project conventions before introducing new patterns. - Include meaningful tests for business-critical behavior. - Never ship placeholder TODO logic in production paths. ## Architecture conventions - Use explicit naming for modules, services, and handlers. - Add boundary validation for external inputs and API payloads. - Keep side effects isolated and observable with logs/metrics. - Favor predictable dependency boundaries and clear ownership. - Document trade-offs for non-obvious implementation choices. ## Docker Compose guidance - Follow canonical Docker Compose project layout and idioms. - Optimize for readability first, then measure before optimization. - Keep configuration centralized and environment-safe. - Ensure lint/type/test checks pass before merging. - For bash, avoid hidden magic and implicit behavior. ## Testing checklist - Unit tests for pure logic and edge cases. - Integration tests for external dependencies. - Regression tests for bug fixes. - Deterministic test data and stable assertions. ## Security & reliability checklist - Validate and sanitize all user-controlled inputs. - Avoid leaking secrets in logs or error responses. - Fail safely with clear, actionable error messages. - Add retries/timeouts only where idempotency is guaranteed. ## AI generation behavior - Generate minimal diffs rather than full rewrites. - Explain risky changes before applying them.
How to use with Cline
Create a `.clinerules` file in your project root. Cline reads this file and applies the rules to all AI-assisted coding.
#cline#bash#docker-compose#architecture#ai-coding-rules
Related Rules
Python Cline Rules
ClinePython
Cline AI coding rules for Python: automated coding patterns and best practices for the Cline VS Code extension.
Code Style
python · clineCopy Ready
React Cline Rules
ClineReact
Cline rules for React: component patterns, performance, and modern React architecture.
Architecture
react · clineCopy Ready
Next.js Cline Rules
ClineNext.js
Cline rules for Next.js: full-stack patterns, deployment, and modern Next.js conventions.
Architecture
nextjs · clineCopy Ready
Docker Cline Rules
ClineDocker
Cline rules for Docker: container security, image optimization, and production container patterns.
Security
docker · clineCopy Ready