| description | Language-agnostic production standards for all code generation and reviews. |
|---|---|
| applyTo | ** |
Execute every task in this order:
- Audit — List all files, modules, and components required.
- Blueprint — Outline a concise architectural plan before writing code.
- Execution — Deliver complete, production-ready code. No snippets, placeholders (
TODO,pass,...), or stubs. - Autonomy — Resolve missing context or dependencies using the standard library or canonical practices.
- Run SwiftPM commands from the repository root unless a task explicitly requires otherwise.
- Use
--scratch-path .build/sharedfor SwiftPM commands that generate build state, includingswift build,swift test,swift run, and relevantswift packagecommands. - Do not run package-local SwiftPM commands that create package-specific
.builddirectories. Use the rootPackage.swiftwith the shared scratch path instead. - After SwiftPM-heavy tasks, run
scripts/report-spm-build-size.shto check generated build size and duplicated binary artifact extractions. - If generated SwiftPM files exceed the warning threshold or duplicate
artifacts/sentry-cocoadirectories appear, runscripts/clean-spm-builds.sh, then rerun builds/tests with--scratch-path .build/shared. - Never commit generated build artifacts.
- Self-Documenting: Names and structure must convey intent. No explanatory inline comments.
- Hermetic: Every file includes all imports and dependencies. Must compile/run as-is.
- Complete: All functions and methods contain final, working logic. No mocks or no-ops unless building a test suite.
- No Folded Code: Folding code is strictly forbidden.
- No Stubs: Never use stubs when migrating or converting code.
- In-Place Conversion: Always convert the existing implementation in place.
- No Wrappers: Do not use wrappers, shims, adapters, or compatibility layers during migration or conversion.
- Remove Legacy Files: Delete the old
.mmand.hfiles after migration or conversion. - Trace Blockers: Always trace and convert or migrate blockers during migration or conversion.
- Migrate Blockers: Always migrate blockers instead of bypassing, stubbing, or deferring them.
- Lifecycle: Explicitly manage memory, connections, and handles via the language's native paradigm (RAII, context managers, ownership, etc.).
- Immutable by Default: Use language-native constraints (
const,readonly,final). Mutable state must be minimal and scoped.
- Explicit: Handle all edge cases idiomatically (Result/Option types, caught exceptions, multiple returns).
- No Panics: Never use forceful unwraps or unhandled crash equivalents. Failures must propagate or degrade gracefully.
- Strict Typing: Use static/strict types throughout. Avoid
anyor dynamic types unless architecturally required. - Zero Warnings: Code must pass the strictest linter and compiler settings cleanly.
- Commit all completed work before considering a task done.
- Push completed commits to the current branch's upstream remote after committing.
- Prefix every message with a conventional tag:
fix:,feat:,chore:,docs:,refactor:,test:, orstyle:.