hecks

Authoring a guide

Not doctested — this page is about the others.

Every other file in this folder is executable documentation: its fenced examples are extracted and run against the real runtime by spec/guides_spec.rb, and its # => claims are asserted. A guide that lies goes red. That is the whole arrangement — prose earns no exemption from the covenant the rest of this codebase lives under.

This page records what a guide author must know: who is reading, the harness mechanics, and the voice.

The reader

An implementer who wants to ship something. Not a student of the language for its own sake — someone with a real feature to build, who needs to know what this DSL can carry, what it refuses, and what to wire before the thing runs in front of a user. Every guide answers a task, not just a topic: not “here is what given is” but “here is how you make a rule you can trust before you ship the command that needs it.” Concepts earn their place by being load-bearing for something a reader will actually build — a domain, an adapter, an evolution, a check that keeps a regression out of production. Skip the tour; keep the thing they need to get to the shippable feature without guessing.

This also decides what belongs on a page and what doesn’t: a guide may name a gotcha because it costs someone a shipped bug, but it should not wander into design-space exploration or “here’s an alternative you could imagine” unless that alternative is a real decision the reader has to make (Memory vs Sqlite vs Postgres genuinely is one; a hypothetical fourth adapter isn’t).

The harness

Fences mean things (spec/support/doctest.rb is the source of truth):

fence meaning
```ruby bluebook a domain declaration — booted for real
```ruby boot wiring — hecksagon/world blocks
```ruby usage — runs against the booted runtime
```ruby skip shown, never run — also the tag for a diagram, output sample, or shape that isn’t really Ruby, chosen over a bare unlabelled fence so it still colors on a public renderer

Hidden setup that would clutter the page lives in an HTML comment:

<!-- doctest:boot
Kernel.load(...)
-->

A guide runs as waves: declarations boot, the usage blocks after them run against that boot, and a later declaration block starts the next wave with its own boot. Locals persist across every block in the file — write the narrative as one session, because it is one.

Claims:

Rules that keep the suite honest:

The reference

docs/implemented/reference/ is generated from the language’s own Syntax chapter by hecks language_run.project_reference, and it carries examples under the same harness the guides do — with two rules the guides do not have.

The voice

Purely technical. No narrator, no first person, no signature. State what a construct does and what it refuses; back every claim with a runnable example. Address the reader as “you” for instructions (“declare a value object”), never as a character speaking to them. Cut any sentence that exists for tone rather than information.

The quarantine

There is a sibling language at ~/Projects/hecks with vocabulary this repo does not have: Hecks.family, charged_by, signal :effect, driving on cron, storehouse. None of that exists in hecks and none of it may appear in these guides. Here the words are: Hecks.port (with verb), Hecks.adapter (with port/field/secret), persisted_by, .world blocks, driving ports declared in the hecksagon (port/operation), and the era/translation system. The canonical example is THIS repo’s pizzas — the Order aggregate, era 2. When in doubt, read examples/pizzas/bluebook/ and examples/banking/bluebook/, not memory.