Scaffold bellows: gh-parity command tree, Forgejo client, codegen and CI #1
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/scaffold"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Scaffold for bellows, a Forgejo CLI aiming at 1:1 parity with
gh2.101.0. .NET 10, Native AOT, System.CommandLine, and a Kiota client generated from the Forgejo API spec. Targets Forgejo 15.x LTS, 16.x and Codeberg.Every
ghcommand exists with its flags and aliases, but each one only reports its parity status and exits 1. Design:docs/superpowers/specs/2026-09-26-bellows-scaffold-design.md(§10 lists where the build diverged from the design). Plan:docs/superpowers/plans/2026-09-26-bellows-scaffold.md.What's in it
bellowsCLI (src/Bellows.Cli): all 227ghcommands as stubs, built from a generated table. Hand-written commands are registered first, and any path they occupy skips its stub. Help answers to--help/-?everywhere, and to-hon every command that doesn't bind-hto--hostname.src/Bellows.Core): Forgejo version parsing, plus version gates for the 15 API operations added in 16.0.src/Bellows.Forgejo): the Kiota client generated from the pinned v16.0.5 spec. The token is only ever sent to its own server.tools/Bellows.Codegen): the Forgejo spec fetcher, gate generator,ghreference parser, parity manifest and stub generator. Generated output is committed, and builds never run codegen..forgejo/workflows/ci.yml), four jobs:Verification
dotnet restore --locked-modescripts/aot-smoke.sh: a 3.1 MB native binary with no IL warnings.dotnet format --verify-no-changesis clean.Audit
A full nitpicker audit ran over this branch. The record is in
docs/audit/(the architecture profile and the findings store)..gitignorerules forReleases/andLogs/had silently dropped 10 generated Kiota files from git, so a fresh clone would not compile.ci-219e9277: once these jobs have reported, makelint,build-test,codegen-driftandaot-smokerequired checks onmain.audit-cf75603a: the API client, token provider and version gates are not called by any command yet. They are wired in the config/auth cycle.Notes for review
global.jsonpins SDK 10.0.400 withrollForward: disable. Other SDK patches are refused on purpose, because the lock files record AOT packages that follow the SDK's bundled runtime. To move SDKs, bump the pin and rundotnet restore --force-evaluatein the same commit.gh's own wording, so it mentions GitHub until each command is implemented.gh prints a subcommand alias once per name of its parent group ("gh ext ls, gh extension ls, gh extensions ls"), so the parser recorded "ls" three times. Found by the parity test.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.