Skip to content

Phase 3a: add a pre-commit standard to core:setup-repo - #14

Open
jonnyspicer wants to merge 7 commits into
mainfrom
feat/setup-repo-phase-3a
Open

Phase 3a: add a pre-commit standard to core:setup-repo#14
jonnyspicer wants to merge 7 commits into
mainfrom
feat/setup-repo-phase-3a

Conversation

@jonnyspicer

Copy link
Copy Markdown
Contributor

Adds a pre-commit standard to core:setup-repo for the Python and TS stacks, with CI as the single source of truth — lint/format/hygiene are defined once in .pre-commit-config.yaml and run both locally (git hook) and in CI. First half of Phase 3; the C++/CMake stack (Phase 3b) is a separate later sub-project.

What's added

  • pre-commit configs (assets/precommit/): python.yaml (hygiene hooks + astral-sh/ruff-pre-commit: ruff --fix, ruff-format) and ts.yaml (hygiene hooks + a local npx eslint --fix hook). Both pin pre-commit-hooks@v5.0.0; python pins ruff-pre-commit@v0.8.0.
  • CI = single source of truth: ci-python.yml and ci-node.yml now run uvx pre-commit run --all-files for lint/format/hygiene (the direct ruff check/ruff format and npm run lint steps are removed). Tests (pytest / typecheck + test) stay. The node CI gains a Python+uv step so it can run pre-commit.
  • Engine: copies .pre-commit-config.yaml for python/ts stacks (not none).
  • SKILL.md: install step registers the hook (uvx pre-commit install); CLAUDE.md guidance now points at pre-commit run --all-files as the lint/format command.
  • Version bumped 0.4.0 → 0.5.0.
  • New test-precommit-assets.sh (wired into this repo's CI) + updated CI/scaffold tests.

Out of scope: C++ (Phase 3b), prettier, typecheck-on-commit.

Verification

  • All five suites pass (test-precommit-assets, test-python-assets, test-ci-assets, test-node-assets, test-scaffold) and claude plugin validate . passes.
  • Real pre-commit run --all-files on freshly scaffolded temp repos: python (rc=0; hygiene passed, ruff skipped — no .py in the base scaffold) and ts-frontend (rc=0 after npm install; hygiene + eslint passed).

Process

Subagent-driven: fresh implementer per task, per-task spec+quality review with fixes, Opus whole-branch review (verdict: ready to merge). The validator was hardened to pin the hook revs, ruff --fix, and the eslint hook fields.

🤖 Generated with Claude Code

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