Skip to content

Reset repository as the Go foundation for the software factory - #2

Open
ihtkas wants to merge 4 commits into
masterfrom
chore/reset-for-software-factory
Open

Reset repository as the Go foundation for the software factory#2
ihtkas wants to merge 4 commits into
masterfrom
chore/reset-for-software-factory

Conversation

@ihtkas

@ihtkas ihtkas commented Jul 27, 2026

Copy link
Copy Markdown
Owner

What this does

Clears out the algorithm and data-structure exercises this repository was holding, and re-establishes go-libs as the Go foundation for the software factory.

The previous contents share no lineage with where this is going, so they are removed rather than adapted. Nothing is lost — the full prior history is preserved on the archive/algorithms branch.

Why

A SaaS vendor writes one system for every customer at once. That forces multi-tenancy, distribution, and hyperscale into the design, and every customer pays for that generality — in fees, in integration work, and in workflows bent to fit someone else's model. Most companies never needed the complexity they are paying for.

The cost of building bespoke software has collapsed. A company can now own production-grade software shaped to how it actually works, rivalling the SaaS product it would otherwise rent, and self-host it. What is missing is not the ability to generate code — it is a foundation worth generating code against.

go-libs is that foundation: independently usable Go packages that applications import as ordinary dependencies. Not a framework.

Changes

Removed graph/, sort/, string/, tree/ — 25 exercise files
Removed .github/workflows/build.yml — a placeholder that only echoed on issue comments
Added CLAUDE.md — thesis, architecture, engineering standards, design process, non-goals, deferred decisions
Rewrote README.md — public statement of intent
Bumped go directive 1.151.26

Architecture established

One go.mod for the whole tree, revisited only if the tree becomes hard to manage. A strict dependency spine:

  • core depends only on the standard library — nothing else, ever
  • Every other package depends on core and stdlib
  • Packages never import each other laterally
  • Every package is usable in isolation

The lateral-import rule is load-bearing: it keeps this a parts bin rather than a framework, and keeps a future multi-module split mechanical rather than archaeological.

No packages are added here

By design. Each package begins with a written design, reviewed before implementation, and none is built autonomously. Breadth is not a goal — an adequate library in this position is worse than none, because it gets embedded in real systems before anyone notices it was not thought through. When the honest answer is "use the standard library," no package gets written.

CLAUDE.md also records what was deliberately deferred — operational shape, multi-module split, and which packages to build — along with the trigger for revisiting each, so those stay parked on purpose rather than getting quietly re-litigated.

🤖 Generated with Claude Code

ihtkas and others added 4 commits July 27, 2026 23:06
This repository previously held algorithm and data-structure exercises.
That work shares no lineage with what go-libs becomes, so it is removed
rather than adapted. It is preserved on the archive/algorithms branch.

go-libs is now a component library: well-designed, independently usable
Go packages that applications import as ordinary dependencies. The
premise is that SaaS forces multi-tenancy, distribution, and hyperscale
onto every customer, who then pays for generality they never needed.
With the cost of bespoke software collapsing, a company can instead own
production-grade software shaped to how it actually works and self-host
it. These packages are the foundation that makes that practical.

- Remove graph, sort, string, and tree exercise packages
- Remove the placeholder GitHub Actions workflow, which only echoed on
  issue comments
- Add CLAUDE.md: thesis, architecture, engineering standards, design
  process, non-goals, and a record of deliberately deferred decisions
- Rewrite README.md as a public statement of intent
- Raise the go directive from 1.15 to 1.26

No packages are added here. Each one is designed before it is built, and
only when it is clearly better than what a caller would otherwise write
or import.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CLAUDE.md and README.md argued their case at length where stating it once
was enough. Documents here should convey meaning briefly, not build a case.

Removed the restated thesis in the architecture and non-goals sections, the
expanded justifications under each engineering standard, and the ASCII
dependency diagram that the adjacent bullets already described. Every rule,
constraint, and deferred decision is retained.

Adds one standard: prose in this repo states the decision and stops.

CLAUDE.md 10.3K to 5.6K, README.md 1.3K to 0.9K.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
"It generates no code and boots no application" was too absolute. It read
as forbidding any package that generates code, which would rule out query
codegen, client generation, and mock generation — all legitimate library
work that does not make this a framework.

The invariant is control, not capability: applications call into go-libs,
never the reverse, and it never owns main. A generator the developer runs
deliberately does not breach that.

Also records that generation is preferred over reflection. Explicit codegen
emitting readable, checked-in Go is how Go avoids runtime magic, so it
expresses the no-magic rule rather than violating it. Generators live under
cmd/.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds .claude/skills/go-review: a pre-merge review gate for Go code, backed
by a pinned verbatim snapshot of the Uber Go Style Guide (uber-go/guide
37c45b52bf9a, retrieved 2026-07-30, Apache 2.0). NOTICE carries the
attribution; the snapshot header records how to refresh it.

Authority is CLAUDE.md first, the Uber guide second. Two rules where this
repo deliberately departs from Uber are recorded as overrides so reviews
do not relitigate them:

- go.uber.org/atomic — rejected. It breaches our dependency policy, and
  sync/atomic has had typed atomics since Go 1.19.
- Start enums at one — rejected as a default. It collides with useful zero
  values; it applies only where an unset value is genuinely invalid.

Standards updated where reading the guide showed real gaps:

- Errors: wrapping with %w was stated unconditionally. It makes the wrapped
  error part of the contract, so it is now conditional on whether callers
  should match it.
- API: copy slices and maps at boundaries; no embedding in exported structs.
- State: new — no mutable package-level state, and constraints on init().
  A global in a library makes every consumer's tests order-dependent with
  no way to opt out.
- Testing: failure messages identify the case and report got against want.
- Style: initialism casing, no Get prefix, package and receiver naming.

Effective Go and the Google style guide were evaluated and dropped; the
Uber guide is the sole external reference.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant