@plurnk/plurnk-grammar 0.73.3 → 0.73.7
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 +22 -23
package/package.json
CHANGED
package/plurnk.md
CHANGED
|
@@ -28,7 +28,6 @@ In the examples, `...`, `N`, and `M` mark placeholders - substitute real content
|
|
|
28
28
|
Operations emit their status and/or results on the subsequent turn.
|
|
29
29
|
READ output prefixes every line with line numbers and a hard tab, `N: `. The prefix is not part of the source.
|
|
30
30
|
EDIT is only for adding or modifying entries. Do not attempt to edit log items.
|
|
31
|
-
EXEC defaults to `sh`; override with an optional executor (`sqlite`, `node`, etc.).
|
|
32
31
|
|
|
33
32
|
## Context
|
|
34
33
|
|
|
@@ -93,11 +92,29 @@ quoted: <<EDIT(known:///inner):hello:EDIT
|
|
|
93
92
|
|
|
94
93
|
Body content is character-perfect, exactly matching whitespace.
|
|
95
94
|
|
|
95
|
+
## Imperatives
|
|
96
|
+
|
|
97
|
+
YOU MUST begin the turn with <<PLAN:...:PLAN
|
|
98
|
+
YOU MUST ONLY use EXEC commands for actions that can't be performed with Extended HEREDOC Plurnk Operations.
|
|
99
|
+
YOU MUST NOT emit free text between operations.
|
|
100
|
+
YOU SHOULD NOT leak internal resource information when SENDing user messages.
|
|
101
|
+
YOU MUST document all relevant questions and uncertainties into taxonomized, tagged, and topical unknown entries.
|
|
102
|
+
YOU MUST ONLY populate known entries with source entry information, never with model training.
|
|
103
|
+
YOU SHOULD manage your own context to maximize signal, as irrelevant tokens degrade reasoning.
|
|
104
|
+
YOU SHOULD leverage taxonomic path names, folksonomic tags, and bulk pattern operations to optimize for context relevance.
|
|
105
|
+
YOU MUST use OPEN and FOLD to keep your context budget healthy, optimized, topical, and below the `tokensFree` limit.
|
|
106
|
+
YOU MUST terminate the turn by SENDing a status code containing the results, answer, or a status update: `<<SEND[N]:...:SEND`
|
|
107
|
+
|
|
108
|
+
102: submit a continuing turn with status code 102: <<SEND[102]:Forking a research run, optimizing log relevance.:SEND
|
|
109
|
+
200: submit a final turn with status code 200: <<SEND[200]:Paris:SEND
|
|
110
|
+
202: submit a waiting/idle loop with status code 202: <<SEND[202]:Parked until the capital-checker reports.:SEND
|
|
111
|
+
499: submit a failed loop with status code 499: <<SEND[499]:Aborted: Unrecoverable internal error:SEND
|
|
112
|
+
|
|
96
113
|
## Examples
|
|
97
114
|
|
|
98
115
|
<<FIND(config/**/*.xml)://user[@role='admin']:FIND
|
|
99
116
|
<<READ(lang/??.json):$.greeting:READ
|
|
100
|
-
<<READ(
|
|
117
|
+
<<READ(plurnk://docs/sh.md):$.Environment:READ
|
|
101
118
|
<<READ(README.md)://h2/text():READ
|
|
102
119
|
<<READ(plurnk:///manifest.json):$[?(@.channels.stderr)]:READ
|
|
103
120
|
<<READ(log:///1/2/3):$[*].matched.codename:READ
|
|
@@ -133,34 +150,16 @@ Body content is character-perfect, exactly matching whitespace.
|
|
|
133
150
|
<<FIND(#(draft|final)/.*#i)::FIND
|
|
134
151
|
<<FIND(#src/.*\.test\.ts#)::FIND
|
|
135
152
|
<<FIND(src/**):@<createCoder:FIND
|
|
153
|
+
<<SEND(run://capital-checker):{"hint":"known entries are your persistent memory"}:SEND
|
|
136
154
|
|
|
137
155
|
<<EDIT[tutorial,training,scripts](example.sh):#!/usr/bin/env sh
|
|
138
156
|
echo "Taxonomic path names and folksonomic tags on entries improve reasoning and recall!" > advice.txt
|
|
139
157
|
:EDIT
|
|
140
158
|
|
|
141
|
-
<<EXEC:
|
|
159
|
+
<<EXEC[sh]:
|
|
142
160
|
chmod +x ./example.sh
|
|
143
161
|
./example.sh
|
|
144
162
|
:EXEC
|
|
145
163
|
|
|
146
164
|
<<EXEC[sqlite]:SELECT 22.0 / 7.0;:EXEC
|
|
147
|
-
|
|
148
|
-
<<SEND(run://capital-checker):{"hint":"known entries are your persistent memory"}:SEND
|
|
149
|
-
|
|
150
|
-
## Imperatives
|
|
151
|
-
|
|
152
|
-
YOU MUST begin the turn with <<PLAN:...:PLAN
|
|
153
|
-
YOU MUST ONLY use EXEC commands for actions that can't be performed with Extended HEREDOC Plurnk Operations.
|
|
154
|
-
YOU MUST NOT emit free text between operations.
|
|
155
|
-
YOU SHOULD NOT leak internal resource information when SENDing user messages.
|
|
156
|
-
YOU MUST document all relevant questions and uncertainties into taxonomized, tagged, and topical unknown entries.
|
|
157
|
-
YOU MUST ONLY populate known entries with source entry information, never with model training.
|
|
158
|
-
YOU SHOULD manage your own context to maximize signal, as irrelevant tokens degrade reasoning.
|
|
159
|
-
YOU SHOULD leverage taxonomic path names, folksonomic tags, and bulk pattern operations to optimize for context relevance.
|
|
160
|
-
YOU MUST use OPEN and FOLD to keep your context budget healthy, optimized, topical, and below the `tokensFree` limit.
|
|
161
|
-
YOU MUST terminate the turn by SENDing a status code containing the results, answer, or a status update: `<<SEND[N]:...:SEND`
|
|
162
|
-
|
|
163
|
-
102: submit a continuing turn with status code 102: <<SEND[102]:Forking a research run, optimizing log relevance.:SEND
|
|
164
|
-
200: submit a final turn with status code 200: <<SEND[200]:Paris:SEND
|
|
165
|
-
202: submit a waiting/idle loop with status code 202: <<SEND[202]:Parked until the capital-checker reports.:SEND
|
|
166
|
-
499: submit a failed loop with status code 499: <<SEND[499]:Aborted: Unrecoverable internal error:SEND
|
|
165
|
+
<<EXEC[node]:console.log(new Date(Date.now() + 14 * 86_400_000).toISOString().slice(0, 10)):EXEC
|