universal-memory 0.2.0__tar.gz → 0.3.0__tar.gz

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 (98) hide show
  1. {universal_memory-0.2.0 → universal_memory-0.3.0}/PKG-INFO +44 -12
  2. {universal_memory-0.2.0 → universal_memory-0.3.0}/README.md +43 -11
  3. {universal_memory-0.2.0 → universal_memory-0.3.0}/pyproject.toml +4 -1
  4. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/__init__.py +1 -1
  5. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/onboarding/setup_project.py +60 -9
  6. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/skills/__init__.py +64 -0
  7. universal_memory-0.3.0/src/universal_memory/application/skills/adopt_skill.py +215 -0
  8. universal_memory-0.3.0/src/universal_memory/application/skills/cleanup_skill.py +208 -0
  9. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/skills/create_skill.py +46 -16
  10. universal_memory-0.3.0/src/universal_memory/application/skills/draft_skill.py +401 -0
  11. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/skills/import_skill.py +15 -2
  12. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/skills/list_skills.py +95 -0
  13. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/skills/native_skill_sync.py +85 -0
  14. universal_memory-0.3.0/src/universal_memory/application/skills/rename_skill.py +118 -0
  15. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/skills/sync_skills.py +18 -2
  16. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/skills/update_skill.py +243 -1
  17. universal_memory-0.3.0/src/universal_memory/application/skills/validate_skill.py +315 -0
  18. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/bootstrap/cli.py +61 -0
  19. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/bootstrap/mcp.py +56 -0
  20. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/agent_skill.py +10 -0
  21. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/ports/agent_skill_repository.py +27 -0
  22. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/security/local_audit_log_repository.py +13 -5
  23. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/storage/local_agent_skill_repository.py +39 -0
  24. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/interfaces/cli/init_command.py +934 -7
  25. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/interfaces/mcp/server.py +265 -2
  26. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/__main__.py +0 -0
  27. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/__init__.py +0 -0
  28. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/diagnostics/__init__.py +0 -0
  29. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/diagnostics/doctor_use_case.py +0 -0
  30. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/host/__init__.py +0 -0
  31. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/host/drift_detector.py +0 -0
  32. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/host/setup_host_use_case.py +0 -0
  33. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/host/sync_instructions_use_case.py +0 -0
  34. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/memory/__init__.py +0 -0
  35. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/memory/assemble_context_summary_use_case.py +0 -0
  36. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/memory/context_hygiene_use_case.py +0 -0
  37. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/memory/get_memory_status_use_case.py +0 -0
  38. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/memory/list_facts_use_case.py +0 -0
  39. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/memory/purge_fact_use_case.py +0 -0
  40. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/memory/remember_fact_use_case.py +0 -0
  41. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/memory/search_facts_use_case.py +0 -0
  42. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/onboarding/__init__.py +0 -0
  43. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/security/__init__.py +0 -0
  44. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/security/list_audit_log_use_case.py +0 -0
  45. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/security/list_snapshots_use_case.py +0 -0
  46. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/security/rollback_use_case.py +0 -0
  47. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/security/safe_write_use_case.py +0 -0
  48. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/skills/generate_skill.py +0 -0
  49. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/skills/promote_skill.py +0 -0
  50. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/skills/propose_skill.py +0 -0
  51. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/skills/recommend_skills.py +0 -0
  52. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/skills/track_latent_skill.py +0 -0
  53. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/update/__init__.py +0 -0
  54. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/application/update/update_use_cases.py +0 -0
  55. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/bootstrap/__init__.py +0 -0
  56. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/__init__.py +0 -0
  57. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/__init__.py +0 -0
  58. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/audit_event.py +0 -0
  59. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/base.py +0 -0
  60. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/context_summary.py +0 -0
  61. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/fact.py +0 -0
  62. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/host.py +0 -0
  63. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/instruction_target.py +0 -0
  64. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/latent_skill.py +0 -0
  65. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/rule.py +0 -0
  66. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/runtime.py +0 -0
  67. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/safe_write_result.py +0 -0
  68. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/entities/snapshot.py +0 -0
  69. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/exceptions.py +0 -0
  70. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/ports/__init__.py +0 -0
  71. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/ports/audit_log_repository.py +0 -0
  72. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/ports/config_validation_port.py +0 -0
  73. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/ports/context_summary_repository.py +0 -0
  74. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/ports/fact_repository.py +0 -0
  75. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/ports/latent_skill_repository.py +0 -0
  76. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/ports/project_layout_port.py +0 -0
  77. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/ports/rule_repository.py +0 -0
  78. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/ports/secret_scanner_port.py +0 -0
  79. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/ports/snapshot_repository.py +0 -0
  80. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/domain/project_layout.py +0 -0
  81. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/__init__.py +0 -0
  82. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/config/__init__.py +0 -0
  83. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/config/adapters.py +0 -0
  84. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/config/project_layout.py +0 -0
  85. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/config/toml_loader.py +0 -0
  86. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/security/__init__.py +0 -0
  87. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/security/entropy_secret_scanner.py +0 -0
  88. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/security/local_snapshot_repository.py +0 -0
  89. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/storage/__init__.py +0 -0
  90. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/storage/local_context_summary_repository.py +0 -0
  91. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/storage/local_fact_repository.py +0 -0
  92. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/storage/local_latent_skill_repository.py +0 -0
  93. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/infrastructure/storage/local_rule_repository.py +0 -0
  94. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/interfaces/__init__.py +0 -0
  95. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/interfaces/cli/__init__.py +0 -0
  96. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/interfaces/cli/message_catalog.py +0 -0
  97. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/interfaces/errors.py +0 -0
  98. {universal_memory-0.2.0 → universal_memory-0.3.0}/src/universal_memory/interfaces/mcp/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: universal-memory
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Vendor-agnostic cognitive persistence layer for AI agents.
5
5
  Keywords: agent-memory,ai,ai-agents,agent-skills,claude-code,codex,context-engineering,developer-tools,llm,mcp,memory
