Skip to content

Reorganize docs: visual-first README, topic pages, inline diagrams - #117

Merged
trycatchal merged 2 commits into
mainfrom
claude/hipthrusts-phase-0-feedback-6uvxh6
Jul 20, 2026
Merged

Reorganize docs: visual-first README, topic pages, inline diagrams#117
trycatchal merged 2 commits into
mainfrom
claude/hipthrusts-phase-0-feedback-6uvxh6

Conversation

@trycatchal

Copy link
Copy Markdown
Owner

What does this PR do?

Makes hipthrusts an easy sell up front. The README had grown to ~1100 lines of solid text, with every diagram exiled behind a "Prefer pictures?" link — the reverse of what a first-time visitor needs. This flips it.

README → ~230-line visual-first overview

  • New hero diagram (docs/img/lifecycle.svg): the eight-stage pipeline with failure drop-outs, the context-accumulation strip, required/optional legend, and the "missing a required stage cannot ship" punchline. Hand-drawn in the existing SVG house style rather than Mermaid so it renders on npmjs.com too (npm doesn't render Mermaid; it does render repo-relative SVGs).
  • context-accumulation.svg and htpipe-composition.svg now appear inline in the overview.
  • Keeps the hero code example, install, the no-magic longhand, philosophy, a trimmed FAQ, and the name story. A Documentation table maps everything else.

Deep reference → six topic pages (content moved, not rewritten)

Page Content
docs/lifecycle.md stages in detail, slices & strictness, raw-request split (both Mermaid views)
docs/composition.md HTPipe, routes file, partial pipelines, finishPipe, type troubleshooting + 2 SVGs
docs/errors.md error vocabulary, bodies, unexpected-error routing, the auth gate + failure-routing Mermaid
docs/adapters.md responseMeta, adapter options, all five framework adapters, define* helpers + SVG
docs/validation.md zod helpers, codecs, switches
docs/mongoose.md factory, everyday loaders & ctxRef, tenant scoping

docs/README.md is the index; docs/architecture.md is reduced to a pointer stub so old links land somewhere useful.

Corrections along the way

  • The failure-routing diagram still showed extractAmbient on the 422 row — stale since 1.1.0's fix routed its unknown throws to 500. Corrected in docs/errors.md.
  • typedoc.json was missing the src/ctx-ref.ts entry point added in 1.1.0, so the new subpath's exports were absent from the generated API reference. Added — ctx-ref.html now builds.

Verified

  • All image and inter-page links resolve (scripted check)
  • typedoc builds clean with the new entry point; test suite unaffected and green
  • New SVG screenshot-verified with headless Chromium

🤖 Generated with Claude Code

https://claude.ai/code/session_01HoGnocn8JV1iaXxdnwA5ir


Generated by Claude Code

claude added 2 commits July 19, 2026 23:55
The README had grown to ~1100 lines of solid text, with every diagram
exiled behind a "Prefer pictures?" link to docs/architecture.md. Flip
that: the README is now a ~230-line visual-first overview, and the deep
reference lives in topic pages with the diagrams inline next to the
prose they illustrate.

README (rewritten):
- New hero diagram docs/img/lifecycle.svg — hand-drawn in the existing
  SVG house style (theme-neutral, transparent) rather than Mermaid, so
  it renders on npmjs.com too, where Mermaid does not.
- context-accumulation.svg and htpipe-composition.svg now appear inline
  in the overview; a Documentation table maps the topic pages.
- Keeps: hero example, install, no-magic longhand, philosophy, trimmed
  FAQ, roadmap pointer, license, the name story.

New topic pages (content moved, not rewritten):
- docs/lifecycle.md — stages in detail, slices & strictness, raw-request
  split (both Mermaid views)
- docs/composition.md — HTPipe, routes file, partial pipelines,
  finishPipe, type troubleshooting (+ htpipe & stage-dep SVGs)
- docs/errors.md — error vocabulary, bodies, unexpected-error routing,
  the auth gate (+ failure-routing Mermaid, corrected for 1.1.0:
  extractAmbient unknown throws are on the 500 row, not 422)
- docs/adapters.md — responseMeta, adapter options, all five framework
  adapters, define* helpers (+ adapters SVG)
- docs/validation.md — zod helpers, codecs, switches
- docs/mongoose.md — factory, everyday loaders & ctxRef, tenant scoping
- docs/README.md — index; docs/architecture.md reduced to a pointer stub
  so old links land somewhere useful

Also:
- typedoc.json: add the src/ctx-ref.ts entry point missed in 1.1.0, so
  the new subpath appears in the generated API reference
- Cross-page links fixed for the new layout; verified all image and page
  links resolve and typedoc builds clean

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HoGnocn8JV1iaXxdnwA5ir
A chunk-level audit (old README + architecture.md vs the new corpus)
caught three genuine information losses among the deliberate trims:

- docs/README.md: the full runnable-examples block (per-adapter commands
  and the "examples import from ../src" note), previously in the README
- README install: the explicit node10 caveat — legacy "node" resolution
  cannot see the subpath type declarations
- docs/adapters.md (tRPC): the single-input note — tRPC has one input
  value, not the HTTP slot shape; the adapter decides what
  sanitizeInputs receives

Everything else flagged by the audit is a verified reword or an
intentional edit (link retargets for the new layout, the corrected
failure-routing diagram, condensed hero/FAQ prose).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HoGnocn8JV1iaXxdnwA5ir
@trycatchal
trycatchal merged commit c06134d into main Jul 20, 2026
4 checks passed
@trycatchal
trycatchal deleted the claude/hipthrusts-phase-0-feedback-6uvxh6 branch July 20, 2026 00:07
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.

2 participants