feat: update QUICK_START guide with installation steps - #780
scottschreckengaust wants to merge 4 commits into
Conversation
|
Small quickstart nit — the guide already has a # Trust mise config and install tools
command -v mise >/dev/null || curl https://mise.run | sh
eval "$(mise activate bash)"Also — is Neither is blocking. |
|
One blocker before the nits:
mise run build # or the docs-generation task
git add docs/src/content/docs/getting-started/Quick-start.mdx |
…nd spot Addresses both review comments on #780. `npm install -g aws-cdk` is not needed. `cdk/package.json` pins `aws-cdk: ^2` as a devDependency and every documented command reaches it through `mise //cdk:*`, which runs `npx cdk` against the workspace binary — Step 3 uses `mise //cdk:bootstrap` and `mise //cdk:deploy`, never a bare `cdk`. A global install can drift from the pinned version and shadow it on PATH, so the line is removed from Step 1 and the stale Prerequisites bullet (which contradicted the note directly below it) now says so explicitly. The `command -v mise` guard and `mise activate` lines are kept as reviewed. Also fixes the gate that let the mirror drift reach CI: the `docs-sync` hook filtered on `^docs/(design|guides)/.*\.md$`, and the `$` after `\.md` means `.mdx` never matched. QUICK_START.mdx is the only `.mdx` guide of 12, and it is exactly the file the hook could not see, so editing it skipped mirror regeneration locally and could only fail CI's "Files were changed during build" check. `sync-starlight.mjs` already knew how to mirror it; only the trigger was blind. The same `\.md$` bug in the trailing-whitespace / end-of-file-fixer excludes is fixed too — latent today (the mirror is clean) but it would pit those fixers against the generator. Starlight mirror regenerated and verified idempotent. Refs #780
532b256 to
be2c20a
Compare
|
Both addressed in
|
isadeks
left a comment
There was a problem hiding this comment.
Verdict
Comment — the two prior review points are genuinely resolved and CI is green, but the newly added bootstrap pair in Step 1 does not work for the user it was added for: mise.run never puts mise on PATH, so the very next line fails. One line fixes it and then I am happy to approve.
Prior threads — verified against the head commit
npm install -g aws-cdk— resolved and the reasoning checks out on the branch:cdk/package.json:62pins"aws-cdk": "^2"andcdk/mise.toml:81/95/104/108all invokenpx cdk, so nothing in the guide needs a global binary. The rewritten Prerequisites bullet (docs/guides/QUICK_START.mdx:22) also no longer contradicts themise provisions … the CDK CLI for youadmonition below it.build (agentcore)self-mutation — resolved.build (agentcore)is SUCCESS atdeb2939, and diffingdocs/guides/QUICK_START.mdxagainstdocs/src/content/docs/getting-started/Quick-start.mdxshows only the three expected Starlight link rewrites, so the mirror is in sync rather than merely re-committed.- The
docs-synctrigger fix is the best part of this PR. I re-derived it:^(docs/(design|guides)/.*\.md$|…)cannot match.mdx,QUICK_START.mdxis the only.mdxguide, andsync-starlight.mjs:251mirrors it — so the class of failure was structural, not an author oversight.\.mdx?$is the right minimal fix, and applying it to thetrailing-whitespace/end-of-file-fixerexcludes as well is correct: without it a future mirror with trailing whitespace would have those fixers and the generator reverting each other on every commit.
Should fix before merge (not architectural, but it breaks the copy-paste path)
docs/guides/QUICK_START.mdx:44-45 (and the identical mirror lines):
command -v mise >/dev/null || curl https://mise.run | sh
eval "$(mise activate bash)"The installer at https://mise.run writes to install_path="${MISE_INSTALL_PATH:-$HOME/.local/bin/mise}" and does not modify PATH or any shell rc — it only prints the suggested eval "$(mise activate …)" line for the reader to run later. So on the only path where the guard actually installs anything (no mise present), line 45 runs in a shell where mise is still not resolvable: mise: command not found, and then mise trust and mise install fail the same way. This guide's own admonition already anticipates exactly this and tells readers to use the full path ~/.local/bin/mise. Suggested fix:
command -v mise >/dev/null || {
curl https://mise.run | sh
export PATH="$HOME/.local/bin:$PATH"
}
eval "$(mise activate "${SHELL##*/}")"That also covers the second half of the problem: activate bash is hardcoded, but macOS defaults to zsh, and a bash activation hook (PROMPT_COMMAND-based) is inert under zsh — so the shell hook silently never fires and the reader lands in precisely the node: command not found / yarn: command not found state the troubleshooting table describes. Note the same guide already says eval "$(mise activate zsh)" at lines 513 and 530, so Step 1 is currently inconsistent with its own troubleshooting rows.
Nits (non-blocking)
docs-syncstill has one blind directory.sync-starlight.mjsalso mirrorsdocs/decisions/(mirrorDirectory(… 'decisions' …), confirmed by the generateddocs/src/content/docs/decisions/Adr-00*.md), but.pre-commit-config.yaml:73only selectsdocs/(design|guides). Editing an ADR therefore skips local mirror regeneration and can only fail in CI — the same failure class this PR is fixing, one directory over. One-word fix while you are in the file:^(docs/(design|guides|decisions)/.*\.mdx?$|CONTRIBUTING\.md$).- Piping a remote script into
sh, unpinned, in the repo's front-door guide is a slightly awkward precedent for a project that gates on CodeQL/semgrep. Not worth blocking a Quick Start over, but pinning (MISE_VERSION=…) or leaning on the already-linked official install guide would age better. - Prerequisites vs. Step 1. The Prerequisites list still says to install mise "before you begin" while Step 1 now installs it for you. Harmless, but one of the two should yield so the reader knows which is authoritative.
- Branch
quickstart-added-prerequisites-scriptwith no linked issue misses the ADR-003 naming/issue gate; treating that as a de-facto-waived nit for a docs fix of this size.
Vision, docs, tests
No tenet interaction — this touches onboarding copy and a local hook trigger, not admission, cost, or blast radius. Docs mirror is in sync (verified by diff, not by re-running the generator). No tests apply: there is no test asserting .pre-commit-config.yaml trigger coverage, and I would not add one for this. CI is green on all 8 checks at deb2939, including build (agentcore) — I relied on the reported CI state, not local execution, since node_modules and agent/.venv are absent in my review worktree.
Review agents run
None invoked. The diff is one YAML hook config and two Markdown files — no TypeScript, Python, IAM, Cedar, CDK construct, type definition, or error-handling code — so code-reviewer, silent-failure-hunter, type-design-analyzer, comment-analyzer, pr-test-analyzer and /security-review have no in-scope surface here; running them would also have required installing dependencies into a shared worktree. ADR-002 bootstrap coverage is not applicable: no new CloudFormation resource types.
Human heuristics
- Proportionality — pass. Two doc lines plus a one-character regex fix; the scope creep into the
trailing-whitespace/end-of-file-fixerexcludes is justified and explained. - Coherence — concern.
mise activate bashatQUICK_START.mdx:45contradictsmise activate zshat lines 513/530 of the same file. - Clarity — pass. The added
.pre-commit-config.yamlcomments explain the mechanism ($after\.md) rather than just pointing at a PR number. - Appropriateness — concern, same as the should-fix: the added snippet was validated by reasoning rather than against the real installer's PATH behaviour, which is where it breaks.
Area
cdk— infrastructure, handlers, constructsagent— Python runtime / Docker imagecli—bgagentclientdocs— guides or design sources (docs/guides/,docs/design/)tooling— rootmise.toml, scripts, CI workflowsTip: AGENTS.md lists where to edit and which tests to extend.
Related
Changes
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.