pi-braid 0.43.12 → 0.43.16

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 CHANGED
@@ -53,6 +53,28 @@ record; the tag scheme above applies unchanged.
53
53
 
54
54
  ---
55
55
 
56
+ ## Core — 0.43.16 (2026-11-02: a skill stops claiming phrases the reader throws away)
57
+
58
+ - **The trigger caps now fit what authors actually write, and a violation fails loudly.** The reader kept
59
+ 12 phrases per skill and dropped the rest in silence, so three skills were claiming words that could
60
+ never match: `braid-reference` authored 16, `pi-reference` 15, `voice-replies` 13, and
61
+ `subagent-verification` had a 66-character phrase against a 64 cap. A question about `polyfill` or
62
+ `braid install paths` did not reach the skill that advertises it. The caps are 16 and 66, and the
63
+ justification is measured rather than argued: a phrase compiles to one word-bounded substring test over
64
+ the prompt, reaches no prompt, and costs the same at any length — 4.35 µs at 50 characters, 4.34 at 66,
65
+ 4.32 at 98. So the old numbers bounded shape, not hazard, and the shape they bounded was wrong. A new
66
+ fixture reads the authored files itself and fails naming a skill that overflows, because the reader
67
+ cannot answer the question once the cap has already spent the list.
68
+ - **The TypeBox surface is pinned to JSON Schema, so the announced pi-schema swap stays an import edit.**
69
+ A fixture refuses any constructor outside the eight the tree uses, the six features JSON Schema cannot
70
+ carry, and any imported symbol beyond `Type` and a type-only `Static`. The point is timing: the way a
71
+ mechanical swap becomes a rewrite is somebody reaching for `Type.Refine` for a good local reason six
72
+ weeks before the dependency moves.
73
+ - **The skills block is priced the way an agent reads it.** The only gate that priced it measured one
74
+ pack; an agent reads the union. Every pack is now discovered from its manifest, each prices separately,
75
+ and one composition over the union prints the total, with controls proving the number moves when a row
76
+ moves and that the union is never the sum of separate renders.
77
+
56
78
  ## Core — 0.43.12 (2026-11-01: a skill that says it is retired stops being advertised)
57
79
 
58
80
  - **A retired skill no longer competes with its successor.** Four skills in the packs declare
package/build-info.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "pi-braid",
3
- "version": "0.43.12",
4
- "sha": "f6a311a974d34f1d7cc70a491a8f5544e85dd233",
5
- "shaShort": "f6a311a9",
3
+ "version": "0.43.16",
4
+ "sha": "22a4c1c3ef6d7a1f50a6877810d635eabb021ce1",
5
+ "shaShort": "22a4c1c3",
6
6
  "branch": "detached",
7
7
  "dirty": false,
8
- "packedAt": "2026-11-01T08:52:31.302Z"
8
+ "packedAt": "2026-11-02T00:28:28.254Z"
9
9
  }
@@ -36,16 +36,28 @@
36
36
  * same bytes per process, and a status is not worth one.
37
37
  */
38
38
  /**
39
- * Max trigger phrases read per skill — a longer list is an authoring bug, not a
40
- * matcher input. Three authored lists reach the cap: braid-reference (16
41
- * phrases), pi-reference (15), and agent-testing, which fills it exactly (7 in
42
- * the description tail + 5 in the body heading) now that the sources merge.
43
- * The cap assertion lives in test-skill-triggers-body.mjs; raising the number
44
- * means changing it there.
39
+ * Max trigger phrases kept per skill: a budget, spent down the merged list so
40
+ * the lowest-priority source loses first. Past it the reader drops the tail and
41
+ * reports nothing, which is why test-trigger-cap.mjs reads the authored files
42
+ * itself and fails by name: a claim past the cap is a build failure, not a
43
+ * silent loss.
44
+ *
45
+ * It bounds what one file may claim, not what a turn may spend. A phrase costs
46
+ * one word-bounded regex test over the prompt per turn (`triggerMatches`, from
47
+ * the suggestion matcher and the applicability pass) — flat in the phrase,
48
+ * linear in the prompt — so the ceiling is about shape: a list this long is a
49
+ * page of situations, and a longer one is a description in disguise.
50
+ */
51
+ export declare const MAX_TRIGGERS = 16;
52
+ /**
53
+ * Max characters of one trigger phrase. A phrase compiles to a literal,
54
+ * word-bounded substring test: it reaches no prompt and costs the same at any
55
+ * length, so this is a shape bound rather than a hazard bound. A string long
56
+ * enough to be a sentence is a condition, and it matches only a prompt that
57
+ * carries that sentence verbatim. The bound sits above the longest shipped
58
+ * phrase, and test-trigger-cap.mjs fails by name past it.
45
59
  */
