@rmyndharis/aimhooman 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  <p align="center">
11
11
  <img src="https://img.shields.io/github/actions/workflow/status/rmyndharis/aimhooman/test.yml?branch=main&label=CI" alt="CI">
12
- <img src="https://img.shields.io/badge/version-v0.2.0-blue" alt="v0.2.0">
12
+ <img src="https://img.shields.io/badge/version-v0.3.1-blue" alt="v0.3.1">
13
13
  <img src="https://img.shields.io/badge/node-%E2%89%A522.8-339933?logo=node.js&logoColor=white" alt="Node 22.8+">
14
14
  <img src="https://img.shields.io/badge/dependencies-0-brightgreen" alt="Zero dependencies">
15
15
  <img src="https://img.shields.io/badge/license-MIT-111111" alt="MIT">
@@ -19,52 +19,29 @@
19
19
 
20
20
  <p align="center">aimhooman: <i>AI works. Hoomans ship.</i></p>
21
21
 
22
- <b>aimhooman</b> is a vendor-neutral guard that keeps AI coding agents from leaving their
23
- fingerprints in your Git history: session files that were never meant to be
24
- committed, secrets, and unwanted AI attribution in commit messages. Its host adapters
25
- and Git hooks catch known cases before a commit and make review decisions visible.
26
- <br/>
27
-
28
- > **Human-owned, not human-washed.** aimhooman removes tooling residue and sets
29
- > human ownership. It does not fake authorship or strip disclosure your policy
30
- > requires.
22
+ > **Human-owned, not human-washed.** aimhooman removes tooling residue and sets human
23
+ > ownership. It does not fake authorship or strip disclosure your policy requires.
31
24
 
32
25
  ## TL;DR
33
26
 
34
- Keep AI session files, secrets, and stray `Co-authored-by:` lines out of your Git
35
- history without a per-tool ignore list and without faking who wrote the code.
36
-
37
- ```sh
38
- npm install -g @rmyndharis/aimhooman
39
- aimhooman init # git hooks + local excludes; normally no worktree files
40
- git commit -m "ship it" # guarded automatically
41
- ```
42
-
43
- Repair-first by default. Any block that cannot be repaired, or any incomplete
44
- scan, stops before the branch ref changes. Zero runtime dependencies. Runs on
45
- Node 22.8+.
46
-
47
- Want it inside Claude Code, Codex, Copilot, Cursor, and friends? See
48
- [Use it in your AI coding tool](#use-it-in-your-ai-coding-tool).
27
+ Keep AI session files and stray `Co-authored-by:` lines out of your Git history —
28
+ a vendor-neutral guard, repair-first by default, without a per-tool ignore list and
29
+ without faking who wrote the code. Zero runtime dependencies. Node 22.8+, Git 2.28+.
49
30
 
50
31
  ## The problem
51
32
 
52
- <p align="center">
53
- <img src="docs/logo/aimhooman.png" alt="aimhooman - AI works. Hoomans ship." width="720">
54
- </p>
55
33
  Your AI agent works in your repo and quietly leaves state behind: `.claude/session.json`,
56
- chat history, caches, and `Co-authored-by:` an AI. One `git add -A` later, it is in
57
- your history. Ignore lists are per-tool and never complete, and a local git hook is
58
- one `--no-verify` away from being skipped.
59
-
34
+ chat history, caches, and `Co-authored-by:` an AI. One `git add -A` later, it is in your
35
+ history. Ignore lists are per-tool and never complete, and a local git hook is one
36
+ `--no-verify` away from being skipped.
60
37
 
61
38
  ## How it works
62
39
 
63
- One detection core, many enforcement surfaces. On the default profile, the ordinary
64
- commit path repairs hygiene findings when it can. `commit-msg` checks the pinned
65
- would-be tree, and the final ref boundary independently scans every commit introduced
66
- to `HEAD` or a branch. Any remaining block or incomplete scan stops. `strict` blocks
67
- instead of repairing.
40
+ One detection core, many enforcement surfaces. On the default profile the ordinary commit
41
+ path repairs hygiene findings when it can; `commit-msg` checks the pinned would-be tree,
42
+ and the final ref boundary independently scans every commit introduced to `HEAD` or a
43
+ branch. A block that survives repair stops the commit; an incomplete scan warns on
44
+ `clean`/`compliance` and still vetoes at the final ref guard.
68
45
 
69
46
  ```mermaid
70
47
  flowchart TD
@@ -75,7 +52,7 @@ flowchart TD
75
52
  COMMIT([Ordinary git commit or merge]) --> PRE["pre-commit / pre-merge-commit<br/>run predecessor, resolve staged policy,<br/>scan exact index"]
76
53
  DIRECT([Sequencer or direct ref path<br/>cherry-pick · rebase · fetch · worktree · update-ref]) --> REF
77
54
  PRE -->|clean: safe repair| MSG["commit-msg snapshots would-be tree,<br/>runs predecessor, then checks<br/>the message and pinned full tree"]
78
- PRE -->|strict violation, incomplete scan,<br/>or failed repair| BLOCK([Operation stops])
55
+ PRE -->|strict violation or failed repair| BLOCK([Operation stops])
79
56
  MSG -->|message and tree accepted| REF["reference-transaction prepared<br/>scans what each introduced commit changes<br/>(messages of locally authored commits only)"]
80
57
  MSG -->|unsafe or unrepairable| BLOCK
81
58
  REF -->|accepted| SHIP([Ref update commits])
@@ -92,130 +69,46 @@ flowchart TD
92
69
  class BLOCK stop
93
70
  ```
94
71
 
95
- - **Prevent:** on session start, known AI artifacts are written into `.git/info/exclude`
96
- (local, never your `.gitignore`), so they never even show in `git status`.
97
- - **Catch:** if one slips through, `pre-commit` unstages it and `commit-msg` removes
98
- complete, exact high-confidence attribution lines. Broader candidates are reported
99
- without editing the message. An unterminated exact final line stops unchanged because
100
- a byte-safe repair cannot be proved.
101
- - **Advise:** the plugin's `PreToolUse` reports paths before Git runs. It denies a
102
- protected commit/ref operation on every profile when the hook JSON is empty,
103
- invalid, or not an object, a required managed guard is missing, or hook/receiver
104
- indirection makes the final ref check unprovable. An unknown executor argument
105
- shape is denied on `strict`; `strict` also rejects uncertain execution and bypasses.
106
- - **Block:** `strict` cancels ordinary commits instead of repairing them. On every
107
- profile, the pinned-tree and final ref guards stop a commit that still contains a
108
- block finding or cannot be checked completely.
109
-
110
- ## By the numbers
111
-
112
- | | |
113
- | --- | --- |
114
- | Enforcement | repair-first ordinary commits; fail-closed final ref check; strict hard-blocking |
115
- | Policy profiles | 3 (clean, strict, compliance) |
116
- | Runtime dependencies | 0 (runs on Node, ships as source) |
117
- | Worktree files added by `init` | Normally 0; an existing worktree-relative `core.hooksPath` stays in use |
118
-
119
- ## Install
72
+ - **Prevent:** known AI artifacts go into `.git/info/exclude` on session start, so they never show in `git status`.
73
+ - **Catch:** `pre-commit` unstages what slips through; `commit-msg` removes exact high-confidence attribution lines.
74
+ - **Advise:** the plugin's `PreToolUse` reports paths early and denies protected commit/ref operations it cannot prove safe.
75
+ - **Block:** `strict` cancels instead of repairing; on every profile the final ref guard stops an unscannable or blocked commit.
120
76
 
121
- Node 22.8+ and Git 2.28+, zero runtime dependencies, ships as source. Git 2.28
122
- is required for the prepared-phase reference transaction guard that checks
123
- cherry-pick, revert, rebase, `git am`, and other ref-producing flows.
77
+ ## Quick start
124
78
 
125
79
  ```sh
126
80
  npm install -g @rmyndharis/aimhooman
81
+ aimhooman init # git hooks + local excludes; normally no worktree files
82
+ git commit -m "ship it" # guarded automatically
127
83
  ```
128
84
 
129
- Guard a repository:
130
-
131
- ```sh
132
- aimhooman init # git hooks + local excludes; normally no worktree files
133
- aimhooman init --grandfather-secrets # also allow --scope secret-path for every secret already tracked (fixtures); new secrets stay blocked
134
- aimhooman status
135
- aimhooman uninstall # restore hooks/excludes; keep local policy state
136
- aimhooman uninstall --purge-state # also delete common Git-directory state
137
- ```
138
-
139
- For commits you make at the terminal (outside your AI tool), one global setup guards
140
- eligible non-bare repositories that do not override `core.hooksPath` locally:
141
-
142
- ```sh
143
- aimhooman init --global --yes # advanced: change core.hooksPath after confirmation
144
- aimhooman uninstall --global # unset it
145
- ```
146
-
147
- Global `core.hooksPath` changes Git behavior for repositories that inherit it and can
148
- replace their default hook directory. A local or worktree-scoped override takes
149
- precedence. Bare repositories are outside the worktree/index policy boundary and the
150
- global dispatchers leave them unchanged. `status` shows both local and global values.
151
- Prefer repository `init` unless the global ordering is understood.
152
-
153
- When `core.hooksPath` is set, Git reads hooks only from that effective directory and
154
- ignores `.git/hooks`. Repository `init` installs and chains predecessors only when
155
- that directory is absent or is proven to be owned by the repository: inside it and
156
- not tracked by Git. It refuses to modify a global, shared, external, or tracked
157
- hook directory, because a dispatcher committed from one machine names paths that
158
- exist only on that machine. Those repositories are not guarded, and there is no
159
- way to guard them today. Calling `aimhooman precommit` from an existing hook
160
- manager runs the check but registers no managed guard, so the agent hook still
161
- refuses the commit. Remove the override before retrying, or accept that the
162
- repository is unguarded and do not run `init` there.
163
-
164
- Repository `init` installs `pre-commit`, `pre-merge-commit`, `commit-msg`, and
165
- `reference-transaction`, and preserves an existing hook as a predecessor. For
166
- `commit-msg`, aimhooman pins the would-be tree before the predecessor runs, so a later
167
- index change cannot select a weaker policy. The prepared reference transaction is the
168
- last local check for cherry-pick, revert, rebase, `git am`, fetch/worktree branch
169
- creation, and direct branch-ref updates. Every profile stops if a predecessor removes
170
- a required guard; the first running dispatcher that detects the loss aborts the
171
- operation.
172
-
173
- ## Use it in your AI coding tool
85
+ - `aimhooman init --gitignore` also writes the managed ignore block into the worktree
86
+ `.gitignore` — commit it to share the ignore set with every clone. Default stays local.
87
+ - `aimhooman init --global --yes` is the advanced one-time setup for terminal Git: it
88
+ changes global `core.hooksPath` for every inheriting repository caveats in
89
+ [docs/cli-reference.md](docs/cli-reference.md).
174
90
 
175
- Claude Code runs the installed plugin hook in each session. Codex runs it only after
176
- the user trusts the hook with `/hooks`, and the Copilot repository hook runs only when
177
- `aimhooman` is available on `PATH`. None of those host hooks replaces the Git-boundary
178
- guard: install that guard with `aimhooman init` (or the global setup). Instruction-tier
179
- hosts only load the ruleset until the Git guard is installed.
180
-
181
- Claude Code:
91
+ ## Profiles
182
92
 
183
- ```
184
- /plugin marketplace add rmyndharis/aimhooman
185
- /plugin install aimhooman@aimhooman
186
- ```
93
+ - **Default (`clean`):** repairs and warns; the final ref guard still vetoes what it cannot fully scan.
94
+ - **Strict for teams:** findings cancel the commit; commit `.aimhooman.json` so every clone shares the baseline.
187
95
 
188
- Codex:
96
+ `compliance` repairs like `clean` but keeps required AI attribution. Details: [docs/policy.md](docs/policy.md).
189
97
 
190
- ```text
191
- codex plugin marketplace add rmyndharis/aimhooman
192
- # start Codex, open /plugins, select the aimhooman marketplace,
193
- # install aimhooman, enable it, then start a new session
194
- /hooks
195
- # review and trust the aimhooman SessionStart and PreToolUse hooks
196
- ```
98
+ ## What it catches
197
99
 
198
- Codex CLI 0.144.3 or newer is the supported baseline, last checked on
199
- 2026-07-15. Until `/hooks` shows the plugin hooks as trusted, Codex skips them.
200
- Run `aimhooman status` and `aimhooman doctor` after `aimhooman init`; the Git
201
- hooks are the final commit boundary because PreToolUse does not see every shell
202
- execution path.
100
+ - **AI session/state artifacts**: `.claude/session*.json`, `.codex/sessions/`, `.aider.*`
101
+ — catalog: [docs/catalog.md](docs/catalog.md). Just want the ignore list? [docs/ai-artifacts.gitignore](docs/ai-artifacts.gitignore).
102
+ - **AI attribution** in commit messages (`Co-authored-by:` an AI, "Generated with" lines, AI noreply trailers) and **AI markers** left in code.
103
+ - **Review-required** files: `.aimhooman.json`, `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.github/copilot-instructions.md`.
203
104
 
204
- GitHub Copilot CLI:
105
+ Secret scanning is out of scope since v0.3.0 — [docs/secrets.md](docs/secrets.md) has the why and the gitleaks setup.
205
106
 
206
- ```sh
207
- npm install -g @rmyndharis/aimhooman
208
- ```
209
-
210
- The Copilot repository hook (`.github/hooks/aimhooman.json`) calls the `aimhooman`
211
- binary from PATH; it is advisory until you install the Git guard with
212
- `aimhooman init`. The npm install does not add host files to a repository
213
- automatically.
107
+ ## Use it in your AI coding tool
214
108
 
215
- Cursor, Cline, Windsurf, Kiro, Gemini, and Antigravity use the instruction files
216
- listed below. Other agents can use `AGENTS.md` or the packaged skill after their
217
- own instruction-loading contract is checked. Full matrix:
218
- [docs/design/agent-portability.md](docs/design/agent-portability.md).
109
+ Claude Code runs the plugin hook every session; Codex after you trust the hooks with
110
+ `/hooks`; Copilot's repository hook needs `aimhooman` on `PATH`. None replaces the Git
111
+ guard from `aimhooman init` full matrix: [docs/design/agent-portability.md](docs/design/agent-portability.md).
219
112
 
220
113
  | Host | File |
221
114
  | --- | --- |
@@ -229,241 +122,29 @@ own instruction-loading contract is checked. Full matrix:
229
122
  | Google Antigravity | `.agents/rules/aimhooman.md` (set the rule to Always On) |
230
123
  | Any agent | `AGENTS.md` or `skills/aimhooman/SKILL.md` |
231
124
 
232
- Instruction-tier files are templates in this source repository: copy the adapter you
233
- need into the target project. Installing the npm CLI does not modify host instruction
234
- files automatically.
235
-
236
- ## What it catches
237
-
238
- - **AI session/state artifacts**: examples include `.claude/session*.json`,
239
- `.claude/history*`, `.claude/projects/`, `.codex/sessions/`, `.codex/logs/`,
240
- `.copilot/`, `.cursor/chats/`, `.aider.*`, `.specstory/`,
241
- `.continue/sessions/`, `.playwright-mcp/`, `.remember/`, `.superpowers/`, and
242
- `.agent/`. [`rules/paths.json`](rules/paths.json) is the complete catalog.
243
- - **Secrets**: a real `.env` (not `.env.example`), private-key content,
244
- `.aws/credentials`, service-account private keys, recognized AWS secret/session
245
- assignments, and provider token prefixes for GitHub, GitLab, npm, Slack,
246
- Anthropic, OpenAI, Google, Stripe, Hugging Face, and SendGrid.
247
- Public certificates are allowed.
248
- - **AI attribution** in commit messages: known AI `Co-authored-by:` identities,
249
- exact "Generated with/by ..." lines, and AI-service noreply attribution trailers.
250
- - **AI markers** left in code: corner-cut tooling markers (ponytail/caveman/yagni-oneliner) and
251
- AI authorship comments (e.g. "generated by copilot/claude/chatgpt") in the staged content.
252
- - **Review-required** files: `.aimhooman.json`, `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`,
253
- `.github/copilot-instructions.md`.
254
-
255
- The Antigravity instruction directory `.agents/` is distinct from local state under
256
- `.agent/`.
257
-
258
- ## Profiles
259
-
260
- Set at init, e.g. `aimhooman init --profile strict`.
125
+ ## Run it in CI
261
126
 
262
- - **clean** (default): repair-first on the ordinary commit path AI artifacts are excluded or
263
- unstaged, and complete exact high-confidence attribution lines are removed. Instruction
264
- files, code markers, and broader attribution candidates stay visible as reviews. A block
265
- that remains after repair, a repair failure, or an incomplete scan stops the operation.
266
- - **strict**: hard enforcement — violations cancel the commit (exit 10) until you allow them.
267
- - **compliance**: repair-first like `clean`, but **keeps** any AI attribution your policy
268
- requires (no stripping).
127
+ The repository ships a `.pre-commit-hooks.yaml` for pre-commit.com and an `action.yml`
128
+ GitHub Action that scans the exact pull-request range the tier a laptop cannot skip.
129
+ Setups, plus gitleaks, husky, and lint-staged: [docs/integrations.md](docs/integrations.md).
269
130
 
270
- The bundled agent instructions set a stricter authoring rule: agents must not add AI
271
- attribution in the first place. Profiles control what the mechanical scanner does if
272
- that instruction is missed. A repository may adopt the same authoring rule while still
273
- using `clean` for automatic repair, or commit a strict team profile when every match
274
- must veto the commit.
275
-
276
- ### Versioned team policy
277
-
278
- Commit `.aimhooman.json` when every clone should use the same baseline:
279
-
280
- ```json
281
- {
282
- "schema_version": 1,
283
- "profile": "strict"
284
- }
285
- ```
286
-
287
- The project policy takes precedence over the per-clone profile written by `init`.
288
- An individual `check` may escalate to `--profile strict`, but cannot weaken or replace
289
- the team profile. Malformed project policy fails closed with an actionable error;
290
- personal allow/deny exceptions and local rule packs remain in the common Git directory
291
- under `aimhooman/`.
292
- Under `strict`, policy files and agent instructions produce review-required findings.
293
- The product's `review` and `policy-review` commands record local, object-bound decisions;
294
- an ordinary path allow cannot satisfy either finding.
295
-
296
- For a protected-path change, CI verifies the pinned repository and owner login plus
297
- numeric IDs through the GitHub API, then inspects the exact workflow-run attempt.
298
- GitHub must attribute both `actor` and `triggering_actor`, including their numeric IDs,
299
- to that owner. CI then binds the authorization to the exact head, transition commit,
300
- path, resulting blob and regular-file mode, or deletion tombstone. A strict-policy
301
- migration also binds its old and new policy objects. A different attempt, commit, path
302
- result, mode, or policy transition needs fresh authorization. A change not attributed to
303
- the owner fails closed. This is owner authorization verified through GitHub attribution,
304
- not independent review.
305
-
306
- ## Overrides
307
-
308
- Every decision has a rule ID, so you can resolve a finding narrowly:
309
-
310
- ```sh
311
- aimhooman allow AGENTS.md --reason "shared team config" # stop flagging this path
312
- aimhooman deny path/or/rule-id # always block it
313
- aimhooman explain claude.session-state # why a rule fires
314
- ```
131
+ ## Docs
315
132
 
316
- Overrides live in the repository's common Git directory under
317
- `aimhooman/overrides.json` (local, never committed), so linked worktrees share them.
318
-
319
- Secrets are never silenced by a normal path allow — that is deliberate, so a local
320
- override cannot hide a real leaked key. A file that legitimately contains secret-shaped
321
- text (documentation that quotes a key header, a detection test fixture) needs an
322
- explicit, auditable acknowledgment instead:
323
-
324
- ```sh
325
- aimhooman allow docs/key-format.md --scope secret-path --reason "documents the header"
326
- ```
327
-
328
- ```sh
329
- aimhooman override list --json
330
- aimhooman override remove AGENTS.md
331
- aimhooman override reset --all
332
- ```
333
-
334
- ## Commands
335
-
336
- ```
337
- aimhooman init | status | check | audit | scan | explain | allow | deny | override | review | policy-review | fix | doctor | uninstall | version
338
- ```
339
-
340
- `check` accepts one Git target (`--staged`, `--tracked`, `--commit <rev>`, or
341
- `--range <base>...<head>`), plus `--message <file>`, `--profile`, and `--json`.
342
- Commit and range targets read commit messages from Git automatically. A range scans each
343
- introduced commit, so a bad file added and deleted before the endpoint is still reported.
344
- Use an all-zero object ID as the base when there is no prior commit; this includes the root
345
- commit. Deleting an ordinary forbidden path is not itself a finding, while removing or
346
- lowering a versioned strict project policy still needs a bound policy review.
347
- `audit` and `scan` are aliases for a full tracked-index scan.
348
- `init --global --yes` and `uninstall --global` manage the advanced terminal-Git guard;
349
- `uninstall --global` cannot be combined with the local `--purge-state` option.
350
- `fix` follows the active profile: clean writes an exact safe repair, compliance makes no
351
- change, and strict previews unless `--apply` is supplied.
352
-
353
- Machine reports use `schema_version: 1` and include target policy identity, completeness,
354
- scan statistics, commit and object metadata. Schemas are published in [`schemas/`](schemas/).
355
-
356
- Add your own per-repository detection with local rule packs in the common Git directory
357
- under `aimhooman/rules/*.json`
358
- (the structural schema is in [`schemas/rule-pack.schema.json`](schemas/rule-pack.schema.json);
359
- local rules only add detection — they can't weaken
360
- a built-in block). Within one rule, local content patterns are capped at 32 expressions,
361
- 512 characters per expression, and 4,096 characters total. Path and exception scopes
362
- share the same glob count, per-expression, and total limits. They use a flat subset: literals,
363
- character classes, anchors, dot, escapes, and fixed `{n}` repeats. Groups, alternation,
364
- lookaround, backreferences, and variable quantifiers are rejected. A local expression
365
- does not run on a line longer than 16,384 characters; that skip is reported and makes the
366
- scan incomplete. Path rules are case-sensitive by default. Set
367
- `match.path_case` to `"insensitive"` only for a security name whose meaning is
368
- case-insensitive, such as `.env`; matching folds that rule's candidate and patterns but
369
- does not change the Git path or override identity.
370
-
371
- For an existing repository, start with `aimhooman audit --json`. If a residue path is
372
- already tracked, remove it from the index with `git rm --cached <path>` and add an
373
- appropriate ignore/exclude. If a secret was committed, rotate it first; history cleanup
374
- is deliberately outside aimhooman's scope.
375
-
376
- ## Exit codes
377
-
378
- | Code | Meaning |
133
+ | Page | Covers |
379
134
  | --- | --- |
380
- | 0 | clean, or non-blocking review |
381
- | 10 | policy violation (block) |
382
- | 11 | review-required on a non-clean profile |
383
- | 20 | usage, configuration, or rule-pack error |
384
- | 30 | Git or I/O error |
385
- | 31 | scan incomplete because a content or output budget was reached |
386
-
387
- ## FAQ
388
-
389
- **Is this a way to hide AI use?** No. aimhooman removes operational residue and
390
- establishes human ownership. It never changes author, committer, signature, or
391
- timestamp, and the compliance profile keeps any disclosure your policy requires.
392
-
393
- **Will it cancel my commits?** On the default `clean` profile, aimhooman first tries to
394
- exclude or unstage hygiene artifacts and safely remove exact attribution lines. The
395
- commit proceeds only if no block remains and every scan completes. A pre-existing
396
- tracked block, failed unstage/repair, unterminated exact attribution, secret, or scan
397
- budget failure stops the operation. `strict` cancels findings instead of repairing.
398
-
399
- **Does it slow commits down?** The staged check runs locally with no network and reads
400
- Git objects in batches. Text-oriented rules skip binary files, but byte-safe secret
401
- signatures still run over their raw bytes. Size and total budgets are visible in
402
- reports. Files over 2 MiB or a scan over 64 MiB make the scan incomplete; direct checks
403
- and Git pre-commit guards stop on every profile instead of claiming that content was checked.
404
-
405
- **Can the agent bypass it?** Any local tool can ultimately be bypassed by a user with
406
- commit access. On every profile, the agent guard rejects empty, invalid, or non-object
407
- hook JSON, unresolved Git subcommands/aliases, missing managed final guards, and hook
408
- or receive-pack indirection around protected ref mutations. An unknown executor
409
- argument shape is denied on `strict`; `strict` additionally rejects
410
- `--no-verify` and uncertain commit execution. The Git hook remains the source of truth
411
- for ordinary commits. Git hooks are not a sandbox: an editor or
412
- another local program started during a commit has the same filesystem access and can
413
- change a later hook. The strict agent guard rejects explicit editor overrides, commits
414
- that would open an editor, and commits with an active foreign `prepare-commit-msg` hook.
415
- It still cannot prove that every program already selected by local Git config is safe.
416
- Commands assembled from files, encoded data, or network input may also be invisible to
417
- its non-executing shell parser (POSIX shells — bash, sh, zsh, dash, ksh — and
418
- `git.exe`). Everyday read-only pipelines run, because a read-only source cannot hide or
419
- feed a commit: `git log | head`, `git status | grep modified`, `git diff | cat`,
420
- `git branch | grep`, `npm test | tail`, `cargo build 2>&1 | grep error`, and
421
- `cd repo && git log | head` all pass. What stays uncertain and, on `strict`, is denied
422
- with a retry instruction: a git command as a pipe *sink* (`cat patch | git apply`),
423
- pipe-to-shell (`curl x | bash`), command nesting, background jobs, and non-POSIX
424
- executors such as PowerShell or fish. Repository selection written in non-POSIX shell syntax
425
- is denied before policy lookup on every profile. Guarded Git changes, including
426
- `add`, commit, and ref updates, also reject shell-expanded targets, any leading-tilde
427
- target, POSIX targets beginning with exactly `//`, and an explicit split
428
- `--work-tree`; pass a literal expanded path or run the operation from that repository.
429
- On Windows, use a native `C:/...` target: POSIX-root
430
- targets such as `/c/...` and `/tmp`, drive-relative forms such as `C:repo`, and
431
- incomplete UNC roots are denied because the parser cannot map them to one native
432
- repository without running the command. Wrappers that can select another cwd or
433
- filesystem namespace, including `sudo`, `chroot`, `find -execdir`, WSL, and sandbox
434
- launchers, fail closed on every profile; retry as a direct Git command from the target
435
- repository. Nested non-POSIX shells and shell launches that explicitly select login,
436
- interactive, or startup-file behavior fail closed for the same reason. Treat local
437
- executables and Git config as trusted. For team enforcement, scan the actual PR range
438
- in CI (a normal CI checkout has no staged changes):
439
-
440
- `pre-commit` and `commit-msg` do not cover every sequencer or ref movement. The managed
441
- `reference-transaction` hook therefore checks introduced commits during Git's prepared
442
- phase and can abort the local ref update. Git 2.54's earlier `preparing` callback is
443
- accepted for compatibility and checks guard integrity; scanning remains in `prepared`,
444
- after references are locked.
445
- CI still scans the exact pushed or PR history:
446
- local hooks do not govern another clone, server-side updates, or history created before
447
- the guard was installed.
448
- Bare repositories have no worktree/index boundary and are not supported by local commands.
449
- A submodule is a separate repository with separate state and hooks; run `aimhooman init`
450
- inside each submodule that needs local enforcement.
451
-
452
- ```sh
453
- git fetch origin main
454
- aimhooman check --range origin/main...HEAD --profile strict
455
- ```
456
-
457
- On GitHub Actions, configure `actions/checkout` with `fetch-depth: 0` so the
458
- triple-dot merge base is available.
135
+ | [docs/catalog.md](docs/catalog.md) | every built-in rule, per profile |
136
+ | [docs/policy.md](docs/policy.md) | team policy, overrides, local rule packs |
137
+ | [docs/cli-reference.md](docs/cli-reference.md) | commands, flags, exit codes |
138
+ | [docs/faq.md](docs/faq.md) | hiding AI use, canceled commits, bypasses, speed |
139
+ | [docs/integrations.md](docs/integrations.md) | pre-commit.com, GitHub Action, gitleaks, husky |
140
+ | [docs/secrets.md](docs/secrets.md) | why secret scanning left, the gitleaks setup |
459
141
 
460
142
  ## Contributing
461
143
 
462
- Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) for how to add
463
- rules and host adapters, the test setup, and the commit policy. Please note this
464
- project has a [code of conduct](CODE_OF_CONDUCT.md); by participating you agree to
465
- abide by it. To report a security issue, see [SECURITY.md](SECURITY.md).
466
- Architecture notes live in [docs/design/](docs/design).
144
+ Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) for rules, host
145
+ adapters, tests, and the commit policy. This project has a [code of conduct](CODE_OF_CONDUCT.md);
146
+ by participating you agree to abide by it. To report a security issue, see
147
+ [SECURITY.md](SECURITY.md). Architecture notes live in [docs/design/](docs/design).
467
148
 
