CtrlK
BlogDocsLog inGet started
Tessl Logo

sdd-hooks

This skill should be used when the user asks to "install hooks", "set up git hooks", "enable assertion integrity", "install pre-commit hooks", "configure commit validation", or "protect test hashes". It installs git pre-commit and post-commit hooks that enforce assertion integrity by validating .feature file SHA-256 hashes on every commit. Use this skill whenever the user mentions hooks, assertion integrity, or commit validation.

SKILL.md
Quality
Evals
Security

SDD Hooks — Git Hook Installation for Assertion Integrity [EXPLICIT]

Install git hooks that enforce assertion integrity by validating .feature file hashes on commit.

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Execution Flow

1. Run Hook Installation

bash scripts/sdd-hooks-install.sh

2. Hooks Installed

HookPurpose
pre-commitValidates .feature file SHA-256 hashes before allowing commit
post-commitUpdates sentinel state after successful commit

3. Report

Hooks installed!

pre-commit:  .git/hooks/pre-commit (assertion hash validation)
post-commit: .git/hooks/post-commit (sentinel state update)

Test: modify a .feature file and try to commit — should be blocked

Assumptions and Limits

#AssumptionHandling
1Git repository existsIf no .git/, ERROR. [EXPLICIT]
2Hooks directory writableIf permissions denied, suggest chmod. [EXPLICIT]
3Existing hooks backed upIf hooks exist, backup as .bak before overwriting. [EXPLICIT]
4Hooks are bash scriptsRequire bash 3.2+ (macOS compatible). [EXPLICIT]
5SHA-256 validation uses .specify/assertion-hashes.jsonHash store must exist for pre-commit to validate. [EXPLICIT]

Edge Cases

ScenarioDetectionHandling
No git repo.git/ missingERROR: "Initialize git first". [EXPLICIT]
Existing hooks present.git/hooks/pre-commit existsBackup to .bak, install new, warn user. [EXPLICIT]
No .feature files yetNo assertion hashes to validateInstall hooks anyway — they'll activate when .feature files appear. [EXPLICIT]
Hooks disabled by user--no-verify on commitCannot prevent — warn in report about bypass risk. [INFERRED]
Windows environmentBash hooks on WindowsSuggest using Git Bash or WSL. [EXPLICIT]

Good vs Bad Example

Good: /sdd:hooks installs with verification

Hooks installed!
pre-commit: validates 12 assertion hashes
post-commit: updates sentinel state
Backup: pre-commit.bak (previous hook preserved)

Bad: Hook installation without feedback

x No confirmation of what was installed
x No backup of existing hooks
x No test suggestion

Why: Hook installation must confirm what was installed, backup existing hooks, and suggest testing. [EXPLICIT]

Validation Gate

Before marking hook installation as complete, verify: [EXPLICIT]

  • V1: .git/hooks/pre-commit installed and executable
  • V2: .git/hooks/post-commit installed and executable
  • V3: Existing hooks backed up if present
  • V4: Installation confirmed with hook descriptions
  • V5: Test suggestion provided
Repository
JaviMontano/mao-sdd
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.