[AAASM-3943] ✨ (scripts): Add bootstrap script for org AI config#29
Conversation
|
Claude Code review — AAASM-3943 CI: Red, same org-wide Actions billing-block (see #25) — not caused by this change. Scope vs ticket: Matches AAASM-3943's AC. I read Side effects: None on existing functionality — net-new script, only writes into a workspace-root path the caller supplies; never touches files inside this repo or any other repo. Caveat (expected, not a defect): run in isolation on just this branch, Frontend: N/A. Recommend: ready to merge, after #26. |
Installs CLAUDE.md, AGENTS.md, .claude/rules/, and .claude/skills/ from this repo into a contributor's local multi-repo workspace root via symlinks (per .claude/WORKSPACE.md), so org context stays live without re-running the script after every baseline change. Supports --dry-run, never clobbers a local override at the target path, and reports a created/updated/skipped/failed summary per item.
…ndling Explains usage, --dry-run, why symlinks over copies, what "skipped (local override)" means and how to force a re-install, and reserves a section for the AAASM-3944 validation script.
5593dc2 to
a7ed1f5
Compare
Jira Ticket
Summary
scripts/bootstrap-ai-workspace.sh, a pure local bash script that installs the org AI baseline (CLAUDE.md,AGENTS.md,.claude/rules/,.claude/skills/) from this repo into a contributor's local multi-repo workspace root, per the layout defined in.claude/WORKSPACE.md(AAASM-3939)..claude/rulesand.claude/skillsdirectory paths, not their contents.Changes
scripts/bootstrap-ai-workspace.sh: symlinks (not copies, so upstream edits are picked up without re-running) the four org baseline artifacts into a target workspace root; creates the workspace root folder structure if missing; supports--dry-run; never clobbers an existing file/symlink at the target that isn't already the expected symlink back to this repo (reported asskipped (local override)); prints a per-item report plus created/updated/skipped/failed summary counts;set -euo pipefail, no network calls, noeval, exits non-zero on any failure.scripts/README.md: documents usage,--dry-run, whatskipped (local override)means and how to force a re-install, and reserves a section for the not-yet-builtvalidate-ai-workspace.sh(AAASM-3944).Validation
Manual local testing (see PR description below for detail):
--dry-runagainst a nonexistent path made zero filesystem changes and printed the correct planned actions..claude/,.claude/commands/, and all four symlinks; exit code 0.skipped (up to date)withcreated=0 updated=0— confirms idempotency.skipped (local override)..githubcheckout) and re-running relinked it automatically, reported asupdated.failedand the script to exit non-zero, while unrelated items still completed — confirms partial-failure reporting and the non-zero exit gate.Checklist
[<ticket ID>] <GitEmoji> (<change scope category>): <key point as summary>