docs(agents): sync code standards from vault Reference notes#353
Merged
Conversation
Initial distillation of cross-project standards from vault Reference/code-standards-* notes into AGENTS.md. Fills gaps in existing sections without modifying repo-specific rules. Additions by section: - Logging: PII/credential ban, redaction pattern, catch-logs-or-rethrows, layer-appropriate messages, internal-vs-external error detail - Code style: error handling (per-op try/catch, explicit rejection), structure (extract callbacks, boolean mode split, block bodies, named params, scoped constants), comments (JSDoc on exports, durable rationale, extraction preserves placement), types (TS 5.5 filter inference, Boolean(x)), data-layer (no observability returns, prepared statements) - Test conventions: two-bar traps (wrong-item, coincidental-equality), never-decompose assertions, deterministic error messages, cleanup via onTestFinished, test-per-module, separate it() over callback it.each, error-path coverage, never mock time internals, production type rules - Operational docs: reader-walk test, multi-path coverage, structural self-references, sibling-doc coherence, factual-claims-match-code, mechanism language Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Sorry @aliasunder, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
PR Code Suggestions ✨No code suggestions found for the PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reference/code-standards-*notes into AGENTS.md's existing sections## Logging,## Code style,### Test conventions, and## Operational docs— 100 insertions, zero deletions of existing repo-specific rules<!-- distilled from vault ... on 2026-07-20 -->)What changed, by section
Logging (5 rules from
code-standards-logging-observability):PII/credential ban, redaction via destructuring, catch-logs-or-rethrows, layer-appropriate error messages, internal-vs-external error detail separation
Code style (14 rules from
code-standards-typescript):Boolean(x)over!!xTest conventions (8 rules from
code-standards-testing):Two new two-bar traps (wrong-item pass, coincidental-equality hazard), never-decompose assertions, deterministic error messages get exact assertions, cleanup via onTestFinished, test-per-module structure, separate
it()over callbackit.each, error-path coverage, never mock time internals, production type rules in testsOperational docs (6 rules from
code-standards-docs):Reader-walk persona test, multi-path doc coverage, structural self-references as claims, sibling-doc coherence, factual-claims-match-code, mechanism language earned
Promotion pass: no candidates — existing repo-specific rules are either already covered by the Reference notes or too project-specific (MCP conventions) to generalize.
Test plan
🤖 Generated with Claude Code