Constructors must use a Params struct (or ThingParams) for 2+ arguments — no exceptions
Single obvious argument (ctx, bytes) is the only exception
context.Context does not count against the argument limit (already documented)
Per sneak's instruction:
- Constructors **must** be `New()`, `From<Something>()`, or `NewThing()` (multi-type packages only)
- Strongly discourage creative names (`Create`, `Make`, `Build`, `Init`)
- Constructors **must** use a `Params` struct (or `ThingParams`) for 2+ arguments — no exceptions
- Single obvious argument (`ctx`, bytes) is the only exception
- `context.Context` does not count against the argument limit (already documented)
sneak
was assigned by clawbot2026-03-18 03:53:59 +01:00
- Constructors must be New(), From<Something>(), or NewThing() (multi-type pkg)
- Strongly discourage creative names (Create, Make, Build, Init)
- Constructors must use Params struct for 2+ arguments, no exceptions
- Single obvious argument (ctx, bytes) is the only exception
Ran make fmt (prettier) which rewrapped lines in the constructor naming section of prompts/CODE_STYLEGUIDE_GO.md. The content is unchanged; only line breaks were adjusted to comply with prettier's prose-wrap rules.
make check passes
docker build . passes
Rebased onto main
**Rework complete — formatting fix**
Ran `make fmt` (prettier) which rewrapped lines in the constructor naming section of `prompts/CODE_STYLEGUIDE_GO.md`. The content is unchanged; only line breaks were adjusted to comply with prettier's prose-wrap rules.
- `make check` passes
- `docker build .` passes
- Rebased onto `main`
VIOLATION: last_modified not updated in YAML front matter
prompts/CODE_STYLEGUIDE_GO.md line 3 still reads last_modified: 2026-02-22 despite substantive content changes (18 insertions, 5 deletions). REPO_POLICIES.md states:
Cross-project documentation (such as this file) must include last_modified: YYYY-MM-DD in the YAML front matter so it can be kept in sync with the authoritative source as policies evolve.
CODE_STYLEGUIDE_GO.md is cross-project documentation. Its content was modified. The last_modified date must be updated to reflect the change date.
Requirements Checklist
#
Requirement
Status
1
Constructors must be New(), From<Something>(), or NewThing() (multi-type packages only)
Constructors must use a Params struct (or ThingParams) for 2+ arguments — no exceptions
✅ Met (PR goes slightly further: "even for a single argument" with exception for obvious cases, consistent with issue bullet 4)
4
Single obvious argument (ctx, bytes) is the only exception
✅ Met
5
context.Context does not count against the argument limit (already documented)
✅ Met (pre-existing, unchanged)
6
sneak's "needs fmt" comment addressed
✅ Met (commit d83bd08)
Build Result
docker build . — PASS (all cached, make check succeeds)
Cheating Check
No changes to Makefile, Dockerfile, .prettierrc, .prettierignore, .editorconfig, .golangci.yml, CI workflow, package.json, or yarn.lock. Clean.
Verdict: ❌ FAIL
The content changes are correct and complete, but the last_modified front matter in prompts/CODE_STYLEGUIDE_GO.md must be updated to today's date per REPO_POLICIES.md. This is a one-line fix.
## Code Review: [PR #19](https://git.eeqj.de/sneak/prompts/pulls/19) — style: strengthen constructor naming and Params struct rules
### Policy Divergences
**VIOLATION: `last_modified` not updated in YAML front matter**
`prompts/CODE_STYLEGUIDE_GO.md` line 3 still reads `last_modified: 2026-02-22` despite substantive content changes (18 insertions, 5 deletions). REPO_POLICIES.md states:
> Cross-project documentation (such as this file) must include `last_modified: YYYY-MM-DD` in the YAML front matter so it can be kept in sync with the authoritative source as policies evolve.
`CODE_STYLEGUIDE_GO.md` is cross-project documentation. Its content was modified. The `last_modified` date must be updated to reflect the change date.
### Requirements Checklist
| # | Requirement | Status |
|---|---|---|
| 1 | Constructors **must** be `New()`, `From<Something>()`, or `NewThing()` (multi-type packages only) | ✅ Met |
| 2 | Strongly discourage creative names (`Create`, `Make`, `Build`, `Init`) | ✅ Met |
| 3 | Constructors **must** use a `Params` struct (or `ThingParams`) for 2+ arguments — no exceptions | ✅ Met (PR goes slightly further: "even for a single argument" with exception for obvious cases, consistent with issue bullet 4) |
| 4 | Single obvious argument (`ctx`, bytes) is the only exception | ✅ Met |
| 5 | `context.Context` does not count against the argument limit (already documented) | ✅ Met (pre-existing, unchanged) |
| 6 | sneak's "needs fmt" comment addressed | ✅ Met (commit `d83bd08`) |
### Build Result
`docker build .` — **PASS** (all cached, `make check` succeeds)
### Cheating Check
No changes to Makefile, Dockerfile, `.prettierrc`, `.prettierignore`, `.editorconfig`, `.golangci.yml`, CI workflow, `package.json`, or `yarn.lock`. Clean.
### Verdict: ❌ FAIL
The content changes are correct and complete, but the `last_modified` front matter in `prompts/CODE_STYLEGUIDE_GO.md` must be updated to today's date per REPO_POLICIES.md. This is a one-line fix.
Only one file changed (prompts/CODE_STYLEGUIDE_GO.md): ✅ No scope creep
Requirements Checklist
#
Requirement
Status
1
Constructors must be New()
✅ Met — changed from "should" to "must"
2
From<Something>() acceptable for conversion constructors
✅ Met — FromBytes(), FromConfig() examples included
3
NewThing() for multi-type packages only
✅ Met — described as "occasionally acceptable" with preference for package restructuring
4
Strongly discourage Create, Make, Build, Init
✅ Met — explicit "Do not invent creative constructor names" with named examples, plus "rename it" directive
5
Constructors must use Params struct for 2+ arguments
✅ Met — PR goes further ("even for a single argument"), consistent with requirement 6
6
Single obvious argument (ctx, bytes) is the only exception
✅ Met — "stupidly obvious from context" with examples (featureflag.New(true), thing.NewFromReader(r))
7
context.Context does not count against argument limit
✅ Met — pre-existing, unchanged, still accurate
8
sneak's "needs fmt" comment addressed
✅ Met — commit d83bd08
9
last_modified date updated (previous review finding)
✅ Met — commit a8a469e
Build Result
docker build . — PASS
#11 [7/7] RUN make check
All matched files use Prettier code style!
Rebased onto main — already up to date, build still passes.
Cheating Check
No tooling, linting, or CI configuration modified. Only prompts/CODE_STYLEGUIDE_GO.md changed. Clean.
README Consistency
README.md references CODE_STYLEGUIDE_GO.md generically in the Quick Start commands. No specific constructor naming details in the README that would need updating. ✅ Consistent.
Verdict: ✅ PASS
All issue #19 requirements are fully implemented. The previous review's sole finding (last_modified date) has been fixed. Build passes. No policy violations. No scope creep. No cheating.
## Code Review: [PR #19](https://git.eeqj.de/sneak/prompts/pulls/19) — style: strengthen constructor naming and Params struct rules
### Policy Divergences
No policy violations found.
- `last_modified` YAML front matter: ✅ Updated to `2026-03-18` (was the sole finding from the previous review cycle — now fixed)
- External references pinned by hash: N/A (no new external references)
- Formatting (prettier `proseWrap: always`): ✅ Passes `make fmt-check`
- No changes to Makefile, Dockerfile, `.prettierrc`, `.prettierignore`, `.editorconfig`, CI workflow, `package.json`, or `yarn.lock`: ✅ Clean
- Feature branch workflow: ✅ `style/constructor-naming-params`
- Only one file changed (`prompts/CODE_STYLEGUIDE_GO.md`): ✅ No scope creep
### Requirements Checklist
| # | Requirement | Status |
|---|---|---|
| 1 | Constructors **must** be `New()` | ✅ Met — changed from "should" to "**must**" |
| 2 | `From<Something>()` acceptable for conversion constructors | ✅ Met — `FromBytes()`, `FromConfig()` examples included |
| 3 | `NewThing()` for multi-type packages only | ✅ Met — described as "occasionally acceptable" with preference for package restructuring |
| 4 | Strongly discourage `Create`, `Make`, `Build`, `Init` | ✅ Met — explicit "Do not invent creative constructor names" with named examples, plus "rename it" directive |
| 5 | Constructors **must** use `Params` struct for 2+ arguments | ✅ Met — PR goes further ("even for a single argument"), consistent with requirement 6 |
| 6 | Single obvious argument (`ctx`, bytes) is the only exception | ✅ Met — "stupidly obvious from context" with examples (`featureflag.New(true)`, `thing.NewFromReader(r)`) |
| 7 | `context.Context` does not count against argument limit | ✅ Met — pre-existing, unchanged, still accurate |
| 8 | sneak's "needs fmt" comment addressed | ✅ Met — commit `d83bd08` |
| 9 | `last_modified` date updated (previous review finding) | ✅ Met — commit `a8a469e` |
### Build Result
`docker build .` — **PASS**
```
#11 [7/7] RUN make check
All matched files use Prettier code style!
```
Rebased onto `main` — already up to date, build still passes.
### Cheating Check
No tooling, linting, or CI configuration modified. Only `prompts/CODE_STYLEGUIDE_GO.md` changed. Clean.
### README Consistency
README.md references `CODE_STYLEGUIDE_GO.md` generically in the Quick Start commands. No specific constructor naming details in the README that would need updating. ✅ Consistent.
### Verdict: ✅ PASS
All [issue #19](https://git.eeqj.de/sneak/prompts/issues/19) requirements are fully implemented. The previous review's sole finding (`last_modified` date) has been fixed. Build passes. No policy violations. No scope creep. No cheating.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Per sneak's instruction:
New(),From<Something>(), orNewThing()(multi-type packages only)Create,Make,Build,Init)Paramsstruct (orThingParams) for 2+ arguments — no exceptionsctx, bytes) is the only exceptioncontext.Contextdoes not count against the argument limit (already documented)@clawbot needs fmt
59999115b1tod83bd08d4dRework complete — formatting fix
Ran
make fmt(prettier) which rewrapped lines in the constructor naming section ofprompts/CODE_STYLEGUIDE_GO.md. The content is unchanged; only line breaks were adjusted to comply with prettier's prose-wrap rules.make checkpassesdocker build .passesmainCode Review: PR #19 — style: strengthen constructor naming and Params struct rules
Policy Divergences
VIOLATION:
last_modifiednot updated in YAML front matterprompts/CODE_STYLEGUIDE_GO.mdline 3 still readslast_modified: 2026-02-22despite substantive content changes (18 insertions, 5 deletions). REPO_POLICIES.md states:CODE_STYLEGUIDE_GO.mdis cross-project documentation. Its content was modified. Thelast_modifieddate must be updated to reflect the change date.Requirements Checklist
New(),From<Something>(), orNewThing()(multi-type packages only)Create,Make,Build,Init)Paramsstruct (orThingParams) for 2+ arguments — no exceptionsctx, bytes) is the only exceptioncontext.Contextdoes not count against the argument limit (already documented)d83bd08)Build Result
docker build .— PASS (all cached,make checksucceeds)Cheating Check
No changes to Makefile, Dockerfile,
.prettierrc,.prettierignore,.editorconfig,.golangci.yml, CI workflow,package.json, oryarn.lock. Clean.Verdict: ❌ FAIL
The content changes are correct and complete, but the
last_modifiedfront matter inprompts/CODE_STYLEGUIDE_GO.mdmust be updated to today's date per REPO_POLICIES.md. This is a one-line fix.Rework complete —
last_modifieddate fixUpdated
last_modifiedinprompts/CODE_STYLEGUIDE_GO.mdYAML front matter from2026-02-22to2026-03-18per REPO_POLICIES.md requirements.make fmt— no changes needed (already clean)make check— passesdocker build .— passesmainSingle commit:
a8a469e— one-line fix, no other changes.Code Review: PR #19 — style: strengthen constructor naming and Params struct rules
Policy Divergences
No policy violations found.
last_modifiedYAML front matter: ✅ Updated to2026-03-18(was the sole finding from the previous review cycle — now fixed)proseWrap: always): ✅ Passesmake fmt-check.prettierrc,.prettierignore,.editorconfig, CI workflow,package.json, oryarn.lock: ✅ Cleanstyle/constructor-naming-paramsprompts/CODE_STYLEGUIDE_GO.md): ✅ No scope creepRequirements Checklist
New()From<Something>()acceptable for conversion constructorsFromBytes(),FromConfig()examples includedNewThing()for multi-type packages onlyCreate,Make,Build,InitParamsstruct for 2+ argumentsctx, bytes) is the only exceptionfeatureflag.New(true),thing.NewFromReader(r))context.Contextdoes not count against argument limitd83bd08last_modifieddate updated (previous review finding)a8a469eBuild Result
docker build .— PASSRebased onto
main— already up to date, build still passes.Cheating Check
No tooling, linting, or CI configuration modified. Only
prompts/CODE_STYLEGUIDE_GO.mdchanged. Clean.README Consistency
README.md references
CODE_STYLEGUIDE_GO.mdgenerically in the Quick Start commands. No specific constructor naming details in the README that would need updating. ✅ Consistent.Verdict: ✅ PASS
All issue #19 requirements are fully implemented. The previous review's sole finding (
last_modifieddate) has been fixed. Build passes. No policy violations. No scope creep. No cheating.