Cut the first vertical slice through both layers: a runnable
`kitchen view <file>` that reads a Recipe File, parses it, and renders
it styled to the terminal.
@kitchen-md/core exposes a pure, total `parse(input): DocumentAST` built
on a minimal remark pipeline (parse + frontmatter) with a translation
layer to core's own AST types — frontmatter passthrough, HeadingBlock,
ParagraphBlock, and TextNode. remark types never leak into the public
API.
@kitchen-md/bin's `view` subcommand (commander) reads the file and hands
the DocumentAST to a pure `render(ast): string` (chalk, ANSI
auto-suppressed off a TTY). Fallible file I/O is modelled as a neverthrow
Result over a tagged-union CliError, matched at the boundary: stdout on
success, stderr and exit 1 on failure. The command functions sit beside
the import.meta.main-guarded CLI entry so they are testable in-process.
Tests follow ADR 0009's tiers — unit (parse, render), integration (the
view command's Result), and e2e (the binary as a subprocess) — with
coverage, a path-scoped test-report generator, and a prose fixture
rounding out the tooling. ADR 0008 records errors-as-values at the CLI
boundary; ADR 0009 records the testing tiers.
Bring core-parser.md in line with the resolved design in CONTEXT.md and
ADRs 0004/0005, and promote a new decision to normalise ingredient/cookware
units.
- Full sync of the core-parser spec: diagnostics/total-function channel,
container blocks (ListItemBlock, BlockquoteBlock), RawInline alongside
RawBlock via position-slicing, the unified WikilinkNode/TransclusionNode
shape as two typed nodes, and the minimal remark plugin set.
- New ADR 0006: normalise ingredient/cookware units via a known-alias table
with passthrough, case-insensitive, canonical-only; align Timer matching
to case-insensitive too.
- SPEC.md: units are normalised (new Units section, alias table); Timer table
marked case-insensitive.
- CONTEXT.md: add Unit Normalisation entry, resolve the open item.
- fixtures/basic.md: add a blockquote (callout) carrying an annotation and a
non-canonical unit so the integration test exercises containers and
normalisation.
- Expand the core test.todo checklists to cover the new behaviour (containers,
raw fallbacks, diagnostics, unit normalisation, wikilink/transclusion
variants); still pending, suite stays green.
Expand fixtures/basic.md beyond prose-only annotations to exercise the
OFM features the parser must model: unordered and ordered lists,
emphasis and strong, a code span, a fenced code block (proving
annotations inside code are ignored), a thematic break, and a
transclusion. Also adds an empty-braces ingredient (@black pepper{}).
Add fixtures/combined.md, a Combined Recipe demonstrating Step
References in both sectioned (#Batter:1) and headingless (#2) forms,
which do not fit cleanly into a standalone recipe file.
Sets up the initial project structure: two packages (@kitchen-md/core
and @kitchen-md/bin), shared tsconfig, shared fixtures, per-package
test stubs (unit, integration, smoke), .gitignore, and project
CLAUDE.md with Conventional Commits convention.