@radix-ai/ai-memory 0.1.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.
Files changed (105) hide show
  1. package/.claude-plugin/marketplace.json +19 -0
  2. package/.cursor-plugin/marketplace.json +19 -0
  3. package/LICENSE +21 -0
  4. package/README.md +331 -0
  5. package/dist/cli/adapters.d.ts +32 -0
  6. package/dist/cli/adapters.d.ts.map +1 -0
  7. package/dist/cli/adapters.js +368 -0
  8. package/dist/cli/adapters.js.map +1 -0
  9. package/dist/cli/environment.d.ts +34 -0
  10. package/dist/cli/environment.d.ts.map +1 -0
  11. package/dist/cli/environment.js +119 -0
  12. package/dist/cli/environment.js.map +1 -0
  13. package/dist/cli/index.d.ts +3 -0
  14. package/dist/cli/index.d.ts.map +1 -0
  15. package/dist/cli/index.js +1108 -0
  16. package/dist/cli/index.js.map +1 -0
  17. package/dist/docs-schema.d.ts +27 -0
  18. package/dist/docs-schema.d.ts.map +1 -0
  19. package/dist/docs-schema.js +100 -0
  20. package/dist/docs-schema.js.map +1 -0
  21. package/dist/evals/index.d.ts +13 -0
  22. package/dist/evals/index.d.ts.map +1 -0
  23. package/dist/evals/index.js +205 -0
  24. package/dist/evals/index.js.map +1 -0
  25. package/dist/evals/performance-comparison.d.ts +23 -0
  26. package/dist/evals/performance-comparison.d.ts.map +1 -0
  27. package/dist/evals/performance-comparison.js +76 -0
  28. package/dist/evals/performance-comparison.js.map +1 -0
  29. package/dist/evals/platform-integration.d.ts +34 -0
  30. package/dist/evals/platform-integration.d.ts.map +1 -0
  31. package/dist/evals/platform-integration.js +186 -0
  32. package/dist/evals/platform-integration.js.map +1 -0
  33. package/dist/formatter/index.d.ts +15 -0
  34. package/dist/formatter/index.d.ts.map +1 -0
  35. package/dist/formatter/index.js +207 -0
  36. package/dist/formatter/index.js.map +1 -0
  37. package/dist/hybrid-search/index.d.ts +40 -0
  38. package/dist/hybrid-search/index.d.ts.map +1 -0
  39. package/dist/hybrid-search/index.js +277 -0
  40. package/dist/hybrid-search/index.js.map +1 -0
  41. package/dist/index.d.ts +4 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/dist/index.js +5 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/mcp-server/index.d.ts +6 -0
  46. package/dist/mcp-server/index.d.ts.map +1 -0
  47. package/dist/mcp-server/index.js +114 -0
  48. package/dist/mcp-server/index.js.map +1 -0
  49. package/dist/mcp-server/p0-parser.d.ts +43 -0
  50. package/dist/mcp-server/p0-parser.d.ts.map +1 -0
  51. package/dist/mcp-server/p0-parser.js +108 -0
  52. package/dist/mcp-server/p0-parser.js.map +1 -0
  53. package/dist/mcp-server/resources.d.ts +3 -0
  54. package/dist/mcp-server/resources.d.ts.map +1 -0
  55. package/dist/mcp-server/resources.js +156 -0
  56. package/dist/mcp-server/resources.js.map +1 -0
  57. package/dist/mcp-server/tools.d.ts +15 -0
  58. package/dist/mcp-server/tools.d.ts.map +1 -0
  59. package/dist/mcp-server/tools.js +928 -0
  60. package/dist/mcp-server/tools.js.map +1 -0
  61. package/dist/schema-constants.d.ts +7 -0
  62. package/dist/schema-constants.d.ts.map +1 -0
  63. package/dist/schema-constants.js +33 -0
  64. package/dist/schema-constants.js.map +1 -0
  65. package/package.json +84 -0
  66. package/plugins/adapters/claude-code/.claude-plugin/plugin.json +26 -0
  67. package/plugins/adapters/claude-code/CLAUDE.md +21 -0
  68. package/plugins/adapters/claude-code/README.md +37 -0
  69. package/plugins/adapters/claude-code/agents/governance-checker.md +27 -0
  70. package/plugins/adapters/claude-code/agents/memory-writer.md +31 -0
  71. package/plugins/adapters/claude-code/hooks/SessionStart.js +55 -0
  72. package/plugins/adapters/claude-code/hooks/hooks.json +52 -0
  73. package/plugins/adapters/generic/BOOTSTRAP_INSTRUCTION.md +30 -0
  74. package/plugins/adapters/generic/README.md +50 -0
  75. package/plugins/ai-memory/.claude-plugin/plugin.json +30 -0
  76. package/plugins/ai-memory/.cursor-plugin/plugin.json +18 -0
  77. package/plugins/ai-memory/.mcp.json +19 -0
  78. package/plugins/ai-memory/agents/governance-critic/AGENT.md +57 -0
  79. package/plugins/ai-memory/agents/memory-auditor/AGENT.md +54 -0
  80. package/plugins/ai-memory/rules/context7-tool-reference.md +16 -0
  81. package/plugins/ai-memory/rules/load-memory.md +22 -0
  82. package/plugins/ai-memory/rules/parallel-safe-planning.md +19 -0
  83. package/plugins/ai-memory/skills/mem-auto-review/SKILL.md +51 -0
  84. package/plugins/ai-memory/skills/mem-compound/SKILL.md +105 -0
  85. package/plugins/ai-memory/skills/mem-init/SKILL.md +48 -0
  86. package/plugins/ai-memory/skills/mem-session-close/SKILL.md +38 -0
  87. package/plugins/ai-memory/skills/mem-validate/SKILL.md +54 -0
  88. package/templates/.ai/IDENTITY.md +23 -0
  89. package/templates/.ai/agents/_base-auditor.md +28 -0
  90. package/templates/.ai/agents/_template.md +23 -0
  91. package/templates/.ai/memory/debugging.md +14 -0
  92. package/templates/.ai/memory/decisions.md +8 -0
  93. package/templates/.ai/memory/improvements.md +7 -0
  94. package/templates/.ai/memory/memory-index.md +9 -0
  95. package/templates/.ai/memory/patterns.md +8 -0
  96. package/templates/.ai/reference/PROJECT.md +5 -0
  97. package/templates/.ai/reference/capability-specs.json +31 -0
  98. package/templates/.ai/reference/environment-specs.json +41 -0
  99. package/templates/.ai/sessions/archive/thread-archive.md +15 -0
  100. package/templates/.ai/sessions/open-items.md +13 -0
  101. package/templates/.ai/toolbox/README.md +5 -0
  102. package/templates/.ai/toolbox/browser.md +30 -0
  103. package/templates/.ai/toolbox/integrations.md +44 -0
  104. package/templates/.ai/toolbox/shell.md +38 -0
  105. package/templates/AGENTS.md +4 -0
