Skip to content

create-hawk-app: make GitHub optional, verify the app actually renders - #1

Merged
tytremblay merged 3 commits into
mainfrom
agent/create-hawk-app
Aug 28, 2026
Merged

create-hawk-app: make GitHub optional, verify the app actually renders#1
tytremblay merged 3 commits into
mainfrom
agent/create-hawk-app

Conversation

@willtoth

Copy link
Copy Markdown
Contributor

Findings from a live 2h35m run of create-hawk-app that produced a working app but hit three avoidable walls. None of them were the model going off-script — the skill and the template told it to do those things.

1. GitHub was mandatory on every path

The template repository was private, so even the "never leaves this computer" path needed gh and a signed-in account. SKILL.md called it "required, not optional". That forces a GitHub account on a skill whose stated audience "has never programmed or used Git".

FRC2713/hawk-app-template is now public, so downloading it needs Git and nothing else.

  • preflight.sh / .ps1 gain --github yes|no|unknown (default no) and a third report level, Worth knowing, that reports without blocking. Only Needs attention still exits 1.
  • Template access is probed with an anonymous git ls-remote. If that fails but a credentialed one succeeds, the repo has gone private again and preflight says so — instead of passing on borrowed credentials and stranding the next student on a fresh machine.
  • The GitHub question moves to phase 1, where it decides which tools are needed at all. gh is installed just in time, only on a yes. The this-computer-only path is a plain git clone.

Verified: with gh absent from PATH and an empty environment, preflight now exits 0 and an anonymous clone succeeds.

2. The app rendered as unstyled text and every check passed

The template shipped security.csp: true; Astro only hashes inline styles at build time, so the dev server's inline Tailwind was blocked. /health returns JSON and npm run check builds for production, so nothing noticed. Fixed in FRC2713/hawk-app-template#1.

Here, phase 7 now runs npm run check:render against the server it just started, falls back to an inline CSP probe on older apps, and asks the user to confirm what they see before anything is called working. The "never treat Playwright browsers as initial requirements" rule is scoped to preflight rather than read as a ban — not being able to see the page is what turned a one-line fault into two confident wrong diagnoses.

3. Git ambushed the user at the end

The commit offer was followed by a second unplanned prompt, because user.name/user.email were unset. The user left with "let just skip git and build the app" — and the skill had no instruction for what happens next, so it improvised straight into building an entire feature, skipping the plan-approval gate AGENTS.md requires.

Identity is now read in phase 5, folded into a single commit question, a decline is accepted once and never re-asked, and the skill states plainly that it stops at the receipt.

Also: Node installed where the agent couldn't see it

The run piped curl into bash to install nvm — the pattern SKILL.md forbids, offered by the skill itself as recommended. nvm appends to ~/.bashrc below Ubuntu's non-interactive early return, so node stayed invisible to the agent's own shell and ~25 later commands carried an absolute-path prefix.

platform-setup.md now fixes an install order, prefers symlinking into ~/.local/bin (already on PATH, no profile edit — which is exactly why the gh install caused no trouble in the same session), and requires verifying with both bash -ic and bash -c, which disagree.

Plus: version was 0.3.0 in .codex-plugin and 0.4.0 everywhere else; all now 0.5.0.

Verification

  • preflight.sh exercised for: default/no-gh (exit 0), --github yes without gh (exit 1), no gh on PATH at all (exit 0), bad flag value (exit 2).
  • Full new-app rehearsal: plain git clone → remove remote → npm cidoctordevcheck:render, all green.
  • ⚠️ preflight.ps1 carries the same changes but could not be executed here — WSL interop is disabled on this machine. It needs a run on Windows before release.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KwyEjaCaTwhkRkTUMq9hep

willtoth and others added 3 commits August 16, 2026 11:57
Reworked after watching the skill run end to end with a real novice
setup. The run surfaced several places where the skill sent the operator
down a dead end or spent the user's time on a wrong diagnosis.

Preflight:

- Replace preflight.mjs with preflight.sh (POSIX) and preflight.ps1
  (PowerShell 5.1). The old script needed Node, which is exactly what is
  missing when preflight matters, so it never ran once in the live
  session. Both twins report the same table and exit codes.
