procurement-writing-engine 0.0.0-stage → 0.1.0-alpha.6

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/.vale.ini ADDED
@@ -0,0 +1,5 @@
1
+ StylesPath = styles
2
+ MinAlertLevel = suggestion
3
+
4
+ [*.txt]
5
+ BasedOnStyles = Procurement
package/CHANGELOG.md ADDED
@@ -0,0 +1,45 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0-alpha.6 — public registry packaging
4
+
5
+ - Packaging-only successor to the human-tested alpha.5; no engine, provider, parser or demo logic changes.
6
+ - Explicit public alpha tag, fresh-consumer tarball smoke test and gated npm staging workflow.
7
+ - The immutable alpha.5 GitHub release remains unchanged. Registry availability requires successful release and npm approval.
8
+
9
+ ## 0.1.0-alpha.5 — contextual review
10
+
11
+ - Rank existing spelling alternatives with bounded procurement phrase context.
12
+ - Group competing alternatives in the demo without changing the SDK findings contract.
13
+ - Review safely separated English/Persian runs and isolate bounded identifiers in either case.
14
+ - Protect synthetic ASTM specifications and extend real provider/browser acceptance tests.
15
+
16
+ ## 0.1.0-alpha.4 — formal Persian spelling
17
+
18
+ - Add a bounded exact-word formal tanwin policy to the default Virastar adapter.
19
+ - Preserve already marked words, unrelated words and protected ranges.
20
+ - Add the human-reported missing-tanwin regression to real engine and browser checks.
21
+
22
+ ## 0.1.0-alpha.3 — review presentation and coverage
23
+
24
+ - Independent bounded Persian orthography patches with exact reconstruction.
25
+ - RTL/LTR isolated source and replacement display; automatic language only.
26
+ - Conservative demo-only identifier-shaped token isolation with explicit inferred-range count.
27
+ - Expanded positive and negative tests, retaining all earlier acceptance cases.
28
+
29
+ ## 0.1.0-alpha.2 — acceptance corrections
30
+
31
+ - Automatic demo language selection and explicit partial-result reasons.
32
+ - Conservative synthetic technical range separation; unchanged host authorization and protected-region validation.
33
+ - Stable provider alternatives with reviewed procurement vocabulary preference.
34
+ - Limited Textlint subject/verb policies and context-aware response/delivery deadline messages.
35
+ - Regression coverage for all eleven reported acceptance inputs.
36
+
37
+ ## 0.1.0-alpha.1 — initial public release candidate
38
+
39
+ - Independent, review-only provider composition for English and Persian procurement prose.
40
+ - Adapters for Harper, Virastar, experimental Virastar TS, Textlint, Vale, STE100 and LanguageTool.
41
+ - Host-owned complete regions, UTF-16/grapheme validation, bounded execution and advisory provenance.
42
+ - Synthetic regression corpus and dependency-free contract suite; real upstream and browser acceptance gates.
43
+ - Local worker-based demonstration, package metadata, documentation, release automation and brand assets.
44
+
45
+ The initial release is an **alpha**, not certified technical English, a production integration or a full multilingual grammar checker. Optional external engines and real host authorization remain separately qualified.
@@ -0,0 +1,5 @@
1
+ # Code of conduct
2
+
3
+ Treat contributors respectfully and evaluate ideas on their technical merits. Harassment, discrimination, personal attacks, threats, doxxing and publishing confidential data are not acceptable in project spaces. Maintain a constructive review culture and do not misrepresent authorship, test results or upstream affiliation.
4
+
5
+ Maintainers may remove inappropriate content, restrict participation, or block repeat offenders. Report concerns privately using an available maintainer contact or GitHub's reporting controls. Do not disclose private reports in public discussions.
@@ -0,0 +1,15 @@
1
+ # Contributing
2
+
3
+ Procurement Writing Engine welcomes independent bug reports, test cases, provider adapters and documentation. Use **synthetic data only**. Do not share real customer records, quotations, purchase orders, supplier details or confidential identifiers.
4
+
5
+ ## Development
6
+
7
+ Node.js 22.12+ and npm are required. Run `npm ci --ignore-scripts` against the committed lockfile. For an initial source bundle without a lockfile, see the maintainer bootstrap in [RELEASE.md](docs/RELEASE.md). Use `npm run verify` with a local Chromium-based browser (`PWE_CHROME` if needed). The core suite runs with no dependency installation (`npm run check`, `npm test`).
8
+
9
+ - Preserve the host-owned complete region map and review-only contract.
10
+ - Add a regression test for each changed adapter contract or rule. Verify exact source offsets, grapheme boundaries, malformed output and protected ranges.
11
+ - Prefer upstream API composition over modifying upstream parsers. Pin reviewed releases, retain license obligations, and update `THIRD_PARTY.md` and the lockfile.
12
+ - No network, telemetry, model download, or automatic mutation in the default browser profile. External service changes require explicit security review.
13
+ - Keep pull requests focused. Include synthetic reproduction steps, test results and known limitations. CI passing is not proof of semantic correctness.
14
+
15
+ Security reports belong in private vulnerability reporting, not public issues. See [SECURITY.md](SECURITY.md).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Procurement Writing Engine contributors
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 CHANGED
@@ -1,3 +1,143 @@
1
- # Temporary Holding Version
1
+ <p align="center"><img src="assets/logo.svg" alt="Procurement Writing Engine logo" width="104"></p>
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ # Procurement Writing Engine
4
+
5
+ **Better prose. Protected technical data.**
6
+
7
+ [English](README.md) · [فارسی](docs/README.fa.md)
8
+
9
+ [![CI](https://github.com/FireXCore/procurement-writing-engine/actions/workflows/ci.yml/badge.svg)](https://github.com/FireXCore/procurement-writing-engine/actions/workflows/ci.yml)
10
+ ![License](https://img.shields.io/badge/license-MIT-367A68)
11
+ ![Stage](https://img.shields.io/badge/stage-alpha-142A35)
12
+ ![Languages](https://img.shields.io/badge/languages-English%20%2B%20Persian-367A68)
13
+
14
+
15
+ An independent, review-only writing-assistance integration library for procurement and technical commercial prose. It composes existing open-source engines instead of reimplementing their grammar parsers. English and Persian, no large language model, no automatic mutation. **Alpha-stage library. Not qualified for production use.**
16
+
17
+ ## Architecture
18
+
19
+ ```text
20
+ Host-owned authorized snapshot + complete region map
21
+ |
22
+ Region admission (fail closed)
23
+ |
24
+ Single bounded analysis orchestrator
25
+ / \\
26
+ Local/browser profile Optional document QA profile
27
+ Harper + Virastar Vale / LanguageTool / STE100
28
+ Reviewed Textlint rules (trusted local host only)
29
+ \\ /
30
+ Normalized source-anchored proposals (UTF-16)
31
+ |
32
+ Grapheme / span / replacement validation + provenance
33
+ |
34
+ Immutable review report — NO APPLY
35
+ ```
36
+
37
+ The default recommended deployment profile is Harper for English and Virastar for Persian. Textlint adds reviewed organization-specific language policies. Vale checks style/terminology, STE100 checks technical English and LanguageTool adds optional self-hosted checks. The experimental TypeScript Virastar fork is a separate advisory adapter, not a default dependency. None of these engines can authorize changes to procurement records. Provider composition is explicit; a heavyweight server stack is not required for browser-only use.
38
+
39
+ ## Installation from a verified GitHub release
40
+
41
+ After the required CI gates pass and a prerelease appears on [GitHub Releases](https://github.com/FireXCore/procurement-writing-engine/releases), download the alpha tarball and `SHA256SUMS.txt`, verify the checksum, then install the local file. Public source alone does not indicate that a release artifact has passed qualification. Registry distribution is prepared separately; check the npm package page for actual availability. Use only the alpha dist-tag, not a stable release claim.
42
+
43
+ ```sh
44
+ npm install ./procurement-writing-engine-0.1.0-alpha.6.tgz
45
+ npm install --save-exact harper.js@3.2.0 virastar@0.22.1
46
+ ```
47
+
48
+ Install the Textlint peer packages only when using that provider. Optional Node services are installed separately and must be qualified by the host.
49
+
50
+ ## Registry installation (after publication)
51
+
52
+ ```sh
53
+ npm install procurement-writing-engine@alpha
54
+ npm install --save-exact harper.js@3.2.0 virastar@0.22.1
55
+ ```
56
+
57
+ [Registry package](https://www.npmjs.com/package/procurement-writing-engine) · [Browser demo](https://procurement-writing-engine.vercel.app/). The registry link is not a publication receipt.
58
+
59
+ ## Run the local contract suite
60
+
61
+ Requires Node.js 22.12+ (tested with Node.js 22.16.0). The contract suite needs no third-party installation:
62
+
63
+ ```sh
64
+ npm run check
65
+ npm test
66
+ ```
67
+
68
+ For actual upstream JS execution (after a real lockfile has been generated during release bootstrap):
69
+
70
+ ```sh
71
+ npm ci --ignore-scripts
72
+ npm run verify
73
+ node examples/review.mjs
74
+ ```
75
+
76
+ See [release gates](docs/RELEASE.md) for external services and browser/domain qualification. No upstream binaries, WASM, models or data are included. These commands require registry access and an installed Chromium browser. See [local evidence](docs/LOCAL_VERIFICATION.md) for the checks actually executed during authoring.
77
+
78
+ ## Public API (review-only)
79
+
80
+ ```js
81
+ import { binaryInlined } from 'harper.js/binaryInlined';
82
+ import { createEngine, createHarper, createVirastar } from 'procurement-writing-engine';
83
+
84
+ // Node evaluation uses LocalLinter. A qualified browser host should own/terminate a Worker.
85
+ const harper = await createHarper({ binary: binaryInlined, worker: false });
86
+ const engine = createEngine([harper.provider, await createVirastar()]);
87
+ const prose = 'Please send teh quotation for ';
88
+ const technical = 'Rosemount 3051 — 3 PCS';
89
+ const text = prose + technical;
90
+ try {
91
+ const result = await engine.analyze({
92
+ text,
93
+ snapshotId: 'synthetic:1',
94
+ regions: [
95
+ { start: 0, end: prose.length, kind: 'prose', language: 'en' },
96
+ { start: prose.length, end: text.length, kind: 'protected' }
97
+ ]
98
+ });
99
+ // Example only. Production must not log customer text or findings.
100
+ console.log(result.status, result.findings);
101
+ } finally {
102
+ await harper.dispose();
103
+ }
104
+ ```
105
+
106
+ Region offsets are UTF-16, half-open, sorted, contiguous, nonoverlapping and cover the **entire exact source**. A `prose` region must have language `en` or `fa`; protected ranges never reach providers. The host is responsible for authoritative classification, including plain-letter brand/supplier names and commercial or technical facts. The library refuses missing/incomplete regions and conservatively skips obvious suspicious content even inside an admitted prose region. It is not a replacement for a host authorization system or a complete industrial parser.
107
+
108
+ Each finding contains provider, rule, category, absolute source range, exact original, plain-text message, and optional replacement. `apply` is always `false`. Conflicting suggestions remain separate. `complete` means the admitted work completed within the contract; it does not mean all grammar errors were found or the text is semantically safe. `partial` means limits, skipped regions or failed/invalid providers reduced coverage. `blocked`, `busy` and `cancelled` return no findings. The consumer must compare the returned `snapshotId` to its live authenticated scope and exact source before presenting proposals; it must discard stale results. Do not use analysis as authorization.
109
+
110
+ ## Files and responsibilities
111
+
112
+ | Path | Responsibility |
113
+ |---|---|
114
+ | `src/engine.mjs` | Bounded provider composition, cancellation, immutable reports |
115
+ | `src/regions.mjs` | Complete-map verification, grapheme/offset conversion, conservative proposal gates |
116
+ | `src/adapters/` | Actual upstream interface adapters (Harper, Virastar JS/TS, Textlint, Vale, STE100, LanguageTool) |
117
+ | `src/node/` | Explicit optional local HTTP/process transports, no shell |
118
+ | `src/policy.mjs`, `styles/Procurement/` | Small example organization-owned delivery clarity policy, advisory only |
119
+ | `test/` | Core, actual transport with synthetic fixtures, real upstream acceptance suites |
120
+ | `docs/UPSTREAM_AUDIT.md` | Source references, exact reviewed releases, findings and limitations |
121
+ | `docs/RELEASE.md` | Qualification, GitHub publication and host integration gates |
122
+
123
+ This library is independent of any private ERP/Procurement application. See [security boundaries](SECURITY.md) and [third-party software](THIRD_PARTY.md) before distributing or installing upstream dependencies.
124
+
125
+ ## Local demo and documentation
126
+
127
+ Run `npm run demo` after installing locked dependencies. The demo uses actual local browser providers in a dedicated Worker; it is not a production UI. Use the supplied synthetic samples only.
128
+
129
+ [Architecture](docs/ARCHITECTURE.md) · [API](docs/API.md) · [Release process](docs/RELEASE.md) · [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md)
130
+
131
+ ![Repository social preview](assets/social-preview.png)
132
+
133
+ ### Alpha.2 acceptance changes
134
+
135
+ The demo detects English/Persian automatically, explains partial results, and splits a limited set of synthetic technical patterns into protected ranges. This demo classifier is **not** a production parser. The library's host-authoritative region map remains mandatory. Harper alternatives retain upstream order except for a small reviewed procurement vocabulary preference. `procurementPolicyRules` adds narrow subject/verb agreement policies for selected procurement phrases and context-sensitive deadline advisories, not general grammar coverage. No automatic apply or npm publication.
136
+
137
+ ### Alpha.3 review experience
138
+
139
+ Persian normalization now yields independent source-anchored word or short phrase patches where alignment permits. The bounded diff verifies exact reconstruction and rejects the full normalization if any patch is unsafe. The demo no longer has language sample buttons; each original and replacement is rendered in an isolated direction, with explanatory text separate. Isolated uppercase alphanumeric tokens such as `ABC999` can be protected while the surrounding synthetic prose is reviewed. Ambiguous input still fails closed. This is a limited demo heuristic, not a production parser or an authorization decision. No npm registry publication or automatic Apply.
140
+
141
+ ### Alpha.4 formal Persian spelling
142
+
143
+ The default Virastar adapter composes its restricted upstream normalizer with a small local formal-writing allowlist (e.g. لطفا → لطفاً, حتما → حتماً). Only exact unmarked words are eligible; ordinary final-alef words and already marked words are not changed by this policy. Suggestions remain review-only, within authoritative prose ranges. This is not general Persian spelling or diacritization.
package/SECURITY.md ADDED
@@ -0,0 +1,14 @@
1
+ # Security boundary and release conditions
2
+
3
+ Status: development candidate, not approved for production. The library has no mutation/Apply API, no database access, no LLM, no analytics, no built-in public HTTP client and no default remote service. Optional providers are trusted code supplied by the deployment, not sandboxed plugins. Use only reviewed, pinned versions. No claim of a complete industrial parser or semantic safety.
4
+
5
+ * The application, not this library, authenticates users, determines tenant and field authorization, binds the current record/session/edit epoch, and supplies a complete authoritative region partition. `snapshotId` is an opaque correlation value, not an authorization credential. An absent, invalid, overlapping or incomplete region map blocks all provider calls.
6
+ * Protected ranges are never passed to providers. Other defensive checks exclude suspicious prose regions with numbers, technical punctuation, all-capital acronyms or mixed scripts. This deliberately reduces recall. Unknown plain-letter brand or supplier names still require protection by the host. Recheck the current authoritative context before rendering any result; clear the output on scope/value/permission change. No automatic suggestions should be applied.
7
+ * Offsets are half-open UTF-16 and grapheme-aligned; source slices and replacement restrictions are validated. A replacement can still alter a commercial promise or intent. A human must review it. The library is not a contract-law or engineering validator.
8
+ * Per-call deadlines and a total budget bound waiting on asynchronous providers. Cancellation is cooperative; a noncooperative provider retires the engine. Synchronous third-party code can still block its thread. Isolate browser execution in a worker owned by the application and terminate it on timeout, navigation, user/vendor/session changes. Dispose Harper instances at context boundaries. Do not share mutable linter dictionaries across tenants.
9
+ * The browser entry point does not import Node process/HTTP modules. Harper is initialized explicitly with a host-owned local binary (e.g., bundled `binaryInlined`); enforce CSP and inspect actual worker/WASM fetches before approval. Never initialize on login or load any external model from a CDN. No model provider is installed by this repository.
10
+ * Node transports are opt-in. LanguageTool only accepts explicit numeric IPv4 loopback HTTP URLs at `/v2/check`, rejects redirects, sends no cookies, and limits response size/time. Confirm service configuration disables external forwarding, logging of text, telemetry, and remote language-model calls. Vale and STE100 use absolute deployment-owned executable paths with fixed arguments, no shell, minimal environment, and bounded JSON output. STE100 writes a temporary plaintext file with restricted mode on POSIX and removes it in `finally`; Windows ACLs, crash cleanup, storage encryption and OS sandbox must be verified independently. Only synthetic inputs until this gate passes.
11
+ * Do not accept user-supplied executable paths, configs, plugins, rules, callbacks or provider endpoints. A trusted provider can access its runtime environment; OS/network sandbox and least privilege are mandatory for external processes. Process termination is not a complete descendant-process sandbox.
12
+ * Render findings as escaped plain text, never HTML. Diagnostics exclude exception messages; findings contain excerpts of authorized prose and must not be logged by applications. Do not store source text in browser storage or analytics.
13
+
14
+ Report vulnerabilities privately to the repository maintainer. Release and integration are blocked on the qualification checklist in `docs/RELEASE.md`.
package/THIRD_PARTY.md ADDED
@@ -0,0 +1,17 @@
1
+ # Third-party software and standards
2
+
3
+ The integration code is independently authored. No upstream source trees, proprietary procurement data, dictionaries, models or WASM binaries are redistributed in this repository. Optional upstream packages/binaries remain under their respective licenses. Preserve their copyright notices and license/NOTICE obligations when distributing installed packages, binaries, or bundled assets; examine dependency and data licenses separately.
4
+
5
+ | Component | Observed license | Reviewed baseline | Use |
6
+ |---|---|---|---|
7
+ | [Harper](https://github.com/Automattic/harper) | Apache-2.0 | v3.2.0 | `harper.js`, explicit local WASM, English |
8
+ | [Virastar](https://github.com/brothersincode/virastar) | MIT | v0.22.1 | Persian orthography with restricted options |
9
+ | [Virastar TS](https://github.com/nekofar/virastar) | Apache-2.0 | 69e5e6832a514e06ade468373c1b4924d19c4efb | Optional experimental adapter, no automatic dependency |
10
+ | [Textlint](https://github.com/textlint/textlint) | MIT | v16.1.3 | Kernel and plaintext plugin |
11
+ | [Vale](https://github.com/vale-cli/vale) | MIT | v3.28.1 | External executable, repository-owned terminology rules |
12
+ | [LanguageTool](https://github.com/languagetool-org/languagetool) | LGPL-2.1 (source headers also allow later versions in relevant files) | 8db66a4d2e7bd629f4697b07d43727b281ee5322 | Optional independent loopback service, not bundled or relicensed |
13
+ | [STE100 checker](https://github.com/swarooppatilx/ste100) | MIT at repository level | v0.1.1 | Optional external executable, advisory only |
14
+
15
+ The official ASD-STE100 standard, its dictionary and related trademarks are separate from the checker repository's code license. Do not republish its vocabulary tables, claim certified conformance, or imply endorsement. The STE100 checker requires spaCy and an installed `en_core_web_sm` model; their licenses and distribution terms must be reviewed before deployment. No LLM is required by this integration, but a statistical language model is needed for that optional checker.
16
+
17
+ Do not treat this list as a complete transitive software bill of materials or legal approval. Release requires exact dependency locks, vulnerability review, SBOM and third-party notice verification for the actual distributed artifact.
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" role="img" aria-labelledby="title">
2
+ <title id="title">Procurement Writing Engine symbol</title>
3
+ <rect width="128" height="128" rx="27" fill="#142A35"/>
4
+ <path d="M31 29h41l24 24v46H31z" fill="none" stroke="#F3F5F2" stroke-width="7" stroke-linejoin="round"/>
5
+ <path d="M72 29v24h24M45 59h19M45 72h14" stroke="#F3F5F2" stroke-width="6" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="m58 88 12 12 32-35" stroke="#55D8AC" stroke-width="9" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
7
+ </svg>
Binary file
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="800" height="180" viewBox="0 0 800 180" role="img" aria-labelledby="title">
2
+ <title id="title">Procurement Writing Engine</title>
3
+ <rect x="20" y="26" width="128" height="128" rx="27" fill="#142A35"/>
4
+ <g transform="translate(20 26)"><path d="M31 29h41l24 24v46H31z" fill="none" stroke="#F3F5F2" stroke-width="7" stroke-linejoin="round"/><path d="M72 29v24h24M45 59h19M45 72h14" stroke="#F3F5F2" stroke-width="6" fill="none" stroke-linecap="round" stroke-linejoin="round"/><path d="m58 88 12 12 32-35" stroke="#55D8AC" stroke-width="9" fill="none" stroke-linecap="round" stroke-linejoin="round"/></g>
5
+ <text x="175" y="79" font-family="Inter,DejaVu Sans,Arial,sans-serif" font-weight="700" font-size="39" fill="#18313D">Procurement</text>
6
+ <text x="175" y="126" font-family="Inter,DejaVu Sans,Arial,sans-serif" font-weight="700" font-size="39" fill="#18313D">Writing Engine</text>
7
+ <path d="M710 43v94" stroke="#C7D6D1" stroke-width="1"/><text x="737" y="98" font-family="DejaVu Sans,Arial,sans-serif" font-size="14" font-weight="700" fill="#367A68" text-anchor="middle">PWE</text>
8
+ </svg>
@@ -0,0 +1,11 @@
1
+ # Alpha.2 acceptance matrix
2
+
3
+ These are synthetic regression cases derived from public demo feedback, not a statistically representative grammar benchmark.
4
+
5
+ - English: spelling and procurement alternative ranking, two selected agreement forms, repetition, quotation deadline, clean prose.
6
+ - Persian: Arabic glyph normalization, half-space, clean prose.
7
+ - Mixed industrial content: known Rosemount sample, explicit part number and Persian quantity are protected while surrounding eligible prose is reviewed.
8
+ - Unknown technical or mixed-script gaps remain unreviewed, with explicit partial-result diagnostics.
9
+ - Browser: automatic language routing regardless of sample button, input immutability, cancellation, stale-result invalidation, and no external requests.
10
+
11
+ The demo classifier is restricted to synthetic patterns. It is not an authoritative Region Map generator for production. The SDK remains review-only and requires host-provided regions. The agreement policy has narrow patterns and does not claim general English grammar coverage. Upstream quality and optional service acceptance remain separate. See current GitHub CI for executed results; no npm publication is authorized at this stage.
@@ -0,0 +1,13 @@
1
+ # Alpha.3 acceptance
2
+
3
+ Scope: independent Persian correction display, automatic language UX, and isolated identifier-shaped demo spans. All earlier Alpha.2 cases remain regression requirements.
4
+
5
+ - Two separate half-space corrections, three adjacent/separated glyph corrections, exact normalized reconstruction, repeated words, whitespace and grapheme alignment.
6
+ - Reject unsafe output, unexpected line break changes, excessive edit counts or matrix size.
7
+ - Isolated uppercase alphanumeric identifiers with separators are protected, and neighboring eligible prose can be reviewed. Explicitly label inferred ranges.
8
+ - Lowercase or mixed-case ambiguous codes, embedded email-like tokens, underscores and mixed-script ambiguity remain excluded; no general production parser is claimed.
9
+ - Chromium checks direction isolation, separate messages, no language buttons, exact source preservation, cancellation, invalidation and no external traffic.
10
+ - SDK requires authoritative host regions; no automatic apply or changes to authorization.
11
+ - npm/other registry publication remains blocked pending human acceptance. Optional real services and broad independent language/industrial corpus qualification are out of scope.
12
+
13
+ See the GitHub CI run for actual execution results.
package/docs/API.md ADDED
@@ -0,0 +1,24 @@
1
+ # API reference
2
+
3
+ ESM entry points: `procurement-writing-engine` for browser-safe provider composition; `procurement-writing-engine/node` for explicit local process and loopback HTTP transports. See `src/index.d.mts` and `src/node/index.d.mts` for the exact typed contract.
4
+
5
+ `createEngine(providers)` returns a single-flight engine. `analyze(document, {signal})` returns an immutable analysis. Provide the exact `text`, an opaque `snapshotId`, and contiguous nonoverlapping `regions` covering the whole input. Each region is half-open UTF-16 and classified `protected` or `prose` with `language: 'en' | 'fa'`. The map is a host responsibility, not an authorization credential.
6
+
7
+ Findings expose `provider`, `rule`, `category`, `start`, `end`, `original`, optional `replacement`, and plain-text `message`. Never interpret messages as HTML. `apply` is always false. `complete` refers to admitted checks, `partial` indicates reduced coverage, `blocked` means admission failed or the engine is retired, `busy` rejects overlapping calls, and `cancelled` carries no findings. Do not reuse a retired engine. Dispose provider resources and terminate a worker when context changes.
8
+
9
+ ## Factories
10
+
11
+ - `createHarper({binary, worker, dialect})` returns `{provider, dispose}`; explicit local WASM required.
12
+ - `createVirastar()` creates the restricted Persian normalizer. `experimentalVirastarAdapter(instance)` is an alternative, advisory-only adapter.
13
+ - `createTextlint(rules)` uses the plaintext plugin and host-reviewed rule modules. `procurementDeliveryRule` is a sample advisory, not a due-date calculator.
14
+ - `createVale({executable, config})` and `createSTE100({executable})` are Node-only and require absolute trusted local paths.
15
+ - `createLocalLanguageTool({endpoint})` accepts an explicit IPv4 loopback HTTP `/v2/check` endpoint. Never enable remote fallback.
16
+ - Lower-level adapters accept trusted upstream objects/callbacks and do not sandbox those providers.
17
+
18
+ Do not pass arbitrary paths, providers or rules supplied by users. Never display a stale report: verify live source, scope, record, field, permissions and edit revision in the host.
19
+
20
+ `procurementPolicyRules` is the reviewed English procurement policy pack (deadline clarity plus narrow subject/verb agreement). `procurementAgreementRule` is individually selectable. The grammar coverage is deliberately restricted; it is not a general parser. Alternatives at identical offsets/provider/rule preserve provider ordering, with a reviewed vocabulary preference in the Harper adapter. Rejected findings now include bounded `rejected-finding` diagnostics. All regions still require host authority.
21
+
22
+ Alpha.3 `normalizerAdapter` may emit multiple independent, nonoverlapping word/phrase patches from a single normalization. The adapter verifies that they reconstruct the exact normalized source and rejects the normalization if any patch violates the existing range/replacement/budget constraints. Do not assume one finding per field. Experimental Virastar remains advisory only. No new public mutation API.
23
+
24
+ Alpha.4 `createVirastar()` composes upstream cleanup with an explicit local formal-adverb allowlist for missing tanwin (not a Virastar feature). `normalizerAdapter` and the experimental fork are unchanged. No broad diacritic normalization is enabled. All proposals pass the existing bounded diff and engine validation.
@@ -0,0 +1,30 @@
1
+ # Architecture and integration contract
2
+
3
+ A modular, deterministic-first integration library. The application is the authority for identity, tenant, record, field, revision and region classification. The library does not discover records or infer authorization.
4
+
5
+ ```mermaid
6
+ flowchart TD
7
+ H[Authorized host snapshot] --> R{Complete exact region map?}
8
+ R -->|No| B[Blocked: no provider calls]
9
+ R -->|Yes| P[Admitted prose slices]
10
+ P --> E[Bounded provider orchestration]
11
+ E --> V[Normalize and validate UTF-16 ranges and replacements]
12
+ V --> Q[Immutable review findings]
13
+ Q --> C[Host rechecks live snapshot and permissions]
14
+ ```
15
+
16
+ The browser entry point is separate from the Node-only transport entry point. Load Harper/Virastar explicitly inside a host-owned worker. Optional services are deployment-owned and never fetched from a user-provided URL. Runtime permission changes invalidate the host snapshot and must terminate the worker. The package deliberately has no Apply method.
17
+
18
+ ## Provider selection
19
+
20
+ | Profile | Engines | Use |
21
+ |---|---|---|
22
+ | Browser, English | Harper, optionally reviewed Textlint rules | Grammar, spelling, writing policies |
23
+ | Browser, Persian | Virastar (restricted settings) | Orthography, not full grammar |
24
+ | Document QA | Vale, STE100 | Advisory style and terminology checks |
25
+ | Self-hosted extended | LanguageTool | Optional independent grammar service |
26
+ | Experimental | Virastar TS | Evaluation only, advisory |
27
+
28
+ All proposals are source-anchored. Invalid spans, malformed results, and prohibited replacement tokens are rejected; protected slices are not sent to providers. The host must protect names and any commercial or technical facts not caught by heuristics. Security and semantic correctness are separate properties.
29
+
30
+ In Alpha.3, Virastar's admitted prose output is aligned into bounded nonoverlapping patches, validated and reconstructed exactly before returning proposals. Demo-only identifier shape inference is not part of the SDK's authority boundary and must not be substituted for the host Region Map.
@@ -0,0 +1,26 @@
1
+ # Local verification evidence
2
+
3
+ 2026-11-24 — Linux, Node.js 22.16.0. All input data was synthetic.
4
+
5
+ | Check | Result |
6
+ |---|---|
7
+ | Syntax across src, test, examples, scripts and demo | PASS |
8
+ | Core and transport Node tests | 26 pass, 0 fail, 0 skipped |
9
+ | Property-style protected range scenarios | 150 generated cases in the existing suite |
10
+ | TypeScript declaration consumer contract (available local `tsc`) | PASS |
11
+ | npm pack dry run | PASS |
12
+ | Existing engine/provider source compared to original candidate | Identical bytes |
13
+ | Local HTTP and process transport | PASS with synthetic fixtures, not actual external engines |
14
+ | npm lock generation / pinned dependency installation | NOT RUN — registry unavailable in authoring environment |
15
+ | Actual Harper/Virastar/Textlint execution and built Chromium demo | NOT RUN — require installed upstream dependencies |
16
+ | Optional real Vale, STE100, LanguageTool and experimental TS adapter | NOT RUN |
17
+ | Windows publishing script and GitHub Actions | NOT RUN — no authenticated GitHub CLI or new repository in authoring environment |
18
+ | GitHub public repo / release / npm publication / deployment | NOT PERFORMED |
19
+
20
+ The included publishing script is intended to create a real lock and gate public alpha publication on actual local and GitHub CI. No synthetic or dry-run check substitutes for these gates. The optional service/production qualification remains separate. No actual private procurement records are included.
21
+
22
+ ## GitHub bootstrap evidence (2026-11-24)
23
+
24
+ The public repository was created by the owner. The initial source candidate was transferred with Git blob checks. GitHub Actions resolved the registry-published Harper 3.2.0 and generated the genuine npm lockfile in [run 45367794766](https://github.com/FireXCore/procurement-writing-engine/actions/runs/45367794766); its dependency-free suite passed 26 tests, 0 failures, 0 skips. PNGs were regenerated from the supplied SVG assets in [run 45367618533](https://github.com/FireXCore/procurement-writing-engine/actions/runs/45367618533). These are bootstrap checks, not evidence of successful full upstream CI or production readiness. See the current CI and Releases pages for publication results.
25
+
26
+ The first full CI run [45368024172](https://github.com/FireXCore/procurement-writing-engine/actions/runs/45368024172) passed real upstream JS execution and Chromium but blocked the prerelease due to the high-severity Vite 8.1.4 development dependency advisories. Vite alone was explicitly repinned to 8.3.8 and the real lockfile regenerated in [run 45368202677](https://github.com/FireXCore/procurement-writing-engine/actions/runs/45368202677), with all 26 core tests passing again. The complete CI and security audit must still pass on the resulting main commit.
@@ -0,0 +1,21 @@
1
+ # Repository discoverability
2
+
3
+ Recommended repository slug: `FireXCore/procurement-writing-engine`.
4
+
5
+ **Description:** English and Persian procurement writing review. Local engines, protected technical ranges, no LLM required.
6
+
7
+ **Topics:** procurement, grammar-checker, persian, technical-writing, webassembly, erp, writing-assistant, offline-first.
8
+
9
+ The publish script configures description, topics, issues and discussions. Upload `assets/social-preview.png` (1280×640) under GitHub Settings → General → Social preview. GitHub's current CLI does not provide a repository social-preview upload flag; this step remains manual. The image contains no external logos or upstream endorsement.
10
+
11
+ ## Launch post (publish only after GitHub release exists)
12
+
13
+ Procurement Writing Engine is an open-source alpha for English and Persian writing review in procurement software. It composes existing language engines instead of requiring a large language model, and keeps host-classified technical ranges outside grammar providers. The library produces review-only, source-anchored findings and ships with a local browser demo, TypeScript declarations, tests and explicit security boundaries.
14
+
15
+ Repository: https://github.com/FireXCore/procurement-writing-engine
16
+
17
+ The project is experimental. Contributions with synthetic RFQ, quotation and technical-writing examples are welcome. No claims of certified compliance or production readiness.
18
+
19
+ ## After publication
20
+
21
+ Share the actual release link and social preview in relevant procurement, developer and open-source communities. Describe measured capabilities and limitations, not unverified accuracy or adoption figures. Consider submitting upstream-compatible integration examples after maintainers review them. Do not create artificial stars or engagement.
@@ -0,0 +1,29 @@
1
+ # موتور نگارش Procurement
2
+
3
+ کتابخانه مستقل و متن‌باز برای بررسی نگارش تجاری و فنی انگلیسی و فارسی، با ترکیب موتورهای آماده و بدون نیاز به مدل زبانی بزرگ در پروفایل پیش‌فرض. نسخه فعلی آلفا است و تأیید تولید ندارد.
4
+
5
+ - Harper برای املا و گرامر انگلیسی؛ Virastar برای نگارش فارسی.
6
+ - Textlint برای سیاست‌های سازمانی و Vale، STE100 و LanguageTool به صورت اختیاری.
7
+ - پیشنهادهای قابل بازبینی با موقعیت UTF-16 و کنترل محدوده‌های حفاظت‌شده.
8
+ - برنامه میزبان مسئول مجوزها، جداسازی کاربران و تأمین‌کنندگان، و تعیین محدوده معتبر متن است. هیچ پیشنهاد به صورت خودکار اعمال نمی‌شود.
9
+
10
+ ## اجرای آزمایشی
11
+
12
+ پس از تولید Lockfile واقعی توسط فرایند انتشار، Node.js نسخه 22.12 یا بالاتر و مرورگر Chromium سازگار لازم است.
13
+
14
+ ```sh
15
+ npm ci --ignore-scripts
16
+ npm run verify
17
+ npm run demo
18
+ ```
19
+
20
+ فقط با داده مصنوعی آزمایش کنید. وضعیت تست‌های اجراشده و محدودیت‌ها در [گزارش اعتبارسنجی](LOCAL_VERIFICATION.md) و [فرایند انتشار](RELEASE.md) آمده است. [معماری](ARCHITECTURE.md)، [قرارداد API](API.md)، [امنیت](../SECURITY.md) و [مجوز اجزا](../THIRD_PARTY.md) را قبل از استفاده مطالعه کنید.
21
+
22
+ ## نصب از npm پس از انتشار تأییدشده
23
+
24
+ ```sh
25
+ npm install procurement-writing-engine@alpha
26
+ npm install --save-exact harper.js@3.2.0 virastar@0.22.1
27
+ ```
28
+
29
+ [وضعیت بسته در npm](https://www.npmjs.com/package/procurement-writing-engine) · [دموی عمومی](https://procurement-writing-engine.vercel.app/). انتشار آلفا مجوز استفاده عملیاتی نیست.
@@ -0,0 +1,42 @@
1
+ # Alpha release workflow
2
+
3
+ The source bundle is not a published release. The existing public FireXCore repository uses the CI workflow below to publish the alpha.6 prerelease only after all required jobs succeed. The Windows bootstrap script is historical and requires private package metadata; do not run it for alpha.6 or later. Use CI instead. The maintainer script creates a **private staging repository first**, tests the actual locked JS packages, checks security and package manifests, waits for GitHub CI for the exact commit, creates a GitHub prerelease, and finally changes repository visibility to public. It never publishes to npm, never force-pushes, and never changes another repository.
4
+
5
+ ## Historical Windows maintainer bootstrap (not for alpha.6)
6
+
7
+ Prerequisites: Git, GitHub CLI authenticated to the intended owner, Node.js >=22.12, npm, and installed Chrome/Edge (or `PWE_CHROME` with an explicit path). Registry and GitHub access required. Git user identity must already be configured. Extract outside another Git checkout and inspect all source before publishing.
8
+
9
+ ```powershell
10
+ gh auth login
11
+ # Run from the extracted project directory.
12
+ .\publish.ps1 -Owner FireXCore -PublicAlpha
13
+ ```
14
+
15
+ The first execution generates a genuine npm lockfile, then uses `npm ci --ignore-scripts`. Direct upstream and tool versions are pinned. The lock is checked for exact direct versions, registry integrity metadata and unexpected package content. A high-severity npm audit failure, browser failure or any failed GitHub CI job prevents the initial public transition. CI tests Node 22/24 on Linux and Windows, real upstream JS integration, the built demo in Chromium, and package metadata. The POSIX-only synthetic executable test is explicitly skipped on Windows.
16
+
17
+ Review the resolved dependency tree and its licenses. The GitHub prerelease is an alpha source/tarball with no bundled third-party libraries, WASM, dictionary, or models. SBOM and SHA-256 checksum accompany the release. The script cannot provide a legal opinion or audit every transitive package. If any step fails, inspect the precise error before resuming. A collision or existing tag is a hard stop; no existing repo or tag is overwritten. If the final visibility step fails after a private release is made, inspect the private release and use GitHub settings to change visibility when satisfied. GitHub may require additional OAuth scopes or organization approval.
18
+
19
+ ## Development checks
20
+
21
+ ```sh
22
+ npm ci --ignore-scripts
23
+ npm run verify
24
+ npm audit --audit-level=high
25
+ npm run release:check
26
+ ```
27
+
28
+ `npm run check` and `npm test` are dependency-free. `npm run verify` additionally requires the lock-resolved upstream packages, TypeScript, Vite, and installed Chromium. Real upstream/browser CI is a required alpha publication gate, not claimed to have run in the offline authoring environment.
29
+
30
+ ## Optional services and production gates
31
+
32
+ Vale v3.28.1, STE100 v0.1.1 (spaCy and reviewed `en_core_web_sm` model), LanguageTool (review and pin a release independently), and experimental Virastar TS are **not** required for the browser alpha. They remain disabled/optional, separately qualified with real binaries and synthetic text. Configure absolute `PWE_VALE` / `PWE_STE100` and loopback `PWE_LT_ENDPOINT`, run `npm run test:services`. These tests fail if prerequisites are missing, not silently skip. Review license, runtime provenance, sandboxing and logging policy. Do not use unreviewed engines or binaries in production.
33
+
34
+ Production requires a versioned synthetic domain evaluation corpus, accepted accuracy and latency thresholds, actual Chromium/Firefox worker and CSP acceptance, no external traffic, and real authenticated host isolation. The host owns a complete region map and permission/session/record/edit-epoch checks. No public issue, artifact or CI log may contain actual procurement data. No automatic Apply, production integration or deployment is authorized by the alpha release. See [SECURITY.md](../SECURITY.md) and [THIRD_PARTY.md](../THIRD_PARTY.md).
35
+
36
+ ## Existing public repository release automation
37
+
38
+ The CI workflow's final job is restricted to the canonical repository, main, a successful push or explicit workflow dispatch, and the explicit alpha.6 version. It checks the current main SHA, refuses existing tags, generates a tarball and checksum, downloads the dependency inventory from the same CI run, and creates a GitHub prerelease. This CI job does not publish to npm or deploy externally. The release job alone has contents-write permission. No release is created if a required upstream, browser, audit or contract job fails.
39
+
40
+ ## Public npm distribution
41
+
42
+ Alpha.6 changes packaging metadata only; the tested alpha.5 engine is unchanged. Never replace the existing alpha.5 artifact. After the alpha.6 GitHub release passes CI, download the tarball and SHA256SUMS.txt from that release and verify its SHA-256. For a new package, the maintainer must authenticate to npm (2FA enabled) and publish the exact verified tarball with `npm publish ./procurement-writing-engine-0.1.0-alpha.6.tgz --access public --tag alpha --ignore-scripts` or stage and approve it with npm CLI 11.15+; never share credentials. After the package exists, configure a GitHub Actions trusted publisher: owner FireXCore, repository procurement-writing-engine, filename npm-publish.yml, allowed action stage publish. Run the workflow manually on main; it refuses a commit without a matching GitHub release tag. Review and approve staged versions in npmjs.com with 2FA. No permanent token, automatic Apply, stable tag or production deployment.
@@ -0,0 +1,3 @@
1
+ # Procurement Writing Engine 0.1.0-alpha.6
2
+
3
+ Packaging-only public-distribution candidate based on human-tested alpha.5. No engine, provider, parser or demo changes. Public npm metadata, fresh-consumer installation checks and separate authenticated staging workflow. Review-only; no production qualification. Registry publication requires maintainer approval and successful CI.
@@ -0,0 +1,55 @@
1
+ # Upstream architecture and compatibility review — 2026-11-24
2
+
3
+ ## Scope and method
4
+
5
+ Repository metadata and recursive trees for seven projects were inspected. Tree sizes (all entries, including directories and assets): Harper 2,393; STE100 57; Vale 2,234; LanguageTool 5,266; Textlint 2,129; Virastar JS 29; Virastar TS 117. Relevant source interfaces, implementation sections, selected tests and package manifests were retrieved from GitHub, with the release-tag contracts cross-checked where available. This is a focused integration review, **not** a completed line-by-line security audit of every upstream file, rule, model, or transitive dependency. No upstream source was vendored. The following links identify the observed source, not a claim that every upstream behavior has been proven.
6
+
7
+ ## Harper — primary English engine
8
+
9
+ - Reviewed baseline: [`master` 2026-11-23](https://github.com/Automattic/harper/tree/eeaf0d208e56bf55ea1720833177d9451316b4cf); [release v3.3.0](https://github.com/Automattic/harper/releases/tag/v3.3.0).
10
+ - [JS manifest](https://github.com/Automattic/harper/blob/eeaf0d208e56bf55ea1720833177d9451316b4cf/packages/harper.js/package.json), [Linter contract](https://github.com/Automattic/harper/blob/v3.3.0/packages/harper.js/src/Linter.ts), [LocalLinter](https://github.com/Automattic/harper/blob/eeaf0d208e56bf55ea1720833177d9451316b4cf/packages/harper.js/src/LocalLinter.ts), [WorkerLinter](https://github.com/Automattic/harper/blob/eeaf0d208e56bf55ea1720833177d9451316b4cf/packages/harper.js/src/WorkerLinter/index.ts), [WASM bindings](https://github.com/Automattic/harper/blob/v3.3.0/harper-wasm/src/lib.rs), [tests](https://github.com/Automattic/harper/blob/eeaf0d208e56bf55ea1720833177d9451316b4cf/packages/harper.js/src/Linter.test.ts), [inline binary](https://github.com/Automattic/harper/blob/eeaf0d208e56bf55ea1720833177d9451316b4cf/packages/harper.js/src/binaries/binaryInlined.ts).
11
+ - `organizedLints` provides source rule IDs; bindings expose span, original problem text, message and suggestion kind. The WASM layer converts Unicode character offsets to JS UTF-16. Replace/remove/insert-after differ; convert to a source-anchored proposal and release wrappers. Never call upstream `applySuggestion` (which records usage statistics). The caller must explicitly dispose the linter. Do not load the WASM until enabled by the host.
12
+ - Decision: integrate the real library through a lazy adapter, not port Rust rules.
13
+
14
+ ## Virastar JS — primary Persian orthography
15
+
16
+ - [Manifest](https://github.com/brothersincode/virastar/blob/76dc6ea0e73555eb522795702bf14b4a351b4ffc/package.json), [README options](https://github.com/brothersincode/virastar/blob/76dc6ea0e73555eb522795702bf14b4a351b4ffc/README.md), [released implementation v0.22.1](https://github.com/brothersincode/virastar/blob/v0.22.1/lib/virastar.js).
17
+ - Default transformations include English/Arabic digit conversion, date reordering, numeral separator replacement, HTML entity decoding and punctuation/dash changes. These are unsafe defaults for procurement. Explicitly disable all nonrequired transformations; allow only selected Persian glyph/prefix/suffix operations in approved Persian prose. Convert the returned string into one minimal grapheme-aligned review proposal, not an entire field rewrite. A normalizer is not a grammar checker.
18
+ - Decision: use stable JS package; real upstream acceptance still required.
19
+
20
+ ## Virastar TS — alternative only
21
+
22
+ - [README](https://github.com/nekofar/virastar/blob/69e5e6832a514e06ade468373c1b4924d19c4efb/README.md), [manifest](https://github.com/nekofar/virastar/blob/69e5e6832a514e06ade468373c1b4924d19c4efb/package.json).
23
+ - Project explicitly identifies itself as experimental; API is `virastar().process(text)`, not a drop-in substitute for JS Virastar. No release was returned by GitHub's latest-release endpoint. Include an optional adapter for a host-owned instance, advisory-only; do not install by default or combine both normalizers on the same text. No real TS package acceptance performed.
24
+
25
+ ## Textlint — reviewed procurement policy packs
26
+
27
+ - [Kernel v16.1.3](https://github.com/textlint/textlint/blob/v16.1.3/packages/@textlint/kernel/src/textlint-kernel.ts), [interface](https://github.com/textlint/textlint/blob/356769ed579b998d73d05a4a55767dae15fdd288/packages/@textlint/kernel/src/textlint-kernel-interface.ts), [message ranges](https://github.com/textlint/textlint/blob/v16.1.3/packages/@textlint/types/src/Message/TextlintResult.ts), [plaintext plugin](https://github.com/textlint/textlint/blob/356769ed579b998d73d05a4a55767dae15fdd288/packages/@textlint/textlint-plugin-text/src/index.ts), [rule context](https://github.com/textlint/textlint/blob/v16.1.3/packages/@textlint/types/src/Rule/TextlintBaseRuleContext.ts), [rule error details](https://github.com/textlint/textlint/blob/356769ed579b998d73d05a4a55767dae15fdd288/packages/@textlint/types/src/Rule/TextlintRuleError.ts).
28
+ - `lintText` requires explicit plugin/rule configuration; it is not itself an English grammar engine. `fix.range` is distinct from issue `range` and deprecated point `index`. Use explicit source ranges only. Call `lintText`, not `fixText`. Include a small advisory delivery-clarity policy, not a new grammar engine. Production rule packs must be approved per document type and locale.
29
+
30
+ ## Vale — document/terminology checks
31
+
32
+ - [JSON renderer](https://github.com/vale-cli/vale/blob/749876705d8efade3cc745d83a07996ec7a75e3a/cmd/vale/json.go), [alert contract v3.28.1](https://github.com/vale-cli/vale/blob/v3.28.1/internal/core/alert.go), [CLI flags](https://github.com/vale-cli/vale/blob/749876705d8efade3cc745d83a07996ec7a75e3a/cmd/vale/flag.go), [docs](https://docs.vale.sh/).
33
+ - JSON maps each source document to alerts with `Line`, `Match`, `Span`, `Check`, `Message`. Columns can vary with parser and encoding. Accept only unique exact match on the specified line; never global or fuzzy search. Keep advisories. Run optional installed binary with owned config and stdin, not a new Go port or per-keystroke server request. The included sample policy is intentionally small.
34
+
35
+ ## LanguageTool — optional independent language service
36
+
37
+ - [Persian language module](https://github.com/languagetool-org/languagetool/blob/8db66a4d2e7bd629f4697b07d43727b281ee5322/languagetool-language-modules/fa/src/main/java/org/languagetool/language/Persian.java), [server route](https://github.com/languagetool-org/languagetool/blob/8db66a4d2e7bd629f4697b07d43727b281ee5322/languagetool-server/src/main/java/org/languagetool/server/ApiV2.java), [HTTP API contract](https://languagetool.org/http-api/swagger-ui/), [self-host guide](https://dev.languagetool.org/http-server).
38
+ - Persian includes whitespace, repetition, coherence and replacement rules, not proof of full Persian grammar coverage. API `matches` supplies `offset`, `length`, context, rule and replacements. Validate context against original. Do not send actual customer text to the public API. Loopback service only, disabled unless configured. Treat server, dictionaries and optional external service features as separately reviewed dependencies. Exact deployed version remains a qualification gate.
39
+
40
+ ## STE100 checker — optional technical-English advisory
41
+
42
+ - [Release v0.1.1](https://github.com/swarooppatilx/ste100/releases/tag/v0.1.1), [manifest](https://github.com/swarooppatilx/ste100/blob/6bbed1e639411ea10df9aa3f0ca166289102ba7b/pyproject.toml), [CLI](https://github.com/swarooppatilx/ste100/blob/6bbed1e639411ea10df9aa3f0ca166289102ba7b/src/cli.py), [engine](https://github.com/swarooppatilx/ste100/blob/6bbed1e639411ea10df9aa3f0ca166289102ba7b/src/engine.py), [report](https://github.com/swarooppatilx/ste100/blob/v0.1.1/src/report.py), [spaCy pipeline](https://github.com/swarooppatilx/ste100/blob/6bbed1e639411ea10df9aa3f0ca166289102ba7b/src/pipeline.py), [dictionary](https://github.com/swarooppatilx/ste100/blob/6bbed1e639411ea10df9aa3f0ca166289102ba7b/src/dictionary.py).
43
+ - Python report offsets are code points; convert to UTF-16 and verify reported `text` exactly. Suggestions may be explanations, not literal replacements; keep advisory only. Requires installed spaCy `en_core_web_sm`, so this optional path is not model-free in the statistical NLP sense. No claim of ASD-STE100 certification; no standard vocabulary/data copied.
44
+
45
+ ## Architectural decision
46
+
47
+ A single modular library orchestrates adapters. Browser profile: Harper + Virastar, optional reviewed Textlint policy. Server/document QA profile: Vale and optional LanguageTool/STE100. Enable one primary grammar provider for a given locale by default; extra providers are deliberate audit profiles, not an unconditional cascade. Preserve each finding's source; conflicting suggestions are not automatically combined. No LLM, no auto-apply, no proprietary code or data.
48
+
49
+ ### Registry qualification addendum — 2026-11-24
50
+
51
+ The GitHub v3.3.0 tag was reviewed, but npm returned ETARGET for harper.js@3.3.0. The registry's latest available version was 3.2.0. The v3.2.0 Linter.ts and WASM lib.rs have identical Git blob hashes to their v3.3.0 counterparts, and the package export and inline WASM entry point were checked at v3.2.0. The published dependency is pinned to 3.2.0, subject to actual upstream/browser CI. No parser was ported or replaced.
52
+
53
+ ### Alpha.3 orthography adapter refinement
54
+
55
+ The original one-span contiguous diff described above has been replaced in the Virastar adapter by bounded exact-word alignment and independently validated word/phrase patches. No Virastar linguistic transformations, package versions, or protected-region admission rules changed. Unsafe or excessive patch sets are rejected as a whole. See the Alpha.3 acceptance document for scope.