Repository navigation
Add standards engine, scaffolds and SSH-config layer - #2
Merged
Merged
Conversation
gendia only knew the forges it had a hand-written provider for, and the accounts it could reach had to be typed into gendia.json by hand. Most users already describe their forges in ~/.ssh/config, so reading that file removes the double bookkeeping and lets gendia absorb the standalone git-helpers script. This adds the ssh/ package (config parser, JSON forge registry, key auditor, account synthesiser), Gitea, Azure DevOps and Bitbucket Server providers, GitHub Enterprise host support, the generate / scan / convert operations, the `gendia ssh` command group, `setup --from-ssh`, an ssh keys section in `doctor`, and the manual_repos / forges_file config keys.
The ten hardcoded checks in `gendia conventions` could only be extended by editing Python. Declaring rules in JSON packs lets an org add or override checks without a release, and lets the same rules drive fixes. Adds standards.py with seven check kinds, a module:function plugin hook, 16 bundled rule packs, and 21 idempotent fix kinds behind `conventions --fix [--dry-run]`. The legacy checks keep running unless `--no-legacy` is passed, so existing callers see no change.
Starting a repo that already passes the standards packs meant copying
files from an older project. Scaffolds render a known-good layout per
ecosystem and can run the audit as a post-action, so a new repo starts
clean instead of being fixed afterwards.
Adds scaffolds.py (${var} rendering, git_init / license_text / audit
post-actions, path-traversal and symlink refusal), 13 bundled scaffolds
with 17 licence texts, and the --scaffold / --list-scaffolds / --var /
--target / --merge / --dry-run flags on `gendia init`. The data
directories are force-included in the wheel so installed copies find
them.
Eighteen verbs are hard to discover from --help alone. bin/gendia-menu groups them by category and ships in the Docker image, and the Makefile gains `check` (the CI gates in one target), `menu`, and compose lifecycle targets. PYTHON now prefers 3.12+ because some hosts resolve python3 to 3.10 without the dev tools. The CI smoke job now asserts the bundled rule packs and scaffolds are present in the installed wheel and that `--fix --dry-run` and the menu still work, which catches a dropped force-include. .dockerignore trims the build context.
Records the new verbs and flags in the README and an Unreleased section in the CHANGELOG, so the next release notes can be cut from it.
The driver doc and phase tracker are planning artifacts and were not committed, so the Unreleased entry pointed readers at files that are not in the repository.
A push trigger on main runs after a change has landed and double-runs every merge. CI belongs on the pull request, with workflow_dispatch so a maintainer can re-run it by hand.
`packages = ["src/gendia"]` already ships every file under src/gendia/data, so the force-include block added each data file a second time and hatchling refused to build: "A second file is being added to the wheel archive at the same path". The editable install CI uses never builds a wheel, so this only surfaced in `pip wheel`, which is what the Dockerfile builder stage and a release run. Drop the redundant force-include (the wheel still carries all 114 data files) and add a smoke step that builds the wheel and asserts the data directory is inside, so the failure is caught on the pull request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commits work from the May 2026 session that was sitting uncommitted in the local checkout, grouped by concern, plus the follow-up fixes found while verifying it.
Feature commits (committed as found, no logic changes)
gendia/ssh/(config parser, forge registry, key auditor, account synthesiser), Gitea / Azure DevOps / Bitbucket Server providers, GitHub Enterprise host support,generate/scan/convert,gendia ssh,setup --from-ssh, ssh-keys section indoctor,manual_repos/forges_fileconfig keys.standards.py, 16 rule packs, 7 check kinds, 21 fix kinds behindconventions --fix [--dry-run]. Legacy checks still run unless--no-legacy.scaffolds.py, 13 scaffolds, newinitflags.bin/gendia-menu, Makefilecheck/menu/ compose targets, Dockerfile ships the menu,.dockerignore, smoke steps for bundled packs and scaffolds.[Unreleased].Each feature commit was checked out on its own and passes pytest, ruff and mypy at that point (195 / 333 / 408 tests).
Follow-ups
main.force-includeblock added every data file twice, sopip wheel(and thereforedocker buildand a release) failed with "A second file is being added to the wheel archive".packages = ["src/gendia"]already ships all 114 data files, so the redundant block is gone. A new smoke step builds the wheel and checks the data is inside. Editable installs never build a wheel, which is why CI did not catch this.Intentionally left uncommitted
docs/repo-standards-and-audit.md(2,822 lines, the v3.0 design and integration plan) anddocs/status.md(phase tracker). Both are design and audit artifacts. They stay untracked locally, listed in.git/info/exclude.CLAUDE.mdand.claude/: local agent config. Already ignored by the global gitignore..venv/,dist/, caches,.DS_Store,__pycache__/: already in.gitignore.gitleaks finds nothing real. Its hits are key-header string constants in
ssh/inspector.pyand example commit SHAs in the excluded design doc.Local verification
pytest 408 passed · ruff check and format clean · mypy --strict clean (71 files) · shellcheck clean · CLI smoke steps reproduced with a clean
$HOME· wheel builds with all data files.