ai-sdlc — Claude Code hook: what it does, how to install
ai-sdlc — a hook bundle for a six-stage Markdown SDLC in Claude Code. It checks tool calls to block unauthorized file edits and safeguard sensitive project paths.
MIT ★ 1,596 updated 2026-10-29
.claude/settings.jsonWhat ai-sdlc does
The ai-sdlc hooks intercept agent actions right before tool execution. During the PreToolUse event, artifact-gate.sh inspects every Write and Edit call. If an edit lacks a corresponding approved Markdown plan, the hook stops the write operation immediately. It also keeps tasks tagged as low-risk away from sensitive paths.
Terminal execution receives its own boundary: prod-guard.sh listens to Bash tool calls. Meanwhile, session-context.sh fires on SessionStart to prepare the development context, and prompt-nudge.sh triggers on UserPromptSubmit. Without committed plan files, the agent cannot write code.
Setup requires adding the hook definitions into .claude/settings.json. The full plugin bundle also pairs these hooks with 8 skills and 2 read-only subagents.
What it helps with
- Block source code modifications that lack an approved Markdown plan
- Prevent low-risk changes from touching sensitive repository paths
- Guard shell command execution through
prod-guard.sh - Inject development context automatically upon
SessionStart
Example prompts for the agent
- Edit
src/app.tsfollowing the approved task plan - Run the build script using the terminal
- Generate the planning artifact before modifying any source files
How to install ai-sdlc
Manually: put the files in place
.claude/settings.jsonThe hooks block: event (PreToolUse, PostToolUse, Stop…) → command. Personal ones go to ~/.claude/settings.json
Step by step, with commands for each platform: Claude Code hooks: what they are, where to configure them, how to block a risky command
Questions about ai-sdlc
How to install ai-sdlc in Claude Code?
Add the hooks configuration object directly to .claude/settings.json. Ensure the commands point to the scripts located in ${PLUGIN_ROOT}/hooks/.
What does the ai-sdlc hook bundle do?
It enforces a six-stage SDLC process directly at the tool-call level. The bundle intercepts Bash, Write, and Edit calls while handling prompt submissions and session start events.
How does the artifact gate enforce workflow rules?
When Claude Code attempts a Write or Edit operation, artifact-gate.sh runs first. It verifies whether an approved plan covers the change, stopping unauthorized file writes.
Source text
hooks.codex.json · MIT
Hooks bundle shipped with the ai-sdlc plugin for Claude Code.
Six-stage SDLC in committed Markdown where hooks enforce the loop at the tool-call level: an artifact gate refuses source writes no approved plan covers and keeps a change declared low-risk away from sensitive paths, with 8 skills and 2 read-only subagents.
Triggers on: PreToolUse, UserPromptSubmit, SessionStart.
```json
{
"hooks": {
"PreToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "\"${PLUGIN_ROOT}/hooks/artifact-gate.sh\""
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "\"${PLUGIN_ROOT}/hooks/prod-guard.sh\""
}
]
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "\"${PLUGIN_ROOT}/hooks/session-context.sh\""
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "\"${PLUGIN_ROOT}/hooks/prompt-nudge.sh\""
}
]
}
]
}
}
```
© Hieuvu7 · MIT · hashgraph-online/awesome-codex-plugins