@lawaty/lacode 1.0.3 → 1.2.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/dist/commands.js CHANGED
@@ -38,7 +38,6 @@ var MAX_CLAIM_AGE_MS = 30 * 60 * 1e3;
38
38
  var HANG_COOLDOWN_MS = 10 * 60 * 1e3;
39
39
  var UNAVAILABLE_COOLDOWN_MS = 60 * 1e3;
40
40
  var MAX_WEIGHT = 100;
41
- var MAX_SLOTS = 4;
42
41
  var COOLDOWN_BASE_MS = 60 * 1e3;
43
42
  var COOLDOWN_MAX_MS = 15 * 60 * 1e3;
44
43
  var QUOTA_COOLDOWN_BASE_MS = 15 * 60 * 1e3;
@@ -67,11 +66,14 @@ your system prompt.
67
66
  Otherwise follow the bootstrap procedure in your system prompt: progressive
68
67
  exploration (README \u2192 existing docs \u2192 manifests \u2192 top-level structure \u2192 build
69
68
  and framework config \u2192 entry points \u2192 selective source), then write the five
70
- context files inside their size targets. Also create
71
- \`.opencode/context/active.md\` with its heading and no tasks.
69
+ context files inside their line budgets, using the entry schema (provenance
70
+ marker, rule of at most three lines, \`\u2014 See <path>[ \xA7Section] (verified
71
+ YYYY-MM-DD)\`). Also create \`.opencode/context/active.md\` with its heading and no
72
+ tasks.
72
73
 
73
- Remember: write conclusions, not inventories. Link to the project's existing
74
- documentation instead of duplicating it.
74
+ Remember: write conclusions, not inventories. Point at the project's existing
75
+ documentation instead of restating it. Run the drift pass and report a
76
+ contradiction rather than silently choosing a side.
75
77
 
76
78
  Report what you created or updated, what you deliberately left out, and
77
79
  anything that contradicts the code or existing docs.`
@@ -97,7 +99,11 @@ or an invariant not yet recorded.
97
99
 
98
100
  Do not edit documentation just because source files changed. No
99
101
  timestamp-only edits. If nothing material changed, make no edits and report
100
- "no update needed".`
102
+ "no update needed".
103
+
104
+ Every new or changed entry uses the schema in your system prompt and stays
105
+ under the file's line budget. If a file is already over budget, consolidate
106
+ before adding.`
101
107
  },
102
108
  "context-review": {
103
109
  description: "Audit .opencode/context/ for staleness, contradictions, excess size, duplication, and missing entry points.",
@@ -105,20 +111,29 @@ timestamp-only edits. If nothing material changed, make no edits and report
105
111
  subtask: true,
106
112
  template: `Context review.
107
113
 
108
- Everything outside \`.opencode/context/\` is read-only for this run. Do not
109
- modify source code under any circumstances.
114
+ Follow the review procedure and entry schema in your system prompt. Everything
115
+ outside \`.opencode/context/\` is read-only for this run. Do not modify source
116
+ code under any circumstances.
110
117
 
111
118
  Audit the context files and the backlog for:
112
119
 
113
- - stale information \u2014 verify claims against the actual code
114
- - contradictions between context files, or between the map and the code
115
- - excessive size \u2014 consolidate toward the per-file targets in your system
116
- prompt
120
+ - schema \u2014 every entry has one provenance marker, at most three lines, a
121
+ pointer, and a \`(verified YYYY-MM-DD)\` date
122
+ - budget \u2014 every file is within its non-blank-line cap; consolidate rather
123
+ than exceed it
124
+ - stale information \u2014 verify claims against the actual code and the cited page
125
+ - contradictions between context files, or between the map and a page \u2014 mark
126
+ \`[disputed]\` and report both sides; never silently prefer one
127
+ - dangling pointers \u2014 every cited path and \xA7section must exist
128
+ - unarchived content \u2014 an entry with no source in the tree; report it and keep
129
+ it, because it may be the only copy
130
+ - restatement \u2014 a table, a fenced block, or a long verbatim span copied from a
131
+ page
117
132
  - duplicated information \u2014 one canonical place per fact; link to the
118
133
  project's own docs rather than restating them
119
134
  - missing canonical entry points for significant subsystems
120
- - unsupported assumptions \u2014 anything stated as fact that you cannot verify,
121
- or that lacks a confidence marker
135
+ - unsupported assumptions \u2014 anything that is not \`[binding]\` or \`[disputed]\`
136
+ should be \`[provisional]\`
122
137
  - backlog tasks that are finished but carry no date \u2014 the retention window
123
138
  cannot age those out, so they stay forever
124
139
 
@@ -142,7 +157,7 @@ Follow the rules for the file in your system prompt, then report what you change
142
157
  Print one PASS/FAIL line per check below, with the exact fix for any FAIL.
143
158
 
144
159
  1. Pool status \u2014 call the \`pool_status\` tool. Report the slot list, each
145
- slot's load against its ceiling (twice the slot's weight), and which models
160
+ slot's load against its budget (its weight), and which models
146
161
  are cooling.
147
162
 
148
163
  2. OmniRoute configured \u2014 inspect the \`@lawaty/lacode\` plugin options in the
@@ -179,10 +194,10 @@ The pool is ONE global slot table shared by every pooled base (explore, implemen
179
194
 
180
195
  2. Resolve the instruction above into a target slot table. These are the rules the loader enforces \u2014 never write a file that breaks one:
181
196
  - one slot per line: \`<provider>/<model-id> [weight]\`
182
- - at most ${MAX_SLOTS} slots, and a model may appear only once
183
- - weight is optional (default 1) and must be a number in (0, ${MAX_WEIGHT}]. It is the slot's active-session budget for one pass \u2014 how many turns it takes per cycle \u2014 and its concurrency ceiling is twice that. NOT a priority; pick order follows line order.
197
+ - any number of slots; a model may appear on more than one line, and each line is its own slot with its own budget
198
+ - weight is optional (default 1) and must be a number in (0, ${MAX_WEIGHT}]. It is the slot's active-session budget \u2014 how many concurrent sessions it may hold. The pool's total capacity is the sum of the weights. NOT a priority; pick order follows line order.
184
199
  - \`#\` starts a comment (whole-line or trailing); blank lines are ignored.
185
- If the instruction names a model ambiguously, or would need more than ${MAX_SLOTS} slots, stop and ask rather than guessing.
200
+ If the instruction names a model ambiguously, stop and ask rather than guessing.
186
201
 
187
202
  3. Write the WHOLE file, not a patch. This file is an override, not an edit target: any slot you drop disappears, and slot numbers are line positions, so a partial write silently renumbers slots. Keep the existing comment header. If the write fails on a missing directory, create \`~/.config/lacode\` first and retry.
188
203
 
@@ -208,6 +223,11 @@ $ARGUMENTS
208
223
 
209
224
  Report the tool's output as it came back, then add one short line naming what changed: re-admitted, still limited, or benched because the provider does not serve the model. If a model was benched as \`model-missing\`, say so and name the replacement in \`~/.config/lacode/pool.txt\` \u2014 but change nothing yourself.`
210
225
  },
226
+ "reprocess-timeline": {
227
+ description: "Rebuild this session's timeline from its full transcript",
228
+ agent: "implement",
229
+ template: "Call the `timeline_reprocess` tool exactly once with no arguments. Then reply with only its output."
230
+ },
211
231
  "image-in-cb": {
212
232
  description: "Attach the clipboard image to this message \u2014 macOS needs pngpaste, Linux needs wl-paste or xclip.",
213
233
  template: "$ARGUMENTS"