46
- export declare const MAX_TRIGGERS = 12;
47
- /** Max characters of one trigger phrase. */
48
- export declare const MAX_TRIGGER_CHARS = 64;
60
+ export declare const MAX_TRIGGER_CHARS = 66;
49
61
  /**
50
62
  * Where an authored phrase came from. Precedence (frontmatter, heading,
51
63
  * description) orders the merged list and decides which source the cap cuts
@@ -38,16 +38,28 @@
38
38
  import { statSync, readFileSync } from "node:fs";
39
39
  import { parseFrontmatter } from "@earendil-works/pi-coding-agent";
40
40
  /**
41
- * Max trigger phrases read per skill — a longer list is an authoring bug, not a
42
- * matcher input. Three authored lists reach the cap: braid-reference (16
43
- * phrases), pi-reference (15), and agent-testing, which fills it exactly (7 in
44
- * the description tail + 5 in the body heading) now that the sources merge.
45
- * The cap assertion lives in test-skill-triggers-body.mjs; raising the number
46
- * means changing it there.
41
+ * Max trigger phrases kept per skill: a budget, spent down the merged list so
42
+ * the lowest-priority source loses first. Past it the reader drops the tail and
43
+ * reports nothing, which is why test-trigger-cap.mjs reads the authored files
44
+ * itself and fails by name: a claim past the cap is a build failure, not a
45
+ * silent loss.
46
+ *
47
+ * It bounds what one file may claim, not what a turn may spend. A phrase costs
48
+ * one word-bounded regex test over the prompt per turn (`triggerMatches`, from
49
+ * the suggestion matcher and the applicability pass) — flat in the phrase,
50
+ * linear in the prompt — so the ceiling is about shape: a list this long is a
51
+ * page of situations, and a longer one is a description in disguise.
52
+ */
53
+ export const MAX_TRIGGERS = 16;
54
+ /**
55
+ * Max characters of one trigger phrase. A phrase compiles to a literal,
56
+ * word-bounded substring test: it reaches no prompt and costs the same at any
57
+ * length, so this is a shape bound rather than a hazard bound. A string long
58
+ * enough to be a sentence is a condition, and it matches only a prompt that
59
+ * carries that sentence verbatim. The bound sits above the longest shipped
60
+ * phrase, and test-trigger-cap.mjs fails by name past it.
47
61
  */
48
- export const MAX_TRIGGERS = 12;
49
- /** Max characters of one trigger phrase. */
50
- export const MAX_TRIGGER_CHARS = 64;
62
+ export const MAX_TRIGGER_CHARS = 66;
51
63
  const cache = new Map();
52
64
  /** Compiled word-boundary matchers, memoized per normalized phrase. */
53
65
  const regexCache = new Map();
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 - 98 of the core suite's 333 fixtures already use `node:test` - so the
141
+ file uses - 100 of the core suite's 335 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.12",
3
+ "version": "0.43.16",
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",
@@ -40,17 +40,29 @@ import { statSync, readFileSync } from "node:fs";
40
40
  import { parseFrontmatter } from "@earendil-works/pi-coding-agent";
41
41
 
42
42
  /**
43
- * Max trigger phrases read per skill — a longer list is an authoring bug, not a
44
- * matcher input. Three authored lists reach the cap: braid-reference (16
45
- * phrases), pi-reference (15), and agent-testing, which fills it exactly (7 in
46
- * the description tail + 5 in the body heading) now that the sources merge.
47
- * The cap assertion lives in test-skill-triggers-body.mjs; raising the number
48
- * means changing it there.
43
+ * Max trigger phrases kept per skill: a budget, spent down the merged list so
44
+ * the lowest-priority source loses first. Past it the reader drops the tail and
45
+ * reports nothing, which is why test-trigger-cap.mjs reads the authored files
46
+ * itself and fails by name: a claim past the cap is a build failure, not a
47
+ * silent loss.
48
+ *
49
+ * It bounds what one file may claim, not what a turn may spend. A phrase costs
50
+ * one word-bounded regex test over the prompt per turn (`triggerMatches`, from
51
+ * the suggestion matcher and the applicability pass) — flat in the phrase,
52
+ * linear in the prompt — so the ceiling is about shape: a list this long is a
53
+ * page of situations, and a longer one is a description in disguise.
49
54
  */
50
- export const MAX_TRIGGERS = 12;
55
+ export const MAX_TRIGGERS = 16;
51
56
 
52
- /** Max characters of one trigger phrase. */
53
- export const MAX_TRIGGER_CHARS = 64;
57
+ /**
58
+ * Max characters of one trigger phrase. A phrase compiles to a literal,
59
+ * word-bounded substring test: it reaches no prompt and costs the same at any
60
+ * length, so this is a shape bound rather than a hazard bound. A string long
61
+ * enough to be a sentence is a condition, and it matches only a prompt that
62
+ * carries that sentence verbatim. The bound sits above the longest shipped
63
+ * phrase, and test-trigger-cap.mjs fails by name past it.
64
+ */
65
+ export const MAX_TRIGGER_CHARS = 66;
54
66
 
55
67
  /**
56
68
  * Where an authored phrase came from. Precedence (frontmatter, heading,