Skip to content

[AAASM-3944] ✨ (scripts): Add validation script for AI onboarding scaffold#30

Merged
Chisanan232 merged 2 commits into
masterfrom
v0.1.0/AAASM-3944/build_validation_script
Jul 6, 2026
Merged

[AAASM-3944] ✨ (scripts): Add validation script for AI onboarding scaffold#30
Chisanan232 merged 2 commits into
masterfrom
v0.1.0/AAASM-3944/build_validation_script

Conversation

@Chisanan232

@Chisanan232 Chisanan232 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Jira Ticket

Summary

Changes

  • scripts/validate-ai-workspace.sh: checks a workspace root for CLAUDE.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.md and AGENTS.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

  • Content reviewed for accuracy
  • Links verified
  • No unintended scope changes

Manually tested three scenarios against a real bootstrap run:

  1. Clean bootstrap into a fresh temp dir → validate: all 4 items OK, exit 0.
  2. Broke AGENTS.md's symlink target and replaced .claude/skills with 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).
  3. Never-bootstrapped directory (and a wholly nonexistent path) → validate: all 4 items reported missing, exit 1.

Also verified bash -n syntax check passes and the script is careful about bash 3.2 (macOS default /bin/bash) empty-array-under-set -u pitfalls.

Checklist

  • PR title follows: [<ticket ID>] <GitEmoji> (<change scope category>): <key point as summary>
  • PR body follows this template

@Chisanan232

Copy link
Copy Markdown
Contributor Author

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: .claude/WORKSPACE.md (#25) states the validation script "reports which org-level files are shadowed" by a repo-local override by filename (i.e. per-file, e.g. a single .claude/rules/01-security.md override). The actual check_item() in validate-ai-workspace.sh only ever checks the 4 top-level paths (CLAUDE.md, AGENTS.md, .claude/rules, .claude/skills) as whole units — a per-file override inside those directories is never detected. This is the same defect independently caught during #32's dogfooding pass (tracked as follow-up item #3 in #33) — confirmed here by reading both files side by side, not just taking that finding at face value.

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 check_item to walk each file inside .claude/rules/ and .claude/skills/ individually, or (b) correct WORKSPACE.md's wording to describe directory-level (not per-file) override detection. Your call whether to block this PR on it or take it as a tracked follow-up — I'd lean toward merging as-is and filing the fix, since it's a documentation-accuracy gap, not broken behavior.

Side effects: None.

Frontend: N/A.

Recommend: mergeable, with the override-detection gap called out above for a decision.

@Chisanan232 Chisanan232 force-pushed the v0.1.0/AAASM-3944/build_validation_script branch from e8ad53d to 127049d Compare July 6, 2026 01:29
@Chisanan232 Chisanan232 merged commit 6993256 into master Jul 6, 2026
@Chisanan232 Chisanan232 deleted the v0.1.0/AAASM-3944/build_validation_script branch July 6, 2026 01:30
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.

1 participant