@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.
Files changed (66) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/README.md +7 -3
  3. package/dist/brain/auto-update.js +1 -1
  4. package/dist/brain/brain-portability.js +1 -1
  5. package/dist/brain/client-integrations.js +1 -1
  6. package/dist/brain/context-efficiency.d.ts.map +1 -1
  7. package/dist/brain/mcp-presence.js +2 -2
  8. package/dist/brain/mcp-server.js +5 -5
  9. package/dist/brain/native-codex.js +1 -1
  10. package/dist/brain/orchestrator.js +1 -1
  11. package/dist/brain/project-hub-pdf-worker.js +57 -57
  12. package/dist/brain/project-hub-store.js +11 -11
  13. package/dist/cli.js +1 -1
  14. package/dist/dashboard/brain-hub-agent-dock.js +252 -252
  15. package/dist/dashboard/brain-hub-controls.js +61 -61
  16. package/dist/dashboard/brain-hub-exchanges.js +80 -80
  17. package/dist/dashboard/brain-hub-graph.js +336 -336
  18. package/dist/dashboard/brain-hub-html.js +78 -78
  19. package/dist/dashboard/brain-hub-live.js +149 -149
  20. package/dist/dashboard/brain-hub-managed-skills.js +18 -18
  21. package/dist/dashboard/brain-hub-native.js +42 -42
  22. package/dist/dashboard/live-workspace-html.js +1 -1
  23. package/dist/dashboard/project-feedback-html.js +211 -211
  24. package/dist/dashboard/project-kit-html.js +353 -353
  25. package/dist/dashboard/server.js +1 -1
  26. package/dist/dashboard/v6-dashboard-html.js +4261 -4261
  27. package/dist/dashboard/workspace-api.js +1 -1
  28. package/dist/dashboard/workspace-html.js +2534 -2534
  29. package/dist/dashboard/workspace-status.js +1 -1
  30. package/dist/project-cli.js +1 -1
  31. package/docs/BRAND_ASSETS.md +36 -36
  32. package/docs/COMPARISON.md +22 -22
  33. package/docs/COMPONENTS.md +66 -66
  34. package/docs/CONTEXT_LAB.md +79 -79
  35. package/docs/INTEGRATIONS.md +69 -69
  36. package/docs/LEARNING.md +45 -45
  37. package/docs/PROJECT_KIT.md +97 -97
  38. package/docs/SHARING.md +13 -13
  39. package/docs/SHOWCASE.md +87 -87
  40. package/docs/STATS.md +21 -21
  41. package/docs/TROUBLESHOOTING.md +42 -42
  42. package/docs/UPGRADE_PLAN_v7.0.0.md +203 -203
  43. package/docs/WORKFLOW_INTEGRATION.md +125 -125
  44. package/docs/evaluation/CONTEXT_EVALUATION_v7.1.4.json +1818 -1818
  45. package/docs/evaluation/CONTEXT_EVALUATION_v7.1.4.md +36 -36
  46. package/docs/launch/COMPONENT_MAP_v7.1.4.md +122 -122
  47. package/docs/launch/PROJECT_KIT_PLAN_v7.1.4.md +110 -110
  48. package/docs/launch/PROJECT_LEARNING_PLAN_v7.1.4.md +63 -63
  49. package/docs/launch/RELEASE_ACCEPTANCE_v7.22.0.md +48 -48
  50. package/docs/launch/RELEASE_CHECKLIST_v7.0.0.md +24 -24
  51. package/docs/launch/RELEASE_NOTES_v7.0.0.md +44 -44
  52. package/docs/launch/RELEASE_NOTES_v7.1.0.md +32 -32
  53. package/docs/launch/RELEASE_NOTES_v7.1.3.md +40 -40
  54. package/docs/launch/RELEASE_NOTES_v7.1.4.md +30 -30
  55. package/docs/launch/RELEASE_NOTES_v7.2.0.md +24 -24
  56. package/docs/launch/RELEASE_NOTES_v7.22.0.md +53 -53
  57. package/docs/launch/RELEASE_NOTES_v7.22.1.md +11 -0
  58. package/docs/launch/RESEARCH_AND_PLAN_v7.1.4.md +255 -255
  59. package/docs/launch/RESEARCH_AND_PLAN_v7.22.0.md +672 -672
  60. package/package.json +7 -3
  61. package/skills/shadow-debug/SKILL.md +16 -16
  62. package/skills/shadow-implement/SKILL.md +16 -16
  63. package/skills/shadow-release/SKILL.md +16 -16
  64. package/skills/shadow-research/SKILL.md +14 -14
  65. package/skills/shadow-review/SKILL.md +14 -14
  66. package/skills/shadow-workflow/SKILL.md +39 -39
