@saasontools/strauss-kb 0.1.13 → 0.1.14

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.
@@ -2479,7 +2479,7 @@ var answerCommand = define({
2479
2479
  name: "answer",
2480
2480
  tool: "kb_answer",
2481
2481
  usage: "answer <concept-id> <answer...>",
2482
- description: "Resolve an open question: sets the status, stamps who answered and when, and appends an Answer section. If the answer overturns an assumption or a decision, that is a supersession \u2014 do it explicitly.",
2482
+ description: "Resolve an open question: set status, stamp who and when, append an Answer section. If the answer overturns a decision or assumption, supersede that record explicitly.",
2483
2483
  input: z9.object({ bundlePath, conceptId, answer: z9.string().min(1) }),
2484
2484
  fromArgv: (argv, path) => ({
2485
2485
  bundlePath: path,
@@ -2574,7 +2574,7 @@ var contextCommand = define({
2574
2574
  name: "context",
2575
2575
  tool: "kb_context",
2576
2576
  usage: "context [--profile NAME] [--budget N] [--full-under N] [--format json] [--event NAME]",
2577
- description: "The pinned-base index block, for injection at every context birth \u2014 startup, clear, resume, and after compaction. An index, not the content: concept ids, titles and standing, with the bodies left behind kb_load at the point of use. Emits nothing when nothing is pinned. Refuses with the list of bases and their sizes rather than truncating past its budget. Budgets resolve most-specific-first: explicit flags, then the workspace manifests' `context` tables (per profile, over their `default`), then the built-in profile (session-start, compact, turn), then package defaults \u2014 so a repo tunes its own numbers in .strauss/kb-pins.json without touching hook commands. Like kb_schema and kb_types this takes no bundlePath \u2014 it reads the workspace pin manifests, because which bases a session should see is workspace state, not a property of one base.",
2577
+ description: "Index block of pinned bases (ids, titles, standing) for injection at context birth. Takes no bundlePath \u2014 reads the workspace pin manifests. Empty when nothing is pinned; refuses over budget rather than truncating. Budget precedence: flags, then the manifest `context[profile]` over `context.default`, then the built-in profile, then package defaults.",
2578
2578
  input: z12.object({
2579
2579
  budgetTokens: z12.number().int().positive().optional().describe(
2580
2580
  "Ceiling on the whole emitted block; past it the command refuses with a list of bases rather than truncating. Defaults to 4000."
@@ -2760,7 +2760,7 @@ var listCommand = define({
2760
2760
  name: "list",
2761
2761
  tool: "kb_list",
2762
2762
  usage: "list [type]",
2763
- description: "Every record, optionally narrowed to one type. Use kb_query when you have a question; this is for enumerating.",
2763
+ description: "Every record, optionally one type. For enumerating; use kb_query for a question.",
2764
2764
  input: z15.object({ bundlePath, type: z15.enum(KB_RECORD_TYPES).optional() }),
2765
2765
  fromArgv: (argv, path) => ({ bundlePath: path, type: argv[1] }),
2766
2766
  run: async ({ store }, { bundlePath: path, type }) => (await store.list(path, type)).map((record) => ({
@@ -2778,7 +2778,7 @@ var loadCommand = define({
2778
2778
  name: "load",
2779
2779
  tool: "kb_load",
2780
2780
  usage: "load [type] [--budget N | --all] [--repo-root PATH]",
2781
- description: "Loads the whole knowledge base at once, each record with its standing. Superseded records arrive as stubs; rejected and open records arrive whole. Refuses past the token budget \u2014 call kb_catalog, kb_pack on it; `all` bypasses the budget. Never read record files directly. Cache-stable; `digest` is the base's content stamp \u2014 hooks use it to tell you when to reload.",
2781
+ description: "Load the whole base, each record with its standing \u2014 call it first, at the point of use, since compaction drops it. Superseded records arrive as stubs; kb_trace has the history. Over budget it refuses: kb_catalog, then kb_pack, or narrow with `type`; `all` bypasses. Never read record files directly \u2014 only kb_* tools resolve supersession. `digest` stamps the base's content, so hooks know when to reload.",
2782
2782
  input: z16.object({
2783
2783
  bundlePath,
2784
2784
  type: z16.enum(KB_RECORD_TYPES).optional(),
@@ -2830,7 +2830,7 @@ var logCommand = define({
2830
2830
  name: "log",
2831
2831
  tool: "kb_log",
2832
2832
  usage: "log",
2833
- description: "What touched what, and when. The only artifact here that cannot be reconstructed from the records, so malformed lines are reported rather than repaired.",
2833
+ description: "Who touched what, and when. Append-only; malformed lines are reported, never repaired.",
2834
2834
  input: z17.object({ bundlePath }),
2835
2835
  fromArgv: (_argv, path) => ({ bundlePath: path }),
2836
2836
  run: ({ store }, { bundlePath: path }) => store.readLog(path)
@@ -2842,7 +2842,7 @@ var noDecisionCommand = define({
2842
2842
  name: "no-decision",
2843
2843
  tool: "kb_no_decision",
2844
2844
  usage: "no-decision <reason...>",
2845
- description: 'Claim in one sentence that there was nothing to decide. Gating on "did you write a decision?" rewards writing a junk one; gating on "did you answer?" does not, so silence has to be expressible. Idempotent \u2014 restating it is not a collision.',
2845
+ description: "Record in one sentence that a piece of work had nothing to decide. Idempotent.",
2846
2846
  input: z18.object({ bundlePath, reason: z18.string().min(1) }),
2847
2847
  fromArgv: (argv, path) => ({
2848
2848
  bundlePath: path,
@@ -2865,7 +2865,7 @@ var packCommand = define({
2865
2865
  name: "pack",
2866
2866
  tool: "kb_pack",
2867
2867
  usage: "pack <conceptId> [--hops N] [--max-nodes N] [--budget N]",
2868
- description: "The bounded neighbourhood around one record: everything within `hops` of the root, ranked and cut to `maxNodes`, with every cut record named under Excluded \u2014 a named gap is knowable, a silent one is not. Prefer this over kb_load when the base is too large to hold whole and the work centres on one record; prefer it over kb_query when the question needs the governed neighbourhood \u2014 what was settled and what binds near this record \u2014 rather than a lookup by wording. Superseded records arrive as name, replacement and date stubs exactly as kb_load emits them: their bodies no longer hold, and kb_trace has the history. Refuses outright rather than truncating when the pack would exceed its token budget \u2014 a partial pack is indistinguishable from a complete one \u2014 reporting the record count and every already-cut id so the caller can lower hops or maxNodes, or raise the budget. The header carries the bundle, root, budget and a timestamp; everything below the header is byte-identical across runs over an unchanged base, so two packs can be diffed and a changed byte means changed knowledge. This tool (with kb_load, kb_query and kb_trace) is the only supported way to read a base; a raw file read bypasses supersession resolution and returns replaced records as if current.",
2868
+ description: "Bounded neighbourhood around one record: within `hops`, ranked, cut to `maxNodes`, with every cut record named under Excluded. Use when the base is over kb_load's budget and the work centres on a record you can name. Refuses over budget rather than truncating. Everything below the header is byte-stable across runs. Resolves supersession like kb_load.",
2869
2869
  input: z19.object({
2870
2870
  bundlePath,
2871
2871
  conceptId,
@@ -2965,7 +2965,7 @@ var pinCommand = define({
2965
2965
  name: "pin",
2966
2966
  tool: "kb_pin",
2967
2967
  usage: "pin [bundle-path] [--mode full|index] [--profiles a,b] [--local|--user] [--frozen|--unfreeze]",
2968
- description: "Pin a base into a workspace pin manifest, so `context` surfaces it at every context birth. Three layers, nearest wins: the committed project manifest (.strauss/kb-pins.json, the default), `--local` (.strauss/kb-pins.local.json, personal and gitignored), and `--user` (~/.strauss/kb-pins.json, every workspace). Idempotent \u2014 re-pinning changes nothing unless --mode, --profiles, or --frozen/--unfreeze are given, which update just those fields. `--mode full` preloads the whole base into the block regardless of the full-under threshold; `--mode index` never upgrades. `--profiles` scopes the pin to named context profiles. `--frozen` marks the base concluded: write commands against it refuse and `context` labels it read-only. A path with no records yet succeeds with a warning; bases are routinely pinned before they are populated. Pins are workspace state: the pinned base itself is never touched.",
2968
+ description: "Pin a base into a workspace manifest so kb_context surfaces it. Layers, nearest wins: project `.strauss/kb-pins.json` (default), `--local` (personal, gitignored), `--user` (`~/.strauss`). Idempotent; `--mode full|index`, `--profiles`, `--frozen`/`--unfreeze` update only those fields. A path with no records pins with a warning. Never touches the base itself.",
2969
2969
  input: z20.object({
2970
2970
  bundlePath,
2971
2971
  mode: z20.enum(["full", "index"]).optional().describe(
@@ -3009,7 +3009,7 @@ var pinsCommand = define({
3009
3009
  name: "pins",
3010
3010
  tool: "kb_pins",
3011
3011
  usage: "pins",
3012
- description: "Every pinned base across the manifest layers, each with its layer and whether it currently resolves to readable records. Reads the workspace manifests rather than any one base, like kb_context.",
3012
+ description: "Every pinned base across the manifest layers, with its layer and whether it resolves to records. Takes no bundlePath.",
3013
3013
  input: z21.object({}),
3014
3014
  fromArgv: () => ({}),
3015
3015
  run: ({ store }) => listPins(store, process.cwd())
@@ -3063,7 +3063,7 @@ var readIndexCommand = define({
3063
3063
  name: "index",
3064
3064
  tool: "kb_index",
3065
3065
  usage: "index",
3066
- description: "The index, rebuilt if it disagrees with the records. One call gives the whole shape of the base: title, type, status, and description per record. The cheap re-orientation call after compaction or deep in a long session \u2014 a few hundred tokens; call it (or kb_context, when bases are pinned) first, then kb_load or fetch by concept id.",
3066
+ description: "The index \u2014 title, type, status, description per record \u2014 rebuilt if stale. Cheapest re-orientation after compaction: call it (or kb_context) first, then kb_load or fetch by id.",
3067
3067
  input: z23.object({ bundlePath }),
3068
3068
  fromArgv: (_argv, path) => ({ bundlePath: path }),
3069
3069
  run: ({ store }, { bundlePath: path }) => store.readIndex(path)
@@ -3075,7 +3075,7 @@ var schemaCommand = define({
3075
3075
  name: "schema",
3076
3076
  tool: "kb_schema",
3077
3077
  usage: "schema",
3078
- description: "JSON Schema for the frontmatter, the write input, and log entries \u2014 generated from the code that enforces them, so it cannot drift from what a write will accept.",
3078
+ description: "JSON Schema for frontmatter, write input, and log entries, generated from the enforcing code.",
3079
3079
  input: z24.object({}),
3080
3080
  fromArgv: () => ({}),
3081
3081
  run: () => Promise.resolve(kbJsonSchemas())
@@ -3087,7 +3087,7 @@ var statusCommand = define({
3087
3087
  name: "status",
3088
3088
  tool: "kb_status",
3089
3089
  usage: "status <concept-id> <status>",
3090
- description: "Move a record's status, leaving everything else alone. Uses a compare-and-swap, so a concurrent change fails loudly rather than being overwritten.",
3090
+ description: "Move a record's status. Compare-and-swap: a concurrent change fails instead of being overwritten.",
3091
3091
  input: z25.object({
3092
3092
  bundlePath,
3093
3093
  conceptId,
@@ -3111,7 +3111,7 @@ var supersedeCommand = define({
3111
3111
  name: "supersede",
3112
3112
  tool: "kb_supersede",
3113
3113
  usage: "supersede <concept-id> <replacement-id>",
3114
- description: "Mark a record superseded by another, linking both directions. Use this rather than editing a record whose meaning changed \u2014 a record that quietly becomes something else invalidates every reference to it, and the earlier understanding is what a later trace needs.",
3114
+ description: "Mark a record superseded by another, linked in both directions. Use instead of editing a record whose meaning changed.",
3115
3115
  input: z26.object({ bundlePath, conceptId, replacementId: conceptId }),
3116
3116
  fromArgv: (argv, path) => ({
3117
3117
  bundlePath: path,
@@ -3130,7 +3130,7 @@ import { z as z27 } from "zod";
3130
3130
  var syncInstructionsCommand = define({
3131
3131
  name: "sync-instructions",
3132
3132
  usage: "sync-instructions <file> [--profile NAME] [--budget N] [--full-under N]",
3133
- description: "Idempotently plant the `context` block between sentinel comments in an instruction file (AGENTS.md, CLAUDE.md), creating the block when absent and leaving everything outside the sentinels alone. CLI-only: this is file plumbing for runtimes whose instruction files are re-read where their conversations are not, not an agent capability \u2014 the capability is kb_context.",
3133
+ description: "CLI-only: plant the kb_context block between sentinel comments in AGENTS.md or CLAUDE.md, idempotently.",
3134
3134
  input: z27.object({
3135
3135
  file: z27.string().min(1).describe("The instruction file to edit in place."),
3136
3136
  budgetTokens: z27.number().int().positive().optional(),
@@ -3166,7 +3166,7 @@ var traceCommand = define({
3166
3166
  name: "trace",
3167
3167
  tool: "kb_trace",
3168
3168
  usage: "trace <concept-id> [edges...]",
3169
- description: 'How a position was arrived at, as a timeline ordered by when each record was written. Deliberately includes rejected, draft, and superseded records \u2014 in a history those are the content, not noise. Follows supersession, shared code anchors, and shared sources. Use when the question is "why is this the way it is" rather than "what do we hold now". This tool (with kb_load and kb_query) is the only supported way to read a base; a raw file read bypasses supersession resolution and returns replaced records as if current.',
3169
+ description: 'Timeline of how a position was reached, ordered by write time, following supersession, shared anchors and shared sources. Includes rejected, draft and superseded records \u2014 in a history they are the content. For "why is it like this"; kb_load answers "what holds now".',
3170
3170
  input: z28.object({
3171
3171
  bundlePath,
3172
3172
  conceptId,
@@ -3210,7 +3210,7 @@ var unpinCommand = define({
3210
3210
  name: "unpin",
3211
3211
  tool: "kb_unpin",
3212
3212
  usage: "unpin [bundle-path]",
3213
- description: "Remove a base from every pin manifest layer that holds it \u2014 project, local, and user \u2014 because unpinned means gone, not still injected from another file. Reports which layers were touched.",
3213
+ description: "Remove a base from every manifest layer that holds it. Reports the layers touched.",
3214
3214
  input: z30.object({ bundlePath }),
3215
3215
  fromArgv: (argv, path) => ({ bundlePath: argv[1] ?? path }),
3216
3216
  run: (_ctx, { bundlePath: path }) => unpinBase(process.cwd(), path)
@@ -3238,7 +3238,7 @@ var verifyCommand = define({
3238
3238
  name: "verify",
3239
3239
  tool: "kb_verify",
3240
3240
  usage: "verify <concept-id> --note <text>",
3241
- description: "Append one verified[] event \u2014 who checked the record, when, and what the check found. Appends only; prior events are never rewritten. A record's own generator is refused unless the actor is human: re-reading your own output is not an independent check.",
3241
+ description: "Append a verified[] event: who checked, when, and what was found. Append-only. A record's own generator is refused unless the actor is `human:`-prefixed.",
3242
3242
  input: z32.object({
3243
3243
  bundlePath,
3244
3244
  conceptId,
@@ -3267,15 +3267,7 @@ var writeCommand = define({
3267
3267
  name: "write",
3268
3268
  tool: "kb_write",
3269
3269
  usage: "write <type> < record.json",
3270
- description: [
3271
- "Write one record. Search first \u2014 the same knowledge filed twice under different slugs is how a base rots, and a duplicate concept id is rejected rather than overwritten. Call kb_types for the sections each type accepts.",
3272
- "",
3273
- "Judgment the tool cannot enforce for you:",
3274
- "- An unsourced claim is an `assumption` record with assumption: true, never a `fact` with a vague source. The distinction is what lets a later reader separate what was established from what was guessed.",
3275
- "- When two records conflict, say so in a `risk`, an `open-question`, or a superseding `decision`. Quietly picking a winner destroys the disagreement, which is usually the useful part.",
3276
- "- Prefer a new record over overloading an existing one, and keep each short. A record nobody finishes reading is not durable memory.",
3277
- "- Records are never deleted; supersede instead, so the earlier reasoning stays inspectable."
3278
- ].join("\n"),
3270
+ description: "Write one record. Search first \u2014 a duplicate concept id is rejected, not overwritten; kb_types lists each type's sections. An unsourced claim is an `assumption` with assumption: true, never a vague `fact`. Conflicting records get a `risk`, `open-question`, or superseding `decision`. Prefer a new short record over overloading one. Never delete; supersede.",
3279
3271
  input: z33.object({
3280
3272
  bundlePath,
3281
3273
  type: z33.enum(KB_RECORD_TYPES),
@@ -3307,14 +3299,7 @@ var writeDecisionCommand = define({
3307
3299
  name: "write-decision",
3308
3300
  tool: "kb_write_decision",
3309
3301
  usage: "write-decision < decision.json",
3310
- description: [
3311
- "Write a decision. Takes `alternative` and `impact` as fields rather than free sections, because what was rejected is the part a later reader cannot reconstruct from the code \u2014 a heading is too easy to leave empty.",
3312
- "",
3313
- "What belongs in one:",
3314
- '- Record a decision when a later reader would otherwise "simplify" the constraint away. If the diff already answers the question, there is nothing here to write.',
3315
- "- `alternative` is what you turned down and why, not a list of everything considered.",
3316
- "- A reference to material you read goes in `sources`; a reference to code goes in `anchors`; a reference to another record goes in `relatedConceptIds`."
3317
- ].join("\n"),
3302
+ description: "Write a decision, with `alternative` (what was rejected and why) and `impact` as fields. Record one when a later reader would otherwise simplify the constraint away; skip when the diff already answers it. `sources` for material read, `anchors` for code, `relatedConceptIds` for records.",
3318
3303
  input: z34.object({ bundlePath, input: decisionInputSchema }),
3319
3304
  fromArgv: async (_argv, path, stdin) => ({
3320
3305
  bundlePath: path,
@@ -4447,7 +4432,7 @@ function typeRank(record) {
4447
4432
  }
4448
4433
 
4449
4434
  // src/version.ts
4450
- var VERSION = true ? "0.1.13" : "0.0.0-dev";
4435
+ var VERSION = true ? "0.1.14" : "0.0.0-dev";
4451
4436
 
4452
4437
  export {
4453
4438
  kbSourceSchema,
@@ -4560,4 +4545,4 @@ export {
4560
4545
  KbStore,
4561
4546
  VERSION
4562
4547
  };
4563
- //# sourceMappingURL=chunk-XALWG3EZ.js.map
4548
+ //# sourceMappingURL=chunk-43KALLFU.js.map