← gitpulse
Merged
Size
XL
Change Breakdown
Tests30%
Documentation25%
New Feature25%
CI/CD15%
Configuration5%
#3docs+ux+test: README, friendlier first-run, vitest + schema contract

gitpulse gains install guide, test suite, and story schema validation

gitpulse now ships with a proper install guide, 53 passing tests, and a schema contract that catches malformed stories before they reach production.

Until now, adopting gitpulse on a new repo required reading the source. The README offered a placeholder install snippet and a vague roadmap status. A newcomer had no table of workflow inputs, no provider examples, no explanation of how state was managed, and no local development instructions.

That changes with this PR. The README is now a complete install guide: copy-paste workflow pinned to @v1, a table of all inputs (bootstrap-days, ai-model, ai-protocol, ai-base-url, ai-temperature, concurrency), and provider examples for OpenAI, MiniMax, Groq, OpenRouter, and Anthropic. The "How it works" section explains the fetch-from-site state model so operators understand what happens on subsequent runs.

The first-run empty state is no longer a stark "No Stories Yet" — it reads "The press is warming up." with an eyebrow label and a link back to the install guide.

A new StorySchema acts as a contract between the analyzer and the site. The StorySchema is a discriminated union on kind: pr stories require prNumber, prUrl, and mergedAt; direct-push stories omit those fields. writeStory now calls StorySchema.safeParse before writing to disk — if a story fails validation, the analyzer throws in CI rather than silently producing JSON the site cannot render.

Fifty-three tests are distributed across Tier A (pure-function unit tests for slugify, URLs, SEO utilities, parallel map concurrency, and JSON schema constraint stripping) and Tier B (schema contract tests covering positive cases and rejection of unknown kinds, bad sizes, empty categories, negative line counts, and missing PR fields). A new CI workflow runs yarn typecheck and yarn test on every PR and push to main.