Repository navigation
feat(scaffold): ship generate.sh and advance-state.sh - #176
Merged
Merged
Conversation
generate.sh bundles the specs once and runs `specfuse authoring generate generate --group` per selected group (the generator's --group takes one name): groups by name, --lang (repeatable, with aliases), or an explicit `all`; --list and --dry-run. It names every destination that lands in another git repo with its branch, and refuses to regenerate into one with uncommitted changes unless --allow-dirty. A project-owned, executable scripts/post-generate.sh runs after each group for language steps the generator does not run (e.g. Dart build_runner). advance-state.sh wraps the generator's `baseline` command: it keeps a group's new stateDir baseline only when its destination repo is clean, on its default branch and level with origin, and restores every other group's state file, so the changelog baseline only ever moves to merged code. Both read the project file with python3 (no jq) and run on macOS bash 3.2. CI covers the offline guards in a fresh scaffold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
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.
Closes #170.
Two scripts land in
scripts/specfuse/throughinitandupgrade. Both are generic versions of RestoManager's production scripts.generate.shasyncSpecificationsis set. Then runsspecfuse authoring generate generate --progress --group <g>once per group.--lang(repeatable; aliasescs/dotnet,py,flutter,ts,docs), or with an explicitall. Also supports--list,--dry-run,--skip-validationand--spec-version.--allow-dirtyis passed.scripts/post-generate.sh(outsidescripts/specfuse/, so upgrades leave it alone) runs after each group with<group> <language> <destination> <basePackage>. The README has a Dartbuild_runnerexample.stateDirchanges.advance-state.shbaselinecommand.origin/HEAD, elsemain, or--branch) and level with origin. Every other group's state file is restored, including groups that write into the spec repo itself.stateDirhas uncommitted changes. Supports--dry-run,--repoand--no-fetch.stateDirfrom the project file.Differences from RestoManager's scripts
baseline. It exits 0 on success (checked).verify-generatedstep; those go in the hook.Tested locally with
/bin/bash3.2 on two repos: hello-orders as the spec repo, plus a siblingBackendrepo with a bare origin.--list;all --dry-run; refusal on a dirty repo; unknown group; a realallrun with the hook getting the right arguments.stateDiris dirty--dry-runkeeps nothing; the real run keeps onlyDomain.jsonand drops the in-repoLocalgroup's file--repofilters correctlyNotes
main, not stacked on feat(generator): per-project generator pin with checksum, plus an unpinned local-jar override #175. The scripts go throughspecfuse authoring generate, so they use a project pin automatically once feat(generator): per-project generator pin with checksum, plus an unpinned local-jar override #175 merges.ci.ymlbecause feat(generator): per-project generator pin with checksum, plus an unpinned local-jar override #175 also appends one at the end, and two end-of-file additions would conflict./generateskill atgenerate.sh. I didn't do that here to avoid conflicts.🤖 Generated with Claude Code