Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 繁體中文

Sentinel — The Thinking OS That Stands Guard

A Claude Code skill that sits underneath the coding process as a senior engineer's thinking layer — stop looping at the surface, stop patching over alarms, stop shipping security gambles. It thinks before the code is written. Part of a four-skill toolchain: Cartographer draws the map → Compass walks it → Sentinel stands guard → Lookout watches from the mast.

status license habits toolchain


The problem it solves

"Vibe coding" — building software in fast, conversational loops with an AI — is powerful, but it has three chronic failure modes:

  1. Surface looping — patching the symptom where the error appears, not where it originates.
  2. Alarm-silencing — a try/except to swallow the error, an any to bypass the type, a third special-case if. The warning goes away; the root cause keeps burning.
  3. Security gambles — hardcoded keys, unvalidated input, over-broad permissions, all waved through under "ship it first."

Sentinel is a thinking operating system that sits beneath the coding process and counters exactly these three.

How it works

Four core beliefs:

  1. Asking the right question beats solving the problem — most stuck points are a misdefined problem, not a weak solution.
  2. The symptom is not the root cause — where an error surfaces is rarely where it was born; always chase one layer upstream.
  3. Bypass is not solve — swallowing an error, a special-case if, switching to any — all mute the alarm instead of putting out the fire.
  4. A lesson not written down is a lesson re-learned — painful debugging gets distilled into a case file so the same pit isn't fallen into twice.

Sentinel turns 89 thinking habits (76 world-class thinking habits + 13 in-house security habits) into an instruction set Claude Code consults across a five-phase loop:

Plan → Build → Diagnose → Solve → Retro
  ↑                                  ↓
  └──────  case history feeds back  ─┘

Key mechanisms:

  • Three-tier intensity — trivial edits run free; medium tasks get a quick pre-flight; heavy/architecture/security tasks run the full loop. Escalate only, never silently skip.
  • Pre-flight protocol — before touching existing code, predict blast radius, ripple risk, design a safe path, and run a pre-mortem.
  • Shallow-vs-deep sensor — red flags ("3rd fix to the same symptom," "adding a 3rd special-case if") force a stop and a root-cause hunt.
  • Two enforcement layers — a hard gate (a PreToolUse hook actually blocks hardcoded secrets, curl … | bash, chmod 777) plus a soft sentry (self-discipline for semantic red flags the hook can't detect) — honest about which is which.
  • Self-growing case history (two tiers) — genuinely painful episodes are written to debug-log.md, distilled into patterns.md; global ~/.claude/ holds cross-project lessons, project .claude/ holds codebase-specific ones.

Quick start

# Install as a user-level skill (applies to all projects)
mkdir -p ~/.claude/skills/sentinel
cp -r SKILL.md references hooks ~/.claude/skills/sentinel/

# Verify
ls ~/.claude/skills/sentinel   # → SKILL.md  references  hooks

Optionally pair it with the resident routing file and the hard-gate hook:

cp CLAUDE.md.example ~/.claude/CLAUDE.md   # resident routing layer
# then wire hooks/sentinel-guard.ps1 into ~/.claude/settings.json (see INSTALL)

Full guide (skill + hook wiring + resident file) in docs/INSTALL.md.

The toolchain

Sentinel is the stands-guard stage of a four-skill toolchain — each watches a different thing:

Skill Role Watches
Cartographer draws the map turning a fuzzy idea into a solid PRD
Compass walks the map are you following the PRD? (build to spec, no drift)
Sentinel stands guard how you think (shallow vs. deep, symptom vs. root cause)
Lookout watches from the mast independent-context code review

Cartographer draws the map → Compass walks it → Sentinel stands guard → Lookout watches. Sentinel applies the most broadly — any engineering task — while the other three each have a precondition. Full division of labor in docs/SCOPE.md.

Structure

sentinel/
├── SKILL.md             skill entry (always-resident, kept lean)
├── references/          on-demand knowledge base
│   ├── 00_index.md          89-habit index + symptom & phase lookup
│   ├── preflight.md         pre-flight protocol (inward + outward)
│   ├── safety_nets.md       retreat route / evidence grading / re-anchoring
│   ├── self_check.md        shallow & security red flags + diagnosis steps
│   ├── hook_enforcement.md  hard-gate spec + how to extend
│   ├── debug_log_template.md case-file format + threshold of pain
│   ├── html_style_guide.md  root-cause-tree HTML spec
│   └── 01–05_*/             the 89 habits, by category
├── hooks/               sentinel-guard.ps1 (hard-gate hook)
├── CLAUDE.md.example    resident routing layer
├── docs/                DESIGN · INSTALL · SCOPE
└── sentinel-zh/         Traditional Chinese mirror

Docs

  • DESIGN — design philosophy, key decisions & trade-offs
  • INSTALL — full install (skill + hook + resident file) & verification
  • SCOPE — what it covers, what it doesn't, and the toolchain split

License

MIT © Ray_Li

A portfolio piece exploring "how to encode structured thinking into an AI coding partner." Its companion Compass explores "how to encode the discipline of PRD-driven development into an AI coding partner."

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages