Rules Installer
Install Semantic-Linter into the user's current project by generating two artifacts:
semantic-rules.md: the full semantic guidance file- a managed block in
AGENTS.mdand orCLAUDE.md: the lightweight always-present pointer
What This Skill Must Do
- Detect the current project directory with
pwd. - Locate
scripts/build-rules.jsfrom the active plugin or local source checkout. - Run:
node "<SCRIPT>" --existing "$(pwd)"
- Run:
node "<SCRIPT>" --check --existing "$(pwd)"
- Tell the user:
- which files were written
- whether validation passed
- that the default mode is
guarded - that project-local
semantic-rules.mdis preferred over the plugin fallback
Important Rules
- Never hand-write
semantic-rules.md. - Never hand-write the managed
<!-- STL:RULES:BEGIN -->block. - If both
AGENTS.mdandCLAUDE.mdalready exist, update both. - If neither file exists, let
build-rules.jscreate the host-appropriate default target.
Runtime Model
Semantic-Linter is no longer pointer-only.
- Claude can use
SessionStart,SubagentStart,UserPromptSubmit,PreToolUse, andPostToolUse. - Codex relies on the managed project instruction file and on-demand rule loading.
pointermode keeps only the lightweight pointer.guardedmode adds write-time lint checks.strictmode also enables prompt scanning.
When To Suggest Follow-up Commands
/stl-rulesafter policy or lexicon changes/stl-lexiconwhen the user wants to add or refine trap pairsnpm run scan -- <file>when the user wants an explicit one-off scan