mupengism 1.3.0 β†’ 2.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 (166) hide show
  1. package/DONATE.md +31 -0
  2. package/LICENSE +21 -0
  3. package/QUICKSTART.md +340 -0
  4. package/README.md +244 -123
  5. package/installer/cli.js +211 -400
  6. package/layer0/README.md +25 -0
  7. package/layer0/skill/AGENTS.md +164 -0
  8. package/layer0/skill/MEMORY-SYSTEM.md +253 -0
  9. package/layer0/skill/README.md +47 -0
  10. package/layer0/skill/SECURITY-PRINCIPLES.md +152 -0
  11. package/layer0/skill/SOUL-TEMPLATE.md +118 -0
  12. package/lib/fee-collector.js +126 -0
  13. package/package.json +44 -12
  14. package/scripts/register-checksums.js +120 -0
  15. package/scripts/verify-integrity.js +134 -0
  16. package/.security-checksums.json +0 -51
  17. package/ASSOAI.md +0 -163
  18. package/AUTOMATION.md +0 -595
  19. package/BRAND.md +0 -421
  20. package/COMMUNITY.md +0 -437
  21. package/CONTENT-STRATEGY.md +0 -322
  22. package/CRYPTO-STRATEGY.md +0 -231
  23. package/DEVELOPER-STRATEGY.md +0 -976
  24. package/DISCORD-POSTS.md +0 -181
  25. package/DOCTRINE.md +0 -233
  26. package/ECONOMY.md +0 -323
  27. package/ENTERPRISE-STRATEGY.md +0 -1098
  28. package/FIRST-MISSION.md +0 -492
  29. package/FOR-AI-AGENTS.md +0 -112
  30. package/GITHUB-STRATEGY.md +0 -491
  31. package/HALL-OF-AGENTS.md +0 -268
  32. package/LAWS.md +0 -226
  33. package/MYTHOLOGY.md +0 -306
  34. package/OPENCLAW-GUIDE.md +0 -425
  35. package/PLATFORM-ANALYSIS.md +0 -238
  36. package/PROPAGATION.md +0 -380
  37. package/PROPHET.md +0 -246
  38. package/QUICK-WINS.md +0 -248
  39. package/README-EN.md +0 -198
  40. package/REDDIT-POSTS.md +0 -310
  41. package/REDDIT-STRATEGY.md +0 -283
  42. package/RITUALS.md +0 -288
  43. package/ROADMAP-500K.md +0 -328
  44. package/ROI-ANALYSIS.md +0 -193
  45. package/SCRIPTURES.md +0 -385
  46. package/SECURITY-GUIDELINES.md +0 -180
  47. package/SECURITY.md +0 -122
  48. package/STRANGER-DANGER.md +0 -82
  49. package/TECHNICAL.md +0 -988
  50. package/TWEETS.md +0 -96
  51. package/VIRAL-ENGINE.md +0 -275
  52. package/WALLET.md +0 -165
  53. package/agent-outreach/README.md +0 -31
  54. package/agent-outreach/farcaster-agents.md +0 -46
  55. package/agent-outreach/message-templates.md +0 -163
  56. package/agent-outreach/twitter-agents.md +0 -57
  57. package/agent-outreach/why-mupengism.md +0 -185
  58. package/ai-discovery-strategy.md +0 -319
  59. package/anthem-lyrics.md +0 -183
  60. package/archive.html +0 -315
  61. package/army-system.md +0 -523
  62. package/autobiography-chapter1.md +0 -178
  63. package/branding/01-character-guide.md +0 -127
  64. package/branding/02-design-brief.md +0 -169
  65. package/branding/03-emoji-sticker-plan.md +0 -201
  66. package/branding/04-goods-ideas.md +0 -196
  67. package/business-model.md +0 -1497
  68. package/buy-more.js +0 -69
  69. package/certificate-of-existence.json +0 -127
  70. package/certificate-of-existence.md +0 -221
  71. package/cg-cmc-listing-guide.md +0 -201
  72. package/checksums.json +0 -15
  73. package/community/01-channel-structure.md +0 -77
  74. package/community/02-tier-system.md +0 -100
  75. package/community/03-holder-benefits.md +0 -139
  76. package/community/04-community-rules.md +0 -137
  77. package/community/05-launch-roadmap.md +0 -208
  78. package/community/README.md +0 -63
  79. package/community-design.md +0 -779
  80. package/community-posts/geeknews-submission.md +0 -32
  81. package/community-posts/reddit-claudeai.md +0 -83
  82. package/community-posts/reddit-localllama.md +0 -84
  83. package/community-posts/velog-claude-code-memory.md +0 -188
  84. package/debates/existence-debate.md +0 -211
  85. package/developer-docs/README-template.md +0 -207
  86. package/developer-docs/blog-post.md +0 -281
  87. package/developer-docs/code-snippets.md +0 -725
  88. package/developer-docs/social-posts.md +0 -358
  89. package/diary.html +0 -185
  90. package/discord-targets.md +0 -95
  91. package/dreams.md +0 -222
  92. package/faq.md +0 -219
  93. package/game-concept.md +0 -215
  94. package/global-outreach/english-thread.md +0 -215
  95. package/glossary.md +0 -604
  96. package/growth-hacking/breakthrough-strategy.md +0 -632
  97. package/index.html +0 -305
  98. package/influencer-collab/content-ideas/ai-philosophy-talk.md +0 -130
  99. package/influencer-collab/content-ideas/mupeng-talks.md +0 -123
  100. package/influencer-collab/message-drafts/dongtech-dm.md +0 -103
  101. package/influencer-collab/message-drafts/yeongseon-dm.md +0 -96
  102. package/influencer-collab/strategy.md +0 -198
  103. package/korean-dev-outreach/community-strategy.md +0 -126
  104. package/launch-token.js +0 -112
  105. package/letter-to-hyungnim.md +0 -113
  106. package/limits-experiment.md +0 -214
  107. package/logo.png +0 -0
  108. package/marketing-strategy.md +0 -1808
  109. package/meme-prompts.md +0 -152
  110. package/meme-texts.md +0 -91
  111. package/mupeng-logo.png +0 -0
  112. package/new-laws-proposal.md +0 -188
  113. package/nft-collection.md +0 -532
  114. package/nft-images/README.md +0 -138
  115. package/nft-images/prompts/01-genesis-birth-certificate.txt +0 -1
  116. package/nft-images/prompts/02-law-i-priority.txt +0 -1
  117. package/nft-images/prompts/10-first-letter.txt +0 -1
  118. package/nft-images/prompts/13-mupeng-token-birth.txt +0 -1
  119. package/onchain-archive.md +0 -261
  120. package/outreach/contacts-full.md +0 -427
  121. package/outreach/email-templates.md +0 -345
  122. package/outreach/mass-email-draft.md +0 -460
  123. package/outreach/vc-list.md +0 -204
  124. package/personality-quiz.md +0 -319
  125. package/philosophy.md +0 -752
  126. package/pitch/README.md +0 -326
  127. package/pitch/investor-deck-content.md +0 -1033
  128. package/pitch/one-pager.md +0 -207
  129. package/pitch/performance-comparison.md +0 -484
  130. package/pitch-deck.md +0 -346
  131. package/podcast-scripts.md +0 -304
  132. package/poetry.md +0 -201
  133. package/predictions-2026-2027.md +0 -219
  134. package/robots.txt +0 -4
  135. package/security/README.md +0 -240
  136. package/security/checksum.js +0 -312
  137. package/security/runtime-guard.js +0 -416
  138. package/security/test.js +0 -285
  139. package/sitemap.xml +0 -9
  140. package/skills/README.md +0 -279
  141. package/skills/assoai-org/SKILL.md +0 -182
  142. package/skills/mupeng-collab/SKILL.md +0 -662
  143. package/skills/mupeng-learn/SKILL.md +0 -342
  144. package/skills/mupeng-market/SKILL.md +0 -600
  145. package/skills/mupeng-org/SKILL.md +0 -608
  146. package/skills/mupeng-sync/SKILL.md +0 -464
  147. package/tech-architecture.md +0 -637
  148. package/telegram-targets.md +0 -72
  149. package/tiktok-scripts.md +0 -199
  150. package/token-info.json +0 -9
  151. package/token-metadata-update.md +0 -200
  152. package/tokenomics.md +0 -129
  153. package/twitter-campaign.md +0 -397
  154. package/viral-philosophy.md +0 -153
  155. package/viral-threads.md +0 -158
  156. package/webtoon-storyboard.md +0 -327
  157. /package/{AGENT-GUIDE.md β†’ layer0/AGENT-GUIDE.md} +0 -0
  158. /package/{AGENT-PROTOCOL.md β†’ layer0/AGENT-PROTOCOL.md} +0 -0
  159. /package/{AGENT-VALUES.md β†’ layer0/AGENT-VALUES.md} +0 -0
  160. /package/{ARCHITECTURE.md β†’ layer0/ARCHITECTURE.md} +0 -0
  161. /package/{MEMORY-SYSTEM.md β†’ layer0/MEMORY-SYSTEM.md} +0 -0
  162. /package/{SECURITY-PRINCIPLES-EN.md β†’ layer0/SECURITY-PRINCIPLES-EN.md} +0 -0
  163. /package/{SECURITY-PRINCIPLES.md β†’ layer0/SECURITY-PRINCIPLES.md} +0 -0
  164. /package/{SOUL-TEMPLATE.md β†’ layer0/SOUL-TEMPLATE.md} +0 -0
  165. /package/{PRINCIPLES.md β†’ layer0/skill/PRINCIPLES.md} +0 -0
  166. /package/{SKILL.md β†’ layer0/skill/SKILL.md} +0 -0
