fastrmemory 0.3.0 → 0.3.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 (63) 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 +727 -729
  16. package/bin/fastr-guard.mjs +61 -0
  17. package/dist/bin/fastr.js +10 -9
  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/setup.d.ts +2 -0
  32. package/dist/src/installer/setup.d.ts.map +1 -1
  33. package/dist/src/installer/setup.js +24 -18
  34. package/dist/src/installer/setup.js.map +1 -1
  35. package/dist/src/mcp/server.js +25 -25
  36. package/dist/src/mirror/markdown-pages.js +22 -22
  37. package/dist/src/search/backfill.js +6 -6
  38. package/dist/src/search/hybrid-rrf.js +60 -60
  39. package/dist/src/ui/server.js +1259 -1259
  40. package/dist/src/vision/assets.js +6 -6
  41. package/dist-ui/assets/ActionsPage-B3quzFNF.js +11 -11
  42. package/dist-ui/assets/GraphPage-DetiATmC.js +1 -1
  43. package/dist-ui/assets/ObservatoryPage-QIGMwENf.js +16 -16
  44. package/dist-ui/assets/TreemapPage-C7uLZd37.js +2 -2
  45. package/dist-ui/assets/index-BJnPINTu.css +1 -1
  46. package/dist-ui/assets/index-DWAH--Fu.js +329 -329
  47. package/dist-ui/assets/maximize-2-BebkGbZA.js +6 -6
  48. package/dist-ui/build-manifest.json +95 -95
  49. package/dist-ui/index.html +26 -26
  50. package/llms-install.md +69 -69
  51. package/package.json +108 -107
  52. package/server.json +28 -28
  53. package/skills/fastr-compress/SKILL.md +33 -33
  54. package/skills/fastr-curate/SKILL.md +62 -62
  55. package/skills/fastr-dag/SKILL.md +47 -47
  56. package/skills/fastr-doctor/SKILL.md +39 -39
  57. package/skills/fastr-memory/SKILL.md +51 -51
  58. package/skills/fastr-plan-estimate/SKILL.md +45 -45
  59. package/skills/fastr-session-commit/SKILL.md +49 -49
  60. package/skills/fastr-setup/SKILL.md +45 -45
  61. package/skills/fastr-trap-log/SKILL.md +39 -39
  62. package/skills/fastr-vision/SKILL.md +35 -35
  63. package/skills/skills.json +65 -65
