@theihtisham/agent-shadow-brain 7.22.0 → 7.22.1
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 +7 -1
- package/README.md +7 -3
- package/dist/brain/auto-update.js +1 -1
- package/dist/brain/brain-portability.js +1 -1
- package/dist/brain/client-integrations.js +1 -1
- package/dist/brain/context-efficiency.d.ts.map +1 -1
- package/dist/brain/mcp-presence.js +2 -2
- package/dist/brain/mcp-server.js +5 -5
- package/dist/brain/native-codex.js +1 -1
- package/dist/brain/orchestrator.js +1 -1
- package/dist/brain/project-hub-pdf-worker.js +57 -57
- package/dist/brain/project-hub-store.js +11 -11
- package/dist/cli.js +1 -1
- package/dist/dashboard/brain-hub-agent-dock.js +252 -252
- package/dist/dashboard/brain-hub-controls.js +61 -61
- package/dist/dashboard/brain-hub-exchanges.js +80 -80
- package/dist/dashboard/brain-hub-graph.js +336 -336
- package/dist/dashboard/brain-hub-html.js +78 -78
- package/dist/dashboard/brain-hub-live.js +149 -149
- package/dist/dashboard/brain-hub-managed-skills.js +18 -18
- package/dist/dashboard/brain-hub-native.js +42 -42
- package/dist/dashboard/live-workspace-html.js +1 -1
- package/dist/dashboard/project-feedback-html.js +211 -211
- package/dist/dashboard/project-kit-html.js +353 -353
- package/dist/dashboard/server.js +1 -1
- package/dist/dashboard/v6-dashboard-html.js +4261 -4261
- package/dist/dashboard/workspace-api.js +1 -1
- package/dist/dashboard/workspace-html.js +2534 -2534
- package/dist/dashboard/workspace-status.js +1 -1
- package/dist/project-cli.js +1 -1
- package/docs/BRAND_ASSETS.md +36 -36
- package/docs/COMPARISON.md +22 -22
- package/docs/COMPONENTS.md +66 -66
- package/docs/CONTEXT_LAB.md +79 -79
- package/docs/INTEGRATIONS.md +69 -69
- package/docs/LEARNING.md +45 -45
- package/docs/PROJECT_KIT.md +97 -97
- package/docs/SHARING.md +13 -13
- package/docs/SHOWCASE.md +87 -87
- package/docs/STATS.md +21 -21
- package/docs/TROUBLESHOOTING.md +42 -42
- package/docs/UPGRADE_PLAN_v7.0.0.md +203 -203
- package/docs/WORKFLOW_INTEGRATION.md +125 -125
- package/docs/evaluation/CONTEXT_EVALUATION_v7.1.4.json +1818 -1818
- package/docs/evaluation/CONTEXT_EVALUATION_v7.1.4.md +36 -36
- package/docs/launch/COMPONENT_MAP_v7.1.4.md +122 -122
- package/docs/launch/PROJECT_KIT_PLAN_v7.1.4.md +110 -110
- package/docs/launch/PROJECT_LEARNING_PLAN_v7.1.4.md +63 -63
- package/docs/launch/RELEASE_ACCEPTANCE_v7.22.0.md +48 -48
- package/docs/launch/RELEASE_CHECKLIST_v7.0.0.md +24 -24
- package/docs/launch/RELEASE_NOTES_v7.0.0.md +44 -44
- package/docs/launch/RELEASE_NOTES_v7.1.0.md +32 -32
- package/docs/launch/RELEASE_NOTES_v7.1.3.md +40 -40
- package/docs/launch/RELEASE_NOTES_v7.1.4.md +30 -30
- package/docs/launch/RELEASE_NOTES_v7.2.0.md +24 -24
- package/docs/launch/RELEASE_NOTES_v7.22.0.md +53 -53
- package/docs/launch/RELEASE_NOTES_v7.22.1.md +11 -0
- package/docs/launch/RESEARCH_AND_PLAN_v7.1.4.md +255 -255
- package/docs/launch/RESEARCH_AND_PLAN_v7.22.0.md +672 -672
- package/package.json +7 -3
- package/skills/shadow-debug/SKILL.md +16 -16
- package/skills/shadow-implement/SKILL.md +16 -16
- package/skills/shadow-release/SKILL.md +16 -16
- package/skills/shadow-research/SKILL.md +14 -14
- package/skills/shadow-review/SKILL.md +14 -14
- package/skills/shadow-workflow/SKILL.md +39 -39
|
@@ -11,7 +11,7 @@ export class WorkspaceRuntime {
|
|
|
11
11
|
const storageError = error ?? brain?.getStorageHealth().lastError?.message;
|
|
12
12
|
const projectMode = this.mode === 'project';
|
|
13
13
|
return {
|
|
14
|
-
version: '7.22.
|
|
14
|
+
version: '7.22.1', serverInstanceId: this.serverInstanceId, startedAt: this.startedAt, checkedAt: new Date().toISOString(),
|
|
15
15
|
mode: this.mode, project: this.project,
|
|
16
16
|
capabilities: { memory: true, context: true, curation: true, telemetry: true,
|
|
17
17
|
projectKnowledge: projectMode, projectSkills: projectMode, projectFeedback: projectMode,
|
package/dist/project-cli.js
CHANGED
|
@@ -14,7 +14,7 @@ export function registerProjectCommands(program) {
|
|
|
14
14
|
.action(async (directory, opts) => {
|
|
15
15
|
const { startProjectWorkspace } = await import('./dashboard/project-workspace.js');
|
|
16
16
|
const workspace = await startProjectWorkspace(directory, { port: Number(opts.port) });
|
|
17
|
-
console.log('Agent Shadow Brain 7.22.
|
|
17
|
+
console.log('Agent Shadow Brain 7.22.1 · PROJECT WORKSPACE');
|
|
18
18
|
console.log('Project: ' + workspace.root);
|
|
19
19
|
console.log('Memory: ' + workspace.storagePath);
|
|
20
20
|
console.log('Brain Hub: ' + workspace.url + '/hub');
|
package/docs/BRAND_ASSETS.md
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
# Integration icon sources
|
|
2
|
-
|
|
3
|
-
The portal bundles four small vector marks from [Lobe Icons](https://github.com/lobehub/lobe-icons), pinned to revision `55746b0b082258211121c70bd26e6878fd3bd292`. They identify the corresponding tool in the agent activity view; they are not Agent Shadow Brain branding or an endorsement. The OpenAI mark identifies Codex, and the DeepSeek mark identifies DeepSeek Harness. It does not identify which model a host is running.
|
|
4
|
-
|
|
5
|
-
The SVG artwork is unchanged. Icons load from the installed application, without a CDN or runtime dependency. The surrounding activity indicator animates; the brand artwork does not change shape. Brand names and marks belong to their respective owners. See [OpenAI brand guidance](https://openai.com/brand/).
|
|
6
|
-
|
|
7
|
-
| Tool | Pinned source | SHA-256 of trimmed SVG |
|
|
8
|
-
| --- | --- | --- |
|
|
9
|
-
| codex | [openai](https://raw.githubusercontent.com/lobehub/lobe-icons/55746b0b082258211121c70bd26e6878fd3bd292/packages/static-svg/icons/openai.svg) | `a595df6b423920c67a7f8f73c063e4bfb72d415948097b6cac063a2366bb5186` |
|
|
10
|
-
| claude-code | [claude](https://raw.githubusercontent.com/lobehub/lobe-icons/55746b0b082258211121c70bd26e6878fd3bd292/packages/static-svg/icons/claude.svg) | `365a70a7eb3956d9b9a96086058ebe04e1dbd8e291a756ad964e8a283fbd6d38` |
|
|
11
|
-
| deepseek-harness | [deepseek](https://raw.githubusercontent.com/lobehub/lobe-icons/55746b0b082258211121c70bd26e6878fd3bd292/packages/static-svg/icons/deepseek.svg) | `8f9443e351b6dacce71871790201b799d92e8bf96a45ef79aeb5e9bf4db423e2` |
|
|
12
|
-
| opencode | [opencode](https://raw.githubusercontent.com/lobehub/lobe-icons/55746b0b082258211121c70bd26e6878fd3bd292/packages/static-svg/icons/opencode.svg) | `7cfa6e9d6726f7c9fa26c7d9aef0dfec52d20a137380454340f30f12ccbfd302` |
|
|
13
|
-
|
|
14
|
-
## Lobe Icons license
|
|
15
|
-
|
|
16
|
-
MIT License
|
|
17
|
-
|
|
18
|
-
Copyright (c) 2023 LobeHub
|
|
19
|
-
|
|
20
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
22
|
-
in the Software without restriction, including without limitation the rights
|
|
23
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
24
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
25
|
-
furnished to do so, subject to the following conditions:
|
|
26
|
-
|
|
27
|
-
The above copyright notice and this permission notice shall be included in all
|
|
28
|
-
copies or substantial portions of the Software.
|
|
29
|
-
|
|
30
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
32
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
33
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
34
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
35
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
36
|
-
SOFTWARE.
|
|
1
|
+
# Integration icon sources
|
|
2
|
+
|
|
3
|
+
The portal bundles four small vector marks from [Lobe Icons](https://github.com/lobehub/lobe-icons), pinned to revision `55746b0b082258211121c70bd26e6878fd3bd292`. They identify the corresponding tool in the agent activity view; they are not Agent Shadow Brain branding or an endorsement. The OpenAI mark identifies Codex, and the DeepSeek mark identifies DeepSeek Harness. It does not identify which model a host is running.
|
|
4
|
+
|
|
5
|
+
The SVG artwork is unchanged. Icons load from the installed application, without a CDN or runtime dependency. The surrounding activity indicator animates; the brand artwork does not change shape. Brand names and marks belong to their respective owners. See [OpenAI brand guidance](https://openai.com/brand/).
|
|
6
|
+
|
|
7
|
+
| Tool | Pinned source | SHA-256 of trimmed SVG |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| codex | [openai](https://raw.githubusercontent.com/lobehub/lobe-icons/55746b0b082258211121c70bd26e6878fd3bd292/packages/static-svg/icons/openai.svg) | `a595df6b423920c67a7f8f73c063e4bfb72d415948097b6cac063a2366bb5186` |
|
|
10
|
+
| claude-code | [claude](https://raw.githubusercontent.com/lobehub/lobe-icons/55746b0b082258211121c70bd26e6878fd3bd292/packages/static-svg/icons/claude.svg) | `365a70a7eb3956d9b9a96086058ebe04e1dbd8e291a756ad964e8a283fbd6d38` |
|
|
11
|
+
| deepseek-harness | [deepseek](https://raw.githubusercontent.com/lobehub/lobe-icons/55746b0b082258211121c70bd26e6878fd3bd292/packages/static-svg/icons/deepseek.svg) | `8f9443e351b6dacce71871790201b799d92e8bf96a45ef79aeb5e9bf4db423e2` |
|
|
12
|
+
| opencode | [opencode](https://raw.githubusercontent.com/lobehub/lobe-icons/55746b0b082258211121c70bd26e6878fd3bd292/packages/static-svg/icons/opencode.svg) | `7cfa6e9d6726f7c9fa26c7d9aef0dfec52d20a137380454340f30f12ccbfd302` |
|
|
13
|
+
|
|
14
|
+
## Lobe Icons license
|
|
15
|
+
|
|
16
|
+
MIT License
|
|
17
|
+
|
|
18
|
+
Copyright (c) 2023 LobeHub
|
|
19
|
+
|
|
20
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
22
|
+
in the Software without restriction, including without limitation the rights
|
|
23
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
24
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
25
|
+
furnished to do so, subject to the following conditions:
|
|
26
|
+
|
|
27
|
+
The above copyright notice and this permission notice shall be included in all
|
|
28
|
+
copies or substantial portions of the Software.
|
|
29
|
+
|
|
30
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
32
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
33
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
34
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
35
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
36
|
+
SOFTWARE.
|
package/docs/COMPARISON.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
# Agent memory approaches
|
|
2
|
-
|
|
3
|
-
Documentation reviewed on **November 12, 2026**. The comparison uses each project's official documentation to describe published capabilities and architectural choices.
|
|
4
|
-
|
|
5
|
-
Agent Shadow Brain 7.1.4 combines local project memory, explicit reviews, recorded relationships, bounded task briefs, and an activity journal. Project Kit observes stack markers, saves supplied knowledge, and previews a task-specific skill before writing it to the selected project. Its adaptive profile uses lexical retrieval with coding-oriented identifiers, inspectable ranking signals, and one-hop expansion over recorded links. Reported outcomes can adjust matching candidates in the same project. [Project Kit](PROJECT_KIT.md) · [Context Lab](CONTEXT_LAB.md) · [Reported outcomes](LEARNING.md)
|
|
6
|
-
|
|
7
|
-
| Approach | Published capability | Practical tradeoff |
|
|
8
|
-
| --- | --- | --- |
|
|
9
|
-
| **Mem0 Platform** | Native entity links connect memories that mention shared entities. Platform retrieval blends vector similarity, BM25, and graph signals. Its documented graph runs inside the platform. | Automatic semantic and entity recall serves applications that need wider associations. Shadow Brain relies on local lexical matches and explicitly recorded project links, so reviewers can trace how each linked record entered a brief. [Mem0 Graph Memory](https://docs.mem0.ai/platform/features/graph-memory) |
|
|
10
|
-
| **Letta** | Current documentation describes a Git-backed memory filesystem shared across agent conversations and background memory maintenance through dreaming. | The agent lifecycle and its memory live together. Shadow Brain supplies context and review tools to existing coding clients. Its learning signal uses explicit project outcomes and can be inspected, paused, or removed. [Letta memory and dreaming](https://docs.letta.com/configuration/memory) |
|
|
11
|
-
| **Graphiti** | Builds temporal knowledge graphs from episodes. Facts carry validity information, and retrieval combines semantic, keyword, and graph search. The open-source framework documents graph backends and model-service setup. | Temporal validity and episode provenance support evolving fact histories. Shadow Brain records manual supersession, contradictions, and review state in a small local store. [Graphiti source and documentation](https://github.com/getzep/graphiti) |
|
|
12
|
-
| **Claude-Mem** | Documents hook-based capture, a local viewer, and progressive disclosure from search results to timelines and full observations. Its current documentation covers multiple host integrations. | An observation capture workflow serves session-history recall. Shadow Brain's current workspace focuses on saved project decisions, explicit curation, and selected context. Its live journal tracks bounded activity metadata separately from memory content. [Claude-Mem source](https://github.com/thedotmack/claude-mem) · [Progressive disclosure](https://docs.claude-mem.ai/progressive-disclosure) |
|
|
13
|
-
| **Qdrant** | Its Query API combines dense and sparse retrieval stages, fusion, and rescoring. The documentation also covers payload filtering and multitenancy. | These capabilities give developers building blocks for a retrieval service. Shadow Brain bundles a coding-memory workflow over a local JSON store with a curated ranking pipeline and a workspace. [Qdrant hybrid queries](https://qdrant.tech/documentation/search/hybrid-queries/) · [Multitenancy](https://qdrant.tech/documentation/manage-data/multitenancy/) |
|
|
14
|
-
| **MCP reference memory server** | The reference server stores a graph of entities, observations, and directed relations with MCP tools for reading and updating it. | This is a small general graph API. Shadow Brain adds project context assembly, review state, ranking explanations, and evidence inspection around coding memories. [Reference memory-server source](https://github.com/modelcontextprotocol/servers/tree/main/src/memory) |
|
|
15
|
-
|
|
16
|
-
## What the local evaluation establishes
|
|
17
|
-
|
|
18
|
-
Both Shadow Brain profiles ran against the same 14 author-generated cases. Adaptive passed all 14 and Legacy passed 6. The differences include exact-term matching, technical identifier variants, relevant excerpts, duplicate handling, and recorded one-hop retrieval. The evidence applies to the named local retrieval cases. [Paired evaluation](evaluation/CONTEXT_EVALUATION_v7.1.4.md)
|
|
19
|
-
|
|
20
|
-
The adaptive implementation borrows term-frequency saturation and document-length normalization from BM25-style ranking. The local report separates selected-record relevance, passage visibility, scope, budgets, and no-match behavior. LongMemEval describes a broader benchmark for long-term conversational memory. [Lucene BM25Similarity](https://lucene.apache.org/core/10_5_2/core/org/apache/lucene/search/similarities/BM25Similarity.html) · [LongMemEval paper](https://arxiv.org/abs/2410.10813)
|
|
21
|
-
|
|
22
|
-
Run `npm run build` and `npm run test:context-eval` from a source checkout to reproduce the local cases.
|
|
1
|
+
# Agent memory approaches
|
|
2
|
+
|
|
3
|
+
Documentation reviewed on **November 12, 2026**. The comparison uses each project's official documentation to describe published capabilities and architectural choices.
|
|
4
|
+
|
|
5
|
+
Agent Shadow Brain 7.1.4 combines local project memory, explicit reviews, recorded relationships, bounded task briefs, and an activity journal. Project Kit observes stack markers, saves supplied knowledge, and previews a task-specific skill before writing it to the selected project. Its adaptive profile uses lexical retrieval with coding-oriented identifiers, inspectable ranking signals, and one-hop expansion over recorded links. Reported outcomes can adjust matching candidates in the same project. [Project Kit](PROJECT_KIT.md) · [Context Lab](CONTEXT_LAB.md) · [Reported outcomes](LEARNING.md)
|
|
6
|
+
|
|
7
|
+
| Approach | Published capability | Practical tradeoff |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| **Mem0 Platform** | Native entity links connect memories that mention shared entities. Platform retrieval blends vector similarity, BM25, and graph signals. Its documented graph runs inside the platform. | Automatic semantic and entity recall serves applications that need wider associations. Shadow Brain relies on local lexical matches and explicitly recorded project links, so reviewers can trace how each linked record entered a brief. [Mem0 Graph Memory](https://docs.mem0.ai/platform/features/graph-memory) |
|
|
10
|
+
| **Letta** | Current documentation describes a Git-backed memory filesystem shared across agent conversations and background memory maintenance through dreaming. | The agent lifecycle and its memory live together. Shadow Brain supplies context and review tools to existing coding clients. Its learning signal uses explicit project outcomes and can be inspected, paused, or removed. [Letta memory and dreaming](https://docs.letta.com/configuration/memory) |
|
|
11
|
+
| **Graphiti** | Builds temporal knowledge graphs from episodes. Facts carry validity information, and retrieval combines semantic, keyword, and graph search. The open-source framework documents graph backends and model-service setup. | Temporal validity and episode provenance support evolving fact histories. Shadow Brain records manual supersession, contradictions, and review state in a small local store. [Graphiti source and documentation](https://github.com/getzep/graphiti) |
|
|
12
|
+
| **Claude-Mem** | Documents hook-based capture, a local viewer, and progressive disclosure from search results to timelines and full observations. Its current documentation covers multiple host integrations. | An observation capture workflow serves session-history recall. Shadow Brain's current workspace focuses on saved project decisions, explicit curation, and selected context. Its live journal tracks bounded activity metadata separately from memory content. [Claude-Mem source](https://github.com/thedotmack/claude-mem) · [Progressive disclosure](https://docs.claude-mem.ai/progressive-disclosure) |
|
|
13
|
+
| **Qdrant** | Its Query API combines dense and sparse retrieval stages, fusion, and rescoring. The documentation also covers payload filtering and multitenancy. | These capabilities give developers building blocks for a retrieval service. Shadow Brain bundles a coding-memory workflow over a local JSON store with a curated ranking pipeline and a workspace. [Qdrant hybrid queries](https://qdrant.tech/documentation/search/hybrid-queries/) · [Multitenancy](https://qdrant.tech/documentation/manage-data/multitenancy/) |
|
|
14
|
+
| **MCP reference memory server** | The reference server stores a graph of entities, observations, and directed relations with MCP tools for reading and updating it. | This is a small general graph API. Shadow Brain adds project context assembly, review state, ranking explanations, and evidence inspection around coding memories. [Reference memory-server source](https://github.com/modelcontextprotocol/servers/tree/main/src/memory) |
|
|
15
|
+
|
|
16
|
+
## What the local evaluation establishes
|
|
17
|
+
|
|
18
|
+
Both Shadow Brain profiles ran against the same 14 author-generated cases. Adaptive passed all 14 and Legacy passed 6. The differences include exact-term matching, technical identifier variants, relevant excerpts, duplicate handling, and recorded one-hop retrieval. The evidence applies to the named local retrieval cases. [Paired evaluation](evaluation/CONTEXT_EVALUATION_v7.1.4.md)
|
|
19
|
+
|
|
20
|
+
The adaptive implementation borrows term-frequency saturation and document-length normalization from BM25-style ranking. The local report separates selected-record relevance, passage visibility, scope, budgets, and no-match behavior. LongMemEval describes a broader benchmark for long-term conversational memory. [Lucene BM25Similarity](https://lucene.apache.org/core/10_5_2/core/org/apache/lucene/search/similarities/BM25Similarity.html) · [LongMemEval paper](https://arxiv.org/abs/2410.10813)
|
|
21
|
+
|
|
22
|
+
Run `npm run build` and `npm run test:context-eval` from a source checkout to reproduce the local cases.
|
package/docs/COMPONENTS.md
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
# Component guide
|
|
2
|
-
|
|
3
|
-
Agent Shadow Brain 7.1.4 shares a project memory store across the workspace, CLI, and standalone MCP service. The project, feature settings, and annotation snapshot determine which records are eligible for a task brief.
|
|
4
|
-
|
|
5
|
-
```mermaid
|
|
6
|
-
flowchart LR
|
|
7
|
-
A[Workspace, CLI, or MCP] --> B[Project and task]
|
|
8
|
-
B --> C[Scoped memory snapshot]
|
|
9
|
-
D[Reviews and recorded links] --> E[Eligible records]
|
|
10
|
-
C --> E
|
|
11
|
-
E --> F[Adaptive or legacy retrieval]
|
|
12
|
-
F --> G[Bounded brief and reasons]
|
|
13
|
-
G --> H[Inspect, compare, or copy]
|
|
14
|
-
H --> I[Explicit memory review]
|
|
15
|
-
I --> D
|
|
16
|
-
H --> M[Observed outcome reported by user or agent]
|
|
17
|
-
M --> N[Project feedback sidecar]
|
|
18
|
-
N --> F
|
|
19
|
-
A --> J[Measured calls and reported phases]
|
|
20
|
-
J --> K[Bounded activity journal]
|
|
21
|
-
K --> L[Live view and recorded replay]
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Shared paths
|
|
25
|
-
|
|
26
|
-
| Component | Responsibility | Source |
|
|
27
|
-
| --- | --- | --- |
|
|
28
|
-
| Global memory | Loads schema-1 records, preserves queued operations on refresh, and handles storage health and durable commits. | [GlobalBrain](../src/brain/global-brain.ts) |
|
|
29
|
-
| Project-local workspace | Opens a separate store for one selected project and saves explicitly supplied knowledge there. | [Project workspace](../src/dashboard/project-workspace.ts) · [Project memory](../src/brain/project-memory.ts) |
|
|
30
|
-
| Project Kit | Reads bounded marker and manifest evidence, previews a task-specific skill, and applies it with a matching plan hash and ownership receipt. | [Project Kit](../src/brain/project-kit.ts) · [Project inspection](../src/brain/project-kit-inspection.ts) |
|
|
31
|
-
| Reviews and links | Stores review state, relations, and revisioned history separately from original content. | [Memory annotations](../src/brain/memory-annotations.ts) |
|
|
32
|
-
| Retrieval and context | Ranks eligible records, groups duplicates, selects passages, applies the rendered budget, and explains the result. Existing recall remains available. | [Context assembly](../src/brain/context-assembly.ts) · [Adaptive retrieval](../src/brain/context-retrieval.ts) |
|
|
33
|
-
| Project task feedback | Keeps a bounded, revisioned record of reported outcomes and adjusts eligible direct adaptive matches on similar tasks in that project. | [Project feedback](../src/brain/project-feedback.ts) · [Reported outcome guide](LEARNING.md) |
|
|
34
|
-
| Evidence inspection | Returns saved text and recorded references with review and relation details. Health adds bounded review hints. | [Memory inspection](../src/brain/memory-inspection.ts) · [Reference normalization](../src/brain/memory-sources.ts) |
|
|
35
|
-
| Workspace | Serves overview, health, memory, graph, context, comparison, integrations, and settings. The web interface consumes the shared local API. | [Workspace API](../src/dashboard/workspace-api.ts) · [Workspace UI](../src/dashboard/workspace-html.ts) |
|
|
36
|
-
| MCP | Serves 12 tools in the normal memory profile and 17 when launched against a Project Kit store. Both expose local resources and user-selected prompts to compatible hosts. | [Stdio transport](../src/brain/mcp-stdio.ts) · [Server](../src/brain/mcp-server.ts) · [Resources and prompts](../src/brain/memory-mcp-content.ts) |
|
|
37
|
-
| CLI and recipes | Provides the same context, health, and curation commands. Client recipes print a launch entry for the current installation. | [Context CLI](../src/context-cli.ts) · [Curation CLI](../src/curation-cli.ts) · [Client recipes](../src/brain/client-config.ts) |
|
|
38
|
-
| Workflow and skills | Routes advisory tasks and exposes six focused skill files for supported project layouts. | [Task workflow](../src/brain/task-workflow.ts) · [Skill installer](../src/brain/workflow-skills.ts) · [Skills](../skills/) |
|
|
39
|
-
| Live journal | Records bounded metadata for measured tool activity and explicitly reported host phases. Readers receive cursors and gap information. | [Activity journal](../src/brain/activity-journal.ts) · [Activity reporting](../src/brain/activity-reporting.ts) |
|
|
40
|
-
| Live operations | Shows selected sessions and events, measured timing, and replay over loaded journal records. | [Live workspace](../src/dashboard/live-workspace-html.ts) |
|
|
41
|
-
| Runtime switches | Persists the five feature controls with revision checks. Profile and expansion selection belong to individual requests. The project feedback sidecar holds its own reversible influence switch. | [Feature settings](../src/brain/feature-settings.ts) · [Project feedback](../src/brain/project-feedback.ts) |
|
|
42
|
-
| Synthetic tour | Runs the workspace and recorded sample activity on loopback with a temporary store and scripted MCP calls. | [Demo workspace](../src/dashboard/demo-workspace.ts) |
|
|
43
|
-
| Package entry | Publishes the library exports and the `shadow-brain` and `asb` commands. | [Library exports](../src/index.ts) · [CLI entry](../src/cli.ts) · [Package manifest](../package.json) |
|
|
44
|
-
|
|
45
|
-
The memory store and curation use separate schema-1 files. Project feedback is stored separately in the selected project's `.shadow-brain/memory-feedback.json`. Review and link operations preserve the original text. Assembly and inspection read the local view without committing pending writes. The local core treats each source reference as recorded text. Verify claims against the project evidence.
|
|
46
|
-
|
|
47
|
-
## Retained components
|
|
48
|
-
|
|
49
|
-
The previous dashboard is available at `/advanced` on the normal dashboard server. Other components remain available through their existing CLI, exports, integrations, or source files. Some have separate stores, model settings, runtimes, or operating requirements. The matrix identifies where to start inspecting them. Use the individual module and its tests to establish behavior in your configuration.
|
|
50
|
-
|
|
51
|
-
| Area | Existing components | Where to start |
|
|
52
|
-
| --- | --- | --- |
|
|
53
|
-
| Project observation and analysis | File and Git watchers, orchestrator, project context, AST and semantic analysis, project presets, code metrics, code age, accessibility, and health scoring | [Watchers](../src/watchers/) · [Orchestrator](../src/brain/orchestrator.ts) · [Analyzer](../src/brain/analyzer.ts) |
|
|
54
|
-
| Dependency and code graphs | Dependency and knowledge graphs, influence maps, causal chains, graph walker, memory graph, and code similarity | [Dependency graph](../src/brain/dependency-graph.ts) · [Knowledge graph](../src/brain/knowledge-graph.ts) · [Memory graph](../src/brain/memory-graph.ts) |
|
|
55
|
-
| Review and diagnostics | API and environment analysis, dead-code detection, mutation advice, i18n, license compliance, security checks, configuration drift, PR review, and fix suggestions | [API contracts](../src/brain/api-contract-analyzer.ts) · [Security audit](../src/brain/security-audit.ts) · [Smart fix](../src/brain/smart-fix.ts) |
|
|
56
|
-
| Model and provider integrations | Model registry, client-specific adapters, local LLM support, multimodal helpers, provider-driven analyzers, and LSP integration | [Adapters](../src/adapters/) · [LLM client](../src/brain/llm-client.ts) · [Local LLM](../src/brain/local-llm.ts) · [LSP server](../src/brain/lsp-server.ts) |
|
|
57
|
-
| Other recall paths | Associative context recall, hierarchical and tiered memory, working memory, pattern memory, embeddings, reranking, query expansion, and caches | [Context recall](../src/brain/context-recall.ts) · [Embeddings](../src/brain/embeddings-v2.ts) · [Recall cache](../src/brain/brain-recall-cache.ts) |
|
|
58
|
-
| Continuity and portability | Session briefing, older handoff and resume commands, Live Brain reporting, branch memory, markdown import/export, backups, exchanges, and time capsules | [Session briefing](../src/brain/subconscious.ts) · [Agent handoff](../src/brain/agent-handoff.ts) · [Continuity](../src/brain/context-continuity.ts) · [Portability](../src/brain/brain-portability.ts) |
|
|
59
|
-
| Team and delegation | Team mode and sync, cross-agent protocols, consensus, swarm concepts, delegation helpers, subagent context, and reputation tracking | [Team mode](../src/brain/team-mode.ts) · [Subagent bridge](../src/brain/subagent-bridge.ts) · [Cross-agent protocol](../src/brain/cross-agent-protocol.ts) |
|
|
60
|
-
| Learning and experimentation | Learning engine, consolidation, active learning, forgetting curve, dream and prediction modules, fine-tuning tools, and routing experiments | [Learning engine](../src/brain/learning-engine.ts) · [Dream engine](../src/brain/dream-engine.ts) · [Fine-tuning tools](../tools/lora-pipeline/) |
|
|
61
|
-
| Operational and policy helpers | Session hooks, tracing, cost reporting, plugin system, calibration, firewall, encryption, formal-verification bridge, and quarantine | [Session hooks](../src/brain/session-hooks.ts) · [Tracing](../src/brain/otel-lite.ts) · [Firewall](../src/brain/agent-firewall.ts) · [Plugin system](../src/brain/plugin-system.ts) |
|
|
62
|
-
| Visual, audio, and creative tools | Previous dashboard, standalone replay export, cinematic and ASCII views, 3D graph export, sonification, voice, and creative cards | [Previous dashboard](../src/dashboard/v6-dashboard-html.ts) · [Replay export](../src/brain/brain-replay.ts) · [3D graph](../src/brain/brain-3d.ts) · [Sonification](../src/brain/brain-sonification.ts) |
|
|
63
|
-
|
|
64
|
-
The previous handoff and continuity commands have their own selection and rendering. The automatic session briefing uses the existing context behavior. The new Context Lab and user-selected MCP prompts explicitly request adaptive retrieval. The new Live replay plays loaded journal events. The older replay export remains a separate command.
|
|
65
|
-
|
|
66
|
-
The detailed [source inventory](launch/COMPONENT_MAP_v7.1.4.md#source-inventory) lists retained modules. See [historical versions](versions/README.md) for earlier release surfaces and the [evaluation report](evaluation/CONTEXT_EVALUATION_v7.1.4.md) for the tested scope of adaptive context.
|
|
1
|
+
# Component guide
|
|
2
|
+
|
|
3
|
+
Agent Shadow Brain 7.1.4 shares a project memory store across the workspace, CLI, and standalone MCP service. The project, feature settings, and annotation snapshot determine which records are eligible for a task brief.
|
|
4
|
+
|
|
5
|
+
```mermaid
|
|
6
|
+
flowchart LR
|
|
7
|
+
A[Workspace, CLI, or MCP] --> B[Project and task]
|
|
8
|
+
B --> C[Scoped memory snapshot]
|
|
9
|
+
D[Reviews and recorded links] --> E[Eligible records]
|
|
10
|
+
C --> E
|
|
11
|
+
E --> F[Adaptive or legacy retrieval]
|
|
12
|
+
F --> G[Bounded brief and reasons]
|
|
13
|
+
G --> H[Inspect, compare, or copy]
|
|
14
|
+
H --> I[Explicit memory review]
|
|
15
|
+
I --> D
|
|
16
|
+
H --> M[Observed outcome reported by user or agent]
|
|
17
|
+
M --> N[Project feedback sidecar]
|
|
18
|
+
N --> F
|
|
19
|
+
A --> J[Measured calls and reported phases]
|
|
20
|
+
J --> K[Bounded activity journal]
|
|
21
|
+
K --> L[Live view and recorded replay]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Shared paths
|
|
25
|
+
|
|
26
|
+
| Component | Responsibility | Source |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| Global memory | Loads schema-1 records, preserves queued operations on refresh, and handles storage health and durable commits. | [GlobalBrain](../src/brain/global-brain.ts) |
|
|
29
|
+
| Project-local workspace | Opens a separate store for one selected project and saves explicitly supplied knowledge there. | [Project workspace](../src/dashboard/project-workspace.ts) · [Project memory](../src/brain/project-memory.ts) |
|
|
30
|
+
| Project Kit | Reads bounded marker and manifest evidence, previews a task-specific skill, and applies it with a matching plan hash and ownership receipt. | [Project Kit](../src/brain/project-kit.ts) · [Project inspection](../src/brain/project-kit-inspection.ts) |
|
|
31
|
+
| Reviews and links | Stores review state, relations, and revisioned history separately from original content. | [Memory annotations](../src/brain/memory-annotations.ts) |
|
|
32
|
+
| Retrieval and context | Ranks eligible records, groups duplicates, selects passages, applies the rendered budget, and explains the result. Existing recall remains available. | [Context assembly](../src/brain/context-assembly.ts) · [Adaptive retrieval](../src/brain/context-retrieval.ts) |
|
|
33
|
+
| Project task feedback | Keeps a bounded, revisioned record of reported outcomes and adjusts eligible direct adaptive matches on similar tasks in that project. | [Project feedback](../src/brain/project-feedback.ts) · [Reported outcome guide](LEARNING.md) |
|
|
34
|
+
| Evidence inspection | Returns saved text and recorded references with review and relation details. Health adds bounded review hints. | [Memory inspection](../src/brain/memory-inspection.ts) · [Reference normalization](../src/brain/memory-sources.ts) |
|
|
35
|
+
| Workspace | Serves overview, health, memory, graph, context, comparison, integrations, and settings. The web interface consumes the shared local API. | [Workspace API](../src/dashboard/workspace-api.ts) · [Workspace UI](../src/dashboard/workspace-html.ts) |
|
|
36
|
+
| MCP | Serves 12 tools in the normal memory profile and 17 when launched against a Project Kit store. Both expose local resources and user-selected prompts to compatible hosts. | [Stdio transport](../src/brain/mcp-stdio.ts) · [Server](../src/brain/mcp-server.ts) · [Resources and prompts](../src/brain/memory-mcp-content.ts) |
|
|
37
|
+
| CLI and recipes | Provides the same context, health, and curation commands. Client recipes print a launch entry for the current installation. | [Context CLI](../src/context-cli.ts) · [Curation CLI](../src/curation-cli.ts) · [Client recipes](../src/brain/client-config.ts) |
|
|
38
|
+
| Workflow and skills | Routes advisory tasks and exposes six focused skill files for supported project layouts. | [Task workflow](../src/brain/task-workflow.ts) · [Skill installer](../src/brain/workflow-skills.ts) · [Skills](../skills/) |
|
|
39
|
+
| Live journal | Records bounded metadata for measured tool activity and explicitly reported host phases. Readers receive cursors and gap information. | [Activity journal](../src/brain/activity-journal.ts) · [Activity reporting](../src/brain/activity-reporting.ts) |
|
|
40
|
+
| Live operations | Shows selected sessions and events, measured timing, and replay over loaded journal records. | [Live workspace](../src/dashboard/live-workspace-html.ts) |
|
|
41
|
+
| Runtime switches | Persists the five feature controls with revision checks. Profile and expansion selection belong to individual requests. The project feedback sidecar holds its own reversible influence switch. | [Feature settings](../src/brain/feature-settings.ts) · [Project feedback](../src/brain/project-feedback.ts) |
|
|
42
|
+
| Synthetic tour | Runs the workspace and recorded sample activity on loopback with a temporary store and scripted MCP calls. | [Demo workspace](../src/dashboard/demo-workspace.ts) |
|
|
43
|
+
| Package entry | Publishes the library exports and the `shadow-brain` and `asb` commands. | [Library exports](../src/index.ts) · [CLI entry](../src/cli.ts) · [Package manifest](../package.json) |
|
|
44
|
+
|
|
45
|
+
The memory store and curation use separate schema-1 files. Project feedback is stored separately in the selected project's `.shadow-brain/memory-feedback.json`. Review and link operations preserve the original text. Assembly and inspection read the local view without committing pending writes. The local core treats each source reference as recorded text. Verify claims against the project evidence.
|
|
46
|
+
|
|
47
|
+
## Retained components
|
|
48
|
+
|
|
49
|
+
The previous dashboard is available at `/advanced` on the normal dashboard server. Other components remain available through their existing CLI, exports, integrations, or source files. Some have separate stores, model settings, runtimes, or operating requirements. The matrix identifies where to start inspecting them. Use the individual module and its tests to establish behavior in your configuration.
|
|
50
|
+
|
|
51
|
+
| Area | Existing components | Where to start |
|
|
52
|
+
| --- | --- | --- |
|
|
53
|
+
| Project observation and analysis | File and Git watchers, orchestrator, project context, AST and semantic analysis, project presets, code metrics, code age, accessibility, and health scoring | [Watchers](../src/watchers/) · [Orchestrator](../src/brain/orchestrator.ts) · [Analyzer](../src/brain/analyzer.ts) |
|
|
54
|
+
| Dependency and code graphs | Dependency and knowledge graphs, influence maps, causal chains, graph walker, memory graph, and code similarity | [Dependency graph](../src/brain/dependency-graph.ts) · [Knowledge graph](../src/brain/knowledge-graph.ts) · [Memory graph](../src/brain/memory-graph.ts) |
|
|
55
|
+
| Review and diagnostics | API and environment analysis, dead-code detection, mutation advice, i18n, license compliance, security checks, configuration drift, PR review, and fix suggestions | [API contracts](../src/brain/api-contract-analyzer.ts) · [Security audit](../src/brain/security-audit.ts) · [Smart fix](../src/brain/smart-fix.ts) |
|
|
56
|
+
| Model and provider integrations | Model registry, client-specific adapters, local LLM support, multimodal helpers, provider-driven analyzers, and LSP integration | [Adapters](../src/adapters/) · [LLM client](../src/brain/llm-client.ts) · [Local LLM](../src/brain/local-llm.ts) · [LSP server](../src/brain/lsp-server.ts) |
|
|
57
|
+
| Other recall paths | Associative context recall, hierarchical and tiered memory, working memory, pattern memory, embeddings, reranking, query expansion, and caches | [Context recall](../src/brain/context-recall.ts) · [Embeddings](../src/brain/embeddings-v2.ts) · [Recall cache](../src/brain/brain-recall-cache.ts) |
|
|
58
|
+
| Continuity and portability | Session briefing, older handoff and resume commands, Live Brain reporting, branch memory, markdown import/export, backups, exchanges, and time capsules | [Session briefing](../src/brain/subconscious.ts) · [Agent handoff](../src/brain/agent-handoff.ts) · [Continuity](../src/brain/context-continuity.ts) · [Portability](../src/brain/brain-portability.ts) |
|
|
59
|
+
| Team and delegation | Team mode and sync, cross-agent protocols, consensus, swarm concepts, delegation helpers, subagent context, and reputation tracking | [Team mode](../src/brain/team-mode.ts) · [Subagent bridge](../src/brain/subagent-bridge.ts) · [Cross-agent protocol](../src/brain/cross-agent-protocol.ts) |
|
|
60
|
+
| Learning and experimentation | Learning engine, consolidation, active learning, forgetting curve, dream and prediction modules, fine-tuning tools, and routing experiments | [Learning engine](../src/brain/learning-engine.ts) · [Dream engine](../src/brain/dream-engine.ts) · [Fine-tuning tools](../tools/lora-pipeline/) |
|
|
61
|
+
| Operational and policy helpers | Session hooks, tracing, cost reporting, plugin system, calibration, firewall, encryption, formal-verification bridge, and quarantine | [Session hooks](../src/brain/session-hooks.ts) · [Tracing](../src/brain/otel-lite.ts) · [Firewall](../src/brain/agent-firewall.ts) · [Plugin system](../src/brain/plugin-system.ts) |
|
|
62
|
+
| Visual, audio, and creative tools | Previous dashboard, standalone replay export, cinematic and ASCII views, 3D graph export, sonification, voice, and creative cards | [Previous dashboard](../src/dashboard/v6-dashboard-html.ts) · [Replay export](../src/brain/brain-replay.ts) · [3D graph](../src/brain/brain-3d.ts) · [Sonification](../src/brain/brain-sonification.ts) |
|
|
63
|
+
|
|
64
|
+
The previous handoff and continuity commands have their own selection and rendering. The automatic session briefing uses the existing context behavior. The new Context Lab and user-selected MCP prompts explicitly request adaptive retrieval. The new Live replay plays loaded journal events. The older replay export remains a separate command.
|
|
65
|
+
|
|
66
|
+
The detailed [source inventory](launch/COMPONENT_MAP_v7.1.4.md#source-inventory) lists retained modules. See [historical versions](versions/README.md) for earlier release surfaces and the [evaluation report](evaluation/CONTEXT_EVALUATION_v7.1.4.md) for the tested scope of adaptive context.
|
package/docs/CONTEXT_LAB.md
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
# Context Lab
|
|
2
|
-
|
|
3
|
-
Build a brief from saved project memory, inspect the records and references it contains, and compare adaptive and legacy retrieval before sharing it with another coding agent.
|
|
4
|
-
|
|
5
|
-
## Open the sample workspace
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
shadow-brain demo workspace --port 0 --no-activity
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Open the printed **Workspace** address and select **Context Lab**. The demo seeds two synthetic projects and an initial event journal. Port `0` selects an available loopback port, and `--no-activity` keeps the initial journal snapshot in place. Reviews and settings changed here belong to the temporary demo. Press **Ctrl+C** in its terminal to stop and clean it up.
|
|
12
|
-
|
|
13
|
-
For the existing shared memory store, run `shadow-brain dash . --no-analysis` and choose a project with saved memories. To work with files and knowledge stored inside one project, run `shadow-brain project workspace . --port 0` instead. In that workspace, open **Project Kit**, save a knowledge record, and build a brief for the same project. Saved knowledge remains after the server closes. [Quickstart](QUICKSTART.md) · [Project Kit](PROJECT_KIT.md)
|
|
14
|
-
|
|
15
|
-
## Assemble and inspect a brief
|
|
16
|
-
|
|
17
|
-
1. Choose **Checkout API · demo**, enter `Fix checkout retryBudgetPolicy`, and leave **Retrieval** on **Adaptive**. Use a budget of 2,000 for the first run.
|
|
18
|
-
2. Keep **Expand through recorded supporting and related links** selected to include eligible one-hop neighbors. Select **Assemble context**.
|
|
19
|
-
3. In **Retrieval pipeline**, compare eligible records scanned, distinct records, direct matches, linked candidates, and entries included in the brief. Open **Candidate decisions** to see the matched terms and fields, rank contributions, recorded references, and any link path.
|
|
20
|
-
4. Open a record from **Included memories**, **Excluded memories**, or a candidate. Read its full saved content and review history, then follow the displayed reference to confirm important facts in your own project.
|
|
21
|
-
5. Select **Compare profiles** to run both profiles on the same project, task, and requested budget. Check the shared records and the IDs unique to each profile. A different result can reflect matching, duplicate handling, link expansion, passage length, or the token estimate.
|
|
22
|
-
6. When the selected evidence fits the task, use **Copy brief** or **Download .md**. If the form or curation changes, assemble again before copying.
|
|
23
|
-
|
|
24
|
-

|
|
25
|
-
|
|
26
|
-
The screenshot shows the shipped workspace using synthetic checkout records. [Full showcase](SHOWCASE.md)
|
|
27
|
-
|
|
28
|
-
## Review a record and its links
|
|
29
|
-
|
|
30
|
-
- From **Overview**, select a project scope and use **Attention queue** to find contested records, contradictions, unavailable relation endpoints, duplicates, missing references, and older active records. The report scans up to 5,000 recent records within the selected scope. The queue is a bounded review list. Age starts at 90 days and serves as a review hint.
|
|
31
|
-
- From **Memories**, open the record, choose a **Manual status**, and add a note if it explains the decision. **Active** keeps a record eligible. **Archived** and **Contested** keep it out of assembled context. **Superseded** comes from a recorded replacement link. For a replacement, point `supersedes` from the new record to the old one.
|
|
32
|
-
- To inspect the relationship, open **Graph**, select the memory or edge, and use **Focus recorded links** for the selected memory. Membership and recording-agent edges show where a memory came from. The typed edges represent explicit records, and their endpoints open in the inspector.
|
|
33
|
-
- Return to **Context Lab** and rebuild the same task to see which records remain eligible. A recorded contradiction is displayed as a caution. A missing replacement leaves its superseded predecessor excluded until the relation is removed.
|
|
34
|
-
|
|
35
|
-
Review and link changes use revisions. If another update arrives first, refresh the record and apply the change using the current revision. [Workspace guide](WORKSPACE.md)
|
|
36
|
-
|
|
37
|
-
## How the profiles work
|
|
38
|
-
|
|
39
|
-
| Behavior | Adaptive | Legacy |
|
|
40
|
-
| --- | --- | --- |
|
|
41
|
-
| Matching | Unicode-aware lexical terms, whole code identifier variants, filenames, and recorded source or tag fields | Existing weighted substring matching |
|
|
42
|
-
| Ranking | Scoped term frequency and rarity, task category, phrase and path signals, importance, freshness, and reference presence | Existing recall score blends matching, importance, age, usage, and other-agent copies |
|
|
43
|
-
| Duplicates | Exact normalized text grouped before the distinct-candidate cap, with originating IDs for retained references | Candidate cap applied before duplicate collapse |
|
|
44
|
-
| Excerpt | Shows a passage around a matched content term and can shorten it to fit the budget | Shows the beginning of the record within the existing excerpt limit |
|
|
45
|
-
| Recorded links | Optional one-hop expansion through eligible `supports` and `related` links | Shows recorded relations on selected records |
|
|
46
|
-
| Explanation | Bounded candidate decisions, rank contributions, matched fields, and expansion paths | Existing reasons and exclusions |
|
|
47
|
-
| Project task feedback | The project-local workspace can adjust existing direct matches using reported outcomes from similar tasks | Existing ranking |
|
|
48
|
-
|
|
49
|
-
Both profiles use the requested project scope and apply curation. Broader retrieval needs **Cross-project context** enabled under Features and an explicit choice for the request. A recorded relation never broadens a project's scope.
|
|
50
|
-
|
|
51
|
-
Adaptive diagnostics show up to 200 candidate records, with up to four source references per candidate. Matching reads the first 128,000 characters of exceptionally long saved records and reports when that limit applies. Expansion considers up to two eligible neighbors per seed and up to 16 overall. The rendered character cap includes the heading, excerpt, references, and link cautions. Token estimates depend on the profile and can differ from the receiving model's tokenizer.
|
|
52
|
-
|
|
53
|
-
Scores explain ordering. References record what a memory author cited. The assembler uses saved text and metadata without opening the referenced files or URLs. Treat the copied brief as reference material and verify important facts before relying on it.
|
|
54
|
-
|
|
55
|
-
## Check a reported outcome
|
|
56
|
-
|
|
57
|
-
1. Use a memory in actual project work and check the result. In the project-local workspace, open **Project Kit → Memory outcomes** and record the memory, task, rating, and reason. Add a reference if it helps someone repeat the check.
|
|
58
|
-
2. Reassemble a similar task in Context Lab. If the record is an eligible direct lexical match, its candidate details can show a signed **Project task feedback** contribution and reporter attribution. The JSON diagnostics include the contributing report IDs. Similarity and reporter type affect the contribution. A user's report takes precedence when an agent reported on the same task.
|
|
59
|
-
3. Pause feedback influence and rebuild to inspect the baseline ordering. Pausing keeps the saved reports available. Remove an individual report when it should no longer participate.
|
|
60
|
-
|
|
61
|
-
The contribution adjusts ranking within a small range. Eligibility still comes from the current query, project scope, and curation. [Reported outcome guide](LEARNING.md)
|
|
62
|
-
|
|
63
|
-
## Use the CLI or MCP
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
shadow-brain context-pack "Trace retryBudgetPolicy" --project . --profile adaptive --token-budget 1200 --json
|
|
67
|
-
shadow-brain context-pack "Trace retryBudgetPolicy" --project . --profile adaptive --no-related
|
|
68
|
-
shadow-brain memory-health --project . --limit 20
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
For an existing project ID, substitute `--project-id <id>` for `--project .`. CLI, SDK, and MCP callers that omit the profile use **Legacy**. The workspace selects **Adaptive** initially. The adaptive CLI option `--no-related` is equivalent to `expandRelated: false` in a context request.
|
|
72
|
-
|
|
73
|
-
Through MCP, call `context_pack` with `projectId`, `query`, `profile: "adaptive"`, and an optional `tokenBudget`. Use `memory_inspect` with `projectId` and `memoryId` for a bounded saved record, or `memory_health` with `projectId` to list review hints. A host with prompt support can expose `shadow-task` and `shadow-handoff` as user-selected templates. Generate a project-local client recipe with `shadow-brain project config . --target codex` to use the project's knowledge and feedback with the same client. [Client integration guide](INTEGRATIONS.md)
|
|
74
|
-
|
|
75
|
-
## See the paired results
|
|
76
|
-
|
|
77
|
-
Adaptive passed all 14 author-generated diagnostic cases and Legacy passed 6. Both passed the no-evidence control, the tested project-scope checks, and rendered-budget checks. The cases target specific behaviors such as exact Java matching, late excerpts, duplicate pressure, and one-hop links. [Evaluation report](evaluation/CONTEXT_EVALUATION_v7.1.4.md) · [Raw results](evaluation/CONTEXT_EVALUATION_v7.1.4.json)
|
|
78
|
-
|
|
79
|
-
Reproduce the paired cases from a source checkout with `npm run build` followed by `npm run test:context-eval`.
|
|
1
|
+
# Context Lab
|
|
2
|
+
|
|
3
|
+
Build a brief from saved project memory, inspect the records and references it contains, and compare adaptive and legacy retrieval before sharing it with another coding agent.
|
|
4
|
+
|
|
5
|
+
## Open the sample workspace
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
shadow-brain demo workspace --port 0 --no-activity
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Open the printed **Workspace** address and select **Context Lab**. The demo seeds two synthetic projects and an initial event journal. Port `0` selects an available loopback port, and `--no-activity` keeps the initial journal snapshot in place. Reviews and settings changed here belong to the temporary demo. Press **Ctrl+C** in its terminal to stop and clean it up.
|
|
12
|
+
|
|
13
|
+
For the existing shared memory store, run `shadow-brain dash . --no-analysis` and choose a project with saved memories. To work with files and knowledge stored inside one project, run `shadow-brain project workspace . --port 0` instead. In that workspace, open **Project Kit**, save a knowledge record, and build a brief for the same project. Saved knowledge remains after the server closes. [Quickstart](QUICKSTART.md) · [Project Kit](PROJECT_KIT.md)
|
|
14
|
+
|
|
15
|
+
## Assemble and inspect a brief
|
|
16
|
+
|
|
17
|
+
1. Choose **Checkout API · demo**, enter `Fix checkout retryBudgetPolicy`, and leave **Retrieval** on **Adaptive**. Use a budget of 2,000 for the first run.
|
|
18
|
+
2. Keep **Expand through recorded supporting and related links** selected to include eligible one-hop neighbors. Select **Assemble context**.
|
|
19
|
+
3. In **Retrieval pipeline**, compare eligible records scanned, distinct records, direct matches, linked candidates, and entries included in the brief. Open **Candidate decisions** to see the matched terms and fields, rank contributions, recorded references, and any link path.
|
|
20
|
+
4. Open a record from **Included memories**, **Excluded memories**, or a candidate. Read its full saved content and review history, then follow the displayed reference to confirm important facts in your own project.
|
|
21
|
+
5. Select **Compare profiles** to run both profiles on the same project, task, and requested budget. Check the shared records and the IDs unique to each profile. A different result can reflect matching, duplicate handling, link expansion, passage length, or the token estimate.
|
|
22
|
+
6. When the selected evidence fits the task, use **Copy brief** or **Download .md**. If the form or curation changes, assemble again before copying.
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+
|
|
26
|
+
The screenshot shows the shipped workspace using synthetic checkout records. [Full showcase](SHOWCASE.md)
|
|
27
|
+
|
|
28
|
+
## Review a record and its links
|
|
29
|
+
|
|
30
|
+
- From **Overview**, select a project scope and use **Attention queue** to find contested records, contradictions, unavailable relation endpoints, duplicates, missing references, and older active records. The report scans up to 5,000 recent records within the selected scope. The queue is a bounded review list. Age starts at 90 days and serves as a review hint.
|
|
31
|
+
- From **Memories**, open the record, choose a **Manual status**, and add a note if it explains the decision. **Active** keeps a record eligible. **Archived** and **Contested** keep it out of assembled context. **Superseded** comes from a recorded replacement link. For a replacement, point `supersedes` from the new record to the old one.
|
|
32
|
+
- To inspect the relationship, open **Graph**, select the memory or edge, and use **Focus recorded links** for the selected memory. Membership and recording-agent edges show where a memory came from. The typed edges represent explicit records, and their endpoints open in the inspector.
|
|
33
|
+
- Return to **Context Lab** and rebuild the same task to see which records remain eligible. A recorded contradiction is displayed as a caution. A missing replacement leaves its superseded predecessor excluded until the relation is removed.
|
|
34
|
+
|
|
35
|
+
Review and link changes use revisions. If another update arrives first, refresh the record and apply the change using the current revision. [Workspace guide](WORKSPACE.md)
|
|
36
|
+
|
|
37
|
+
## How the profiles work
|
|
38
|
+
|
|
39
|
+
| Behavior | Adaptive | Legacy |
|
|
40
|
+
| --- | --- | --- |
|
|
41
|
+
| Matching | Unicode-aware lexical terms, whole code identifier variants, filenames, and recorded source or tag fields | Existing weighted substring matching |
|
|
42
|
+
| Ranking | Scoped term frequency and rarity, task category, phrase and path signals, importance, freshness, and reference presence | Existing recall score blends matching, importance, age, usage, and other-agent copies |
|
|
43
|
+
| Duplicates | Exact normalized text grouped before the distinct-candidate cap, with originating IDs for retained references | Candidate cap applied before duplicate collapse |
|
|
44
|
+
| Excerpt | Shows a passage around a matched content term and can shorten it to fit the budget | Shows the beginning of the record within the existing excerpt limit |
|
|
45
|
+
| Recorded links | Optional one-hop expansion through eligible `supports` and `related` links | Shows recorded relations on selected records |
|
|
46
|
+
| Explanation | Bounded candidate decisions, rank contributions, matched fields, and expansion paths | Existing reasons and exclusions |
|
|
47
|
+
| Project task feedback | The project-local workspace can adjust existing direct matches using reported outcomes from similar tasks | Existing ranking |
|
|
48
|
+
|
|
49
|
+
Both profiles use the requested project scope and apply curation. Broader retrieval needs **Cross-project context** enabled under Features and an explicit choice for the request. A recorded relation never broadens a project's scope.
|
|
50
|
+
|
|
51
|
+
Adaptive diagnostics show up to 200 candidate records, with up to four source references per candidate. Matching reads the first 128,000 characters of exceptionally long saved records and reports when that limit applies. Expansion considers up to two eligible neighbors per seed and up to 16 overall. The rendered character cap includes the heading, excerpt, references, and link cautions. Token estimates depend on the profile and can differ from the receiving model's tokenizer.
|
|
52
|
+
|
|
53
|
+
Scores explain ordering. References record what a memory author cited. The assembler uses saved text and metadata without opening the referenced files or URLs. Treat the copied brief as reference material and verify important facts before relying on it.
|
|
54
|
+
|
|
55
|
+
## Check a reported outcome
|
|
56
|
+
|
|
57
|
+
1. Use a memory in actual project work and check the result. In the project-local workspace, open **Project Kit → Memory outcomes** and record the memory, task, rating, and reason. Add a reference if it helps someone repeat the check.
|
|
58
|
+
2. Reassemble a similar task in Context Lab. If the record is an eligible direct lexical match, its candidate details can show a signed **Project task feedback** contribution and reporter attribution. The JSON diagnostics include the contributing report IDs. Similarity and reporter type affect the contribution. A user's report takes precedence when an agent reported on the same task.
|
|
59
|
+
3. Pause feedback influence and rebuild to inspect the baseline ordering. Pausing keeps the saved reports available. Remove an individual report when it should no longer participate.
|
|
60
|
+
|
|
61
|
+
The contribution adjusts ranking within a small range. Eligibility still comes from the current query, project scope, and curation. [Reported outcome guide](LEARNING.md)
|
|
62
|
+
|
|
63
|
+
## Use the CLI or MCP
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
shadow-brain context-pack "Trace retryBudgetPolicy" --project . --profile adaptive --token-budget 1200 --json
|
|
67
|
+
shadow-brain context-pack "Trace retryBudgetPolicy" --project . --profile adaptive --no-related
|
|
68
|
+
shadow-brain memory-health --project . --limit 20
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
For an existing project ID, substitute `--project-id <id>` for `--project .`. CLI, SDK, and MCP callers that omit the profile use **Legacy**. The workspace selects **Adaptive** initially. The adaptive CLI option `--no-related` is equivalent to `expandRelated: false` in a context request.
|
|
72
|
+
|
|
73
|
+
Through MCP, call `context_pack` with `projectId`, `query`, `profile: "adaptive"`, and an optional `tokenBudget`. Use `memory_inspect` with `projectId` and `memoryId` for a bounded saved record, or `memory_health` with `projectId` to list review hints. A host with prompt support can expose `shadow-task` and `shadow-handoff` as user-selected templates. Generate a project-local client recipe with `shadow-brain project config . --target codex` to use the project's knowledge and feedback with the same client. [Client integration guide](INTEGRATIONS.md)
|
|
74
|
+
|
|
75
|
+
## See the paired results
|
|
76
|
+
|
|
77
|
+
Adaptive passed all 14 author-generated diagnostic cases and Legacy passed 6. Both passed the no-evidence control, the tested project-scope checks, and rendered-budget checks. The cases target specific behaviors such as exact Java matching, late excerpts, duplicate pressure, and one-hop links. [Evaluation report](evaluation/CONTEXT_EVALUATION_v7.1.4.md) · [Raw results](evaluation/CONTEXT_EVALUATION_v7.1.4.json)
|
|
78
|
+
|
|
79
|
+
Reproduce the paired cases from a source checkout with `npm run build` followed by `npm run test:context-eval`.
|