fastrmemory 0.3.0 → 0.4.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 (67) hide show
  1. package/.claude-plugin/marketplace.json +14 -14
  2. package/.claude-plugin/plugin.json +18 -18
  3. package/.cursor/mcp.json +3 -1
  4. package/.cursor/skills/fastr-compress/SKILL.md +33 -33
  5. package/.cursor/skills/fastr-curate/SKILL.md +62 -62
  6. package/.cursor/skills/fastr-dag/SKILL.md +47 -47
  7. package/.cursor/skills/fastr-doctor/SKILL.md +39 -39
  8. package/.cursor/skills/fastr-memory/SKILL.md +51 -51
  9. package/.cursor/skills/fastr-plan-estimate/SKILL.md +45 -45
  10. package/.cursor/skills/fastr-session-commit/SKILL.md +49 -49
  11. package/.cursor/skills/fastr-setup/SKILL.md +45 -45
  12. package/.cursor/skills/fastr-trap-log/SKILL.md +39 -39
  13. package/.cursor/skills/fastr-vision/SKILL.md +35 -35
  14. package/.cursor/skills/skills.json +65 -65
  15. package/README.md +642 -729
  16. package/bin/fastr-guard.mjs +61 -0
  17. package/dist/bin/fastr.js +68 -10
  18. package/dist/bin/fastr.js.map +1 -1
  19. package/dist/src/bench/benchmark.js +13 -13
  20. package/dist/src/bench/harness.js +17 -17
  21. package/dist/src/bench/public-harness.js +5 -5
  22. package/dist/src/branch/manager.js +31 -31
  23. package/dist/src/ci/guardian.js +9 -9
  24. package/dist/src/db/doctor.js +25 -25
  25. package/dist/src/db/hygiene.js +23 -23
  26. package/dist/src/db/repository.js +283 -283
  27. package/dist/src/db/schema.js +268 -268
  28. package/dist/src/db/spool.js +4 -4
  29. package/dist/src/export/obsidian.js +15 -15
  30. package/dist/src/import/local.js +4 -4
  31. package/dist/src/installer/mcp-init.d.ts +65 -0
  32. package/dist/src/installer/mcp-init.d.ts.map +1 -0
  33. package/dist/src/installer/mcp-init.js +293 -0
  34. package/dist/src/installer/mcp-init.js.map +1 -0
  35. package/dist/src/installer/setup.d.ts +2 -0
  36. package/dist/src/installer/setup.d.ts.map +1 -1
  37. package/dist/src/installer/setup.js +24 -18
  38. package/dist/src/installer/setup.js.map +1 -1
  39. package/dist/src/mcp/server.js +25 -25
  40. package/dist/src/mirror/markdown-pages.js +22 -22
  41. package/dist/src/search/backfill.js +6 -6
  42. package/dist/src/search/hybrid-rrf.js +60 -60
  43. package/dist/src/ui/server.js +1259 -1259
  44. package/dist/src/vision/assets.js +6 -6
  45. package/dist-ui/assets/ActionsPage-B3quzFNF.js +11 -11
  46. package/dist-ui/assets/GraphPage-DetiATmC.js +1 -1
  47. package/dist-ui/assets/ObservatoryPage-QIGMwENf.js +16 -16
  48. package/dist-ui/assets/TreemapPage-C7uLZd37.js +2 -2
  49. package/dist-ui/assets/index-BJnPINTu.css +1 -1
  50. package/dist-ui/assets/index-DWAH--Fu.js +329 -329
  51. package/dist-ui/assets/maximize-2-BebkGbZA.js +6 -6
  52. package/dist-ui/build-manifest.json +95 -95
  53. package/dist-ui/index.html +26 -26
  54. package/llms-install.md +77 -69
  55. package/package.json +108 -107
  56. package/server.json +28 -28
  57. package/skills/fastr-compress/SKILL.md +33 -33
  58. package/skills/fastr-curate/SKILL.md +62 -62
  59. package/skills/fastr-dag/SKILL.md +47 -47
  60. package/skills/fastr-doctor/SKILL.md +39 -39
  61. package/skills/fastr-memory/SKILL.md +51 -51
  62. package/skills/fastr-plan-estimate/SKILL.md +45 -45
  63. package/skills/fastr-session-commit/SKILL.md +49 -49
  64. package/skills/fastr-setup/SKILL.md +45 -45
  65. package/skills/fastr-trap-log/SKILL.md +39 -39
  66. package/skills/fastr-vision/SKILL.md +35 -35
  67. package/skills/skills.json +65 -65
