Skip to content

Harden showcase tooling and add a second worked example - #1

Merged
HenryCordes merged 2 commits into
mainfrom
henry/PROJ-000-ci-husky-second-example
Jun 19, 2026
Merged

Harden showcase tooling and add a second worked example#1
HenryCordes merged 2 commits into
mainfrom
henry/PROJ-000-ci-husky-second-example

Conversation

@HenryCordes

Copy link
Copy Markdown
Owner

Summary

Closes the gap between what this repo's docs claim and what's actually in it, and adds a second worked example so the spec-driven workflow isn't shown on only one (sync, pure) kind of problem.

Changes

  • .editorconfig, .github/pull_request_template.md — previously referenced by docs/DEVELOPMENT.md / .claude/skills/pr-description.md but didn't exist.
  • Real Husky hooks (.husky/) matching docs/GIT_HOOKS.md: pre-commit (lint-staged), commit-msg (blocks a non-conforming message or branch name), post-checkout (warns), pre-push (runs the test suite). Adjusted the pre-push doc line to match the simpler real implementation (full suite, not per-file diffing).
  • .github/workflows/ci.yml — lint/typecheck/format/test on every push and PR.
  • packageManager + engines pinned in package.json, enforcing the pnpm-only policy AGENTS.md already states.
  • Second worked example: fetchWithRetry (src/http/), run through the same spec → implementation-plan → implement path as the existing feature-flag hook, but contrasting it with an async I/O boundary, exponential backoff, an injected fetchImpl, and a typed FetchRetryError. Spec and plan in specs/2026-06-19-fetch-with-retry-design.md / specs/implementation-plans/2026-06-19-fetch-with-retry.md.
  • README updated to point at both examples and the now-real tooling.

Testing

  • pnpm lint && pnpm typecheck && pnpm format:check && pnpm test — all green (21 tests).
  • Manually verified the new hooks fire: commit-msg validated both commits in this PR against the ticket-scope pattern, pre-commit ran lint-staged, pre-push ran the suite before this branch was pushed.

Related

PROJ-000 (placeholder — no issue tracker on this personal showcase repo).

Checklist

  • pnpm lint:fix && pnpm typecheck && pnpm test pass locally
  • Tests added/updated for the change
  • N/A — no UI change
  • Branch name follows {username}/{TICKET}-{description}

docs/GIT_HOOKS.md and docs/DEVELOPMENT.md described Husky hooks, an
.editorconfig, and a PR template that didn't actually exist in the repo - a
credibility gap for a showcase whose whole point is "this is how I actually
work." This makes those docs true: real pre-commit/commit-msg/post-checkout/
pre-push hooks (validated against the exact examples already in the docs),
lint-staged, an .editorconfig, and a PR template. Also adds a GitHub Actions
CI workflow running the same lint/typecheck/format/test commands on every
push and PR, and pins packageManager/engines so the pnpm-only policy in
AGENTS.md is enforced, not just stated.
The repo only had one worked example (a sync, pure feature-flag hook), which
doesn't exercise the workflow's value on async code with a real I/O boundary.
Runs the same spec -> implementation-plan -> implement path: a typed
fetchWithRetry wrapper around fetch with exponential backoff on transient
failures (network errors, 429, 5xx), an injected fetchImpl for testability,
and a typed FetchRetryError with attempt-count and cause context. Tests use
fake timers instead of real waiting. README updated to point at both examples.
@HenryCordes
HenryCordes merged commit 0118f02 into main Jun 19, 2026
1 check passed
HenryCordes added a commit that referenced this pull request Jun 19, 2026
…-workflow-case-study

Add a parallel-review workflow and a PR #1 case study
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.

1 participant