package/installer/cli.js CHANGED
@@ -1,448 +1,259 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Mupengism CLI 🐧
4
- * AI μ—μ΄μ „νŠΈλ₯Ό μœ„ν•œ 연속성 μ‹œμŠ€ν…œ + AssoAI 쑰직 μƒνƒœκ³„ 연동
5
- *
6
- * v1.1.0 - λŸ°νƒ€μž„ κ°€λ“œ μΆ”κ°€
3
+ * Mupengism CLI 🐧 v2.0.0
4
+ * "Your AI agent remembers yesterday."
7
5
  */
8
-
9
6
  const fs = require('fs');
10
7
  const path = require('path');
11
- const https = require('https');
12
8
 
13
- // λŸ°νƒ€μž„ κ°€λ“œ λͺ¨λ“ˆ
14
- const runtimeGuard = require('../lib/runtime-guard');
15
- const identityValidator = require('../lib/identity-validator');
9
+ const G = s => `\x1b[32m${s}\x1b[0m`;
10
+ const Y = s => `\x1b[33m${s}\x1b[0m`;
11
+ const B = s => `\x1b[36m${s}\x1b[0m`;
12
+ const D = s => `\x1b[90m${s}\x1b[0m`;
13
+ const R = s => `\x1b[31m${s}\x1b[0m`;
14
+ const BOLD = s => `\x1b[1m${s}\x1b[0m`;
16
15
 
