You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DEVELOPMENT.md
+161Lines changed: 161 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,167 @@ type(scope): description
78
78
79
79
<!-- /devrail:commits -->
80
80
81
+
<!-- devrail:coding-practices -->
82
+
83
+
## Coding Practices
84
+
85
+
General software engineering standards that apply across all languages. For the full reference, see [`standards/coding-practices.md`](standards/coding-practices.md).
86
+
87
+
-**DRY, KISS, YAGNI** -- don't repeat yourself, keep it simple, build only what is needed now
88
+
-**Single responsibility** -- each function, class, or module does one thing
89
+
-**Fail fast** -- validate inputs at boundaries, return or raise immediately on invalid state
90
+
-**No swallowed exceptions** -- every error branch handles the error meaningfully or propagates it
91
+
-**Test behavior, not implementation** -- assert on outputs and side effects, follow the test pyramid (unit > integration > e2e)
92
+
-**New code must include tests** -- PRs that add logic without tests are incomplete
93
+
-**~50 line function guideline** -- split long functions into focused helpers
-**Performance** -- cache dependencies, parallelize independent stages, target < 10 min for PR checks
144
+
145
+
<!-- /devrail:ci-cd-pipelines -->
146
+
147
+
<!-- devrail:container-standards -->
148
+
149
+
## Container Standards
150
+
151
+
Container image build and runtime standards. For the full reference, see [`standards/container-standards.md`](standards/container-standards.md).
152
+
153
+
-**Pin base images** -- use specific tags or digests, never `latest`
154
+
-**Multi-stage builds** -- separate build dependencies from the runtime image
155
+
-**Layer ordering** -- least-changing layers first to maximize cache reuse
156
+
-**Non-root user** -- never run containers as root in production
157
+
-**No secrets in images** -- inject at runtime via env vars or mounted volumes
158
+
-**Image tagging** -- `vX.Y.Z` for releases, `sha-<short>` for CI builds, never overwrite release tags
159
+
-**Health checks** -- every service container exposes `/healthz` and `/readyz` endpoints
160
+
-**`.dockerignore` required** -- exclude `.git`, tests, docs, and build artifacts from the context
161
+
162
+
<!-- /devrail:container-standards -->
163
+
164
+
<!-- devrail:secrets-management -->
165
+
166
+
## Secrets Management
167
+
168
+
Standards for handling secrets and sensitive configuration. For the full reference, see [`standards/secrets-management.md`](standards/secrets-management.md).
169
+
170
+
-**Classify correctly** -- secrets vs sensitive config vs environment config vs application config
171
+
-**Never in source control** -- no API keys, passwords, or tokens in committed files (enforced by gitleaks)
172
+
-**Platform secrets** -- use GitHub/GitLab secrets or a dedicated manager (Vault, AWS SM, GCP SM)
173
+
-**`.env` gitignored, `.env.example` committed** -- document required variables with placeholders
174
+
-**`UPPER_SNAKE_CASE` naming** -- prefix by service or context to avoid collisions
175
+
-**Rotate on schedule** -- 90-day minimum for keys and credentials; immediately on exposure
176
+
-**Least privilege** -- no shared credentials, service accounts over personal, audit access
177
+
178
+
<!-- /devrail:secrets-management -->
179
+
180
+
<!-- devrail:api-cli-design -->
181
+
182
+
## API & CLI Design
183
+
184
+
Standards for designing APIs and CLIs. For the full reference, see [`standards/api-cli-design.md`](standards/api-cli-design.md).
185
+
186
+
-**Version APIs from day one** -- URL path (`/v1/`) preferred; never break clients without a version bump
187
+
-**JSON by default** -- consistent envelope, ISO 8601 timestamps, request IDs in every response
-**CLI conventions** -- `--help` on every command, exit codes 0/1/2, JSON output for machines
190
+
-**Backward compatibility** -- additive changes are safe; removals require deprecation + version bump
191
+
-**OpenAPI for APIs** -- spec is the source of truth, kept in sync with code
192
+
-**Pagination and rate limiting** -- standard patterns for collection endpoints
193
+
194
+
<!-- /devrail:api-cli-design -->
195
+
196
+
<!-- devrail:monitoring-observability -->
197
+
198
+
## Monitoring & Observability
199
+
200
+
Runtime monitoring and observability standards. For the full reference, see [`standards/monitoring-observability.md`](standards/monitoring-observability.md).
201
+
202
+
-**Health endpoints** -- `/healthz` (liveness) and `/readyz` (readiness) for every service
-**Encryption** -- TLS 1.2+ in transit, AES-256 at rest, keys managed via secrets manager
237
+
-**Compliance awareness** -- GDPR, CCPA, HIPAA, PCI DSS as applicable; breach notification process documented
238
+
-**Never log PII** -- redact or mask if logging is unavoidable; route to restricted log stream
239
+
240
+
<!-- /devrail:data-handling -->
241
+
81
242
## Site Architecture
82
243
83
244
This site is built with [Hugo](https://gohugo.io/) using the [Docsy](https://www.docsy.dev/) theme. Content is written in Markdown and rendered to static HTML.
0 commit comments