@@ -0,0 +1,41 @@
1
+ {
2
+ "version": 1,
3
+ "environments": [
4
+ {
5
+ "id": "cursor",
6
+ "name": "Cursor",
7
+ "detect": { "paths": [".cursor/", ".cursorrules"] },
8
+ "capabilities": {
9
+ "browser": { "native": true },
10
+ "screen_capture": { "platform": true }
11
+ }
12
+ },
13
+ {
14
+ "id": "claude-code",
15
+ "name": "Claude Code",
16
+ "detect": { "paths": [".claude/", ".claude-plugin/", "CLAUDE.md"] },
17
+ "capabilities": {
18
+ "browser": { "mcp": true },
19
+ "screen_capture": { "platform": true }
20
+ }
21
+ },
22
+ {
23
+ "id": "windsurf",
24
+ "name": "Windsurf",
25
+ "detect": { "paths": [".windsurfrules"] },
26
+ "capabilities": {
27
+ "browser": { "mcp": true },
28
+ "screen_capture": { "platform": true }
29
+ }
30
+ },
31
+ {
32
+ "id": "cline",
33
+ "name": "Cline",
34
+ "detect": { "paths": [".clinerules"] },
35
+ "capabilities": {
36
+ "browser": { "mcp": true },
37
+ "screen_capture": { "platform": true }
38
+ }
39
+ }
40
+ ]
41
+ }
@@ -0,0 +1,15 @@
1
+ # Thread Archive — Curated Session Summaries
2
+
3
+ **Format:** One entry per session. Include proposals, accepted, rejected, and why.
4
+
5
+ ---
6
+
7
+ <!-- Add entries below. Format:
8
+
9
+ ## YYYY-MM-DD — Session title
10
+
11
+ **Proposed:** ...
12
+ **Accepted:** ...
13
+ **Rejected:** ... (reason)
14
+ **Open:** ...
15
+ -->
@@ -0,0 +1,13 @@
1
+ # Open Items — Live Registry
2
+
3
+ **Compound Step 3c.** Track open/closed items. Update during compound; surface at session end.
4
+
5
+ ---
6
+
7
+ ## Open
8
+
9
+ <!-- Add open items. Format: `- [ ] Brief description (source)` -->
10
+
11
+ ## Closed
12
+
13
+ <!-- Add closed items. Format: `- [x] Brief description (resolved how)` -->
@@ -0,0 +1,5 @@
1
+ # Toolbox — Technology/Capability Knowledge
2
+
3
+ Add technology/capability docs here. Example: `shell.md`, `browser.md`, `hooks.md`, `mcp.md`, `context-engineering.md`.
4
+
5
+ **Placement test:** Is this about THIS PROJECT's domain? If no → toolbox/. If yes → skills/.
@@ -0,0 +1,30 @@
1
+ ---
2
+ id: browser
3
+ type: toolbox
4
+ status: active
5
+ ---
6
+
7
+ # Browser & Testing Patterns
8
+
9
+ How to use browser tools (Playwright, Chrome, Puppeteer) with ai-memory.
10
+
11
+ ## Capture test results as memory
12
+
13
+ After running browser tests:
14
+ - **Failures** → write to `debugging.md` via `commit_memory` with symptom, screenshot path, and root cause
15
+ - **New patterns** → write to `patterns.md` (e.g., "modal always needs 500ms delay after animation")
16
+ - **Flaky tests** → tag as `[P1]` in debugging.md with reproduction steps
17
+
18
+ ## Screenshot as evidence
19
+
20
+ When browser tools produce screenshots:
21
+ - Reference the screenshot path in memory entries
22
+ - Include the URL and viewport dimensions
23
+ - Tag entries with the component/page name for searchability
24
+
25
+ ## Visual regression patterns
26
+
27
+ When visual differences are detected:
28
+ - Check memory for known acceptable changes (`search_memory` for the component)
29
+ - If the change was intentional (matches a decision in `decisions.md`), skip
30
+ - If unexpected, create a debugging entry with before/after paths
@@ -0,0 +1,44 @@
1
+ ---
2
+ id: integrations
3
+ type: toolbox
4
+ status: active
5
+ ---
6
+
7
+ # Integration Patterns
8
+
9
+ How to use ai-memory with external platforms and automation triggers.
10
+
11
+ ## Slack → Agent → Memory
12
+
13
+ When triggered from Slack (Cursor `@cursor` or custom webhook):
14
+ 1. Agent clones repo — `.ai/` is available because it's git-tracked
15
+ 2. Read IDENTITY.md and DIRECTION.md for project context
16
+ 3. Search memory for relevant decisions before starting work
17
+ 4. Use `claim_task` to prevent duplicate work
18
+ 5. After work: `publish_result` + `sync_memory` + push branch
19
+
20
+ ## GitHub PR → Review → Memory
21
+
22
+ When triggered by PR creation (Bugbot, automation, CI):
23
+ 1. Get diff with `git diff origin/main...HEAD`
24
+ 2. Run `validate_context` against governance rules
25
+ 3. Search memory for patterns relevant to changed files
26
+ 4. Report violations and suggestions
27
+ 5. Record result with `publish_result`
28
+
29
+ ## Linear/Jira → Task → Memory
30
+
31
+ When triggered by issue assignment:
32
+ 1. Read issue context from the trigger
33
+ 2. `claim_task` with the issue description
34
+ 3. Search memory for related decisions and patterns
35
+ 4. Do the work, capture learnings
36
+ 5. `publish_result` + `sync_memory`
37
+
38
+ ## Scheduled/Cron → Maintenance → Memory
39
+
40
+ For recurring tasks (weekly audit, dependency check):
41
+ 1. Read current memory state
42
+ 2. Run `ai-memory eval` for health metrics
43
+ 3. Run `ai-memory prune` for stale entries
44
+ 4. Publish maintenance report to thread-archive
@@ -0,0 +1,38 @@
1
+ ---
2
+ id: shell
3
+ type: toolbox
4
+ status: active
5
+ ---
6
+
7
+ # Shell & CLI Patterns
8
+
9
+ How to use shell commands effectively with ai-memory.
10
+
11
+ ## Feed command output to memory
12
+
13
+ | Command | Memory action |
14
+ |---|---|
15
+ | `git diff` | Feed to `validate_context` for governance checks |
16
+ | `npm test` / `pytest` | Capture failures in `debugging.md` |
17
+ | `npm run build` | Capture build errors and fixes |
18
+ | Deploy scripts | Record deployment decisions in `decisions.md` |
19
+ | `git log --oneline -20` | Use as context when writing session archive |
20
+
21
+ ## Memory-aware shell patterns
22
+
23
+ Before running destructive commands:
24
+ 1. `search_memory` for relevant patterns or warnings
25
+ 2. Check `decisions.md` for any constraints on the operation
26
+ 3. After completion, `commit_memory` with what happened
27
+
28
+ ## CI/CD integration
29
+
30
+ In CI pipelines, use the ai-memory CLI directly:
31
+ ```bash
32
+ # Validate memory health
33
+ npx @radix-ai/ai-memory eval --json
34
+
35
+ # Check governance rules
36
+ npx @radix-ai/ai-memory generate-harness
37
+ npx @radix-ai/ai-memory validate
38
+ ```
@@ -0,0 +1,4 @@
1
+ # Agent Instructions
2
+
3
+ See `.ai/IDENTITY.md` for behavioral constraints and `.ai/PROJECT_STATUS.md` for current project status.
4
+ For ACP agent card, see `.ai/acp/manifest.json`.