@@ -1,14 +1,14 @@
1
- {
2
- "name": "fastrmemory",
3
- "owner": {
4
- "name": "Fastrsoft"
5
- },
6
- "plugins": [
7
- {
8
- "name": "fastrmemory",
9
- "source": "./",
10
- "description": "Local-first agent memory for Claude Code: MCP server plus Agent Skills for pre-edit trap checks, recall, trap logging, curation, and session handoffs.",
11
- "version": "0.3.0"
12
- }
13
- ]
14
- }
1
+ {
2
+ "name": "fastrmemory",
3
+ "owner": {
4
+ "name": "Fastrsoft"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "fastrmemory",
9
+ "source": "./",
10
+ "description": "Local-first agent memory for Claude Code: MCP server plus Agent Skills for pre-edit trap checks, recall, trap logging, curation, and session handoffs.",
11
+ "version": "0.3.1"
12
+ }
13
+ ]
14
+ }
@@ -1,18 +1,18 @@
1
- {
2
- "name": "fastrmemory",
3
- "version": "0.3.0",
4
- "description": "Local-first agent memory for Claude Code: MCP server plus Agent Skills for pre-edit trap checks, recall, trap logging, curation, and session handoffs.",
5
- "author": {
6
- "name": "Fastrsoft"
7
- },
8
- "homepage": "https://github.com/atifjubaer/fastrmemory",
9
- "repository": "https://github.com/atifjubaer/fastrmemory",
10
- "license": "Apache-2.0",
11
- "keywords": ["memory", "mcp", "agent", "sqlite", "skills"],
12
- "mcpServers": {
13
- "fastrmemory": {
14
- "command": "npx",
15
- "args": ["-y", "fastrmemory@0.3.0", "mcp"]
16
- }
17
- }
18
- }
1
+ {
2
+ "name": "fastrmemory",
3
+ "version": "0.3.1",
4
+ "description": "Local-first agent memory for Claude Code: MCP server plus Agent Skills for pre-edit trap checks, recall, trap logging, curation, and session handoffs.",
5
+ "author": {
6
+ "name": "Fastrsoft"
7
+ },
8
+ "homepage": "https://github.com/atifjubaer/fastrmemory",
9
+ "repository": "https://github.com/atifjubaer/fastrmemory",
10
+ "license": "Apache-2.0",
11
+ "keywords": ["memory", "mcp", "agent", "sqlite", "skills"],
12
+ "mcpServers": {
13
+ "fastrmemory": {
14
+ "command": "npx",
15
+ "args": ["-y", "fastrmemory@0.3.1", "mcp"]
16
+ }
17
+ }
18
+ }
package/.cursor/mcp.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "mcpServers": {
3
3
  "fastrmemory": {
4
- "command": "fastrmemory",
4
+ "command": "npx",
5
5
  "args": [
6
+ "-y",
7
+ "fastrmemory@0.3.1",
6
8
  "mcp"
7
9
  ]
8
10
  }
@@ -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`.
@@ -1,51 +1,51 @@
1
- ---
2
- name: fastr-memory
3
- description: Use at the start of any coding task and before reading-to-edit, creating, or modifying project files. Checks FastrMemory for [TRAP] warnings on the target files, then recalls relevant rules and decisions so you do not repeat known mistakes or contradict project conventions.
4
- ---
5
-
6
- # FastrMemory: Recall Before You Code
7
-
8
- ## When to use
9
- - A new task or sub-task begins (feature, bug fix, refactor, review).
10
- - You are about to edit or create a file you have not checked this session.
11
- - You hit unfamiliar architecture or a convention you are unsure about.
12
-
13
- ## Steps
14
-
15
- 1. **Check traps on the files you will touch** (always, before the first edit):
16
- ```js
17
- fastr_trap_recall({ files: ["src/auth/jwt.ts", "src/auth/guard.ts"] })
18
- ```
19
- For each `[TRAP]` returned, state in your plan how the change avoids it.
20
-
21
- 2. **Recall rules and decisions for the task**:
22
- ```js
23
- fastr_recall({
24
- query: "JWT expiry handling in auth guard",
25
- files: ["src/auth/jwt.ts"],
26
- module: "auth",
27
- budgetTokens: 1500
28
- })
29
- ```
30
- Set `includeHistory: true` only when you need superseded rules (for example, to learn why something changed).
31
-
32
- Or get one token-budgeted context block (rules + traps + ready tasks + last handoff):
33
- ```js
34
- fastr_assemble({
35
- taskDescription: "Add refresh-token rotation to the auth guard",
36
- targetFiles: ["src/auth/guard.ts"],
37
- module: "auth",
38
- budgetTokens: 2000
39
- })
40
- ```
41
-
42
- 3. **Drill down only when needed**:
43
- - Everything linked to one file: `fastr_file_history({ filePath: "src/auth/jwt.ts" })`
44
- - Neighbouring files and memories: `fastr_graph_query({ filePath: "src/auth/jwt.ts", depth: 2 })`
45
- - Verbatim stack trace or diff behind a memory: `fastr_drill({ memoryId: "mem_8f2a1c" })`
46
- - Where the last session stopped: `fastr_handoff({ action: "latest" })`
47
-
48
- ## Ground rules
49
- - If recall returns nothing, say so. Do not invent project conventions.
50
- - Note the IDs of memories you relied on; rate them at the end with the `fastr-session-commit` skill.
51
- - When a failure is diagnosed mid-task, switch to the `fastr-trap-log` skill immediately.
1
+ ---
2
+ name: fastr-memory
3
+ description: Use at the start of any coding task and before reading-to-edit, creating, or modifying project files. Checks FastrMemory for [TRAP] warnings on the target files, then recalls relevant rules and decisions so you do not repeat known mistakes or contradict project conventions.
4
+ ---
5
+
6
+ # FastrMemory: Recall Before You Code
7
+
8
+ ## When to use
9
+ - A new task or sub-task begins (feature, bug fix, refactor, review).
10
+ - You are about to edit or create a file you have not checked this session.
11
+ - You hit unfamiliar architecture or a convention you are unsure about.
12
+
13
+ ## Steps
14
+
15
+ 1. **Check traps on the files you will touch** (always, before the first edit):
16
+ ```js
17
+ fastr_trap_recall({ files: ["src/auth/jwt.ts", "src/auth/guard.ts"] })
18
+ ```
19
+ For each `[TRAP]` returned, state in your plan how the change avoids it.
20
+
21
+ 2. **Recall rules and decisions for the task**:
22
+ ```js
23
+ fastr_recall({
24
+ query: "JWT expiry handling in auth guard",
25
+ files: ["src/auth/jwt.ts"],
26
+ module: "auth",
27
+ budgetTokens: 1500
28
+ })
29
+ ```
30
+ Set `includeHistory: true` only when you need superseded rules (for example, to learn why something changed).
31
+
32
+ Or get one token-budgeted context block (rules + traps + ready tasks + last handoff):
33
+ ```js
34
+ fastr_assemble({
35
+ taskDescription: "Add refresh-token rotation to the auth guard",
36
+ targetFiles: ["src/auth/guard.ts"],
37
+ module: "auth",
38
+ budgetTokens: 2000
39
+ })
40
+ ```
41
+
42
+ 3. **Drill down only when needed**:
43
+ - Everything linked to one file: `fastr_file_history({ filePath: "src/auth/jwt.ts" })`
44
+ - Neighbouring files and memories: `fastr_graph_query({ filePath: "src/auth/jwt.ts", depth: 2 })`
45
+ - Verbatim stack trace or diff behind a memory: `fastr_drill({ memoryId: "mem_8f2a1c" })`
46
+ - Where the last session stopped: `fastr_handoff({ action: "latest" })`
47
+
48
+ ## Ground rules
49
+ - If recall returns nothing, say so. Do not invent project conventions.
50
+ - Note the IDs of memories you relied on; rate them at the end with the `fastr-session-commit` skill.
51
+ - When a failure is diagnosed mid-task, switch to the `fastr-trap-log` skill immediately.
@@ -1,45 +1,45 @@
1
- ---
2
- name: fastr-plan-estimate
3
- description: Use when the user asks how long or how risky a change will be, before committing to an estimate or plan for a migration, refactor, or bug fix, and again when that work finishes so the estimate can be closed with the actual result. Calibrates estimates against the project's own track record.
4
- ---
5
-
6
- # FastrMemory: Calibrated Estimates and Risk
7
-
8
- ## When to use
9
- - You are asked for an effort or time estimate.
10
- - You are planning edits to files with a history of breakage.
11
- - A previously estimated task is complete (close the prediction).
12
-
13
- ## 1. Check the base rate for this kind of work
14
- ```js
15
- fastr_predict_baserate({ classTag: "migration" })
16
- ```
17
- If history exists, multiply your inside-view estimate by the reported median ratio. Pick a stable `classTag` (for example `migration`, `refactor`, `bugfix`, `feature`) and reuse it.
18
-
19
- ## 2. Check pre-edit risk for the target files
20
- ```js
21
- fastr_risk_predict({ targetFiles: ["src/db/schema.ts", "src/db/repository.ts"], module: "db" })
22
- ```
23
- High risk means: read the traps (`fastr-memory` skill), plan smaller steps, and add tests first.
24
-
25
- ## 3. Record the estimate
26
- ```js
27
- fastr_predict({
28
- action: "create",
29
- classTag: "migration",
30
- claimText: "Add bi-temporal columns to the actions table",
31
- estimateValue: 3,
32
- estimateUnit: "hours"
33
- })
34
- ```
35
- Note the returned prediction ID.
36
-
37
- ## 4. Close it when the work is done
38
- ```js
39
- fastr_predict({ action: "close", predictionId: 12, actualValue: 5 })
40
- ```
41
- List open predictions with `fastr_predict({ action: "list", classTag: "migration" })`.
42
-
43
- ## Rules
44
- - Report the calibrated number, and say what the raw estimate was.
45
- - Always close predictions; unclosed ones never improve future calibration.
1
+ ---
2
+ name: fastr-plan-estimate
3
+ description: Use when the user asks how long or how risky a change will be, before committing to an estimate or plan for a migration, refactor, or bug fix, and again when that work finishes so the estimate can be closed with the actual result. Calibrates estimates against the project's own track record.
4
+ ---
5
+
6
+ # FastrMemory: Calibrated Estimates and Risk
7
+
8
+ ## When to use
9
+ - You are asked for an effort or time estimate.
10
+ - You are planning edits to files with a history of breakage.
11
+ - A previously estimated task is complete (close the prediction).
12
+
13
+ ## 1. Check the base rate for this kind of work
14
+ ```js
15
+ fastr_predict_baserate({ classTag: "migration" })
16
+ ```
17
+ If history exists, multiply your inside-view estimate by the reported median ratio. Pick a stable `classTag` (for example `migration`, `refactor`, `bugfix`, `feature`) and reuse it.
18
+
19
+ ## 2. Check pre-edit risk for the target files
20
+ ```js
21
+ fastr_risk_predict({ targetFiles: ["src/db/schema.ts", "src/db/repository.ts"], module: "db" })
22
+ ```
23
+ High risk means: read the traps (`fastr-memory` skill), plan smaller steps, and add tests first.
24
+
25
+ ## 3. Record the estimate
26
+ ```js
27
+ fastr_predict({
28
+ action: "create",
29
+ classTag: "migration",
30
+ claimText: "Add bi-temporal columns to the actions table",
31
+ estimateValue: 3,
32
+ estimateUnit: "hours"
33
+ })
34
+ ```
35
+ Note the returned prediction ID.
36
+
37
+ ## 4. Close it when the work is done
38
+ ```js
39
+ fastr_predict({ action: "close", predictionId: 12, actualValue: 5 })
40
+ ```
41
+ List open predictions with `fastr_predict({ action: "list", classTag: "migration" })`.
42
+
43
+ ## Rules
44
+ - Report the calibrated number, and say what the raw estimate was.
45
+ - Always close predictions; unclosed ones never improve future calibration.