6
6
  Author: Yan L. Amorelli
@@ -27,7 +27,7 @@ Project-URL: Repository, https://github.com/YanAmorelli/universal-memory
27
27
  Description-Content-Type: text/markdown
28
28
 
29
29
  <p align="center">
30
- <img src="docs/assets/umem-logo-lockup.svg" alt="UMem logo" width="720">
30
+ <img src="https://raw.githubusercontent.com/YanAmorelli/universal-memory/main/docs/assets/umem-logo-lockup.svg" alt="UMem logo" width="720">
31
31
  </p>
32
32
 
33
33
  # Universal Memory (UMem)
@@ -42,7 +42,7 @@ A vendor-agnostic cognitive persistence layer for AI agents. Eliminate the "repe
42
42
 
43
43
  To see the core idea visually, check out the [Excalidraw design](https://excalidraw.com/#json=j3XjQIWMYEnkIzHpypuBb,rNJaVOECDGZ3WSuEYcCDjQ) or the proposal structure:
44
44
 
45
- ![Universal Memory MVP Proposal](docs/assets/diagrams/UNIVERSAL-MEMORY-MVP-PROPOSAL.png)
45
+ ![Universal Memory MVP Proposal](https://raw.githubusercontent.com/YanAmorelli/universal-memory/main/docs/assets/diagrams/UNIVERSAL-MEMORY-MVP-PROPOSAL.png)
46
46
 
47
47
  ### Diagram Breakdown
48
48
 
@@ -171,21 +171,37 @@ umem context --scope project
171
171
 
172
172
  ### 4. Adopt or create an Agent Skill
173
173
 
174
- If a skill already exists in a native runtime directory, import it into UMEM and sync it
175
- back out to configured runtimes:
174
+ If a skill already exists, choose the safest adoption path first. Use `adopt` for an
175
+ existing `.umem/skills/<slug>` directory; use `import` for native runtime directories
176
+ such as `.agents/skills/<slug>` and sync it back out to configured runtimes:
176
177
 
177
178
  ```bash
179
+ umem skills adopt .umem/skills/review-protocol --scope project
178
180
  umem skills import .agents/skills/review-protocol --scope project --sync
179
181
  umem skills detail review-protocol
180
182
  ```
181
183
 
182
- If you are starting from scratch, create the canonical skill first:
184
+ If you are starting from scratch, draft and publish it without native side effects:
183
185
 
184
186
  ```bash
185
- umem skills create \
187
+ umem skills draft create \
186
188
  --name "Review Protocol" \
187
189
  --description "Reusable review workflow" \
188
190
  --trigger "when reviewing code"
191
+ umem skills draft validate review-protocol
192
+ umem skills publish review-protocol --format summary
193
+ ```
194
+
195
+ For a one-step workflow, create the canonical skill. It is canonical-only by default;
196
+ request sync explicitly when native runtime targets should be written:
197
+
198
+ ```bash
199
+ umem skills create \
200
+ --name "Review Protocol" \
201
+ --description "Reusable review workflow" \
202
+ --trigger "when reviewing code" \
203
+ --format summary
204
+ umem skills sync review-protocol --check-gitignore --format summary
189
205
  ```
190
206
 
191
207
  After editing `.umem/skills/review-protocol/SKILL.md`, refresh one runtime skill with:
@@ -291,7 +307,7 @@ your shell `PATH`.
291
307
 
292
308
  ## Managing Agent Skills
293
309
 
294
- You can create, import, list, inspect, and sync specialized behaviors:
310
+ You can draft, create, adopt, import, validate, maintain, and sync specialized behaviors:
295
311
  ```bash
296
312
  # List all active skills
297
313
  umem skills list
@@ -299,14 +315,30 @@ umem skills list
299
315
  # Inspect one skill
300
316
  umem skills detail review-protocol
301
317
 
302
- # Create a new canonical skill
303
- umem skills create --name "Review Protocol" --description "Reusable review workflow"
318
+ # Draft, validate, and publish without native runtime writes
319
+ umem skills draft create --name "Review Protocol" --description "Reusable review workflow"
320
+ umem skills draft validate review-protocol
321
+ umem skills publish review-protocol
322
+
323
+ # Create a new canonical skill and explicitly sync native targets
324
+ umem skills create --name "Review Protocol" --description "Reusable review workflow" --sync
304
325
 
305
- # Adopt an existing native skill and distribute complete runtime copies
326
+ # Adopt existing canonical work
327
+ umem skills adopt .umem/skills/review-protocol --scope project
328
+
329
+ # Import an existing native skill and distribute complete runtime copies
306
330
  umem skills import .agents/skills/review-protocol --scope project --sync
307
331
 
332
+ # Validate and maintain canonical skills
333
+ umem skills validate review-protocol
334
+ umem skills canonical update review-protocol --file .umem/skills/review-protocol/SKILL.md
335
+ umem skills rename review-protocol --slug review-checklist
336
+ umem skills cleanup review-checklist --targets --format summary
337
+ umem skills cleanup review-checklist --targets --apply
338
+ umem skills repair --remove-orphan-targets --format summary
339
+
308
340
  # Synchronize one canonical skill into active native runtime folders
309
- umem skills sync review-protocol
341
+ umem skills sync review-protocol --check-gitignore --format summary
310
342
 
311
343
  # Synchronize all active canonical skills during maintenance
312
344
  umem update --skills
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="docs/assets/umem-logo-lockup.svg" alt="UMem logo" width="720">
2
+ <img src="https://raw.githubusercontent.com/YanAmorelli/universal-memory/main/docs/assets/umem-logo-lockup.svg" alt="UMem logo" width="720">
3
3
  </p>
4
4
 
5
5
  # Universal Memory (UMem)
@@ -14,7 +14,7 @@ A vendor-agnostic cognitive persistence layer for AI agents. Eliminate the "repe
14
14
 
15
15
  To see the core idea visually, check out the [Excalidraw design](https://excalidraw.com/#json=j3XjQIWMYEnkIzHpypuBb,rNJaVOECDGZ3WSuEYcCDjQ) or the proposal structure:
16
16
 
17
- ![Universal Memory MVP Proposal](docs/assets/diagrams/UNIVERSAL-MEMORY-MVP-PROPOSAL.png)
17
+ ![Universal Memory MVP Proposal](https://raw.githubusercontent.com/YanAmorelli/universal-memory/main/docs/assets/diagrams/UNIVERSAL-MEMORY-MVP-PROPOSAL.png)
18
18
 
19
19
  ### Diagram Breakdown
20
20
 
@@ -143,21 +143,37 @@ umem context --scope project
143
143
 
144
144
  ### 4. Adopt or create an Agent Skill
145
145
 
146
- If a skill already exists in a native runtime directory, import it into UMEM and sync it
147
- back out to configured runtimes:
146
+ If a skill already exists, choose the safest adoption path first. Use `adopt` for an
147
+ existing `.umem/skills/<slug>` directory; use `import` for native runtime directories
148
+ such as `.agents/skills/<slug>` and sync it back out to configured runtimes:
148
149
 
149
150
  ```bash
151
+ umem skills adopt .umem/skills/review-protocol --scope project
150
152
  umem skills import .agents/skills/review-protocol --scope project --sync
151
153
  umem skills detail review-protocol
152
154
  ```
153
155
 
154
- If you are starting from scratch, create the canonical skill first:
156
+ If you are starting from scratch, draft and publish it without native side effects:
155
157
 
156
158
  ```bash
157
- umem skills create \
159
+ umem skills draft create \
158
160
  --name "Review Protocol" \
159
161
  --description "Reusable review workflow" \
160
162
  --trigger "when reviewing code"
163
+ umem skills draft validate review-protocol
164
+ umem skills publish review-protocol --format summary
165
+ ```
166
+
167
+ For a one-step workflow, create the canonical skill. It is canonical-only by default;
168
+ request sync explicitly when native runtime targets should be written:
169
+
170
+ ```bash
171
+ umem skills create \
172
+ --name "Review Protocol" \
173
+ --description "Reusable review workflow" \
174
+ --trigger "when reviewing code" \
175
+ --format summary
176
+ umem skills sync review-protocol --check-gitignore --format summary
161
177
  ```
162
178
 
163
179
  After editing `.umem/skills/review-protocol/SKILL.md`, refresh one runtime skill with:
@@ -263,7 +279,7 @@ your shell `PATH`.
263
279
 
264
280
  ## Managing Agent Skills
265
281
 
266
- You can create, import, list, inspect, and sync specialized behaviors:
282
+ You can draft, create, adopt, import, validate, maintain, and sync specialized behaviors:
267
283
  ```bash
268
284
  # List all active skills
269
285
  umem skills list
@@ -271,14 +287,30 @@ umem skills list
271
287
  # Inspect one skill
272
288
  umem skills detail review-protocol
273
289
 
274
- # Create a new canonical skill
275
- umem skills create --name "Review Protocol" --description "Reusable review workflow"
290
+ # Draft, validate, and publish without native runtime writes
291
+ umem skills draft create --name "Review Protocol" --description "Reusable review workflow"
292
+ umem skills draft validate review-protocol
293
+ umem skills publish review-protocol
294
+
295
+ # Create a new canonical skill and explicitly sync native targets
296
+ umem skills create --name "Review Protocol" --description "Reusable review workflow" --sync
276
297
 
277
- # Adopt an existing native skill and distribute complete runtime copies
298
+ # Adopt existing canonical work
299
+ umem skills adopt .umem/skills/review-protocol --scope project
300
+
301
+ # Import an existing native skill and distribute complete runtime copies
278
302
  umem skills import .agents/skills/review-protocol --scope project --sync
279
303
 
304
+ # Validate and maintain canonical skills
305
+ umem skills validate review-protocol
306
+ umem skills canonical update review-protocol --file .umem/skills/review-protocol/SKILL.md
307
+ umem skills rename review-protocol --slug review-checklist
308
+ umem skills cleanup review-checklist --targets --format summary
309
+ umem skills cleanup review-checklist --targets --apply
310
+ umem skills repair --remove-orphan-targets --format summary
311
+
280
312
  # Synchronize one canonical skill into active native runtime folders
281
- umem skills sync review-protocol
313
+ umem skills sync review-protocol --check-gitignore --format summary
282
314
 
283
315
  # Synchronize all active canonical skills during maintenance
284
316
  umem update --skills
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "universal-memory"
3
- version = "0.2.0"
3
+ version = "0.3.0"
4
4
  description = "Vendor-agnostic cognitive persistence layer for AI agents."
5
5
  readme = "README.md"
6
6
  license = { text = "Apache-2.0" }
@@ -95,3 +95,6 @@ pythonVersion = "3.12"
95
95
  typeCheckingMode = "standard"
96
96
  venvPath = "."
97
97
  venv = ".venv"
98
+
99
+ [tool.pytest.ini_options]
100
+ testpaths = ["tests"]
@@ -5,4 +5,4 @@ from importlib.metadata import PackageNotFoundError, version
5
5
  try:
6
6
  __version__ = version("universal-memory")
7
7
  except PackageNotFoundError:
8
- __version__ = "0.2.0"
8
+ __version__ = "0.3.0"
@@ -273,7 +273,9 @@ approval, generation, activation, deactivation, and updates.
273
273
  ## Use Cases
274
274
 
275
275
  - Track a recurring workflow or methodology as a latent skill candidate.
276
+ - Draft a skill when content may need validation before publish.
276
277
  - Create a skill directly when the user already knows the desired skill.
278
+ - Adopt existing canonical work in place when it already lives under `.umem/skills/<slug>/`.
277
279
  - Import an existing local or native skill directory into the canonical `.umem/skills`
278
280
  registry.
279
281
  - Sync canonical skills into supported native runtime targets after import or changes.
@@ -290,8 +292,20 @@ approval, generation, activation, deactivation, and updates.
290
292
  ```bash
291
293
  umem skills list --format json
292
294
  umem skills detail <skill-id-or-name> --format json
293
- umem skills create --name "Skill name" --description "What the skill does." --scope project --trigger "when to use it" --format json
295
+ umem skills draft create --name "Skill name" --description "What the skill does." --scope project --trigger "when to use it" --format json
296
+ umem skills draft validate <draft-or-path> --format json
297
+ umem skills publish <draft-or-path> --format summary
298
+ umem skills create --name "Skill name" --description "What the skill does." --scope project --trigger "when to use it" --format summary
299
+ umem skills adopt .umem/skills/<skill-name> --scope project --format summary
294
300
  umem skills import .agents/skills/<skill-name> --scope project --sync --format json
301
+ umem skills validate <skill-id-or-name-or-path> --format json
302
+ umem skills canonical update <skill-id-or-name> --file <relative-markdown-path> --format json
303
+ umem skills rename <skill-id-or-name> --slug <new-slug> --format json
304
+ umem skills cleanup <skill-id-or-name> --targets --format summary
305
+ umem skills cleanup <skill-id-or-name> --targets --apply --format summary
306
+ umem skills repair --remove-orphan-targets --format summary
307
+ umem skills repair --remove-orphan-targets --apply --format summary
308
+ umem skills sync <skill-id-or-name> --check-gitignore --format summary
295
309
  umem skills import .agents/skills/<skill-name>/SKILL.md --scope project --replace-native --sync --format json
296
310
  umem skills sync <skill-id-or-name> --format json
297
311
  umem skills track --name "Skill name" --description "What the skill does." --scope project --evidence-summary "Why this pattern recurred." --tag workflow --format json
@@ -336,13 +350,27 @@ and does not prompt for overwrite. Use explicit `umem skills sync <skill-id-or-n
336
350
  - `--trigger <text>`: repeatable trigger used in generated skill frontmatter.
337
351
  - `--file <relative-markdown-path>`: complete replacement markdown for `SKILL.md`.
338
352
  - `--format json`: canonical automation output.
353
+ - `--format summary`: concise human and agent-facing output with status, paths, warnings,
354
+ dry-run/apply status, and next steps.
355
+ - `--check-gitignore`: sync diagnostic that warns when generated native runtime targets
356
+ are tracked by git or not covered by ignore rules. The check runs after target planning/writes
357
+ and is diagnostic only: do not edit `.gitignore` or untrack files from this warning alone.
358
+ In automation, report the warning and let repository policy decide whether ignore rules should change.
339
359
 
340
360
  ## MCP Equivalents
341
361
 
342
362
  - `list_skills()`
343
363
  - `get_skill_detail(name_or_id="<skill-id-or-name>")`
344
- - `create_skill(name="Skill name", description="What the skill does.", scope="project", raw_markdown="<complete SKILL.md content>")`
364
+ - `create_skill_draft(name="Skill name", description="What the skill does.", scope="project")`
365
+ - `validate_skill(skill_or_path="<skill-id-or-name-or-path>")`
366
+ - `publish_skill(draft_or_path="<draft-or-path>", sync=false)`
367
+ - `create_skill(name="Skill name", description="What the skill does.", scope="project", raw_markdown="<complete SKILL.md content>", sync=false)`
368
+ - `adopt_skill(path=".umem/skills/<skill-name>", scope="project", sync_after_adopt=false)`
345
369
  - `import_skill(path=".agents/skills/<skill-name>", scope="project", replace_native=false, sync_after_import=true)`
370
+ - `update_canonical_skill(skill_id_or_name="<skill-id-or-name>", raw_markdown="<complete SKILL.md content>", sync=false)`
371
+ - `rename_skill(skill_id_or_name="<skill-id-or-name>", slug="<new-slug>")`
372
+ - `cleanup_skill(skill_id_or_name="<skill-id-or-name>", targets=true, dry_run=true)`
373
+ - `repair_skills(remove_orphan_targets=true, dry_run=true)`
346
374
  - `sync_skills(skill_id_or_name="<skill-id-or-name>", targets=null, drift_decision="keep")`
347
375
  - `track_latent_skill(name="Skill name", description="What the skill does.", scope="project", evidence_summary="Why this pattern recurred.", tags=["workflow"])`
348
376
  - `recommend_skills(scope="project", min_recurrence=null, dry_run=true)`
@@ -361,14 +389,25 @@ and does not prompt for overwrite. Use explicit `umem skills sync <skill-id-or-n
361
389
  - `skills list` returns active, candidate, and disabled skills with relative paths when
362
390
  materialized.
363
391
  - `skills detail` returns triggers and metadata without loading large references.
364
- - `skills create` writes a requested canonical skill directly; use it when the user asks
365
- for a known skill instead of routing through latent tracking.
392
+ - `skills draft create` writes editable draft content only; validate and publish before sync.
393
+ - `skills create` writes a requested canonical skill directly and does not sync native
394
+ targets unless `--sync` is present.
395
+ - `skills publish` converts a draft to canonical and does not sync native targets unless
396
+ `--sync` is present.
397
+ - `skills adopt` registers existing `.umem/skills/<slug>` work in place without creating a suffixed duplicate.
398
+ - Use `skills import`, not `skills adopt`, for existing native runtime directories such
399
+ as `.agents/skills/<slug>` or `.opencode/skills/<slug>`.
400
+ - `skills validate`, `skills canonical update`, `skills rename`, `skills cleanup`, and
401
+ `skills repair` are the supported maintenance path for canonical skills.
366
402
  - `skills import` is the normal path for an existing `.agents/skills/...`, `.opencode/skills/...`,
367
403
  or other local Agent Skills directory. It registers a canonical UMEM skill and copies
368
404
  the source directory into `.umem/skills/<slug>/`.
369
405
  - `skills sync` materializes canonical skills into configured native runtime targets;
370
406
  importing a skill does not necessarily make it available to every runtime until sync
371
407
  runs.
408
+ - `skills sync --check-gitignore --format summary` is the preferred interactive safety
409
+ check when a user wants actionable warnings about tracked or unignored runtime targets.
410
+ It warns after sync planning/writes and never edits `.gitignore` or untracks files.
372
411
  - `skills sync` can create or update runtime directories such as `.opencode/skills/...`,
373
412
  `.agents/skills/...`, or `.antigravity/...` depending on configured runtimes. Treat these
374
413
  as intentional worktree changes and review whether repository ignore rules should include
@@ -386,10 +425,13 @@ and does not prompt for overwrite. Use explicit `umem skills sync <skill-id-or-n
386
425
  - `skills generate` creates canonical files under `.umem/skills/` for project skills.
387
426
  - `skills deactivate` preserves files and changes status to disabled.
388
427
  - `skills activate` requires a readable, valid `SKILL.md`.
389
- - `skills update`, `activate`, and `deactivate` currently operate on latent/generated skill
390
- IDs, not the canonical `skill_id` returned by imported Agent Skills. If you have a
391
- canonical skill under `.umem/skills/<slug>/`, edit that `SKILL.md` through the normal file
392
- workflow, then run `umem skills sync <slug> --format json` to refresh native targets.
428
+ - `skills update`, `activate`, and `deactivate` operate on latent/generated skill IDs.
429
+ For canonical Agent Skills, use `skills canonical update`, `skills rename`, `skills cleanup`,
430
+ `skills repair`, and `skills sync`.
431
+ - `skills cleanup` previews cleanup for one canonical skill by default; add `--apply`
432
+ only after reviewing removable and blocked paths.
433
+ - `skills repair` previews project-wide orphan target cleanup by default; add
434
+ `--remove-orphan-targets --apply` only after reviewing the summary.
393
435
  - `host sync --apply` should be non-interactive in agent automation: use
394
436
  `umem host sync --apply --yes --format json`.
395
437
 
@@ -618,6 +660,15 @@ CLI commands with `--format json` and MCP tools should return equivalent payload
618
660
  | Host sync | `umem host sync --apply --yes --format json` | `sync_instructions(apply=true)` |
619
661
  | Skills list | `umem skills list --format json` | `list_skills()` |
620
662
  | Skill detail | `umem skills detail <skill-id-or-name> --format json` | `get_skill_detail(name_or_id="<skill-id-or-name>")` |
663
+ | Skill draft create | `umem skills draft create ... --format json` | `create_skill_draft(...)` |
664
+ | Skill validate | `umem skills validate <skill-or-path> --format json` | `validate_skill(skill_or_path="<skill-or-path>")` |
665
+ | Skill publish | `umem skills publish <draft-or-path> --format json` | `publish_skill(draft_or_path="<draft-or-path>")` |
666
+ | Skill create | `umem skills create ... --format json` | `create_skill(...)` |
667
+ | Skill adopt | `umem skills adopt <path> --format json` | `adopt_skill(path="<path>")` |
668
+ | Skill canonical update | `umem skills canonical update <skill> --file <path> --format json` | `update_canonical_skill(...)` |
669
+ | Skill rename | `umem skills rename <skill> --slug <slug> --format json` | `rename_skill(...)` |
670
+ | Skill cleanup | `umem skills cleanup <skill> --targets --format json` | `cleanup_skill(...)` |
671
+ | Skill repair | `umem skills repair --remove-orphan-targets --format json` | `repair_skills(...)` |
621
672
  | Track skill | `umem skills track ... --format json` | `track_latent_skill(...)` |
622
673
  | Recommend skills | `umem skills recommend --scope project --format json` | `recommend_skills(scope="project", dry_run=true)` |
623
674
  | Propose skill | `umem skills propose <latent-skill-id> --decision yes --format json` | `propose_skill(latent_skill_id="<latent-skill-id>", decision="yes")` |
@@ -625,7 +676,7 @@ CLI commands with `--format json` and MCP tools should return equivalent payload
625
676
  | Generate skill | `umem skills generate <latent-skill-id> --yes --format json` | `generate_skill(latent_skill_id="<latent-skill-id>")` |
626
677
  | Activate skill | `umem skills activate <latent-skill-id> --format json` | `activate_skill(latent_skill_id="<latent-skill-id>")` |
627
678
  | Deactivate skill | `umem skills deactivate <latent-skill-id> --format json` | `deactivate_skill(latent_skill_id="<latent-skill-id>")` |
628
- | Update skill | `umem skills update <latent-skill-id> ... --format json` | `update_skill(...)` |
679
+ | Update latent/generated skill | `umem skills update <latent-skill-id> ... --format json` | `update_skill(...)` |
629
680
 
630
681
  ## Error Mapping
631
682
 
@@ -1,8 +1,30 @@
1
+ from universal_memory.application.skills.adopt_skill import (
2
+ AdoptSkillCommand,
3
+ AdoptSkillResult,
4
+ AdoptSkillUseCase,
5
+ )
6
+ from universal_memory.application.skills.cleanup_skill import (
7
+ CleanupPlan,
8
+ CleanupSkillCommand,
9
+ CleanupSkillResult,
10
+ CleanupSkillUseCase,
11
+ RepairSkillsCommand,
12
+ RepairSkillsResult,
13
+ RepairSkillsUseCase,
14
+ )
1
15
  from universal_memory.application.skills.create_skill import (
2
16
  CreateSkillCommand,
3
17
  CreateSkillResult,
4
18
  CreateSkillUseCase,
5
19
  )
20
+ from universal_memory.application.skills.draft_skill import (
21
+ CreateSkillDraftCommand,
22
+ CreateSkillDraftUseCase,
23
+ DraftSkillResult,
24
+ PublishSkillCommand,
25
+ PublishSkillResult,
26
+ PublishSkillUseCase,
27
+ )
6
28
  from universal_memory.application.skills.generate_skill import (
7
29
  GenerateSkillCommand,
8
30
  GenerateSkillResult,
@@ -39,6 +61,11 @@ from universal_memory.application.skills.recommend_skills import (
39
61
  RecommendSkillsUseCase,
40
62
  SkillRecommendationItem,
41
63
  )
64
+ from universal_memory.application.skills.rename_skill import (
65
+ RenameSkillCommand,
66
+ RenameSkillResult,
67
+ RenameSkillUseCase,
68
+ )
42
69
  from universal_memory.application.skills.sync_skills import (
43
70
  SyncSkillResult,
44
71
  SyncSkillsCommand,
@@ -57,21 +84,41 @@ from universal_memory.application.skills.update_skill import (
57
84
  DeactivateSkillCommand,
58
85
  DeactivateSkillResult,
59
86
  DeactivateSkillUseCase,
87
+ UpdateCanonicalSkillCommand,
88
+ UpdateCanonicalSkillResult,
89
+ UpdateCanonicalSkillUseCase,
60
90
  UpdateSkillCommand,
61
91
  UpdateSkillResult,
62
92
  UpdateSkillUseCase,
63
93
  )
94
+ from universal_memory.application.skills.validate_skill import (
95
+ SkillValidationCheck,
96
+ SkillValidationReport,
97
+ ValidateSkillCommand,
98
+ ValidateSkillResult,
99
+ ValidateSkillUseCase,
100
+ )
64
101
 
65
102
  __all__ = [
66
103
  "ActivateSkillCommand",
67
104
  "ActivateSkillResult",
68
105
  "ActivateSkillUseCase",
106
+ "AdoptSkillCommand",
107
+ "AdoptSkillResult",
108
+ "AdoptSkillUseCase",
109
+ "CleanupPlan",
110
+ "CleanupSkillCommand",
111
+ "CleanupSkillResult",
112
+ "CleanupSkillUseCase",
69
113
  "CreateSkillCommand",
114
+ "CreateSkillDraftCommand",
115
+ "CreateSkillDraftUseCase",
70
116
  "CreateSkillResult",
71
117
  "CreateSkillUseCase",
72
118
  "DeactivateSkillCommand",
73
119
  "DeactivateSkillResult",
74
120
  "DeactivateSkillUseCase",
121
+ "DraftSkillResult",
75
122
  "GenerateSkillCommand",
76
123
  "GenerateSkillResult",
77
124
  "GenerateSkillUseCase",
@@ -91,11 +138,22 @@ __all__ = [
91
138
  "ProposeSkillDecision",
92
139
  "ProposeSkillResult",
93
140
  "ProposeSkillUseCase",
141
+ "PublishSkillCommand",
142
+ "PublishSkillResult",
143
+ "PublishSkillUseCase",
94
144
  "RecommendSkillsCommand",
95
145
  "RecommendSkillsResult",
96
146
  "RecommendSkillsUseCase",
147
+ "RenameSkillCommand",
148
+ "RenameSkillResult",
149
+ "RenameSkillUseCase",
150
+ "RepairSkillsCommand",
151
+ "RepairSkillsResult",
152
+ "RepairSkillsUseCase",
97
153
  "SkillListItem",
98
154
  "SkillRecommendationItem",
155
+ "SkillValidationCheck",
156
+ "SkillValidationReport",
99
157
  "SyncSkillResult",
100
158
  "SyncSkillsCommand",
101
159
  "SyncSkillsResult",
@@ -103,7 +161,13 @@ __all__ = [
103
161
  "TrackLatentSkillCommand",
104
162
  "TrackLatentSkillResult",
105
163
  "TrackLatentSkillUseCase",
164
+ "UpdateCanonicalSkillCommand",
165
+ "UpdateCanonicalSkillResult",
166
+ "UpdateCanonicalSkillUseCase",
106
167
  "UpdateSkillCommand",
107
168
  "UpdateSkillResult",
108
169
  "UpdateSkillUseCase",
170
+ "ValidateSkillCommand",
171
+ "ValidateSkillResult",
172
+ "ValidateSkillUseCase",
109
173
  ]