Standards — focused engineering guidance
Load the smallest set of standards justified by the caller's files, language,
and risks. Do not preload the entire reference corpus.
Prompt
Check standards for the changed files in fleet-router PR #214: cli/internal/auth/token.go and cli/internal/auth/token_test.go, Go, a security-sensitive change. Load only the matching references and report cited findings with path and line plus checked and not-checked scope.
It's working if
- The report loads
common-standards.md plus only the matching Go reference, never the full reference corpus.
- Every finding cites a path and line, e.g.
cli/internal/auth/token.go:18.
- The response discloses
checked and not_checked scope explicitly, even when not_checked is empty.
git diff --stat shows no test, gate, or fixture file changed; standards reports findings only.
Procedure
- Record the supplied paths, language, change type, and risk cues.
- Load
common-standards.md plus only the matching language or checklist
references.
- Compare the supplied artifact to those sources.
- Return cited findings with path and line when possible, plus checked and
not-checked scope.
- Stop.
This skill provides context and findings. It does not edit, validate, retry,
approve, commit, release, deliver, or decide continuation.
Load-bearing conventions for produced code (MEASURED)
When the caller is about to WRITE code (not only review it), surface the
matching language rules INLINE in the working context — a behind-the-link
reference does not change behavior; an inline imperative does. The Go core:
- Wrap every propagated error with context:
fmt.Errorf("doing X: %w", err)
— never return a bare inner error.
- Multi-case functions get TABLE-DRIVEN tests (
[]struct cases + t.Run per
case), asserting exact expected values including the error cases.
For other languages, pull the matching reference below and inline its top
rules the same way.
Measured 2026-08-04, probe standards-go-conventions (gpt-5.6-luna, N=2,
directional): control produced the %w-wrapped + table-driven shape in 1/2
runs; with these rules inline, 2/2. Inline-imperative beats reference-link —
the graphify probe measured a linked doc instruction obeyed 0/2. Ledger:
evals/skill-probes/LEDGER.md.
Mutation-safety standards
When the supplied change rewrites existing files in bulk — formatters,
codemods, migration scripts, generators pointed at hand-written sources —
check it against three standards and report each as a finding when absent:
- Single audited mutation chokepoint. All rewrites flow through one named
command or script whose inputs, outputs, and dry-run mode can be inspected.
Edits scattered across ad-hoc one-liners and manual touch-ups are the
diffuse mutation failure mode: no single point can be audited, re-run,
or blamed. Finding: name every mutation path outside the chokepoint.
- Hash-witnessed backups before rewrite. Before the chokepoint runs, the
originals are preserved with content hashes recorded (a committed baseline
counts), so "the rewrite changed only what it claims" is checkable
byte-for-byte, not asserted. Finding: a bulk rewrite with no verifiable
before-state.
- Self-administered ambition gate. The change states what it deliberately
does not touch, and the diff respects it. A formatter run that also renames,
a codemod that also refactors, is the scope-creep rewrite failure mode.
Finding: any file class in the diff outside the change's own stated scope.
Stop condition for this check: all three standards have an explicit pass or
finding; a bulk-rewrite review that reports style nits but skips these is
incomplete.
References
- Common standards
- Go
- Python
- Rust
- TypeScript
- JavaScript
- Shell
- JSON
- YAML
- Markdown
- SQL safety
- Race conditions
- LLM trust boundaries
- Skill structure
- Test strategy
1---
2name: standards
3description: 'Load only the standards relevant to a caller-supplied change, then report concrete findings. Triggers: "check standards", "which standards apply".'
4practices:
5- pragmatic-programmer
6- clean-code
7hexagonal_role: supporting
8consumes: []
9produces:
10- stdout
11context_rel: []
12skill_api_version: 1
13metadata:
14 capabilities: [standards]
15 effects: []
16 canonical_status: canonical
17 disposition: keep_specialist
18 tier: knowledge
19 dependencies: []
20output_contract: cited standards and factual findings
21---
22
23# Standards — focused engineering guidance
24
25Load the smallest set of standards justified by the caller's files, language,
26and risks. Do not preload the entire reference corpus.
27
28## Prompt
29
30```text
31Check standards for the changed files in fleet-router PR #214: cli/internal/auth/token.go and cli/internal/auth/token_test.go, Go, a security-sensitive change. Load only the matching references and report cited findings with path and line plus checked and not-checked scope.
32```
33
34## It's working if
35
36- The report loads `common-standards.md` plus only the matching Go reference, never the full reference corpus.
37- Every finding cites a path and line, e.g. `cli/internal/auth/token.go:18`.
38- The response discloses `checked` and `not_checked` scope explicitly, even when `not_checked` is empty.
39- `git diff --stat` shows no test, gate, or fixture file changed; standards reports findings only.
40
41## Procedure
42
431. Record the supplied paths, language, change type, and risk cues.
442. Load `common-standards.md` plus only the matching language or checklist
45 references.
463. Compare the supplied artifact to those sources.
474. Return cited findings with path and line when possible, plus checked and
48 not-checked scope.
495. Stop.
50
51This skill provides context and findings. It does not edit, validate, retry,
52approve, commit, release, deliver, or decide continuation.
53
54## Load-bearing conventions for produced code (MEASURED)
55
56When the caller is about to WRITE code (not only review it), surface the
57matching language rules INLINE in the working context — a behind-the-link
58reference does not change behavior; an inline imperative does. The Go core:
59
60- Wrap every propagated error with context: `fmt.Errorf("doing X: %w", err)`
61 — never return a bare inner error.
62- Multi-case functions get TABLE-DRIVEN tests (`[]struct` cases + `t.Run` per
63 case), asserting exact expected values including the error cases.
64
65For other languages, pull the matching reference below and inline its top
66rules the same way.
67
68> Measured 2026-08-04, probe `standards-go-conventions` (gpt-5.6-luna, N=2,
69> directional): control produced the `%w`-wrapped + table-driven shape in 1/2
70> runs; with these rules inline, 2/2. Inline-imperative beats reference-link —
71> the graphify probe measured a linked doc instruction obeyed 0/2. Ledger:
72> `evals/skill-probes/LEDGER.md`.
73
74## Mutation-safety standards
75
76When the supplied change rewrites existing files in bulk — formatters,
77codemods, migration scripts, generators pointed at hand-written sources —
78check it against three standards and report each as a finding when absent:
79
80- **Single audited mutation chokepoint.** All rewrites flow through one named
81 command or script whose inputs, outputs, and dry-run mode can be inspected.
82 Edits scattered across ad-hoc one-liners and manual touch-ups are the
83 **diffuse mutation** failure mode: no single point can be audited, re-run,
84 or blamed. Finding: name every mutation path outside the chokepoint.
85- **Hash-witnessed backups before rewrite.** Before the chokepoint runs, the
86 originals are preserved with content hashes recorded (a committed baseline
87 counts), so "the rewrite changed only what it claims" is checkable
88 byte-for-byte, not asserted. Finding: a bulk rewrite with no verifiable
89 before-state.
90- **Self-administered ambition gate.** The change states what it deliberately
91 does not touch, and the diff respects it. A formatter run that also renames,
92 a codemod that also refactors, is the **scope-creep rewrite** failure mode.
93 Finding: any file class in the diff outside the change's own stated scope.
94
95Stop condition for this check: all three standards have an explicit pass or
96finding; a bulk-rewrite review that reports style nits but skips these is
97incomplete.
98
99## References
100
101- [Common standards](references/common-standards.md)
102- [Go](references/go.md)
103- [Python](references/python.md)
104- [Rust](references/rust.md)
105- [TypeScript](references/typescript.md)
106- [JavaScript](references/javascript.md)
107- [Shell](references/shell.md)
108- [JSON](references/json.md)
109- [YAML](references/yaml.md)
110- [Markdown](references/markdown.md)
111- [SQL safety](references/sql-safety-checklist.md)
112- [Race conditions](references/race-condition-checklist.md)
113- [LLM trust boundaries](references/llm-trust-boundary-checklist.md)
114- [Skill structure](references/skill-structure.md)
115- [Test strategy](references/test-pyramid.md)