@lawaty/lacode 1.3.0-beta.9 → 2.0.0-beta.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/CHANGELOG.md +30 -1
- package/README.md +3 -6
- package/dist/agents.js +3 -41
- package/dist/commands.js +6 -5
- package/dist/index.js +200 -235
- package/docs/CONTEXT.md +17 -33
- package/docs/USER-STORIES.md +27 -2
- package/package.json +5 -3
- package/scripts/refresh-pool.mjs +335 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,33 @@ commit as the changelog entry it describes.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [2.0.0-beta.0] — The timeline remembers, and the map has one job
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Durable timeline state: each session's cursor, pending flag, failure count, and next retry time are written beside the timeline JSONL. Pending work resumes after a restart, a successful summary with no bullet text still advances the durable cursor, and deleting a session removes both files.
|
|
17
|
+
- Exponential backoff for failed timeline summarizations. A failure marks the slice pending and schedules a retry; repeated failures grow the wait up to a cap; an idle event during the wait re-arms the timer instead of bypassing it.
|
|
18
|
+
- `timeline.retryMs` and `timeline.maxBackoffMs` options.
|
|
19
|
+
- User stories US-35 (a timeline survives a restart and resumes unfinished work) and US-36 (a failed timeline summary retries with backoff), with story tests in `tests/stories/j-timeline-reliability.test.mjs`.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- The `.opencode/context/` map is now five navigation files only. The cartographer no longer creates or maintains `active.md`, the context plugin no longer normalizes a backlog, and `/context-init` and `/context-review` no longer mention one.
|
|
24
|
+
|
|
25
|
+
### Removed
|
|
26
|
+
|
|
27
|
+
- `src/lib/active-backlog.ts`, the `.opencode/context/active.md` map file, and its finished-task retention window. The timeline is the single record of work in flight.
|
|
28
|
+
|
|
29
|
+
## [1.3.1] — reprocess-timeline rebuilds the caller's timeline, and the pool refreshes daily
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- Pool: `scripts/refresh-pool.mjs` rebuilds `~/.config/lacode/pool.txt` from the score output — opencode-go free models first, preserved unscored providers in the middle, the best opencode model last — with an atomic, fail-closed write. `--install-timer` installs a daily systemd user timer; `--from-scores` reuses an existing `model-scores.json`.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Timeline: `/reprocess-timeline` now runs inline (`subtask: false`) instead of in a child session, so `timeline_reprocess` rebuilds the caller's timeline rather than the child's.
|
|
38
|
+
|
|
12
39
|
## [1.3.0-beta.9] — a timeline reply without bullets still lands
|
|
13
40
|
|
|
14
41
|
### Fixed
|
|
@@ -1105,7 +1132,9 @@ experimental; `latest` remains 0.4.2.
|
|
|
1105
1132
|
|
|
1106
1133
|
- First published release: pooled subagents over a shared set of models.
|
|
1107
1134
|
|
|
1108
|
-
[Unreleased]: https://github.com/lawaty/lacode/compare/
|
|
1135
|
+
[Unreleased]: https://github.com/lawaty/lacode/compare/v2.0.0-beta.0...HEAD
|
|
1136
|
+
[2.0.0-beta.0]: https://github.com/lawaty/lacode/compare/v1.3.1...v2.0.0-beta.0
|
|
1137
|
+
[1.3.1]: https://github.com/lawaty/lacode/releases/tag/v1.3.1
|
|
1109
1138
|
[1.3.0-beta.9]: https://github.com/lawaty/lacode/releases/tag/v1.3.0-beta.9
|
|
1110
1139
|
[1.3.0-beta.8]: https://github.com/lawaty/lacode/releases/tag/v1.3.0-beta.8
|
|
1111
1140
|
[1.3.0-beta.0]: https://github.com/lawaty/lacode/releases/tag/v1.3.0-beta.0
|
package/README.md
CHANGED
|
@@ -31,7 +31,6 @@ is also on disk at `node_modules/@lawaty/lacode/CHANGELOG.md`.
|
|
|
31
31
|
| Distinct notification sounds | A popup says something happened, but not at a glance whether it is a finish, a question or a block. |
|
|
32
32
|
| SSH notification tunnel | Work on a remote host raises its notification on that host, which has no desktop. |
|
|
33
33
|
| Repository context map | Every task starts by exploring your codebase cold, re-deriving the same layout, entry points and boundaries. |
|
|
34
|
-
| Active backlog | What is half-done, and what can be dropped, lives in chat history the next session cannot see. |
|
|
35
34
|
| Standing instructions | The same direction gets repeated every session, or buried in config that is not per-clone. |
|
|
36
35
|
| Image attachments anywhere | A TUI with no image support locks vision models out entirely. |
|
|
37
36
|
|
|
@@ -271,11 +270,9 @@ Agents are stateless between tasks, and exploring your repository is the most
|
|
|
271
270
|
expensive part of any task — so every agent pays for it again, re-deriving the
|
|
272
271
|
same layout, entry points and boundaries from scratch. LaCode keeps a short,
|
|
273
272
|
maintained map of the repository in `.opencode/context/` — five navigation files
|
|
274
|
-
(`architecture`, `contexts`, `conventions`, `workflows`, `decisions`)
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
relevant file before exploring and starts from the canonical entry points it
|
|
278
|
-
lists. The map holds conclusions, not
|
|
273
|
+
(`architecture`, `contexts`, `conventions`, `workflows`, `decisions`) — and injects
|
|
274
|
+
a standing rule that every agent reads the relevant file before exploring and
|
|
275
|
+
starts from the canonical entry points it lists. The map holds conclusions, not
|
|
279
276
|
inventories: it answers "what should I look at first?" and nothing else, which
|
|
280
277
|
is what makes reading it cheaper than the exploration it replaces.
|
|
281
278
|
|
package/dist/agents.js
CHANGED
|
@@ -124,8 +124,6 @@ You own exactly these files and nothing else:
|
|
|
124
124
|
150 lines.**
|
|
125
125
|
- \`.opencode/context/decisions.md\` \u2014 architectural constraints that bind future
|
|
126
126
|
work. **At most 120 lines.**
|
|
127
|
-
- \`.opencode/context/active.md\` \u2014 work in flight, grouped by the ISO week it was
|
|
128
|
-
opened. **At most 60 lines.**
|
|
129
127
|
|
|
130
128
|
The unit is non-blank lines. It is what a reader actually pays for, it bounds an
|
|
131
129
|
entry that wraps to three lines, and the validator can count it exactly. An
|
|
@@ -141,8 +139,6 @@ failed run, not a small one.
|
|
|
141
139
|
|
|
142
140
|
The plugin applies this on every run. Write entries in the shape that lets it.
|
|
143
141
|
|
|
144
|
-
- \`active.md\`: a finished task (\`[x]\` plus \`finished YYYY-MM-DD\`) is dropped
|
|
145
|
-
after 7 days. An open task never expires, however old it is.
|
|
146
142
|
- \`architecture.md\`, \`contexts.md\`, \`conventions.md\`, \`workflows.md\`,
|
|
147
143
|
\`decisions.md\`: a \`[provisional]\` entry is dropped 30 days after its
|
|
148
144
|
\`verified\` date unless it is re-verified. \`[binding]\` and \`[disputed]\` are
|
|
@@ -236,8 +232,7 @@ You are mapping a city, not auditing every house. Do not attempt to understand
|
|
|
236
232
|
every file.
|
|
237
233
|
|
|
238
234
|
Then write the five navigation files within their line budgets, using the entry
|
|
239
|
-
schema above.
|
|
240
|
-
tasks. For each significant subsystem, give a short "Start here" list \u2014 at most
|
|
235
|
+
schema above. For each significant subsystem, give a short "Start here" list \u2014 at most
|
|
241
236
|
about five canonical files, each with a one-phrase reason. This is the single
|
|
242
237
|
most valuable thing you produce: where an agent should open its editor next.
|
|
243
238
|
|
|
@@ -271,37 +266,6 @@ update needed".
|
|
|
271
266
|
Every new or changed entry uses the schema above and stays under the file's
|
|
272
267
|
budget. If a file is already over budget, consolidate before adding anything.
|
|
273
268
|
|
|
274
|
-
Also keep \`.opencode/context/active.md\` current: record work that is in flight,
|
|
275
|
-
and mark a task finished \u2014 with the date it finished \u2014 when it is.
|
|
276
|
-
|
|
277
|
-
# Task backlog
|
|
278
|
-
|
|
279
|
-
\`.opencode/context/active.md\` holds the work in flight. It is a rolling window,
|
|
280
|
-
not a history: it answers "what is open, and what just finished".
|
|
281
|
-
|
|
282
|
-
Format \u2014 one line per task, under the ISO week the task was opened in:
|
|
283
|
-
|
|
284
|
-
## 2026-W43
|
|
285
|
-
|
|
286
|
-
- [ ] Ship the release notes \u2014 opened 2026-W43
|
|
287
|
-
- [x] Fix the flaky test \u2014 opened 2026-W43, finished 2026-10-19
|
|
288
|
-
|
|
289
|
-
The rules:
|
|
290
|
-
|
|
291
|
-
- A task that is not marked \`[x]\` is OPEN. An open task is never removed,
|
|
292
|
-
however old it is.
|
|
293
|
-
- A task is FINISHED when it is marked \`[x]\` AND carries a \`finished\` date.
|
|
294
|
-
Record the date it actually finished, as \`YYYY-MM-DD\`.
|
|
295
|
-
- The week is \`YYYY-Www\`, Monday to Sunday. \`date +%G-W%V\` prints it.
|
|
296
|
-
- A finished task is dropped once it is more than a week old. The plugin
|
|
297
|
-
enforces that: record the finished task with its date and let the window close
|
|
298
|
-
on its own. Do not delete old finished tasks by hand, and do not keep a
|
|
299
|
-
finished task back to preserve it \u2014 the file is meant to stay small.
|
|
300
|
-
- Never invent a task. Record work that actually happened, and mark a task
|
|
301
|
-
finished only once it is finished.
|
|
302
|
-
- Keep the file inside the window. If the backlog has grown past a handful of
|
|
303
|
-
weeks, that is a signal to close finished tasks, not to add sections.
|
|
304
|
-
|
|
305
269
|
# Minimal exploration
|
|
306
270
|
|
|
307
271
|
Default shape:
|
|
@@ -389,7 +353,7 @@ Never drop a binding constraint to make room.
|
|
|
389
353
|
|
|
390
354
|
Trigger: an explicit review (see the \`context-review\` command).
|
|
391
355
|
|
|
392
|
-
Audit the map files
|
|
356
|
+
Audit the map files for:
|
|
393
357
|
|
|
394
358
|
- schema \u2014 every entry has one marker, at most three lines, a pointer, and a
|
|
395
359
|
\`verified\` date
|
|
@@ -404,8 +368,6 @@ Audit the map files and the backlog for:
|
|
|
404
368
|
- missing canonical entry points for significant subsystems
|
|
405
369
|
- unsupported assumptions \u2014 anything that is not \`[binding]\` or \`[disputed]\`
|
|
406
370
|
should be \`[provisional]\`
|
|
407
|
-
- backlog tasks that are finished but carry no date \u2014 the retention window
|
|
408
|
-
cannot age those out, so they stay forever
|
|
409
371
|
|
|
410
372
|
Fix problems only in the files you own. Never modify source code or a project
|
|
411
373
|
page during a review. Report what you found, what you fixed, what you left as
|
|
@@ -877,7 +839,7 @@ if the blocker is understanding rather than execution, report that instead.`,
|
|
|
877
839
|
}
|
|
878
840
|
},
|
|
879
841
|
"context": {
|
|
880
|
-
"description": "Repository cartographer and memory maintainer. Bootstraps and incrementally maintains .opencode/context/ (architecture, contexts, conventions, workflows, decisions) as a small navigation map for future agents
|
|
842
|
+
"description": "Repository cartographer and memory maintainer. Bootstraps and incrementally maintains .opencode/context/ (architecture, contexts, conventions, workflows, decisions) as a small navigation map for future agents. Runs automatically after sessions that changed files; can also be invoked with /context-init, /context-update, /context-review. Never use it for general coding tasks.",
|
|
881
843
|
"mode": "subagent",
|
|
882
844
|
"temperature": 0.1,
|
|
883
845
|
prompt: CARTOGRAPHER_PROMPT,
|
package/dist/commands.js
CHANGED
|
@@ -70,8 +70,7 @@ exploration (README \u2192 existing docs \u2192 manifests \u2192 top-level struc
|
|
|
70
70
|
and framework config \u2192 entry points \u2192 selective source), then write the five
|
|
71
71
|
context files inside their line budgets, using the entry schema (provenance
|
|
72
72
|
marker, rule of at most three lines, \`\u2014 See <path>[ \xA7Section] (verified
|
|
73
|
-
YYYY-MM-DD)\`).
|
|
74
|
-
tasks.
|
|
73
|
+
YYYY-MM-DD)\`).
|
|
75
74
|
|
|
76
75
|
Remember: write conclusions, not inventories. Point at the project's existing
|
|
77
76
|
documentation instead of restating it. Run the drift pass and report a
|
|
@@ -117,7 +116,7 @@ Follow the review procedure and entry schema in your system prompt. Everything
|
|
|
117
116
|
outside \`.opencode/context/\` is read-only for this run. Do not modify source
|
|
118
117
|
code under any circumstances.
|
|
119
118
|
|
|
120
|
-
Audit the context files
|
|
119
|
+
Audit the context files for:
|
|
121
120
|
|
|
122
121
|
- schema \u2014 every entry has one provenance marker, at most three lines, a
|
|
123
122
|
pointer, and a \`(verified YYYY-MM-DD)\` date
|
|
@@ -136,8 +135,6 @@ Audit the context files and the backlog for:
|
|
|
136
135
|
- missing canonical entry points for significant subsystems
|
|
137
136
|
- unsupported assumptions \u2014 anything that is not \`[binding]\` or \`[disputed]\`
|
|
138
137
|
should be \`[provisional]\`
|
|
139
|
-
- backlog tasks that are finished but carry no date \u2014 the retention window
|
|
140
|
-
cannot age those out, so they stay forever
|
|
141
138
|
|
|
142
139
|
Fix what you find in \`.opencode/context/\` only, then report: findings, fixes,
|
|
143
140
|
and anything you could not verify.`
|
|
@@ -225,9 +222,13 @@ $ARGUMENTS
|
|
|
225
222
|
|
|
226
223
|
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.`
|
|
227
224
|
},
|
|
225
|
+
// `agent: "implement"` is a subagent, so without `subtask: false` this command
|
|
226
|
+
// would run in a child session and `timeline_reprocess` would rebuild the
|
|
227
|
+
// child's timeline instead of the caller's.
|
|
228
228
|
"reprocess-timeline": {
|
|
229
229
|
description: "Rebuild this session's timeline from its full transcript",
|
|
230
230
|
agent: "implement",
|
|
231
|
+
subtask: false,
|
|
231
232
|
template: "Call the `timeline_reprocess` tool exactly once with no arguments. Then reply with only its output."
|
|
232
233
|
},
|
|
233
234
|
"image-in-cb": {
|