sandcastle: populate CODING_STANDARDS.md (Rust, evie-specific) #16

Merged
weiwen merged 2 commits from sandcastle/issue-12 into main 2026-07-05 06:41:07 +08:00
Owner

Replaces the template boilerplate in .sandcastle/CODING_STANDARDS.md with substantive guidance for the evie codebase:

  • Pre-review gate — run just check before hand-review; reject anything a tool already catches
  • Error handlinganyhow::Result + .context() at app call sites; thiserror enums only when callers match on variants; SessionError::Internal(#[from] anyhow::Error) escape hatch
  • Domain language — use CONTEXT.md terms, avoid listed synonyms
  • Config changes are cross-cutting — struct + README + CONTEXT in one commit
  • Module placement — map each concern to its file per CONTEXT.md architecture
  • Testing — pure sync logic must have unit tests; extract pure cores from async/I/O glue (precedent: 2bacb57); async orchestration is exempt
  • Footgun — no SessionManager locks held across .await

Also fixes grammar and normalizes "I/O" spelling throughout.

Closes #12

Replaces the template boilerplate in `.sandcastle/CODING_STANDARDS.md` with substantive guidance for the evie codebase: - **Pre-review gate** — run `just check` before hand-review; reject anything a tool already catches - **Error handling** — `anyhow::Result` + `.context()` at app call sites; `thiserror` enums only when callers match on variants; `SessionError::Internal(#[from] anyhow::Error)` escape hatch - **Domain language** — use `CONTEXT.md` terms, avoid listed synonyms - **Config changes are cross-cutting** — struct + README + CONTEXT in one commit - **Module placement** — map each concern to its file per `CONTEXT.md` architecture - **Testing** — pure sync logic must have unit tests; extract pure cores from async/I/O glue (precedent: 2bacb57); async orchestration is exempt - **Footgun** — no `SessionManager` locks held across `.await` Also fixes grammar and normalizes "I/O" spelling throughout. Closes #12
Task: rewrite .sandcastle/CODING_STANDARDS.md with 7 evie/Rust-specific
sections as specified in issue #12.

Key decisions:
- Deleted JS/TS template stubs (camelCase, named exports) entirely
- Preamble references `nix develop .#ci -c just check` as the pre-review gate
- Error handling section codifies anyhow vs thiserror boundary (matching
  SessionError/ApiError patterns in src/)
- Domain language section links to CONTEXT.md rather than restating terms
- Config cross-cutting rule lists all 3 required touch-points per change
- Module placement table maps concerns to files per CONTEXT.md arch map
- Testing section draws the async-exempt line and cites 2bacb57 precedent
- Footgun section covers RwLock-across-await in SessionManager

Files changed:
- .sandcastle/CODING_STANDARDS.md

Notes:
- cargo/just/nix not available in this sandbox; doc is authored ahead of
  image rebuild (#11) as the issue permits
style(CODING_STANDARDS.md): fix grammar and normalize I/O spelling
Some checks failed
CI / check (pull_request) Has been cancelled
17c7f6b949
weiwen merged commit e784ef2383 into main 2026-07-05 06:41:07 +08:00
weiwen deleted branch sandcastle/issue-12 2026-07-05 06:41:07 +08:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
weiwen/evie!16
No description provided.