468
149
  ## License
469
150
 
package/SECURITY.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Security Policy
2
2
 
3
3
  aimhooman is itself a security-adjacent tool: it guards repositories against
4
- AI-tool residue and secrets reaching Git history. This policy covers the
4
+ AI-tool residue reaching Git history. This policy covers the
5
5
  security of aimhooman itself.
6
6
 
7
7
  ## Reporting a vulnerability
@@ -41,9 +41,11 @@ only the latest minor release will receive security fixes.
41
41
  - aimhooman **prevents leaks it has rules for**. It cannot catch novel AI-tool
42
42
  artifacts with no rule, and it does not rewrite existing history.
43
43
  - The default (`clean`) profile repairs ordinary hygiene findings when it can.
44
- Invalid local rule packs are skipped with a warning, but corrupt override state,
45
- incomplete staged-content scans, and unreadable Git targets stop every profile.
46
- If any blocked path cannot be unstaged or safely repaired, the operation stops.
44
+ Invalid local rule packs are skipped with a warning, but corrupt override state
45
+ and unreadable Git targets stop every profile. An incomplete scan warns on
46
+ clean/compliance and stops on strict; the final reference-transaction guard
47
+ stops on every profile when it cannot fully scan. If any blocked path cannot
48
+ be unstaged or safely repaired, the operation stops.
47
49
  The pinned-tree and final-ref guards also stop a remaining or pre-existing tracked
48
50
  block. `strict` vetoes instead of attempting clean/compliance repairs and also
49
51
  stops review decisions.