feat(cloud-bootstrap): add canonical synced repo cloud bootstrap - #397
Conversation
Promote the per-repo .claude/cloud-bootstrap.sh to a standards-owned component (components/cloud-bootstrap/) and distribute it by exact materialization: managed for .github, ci-runner, ci-workflows, github-iac, and provisioning; locally-owned for claude-code-plugins (directory-source dogfooding) and medley (repo-specific toolchain, converge later). The fleet's twelve hand-copied bootstrap generations collapse to one reviewed file. The canonical script is generic by construction — no repo names, marketplace identifiers, or pinned versions. Everything is data-driven from the consuming repo's own manifests: Node from .node-version, npm ci from the root lockfile, the .NET SDK exactly as global.json pins, marketplaces and plugins from .claude/settings.json (every declared marketplace, every enabledPlugins entry set to true, whichever marketplace it names). It also logs the environment snapshot stamp for per-account build visibility, repairs the shallow single-branch cloud clone so base-ref diffs work, and runs a repo's committed .claude/cloud-bootstrap.local.sh as the never-synced enrich seam — this repository's own extension installs each component project's lockfile. Guards added alongside: - cloud-bootstrap.test.sh: parse, generic-by-construction (no marketplace or repo identifiers), calling-contract landmarks, stamp-path lockstep with the cloud-environment component, and byte-equality between the component and this repository's own materialized copy (standards is the manifest source, not a sync target). - setup.test.sh: the cloud-environment Node warm-cache pin is now lockstep-tested against this repository's .node-version instead of relying on the README's manual obligation. - distribution/check-plugin-baseline.sh: report-only fleet drift check of each target's enabledPlugins/marketplace declarations against this repository's own settings file (the dogfooded fleet baseline), with an offline --compare mode exercised by its test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012tKxg98B3QySqEPf8UqwX3
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @kyle-sexton's task in 4m 38s —— View job Code review — cloud-bootstrap component
Scope reviewed: all 12 changed files ( Findings (posted inline on
Both findings are scoped to the new, optional No other correctness or maintainability issues found in |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9783bfa755
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
…leet report portability - Run the cloud-bootstrap.local.sh enrich seam inside the toolchain subshell so it inherits the nvm-selected Node on PATH (and the warn-never-fatal posture) instead of the caller's pre-pin environment. - check-plugin-baseline: require jq in both modes and refuse an unparsable baseline/candidate loudly (exit 2) instead of letting a swallowed jq failure read as "matches baseline"; enumerate fleet targets through `sync-manifest.sh matrix` instead of a second hand-rolled YAML parse; fetch settings via the GitHub raw media type, dropping the GNU-only `base64 -d`; strip CRs from jq -r captures so a Windows jq cannot corrupt repo slugs or reported names. - CI: run the plugin-baseline contract test in the distribution job. Verified: shellcheck/shfmt clean; contract tests green; live fleet run reports 6 targets matching baseline, claude-code-plugins diverging only on its directory-source marketplace declaration, and medley's known divergence. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012tKxg98B3QySqEPf8UqwX3
…ready landed (#398) ## Summary Corrects a wrong exclusion recorded in #397: dotfiles was left out of the `cloud-bootstrap` component's targets on the claim it had no adoption yet, but `melodic-software/dotfiles` main already carries `.claude/cloud-bootstrap.sh`. ## Fix Drop the stale exclusion comment and add `cloud-bootstrap` to dotfiles' `managed` list. Verified live via the GitHub contents API: dotfiles main has the bootstrap (an older generic generation, 70 lines, no repo-specific content — safe to converge), the SessionStart hook registration, and the full baseline plugin declaration. The clone that informed the original comment was on a stale feature branch. dotfiles is already a sync target, so the App installation's selected-repo set is untouched. ## Verification - `distribution/sync-manifest.sh validate`: `Manifest valid: 38 components, 8 targets`. - `plan --targets melodic-software/dotfiles` renders `100755 components/cloud-bootstrap/cloud-bootstrap.sh -> .claude/cloud-bootstrap.sh`. No linked issue ## Related - #397 (component introduction; recorded the exclusion this PR reverses) - melodic-software/claude-code-plugins#2885 (fleet audit that surfaced the discrepancy) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012tKxg98B3QySqEPf8UqwX3 Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
#399) ## Summary Agents working in consumer repos had no in-repo statement of the two conventions the cloud rollout rests on. Adds a "Cloud sessions and plugins" section to the synced orientation (AGENTS.md in every agent-orientation target). ## Fix Two bullets: the checked-in `.claude/settings.json` is the repo's plugin source of truth (cloud sessions install exactly what it declares — a repo that declares nothing gets nothing); `.claude/cloud-bootstrap.sh` is owned by the `components/cloud-bootstrap` component with `.claude/cloud-bootstrap.local.sh` as the repo's never-synced enrich seam. Mode (`managed` vs `locally-owned`) is deliberately left to the manifest, so the text stays true for repos that own their copy. ## Verification - markdownlint clean; `sync-manifest.sh validate` green (content-only change; no manifest edit). - Fans out to the 5 agent-orientation targets on merge via the ordinary sync. No linked issue ## Related - #397 / #398 (cloud-bootstrap component + targets) - melodic-software/claude-code-plugins#2885 (fleet doc reconciliation this orientation complements) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012tKxg98B3QySqEPf8UqwX3 Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…mport (#2887) ## Summary A one-line `CLAUDE.md` import bridges the synced `AGENTS.md` orientation into Claude Code sessions, per the official docs: Claude Code reads `CLAUDE.md`, not `AGENTS.md` (code.claude.com/docs/en/memory.md, fetched 2026-08-16), and recommends creating a `CLAUDE.md` that imports it. Symlinks need admin rights on Windows, so the `@AGENTS.md` import line is the portable bridge. ## Fix `CLAUDE.md` becomes exactly `@AGENTS.md` (single line, trailing newline). This is an unhobble re-add with evidence, not a restoration of prose: the root `CLAUDE.md` is deliberately 0 bytes from the bare-baseline resets (melodic-software/standards#348), whose rule is that an instruction returns only with ledger evidence. The evidence cited here is the managed-file silent-overwrite failure mode that `AGENTS.md` exists to prevent, plus the verified doc fact that `AGENTS.md` alone never loads into a Claude session. One import line, no restored prose. ## Verification - `CLAUDE.md` is one line (`@AGENTS.md`) plus a trailing newline, 11 bytes. - `AGENTS.md` confirmed non-empty at the default-branch HEAD before the change (952 bytes, via `gh api` with the raw media type). - `CLAUDE.md` is not a sync target in `melodic-software/standards` `distribution/sync-manifest.yml` (only `AGENTS.md` is), so this edit is repo-owned and will not be overwritten by the next standards sync. - No other files changed. ## Related - melodic-software/standards#399 (orientation content) - melodic-software/standards#397 (cloud-bootstrap component) No linked issue 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012tKxg98B3QySqEPf8UqwX3 Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Summary
Collapses the fleet's twelve hand-copied, drifted
.claude/cloud-bootstrap.shgenerations into one standards-owned component, distributed by exact materialization with the standard tri-mode lever: take (managed), enrich (a repo's own never-synced.claude/cloud-bootstrap.local.sh, run by the canonical script), or customize (locally-owned).Fix
components/cloud-bootstrap/— the canonical script is generic by construction: no repo names, marketplace identifiers, or pinned versions. Node from.node-version,npm cifrom the root lockfile, .NET exactly asglobal.jsonpins, marketplaces and plugins from.claude/settings.json(every declared marketplace; everyenabledPlugins: trueentry, whichever marketplace it names — which also removes the previous hardcoded-marketplace second code path). Adds an environment-snapshot stamp log line (per-account build visibility) and shallow-clone repair (origin/mainresolvable for base-ref diffs).distribution/sync-manifest.yml—managedfor.github,ci-runner,ci-workflows,github-iac,provisioning;locally-ownedwith recorded reasons forclaude-code-plugins(directory-source dogfooding) andmedley(repo-specific toolchain; converge later);dotfilesexcluded pending its cloud adoption.cloud-bootstrap.test.sh(parse, generic-by-construction, calling-contract landmarks, stamp-path lockstep with cloud-environment, byte-equality with this repo's own materialized copy);setup.test.shnow lockstep-tests the cloud-environment Node warm-cache pin against.node-version.distribution/check-plugin-baseline.sh— report-only fleet drift check of each target's plugin catalog against this repository's own settings file (the dogfooded fleet baseline), with an offline--comparemode under test.Verification
harness/shell/run-tests.shover the three touched test files: 3 passed.distribution/sync-manifest.sh validate:Manifest valid: 38 components, 8 targets;plan --targets melodic-software/ci-runnerrenders100755 components/cloud-bootstrap/cloud-bootstrap.sh -> .claude/cloud-bootstrap.sh.sync-manifest.test.sh: engine fixture cases pass except the two symlink-rejection cases, which fail only on Windows (symlink creation degrades to a regular file there); they are fixture-local and unaffected by this change — CI's Ubuntu run is authoritative..claude/cloud-bootstrap.local.sh(extraction prepared); a live cloud verification per the cloud-environment README's stamp checklist.No linked issue
Related
🤖 Generated with Claude Code
https://claude.ai/code/session_012tKxg98B3QySqEPf8UqwX3