@@ -119,18 +119,23 @@ See the full example in [`examples/craft-business-lead-to-order.orgs`](examples/
119119- [ ` docs/language-principles.md ` ] ( docs/language-principles.md )
120120- [ ` docs/github-labels.md ` ] ( docs/github-labels.md )
121121- [ ` docs/github-project-setup.md ` ] ( docs/github-project-setup.md )
122+ - [ ` docs/governance.md ` ] ( docs/governance.md )
122123- [ ` docs/orgscript-for-humans.md ` ] ( docs/orgscript-for-humans.md )
123124- [ ` docs/orgscript-for-ai.md ` ] ( docs/orgscript-for-ai.md )
124125- [ ` docs/roadmaps/v0.4.0.md ` ] ( docs/roadmaps/v0.4.0.md )
125126- [ ` docs/repository-structure.md ` ] ( docs/repository-structure.md )
126127- [ ` docs/syntax.md ` ] ( docs/syntax.md )
127128- [ ` docs/semantics.md ` ] ( docs/semantics.md )
129+ - [ ` examples/README.md ` ] ( examples/README.md )
128130- [ ` spec/grammar.ebnf ` ] ( spec/grammar.ebnf )
131+ - [ ` spec/language-spec.md ` ] ( spec/language-spec.md )
129132- [ ` spec/canonical-model.md ` ] ( spec/canonical-model.md )
133+ - [ ` spec/diagnostics.md ` ] ( spec/diagnostics.md )
130134- [ ` examples/craft-business-lead-to-order.orgs ` ] ( examples/craft-business-lead-to-order.orgs )
131135- [ ` examples/lead-qualification.orgs ` ] ( examples/lead-qualification.orgs )
132136- [ ` examples/order-approval.orgs ` ] ( examples/order-approval.orgs )
133137- [ ` examples/service-escalation.orgs ` ] ( examples/service-escalation.orgs )
138+ - [ ` editors/vscode/README.md ` ] ( editors/vscode/README.md )
134139- [ ` packages/parser/README.md ` ] ( packages/parser/README.md )
135140- [ ` packages/cli/README.md ` ] ( packages/cli/README.md )
136141- [ ` packages/formatter/README.md ` ] ( packages/formatter/README.md )
@@ -146,11 +151,14 @@ See the full example in [`examples/craft-business-lead-to-order.orgs`](examples/
146151- Canonical format checks: ` orgscript format <file> --check `
147152- AST-backed linting: ` orgscript lint <file> `
148153- Combined quality checks: ` orgscript check <file> `
154+ - Machine-readable combined checks: ` orgscript check <file> --json `
149155- Canonical JSON export: ` orgscript export json <file> `
150156- Mermaid export for ` process ` and ` stateflow ` : ` orgscript export mermaid <file> `
151- - Machine-readable diagnostics: ` orgscript validate <file> --json ` , ` orgscript lint <file> --json `
157+ - Machine-readable diagnostics: ` orgscript validate <file> --json ` , ` orgscript lint <file> --json ` , ` orgscript check <file> --json `
152158- Golden snapshot tests for AST, canonical model, and formatter output
153159- Stable lint severities: ` error ` , ` warning ` , ` info `
160+ - Canonical master spec: [ ` spec/language-spec.md ` ] ( spec/language-spec.md )
161+ - Initial VS Code syntax-highlighting scaffold: [ ` editors/vscode ` ] ( editors/vscode )
154162
155163## Quick start
156164
@@ -159,6 +167,7 @@ npm install
159167node ./bin/orgscript.js validate ./examples/craft-business-lead-to-order.orgs
160168node ./bin/orgscript.js validate ./examples/craft-business-lead-to-order.orgs --json
161169node ./bin/orgscript.js check ./examples/craft-business-lead-to-order.orgs
170+ node ./bin/orgscript.js check ./examples/craft-business-lead-to-order.orgs --json
162171node ./bin/orgscript.js format ./examples/craft-business-lead-to-order.orgs
163172node ./bin/orgscript.js format ./examples/craft-business-lead-to-order.orgs --check
164173node ./bin/orgscript.js lint ./tests/lint/process-missing-trigger.orgs
@@ -173,19 +182,139 @@ Exit codes are CI-friendly:
173182- ` lint ` returns ` 0 ` when findings contain only ` warning ` and ` info ` , and ` 1 ` when findings contain at least one ` error ` .
174183- ` check ` returns ` 0 ` only when validation passes, lint has no ` error ` , and formatting is canonical. Warnings and info findings alone do not fail ` check ` .
175184
185+ ## JSON diagnostics
186+
187+ OrgScript exposes stable JSON diagnostics for CI, editors, AI systems, and downstream tooling.
188+
189+ ` validate --json ` on a canonical example:
190+
191+ ``` json
192+ {
193+ "command" : " validate" ,
194+ "file" : " examples/craft-business-lead-to-order.orgs" ,
195+ "ok" : true ,
196+ "valid" : true ,
197+ "summary" : {
198+ "topLevelBlocks" : 4 ,
199+ "statements" : 47 ,
200+ "diagnostics" : 0 ,
201+ "error" : 0 ,
202+ "warning" : 0 ,
203+ "info" : 0
204+ },
205+ "diagnostics" : []
206+ }
207+ ```
208+
209+ ` lint --json ` on a warning-only fixture:
210+
211+ ``` json
212+ {
213+ "command" : " lint" ,
214+ "file" : " tests/lint/process-missing-trigger.orgs" ,
215+ "ok" : true ,
216+ "clean" : true ,
217+ "summary" : {
218+ "diagnostics" : 1 ,
219+ "error" : 0 ,
220+ "warning" : 1 ,
221+ "info" : 0
222+ },
223+ "diagnostics" : [
224+ {
225+ "source" : " lint" ,
226+ "code" : " process-missing-trigger" ,
227+ "severity" : " warning" ,
228+ "line" : 1 ,
229+ "message" : " Process `MissingTrigger` has no `when` trigger."
230+ }
231+ ]
232+ }
233+ ```
234+
235+ ` check --json ` on a clean file:
236+
237+ ``` json
238+ {
239+ "command" : " check" ,
240+ "file" : " examples/craft-business-lead-to-order.orgs" ,
241+ "ok" : true ,
242+ "summary" : {
243+ "diagnostics" : 0 ,
244+ "error" : 0 ,
245+ "warning" : 0 ,
246+ "info" : 0
247+ },
248+ "validate" : {
249+ "ok" : true ,
250+ "valid" : true ,
251+ "skipped" : false ,
252+ "summary" : {
253+ "topLevelBlocks" : 4 ,
254+ "statements" : 47 ,
255+ "diagnostics" : 0 ,
256+ "error" : 0 ,
257+ "warning" : 0 ,
258+ "info" : 0
259+ },
260+ "diagnostics" : []
261+ },
262+ "lint" : {
263+ "ok" : true ,
264+ "clean" : true ,
265+ "skipped" : false ,
266+ "summary" : {
267+ "diagnostics" : 0 ,
268+ "error" : 0 ,
269+ "warning" : 0 ,
270+ "info" : 0
271+ },
272+ "diagnostics" : []
273+ },
274+ "format" : {
275+ "ok" : true ,
276+ "canonical" : true ,
277+ "skipped" : false ,
278+ "summary" : {
279+ "diagnostics" : 0 ,
280+ "error" : 0 ,
281+ "warning" : 0 ,
282+ "info" : 0
283+ },
284+ "diagnostics" : []
285+ }
286+ }
287+ ```
288+
176289## Guides
177290
178291- Human authoring guide: [ ` docs/orgscript-for-humans.md ` ] ( docs/orgscript-for-humans.md )
179292- AI interpretation guide: [ ` docs/orgscript-for-ai.md ` ] ( docs/orgscript-for-ai.md )
180293- Diagnostics contract: [ ` spec/diagnostics.md ` ] ( spec/diagnostics.md )
294+ - Canonical language spec: [ ` spec/language-spec.md ` ] ( spec/language-spec.md )
295+ - Language governance: [ ` docs/governance.md ` ] ( docs/governance.md )
296+ - Example catalog: [ ` examples/README.md ` ] ( examples/README.md )
297+ - VS Code editor scaffold: [ ` editors/vscode/README.md ` ] ( editors/vscode/README.md )
298+
299+ ## Editor support
300+
301+ OrgScript now ships with a first VS Code syntax-highlighting scaffold under [ ` editors/vscode ` ] ( editors/vscode ) .
302+
303+ It currently covers:
304+
305+ - ` .orgs ` file association
306+ - top-level blocks and core keywords
307+ - strings, numbers, and operators
308+
309+ See [ ` editors/vscode/README.md ` ] ( editors/vscode/README.md ) for local installation and usage notes.
181310
182311## Near-term plan
183312
184- 1 . Show real JSON diagnostics examples in the README and diagnostics spec .
185- 2 . Improve diagnostics consistency across CLI commands .
186- 3 . Add ` orgscript check --json ` for machine-readable combined quality output .
187- 4 . Add an initial VS Code syntax highlighting scaffold.
188- 5 . Add a first editor integration path that contributors can install locally .
313+ 1 . Expand diagnostics examples and integration guidance around CI and editors .
314+ 2 . Improve diagnostics consistency further across human-readable CLI output .
315+ 3 . Grow the example catalog across ` simple ` , ` realistic ` , and ` advanced ` scenarios .
316+ 4 . Extend editor support beyond the initial VS Code syntax- highlighting scaffold.
317+ 5 . Add additional downstream exporters and documentation views .
189318
190319See [ ` docs/roadmaps/v0.4.0.md ` ] ( docs/roadmaps/v0.4.0.md ) for the current milestone plan.
191320
@@ -203,6 +332,7 @@ orgscript lint file.orgs --json
203332orgscript export json file.orgs
204333orgscript export mermaid file.orgs
205334orgscript check file.orgs
335+ orgscript check file.orgs --json
206336```
207337
208338` orgscript check ` runs ` validate ` , ` lint ` , and ` format --check ` in that order and fails on validation errors, lint errors, or formatting drift. Warnings and info findings alone do not fail the command.
@@ -216,6 +346,8 @@ See [`docs/cli-v0.1-plan.md`](docs/cli-v0.1-plan.md) for the implementation plan
216346``` text
217347npm test
218348npm run export:mermaid
349+ npm run check
350+ npm run check:all
219351npm run format:check:all
220352npm run validate:all
221353npm run lint:all
0 commit comments