@stackmemoryai/stackmemory 1.10.5 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +131 -64
- package/README.md +107 -24
- package/bin/claude-sm +16 -1
- package/bin/claude-smd +16 -1
- package/bin/codex-smd +16 -1
- package/bin/gemini-sm +16 -1
- package/bin/hermes-sm +21 -0
- package/bin/hermes-smd +21 -0
- package/bin/opencode-sm +16 -1
- package/dist/src/cli/claude-sm.js +266 -84
- package/dist/src/cli/codex-sm.js +225 -33
- package/dist/src/cli/commands/bench.js +209 -2
- package/dist/src/cli/commands/brain.js +206 -0
- package/dist/src/cli/commands/cache.js +126 -0
- package/dist/src/cli/commands/company-os.js +184 -0
- package/dist/src/cli/commands/context.js +5 -0
- package/dist/src/cli/commands/daemon.js +41 -0
- package/dist/src/cli/commands/handoff.js +40 -9
- package/dist/src/cli/commands/onboard.js +70 -3
- package/dist/src/cli/commands/operator.js +127 -0
- package/dist/src/cli/commands/optimize.js +117 -0
- package/dist/src/cli/commands/orchestrate.js +232 -5
- package/dist/src/cli/commands/orchestrator.js +315 -26
- package/dist/src/cli/commands/pack.js +322 -0
- package/dist/src/cli/commands/patterns.js +254 -0
- package/dist/src/cli/commands/portal.js +161 -0
- package/dist/src/cli/commands/scaffold.js +92 -0
- package/dist/src/cli/commands/search.js +40 -1
- package/dist/src/cli/commands/setup.js +178 -11
- package/dist/src/cli/commands/skills.js +10 -1
- package/dist/src/cli/commands/state.js +265 -0
- package/dist/src/cli/commands/sync.js +253 -0
- package/dist/src/cli/commands/tasks.js +130 -1
- package/dist/src/cli/commands/vision.js +221 -0
- package/dist/src/cli/gemini-sm.js +19 -29
- package/dist/src/cli/hermes-sm.js +224 -0
- package/dist/src/cli/index.js +105 -39
- package/dist/src/cli/opencode-sm.js +38 -21
- package/dist/src/cli/utils/determinism-watcher.js +66 -0
- package/dist/src/cli/utils/real-cli-bin.js +116 -0
- package/dist/src/core/brain/brain-store.js +187 -0
- package/dist/src/core/brain/brain-sync.js +193 -0
- package/dist/src/core/brain/index.js +78 -0
- package/dist/src/core/brain/types.js +10 -0
- package/dist/src/core/cache/content-cache.js +238 -0
- package/dist/src/{integrations/diffmem → core/cache}/index.js +5 -5
- package/dist/src/core/cache/token-estimator.js +39 -0
- package/dist/src/core/config/feature-flags.js +2 -6
- package/dist/src/core/context/frame-database.js +79 -27
- package/dist/src/core/context/recursive-context-manager.js +1 -1
- package/dist/src/core/context/rehydration.js +2 -1
- package/dist/src/core/cross-search/cross-project-search.js +269 -0
- package/dist/src/core/cross-search/index.js +10 -0
- package/dist/src/core/database/sqlite-adapter.js +14 -84
- package/dist/src/core/extensions/provider-adapter.js +5 -0
- package/dist/src/core/models/model-router.js +54 -2
- package/dist/src/core/models/provider-pricing.js +58 -4
- package/dist/src/core/monitoring/logger.js +2 -1
- package/dist/src/core/optimization/trace-optimizer.js +413 -0
- package/dist/src/core/patterns/index.js +22 -0
- package/dist/src/core/patterns/pattern-applier.js +39 -0
- package/dist/src/core/patterns/pattern-observer.js +157 -0
- package/dist/src/core/patterns/pattern-store.js +259 -0
- package/dist/src/core/patterns/types.js +19 -0
- package/dist/src/core/provenance/confidence-scorer.js +128 -0
- package/dist/src/core/provenance/index.js +40 -0
- package/dist/src/core/provenance/provenance-store.js +194 -0
- package/dist/src/core/provenance/types.js +82 -0
- package/dist/src/core/retrieval/llm-context-retrieval.js +5 -4
- package/dist/src/core/retrieval/unified-context-assembler.js +11 -66
- package/dist/src/core/session/project-handoff.js +64 -0
- package/dist/src/core/session/session-manager.js +28 -0
- package/dist/src/core/shared-state/canonical-store.js +564 -0
- package/dist/src/core/skill-packs/index.js +18 -0
- package/dist/src/core/skill-packs/parser.js +42 -0
- package/dist/src/core/skill-packs/registry.js +224 -0
- package/dist/src/core/skill-packs/types.js +79 -0
- package/dist/src/core/storage/cloud-sync-manager.js +116 -0
- package/dist/src/core/storage/cloud-sync.js +574 -0
- package/dist/src/core/storage/two-tier-storage.js +5 -1
- package/dist/src/core/tasks/master-tasks-template.js +43 -0
- package/dist/src/core/tasks/md-task-parser.js +138 -0
- package/dist/src/core/trace/trace-event-store.js +282 -0
- package/dist/src/core/vision/index.js +27 -0
- package/dist/src/core/vision/signals.js +79 -0
- package/dist/src/core/vision/types.js +22 -0
- package/dist/src/core/vision/vision-file.js +146 -0
- package/dist/src/core/vision/vision-loop.js +220 -0
- package/dist/src/core/wiki/wiki-compiler.js +103 -1
- package/dist/src/daemon/daemon-config.js +52 -0
- package/dist/src/daemon/services/desire-path-service.js +566 -0
- package/dist/src/daemon/services/github-service.js +126 -0
- package/dist/src/daemon/services/research-stream-service.js +320 -0
- package/dist/src/daemon/services/telemetry-service.js +192 -0
- package/dist/src/daemon/unified-daemon.js +58 -1
- package/dist/src/features/browser/cli-browser-agent.js +417 -0
- package/dist/src/features/browser/stagehand-workflows.js +578 -0
- package/dist/src/features/operator/adapter-factory.js +62 -0
- package/dist/src/features/operator/browser-adapter.js +109 -0
- package/dist/src/features/operator/desktop-adapter.js +125 -0
- package/dist/src/features/operator/index.js +39 -0
- package/dist/src/features/operator/llm-decision.js +137 -0
- package/dist/src/features/operator/operator-logger.js +92 -0
- package/dist/src/features/operator/overnight-runner.js +327 -0
- package/dist/src/features/operator/screen-adapter.js +91 -0
- package/dist/src/features/operator/session-manager.js +127 -0
- package/dist/src/features/operator/state-machine.js +227 -0
- package/dist/src/features/operator/task-queue.js +81 -0
- package/dist/src/features/portal/index.js +26 -0
- package/dist/src/features/portal/server.js +240 -0
- package/dist/src/features/portal/types.js +14 -0
- package/dist/src/features/portal/ui.js +195 -0
- package/dist/src/features/sweep/pty-wrapper.js +13 -5
- package/dist/src/features/tasks/task-aware-context.js +2 -1
- package/dist/src/features/tui/simple-monitor.js +0 -23
- package/dist/src/features/tui/swarm-monitor.js +8 -66
- package/dist/src/features/web/client/hooks/use-socket.js +12 -0
- package/dist/src/{core/merge/index.js → features/web/client/lib/utils.js} +8 -4
- package/dist/src/features/web/client/next-env.d.js +4 -0
- package/dist/src/features/web/client/stores/session-store.js +12 -0
- package/dist/src/features/web/server/gcp-billing.js +76 -0
- package/dist/src/features/web/server/index.js +10 -0
- package/dist/src/features/web/server/spend-calculator.js +228 -0
- package/dist/src/hooks/schemas.js +6 -1
- package/dist/src/integrations/anthropic/client.js +3 -2
- package/dist/src/integrations/claude-code/agent-bridge.js +0 -3
- package/dist/src/integrations/claude-code/subagent-client.js +307 -11
- package/dist/src/integrations/claude-code/task-coordinator.js +2 -1
- package/dist/src/integrations/github/pr-state.js +158 -0
- package/dist/src/integrations/linear/client.js +4 -1
- package/dist/src/integrations/linear/webhook-retry.js +196 -0
- package/dist/src/integrations/linear/webhook-server.js +18 -22
- package/dist/src/integrations/mcp/handlers/cloud-sync-handlers.js +101 -0
- package/dist/src/integrations/mcp/handlers/index.js +40 -84
- package/dist/src/integrations/mcp/server.js +542 -641
- package/dist/src/integrations/mcp/tool-alias-registry.js +297 -0
- package/dist/src/integrations/mcp/tool-definitions.js +152 -682
- package/dist/src/mcp/stackmemory-mcp-server.js +571 -231
- package/dist/src/orchestrators/multimodal/determinism.js +244 -0
- package/dist/src/orchestrators/multimodal/harness.js +149 -78
- package/dist/src/orchestrators/multimodal/providers.js +44 -3
- package/dist/src/skills/recursive-agent-orchestrator.js +2 -4
- package/dist/src/utils/hook-installer.js +0 -8
- package/dist/src/utils/process-cleanup.js +1 -7
- package/docs/README.md +42 -0
- package/docs/guides/README_INSTALL.md +208 -0
- package/package.json +27 -9
- package/packs/coding/python-fastapi/instructions.md +60 -0
- package/packs/coding/python-fastapi/pack.yaml +28 -0
- package/packs/coding/typescript-react/instructions.md +47 -0
- package/packs/coding/typescript-react/pack.yaml +28 -0
- package/packs/core/commands/capture.md +32 -0
- package/packs/core/commands/learn.md +73 -0
- package/packs/core/commands/next.md +36 -0
- package/packs/core/commands/restart.md +58 -0
- package/packs/core/commands/restore.md +29 -0
- package/packs/core/commands/start.md +57 -0
- package/packs/core/commands/stop.md +65 -0
- package/packs/core/commands/summary.md +40 -0
- package/packs/core/manifest.json +24 -0
- package/packs/ops/decision-recovery/instructions.md +65 -0
- package/packs/ops/decision-recovery/pack.yaml +89 -0
- package/scripts/claude-code-wrapper.sh +11 -0
- package/scripts/claude-sm-setup.sh +12 -1
- package/scripts/codex-wrapper.sh +11 -0
- package/scripts/git-hooks/branch-context-manager.sh +11 -0
- package/scripts/git-hooks/post-checkout-stackmemory.sh +11 -0
- package/scripts/git-hooks/post-commit-stackmemory.sh +11 -0
- package/scripts/git-hooks/pre-commit-stackmemory.sh +11 -0
- package/scripts/hooks/cleanup-shell.sh +12 -1
- package/scripts/hooks/task-complete.sh +12 -1
- package/scripts/install-code-execution-hooks.sh +12 -1
- package/scripts/install-sweep-hook.sh +12 -0
- package/scripts/install.sh +11 -0
- package/scripts/opencode-wrapper.sh +11 -0
- package/scripts/portal/cloud-init.yaml +69 -0
- package/scripts/portal/setup.sh +69 -0
- package/scripts/portal/stackmemory-portal.service +34 -0
- package/scripts/setup-claude-integration.sh +12 -1
- package/scripts/smoke-init-db.sh +23 -0
- package/scripts/stackmemory-daemon.sh +11 -0
- package/scripts/verify-dist.cjs +11 -4
- package/dist/src/cli/commands/ralph.js +0 -1053
- package/dist/src/cli/commands/team.js +0 -168
- package/dist/src/core/context/shared-context-layer.js +0 -620
- package/dist/src/core/context/stack-merge-resolver.js +0 -748
- package/dist/src/core/merge/conflict-detector.js +0 -430
- package/dist/src/core/merge/resolution-engine.js +0 -557
- package/dist/src/core/merge/stack-diff.js +0 -531
- package/dist/src/core/merge/unified-merge-resolver.js +0 -302
- package/dist/src/hooks/diffmem-hooks.js +0 -376
- package/dist/src/integrations/diffmem/client.js +0 -208
- package/dist/src/integrations/diffmem/config.js +0 -14
- package/dist/src/integrations/greptile/client.js +0 -101
- package/dist/src/integrations/greptile/config.js +0 -14
- package/dist/src/integrations/greptile/index.js +0 -11
- package/dist/src/integrations/mcp/handlers/cord-handlers.js +0 -397
- package/dist/src/integrations/mcp/handlers/diffmem-handlers.js +0 -455
- package/dist/src/integrations/mcp/handlers/greptile-handlers.js +0 -456
- package/dist/src/integrations/mcp/handlers/provider-handlers.js +0 -227
- package/dist/src/integrations/mcp/handlers/team-handlers.js +0 -211
- package/dist/src/integrations/ralph/bridge/ralph-stackmemory-bridge.js +0 -863
- package/dist/src/integrations/ralph/context/context-budget-manager.js +0 -308
- package/dist/src/integrations/ralph/context/stackmemory-context-loader.js +0 -391
- package/dist/src/integrations/ralph/index.js +0 -17
- package/dist/src/integrations/ralph/learning/pattern-learner.js +0 -435
- package/dist/src/integrations/ralph/lifecycle/iteration-lifecycle.js +0 -448
- package/dist/src/integrations/ralph/loopmax.js +0 -488
- package/dist/src/integrations/ralph/monitoring/swarm-dashboard.js +0 -293
- package/dist/src/integrations/ralph/monitoring/swarm-registry.js +0 -107
- package/dist/src/integrations/ralph/orchestration/multi-loop-orchestrator.js +0 -508
- package/dist/src/integrations/ralph/patterns/compounding-engineering-pattern.js +0 -407
- package/dist/src/integrations/ralph/patterns/extended-coherence-sessions.js +0 -495
- package/dist/src/integrations/ralph/patterns/oracle-worker-pattern.js +0 -387
- package/dist/src/integrations/ralph/performance/performance-optimizer.js +0 -357
- package/dist/src/integrations/ralph/recovery/crash-recovery.js +0 -461
- package/dist/src/integrations/ralph/state/state-reconciler.js +0 -420
- package/dist/src/integrations/ralph/swarm/git-workflow-manager.js +0 -444
- package/dist/src/integrations/ralph/swarm/swarm-coordinator.js +0 -1007
- package/dist/src/integrations/ralph/visualization/ralph-debugger.js +0 -635
- package/scripts/ralph-loop-implementation.js +0 -404
- /package/dist/src/core/{merge → cache}/types.js +0 -0
- /package/dist/src/{integrations/diffmem/types.js → core/storage/cloud-sync-types.js} +0 -0
- /package/dist/src/{integrations/greptile/types.js → core/trace/trace-event.js} +0 -0
- /package/dist/src/{integrations/ralph → features/operator}/types.js +0 -0
package/LICENSE
CHANGED
|
@@ -1,64 +1,131 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
1
|
+
PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
https://polyformproject.org/licenses/noncommercial/1.0.0
|
|
4
|
+
|
|
5
|
+
Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree
|
|
8
|
+
to them as both strict obligations and conditions to all
|
|
9
|
+
your licenses.
|
|
10
|
+
|
|
11
|
+
Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the
|
|
14
|
+
software to do everything you might do with the software
|
|
15
|
+
that would otherwise infringe the licensor's copyright
|
|
16
|
+
in it for any permitted purpose. However, you may
|
|
17
|
+
only distribute the software according to Distribution
|
|
18
|
+
License and make changes or new works
|
|
19
|
+
based on the software according to Changes and New Works
|
|
20
|
+
License.
|
|
21
|
+
|
|
22
|
+
Distribution License
|
|
23
|
+
|
|
24
|
+
The licensor grants you an additional copyright license
|
|
25
|
+
to distribute copies of the software. Your license
|
|
26
|
+
to distribute covers distributing the software with
|
|
27
|
+
changes and new works permitted by Changes and New Works
|
|
28
|
+
License.
|
|
29
|
+
|
|
30
|
+
Notices
|
|
31
|
+
|
|
32
|
+
You must ensure that anyone who gets a copy of any part of
|
|
33
|
+
the software from you also gets a copy of these terms or the
|
|
34
|
+
URL for them above, as well as copies of any plain-text lines
|
|
35
|
+
beginning with `Required Notice:` that the licensor provided
|
|
36
|
+
with the software. For example:
|
|
37
|
+
|
|
38
|
+
> Required Notice: Copyright StackMemory AI (https://stackmemory.ai)
|
|
39
|
+
|
|
40
|
+
Changes and New Works License
|
|
41
|
+
|
|
42
|
+
The licensor grants you an additional copyright license to
|
|
43
|
+
make changes and new works based on the software for any
|
|
44
|
+
permitted purpose.
|
|
45
|
+
|
|
46
|
+
Patent License
|
|
47
|
+
|
|
48
|
+
The licensor grants you a patent license for the software that
|
|
49
|
+
covers patent claims the licensor can license, or becomes able
|
|
50
|
+
to license, that you would infringe by using the software.
|
|
51
|
+
|
|
52
|
+
Noncommercial Purposes
|
|
53
|
+
|
|
54
|
+
Any noncommercial purpose is a permitted purpose.
|
|
55
|
+
|
|
56
|
+
Personal Uses
|
|
57
|
+
|
|
58
|
+
Personal use for research, experiment, and testing for
|
|
59
|
+
the benefit of public knowledge, personal study, private
|
|
60
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
61
|
+
observance, without any anticipated commercial application,
|
|
62
|
+
is use for a permitted purpose.
|
|
63
|
+
|
|
64
|
+
Noncommercial Organizations
|
|
65
|
+
|
|
66
|
+
Use by any charitable organization, educational institution,
|
|
67
|
+
public research organization, public safety or health
|
|
68
|
+
organization, environmental protection organization,
|
|
69
|
+
or government institution is use for a permitted purpose
|
|
70
|
+
regardless of the source of funding or obligations resulting
|
|
71
|
+
from the funding.
|
|
72
|
+
|
|
73
|
+
Fair Use
|
|
74
|
+
|
|
75
|
+
You may have "fair use" rights for the software under the
|
|
76
|
+
law. These terms do not limit them.
|
|
77
|
+
|
|
78
|
+
No Other Rights
|
|
79
|
+
|
|
80
|
+
These terms do not allow you to sublicense or transfer any of
|
|
81
|
+
your licenses to anyone else, or prevent the licensor from
|
|
82
|
+
granting licenses to anyone else. These terms do not imply
|
|
83
|
+
any other licenses.
|
|
84
|
+
|
|
85
|
+
Patent Defense
|
|
86
|
+
|
|
87
|
+
If you make any written claim that the software infringes or
|
|
88
|
+
contributes to infringement of any patent, your patent license
|
|
89
|
+
for the software granted under these terms ends immediately. If
|
|
90
|
+
your company makes such a claim, your patent license ends
|
|
91
|
+
immediately for work on behalf of your company.
|
|
92
|
+
|
|
93
|
+
Violations
|
|
94
|
+
|
|
95
|
+
The first time you are notified in writing that you have
|
|
96
|
+
violated any of these terms, or done anything with the software
|
|
97
|
+
not covered by your licenses, your licenses can nonetheless
|
|
98
|
+
continue if you come into full compliance with these terms,
|
|
99
|
+
and take practical steps to correct past violations, within
|
|
100
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
101
|
+
end immediately.
|
|
102
|
+
|
|
103
|
+
No Liability
|
|
104
|
+
|
|
105
|
+
As far as the law allows, the software comes as is, without
|
|
106
|
+
any warranty or condition, and the licensor will not be liable
|
|
107
|
+
to you for any damages arising out of these terms or the use
|
|
108
|
+
or nature of the software, under any kind of legal claim.
|
|
109
|
+
|
|
110
|
+
Definitions
|
|
111
|
+
|
|
112
|
+
The licensor is the individual or entity offering these
|
|
113
|
+
terms, and the software is the software the licensor makes
|
|
114
|
+
available under these terms.
|
|
115
|
+
|
|
116
|
+
You refers to the individual or entity agreeing to these
|
|
117
|
+
terms.
|
|
118
|
+
|
|
119
|
+
Your company is any legal entity, sole proprietorship,
|
|
120
|
+
or other kind of organization that you work for, plus all
|
|
121
|
+
organizations that have control over, are under the control of,
|
|
122
|
+
or are under common control with that organization. Control
|
|
123
|
+
means ownership of substantially all the assets of an entity,
|
|
124
|
+
or the power to direct its management and policies by vote,
|
|
125
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
126
|
+
|
|
127
|
+
Your licenses are all the licenses granted to you for the
|
|
128
|
+
software under these terms.
|
|
129
|
+
|
|
130
|
+
Use means anything you do with the software requiring one
|
|
131
|
+
of your licenses.
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Lossless, project-scoped memory for AI coding tools. **[Website](https://stackme
|
|
|
14
14
|
StackMemory is a **production-ready memory runtime** for AI coding tools that preserves full project context across sessions:
|
|
15
15
|
|
|
16
16
|
- **Zero-config setup** — `stackmemory init` just works
|
|
17
|
-
- **
|
|
17
|
+
- **73 MCP tools** for Claude Code integration (context, tasks, Linear, traces, discovery, cord, team, planning, providers, and more)
|
|
18
18
|
- **FTS5 full-text search** with BM25 scoring and hybrid retrieval
|
|
19
19
|
- **Full Linear integration** with bidirectional sync and OAuth/API key support
|
|
20
20
|
- **Context persistence** that survives `/clear` operations
|
|
@@ -97,6 +97,16 @@ stackmemory doctor
|
|
|
97
97
|
|
|
98
98
|
Restart Claude Code and StackMemory MCP tools will be available.
|
|
99
99
|
|
|
100
|
+
### Also available as `croissant-ai`
|
|
101
|
+
|
|
102
|
+
[croissant.ai](https://croissant.ai) wraps StackMemory as a business-facing CLI for executive intelligence. Install via `npx croissant-ai` — all unknown commands forward to StackMemory automatically.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npx croissant-ai ask "What's our MRR?" # croissant.ai query API
|
|
106
|
+
npx croissant-ai memory capture # → stackmemory capture
|
|
107
|
+
npx croissant-ai init # → stackmemory init (fallback)
|
|
108
|
+
```
|
|
109
|
+
|
|
100
110
|
### Wrapper Scripts
|
|
101
111
|
|
|
102
112
|
StackMemory ships wrapper scripts that launch your coding tool with StackMemory context pre-loaded:
|
|
@@ -132,6 +142,44 @@ Runs as an MCP server. Editors (e.g., Claude Code) call StackMemory on each inte
|
|
|
132
142
|
|
|
133
143
|
---
|
|
134
144
|
|
|
145
|
+
## Command Packs
|
|
146
|
+
|
|
147
|
+
StackMemory ships installable command packs for Claude Code — curated slash commands that integrate session lifecycle management directly into your workflow.
|
|
148
|
+
|
|
149
|
+
### Core Pack
|
|
150
|
+
|
|
151
|
+
The **core** pack provides session lifecycle commands that use StackMemory for context persistence:
|
|
152
|
+
|
|
153
|
+
| Command | Description |
|
|
154
|
+
|---------|-------------|
|
|
155
|
+
| `/start` | Boot a session — load memory, restore handoff, show git state, suggest next work |
|
|
156
|
+
| `/stop` | End a session — summarize, capture handoff, review learnings |
|
|
157
|
+
| `/restart` | Chain `/stop` → `/clear` → `/start` in one command |
|
|
158
|
+
| `/next` | Suggest what to work on based on context |
|
|
159
|
+
|
|
160
|
+
Internal dependencies (installed automatically): `/summary`, `/capture`, `/learn`, `/restore`
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Install core commands
|
|
164
|
+
stackmemory setup-commands
|
|
165
|
+
|
|
166
|
+
# List available packs
|
|
167
|
+
stackmemory setup-commands --list
|
|
168
|
+
|
|
169
|
+
# Preview what would be installed
|
|
170
|
+
stackmemory setup-commands --dry-run
|
|
171
|
+
|
|
172
|
+
# Reinstall (overwrite existing)
|
|
173
|
+
stackmemory setup-commands --force
|
|
174
|
+
|
|
175
|
+
# Remove installed commands
|
|
176
|
+
stackmemory setup-commands --uninstall
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Commands are symlinked to `~/.claude/commands/` and available immediately in Claude Code.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
135
183
|
## Skills System
|
|
136
184
|
|
|
137
185
|
StackMemory ships Claude Code skills that integrate directly into your workflow. Skills are invoked via `/skill-name` in Claude Code or `stackmemory skills <name>` from the CLI.
|
|
@@ -272,34 +320,54 @@ claude-sm
|
|
|
272
320
|
|
|
273
321
|
---
|
|
274
322
|
|
|
275
|
-
## RLM
|
|
323
|
+
## RLM-Aware Harness
|
|
324
|
+
|
|
325
|
+
StackMemory includes an RLM (Recursive Language Model) system inspired by [predict-rlm](https://github.com/Trampoline-AI/predict-rlm) — three layers that make agents self-harnessing:
|
|
326
|
+
|
|
327
|
+
### Layer 1: Context-as-REPL
|
|
328
|
+
|
|
329
|
+
Agents access tenant data programmatically via tool functions instead of prose handoffs:
|
|
330
|
+
|
|
331
|
+
- `search_knowledge(query, topK)` — vector search over tenant data
|
|
332
|
+
- `read_context(query)` — knowledge graph entity/relationship queries
|
|
333
|
+
- `list_runs(threadId)` — prior run history with status summaries
|
|
334
|
+
- `get_run_events(runId)` — event stream replay for a specific run
|
|
335
|
+
- `query_interrupts(threadId)` — pending approvals and blocks
|
|
336
|
+
- `llm_summarize(prompt)` — sub-LLM (Haiku) for quick synthesis
|
|
337
|
+
|
|
338
|
+
### Layer 2: Typed Dispatch
|
|
339
|
+
|
|
340
|
+
Signature-based sub-agent spawning with validated I/O contracts:
|
|
341
|
+
|
|
342
|
+
| Signature | Persona | Inputs | Outputs |
|
|
343
|
+
|-----------|---------|--------|---------|
|
|
344
|
+
| `ImplementFeature` | eng | spec, context_files | branch, changed_files, test_passed |
|
|
345
|
+
| `FixBug` | eng | description, error_log | branch, changed_files, root_cause |
|
|
346
|
+
| `ReviewPR` | eng | pr_url, focus_areas | verdict, comments, risk_level |
|
|
347
|
+
| `Investigate` | data | question, data_sources | findings, evidence, confidence |
|
|
348
|
+
| `Summarize` | data | content, format | summary, key_points |
|
|
349
|
+
|
|
350
|
+
Parent runs dispatch typed sub-runs via `dispatchSubRun()` and collect validated results via `collectSubRun()` with timeout handling.
|
|
351
|
+
|
|
352
|
+
### Layer 3: Critic + Self-Decomposition
|
|
276
353
|
|
|
277
|
-
|
|
354
|
+
LLM quality gate that evaluates run output (ported from predict-rlm's critic pattern):
|
|
278
355
|
|
|
279
|
-
|
|
356
|
+
- **Score >= 80**: Pass — run ships as-is
|
|
357
|
+
- **Score 50-79**: Revise — creates a new run with critic feedback appended
|
|
358
|
+
- **Score < 50**: Decompose — dispatches typed sub-runs to break down the task
|
|
280
359
|
|
|
281
|
-
|
|
282
|
-
- **Parallel Subagent Execution**: Run multiple specialized agents concurrently
|
|
283
|
-
- **8 Specialized Agent Types**: Planning, Code, Testing, Linting, Review, Improve, Context, Publish
|
|
284
|
-
- **Multi-Stage Review**: Iterative improvement cycles with quality scoring (0-1 scale)
|
|
285
|
-
- **Automatic Test Generation**: Unit, integration, and E2E test creation
|
|
360
|
+
Loop control: max 3 revisions, max depth 2 for decomposition.
|
|
286
361
|
|
|
287
|
-
###
|
|
362
|
+
### Legacy RLM Orchestrator
|
|
363
|
+
|
|
364
|
+
The original RLM system remains available for direct use:
|
|
288
365
|
|
|
289
366
|
```bash
|
|
290
|
-
# Basic usage
|
|
291
367
|
stackmemory skills rlm "Your complex task description"
|
|
292
|
-
|
|
293
|
-
# With options
|
|
294
|
-
stackmemory skills rlm "Refactor authentication system" \
|
|
295
|
-
--max-parallel 8 \
|
|
296
|
-
--review-stages 5 \
|
|
297
|
-
--quality-threshold 0.9 \
|
|
298
|
-
--test-mode all
|
|
368
|
+
stackmemory skills rlm "Refactor auth" --max-parallel 8 --quality-threshold 0.9
|
|
299
369
|
```
|
|
300
370
|
|
|
301
|
-
### Configuration Options
|
|
302
|
-
|
|
303
371
|
| Option | Description | Default |
|
|
304
372
|
|--------|-------------|---------|
|
|
305
373
|
| `--max-parallel` | Maximum concurrent subagents | 5 |
|
|
@@ -307,7 +375,6 @@ stackmemory skills rlm "Refactor authentication system" \
|
|
|
307
375
|
| `--review-stages` | Number of review iterations | 3 |
|
|
308
376
|
| `--quality-threshold` | Target quality score (0-1) | 0.85 |
|
|
309
377
|
| `--test-mode` | Test generation mode (unit/integration/e2e/all) | all |
|
|
310
|
-
| `--verbose` | Show all recursive operations | false |
|
|
311
378
|
|
|
312
379
|
**Note**: RLM requires Claude Code Max plan for unlimited subagent execution.
|
|
313
380
|
|
|
@@ -417,18 +484,34 @@ Options: `--until`, `--until-not`, `--until-empty`, `--until-non-empty`, `--unti
|
|
|
417
484
|
## Documentation
|
|
418
485
|
|
|
419
486
|
- [Getting Started](./docs/GETTING_STARTED.md) — Quick start guide (5 minutes)
|
|
420
|
-
- [MCP Tools Reference](https://stackmemoryai.github.io/stackmemory/tools.html) — All
|
|
487
|
+
- [MCP Tools Reference](https://stackmemoryai.github.io/stackmemory/tools.html) — All 73 MCP tools
|
|
421
488
|
- [CLI Reference](./docs/cli.md) — Full command reference
|
|
422
489
|
- [Setup Guide](./docs/SETUP.md) — Advanced setup options
|
|
423
490
|
- [Development Guide](./docs/DEVELOPMENT.md) — Contributing and development
|
|
424
491
|
- [Architecture](./docs/architecture.md) — System design
|
|
425
492
|
- [API Reference](./docs/API_REFERENCE.md) — API documentation
|
|
426
|
-
- [Vision](./vision.md) — Product vision and principles
|
|
493
|
+
- [Vision](./docs/vision.md) — Product vision and principles
|
|
427
494
|
- [Status](./docs/status.md) — Current project status
|
|
428
495
|
- [Roadmap](./docs/roadmap.md) — Future plans
|
|
429
496
|
|
|
430
497
|
---
|
|
431
498
|
|
|
499
|
+
## Substrate: The Three-Layer Vision
|
|
500
|
+
|
|
501
|
+
StackMemory is the foundation of a three-layer architecture for AI-native development:
|
|
502
|
+
|
|
503
|
+
| Layer | Product | Status | Purpose |
|
|
504
|
+
|-------|---------|--------|---------|
|
|
505
|
+
| **L1** | StackMemory | Shipped (v1.10.6) | Context persistence — lossless memory across sessions |
|
|
506
|
+
| **L2** | Substrate Desktop | Shipping | Agent orchestration — multi-agent coordination with worktree isolation |
|
|
507
|
+
| **L3** | Substrate Cloud | Design | Multiplayer development — shared context across teams and agents |
|
|
508
|
+
|
|
509
|
+
Grounded in distributed systems theory: FLP impossibility, Byzantine→Crash conversion via test hooks, Chandra-Toueg failure detectors for agent liveness. See [COORDINATION_THEORY.md](./docs/architecture/COORDINATION_THEORY.md).
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
432
513
|
## License
|
|
433
514
|
|
|
434
|
-
Licensed under the [
|
|
515
|
+
Licensed under the [PolyForm Noncommercial License 1.0.0](./LICENSE).
|
|
516
|
+
|
|
517
|
+
Free for personal, research, educational, and noncommercial use. Commercial use requires a separate license from StackMemory AI.
|
package/bin/claude-sm
CHANGED
|
@@ -3,4 +3,19 @@
|
|
|
3
3
|
* Claude-SM CLI Launcher (ESM)
|
|
4
4
|
* Delegates to built CLI in dist without requiring tsx.
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import { existsSync } from 'fs';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
import { dirname, join } from 'path';
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
const target = join(__dirname, '../dist/src/cli/claude-sm.js');
|
|
13
|
+
|
|
14
|
+
if (!existsSync(target)) {
|
|
15
|
+
console.error('Error: StackMemory has not been built.');
|
|
16
|
+
console.error(`Missing: ${target}`);
|
|
17
|
+
console.error('Run: npm install && npm run build');
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
import(target);
|
package/bin/claude-smd
CHANGED
|
@@ -3,4 +3,19 @@
|
|
|
3
3
|
* Claude-SM-Danger CLI Launcher (ESM)
|
|
4
4
|
* Delegates to built CLI in dist without requiring tsx.
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import { existsSync } from 'fs';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
import { dirname, join } from 'path';
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
const target = join(__dirname, '../dist/src/cli/claude-sm-danger.js');
|
|
13
|
+
|
|
14
|
+
if (!existsSync(target)) {
|
|
15
|
+
console.error('Error: StackMemory has not been built.');
|
|
16
|
+
console.error(`Missing: ${target}`);
|
|
17
|
+
console.error('Run: npm install && npm run build');
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
import(target);
|
package/bin/codex-smd
CHANGED
|
@@ -3,4 +3,19 @@
|
|
|
3
3
|
* Codex-SM-Danger CLI Launcher (ESM)
|
|
4
4
|
* Delegates to built CLI in dist without requiring tsx.
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import { existsSync } from 'fs';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
import { dirname, join } from 'path';
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
const target = join(__dirname, '../dist/src/cli/codex-sm-danger.js');
|
|
13
|
+
|
|
14
|
+
if (!existsSync(target)) {
|
|
15
|
+
console.error('Error: StackMemory has not been built.');
|
|
16
|
+
console.error(`Missing: ${target}`);
|
|
17
|
+
console.error('Run: npm install && npm run build');
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
import(target);
|
package/bin/gemini-sm
CHANGED
|
@@ -3,4 +3,19 @@
|
|
|
3
3
|
* Gemini-SM CLI Launcher (ESM)
|
|
4
4
|
* Delegates to built CLI in dist without requiring tsx.
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import { existsSync } from 'fs';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
import { dirname, join } from 'path';
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
const target = join(__dirname, '../dist/src/cli/gemini-sm.js');
|
|
13
|
+
|
|
14
|
+
if (!existsSync(target)) {
|
|
15
|
+
console.error('Error: StackMemory has not been built.');
|
|
16
|
+
console.error(`Missing: ${target}`);
|
|
17
|
+
console.error('Run: npm install && npm run build');
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
import(target);
|
package/bin/hermes-sm
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Hermes-SM CLI Launcher (ESM)
|
|
4
|
+
* Delegates to built CLI in dist without requiring tsx.
|
|
5
|
+
*/
|
|
6
|
+
import { existsSync } from 'fs';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
import { dirname, join } from 'path';
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
const target = join(__dirname, '../dist/src/cli/hermes-sm.js');
|
|
13
|
+
|
|
14
|
+
if (!existsSync(target)) {
|
|
15
|
+
console.error('Error: StackMemory has not been built.');
|
|
16
|
+
console.error(`Missing: ${target}`);
|
|
17
|
+
console.error('Run: npm install && npm run build');
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
import(target);
|
package/bin/hermes-smd
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Hermes-SM-Danger CLI Launcher (ESM) — danger mode
|
|
4
|
+
* Delegates to built CLI in dist without requiring tsx.
|
|
5
|
+
*/
|
|
6
|
+
import { existsSync } from 'fs';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
import { dirname, join } from 'path';
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
const target = join(__dirname, '../dist/src/cli/hermes-sm.js');
|
|
13
|
+
|
|
14
|
+
if (!existsSync(target)) {
|
|
15
|
+
console.error('Error: StackMemory has not been built.');
|
|
16
|
+
console.error(`Missing: ${target}`);
|
|
17
|
+
console.error('Run: npm install && npm run build');
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
import(target);
|
package/bin/opencode-sm
CHANGED
|
@@ -3,4 +3,19 @@
|
|
|
3
3
|
* OpenCode-SM CLI Launcher (ESM)
|
|
4
4
|
* Delegates to built CLI in dist without requiring tsx.
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import { existsSync } from 'fs';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
import { dirname, join } from 'path';
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
const target = join(__dirname, '../dist/src/cli/opencode-sm.js');
|
|
13
|
+
|
|
14
|
+
if (!existsSync(target)) {
|
|
15
|
+
console.error('Error: StackMemory has not been built.');
|
|
16
|
+
console.error(`Missing: ${target}`);
|
|
17
|
+
console.error('Run: npm install && npm run build');
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
import(target);
|