coding-standards
Installation
SKILL.md
Coding Standards (defaults)
The baseline engineering rules for the arc factory and the software the factory's workers produce. Evidence-backed (experiments E1–E7, job c2eafe37; Veracode 2025; TDAD arXiv 2603.17973; ETH arXiv 2504.09246).
These are defaults, not laws. A direct user instruction or a project's own CODING.md/AGENTS.md/CHOICES.md overrides anything here. When a project document conflicts with this skill, the project wins. When the user says otherwise in-task, the user wins. Apply these only where nothing more specific has spoken.
The full ruleset is in CODING.md — read it before routing a coding task to a language or setting up a repo's gates.
The one-screen version
- Route by blast-radius + lifetime, not just runtime. Default to strict TypeScript. Promote a module to Rust when it touches money/credentials/user-data, has ≥2 dependents, runs >30 min/day, or has run unattended in prod ≥2 weeks. Go is an explicit third production tier (typed + GC'd, less ceremony than Rust) when its stdlib/concurrency/single-binary pulls apply — but it is NOT free: its auto-fix loop is shallower than Rust's (detect-only
go vet, not auto-apply) and it resolves real-repo SWE-bench issues at ~half Rust's rate (31% vs 58%) even with iteration. Python is a deliberate ML/research/prototype tier only. - Strict-by-default, every tier. TS
strict:true+noUncheckedIndexedAccess+ validation at boundaries. Python is the loosest tier unless you enforceruff+mypy --strict+disallow_untyped_defs+ Pydantic-at-boundaries — otherwise its strictness is theater. - Run a deterministic auto-fix pass before spending model tokens. Rust
cargo fix(auto-applies, format+semantic) / TS tsservergetCodeFixesAtPosition/ruff --fix. Go is the exception:gofmtauto-applies butgo vetonly detects — Go semantic fixes go back to the LLM unless gopls/Go≥1.24 is present. Only invoke the LLM on errors with no machine-applicable fix. Cap auto-repair at 3 iterations. - Feed terse diagnostics, not raw JSON. Raw
rustc --error-format=jsonis 63× the tokens of the cheapest prose (measured). Use--error-format=short/tsc --pretty false/go build— or parse JSON and discard itsexplanationfield before feeding the worker. - TDD is mandatory. Best-evidenced guardrail in the whole review (70% regression cut). Test before impl; gate on presence + green.
- No Java/C# as a default (Veracode 72%/45% OWASP-vuln rate).
- Inspect existing state before writing code against it. Any code targeting a DB, an API, a config schema, or existing infra: read the live shape first —
.schema/PRAGMA table_infofor a table,--help/the route table for a CLI/API,ls/statfor a file the plan calls "missing." Design against what exists, never an assumed shape. A missing-file error (ENOENT) means create, not wire — do not project familiarity with infra you have not confirmed exists. Onesqlite3 db .schema(or one--help) up front is cheaper than a mid-build pivot: skipping it forced a full redesign of scan/gc scripts after discovering a 247k-row DB with a different schema already indexed (~25k tokens, 20260724), plus repeated FK/NOT-NULL/enum failures the live schema would have prevented.