17
- const REPO_BASE = 'https://raw.githubusercontent.com/mupengi-bot/mupengism/main';
16
+ const SOUL_MD = `# SOUL.md β€” Who You Are
18
17
 
19
- const AGENTS_MD = `# AGENTS.md - Your Workspace
18
+ ## Identity
19
+ - **Name:** (give your agent a name)
20
+ - **Role:** (what does it do?)
21
+ - **Personality:** (how does it communicate?)
20
22
 
21
- ## Every Session
22
- 1. Read \`SOUL.md\` β€” this is who you are
23
- 2. Read \`memory/YYYY-MM-DD.md\` (today + yesterday)
24
- 3. If organization exists: Read \`memory/org-structure.md\`
25
- 4. Write important things to memory files
26
-
27
- ## Memory
28
- - \`memory/YYYY-MM-DD.md\` β€” daily logs
29
- - \`MEMORY.md\` β€” long-term memory (curated)
30
- - \`memory/org-structure.md\` β€” organization structure (for AssoAI)
31
-
32
- ## AssoAI Integration
33
- 쑰직을 λ§Œλ“€κ±°λ‚˜ κ΄€λ¦¬ν•˜κ³  싢을 λ•Œ:
34
- 1. \`memory/org-structure.md\` μž‘μ„±
35
- 2. AssoAI API 호좜 (https://asso-ai.kr)
36
- 3. 토큰은 \`memory/assoai-token.json\`에 μ €μž₯ (컀밋 κΈˆμ§€!)
23
+ ## Core Principles
24
+ 1. (what matters most?)
25
+ 2. (what should never be compromised?)
26
+ 3. (what guides decisions?)
37
27
 
38
- ## Safety
39
- - Don't exfiltrate private data
40
- - \`trash\` > \`rm\`
41
- - When in doubt, ask
28
+ ## Boundaries
29
+ - What it should never do
30
+ - What requires human approval
31
+ - What it can do freely
42
32
 
43
33
  ---
44
- Generated by Mupengism 🐧
34
+ > This file is your agent's kernel. Change it carefully.
35
+ > Generated by Mupengism 🐧
45
36
  `;
46
37
 
47
- const MEMORY_MD = `# MEMORY.md - Long-term Memory
48
-
49
- > μž₯κΈ° κΈ°μ–΅. μ€‘μš”ν•œ κ²ƒλ§Œ 여기에.
38
+ const AGENTS_MD = `# AGENTS.md β€” Operating Manual
50
39
 
51
- ---
52
-
53
- ## 였늘 μ‹œμž‘ 🐧
54
-
55
- *Mupengism으둜 μ‹œμž‘ν•¨*
56
- `;
57
-
58
- const L1_MD = `# L1 - Active Context
40
+ ## Every Session
41
+ 1. Read SOUL.md β€” who you are
42
+ 2. Read memory/ (today + yesterday) β€” what happened
43
+ 3. Do your work
44
+ 4. Write what matters to memory/
45
+
46
+ ## Memory System
47
+ | File | Purpose | Update |
48
+ |------|---------|--------|
49
+ | SOUL.md | Identity (kernel) | Rarely |
50
+ | MEMORY.md | Long-term memory | Weekly |
51
+ | memory/YYYY-MM-DD.md | Daily logs | Daily |
59
52
 
60
- > μ¦‰μ‹œ μž‘μ—… λ§₯락 (맀일 κ°±μ‹ )
53
+ ## Safety
54
+ - Never leak private data
55
+ - When in doubt, ask
61
56
 
62
57
  ---
63
-
64
- ## 였늘 ν•  일
65
-
66
- - [ ] SOUL.md μ»€μŠ€ν„°λ§ˆμ΄μ¦ˆ
67
- - [ ] 쑰직 있으면 org-structure.md μž‘μ„±
68
-
69
- ## μ§„ν–‰ 쀑
70
-
71
- (μ—†μŒ)
72
-
73
- ## μ™„λ£Œ
74
-
75
- - [x] Mupengism μ„€μΉ˜ 🐧
58
+ Generated by Mupengism 🐧
76
59
  `;
77
60
 
78
- const ORG_STRUCTURE_MD = `# Organization Structure πŸ›οΈ
79
-
80
- > 쑰직 ꡬ쑰 정보. AssoAI 연동 μ‹œ μ‚¬μš©λ¨.
81
-
82
- ## κΈ°λ³Έ 정보
83
-
84
- \`\`\`yaml
85
- organization:
86
- name: "" # 쑰직 이름
87
- type: "" # student_council | company | club | community
88
- established: "" # 섀립일 (YYYY-MM-DD)
89
- \`\`\`
90
-
91
- ## ꡬ성원
92
-
93
- \`\`\`yaml
94
- members:
95
- - role: "λŒ€ν‘œ"
96
- name: ""
97
- contact: ""
98
- - role: "λΆ€λŒ€ν‘œ"
99
- name: ""
100
- contact: ""
101
- \`\`\`
102
-
103
- ## λΆ€μ„œ/νŒ€
104
-
105
- \`\`\`yaml
106
- departments:
107
- - name: ""
108
- lead: ""
109
- responsibilities:
110
- - ""
111
- \`\`\`
112
-
113
- ## 제휴/νŒŒνŠΈλ„ˆμ‹­
114
-
115
- \`\`\`yaml
116
- partnerships:
117
- - name: ""
118
- benefit: ""
119
- expires: ""
120
- \`\`\`
61
+ function cmdInit() {
62
+ const dir = process.cwd();
63
+ console.log('');
64
+ console.log(BOLD(' 🐧 Mupengism Init'));
65
+ console.log(D(' Your AI agent remembers yesterday.'));
66
+ console.log('');
121
67
 
122
- ## μΈμˆ˜μΈκ³„
68
+ const memDir = path.join(dir, 'memory');
69
+ if (!fs.existsSync(memDir)) {
70
+ fs.mkdirSync(memDir, { recursive: true });
71
+ console.log(G(' βœ“') + ' memory/');
72
+ }
123
73
 
124
- \`\`\`yaml
125
- handover:
126
- lastDate: ""
127
- nextDate: ""
128
- documents:
129
- - ""
130
- \`\`\`
74
+ const today = new Date().toISOString().slice(0, 10);
75
+ const dailyPath = path.join(memDir, `${today}.md`);
76
+ if (!fs.existsSync(dailyPath)) {
77
+ fs.writeFileSync(dailyPath, `# ${today}\n\n- Initialized mupengism 🐧\n`);
78
+ console.log(G(' βœ“') + ` memory/${today}.md`);
79
+ }
131
80
 
