cc-terraform-harness
CLAUDE.md1 starsChanged 26 days agoApache-2.0View on GitHub
Every command goes through make. Each target delegates to uv or to a script under scripts/: format.sh holds the format steps and lint.sh the lint steps. Python 3.14 (.python-version), uv, ruff, ty, pytest, mdformat and pre-commit. .github/actions/bootstrap/action.yml defines the CI setup and pins uv 0.13.1 and Claude Code 2.1.301. .github/workflows/ci.yml defines CI's quality job, which runs the pre-commit hooks on all files and then the tests. Match it with make pre-commit, then make test. make check is the faster local…
In this repository8 other files it gives its agents.
- check-moduleSkill
- explain-planSkill
- fix-review-findingsSkill
- look-up-schemaSkill
- onboard-toolchainSkill
- review-moduleSkill
- trace-change-impactSkill
- writing-terraformSkill
The file
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 5
Every command goes through make.
- Very specific: line 27
Read .claude/rules/python.md before writing Python and .claude/rules/testing.md before writing tests.
- Very specific: line 31
Commit subjects follow Conventional Commits as the history does: type(scope): subject, with the subject in lowercase imperative and no …
- Distinctive: line 36
Always: run the Verification commands before calling work done.
- Very specific: line 37
Ask first: edits to pyproject.toml, uv.lock, ruff.toml, pytest.toml and ty.toml, which .claude/settings.json lists under permissions.ask.
- Very specific: line 38
Never: weaken the ruff or ty configuration.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
mightymodels: agent instructions
Commands
Every command goes through make. Each target delegates to uv or to a script under scripts/: format.sh holds the format steps and lint.sh the lint steps.
make setupinstalls the pre-commit git hook and syncs every workspace package and dependency group. A fresh clone has no git hook, so run it before the first commit.make syncsyncs the workspace packages and dependency groups.make formatruns the formatters.make lintruns ruff check, ty, shellcheck, shfmt and mdformat without fixing anything.make typecheckruns ty alone.make testruns pytest with coverage.make pre-commitruns every pre-commit hook on all files, including the hygiene fixers and uv-lock.make checkruns lint, then test.make qualityruns format, lint and test.
Stack
Python 3.14 (.python-version), uv, ruff, ty, pytest, mdformat and pre-commit. .github/actions/bootstrap/action.yml defines the CI setup and pins uv 0.13.1 and Claude Code 2.1.301.
Layout
- The plugin sits at the repository root, and
.claude-plugin/plugin.jsoncontains its manifest. The rootpyproject.tomlis both the plugin project and the uv workspace root, with members underpackages/. packages/mcpholds the terraform MCP server (tf_harness_mcp), which.mcp.jsonlaunches and whose tests live inpackages/mcp/tests.packages/hooksholds the plugin's hooks (tf_harness_hooks, run through thetf-harness-hooksCLI withfmt,readandsession-start), whichhooks/hooks.jsonregisters and whose tests live inpackages/hooks/tests..claude/hooks/pyhooks.pyis the repository's own development hook, a PEP 723 script that.claude/settings.jsonwires to Write, Edit and Read. ty does not check it, becausety.tomlincludes onlypackagesandtests.- Read
.claude/rules/python.mdbefore writing Python and.claude/rules/testing.mdbefore writing tests. Both load on their own when you touch a matching file.
Conventions
- Commit subjects follow Conventional Commits as the history does:
type(scope): subject, with the subject in lowercase imperative and no closing period. The types in use are feat, fix, ci, build, style and docs. - The plugin version lives in both
pyproject.tomland.claude-plugin/plugin.json.tests/test_release_metadata.pyfails when they differ, and the release workflow (.github/workflows/cd.yml) bumps both.
Boundaries
- Always: run the Verification commands before calling work done.
- Ask first: edits to
pyproject.toml,uv.lock,ruff.toml,pytest.tomlandty.toml, which.claude/settings.jsonlists underpermissions.ask; version bumps, which the release workflow owns; changes to.claude/settings.jsonor.claude/hooks/pyhooks.py, because every session runs the hooks they define. - Never: weaken the ruff or ty configuration; hand-edit
uv.lock, which the uv-lock hook regenerates; commit.mightymodels/, which stays a local-only git exclusion (SECURITY.md).
Verification
.github/workflows/ci.yml defines CI's quality job, which runs the pre-commit hooks on all files and then the tests. Match it with make pre-commit, then make test. make check is the faster local loop, but it skips the hygiene and uv-lock hooks, so it can pass where CI fails.
make test also runs each package's tests, because testpaths in pytest.toml collects packages/*/tests. For a change confined to packages/mcp, uv run pytest -q packages/mcp/tests is the faster loop, and uv run pytest -q packages/hooks/tests is the one for packages/hooks.
Claude Code
- Inside the Bash sandbox, whole-tree checks (
make lint,make check,make pre-commit) can fail on sandbox mount points such as.mcp.jsonor.claude/skills, which show up as character devices. A failure that names one of those paths comes from the sandbox, not the repository: report it rather than changing code to get past it. - The project hooks run on every tool call: before a Write or Edit, a check asks for approval when the change adds a lint or type suppression; after it, the formatter runs; after a Read, ruff and ty report diagnostics on the file.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

