mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-09 14:38:59 +02:00
fix(careful): trim HIGH-tier + project-pattern docs under the size budget
The new sections pushed careful/SKILL.md to 2551 -> 3879 bytes (x1.52, gate caps growth at x1.5 of the v1.47 baseline). Same content, tighter prose: 3516 bytes (x1.38). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
2e3ba307d8
commit
c2d12cd6b5
+11
-21
@@ -69,29 +69,19 @@ proceed.
|
||||
|
||||
## HIGH tier (hard deny)
|
||||
|
||||
A tiny set of catastrophic commands is **denied outright** while /careful is
|
||||
active, not just warned:
|
||||
|
||||
- `rm -r`/`-R` targeting exactly `/`, `~`, or `$HOME`
|
||||
- `git push --force` / `-f` to the repo's **default branch**
|
||||
|
||||
HIGH only fires on SIMPLE commands (no `;`, `&&`, `||`, `|`, newline) — string
|
||||
matching cannot resolve what a compound command does, so compound shapes fall
|
||||
through to the ordinary MEDIUM ask. `--force-with-lease` is deliberately not
|
||||
matched (it's the safe force variant). This is a best-effort advisory
|
||||
hard-stop, not a policy boundary: /careful is opt-in and session-scoped, so
|
||||
the escape hatch is ending the /careful session.
|
||||
Two catastrophic shapes are **denied**, not asked: `rm -r`/`-R` of exactly
|
||||
`/`, `~`, or `$HOME`, and force-push to the repo's **default branch**. SIMPLE
|
||||
commands only (no `;`, `&&`, `||`, `|`, newline) — compound shapes fall
|
||||
through to the MEDIUM ask; `--force-with-lease` is never HIGH. A best-effort
|
||||
advisory hard-stop, not a policy boundary: the escape hatch is ending the
|
||||
opt-in, session-scoped /careful session.
|
||||
|
||||
## Project patterns (additive only)
|
||||
|
||||
Add your own warn rules — one POSIX ERE per line, `#` comments allowed — in:
|
||||
|
||||
- `~/.gstack/careful-patterns.txt` (all projects)
|
||||
- `~/.gstack/projects/<slug>/careful-patterns.txt` (this project)
|
||||
|
||||
Matching lines warn with `[careful] Project rule matched: <pattern>`. Config
|
||||
can only ADD rules: the files are consulted after the built-in families, so no
|
||||
file content can suppress or weaken a baseline warning. Invalid regex lines
|
||||
are skipped.
|
||||
Add warn rules — one POSIX ERE per line, `#` comments OK — in
|
||||
`~/.gstack/careful-patterns.txt` (global) or
|
||||
`~/.gstack/projects/<slug>/careful-patterns.txt` (per-project). Consulted
|
||||
after the built-in families, so config can only ADD rules, never suppress a
|
||||
baseline warning. Invalid regex lines are skipped.
|
||||
|
||||
To deactivate, end the conversation or start a new one. Hooks are session-scoped.
|
||||
|
||||
+11
-21
@@ -64,29 +64,19 @@ proceed.
|
||||
|
||||
## HIGH tier (hard deny)
|
||||
|
||||
A tiny set of catastrophic commands is **denied outright** while /careful is
|
||||
active, not just warned:
|
||||
|
||||
- `rm -r`/`-R` targeting exactly `/`, `~`, or `$HOME`
|
||||
- `git push --force` / `-f` to the repo's **default branch**
|
||||
|
||||
HIGH only fires on SIMPLE commands (no `;`, `&&`, `||`, `|`, newline) — string
|
||||
matching cannot resolve what a compound command does, so compound shapes fall
|
||||
through to the ordinary MEDIUM ask. `--force-with-lease` is deliberately not
|
||||
matched (it's the safe force variant). This is a best-effort advisory
|
||||
hard-stop, not a policy boundary: /careful is opt-in and session-scoped, so
|
||||
the escape hatch is ending the /careful session.
|
||||
Two catastrophic shapes are **denied**, not asked: `rm -r`/`-R` of exactly
|
||||
`/`, `~`, or `$HOME`, and force-push to the repo's **default branch**. SIMPLE
|
||||
commands only (no `;`, `&&`, `||`, `|`, newline) — compound shapes fall
|
||||
through to the MEDIUM ask; `--force-with-lease` is never HIGH. A best-effort
|
||||
advisory hard-stop, not a policy boundary: the escape hatch is ending the
|
||||
opt-in, session-scoped /careful session.
|
||||
|
||||
## Project patterns (additive only)
|
||||
|
||||
Add your own warn rules — one POSIX ERE per line, `#` comments allowed — in:
|
||||
|
||||
- `~/.gstack/careful-patterns.txt` (all projects)
|
||||
- `~/.gstack/projects/<slug>/careful-patterns.txt` (this project)
|
||||
|
||||
Matching lines warn with `[careful] Project rule matched: <pattern>`. Config
|
||||
can only ADD rules: the files are consulted after the built-in families, so no
|
||||
file content can suppress or weaken a baseline warning. Invalid regex lines
|
||||
are skipped.
|
||||
Add warn rules — one POSIX ERE per line, `#` comments OK — in
|
||||
`~/.gstack/careful-patterns.txt` (global) or
|
||||
`~/.gstack/projects/<slug>/careful-patterns.txt` (per-project). Consulted
|
||||
after the built-in families, so config can only ADD rules, never suppress a
|
||||
baseline warning. Invalid regex lines are skipped.
|
||||
|
||||
To deactivate, end the conversation or start a new one. Hooks are session-scoped.
|
||||
|
||||
Reference in New Issue
Block a user