Skip to content
Merged
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
10 changes: 10 additions & 0 deletions plugins/concise/.claude/concise.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
"fileSize": true,
"prBody": true
},
"scan": {
"codeFiles": true,
"notebooks": true,
"heredocWrites": true,
"shellWrites": true,
"mcp": true,
"plans": true,
"tasks": true,
"questions": true
},
"stopHook": true,
"softFail": false,
"styleIgnoreGlobs": [
Expand Down
16 changes: 15 additions & 1 deletion plugins/concise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,21 @@ The 47 categories fall into 5 groups.

The full table, with every category id, its presets, and the scopes it runs in, is in [docs/categories.md](docs/categories.md). The flagged text and the replacement for every pattern are in [skills/concise-rules/references/ai-speak-patterns.md](skills/concise-rules/references/ai-speak-patterns.md).

What gets scanned: prose files (`md`, `mdx`, `markdown`, `txt`, `rst`, `adoc`, `asciidoc`) whole, with fenced blocks, inline code, URLs, and HTML comments blanked first; comment runs in code files; `gh pr` and `gh issue` bodies; `git commit` messages from `-m`, `--message=`, and the heredoc form; and the agent's final reply through the `Stop` hook when `replies` is true.
What gets scanned:

- Prose files (`md`, `mdx`, `markdown`, `txt`, `rst`, `adoc`, `asciidoc`) whole, with fenced blocks, inline code, URLs, and HTML comments blanked first.
- Comment runs in code files. Packs with the `code` scope, `hidden-characters` by default, read the whole file, string literals included.
- Notebook cells: a markdown cell as prose, a code cell as code.
- Files a shell command writes: a `cat` or `tee` heredoc before the command runs, and any other file the command changed in a git work tree after it runs.
- `gh pr`, `gh issue`, and `gh release` titles and bodies, inline, heredoc, or from a body file, and `gh api` request bodies.
- `git commit`, `git tag`, `git merge`, `git notes`, `jj`, and `hg` messages from `-m`, `--message=`, `-F`, `--trailer`, and the heredoc form.
- Text and files that MCP tools post or write, such as a PR body, a chat message, a doc page, or a pushed file.
- The plan that `ExitPlanMode` shows for approval, task text, and questions that `AskUserQuestion` asks you.
- The agent's final reply through the `Stop` hook when `replies` is true.

Each place past Write and Edit has an on-by-default switch under `scan`, listed in [docs/configuration.md](docs/configuration.md).

Not scanned: the agent's text between tool calls, because no hook can return it to the agent; page text in HTML files; and shell writes outside a git work tree. In Codex, shell writes are checked only for `cat` and `tee` heredocs. The omp extension checks neither MCP tools nor shell writes.

## Cloud agents and environment variables

Expand Down
6 changes: 3 additions & 3 deletions plugins/concise/docs/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Last updated: 2026-10-08

| Doc | Read it to | Created | Last updated |
|---|---|---|---|
| [configuration.md](configuration.md) | Find a config key, its default, the layer order, the merge rules, `mode`, and the dictionary. | 2026-09-04 | 2026-10-06 |
| [configuration.md](configuration.md) | Find a config key, its default, the layer order, the merge rules, `mode`, and the dictionary. | 2026-09-04 | 2026-10-08 |
| [tools.md](tools.md) | Change settings with the `concise-config` CLI or the MCP tools, or tune them from writing samples. | 2026-10-05 | 2026-10-05 |
| [environment.md](environment.md) | Control a session with `BEC_` variables. | 2026-09-04 | 2026-10-05 |
| [environment.md](environment.md) | Control a session with `BEC_` variables. | 2026-09-04 | 2026-10-08 |
| [categories.md](categories.md) | Look up an AI writing category, its presets, and its scopes. | 2026-09-04 | 2026-10-08 |
| [packs.md](packs.md) | Write or check a pattern pack. | 2026-09-04 | 2026-10-08 |
| [host-features.md](host-features.md) | Check which Claude Code, Codex, and omp hook, skill, and MCP features the manifests and the omp extension use, with the host doc sources and the live test results. | 2026-10-05 | 2026-10-07 |
| [host-features.md](host-features.md) | Check which Claude Code, Codex, and omp hook, skill, and MCP features the manifests and the omp extension use, with the host doc sources and the live test results. | 2026-10-05 | 2026-10-08 |

Read [host-features.md](host-features.md) and its sources before you change `hooks/hooks.json`, `hooks/codex.json`, `.mcp.json`, `.codex-mcp.json`, `package.json`, `omp/`, or a plugin manifest.
6 changes: 3 additions & 3 deletions plugins/concise/docs/categories.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The `aiWriting` feature ships 47 categories. Each category is one pack file unde

Pick categories with `features.aiWriting.preset`, or replace the preset list with `features.aiWriting.categories`. Both keys are described in [configuration.md](configuration.md). The flagged text and the replacement for every pattern are in [../skills/concise-rules/references/ai-speak-patterns.md](../skills/concise-rules/references/ai-speak-patterns.md).

Scope names: `files` (prose files), `comments` (comment runs in code files), `gh` (`gh pr` and `gh issue` bodies), `commit` (`git commit` messages), `command` (the full command line), `reply` (the agent's final reply).
Scope names: `files` (prose files and plans), `comments` (comment runs in code files), `code` (whole code files, string literals included), `gh` (`gh pr`, `gh issue`, and `gh release` titles and bodies, `gh api` bodies, and MCP tool posts), `commit` (`git commit`, `git tag`, `git merge`, `jj`, and `hg` messages), `command` (the full command line), `reply` (the agent's final reply, task text, and questions to the user).

## Phrase categories

Expand Down Expand Up @@ -63,11 +63,11 @@ Scopes across this group: `comments`, `gh`, `commit`, `command`, `reply`. The sc

## Punctuation categories

Scopes across this group: `files`, `comments`, `gh`, `commit`, `command`, `reply`. The scope column below gives the scopes for each category.
Scopes across this group: `files`, `comments`, `code`, `gh`, `commit`, `command`, `reply`. The scope column below gives the scopes for each category.

| id | What it catches | Flagged example | Fix | Presets | Scopes |
|---|---|---|---|---|---|
| `hidden-characters` | Invisible or look-alike characters that model output and chat UIs leave in text. | a zero-width space | remove the character | `default`, `ryan`, `technical`, `git`, `all` | `files`, `comments`, `gh`, `commit`, `command`, `reply` |
| `hidden-characters` | Invisible or look-alike characters that model output and chat UIs leave in text. | a zero-width space | remove the character | `default`, `ryan`, `technical`, `git`, `all` | `files`, `code`, `gh`, `commit`, `command`, `reply` |
| `smart-punctuation` | Curly quotes and the ellipsis character typical of text pasted from a chat UI. | a curly apostrophe | use a straight apostrophe | `default`, `ryan`, `technical`, `all` | `comments`, `commit`, `gh`, `command`, `reply` |
| `unicode-glyphs` | Arrows, box drawing, dingbats, and geometric symbols used in place of plain ASCII or words. | an arrow character | use `->` | `default`, `ryan`, `technical`, `all` | `commit`, `gh`, `command`, `reply` |

Expand Down
22 changes: 20 additions & 2 deletions plugins/concise/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ Copy `.claude/concise.json.example` to `.claude/concise.json` (Claude Code) or `
| `checks.comments` | `true` | Runs the comment length check. |
| `checks.fileSize` | `true` | Runs the file length check. |
| `checks.prBody` | `true` | Runs the `gh` body check. |
| `scan.codeFiles` | `true` | Runs `code`-scope packs and dictionary entries over whole code files, string literals included. |
| `scan.notebooks` | `true` | Checks notebook cells that `NotebookEdit` writes. |
| `scan.heredocWrites` | `true` | Checks files that `cat` or `tee` writes from a heredoc, before the command runs. |
| `scan.shellWrites` | `true` | Checks the lines a shell command added to files in a git work tree, after it runs. |
| `scan.mcp` | `true` | Checks the text and files that MCP tools post or write. |
| `scan.plans` | `true` | Checks the plan that `ExitPlanMode` shows for approval. |
| `scan.tasks` | `true` | Checks `TaskCreate` and `TaskUpdate` text. |
| `scan.questions` | `true` | Checks `AskUserQuestion` questions and options. |
| `stopHook` | `true` | Runs reply checks on `Stop` and `SubagentStop`. |
| `context.enabled` | `true` | Sends resolved rules at startup, resume, compaction, and subagent creation. |
| `context.perTurn` | `false` | Also sends rules on `UserPromptSubmit`. |
Expand Down Expand Up @@ -78,7 +86,7 @@ A project file overrides `BEC_FEATURE_ENABLE`. `BEC_FEATURE_ALWAYS_ENABLE` overr

A config file or a `BEC_CONFIG_JSON` value that does not parse as a JSON object is skipped. The other layers still apply, and the hook reports the skipped layer once per session in a `systemMessage`.

## checks and stopHook
## checks, scan, and stopHook

Each core check has its own switch under `checks`: `comments`, `fileSize`, and `prBody`, all `true` by default. Setting one to `false` skips that check and leaves the style checks running.

Expand All @@ -89,6 +97,16 @@ Each core check has its own switch under `checks`: `comments`, `fileSize`, and `
}
```

Each place the style checks read beyond Write and Edit has a switch under `scan`, all `true` by default. Setting one to `false` stops the style checks there and leaves the rest running. The README lists what each one covers.

`scan.shellWrites` runs on `PostToolUse`, so the text is already on disk and the findings come back next to the command output. It reads files whose mtime falls inside the command's run time, at most 20 per command, and reports each finding once per session. It compares the work tree with the git index: older unstaged lines in a changed file are reported once too, and a change the command also staged is missed.

```json
{
"scan": { "shellWrites": false, "tasks": false }
}
```

`"stopHook": false` skips `Stop` and `SubagentStop` reply checks before reading transcripts. `SubagentStop` uses `last_assistant_message`, then `agent_transcript_path`. Retry and confirmation state is separate for each session and agent. `SessionEnd` removes that session's state within a bounded cleanup window.

## Lifecycle context and host hooks
Expand Down Expand Up @@ -159,7 +177,7 @@ The evaluator checks reply padding with the resolved rules, bypasses, soft-fail
| `caseSensitive` | no | `false` by default. |
| `flags` | no | Regex flags for `regex` entries. Default `i`. The scanner adds `g` and `d` and drops `y`. |
| `hooks` | no | `edit`, `bash`, `stop`, `subagentStop`. Absent means all 4. |
| `scopes` | no | `files`, `comments`, `gh`, `commit`, `command`, `reply`. Absent means every scope except `command`. |
| `scopes` | no | `files`, `comments`, `code`, `gh`, `commit`, `command`, `reply`. Absent means every scope except `command` and `code`. |
| `enabled` | no | `false` switches the entry off. A switched-off entry needs only its `id`. |

How `on` changes the match:
Expand Down
2 changes: 1 addition & 1 deletion plugins/concise/docs/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The layer column refers to the 5 config layers in [configuration.md](configurati
| `BEC_BYPASS_PHRASES` | phrase list | `bypass.phrases` | 5 |
| `BEC_BYPASS_PATTERNS` | regex list | `bypass.patterns` | 5 |

Feature ids for `BEC_FEATURE_*`: `emDash`, `aiWriting`, `dictionary`, `comments`, `fileSize`, `prBody`, and `stopHook`.
Feature ids for `BEC_FEATURE_*`: `emDash`, `aiWriting`, `dictionary`, `comments`, `fileSize`, `prBody`, `stopHook`, and the `scan` switches `codeFiles`, `notebooks`, `heredocWrites`, `shellWrites`, `mcp`, `plans`, `tasks`, and `questions`.

Pattern ids for `BEC_*_PATTERNS`: a category id, a pack id, or `tag:<tag>`. An unknown id is ignored. The category ids are listed in [categories.md](categories.md).

Expand Down
16 changes: 13 additions & 3 deletions plugins/concise/docs/host-features.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Host features

Created: 2026-10-05
Last updated: 2026-10-07
Last updated: 2026-10-08

The Claude Code and Codex features the concise manifests use, as the host docs described them on 2026-10-05, and the omp features the omp extension uses, as of 2026-10-07. Read the sources again before you change a manifest or `omp/extension.mjs`.
The Claude Code and Codex features the concise manifests use, as the host docs described them on 2026-10-05 (2026-10-08 for the `NotebookEdit`, `PowerShell`, MCP, task, question, and `PostToolUse` rows), and the omp features the omp extension uses, as of 2026-10-07. Read the sources again before you change a manifest or `omp/extension.mjs`.

## Used by the manifests

Expand All @@ -12,12 +12,20 @@ The Claude Code and Codex features the concise manifests use, as the host docs d
| `statusMessage` on a command handler | yes | yes | Every handler in `hooks/hooks.json` and `hooks/codex.json` |
| `SessionStart` matcher `fork` | yes | no: `startup`, `resume`, `clear`, `compact` | `hooks/hooks.json` |
| `if` on a handler | yes | no | `hooks/hooks.json` shell hooks only |
| `if` with a permission rule per handler, such as `Bash(cat *)`, matched against each subcommand | yes | no | `hooks/hooks.json`: the heredoc-write handlers of `check-edit`, the `jj` handlers of `check-bash`, and the `PowerShell` handlers |
| `NotebookEdit` input: `notebook_path`, `cell_id`, `new_source`, `cell_type`, `edit_mode` | yes | no | `hooks/hooks.json` `PreToolUse`, read by `check-edit.mjs` |
| `PowerShell` tool with `tool_input.command` | yes | no | `hooks/hooks.json` `PreToolUse`, read by `check-bash.mjs` |
| A matcher with characters outside letters, digits, `_`, `-`, `\|`, and `,` is a regex, so `mcp__.*` matches every `mcp__<server>__<tool>` call | yes | yes: every matcher is a regex, and `PreToolUse` fires for MCP tools | `PreToolUse` in both manifests, read by `check-tool-text.mjs` |
| `PreToolUse` on `ExitPlanMode` (`plan`, which Claude Code fills from the plan file), on `TaskCreate` and `TaskUpdate` (`subject`, `description`, `activeForm`) and on `AskUserQuestion` (`questions[].question`, `options[].label`, `options[].description`) | yes | no | `hooks/hooks.json`, read by `check-tool-text.mjs` |
| `PostToolUse` input with `duration_ms`, and `decision: "block"`, which adds the reason next to the tool result | yes | not used | `hooks/hooks.json` `PostToolUse` on `Bash\|PowerShell`, read by `check-shell-writes.mjs` |
| `SubagentHandback` tool carries the subagent report in `tool_input.message` (auto mode, v2.1.271 or later) | yes | no | `hooks/hooks.json` `PreToolUse` |
| `SubagentStop` fires for internal agents, with an empty `agent_type` when the session has no `--agent` | yes | no | `check-reply.mjs` skips them |
| Plugin MCP server file with `${CLAUDE_PLUGIN_ROOT}` in `args` | yes | no: see below | `.mcp.json` (Claude Code), `.codex-mcp.json` (Codex) |
| `${CLAUDE_PLUGIN_ROOT}` in plugin skill text | yes | not documented | `skills/*/SKILL.md`, with a relative path for Codex |
| `interface.composerIcon` and `interface.logo` | n/a | yes | `.codex-plugin/plugin.json` |

The hooks docs say a handler defined in more than one settings file runs once. They do not say whether two handlers in one plugin with the same command and different `if` rules both run for one call. When their rules can overlap, `check-edit` and `check-bash` claim the call's `tool_use_id`, so a second run exits without output.

## Codex MCP server

The Codex plugin docs describe bundled MCP servers and plugin-scoped policy under `plugins.<plugin>.mcp_servers.<server>`, with a remote HTTP server as the example. They do not cover local stdio paths. A live run with codex-cli 0.159.0 on 2026-10-05, with the plugin installed from this repository into a temporary `CODEX_HOME`, showed:
Expand Down Expand Up @@ -54,13 +62,15 @@ A live run with omp 18.7.0 on 2026-10-07 confirmed these shapes. In that run, a

omp's Claude marketplace loader, `src/discovery/claude-plugins.ts`, substitutes `${CLAUDE_PLUGIN_ROOT}` in MCP `args` and loads `skills/`. The omp docs do not mention `CLAUDE_PROJECT_DIR`, so pass `cwd` to the project tools as in Codex.

Gaps: omp has no subagent stop event, so subagent replies are not checked. omp blocks a tool call whose handler throws or runs past 30 s, so the extension catches every hook failure and allows the call. omp loads extensions at session start: start a new session after an install or update.
Gaps: omp has no subagent stop event, so subagent replies are not checked. The extension does not check MCP tool calls, and it does not scan files that a shell command changes. omp blocks a tool call whose handler throws or runs past 30 s, so the extension catches every hook failure and allows the call. omp loads extensions at session start: start a new session after an install or update.

## Left out

- Plugin `bin/` on `PATH` (Claude Code): claude.ai and Cowork refuse a plugin with a `bin/` directory.
- `userConfig` prompts at install time (Claude Code): deferred.
- `PostToolBatch`, `additionalContext` on `Stop`, and exec-form `args` (Claude Code): no current use.
- `MessageDisplay` (Claude Code): it only changes what the terminal shows. It cannot block a message or send text to Claude, so text between tool calls stays unchecked.
- `TaskCreated` (Claude Code): the `PreToolUse` hook on `TaskCreate` reads the same subject and description.

## Sources

Expand Down
19 changes: 11 additions & 8 deletions plugins/concise/docs/packs.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,17 @@ Every `'` inside a `phrase` or an `opening` compiles to `['’]`, so the straigh

| Scope | Text scanned | Hook |
|---|---|---|
| `files` | A prose file, whole (`md`, `mdx`, `markdown`, `txt`, `rst`, `adoc`, `asciidoc`) | `check-edit.mjs` |
| `comments` | Comment runs in a code file | `check-edit.mjs` |
| `gh` | A `gh pr` or `gh issue` body | `check-bash.mjs` |
| `commit` | A `git commit` message | `check-bash.mjs` |
| `command` | The full `git commit` or `gh` command line | `check-bash.mjs` |
| `reply` | The agent's final reply | `check-reply.mjs` |

Leaving `scope` out gives the pack every scope except `command`.
| `files` | A prose file, whole (`md`, `mdx`, `markdown`, `txt`, `rst`, `adoc`, `asciidoc`), and the plan `ExitPlanMode` shows | `check-edit.mjs`, `check-shell-writes.mjs`, `check-tool-text.mjs` |
| `comments` | Comment runs in a code file | `check-edit.mjs`, `check-shell-writes.mjs`, `check-tool-text.mjs` |
| `code` | A code file or a file of unknown type, whole, string literals included | `check-edit.mjs`, `check-shell-writes.mjs`, `check-tool-text.mjs` |
| `gh` | A `gh pr`, `gh issue`, or `gh release` title or body, a `gh api` request body, and the text an MCP tool posts | `check-bash.mjs`, `check-tool-text.mjs` |
| `commit` | A `git commit`, `git tag`, `git merge`, `git notes`, `jj`, or `hg` message, and the commit message of an MCP file push | `check-bash.mjs`, `check-tool-text.mjs` |
| `command` | The full `git` or `gh` command line | `check-bash.mjs` |
| `reply` | The agent's final reply, task text, and questions to the user | `check-reply.mjs`, `check-tool-text.mjs` |

`check-edit.mjs` also reads a file that `cat` or `tee` writes from a heredoc, and a notebook cell: a markdown cell as a prose file, a code cell as a code file. `check-shell-writes.mjs` reads the lines a shell command added to files in a git work tree, after the command runs. `check-tool-text.mjs` reads a file an MCP tool writes the same way.

Leaving `scope` out gives the pack every scope except `command` and `code`.

## presets semantics

Expand Down
Loading
Loading