Simplified Technical English (ASD-STE100) enforcement for pi. The rule engine is Gleam. It compiles to JavaScript, so the extension runs it in process.
The extension works in three layers:
- It tells the model the rules. The system prompt gains a rule list built from the same table the linter checks.
- It blocks a bad write. A hard violation in a
write, aneditor agit commitmessage stops the tool call. The reason names the line, the column and the fix. - It checks the reply. A status widget counts violations in the assistant text. A hard violation also returns as a note, so the model reads the rule it broke.
The note never rewrites prose, because a mechanical rewrite can change the meaning. When the turn still holds a tool call, the note arrives before the next model call. The last reply of a run has no tool call, so its note waits for the next prompt.
| File | Text the linter sees |
|---|---|
.md, .mdx, .txt, .rst |
all of it, minus code fences and code spans |
.ts, .tsx, .js, .gleam, .go, .rs, ... |
// and /* */ comments |
.sh, .py, .rb, .yml, .toml |
# comments |
a git commit -m message in bash |
the message |
| anything else | nothing |
An identifier is never a violation. const utilize = ... passes. The comment
// We will utilize it. does not.
dist/ is a build artifact, so install from npm, where the release ships it:
pi install npm:pi-steTo run it from a checkout, build dist/ first:
gleam test
./scripts/build-dist.sh
pi -e ./extension.mjs/ste Toggle enforcement
/ste off Disable it
/ste strict Gate every reply through the say tool
/ste strict off Leave strict mode
The model can also check its own text with the ste_lint tool.
The pi API blocks a tool call only, so a plain reply stays out of reach. In
strict mode the model sends each reply through the say tool, and a hard
violation blocks that call. You never read the bad text.
The cost is one tool call for every reply. Use strict mode for a document review, and leave it off for normal work.
ste-lint README.md docs/*.md # exit code 1 on a hard violation
ste-lint --json src/**/*.ts
cat draft.md | ste-lintUse it in a pre-commit hook or in CI.
| Rule | Severity |
|---|---|
dictionary/not-approved-word |
hard |
length/sentence |
hard over 25 words, soft over 20 |
length/paragraph |
hard over 6 sentences |
verb/progressive |
hard |
verb/perfect |
hard |
verb/passive |
soft |
style/contraction |
hard |
style/semicolon |
hard |
style/phrasal-verb |
hard |
style/hedge |
soft |
style/marketing |
soft |
A Hard rule blocks a write. A Soft rule warns.
STE also caps a compound noun at 3 words. This linter does not check that rule. A word-list heuristic gives too many false positives. An English third-person verb has the same spelling as a plural noun. That check needs part-of-speech tagging.
asdf install gleam 1.18.0
gleam test
./scripts/build-dist.shThe script writes dist/, a build artifact that .gitignore holds. npm publish runs the script first through prepublishOnly, so the release ships
dist/.
MIT. See AGENTS.md for attribution and for the limits ASD places on the
dictionary.