Skip to content

feat: standardize the Go CONTRIBUTING files instead of emptying them - #89

Merged
retr0h merged 1 commit into
mainfrom
feat/rescope-go-code-standards
Aug 16, 2026
Merged

feat: standardize the Go CONTRIBUTING files instead of emptying them#89
retr0h merged 1 commit into
mainfrom
feat/rescope-go-code-standards

Conversation

@retr0h

@retr0h retr0h commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Rewritten after review. The first version moved conventions out of the repositories into a fetched fragment. What's wanted is the opposite: every repository states its conventions in full, and the five files look the same.

Planning artifacts only — no repository is touched, and no convention is relaxed.

The actual problem

repo-standards fixes the opening and closing sections of CONTRIBUTING.md, then says: "The middle varies by repository, because what a contributor needs to know differs." That sentence is why the five Go repos disagree:

gohai nats-client nats-server orchestrator osapi
Function signatures (none) Code style Code style Code standards (none)
Go patterns under Testing Code style Code style Code standards (none)
Code standards
Casing Function Signatures Function signatures Function signatures Function Signatures
Structure section Package Structure (none) (none) Project Structure + Package Structure Project structure

A reader comparing two repos can't tell whether a difference in the document means a difference in the rule.

What changes

repo-standards — the middle becomes named and ordered, like the opening and closing already are:

SetupProject structureCode styleCode standardsTesting(repo-specific, after Testing)

Plus three new requirements:

  • Headings are sentence casemdformat doesn't touch heading case, so nothing enforces it today and three repos are wrong.
  • A repository states in full the conventions it is held to — a pointer to another repository does not stand in place. A reviewer in a browser, a contributor offline, and an agent with one checkout each see only this repository.
  • A rule a tool enforces is not restated as prose — name .golangci.yml, don't reproduce it.

go-code-standards — still narrows to what no tool reports on (mocks are generated; no re-covering via an exported alias). The five formatting requirements leave the corpus, but they now land in every CONTRIBUTING.md rather than in a fragment.

Why prose restating config has to go

Every Go repo lists the linters as "errcheck, errname, goimports, govet, prealloc, predeclared, revive, staticcheck". Every .golangci.yml enables unused — mentioned in no prose — and puts goimports under formatters:, not among the linters. Five identical copies of a wrong summary of the file beside them.

Blocking dependency

repo-standards is not in openspec/specs/. It exists only inside two unarchived changes, so this delta has nothing to land on. Task 1.6 syncs it first — the same step #88 took for go-code-standards.

Trade-off taken deliberately

Five committed copies can drift. That's accepted: identical headings in a fixed order make a diverging body visible in a side-by-side read, which the free-form middle did not.

Also widens the mocks requirement

Three hand-written doubles were found. Two are genuine violations. osapi's mockPKISigner signs with a real generated ed25519 key pair — converting it would swap working cryptography for a canned return. A scenario now draws that line.

Supersedes

osapi-io/osapi-orchestrator#76 is held as a draft and is superseded by task 3.2.

just test — 12 passed, 0 failed.

🤖 Generated with Claude Code

The capability states Go formatting as corpus requirements. Formatting
is not externally observable behavior, and the strain shows in the
scenarios written to fit the format: "a parameter is added, the diff
shows one added line" is a rationale for a preference, not a behavior.

The duplication it was written to end has not ended. Every Go
repository lists the linter set as errcheck, errname, goimports, govet,
prealloc, predeclared, revive, staticcheck. Each .golangci.yml enables
unused, which no prose mentions, and puts goimports under formatters.
Five copies of one stale approximation of a file beside it.

Proposes three homes: policy no tool reports on stays in the corpus,
anything a tool enforces becomes its configuration, and the rest returns
to CONTRIBUTING.md as a fragment distributed the way shared recipes
already are.

Planning artifacts only. No repository is touched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Thank you for contributing to this project! 😊🕹️

@retr0h
retr0h merged commit 101b8eb into main Aug 16, 2026
6 checks passed
@retr0h
retr0h deleted the feat/rescope-go-code-standards branch August 16, 2026 16:18
@retr0h retr0h changed the title feat: propose rescoping go-code-standards feat: standardize the Go CONTRIBUTING files instead of emptying them Aug 16, 2026
retr0h added a commit that referenced this pull request Aug 16, 2026
PR #89 was squash-merged from its first commit, so main carries the
version that moved conventions out to a fetched fragment. The rewrite
that replaced it -- every repository states its conventions in full,
with the five files structurally identical -- was pushed to the branch
after the merge and never landed.

This restores it: the repo-standards delta fixing the middle sections,
sentence-case headings, and stating conventions in full, with the
shared-contributor-documentation capability dropped.

Also syncs repo-standards into openspec/specs/. It existed only inside
two unarchived changes, so the delta above had nothing to land on and
five repositories cited a capability the corpus did not hold. Merged
from the standardize-repository-layout and specify-agent-tool-invocation
deltas: 16 requirements, 44 scenarios.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant