Skip to content

feat: add audit script to discover unsynced Claude Code content in org repos #87

Description

@wcmchenry3-stack

Context

The 6 org target repos may contain Claude Code content (.claude/ directories) that was added directly to those repos and never upstreamed to the meta-repo. Before expanding the sync FILE_MAP (issue #84), we need to know what's actually in each target repo so we don't overwrite local customizations without awareness.

Known gap: Claude Code tooling is only ~40% synced currently. The other 60% may exist in various states across the 6 repos.

Implementation

Create scripts/audit-claude-config.sh:

#!/usr/bin/env bash
# Audit Claude Code content in all org repos vs meta-repo FILE_MAP
# Usage: ./scripts/audit-claude-config.sh
# Requires: gh CLI authenticated, jq

set -euo pipefail

ORG="wcmchenry3-stack"
META_REPO=".github"
TARGET_REPOS=("gaming_app" "book_app" "..." )  # full list of 6 repos

# For each target repo:
#   1. List all files under .claude/ using gh api trees
#   2. Compare against FILE_MAP (what the sync pushes)
#   3. Report: files in target repo NOT in FILE_MAP (potential local additions)
#   4. Report: files in FILE_MAP NOT yet present in target repo (sync gap)
#   5. Output diff summary per repo

The script should output a table like:

Repo: gaming_app
  In repo, NOT in FILE_MAP (local additions):
    .claude/agents/my-custom-agent.md
  In FILE_MAP, NOT in repo (sync gap):
    .claude/hooks/lint-gate.sh
    .claude/agents/policy-compliance.md

Optionally: add a called-claude-audit.yml reusable workflow that runs this script via workflow_dispatch and posts results as a PR comment or workflow summary.

Acceptance Criteria

  • scripts/audit-claude-config.sh created and executable
  • Script accepts the list of 6 target repos (configurable, not hardcoded)
  • Script uses gh api (not git clone) to inspect remote repo contents — no cloning required
  • Script outputs per-repo diff: files in repo not in FILE_MAP, and FILE_MAP entries not yet in repo
  • Script exits 0 (informational only — no CI gate)
  • Script documented in README or inline comments
  • Script tested against at least one target repo to verify output accuracy

Dependencies

None — can be worked in parallel with all other issues.
Issue #87 (consolidate Claude Code content) is blocked by this issue.

Part of Epic

#77

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-agentsClaude sub-agent related workenhancementNew feature or requestinfrastructureCI/CD and tooling improvementsrepo:allApplies to all repos in org

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions