b7c573f8d9
The repo root already IS the `ccam` plugin root (`"source": "./"`), so the conventional `skills/` dir at the root is the plugin's skills dir — while `.claude/skills/` only loaded for a session whose cwd was inside this checkout. That is useless for a lane working in another repo, which is why `ccam skills install` existed at all. Move all seven skills to `skills/`: they now reach every plugin user as `/ccam:<name>` (bare `/<name>` as an alias). `ccam skills install` stays as the fallback for a plain checkout without the plugin, sourcing from the new path. Agents deliberately do NOT move. A plugin agent is addressed as `ccam:qc-local`, which would break the `subagent_type: qc-local` references in ship-feature-lane; `ccam lanes agents install` keeps writing them into the lane's own `.claude/agents/`, the highest-priority agent source. MCP was already plugin-shipped via `plugins/ccam/.mcp.json`. Mechanical fallout: ~115 source files carry a doc-comment pointer to `.claude/skills/file-headers/`, repointed to `skills/file-headers/`. The generic Claude Code config-surface examples in openapi/cc-config (`.claude/ skills/code-reviewer`) describe any user's layout and are left alone. Also fixes the two file-headers scripts, whose `ROOT=` climbed four levels from `.claude/skills/file-headers/scripts/` and would have escaped the repo from the new depth — it scanned sibling projects until corrected to three. npm run test:server (1160 pass), test:client (422 pass), mcp:typecheck, mcp:build + mcp:check-build all green.
32 lines
1.1 KiB
Bash
Executable File
32 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# check-headers.sh — audit the repo for applicable source files missing the
|
|
# mandatory copyright/authorship header (see skills/file-headers).
|
|
# Prints each non-compliant file; exits 0 when fully compliant, 1 otherwise.
|
|
# @author Nguyễn Ngọc Trí Vĩ <vinnt@smartgift.vn>
|
|
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
|
|
AUTHOR_MARK="@author Nguyễn Ngọc Trí Vĩ"
|
|
|
|
missing=0
|
|
while IFS= read -r f; do
|
|
if ! grep -q "$AUTHOR_MARK" "$f"; then
|
|
echo "MISSING HEADER: ${f#"$ROOT"/}"
|
|
missing=1
|
|
fi
|
|
done < <(
|
|
find "$ROOT" \
|
|
\( -name node_modules -o -name dist -o -name build -o -name .git \
|
|
-o -path "$ROOT/data" -o -path "$ROOT/monitoring/.bin" \
|
|
-o -path "$ROOT/monitoring/.data" -o -name "__snapshots__" \) -prune -o \
|
|
-type f \( -name "*.js" -o -name "*.ts" -o -name "*.tsx" -o -name "*.cjs" \
|
|
-o -name "*.mjs" -o -name "*.py" -o -name "*.sh" -o -name "*.css" \) \
|
|
! -name "*.min.js" -print
|
|
)
|
|
|
|
if [ "$missing" -eq 0 ]; then
|
|
echo "✔ All applicable files carry the authorship header."
|
|
fi
|
|
exit "$missing"
|