agent-simple-english 0.1.0
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/.claude-plugin/marketplace.json +23 -0
- package/.claude-plugin/plugin.json +12 -0
- package/LICENSE +21 -0
- package/README.md +435 -0
- package/THIRD_PARTY_NOTICES.md +13 -0
- package/commands/ste.md +13 -0
- package/hooks/hooks.json +58 -0
- package/package.json +64 -0
- package/src/adapter/commit-message.ts +472 -0
- package/src/adapter/feedback.ts +40 -0
- package/src/adapter/rule-summary.ts +79 -0
- package/src/cli/hook.ts +681 -0
- package/src/cli/main.ts +201 -0
- package/src/cli/session-command.ts +78 -0
- package/src/cli/session-state.ts +214 -0
- package/src/config/load.ts +85 -0
- package/src/config/merge.ts +20 -0
- package/src/config/schema.ts +69 -0
- package/src/dictionary/README.md +18 -0
- package/src/dictionary/data/pi-ste.json +200 -0
- package/src/dictionary/form.ts +6 -0
- package/src/dictionary/load.ts +54 -0
- package/src/dictionary/schema.ts +28 -0
- package/src/engine/comments.ts +386 -0
- package/src/engine/diff.ts +328 -0
- package/src/engine/identifiers.ts +20 -0
- package/src/engine/kinds.ts +43 -0
- package/src/engine/lint.ts +530 -0
- package/src/engine/markdown.ts +338 -0
- package/src/engine/paragraphs.ts +105 -0
- package/src/engine/rules/contraction.ts +19 -0
- package/src/engine/rules/dictionary.ts +281 -0
- package/src/engine/rules/hedging.ts +27 -0
- package/src/engine/rules/marketing.ts +71 -0
- package/src/engine/rules/paragraph-length.ts +23 -0
- package/src/engine/rules/phrasal-verb.ts +57 -0
- package/src/engine/rules/registry.ts +15 -0
- package/src/engine/rules/semicolon.ts +14 -0
- package/src/engine/rules/sentence-length.ts +24 -0
- package/src/engine/rules/verb-form.ts +76 -0
- package/src/engine/scan.ts +15 -0
- package/src/engine/sentences.ts +285 -0
- package/src/engine/tagger.ts +8 -0
- package/src/engine/tokens.ts +2 -0
- package/src/engine/types.ts +45 -0
- package/src/extension/index.ts +755 -0
- package/src/tagger/wink.ts +44 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
|
|
3
|
+
"name": "agent-simple-english",
|
|
4
|
+
"owner": {
|
|
5
|
+
"name": "JIA YI"
|
|
6
|
+
},
|
|
7
|
+
"metadata": {
|
|
8
|
+
"description": "Local install source for the Simple English Claude Code plugin."
|
|
9
|
+
},
|
|
10
|
+
"plugins": [
|
|
11
|
+
{
|
|
12
|
+
"name": "simple-english",
|
|
13
|
+
"description": "Apply Simplified Technical English rules to writes, edits, and git commit messages.",
|
|
14
|
+
"version": "0.1.0",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "JIA YI"
|
|
17
|
+
},
|
|
18
|
+
"source": "./",
|
|
19
|
+
"category": "development",
|
|
20
|
+
"homepage": "https://github.com/jyooi/agent-simple-english"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://anthropic.com/claude-code/plugin.schema.json",
|
|
3
|
+
"name": "simple-english",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Apply Simplified Technical English rules to writes, edits, and git commit messages.",
|
|
6
|
+
"repository": "https://github.com/jyooi/agent-simple-english",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"keywords": ["simplified-technical-english", "lint", "hooks"],
|
|
9
|
+
"author": {
|
|
10
|
+
"name": "JIA YI"
|
|
11
|
+
}
|
|
12
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 JIA YI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
# agent-simple-english
|
|
2
|
+
|
|
3
|
+
`agent-simple-english` checks ASD-STE100 Simplified Technical English (STE).
|
|
4
|
+
It supplies one Engine, one CLI, a pi Adapter, and a Claude Code Adapter.
|
|
5
|
+
The Claude Code plugin uses CLI Hook mode to enforce the same rules.
|
|
6
|
+
|
|
7
|
+
This package reports deterministic writing problems.
|
|
8
|
+
It does not rewrite text because an automatic rewrite can change its meaning.
|
|
9
|
+
|
|
10
|
+
## What the pi Adapter does
|
|
11
|
+
|
|
12
|
+
The pi Adapter adds its active STE rules to the model prompt before each agent turn.
|
|
13
|
+
It then applies the rules at three layers.
|
|
14
|
+
|
|
15
|
+
1. **Write and edit gate.**
|
|
16
|
+
The extension checks prose before the `write` or `edit` tool changes a file.
|
|
17
|
+
A hard violation blocks the tool.
|
|
18
|
+
A soft violation gives the model a warning but lets the tool change the file.
|
|
19
|
+
An edit reports only new violations, so an old violation does not block an unrelated edit.
|
|
20
|
+
|
|
21
|
+
2. **Commit-message gate.**
|
|
22
|
+
The extension checks static messages in detected `git commit -m` and `git commit --message` commands.
|
|
23
|
+
A hard violation blocks the command before the shell starts.
|
|
24
|
+
Conventional Commit prefixes and final trailer lines do not form part of the check.
|
|
25
|
+
A detected commit without an available static message fails closed.
|
|
26
|
+
|
|
27
|
+
3. **Reply check.**
|
|
28
|
+
Normal mode checks each final assistant reply and shows the hard and soft counts in a widget.
|
|
29
|
+
The model receives hard violation details before its next call.
|
|
30
|
+
Normal mode does not hide or change the reply.
|
|
31
|
+
Strict mode makes the model send each reply through the `say` tool.
|
|
32
|
+
A strict reply stays hidden until it has no hard violations.
|
|
33
|
+
|
|
34
|
+
The pi Adapter checks Markdown prose and source comments according to the [content kinds](#content-kinds).
|
|
35
|
+
It gives the line, column, rule ID, and suggested correction for a blocked tool call.
|
|
36
|
+
A config or dictionary load error makes enabled write, edit, and commit gates fail closed.
|
|
37
|
+
|
|
38
|
+
## Install the Claude Code Adapter
|
|
39
|
+
|
|
40
|
+
Install [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [Bun](https://bun.sh) first.
|
|
41
|
+
Then use the standard local plugin flow:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
claude plugin marketplace add jyooi/agent-simple-english
|
|
45
|
+
claude plugin install simple-english@agent-simple-english
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Start a new Claude Code session after installation.
|
|
49
|
+
Bun installs the plugin dependencies when the first hook starts.
|
|
50
|
+
You do not need a global `simple-english` package or manual hook settings.
|
|
51
|
+
The repository supplies the local marketplace manifest.
|
|
52
|
+
Marketplace publication is outside this package release.
|
|
53
|
+
|
|
54
|
+
At `SessionStart`, the Adapter loads the merged config for an enabled session.
|
|
55
|
+
It reads the config from the session working directory and adds the active STE rule summary to context.
|
|
56
|
+
The summary honors `hard`, `soft`, and `off` rule settings plus `maxSentenceWords`.
|
|
57
|
+
|
|
58
|
+
The `PreToolUse` gate checks `Write`, `Edit`, and `Bash` events.
|
|
59
|
+
A hard write or edit violation blocks the tool and returns its location, rule ID, and suggested correction.
|
|
60
|
+
The Adapter checks only new edit violations, so old prose does not block an unrelated edit.
|
|
61
|
+
Correct the text and retry the tool.
|
|
62
|
+
A clean retry succeeds.
|
|
63
|
+
|
|
64
|
+
For `Bash`, the gate checks static messages in detected `git commit` commands.
|
|
65
|
+
It blocks a hard violation before Git starts.
|
|
66
|
+
It also blocks a detected commit without a static `-m` or `--message` argument.
|
|
67
|
+
A compliant static message passes.
|
|
68
|
+
Soft violations allow the event and add warning text.
|
|
69
|
+
|
|
70
|
+
### Session controls
|
|
71
|
+
|
|
72
|
+
The `/ste` command controls the current Claude Code session.
|
|
73
|
+
New sessions start in enabled mode without a strict reply gate.
|
|
74
|
+
A change in one session does not change a parallel session.
|
|
75
|
+
|
|
76
|
+
| Command | Result |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| `/ste on` | Enable write, edit, commit, and reply checks. |
|
|
79
|
+
| `/ste off` | Disable all checks and leave strict mode. |
|
|
80
|
+
| `/ste status` | Show the mode, rule counts, and dictionary state. |
|
|
81
|
+
| `/ste strict` | Enable the strict reply gate and all other checks. |
|
|
82
|
+
| `/ste strict off` | Disable the strict reply gate and use reply feedback. |
|
|
83
|
+
|
|
84
|
+
Strict mode blocks a `Stop` event when the reply has a hard violation.
|
|
85
|
+
Claude Code then uses the violation details to write the reply again.
|
|
86
|
+
The `stop_hook_active` check stops a second block in the same rewrite loop.
|
|
87
|
+
|
|
88
|
+
Claude Code shows streamed reply text before the `Stop` hook runs.
|
|
89
|
+
Thus, strict mode can reject the completed reply, but it cannot redact text that Claude Code already showed.
|
|
90
|
+
The pi Adapter does not have this gap because its `say` tool hides strict reply text before approval.
|
|
91
|
+
|
|
92
|
+
### Reply feedback loop
|
|
93
|
+
|
|
94
|
+
In enabled non-strict mode, the `Stop` hook checks each finished assistant reply after Claude Code shows it.
|
|
95
|
+
It records only hard violation details in a state file for that Claude Code session.
|
|
96
|
+
The `Stop` hook does not block or change the reply in this mode.
|
|
97
|
+
|
|
98
|
+
At the next `UserPromptSubmit` event, the Adapter adds the pending feedback to the model context.
|
|
99
|
+
The feedback gives the line, column, rule ID, and suggested fix for each hard violation.
|
|
100
|
+
The Adapter then clears the pending feedback, so it adds each report only one time.
|
|
101
|
+
The session state retains the processed reply identity and ignores duplicate `Stop` events.
|
|
102
|
+
Clean and soft-only replies leave no pending feedback.
|
|
103
|
+
|
|
104
|
+
Each session has a separate state file under `$XDG_STATE_HOME/simple-english/sessions`.
|
|
105
|
+
The default state directory is `~/.local/state/simple-english/sessions`.
|
|
106
|
+
The file stores the session mode, reply identity, and pending feedback.
|
|
107
|
+
Concurrent sessions in one project do not read or clear state from another session.
|
|
108
|
+
|
|
109
|
+
## Install the pi Adapter
|
|
110
|
+
|
|
111
|
+
Install [pi](https://pi.dev) first.
|
|
112
|
+
Then use the pi package mechanism:
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
pi install npm:agent-simple-english
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Pi records the package in its user settings and loads the extension in each session.
|
|
119
|
+
Pi packages run with your user permissions, so inspect third-party package code before installation.
|
|
120
|
+
|
|
121
|
+
Use the checkout without a persistent installation during development:
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
git clone https://github.com/jyooi/agent-simple-english.git
|
|
125
|
+
cd agent-simple-english
|
|
126
|
+
bun install
|
|
127
|
+
pi -e .
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Extension commands
|
|
131
|
+
|
|
132
|
+
The mode applies to the current pi session.
|
|
133
|
+
The extension starts in enabled mode without strict reply gating.
|
|
134
|
+
Type `/ste ` to see autocomplete suggestions for `on`, `off`, `status`, and `strict`.
|
|
135
|
+
The list changes to match the text that you type.
|
|
136
|
+
|
|
137
|
+
| Command | Result |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| `/ste` | Toggle all enforcement. |
|
|
140
|
+
| `/ste on` | Enable write, edit, commit, and reply checks. |
|
|
141
|
+
| `/ste off` | Disable all checks and leave strict mode. |
|
|
142
|
+
| `/ste status` | Show the mode, severity counts, and dictionary state. |
|
|
143
|
+
| `/ste strict` | Enable strict reply gating and the other checks. |
|
|
144
|
+
| `/ste strict on` | Enable strict reply gating and the other checks. |
|
|
145
|
+
| `/ste strict off` | Disable strict reply gating without changing the other checks. |
|
|
146
|
+
|
|
147
|
+
## Install and use the CLI
|
|
148
|
+
|
|
149
|
+
The standalone command needs [Bun](https://bun.sh).
|
|
150
|
+
Install it from the same npm package.
|
|
151
|
+
The package is `agent-simple-english` and the command it installs is `simple-english`:
|
|
152
|
+
|
|
153
|
+
```sh
|
|
154
|
+
bun add --global agent-simple-english
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Claude Code Hook mode
|
|
158
|
+
|
|
159
|
+
The `hook` subcommand reads one Claude Code hook event from standard input.
|
|
160
|
+
It writes one hook result as JSON.
|
|
161
|
+
A `SessionStart` event returns the active rule summary as added context.
|
|
162
|
+
A `PreToolUse` event applies the write, edit, and commit gates that the plugin registers.
|
|
163
|
+
A `Stop` event records hard reply feedback in enabled non-strict mode.
|
|
164
|
+
In strict mode, it blocks a reply that has hard violations.
|
|
165
|
+
|
|
166
|
+
A `UserPromptSubmit` event adds pending feedback to context and clears that feedback.
|
|
167
|
+
Every hook reads the current session mode before it applies a gate.
|
|
168
|
+
Malformed JSON returns a non-blocking error so Claude Code can continue.
|
|
169
|
+
The hook also allows the event when configuration, dictionary, tagger, transcript, state, or file processing fails.
|
|
170
|
+
It adds warning text.
|
|
171
|
+
|
|
172
|
+
### Lint files and standard input
|
|
173
|
+
|
|
174
|
+
Lint one or more files:
|
|
175
|
+
|
|
176
|
+
```sh
|
|
177
|
+
simple-english README.md
|
|
178
|
+
simple-english README.md src/cli/main.ts
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Lint standard input when no file path is present:
|
|
182
|
+
|
|
183
|
+
```sh
|
|
184
|
+
printf 'Open the valve.\n' | simple-english
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Lint a commit message with an explicit content kind:
|
|
188
|
+
|
|
189
|
+
```sh
|
|
190
|
+
git log -1 --format=%B | simple-english --kind commit-message
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Request JSON output:
|
|
194
|
+
|
|
195
|
+
```sh
|
|
196
|
+
simple-english --json README.md
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Use one explicit config file instead of discovered config files:
|
|
200
|
+
|
|
201
|
+
```sh
|
|
202
|
+
config_file="$(mktemp)"
|
|
203
|
+
printf '%s\n' '{"maxSentenceWords":25}' > "$config_file"
|
|
204
|
+
simple-english --config "$config_file" README.md
|
|
205
|
+
rm "$config_file"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
The command prints each violation with its file, line, column, severity, rule ID, and message.
|
|
209
|
+
Exit code 0 means that no hard violation exists.
|
|
210
|
+
Exit code 1 means that at least one hard violation exists.
|
|
211
|
+
Exit code 2 means that an argument, input, or config error occurred.
|
|
212
|
+
Soft violations can appear with exit code 0.
|
|
213
|
+
|
|
214
|
+
### CLI flags
|
|
215
|
+
|
|
216
|
+
- `--json` writes one JSON report with `violations` and `summary` fields.
|
|
217
|
+
|
|
218
|
+
- `--config <path>` uses only that config file and disables config discovery.
|
|
219
|
+
|
|
220
|
+
- `--kind <kind>` sets one content kind for all inputs.
|
|
221
|
+
Valid values are `prose-file`, `slash-source`, `hash-source`, and `commit-message`.
|
|
222
|
+
The form `--kind=<kind>` also works.
|
|
223
|
+
|
|
224
|
+
- A path of `-` reads standard input.
|
|
225
|
+
With no paths, the command also reads standard input.
|
|
226
|
+
|
|
227
|
+
### Content kinds
|
|
228
|
+
|
|
229
|
+
`prose-file` checks all prose in a file.
|
|
230
|
+
It is the default for standard input, extensionless paths, and file types that have no source mapping.
|
|
231
|
+
|
|
232
|
+
`slash-source` checks comments in these file types:
|
|
233
|
+
`.ts`, `.tsx`, `.js`, `.jsx`, `.mjs`, `.cjs`, `.go`, `.rs`, `.java`, `.c`, `.h`, `.cpp`, `.hpp`, `.cc`, `.cs`, `.swift`, `.kt`, and `.scala`.
|
|
234
|
+
|
|
235
|
+
`hash-source` checks comments in these file types:
|
|
236
|
+
`.sh`, `.bash`, `.zsh`, `.py`, `.rb`, `.yaml`, `.yml`, `.toml`, and `.pl`.
|
|
237
|
+
|
|
238
|
+
`commit-message` checks the complete input as a commit message.
|
|
239
|
+
|
|
240
|
+
File extension matching does not depend on letter case.
|
|
241
|
+
Source kinds ignore comment markers inside string literals.
|
|
242
|
+
All kinds preserve the original line and column.
|
|
243
|
+
They ignore identifiers plus fenced and indented Markdown code.
|
|
244
|
+
Inline Markdown code is outside every rule except `semicolon`.
|
|
245
|
+
|
|
246
|
+
## Configuration
|
|
247
|
+
|
|
248
|
+
Configuration is an optional JSON object.
|
|
249
|
+
The project file is `.simple-english.json` at the repository root.
|
|
250
|
+
The global file is `$XDG_CONFIG_HOME/simple-english/config.json`.
|
|
251
|
+
If `XDG_CONFIG_HOME` is unset or not absolute, the global path is `~/.config/simple-english/config.json`.
|
|
252
|
+
|
|
253
|
+
Global and project files are deep-merged.
|
|
254
|
+
Global values load first, and project values have precedence.
|
|
255
|
+
The pi Adapter reads the project file only when pi trusts the project.
|
|
256
|
+
The `--config` flag uses only its named file.
|
|
257
|
+
|
|
258
|
+
Existing pi config paths remain as fallbacks.
|
|
259
|
+
The project fallback is `.pi/simple-english.json`.
|
|
260
|
+
The global fallback is `simple-english.json` in the pi agent config directory.
|
|
261
|
+
The default pi agent config directory is `~/.pi/agent`.
|
|
262
|
+
`PI_CODING_AGENT_DIR` can change that directory.
|
|
263
|
+
|
|
264
|
+
The loader resolves a relative value from the working directory that requested the config.
|
|
265
|
+
The loader reads a fallback file only when the new file at the same level is absent.
|
|
266
|
+
|
|
267
|
+
This example contains every config key and every rule:
|
|
268
|
+
|
|
269
|
+
```json
|
|
270
|
+
{
|
|
271
|
+
"maxSentenceWords": 25,
|
|
272
|
+
"rules": {
|
|
273
|
+
"contraction": "hard",
|
|
274
|
+
"dictionary-not-approved-word": "hard",
|
|
275
|
+
"hedging": "soft",
|
|
276
|
+
"marketing": "soft",
|
|
277
|
+
"paragraph-length": "hard",
|
|
278
|
+
"phrasal-verb": "hard",
|
|
279
|
+
"semicolon": "hard",
|
|
280
|
+
"sentence-length": "hard",
|
|
281
|
+
"verb-progressive": "hard",
|
|
282
|
+
"verb-passive": "soft",
|
|
283
|
+
"verb-perfect": "hard"
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Each rule setting accepts `hard`, `soft`, or `off`.
|
|
289
|
+
A hard violation fails the CLI and blocks a gated extension action.
|
|
290
|
+
A soft violation produces a report or warning but does not block the action.
|
|
291
|
+
The `off` value disables that rule.
|
|
292
|
+
|
|
293
|
+
`maxSentenceWords` must be a positive integer and has a default value of 25.
|
|
294
|
+
Unknown keys, unknown rule IDs, and invalid values cause a config error.
|
|
295
|
+
|
|
296
|
+
## Rule reference
|
|
297
|
+
|
|
298
|
+
### `contraction`
|
|
299
|
+
|
|
300
|
+
Default: hard.
|
|
301
|
+
Reports apostrophe contractions such as forms that end in `n't`, `'re`, `'ve`, `'ll`, `'d`, or `'m`.
|
|
302
|
+
It also reports unambiguous forms that end in `'s`.
|
|
303
|
+
|
|
304
|
+
### `dictionary-not-approved-word`
|
|
305
|
+
|
|
306
|
+
Default: hard.
|
|
307
|
+
Reports an unapproved word or phrase from the bundled dictionary and supplies approved alternatives.
|
|
308
|
+
Part-of-speech data limits applicable entries when that data exists.
|
|
309
|
+
Matching does not depend on letter case.
|
|
310
|
+
|
|
311
|
+
### `hedging`
|
|
312
|
+
|
|
313
|
+
Default: soft.
|
|
314
|
+
Reports these phrases: `it is important to note`, `it should be noted`, `it is worth noting`, `please note that`, `as mentioned`, `as noted above`.
|
|
315
|
+
A phrase match stays on one source line.
|
|
316
|
+
|
|
317
|
+
### `marketing`
|
|
318
|
+
|
|
319
|
+
Default: soft.
|
|
320
|
+
Reports the first listed term in each token.
|
|
321
|
+
Matching does not depend on letter case, and it also examines components of hyphenated tokens.
|
|
322
|
+
|
|
323
|
+
- `seamless`.
|
|
324
|
+
- `seamlessly`.
|
|
325
|
+
- `robust`.
|
|
326
|
+
- `powerful`.
|
|
327
|
+
- `cutting-edge`.
|
|
328
|
+
- `effortless`.
|
|
329
|
+
- `effortlessly`.
|
|
330
|
+
- `world-class`.
|
|
331
|
+
- `next-generation`.
|
|
332
|
+
- `revolutionary`.
|
|
333
|
+
- `blazing`.
|
|
334
|
+
- `lightning-fast`.
|
|
335
|
+
- `elegant`.
|
|
336
|
+
- `delightful`.
|
|
337
|
+
- `turnkey`.
|
|
338
|
+
- `best-in-class`.
|
|
339
|
+
- `state-of-the-art`.
|
|
340
|
+
- `game-changing`.
|
|
341
|
+
- `battle-tested`.
|
|
342
|
+
- `enterprise-grade`.
|
|
343
|
+
- `supercharge`.
|
|
344
|
+
- `unleash`.
|
|
345
|
+
- `empower`.
|
|
346
|
+
- `empowers`.
|
|
347
|
+
|
|
348
|
+
### `paragraph-length`
|
|
349
|
+
|
|
350
|
+
Default: hard.
|
|
351
|
+
Reports a prose paragraph that has more than six sentences.
|
|
352
|
+
Markdown block boundaries and list items start separate paragraphs.
|
|
353
|
+
|
|
354
|
+
### `phrasal-verb`
|
|
355
|
+
|
|
356
|
+
Default: hard.
|
|
357
|
+
Reports these forms and supplies the listed suggestion:
|
|
358
|
+
|
|
359
|
+
| Forms | Suggestion |
|
|
360
|
+
| --- | --- |
|
|
361
|
+
| `carry out`, `carries out`, `carried out`, `carrying out` | `do`. |
|
|
362
|
+
| `spin up`, `spins up`, `spun up`, `spinning up` | `start`. |
|
|
363
|
+
| `spin down`, `spins down`, `spun down`, `spinning down` | `stop`. |
|
|
364
|
+
| `tear down`, `tears down`, `tore down`, `torn down`, `tearing down` | `remove`. |
|
|
365
|
+
| `reach out`, `reaches out`, `reached out`, `reaching out` | `ask`. |
|
|
366
|
+
| `dive into`, `dives into`, `dived into`, `dove into`, `diving into` | `examine`. |
|
|
367
|
+
| `kick off`, `kicks off`, `kicked off`, `kicking off` | `start`. |
|
|
368
|
+
| `roll out`, `rolls out`, `rolled out`, `rolling out` | `release`. |
|
|
369
|
+
| `ramp up`, `ramps up`, `ramped up`, `ramping up` | `increase`. |
|
|
370
|
+
| `circle back`, `circles back`, `circled back`, `circling back` | `return`. |
|
|
371
|
+
| `drill down`, `drills down`, `drilled down`, `drilling down` | `examine`. |
|
|
372
|
+
|
|
373
|
+
Matching does not depend on letter case.
|
|
374
|
+
A phrase match stays on one source line.
|
|
375
|
+
|
|
376
|
+
### `semicolon`
|
|
377
|
+
|
|
378
|
+
Default: hard.
|
|
379
|
+
Reports each semicolon and asks for two sentences.
|
|
380
|
+
This rule also checks semicolons inside inline Markdown code.
|
|
381
|
+
|
|
382
|
+
### `sentence-length`
|
|
383
|
+
|
|
384
|
+
Default: hard.
|
|
385
|
+
Reports a sentence above `maxSentenceWords`.
|
|
386
|
+
The default maximum is 25 words.
|
|
387
|
+
|
|
388
|
+
### `verb-progressive`
|
|
389
|
+
|
|
390
|
+
Default: hard.
|
|
391
|
+
Reports a form of `be` followed by an `-ing` verb, with optional adverbs or `not` between them.
|
|
392
|
+
|
|
393
|
+
### `verb-passive`
|
|
394
|
+
|
|
395
|
+
Default: soft.
|
|
396
|
+
Reports a form of `be` followed by a past participle, with optional adverbs or `not` between them.
|
|
397
|
+
|
|
398
|
+
### `verb-perfect`
|
|
399
|
+
|
|
400
|
+
Default: hard.
|
|
401
|
+
Reports auxiliary `have` followed by a past participle, with optional adverbs or `not` between them.
|
|
402
|
+
|
|
403
|
+
The three verb rules and applicable dictionary entries use the bundled English part-of-speech tagger.
|
|
404
|
+
|
|
405
|
+
## Dictionary and attribution
|
|
406
|
+
|
|
407
|
+
The package vendors dictionary data converted from Cameron Moore's MIT-licensed [`ctotheameron/pi-ste`](https://github.com/ctotheameron/pi-ste).
|
|
408
|
+
[`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) records the pinned source, conversion scope, and license details.
|
|
409
|
+
|
|
410
|
+
ASD owns ASD-STE100 and limits redistribution of the official specification and dictionary.
|
|
411
|
+
This package does not include the official specification or the complete ASD dictionary.
|
|
412
|
+
Get the current official specification from the [ASD-STE100 site](https://www.asd-ste100.org/).
|
|
413
|
+
This project has no affiliation with or endorsement from ASD.
|
|
414
|
+
|
|
415
|
+
The package dictionary format and match rules are in [`src/dictionary/README.md`](src/dictionary/README.md).
|
|
416
|
+
Set `SIMPLE_ENGLISH_DICTIONARY` to a replacement dictionary file if necessary.
|
|
417
|
+
Hook mode resolves a relative replacement path from the session working directory.
|
|
418
|
+
A lint command reports a replacement dictionary load error and continues with all other rules.
|
|
419
|
+
The enabled pi Adapter fails closed after that error.
|
|
420
|
+
|
|
421
|
+
## Development
|
|
422
|
+
|
|
423
|
+
```sh
|
|
424
|
+
bun install
|
|
425
|
+
bun run test
|
|
426
|
+
bun run lint
|
|
427
|
+
bun run typecheck
|
|
428
|
+
npm publish --dry-run
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
Actual npm publishing is a separate release action.
|
|
432
|
+
|
|
433
|
+
## License
|
|
434
|
+
|
|
435
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
## Vendored STE dictionary data
|
|
4
|
+
|
|
5
|
+
`src/dictionary/data/pi-ste.json` is a data-only conversion of the entries returned by `word_entries()` and `phrase_entries()` with the `dictionary/not-approved-word` rule ID in [`ctotheameron/pi-ste`](https://github.com/ctotheameron/pi-ste), `src/ste/dictionary.gleam`, at commit `18a8cc686be2cc0e680705daf2327fb0d1ef93ce`.
|
|
6
|
+
The `package.json` at that commit declares the package to be MIT licensed, and its README also states that the license is MIT.
|
|
7
|
+
No other pi-ste lists or upstream implementation code are included.
|
|
8
|
+
|
|
9
|
+
The conversion expands the upstream spelling generators into explicit forms.
|
|
10
|
+
Forms produced by upstream verb helpers have `VERB` metadata.
|
|
11
|
+
Entries without source POS metadata use word-level matching.
|
|
12
|
+
|
|
13
|
+
The pinned source states that ASD owns ASD-STE100, limits redistribution of the full dictionary, and describes these entries as widely cited pairs.
|
package/commands/ste.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Control STE for this Claude Code session
|
|
3
|
+
argument-hint: on|off|status|strict|strict off
|
|
4
|
+
allowed-tools: Bash
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Session state:
|
|
9
|
+
|
|
10
|
+
!`cd "${CLAUDE_PLUGIN_ROOT}" && bun "src/cli/main.ts" session "${CLAUDE_SESSION_ID}" "${CLAUDE_PROJECT_DIR}" "$ARGUMENTS"`
|
|
11
|
+
|
|
12
|
+
Show the session state exactly.
|
|
13
|
+
Do not add text.
|
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Inject active STE rules, gate changes, and return reply feedback on the next prompt.",
|
|
3
|
+
|
|
4
|
+
"hooks": {
|
|
5
|
+
"SessionStart": [
|
|
6
|
+
{
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
|
|
11
|
+
"command": "cd \"${CLAUDE_PLUGIN_ROOT}\" && bun \"src/cli/main.ts\" hook",
|
|
12
|
+
"timeout": 120
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
|
|
18
|
+
"PreToolUse": [
|
|
19
|
+
{
|
|
20
|
+
"matcher": "Write|Edit|Bash",
|
|
21
|
+
"hooks": [
|
|
22
|
+
{
|
|
23
|
+
"type": "command",
|
|
24
|
+
|
|
25
|
+
"command": "cd \"${CLAUDE_PLUGIN_ROOT}\" && bun \"src/cli/main.ts\" hook",
|
|
26
|
+
"timeout": 120
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
|
|
32
|
+
"Stop": [
|
|
33
|
+
{
|
|
34
|
+
"hooks": [
|
|
35
|
+
{
|
|
36
|
+
"type": "command",
|
|
37
|
+
|
|
38
|
+
"command": "cd \"${CLAUDE_PLUGIN_ROOT}\" && bun \"src/cli/main.ts\" hook",
|
|
39
|
+
"timeout": 120
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
|
|
45
|
+
"UserPromptSubmit": [
|
|
46
|
+
{
|
|
47
|
+
"hooks": [
|
|
48
|
+
{
|
|
49
|
+
"type": "command",
|
|
50
|
+
|
|
51
|
+
"command": "cd \"${CLAUDE_PLUGIN_ROOT}\" && bun \"src/cli/main.ts\" hook",
|
|
52
|
+
"timeout": 120
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-simple-english",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ASD-STE100 Simplified Technical English lint engine, CLI, and host adapters",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "JIA YI"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/jyooi/agent-simple-english#readme",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/jyooi/agent-simple-english.git"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/jyooi/agent-simple-english/issues"
|
|
17
|
+
},
|
|
18
|
+
"keywords": ["pi-package", "simplified-technical-english", "linter"],
|
|
19
|
+
"pi": {
|
|
20
|
+
"extensions": ["./src/extension/index.ts"]
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
".claude-plugin",
|
|
24
|
+
"commands",
|
|
25
|
+
"hooks",
|
|
26
|
+
"src",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"THIRD_PARTY_NOTICES.md"
|
|
30
|
+
],
|
|
31
|
+
"bin": {
|
|
32
|
+
"simple-english": "src/cli/main.ts"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"lint": "biome check .",
|
|
37
|
+
"typecheck": "tsc --noEmit"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"effect": "^3.14.0",
|
|
41
|
+
"wink-eng-lite-web-model": "^1.8.1",
|
|
42
|
+
"wink-nlp": "^2.4.0"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
46
|
+
"typebox": "*"
|
|
47
|
+
},
|
|
48
|
+
"peerDependenciesMeta": {
|
|
49
|
+
"@earendil-works/pi-coding-agent": {
|
|
50
|
+
"optional": true
|
|
51
|
+
},
|
|
52
|
+
"typebox": {
|
|
53
|
+
"optional": true
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@biomejs/biome": "^1.9.4",
|
|
58
|
+
"@earendil-works/pi-coding-agent": "0.83.0",
|
|
59
|
+
"@types/node": "^22.0.0",
|
|
60
|
+
"typebox": "1.3.7",
|
|
61
|
+
"typescript": "^5.8.0",
|
|
62
|
+
"vitest": "^3.0.0"
|
|
63
|
+
}
|
|
64
|
+
}
|