Claude Opus 5andbdeshi 479d8c6bd6 add khosra check, the place content errors are looked for
The server never fails on a bad bundle — it works around it and logs, which is easy
to miss (ADR-0029). This is the command that looks on purpose, and it exits non-zero
on anything that makes the site wrong rather than merely untidy.

Fatal: content the engine had to drop (unparseable frontmatter, a key two files
claim, an ignored slug or alias) and links that will 404 for a reader. Warnings:
no title, a figure with no alt text, a series where some members declare order and
others do not — that last one because unordered members sort last, so adding order
to one chapter silently moves every chapter that lacks it.

Two things this needed rather than invented. `Scan` and `Site` now *return* what they
worked around instead of only logging it: `ScanReport` and `Site.Problems`, with
`Scan` staying the logging wrapper so nothing else changed. And required-fields-per-type
is deliberately absent — `title` is the only field the engine requires today, so
checking more would mean inventing the type declaration that is still parked. Its
trigger stays where it was.

The link checker asks the same questions the resolver asks — bundle, alias, section
listing, file inside a bundle — because a checker that guesses differently from the
server is worse than no checker. Engine-owned paths are skipped: they are generated,
not authored.

It lives in internal/ext/check, so cmd/ stays wiring and the feature stays deletable.
Verified against the evidence site: clean before, and five findings across five fault
classes after I introduced them on purpose.
2026-07-31 11:09:45 +06:00
2026-07-30 00:34:18 +06:00

khosra

A flat-file personal publishing engine in Go. Point the binary at a directory of Markdown and it becomes an owned, networked home for fiction, webcomics, art, and essays, in English and Bengali. The site's content lives in its own repository, not this one (ADR-0011).

Build and run

Needs Go 1.26+ and git; nothing else.

make build                      # or: go build -o khosra ./cmd/khosra
make run SITE=/path/to/site     # or: ./khosra -site /path/to/site
make test
make verify                     # everything the project enforces — green before every commit

make help lists targets. make is a convenience wrapper; go build, go test and ./scripts/verify.sh work on their own and are what the gate uses.

A site root is a directory holding content/, and optionally static/ and templates/. It lives in its own repository, not this one — the binary is pointed at it.

If you are a human: start at HARNESS.md — what the scaffolding is, how to use it, and what to decide.

If you are an agent: start at CLAUDE.md — the constitution and the read order. It is loaded for you automatically; this file is not a prerequisite and nothing here is a rule.

S
Description
A personal publishing engine
Readme
1.1 MiB
Languages
Go 89%
Shell 7%
HTML 2.3%
CSS 1%
Makefile 0.4%
Other 0.3%