Skip to content

chore(evolve): AI improvement pass — 2026-09-07 - #11

Closed
bamr87 wants to merge 1 commit into
mainfrom
ai-evolution/20260907-34104242537
Closed

bamr87 wants to merge 1 commit into
mainfrom
ai-evolution/20260907-34104242537

Conversation

@bamr87

@bamr87 bamr87 commented Sep 7, 2026

Copy link
Copy Markdown
Owner

What changed

  1. project-init.sh:1-47 — replaced the Python-style """…""" header block with the repo's standard #-comment header (same content, same fields, rewrapped to 79 cols).
  2. project-init.sh:67-89 — dropped readonly from CONFIG_FILE and added explicit VAR="${VAR:-}" declarations for the eleven wizard settings (PROJECT_TYPE, NON_INTERACTIVE, …).
  3. project-init.sh:122-133 — new require_value() helper; main()'s --config/--type/--name/--dir cases now call it before consuming $2.
  4. project-init.sh:884-938main() stages --config/--type/--name/--dir into locals, then sources the --config file (erroring if it doesn't exist) and re-applies the flags on top, so an explicit flag still beats the config file.
  5. project-init.sh:989-1022--help: described what --config actually does, added the .env / saved-config / log-file locations, and replaced the placeholder URL https://github.com/your-repo/project-wizard with https://github.com/bamr87/scripts.
  6. git_init.sh:100-*|--*=)-*); the second alternative was unreachable.

Why

  • (1) is a shellcheck error, SC2289. Bash parses """ as "" plus an unterminated quote running to line 41, making the whole header one command word — so every invocation, including --help, printed a 40-line "command not found" before doing anything (set -euo pipefail is on line 43, after the header, so it didn't abort). CLAUDE.md notes the hub's tools/run-all-tests.sh shellchecks the top-level *.sh here, so an error-severity finding in a root script fails the hub's aggregate verification.
  • (2) fixes two set -u aborts on the interactive path: run_wizard reads "$PROJECT_TYPE" (line 577 pre-edit) and "$NON_INTERACTIVE" (612/617/623/629) while both are unset, so plain ./project-init.sh with no .env in cwd died with unbound variable right after the banner. Dropping readonly fixes --config, which assigned to a readonly var and therefore aborted under set -e — the flag was documented in both README.md and --help but could not be used.
  • (4) --config was write-only: CONFIG_FILE is only ever written at the end of main(), never read. Now it's actually sourced, which is what the help text promises and mirrors the existing source .env in run_wizard.
  • (3) without it, --type as the trailing argument tripped set -u on the bare "$2" and exited with $2: unbound variable.
  • (5)/(6) are the brief's "usability / clear --help" and "clarity" items; (6) also clears SC2221+SC2222.

Verification

  • shellcheck --severity=error *.sh FORKME/forkme.sh STASHME/stashme.sh linting/*.sh → exit 0 (was SC2289 on project-init.sh:2). Exit 0 at error severity also confirms both edited files parse cleanly.
  • shellcheck --severity=warning project-init.sh git_init.sh → SC2289, SC2221, SC2222 gone; no SC1090 introduced (directive added for the caller-supplied source path). Remaining output is pre-existing SC2155 ×3 and SC2294 ×1, untouched.
  • python3 tools/unwrap-prose.py --check → "All markdown prose already unwrapped."
  • git status --short → only git_init.sh and project-init.sh modified; no scratch files.
  • I could not execute either script in this sandbox (bash <script> is blocked), so the runtime fixes are verified by static analysis and bash quoting/set -u semantics, not by an actual run. A reviewer should confirm with ./project-init.sh --help (should print help with no "command not found" spew) and ./git_init.sh --headless -n previewme --dry-run.

Not done

  • README.md claims project-init.sh supports Rust and Go — it does not. There is no rust/go branch anywhere in the file: run_wizard's menu offers only Django/React/Node.js/Python/Custom, and initialize_project's case matches the same five. README's feature list, its PROJECT_TYPE options table, and its whole "### Rust Projects" / "### Go Projects" sections are fiction. I left README alone because PR chore: retire tooling superseded by the hub's fan-out kits #9 rewrites it (+106/−412) — and its replacement text keeps the claim (… Django, React, Node, Python, Rust, Go, custom in the new tool-index table, plus the PROJECT_TYPE row). Either the README rows go, or the two handlers get written. Needs a decision, not a guess. CLAUDE.md repeats the same claim.
  • --type can still be overridden by a stray .env. In interactive mode run_wizard sources .env from the current working directory after main() has applied the flags, so PROJECT_TYPE in that file silently wins over --type. Pre-existing; I did not reorder it because moving the .env load into main() changes precedence for existing users. Worth fixing deliberately.
  • Repo-wide shellcheck still exits non-zero at default severity — SC2155 (×9 across forkme.sh, stashme.sh, project-init.sh), SC2001 (×3, stashme.sh), SC2317 (×3, stashme.sh's indirectly-invoked helper). All mechanical, all pre-existing; fixing them is a sweep across files that PR chore: retire tooling superseded by the hub's fan-out kits #9 doesn't touch but that isn't this pass's job.
  • Conformance MUSTs left open. UPS-REPO-14 (SECURITY.md) and UPS-REPO-18 (issue templates) are collision-free new files, but I have no read access to bamr87/bamr87 from this runner (gh api repos/bamr87/bamr87/contents/specs is not permitted here), so I could only invent them rather than lift the reference implementation the brief asks for. PR chore: retire tooling superseded by the hub's fan-out kits #9's own follow-up section argues issue templates should become a hub issue-templates fan-out artifact instead of local files — worth resolving there first. UPS-QA-32 (release-please), UPS-QA-41 (dependabot) and UPS-REPO-13 (CHANGELOG) are release/version plumbing this pass is barred from touching; note that dependabot also sits awkwardly against the fleet's ALWAYS-LATEST policy. UPS-AGENT-03 (CLAUDE.md kit stamp) and UPS-AGENT-22 (vendored unwrap-prose.py drift) both need the hub's exact current version, which I can't read.

Draft opened by the bamr87/bamr87 repo-evolution looprun; the brief the agent worked from is attached to that run as evolution-workorders. Machine-authored: review it as you would any contribution. Nothing here merges automatically, and no new pass is opened for this repository while this one is open.

Documentation, clarity, and functionality pass from the bamr87/bamr87 repo-evolution loop (run 34104242537). Draft for human review; nothing merges automatically.
@bamr87 bamr87 added automation Automated / bot-generated ai-evolution Draft improvement PR from the bamr87 repo-evolution loop labels Sep 7, 2026
@bamr87

bamr87 commented Sep 13, 2026

Copy link
Copy Markdown
Owner Author

Closed as draft/stale evolve AI pass; reopen if still wanted.

@bamr87 bamr87 closed this Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-evolution Draft improvement PR from the bamr87 repo-evolution loop automation Automated / bot-generated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant