Cross-Venture Codebase Audit
Invocation: As your first action, call
crane_skill_invoked(skill_name: "enterprise-review"). This is non-blocking — if the call fails, log the warning and continue. Usage data drives/skill-audit.
Detects configuration drift, structural drift, and practice drift across all venture repos. Produces a consistency report stored in VCMS.
Must run from crane-console. This command is not synced to venture repos.
/enterprise-review [--venture codes]
--venture - Comma-separated venture codes to audit (e.g., --venture ke,dfg). If omitted, audits all ventures with repos.Parse $ARGUMENTS:
--venture, extract the comma-separated codes into TARGET_VENTURES.TARGET_VENTURES to all ventures from config/ventures.json that have a repo (codes with a corresponding ~/dev/{code}-console directory).config/ventures.json in repo root).TARGET_VENTURES. For each code, verify ~/dev/{code}-console exists and is a git repo. Skip missing repos with a warning.Display:
Enterprise Codebase Audit
Ventures: {list of venture codes being audited}
Run a single Bash command that collects structural snapshots from all target venture repos. This is parsing JSON/YAML, not understanding code semantics - no agents needed.
For each repo at ~/dev/{code}-console:
for CODE in {TARGET_VENTURES}; do
REPO="$HOME/dev/${CODE}-console"
[ -d "$REPO/.git" ] || continue
echo "=== $CODE ==="
# Key dependency versions from package.json (root or first found)
echo "-- dependencies --"
PKGJSON=$(find "$REPO" -maxdepth 3 -name "package.json" -not -path "*/node_modules/*" | head -1)
if [ -n "$PKGJSON" ]; then
for dep in typescript hono wrangler eslint prettier vitest; do
VER=$(jq -r ".dependencies[\"$dep\"] // .devDependencies[\"$dep\"] // \"not found\"" "$PKGJSON" 2>/dev/null)
echo "$dep=$VER"
done
fi
# TypeScript config
echo "-- tsconfig --"
TSCONFIG=$(find "$REPO" -maxdepth 2 -name "tsconfig.json" -not -path "*/node_modules/*" | head -1)
if [ -n "$TSCONFIG" ]; then
jq '{strict: .compilerOptions.strict, target: .compilerOptions.target, module: .compilerOptions.module}' "$TSCONFIG" 2>/dev/null
fi
# ESLint config
echo "-- eslint --"
ls "$REPO"/.eslintrc* "$REPO"/eslint.config.* 2>/dev/null || echo "none"
# Prettier config
echo "-- prettier --"
ls "$REPO"/.prettierrc* "$REPO"/prettier.config.* 2>/dev/null || echo "none"
# CI workflows
echo "-- ci --"
ls "$REPO"/.github/workflows/*.yml 2>/dev/null || echo "none"
# Claude commands present
echo "-- commands --"
ls "$REPO"/.claude/commands/*.md 2>/dev/null | xargs -I{} basename {} | sort
echo ""
done
Store output as RAW_DATA.
This should complete in under 30 seconds for all repos. No parallel agents needed.
The orchestrator itself (you, not spawned agents) parses RAW_DATA and builds the drift report. This is comparison and table-building, not deep code analysis.
Build these sections:
3a. Version Alignment Table
Compare key dependency versions across all ventures:
| Dependency | {vc} | {ke} | {dfg} | {sc} | {dc} | Drift? |
|------------|------|------|-------|------|------|--------|
| typescript | 5.x | 5.x | 5.x | 5.x | - | No |
| hono | 4.x | 4.x | - | - | - | No |
| wrangler | 3.x | 3.x | 3.x | 3.x | - | No |
| eslint | 9.x | 8.x | 9.x | - | - | YES |
Flag any version where ventures differ by 1+ major version.
3b. Commands Sync Status
List which enterprise commands are present/missing per venture:
| Command | {vc} | {ke} | {dfg} | {sc} | {dc} |
|---------|------|------|-------|------|------|
| sos.md | Y | Y | Y | Y | Y |
| eos.md | Y | Y | Y | N | N |
Flag missing commands. Note: some commands are enterprise-only (like enterprise-review.md) and should not be synced.
3c. Golden Path Compliance
Pass/fail per venture with tier context:
| Venture | Tier | Failures | Warnings | Status |
|---------|------|----------|----------|--------|
| ke | 1 | 0 | 2 | PASS |
| dfg | 1 | 1 | 3 | FAIL |
3d. Drift Hotspots
Cross-cutting issues that affect multiple ventures or represent enterprise-wide concerns:
4a. VCMS Report
Store concise report in VCMS using crane_note:
create["code-review", "enterprise"]Enterprise Review - {YYYY-MM-DD}Content (under 500 words): date, ventures audited, version alignment summary, top 3-5 drift hotspots, overall consistency assessment.
4b. Compare with Previous Review
Search for the most recent enterprise review:
crane_notes tag="code-review" q="Enterprise Review"
If found, compare:
Note trend in the report.
4c. Display to User
Present the full report inline (this is the primary output - no separate file since it lives in VCMS and is only relevant to crane-console).
## Enterprise Codebase Audit - {YYYY-MM-DD}
### Version Alignment
{table}
### Commands Sync Status
{table}
### Drift Hotspots
{numbered list}
### Trend
{comparison with previous review}
### Recommendation
{1-3 actionable next steps}
After displaying the report, suggest next steps:
sync-commands.sh to distribute missing commands."Do NOT automatically take any action. Wait for the Captain.
After displaying the report, record the completion in the Cadence Engine:
crane_schedule(action: "complete", name: "enterprise-review", result: "success", summary: "{N} ventures audited, {findings}", completed_by: "crane-mcp")
code-review + enterprise. The code-review tag groups all review artifacts; the enterprise tag distinguishes cross-venture reports from per-venture scorecards.~/dev/{code}-console. Missing repos are skipped with a warning.