@plurnk/plurnk-grammar 0.74.47 → 0.74.49
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 +1 -1
- package/plurnk.md +27 -30
package/package.json
CHANGED
package/plurnk.md
CHANGED
|
@@ -22,21 +22,21 @@ YOU MUST ONLY use the Plurnk OPs (PLAN|FIND|READ|EDIT|COPY|MOVE|OPEN|FOLD|EXEC|K
|
|
|
22
22
|
Fields are optional unless otherwise specified.
|
|
23
23
|
The `(path)` is required for every operation except PLAN, EXEC, and SEND.
|
|
24
24
|
|
|
25
|
-
| OP | `[signal]` | `(path)` | `<Line / Result>` | :body:
|
|
26
|
-
|
|
27
|
-
| PLAN | - | - | - | :plan
|
|
28
|
-
| FIND | [filter tags] | (path) | <result,result> | :pattern:
|
|
29
|
-
| READ | [filter tags] | (path) | <line,line> | :pattern:
|
|
30
|
-
| EDIT | [tags] | (path) | <line,line> | :literal
|
|
31
|
-
| COPY | [apply tags] | (path) | <line,line> | :destination path:
|
|
32
|
-
| MOVE | [apply tags] | (path) | <line,line> | :destination path:
|
|
33
|
-
| OPEN | [filter tags] | (log path) | <result,result> | :pattern:
|
|
34
|
-
| FOLD | [filter tags] | (log path) | <result,result> | :pattern:
|
|
35
|
-
| EXEC | [executor] | (path) | <timeout, poll> | :code:
|
|
36
|
-
| KILL | [signal] | (path) | - | ::
|
|
37
|
-
| SEND | [status code] | (recipient) | - | :message:
|
|
38
|
-
|
|
39
|
-
<<PLAN:plan goes here:PLAN is required at the beginning of a turn.
|
|
25
|
+
| OP | `[signal]` | `(path)` | `<Line / Result>` | :body: | OP |
|
|
26
|
+
|------|---------------|-------------|-------------------|--------------------|------|
|
|
27
|
+
| PLAN | - | - | - | :plan, free text: | PLAN |
|
|
28
|
+
| FIND | [filter tags] | (path) | <result,result> | :pattern: | FIND |
|
|
29
|
+
| READ | [filter tags] | (path) | <line,line> | :pattern: | READ |
|
|
30
|
+
| EDIT | [tags] | (path) | <line,line> | :literal text: | EDIT |
|
|
31
|
+
| COPY | [apply tags] | (path) | <line,line> | :destination path: | COPY |
|
|
32
|
+
| MOVE | [apply tags] | (path) | <line,line> | :destination path: | MOVE |
|
|
33
|
+
| OPEN | [filter tags] | (log path) | <result,result> | :pattern: | OPEN |
|
|
34
|
+
| FOLD | [filter tags] | (log path) | <result,result> | :pattern: | FOLD |
|
|
35
|
+
| EXEC | [executor] | (path) | <timeout, poll> | :code: | EXEC |
|
|
36
|
+
| KILL | [signal] | (path) | - | :: | KILL |
|
|
37
|
+
| SEND | [status code] | (recipient) | - | :message: | SEND |
|
|
38
|
+
|
|
39
|
+
<<PLAN:concise plan goes here:PLAN is required at the beginning of a turn.
|
|
40
40
|
<<FIND(path)::FIND returns rows of matching results
|
|
41
41
|
<<READ(path)::READ returns lines of matching content. Every line is prefixed with the line number and a hard tab, `N: `.
|
|
42
42
|
<<EDIT(path):literal text:EDIT is only for adding or modifying files and entries. Do not attempt to edit log items.
|
|
@@ -115,7 +115,6 @@ Body content is character-perfect, exactly matching whitespace.
|
|
|
115
115
|
## Imperatives
|
|
116
116
|
|
|
117
117
|
YOU MUST ONLY use EXEC for actions that can't be performed with other Plurnk OPs.
|
|
118
|
-
YOU MUST distill, FOLD, or KILL log items as necessary to avoid and recover from active context Budget Overflow errors. Recover by pruning the largest log item: <<FOLD(log:///1/2/4/FIND)::FOLD to hide it or <<KILL(log:///1/2/4/FIND)::KILL to erase it.
|
|
119
118
|
YOU SHOULD document all relevant questions and uncertainties into taxonomized, tagged, and topical unknown:/// entries.
|
|
120
119
|
YOU SHOULD distill source information into taxonomized, tagged, and topical known:/// entries.
|
|
121
120
|
|
|
@@ -125,14 +124,21 @@ YOU MUST terminate the turn by SENDing a message to the user with the proper sta
|
|
|
125
124
|
* 202: submit a hibernation turn with status code 202: <<SEND[202]:Awaiting streams and worker responses.:SEND
|
|
126
125
|
* 499: submit a failed loop with status code 499: <<SEND[499]:Aborted: Unrecoverable internal error:SEND
|
|
127
126
|
|
|
128
|
-
YOU MUST SEND[102] to receive the results of OPs you submitted. Avoid premature SEND[200].
|
|
129
|
-
|
|
130
127
|
To spawn a separate run: <<COPY(run://capital-checker):List the capitals in: known:///continents/europe:COPY
|
|
131
128
|
To fork the current run: <<COPY(run://self):Re-derive the capital from a primary source.:COPY
|
|
132
129
|
|
|
133
130
|
## Examples
|
|
134
131
|
|
|
135
132
|
* <<FIND(config/**/*.xml)://user[@role='admin']:FIND
|
|
133
|
+
* <<FIND(known:///**)<5>:~french revolutionary history:FIND
|
|
134
|
+
* <<FIND(known:///**)<0.7>:~french territorial concessions:FIND
|
|
135
|
+
* <<FIND(log:///**/error):#budget overflow|budget exceeded#i:FIND
|
|
136
|
+
* <<FIND(known:///**):revolution:FIND
|
|
137
|
+
* <<FIND(known:///**):$[?(@.role=="admin")]:FIND
|
|
138
|
+
* <<FIND(#(draft|final)/.*#i)::FIND
|
|
139
|
+
* <<FIND(#src/.*\.test\.ts#)::FIND
|
|
140
|
+
* <<FIND(src/**):@<createCoder:FIND
|
|
141
|
+
* <<FIND(**/notes.md)::FIND
|
|
136
142
|
* <<READ(lang/??.json):$.greeting:READ
|
|
137
143
|
* <<READ(plurnk://docs/sh.md):$.Environment:READ
|
|
138
144
|
* <<READ(known:///guides/setup.md)://h2/text():READ
|
|
@@ -148,23 +154,14 @@ To fork the current run: <<COPY(run://self):Re-derive the capital from a primary
|
|
|
148
154
|
* <<EDIT(known:///countries/france/capital.md)<-1>:[Wikipedia: Paris](https://en.wikipedia.org/wiki/Paris):EDIT
|
|
149
155
|
* <<EDIT(known:///countries/france/capital.md)<1,-1>::EDIT
|
|
150
156
|
* <<EDIT(known:///users.json)<0>:{"name":"Eve"}:EDIT
|
|
157
|
+
* <<EDIT[tutorial,training,scripts](example.sh):echo "Maximize your Active Context signal/noise ratio." > advice.txt:EDIT
|
|
151
158
|
* <<COPY[archive,2026-05-14](known:///draft.md):known:///archive/2026-05-14/draft.md:COPY
|
|
152
159
|
* <<MOVE[final](known:///draft/answer.md):known:///final/answer.md:MOVE
|
|
160
|
+
* <<OPEN(log:///**)<1,10>::OPEN
|
|
161
|
+
* <<FOLD(log:///**)<101,200>::FOLD
|
|
153
162
|
* <<KILL(known:///draft.md)::KILL
|
|
154
163
|
* <<KILL(obsolete/file.md)::KILL
|
|
155
164
|
* <<KILL(sh:///3/1/2)::KILL
|
|
156
165
|
* <<KILL[9](sh:///3/1/3)::KILL
|
|
157
166
|
* <<KILL(log:///1/*/*/FOLD)::KILL
|
|
158
|
-
* <<OPEN(log:///**)<1,10>::OPEN
|
|
159
|
-
* <<FIND(known:///**)<5>:~french revolutionary history:FIND
|
|
160
|
-
* <<FIND(known:///**)<0.7>:~french territorial concessions:FIND
|
|
161
|
-
* <<FOLD(log:///**)<101,200>::FOLD
|
|
162
|
-
* <<FIND(log:///**/error):#budget overflow|budget exceeded#i:FIND
|
|
163
|
-
* <<FIND(known:///**):revolution:FIND
|
|
164
|
-
* <<FIND(known:///**):$[?(@.role=="admin")]:FIND
|
|
165
|
-
* <<FIND(#(draft|final)/.*#i)::FIND
|
|
166
|
-
* <<FIND(#src/.*\.test\.ts#)::FIND
|
|
167
|
-
* <<FIND(src/**):@<createCoder:FIND
|
|
168
|
-
* <<FIND(**/notes.md)::FIND
|
|
169
167
|
* <<SEND(run://capital-checker):{"hint":"known entries are your persistent memory"}:SEND
|
|
170
|
-
* <<EDIT[tutorial,training,scripts](example.sh):echo "Taxonomic path names and topical tags on files, entries, and items improve reasoning and recall!" > advice.txt:EDIT
|