pmem-ai 0.6.2 → 0.7.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 (85) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +68 -4
  3. package/dist/commands/ask.d.ts.map +1 -1
  4. package/dist/commands/ask.js +5 -1
  5. package/dist/commands/ask.js.map +1 -1
  6. package/dist/commands/distill.d.ts.map +1 -1
  7. package/dist/commands/distill.js +15 -6
  8. package/dist/commands/distill.js.map +1 -1
  9. package/dist/commands/doctor.d.ts.map +1 -1
  10. package/dist/commands/doctor.js +21 -8
  11. package/dist/commands/doctor.js.map +1 -1
  12. package/dist/commands/graph.d.ts +3 -0
  13. package/dist/commands/graph.d.ts.map +1 -1
  14. package/dist/commands/graph.js +73 -25
  15. package/dist/commands/graph.js.map +1 -1
  16. package/dist/commands/init.d.ts +13 -0
  17. package/dist/commands/init.d.ts.map +1 -1
  18. package/dist/commands/init.js +142 -32
  19. package/dist/commands/init.js.map +1 -1
  20. package/dist/commands/integration.d.ts.map +1 -1
  21. package/dist/commands/integration.js +170 -15
  22. package/dist/commands/integration.js.map +1 -1
  23. package/dist/commands/new.d.ts.map +1 -1
  24. package/dist/commands/new.js +15 -14
  25. package/dist/commands/new.js.map +1 -1
  26. package/dist/commands/rebuild.d.ts.map +1 -1
  27. package/dist/commands/rebuild.js +84 -15
  28. package/dist/commands/rebuild.js.map +1 -1
  29. package/dist/commands/recall.d.ts.map +1 -1
  30. package/dist/commands/recall.js +11 -5
  31. package/dist/commands/recall.js.map +1 -1
  32. package/dist/commands/rename.d.ts.map +1 -1
  33. package/dist/commands/rename.js +98 -19
  34. package/dist/commands/rename.js.map +1 -1
  35. package/dist/commands/status.d.ts.map +1 -1
  36. package/dist/commands/status.js +31 -6
  37. package/dist/commands/status.js.map +1 -1
  38. package/dist/commands/update.d.ts +2 -0
  39. package/dist/commands/update.d.ts.map +1 -1
  40. package/dist/commands/update.js +117 -1
  41. package/dist/commands/update.js.map +1 -1
  42. package/dist/commands/verify.d.ts.map +1 -1
  43. package/dist/commands/verify.js +5 -3
  44. package/dist/commands/verify.js.map +1 -1
  45. package/dist/core/db.d.ts +8 -0
  46. package/dist/core/db.d.ts.map +1 -1
  47. package/dist/core/db.js +47 -0
  48. package/dist/core/db.js.map +1 -1
  49. package/dist/core/discover/detect.d.ts +12 -0
  50. package/dist/core/discover/detect.d.ts.map +1 -0
  51. package/dist/core/discover/detect.js +68 -0
  52. package/dist/core/discover/detect.js.map +1 -0
  53. package/dist/core/discover/index.d.ts +12 -0
  54. package/dist/core/discover/index.d.ts.map +1 -0
  55. package/dist/core/discover/index.js +645 -0
  56. package/dist/core/discover/index.js.map +1 -0
  57. package/dist/core/discover/patterns.d.ts +29 -0
  58. package/dist/core/discover/patterns.d.ts.map +1 -0
  59. package/dist/core/discover/patterns.js +322 -0
  60. package/dist/core/discover/patterns.js.map +1 -0
  61. package/dist/core/fs.d.ts +7 -0
  62. package/dist/core/fs.d.ts.map +1 -1
  63. package/dist/core/fs.js +57 -1
  64. package/dist/core/fs.js.map +1 -1
  65. package/dist/core/manifest.d.ts +23 -1
  66. package/dist/core/manifest.d.ts.map +1 -1
  67. package/dist/core/manifest.js +72 -0
  68. package/dist/core/manifest.js.map +1 -1
  69. package/dist/index.js +31 -2
  70. package/dist/index.js.map +1 -1
  71. package/dist/types.d.ts +108 -1
  72. package/dist/types.d.ts.map +1 -1
  73. package/docs/handover-v0.6.4.md +285 -0
  74. package/docs/project-roadmap.md +129 -4
  75. package/docs/release-checklist-v0.7.0.md +60 -0
  76. package/docs/session-start-create-design-eval.md +203 -0
  77. package/docs/usage.md +38 -0
  78. package/docs/v0.6.4 pre-design.md +526 -0
  79. package/docs/v0.7.0 pre-design.md +405 -0
  80. package/package.json +7 -3
  81. package/skills/pmem/SKILL.md +86 -6
  82. package/skills/pmem/references/first-init.md +21 -0
  83. package/skills/pmem/references/memory-cards.md +44 -1
  84. package/skills/pmem/references/session-workflow.md +3 -3
  85. package/skills/pmem/references/universal-domains.md +66 -0
@@ -4,6 +4,8 @@ Memory cards are Markdown files with YAML frontmatter. They live under `.pmem/`
4
4
 
5
5
  ## Card Types
6
6
 
7
+ The default `software` preset uses these common card types:
8
+
7
9
  | Type | Directory | Purpose |
8
10
  |------|-----------|---------|
9
11
  | `module` | `.pmem/modules/` | Code module description and ownership |
@@ -13,7 +15,9 @@ Memory cards are Markdown files with YAML frontmatter. They live under `.pmem/`
13
15
  | `risk` | `.pmem/risks/` | Identified risks and mitigations |
14
16
  | `trace` | `.pmem/traces/` | Work session traces |
15
17
 
