[AAASM-3944] ✨ (scripts): Add validation script for AI onboarding scaffold#30
Conversation
|
Claude Code review — AAASM-3944 CI: Red, same org-wide Actions billing-block (see #25) — not caused by this change. Scope vs ticket: Mostly matches AAASM-3944's AC (missing/broken/repo-gap reporting, useful exit codes, README docs) — but I found one real, verified mismatch while reading the code directly: Not a regression, not a security issue — the script fails safe (under-reports overrides rather than mis-reporting something as broken), it just under-delivers on a promise made in a sibling PR's doc. Two ways to close it: (a) extend Side effects: None. Frontend: N/A. Recommend: mergeable, with the override-detection gap called out above for a decision. |
e8ad53d to
127049d
Compare
Jira Ticket
Summary
scripts/validate-ai-workspace.sh, the companion validator for the AI onboarding scaffold installed bybootstrap-ai-workspace.sh(AAASM-3943), per the layout in.claude/WORKSPACE.md(AAASM-3939). Depends on [AAASM-3939] 📝 (workspace): Add org-level AI workspace layout doc #25, [AAASM-3940] ✨ (docs): Add org-level CLAUDE.md and AGENTS.md baseline #26, [AAASM-3943] ✨ (scripts): Add bootstrap script for org AI config #29 (stacked on AAASM-3943).Changes
scripts/validate-ai-workspace.sh: checks a workspace root forCLAUDE.md,AGENTS.md,.claude/rules/, and.claude/skills/, classifying each as Missing / Broken symlink / Local override / OK. Local overrides are reported for visibility but do not fail validation, matching the override philosophy from AAASM-3941/3943. Also sweeps the workspace's.claude/tree for other broken symlinks, and accepts optional repo-path arguments for a lightweight, informational check of each repo's own.claude/CLAUDE.mdandAGENTS.md. Exits 0 when everything is present/correctly linked (overrides included), exits 1 if anything is missing or broken — usable as a CI gate.scripts/README.md: replaces the "not yet built" placeholder with usage docs for the new script.Validation
Manually tested three scenarios against a real bootstrap run:
AGENTS.md's symlink target and replaced.claude/skillswith a real local directory → validate: 1 broken symlink + 1 local override reported, exit 1 (broken symlink correctly fails; override alone was separately confirmed to still exit 0).Also verified
bash -nsyntax check passes and the script is careful about bash 3.2 (macOS default/bin/bash) empty-array-under-set -upitfalls.Checklist
[<ticket ID>] <GitEmoji> (<change scope category>): <key point as summary>