You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(readme): show actual terminal output for check and hook flows
The README described the experience but never showed it. Adds two
short code blocks readers can scan in five seconds:
1. After the ASCII flow diagram, a 'What it looks like' section
showing three real outputs from 'stackguard check': a clean
pass, a HIGH-confidence block with the suggested-revision box
and the interactive menu, and a low-confidence soft warning
that passes through.
2. In 'Integrating with Claude Code', the exact stderr message
Claude Code shows when the hook blocks a prompt — the visual
that proves the integration actually works inside the REPL.
Both blocks reuse the renderer's real output format so they
match what users actually see. Links out to examples/ for the
longer per-language walkthroughs.
Use suggested revision? [Y]es / [N]o, type my own: y
95
+
✓ stackguard: ok
96
+
```
97
+
98
+
A possible-but-uncertain conflict surfaces as a soft note and lets the prompt through (see [ADR-002](./docs/adr/ADR-002-low-confidence-passthrough.md)):
99
+
100
+
```
101
+
$ stackguard check "add a date picker that handles timezones nicely"
102
+
ℹ stackguard: possible conflict (low confidence — passing through)
103
+
"date picker that handles timezones" may conflict with "moment is prohibited…"
104
+
```
105
+
106
+
For more examples — including Python, Go, fintech, and a deliberately tiny two-person policy — see [`examples/`](./examples/).
107
+
108
+
---
109
+
62
110
## Quickstart
63
111
64
112
```bash
@@ -90,7 +138,25 @@ git add .claude/settings.json # commit so the rest of the team gets it
90
138
91
139
Now every prompt you submit to Claude Code in this project is checked first.
92
140
A clean prompt passes through invisibly. A blocked prompt shows the violation
93
-
in the Claude Code UI and waits for you to revise.
141
+
in the Claude Code UI and waits for you to revise:
142
+
143
+
```
144
+
> add a MongoDB connection for user sessions
145
+
146
+
✗ stackguard: prompt blocked by engineering policy
147
+
148
+
• "add a MongoDB connection for user sessions"
149
+
Rule: NEVER use MongoDB, DynamoDB, or any NoSQL store for primary data
150
+
Why: The prompt names a database that the policy excludes.
151
+
Level: HIGH confidence
152
+
153
+
Suggested revision:
154
+
Add a Postgres-backed user_sessions table accessed via the team's
155
+
approved DB wrapper, with a parameterized query for lookups
156
+
157
+
Edit your prompt and submit again, or run `stackguard policy show`
158
+
to read the full policy.
159
+
```
94
160
95
161
**Block mode vs warn mode:** in `block` mode the hook returns exit 2 and
96
162
Claude Code refuses to send the prompt. In `warn` mode the violation gets
0 commit comments