16
- ## Module Card (most important)
18
+ v0.7.0 supports domain presets and custom schemas. A `novel` project can use `character`, `chapter`, `world`, and `arc`; a `research` project can use `source`, `claim`, `note`, and `experiment`. Check `.pmem/manifest.yml` → `schema.card_types`, `schema.type_dirs`, and `schema.creatable_types` for the project's valid types.
19
+
20
+ ## Software Module Card
17
21
 
18
22
  ```yaml
19
23
  ---
@@ -38,6 +42,45 @@ Handles user authentication and token management.
38
42
 
39
43
  The `source_files` field is critical — it links code files to memory. When `src/auth/index.ts` changes, pmem knows to flag `module.auth` as potentially stale.
40
44
 
45
+ ## Novel Character Card
46
+
47
+ ```yaml
48
+ ---
49
+ id: character.protagonist
50
+ type: character
51
+ status: active
52
+ tags: [main-cast]
53
+ aliases: [hero]
54
+ source_files: [draft/characters/protagonist.md]
55
+ ---
56
+ # Protagonist
57
+
58
+ ## Role
59
+ Primary viewpoint character.
60
+
61
+ ## Motivation
62
+ Wants to recover a lost family archive.
63
+ ```
64
+
65
+ ## Research Source Card
66
+
67
+ ```yaml
68
+ ---
69
+ id: source.smith_2024_survey
70
+ type: source
71
+ status: active
72
+ tags: [memory, agents]
73
+ source_files: [papers/smith-2024.pdf]
74
+ ---
75
+ # Smith 2024 Survey
76
+
77
+ ## Summary
78
+ Survey of persistent memory approaches for AI agents.
79
+
80
+ ## Evidence
81
+ Supports claims about cross-session continuity.
82
+ ```
83
+
41
84
  ## Decision Card
42
85
 
43
86
  ```yaml
@@ -14,13 +14,13 @@ pmem recall --format compact --budget 2000
14
14
  `pmem recall` output tells you:
15
15
  - Project name, stage, current focus
16
16
  - Recommended next step
17
- - Active modules to read
17
+ - Active foundational cards to read (`active_foundation` in JSON)
18
18
  - Recent update history
19
19
  - Unresolved dirty flags count
20
20
 
21
21
  ## Before Focused Work
22
22
 
23
- Before working on a specific module or task:
23
+ Before working on a specific module, character, source, task, or topic:
24
24
 
25
25
  ```bash
26
26
  pmem ask "<topic>" --format compact
@@ -51,7 +51,7 @@ Marks affected cards as potentially stale in the database.
51
51
  pmem update --suggest --format json
52
52
  ```
53
53
 
54
- Generates suggestions based on dirty flags and state freshness. **Exits with code 1 when suggestions exist** this is a workflow signal, NOT a failure.
54
+ Generates suggestions based on dirty flags and state freshness. v0.6.2+ exits with code `0` whether suggestions exist or not. Parse JSON fields such as `summary.has_actionable`, `summary.blocking`, or `summary.verify_blocking` instead of using exit code `1` as a workflow signal.
55
55
 
56
56
  ## Confirming Updates
57
57
 
@@ -0,0 +1,66 @@
1
+ # Universal Domains and Custom Schemas
2
+
3
+ pmem v0.7.0 is domain-neutral. It still works for software codebases, but it can also initialize memory for writing, research, and custom agent projects.
4
+
5
+ ## Domain Presets
6
+
7
+ ```bash
8
+ pmem init my-service --domain software
9
+ pmem init my-novel --domain novel
10
+ pmem init my-study --domain research
11
+ ```
12
+
13
+ | Preset | Card directories | Foundational types | Discover |
14
+ |--------|------------------|--------------------|----------|
15
+ | `software` | `modules`, `features`, `decisions`, `tasks`, `risks`, `traces` | `module` | enabled |
16
+ | `novel` | `characters`, `chapters`, `world`, `arc`, `decisions`, `traces` | `character`, `chapter` | disabled |
17
+ | `research` | `sources`, `claims`, `notes`, `experiments`, `decisions`, `traces` | `source`, `claim` | disabled |
18
+
19
+ ## Manifest Schema
20
+
21
+ The manifest controls valid card types and runtime behavior:
22
+
23
+ ```yaml
24
+ schema:
25
+ card_types: [source, claim, note, experiment, decision, trace]
26
+ type_dirs:
27
+ source: sources
28
+ claim: claims
29
+ note: notes
30
+ experiment: experiments
31
+ decision: decisions
32
+ trace: traces
33
+ foundational_types: [source, claim]
34
+ evidence_types: [decision, trace]
35
+ creatable_types: [source, claim, note, experiment, decision, trace]
36
+ default_type: note
37
+ discover:
38
+ enabled: false
39
+ ```
40
+
41
+ Use `schema.creatable_types` to decide what `pmem new <type> <title>` may create. Use `schema.foundational_types` to decide what appears in recall as the project's core context.
42
+
43
+ ## Recall JSON
44
+
45
+ For machine-readable recall:
46
+
47
+ ```bash
48
+ pmem recall --format json
49
+ ```
50
+
51
+ Read `active_foundation` for foundational cards. `active_modules` is kept as a compatibility alias and contains the same list.
52
+
53
+ ## Discovery
54
+
55
+ `pmem discover` is useful for software projects because it scans imports and package dependencies. It is disabled by default for `novel` and `research` presets:
56
+
57
+ ```bash
58
+ pmem discover --format json
59
+ # exits 0 with a disabled message when discover.enabled is false
60
+ ```
61
+
62
+ Enable it only when the project has source files that benefit from relationship discovery.
63
+
64
+ ## Legacy Compatibility
65
+
66
+ v0.6.x projects do not need migration. If `.pmem/manifest.yml` has no `schema` block, pmem falls back to the legacy software defaults and does not rewrite the manifest.