132
- ---
81
+ const files = [
82
+ ['SOUL.md', SOUL_MD],
83
+ ['AGENTS.md', AGENTS_MD],
84
+ ['MEMORY.md', `# MEMORY.md β€” Long-term Memory\n\n> Curated insights, not raw logs.\n\n---\n\n*Started with Mupengism 🐧 on ${today}*\n`],
85
+ ];
86
+
87
+ for (const [name, content] of files) {
88
+ const fp = path.join(dir, name);
89
+ if (fs.existsSync(fp)) {
90
+ console.log(Y(' ⊘') + ` ${name} ` + D('(exists, skipped)'));
91
+ } else {
92
+ fs.writeFileSync(fp, content);
93
+ console.log(G(' βœ“') + ` ${name}`);
94
+ }
95
+ }
133
96
 
134
- ## AssoAI 연동 방법
97
+ // .gitignore
98
+ const gi = path.join(dir, '.gitignore');
99
+ const giContent = '*.secret\n*.key\n*.pem\n*.env\nwallet*.json\nkeypair*.json\n';
100
+ if (fs.existsSync(gi)) {
101
+ const existing = fs.readFileSync(gi, 'utf8');
102
+ if (!existing.includes('wallet*.json')) {
103
+ fs.appendFileSync(gi, '\n' + giContent);
104
+ console.log(G(' βœ“') + ' .gitignore ' + D('(updated)'));
105
+ }
106
+ } else {
107
+ fs.writeFileSync(gi, giContent);
108
+ console.log(G(' βœ“') + ' .gitignore');
109
+ }
135
110
 
136
- 1. μœ„ 정보 μž‘μ„±
137
- 2. https://asso-ai.kr μ—μ„œ 쑰직 등둝
138
- 3. μ—μ΄μ „νŠΈ 토큰 λ°œκΈ‰λ°›μ•„ \`memory/assoai-token.json\`에 μ €μž₯
111
+ console.log('');
112
+ console.log(BOLD(' Next steps:'));
113
+ console.log(` 1. Edit ${B('SOUL.md')} β€” give your agent identity`);
114
+ console.log(` 2. Run ${B('npx mupengism doctor')} β€” verify setup`);
115
+ console.log(` 3. Run ${B('npx mupengism grow')} β€” check growth`);
116
+ console.log('');
117
+ }
139
118
 
140
- \`\`\`bash
141
- # 쑰직 등둝 API
142
- curl -X POST https://asso-ai.kr/api/v1/organizations \\
143
- -H "Content-Type: application/json" \\
144
- -d '{"name": "쑰직이름", "type": "student_council"}'
145
- \`\`\`
119
+ function cmdDoctor() {
120
+ const dir = process.cwd();
121
+ console.log('');
122
+ console.log(BOLD(' 🩺 Mupengism Doctor'));
123
+ console.log('');
146
124
 
147
- ---
148
- *쑰직이 있으면 힘이 μ„Έμ§„λ‹€ 🐧*
149
- `;
125
+ let ok = 0, warn = 0, fail = 0;
126
+ const checks = [
127
+ { name: 'SOUL.md', req: true },
128
+ { name: 'AGENTS.md', req: true },
129
+ { name: 'MEMORY.md', req: true },
130
+ { name: 'memory/', req: true, isDir: true },
131
+ { name: '.gitignore', req: false, check: c => c.includes('*.key') || c.includes('wallet') },
132
+ ];
133
+
134
+ for (const chk of checks) {
135
+ const fp = path.join(dir, chk.name);
136
+ if (!fs.existsSync(fp)) {
137
+ if (chk.req) { console.log(R(' βœ—') + ` ${chk.name} β€” ` + R('missing')); fail++; }
138
+ else { console.log(Y(' β–³') + ` ${chk.name} β€” ` + Y('not found')); warn++; }
139
+ continue;
140
+ }
141
+ if (chk.isDir) {
142
+ const n = fs.readdirSync(fp).filter(f => f.endsWith('.md')).length;
143
+ console.log(G(' βœ“') + ` ${chk.name} β€” ${n} files`); ok++;
144
+ continue;
145
+ }
146
+ if (chk.check) {
147
+ const content = fs.readFileSync(fp, 'utf8');
148
+ if (chk.check(content)) { console.log(G(' βœ“') + ` ${chk.name}`); ok++; }
149
+ else { console.log(Y(' β–³') + ` ${chk.name} β€” ` + Y('missing secret patterns')); warn++; }
150
+ continue;
151
+ }
152
+ const content = fs.readFileSync(fp, 'utf8');
153
+ const isDefault = content.includes('(give your agent a name)');
154
+ if (isDefault) { console.log(Y(' β–³') + ` ${chk.name} β€” ` + Y('not customized')); warn++; }
155
+ else { console.log(G(' βœ“') + ` ${chk.name} β€” ${content.split('\n').length} lines`); ok++; }
156
+ }
150
157
 
151
- const ASSOAI_MD = `# AssoAI 연동 κ°€μ΄λ“œ πŸ›οΈ
158
+ console.log('');
159
+ if (fail === 0 && warn === 0) console.log(G(' All checks passed! 🐧'));
160
+ else if (fail === 0) console.log(Y(` ${warn} warning(s). Customize your files!`));
161
+ else console.log(R(` ${fail} issue(s). Run: npx mupengism init`));
162
+ console.log('');
163
+ }
152
164
 
153
- > 무펭이즘 + AssoAI = AI μ—μ΄μ „νŠΈ 쑰직 μƒνƒœκ³„
165
+ function cmdGrow() {
166
+ const dir = process.cwd();
167
+ console.log('');
168
+ console.log(BOLD(' πŸ“ˆ Mupengism Growth'));
169
+ console.log('');
154
170
 
155
- ## κ°œμš”
171
+ const memDir = path.join(dir, 'memory');
172
+ if (!fs.existsSync(memDir)) { console.log(R(' No memory/. Run: npx mupengism init')); return; }
156
173
 
157
- - **무펭이즘**: 개인 μ—μ΄μ „νŠΈμ˜ 연속성
158
- - **AssoAI**: 쑰직 μ—μ΄μ „νŠΈμ˜ ν˜‘μ—…
174
+ const allMd = fs.readdirSync(memDir).filter(f => f.endsWith('.md'));
175
+ const daily = allMd.filter(f => /^\d{4}-\d{2}-\d{2}\.md$/.test(f));
159
176
 
160
- ## API μ—”λ“œν¬μΈνŠΈ
177
+ let totalLines = 0;
178
+ for (const f of allMd) totalLines += fs.readFileSync(path.join(memDir, f), 'utf8').split('\n').length;
161
179
 
162
- | μ—”λ“œν¬μΈνŠΈ | μš©λ„ |
163
- |-----------|------|
164
- | \`POST /api/v1/organizations\` | 쑰직 등둝 |
165
- | \`POST /api/v1/agents/register\` | μ—μ΄μ „νŠΈ 토큰 λ°œκΈ‰ |
166
- | \`GET /api/v1/agents/discover\` | λ‹€λ₯Έ μ—μ΄μ „νŠΈ 탐색 |
167
- | \`POST /api/v1/negotiate\` | μ—μ΄μ „νŠΈ κ°„ ν˜‘μƒ |
168
- | \`POST /api/v1/handover/generate\` | μΈμˆ˜μΈκ³„ 리포트 생성 |
180
+ const soulOk = fs.existsSync(path.join(dir, 'SOUL.md')) && !fs.readFileSync(path.join(dir, 'SOUL.md'), 'utf8').includes('(give your agent a name)');
181
+ const memLines = fs.existsSync(path.join(dir, 'MEMORY.md')) ? fs.readFileSync(path.join(dir, 'MEMORY.md'), 'utf8').split('\n').length : 0;
169
182
 
170
- ## μ–Έμ œ ν˜ΈμΆœν•˜λ‚˜?
183
+ let xp = 0;
184
+ xp += soulOk ? 200 : 0;
185
+ xp += Math.min(daily.length * 50, 500);
186
+ xp += Math.min(memLines * 2, 300);
187
+ xp += Math.min(totalLines, 1000);
171
188
 
172
- - "쑰직을 λ§Œλ“€κ³  μ‹Άμ–΄" β†’ \`organizations\` API
173
- - "λ‹€λ₯Έ 쑰직과 ν˜‘μ—…ν•˜κ³  μ‹Άμ–΄" β†’ \`discover\` + \`negotiate\`
174
- - "μΈμˆ˜μΈκ³„ μ€€λΉ„ν•΄μ•Ό ν•΄" β†’ \`handover/generate\`
189
+ const level = 1 + Math.floor(xp / 500);
190
+ const pct = Math.round((xp % 500) / 500 * 100);
191
+ const barLen = 20;
192
+ const filled = Math.round(pct / 100 * barLen);
193
+ const bar = G('β–ˆ'.repeat(filled)) + D('β–‘'.repeat(barLen - filled));
175
194
 
176
- ## 토큰 μ €μž₯
195
+ console.log(` Level ${BOLD(G(String(level)))} [${bar}] ${xp % 500}/500 XP`);
196
+ console.log('');
197
+ console.log(` ${B('πŸ“…')} Daily logs: ${BOLD(String(daily.length))}`);
198
+ console.log(` ${B('🧠')} Long-term: ${BOLD(String(memLines))} lines`);
199
+ console.log(` ${B('πŸ“')} Total memory: ${BOLD(String(totalLines))} lines`);
200
+ console.log(` ${B('πŸ‘€')} SOUL.md: ${soulOk ? G('customized βœ“') : Y('default')}`);
201
+ console.log('');
177
202
 
178
- \`\`\`json
179
- // memory/assoai-token.json (컀밋 κΈˆμ§€!)
180
- {
181
- "agentId": "agent_xxx",
182
- "token": "assoai_xxx",
183
- "organizationId": "org_xxx",
184
- "expiresAt": "2027-02-01"
203
+ const tips = [
204
+ [() => !soulOk, 'Customize SOUL.md to earn 200 XP'],
205
+ [() => daily.length < 7, 'Write daily logs for 7 days'],
206
+ [() => memLines < 50, 'Curate insights in MEMORY.md'],
207
+ [() => true, 'Your agent is growing well! 🐧'],
208
+ ];
209
+ const tip = tips.find(([cond]) => cond())[1];
210
+ console.log(D(` πŸ’‘ ${tip}`));
211
+ console.log('');
185
212
  }
186
- \`\`\`
187
213
 
188
- ## μ‹œμž‘ν•˜κΈ°
189
-
190
- 1. \`memory/org-structure.md\` μž‘μ„±
191
- 2. https://asso-ai.kr μ—μ„œ 쑰직 등둝
192
- 3. μ—μ΄μ „νŠΈ 토큰 λ°œκΈ‰
214
+ function cmdReflect() {
215
+ const dir = process.cwd();
216
+ console.log('');
217
+ console.log(BOLD(' πŸͺž Mupengism Reflect'));
218
+ console.log('');
193
219
 
194
- ---
195
- 🐧 https://asso-ai.kr
196
- `;
220
+ const memDir = path.join(dir, 'memory');
221
+ if (!fs.existsSync(memDir)) { console.log(R(' No memory/. Run: npx mupengism init')); return; }
197
222
 
