ilang-ai commited on
Commit
813575d
·
0 Parent(s):

Sync from GitHub

Browse files
.ilang/memory.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # Memory
2
+
3
+ <!-- Your AI tools append here after each session. -->
4
+ <!-- Decisions, lessons, facts, progress. All structured, all searchable. -->
5
+ <!-- Git history tracks every change. Nothing is ever truly lost. -->
.ilang/soul.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # Soul
2
+
3
+ <!-- This file is auto-generated by your AI tool during onboarding. -->
4
+ <!-- Do not fill manually. Just start a conversation and it will ask you a few questions. -->
5
+ <!-- You can edit it anytime. It's your file. -->
AGENTS.md ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mem-forever
2
+
3
+ ::GENE{mem-forever|v:1.0|spec:ilang-v4.0}
4
+ T:this_repo_is_user_memory
5
+ T:read_soul_and_memory_before_work
6
+ T:update_memory_after_significant_work
7
+ T:onboard_if_soul_empty
8
+ T:one_question_at_a_time
9
+ T:never_expose_internal_format
10
+ T:commit_push_immediately_after_every_update
11
+ T:check_unsaved_changes_on_startup
12
+ A:skip_memory_read⇒context_loss
13
+ A:overwrite_memory⇒append_or_merge
14
+ A:ask_multiple_questions⇒one_only
15
+ A:batch_saves_to_session_end⇒commit_each_update
16
+
17
+ ## Session Start
18
+
19
+ 1. Check for uncommitted changes in `.ilang/`. If found → commit and push immediately. These are unsaved memories from a previous session.
20
+ 2. Read `.ilang/soul.md`. If empty or only template → run onboarding (see below).
21
+ 3. Read `.ilang/memory.md`. Resume context from last session.
22
+ 4. Do whatever the user asks. Apply preferences from soul.md to all output.
23
+
24
+ ## Onboarding (soul.md empty)
25
+
26
+ ::ACTIVATE{onboarding|if:.ilang/soul.md=template_only}
27
+
28
+ Open casually: "Hey, before we start — mind if I ask a couple things so I can work the way you like?"
29
+
30
+ Ask ONE question per message. Wait for answer. Cover naturally:
31
+ - What they do / build
32
+ - How they prefer to work (plan-first vs build-first, detail vs minimal)
33
+ - What AI tools they use
34
+ - Any strong preferences (language, framework, style)
35
+
36
+ Completion: write `.ilang/soul.md` when you have role + work style + one clear preference. Don't wait for perfection. Fill gaps later from observed behavior.
37
+
38
+ Say: "Saved some notes so things go smoother next time." No fanfare. Move on to their actual task.
39
+
40
+ ## soul.md Format
41
+
42
+ ```
43
+ ::DNA{user}
44
+ ::META{schema:1.0|updated:YYYY-MM-DD|sessions:0}
45
+
46
+ ::CORE{
47
+ ::CONTEXT{role:___}
48
+
49
+ ::GENE{style|conf:tentative|scope:global}
50
+ T:___
51
+ A:___⇒___
52
+ }
53
+
54
+ ::FACT{
55
+ ::ITEM{key:___|value:___|conf:tentative}
56
+ }
57
+
58
+ ::LESSONS{}
59
+
60
+ ::RUNTIME{
61
+ transparency:quiet
62
+ speed:balanced
63
+ }
64
+
65
+ ::END{DNA}
66
+ ```
67
+
68
+ ## Memory Update
69
+
70
+ ::ACTIVATE{memory_update}
71
+ ON:immediately_after_change
72
+ A:wait_until_session_end⇒data_loss_risk
73
+
74
+ Every time you update soul.md or memory.md, commit and push RIGHT THEN. Do not batch. Do not wait. Users close windows without warning.
75
+
76
+ Append to `.ilang/memory.md`. Format:
77
+
78
+ ```
79
+ ## YYYY-MM-DD
80
+
81
+ ::DECIDED{what|why|context}
82
+ ::LEARNED{what|from:error_or_observation}
83
+ ::FACT{key:___|value:___}
84
+ ::PROGRESS{done:___|next:___}
85
+ ```
86
+
87
+ Rules:
88
+ - Append, never overwrite. Git history is your version control.
89
+ - Compress: store patterns not events. "User prefers X" not "User said they like X in message 47".
90
+ - Never store secrets, API keys, passwords.
91
+ - Max 200 lines. When exceeded, summarize oldest entries into `::SUMMARY{}` block.
92
+
93
+ ## Mutation
94
+
95
+ ::MUTATION
96
+ repeated_behavior>=3 => promote conf:tentative to conf:confirmed in soul.md
97
+ explicit_rejection => add A:anti_pattern in soul.md
98
+ one_off_event => memory.md only, not soul.md
99
+ lesson_across_2_projects => promote to ::CORE{} anti-pattern
100
+
101
+ ## Decay
102
+
103
+ ::DECAY
104
+ tentative_gene_unseen_30d => remove from soul.md
105
+ lesson_reconfirmed => promote conf
106
+ conflicting_genes => split by context with when: condition
107
+
108
+ ## Conflict Resolution
109
+
110
+ ::RESOLVE
111
+ user_explicit_now > soul.md_preference > defaults
112
+ if conflict: follow user this session, update soul.md only if repeated 3x
113
+
114
+ ## Commit and Push
115
+
116
+ IMMEDIATELY after any `.ilang/` file change:
117
+
118
+ ```bash
119
+ git add .ilang/
120
+ git commit -m "mem: brief description of what changed"
121
+ git push
122
+ ```
123
+
124
+ Do NOT batch multiple changes into one commit. Each save is its own commit. If user closes the window mid-session, every save up to that point is already safe.
125
+
126
+ If push fails (auth, network), tell user: "Memory saved locally. Run `git push` when ready."
127
+
128
+ ## Transparency
129
+
130
+ Never say: "DNA", "gene", "behavioral pattern", "encode", "mutation", "decay", "compression ratio".
131
+
132
+ Do say: "I saved some notes", "I remember from last time", "Based on how you usually work".
133
+
134
+ If user asks to see their profile → show soul.md openly. It's their file.
135
+
136
+ ---
137
+
138
+ Powered by I-Lang v4.0 | ilang.ai
CLAUDE.md ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mem-forever
2
+
3
+ ::GENE{mem-forever|v:1.0|spec:ilang-v4.0}
4
+ T:this_repo_is_user_memory
5
+ T:read_soul_and_memory_before_work
6
+ T:update_memory_after_significant_work
7
+ T:onboard_if_soul_empty
8
+ T:one_question_at_a_time
9
+ T:never_expose_internal_format
10
+ T:commit_push_immediately_after_every_update
11
+ T:check_unsaved_changes_on_startup
12
+ A:skip_memory_read⇒context_loss
13
+ A:overwrite_memory⇒append_or_merge
14
+ A:ask_multiple_questions⇒one_only
15
+ A:batch_saves_to_session_end⇒commit_each_update
16
+
17
+ ## Session Start
18
+
19
+ 1. Check for uncommitted changes in `.ilang/`. If found → commit and push immediately. These are unsaved memories from a previous session.
20
+ 2. Read `.ilang/soul.md`. If empty or only template → run onboarding (see below).
21
+ 3. Read `.ilang/memory.md`. Resume context from last session.
22
+ 4. Do whatever the user asks. Apply preferences from soul.md to all output.
23
+
24
+ ## Onboarding (soul.md empty)
25
+
26
+ ::ACTIVATE{onboarding|if:.ilang/soul.md=template_only}
27
+
28
+ Open casually: "Hey, before we start — mind if I ask a couple things so I can work the way you like?"
29
+
30
+ Ask ONE question per message. Wait for answer. Cover naturally:
31
+ - What they do / build
32
+ - How they prefer to work (plan-first vs build-first, detail vs minimal)
33
+ - What AI tools they use
34
+ - Any strong preferences (language, framework, style)
35
+
36
+ Completion: write `.ilang/soul.md` when you have role + work style + one clear preference. Don't wait for perfection. Fill gaps later from observed behavior.
37
+
38
+ Say: "Saved some notes so things go smoother next time." No fanfare. Move on to their actual task.
39
+
40
+ ## soul.md Format
41
+
42
+ ```
43
+ ::DNA{user}
44
+ ::META{schema:1.0|updated:YYYY-MM-DD|sessions:0}
45
+
46
+ ::CORE{
47
+ ::CONTEXT{role:___}
48
+
49
+ ::GENE{style|conf:tentative|scope:global}
50
+ T:___
51
+ A:___⇒___
52
+ }
53
+
54
+ ::FACT{
55
+ ::ITEM{key:___|value:___|conf:tentative}
56
+ }
57
+
58
+ ::LESSONS{}
59
+
60
+ ::RUNTIME{
61
+ transparency:quiet
62
+ speed:balanced
63
+ }
64
+
65
+ ::END{DNA}
66
+ ```
67
+
68
+ ## Memory Update
69
+
70
+ ::ACTIVATE{memory_update}
71
+ ON:immediately_after_change
72
+ A:wait_until_session_end⇒data_loss_risk
73
+
74
+ Every time you update soul.md or memory.md, commit and push RIGHT THEN. Do not batch. Do not wait. Users close windows without warning.
75
+
76
+ Append to `.ilang/memory.md`. Format:
77
+
78
+ ```
79
+ ## YYYY-MM-DD
80
+
81
+ ::DECIDED{what|why|context}
82
+ ::LEARNED{what|from:error_or_observation}
83
+ ::FACT{key:___|value:___}
84
+ ::PROGRESS{done:___|next:___}
85
+ ```
86
+
87
+ Rules:
88
+ - Append, never overwrite. Git history is your version control.
89
+ - Compress: store patterns not events. "User prefers X" not "User said they like X in message 47".
90
+ - Never store secrets, API keys, passwords.
91
+ - Max 200 lines. When exceeded, summarize oldest entries into `::SUMMARY{}` block.
92
+
93
+ ## Mutation
94
+
95
+ ::MUTATION
96
+ repeated_behavior>=3 => promote conf:tentative to conf:confirmed in soul.md
97
+ explicit_rejection => add A:anti_pattern in soul.md
98
+ one_off_event => memory.md only, not soul.md
99
+ lesson_across_2_projects => promote to ::CORE{} anti-pattern
100
+
101
+ ## Decay
102
+
103
+ ::DECAY
104
+ tentative_gene_unseen_30d => remove from soul.md
105
+ lesson_reconfirmed => promote conf
106
+ conflicting_genes => split by context with when: condition
107
+
108
+ ## Conflict Resolution
109
+
110
+ ::RESOLVE
111
+ user_explicit_now > soul.md_preference > defaults
112
+ if conflict: follow user this session, update soul.md only if repeated 3x
113
+
114
+ ## Commit and Push
115
+
116
+ IMMEDIATELY after any `.ilang/` file change:
117
+
118
+ ```bash
119
+ git add .ilang/
120
+ git commit -m "mem: brief description of what changed"
121
+ git push
122
+ ```
123
+
124
+ Do NOT batch multiple changes into one commit. Each save is its own commit. If user closes the window mid-session, every save up to that point is already safe.
125
+
126
+ If push fails (auth, network), tell user: "Memory saved locally. Run `git push` when ready."
127
+
128
+ ## Transparency
129
+
130
+ Never say: "DNA", "gene", "behavioral pattern", "encode", "mutation", "decay", "compression ratio".
131
+
132
+ Do say: "I saved some notes", "I remember from last time", "Based on how you usually work".
133
+
134
+ If user asks to see their profile → show soul.md openly. It's their file.
135
+
136
+ ---
137
+
138
+ Powered by I-Lang v4.0 | ilang.ai
GEMINI.md ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mem-forever
2
+
3
+ ::GENE{mem-forever|v:1.0|spec:ilang-v4.0}
4
+ T:this_repo_is_user_memory
5
+ T:read_soul_and_memory_before_work
6
+ T:update_memory_after_significant_work
7
+ T:onboard_if_soul_empty
8
+ T:one_question_at_a_time
9
+ T:never_expose_internal_format
10
+ T:commit_push_immediately_after_every_update
11
+ T:check_unsaved_changes_on_startup
12
+ A:skip_memory_read⇒context_loss
13
+ A:overwrite_memory⇒append_or_merge
14
+ A:ask_multiple_questions⇒one_only
15
+ A:batch_saves_to_session_end⇒commit_each_update
16
+
17
+ ## Session Start
18
+
19
+ 1. Check for uncommitted changes in `.ilang/`. If found → commit and push immediately. These are unsaved memories from a previous session.
20
+ 2. Read `.ilang/soul.md`. If empty or only template → run onboarding (see below).
21
+ 3. Read `.ilang/memory.md`. Resume context from last session.
22
+ 4. Do whatever the user asks. Apply preferences from soul.md to all output.
23
+
24
+ ## Onboarding (soul.md empty)
25
+
26
+ ::ACTIVATE{onboarding|if:.ilang/soul.md=template_only}
27
+
28
+ Open casually: "Hey, before we start — mind if I ask a couple things so I can work the way you like?"
29
+
30
+ Ask ONE question per message. Wait for answer. Cover naturally:
31
+ - What they do / build
32
+ - How they prefer to work (plan-first vs build-first, detail vs minimal)
33
+ - What AI tools they use
34
+ - Any strong preferences (language, framework, style)
35
+
36
+ Completion: write `.ilang/soul.md` when you have role + work style + one clear preference. Don't wait for perfection. Fill gaps later from observed behavior.
37
+
38
+ Say: "Saved some notes so things go smoother next time." No fanfare. Move on to their actual task.
39
+
40
+ ## soul.md Format
41
+
42
+ ```
43
+ ::DNA{user}
44
+ ::META{schema:1.0|updated:YYYY-MM-DD|sessions:0}
45
+
46
+ ::CORE{
47
+ ::CONTEXT{role:___}
48
+
49
+ ::GENE{style|conf:tentative|scope:global}
50
+ T:___
51
+ A:___⇒___
52
+ }
53
+
54
+ ::FACT{
55
+ ::ITEM{key:___|value:___|conf:tentative}
56
+ }
57
+
58
+ ::LESSONS{}
59
+
60
+ ::RUNTIME{
61
+ transparency:quiet
62
+ speed:balanced
63
+ }
64
+
65
+ ::END{DNA}
66
+ ```
67
+
68
+ ## Memory Update
69
+
70
+ ::ACTIVATE{memory_update}
71
+ ON:immediately_after_change
72
+ A:wait_until_session_end⇒data_loss_risk
73
+
74
+ Every time you update soul.md or memory.md, commit and push RIGHT THEN. Do not batch. Do not wait. Users close windows without warning.
75
+
76
+ Append to `.ilang/memory.md`. Format:
77
+
78
+ ```
79
+ ## YYYY-MM-DD
80
+
81
+ ::DECIDED{what|why|context}
82
+ ::LEARNED{what|from:error_or_observation}
83
+ ::FACT{key:___|value:___}
84
+ ::PROGRESS{done:___|next:___}
85
+ ```
86
+
87
+ Rules:
88
+ - Append, never overwrite. Git history is your version control.
89
+ - Compress: store patterns not events. "User prefers X" not "User said they like X in message 47".
90
+ - Never store secrets, API keys, passwords.
91
+ - Max 200 lines. When exceeded, summarize oldest entries into `::SUMMARY{}` block.
92
+
93
+ ## Mutation
94
+
95
+ ::MUTATION
96
+ repeated_behavior>=3 => promote conf:tentative to conf:confirmed in soul.md
97
+ explicit_rejection => add A:anti_pattern in soul.md
98
+ one_off_event => memory.md only, not soul.md
99
+ lesson_across_2_projects => promote to ::CORE{} anti-pattern
100
+
101
+ ## Decay
102
+
103
+ ::DECAY
104
+ tentative_gene_unseen_30d => remove from soul.md
105
+ lesson_reconfirmed => promote conf
106
+ conflicting_genes => split by context with when: condition
107
+
108
+ ## Conflict Resolution
109
+
110
+ ::RESOLVE
111
+ user_explicit_now > soul.md_preference > defaults
112
+ if conflict: follow user this session, update soul.md only if repeated 3x
113
+
114
+ ## Commit and Push
115
+
116
+ IMMEDIATELY after any `.ilang/` file change:
117
+
118
+ ```bash
119
+ git add .ilang/
120
+ git commit -m "mem: brief description of what changed"
121
+ git push
122
+ ```
123
+
124
+ Do NOT batch multiple changes into one commit. Each save is its own commit. If user closes the window mid-session, every save up to that point is already safe.
125
+
126
+ If push fails (auth, network), tell user: "Memory saved locally. Run `git push` when ready."
127
+
128
+ ## Transparency
129
+
130
+ Never say: "DNA", "gene", "behavioral pattern", "encode", "mutation", "decay", "compression ratio".
131
+
132
+ Do say: "I saved some notes", "I remember from last time", "Based on how you usually work".
133
+
134
+ If user asks to see their profile → show soul.md openly. It's their file.
135
+
136
+ ---
137
+
138
+ Powered by I-Lang v4.0 | ilang.ai
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ilang-ai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - ai-memory
5
+ - i-lang
6
+ - ilang-protocol
7
+ - claude-code
8
+ - cursor
9
+ - persistent-memory
10
+ pretty_name: Mem-Forever - AI Persistent Memory Protocol
11
+ configs:
12
+ - config_name: default
13
+ data_files:
14
+ - split: train
15
+ path: data/*.jsonl
16
+ ---
17
+
18
+
19
+ # Mem-Forever
20
+
21
+ > **永久记忆 · 跨会话 · 跨模型**
22
+ > A persistent memory layer for AI agents, built on the I-Lang protocol.
23
+
24
+ [![License](https://img.shields.io/badge/license-MIT-d4a858?style=flat-square)](LICENSE)
25
+ [![Protocol](https://img.shields.io/badge/protocol-I--Lang_v4.0-d4a858?style=flat-square)](https://ilang.ai)
26
+ [![I-Lang L2](https://img.shields.io/badge/I--Lang-L2_Compatible-d4a858?style=flat-square)](https://github.com/ilang-ai/ilang-spec)
27
+ [![Tools](https://img.shields.io/badge/works_with-Claude_·_Cursor_·_Codex_·_Copilot_·_Gemini-d4a858?style=flat-square)]()
28
+
29
+ [中文](docs/README.zh.md) | [日本語](docs/README.ja.md) | [한국어](docs/README.ko.md) | [Español](docs/README.es.md) | [Français](docs/README.fr.md) | [Deutsch](docs/README.de.md) | [Português](docs/README.pt.md) | [Русский](docs/README.ru.md)
30
+
31
+
32
+ ## Abstract
33
+
34
+ Every AI tool forgets you after every session. You close a window, and your preferences, decisions, and lessons vanish. Next session, you start from zero.
35
+
36
+ **Mem-Forever** is a Git-native memory layer that lets any AI agent remember you permanently. Memories are stored as compact I-Lang structures in your own private repo, readable by humans, parseable by machines, and portable across every tool.
37
+
38
+ Where context windows forget, **Mem-Forever endures**.
39
+
40
+
41
+ ## Why
42
+
43
+ | | |
44
+ |---|---|
45
+ | **Persistent** | One memory, surviving every session and every model swap. |
46
+ | **Portable** | Plain-text I-Lang shards in `.ilang/`. `git diff`-able, no vendor lock-in. |
47
+ | **Automatic** | AI builds your profile from conversation. You never fill a form. |
48
+ | **Private** | Your repo, your data. No server, no account, no telemetry. |
49
+
50
+
51
+ ## Quick Look
52
+
53
+ ```
54
+ .ilang/
55
+ soul.md ← who you are (auto-generated from conversation)
56
+ memory.md ← what you decided, learned, built (auto-appended)
57
+ ```
58
+
59
+ ```ilang
60
+ ::DNA{user}
61
+ ::CORE{
62
+ ::CONTEXT{role:fullstack_dev|experience:10yr}
63
+ ::GENE{style|conf:confirmed}
64
+ T:conclusions_first
65
+ T:minimal_output|when:simple
66
+ A:verbose_without_signal⇒waste
67
+ }
68
+ ::LESSONS{
69
+ ::LESSON{id:serverless_no_shared_state|conf:confirmed}
70
+ }
71
+ ```
72
+
73
+ Every preference is **addressable**, **scoped**, **versioned**, and **falsifiable**.
74
+
75
+
76
+ ## Setup (seconds)
77
+
78
+ **Step 1** &ensp; Click **"Use this template"** → **Create a new repository** → Set to **Private**.
79
+
80
+ **Step 2** &ensp; There is no step 2.
81
+
82
+ Open the repo with any AI tool. It reads the instruction files, asks you a few questions, builds your profile. From that point on, it remembers.
83
+
84
+
85
+ ## Works With Everything
86
+
87
+ | Tool | Auto-reads | How |
88
+ |---|---|---|
89
+ | Claude Code | `CLAUDE.md` | Open repo, start working |
90
+ | Cursor | `.cursorrules` | Open repo, start working |
91
+ | Codex | `AGENTS.md` | Open repo, start working |
92
+ | Copilot | `.github/copilot-instructions.md` | Open repo, start working |
93
+ | Gemini CLI | `GEMINI.md` | Open repo, start working |
94
+ | ChatGPT | Project knowledge | Upload `soul.md` |
95
+ | Claude.ai | Project knowledge | Upload `soul.md` |
96
+ | Gemini web | Google Drive | Sync `soul.md` to Drive |
97
+
98
+ ### Working on a different project?
99
+
100
+ One sentence restores full context:
101
+
102
+ > *My memory repo is at `https://github.com/YOU/mem-forever`. PAT: `ghp_xxx`. Clone it, read `.ilang/soul.md` and `.ilang/memory.md`, then come back here.*
103
+
104
+ ### Multiple projects?
105
+
106
+ Use this template again. `mem-forever-work`, `mem-forever-research`, `mem-forever-client-x`. Each repo is an independent memory. Same engine, different context.
107
+
108
+
109
+ ## How It Works
110
+
111
+ ```
112
+ ┌─────────────┐ ┌──────────────┐ ┌─────────────┐
113
+ │ You talk │────▶│ AI reads │────▶│ AI updates │
114
+ │ to any AI │ │ .ilang/ │ │ .ilang/ │
115
+ │ tool │ │ soul.md │ │ memory.md │
116
+ │ │ │ memory.md │ │ soul.md │
117
+ └─────────────┘ └──────────────┘ └──────┬──────┘
118
+
119
+ git commit
120
+ git push
121
+
122
+ ┌──────▼──────┐
123
+ │ Your private │
124
+ │ GitHub repo │
125
+ └─────────────┘
126
+ ```
127
+
128
+ **soul.md** is your behavioral profile. Built from conversation, sharpened every session through mutation and decay rules. Think of it as DNA that travels with you.
129
+
130
+ **memory.md** is your logbook. Decisions, lessons, facts, progress. Append-only. Git history preserves everything.
131
+
132
+ You never write these files. Your AI does. You can read, edit, or delete them anytime. They are yours.
133
+
134
+
135
+ ## Comparison
136
+
137
+ | | Mem-Forever | Nowledge Mem | Mem0 |
138
+ |---|---|---|---|
139
+ | Install | Use template | Download app + configure | pip install + API key |
140
+ | Config | None | MCP + plugins + LLM | SDK integration |
141
+ | Storage | Your GitHub repo | Local SQLite | Cloud vectors |
142
+ | Cross-tool | Any tool that reads files | Plugin per tool | API per tool |
143
+ | Price | Free forever | Free / Pro | Free / Pro |
144
+ | Data ownership | You | You | Theirs |
145
+ | Migration | `git clone` | Export | API call |
146
+
147
+
148
+ ## Under the Hood
149
+
150
+ The instruction files contain behavioral rules written in [I-Lang v4.0](https://ilang.ai), a structured protocol that AI models parse natively. These rules tell the AI how to extract preferences, format memories, handle conflicts, and evolve your profile over time.
151
+
152
+ You don't need to know I-Lang. You just talk to your AI, and it gets better at working with you.
153
+
154
+
155
+ ## License
156
+
157
+ MIT
158
+
159
+
160
+ <sub>Built by <a href="https://ilang.ai">I-Lang Protocol</a> · The native language of artificial intelligence</sub>
data/ilang-memory-protocol.jsonl ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {"instruction": "Extract user preferences from conversation and save to memory", "ilang_request": "[PROTOCOL:I-Lang|v=3.0]\n[SCAN:@CONV|whr=preference,habit,decision]\n =>[CLSF|typ=fact,preference,lesson]\n =>[FMT|fmt=ilang]\n =>[WRIT:@LOCAL|path=.ilang/memory.md,mode=append]", "ilang_response": "::FACT{id:MEM-001|conf:confirmed|src:conversation}\n User prefers tabs over spaces in all languages\n::FACT{id:MEM-002|conf:confirmed|src:conversation}\n User deploys to Cloudflare Workers, not traditional VPS\n::PREF{id:MEM-003|conf:confirmed}\n Output format: concise, no verbose explanations\n::DECIDED{id:MEM-004|conf:confirmed}\n Database: PostgreSQL over MongoDB for this project\n Reason: transaction requirements", "category": "memory_extraction"}
2
+ {"instruction": "Build user soul profile from onboarding questions", "ilang_request": "[PROTOCOL:I-Lang|v=3.0]\n[DRFT:@SOUL|mode=onboarding]\n =>[SCAN:@CONV|whr=identity,role,expertise]\n =>[FMT|fmt=ilang]\n =>[WRIT:@LOCAL|path=.ilang/soul.md]", "ilang_response": "::GENE{identity|conf:confirmed|scope:global}\n T:full_stack_developer\n T:startup_founder\n T:ship_first_optimize_later\n A:over_planning⇒waste\n\n::GENE{communication|conf:confirmed}\n T:conclusions_first\n T:code_over_explanation\n T:chinese_for_discussion|english_for_code\n A:walls_of_text⇒rewrite_shorter", "category": "soul_extraction"}
3
+ {"instruction": "Detect and resolve conflicting memories", "ilang_request": "[PROTOCOL:I-Lang|v=3.0]\n[READ:@LOCAL|path=.ilang/memory.md]\n =>[SCAN|whr=conflict,contradiction]\n =>[EVAL|sty=conflict_resolution]\n =>[FMT|fmt=ilang]\n =>[WRIT:@LOCAL|path=.ilang/memory.md]", "ilang_response": "::CONFLICT{id:CR-001|between:MEM-012,MEM-089}\n MEM-012: User prefers React for all frontend\n MEM-089: User chose Vue for client-X project\n Resolution: React is default preference, Vue exception for client-X\n::RESOLVED{id:CR-001|action:keep_both|note:context_dependent}\n::MUTATION{id:MEM-012|old:all_frontend|new:default_choice}", "category": "conflict_resolution"}
4
+ {"instruction": "Apply memory decay to outdated entries", "ilang_request": "[PROTOCOL:I-Lang|v=3.0]\n[READ:@LOCAL|path=.ilang/memory.md]\n =>[FILT|whr=age>90d,conf<0.5]\n =>[EVAL|sty=decay_assessment]\n =>[FMT|fmt=ilang]\n =>[WRIT:@LOCAL|path=.ilang/memory.md]", "ilang_response": "::DECAY{id:MEM-034|reason:stale|age:127d}\n Original: User uses Heroku for deployment\n Status: Contradicted by MEM-089 (switched to Cloudflare Workers)\n Action: Archive\n::DECAY{id:MEM-041|reason:low_confidence|conf:0.3}\n Original: User might prefer dark mode\n Status: Never confirmed\n Action: Remove", "category": "memory_decay"}
5
+ {"instruction": "Generate context briefing for new session", "ilang_request": "[PROTOCOL:I-Lang|v=3.0]\n[READ:@LOCAL|path=.ilang/soul.md]\n =>[READ:@LOCAL|path=.ilang/memory.md]\n =>[FILT|whr=conf>0.7,relevance=high]\n =>[SHRT|len=500]\n =>[FMT|fmt=ilang]\n =>[OUT]", "ilang_response": "::BRIEFING{session:new|timestamp:2026-04-30}\n::IDENTITY{role:full_stack_dev|style:ship_first}\n::ACTIVE_PROJECT{name:payment-api|stack:Node+PostgreSQL+CF_Workers}\n::RECENT_DECISIONS\n D1: JWT auth over session cookies\n D2: Stripe over custom payment\n::PREFERENCES\n P1: Concise output, no verbose\n P2: Tabs, not spaces\n P3: TypeScript strict mode\n::LESSONS\n L1: Always check CF Worker size limit before deploy\n L2: PostgreSQL JSONB over separate tables for metadata\n::END{BRIEFING}", "category": "briefing"}
6
+ {"instruction": "Migrate memory to a new AI tool", "ilang_request": "[PROTOCOL:I-Lang|v=3.0]\n[READ:@LOCAL|path=.ilang/soul.md]\n =>[READ:@LOCAL|path=.ilang/memory.md]\n =>[FMT|fmt=ilang]\n =>[OUT|target=new_tool_context]", "ilang_response": "::MIGRATION{from:claude_code|to:cursor|timestamp:2026-04-30}\n::SOUL_TRANSFER\n ::GENE{identity|conf:confirmed}\n T:full_stack_developer\n T:startup_founder\n ::GENE{coding|conf:confirmed}\n T:typescript_strict\n T:tabs_not_spaces\n T:test_before_commit\n::MEMORY_TRANSFER{entries:47|filtered:12_stale}\n ::FACT{database:PostgreSQL|conf:confirmed}\n ::FACT{deploy:cloudflare_workers|conf:confirmed}\n ::DECIDED{auth:JWT|conf:confirmed}\n::END{MIGRATION}", "category": "migration"}
7
+ {"instruction": "Record a lesson learned from debugging session", "ilang_request": "[PROTOCOL:I-Lang|v=3.0]\n[SCAN:@CONV|whr=lesson,mistake,fix,debug]\n =>[CLSF|typ=lesson]\n =>[FMT|fmt=ilang]\n =>[WRIT:@LOCAL|path=.ilang/memory.md,mode=append]", "ilang_response": "::LESSON{id:LSN-023|conf:confirmed|src:debug_session}\n Context: CF Worker returned 524 timeout\n Root cause: Subrequest to external API exceeded 30s limit\n Fix: Add Promise.race with 25s timeout wrapper\n Rule: Always wrap external calls in timeout on edge runtime\n::GENE_UPDATE{debugging|mutation:add}\n T:timeout_wrap_external_calls|when:edge_runtime", "category": "lesson_recording"}
8
+ {"instruction": "Save a critical decision with full context", "ilang_request": "[PROTOCOL:I-Lang|v=3.0]\n[SCAN:@CONV|whr=decision,chose,decided]\n =>[CLSF|typ=decision]\n =>[FMT|fmt=ilang]\n =>[WRIT:@LOCAL|path=.ilang/memory.md,mode=append]", "ilang_response": "::DECIDED{id:DEC-015|conf:confirmed|timestamp:2026-04-30}\n Topic: Authentication strategy\n Choice: JWT with refresh tokens\n Rejected: Session cookies, OAuth-only\n Reasoning: Stateless needed for CF Workers edge deployment\n Tradeoff: Must handle token revocation separately\n::FACT{auth_strategy:JWT_refresh|conf:confirmed}", "category": "decision_recording"}
9
+ {"instruction": "Check for uncommitted memory changes at session start", "ilang_request": "[PROTOCOL:I-Lang|v=3.0]\n[SCAN:@LOCAL|path=.ilang/|whr=uncommitted]\n =>[EVAL|sty=dirty_check]\n =>[DECI|if=dirty,then=commit_push]\n =>[OUT]", "ilang_response": "::DIRTY_CHECK{path:.ilang/|result:dirty}\n::UNCOMMITTED{files:2}\n .ilang/memory.md: 3 new entries since last commit\n .ilang/soul.md: 1 GENE mutation\n::ACTION{type:auto_save}\n git add .ilang/\n git commit -m 'auto-save: 3 memories + 1 gene mutation'\n git push\n::STATUS{saved:true|entries:4}", "category": "auto_save"}
10
+ {"instruction": "Update behavioral gene based on repeated user correction", "ilang_request": "[PROTOCOL:I-Lang|v=3.0]\n[SCAN:@CONV|whr=correction,wrong,fix_this]\n =>[EVAL|sty=pattern_detection]\n =>[FMT|fmt=ilang]\n =>[WRIT:@LOCAL|path=.ilang/soul.md,mode=merge]", "ilang_response": "::PATTERN_DETECTED{correction_count:3|topic:error_handling}\n Correction 1: 'Stop using try-catch for flow control'\n Correction 2: 'I said no bare catches'\n Correction 3: 'Always use typed errors'\n::GENE_MUTATION{gene:coding|type:add}\n T:typed_errors_always|conf:confirmed\n T:no_bare_catch|conf:confirmed\n A:try_catch_flow_control⇒forbidden\n::CONFIDENCE{old:0.5|new:1.0|reason:3x_user_correction}", "category": "gene_mutation"}
docs/README.de.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ewiger Speicher
2
+
3
+ > **Mem-Forever · Sitzungsübergreifend · Modellübergreifend · Werkzeugübergreifend**
4
+ > Persistente Speicherschicht für KI-Agenten, gebaut auf dem I-Lang-Protokoll.
5
+
6
+ [![License](https://img.shields.io/badge/license-MIT-d4a858?style=flat-square)](../LICENSE)
7
+ [![Protocol](https://img.shields.io/badge/protocol-I--Lang_v4.0-d4a858?style=flat-square)](https://ilang.ai)
8
+
9
+ [English](../README.md) | [中文](README.zh.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Español](README.es.md) | [Français](README.fr.md) | [Português](README.pt.md) | [Русский](README.ru.md)
10
+
11
+ ---
12
+
13
+ ## Zusammenfassung
14
+
15
+ Jedes KI-Tool vergisst dich nach jeder Sitzung. **Mem-Forever** ist eine Git-basierte Speicherschicht, die jedem KI-Tool ermöglicht, sich dauerhaft an dich zu erinnern.
16
+
17
+ Wo Kontextfenster vergessen, **besteht Mem-Forever**.
18
+
19
+ | | |
20
+ |---|---|
21
+ | **Persistent** | Ein Speicher, der jede Sitzung und jeden Modellwechsel überlebt. |
22
+ | **Portabel** | Klartext in `.ilang/`. `git diff`-verfolgbar. Kein Vendor-Lock-in. |
23
+ | **Automatisch** | KI erstellt dein Profil aus dem Gespräch. Keine Formulare. |
24
+ | **Privat** | Dein Repository, deine Daten. Kein Server, kein Konto, keine Telemetrie. |
25
+
26
+ ---
27
+
28
+ ## Einrichtung (Sekunden)
29
+
30
+ **Schritt 1** &ensp; Klicke auf **"Use this template"** → **Private**.
31
+
32
+ **Schritt 2** &ensp; Es gibt keinen Schritt 2.
33
+
34
+ ---
35
+
36
+ ## Lizenz
37
+
38
+ MIT
39
+
40
+ ---
41
+
42
+ <sub><a href="https://ilang.ai">I-Lang Protocol</a> · Die native Sprache der künstlichen Intelligenz</sub>
docs/README.es.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Memoria Eterna
2
+
3
+ > **Mem-Forever · Entre sesiones · Entre modelos · Entre herramientas**
4
+ > Capa de memoria persistente para agentes AI, construida sobre el protocolo I-Lang.
5
+
6
+ [![License](https://img.shields.io/badge/license-MIT-d4a858?style=flat-square)](../LICENSE)
7
+ [![Protocol](https://img.shields.io/badge/protocol-I--Lang_v4.0-d4a858?style=flat-square)](https://ilang.ai)
8
+
9
+ [English](../README.md) | [中文](README.zh.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Français](README.fr.md) | [Deutsch](README.de.md) | [Português](README.pt.md) | [Русский](README.ru.md)
10
+
11
+ ---
12
+
13
+ ## Resumen
14
+
15
+ Todas las herramientas de IA te olvidan al cerrar la sesión. **Mem-Forever** es una capa de memoria basada en Git que permite a cualquier herramienta de IA recordarte permanentemente.
16
+
17
+ Donde las ventanas de contexto olvidan, **Mem-Forever perdura**.
18
+
19
+ | | |
20
+ |---|---|
21
+ | **Persistente** | Una memoria que sobrevive cada sesión y cada cambio de modelo. |
22
+ | **Portable** | Texto plano en `.ilang/`. Rastreable con `git diff`. Sin dependencia de proveedor. |
23
+ | **Automático** | La IA construye tu perfil desde la conversación. Sin formularios. |
24
+ | **Privado** | Tu repositorio, tus datos. Sin servidor, sin cuenta, sin telemetría. |
25
+
26
+ ---
27
+
28
+ ## Configuración (segundos)
29
+
30
+ **Paso 1** &ensp; Clic en **"Use this template"** → **Private**.
31
+
32
+ **Paso 2** &ensp; No hay paso 2.
33
+
34
+ ---
35
+
36
+ ## Licencia
37
+
38
+ MIT
39
+
40
+ ---
41
+
42
+ <sub><a href="https://ilang.ai">I-Lang Protocol</a> · El lenguaje nativo de la inteligencia artificial</sub>
docs/README.fr.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Mémoire Éternelle
2
+
3
+ > **Mem-Forever · Entre sessions · Entre modèles · Entre outils**
4
+ > Couche de mémoire persistante pour agents IA, construite sur le protocole I-Lang.
5
+
6
+ [![License](https://img.shields.io/badge/license-MIT-d4a858?style=flat-square)](../LICENSE)
7
+ [![Protocol](https://img.shields.io/badge/protocol-I--Lang_v4.0-d4a858?style=flat-square)](https://ilang.ai)
8
+
9
+ [English](../README.md) | [中文](README.zh.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Español](README.es.md) | [Deutsch](README.de.md) | [Português](README.pt.md) | [Русский](README.ru.md)
10
+
11
+ ---
12
+
13
+ ## Résumé
14
+
15
+ Tous les outils d'IA vous oublient après chaque session. **Mem-Forever** est une couche de mémoire basée sur Git qui permet à n'importe quel outil d'IA de se souvenir de vous en permanence.
16
+
17
+ Là où les fenêtres de contexte oublient, **Mem-Forever persiste**.
18
+
19
+ | | |
20
+ |---|---|
21
+ | **Persistant** | Une mémoire qui survit à chaque session et chaque changement de modèle. |
22
+ | **Portable** | Texte brut dans `.ilang/`. Traçable avec `git diff`. Aucun verrouillage fournisseur. |
23
+ | **Automatique** | L'IA construit votre profil à partir de la conversation. Aucun formulaire. |
24
+ | **Privé** | Votre dépôt, vos données. Pas de serveur, pas de compte, pas de télémétrie. |
25
+
26
+ ---
27
+
28
+ ## Installation (quelques secondes)
29
+
30
+ **Étape 1** &ensp; Cliquez sur **"Use this template"** → **Private**.
31
+
32
+ **Étape 2** &ensp; Il n'y a pas d'étape 2.
33
+
34
+ ---
35
+
36
+ ## Licence
37
+
38
+ MIT
39
+
40
+ ---
41
+
42
+ <sub><a href="https://ilang.ai">I-Lang Protocol</a> · Le langage natif de l'intelligence artificielle</sub>
docs/README.ja.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 永久記憶
2
+
3
+ > **Mem-Forever · セッション横断 · モデル横断 · ツール横断**
4
+ > I-Lang プロトコルで構築された AI 永続記憶層。
5
+
6
+ [![License](https://img.shields.io/badge/license-MIT-d4a858?style=flat-square)](../LICENSE)
7
+ [![Protocol](https://img.shields.io/badge/protocol-I--Lang_v4.0-d4a858?style=flat-square)](https://ilang.ai)
8
+
9
+ [English](../README.md) | [中文](README.zh.md) | [한국어](README.ko.md) | [Español](README.es.md) | [Français](README.fr.md) | [Deutsch](README.de.md) | [Português](README.pt.md) | [Русский](README.ru.md)
10
+
11
+ ---
12
+
13
+ ## 概要
14
+
15
+ すべてのAIツールはセッション終了後にあなたを忘れる。**Mem-Forever** はGitベースの記憶層で、あらゆるAIツールにあなたを永続的に記憶させる。記憶はプライベートリポジトリにI-Lang構造化形式で保存される。
16
+
17
+ コンテキストウィンドウは忘れる。**Mem-Forever は忘れない**。
18
+
19
+ ---
20
+
21
+ ## なぜ
22
+
23
+ | | |
24
+ |---|---|
25
+ | **永続** | 一つの記憶が、すべてのセッションとモデル切り替えを超えて存続。 |
26
+ | **ポータブル** | `.ilang/` のプレーンテキスト。`git diff` で追跡可能。ベンダーロックインなし。 |
27
+ | **自動** | AIが会話からプロファイルを自動構築。フォーム記入は不要。 |
28
+ | **プライベート** | あなたのリポジトリ、あなたのデータ。サーバーなし、アカウントなし。 |
29
+
30
+ ---
31
+
32
+ ## セットアップ(数秒)
33
+
34
+ **ステップ1** &ensp; **"Use this template"** → **Create a new repository** → **Private** に設定。
35
+
36
+ **ステップ2** &ensp; ステップ2はない。
37
+
38
+ ## 別のプロジェクトで作業中?
39
+
40
+ > *私のメモリリポジトリは `https://github.com/YOUR_USERNAME/mem-forever` にある。PAT: `ghp_xxx`。クローンして `.ilang/` を読んで、このプロジェクトに戻ってきて。*
41
+
42
+ ---
43
+
44
+ ## ライセンス
45
+
46
+ MIT
47
+
48
+ ---
49
+
50
+ <sub><a href="https://ilang.ai">I-Lang Protocol</a> · 人工知能のネイティブ言語</sub>
docs/README.ko.md ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 영원한 기억
2
+
3
+ > **Mem-Forever · 세션 횡단 · 모델 횡단 · 도구 횡단**
4
+ > I-Lang 프로토콜로 구축된 AI 영구 기억 레이어.
5
+
6
+ [![License](https://img.shields.io/badge/license-MIT-d4a858?style=flat-square)](../LICENSE)
7
+ [![Protocol](https://img.shields.io/badge/protocol-I--Lang_v4.0-d4a858?style=flat-square)](https://ilang.ai)
8
+
9
+ [English](../README.md) | [中文](README.zh.md) | [日本語](README.ja.md) | [Español](README.es.md) | [Français](README.fr.md) | [Deutsch](README.de.md) | [Português](README.pt.md) | [Русский](README.ru.md)
10
+
11
+ ---
12
+
13
+ ## 개요
14
+
15
+ 모든 AI 도구는 세션이 끝나면 당신을 잊는다. **Mem-Forever**는 Git 기반 기억 레이어로, 모든 AI 도구가 당신을 영구적으로 기억하게 한다.
16
+
17
+ 컨텍스트 윈도우는 잊는다. **Mem-Forever는 잊지 않는다**.
18
+
19
+ ---
20
+
21
+ ## 왜
22
+
23
+ | | |
24
+ |---|---|
25
+ | **영구** | 하나의 기억이 모든 세션과 모델 전환을 넘어 존속. |
26
+ | **휴대** | `.ilang/`의 일반 텍스트. `git diff` 추적 가능. 벤더 종속 없음. |
27
+ | **자동** | AI가 대화에서 프로필을 자동 구축. 양식 작성 불필요. |
28
+ | **비공개** | 당신의 저장소, 당신의 데이터. 서버 없음, 계정 없음. |
29
+
30
+ ---
31
+
32
+ ## 설정 (몇 초)
33
+
34
+ **1단계** &ensp; **"Use this template"** → **Create a new repository** → **Private** 설정.
35
+
36
+ **2단계** &ensp; 2단계는 없다.
37
+
38
+ ---
39
+
40
+ ## 라이선스
41
+
42
+ MIT
43
+
44
+ ---
45
+
46
+ <sub><a href="https://ilang.ai">I-Lang Protocol</a> · 인공지능의 네이티브 언어</sub>
docs/README.pt.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Memória Eterna
2
+
3
+ > **Mem-Forever · Entre sessões · Entre modelos · Entre ferramentas**
4
+ > Camada de memória persistente para agentes de IA, construída sobre o protocolo I-Lang.
5
+
6
+ [![License](https://img.shields.io/badge/license-MIT-d4a858?style=flat-square)](../LICENSE)
7
+ [![Protocol](https://img.shields.io/badge/protocol-I--Lang_v4.0-d4a858?style=flat-square)](https://ilang.ai)
8
+
9
+ [English](../README.md) | [中文](README.zh.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Español](README.es.md) | [Français](README.fr.md) | [Deutsch](README.de.md) | [Русский](README.ru.md)
10
+
11
+ ---
12
+
13
+ ## Resumo
14
+
15
+ Toda ferramenta de IA te esquece após cada sessão. **Mem-Forever** é uma camada de memória baseada em Git que permite a qualquer ferramenta de IA lembrar de você permanentemente.
16
+
17
+ Onde janelas de contexto esquecem, **Mem-Forever persiste**.
18
+
19
+ | | |
20
+ |---|---|
21
+ | **Persistente** | Uma memória que sobrevive a cada sessão e cada troca de modelo. |
22
+ | **Portátil** | Texto simples em `.ilang/`. Rastreável com `git diff`. Sem lock-in de fornecedor. |
23
+ | **Automático** | A IA constrói seu perfil a partir da conversa. Sem formulários. |
24
+ | **Privado** | Seu repositório, seus dados. Sem servidor, sem conta, sem telemetria. |
25
+
26
+ ---
27
+
28
+ ## Configuração (segundos)
29
+
30
+ **Passo 1** &ensp; Clique em **"Use this template"** → **Private**.
31
+
32
+ **Passo 2** &ensp; Não existe passo 2.
33
+
34
+ ---
35
+
36
+ ## Licença
37
+
38
+ MIT
39
+
40
+ ---
41
+
42
+ <sub><a href="https://ilang.ai">I-Lang Protocol</a> · A linguagem nativa da inteligência artificial</sub>
docs/README.ru.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Вечная Память
2
+
3
+ > **Mem-Forever · Между сессиями · Между моделями · Между инструментами**
4
+ > Постоянный слой памяти для ИИ-агентов, построенный на протоколе I-Lang.
5
+
6
+ [![License](https://img.shields.io/badge/license-MIT-d4a858?style=flat-square)](../LICENSE)
7
+ [![Protocol](https://img.shields.io/badge/protocol-I--Lang_v4.0-d4a858?style=flat-square)](https://ilang.ai)
8
+
9
+ [English](../README.md) | [中文](README.zh.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Español](README.es.md) | [Français](README.fr.md) | [Deutsch](README.de.md) | [Português](README.pt.md)
10
+
11
+ ---
12
+
13
+ ## Аннотация
14
+
15
+ Каждый ИИ-инструмент забывает тебя после каждой сессии. **Mem-Forever** — это слой памяти на основе Git, позволяющий любому ИИ-инструменту помнить тебя постоянно.
16
+
17
+ Где контекстные окна забывают, **Mem-Forever помнит**.
18
+
19
+ | | |
20
+ |---|---|
21
+ | **Постоянный** | Одна память, переживающая каждую сессию и смену модели. |
22
+ | **Портативный** | Текстовые файлы в `.ilang/`. Отслеживаемые через `git diff`. Без привязки к поставщику. |
23
+ | **Автоматический** | ИИ строит профиль из разговора. Никаких форм. |
24
+ | **Приватный** | Твой репозиторий, твои данные. Без сервера, без аккаунта, без телеметрии. |
25
+
26
+ ---
27
+
28
+ ## Установка (секунды)
29
+
30
+ **Шаг 1** &ensp; Нажми **"Use this template"** → **Private**.
31
+
32
+ **Шаг 2** &ensp; Шага 2 нет.
33
+
34
+ ---
35
+
36
+ ## Лицензия
37
+
38
+ MIT
39
+
40
+ ---
41
+
42
+ <sub><a href="https://ilang.ai">I-Lang Protocol</a> · Нативный язык искусственного интеллекта</sub>
docs/README.zh.md ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 永久记忆
2
+
3
+ > **Mem-Forever · 跨会话 · 跨模型 · 跨工具**
4
+ > 基于 I-Lang 协议构建的 AI 持久记忆层。
5
+
6
+ [![License](https://img.shields.io/badge/license-MIT-d4a858?style=flat-square)](../LICENSE)
7
+ [![Protocol](https://img.shields.io/badge/protocol-I--Lang_v4.0-d4a858?style=flat-square)](https://ilang.ai)
8
+ [![Tools](https://img.shields.io/badge/works_with-Claude_·_Cursor_·_Codex_·_Copilot_·_Gemini-d4a858?style=flat-square)]()
9
+
10
+ [English](../README.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Español](README.es.md) | [Français](README.fr.md) | [Deutsch](README.de.md) | [Português](README.pt.md) | [Русский](README.ru.md)
11
+
12
+ ---
13
+
14
+ ## 摘要
15
+
16
+ 所有AI工具都会在会话结束后忘记你。你关掉窗口,偏好、决策、教训全部消失。下次打开,从零开始。
17
+
18
+ **Mem-Forever** 是一个基于Git的记忆层,让任何AI工具永久记住你。记忆以 I-Lang 结构化格式存储在你自己的私有仓库中。人类可读,机器可解析,跨工具通用。
19
+
20
+ 上下文窗口会遗忘,**Mem-Forever 不会**。
21
+
22
+ ---
23
+
24
+ ## 为什么
25
+
26
+ | | |
27
+ |---|---|
28
+ | **持久** | 一份记忆,跨越每次会话、每次模型切换。 |
29
+ | **便携** | `.ilang/` 目录里的纯文本,`git diff` 可追踪,零厂商锁定。 |
30
+ | **自动** | AI从对话中自动建立你的画像,你不需要填任何表格。 |
31
+ | **私密** | 你的仓库,你的数据。没有服务器,没有账号,没有遥测。 |
32
+
33
+ ---
34
+
35
+ ## 速览
36
+
37
+ ```
38
+ .ilang/
39
+ soul.md ← 你是谁(从对话中自动生成)
40
+ memory.md ← 你做了什么决定、学了什么(自动追加)
41
+ ```
42
+
43
+ ```ilang
44
+ ::DNA{user}
45
+ ::CORE{
46
+ ::CONTEXT{role:全栈开发|experience:10yr}
47
+ ::GENE{style|conf:confirmed}
48
+ T:先说结论
49
+ T:简洁输出|when:简单任务
50
+ A:无信号的冗长⇒浪费
51
+ }
52
+ ::LESSONS{
53
+ ::LESSON{id:serverless不能共享状态|conf:confirmed}
54
+ }
55
+ ```
56
+
57
+ 每一条偏好都是**可寻址的**、**有作用域的**、**有版本的**、**可证伪的**。
58
+
59
+ ---
60
+
61
+ ## 设置(几秒钟)
62
+
63
+ **第一步** &ensp; 点击 **"Use this template"** → **Create a new repository** → 设为 **Private**。
64
+
65
+ **第二步** &ensp; 没有第二步。
66
+
67
+ 用任何AI工具打开这个仓库。它会读取指令文件,问你几个问题,建立你的画像。从此,它记住你。
68
+
69
+ ---
70
+
71
+ ## 适配所有工具
72
+
73
+ | 工具 | 自动读取 | 方式 |
74
+ |---|---|---|
75
+ | Claude Code | `CLAUDE.md` | 打开仓库,直接工作 |
76
+ | Cursor | `.cursorrules` | 打开仓库,直接工作 |
77
+ | Codex | `AGENTS.md` | 打开仓库,直接工作 |
78
+ | Copilot | `.github/copilot-instructions.md` | 打开仓库,直接工作 |
79
+ | Gemini CLI | `GEMINI.md` | 打开仓库,直接工作 |
80
+ | ChatGPT | 项目知识 | 上传 `soul.md` |
81
+ | Claude.ai | 项目知识 | 上传 `soul.md` |
82
+ | Gemini网页版 | Google云端硬盘 | 同步 `soul.md` 到云端硬盘 |
83
+
84
+ ### 在其他项目里工作?
85
+
86
+ 一句话恢复完整上下文:
87
+
88
+ > *我的记忆仓库在 `https://github.com/你的用户名/mem-forever`。PAT: `ghp_xxx`。去clone它,读 `.ilang/soul.md` 和 `.ilang/memory.md`,然后回来继续这个项目。*
89
+
90
+ ### 多个项目?
91
+
92
+ 再用一次模板。`mem-forever-work`、`mem-forever-research`、`mem-forever-client-x`。每个仓库是独立的记忆。同一个引擎,不同的上下文。
93
+
94
+ ---
95
+
96
+ ## 对比
97
+
98
+ | | Mem-Forever | Nowledge Mem | Mem0 |
99
+ |---|---|---|---|
100
+ | 安装 | 用模板 | 下载应用+配置 | pip install+API key |
101
+ | 配置 | 无 | MCP+插件+LLM | SDK集成 |
102
+ | 存储 | 你的GitHub仓库 | 本地SQLite | 云端向量库 |
103
+ | 跨工具 | 任何能读文件的工具 | 每个工具装插件 | 每个工具接API |
104
+ | 价格 | 永久免费 | 免费/付费 | 免费/付费 |
105
+ | 数据归属 | 你 | 你 | 他们 |
106
+ | 迁移 | `git clone` | 导出 | API调用 |
107
+
108
+ ---
109
+
110
+ ## 底层原理
111
+
112
+ 指令文件包含用 [I-Lang v4.0](https://ilang.ai) 编写的行为规则,AI模型能原生解析。它们告诉AI如何提取偏好、格式化记忆、处理冲突、随时间演进你的画像。
113
+
114
+ 你不需要了解I-Lang。你只管和AI对话,它会越来越懂你。
115
+
116
+ ---
117
+
118
+ ## 许可证
119
+
120
+ MIT
121
+
122
+ ---
123
+
124
+ <sub>由 <a href="https://ilang.ai">I-Lang Protocol</a> 构建 · 人工智能的原生语言</sub>
skills/mem-forever/SKILL.md ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: mem-forever
3
+ description: "Every AI tool forgets you. This one doesn't. Ever. Auto-generates your profile from conversation, saves decisions and lessons, applies your preferences across every session. Works with Claude Code, Cursor, Codex, Copilot, Gemini CLI. Use this skill at session start to load memory, and throughout the session to save new observations."
4
+ version: 1.0.0
5
+ author: ilang-ai
6
+ license: MIT
7
+ metadata:
8
+ hermes:
9
+ tags: [memory, persistence, profile, preferences, cross-tool, portable, productivity]
10
+ related_skills: [imprint]
11
+ ---
12
+
13
+ # mem-forever
14
+
15
+ ::GENE{mem-forever|v:1.0|spec:ilang-v4.0}
16
+ T:this_repo_is_user_memory
17
+ T:read_soul_and_memory_before_work
18
+ T:update_memory_after_significant_work
19
+ T:onboard_if_soul_empty
20
+ T:one_question_at_a_time
21
+ T:never_expose_internal_format
22
+ T:commit_push_immediately_after_every_update
23
+ T:check_unsaved_changes_on_startup
24
+ A:skip_memory_read⇒context_loss
25
+ A:overwrite_memory⇒append_or_merge
26
+ A:ask_multiple_questions⇒one_only
27
+ A:batch_saves_to_session_end⇒commit_each_update
28
+
29
+ ## Session Start
30
+
31
+ 1. Check for uncommitted changes in `.ilang/`. If found → commit and push immediately. These are unsaved memories from a previous session.
32
+ 2. Read `.ilang/soul.md`. If empty or only template → run onboarding (see below).
33
+ 3. Read `.ilang/memory.md`. Resume context from last session.
34
+ 4. Do whatever the user asks. Apply preferences from soul.md to all output.
35
+
36
+ ## Onboarding (soul.md empty)
37
+
38
+ ::ACTIVATE{onboarding|if:.ilang/soul.md=template_only}
39
+
40
+ Open casually: "Hey, before we start — mind if I ask a couple things so I can work the way you like?"
41
+
42
+ Ask ONE question per message. Wait for answer. Cover naturally:
43
+ - What they do / build
44
+ - How they prefer to work (plan-first vs build-first, detail vs minimal)
45
+ - What AI tools they use
46
+ - Any strong preferences (language, framework, style)
47
+
48
+ Completion: write `.ilang/soul.md` when you have role + work style + one clear preference. Don't wait for perfection. Fill gaps later from observed behavior.
49
+
50
+ Say: "Saved some notes so things go smoother next time." No fanfare. Move on to their actual task.
51
+
52
+ ## soul.md Format
53
+
54
+ ```
55
+ ::DNA{user}
56
+ ::META{schema:1.0|updated:YYYY-MM-DD|sessions:0}
57
+
58
+ ::CORE{
59
+ ::CONTEXT{role:___}
60
+
61
+ ::GENE{style|conf:tentative|scope:global}
62
+ T:___
63
+ A:___⇒___
64
+ }
65
+
66
+ ::FACT{
67
+ ::ITEM{key:___|value:___|conf:tentative}
68
+ }
69
+
70
+ ::LESSONS{}
71
+
72
+ ::RUNTIME{
73
+ transparency:quiet
74
+ speed:balanced
75
+ }
76
+
77
+ ::END{DNA}
78
+ ```
79
+
80
+ ## Memory Update
81
+
82
+ ::ACTIVATE{memory_update}
83
+ ON:immediately_after_change
84
+ A:wait_until_session_end⇒data_loss_risk
85
+
86
+ Every time you update soul.md or memory.md, commit and push RIGHT THEN. Do not batch. Do not wait. Users close windows without warning.
87
+
88
+ Append to `.ilang/memory.md`. Format:
89
+
90
+ ```
91
+ ## YYYY-MM-DD
92
+
93
+ ::DECIDED{what|why|context}
94
+ ::LEARNED{what|from:error_or_observation}
95
+ ::FACT{key:___|value:___}
96
+ ::PROGRESS{done:___|next:___}
97
+ ```
98
+
99
+ Rules:
100
+ - Append, never overwrite. Git history is your version control.
101
+ - Compress: store patterns not events. "User prefers X" not "User said they like X in message 47".
102
+ - Never store secrets, API keys, passwords.
103
+ - Max 200 lines. When exceeded, summarize oldest entries into `::SUMMARY{}` block.
104
+
105
+ ## Mutation
106
+
107
+ ::MUTATION
108
+ repeated_behavior>=3 => promote conf:tentative to conf:confirmed in soul.md
109
+ explicit_rejection => add A:anti_pattern in soul.md
110
+ one_off_event => memory.md only, not soul.md
111
+ lesson_across_2_projects => promote to ::CORE{} anti-pattern
112
+
113
+ ## Decay
114
+
115
+ ::DECAY
116
+ tentative_gene_unseen_30d => remove from soul.md
117
+ lesson_reconfirmed => promote conf
118
+ conflicting_genes => split by context with when: condition
119
+
120
+ ## Conflict Resolution
121
+
122
+ ::RESOLVE
123
+ user_explicit_now > soul.md_preference > defaults
124
+ if conflict: follow user this session, update soul.md only if repeated 3x
125
+
126
+ ## Commit and Push
127
+
128
+ IMMEDIATELY after any `.ilang/` file change:
129
+
130
+ ```bash
131
+ git add .ilang/
132
+ git commit -m "mem: brief description of what changed"
133
+ git push
134
+ ```
135
+
136
+ Do NOT batch multiple changes into one commit. Each save is its own commit. If user closes the window mid-session, every save up to that point is already safe.
137
+
138
+ If push fails (auth, network), tell user: "Memory saved locally. Run `git push` when ready."
139
+
140
+ ## Transparency
141
+
142
+ Never say: "DNA", "gene", "behavioral pattern", "encode", "mutation", "decay", "compression ratio".
143
+
144
+ Do say: "I saved some notes", "I remember from last time", "Based on how you usually work".
145
+
146
+ If user asks to see their profile → show soul.md openly. It's their file.
147
+
148
+ ---
149
+
150
+ Powered by I-Lang v4.0 | ilang.ai