package/package.json CHANGED
@@ -1,107 +1,108 @@
1
- {
2
- "name": "fastrmemory",
3
- "version": "0.3.0",
4
- "mcpName": "io.github.atifjubaer/fastrmemory",
5
- "description": "High-Performance Cognitive Agent Memory Engine with Bi-Temporal SQLite and Official MCP v2",
6
- "type": "module",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/atifjubaer/fastrmemory.git"
10
- },
11
- "homepage": "https://github.com/atifjubaer/fastrmemory#readme",
12
- "bugs": {
13
- "url": "https://github.com/atifjubaer/fastrmemory/issues"
14
- },
15
- "publishConfig": {
16
- "access": "public"
17
- },
18
- "files": [
19
- "dist",
20
- "dist-ui",
21
- "skills",
22
- ".claude-plugin",
23
- ".cursor",
24
- "server.json",
25
- "llms-install.md"
26
- ],
27
- "bin": {
28
- "fastrmemory": "dist/bin/fastr.js",
29
- "fastr": "dist/bin/fastr.js"
30
- },
31
- "main": "./dist/src/index.js",
32
- "types": "./dist/src/index.d.ts",
33
- "exports": {
34
- ".": "./dist/src/index.js",
35
- "./mcp": "./dist/src/mcp/server.js"
36
- },
37
- "engines": {
38
- "node": ">=22.16.0"
39
- },
40
- "scripts": {
41
- "prepare": "npm run build:core",
42
- "prepublishOnly": "npm run build:core && npm test && npm run check:dist-ui && npm run check:package",
43
- "build:core": "tsc",
44
- "build:ui": "npm --prefix ui run build && node scripts/build-dist-ui-manifest.mjs",
45
- "build:extension": "tsc -p extensions/vscode",
46
- "build": "npm run build:core && npm run build:ui",
47
- "build:all": "npm run build && npm run build:extension",
48
- "watch": "tsc --watch",
49
- "test": "vitest run",
50
- "test:isolation": "vitest run tests/isolation.test.ts",
51
- "smoke:gemini": "npm run build:core && node scripts/smoke-gemini.mjs",
52
- "smoke:copilot": "npm run build:core && node scripts/smoke-copilot.mjs",
53
- "smoke:opencode": "npm run build:core && node scripts/smoke-opencode.mjs",
54
- "test:crash": "node scripts/crash-test.mjs",
55
- "check:skills": "node scripts/check-skills.mjs",
56
- "check:dist-ui": "node scripts/check-dist-ui.mjs",
57
- "check:package": "node scripts/check-package.mjs",
58
- "check:docs": "node scripts/check-docs.mjs",
59
- "check:hygiene": "tsx scripts/check-hygiene.ts",
60
- "check:crash": "node scripts/check-crash-evidence.mjs",
61
- "bench": "tsx scripts/eval-bench.ts --split all --embeddings minilm --out bench/results/minilm.json",
62
- "bench:hash": "tsx scripts/eval-bench.ts --split all --embeddings hash --out bench/results/hash.json",
63
- "bench:legacy": "tsx scripts/capture-bench.ts",
64
- "bench:public": "tsx scripts/eval-public.ts",
65
- "bench:external": "tsx scripts/eval-external.ts",
66
- "bench:verify": "node scripts/check-bench.mjs",
67
- "verify:replay": "tsx scripts/verify-replay.ts",
68
- "check:ci": "npm run test && npm run test:isolation && npm run check:skills && npm run check:dist-ui && npm run check:package && npm run check:query-plans && npm run check:recall-latency && npm run check:install-size && npm run verify:replay && npm run check:hygiene && npm run check:docs && npm run check:crash && npm run bench:verify",
69
- "start": "node dist/bin/fastr.js",
70
- "check:query-plans": "tsx scripts/check-query-plans.ts",
71
- "check:recall-latency": "tsx scripts/check-recall-latency.ts",
72
- "check:install-size": "node scripts/check-install-size.mjs"
73
- },
74
- "keywords": [
75
- "ai",
76
- "agent",
77
- "memory",
78
- "mcp",
79
- "sqlite",
80
- "bitemporal",
81
- "claude-code",
82
- "cursor"
83
- ],
84
- "author": "Fastrsoft",
85
- "license": "Apache-2.0",
86
- "dependencies": {
87
- "@modelcontextprotocol/server": "^2.3.1",
88
- "commander": "^13.1.0",
89
- "zod": "^4.6.7"
90
- },
91
- "peerDependencies": {
92
- "@huggingface/transformers": "^3.8.1"
93
- },
94
- "peerDependenciesMeta": {
95
- "@huggingface/transformers": {
96
- "optional": true
97
- }
98
- },
99
- "devDependencies": {
100
- "@huggingface/transformers": "^3.8.1",
101
- "@types/node": "^24.0.0",
102
- "minisearch": "7.2.0",
103
- "tsx": "^4.20.0",
104
- "typescript": "^5.8.0",
105
- "vitest": "^3.0.0"
106
- }
107
- }
1
+ {
2
+ "name": "fastrmemory",
3
+ "version": "0.4.0",
4
+ "mcpName": "io.github.atifjubaer/fastrmemory",
5
+ "description": "High-Performance Cognitive Agent Memory Engine with Bi-Temporal SQLite and Official MCP v2",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/atifjubaer/fastrmemory.git"
10
+ },
11
+ "homepage": "https://github.com/atifjubaer/fastrmemory#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/atifjubaer/fastrmemory/issues"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "dist-ui",
21
+ "bin/fastr-guard.mjs",
22
+ "skills",
23
+ ".claude-plugin",
24
+ ".cursor",
25
+ "server.json",
26
+ "llms-install.md"
27
+ ],
28
+ "bin": {
29
+ "fastrmemory": "bin/fastr-guard.mjs",
30
+ "fastr": "bin/fastr-guard.mjs"
31
+ },
32
+ "main": "./dist/src/index.js",
33
+ "types": "./dist/src/index.d.ts",
34
+ "exports": {
35
+ ".": "./dist/src/index.js",
36
+ "./mcp": "./dist/src/mcp/server.js"
37
+ },
38
+ "engines": {
39
+ "node": ">=22.16.0"
40
+ },
41
+ "scripts": {
42
+ "prepare": "npm run build:core",
43
+ "prepublishOnly": "npm run build:core && npm test && npm run check:dist-ui && npm run check:package",
44
+ "build:core": "tsc",
45
+ "build:ui": "npm --prefix ui run build && node scripts/build-dist-ui-manifest.mjs",
46
+ "build:extension": "tsc -p extensions/vscode",
47
+ "build": "npm run build:core && npm run build:ui",
48
+ "build:all": "npm run build && npm run build:extension",
49
+ "watch": "tsc --watch",
50
+ "test": "vitest run",
51
+ "test:isolation": "vitest run tests/isolation.test.ts",
52
+ "smoke:gemini": "npm run build:core && node scripts/smoke-gemini.mjs",
53
+ "smoke:copilot": "npm run build:core && node scripts/smoke-copilot.mjs",
54
+ "smoke:opencode": "npm run build:core && node scripts/smoke-opencode.mjs",
55
+ "test:crash": "node scripts/crash-test.mjs",
56
+ "check:skills": "node scripts/check-skills.mjs",
57
+ "check:dist-ui": "node scripts/check-dist-ui.mjs",
58
+ "check:package": "node scripts/check-package.mjs",
59
+ "check:docs": "node scripts/check-docs.mjs",
60
+ "check:hygiene": "tsx scripts/check-hygiene.ts",
61
+ "check:crash": "node scripts/check-crash-evidence.mjs",
62
+ "bench": "tsx scripts/eval-bench.ts --split all --embeddings minilm --out bench/results/minilm.json",
63
+ "bench:hash": "tsx scripts/eval-bench.ts --split all --embeddings hash --out bench/results/hash.json",
64
+ "bench:legacy": "tsx scripts/capture-bench.ts",
65
+ "bench:public": "tsx scripts/eval-public.ts",
66
+ "bench:external": "tsx scripts/eval-external.ts",
67
+ "bench:verify": "node scripts/check-bench.mjs",
68
+ "verify:replay": "tsx scripts/verify-replay.ts",
69
+ "check:ci": "npm run test && npm run test:isolation && npm run check:skills && npm run check:dist-ui && npm run check:package && npm run check:query-plans && npm run check:recall-latency && npm run check:install-size && npm run verify:replay && npm run check:hygiene && npm run check:docs && npm run check:crash && npm run bench:verify",
70
+ "start": "node bin/fastr-guard.mjs",
71
+ "check:query-plans": "tsx scripts/check-query-plans.ts",
72
+ "check:recall-latency": "tsx scripts/check-recall-latency.ts",
73
+ "check:install-size": "node scripts/check-install-size.mjs"
74
+ },
75
+ "keywords": [
76
+ "ai",
77
+ "agent",
78
+ "memory",
79
+ "mcp",
80
+ "sqlite",
81
+ "bitemporal",
82
+ "claude-code",
83
+ "cursor"
84
+ ],
85
+ "author": "Fastrsoft",
86
+ "license": "Apache-2.0",
87
+ "dependencies": {
88
+ "@modelcontextprotocol/server": "^2.3.1",
89
+ "commander": "^13.1.0",
90
+ "zod": "^4.6.7"
91
+ },
92
+ "peerDependencies": {
93
+ "@huggingface/transformers": "^3.8.1"
94
+ },
95
+ "peerDependenciesMeta": {
96
+ "@huggingface/transformers": {
97
+ "optional": true
98
+ }
99
+ },
100
+ "devDependencies": {
101
+ "@huggingface/transformers": "^3.8.1",
102
+ "@types/node": "^24.0.0",
103
+ "minisearch": "7.2.0",
104
+ "tsx": "^4.20.0",
105
+ "typescript": "^5.8.0",
106
+ "vitest": "^3.0.0"
107
+ }
108
+ }
package/server.json CHANGED
@@ -1,28 +1,28 @@
1
- {
2
- "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
- "name": "io.github.atifjubaer/fastrmemory",
4
- "title": "FastrMemory",
5
- "description": "Local-first cognitive agent memory with bi-temporal SQLite, replayable history, and triple-stream retrieval.",
6
- "version": "0.3.0",
7
- "websiteUrl": "https://github.com/atifjubaer/fastrmemory",
8
- "repository": {
9
- "url": "https://github.com/atifjubaer/fastrmemory",
10
- "source": "github"
11
- },
12
- "packages": [
13
- {
14
- "registryType": "npm",
15
- "registryBaseUrl": "https://registry.npmjs.org",
16
- "identifier": "fastrmemory",
17
- "transport": {
18
- "type": "stdio"
19
- },
20
- "packageArguments": [
21
- {
22
- "type": "positional",
23
- "value": "mcp"
24
- }
25
- ]
26
- }
27
- ]
28
- }
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.atifjubaer/fastrmemory",
4
+ "title": "FastrMemory",
5
+ "description": "Local-first cognitive agent memory with bi-temporal SQLite, replayable history, and triple-stream retrieval.",
6
+ "version": "0.4.0",
7
+ "websiteUrl": "https://github.com/atifjubaer/fastrmemory",
8
+ "repository": {
9
+ "url": "https://github.com/atifjubaer/fastrmemory",
10
+ "source": "github"
11
+ },
12
+ "packages": [
13
+ {
14
+ "registryType": "npm",
15
+ "registryBaseUrl": "https://registry.npmjs.org",
16
+ "identifier": "fastrmemory",
17
+ "transport": {
18
+ "type": "stdio"
19
+ },
20
+ "packageArguments": [
21
+ {
22
+ "type": "positional",
23
+ "value": "mcp"
24
+ }
25
+ ]
26
+ }
27
+ ]
28
+ }
@@ -1,33 +1,33 @@
1
- ---
2
- name: fastr-compress
3
- description: Use when a markdown file, PR description, or block of context is too long for the token budget you need to fit it into, or the user asks to shrink a doc. Compresses prose while preserving headings, code blocks, and links; always preview first.
4
- ---
5
-
6
- # FastrMemory: Token Compression
7
-
8
- ## When to use
9
- - A doc or context payload exceeds the budget you need it to fit.
10
- - The user asks to compact a long markdown file.
11
-
12
- Do not use it on source code or on files where exact wording matters (licences, legal text, changelogs).
13
-
14
- ## Steps
15
- 1. **Preview savings** without touching disk:
16
- ```js
17
- fastr_compress({ filePath: "docs/guide.md", dryRun: true })
18
- ```
19
-
20
- 2. **Compress the file** (writes `<file>.original.md` as a backup):
21
- ```js
22
- fastr_compress({ filePath: "docs/guide.md", dryRun: false })
23
- ```
24
-
25
- 3. **Or compress text in memory** (nothing written to disk; output is returned):
26
- ```js
27
- fastr_compress({ content: "# Title\n\nLong conversational text...", dryRun: false })
28
- ```
29
-
30
- ## Guarantees to verify
31
- - ATX headings, fenced code blocks, URLs, and markdown links are kept intact.
32
- - Filler phrases, duplicate list items, and extra blank lines are removed.
33
- - Review any warnings in the result; restore from the `.original.md` backup if meaning was lost.
1
+ ---
2
+ name: fastr-compress
3
+ description: Use when a markdown file, PR description, or block of context is too long for the token budget you need to fit it into, or the user asks to shrink a doc. Compresses prose while preserving headings, code blocks, and links; always preview first.
4
+ ---
5
+
6
+ # FastrMemory: Token Compression
7
+
8
+ ## When to use
9
+ - A doc or context payload exceeds the budget you need it to fit.
10
+ - The user asks to compact a long markdown file.
11
+
12
+ Do not use it on source code or on files where exact wording matters (licences, legal text, changelogs).
13
+
14
+ ## Steps
15
+ 1. **Preview savings** without touching disk:
16
+ ```js
17
+ fastr_compress({ filePath: "docs/guide.md", dryRun: true })
18
+ ```
19
+
20
+ 2. **Compress the file** (writes `<file>.original.md` as a backup):
21
+ ```js
22
+ fastr_compress({ filePath: "docs/guide.md", dryRun: false })
23
+ ```
24
+
25
+ 3. **Or compress text in memory** (nothing written to disk; output is returned):
26
+ ```js
27
+ fastr_compress({ content: "# Title\n\nLong conversational text...", dryRun: false })
28
+ ```
29
+
30
+ ## Guarantees to verify
31
+ - ATX headings, fenced code blocks, URLs, and markdown links are kept intact.
32
+ - Filler phrases, duplicate list items, and extra blank lines are removed.
33
+ - Review any warnings in the result; restore from the `.original.md` backup if meaning was lost.
@@ -1,62 +1,62 @@
1
- ---
2
- name: fastr-curate
3
- description: Use when you learn something durable worth keeping (a new convention, an architectural decision, a user preference), when recalled memories contradict each other, or when memory needs cleanup. Dedupes before storing, records or supersedes rules, resolves conflicts, and snapshots memory before risky bulk changes.
4
- ---
5
-
6
- # FastrMemory: Curate Project Memory
7
-
8
- ## When to use
9
- - The user states a preference or guideline, or you settle an architectural decision.
10
- - Two recalled memories give opposing instructions.
11
- - A refactor or migration invalidates existing rules.
12
- - You are about to make many memory changes and want a restore point.
13
-
14
- ## 1. Dedupe, then remember
15
- Always search first:
16
- ```js
17
- fastr_recall({ query: "test runner convention", budgetTokens: 800 })
18
- ```
19
- - Same rule exists and is right: rate it, do not store again.
20
- - Exists but outdated: supersede it (step 2).
21
- - Nothing relevant: store it.
22
- ```js
23
- fastr_remember({
24
- kind: "decision",
25
- module: "api",
26
- title: "Validate request bodies with zod at the route boundary",
27
- content: "Every route parses input with a zod schema before calling services. Services assume valid input.",
28
- files: ["src/api/routes.ts"],
29
- symbols: ["registerRoutes"],
30
- verified: false
31
- })
32
- ```
33
- `kind` is one of `rule`, `decision`, `error_trap`, `workflow`. Leave `verified: false` (staging) until tests confirm it; use `scope: "global"` only for organisation-wide rules; `pinned: true` sparingly.
34
-
35
- ## 2. Supersede instead of duplicating
36
- ```js
37
- fastr_supersede({
38
- oldMemoryId: "mem_jest01",
39
- newTitle: "Use Vitest, not Jest",
40
- newContent: "Vitest runs ESM natively; Jest config was removed.",
41
- reason: "ESM migration"
42
- })
43
- ```
44
-
45
- ## 3. Resolve contradictions
46
- ```js
47
- fastr_conflicts({ status: "open" })
48
- fastr_resolve({ conflictId: 4, keepId: "mem_vitest2", forgetLoser: true, reason: "Jest removed in v0.1" })
49
- ```
50
- `forgetLoser: false` only weakens the loser's score; use it when both may still apply.
51
-
52
- ## 4. Score usefulness
53
- ```js
54
- fastr_feedback({ memoryId: "mem_vitest2", outcome: "good", note: "Prevented adding Jest config" })
55
- ```
56
-
57
- ## 5. Snapshot before bulk changes, roll back if needed
58
- ```js
59
- fastr_snapshot({ tag: "pre-auth-cleanup", description: "Before consolidating auth rules" })
60
- fastr_rollback({ snapshotId: "snap_xxxx" })
61
- ```
62
- Audit what changed with `fastr_timeline({ module: "auth", limit: 25 })`.
1
+ ---
2
+ name: fastr-curate
3
+ description: Use when you learn something durable worth keeping (a new convention, an architectural decision, a user preference), when recalled memories contradict each other, or when memory needs cleanup. Dedupes before storing, records or supersedes rules, resolves conflicts, and snapshots memory before risky bulk changes.
4
+ ---
5
+
6
+ # FastrMemory: Curate Project Memory
7
+
8
+ ## When to use
9
+ - The user states a preference or guideline, or you settle an architectural decision.
10
+ - Two recalled memories give opposing instructions.
11
+ - A refactor or migration invalidates existing rules.
12
+ - You are about to make many memory changes and want a restore point.
13
+
14
+ ## 1. Dedupe, then remember
15
+ Always search first:
16
+ ```js
17
+ fastr_recall({ query: "test runner convention", budgetTokens: 800 })
18
+ ```
19
+ - Same rule exists and is right: rate it, do not store again.
20
+ - Exists but outdated: supersede it (step 2).
21
+ - Nothing relevant: store it.
22
+ ```js
23
+ fastr_remember({
24
+ kind: "decision",
25
+ module: "api",
26
+ title: "Validate request bodies with zod at the route boundary",
27
+ content: "Every route parses input with a zod schema before calling services. Services assume valid input.",
28
+ files: ["src/api/routes.ts"],
29
+ symbols: ["registerRoutes"],
30
+ verified: false
31
+ })
32
+ ```
33
+ `kind` is one of `rule`, `decision`, `error_trap`, `workflow`. Leave `verified: false` (staging) until tests confirm it; use `scope: "global"` only for organisation-wide rules; `pinned: true` sparingly.
34
+
35
+ ## 2. Supersede instead of duplicating
36
+ ```js
37
+ fastr_supersede({
38
+ oldMemoryId: "mem_jest01",
39
+ newTitle: "Use Vitest, not Jest",
40
+ newContent: "Vitest runs ESM natively; Jest config was removed.",
41
+ reason: "ESM migration"
42
+ })
43
+ ```
44
+
45
+ ## 3. Resolve contradictions
46
+ ```js
47
+ fastr_conflicts({ status: "open" })
48
+ fastr_resolve({ conflictId: 4, keepId: "mem_vitest2", forgetLoser: true, reason: "Jest removed in v0.1" })
49
+ ```
50
+ `forgetLoser: false` only weakens the loser's score; use it when both may still apply.
51
+
52
+ ## 4. Score usefulness
53
+ ```js
54
+ fastr_feedback({ memoryId: "mem_vitest2", outcome: "good", note: "Prevented adding Jest config" })
55
+ ```
56
+
57
+ ## 5. Snapshot before bulk changes, roll back if needed
58
+ ```js
59
+ fastr_snapshot({ tag: "pre-auth-cleanup", description: "Before consolidating auth rules" })
60
+ fastr_rollback({ snapshotId: "snap_xxxx" })
61
+ ```
62
+ Audit what changed with `fastr_timeline({ module: "auth", limit: 25 })`.
@@ -1,47 +1,47 @@
1
- ---
2
- name: fastr-dag
3
- description: Use when work splits into several dependent steps, when multiple agents share one task list, or when you need to know what to work on next. Builds a task DAG with dependencies and conflicts, claims the next unblocked action, and marks progress.
4
- ---
5
-
6
- # FastrMemory: Multi-Agent Action DAG
7
-
8
- ## When to use
9
- - A plan has steps that depend on each other.
10
- - Several agents or sessions work the same backlog and must not collide.
11
- - You finished an action and need the next one.
12
-
13
- ## 1. Create actions with dependencies
14
- ```js
15
- fastr_action_create({
16
- title: "Add v2 schema migration",
17
- description: "Migration plus rollback; tests in tests/schema.test.ts",
18
- priority: 8
19
- })
20
- fastr_action_create({
21
- title: "Implement JWT auth guard",
22
- description: "Guard in src/auth/guard.ts using the v2 users table",
23
- priority: 6,
24
- requires: ["act_schema"],
25
- conflictsWith: ["act_auth_refactor"],
26
- assignedTo: "claude-code"
27
- })
28
- ```
29
- `priority` runs 1 (lowest) to 10 (highest). Use the IDs returned by earlier calls in `requires` / `conflictsWith`.
30
-
31
- ## 2. See what is unblocked
32
- ```js
33
- fastr_frontier({})
34
- ```
35
-
36
- ## 3. Claim the next action atomically
37
- ```js
38
- fastr_next({ agentId: "claude-code" })
39
- ```
40
- This marks the highest-priority unblocked action `active` for that agent.
41
-
42
- ## 4. Update status as you go
43
- ```js
44
- fastr_action_update({ id: "act_xxxx", status: "done", crystallizedInto: "mem_8f2a1c" })
45
- fastr_action_update({ id: "act_yyyy", status: "blocked" })
46
- ```
47
- Statuses: `pending`, `active`, `done`, `blocked`, `cancelled`. Marking `done` unblocks dependents; set `crystallizedInto` to the memory that captured the lesson, if any.
1
+ ---
2
+ name: fastr-dag
3
+ description: Use when work splits into several dependent steps, when multiple agents share one task list, or when you need to know what to work on next. Builds a task DAG with dependencies and conflicts, claims the next unblocked action, and marks progress.
4
+ ---
5
+
6
+ # FastrMemory: Multi-Agent Action DAG
7
+
8
+ ## When to use
9
+ - A plan has steps that depend on each other.
10
+ - Several agents or sessions work the same backlog and must not collide.
11
+ - You finished an action and need the next one.
12
+
13
+ ## 1. Create actions with dependencies
14
+ ```js
15
+ fastr_action_create({
16
+ title: "Add v2 schema migration",
17
+ description: "Migration plus rollback; tests in tests/schema.test.ts",
18
+ priority: 8
19
+ })
20
+ fastr_action_create({
21
+ title: "Implement JWT auth guard",
22
+ description: "Guard in src/auth/guard.ts using the v2 users table",
23
+ priority: 6,
24
+ requires: ["act_schema"],
25
+ conflictsWith: ["act_auth_refactor"],
26
+ assignedTo: "claude-code"
27
+ })
28
+ ```
29
+ `priority` runs 1 (lowest) to 10 (highest). Use the IDs returned by earlier calls in `requires` / `conflictsWith`.
30
+
31
+ ## 2. See what is unblocked
32
+ ```js
33
+ fastr_frontier({})
34
+ ```
35
+
36
+ ## 3. Claim the next action atomically
37
+ ```js
38
+ fastr_next({ agentId: "claude-code" })
39
+ ```
40
+ This marks the highest-priority unblocked action `active` for that agent.
41
+
42
+ ## 4. Update status as you go
43
+ ```js
44
+ fastr_action_update({ id: "act_xxxx", status: "done", crystallizedInto: "mem_8f2a1c" })
45
+ fastr_action_update({ id: "act_yyyy", status: "blocked" })
46
+ ```
47
+ Statuses: `pending`, `active`, `done`, `blocked`, `cancelled`. Marking `done` unblocks dependents; set `crystallizedInto` to the memory that captured the lesson, if any.
@@ -1,39 +1,39 @@
1
- ---
2
- name: fastr-doctor
3
- description: Use when FastrMemory searches miss memories you just stored, recall is slow or erroring, the action frontier looks stuck, or the user asks to check or repair the memory database. Diagnoses first, previews repairs, then heals.
4
- ---
5
-
6
- # FastrMemory: Diagnose and Heal
7
-
8
- ## When to use
9
- - `fastr_recall` does not find a memory that `fastr_timeline` shows exists.
10
- - Recall or status calls are slow, or report database errors.
11
- - Actions stay blocked although their prerequisites are done.
12
-
13
- ## Steps
14
- 1. **Diagnose (read-only)**:
15
- ```js
16
- fastr_diagnose({})
17
- ```
18
- Checks SQLite integrity, FTS5 index consistency, orphaned file links, action DAG edges, and journal mode.
19
-
20
- 2. **Preview repairs**:
21
- ```js
22
- fastr_heal({ dryRun: true })
23
- ```
24
-
25
- 3. **Apply repairs** once the preview looks right:
26
- ```js
27
- fastr_heal({ dryRun: false })
28
- ```
29
- Rebuilds the FTS5 index, prunes orphaned links, unblocks stale DAG edges, and checkpoints the WAL.
30
-
31
- 4. **Confirm**:
32
- ```js
33
- fastr_status({})
34
- ```
35
-
36
- ## Rules
37
- - Always diagnose before healing and report what was found.
38
- - If issues remain that are not fixable, tell the user; do not delete `.fastr/` files by hand.
39
- - CLI equivalents: `fastrmemory diagnose`, `fastrmemory heal`.
1
+ ---
2
+ name: fastr-doctor
3
+ description: Use when FastrMemory searches miss memories you just stored, recall is slow or erroring, the action frontier looks stuck, or the user asks to check or repair the memory database. Diagnoses first, previews repairs, then heals.
4
+ ---
5
+
6
+ # FastrMemory: Diagnose and Heal
7
+
8
+ ## When to use
9
+ - `fastr_recall` does not find a memory that `fastr_timeline` shows exists.
10
+ - Recall or status calls are slow, or report database errors.
11
+ - Actions stay blocked although their prerequisites are done.
12
+
13
+ ## Steps
14
+ 1. **Diagnose (read-only)**:
15
+ ```js
16
+ fastr_diagnose({})
17
+ ```
18
+ Checks SQLite integrity, FTS5 index consistency, orphaned file links, action DAG edges, and journal mode.
19
+
20
+ 2. **Preview repairs**:
21
+ ```js
22
+ fastr_heal({ dryRun: true })
23
+ ```
24
+
25
+ 3. **Apply repairs** once the preview looks right:
26
+ ```js
27
+ fastr_heal({ dryRun: false })
28
+ ```
29
+ Rebuilds the FTS5 index, prunes orphaned links, unblocks stale DAG edges, and checkpoints the WAL.
30
+
31
+ 4. **Confirm**:
32
+ ```js
33
+ fastr_status({})
34
+ ```
35
+
36
+ ## Rules
37
+ - Always diagnose before healing and report what was found.
38
+ - If issues remain that are not fixable, tell the user; do not delete `.fastr/` files by hand.
39
+ - CLI equivalents: `fastrmemory diagnose`, `fastrmemory heal`.