- Detect Windows node/npm/gh shadowing the Linux ones under /mnt in
  WSL2. That produced a "WSL 1 is not supported" error that had nothing
  to do with the real problem.
- Treat the GitHub CLI as required rather than optional: the template is
  private, so even a local-only app cannot be downloaded without it.
- Distinguish "not signed in" from "signed in but has no access".
- Accept an existing empty destination instead of refusing it.
- Check for OneDrive-synced destinations on Windows.
- Drop a dead ternary and the unused --json mode.

Skill guidance:

- State supported platforms: macOS, Linux, WSL2, native Windows. Do not
  assume a POSIX shell, a bash profile, or a ~/ destination.
- Never try to answer a privilege prompt. Neither the agent's shell nor
  an in-session ! prompt can supply a sudo password or click a UAC
  dialog; hand the command over and verify afterwards.
- Document the no-password install path that actually worked, for all
  platforms, with verified per-platform archive names.
- Add a native-build ladder. The live run installed build-essential, 52
  system packages, on the strength of an empty GitHub Releases page,
  when the package ships prebuilds inside the npm tarball and needed no
  toolchain at all.
- Make preflight a gate on entering phase 4, with an inline fallback so
  a broken helper never ends the session.
- Record absolute bin paths after a non-default install; a profile edit
  does not reach the running shell.
- Offer the first commit at handoff. A novice does not know commits
  exist, so waiting to be asked leaves their work unprotected.
- Name template gaps during the brief and park guesses under Open
  questions.

preflight.ps1 is unverified on a real Windows machine; WSL interop was
unavailable to test it. It is treated as a convenience, not a
dependency, so a failure degrades to inline checks.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Findings from a live 2h35m run of the skill.

GitHub was mandatory on every path, including the one that never leaves the
computer, because the template repository was private. That forced a GitHub
account on a skill whose stated audience has never programmed or used Git.
Downloading a public template needs Git and nothing else:

- preflight gains --github yes|no|unknown (default no) and a third report level,
  "Worth knowing", which reports without blocking. Only "Needs attention" still
  exits 1, so a machine with no gh at all can now pass.
- Template access is probed with an anonymous git ls-remote. If that fails but a
  credentialed one succeeds, the repository has gone private again and the run
  says so, instead of passing on borrowed credentials and stranding the next
  student on a fresh machine.
- The GitHub question moves to phase 1, where it decides which tools are needed;
  gh is installed just in time, and only on a yes. The this-computer-only path
  is a plain `git clone`.

The app rendered as unstyled text and every check still passed, because
/health returns JSON and `npm run check` builds for production while phase 7
starts the dev server. Phase 7 now runs `npm run check:render` against the
server it just started and asks the user to confirm what they see before
anything is called working. The Playwright rule is scoped to preflight rather
than read as a ban, since not being able to see the page is what turned a
one-line CSP fault into two wrong diagnoses.

Git ambushed the user at the end: the commit offer was followed by a second
unplanned prompt because user.name and user.email were unset, and they left with
"let just skip git and build the app". Identity is now read in phase 5 and
folded into a single commit question, a decline is accepted once and never
re-asked, and the skill states that it stops at the receipt -- the previous run
slid from handoff into building a whole feature, skipping the plan-approval gate
AGENTS.md requires.

Node was installed by piping curl into bash -- the pattern SKILL.md forbids and
which the skill itself offered as recommended. nvm appends to ~/.bashrc below
Ubuntu's non-interactive early return, so node stayed invisible to the agent's
own shell and ~25 later commands carried an absolute-path prefix. The reference
now fixes an install order, prefers symlinking into ~/.local/bin (already on
PATH, no profile edit -- which is why the gh install caused no trouble), and
requires verifying with both `bash -ic` and `bash -c`, which disagree.

Also: version was 0.3.0 in .codex-plugin and 0.4.0 elsewhere; all now 0.5.0.

preflight.sh verified for the no-gh, --github yes, and bad-argument cases.
preflight.ps1 carries the same changes but could not be executed here -- WSL
interop is disabled, so it needs a run on Windows before release.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KwyEjaCaTwhkRkTUMq9hep
@willtoth
willtoth requested a review from tytremblay August 28, 2026 01:03
@tytremblay
tytremblay merged commit 13fb0cf into main Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants