Thanks for your interest in method-kit. This repository ships a transverse methodology:
the METHOD.md operating method and the project-pilot skill suite — one installable
container that bundles the procedural tools as modules, with the steering-doc templates
and the bootstrap runbook as its resources. Most code is pure standard library; the
quality/security tooling (ruff,
bandit) is declared as PEP 735 dependency-groups in pyproject.toml, pinned to exact
versions — there is no requirements.txt manifest.
This guide is for two audiences:
- Contributors who want to propose a change via a pull request.
- Forkers who want to run their own version. For forks, also read
CI_CD.md, which explains which protections live in files (and travel with a fork) and which live in repository settings (and do not).
main is the protected trunk: every change is meant to land through a pull request that
passes the required checks (quality, tests, security, docs-privacy, Analyze (python)).
Honest note on enforcement: on this repository's current tier, the Layer-B settings that
enforce the rule (branch protection + the code-scanning ruleset) are defined in files but
not yet active — the GitHub API rejects them on a free private repo (see CI_CD.md
§5–§6). The workflows still run and report on every pull request, and the gated-PR rule is
held by discipline until Layer B is activated. Treat the gates as required.
- Python 3.12 (the version CI runs on).
- The quality/security tools, installed from the
devdependency-group so your local versions match CI exactly (needs pip >= 25.1 for PEP 735):
python -m pip install --upgrade pip;
python -m pip install --group devThe dev group pulls ruff==0.15.18, bandit[toml]==1.9.4, pytest==9.1.1, defusedxml==0.7.1, and — on Windows — tzdata
(which zoneinfo needs there). defusedxml is a runtime dependency of the diagram checker
(declared in its module requirements.txt); the tests floor imports it.
A virtual environment is recommended but not required.
Run the same checks CI runs, from the repository root. If they pass locally, your pull request will go green on the first try.
bash scripts/gates/quality.sh;
bash scripts/gates/tests.sh;
bash scripts/gates/security.shNotes:
ruff format --check .only reports; to apply formatting runruff format ..ruff/banditscan the whole repository (.venvis excluded by the ruff config).- The
testsgate runs the module floors (exit 0/1, pure standard library), auto-discovered byscripts/discover_floors.py --run— adding a module drops a# FLOORscript and the gate finds it. It then runspytest tests/; the first non-zero exit fails the check. - On Windows,
scripts/gates/tests.shexportsPYTHONUTF8=1before the floors run, so the steering-docs floor can print status glyphs (🟢/🟡/⬜) the default cp1252 console cannot encode. CI (Ubuntu) is UTF-8 and needs no prefix. Analyze (python)(CodeQL) runs in CI only — it is not reproducible locally.
flowchart LR
F["Fork or branch"] --> L["Run gates locally<br/>ruff · bandit · compile · floors"]
L --> PR["Open a PR to main"]
PR --> C{"quality · tests · security · docs-privacy · Analyze (python)<br/>all green? branch up to date?"}
C -- yes --> M(["Squash-merge"])
C -- no --> Fix["Fix and push again"]
Fix --> C
- Fork the repository (or, if you have write access, create a branch).
- Create a topic branch, e.g.
git checkout -b fix/short-description. - Make your change and run the gates locally (above).
- Commit and push your branch, then open a pull request targeting
main. - Wait for the required checks to pass:
quality— ruff lint + format, projected-doc drift (doc-drift), and thecompileallsweep overskills/.security— Bandit security scan.tests— the auto-discovered module floors pluspytest tests/.docs-privacy— private-marker scan overdocs/**.Analyze (python)— CodeQL semantic security analysis.
- Your branch must be up to date with
mainbefore merging. - Once Layer B is active, a merge is also blocked if CodeQL reports a code-scanning alert at or above the configured threshold (security severity High+, or any error).
The full description of each gate is in CI_CD.md.
- Use a short, conventional prefix:
ci:,docs:,fix:,feat:,chore:. (Nodeps:— no pip manifest is tracked; CI action pins are full SHAs, re-pinned by hand when theaction-driftwatcher flags an upstream tag move.) - Keep one family of changes per pull request; documentation accompanies the change it describes.
- Consider committing with a GitHub
noreplyemail to avoid leaking a real address in public history.
- No personal data. Names, addresses, real CVs, real company names — all fixtures and examples must be fictional.
- No build artifacts.
dist/is git-ignored; the release workflow builds and publishes it on av*tag push.