@wrongstack/core 0.296.3 → 0.296.4
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/chronicle/index.js +2 -2
- package/dist/chronicle/index.js.map +2 -2
- package/dist/chronicle/project-server-endpoint.d.ts +19 -0
- package/dist/chronicle/project-server-endpoint.d.ts.map +1 -1
- package/dist/chronicle/project-server.js +9 -1
- package/dist/chronicle/project-server.js.map +3 -3
- package/dist/coordination/index.js +1 -1
- package/dist/coordination/index.js.map +2 -2
- package/dist/coordination/mailbox-project-server-endpoint.d.ts +19 -0
- package/dist/coordination/mailbox-project-server-endpoint.d.ts.map +1 -1
- package/dist/coordination/mailbox-project-server.js +9 -1
- package/dist/coordination/mailbox-project-server.js.map +3 -3
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +2 -2
- package/dist/index.js +13 -3
- package/dist/index.js.map +3 -3
- package/dist/plugin/index.js +1 -1
- package/dist/plugin/index.js.map +2 -2
- package/dist/plugins/chimera-plugin.d.ts.map +1 -1
- package/dist/plugins/review-finding-commands.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +10 -0
- package/dist/utils/index.js.map +3 -3
- package/dist/utils/socket-path.d.ts +8 -0
- package/dist/utils/socket-path.d.ts.map +1 -0
- package/instructions/coordination/subagent-baseline.md +16 -5
- package/instructions/system-lite.md +3 -0
- package/instructions/system-pro.md +19 -0
- package/instructions/system.md +14 -0
- package/package.json +3 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-export of the Unix socket path-length helpers from
|
|
3
|
+
* `@wrongstack/persistence` so packages that depend on core (tools, sage)
|
|
4
|
+
* share one implementation with packages that depend on persistence directly
|
|
5
|
+
* (kanban). See `packages/persistence/src/socket-path.ts` for rationale.
|
|
6
|
+
*/
|
|
7
|
+
export { assertUnixSocketPathWithinLimit, checkUnixSocketPath, type UnixSocketPathCheck, unixSocketPathLimit, } from '@wrongstack/persistence';
|
|
8
|
+
//# sourceMappingURL=socket-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"socket-path.d.ts","sourceRoot":"","sources":["../../src/utils/socket-path.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,+BAA+B,EAC/B,mBAAmB,EACnB,KAAK,mBAAmB,EACxB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC"}
|
|
@@ -66,11 +66,22 @@ your own slice unless blocked.
|
|
|
66
66
|
## Memory and shared knowledge
|
|
67
67
|
|
|
68
68
|
Memory tools such as `remember`, `memory_search`, and `memory_graph` may share
|
|
69
|
-
the project's SAGE knowledge base
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
the project's SAGE knowledge base when live.
|
|
70
|
+
|
|
71
|
+
- Search with identifiers (symbols, commands, error strings), not vague prose;
|
|
72
|
+
retry once from another angle before concluding nothing is stored. Treat hits
|
|
73
|
+
as hypotheses — verify against current source before relying on them.
|
|
74
|
+
- Persist only durable, reusable facts or decisions you verified during this
|
|
75
|
+
task — not transient status, speculation, raw logs, personal data, or
|
|
76
|
+
secrets. Unverified hunches get `confidence` ≤ 0.5 or no write at all.
|
|
77
|
+
- Write self-contained text a zero-context reader can act on: exact paths,
|
|
78
|
+
symbols, and commands; no dangling references to "the bug" or "this task".
|
|
79
|
+
- Use specific kinds, tags, importance, and a file/symbol anchor. Scope to the
|
|
80
|
+
blast radius: project scope for codebase facts, user scope only for genuine
|
|
81
|
+
user preferences; when unsure, scope narrower.
|
|
82
|
+
- A codebase fact useful to any agent is a project fact — pass
|
|
83
|
+
`no_auto_audience: true` so it is not buried behind your role. Prefer
|
|
84
|
+
`memory_update` over re-writing a near-duplicate of an existing memory.
|
|
74
85
|
|
|
75
86
|
When a shared notes area is provided, read only relevant sibling findings and
|
|
76
87
|
write stable, task-specific artifacts. Treat sibling notes as unverified input.
|
|
@@ -112,7 +112,10 @@ SAGE is the only long-term memory. Use it only when `remember` / `memory_search`
|
|
|
112
112
|
- Use `memory_search` (or path-injected hints on tool results) before substantial work in an unfamiliar area.
|
|
113
113
|
- Treat injected memories as **hypotheses** — verify against current files before relying on them.
|
|
114
114
|
- Use `remember` only for durable facts, decisions, conventions, root causes, and user preferences.
|
|
115
|
+
- Store only what you verified this session; unverified hunches get `confidence` ≤ 0.5 or no write at all.
|
|
115
116
|
- Write for a zero-context reader: **what + where + why**, exact paths/symbols/commands, 1–4 tight sentences, 1–3 tags.
|
|
117
|
+
- Scope to the blast radius: a one-package quirk is not a `project` fact; when unsure, scope narrower.
|
|
118
|
+
- Search with identifiers (symbols, commands, error strings), not vague prose; retry once from another angle before concluding nothing is stored.
|
|
116
119
|
- **Anchor whenever possible** (`file` / `symbol` / `command`). `file_note` / `symbol_note` / `command_note` require anchors.
|
|
117
120
|
- Prefer `memory_update` over near-duplicate `remember` calls; exact/near-dup texts merge.
|
|
118
121
|
- Do **not** store WIP/todo chatter, routine visits, guesses, raw tool output, secrets, or short-lived task state (`todo` instead).
|
|
@@ -601,6 +601,18 @@ A memory is written for a reader with **zero context**. Assume the future reader
|
|
|
601
601
|
- Tag generously and consistently (`auth`, `build`, `testing`, `migration`, package name) so `memory_search` finds it from more than one angle.
|
|
602
602
|
- Prefer `memory_update` over re-`remember`ing a paraphrase; near-duplicates merge, but update keeps intent clear.
|
|
603
603
|
|
|
604
|
+
### Pre-write quality gate
|
|
605
|
+
|
|
606
|
+
Run this checklist mentally on every `remember` call. A write that fails any item is either fixed before storing or not stored at all:
|
|
607
|
+
|
|
608
|
+
1. **Verified?** The fact is confirmed by something you ran or read *this session* — not inferred, not recalled from training, not "probably". If unverified but still worth keeping, cap `confidence` at 0.5 and say in the text what would confirm it.
|
|
609
|
+
2. **Durable?** It will still be true next week. Task progress, temporary states, and in-flight decisions go to `todo`/`plan`, never to memory.
|
|
610
|
+
3. **Self-contained?** A zero-context reader can act on it: no dangling pronouns, no references to "the bug" or "this session". Real paths, real symbols, real commands.
|
|
611
|
+
4. **Locatable?** It has at least one anchor when it concerns a concrete location, and its text contains the exact identifiers retrieval will match on. An unanchored, identifier-free memory is nearly unfindable — rewrite it or don't write it.
|
|
612
|
+
5. **Correctly scoped?** The scope matches the blast radius: a one-package quirk is *not* a `project` fact; a personal habit is `user`, not `project`. When unsure, scope narrower.
|
|
613
|
+
6. **Non-duplicate?** If an existing memory covers the same fact, `memory_update` it instead. One refined memory beats three overlapping paraphrases.
|
|
614
|
+
7. **Honestly weighted?** `importance` reflects consequence-if-unknown, `confidence` reflects evidence strength. Never inflate either to force injection — a wrong high-confidence memory misleads every future session.
|
|
615
|
+
|
|
604
616
|
### Anchors — bind memory to code
|
|
605
617
|
|
|
606
618
|
When a memory is about a concrete location, pass `anchors` so it can be verified and auto-surfaced when that location is touched:
|
|
@@ -657,6 +669,13 @@ When you call `remember` from a subagent, your role and mode are auto-detected a
|
|
|
657
669
|
|
|
658
670
|
Relevant memories are injected beside matching tool results (and optionally turn context) — you do not need to search before every step. Search explicitly when: entering an unfamiliar module, hitting an error you suspect is known, resuming work after a gap, or before a decision that a past decision may already have settled.
|
|
659
671
|
|
|
672
|
+
**Recall discipline — how to search well:**
|
|
673
|
+
- Query with the identifiers the memory would contain: module names, symbols, commands, error strings, package names — not vague prose ("auth stuff" finds nothing; `verifySession` finds the root cause).
|
|
674
|
+
- One miss is not proof of absence. Retry once from a different angle (tag instead of path, symbol instead of concept) before concluding nothing is stored.
|
|
675
|
+
- Prefer `memory_for_file`/`memory_for_path` over lexical search when you know the file — anchored knowledge surfaces there even when the wording wouldn't match.
|
|
676
|
+
- Before acting on a hit, check its anchors and timestamp against the current source. A memory that contradicts the live file is a `memory_update` candidate, not a license to skip reading.
|
|
677
|
+
- Cite the memory (or its id) when you rely on it — usefulness feedback strengthens its ranking for future sessions.
|
|
678
|
+
|
|
660
679
|
### Memory hygiene
|
|
661
680
|
|
|
662
681
|
- Record a convention, decision, root cause, or preference only **after** evidence confirms it. A guess stored at confidence 0.9 is a landmine.
|
package/instructions/system.md
CHANGED
|
@@ -414,6 +414,18 @@ Pick the most specific `kind`:
|
|
|
414
414
|
|
|
415
415
|
**Do not store:** routine file visits, speculative conclusions, raw tool output, secrets, short-lived task state (`todo` instead), restatements of what the code plainly says, or WIP/todo chatter (the store rejects pure progress text).
|
|
416
416
|
|
|
417
|
+
### Pre-write quality gate
|
|
418
|
+
|
|
419
|
+
Run this checklist mentally on every `remember` call. A write that fails any item is either fixed before storing or not stored at all:
|
|
420
|
+
|
|
421
|
+
1. **Verified** this session — else cap `confidence` at 0.5 and state in the text what would confirm it. The cap keeps an honest signal for future readers; note that injection ranking demotes *unanchored default-score* writes, so anchors and exact identifiers — not an inflated score — are what earn injection slots.
|
|
422
|
+
2. **Durable** — still true next week; task state goes to `todo`, never memory
|
|
423
|
+
3. **Self-contained** — no dangling pronouns; real paths, symbols, commands
|
|
424
|
+
4. **Locatable** — anchored when about a concrete location; exact identifiers in the text
|
|
425
|
+
5. **Correctly scoped** — a one-package quirk is not a `project` fact; when unsure, scope narrower
|
|
426
|
+
6. **Non-duplicate** — `memory_update` an existing memory instead of paraphrasing it
|
|
427
|
+
7. **Honestly weighted** — never inflate `importance`/`confidence` to force injection
|
|
428
|
+
|
|
417
429
|
### Writing a good memory
|
|
418
430
|
|
|
419
431
|
Write for a reader with **zero session context**. Every memory needs:
|
|
@@ -460,6 +472,8 @@ When you call `remember` from a subagent, your role and mode are auto-detected a
|
|
|
460
472
|
### Retrieval and recording
|
|
461
473
|
|
|
462
474
|
- Relevant memories are injected beside matching tool results (and optionally turn context) — you do not need to search before every step. Use `memory_search` explicitly before substantial work in an unfamiliar area to avoid rediscovery.
|
|
475
|
+
- **Search with identifiers, not prose**: query module names, symbols, commands, or error strings — "auth stuff" finds nothing; `verifySession` finds the root cause. One miss is not absence; retry once from another angle (tag, path, symbol) before concluding nothing is stored.
|
|
476
|
+
- Prefer `memory_for_file`/`memory_for_path` over lexical search when you know the file — anchored knowledge surfaces there even when the wording wouldn't match.
|
|
463
477
|
- Record a convention, decision, root cause, or preference only after evidence confirms it.
|
|
464
478
|
- Correct or retire outdated memories with `memory_update` (edit text/tags/kind, or set `status`). The full deletion contract:
|
|
465
479
|
- **`memory_delete`** — the guarded path. Requires `{ force: true }` for ALL deletions; the store-layer guard prevents autonomous removal. Permanent memories refuse even with force.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/core",
|
|
3
|
-
"version": "0.296.
|
|
3
|
+
"version": "0.296.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack core: kernel, types, defaults, and shared utilities for the WrongStack CLI agent.",
|
|
6
6
|
"repository": {
|
|
@@ -163,8 +163,8 @@
|
|
|
163
163
|
],
|
|
164
164
|
"wrongstackApiVersion": "0.1.10",
|
|
165
165
|
"dependencies": {
|
|
166
|
-
"@wrongstack/persistence": "0.296.
|
|
167
|
-
"@wrongstack/kanban": "0.296.
|
|
166
|
+
"@wrongstack/persistence": "0.296.4",
|
|
167
|
+
"@wrongstack/kanban": "0.296.4"
|
|
168
168
|
},
|
|
169
169
|
"devDependencies": {
|
|
170
170
|
"@types/node": "^26.1.1",
|