@sleepy_panda_srl/portulan 0.3.0 → 0.4.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/README.md +15 -4
- package/cli/README.md +55 -3
- package/cli/advisory.mjs +167 -53
- package/cli/cache-risk.mjs +69 -0
- package/cli/comments.mjs +8 -5
- package/cli/compile.mjs +492 -146
- package/cli/context.mjs +204 -43
- package/cli/doctor.mjs +211 -33
- package/cli/drills.mjs +32 -7
- package/cli/finish.md +34 -0
- package/cli/finish.mjs +8 -67
- package/cli/form.mjs +34 -18
- package/cli/frontmatter.mjs +39 -0
- package/cli/gate.mjs +14 -12
- package/cli/guidance-files.mjs +335 -0
- package/cli/handoff-policy.mjs +76 -0
- package/cli/html-entities.mjs +2130 -0
- package/cli/import-files.mjs +15 -0
- package/cli/index.mjs +77 -24
- package/cli/init-preview.mjs +553 -0
- package/cli/init.mjs +261 -46
- package/cli/instructions-journal.mjs +1185 -0
- package/cli/instructions.mjs +332 -57
- package/cli/ledger.mjs +123 -37
- package/cli/librarian.mjs +103 -19
- package/cli/persona-routing.mjs +209 -0
- package/cli/plugin-lint.mjs +77 -56
- package/cli/recipe-output.mjs +91 -0
- package/cli/recipe-runner.md +68 -0
- package/cli/recipe-runner.mjs +131 -0
- package/cli/recipe-set.mjs +12 -3
- package/cli/ritual-contexts.mjs +103 -0
- package/cli/sessions.mjs +2 -1
- package/cli/spend-analysis.mjs +111 -0
- package/cli/spend-offer.md +53 -0
- package/cli/spend-offer.mjs +93 -0
- package/cli/stop-diagnostics.mjs +114 -0
- package/cli/stop-gate.mjs +133 -90
- package/cli/stop-policy.mjs +14 -0
- package/cli/symbols.mjs +55 -8
- package/cli/telemetry.mjs +19 -12
- package/cli/upgrade.mjs +62 -44
- package/cli/vendor.mjs +207 -125
- package/core/operating/context.md +368 -60
- package/core/operating/evolution.md +3 -2
- package/core/operating/loop.md +9 -4
- package/core/operating/sessions.md +6 -15
- package/core/personas/README.md +52 -10
- package/core/personas/implementer.md +3 -0
- package/core/personas/librarian.md +3 -0
- package/core/personas/reviewer.md +3 -0
- package/core/templates/handoff.md +6 -2
- package/evals/ab/personas/README.md +111 -0
- package/evals/ab/personas/acquisition.json +330 -0
- package/evals/ab/personas/bindings/implementer.txt +43 -0
- package/evals/ab/personas/bindings/librarian.txt +40 -0
- package/evals/ab/personas/bindings/reviewer.txt +41 -0
- package/evals/ab/personas/corpus.json +69 -0
- package/evals/ab/personas/grader.mjs +171 -0
- package/evals/ab/personas/implementer.json +774 -0
- package/evals/ab/personas/implementer.md +22 -0
- package/evals/ab/personas/librarian.json +758 -0
- package/evals/ab/personas/librarian.md +22 -0
- package/evals/ab/personas/protocol/continuation.mjs.txt +284 -0
- package/evals/ab/personas/protocol/first-outcome.mjs.txt +227 -0
- package/evals/ab/personas/protocol/first-probe.mjs.txt +172 -0
- package/evals/ab/personas/protocol/publisher.mjs.txt +126 -0
- package/evals/ab/personas/protocol/second-probe.mjs.txt +193 -0
- package/evals/ab/personas/repairs/first-control-answer.txt +23 -0
- package/evals/ab/personas/repairs/grader-before-decode-repair.mjs.txt +143 -0
- package/evals/ab/personas/reviewer.json +758 -0
- package/evals/ab/personas/reviewer.md +22 -0
- package/evals/releases/0.4.0.json +154 -0
- package/evals/releases/0.4.0.md +69 -0
- package/package.json +6 -2
- package/packs/rituals/checkpoints/README.md +35 -0
- package/packs/rituals/checkpoints/pack.json +3 -2
- package/packs/tools/local-llm/README.md +46 -6
- package/packs/tools/local-llm/runner/local-llm.mjs +127 -13
- package/packs/tools/local-llm/skills/delegate-local/SKILL.md +26 -2
- package/spec/README.md +37 -4
- package/spec/migrations/0009-instruction-sections-on-read.mjs +60 -11
- package/spec/migrations/0011-persona-bindings-compiled.mjs +23 -0
- package/spec/migrations/README.md +6 -0
- package/spec/pack.schema.json +12 -3
- package/spec/slots.md +262 -117
- package/spec/workspace.schema.json +67 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://portulan.dev/spec/2.
|
|
4
|
-
"title": "Portulan Workspace Definition v2.
|
|
3
|
+
"$id": "https://portulan.dev/spec/2.16/workspace.schema.json",
|
|
4
|
+
"title": "Portulan Workspace Definition v2.16",
|
|
5
5
|
"description": "The manifest at the root of a workspace. It is an index, not a container: it names the slots the engine resolves against and points at the Markdown that holds each slot's content and rationale. Written in a deliberately small subset of JSON Schema 2020-12 — see spec/README.md for the subset and for what validates it.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
@@ -145,6 +145,10 @@
|
|
|
145
145
|
"description": "The `id` of the recipe the Stop-gate runs when nothing more specific applies. Constrained to the same shape as an id, so a value no recipe could ever carry is rejected by the schema rather than only by `doctor`.",
|
|
146
146
|
"$ref": "#/$defs/slug"
|
|
147
147
|
},
|
|
148
|
+
"stopTimeout": {
|
|
149
|
+
"description": "Optional, added in 2.14. Stop recipe deadline in seconds; undeclared, 90. A positive integer whose recipe and outer hook timers fit Node's timer range, checked by doctor and every reader. Compile gives the Stop hook sixty additional seconds for other checks and cleanup.",
|
|
150
|
+
"type": "number"
|
|
151
|
+
},
|
|
148
152
|
"recipes": {
|
|
149
153
|
"type": "array",
|
|
150
154
|
"minItems": 1,
|
|
@@ -247,20 +251,65 @@
|
|
|
247
251
|
},
|
|
248
252
|
|
|
249
253
|
"handoffs": {
|
|
250
|
-
"description": "Optional
|
|
254
|
+
"description": "Optional. Configuration over slots.handoffs. Since 2.15 an individual new handoff may have a token cap and the generated index may carry a token-budgeted window. The append-only series has no aggregate budget. Proposal 0037 supplies the rule and repair boundary.",
|
|
251
255
|
"type": "object",
|
|
252
256
|
"additionalProperties": false,
|
|
253
|
-
"required": [
|
|
257
|
+
"required": [
|
|
258
|
+
"index"
|
|
259
|
+
],
|
|
254
260
|
"properties": {
|
|
255
261
|
"index": {
|
|
256
|
-
"description": "Required whenever
|
|
262
|
+
"description": "Required whenever handoffs is present. The derived newest-first index lives outside slots.handoffs. A kept copy is byte-compared; absent means render on demand. An optional token budget selects a contiguous newest-first window, preserving every source handoff.",
|
|
257
263
|
"type": "object",
|
|
258
264
|
"additionalProperties": false,
|
|
259
|
-
"required": [
|
|
265
|
+
"required": [
|
|
266
|
+
"path"
|
|
267
|
+
],
|
|
260
268
|
"properties": {
|
|
261
269
|
"path": {
|
|
262
270
|
"description": "Where the generated index is written, relative to the workspace root.",
|
|
263
271
|
"$ref": "#/$defs/filePath"
|
|
272
|
+
},
|
|
273
|
+
"budget": {
|
|
274
|
+
"type": "object",
|
|
275
|
+
"additionalProperties": false,
|
|
276
|
+
"required": [
|
|
277
|
+
"tokens"
|
|
278
|
+
],
|
|
279
|
+
"properties": {
|
|
280
|
+
"tokens": {
|
|
281
|
+
"type": "number",
|
|
282
|
+
"description": "Added in 2.15. Positive integer, explicitly declared, measured at context.ratio. The entire index, header and omission notice included, must fit. Too small for overhead is refused with the minimum required budget."
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"series": {
|
|
289
|
+
"type": "object",
|
|
290
|
+
"additionalProperties": false,
|
|
291
|
+
"required": [
|
|
292
|
+
"budget"
|
|
293
|
+
],
|
|
294
|
+
"properties": {
|
|
295
|
+
"budget": {
|
|
296
|
+
"type": "object",
|
|
297
|
+
"additionalProperties": false,
|
|
298
|
+
"required": [
|
|
299
|
+
"record_tokens",
|
|
300
|
+
"cutoff"
|
|
301
|
+
],
|
|
302
|
+
"properties": {
|
|
303
|
+
"record_tokens": {
|
|
304
|
+
"type": "number",
|
|
305
|
+
"description": "Added in 2.15. Positive integer token cap on each handoff dated strictly after cutoff, at the explicit context.ratio. Compression or moving facts to their owning records repairs a breach; never splitting or deleting history."
|
|
306
|
+
},
|
|
307
|
+
"cutoff": {
|
|
308
|
+
"type": "string",
|
|
309
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
|
|
310
|
+
"description": "Required real YYYY-MM-DD day. Set to the declaring change date or newest merged handoff date, whichever is later. The cutoff day stays unbound. Moves only with a tighter cap or lower ratio, never backward; review holds those history-dependent rules."
|
|
311
|
+
}
|
|
312
|
+
}
|
|
264
313
|
}
|
|
265
314
|
}
|
|
266
315
|
}
|
|
@@ -341,17 +390,17 @@
|
|
|
341
390
|
}
|
|
342
391
|
},
|
|
343
392
|
"ratio": {
|
|
344
|
-
"description": "How bytes become tokens.
|
|
393
|
+
"description": "How bytes become tokens. Manually declared for a compile host rather than recalibrated on every run. The on-demand provider counter returns an estimate of the measured project corpus, including API framing, not actual host usage; the maintainer accepted this limit for #506 on 2026-11-09. No verify recipe may invoke the network mode.",
|
|
345
394
|
"type": "object",
|
|
346
395
|
"additionalProperties": false,
|
|
347
396
|
"required": ["bytes_per_token", "calibrated_by"],
|
|
348
397
|
"properties": {
|
|
349
398
|
"bytes_per_token": {
|
|
350
|
-
"description": "
|
|
399
|
+
"description": "Manually assessed bytes per token for the host's measured domain. At least 1, guarding against inverted units; doctor refuses a smaller declaration because the subset has no minimum. A tiny corpus counted with API framing can yield an effective ratio below this floor, which the provider report labels not declarable.",
|
|
351
400
|
"type": "number"
|
|
352
401
|
},
|
|
353
402
|
"calibrated_by": {
|
|
354
|
-
"description": "The host whose
|
|
403
|
+
"description": "The compile host whose measurement domain the manually declared ratio describes, by its compile ID. Provider/model attribution stays in the count report; it is not a new compile host. Doctor checks a non-empty string, not the calibration's provenance. The commit that changes the ratio dates it.",
|
|
355
404
|
"$ref": "#/$defs/slug"
|
|
356
405
|
}
|
|
357
406
|
}
|
|
@@ -395,7 +444,7 @@
|
|
|
395
444
|
}
|
|
396
445
|
},
|
|
397
446
|
"spend": {
|
|
398
|
-
"description": "Optional, added in 2.12. The multipliers and the horizon the restart threshold is computed at, `F × (1 + m_w / (n × m_r))` in proposal 0038's arithmetic, from its ruling 2: the manifest declares the multipliers, as `context.ratio` declares bytes per token, so a team's contracted rates and its host's real prices are one declared value. Nothing is defaulted in the manifest: undeclared, `cli/ledger.mjs` and the restart advisory use the general multipliers, a cache read at a tenth of an uncached input token and a write at 1.25× for five minutes or 2× for an hour, and the 20-request horizon of ruling 3, and say `undeclared`. Declared, `compile` writes the figures onto the advisory's commands, and `cli/ledger.mjs --workspace` reads them. `restart`, added in 2.13, says what a crossed threshold does. The subset has neither `minimum` nor `maximum`, so every range below is `doctor`'s.",
|
|
447
|
+
"description": "Optional, added in 2.12. The multipliers and the horizon the restart threshold is computed at, `F × (1 + m_w / (n × m_r))` in proposal 0038's arithmetic, from its ruling 2: the manifest declares the multipliers, as `context.ratio` declares bytes per token, so a team's contracted rates and its host's real prices are one declared value. Nothing is defaulted in the manifest: undeclared, `cli/ledger.mjs` and the restart advisory use the general multipliers, a cache read at a tenth of an uncached input token and a write at 1.25× for five minutes or 2× for an hour, and the 20-request horizon of ruling 3, and say `undeclared`. Declared, `compile` writes the figures onto the advisory's commands, and `cli/ledger.mjs --workspace` reads them. `restart`, added in 2.13, says what a crossed threshold does. `resume.tokens`, added in 2.16, prices additional restart expense; the threshold gains resume / (horizon × read). Unknown resume expense makes the comparison a lower bound and never holds a Stop. The subset has neither `minimum` nor `maximum`, so every range below is `doctor`'s.",
|
|
399
448
|
"type": "object",
|
|
400
449
|
"additionalProperties": false,
|
|
401
450
|
"properties": {
|
|
@@ -439,8 +488,15 @@
|
|
|
439
488
|
}
|
|
440
489
|
}
|
|
441
490
|
},
|
|
491
|
+
"resume": {
|
|
492
|
+
"description": "Optional, added in 2.16. Additional restart expense in uncached-input-token equivalents, excluding the fresh-context write and baseline reads already priced. Include handoff output, boot/state recovery and additional rereads over the horizon. These are weighted cost units: 2,000 output tokens at 5x contribute 10,000 equivalents. Absent means unknown; explicit zero is priced. Doctor checks the finite nonnegative bound.",
|
|
493
|
+
"type": "object",
|
|
494
|
+
"additionalProperties": false,
|
|
495
|
+
"required": ["tokens"],
|
|
496
|
+
"properties": { "tokens": { "type": "number" } }
|
|
497
|
+
},
|
|
442
498
|
"restart": {
|
|
443
|
-
"description": "Optional, added in 2.13. What a crossed restart threshold does: `advise`, what an undeclared workspace gets, says the advisory's line once with a tool result or at a prompt; `block` also holds a turn's end once,
|
|
499
|
+
"description": "Optional, added in 2.13. What a crossed restart threshold does: `advise`, what an undeclared workspace gets, says the advisory's line once with a tool result or at a prompt; `block` also holds a turn's end once, only with an explicit horizon and resume expense and finite strictly positive estimated savings at a stop that no block provoked, with the same line as the reason, compiled as a second `Stop` command beside the Stop-gate's. Nothing ends the session either way. Proposal 0038's ruling 3: a report by default, a rail by declaration.",
|
|
444
500
|
"type": "string",
|
|
445
501
|
"enum": ["advise", "block"]
|
|
446
502
|
}
|