@@ -1,70 +1,70 @@
1
- # Connect a coding client
2
-
3
- Agent Shadow Brain provides six reusable workflow skills, project-specific skill generation, and a local MCP service. Skills guide the host's work; MCP exposes saved memory and context. A client must load the skill or call the tool for it to take effect.
4
-
5
- ## Start with a local project
6
-
7
- Run these commands from the project root:
8
-
9
- ```bash
10
- npm install -g @theihtisham/agent-shadow-brain@7.22.0
11
- shadow-brain project workspace .
12
- shadow-brain project config . --target codex
13
- ```
14
-
15
- The portal stores knowledge in `.shadow-brain/project-memory.json`. The generated recipe pins MCP to that same project and file, so a saved note can be recalled by the agent and its tool calls appear in the matching portal's **Live** view. The recipe is printed, not installed. Merge the entry with your existing host settings, then reconnect the client.
16
-
17
- ![Native configuration recipes](assets/7.1.4-integrations.png)
18
-
19
- ## Choose a client
20
-
21
- | Target | Native recipe | Project skill location |
22
- | --- | --- | --- |
23
- | `codex` | TOML entry for `.codex/config.toml` | `.agents/skills` |
24
- | `claude-code` | JSON entry for `.mcp.json` | `.claude/skills` |
25
- | `opencode` | JSON entry for `opencode.json` | `.opencode/skills` |
26
- | `deepseek-harness` | MCP client plugin YAML entry | `.dsh/skills` |
27
- | `portable` | Common `mcpServers` JSON wrapper | `.agents/skills`, if supported by the host |
28
-
29
- ```bash
30
- shadow-brain project config . --target claude-code
31
- shadow-brain project config . --target opencode
32
- shadow-brain project config . --target deepseek-harness
33
- ```
34
-
35
- Recipes contain an absolute Node executable and installed CLI path. Regenerate them after moving the installation. OpenCode V2 uses `mcp.servers`; consult the documentation for an older host. DeepSeek Harness requires the MCP client plugin and, for skill discovery, the filesystem skill provider. Its documented MCP bridge supports tools and resources; prompt templates are unsupported. A generic wrapper is not universal configuration for every client.
36
-
37
- The legacy Models panel uses provider settings configured for Shadow Brain. It returns model labels and enabled status to the browser. Coding-agent settings stay with their hosts. The old custom-agent configuration endpoint is retired.
38
-
39
- [Codex MCP](https://learn.chatgpt.com/docs/extend/mcp?surface=cli) · [Claude Code MCP](https://code.claude.com/docs/en/mcp) · [OpenCode MCP](https://opencode.ai/docs/mcp-servers/) · [Harness MCP client](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/mcp/mcp-client/README.md) · [Harness filesystem skills](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/skill/skill-filesystem/README.md)
40
-
41
- ## Add workflow skills
42
-
43
- ```bash
44
- shadow-brain skills install . --target codex
45
- shadow-brain skills install . --target codex --apply
46
- shadow-brain clients inspect .
47
- ```
48
-
49
- The first command previews the reusable skill bundle. The second applies it. Local inspection checks only the selected project skill paths; it does not read client profiles or verify that a host loaded a skill. The **Project Kit** view separately generates a tailored skill from observed project evidence and your requirement. [Project Kit guide](PROJECT_KIT.md) · [Bundle installation and safe updates](WORKFLOW_INTEGRATION.md)
50
-
51
- ## Verify a connection
52
-
53
- Ask the connected host to call `workflow_skills`, then `context_pack` with the selected project ID, your current task, and `profile: "adaptive"`. Check the returned memory IDs and sources. A successful host call verifies the connection. With recording enabled, its measured boundaries appear in the matching portal's Live view.
54
-
55
- The memory profile offers scoped tools, resources and task/handoff prompt templates. A project-local MCP launch additionally exposes Project Kit, reviewed source evidence, collaboration, sessions and optional host-reported usage. Use the current `tools/list` response for available tools. Resource references are saved labels; the service does not open their targets. Project tool participation and conversation sharing apply to agent delivery through tools, resources and prompts.
56
-
57
- `activity_report` records explicitly reported phases or spans. Reported activity is labelled separately from measured MCP calls. Neither exposes a model's hidden reasoning.
58
-
59
- ## Keep an existing shared store
60
-
61
- Existing global-store workflows remain available:
62
-
63
- ```bash
64
- shadow-brain dash . --no-analysis
65
- shadow-brain clients config --target codex --project .
66
- ```
67
-
68
- For any other explicit store, add `--db PATH` to `clients config`. This prints a recipe for that file; it does not migrate or merge memory. The default dashboard cannot display a different store's activity journal. Use the project portal and its matching recipe for the simplest isolated setup.
69
-
1
+ # Connect a coding client
2
+
3
+ Agent Shadow Brain provides six reusable workflow skills, project-specific skill generation, and a local MCP service. Skills guide the host's work; MCP exposes saved memory and context. A client must load the skill or call the tool for it to take effect.
4
+
5
+ ## Start with a local project
6
+
7
+ Run these commands from the project root:
8
+
9
+ ```bash
10
+ npm install -g @theihtisham/agent-shadow-brain@7.22.0
11
+ shadow-brain project workspace .
12
+ shadow-brain project config . --target codex
13
+ ```
14
+
15
+ The portal stores knowledge in `.shadow-brain/project-memory.json`. The generated recipe pins MCP to that same project and file, so a saved note can be recalled by the agent and its tool calls appear in the matching portal's **Live** view. The recipe is printed, not installed. Merge the entry with your existing host settings, then reconnect the client.
16
+
17
+ ![Native configuration recipes](assets/7.1.4-integrations.png)
18
+
19
+ ## Choose a client
20
+
21
+ | Target | Native recipe | Project skill location |
22
+ | --- | --- | --- |
23
+ | `codex` | TOML entry for `.codex/config.toml` | `.agents/skills` |
24
+ | `claude-code` | JSON entry for `.mcp.json` | `.claude/skills` |
25
+ | `opencode` | JSON entry for `opencode.json` | `.opencode/skills` |
26
+ | `deepseek-harness` | MCP client plugin YAML entry | `.dsh/skills` |
27
+ | `portable` | Common `mcpServers` JSON wrapper | `.agents/skills`, if supported by the host |
28
+
29
+ ```bash
30
+ shadow-brain project config . --target claude-code
31
+ shadow-brain project config . --target opencode
32
+ shadow-brain project config . --target deepseek-harness
33
+ ```
34
+
35
+ Recipes contain an absolute Node executable and installed CLI path. Regenerate them after moving the installation. OpenCode V2 uses `mcp.servers`; consult the documentation for an older host. DeepSeek Harness requires the MCP client plugin and, for skill discovery, the filesystem skill provider. Its documented MCP bridge supports tools and resources; prompt templates are unsupported. A generic wrapper is not universal configuration for every client.
36
+
37
+ The legacy Models panel uses provider settings configured for Shadow Brain. It returns model labels and enabled status to the browser. Coding-agent settings stay with their hosts. The old custom-agent configuration endpoint is retired.
38
+
39
+ [Codex MCP](https://learn.chatgpt.com/docs/extend/mcp?surface=cli) · [Claude Code MCP](https://code.claude.com/docs/en/mcp) · [OpenCode MCP](https://opencode.ai/docs/mcp-servers/) · [Harness MCP client](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/mcp/mcp-client/README.md) · [Harness filesystem skills](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/skill/skill-filesystem/README.md)
40
+
41
+ ## Add workflow skills
42
+
43
+ ```bash
44
+ shadow-brain skills install . --target codex
45
+ shadow-brain skills install . --target codex --apply
46
+ shadow-brain clients inspect .
47
+ ```
48
+
49
+ The first command previews the reusable skill bundle. The second applies it. Local inspection checks only the selected project skill paths; it does not read client profiles or verify that a host loaded a skill. The **Project Kit** view separately generates a tailored skill from observed project evidence and your requirement. [Project Kit guide](PROJECT_KIT.md) · [Bundle installation and safe updates](WORKFLOW_INTEGRATION.md)
50
+
51
+ ## Verify a connection
52
+
53
+ Ask the connected host to call `workflow_skills`, then `context_pack` with the selected project ID, your current task, and `profile: "adaptive"`. Check the returned memory IDs and sources. A successful host call verifies the connection. With recording enabled, its measured boundaries appear in the matching portal's Live view.
54
+
55
+ The memory profile offers scoped tools, resources and task/handoff prompt templates. A project-local MCP launch additionally exposes Project Kit, reviewed source evidence, collaboration, sessions and optional host-reported usage. Use the current `tools/list` response for available tools. Resource references are saved labels; the service does not open their targets. Project tool participation and conversation sharing apply to agent delivery through tools, resources and prompts.
56
+
57
+ `activity_report` records explicitly reported phases or spans. Reported activity is labelled separately from measured MCP calls. Neither exposes a model's hidden reasoning.
58
+
59
+ ## Keep an existing shared store
60
+
61
+ Existing global-store workflows remain available:
62
+
63
+ ```bash
64
+ shadow-brain dash . --no-analysis
65
+ shadow-brain clients config --target codex --project .
66
+ ```
67
+
68
+ For any other explicit store, add `--db PATH` to `clients config`. This prints a recipe for that file; it does not migrate or merge memory. The default dashboard cannot display a different store's activity journal. Use the project portal and its matching recipe for the simplest isolated setup.
69
+
70
70
  [Workspace guide](WORKSPACE.md) · [MCP specification](https://modelcontextprotocol.io/specification/2025-11-25/server/tools) · [Troubleshooting](TROUBLESHOOTING.md)
package/docs/LEARNING.md CHANGED
@@ -1,46 +1,46 @@
1
- # Learning from work
2
-
3
- Shadow Brain 7.1.4 can reuse project-specific feedback when assembling adaptive context. The loop is explicit: select relevant memory, do the task in the host, observe the result, report what helped or failed, and inspect the effect on later retrieval.
4
-
5
- ```mermaid
6
- flowchart LR
7
- A[Current task] --> B[Scoped adaptive context]
8
- B --> C[Host performs authorized work]
9
- C --> D[Observed outcome]
10
- D --> E[Reported memory feedback]
11
- E --> F[Bounded task-relevant adjustment]
12
- F --> B
13
- E --> G[User review / remove / disable]
14
- ```
15
-
16
- The MCP tool assigns `reporter: agent`; portal and CLI feedback assign `reporter: user`. Neither reporter can claim its result is machine-verified by this system. Source and evidence references are not fetched. A tool call succeeding is not evidence that the task succeeded.
17
-
18
- ## What changes in retrieval
19
-
20
- Feedback operates only on direct lexical candidates that passed normal project and curation filters. It cannot create a match, boost a graph-only neighbor, revive archived/contested/superseded memory, add source provenance, or alter stored memory content.
21
-
22
- The task matcher drops generic action words and compares substantive terms. A report needs at least one substantive overlap and a Jaccard similarity of at least 0.34 with the current query. Up to three recent matching distinct tasks contribute. The adjustment is the mean of each rating value multiplied by task similarity and reporter weight.
23
-
24
- | Input | Value |
25
- | --- | ---: |
26
- | Useful | +0.08 |
27
- | Not useful | -0.04 |
28
- | Incorrect | -0.12 |
29
- | User reporter weight | 1 |
30
- | Agent reporter weight | 0.5 |
31
- | Final adjustment bounds | -0.12 to +0.08 |
32
-
33
- The final score cannot go below zero. The candidate report exposes the signed **Project task feedback** signal, contributing record IDs, and reporter kinds. This is a ranking heuristic, not a confidence or truth score.
34
-
35
- An identical memory/task/reporter combination updates its prior record. When eligible exact-text duplicates are grouped, the newest report from each normalized task can contribute once, with user reports taking precedence over agent reports. Candidate details retain the contributing report IDs. The sidecar is limited to 500 records and 2 MiB, with bounded task, reason and evidence fields. At capacity, a new distinct record is rejected. Existing records can still be updated or removed. Changes use revision checks and atomic file replacement. No age expiry is silently imposed.
36
-
37
- ## Keep control
38
-
39
- - Turn local learning influence off to retain records while restoring baseline adaptive scoring.
40
- - Remove a report to withdraw its influence.
41
- - Use normal memory curation to mark a claim contested or archive an outdated record. An `incorrect` report does not secretly change curation state.
42
- - Review agent reports against actual checks. A plausible explanation can still be wrong.
43
-
44
- This feature is limited to the explicit project workspace and matching local MCP/CLI store. Library callers opt in by passing a `ProjectFeedbackSnapshot` to `assembleContext`. Existing global-store retrieval and legacy profiles do not automatically adopt feedback.
45
-
1
+ # Learning from work
2
+
3
+ Shadow Brain 7.1.4 can reuse project-specific feedback when assembling adaptive context. The loop is explicit: select relevant memory, do the task in the host, observe the result, report what helped or failed, and inspect the effect on later retrieval.
4
+
5
+ ```mermaid
6
+ flowchart LR
7
+ A[Current task] --> B[Scoped adaptive context]
8
+ B --> C[Host performs authorized work]
9
+ C --> D[Observed outcome]
10
+ D --> E[Reported memory feedback]
11
+ E --> F[Bounded task-relevant adjustment]
12
+ F --> B
13
+ E --> G[User review / remove / disable]
14
+ ```
15
+
16
+ The MCP tool assigns `reporter: agent`; portal and CLI feedback assign `reporter: user`. Neither reporter can claim its result is machine-verified by this system. Source and evidence references are not fetched. A tool call succeeding is not evidence that the task succeeded.
17
+
18
+ ## What changes in retrieval
19
+
20
+ Feedback operates only on direct lexical candidates that passed normal project and curation filters. It cannot create a match, boost a graph-only neighbor, revive archived/contested/superseded memory, add source provenance, or alter stored memory content.
21
+
22
+ The task matcher drops generic action words and compares substantive terms. A report needs at least one substantive overlap and a Jaccard similarity of at least 0.34 with the current query. Up to three recent matching distinct tasks contribute. The adjustment is the mean of each rating value multiplied by task similarity and reporter weight.
23
+
24
+ | Input | Value |
25
+ | --- | ---: |
26
+ | Useful | +0.08 |
27
+ | Not useful | -0.04 |
28
+ | Incorrect | -0.12 |
29
+ | User reporter weight | 1 |
30
+ | Agent reporter weight | 0.5 |
31
+ | Final adjustment bounds | -0.12 to +0.08 |
32
+
33
+ The final score cannot go below zero. The candidate report exposes the signed **Project task feedback** signal, contributing record IDs, and reporter kinds. This is a ranking heuristic, not a confidence or truth score.
34
+
35
+ An identical memory/task/reporter combination updates its prior record. When eligible exact-text duplicates are grouped, the newest report from each normalized task can contribute once, with user reports taking precedence over agent reports. Candidate details retain the contributing report IDs. The sidecar is limited to 500 records and 2 MiB, with bounded task, reason and evidence fields. At capacity, a new distinct record is rejected. Existing records can still be updated or removed. Changes use revision checks and atomic file replacement. No age expiry is silently imposed.
36
+
37
+ ## Keep control
38
+
39
+ - Turn local learning influence off to retain records while restoring baseline adaptive scoring.
40
+ - Remove a report to withdraw its influence.
41
+ - Use normal memory curation to mark a claim contested or archive an outdated record. An `incorrect` report does not secretly change curation state.
42
+ - Review agent reports against actual checks. A plausible explanation can still be wrong.
43
+
44
+ This feature is limited to the explicit project workspace and matching local MCP/CLI store. Library callers opt in by passing a `ProjectFeedbackSnapshot` to `assembleContext`. Existing global-store retrieval and legacy profiles do not automatically adopt feedback.
45
+
46
46
  [Project Kit walkthrough](PROJECT_KIT.md) · [Retrieval evaluation](evaluation/CONTEXT_EVALUATION_v7.1.4.md)
@@ -1,98 +1,98 @@
1
- # Project Kit: knowledge and skills for one workspace
2
-
3
- Project Kit combines a local knowledge store, bounded project inspection, task-specific skill generation, and feedback from actual work. Everything belongs to the selected project. Opening another project does not import these memories or install the skill globally.
4
-
5
- ## 1. Open your project
6
-
7
- ```bash
8
- shadow-brain project workspace .
9
- ```
10
-
11
- Open the printed address and choose **Project Kit**. This mode needs no model provider and does not read coding-client profiles. Closing the portal keeps your saved files. The older `dash` command still opens the shared-store dashboard; it does not silently switch or merge stores.
12
-
13
- | File or folder | Purpose |
14
- | --- | --- |
15
- | `.shadow-brain/project-memory.json` | Explicit project knowledge |
16
- | `.shadow-brain/memory-annotations.json` | Reviews and recorded memory relationships |
17
- | `.shadow-brain/feature-settings.json` | Workspace runtime controls |
18
- | `.shadow-brain/activity-journal.json` | Bounded measured/reported activity metadata |
19
- | `.shadow-brain/memory-feedback.json` | Reported outcomes and local learning control |
20
- | `.shadow-brain/project-kit-skills` | Ownership receipts for generated skills |
21
- | `.shadow-brain/disabled-project-skills` | Verified disabled copies outside client discovery paths |
22
- | Selected host's project skill folder | Generated `SKILL.md` files |
23
-
24
- Files are created when their feature needs to save data. Treat knowledge and skill content as project files: decide what belongs in version control before sharing the repository. Moving a project changes its path-derived project ID; this release does not automatically reassign earlier memory IDs to the new location.
25
-
26
- ## 2. Inspect what the project actually declares
27
-
28
- ```bash
29
- shadow-brain project inspect .
30
- ```
31
-
32
- Inspection reports observed stack markers, package-manager markers, and known check names. It scans at most 500 directory entries through depth three, with bounded allowlisted manifest reads. A script named `test` yields a suggested command; its body is not returned or executed. Lockfiles and configuration markers can identify a tool without reading their contents. The scanner skips linked paths, dependency/build trees and private configuration locations.
33
-
34
- These are observations, not complete semantic understanding. Missing manifests, a large monorepo, custom scripts, or an unfamiliar stack can leave gaps. The profile shows coverage and warnings. Check the suggested command before running it.
35
-
36
- ## 3. Add knowledge you want the agent to retain
37
-
38
- Use the knowledge form for a project constraint, decision, rule, or known lesson. An optional reference records where you found it; the service does not fetch that reference or certify the statement.
39
-
40
- ```bash
41
- shadow-brain project knowledge . --title "Checkout retry contract" --content "Preserve the original idempotency key across retries." --source "docs/checkout.md"
42
- ```
43
-
44
- The command returns the committed memory ID and project ID. The original text is stored with explicit user provenance. A reference is recorded only when you supply one, so adding a note without a source does not inflate source coverage.
45
-
46
- Open **Context Lab**, select the project, and ask about checkout retries. The saved note is immediately available to scoped retrieval. You can inspect, contest, archive, or connect it through the existing memory tools.
47
-
48
- ## 4. Turn a requirement into a local skill
49
-
50
- Describe the task, choose a client, and optionally supply knowledge. **Use in skill** reuses the knowledge you just added. Preview shows the exact destination and Markdown before Apply.
51
-
52
- ```bash
53
- shadow-brain project skill . --target codex --name checkout-retries --requirement "Fix checkout retries and verify that each request commits once."
54
- ```
55
-
56
- The output includes `planHash`. Repeat the same inputs with `--apply --expected-plan-hash HASH_FROM_PREVIEW` to write the reviewed plan. The generated skill includes your requirement, supplied knowledge, observed project evidence, and relevant declared checks. It is deterministic; no model or install script runs during generation.
57
-
58
- | Client target | Generated path |
59
- | --- | --- |
60
- | `codex` | `.agents/skills/NAME/SKILL.md` |
61
- | `claude-code` | `.claude/skills/NAME/SKILL.md` |
62
- | `opencode` | `.opencode/skills/NAME/SKILL.md` |
63
- | `deepseek-harness` | `.dsh/skills/NAME/SKILL.md` |
64
- | `portable` | `.agents/skills/NAME/SKILL.md` |
65
-
66
- Apply recomputes the preview, checks path safety and ownership, and refuses stale plans or files that were edited outside Project Kit. An unowned file is not overwritten, even if its name matches. Generated skills do not edit `AGENTS.md`, provider settings, or global skill directories. Host support and skill discovery still need to be checked in the client.
67
-
68
- In **Setup → Managed project skills**, preview Disable, Enable, or Remove to see the affected paths. Disabling moves the verified `SKILL.md` bytes into the workspace’s disabled-skill folder. Enabling restores them only when the discovery path is free. Removal deletes the verified file and its Project Kit receipt. Supporting files and other skill installations stay in place.
69
-
70
- The panel reports edited files, destination conflicts, and pending operations. For a pending operation, review the same action to complete it. Reload the coding client to refresh its skill discovery. An existing chat can still contain instructions it loaded earlier.
71
-
72
- ## 5. Connect the same local knowledge to your agent
73
-
74
- ```bash
75
- shadow-brain project config . --target codex
76
- ```
77
-
78
- Merge the printed recipe into the selected host's configuration. It includes the explicit project directory, project ID and local `--db` path. The connected MCP process then reads the same knowledge shown by the portal.
79
-
80
- The local launch adds `project_inspect`, `project_knowledge`, `project_skill_preview`, `project_skill_apply`, and `project_feedback` to the regular memory tools. Preview/apply is a two-step operation. Saved text and observations remain reference material; they do not override current user instructions or the host's permissions.
81
-
82
- ## 6. Learn from reported outcomes
83
-
84
- After a real task, record whether a selected memory helped. The **Memory outcomes** panel keeps the task, outcome, reason, optional evidence labels and reporter visible. A user report and an agent report remain distinguishable. Agents can call `project_feedback` after observing a concrete result; retrieval alone never creates positive feedback.
85
-
86
- ```bash
87
- shadow-brain project feedback list .
88
- shadow-brain project feedback record . --memory MEMORY_ID --task "Fix checkout retries" --rating useful --reason "The existing idempotency contract matched the passing retry regression check." --evidence "tests/checkout-retry.test.ts"
89
- shadow-brain project feedback set off --project .
90
- ```
91
-
92
- Use `useful`, `not-useful`, or `incorrect`. Record only an outcome you observed; the example reason is not a claim that your tests passed. Feedback is reported evidence, not an automatic truth verdict. The portal lets you remove a record or disable its influence while keeping the history available.
93
-
94
- Adaptive retrieval applies a small signed adjustment only when the memory already matches the current task and the feedback task is relevant. Repeated identical reports are updated instead of counted again. User reports carry more weight than agent reports. Context Lab shows the applied signal and links to reported outcomes; diagnostic JSON retains record IDs. Legacy retrieval, unrelated projects, inactive memories, and empty-query browsing do not gain feedback influence.
95
-
96
- This improves local reuse through outcome feedback. It does not train model weights, verify external sources, execute self-modifying code, or guarantee that an agent's next answer will be correct. [Learning rules and limits](LEARNING.md)
97
-
1
+ # Project Kit: knowledge and skills for one workspace
2
+
3
+ Project Kit combines a local knowledge store, bounded project inspection, task-specific skill generation, and feedback from actual work. Everything belongs to the selected project. Opening another project does not import these memories or install the skill globally.
4
+
5
+ ## 1. Open your project
6
+
7
+ ```bash
8
+ shadow-brain project workspace .
9
+ ```
10
+
11
+ Open the printed address and choose **Project Kit**. This mode needs no model provider and does not read coding-client profiles. Closing the portal keeps your saved files. The older `dash` command still opens the shared-store dashboard; it does not silently switch or merge stores.
12
+
13
+ | File or folder | Purpose |
14
+ | --- | --- |
15
+ | `.shadow-brain/project-memory.json` | Explicit project knowledge |
16
+ | `.shadow-brain/memory-annotations.json` | Reviews and recorded memory relationships |
17
+ | `.shadow-brain/feature-settings.json` | Workspace runtime controls |
18
+ | `.shadow-brain/activity-journal.json` | Bounded measured/reported activity metadata |
19
+ | `.shadow-brain/memory-feedback.json` | Reported outcomes and local learning control |
20
+ | `.shadow-brain/project-kit-skills` | Ownership receipts for generated skills |
21
+ | `.shadow-brain/disabled-project-skills` | Verified disabled copies outside client discovery paths |
22
+ | Selected host's project skill folder | Generated `SKILL.md` files |
23
+
24
+ Files are created when their feature needs to save data. Treat knowledge and skill content as project files: decide what belongs in version control before sharing the repository. Moving a project changes its path-derived project ID; this release does not automatically reassign earlier memory IDs to the new location.
25
+
26
+ ## 2. Inspect what the project actually declares
27
+
28
+ ```bash
29
+ shadow-brain project inspect .
30
+ ```
31
+
32
+ Inspection reports observed stack markers, package-manager markers, and known check names. It scans at most 500 directory entries through depth three, with bounded allowlisted manifest reads. A script named `test` yields a suggested command; its body is not returned or executed. Lockfiles and configuration markers can identify a tool without reading their contents. The scanner skips linked paths, dependency/build trees and private configuration locations.
33
+
34
+ These are observations, not complete semantic understanding. Missing manifests, a large monorepo, custom scripts, or an unfamiliar stack can leave gaps. The profile shows coverage and warnings. Check the suggested command before running it.
35
+
36
+ ## 3. Add knowledge you want the agent to retain
37
+
38
+ Use the knowledge form for a project constraint, decision, rule, or known lesson. An optional reference records where you found it; the service does not fetch that reference or certify the statement.
39
+
40
+ ```bash
41
+ shadow-brain project knowledge . --title "Checkout retry contract" --content "Preserve the original idempotency key across retries." --source "docs/checkout.md"
42
+ ```
43
+
44
+ The command returns the committed memory ID and project ID. The original text is stored with explicit user provenance. A reference is recorded only when you supply one, so adding a note without a source does not inflate source coverage.
45
+
46
+ Open **Context Lab**, select the project, and ask about checkout retries. The saved note is immediately available to scoped retrieval. You can inspect, contest, archive, or connect it through the existing memory tools.
47
+
48
+ ## 4. Turn a requirement into a local skill
49
+
50
+ Describe the task, choose a client, and optionally supply knowledge. **Use in skill** reuses the knowledge you just added. Preview shows the exact destination and Markdown before Apply.
51
+
52
+ ```bash
53
+ shadow-brain project skill . --target codex --name checkout-retries --requirement "Fix checkout retries and verify that each request commits once."
54
+ ```
55
+
56
+ The output includes `planHash`. Repeat the same inputs with `--apply --expected-plan-hash HASH_FROM_PREVIEW` to write the reviewed plan. The generated skill includes your requirement, supplied knowledge, observed project evidence, and relevant declared checks. It is deterministic; no model or install script runs during generation.
57
+
58
+ | Client target | Generated path |
59
+ | --- | --- |
60
+ | `codex` | `.agents/skills/NAME/SKILL.md` |
61
+ | `claude-code` | `.claude/skills/NAME/SKILL.md` |
62
+ | `opencode` | `.opencode/skills/NAME/SKILL.md` |
63
+ | `deepseek-harness` | `.dsh/skills/NAME/SKILL.md` |
64
+ | `portable` | `.agents/skills/NAME/SKILL.md` |
65
+
66
+ Apply recomputes the preview, checks path safety and ownership, and refuses stale plans or files that were edited outside Project Kit. An unowned file is not overwritten, even if its name matches. Generated skills do not edit `AGENTS.md`, provider settings, or global skill directories. Host support and skill discovery still need to be checked in the client.
67
+
68
+ In **Setup → Managed project skills**, preview Disable, Enable, or Remove to see the affected paths. Disabling moves the verified `SKILL.md` bytes into the workspace’s disabled-skill folder. Enabling restores them only when the discovery path is free. Removal deletes the verified file and its Project Kit receipt. Supporting files and other skill installations stay in place.
69
+
70
+ The panel reports edited files, destination conflicts, and pending operations. For a pending operation, review the same action to complete it. Reload the coding client to refresh its skill discovery. An existing chat can still contain instructions it loaded earlier.
71
+
72
+ ## 5. Connect the same local knowledge to your agent
73
+
74
+ ```bash
75
+ shadow-brain project config . --target codex
76
+ ```
77
+
78
+ Merge the printed recipe into the selected host's configuration. It includes the explicit project directory, project ID and local `--db` path. The connected MCP process then reads the same knowledge shown by the portal.
79
+
80
+ The local launch adds `project_inspect`, `project_knowledge`, `project_skill_preview`, `project_skill_apply`, and `project_feedback` to the regular memory tools. Preview/apply is a two-step operation. Saved text and observations remain reference material; they do not override current user instructions or the host's permissions.
81
+
82
+ ## 6. Learn from reported outcomes
83
+
84
+ After a real task, record whether a selected memory helped. The **Memory outcomes** panel keeps the task, outcome, reason, optional evidence labels and reporter visible. A user report and an agent report remain distinguishable. Agents can call `project_feedback` after observing a concrete result; retrieval alone never creates positive feedback.
85
+
86
+ ```bash
87
+ shadow-brain project feedback list .
88
+ shadow-brain project feedback record . --memory MEMORY_ID --task "Fix checkout retries" --rating useful --reason "The existing idempotency contract matched the passing retry regression check." --evidence "tests/checkout-retry.test.ts"
89
+ shadow-brain project feedback set off --project .
90
+ ```
91
+
92
+ Use `useful`, `not-useful`, or `incorrect`. Record only an outcome you observed; the example reason is not a claim that your tests passed. Feedback is reported evidence, not an automatic truth verdict. The portal lets you remove a record or disable its influence while keeping the history available.
93
+
94
+ Adaptive retrieval applies a small signed adjustment only when the memory already matches the current task and the feedback task is relevant. Repeated identical reports are updated instead of counted again. User reports carry more weight than agent reports. Context Lab shows the applied signal and links to reported outcomes; diagnostic JSON retains record IDs. Legacy retrieval, unrelated projects, inactive memories, and empty-query browsing do not gain feedback influence.
95
+
96
+ This improves local reuse through outcome feedback. It does not train model weights, verify external sources, execute self-modifying code, or guarantee that an agent's next answer will be correct. [Learning rules and limits](LEARNING.md)
97
+
98
98
  [Client integration](INTEGRATIONS.md) · [Context Lab](CONTEXT_LAB.md) · [Workspace guide](WORKSPACE.md)
package/docs/SHARING.md CHANGED
@@ -1,13 +1,13 @@
1
- # Share Agent Shadow Brain
2
-
3
- ## Short announcement
4
-
5
- > Agent Shadow Brain 7.1.3 gives coding clients a shared local store for project decisions and lessons. Build a scoped context pack, review the memories behind it, and follow measured MCP calls in the live portal. Project skills and local MCP setup are available for Codex, Claude Code, OpenCode, and DeepSeek Harness.
6
-
7
- [GitHub repository](https://github.com/ihtishaam-dev/agent-shadow-brain) · [7.1.3 release and recording](https://github.com/ihtishaam-dev/agent-shadow-brain/releases/tag/v7.1.3) · [npm package](https://www.npmjs.com/package/@theihtisham/agent-shadow-brain/v/7.1.3) · [Client setup](INTEGRATIONS.md)
8
-
9
- ## Demo caption
10
-
11
- > Scripted local clients run real MCP calls against synthetic project memories. The live portal shows measured tool timing and marks explicitly reported task phases.
12
-
13
- [Live screenshot](assets/live-v7.1.3.png) · [Workspace showcase](SHOWCASE.md)
1
+ # Share Agent Shadow Brain
2
+
3
+ ## Short announcement
4
+
5
+ > Agent Shadow Brain 7.1.3 gives coding clients a shared local store for project decisions and lessons. Build a scoped context pack, review the memories behind it, and follow measured MCP calls in the live portal. Project skills and local MCP setup are available for Codex, Claude Code, OpenCode, and DeepSeek Harness.
6
+
7
+ [GitHub repository](https://github.com/ihtishaam-dev/agent-shadow-brain) · [7.1.3 release and recording](https://github.com/ihtishaam-dev/agent-shadow-brain/releases/tag/v7.1.3) · [npm package](https://www.npmjs.com/package/@theihtisham/agent-shadow-brain/v/7.1.3) · [Client setup](INTEGRATIONS.md)
8
+
9
+ ## Demo caption
10
+
11
+ > Scripted local clients run real MCP calls against synthetic project memories. The live portal shows measured tool timing and marks explicitly reported task phases.
12
+
13
+ [Live screenshot](assets/live-v7.1.3.png) · [Workspace showcase](SHOWCASE.md)