Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"env": { "HUMANIZER_HOOK": "off" }
}
2 changes: 2 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
python-version: "3.12"
- name: Check package files
run: python3 scripts/validate-package.py
- name: Test scorer and hooks
run: python3 -m unittest discover -s tests
- name: Check skill discovery
run: npx --yes skills@1.5.20 add . --list
- name: Check Claude marketplace
Expand Down
7 changes: 6 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ Keep the skill portable. Do not write instructions that limit it to one or two a
- `.cursor-plugin/plugin.json` describes the Cursor plugin. Omit a `skills` path so Cursor loads the root `SKILL.md`.
- `package.json` makes the repo a pi package. Its `pi.skills` entry points at the repo root so pi loads the root `SKILL.md`. Do not add a `version` field; pi installs from git.
- `agents/openai.yaml` holds the display name, short description, and default prompt for OpenAI-compatible agents.
- `hooks/hooks.json` holds the Claude plugin hooks. Claude Code loads it from the plugin root, so do not also list it in `plugin.json`. It runs `scripts/humanizer-hook.py` on `SessionStart`, `UserPromptSubmit`, `PreToolUse` (`Write|Edit|MultiEdit`), and `Stop`.
- `scripts/humanizer-hook.py` routes each hook event. It adds the rules to context, blocks prose writes and final replies that the scorer flags (exit code 2), and carries thinking findings to the next prompt.
- `scripts/humanizer-lint.py` scores text with a weighted linear model over the `SKILL.md` patterns, in the style of `ste-lint`. Use only the Python standard library. Mark a feature `hard` only for a tell that justifies an edit on one sighting. If you renumber a pattern, update the `§` labels; the validator checks them.
- `tests/test_hooks.py` and `tests/fixtures.json` test the scorer and every hook event. A new feature must keep the human fixtures unflagged.
- `.claude/settings.json` turns the hooks off in this repo, because `SKILL.md` lists every tell.
- `scripts/validate-package.py` checks package files and shared values.

## Rules for changes
Expand All @@ -30,7 +35,7 @@ Keep `SKILL.md` and `README.md` in sync.
- **Description:** The plugin manifests use the first sentence of the `SKILL.md` description.
- **Length:** Every word of `SKILL.md` is read on each use. The validator caps it at 5,500 words; a change that adds words should earn them.
- **History:** Add a short `CHANGELOG.md` note for any behavior change or non-obvious fix.
- **Checks:** Before publishing, run `python3 scripts/validate-package.py`, `npx skills add . --list`, and `claude plugin validate .`.
- **Checks:** Before publishing, run `python3 scripts/validate-package.py`, `python3 -m unittest discover -s tests`, `npx skills add . --list`, and `claude plugin validate .`.

## Writing style

Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## Unreleased

- Reordered `README.md` so Usage follows Installation and the hook settings come after it. The intro now names both parts: the rewrite skill and the Claude Code hooks that the plugin enables in Claude Code settings.
- The scorer no longer counts a one-line lead-in that ends in a colon as a closer paragraph.

- Restructured `README.md` to the RWS application profile: added Status, Requirements, Configuration, Testing, and Support sections, an install check with `/hooks`, and the scorer sources. Corrected the hook scoring notes (20-word floor; §12 words are weighted, not one-sighting).

- Replaced both README "After" examples with fresh rewrites of the same "Before" text, made with the hooks on and checked for dropped or changed facts. The blind-test note now says it tested an earlier rewrite.

- The Claude Code plugin now enforces Humanizer with hooks, on prose files, chat replies, and thinking. `PreToolUse` blocks prose writes that the scorer flags. `Stop` sends a flagged reply back for a rewrite. `SessionStart` and `UserPromptSubmit` add the rules to context and report tells found in the last turn's thinking. Set `HUMANIZER_HOOK=off` to turn them off.
- Added `scripts/humanizer-lint.py`, a weighted linear scorer over the `SKILL.md` patterns, modeled on `ste-lint`. Stock-word weights follow published frequency ratios (Kobak et al. 2025; Reinhart et al. 2025); passive voice and type-token ratio are left out because they do not point reliably at AI text (El Attar et al. 2026). One-sighting tells flag a text alone; weaker lexical and structural signals flag it together. Added `tests/` with fixtures for the scorer and each hook event.

- Tightened `SKILL.md` and `README.md` for clarity, concision, and readability. Reworded four "After" examples (§6, §13, §15, §25) so they read naturally and avoid stock academic phrasing.
- Added "the part" as a stand-in to §4: "the hard part is X" stages X, and "the part that doesn't" or "the part worth sharing" points at something the text never names (#338).
- `scripts/validate-package.py` now fails when a pattern number appears twice in `SKILL.md` or in the README tables. Before, the second one replaced the first and the check passed (#340).
Expand Down
Loading
Loading