Files
Claude-Code-Monitor/.claude/skills/file-headers/scripts/check-headers.sh
T
nntrivi2001 ce1aece895 feat: Claude Code Monitor — lanes, pipelines and a merged workspace
Internal SmartGift build of a Claude Code monitoring dashboard.

Lanes: a durable unit of parallel agent work, one per working directory,
tracked across session restarts. Managed lanes are git worktrees the
dashboard provisions and can reset or remove behind a three-check destroy
guard and a counted preflight; adopted lanes are directories you already
own and are never destroyable.

Pipelines: a lane moves through pipeline stages. A stage the agent declares
with evidence renders green; a stage inferred from the tool-event stream
renders dashed amber and never counts as done. Detection is forward-only
within a 30-minute window, and never writes the declared stage.

Workspace: one page at /run with a lane grid, the selected lane's pipeline,
and a full Claude console behind a disclosure.
2026-07-30 12:15:01 +07:00

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 .claude/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"