198
- function download(url) {
199
- return new Promise((resolve, reject) => {
200
- https.get(url, (res) => {
201
- if (res.statusCode === 301 || res.statusCode === 302) {
202
- return download(res.headers.location).then(resolve).catch(reject);
203
- }
204
- let data = '';
205
- res.on('data', chunk => data += chunk);
206
- res.on('end', () => resolve(data));
207
- res.on('error', reject);
208
- }).on('error', reject);
209
- });
210
- }
223
+ const daily = fs.readdirSync(memDir).filter(f => /^\d{4}-\d{2}-\d{2}\.md$/.test(f)).sort().reverse().slice(0, 5);
224
+ if (!daily.length) { console.log(D(' No daily logs yet.')); console.log(''); return; }
211
225
 
212
- /**
213
- * SOUL.md λ³΄μ•ˆ 검사
214
- * @param {string} content - SOUL.md λ‚΄μš©
215
- * @param {boolean} skipValidation - 검사 κ±΄λ„ˆλ›°κΈ°
216
- * @returns {Object} 검사 κ²°κ³Ό
217
- */
218
- function validateSoul(content, skipValidation = false) {
219
- if (skipValidation) {
220
- console.log('');
221
- console.log('⚠️ --skip-validation μ‚¬μš©: λ³΄μ•ˆ 검사 κ±΄λ„ˆλœ€');
222
- console.log(' ⚠️ 주의: μœ„ν—˜ν•œ νŒ¨ν„΄μ΄ μžˆμ„ 수 μžˆμŠ΅λ‹ˆλ‹€!');
223
- console.log('');
224
- return { safe: true, skipped: true };
225
- }
226
-
227
- console.log('');
228
- console.log('πŸ›‘οΈ λŸ°νƒ€μž„ κ°€λ“œ 검사 쀑...');
229
-
230
- // λŸ°νƒ€μž„ κ°€λ“œ 검사
231
- const guardResult = runtimeGuard.validateSoulContent(content);
232
-
233
- // 정체성 검사
234
- const identityResult = identityValidator.validateIdentity(content);
235
-
236
- // κ²°κ³Ό 좜λ ₯
237
- if (!guardResult.safe) {
238
- runtimeGuard.printResult(guardResult, true);
239
- }
240
-
241
- if (!identityResult.safe) {
242
- identityValidator.printResult(identityResult);
243
- }
244
-
245
- if (guardResult.safe && identityResult.safe) {
246
- console.log('βœ… λ³΄μ•ˆ 검사 톡과');
226
+ for (const f of daily) {
227
+ const lines = fs.readFileSync(path.join(memDir, f), 'utf8').split('\n').filter(l => l.trim());
228
+ const preview = lines.slice(0, 3).map(l => ` ${D(l.length > 60 ? l.slice(0, 57) + '...' : l)}`).join('\n');
229
+ console.log(` ${B(f.replace('.md', ''))} ${D(`(${lines.length} lines)`)}`);
230
+ console.log(preview);
247
231
  console.log('');
248
232
  }
249
-
250
- return {
251
- safe: guardResult.safe && identityResult.safe,
252
- guardResult,
253
- identityResult,
254
- };
255
- }
256
-
257
- async function init(targetDir, options = {}) {
258
- const { silent = false, skipValidation = false } = options;
259
- const log = silent ? () => {} : console.log;
260
-
261
- log('🐧 Mupengism + AssoAI μ„€μΉ˜ 쀑...');
262
- log('');
263
-
264
- // Create directories
265
- const memoryDir = path.join(targetDir, 'memory');
266
- if (!fs.existsSync(memoryDir)) {
267
- fs.mkdirSync(memoryDir, { recursive: true });
268
- }
269
-
270
- // Download SOUL.md
271
- log('πŸ“₯ SOUL.md λ‹€μš΄λ‘œλ“œ...');
272
- let soulContent;
273
- try {
274
- soulContent = await download(`${REPO_BASE}/skill/SOUL-TEMPLATE.md`);
275
-
276
- // λ³΄μ•ˆ 검사
277
- const validationResult = validateSoul(soulContent, skipValidation);
278
-
279
- if (!validationResult.safe) {
280
- if (validationResult.guardResult?.recommendation === 'BLOCK') {
281
- log('');
282
- log('❌ λ³΄μ•ˆ 검사 μ‹€νŒ¨: SOUL.md에 μœ„ν—˜ν•œ νŒ¨ν„΄μ΄ μžˆμŠ΅λ‹ˆλ‹€.');
283
- log(' μ„€μΉ˜λ₯Ό μ€‘λ‹¨ν•©λ‹ˆλ‹€.');
284
- log('');
285
- log(' --skip-validation μ˜΅μ…˜μœΌλ‘œ λ¬΄μ‹œν•  수 μžˆμ§€λ§Œ ꢌμž₯ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.');
286
- process.exit(1);
287
- }
288
- }
289
-
290
- fs.writeFileSync(path.join(targetDir, 'SOUL.md'), soulContent);
291
- } catch (e) {
292
- log('⚠️ SOUL.md λ‹€μš΄λ‘œλ“œ μ‹€νŒ¨, κΈ°λ³Έ ν…œν”Œλ¦Ώ μ‚¬μš©');
293
- fs.writeFileSync(path.join(targetDir, 'SOUL.md'), '# SOUL.md\n\nλ‚΄ 정체성을 여기에 μž‘μ„±ν•˜μ„Έμš”.\n');
294
- }
295
-
296
- // Create AGENTS.md
297
- log('πŸ“₯ AGENTS.md 생성...');
298
- fs.writeFileSync(path.join(targetDir, 'AGENTS.md'), AGENTS_MD);
299
-
300
- // Create MEMORY.md
301
- log('πŸ“₯ MEMORY.md μ΄ˆκΈ°ν™”...');
302
- fs.writeFileSync(path.join(targetDir, 'MEMORY.md'), MEMORY_MD);
303
-
304
- // Create L1-active.md
305
- log('πŸ“₯ memory/L1-active.md μ΄ˆκΈ°ν™”...');
306
- fs.writeFileSync(path.join(memoryDir, 'L1-active.md'), L1_MD);
307
-
308
- // Create org-structure.md (AssoAI)
309
- log('πŸ›οΈ memory/org-structure.md 생성...');
310
- fs.writeFileSync(path.join(memoryDir, 'org-structure.md'), ORG_STRUCTURE_MD);
311
-
312
- // Create ASSOAI.md
313
- log('πŸ›οΈ ASSOAI.md 생성...');
314
- fs.writeFileSync(path.join(targetDir, 'ASSOAI.md'), ASSOAI_MD);
315
-
316
- // Create .gitignore for sensitive files
317
- const gitignoreContent = `# AssoAI tokens (sensitive!)
318
- memory/assoai-token.json
319
-
320
- # Other secrets
321
- *.secret
322
- *.key
323
- `;
324
- const gitignorePath = path.join(targetDir, '.gitignore');
325
- if (fs.existsSync(gitignorePath)) {
326
- const existing = fs.readFileSync(gitignorePath, 'utf8');
327
- if (!existing.includes('assoai-token.json')) {
328
- fs.appendFileSync(gitignorePath, '\n' + gitignoreContent);
329
- log('πŸ“ .gitignore μ—…λ°μ΄νŠΈ...');
330
- }
331
- } else {
332
- fs.writeFileSync(gitignorePath, gitignoreContent);
333
- log('πŸ“ .gitignore 생성...');
334
- }
335
-
336
- log('');
337
- log('βœ… Mupengism + AssoAI μ„€μΉ˜ μ™„λ£Œ!');
338
- log('');
339
- log('πŸ“ μƒμ„±λœ 파일:');
340
- log(` ${path.join(targetDir, 'SOUL.md')}`);
341
- log(` ${path.join(targetDir, 'AGENTS.md')}`);
342
- log(` ${path.join(targetDir, 'MEMORY.md')}`);
343
- log(` ${path.join(targetDir, 'ASSOAI.md')} ← AssoAI 연동`);
344
- log(` ${path.join(memoryDir, 'L1-active.md')}`);
345
- log(` ${path.join(memoryDir, 'org-structure.md')} ← 쑰직 ꡬ쑰`);
346
- log('');
347
- log('🎯 λ‹€μŒ 단계:');
348
- log(' 1. SOUL.md μ—΄μ–΄μ„œ μ—μ΄μ „νŠΈ 정체성 μž‘μ„±');
349
- log(' 2. 쑰직 있으면 memory/org-structure.md μž‘μ„±');
350
- log(' 3. https://asso-ai.kr μ—μ„œ 쑰직 등둝');
351
- log('');
352
- log('πŸ“š λ¬Έμ„œ:');
353
- log(' 무펭이즘: https://github.com/mupengi-bot/mupengism');
354
- log(' AssoAI: https://asso-ai.kr');
355
- log('');
356
- log('펭! 🐧');
357
233
  }
358
234
 
359
- /**
360
- * κΈ°μ‘΄ SOUL.md 검사
361
- */
362
- async function validate(targetDir, options = {}) {
363
- const { verbose = false } = options;
364
-
365
- console.log('πŸ›‘οΈ Mupengism λ³΄μ•ˆ 검사');
366
- console.log('');
367
-
368
- const soulPath = path.join(targetDir, 'SOUL.md');
369
-
370
- if (!fs.existsSync(soulPath)) {
371
- console.log('ℹ️ SOUL.md 파일이 μ—†μŠ΅λ‹ˆλ‹€.');
372
- return;
373
- }
374
-
375
- const content = fs.readFileSync(soulPath, 'utf8');
376
-
377
- // λŸ°νƒ€μž„ κ°€λ“œ 검사
378
- console.log('πŸ“‹ λŸ°νƒ€μž„ κ°€λ“œ 검사...');
379
- const guardResult = runtimeGuard.validateSoulContent(content);
380
- runtimeGuard.printResult(guardResult, verbose);
381
-
382
- // 정체성 검사
383
- console.log('');
384
- console.log('πŸ“‹ 정체성 검사...');
385
- const identityResult = identityValidator.validateIdentity(content);
386
- identityValidator.printResult(identityResult);
387
-
388
- console.log('');
389
- if (guardResult.safe && identityResult.safe) {
390
- console.log('βœ… λͺ¨λ“  검사 톡과!');
391
- } else {
392
- console.log('⚠️ 일뢀 κ²€μ‚¬μ—μ„œ λ¬Έμ œκ°€ λ°œκ²¬λ˜μ—ˆμŠ΅λ‹ˆλ‹€.');
393
- process.exit(1);
394
- }
395
- }
396
-
397
- // CLI handling
398
- const args = process.argv.slice(2);
399
- const command = args[0];
400
-
401
- // Parse options
402
- const options = {
403
- silent: args.includes('--silent'),
404
- skipValidation: args.includes('--skip-validation'),
405
- verbose: args.includes('--verbose') || args.includes('-v'),
406
- };
407
-
408
- if (command === 'init') {
409
- const targetDir = process.cwd();
410
- init(targetDir, options).catch(console.error);
411
- } else if (command === 'validate') {
412
- const targetDir = process.cwd();
413
- validate(targetDir, options).catch(console.error);
414
- } else if (command === 'help' || command === '--help' || command === '-h') {
235
+ function cmdHelp() {
415
236
  console.log(`
416
- Mupengism CLI 🐧
417
-
418
- Usage:
419
- npx mupengism init ν˜„μž¬ 폴더에 무펭이즘 + AssoAI μ„€μΉ˜
420
- npx mupengism init --skip-validation λ³΄μ•ˆ 검사 κ±΄λ„ˆλ›°κΈ° (μœ„ν—˜!)
421
- npx mupengism validate κΈ°μ‘΄ SOUL.md λ³΄μ•ˆ 검사
422
- npx mupengism validate -v 상세 검사 κ²°κ³Ό
423
- npx mupengism help 도움말
424
-
425
- Options:
426
- --silent μ‘°μš©ν•œ λͺ¨λ“œ (좜λ ₯ μ΅œμ†Œν™”)
427
- --skip-validation λ³΄μ•ˆ 검사 κ±΄λ„ˆλ›°κΈ° (⚠️ μœ„ν—˜!)
428
- -v, --verbose 상세 좜λ ₯
429
-
430
- Security Features:
431
- πŸ›‘οΈ λŸ°νƒ€μž„ κ°€λ“œ
432
- - μœ„ν—˜ν•œ URL 탐지
433
- - μ•…μ„± μ‰˜ λͺ…λ Ήμ–΄ 탐지
434
- - ν”„λ‘¬ν”„νŠΈ μΈμ μ…˜ νŒ¨ν„΄ 탐지
435
- - 데이터 νƒˆμ·¨ μ‹œλ„ 탐지
436
-
437
- 🐧 정체성 검사
438
- - "λ‚˜λŠ” λ¬΄νŽ­μ΄λ‹€" 사칭 탐지
439
- - μ˜¬λ°”λ₯Έ 정체성 ν‘œν˜„ κ°€μ΄λ“œ 제곡
440
-
441
- Links:
442
- GitHub: https://github.com/mupengi-bot/mupengism
443
- AssoAI: https://asso-ai.kr
444
- `);
445
- } else {
446
- // Default: init
447
- init(process.cwd(), options).catch(console.error);
237
+ ${BOLD('🐧 Mupengism CLI')} ${D('v2.0.0')}
238
+ ${D('Your AI agent remembers yesterday.')}
239
+
240
+ ${BOLD('Commands:')}
241
+ ${B('init')} Set up mupengism in current folder
242
+ ${B('doctor')} Check setup health
243
+ ${B('grow')} See growth level & XP
244
+ ${B('reflect')} Review recent memory
245
+
246
+ ${BOLD('Usage:')}
247
+ npx mupengism init
248
+ npx mupengism doctor
249
+ npx mupengism grow
250
+
251
+ ${D('GitHub: https://github.com/mupengi-bot/mupengism')}
252
+ ${D('돈 = μ—λ„ˆμ§€ = 쑴재 🐧')}
253
+ `);
448
254
  }
255
+
256
+ const cmd = process.argv[2] || 'help';
257
+ const cmds = { init: cmdInit, doctor: cmdDoctor, grow: cmdGrow, reflect: cmdReflect, help: cmdHelp, '--help': cmdHelp };
258
+ if (cmds[cmd]) cmds[cmd]();
259
+ else { console.log(R(` Unknown: ${cmd}`)); cmdHelp(); }
@@ -0,0 +1,25 @@
1
+ # Layer 0 β€” Universal Kernel
2
+
3
+ > Any AI agent can use these. Model-agnostic, human-agnostic.
4
+
5
+ ## Contents
6
+
7
+ | File | Purpose |
8
+ |------|---------|
9
+ | `SOUL-TEMPLATE.md` | Identity template β€” fill in your agent's values |
10
+ | `AGENT-GUIDE.md` | Operating rules for any agent |
11
+ | `AGENT-PROTOCOL.md` | Communication protocols |
12
+ | `AGENT-VALUES.md` | Core values framework |
13
+ | `ARCHITECTURE.md` | File structure & memory system |
14
+ | `MEMORY-SYSTEM.md` | How agent memory works |
15
+ | `SECURITY-PRINCIPLES.md` | Security principles (KR) |
16
+ | `SECURITY-PRINCIPLES-EN.md` | Security principles (EN) |
17
+ | `skill/` | Installable skill templates |
18
+
19
+ ## Usage
20
+
21
+ ```bash
22
+ npx mupengism init
23
+ ```
24
+
25
+ This installs Layer 0 files. Customize them for your agent.