Skip to content

DX Improvements: Linting, Formatting & Pre-Commit Hooks#1458

Merged
TimothyZhang7 merged 3 commits intoaden-hive:mainfrom
TimothyZhang7:release/v_0_3_0
Jan 27, 2026
Merged

DX Improvements: Linting, Formatting & Pre-Commit Hooks#1458
TimothyZhang7 merged 3 commits intoaden-hive:mainfrom
TimothyZhang7:release/v_0_3_0

Conversation

@TimothyZhang7
Copy link
Collaborator

DX Improvements: Linting, Formatting & Pre-Commit Hooks

Hey everyone — we just shipped a bunch of developer experience improvements. Here's the rundown.

What was broken

Honestly, the DX around code quality was pretty bare-bones:

  • No pre-commit hooks. Nothing stopped unlinted code from getting committed. You'd push, wait for CI to fail, fix, push again. Rinse and repeat.
  • No Makefile or common commands. You had to remember the right ruff invocations and manually cd into the correct package directory.
  • No VS Code setup. No recommended extensions, no format-on-save, no import resolution. Pylance couldn't find framework or aden_tools imports without manual config.
  • Import sorting was a mess. core/ and tools/ have different first-party packages (framework vs aden_tools). A single global ruff config would re-sort imports wrong for one of the two packages — on every single commit.
  • No AI tooling hooks. If you use Claude Code or Cursor, edits didn't follow project conventions automatically.
  • Type errors everywhere. No Pyright/Pylance config meant cross-package imports were unresolved, contributing to the 136+ type errors flagged in [Bug]: 136 Type Errors found by mypy (Potential Runtime Crashes) #1081.

Open issues addressed by this work

This DX overhaul directly addresses or makes progress on the following open issues:

What we added

  • Pre-commit hooks (.pre-commit-config.yaml) — Every git commit now auto-lints and auto-formats your staged Python files. Hooks are scoped per package so import sorting just works. One-time setup: make install-hooks.
  • Makefilemake lint, make format, make check, make test. make check is the exact same thing CI runs, so if it passes locally, you're good.
  • VS Code workspace config (.vscode/settings.json, .vscode/extensions.json) — Format-on-save, auto-fix on save, column 100 ruler, and correct import resolution for both packages. Just accept the recommended extensions when VS Code prompts you.
  • Pyright config (pyrightconfig.json) — Cross-package imports resolve automatically now.
  • CI updated (.github/workflows/ci.yml) — Checks both ruff check and ruff format --check, scoped per package.
  • Claude Code hooks (.claude/settings.json) — Auto-runs ruff after every file edit. No setup needed.
  • Cursor rules (.cursorrules) — Tells Cursor's AI about project conventions.
  • EditorConfig (.editorconfig) — Baseline formatting for any editor.
  • Per-package ruff config (tools/pyproject.toml) — tools/ now has its own [tool.ruff] section with known-first-party = ["aden_tools"], matching core/'s config for framework.

How to set up

cd core && pip install -e ".[dev]"
make install-hooks

That's it. You're done. Every commit from here on is auto-linted and formatted.

For the full details (rule sets, editor config, FAQ), see docs/contributing-lint-setup.md.

@github-actions github-actions bot closed this Jan 27, 2026
@aden-hive aden-hive deleted a comment from github-actions bot Jan 27, 2026
@TimothyZhang7 TimothyZhang7 reopened this Jan 27, 2026
@TimothyZhang7 TimothyZhang7 merged commit ad968a0 into aden-hive:main Jan 27, 2026
1 of 4 checks passed
jhalak999 pushed a commit to jhalak999/hive that referenced this pull request Feb 17, 2026
DX Improvements: Linting, Formatting & Pre-Commit Hooks
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