This repository is maintained to enterprise-grade standards. Every contributor —
human or automated — must comply with the rules below. Where this charter and a
local habit disagree, the charter wins. Deviations require an ADR in
docs/adr/.
Kroot is a full-stack product:
github.com/klosraf/kroot).web/ when the first UI
milestone lands.Everything that ships from this repository is typed, tested, observable, secure and reproducible. “It works on my machine” is not a delivery standard.
| Layer | Choice | Status |
|---|---|---|
| Language (backend) | Go 1.23.12 (go.mod) |
frozen |
| Language (frontend) | TypeScript, strict: true |
frozen |
| UI framework | React 18 + Vite + Tailwind CSS | frozen |
| JS package manager | pnpm (never npm/yarn) | frozen |
| Documentation | Markdown under docs/ |
frozen |
| HTTP layer | Go standard library first | to decide (ADR) |
| Persistence | none yet | to decide (ADR) |
Rules:
go.mod and go.sum is committed.kroot · module github.com/klosraf/kroot · env KROOT_* · data dir
~/.kroot.docs/enterprise/branching-strategy.md.Go — enforced by make ci:
gofmt + gofumpt clean, go vet clean, golangci-lint clean.%w, inspect with errors.Is / errors.As.
Never swallow an error; never panic outside init or impossible states.context.Context is the first parameter of anything that does I/O or blocks.init() side effects, no mutable package-level state, no unsafe without
an ADR.TypeScript (when web/ lands):
strict: true; no any without an inline justification comment.tsc --noEmit clean; Tailwind utilities over inline styles.Details: docs/enterprise/coding-standards.md.
go test -race -cover ./... must pass, and coverage must not decrease.Details: docs/enterprise/testing-strategy.md.
KROOT_*
variables or mounted files; .env files are git-ignored.govulncheck ./... runs in CI on every PR touching Go code.SECURITY.md.Details: docs/enterprise/security-policy.md.
log/slog; no fmt.Println in library code.Details: docs/enterprise/observability.md.
A change is not mergeable until every gate passes. make ci is the local
definition of done; the CI workflow is authoritative.
| Gate | Command |
|---|---|
| Formatting | make fmt-check |
| Static analysis | make vet |
| Lint | make lint |
| Tests + race + coverage | make test-race |
| Vulnerability scan | make vuln |
| Build | make build |
main is protected and always releasable.feat/, fix/, chore/, docs/, release/, hotfix/.vMAJOR.MINOR.PATCH); releases are tagged and published from CI.main. Never merge main into a
feature branch — rebase instead.KROOT_* variables update their docs in the
same PR.docs/adr/NNNN-title.md. ADRs are
append-only: a superseded ADR stays and points at its replacement.CHANGELOG.md follows Keep a Changelog and is updated for every
user-visible change.