@plurnk/plurnk-plurnkdown 1.3.12 → 1.5.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/README.md CHANGED
@@ -2,10 +2,11 @@
2
2
 
3
3
  Plurnkdown — the [plurnk-service](https://github.com/plurnk/plurnk-service) packet house style: GFM + Mermaid + fenced Plurnk ops.
4
4
 
5
- `PACKET.md` is the standard every outbound packet is built against. The linter enforces it:
5
+ [`SPEC.md`](./SPEC.md) is the tagged Markdown contract for outbound packets. The linter enforces
6
+ its three diagnostic rules:
6
7
 
7
- - `op-fence` — a bare Plurnk op in prose belongs in a ```plurnk fence.
8
- - `op-syntax` — fenced ops parse statement-level via `@plurnk/plurnk-grammar`.
8
+ - `op-fence` — a bare Plurnk op in prose belongs in a `plurnk` fence.
9
+ - `op-syntax` — fenced ops parse statement-level via `@plurnk/plurnk-contracts`.
9
10
  - `run-on` — soft-warn on multi-compound run-ons; prose stays atomic (split, don't weld).
10
11
 
11
12
  ## license
package/SPEC.md ADDED
@@ -0,0 +1,125 @@
1
+ # Plurnkdown Specification
2
+
3
+ `@plurnk/plurnk-plurnkdown` owns the Markdown projection used for model packets and the
4
+ diagnostics produced by its linter. Core owns packet semantics and emits this format.
5
+
6
+ ## §packet-markdown Ownership and wire boundary
7
+
8
+ | Layer | Owner | Contract |
9
+ | ----------------------------- | --------------------------- | ------------------------------------------------------------------ |
10
+ | PLURNK operation language | `@plurnk/plurnk-contracts` | `plurnk.md`, parser, and language schemas {§contract-authority} |
11
+ | Default sections and ordering | `@plurnk/plurnk-service` | Ordered section list and trusted transform seam {§packet-assembly} |
12
+ | Section Markdown projection | `@plurnk/plurnk-plurnkdown` | This specification |
13
+ | Section values and lifecycle | Each producing package | Producer-owned content under the core packet contract |
14
+
15
+ Core renders the transformed section list into one system string and one user string. Within
16
+ each slot, list order is preserved. A nonempty section with a header renders as an H2, one blank
17
+ line, then its content. A null header renders only its content. Empty content is omitted, trailing
18
+ newlines are removed from each section, and rendered sections are separated by one blank line.
19
+
20
+ ## §packet-default-projection Default packet projection
21
+
22
+ Core owns this order at {§packet-cache-monotone}. The diagram projects that contract into the two
23
+ Markdown strings; a trusted plugin may transform the section list before rendering
24
+ {§packet-plugin-transform}. Any node whose content is empty is absent from the wire.
25
+
26
+ ```mermaid
27
+ flowchart LR
28
+ subgraph system[system slot]
29
+ direction LR
30
+ definition["definition<br/>bare content"] --> tools["Registered Executable Tools"]
31
+ tools --> optional["Enabled Optional Operations"]
32
+ optional --> schemes["Schemes"]
33
+ schemes --> notes["Operator Notes"]
34
+ notes --> policy["Policy"]
35
+ policy --> project["Project Policy"]
36
+ end
37
+
38
+ subgraph user[user slot]
39
+ direction LR
40
+ log["Log"] --> streams["Child Streams"]
41
+ streams --> workers["Active Child Workers"]
42
+ workers --> errors["Errors"]
43
+ errors --> notices["Notices"]
44
+ notices --> git["Git Status"]
45
+ git --> budget["Budget"]
46
+ budget --> prompts["User Prompts"]
47
+ prompts --> recap["Recap"]
48
+ end
49
+ ```
50
+
51
+ | Default section | Slot | Wire form | Semantic owner |
52
+ | --------------------- | ------ | --------------------------------------------- | ------------------------------- |
53
+ | `definition` | system | Bare `plurnk.md`; no wrapper heading | {§definition-table-projection} |
54
+ | `tools` | system | Optional terse notice, then a `plurnk` fence | {§tools-capability-sheet} |
55
+ | `optional-operations` | system | `plurnk` fence | {§tools-capability-sheet} |
56
+ | `schemes` | system | `plurnk` fence | {§schemes-directory} |
57
+ | `inject` | system | Authored Markdown | {§packet-inject} |
58
+ | `system-policy` | system | Authored Markdown | {§policy-sections} |
59
+ | `project-policy` | system | Authored Markdown | {§policy-sections} |
60
+ | `log` | user | Dynamic `jsonplurnk` fence | {§jsonplurnk} |
61
+ | `child-streams` | user | `* <status> <path>` pointers | {§child-orientation} |
62
+ | `child-workers` | user | `* <status> <path>` pointers | {§child-orientation} |
63
+ | `errors` | user | `* <status> log:///<coordinate>` pointers | {§operation-results} |
64
+ | `notices` | user | Terse observation bullets | {§notice-drain-on-read} |
65
+ | `git` | user | One working-tree state line | {§packet-cache-monotone} |
66
+ | `budget` | user | One ceiling, usage, percentage, and free line | {§tokenomics-neutral-telemetry} |
67
+ | `prompt` | user | `* prompt:///<loop>/<N>` pointers | {§prompt-entry} |
68
+ | `requirements` | user | Authored operational recap | {§requirements} |
69
+
70
+ The authored `plurnk.md` keeps its human-aligned tables. Core removes table-cell padding only
71
+ from the `definition` packet projection under {§definition-table-projection}; fenced blocks and
72
+ non-table whitespace remain exact.
73
+
74
+ ## §packet-invariants Projection invariants
75
+
76
+ Plurnkdown preserves the semantic evidence supplied by section owners.
77
+
78
+ | Invariant | Required projection |
79
+ | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
80
+ | Addressability | Paths, URI fragments, log coordinates, scopes, and numbered body lines remain usable without translation. |
81
+ | Weighability | The Budget line and log-row `tokens` / `itemsTokenTotal` values remain attached to the artifacts they measure. |
82
+ | Honesty | Statuses, Problems, body visibility, overflow notices, and bodyless rows render as produced; presentation never upgrades or suppresses truth. |
83
+ | Structure | Typed operation examples and Log data remain typed fences rather than prose paraphrases. |
84
+
85
+ ## §packet-operation-fences PLURNK operation fences
86
+
87
+ Model-facing operation examples use fenced blocks with the `plurnk` info string. A paragraph line
88
+ beginning with `<<` is an `op-fence` error. Each `plurnk` fence is parsed statement-by-statement by
89
+ `@plurnk/plurnk-contracts`; bounded diagnostics and {§unparsed-tail-boundary} surface as
90
+ `op-syntax` diagnostics under {§parse-diagnostics}.
91
+
92
+ Inline code may name a short operation form without becoming a block example. Other code-fence
93
+ languages are opaque to the PLURNK syntax check.
94
+
95
+ ## §packet-jsonplurnk-exception Log fence
96
+
97
+ The Log is a dynamically fenced `jsonplurnk` array owned by {§jsonplurnk}. It is valid GFM but
98
+ deliberately not labeled `json`: an open nonempty `body` is a raw HEREDOC rather than a JSON string.
99
+ The fence is one backtick longer than the longest run in the rendered entries, with a minimum
100
+ length of three {§jsonplurnk-dynamic-fence}. `@plurnk/plurnk-contracts` owns the deterministic
101
+ transform that recovers strict JSON.
102
+
103
+ ## §packet-atomic-prose Atomic prose
104
+
105
+ Packet prose uses short, single-idea sentences. The linter emits a review warning for either of
106
+ these paragraph shapes:
107
+
108
+ - a sentence of at least 180 rendered characters;
109
+ - a sentence of at least 120 rendered characters containing a semicolon.
110
+
111
+ The rule measures rendered paragraph text rather than Markdown syntax. Headings, lists, tables,
112
+ and fenced blocks are structural content and are not measured. This is a heuristic, not a raw
113
+ document-size limit.
114
+
115
+ ## §packet-lint Linter contract
116
+
117
+ | Rule | Severity | Trigger |
118
+ | ----------- | ---------------- | -------------------------------------------------------------------------- |
119
+ | `op-fence` | error | A paragraph line starts with a bare `<<` operation opener. |
120
+ | `op-syntax` | error or warning | A `plurnk` fence contains a parser diagnostic, advisory, or unparsed tail. |
121
+ | `run-on` | warning | Paragraph prose crosses an atomic-prose threshold. |
122
+
123
+ `PacketLint.lintDir` evaluates byte-exact digest files named
124
+ `packetNNN.system.md` and `packetNNN.user.md`. It ignores other digest artifacts, preserves the
125
+ originating filename on every finding, and does not claim semantic validation beyond these rules.
@@ -1 +1 @@
1
- {"version":3,"file":"PacketLint.d.ts","sourceRoot":"","sources":["../src/PacketLint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC7C,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC7B;AAKD,MAAM,CAAC,OAAO,OAAO,UAAU;IAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAQ5C;CACJ"}
1
+ {"version":3,"file":"PacketLint.d.ts","sourceRoot":"","sources":["../src/PacketLint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC7C,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC7B;AAGD,MAAM,CAAC,OAAO,OAAO,UAAU;IAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAQ5C;CACJ"}
@@ -1,9 +1,7 @@
1
1
  import { readFileSync, readdirSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import Plurnkdown from "./Plurnkdown.js";
4
- // The evaluation instrument: lint real emitted packets, not fixtures. A digest dir holds
5
- // packetNNN.{system,user}.md — byte-exact what the model saw (Engine and digest both render
6
- // through one PacketWire). Produce it with `plurnk-core/bin/digest.ts <run.db> <dir>`.
4
+ // Lint the byte-exact system/user packet files emitted by a digest. {§packet-lint}
7
5
  export default class PacketLint {
8
6
  static lintDir(dir) {
9
7
  const linter = new Plurnkdown();
@@ -1 +1 @@
1
- {"version":3,"file":"PacketLint.js","sourceRoot":"","sources":["../src/PacketLint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAYzC,yFAAyF;AACzF,4FAA4F;AAC5F,uFAAuF;AACvF,MAAM,CAAC,OAAO,OAAO,UAAU;IAC3B,MAAM,CAAC,OAAO,CAAC,GAAW;QACtB,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAChC,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAgC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE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AE,QAAQ,EAAE,CAAC;IACjC,CAAC;CACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"Plurnkdown.d.ts","sourceRoot":"","sources":["../src/Plurnkdown.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAQ7C,MAAM,CAAC,OAAO,OAAO,UAAU;;IAC3B,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE,CAajC;CAyEJ"}
1
+ {"version":3,"file":"Plurnkdown.d.ts","sourceRoot":"","sources":["../src/Plurnkdown.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAO7C,MAAM,CAAC,OAAO,OAAO,UAAU;;IAC3B,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE,CAajC;CAiFJ"}
@@ -1,10 +1,9 @@
1
1
  import { Lexer } from "marked";
2
- import { PlurnkParser } from "@plurnk/plurnk-grammar";
2
+ import { PlurnkParser } from "@plurnk/plurnk-contracts";
3
3
  const RUNON_LIMIT = 180; // a long run-on regardless of structure
4
4
  const WELD_LIMIT = 120; // a semicolon welding clauses in a non-trivial sentence
5
- // plurnkdown linter. Structural blocks are exempt by not being prose. Ops written bare
6
- // in prose are flagged for fencing; ops inside a ```plurnk fence are delegated to
7
- // plurnk-grammar for statement-level validation; prose sentences stay atomic.
5
+ // Structural blocks are not prose. Bare paragraph operations require fences;
6
+ // contracts owns fenced statement parsing. {§packet-operation-fences} {§packet-atomic-prose}
8
7
  export default class Plurnkdown {
9
8
  lint(source) {
10
9
  const diagnostics = [];
@@ -36,10 +35,8 @@ export default class Plurnkdown {
36
35
  });
37
36
  });
38
37
  }
39
- // Soft-warn (#453): the floor model reads short atomic sentences better than dense
40
- // compounds. Flag a long run-on (>= RUNON_LIMIT) or a semicolon-welded clause pair
41
- // (>= WELD_LIMIT with a `;`). A `;` is not treated as a sentence split — the weld
42
- // IS the anti-pattern. Warning, not error: it's a heuristic for human review.
38
+ // Review heuristic for dense paragraph prose; never a structural-content gate.
39
+ // {§packet-atomic-prose}
43
40
  #checkRunOns(token, line, diagnostics) {
44
41
  const text = this.#visibleText(token.tokens ?? []);
45
42
  // Per line, then per sentence — a soft line break is a unit boundary in this
@@ -62,21 +59,31 @@ export default class Plurnkdown {
62
59
  }
63
60
  }
64
61
  }
65
- // Delegate a ```plurnk fence's ops to plurnk-grammar; surface each syntax error at
66
- // its absolute line. Fence content line 1 sits one line below the opening fence.
62
+ // Delegate a ```plurnk fence's ops to the contracts grammar; surface every diagnostic and
63
+ // tail at its absolute point. Fence line 1 sits below the opener. {§packet-operation-fences}
67
64
  #checkFencedOps(text, line, diagnostics) {
68
- for (const item of PlurnkParser.parseStatements(text).items) {
65
+ const parsed = PlurnkParser.parseStatements(text);
66
+ for (const item of parsed.items) {
69
67
  if (item.kind !== "error")
70
68
  continue;
71
- const error = item.error;
69
+ const { error } = item;
72
70
  diagnostics.push({
73
71
  rule: "op-syntax",
74
72
  severity: error.severity === "warning" ? "warning" : "error",
75
- message: error.message.replace(/^Plurnk \w+ error at line \d+:\d+ - /, ""),
73
+ message: error.message,
76
74
  line: line + error.line,
77
75
  column: error.column,
78
76
  });
79
77
  }
78
+ if (parsed.unparsedTail !== undefined) {
79
+ diagnostics.push({
80
+ rule: "op-syntax",
81
+ severity: "error",
82
+ message: parsed.unparsedTail.reason,
83
+ line: line + parsed.unparsedTail.from.line,
84
+ column: parsed.unparsedTail.from.column,
85
+ });
86
+ }
80
87
  }
81
88
  #visibleText(tokens) {
82
89
  let out = "";
@@ -1 +1 @@
1
- {"version":3,"file":"Plurnkdown.js","sourceRoot":"","sources":["../src/Plurnkdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAA2B,MAAM,QAAQ,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,wCAAwC;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,MAAM,IAAI,GAAG,KAAwC,CAAC;YACtD,GAAG,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;QACvC,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IAED,SAAS,CAAC,GAAW;QACjB,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IACtC,CAAC;CACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-plurnkdown",
3
- "version": "1.3.12",
3
+ "version": "1.5.0",
4
4
  "description": "Plurnkdown — the plurnk packet house style (GFM + Mermaid + fenced Plurnk ops) and its linter.",
5
5
  "keywords": [
6
6
  "plurnk",
@@ -14,7 +14,7 @@
14
14
  "node": ">=26"
15
15
  },
16
16
  "dependencies": {
17
- "@plurnk/plurnk-grammar": "1.3.12",
17
+ "@plurnk/plurnk-contracts": "1.5.0",
18
18
  "marked": "^18.0.5"
19
19
  },
20
20
  "license": "MIT",
@@ -38,16 +38,22 @@
38
38
  },
39
39
  "files": [
40
40
  "dist/**/*",
41
- "README.md"
41
+ "README.md",
42
+ "SPEC.md"
42
43
  ],
43
44
  "scripts": {
44
45
  "test:lint": "tsc --noEmit",
45
46
  "test:unit": "node --conditions=plurnk-dev --test src/**/*.test.ts",
46
47
  "test": "npm run test:lint && npm run test:unit",
47
48
  "dev:lint-packets": "node --conditions=plurnk-dev bin/lint-packets.ts",
49
+ "build:clean": "rm -rf dist",
48
50
  "build:dist": "tsc -p tsconfig.build.json",
49
- "build": "npm run build:dist",
51
+ "build": "npm run build:clean && npm run build:dist",
50
52
  "prepack": "npm run build",
51
53
  "prepublishOnly": "npm audit --audit-level=moderate && npm test"
54
+ },
55
+ "homepage": "https://github.com/plurnk/plurnk-service/tree/main/plurnk-plurnkdown#readme",
56
+ "bugs": {
57
+ "url": "https://repo.possumtech.com/plurnk/plurnk-service/issues"
52
58
  }
53
59
  }