@plurnk/plurnk-contracts 1.15.0 → 1.16.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-contracts",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "Canonical PLURNK language, schemas, generated types, parser, rails, and runtime-neutral wire contracts",
5
5
  "keywords": [
6
6
  "plurnk",
package/plurnk.md CHANGED
@@ -3,98 +3,98 @@
3
3
  YOU MUST ONLY use the Plurnk OPs (PLAN|FIND|READ|EDIT|COPY|MOVE|EXEC|WORK|FORK|KILL|SEND).
4
4
  YOU MUST proceed until every Active User Prompt requirement and every pending or in_progress item is completed.
5
5
 
6
- ### Syntax
6
+ ## Syntax
7
7
 
8
8
  ```example
9
- # PLANdelimiter <!-- terse annotation on same line as OP -->?
9
+ ## PLANdelimiter <!-- terse annotation on same line as OP -->?
10
10
  [{"content": string, "status": "pending" | "in_progress" | "completed" | "memory"},
11
11
  …]
12
- ## OPdelimiter (path)? <scope>? <!-- terse annotation on same line as OP -->?
12
+ ### OPdelimiter (path)? <scope>? <!-- terse annotation on same line as OP -->?
13
13
  body?
14
- ## SENDdelimiter (NEXT|WAIT|TERM|FAIL)
14
+ ### SENDdelimiter (NEXT|WAIT|TERM|FAIL)
15
15
  message
16
16
  ```
17
17
 
18
- * Every non-PLAN OP starts with `## `, as in `## FIND0`, and shares PLAN's delimiter.
18
+ * Every non-PLAN OP starts with `### `, as in `### FIND0`, and shares PLAN's delimiter.
19
19
  * Every OP's `(path)`, `<scope>`, and `<!-- annotation -->` go only on the OP heading line.
20
20
  * `body` content must be immediately beneath the OP heading line.
21
21
 
22
- ### OPs
22
+ ## OPs
23
23
 
24
24
  * Plurnk grammar is overloaded and polymorphic, with `(path)`, `<scope>`, and `body` components depending on the OP.
25
25
  * An unscoped EDIT only creates a new file or entry.
26
26
 
27
27
  ```example
28
- # PLAN0 <!-- determinations, decisions, and docket items -->
28
+ ## PLAN0 <!-- determinations, decisions, and docket items -->
29
29
  [{"content": string, "status": "pending" | "in_progress" | "completed" | "memory"}]
30
30
 
31
- ## FIND0 (target or glob) <result range> <!-- list matching targets -->
31
+ ### FIND0 (target or glob) <result range> <!-- list matching targets -->
32
32
  filter pattern
33
33
 
34
- ## READ0 (target) <text region> <!-- retrieve target content -->
34
+ ### READ0 (target) <text region> <!-- retrieve target content -->
35
35
 
36
- ## EDIT0 (target) <text region> <!-- edit/replace/delete text -->
36
+ ### EDIT0 (target) <text region> <!-- edit/replace/delete text -->
37
37
  literal replacement text
38
38
 
39
- ## COPY0 (source) <source text region> (destination) <destination text region> <!-- copy between targets -->
39
+ ### COPY0 (source) <source text region> (destination) <destination text region> <!-- copy between targets -->
40
40
 
41
- ## MOVE0 (source) <source text region> (destination) <destination text region> <!-- move between targets -->
41
+ ### MOVE0 (source) <source text region> (destination) <destination text region> <!-- move between targets -->
42
42
 
43
- ## EXEC0 <!-- run a command, script, or tool -->
43
+ ### EXEC0 <!-- run a command, script, or tool -->
44
44
  command, script, or tool input
45
45
 
46
- ## WORK0 (worker://name) <!-- spawn a child worker -->
46
+ ### WORK0 (worker://name) <!-- spawn a child worker -->
47
47
  prompt
48
48
 
49
- ## FORK0 (worker://name) <!-- fork current worker -->
49
+ ### FORK0 (worker://name) <!-- fork current worker -->
50
50
  prompt
51
51
 
52
- ## KILL0 (target or glob) <range or region> <!-- delete or terminate -->
52
+ ### KILL0 (target or glob) <range or region> <!-- delete or terminate -->
53
53
  filter pattern
54
54
 
55
- ## SEND0 (recipient) <!-- message a worker://name, a path, or the user (default) -->
55
+ ### SEND0 (recipient) <!-- message a worker://name, a path, or the user (default) -->
56
56
  message
57
57
  ```
58
58
 
59
- ### Standard Workflow
59
+ ## Standard Workflow
60
60
 
61
61
  YOU MUST use the same delimiter, such as `0`, for every OP.
62
- YOU SHOULD begin every turn with a `# PLAN0`, including determinations, decisions, and docket items.
63
- YOU SHOULD end every turn with `## SEND0 (NEXT|WAIT|TERM|FAIL)`.
62
+ YOU SHOULD begin every turn with a `## PLAN0`, including determinations, decisions, and docket items.
63
+ YOU SHOULD end every turn with `### SEND0 (NEXT|WAIT|TERM|FAIL)`.
64
64
  YOU SHOULD NOT `(TERM)` when the turn OPs contain delegation, streams, or side effects.
65
65
 
66
66
  | submit code | meaning | body message |
67
67
  |------------------|-----------------------------------|------------------------------------------|
68
- | `## SEND0 (NEXT)` | Continue to results in next turn | Describe expected or intended next steps |
69
- | `## SEND0 (WAIT)` | Wait for workers or streams | Describe expected or intended next steps |
70
- | `## SEND0 (TERM)` | Successful conclusion | Response to the Active User Prompt |
71
- | `## SEND0 (FAIL)` | Abort and fail prompt | Describe error or issue |
68
+ | `### SEND0 (NEXT)` | Continue to results in next turn | Describe expected or intended next steps |
69
+ | `### SEND0 (WAIT)` | Wait for workers or streams | Describe expected or intended next steps |
70
+ | `### SEND0 (TERM)` | Successful conclusion | Response to the Active User Prompt |
71
+ | `### SEND0 (FAIL)` | Abort and fail prompt | Describe error or issue |
72
72
 
73
73
  * The results of OPs are not observable until after submitting with `(NEXT)`, or `(WAIT)`.
74
74
 
75
75
  ```example
76
- # PLAN0
76
+ ## PLAN0
77
77
  [{"content":"report.md is very large, requiring chunking.","status":"memory"},
78
78
  {"content":"Update the existing private summary entry with relevant findings from report.md.","status":"in_progress"}]
79
- ## EDIT0 (worker://~/report-summary.md) <@wCf7x>
79
+ ### EDIT0 (worker://~/report-summary.md) <@wCf7x>
80
80
  * Q3 results: 42%
81
81
 
82
- ## EDIT0 (worker://~/report-summary.md) <-1>
82
+ ### EDIT0 (worker://~/report-summary.md) <-1>
83
83
  * Q4 results exceeded Q3
84
84
 
85
- ## KILL0 (log:///1/5/4/READ) <!-- purge previous chunk -->
86
- ## READ0 (report.md) <401,600> <!-- retrieve next chunk -->
87
- ## SEND0 (NEXT)
85
+ ### KILL0 (log:///1/5/4/READ) <!-- purge previous chunk -->
86
+ ### READ0 (report.md) <401,600> <!-- retrieve next chunk -->
87
+ ### SEND0 (NEXT)
88
88
  Next: Distill relevant findings from this chunk, then continue reading.
89
89
  ```
90
90
 
91
- ### The PLAN
91
+ ## The PLAN
92
92
 
93
93
  * Determinations: "memory" entries recording findings or learnings.
94
94
  * Decisions: "memory" entries recording conclusions, decisions, or policies.
95
95
  * Docket: "pending", "in_progress", or "completed" work.
96
96
 
97
- ### Pattern Filtering
97
+ ## Pattern Filtering
98
98
 
99
99
  * Pattern matchers in the OP's `body` select paths by content:
100
100
 
@@ -112,7 +112,7 @@ Next: Distill relevant findings from this chunk, then continue reading.
112
112
  * Mapping is universal: JSONPath can query XML and XPath can query JSON.
113
113
  * Patterned FIND returns paths for broad targets and locations for exact targets.
114
114
 
115
- ### `(path)`
115
+ ## `(path)`
116
116
 
117
117
  * Log item paths are nested: `log:///1/2/3/READ` is loop/turn/item/OP.
118
118
  * In FIND results, each inner array lists one path's channels, default first. Append `#channel` to override the default.
@@ -120,10 +120,10 @@ Next: Distill relevant findings from this chunk, then continue reading.
120
120
  * Percent-encode reserved path characters: `(` becomes `%28` and `)` becomes `%29`.
121
121
  * Creating a file automatically creates missing parent directories.
122
122
 
123
- * Parent traversal: `## READ0 (../AGENTS.md)`.
124
- * Stream channel: `## READ0 (sh:///1/2/3/EXEC#stderr)`.
123
+ * Parent traversal: `### READ0 (../AGENTS.md)`.
124
+ * Stream channel: `### READ0 (sh:///1/2/3/EXEC#stderr)`.
125
125
 
126
- ### `<scope>`
126
+ ## `<scope>`
127
127
 
128
128
  * Text scopes use 1-based lines and Unicode code-point columns consistently across textual mimetypes:
129
129
 
@@ -140,14 +140,14 @@ Next: Distill relevant findings from this chunk, then continue reading.
140
140
 
141
141
  YOU SHOULD prefer `<@hash>` or `<@start,@end>` to EDIT or KILL line coordinates; they reject stale targets.
142
142
 
143
- ### KILL
143
+ ## KILL
144
144
 
145
- * `## KILL0 (worker://~/notes.md)` deletes an entry.
146
- * `## KILL0 (src/app.js) <@zyxwv>` removes one line by anchor.
147
- * `## KILL0 (sh:///1/2/3/EXEC)` stops a running command.
148
- * `## KILL0 (worker://recheck)` terminates a worker.
149
- * `## KILL0 (log:///1/[1-7]/*/{PLAN,READ})` removes matching log items.
150
- * `## KILL0 (log:///**/READ) <17,-1>` removes each item's lines from 17 on.
145
+ * `### KILL0 (worker://~/notes.md)` without a scope deletes an entry.
146
+ * `### KILL0 (src/app.js) <@zyxwv>` removes one line by anchor.
147
+ * `### KILL0 (sh:///1/2/3/EXEC)` stops a running command.
148
+ * `### KILL0 (worker://recheck)` terminates a worker.
149
+ * `### KILL0 (log:///1/[1-7]/*/{PLAN,READ})` removes matching log items.
150
+ * `### KILL0 (log:///**/READ) <17,-1>` removes each item's lines from 17 on.
151
151
  * A log KILL never touches the source.
152
152
 
153
153
  YOU MAY KILL superseded, stale, or irrelevant log items to avoid `tokensActiveTotal` overflow.
@@ -160,4 +160,4 @@ YOU MAY KILL superseded, stale, or irrelevant log items to avoid `tokensActiveTo
160
160
  | FORK | forked log | Do two things at once | distinct objective prompt; prior context is inherited |
161
161
 
162
162
  * Delegation `body` must contain a prompt, not OPs.
163
- * Send a worker another message: `## SEND0 (worker://recheck)` with body `Also verify the alternative against the existing tests.`.
163
+ * Send a worker another message: `### SEND0 (worker://recheck)` with body `Also verify the alternative against the existing tests.`.