Commit Graph

4 Commits

Author SHA1 Message Date
02020309eb test: rebuild the view-skeleton suite on ADR 0009 tiers (task 0003)
Guard the CLI entry's program.parse() behind import.meta.main so the
command module can be imported without running the CLI, then rebuild the
deleted suite across the three tiers ADR 0009 defines:

- unit: parse (core) and render (bin), asserted on return values
- integration: the view command function, asserted on its Result
- e2e: the kitchen binary as a subprocess (exit codes, streams, ANSI
  suppression, errors, --help)

Drop the stale test-support.ts coverage ignore and refresh the task's
implementation notes to describe the tiered suite.
2026-07-28 22:41:59 -04:00
4aec705f2b test: remove all test files for a clean restart (task 0003)
Temporary: clear the entire test suite (unit, subprocess, the shared
helper, and the parser-integration placeholder) so the tests can be
rebuilt from scratch. Fixtures and the test tooling (bunfig, report
script) are kept. Note: `bun test` now errors on an empty suite, so the
flake's tests check is red until tests return.
2026-07-28 21:43:41 -04:00
d1c1f330c5 feat: add kitchen view command and parser skeleton (task 0003)
Cut the first complete thread through both layers with the smallest set
of node types.

@kitchen-md/core gains a pure, total `parse` returning a
`DocumentAST` of `{ frontmatter, blocks, diagnostics }`, built from a
minimal remark pipeline (remark-parse + remark-frontmatter) with an
internal translation layer to core's own types. This slice models
frontmatter passthrough, HeadingBlock, ParagraphBlock, and TextNode;
remark's mdast does not surface in the public API.

@kitchen-md/bin gains the `view` subcommand (commander) that reads a
file, calls `parse`, and passes the AST to a pure `render` that returns
an ANSI-styled string via chalk (auto-suppressed off a TTY). Frontmatter
prints as raw YAML followed by a separator, headings styled distinctly
by level, paragraphs as prose. A missing argument prints usage and a
missing/unreadable file a human-readable error, both exiting 1.

Richer blocks/inline plus raw fallbacks are task 0004; malformed
frontmatter diagnostics and the basic.md smoke test are task 0007.
2026-07-26 07:24:32 -04:00
220f73d8f7 chore: scaffold Bun workspace monorepo
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.
2026-07-08 21:33:20 -04:00