@leejungkiin/awkit 1.0.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 (139) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +146 -0
  3. package/VERSION +1 -0
  4. package/bin/awf.js +549 -0
  5. package/bin/awk.js +1759 -0
  6. package/core/AGENTS.md +39 -0
  7. package/core/GEMINI.md +202 -0
  8. package/core/GEMINI.md.bak +244 -0
  9. package/core/orchestrator.md +58 -0
  10. package/package.json +46 -0
  11. package/schemas/brain.schema.json +342 -0
  12. package/schemas/preferences.schema.json +95 -0
  13. package/schemas/session.schema.json +112 -0
  14. package/skill-packs/neural-memory/README.md +111 -0
  15. package/skill-packs/neural-memory/pack.json +35 -0
  16. package/skill-packs/neural-memory/schemas/brain-snapshot.json +167 -0
  17. package/skill-packs/neural-memory/skills/nm-memory-audit/SKILL.md +157 -0
  18. package/skill-packs/neural-memory/skills/nm-memory-evolution/SKILL.md +202 -0
  19. package/skill-packs/neural-memory/skills/nm-memory-intake/SKILL.md +135 -0
  20. package/skill-packs/neural-memory/skills/nm-memory-sync/SKILL.md +184 -0
  21. package/skill-packs/neural-memory/workflows/nm-import.md +73 -0
  22. package/skill-packs/neural-memory/workflows/nm-recall.md +67 -0
  23. package/skill-packs/neural-memory/workflows/nm-snapshot.md +69 -0
  24. package/skills/adaptive-language/SKILL.md +189 -0
  25. package/skills/ambient-brain/SKILL.md +314 -0
  26. package/skills/ambient-brain/brain-router.md +185 -0
  27. package/skills/ambient-brain/brain-templates.md +201 -0
  28. package/skills/auto-save/SKILL.md +223 -0
  29. package/skills/awf-adaptive-language/SKILL.md +189 -0
  30. package/skills/awf-context-help/SKILL.md +180 -0
  31. package/skills/awf-error-translator/SKILL.md +153 -0
  32. package/skills/awf-session-restore/SKILL.md +270 -0
  33. package/skills/awf-version-tracker/SKILL.md +32 -0
  34. package/skills/awf-version-tracker/scripts/snapshot.sh +22 -0
  35. package/skills/beads-manager/SKILL.md +323 -0
  36. package/skills/brainstorm-agent/SKILL.md +295 -0
  37. package/skills/context-help/SKILL.md +180 -0
  38. package/skills/error-translator/SKILL.md +153 -0
  39. package/skills/ios-engineer/SKILL.md +101 -0
  40. package/skills/memory-sync/SKILL.md +378 -0
  41. package/skills/memory-sync/memory-router.md +185 -0
  42. package/skills/memory-sync/memory-templates.md +201 -0
  43. package/skills/orchestrator/SKILL.md +193 -0
  44. package/skills/session-restore/SKILL.md +240 -0
  45. package/templates/CODEBASE.md +80 -0
  46. package/templates/brain.example.json +321 -0
  47. package/templates/preferences.example.json +21 -0
  48. package/templates/project-identity/android.json +28 -0
  49. package/templates/project-identity/backend-nestjs.json +24 -0
  50. package/templates/project-identity/expo.json +27 -0
  51. package/templates/project-identity/ios.json +27 -0
  52. package/templates/project-identity/web-nextjs.json +24 -0
  53. package/templates/session.example.json +53 -0
  54. package/templates/specs/design-template.md +166 -0
  55. package/templates/specs/requirements-template.md +65 -0
  56. package/templates/specs/tasks-template.md +132 -0
  57. package/templates/structures/android.txt +10 -0
  58. package/templates/structures/backend-nestjs.txt +6 -0
  59. package/templates/structures/expo.txt +9 -0
  60. package/templates/structures/ios.txt +9 -0
  61. package/templates/structures/web-nextjs.txt +6 -0
  62. package/templates/workflow_dual_mode_template.md +87 -0
  63. package/workflows/_uncategorized/README.md +339 -0
  64. package/workflows/_uncategorized/ads-creative.md +357 -0
  65. package/workflows/_uncategorized/ads-full-optimization.md +308 -0
  66. package/workflows/_uncategorized/ads-plan.md +247 -0
  67. package/workflows/_uncategorized/ads-user-analysis.md +337 -0
  68. package/workflows/_uncategorized/skill-health.md +35 -0
  69. package/workflows/_uncategorized/skill-rollback.md +35 -0
  70. package/workflows/ads/admob.md +62 -0
  71. package/workflows/ads/ads-analyst.md +201 -0
  72. package/workflows/ads/ads-audit.md +106 -0
  73. package/workflows/ads/ads-optimize.md +97 -0
  74. package/workflows/ads/ads-targeting.md +241 -0
  75. package/workflows/ads/adsExpert.md +160 -0
  76. package/workflows/ads/smali-ads-config.md +400 -0
  77. package/workflows/ads/smali-ads-flow.md +331 -0
  78. package/workflows/ads/smali-ads-interstitial.md +377 -0
  79. package/workflows/ads/smali-ads-native.md +382 -0
  80. package/workflows/context/auto-execution-workflow.md +291 -0
  81. package/workflows/context/auto-implement.md +211 -0
  82. package/workflows/context/codebase-sync.md +163 -0
  83. package/workflows/context/logic-reasoning-workflow.md +260 -0
  84. package/workflows/context/next.md +195 -0
  85. package/workflows/context/recap.md +212 -0
  86. package/workflows/context/save-brain.md +285 -0
  87. package/workflows/context/user-intent-analysis-workflow.md +206 -0
  88. package/workflows/expert/codeExpert.md +126 -0
  89. package/workflows/expert/debugExpert.md +136 -0
  90. package/workflows/expert/planExpert.md +112 -0
  91. package/workflows/git/cloudflare-tunnel.md +135 -0
  92. package/workflows/git/git-commit-workflow.md +75 -0
  93. package/workflows/git/hotfix.md +357 -0
  94. package/workflows/git/release-notes.md +160 -0
  95. package/workflows/git/rollback.md +52 -0
  96. package/workflows/git/smart-git-ops.md +103 -0
  97. package/workflows/lifecycle/brainstorm.md +377 -0
  98. package/workflows/lifecycle/code.md +663 -0
  99. package/workflows/lifecycle/debug.md +116 -0
  100. package/workflows/lifecycle/deploy.md +95 -0
  101. package/workflows/lifecycle/init.md +152 -0
  102. package/workflows/lifecycle/master-code-workflow.md +300 -0
  103. package/workflows/lifecycle/migration.md +196 -0
  104. package/workflows/lifecycle/plan.md +91 -0
  105. package/workflows/lifecycle/refactor.md +165 -0
  106. package/workflows/lifecycle/run.md +52 -0
  107. package/workflows/lifecycle/test.md +91 -0
  108. package/workflows/meta/customize.md +346 -0
  109. package/workflows/meta/file-protection-rules.md +129 -0
  110. package/workflows/meta/help.html +350 -0
  111. package/workflows/meta/project-identity-enforcement.md +180 -0
  112. package/workflows/mobile/app-analysis.md +64 -0
  113. package/workflows/mobile/maestro-qa-workflow.md +470 -0
  114. package/workflows/mobile/maestro-test-workflow.md +84 -0
  115. package/workflows/mobile/structure-clean-architect.md +271 -0
  116. package/workflows/mobile/turbo-mobile-build.md +190 -0
  117. package/workflows/quality/accessibility-audit.md +311 -0
  118. package/workflows/quality/audit.md +217 -0
  119. package/workflows/quality/bug-hunter.md +243 -0
  120. package/workflows/quality/code-janitor.md +209 -0
  121. package/workflows/quality/code-quality-rules.md +132 -0
  122. package/workflows/quality/performance-audit.md +343 -0
  123. package/workflows/quality/project-audit.md +61 -0
  124. package/workflows/quality/self-healing-test.md +192 -0
  125. package/workflows/quality/ui-review.md +130 -0
  126. package/workflows/quality/ux-audit.md +213 -0
  127. package/workflows/quality/visual-debug.md +34 -0
  128. package/workflows/roles/oracle.md +267 -0
  129. package/workflows/roles/product-manager-workflow.md +52 -0
  130. package/workflows/roles/qa-engineer-workflow.md +41 -0
  131. package/workflows/roles/tech-lead-workflow.md +45 -0
  132. package/workflows/roles/ui-ux-designer-workflow.md +42 -0
  133. package/workflows/roles/vibe-coding-master-workflow.md +52 -0
  134. package/workflows/ui/app-screen-analyzer.md +152 -0
  135. package/workflows/ui/create-feature.md +332 -0
  136. package/workflows/ui/create-spec-architect.md +184 -0
  137. package/workflows/ui/design-to-ui.md +308 -0
  138. package/workflows/ui/ui-first-methodology.md +279 -0
  139. package/workflows/ui/visualize.md +298 -0
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "neural-memory",
3
+ "auto_install": true,
4
+ "description": "NeuralMemory-powered ambient brain sync with spreading activation recall",
5
+ "requires": [
6
+ {
7
+ "type": "pip",
8
+ "package": "neural-memory",
9
+ "python_min": "3.11",
10
+ "check_cmd": "nmem --version",
11
+ "install_cmd": "pip install neural-memory",
12
+ "description": "NeuralMemory Python engine (SQLite graph + MCP server)"
13
+ }
14
+ ],
15
+ "post_install": [
16
+ {
17
+ "cmd": "nmem init",
18
+ "description": "Initialize NeuralMemory database (~/.nmem/brain.db)",
19
+ "optional": true,
20
+ "skip_if_exists": "~/.nmem/brain.db"
21
+ }
22
+ ],
23
+ "mcp_setup": {
24
+ "description": "Add NeuralMemory MCP server to your AI editor config",
25
+ "server_name": "neural-memory",
26
+ "config_json": {
27
+ "command": "nmem-mcp"
28
+ },
29
+ "editors": {
30
+ "Gemini (GEMINI.md)": "Not required β€” skills use nmem_* tools via MCP auto-discovery",
31
+ "Cursor / Windsurf": "Add to .cursor/mcp.json or mcp_config.json",
32
+ "Claude Code": "Run: /plugin install neural-memory"
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,167 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "NeuralMemory Brain Snapshot",
4
+ "description": "Schema for nm-snapshot exported brain state β€” Portable Consciousness",
5
+ "type": "object",
6
+ "required": [
7
+ "version",
8
+ "exported_at",
9
+ "memories",
10
+ "synapses"
11
+ ],
12
+ "properties": {
13
+ "version": {
14
+ "type": "string",
15
+ "const": "1.0"
16
+ },
17
+ "exported_at": {
18
+ "type": "string",
19
+ "format": "date-time"
20
+ },
21
+ "project": {
22
+ "type": "string",
23
+ "description": "Project name from .project-identity"
24
+ },
25
+ "scope": {
26
+ "type": "string",
27
+ "enum": [
28
+ "full",
29
+ "topic",
30
+ "recent",
31
+ "high-priority"
32
+ ]
33
+ },
34
+ "memories": {
35
+ "type": "array",
36
+ "items": {
37
+ "type": "object",
38
+ "required": [
39
+ "id",
40
+ "content",
41
+ "type",
42
+ "priority",
43
+ "created_at"
44
+ ],
45
+ "properties": {
46
+ "id": {
47
+ "type": "string"
48
+ },
49
+ "content": {
50
+ "type": "string"
51
+ },
52
+ "type": {
53
+ "type": "string",
54
+ "enum": [
55
+ "fact",
56
+ "decision",
57
+ "todo",
58
+ "error",
59
+ "insight",
60
+ "preference",
61
+ "instruction",
62
+ "workflow",
63
+ "context"
64
+ ]
65
+ },
66
+ "priority": {
67
+ "type": "integer",
68
+ "minimum": 0,
69
+ "maximum": 10
70
+ },
71
+ "tags": {
72
+ "type": "array",
73
+ "items": {
74
+ "type": "string"
75
+ }
76
+ },
77
+ "created_at": {
78
+ "type": "string",
79
+ "format": "date-time"
80
+ },
81
+ "expires_at": {
82
+ "type": "string",
83
+ "format": "date-time"
84
+ },
85
+ "activation_score": {
86
+ "type": "number",
87
+ "minimum": 0,
88
+ "maximum": 1
89
+ },
90
+ "recall_count": {
91
+ "type": "integer",
92
+ "minimum": 0
93
+ },
94
+ "status": {
95
+ "type": "string",
96
+ "enum": [
97
+ "active",
98
+ "archived",
99
+ "expired"
100
+ ]
101
+ }
102
+ }
103
+ }
104
+ },
105
+ "synapses": {
106
+ "type": "array",
107
+ "items": {
108
+ "type": "object",
109
+ "required": [
110
+ "from_id",
111
+ "to_id",
112
+ "type",
113
+ "weight"
114
+ ],
115
+ "properties": {
116
+ "from_id": {
117
+ "type": "string"
118
+ },
119
+ "to_id": {
120
+ "type": "string"
121
+ },
122
+ "type": {
123
+ "type": "string",
124
+ "enum": [
125
+ "CAUSED_BY",
126
+ "LEADS_TO",
127
+ "DISCUSSED",
128
+ "CONTRADICTS",
129
+ "SUPERSEDES",
130
+ "COMPLEMENTS",
131
+ "RELATED"
132
+ ]
133
+ },
134
+ "weight": {
135
+ "type": "number",
136
+ "minimum": 0,
137
+ "maximum": 1
138
+ },
139
+ "created_at": {
140
+ "type": "string",
141
+ "format": "date-time"
142
+ }
143
+ }
144
+ }
145
+ },
146
+ "stats": {
147
+ "type": "object",
148
+ "properties": {
149
+ "total_memories": {
150
+ "type": "integer"
151
+ },
152
+ "total_synapses": {
153
+ "type": "integer"
154
+ },
155
+ "avg_priority": {
156
+ "type": "number"
157
+ },
158
+ "active_memories": {
159
+ "type": "integer"
160
+ },
161
+ "archived_memories": {
162
+ "type": "integer"
163
+ }
164
+ }
165
+ }
166
+ }
167
+ }
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: nm-memory-audit
3
+ description: |
4
+ 6-dimension quality review of NeuralMemory brain health.
5
+ Grades each dimension (A-F), produces graded findings, and recommends
6
+ concrete actions for improvement. Run weekly or before major sprints.
7
+ metadata:
8
+ stage: review
9
+ version: "1.0"
10
+ requires: neural-memory (pip install neural-memory)
11
+ tags: [memory, audit, quality, review, neuralmemory]
12
+ agent: Memory Quality Inspector
13
+ trigger:
14
+ commands: ["/memory-audit", "/nm-audit"]
15
+ keywords: ["audit brain", "check memory", "memory health"]
16
+ allowed-tools:
17
+ - nmem_recall
18
+ - nmem_stats
19
+ - nmem_context
20
+ ---
21
+
22
+ # NM Memory Audit β€” Memory Quality Inspector
23
+
24
+ > Systematic quality review of the NeuralMemory brain.
25
+ > Grades memory health across 6 dimensions, surfaces actionable findings.
26
+
27
+ ## Trigger
28
+
29
+ ```
30
+ /memory-audit
31
+ /nm-audit
32
+ ```
33
+
34
+ ---
35
+
36
+ ## 6 Audit Dimensions
37
+
38
+ ### 1. Purity (A-F)
39
+ **Question:** Are memories well-typed and single-concept?
40
+
41
+ Check for:
42
+ - Mixed types in one memory (fact + decision combined)
43
+ - Vague or generic content ("fixed a bug" β†’ F)
44
+ - Missing source attribution
45
+ - Over-broad scope ("everything about auth")
46
+
47
+ **Grade:**
48
+ - A: 90%+ memories are single-concept, well-typed
49
+ - B: 75-89% clean
50
+ - C: 60-74% β€” noticeable clutter
51
+ - D: 40-59% β€” significant cleanup needed
52
+ - F: <40% β€” urgent restructuring required
53
+
54
+ ### 2. Freshness (A-F)
55
+ **Question:** Are memories still current and relevant?
56
+
57
+ Check for:
58
+ - Expired memories (past TTL) still active
59
+ - Outdated decisions (superseded but not marked)
60
+ - Stale context (project state changed)
61
+ - Memories about deprecated features/APIs
62
+
63
+ **Grade based on:** % expired / stale vs total
64
+
65
+ ### 3. Coverage (A-F)
66
+ **Question:** Are important areas of the project well-documented?
67
+
68
+ Check for:
69
+ - Core architecture decisions β€” present? complete?
70
+ - Recent bugs/fixes β€” all captured?
71
+ - Team preferences β€” documented?
72
+ - Onboarding knowledge β€” accessible?
73
+
74
+ **Grade based on:** Key areas vs documented areas ratio
75
+
76
+ ### 4. Clarity (A-F)
77
+ **Question:** Can memories be understood without context?
78
+
79
+ Check for:
80
+ - Jargon without explanation ("the THING was fixed")
81
+ - Missing who/what/why ("updated it")
82
+ - Inconsistent terminology (same concept, multiple names)
83
+ - Vietnamese/English mixing without clear pattern
84
+
85
+ **Grade based on:** Avg clarity score across sampled memories
86
+
87
+ ### 5. Relevance (A-F)
88
+ **Question:** Are memories being recalled and used?
89
+
90
+ Check for:
91
+ - Low-activation memories (never recalled in 30d)
92
+ - Duplicate memories competing for activation
93
+ - Orphaned memories (no synapse connections)
94
+ - Memories blocking relevant recall (noise)
95
+
96
+ **Grade based on:** Recall frequency + synapse connectivity
97
+
98
+ ### 6. Structure (A-F)
99
+ **Question:** Is the synapse graph healthy?
100
+
101
+ Check for:
102
+ - Isolated neurons (no connections)
103
+ - Missing causal links (decisions without causes)
104
+ - Tag inconsistency (similar concepts, different tags)
105
+ - Temporal gaps (events without before/after links)
106
+
107
+ **Grade based on:** Graph connectivity metrics from nmem_stats
108
+
109
+ ---
110
+
111
+ ## Output Format
112
+
113
+ ```
114
+ πŸ” Memory Brain Audit β€” [date]
115
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
116
+
117
+ πŸ“Š Health Overview
118
+ Total memories: 127
119
+ Active (recalled 7d): 43 (34%)
120
+ Expired/stale: 12 (9%)
121
+ Orphaned neurons: 8 (6%)
122
+
123
+ πŸ“‹ Dimension Grades
124
+ Purity: B (78%) β€” Some mixed-concept memories found
125
+ Freshness: A (92%) β€” Brain is current ✨
126
+ Coverage: C (61%) β€” Auth and deploy areas sparse
127
+ Clarity: B (80%) β€” Minor jargon issues
128
+ Relevance: B (75%) β€” 8 orphaned low-priority memories
129
+ Structure: C (65%) β€” Missing causal links in 15 decisions
130
+
131
+ Overall: B- (75%)
132
+
133
+ πŸ”΄ Critical Findings (fix now)
134
+ 1. 3 expired `todo` memories still active β€” run /memory-evolution to prune
135
+ 2. Auth architecture has no decision memories β€” document now
136
+
137
+ 🟑 Moderate Findings (fix this week)
138
+ 3. 8 orphaned memories β€” no synapse connections
139
+ 4. "deployment" and "deploy" tags used inconsistently (15 memories)
140
+
141
+ 🟒 Minor Findings (optional)
142
+ 5. 5 memories could be split into smaller single-concept memories
143
+ 6. 3 decisions missing "because Y" reasoning
144
+
145
+ πŸ’‘ Recommended Next Step
146
+ Run: /memory-evolution "prune expired, fix auth coverage"
147
+ ```
148
+
149
+ ---
150
+
151
+ ## Rules
152
+
153
+ - Always show the full 6-dimension breakdown
154
+ - Never modify memories during audit β€” report only
155
+ - Grade based on objective metrics when possible
156
+ - Prioritize by impact: Critical > Moderate > Minor
157
+ - End with one concrete "next step" recommendation
@@ -0,0 +1,202 @@
1
+ ---
2
+ name: nm-memory-evolution
3
+ description: |
4
+ Evidence-based brain optimization. Analyzes usage patterns to consolidate
5
+ fragmented memories, enrich sparse ones, prune stale/irrelevant ones,
6
+ and normalize tags. Improves recall quality over time.
7
+ metadata:
8
+ stage: workflow
9
+ version: "1.0"
10
+ requires: neural-memory (pip install neural-memory)
11
+ tags: [memory, evolution, optimize, prune, consolidate]
12
+ agent: Memory Evolution Strategist
13
+ trigger:
14
+ commands: ["/memory-evolution", "/nm-evolve"]
15
+ keywords: ["optimize brain", "clean memory", "prune", "consolidate memories"]
16
+ allowed-tools:
17
+ - nmem_remember
18
+ - nmem_recall
19
+ - nmem_stats
20
+ - nmem_context
21
+ - nmem_auto
22
+ ---
23
+
24
+ # NM Memory Evolution β€” Memory Evolution Strategist
25
+
26
+ > Evidence-based brain optimization using actual usage patterns.
27
+ > Consolidates, enriches, prunes, and normalizes β€” making recall more precise over time.
28
+
29
+ ## Trigger
30
+
31
+ ```
32
+ /memory-evolution # Full brain optimization
33
+ /memory-evolution "focus on auth topic" # Scoped to topic
34
+ /nm-evolve "prune expired todos" # Specific operation
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Analysis Phase
40
+
41
+ Before any changes, generate evolution opportunities:
42
+
43
+ ```python
44
+ # 1. Usage patterns
45
+ stats = nmem_stats()
46
+ # β†’ recall_frequency, activation_scores, orphan_neurons
47
+
48
+ # 2. Cluster detection
49
+ context = nmem_context(topic=focus_area)
50
+ # β†’ related memory clusters, fragmentation patterns
51
+
52
+ # 3. Tag analysis
53
+ # β†’ inconsistency, synonyms, normalization needs
54
+ ```
55
+
56
+ ---
57
+
58
+ ## 4 Evolution Operations
59
+
60
+ ### 1. Consolidation
61
+ **When:** Multiple fragmented memories cover same concept
62
+
63
+ **Example:**
64
+ ```
65
+ Before (3 memories):
66
+ [fact] "API uses JWT"
67
+ [fact] "JWT tokens expire in 24h"
68
+ [fact] "JWT stored in Authorization header"
69
+
70
+ After (1 memory):
71
+ [instruction] "API auth: JWT tokens, 24h expiry, sent via Authorization header.
72
+ Chosen for stateless architecture (see decision #42)."
73
+ ```
74
+
75
+ **Rules:**
76
+ - Show before/after preview β€” never auto-consolidate
77
+ - Keep highest priority + merge all tags
78
+ - Create `SUPERSEDES` synapse to old memories
79
+ - Log: "Consolidated 3 β†’ 1 [topic]"
80
+
81
+ ### 2. Enrichment
82
+ **When:** Memories exist but lack context/reasoning
83
+
84
+ **Example:**
85
+ ```
86
+ Before: [decision] "Using Redis for cache"
87
+ After: [decision] "Using Redis for cache. Reason: Redis Cluster supports Lua scripts
88
+ needed for atomic counter ops. Team has Redis expertise.
89
+ Chosen over Memcached on 2026-01-15."
90
+ ```
91
+
92
+ **Sources for enrichment:**
93
+ - Related memories in the activation cluster
94
+ - User can be asked for missing info (non-blocking)
95
+
96
+ ### 3. Pruning
97
+ **When:** Memories that reduce recall quality
98
+
99
+ **Prune candidates:**
100
+ - Expired TTL memories (todos past deadline, stale context)
101
+ - Duplicate/near-duplicate memories (similarity > 0.95)
102
+ - Orphaned facts with 0 recall in 60d
103
+ - Superseded decisions (overridden by newer ones)
104
+ - Out-of-scope memories (wrong project/context)
105
+
106
+ **Rules:**
107
+ - NEVER hard-delete β€” archive with `status=archived`
108
+ - Show full prune list before executing
109
+ - "Archived X memories" β€” not "deleted"
110
+ - Allow rescue: user can un-archive any item
111
+
112
+ ### 4. Tag Normalization
113
+ **When:** Inconsistent tags reduce recall precision
114
+
115
+ **Common issues:**
116
+ - Synonyms: "frontend" / "front-end" / "FE" β†’ normalize to "frontend"
117
+ - Abbreviations: "db" / "database" / "DB" β†’ normalize to "database"
118
+ - Case: "Auth" / "auth" / "AUTH" β†’ normalize to "auth"
119
+ - Language mix: "xΓ‘c thα»±c" / "auth" for same concept β†’ pick one
120
+
121
+ **Process:**
122
+ 1. Build tag frequency map
123
+ 2. Identify synonym clusters
124
+ 3. Propose normalization mapping
125
+ 4. Apply after user confirms
126
+
127
+ ---
128
+
129
+ ## Output Format
130
+
131
+ ```
132
+ πŸ”„ Memory Evolution Plan
133
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
134
+
135
+ πŸ“Š Analysis Results
136
+ Memories analyzed: 127
137
+ Evolution opportunities: 23
138
+
139
+ πŸ“‹ Proposed Operations
140
+
141
+ CONSOLIDATE (4 groups β†’ 4 memories)
142
+ 1. Auth memories: 5 fragments β†’ 1 instruction [preview]
143
+ 2. Database facts: 3 fragments β†’ 1 fact [preview]
144
+ ...
145
+
146
+ ENRICH (6 memories lacking context)
147
+ 1. [decision] "Using Redis" β€” missing reasoning [add]
148
+ 2. [instruction] "Always validate input" β€” missing scope [add]
149
+ ...
150
+
151
+ PRUNE (9 memories)
152
+ 1. 4 expired todos (past deadline) [archive]
153
+ 2. 3 orphaned facts (0 recall in 60d) [archive]
154
+ 3. 2 near-duplicates [merge]
155
+
156
+ NORMALIZE TAGS
157
+ "frontend" / "front-end" / "FE" β†’ "frontend" (affects 18 memories)
158
+ "db" / "database" β†’ "database" (affects 12 memories)
159
+
160
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
161
+ Execute plan? [all / select / cancel]
162
+ > all β†’ execute all operations
163
+ > select β†’ choose operations individually
164
+ > cancel β†’ abort
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Execution Protocol
170
+
171
+ 1. **Show full plan** β€” never execute without preview
172
+ 2. **Execute in order:** Prune β†’ Consolidate β†’ Enrich β†’ Normalize
173
+ (pruning first reduces noise for better consolidation)
174
+ 3. **Checkpoint after each phase** β€” can stop mid-way
175
+ 4. **Create evolution snapshot** before starting (rollback point)
176
+
177
+ ---
178
+
179
+ ## Post-Evolution Report
180
+
181
+ ```
182
+ βœ… Evolution Complete
183
+
184
+ Consolidated: 4 memory groups (15 β†’ 4)
185
+ Enriched: 6 memories
186
+ Archived: 9 memories
187
+ Tags normalised: 30 memories updated
188
+
189
+ Brain quality: B- β†’ A- (estimated)
190
+
191
+ πŸ’‘ Recommended audit in 7 days: /memory-audit
192
+ ```
193
+
194
+ ---
195
+
196
+ ## Rules
197
+
198
+ - **Never auto-prune** β€” always show prune list to user
199
+ - **Archive, don't delete** β€” memories may be relevant later
200
+ - **Preserve intent** β€” consolidation must not lose meaning
201
+ - **Test recall after** β€” spot-check key topics after evolution
202
+ - **Vietnamese support** β€” operations work regardless of language
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: nm-memory-intake
3
+ description: |
4
+ Structured memory creation workflow. Converts messy notes, meeting logs,
5
+ and unstructured thoughts into well-typed, tagged, priority-scored NeuralMemory entries.
6
+ Uses 1-question-at-a-time clarification + batch preview before storing.
7
+ metadata:
8
+ stage: workflow
9
+ version: "1.0"
10
+ requires: neural-memory (pip install neural-memory)
11
+ tags: [memory, intake, structured, neuralmemory, workflow]
12
+ agent: Memory Intake Specialist
13
+ trigger:
14
+ commands: ["/memory-intake", "/nm-intake"]
15
+ keywords: ["lΖ°u notes", "save this", "remember meeting", "ghi lαΊ‘i buα»•i"]
16
+ allowed-tools:
17
+ - nmem_remember
18
+ - nmem_recall
19
+ - nmem_stats
20
+ - nmem_context
21
+ - nmem_auto
22
+ ---
23
+
24
+ # NM Memory Intake β€” Memory Intake Specialist
25
+
26
+ > Transform raw, unstructured input into high-quality structured memories.
27
+ > Acts as a thoughtful librarian β€” clarifying, categorizing, and filing
28
+ > information so it can be recalled precisely when needed.
29
+
30
+ ## Trigger
31
+
32
+ ```
33
+ /memory-intake "raw notes or conversation here"
34
+ /nm-intake "messy meeting notes..."
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Memory Types
40
+
41
+ | Type | Signal Words | Priority |
42
+ |------|-------------|----------|
43
+ | `fact` | "is", "has", "uses", dates, numbers, names | 5 |
44
+ | `decision` | "decided", "chose", "will use", "going with" | 7 |
45
+ | `todo` | "need to", "should", "TODO", "must" | 6 |
46
+ | `error` | "bug", "crash", "failed", "broken", "fix" | 7 |
47
+ | `insight` | "realized", "learned", "turns out", "key takeaway" | 6 |
48
+ | `preference` | "prefer", "always use", "never do", "convention" | 5 |
49
+ | `instruction` | "rule:", "always:", "never:", "when X do Y" | 8 |
50
+ | `workflow` | "process:", "steps:", "first...then...finally" | 6 |
51
+ | `context` | background info, project state, env details | 4 |
52
+
53
+ ---
54
+
55
+ ## Process (6 Phases)
56
+
57
+ ### Phase 1: Triage
58
+ Scan raw input β†’ classify each information unit by type.
59
+ If input is ambiguous β†’ go to Phase 2.
60
+ If clearly typed β†’ skip to Phase 3.
61
+
62
+ ### Phase 2: Clarification (1-Question-at-a-Time)
63
+ ```
64
+ Found: "We're using PostgreSQL now"
65
+
66
+ What type?
67
+ a) Decision β€” you chose PostgreSQL over alternatives
68
+ b) Fact β€” PostgreSQL is the current database
69
+ c) Instruction β€” always use PostgreSQL for this project
70
+ d) Other (explain)
71
+ ```
72
+
73
+ **Rules:**
74
+ - ONE question per round β€” never dump a checklist
75
+ - Always provide options (2-4 choices)
76
+ - Infer when confident (>80%) β€” don't ask obvious ones
77
+ - Max 5 rounds β€” then use best-guess
78
+ - Group similar: "Found 3 TODOs. Priority for all? [high/normal/low]"
79
+
80
+ ### Phase 3: Enrichment
81
+ For each item, determine:
82
+ 1. **Tags** β€” 2-5 relevant tags, normalize ("frontend" not "front-end")
83
+ 2. **Priority** β€” 0-10 scale (see type table above)
84
+ 3. **Expiry** β€” todo: 30d, error: 90d, fact: none, context: 30d
85
+ 4. **Source** β€” "Per meeting 2026-02-26: ...", "From error log: ..."
86
+
87
+ ### Phase 4: Deduplication
88
+ ```python
89
+ nmem_recall("topic keywords")
90
+ # β†’ Identical: skip, report duplicate
91
+ # β†’ Updated: store new, note supersedes old
92
+ # β†’ Contradicts: store with conflict flag, alert user
93
+ # β†’ Complements: store, note connection
94
+ ```
95
+
96
+ ### Phase 5: Batch Preview + Confirm
97
+ ```
98
+ Ready to store 7 memories:
99
+
100
+ 1. [decision] "Chose PostgreSQL for user service" priority=7 tags=[database, arch]
101
+ 2. [todo] "Migrate user table" priority=6 tags=[database, migration] expires=30d
102
+ 3. [fact] "PostgreSQL 16 supports JSON path queries" priority=5 tags=[database]
103
+ ...
104
+
105
+ Store all? [yes / edit # / skip # / cancel]
106
+ ```
107
+
108
+ **Rules:**
109
+ - Max 10 per batch β€” split larger batches with pause
110
+ - NEVER auto-store without showing preview
111
+ - Allow per-item edits before commit
112
+ - Store: decisions first, then errors, then facts (priority order)
113
+
114
+ ### Phase 6: Intake Report
115
+ ```
116
+ βœ… Intake Complete
117
+ Stored: 7 memories (2 decisions, 3 facts, 1 todo, 1 insight)
118
+ Skipped: 1 duplicate
119
+ Conflicts: 0 | Gaps: 2 items need follow-up
120
+
121
+ Follow-up needed:
122
+ - "Redis cache TTL" β€” what's the agreed TTL?
123
+ - "Deploy schedule" β€” weekly or bi-weekly?
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Rules
129
+
130
+ - **Never auto-store** β€” always show preview before writing
131
+ - **Never guess security-sensitive info** β€” ask explicitly
132
+ - **Prefer specific over vague** β€” "PostgreSQL 16 on AWS RDS" not "using a database"
133
+ - **Include reasoning** β€” "Chose X because Y" not just "Using X"
134
+ - **One concept per memory** β€” don't cram multiple facts
135
+ - **Vietnamese support** β€” if input is Vietnamese, store in Vietnamese