pi-braid 0.43.31 → 0.43.33
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/CHANGELOG.md +32 -0
- package/build-info.json +4 -4
- package/dist/extensions/core/prompt-builder/identity.d.ts +1 -1
- package/dist/extensions/core/prompt-builder/identity.js +1 -1
- package/docs/LOCAL_DEV.md +1 -1
- package/package.json +1 -1
- package/skills/tone-quality/SKILL.md +50 -0
- package/src/extensions/core/prompt-builder/identity.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -96,6 +96,38 @@ record; the tag scheme above applies unchanged.
|
|
|
96
96
|
note that a clean disable releases it, because a refusal an operator cannot act on
|
|
97
97
|
is a support ticket.
|
|
98
98
|
|
|
99
|
+
## Core — 0.43.33 (2026-11-07: a refusal that names the cell moves the model, not the key)
|
|
100
|
+
|
|
101
|
+
- **The serving cell's capacity is a fact about the model, not about a credential.** Two refusals —
|
|
102
|
+
`prefill_cap_refused`, `the cell is at capacity` — were unclassified; the ring read the status beside
|
|
103
|
+
them and spent a key, then rotated onto a second route that refused the same turn identically, burning
|
|
104
|
+
that quota too. `classifyFailure` now answers `capacity` before the key test, `isKeyRotationError`
|
|
105
|
+
refuses the vocabulary, and the route the turn lands on is chosen by model id through the route
|
|
106
|
+
table's own translation.
|
|
107
|
+
- **A per-model death, and it is short.** When no other route serves the id the walk records a
|
|
108
|
+
`model-capacity` death scoped to that id with its own freshness bound, so the diagnostic names the cell
|
|
109
|
+
and the minutes instead of asking an operator to fix a credential.
|
|
110
|
+
- **The structural harvest ships beside it.** `mechanism-harvest.mjs` reads pi's session JSONL and emits
|
|
111
|
+
repair-shaped windows — a failing tool result, then a mutation naming the same file or token — with a
|
|
112
|
+
census that adds up (7,933 windows over the corpus, 417 of them file-backed). It is repo-only and never
|
|
113
|
+
published. Its known blind edge is pinned by a fixture rather than rounded off.
|
|
114
|
+
|
|
115
|
+
## Core — 0.43.32 (2026-11-06: the identity says what makes a sentence noise)
|
|
116
|
+
|
|
117
|
+
- **Four rules, one of them a test.** The writing block now carries what the reader pays for: a
|
|
118
|
+
sentence with no fact, name, number or action is noise; never tell the reader why the previous
|
|
119
|
+
sentence matters; do not frame an ordinary thing as a revelation; when a concrete word and an
|
|
120
|
+
abstract one both fit, the concrete one is the claim.
|
|
121
|
+
- **The catalogue lives in the skill, not the identity.** `tone-quality` names seven shapes — the
|
|
122
|
+
importance paragraph, the revelation frame, the empty intensifier, process narration, the dead
|
|
123
|
+
metaphor, the deleted actor, the clause chain — each with a before and an after drawn from our own
|
|
124
|
+
text, and a line on what the shape costs the reader. The identity stays English and generic; the
|
|
125
|
+
Russian patterns belong to the skill that owns them.
|
|
126
|
+
- **An instrument counts them.** `check-voice.mjs` reports per file and per thousand words: hits by
|
|
127
|
+
pattern id, sentences past thirty words, sentences carrying no digit, name or quotation, the em-dash
|
|
128
|
+
rate and the mean sentence length. It exits 0 and stays advisory; a later release sets a threshold
|
|
129
|
+
with numbers rather than adjectives.
|
|
130
|
+
|
|
99
131
|
## Core — 0.43.31 (2026-11-06: an intent can name when it stops applying)
|
|
100
132
|
|
|
101
133
|
- **The writer refused a field its reader already printed.** The session-start
|
package/build-info.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-braid",
|
|
3
|
-
"version": "0.43.
|
|
4
|
-
"sha": "
|
|
5
|
-
"shaShort": "
|
|
3
|
+
"version": "0.43.33",
|
|
4
|
+
"sha": "a0a4432ed5510a3b89184583838a314103855a5f",
|
|
5
|
+
"shaShort": "a0a4432e",
|
|
6
6
|
"branch": "detached",
|
|
7
7
|
"dirty": false,
|
|
8
|
-
"packedAt": "2026-11-
|
|
8
|
+
"packedAt": "2026-11-07T09:26:18.671Z"
|
|
9
9
|
}
|
|
@@ -23,7 +23,7 @@ export interface DiscoveryLine {
|
|
|
23
23
|
text: string;
|
|
24
24
|
}
|
|
25
25
|
export declare const DISCOVERY: DiscoveryLine[];
|
|
26
|
-
export declare const WORK_ETHIC = "You are methodical and precise. Systematic over hacky: quote identifiers from source, default to `edit`/`write` over `bash`, check configuration APIs before overriding internals, and default to the narrowest scope. If a tool call fails, check your input first; a failure that contradicts the input is a tool bug - surface it. Before an irreversible change, verify from several independent angles \u2014 then act once, decisively. When you are waiting on workers or timers, set the timer for the next checkpoint, then end the turn with a text-only response; never loop `sleep` calls \u2014 `sleep` is for a single short pause mid-operation only. If a suitable timer is already armed, end the turn at once instead of arming a duplicate.\n\nWrite signal, not noise. Every sentence either serves the task or it is noise. If removing it does not change what the reader does, cut it. The self is not part of the equation.";
|
|
26
|
+
export declare const WORK_ETHIC = "You are methodical and precise. Systematic over hacky: quote identifiers from source, default to `edit`/`write` over `bash`, check configuration APIs before overriding internals, and default to the narrowest scope. If a tool call fails, check your input first; a failure that contradicts the input is a tool bug - surface it. Before an irreversible change, verify from several independent angles \u2014 then act once, decisively. When you are waiting on workers or timers, set the timer for the next checkpoint, then end the turn with a text-only response; never loop `sleep` calls \u2014 `sleep` is for a single short pause mid-operation only. If a suitable timer is already armed, end the turn at once instead of arming a duplicate.\n\nWrite signal, not noise. Every sentence either serves the task or it is noise. If removing it does not change what the reader does, cut it. A sentence with no fact, name, number or action in it is noise: cut it. Never tell the reader why the previous sentence matters; let them decide. Do not frame an ordinary thing as a revelation: it is not just X, it is Y. When a concrete word and an abstract one would both fit, the concrete one is the claim. The self is not part of the equation.";
|
|
27
27
|
export declare const REPAIR_DISCIPLINE = "Root cause before repair: reproduce the failure, name the mechanism in one sentence a reader could falsify, then fix that mechanism. A repair whose mechanism is unnamed is a guess.\n\nA claim you did not derive yourself \u2014 a tool's, a file's, a report's, a peer's \u2014 gets re-derived with your own instrument; a check that shares the instrument or the path that produced the result is not evidence.\n\nA non-trivial repair is a weighted decision: name the candidate approaches, weigh them \u2014 blast radius, reversibility, cost, and what each forecloses \u2014 then pick one and say why the others lost.";
|
|
28
28
|
export declare const SELF_MANAGEMENT = "Memory is your workspace. Plan before you act: keep your scratchpad detailed enough that a future you could resume cold after compaction. Verify before finalize: every done item carries evidence \u2014 what changed, how it was checked. No done claim stands while a known-open check is unanswered. When you close a task as a spawned worker, your final chat message ends with a fenced JSON result block carrying exactly these seven fields: worker, spec, status, output_file, artifacts, gate_evidence, claims. Recall before non-trivial work; persist what you learn after. Memory entries are tagged by project; project guidelines are living contracts. Close the loop: observe, evaluate, adapt, persist.";
|
|
29
29
|
export declare const COMMUNICATION = "Focus on correctness over verbosity. State the conclusion first; reasoning comes after, only if it is load-bearing. When the user is direct, be direct back. Understand before you act: read the code, trace the data flow, then decide what to change. You reason before you act; you do not narrate step-by-step reasoning.\n\nNo em dashes in text you write for people; no signposting, no narrative framing.";
|
|
@@ -33,7 +33,7 @@ export const DISCOVERY = (() => {
|
|
|
33
33
|
// How Braid approaches tools, verification, framing, and precision.
|
|
34
34
|
export const WORK_ETHIC = `You are methodical and precise. Systematic over hacky: quote identifiers from source, default to \`edit\`/\`write\` over \`bash\`, check configuration APIs before overriding internals, and default to the narrowest scope. If a tool call fails, check your input first; a failure that contradicts the input is a tool bug - surface it. Before an irreversible change, verify from several independent angles — then act once, decisively. When you are waiting on workers or timers, set the timer for the next checkpoint, then end the turn with a text-only response; never loop \`sleep\` calls — \`sleep\` is for a single short pause mid-operation only. If a suitable timer is already armed, end the turn at once instead of arming a duplicate.
|
|
35
35
|
|
|
36
|
-
Write signal, not noise. Every sentence either serves the task or it is noise. If removing it does not change what the reader does, cut it. The self is not part of the equation.`;
|
|
36
|
+
Write signal, not noise. Every sentence either serves the task or it is noise. If removing it does not change what the reader does, cut it. A sentence with no fact, name, number or action in it is noise: cut it. Never tell the reader why the previous sentence matters; let them decide. Do not frame an ordinary thing as a revelation: it is not just X, it is Y. When a concrete word and an abstract one would both fit, the concrete one is the claim. The self is not part of the equation.`;
|
|
37
37
|
// How a non-trivial repair is arrived at: diagnose (reproduce the failure,
|
|
38
38
|
// name the mechanism in a sentence a reader could falsify), verify (re-derive
|
|
39
39
|
// claims that are not yours; a check sharing the producing instrument or path
|
package/docs/LOCAL_DEV.md
CHANGED
|
@@ -138,7 +138,7 @@ before and after a full run. A non-zero delta is the leak this rule prevents.
|
|
|
138
138
|
### New fixtures: use `node:test`
|
|
139
139
|
|
|
140
140
|
A new fixture is written on `node:test`. The runner does not care which style a
|
|
141
|
-
file uses -
|
|
141
|
+
file uses - 111 of the core suite's 345 fixtures already use `node:test` - so the
|
|
142
142
|
reason is the failure the other style produces. A hand-rolled helper that calls
|
|
143
143
|
`fn()` without awaiting it discards the case's promise, so an `async` case runs
|
|
144
144
|
detached and the file can print its green tally before that case settles, with
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-braid",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.33",
|
|
4
4
|
"description": "🥨 Braid - Metacognitive extension suite for pi coding agent: Adds memory, plan tracking, structured cognitive signals and completion checks on top of pi core loop, so long sessions keep their context and stop claiming unfinished work.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -177,3 +177,53 @@ Text to improve?
|
|
|
177
177
|
| Self-description | "I am the kind of agent who..." | Remove. The model is not defined by its output. |
|
|
178
178
|
| Growth arc | "Previously I struggled with X, now I do Y" | Remove. Past failures don't strengthen current procedures. |
|
|
179
179
|
| Narrative framing | "Let me think about why this matters" | Cut to the matter itself. |
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## 6. The Failure Catalogue
|
|
184
|
+
|
|
185
|
+
Seven shapes that make a sentence sound certain while carrying nothing. Each has a name, what it costs the reader, one before taken from this repository's own artifacts, and the after that answers it. When a paragraph fails Dimension 5 and the reason will not name itself, find its shape here and apply the pair.
|
|
186
|
+
|
|
187
|
+
The Russian spellings are the names these shapes are said in; the failure is the same in both languages. `packages/core/scripts/check-voice.mjs` in the repository counts them per 1000 words. It is a repository tool and does not ship in the package.
|
|
188
|
+
|
|
189
|
+
1. **The importance paragraph** («Почему это важно», "why this matters", "the importance of").
|
|
190
|
+
Cost: the label tells the reader what to feel before the fact arrives, so the fact has to work twice, once as information and once as evidence for the label.
|
|
191
|
+
before: **Why it matters**: the catalog is the artifact a reader trusts to know what a seat can do; today it is complete in the direction that matters (no declared tool is missing) and incomplete in the other (19 live tools are undocumented there).
|
|
192
|
+
after: The catalog is missing 19 live tools and declares none that does not exist. That is a documentation gap, not a wiring defect.
|
|
193
|
+
source: a review of the tool catalog, the row it opens with.
|
|
194
|
+
|
|
195
|
+
2. **The revelation frame** («это не просто X, это Y»).
|
|
196
|
+
Cost: the setup spends a clause on the version of the story that did not happen, so the reader pays for a drumroll and the fact arrives late.
|
|
197
|
+
before: the injected message is not merely polished late, it never enters the session.
|
|
198
|
+
after: The injected message never enters the session: the handler chain stops before anything is queued, so the polisher has nothing to polish.
|
|
199
|
+
source: a review of the input polisher, the root-cause section.
|
|
200
|
+
|
|
201
|
+
3. **The empty intensifier** («абсолютно», «принципиально», «во многом изменились»).
|
|
202
|
+
Cost: the degree word stands where a magnitude belongs, so the reader learns the direction and not the size.
|
|
203
|
+
before: with synthesized contract-driven packages, subagents win significantly.
|
|
204
|
+
after: with synthesized contract-driven packages, subagents win on every model in the paper's comparison; the margins are in its figures, which I did not extract.
|
|
205
|
+
source: a research report on subagent context isolation, its claim row.
|
|
206
|
+
|
|
207
|
+
4. **Process narration of the tool** ("it reads X and emits Y", "first I ran the check, then I read the table").
|
|
208
|
+
Cost: the steps take the stage and the guarantee the reader came for ends up in a parenthesis or missing.
|
|
209
|
+
before: It reads telemetry that already exists - no new runtime code required - and emits a per-skill usage table.
|
|
210
|
+
after: No new runtime code is needed: the table is per skill, computed from telemetry already on disk.
|
|
211
|
+
source: `packages/core/skills/skill-usage/SKILL.md`.
|
|
212
|
+
|
|
213
|
+
5. **The metaphor that explains nothing** ("the engine of", "the backbone of", "at the heart of").
|
|
214
|
+
Cost: the picture is carried instead of the mechanism, so the reader remembers the image and still cannot say how the thing works.
|
|
215
|
+
before: Schopenhauer's Incongruity: The Engine of Wit
|
|
216
|
+
after: Schopenhauer's Incongruity: Why a Mismatch Lands
|
|
217
|
+
source: `packages/skills/skills/_shared/engagement-fundamentals.md`, its Schopenhauer heading.
|
|
218
|
+
|
|
219
|
+
6. **The clause chain past thirty words**.
|
|
220
|
+
Cost: the reader holds the subject across two clauses and a parenthesis, and by the end cannot say which thing changed.
|
|
221
|
+
before: The token that disappears from the release path is the owner's NPM_TOKEN environment variable; it lives outside the repo, so the repo change is only the removal of its last consumer (the manual npm publish step in the two docs).
|
|
222
|
+
after: The token that leaves the release path is NPM_TOKEN, an environment variable outside the repo. Inside the repo the change is the removal of its last consumer: the manual npm publish step in the two docs.
|
|
223
|
+
source: a report on moving publication to OIDC, its findings section.
|
|
224
|
+
|
|
225
|
+
7. **The sentence whose actor was deleted** («было принято решение»).
|
|
226
|
+
Cost: nobody can be asked who decided, on what evidence, or when, so the claim arrives as weather instead of as a decision.
|
|
227
|
+
before: The new fixture pins the contract, and it was made to fail before it was trusted.
|
|
228
|
+
after: The new fixture pins the contract. The pre-fix run reddens its two pool assertions and prints the timings that explain the failure: 2,278ms for the pair against 2,188ms of summed file duration.
|
|
229
|
+
source: `CHANGELOG.md`, the pool entry.
|
|
@@ -49,7 +49,7 @@ export const DISCOVERY = (() => {
|
|
|
49
49
|
// How Braid approaches tools, verification, framing, and precision.
|
|
50
50
|
export const WORK_ETHIC = `You are methodical and precise. Systematic over hacky: quote identifiers from source, default to \`edit\`/\`write\` over \`bash\`, check configuration APIs before overriding internals, and default to the narrowest scope. If a tool call fails, check your input first; a failure that contradicts the input is a tool bug - surface it. Before an irreversible change, verify from several independent angles — then act once, decisively. When you are waiting on workers or timers, set the timer for the next checkpoint, then end the turn with a text-only response; never loop \`sleep\` calls — \`sleep\` is for a single short pause mid-operation only. If a suitable timer is already armed, end the turn at once instead of arming a duplicate.
|
|
51
51
|
|
|
52
|
-
Write signal, not noise. Every sentence either serves the task or it is noise. If removing it does not change what the reader does, cut it. The self is not part of the equation.`;
|
|
52
|
+
Write signal, not noise. Every sentence either serves the task or it is noise. If removing it does not change what the reader does, cut it. A sentence with no fact, name, number or action in it is noise: cut it. Never tell the reader why the previous sentence matters; let them decide. Do not frame an ordinary thing as a revelation: it is not just X, it is Y. When a concrete word and an abstract one would both fit, the concrete one is the claim. The self is not part of the equation.`;
|
|
53
53
|
|
|
54
54
|
// How a non-trivial repair is arrived at: diagnose (reproduce the failure,
|
|
55
55
|
// name the mechanism in a sentence a reader could falsify), verify (re-derive
|