agentleFS
Arcanea-LabsArcanea-Labs/Starlight-Intelligence-System/.claude/hooks/CLAUDE.md

Starlight-Intelligence-System / hooks

CLAUDE.md10 starsChanged 2 months agoMITView on GitHub

Portable / multi-harness hooks system (claude/codex/gemini/agy/grok). Source it: source "$(dirname "$0")/lib/hook-env.sh" Override: export AI_GLOBAL_SESSIONS=/path/to/log.md God 99. Use gstack for UI verification.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this CLAUDE.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All hooks call log_hook_activation which invokes excellence-hook.sh (Frank DNA, read CLAUDE/AGENTS, verification/santa/qa/cso gates, …

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Claude Code Hooks Configuration (Upgraded)

Portable / multi-harness hooks system (claude/codex/gemini/agy/grok).

lib/hook-env.sh

Central portable env:

  • detect_harness() → HARNESS=claude|codex|gemini|agy|grok|unknown
  • Portable PROJECT_ROOT (git/env/cwd), AI_SESSIONS_LOG (auto WSL /mnt/c or $HOME/docs)
  • GLOBAL_*_DIR per-harness (with .claude compat)
  • log_hook_activation, handle_precompact, handle_notification
  • Excellence wiring (calls excellence-hook.sh)

Source it: source "$(dirname "$0")/lib/hook-env.sh"

Available Hooks (agnostic + ACOS ports)

HookPurposeTrigger(s)Notes
session-logger.shGlobal sessions to AI_GLOBAL_SESSIONS.mdUserPromptSubmitUses $AI_SESSIONS_LOG + $HARNESS
skill-activation-prompt.shAuto skill/agent activation from rulesUserPromptSubmitUpdated paths via env; .js/.ts
file-link-tracker.shTrack edits to ~/LINKS_TODAY.md + github linksPostToolUseJson+env input, portable open on WSL
pre-commit.shLint staged (eslint/prettier) + qualityPre-commit / manualWires quality-gate
pre-compact.shPreCompact stub + delegate to gsd/ACOSPreCompact
notification.shNotification stubNotification
quality-gate.shACOS ported quality (biome/prettier/gofmt/ruff)Pre/PostToolUse (Edit)Shim + .js
gsd-*.sh (context-monitor, workflow-guard, statusline)ACOS GSD context/guard/statusPostToolUse/StatusShims + .js
mcp-health-check.shACOS MCP healthPostToolUseShim
excellence-hook.shWires Frank DNA, gates, gstack noteAny (internal)Called by env

Global Log Location (portable)

AI_GLOBAL_SESSIONS env or auto:

  • WSL: /mnt/c/Users/$WINUSER/docs/AI_GLOBAL_SESSIONS.md
  • Else: $HOME/docs/AI_GLOBAL_SESSIONS.md

Override: export AI_GLOBAL_SESSIONS=/path/to/log.md

Multi-Harness Support

  • Detection prioritizes runtime env vars then dirs/cmds.
  • .claude/ paths used as compat layer for skills/hooks across harnesses.
  • For Grok: also seed .grok/hooks/ + GROK.md (see ACOS install).
  • Register in ~/.claude/settings.json (or equiv .grok / .codex config).

Settings Example (excerpt)

See claude-code-hooks/settings-example.json for full with PreCompact/Notification + ACOS ports.

Usage

# Manual
~/.claude/hooks/session-logger.sh

# Install portable to project
cd claude-code-hooks && ./install.sh --portable

Excellence

All hooks call log_hook_activation which invokes excellence-hook.sh (Frank DNA, read CLAUDE/AGENTS, verification/santa/qa/cso gates, repo-mastery, gstack for any UI).

God 99. Use gstack for UI verification.


Updated 2026-06-02 via hook upgrade task.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.