Skip to content

Commit 11f47e9

Browse files
UnbreakableMJclaude
andcommitted
docs(construct): align golang and zig guidelines concurrency posture with §3.2 v1.31
Add serial-fallback/trade-off clause to Core Philosophy of spacecraft-golang-guidelines and spacecraft-zig-guidelines: adopt concurrency where it advances performance; keep serial where the workload is inherently serial or small, or where concurrency would add overhead / contention or compromise Stability (Priority 1) — and document the trade-off. Mirrors the workload-driven framing synced to spacecraft-rust-guidelines in f1fed47. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f1fed47 commit 11f47e9

6 files changed

Lines changed: 2 additions & 0 deletions

File tree

spacecraft-golang-guidelines.skill

148 Bytes
Binary file not shown.

spacecraft-golang-guidelines.zip

148 Bytes
Binary file not shown.

spacecraft-golang-guidelines/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ description: Use for writing memory-safe very high-quality high-speed high-perfo
1414
## Core Philosophy
1515
- Go's goroutines + channels + race detector deliver memory safety and fearless concurrency — the compiler and runtime prevent most data races and use-after-free.
1616
- Target near-linear scaling across CPU cores for CPU-bound workloads with minimal GC pressure.
17+
- **Match concurrency to the workload (Standard §3.2):** adopt it where it advances performance (data-parallel, CPU-bound, high-throughput I/O); where the workload is inherently serial or small, or concurrency would add synchronization overhead/contention or compromise Stability (Priority 1), keep it serial and **document the trade-off**. Benchmark to decide.
1718
- Prefer structured concurrency (errgroup, context, worker pools) over raw `go` statements.
1819
- Zero-overhead where possible: value types, sync.Pool, escape analysis, contiguous memory.
1920
- Measure everything: benchmarks, pprof (CPU/heap/goroutine/mutex), go tool trace, and `-race` before claiming "fast".

spacecraft-zig-guidelines.skill

157 Bytes
Binary file not shown.

spacecraft-zig-guidelines.zip

157 Bytes
Binary file not shown.

spacecraft-zig-guidelines/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ description: Use for writing memory-safe very high-quality high-speed high-perfo
1515

1616
- Zig's explicitness enables memory safety without GC or borrow checker — leverage comptime, safety modes, allocators, and disciplined ownership.
1717
- Target near-linear scaling across all CPU cores for CPU-bound workloads.
18+
- **Match concurrency to the workload (Standard §3.2):** adopt it where it advances performance (data-parallel, CPU-bound, high-throughput I/O); where the workload is inherently serial or small, or concurrency would add synchronization overhead/contention or compromise Stability (Priority 1), keep it serial and **document the trade-off**. Benchmark to decide.
1819
- Prefer zero-overhead abstractions, manual memory control, lock-free atomics, and data-parallel designs.
1920
- Use ReleaseSafe/Debug during development and verification; switch to ReleaseFast only after proving correctness and measuring.
2021
- Measure scaling efficiency, cache behavior, and contention before and after every change.

0 commit comments

Comments
 (0)