7 Commits

Author SHA1 Message Date
AminBlg d88aa463ae Release 2.0.2: fix the hook message, add a changelog
Fix: the PostToolUse hook told a harness to "Run the self-check in
SKILL.md before you deliver." Issue #31 reports that this made at
least one harness search the install folder for a file named
SKILL.md, instead of running the check inside the skill it already
had loaded. The message now names the fix directly.

Bump every version string to 2.0.2. Add CHANGELOG.md, back to 2.0.0.

Claude-Session: https://claude.ai/code/session_018LyDhBTHmY3mTwD5dBoEsm
2026-09-08 12:56:54 +01:00
AminBlg f545f6fb43 Merge branch 'pr-25' 2026-09-04 15:18:04 +01:00
AminBlg d2a51b7bd4 Rebuild the skill on what a reader sees: 2.0.1
The owner called the skill useless. The audit in
evals/results/WHY-USELESS-2026-09-02.md found that the benchmark measured
obedience to the regex linter: the committed baselines held zero slop
words, and in chat replies the skill left em-dashes, bold, headers, and
10+ sentences in place while a 70-token prompt met the five-sentence cap.

SKILL.md is now two registers, the document and the reply, at 1,746
tokens. The 53-rule catalog moved to references/rule-catalog.md for
check mode. The reply rules count list items, ban headers, bullets,
bold, and tables, and sit last in the prompt with a count-before-send
sentence: that placement cut em-dashes from 10-14 to 2-3 per 8 replies.
prompts/system-prompt.md and the output style mirror it.

evals/ste_lint.py gains reader_check and --type reply. The Stop hook
uses it. run_reply_bench.py takes any number of --skill label=path
conditions and reports the reader-visible counts. score_text_dir.py
takes any set of conditions.

Measured in evals/results/rebuild-2026-09-02/RESULTS.md: visible reply
defects 418 to 57 pooled over two sonnet-4-6 runs (2.0.0: 330), blind
judge 14-1-1 for 2.0.1 over 2.0.0, documents 0.91 viol/100w against
1.70, gpt-4.1-mini replies 8 of 8 under the cap. README carries the new
numbers and keeps the 1.3.0 history.

Claude-Session: https://claude.ai/code/session_018LyDhBTHmY3mTwD5dBoEsm
2026-09-04 15:11:27 +01:00
Eduardo Sotero f117792357 fix: keep the Codex hooks file out of the Claude Code hook path
Claude Code loads `hooks/hooks.json` by convention, on top of the hooks
declared in `.claude-plugin/plugin.json`. That file is the Codex config,
and it uses `${PLUGIN_ROOT}`, which Claude Code does not set. Every
Claude Code session start therefore failed the hook:

    SessionStart:startup hook error
    node:internal/modules/cjs/loader:1520
    Error: Cannot find module '/src/hooks/simple-english-activate.js'

The SessionStart hook still ran from `.claude-plugin/plugin.json`, so
the skill loaded and the error was non-blocking, but the user saw a
failure on every start.

Move the file to `.codex-plugin/hooks.json` and point the `hooks` field
of `.codex-plugin/plugin.json` at the new path. Codex reads the file by
that field, so it keeps working. Claude Code no longer finds a second
hook config, so it runs only the one that uses `${CLAUDE_PLUGIN_ROOT}`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018W14iLGDtsLRsUJPjz3kTX
2026-09-02 11:06:15 -03:00
AminBlg 558c6fa77c Pivot the skill to plain English by default; STE dictionary discipline on request (2.0.0)
The default mode is now Plain: write for a smart reader outside the
field. Six Plain English rules sit above the catalog: common word over
jargon, define each technical term at its first use in ten words or
fewer, address the reader as "you" and name the actor, lead with the
point, one idea per sentence, say what is true and not how important it
is. Sources: ASD-STE100 Issue 9, the GOV.UK style guide (explain terms
the first time, sentences over 25 words, "you"), and the plain-language
guidelines (active voice, present tense, hidden verbs).

Strict mode keeps full STE vocabulary compliance and now applies to the
document only; the reply stays Plain. Everything that needs the
dictionary moved to references/strict-vocabulary.md: rules 1.1-1.4, 1.6,
3.1, 9.2, GR-5, GR-8, the part-of-speech rulings, the verb rulings, and
the recurring-errors table. SKILL.md went from 6,334 to 4,944 tokens,
under the Agent Skills advisory of 5,000.

The condensed prompt and the output style carry the same pivot: a PLAIN
WORDS paragraph, a STRICT MODE paragraph, the "pick one" wording for
check/verify/confirm in both files (they disagreed before), and the
define-terms rule in the reply block.

Lexicon: evals/slop.tsv (69 terms named by 8 or more of 122 published
ban lists) now feeds evals/ste_lint.py as a union with the measured core
list. On the 112 stored generations this moves the skill-side rate by
+0.02 per 100 words.

Two advisory hooks for Claude Code in src/hooks/lint_hook.py: PostToolUse
lints Markdown files the agent writes, Stop checks the reply register.
Neither blocks. Tests in src/hooks/test_lint_hook.py.

evals/reply_scenarios.json adds eight chat-style prompts with a jargon
term each, for the reply-register benchmark.
2026-09-01 12:57:26 +01:00
AminBlg 151d41b5ea Wire the Codex hook, fit the Claude payload under the cap, fall back on any read error
.codex-plugin/plugin.json had no `hooks` field, so Codex never loaded
hooks/hooks.json; the field now names it. Codex also needs
.agents/plugins/marketplace.json for `codex plugin marketplace add`; added.

Claude Code caps hook stdout at 10,000 characters. The hook sent the
whole SKILL.md, about 19,000, which Claude Code spills to a file and
replaces with a preview. The hook now sends prompts/system-prompt.md,
the condensed rules, and names the full skill path. A test asserts the
payload stays under the cap; an oversized prompt falls back instead of
being cut mid-sentence.

readFirstFile rethrew everything except ENOENT and ENOTDIR, so an
unreadable file or a directory named system-prompt.md crashed the hook
with no output. It now tries the next candidate and falls back only when
all fail. Tests cover EACCES, EISDIR, main() under both environment
variables, and the all-fail path. src/hooks/README.md states the caps
and the fallback as they are.
2026-09-01 12:46:25 +01:00
alexxozo 8cbfbfb07b Auto-load Simple English in Claude Code and Codex 2026-08-11 13:12:16 +02:00