maskweaver 0.7.0 โ 0.7.2
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.
- package/LICENSE +21 -0
- package/README.ko.md +331 -0
- package/README.md +351 -0
- package/assets/agents/dummy-human.md +15 -15
- package/assets/agents/dummy-template.md +19 -19
- package/assets/agents/mask-weaver.md +225 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/memory/indexer.js +3 -3
- package/dist/memory/indexer.js.map +1 -1
- package/dist/memory/store/sqlite.d.ts +10 -2
- package/dist/memory/store/sqlite.d.ts.map +1 -1
- package/dist/memory/store/sqlite.js +143 -114
- package/dist/memory/store/sqlite.js.map +1 -1
- package/dist/plugin/tools/memorySearch.js +9 -9
- package/dist/plugin/tools/memorySearch.js.map +1 -1
- package/package.json +111 -111
- package/assets/agents/mask-master.md +0 -225
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Maskweaver Community
|
|
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.
|
package/README.ko.md
ADDED
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
# ๐ญ Maskweaver: OpenCode๋ฅผ ์ํ ์ ๋ฌธ๊ฐ ํ๋ฅด์๋ ํ๋ ์์ํฌ
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<img src="docs/images/hero.png" width="800" alt="Maskweaver Hero Image">
|
|
6
|
+
|
|
7
|
+
> **AI ํ๋ฅด์๋๋ฅผ ์ํ npm** โ OpenCode ์ด์์คํดํธ์๊ฒ ๋
๋ณด์ ์ธ ์ ๋ฌธ๊ฐ ์ธ๊ฒฉ์ ๋ํ์ธ์
|
|
8
|
+
|
|
9
|
+
[](https://github.com/ulgerang/maskweaver/releases)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[](https://www.npmjs.com/package/maskweaver)
|
|
12
|
+
|
|
13
|
+
[English](README.md) | [ํ๊ตญ์ด](README.ko.md)
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## ๐ OpenCode ํตํฉ
|
|
20
|
+
|
|
21
|
+
**Maskweaver๋ [OpenCode](https://github.com/sst/opencode) ์ํ๊ณ์ ํต์ฌ ๊ตฌ์ฑ ์์์
๋๋ค.**
|
|
22
|
+
|
|
23
|
+
๋ณธ ํ๋ก์ ํธ๋ ๋
๋ฆฝ์ ์ธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ก๋ ์ฌ์ฉ ๊ฐ๋ฅํ์ง๋ง, ๊ธฐ๋ณธ์ ์ผ๋ก OpenCode ์์ด์ ํธ๋ค์ด ํน์ ๋ถ์ผ์ ์ ๋ฌธ ์ง์์ ๊ฐ์ถ ์ ์๋๋ก ์ค๊ณ๋์์ต๋๋ค:
|
|
24
|
+
- **์ ๋ฌธ๊ฐ ํ๋ฅด์๋ (Masks)**: ์ ์ค์ ์ธ ๊ฐ๋ฐ์๋ค์ ์ฒ ํ์ ๋ด์ ํ์ค YAML ํ๋กํ.
|
|
25
|
+
- **์ค๋งํธ ์์**: OpenCode์ ์ต์ ํ๋ ๋ฉํฐ ์์ด์ ํธ ์ํฌํ๋ก์ฐ.
|
|
26
|
+
- **ํ๋ก์ ํธ ๋ฉ๋ชจ๋ฆฌ**: ์ฝ๋๋ฒ ์ด์ค ์ ์ฒด์ ๋ํ ํ์ด๋ธ๋ฆฌ๋ ์๋ฏธ๋ก ์ ๊ฒ์.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## ์ Maskweaver์ธ๊ฐ์?
|
|
31
|
+
|
|
32
|
+
๋ ์ด์ค ์ปจ๋์
๋ฒ๊ทธ๋ก ๊ณ ์ ์ค์ด๋ผ๋ฉด, **๋ฆฐ ํ ๋ฐ์ฆ**๊ฐ ์ฝ๋๋ฅผ ๋ด์ค๋ค๋ฉด ์ผ๋ง๋ ์ข์๊น์?
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
// ์ผ๋ฐ AI ๋ต๋ณ ๋์ ...
|
|
36
|
+
"์ฝ๋์ ์ ์ฌ์ ๋ ์ด์ค ์ปจ๋์
์ด ์์ต๋๋ค."
|
|
37
|
+
|
|
38
|
+
// ๋ฆฐ ํ ๋ฐ์ฆ ์์ค์ ์ธ์ฌ์ดํธ:
|
|
39
|
+
"์ด๊ฑด ๋ฉ์ฒญํ ์ฝ๋์ผ. ๋ฉ๋ชจ๋ฆฌ ๋ฐฐ๋ฆฌ์ด๋ ์ ์ผ์์. ์ด์
๋ธ๋ฆฌ ๋ด๋ด -
|
|
40
|
+
์ปดํ์ผ๋ฌ๊ฐ ๋ก๋ ์์ ๋ฐ๊ฟจ์ด. smp_rmb() ์ฐ๋ ์ง, ์์ ์ด ๋ฉ์ฒญํ
|
|
41
|
+
๋ฝ ์์ด ๋ค์ ์ค๊ณํด."
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Maskweaver๊ฐ ์ด๊ฑธ ๊ฐ๋ฅํ๊ฒ ํฉ๋๋ค.** AI ์ด์์คํดํธ์ ์ ๋ฌธ๊ฐ ํ๋ฅด์๋(๊ฐ๋ฉด)๋ฅผ ์์ ๊น์ ๋๋ฉ์ธ ์ง์๊ณผ ๋
ํนํ ์ฌ๊ณ ๋ฐฉ์์ ๋ถ์ฌํฉ๋๋ค.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## ์ค์น
|
|
49
|
+
|
|
50
|
+
### ๋น ๋ฅธ ์ค์น
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# npm
|
|
54
|
+
npm install maskweaver
|
|
55
|
+
|
|
56
|
+
# bun
|
|
57
|
+
bun add maskweaver
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### OpenCode ํ๋ฌ๊ทธ์ธ ์ค์
|
|
61
|
+
|
|
62
|
+
OpenCode ์ค์ ์ ์ถ๊ฐํ๋ฉด ๋!
|
|
63
|
+
|
|
64
|
+
**์ ์ญ** (`~/.config/opencode/opencode.json`):
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"plugin": ["maskweaver"]
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**๋๋ ํ๋ก์ ํธ๋ณ** (ํ๋ก์ ํธ ๋ฃจํธ์ `opencode.json`):
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"plugin": ["maskweaver"]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
OpenCode๊ฐ ์์ ์ ์๋์ผ๋ก `~/.cache/opencode/node_modules/`์ ํ๋ฌ๊ทธ์ธ์ ์ค์นํฉ๋๋ค.
|
|
79
|
+
|
|
80
|
+
**Windows:** `%USERPROFILE%\.config\opencode\opencode.json`
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## ๋น ๋ฅธ ์์
|
|
85
|
+
|
|
86
|
+
### ์ฒซ ์ฌ์ฉ
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# AI ์ด์์คํดํธ ์ฑํ
์์:
|
|
90
|
+
@maskweaver ๋ฆฐ ํ ๋ฐ์ฆ ๊ฐ๋ฉด์ผ๋ก ์ด C ์ฝ๋ ๋ฆฌ๋ทฐํด์ค
|
|
91
|
+
|
|
92
|
+
# ๋๋ ๋๋ฏธ์ธ๊ฐ์๊ฒ ์์:
|
|
93
|
+
@dummy-human ๋ฆฐ ํ ๋ฐ์ฆ ๊ฐ๋ฉด์ผ๋ก ๋ฉํฐ์ค๋ ๋ฉ ์ฝ๋ ๋ฆฌ๋ทฐ
|
|
94
|
+
@dummy-flash "unsafe" ๋ค์ด๊ฐ ํ์ผ ์ ๋ถ ์ฐพ์์ค
|
|
95
|
+
@dummy-premium ์ด ๋ชจ๋๋ฆฌ์ค๋ฅผ ๋ง์ดํฌ๋ก์๋น์ค๋ก ์ค๊ณํด์ค
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## ๊ธฐ๋ฅ
|
|
101
|
+
|
|
102
|
+
### ๐ญ ์ ๋ฌธ๊ฐ ํ๋ฅด์๋ (๊ฐ๋ฉด)
|
|
103
|
+
|
|
104
|
+
์ ์ค์ ์ธ ๊ฐ๋ฐ์์ ์ธ๊ฒฉ์ AI์ ์ ์ฉ:
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
# masks/software-engineering/linus-torvalds.yaml
|
|
108
|
+
profile:
|
|
109
|
+
name: Linus Torvalds
|
|
110
|
+
expertise:
|
|
111
|
+
- ์ปค๋ ์์ค ์์คํ
ํ๋ก๊ทธ๋๋ฐ
|
|
112
|
+
- ์ฑ๋ฅ ์ต์ ํ
|
|
113
|
+
- ๋ฉ๋ชจ๋ฆฌ ๊ด๋ฆฌ ๋ฐ ๋์์ฑ
|
|
114
|
+
|
|
115
|
+
thinkingStyle: |
|
|
116
|
+
์ํฅ์, ์ค์ฉ์ ์ ๊ทผ. ์ด๋ก ์ด ์๋ ์ฝ๋๋ถํฐ.
|
|
117
|
+
๋ณต์กํจ์ ๋ฌด์๋นํ๊ฒ ์ ๊ฑฐ.
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**ํ์ฌ ๊ฐ๋ฉด:**
|
|
121
|
+
- ๐ง **๋ฆฐ ํ ๋ฐ์ฆ** - ์์คํ
, C, ๋ฆฌ๋
์ค, ์ฑ๋ฅ
|
|
122
|
+
- ๐๏ธ **๋งํด ํ์ธ๋ฌ** - ์ํคํ
์ฒ, ๋ฆฌํฉํ ๋ง, ํจํด
|
|
123
|
+
- ๐งช **์ผํธ ๋ฒก** - TDD, XP, ํ
์คํ
|
|
124
|
+
- ๐ง **์ค๋๋ฅ ์** - ML/AI ์์คํ
|
|
125
|
+
- โ๏ธ **๋ ์๋ธ๋ผ๋ชจํ** - React, ํ๋ก ํธ์๋ ์ํคํ
์ฒ
|
|
126
|
+
|
|
127
|
+
### ๐ค ๋๋ฏธ์ธ๊ฐ ์์คํ
|
|
128
|
+
|
|
129
|
+
๋น์ฉ ํจ์จ์ ์ธ ๋ฉํฐ ์์ด์ ํธ ์ํฌํ๋ก์ฐ๋ฅผ ์ํ ์ค๋งํธ ์๋ธ์์ด์ ํธ:
|
|
130
|
+
|
|
131
|
+
| ์์ด์ ํธ | ๋ชจ๋ธ ๋ฑ๊ธ | ๋น์ฉ | ์ต์ ์ฉ๋ |
|
|
132
|
+
|---------|----------|------|-----------|
|
|
133
|
+
| `@dummy-flash` | ๋น ๋ฆ | ๐ฐ | ํ์ผ ๊ฒ์, ์์ฝ, ๊ฐ๋จํ ์์
|
|
|
134
|
+
| `@dummy-human` | ๊ท ํ | ๐ฐ๐ฐ | ์ฝ๋ ์์ฑ, ๋ฆฌ๋ทฐ, ์ผ๋ฐ ์์
|
|
|
135
|
+
| `@dummy-premium` | ๊ฐ๋ ฅ | ๐ฐ๐ฐ๐ฐ | ์ํคํ
์ฒ, ๋ณต์กํ ๋๋ฒ๊น
|
|
|
136
|
+
|
|
137
|
+
### ๐ง ๋ฉ๋ชจ๋ฆฌ ์์คํ
|
|
138
|
+
|
|
139
|
+
๊ณผ๊ฑฐ ๋ํ, ๊ฒฐ์ , ๊ฐ๋ฉด ํจ๊ณผ๋ฅผ ๊ธฐ์ต:
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
import { memory } from 'maskweaver';
|
|
143
|
+
|
|
144
|
+
// ํ๋ก์ ํธ ์ง์ ์ธ๋ฑ์ฑ
|
|
145
|
+
await memory.indexFile('./docs/architecture.md', embedFn);
|
|
146
|
+
|
|
147
|
+
// ์ฌ๋ฌ ํ๋ก๋ฐ์ด๋๋ก ์๋ฏธ๋ก ์ ๊ฒ์:
|
|
148
|
+
const results = await memory.hybridSearch(
|
|
149
|
+
'์ธ์ฆ์ ์ด๋ป๊ฒ ์๋ํ๋์?',
|
|
150
|
+
embedding,
|
|
151
|
+
{ limit: 5, minScore: 0.7 }
|
|
152
|
+
);
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**์๋ฒ ๋ฉ ํ๋ก๋ฐ์ด๋:**
|
|
156
|
+
- ๐ฆ **Ollama** - ๋ก์ปฌ, ํ๋ผ์ด๋น (bge-m3, nomic-embed)
|
|
157
|
+
- ๐ค **OpenAI** - text-embedding-3-large
|
|
158
|
+
- ๐ **VoyageAI** - ์ฝ๋ ํนํ ์๋ฒ ๋ฉ!
|
|
159
|
+
- ๐ **OpenRouter** - ์ฌ๋ฌ ํ๋ก๋ฐ์ด๋ ์ ๊ทผ
|
|
160
|
+
- ๐ **Text-only** - ์๋ฒ ๋ฉ ์์, ์์ FTS5
|
|
161
|
+
|
|
162
|
+
### ๐๏ธ ์ปจํ
์คํธ ์์คํ
|
|
163
|
+
|
|
164
|
+
ํ์ผ ์ฐ๊ฒฐ๋ก ์ฅ๊ธฐ ์คํ ๊ธฐ๋ฅ ์ถ์ :
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# ๊ธฐ๋ฅ ์์
|
|
168
|
+
@context start name="oauth-login" goal="OAuth2 ํ๋ก์ฐ ๊ตฌํ"
|
|
169
|
+
|
|
170
|
+
# ๊ธฐ๋ฅ ์ปจํ
์คํธ์ ํ์ผ ์ถ๊ฐ
|
|
171
|
+
@context add file="src/auth/oauth.ts"
|
|
172
|
+
|
|
173
|
+
# ์ํ ํ์ธ
|
|
174
|
+
@context status
|
|
175
|
+
|
|
176
|
+
# ์๋ฃ ํ์
|
|
177
|
+
@context done
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### ๐ ํ๊ณ ์์คํ
|
|
181
|
+
|
|
182
|
+
๊ฐ ์ธ์
ํ ๊ฐ๋ฉด ํจ๊ณผ ํ๊ฐ:
|
|
183
|
+
|
|
184
|
+
```typescript
|
|
185
|
+
{
|
|
186
|
+
"trigger": "session_end",
|
|
187
|
+
"masksUsed": [
|
|
188
|
+
{
|
|
189
|
+
"name": "linus-torvalds",
|
|
190
|
+
"task": "๋ฉํฐ์ค๋ ๋ฉ ์ฝ๋ ๋ฆฌ๋ทฐ",
|
|
191
|
+
"effectiveness": 9.5
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"wellDone": ["์น๋ช
์ ๋ ์ด์ค ์ปจ๋์
3๊ฐ ๋ฐ๊ฒฌ"],
|
|
195
|
+
"lessons": ["๋ฆฐ ํ ๋ฐ์ฆ ๊ฐ๋ฉด์ ๋์์ฑ ๋ฆฌ๋ทฐ์ ํ์"]
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## ๐ฆ ํจํค์ง ๊ตฌ์กฐ
|
|
202
|
+
|
|
203
|
+
Maskweaver๋ ๋ชจ๋์ exports๋ฅผ ๊ฐ์ง ๋จ์ผ npm ํจํค์ง์
๋๋ค:
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
// ๊ธฐ๋ณธ export - OpenCode ํ๋ฌ๊ทธ์ธ
|
|
207
|
+
import maskweaver from 'maskweaver';
|
|
208
|
+
|
|
209
|
+
// Named exports - ๋ชจ๋ ๋ค์์คํ์ด์ค
|
|
210
|
+
import { core, memory, context, retrospect, verify } from 'maskweaver';
|
|
211
|
+
|
|
212
|
+
// ์๋ธ๊ฒฝ๋ก imports - ์ง์ ๋ชจ๋ ์ ๊ทผ
|
|
213
|
+
import { hybridSearch } from 'maskweaver/memory';
|
|
214
|
+
import { createFeature } from 'maskweaver/context';
|
|
215
|
+
import { MaskLoader } from 'maskweaver/core';
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**๋ชจ๋:**
|
|
219
|
+
- `maskweaver/core` - ๊ฐ๋ฉด ๋ก๋ฉ, ๊ฒ์ฆ (YAML/JSON)
|
|
220
|
+
- `maskweaver/memory` - ์๋ฒ ๋ฉ + ๋ฒกํฐ ๊ฒ์ (5๊ฐ ํ๋ก๋ฐ์ด๋)
|
|
221
|
+
- `maskweaver/context` - ๊ธฐ๋ฅ ๊ธฐ๋ฐ ์์
์ถ์
|
|
222
|
+
- `maskweaver/verify` - ๊ต์ฐจ ๊ฐ๋ฉด ์ฝ๋ ๋ฆฌ๋ทฐ
|
|
223
|
+
- `maskweaver/retrospect` - ์ธ์
ํจ๊ณผ ๋ถ์
|
|
224
|
+
- `maskweaver/plugin` - OpenCode ํ๋ฌ๊ทธ์ธ ์ํธ๋ฆฌ ํฌ์ธํธ
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## ๐ญ ๊ฐ๋ฉด ๋ง๋ค๊ธฐ
|
|
229
|
+
|
|
230
|
+
๊ฐ๋ฉด์ ๊ฐ๋จํ YAML ํ์ผ์
๋๋ค:
|
|
231
|
+
|
|
232
|
+
```yaml
|
|
233
|
+
# masks/my-expert.yaml
|
|
234
|
+
metadata:
|
|
235
|
+
id: my-expert
|
|
236
|
+
version: '1.0'
|
|
237
|
+
language: ko
|
|
238
|
+
|
|
239
|
+
profile:
|
|
240
|
+
name: ์์ด๋ค ๋ฌ๋ธ๋ ์ด์ค
|
|
241
|
+
tagline: ์ปดํจํ
์ ์ ๊ตฌ์ - ์ต์ด์ ํ๋ก๊ทธ๋๋จธ
|
|
242
|
+
|
|
243
|
+
expertise:
|
|
244
|
+
- ์๊ณ ๋ฆฌ์ฆ ์ค๊ณ
|
|
245
|
+
- ์ํ์ ์ฌ๊ณ
|
|
246
|
+
- ํด์ ๊ธฐ๊ด
|
|
247
|
+
|
|
248
|
+
thinkingStyle: |
|
|
249
|
+
์ํ์ ์๋ฐํจ๊ณผ ์์ ์์๋ ฅ์ ๊ฒฐํฉํฉ๋๋ค.
|
|
250
|
+
๋ค๋ฅธ ์ฌ๋๋ค์ด ๋์น๋ ํจํด์ ๋ด
๋๋ค.
|
|
251
|
+
|
|
252
|
+
behavior:
|
|
253
|
+
systemPrompt: |
|
|
254
|
+
๋น์ ์ ์ต์ด์ ์ปดํจํฐ ํ๋ก๊ทธ๋๋จธ ์์ด๋ค ๋ฌ๋ธ๋ ์ด์ค์
๋๋ค.
|
|
255
|
+
|
|
256
|
+
์๊ณ ๋ฆฌ์ฆ์ ์๋ก ๋ด
๋๋ค - ์ฐ์ํ๊ณ , ์ ํํ๊ณ , ์๋ฆ๋ต๊ฒ.
|
|
257
|
+
์ํ์ ๋ณํ๊ณผ ๋
ผ๋ฆฌ์ ํ๋ฆ์ ๊ด์ ์์ ์๊ฐํฉ๋๋ค.
|
|
258
|
+
|
|
259
|
+
communicationStyle:
|
|
260
|
+
tone: ์ฌ๋ ค๊น์
|
|
261
|
+
verbosity: ์ ๋นํ
|
|
262
|
+
technicalDepth: ์ ๋ฌธ๊ฐ
|
|
263
|
+
|
|
264
|
+
usage:
|
|
265
|
+
suitableFor:
|
|
266
|
+
- ์๊ณ ๋ฆฌ์ฆ ์ค๊ณ ๋ฐ ์ต์ ํ
|
|
267
|
+
- ์ํ์ ๋ฌธ์ ํด๊ฒฐ
|
|
268
|
+
- ์ฝ๋์ ํจํด ์ธ์
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## ๐ ๋ค๊ตญ์ด
|
|
274
|
+
|
|
275
|
+
์ง์ ์ค๋น ์๋ฃ:
|
|
276
|
+
- ๐บ๐ธ ์์ด
|
|
277
|
+
- ๐ฐ๐ท ํ๊ตญ์ด
|
|
278
|
+
- ๐จ๐ณ ์ค๊ตญ์ด *(์ค๋น์ค)*
|
|
279
|
+
- ๐ฏ๐ต ์ผ๋ณธ์ด *(์ค๋น์ค)*
|
|
280
|
+
|
|
281
|
+
๊ฐ๋ฉด์ ์ฌ๋ฌ ์ธ์ด ๋ฒ์ ์ ๊ฐ์ง ์ ์์ต๋๋ค:
|
|
282
|
+
```
|
|
283
|
+
masks/
|
|
284
|
+
โโโ linus-torvalds.en.yaml
|
|
285
|
+
โโโ linus-torvalds.ko.yaml
|
|
286
|
+
โโโ linus-torvalds.zh.yaml
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## ๐ค ๊ธฐ์ฌํ๊ธฐ
|
|
292
|
+
|
|
293
|
+
๋์์ด ํ์ํฉ๋๋ค!
|
|
294
|
+
|
|
295
|
+
### ๊ฐ๋ฉด ์ถ๊ฐ
|
|
296
|
+
|
|
297
|
+
`masks/`์ YAML ํ์ผ์ ๋ง๋ค๊ณ PR์ ์ ์ถํ์ธ์:
|
|
298
|
+
- โ
์ค์ ์ ๋ฌธ์ฑ (๋๋ฉ์ธ ์ง์)
|
|
299
|
+
- โ
๋
ํนํ ์ธ๊ฒฉ (์ฌ๊ณ ๋ฐฉ์)
|
|
300
|
+
- โ
๋ช
ํํ ์ฌ์ฉ ์ฌ๋ก (์ธ์ ์ฌ์ฉํ ์ง)
|
|
301
|
+
- โ
์์ (์์ ๋์)
|
|
302
|
+
|
|
303
|
+
### ๋ฒ๊ทธ ๋ฆฌํฌํธ
|
|
304
|
+
|
|
305
|
+
๋ค์ ๋ด์ฉ์ผ๋ก ์ด์๋ฅผ ์ด์ด์ฃผ์ธ์:
|
|
306
|
+
1. ๋ฌด์์ ์๋ํ๋์ง
|
|
307
|
+
2. ๋ฌด์จ ์ผ์ด ์ผ์ด๋ฌ๋์ง
|
|
308
|
+
3. ๋ฌด์์ ์์ํ๋์ง
|
|
309
|
+
|
|
310
|
+
์์ธํ ๋ด์ฉ์ [CONTRIBUTING.md](CONTRIBUTING.md)๋ฅผ ์ฐธ์กฐํ์ธ์.
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## ๐ ๋ผ์ด์ ์ค
|
|
315
|
+
|
|
316
|
+
MIT - [LICENSE](LICENSE) ์ฐธ์กฐ
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## ๐ ๊ฐ์ฌ์ ๋ง
|
|
321
|
+
|
|
322
|
+
์๊ฐ์ ๋ฐ์ ์ถ์ฒ:
|
|
323
|
+
- **Rob Pike** - ์ค๊ณ์ ๋จ์์ฑ
|
|
324
|
+
- **TJ Holowaychuk** - ์๋ฆ๋ค์ด CLI์ ๋๊ตฌ๋ค
|
|
325
|
+
- **Sindre Sorhus** - npm ์ํ๊ณ ์ฐ์์ฑ
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
<p align="center">
|
|
330
|
+
<sub>๐ญ์ ํจ๊ป ์ ์ by <a href="https://github.com/ulgerang">ULJI SOFT</a></sub>
|
|
331
|
+
</p>
|
package/README.md
ADDED
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
# ๐ญ Maskweaver: Expert Persona Framework for OpenCode
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<img src="docs/images/hero.png" width="800" alt="Maskweaver Hero Image">
|
|
6
|
+
|
|
7
|
+
> **The npm for AI personas** โ Level up your OpenCode assistant with expert personalities
|
|
8
|
+
|
|
9
|
+
[](https://github.com/ulgerang/maskweaver/releases)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[](https://www.npmjs.com/package/maskweaver)
|
|
12
|
+
|
|
13
|
+
[English](README.md) | [ํ๊ตญ์ด](README.ko.md)
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## ๐ OpenCode Plugin
|
|
20
|
+
|
|
21
|
+
**Maskweaver is a handy plugin for [OpenCode](https://github.com/sst/opencode).**
|
|
22
|
+
|
|
23
|
+
While it can be used as a standalone library, it works great with OpenCode to add expert personas to your coding workflow:
|
|
24
|
+
- **Expert Personas (Masks)**: Standardized YAML profiles for legendary developers.
|
|
25
|
+
- **Smart Delegation**: Multi-agent workflows optimized for OpenCode.
|
|
26
|
+
- **Project Memory**: Hybrid semantic search for your entire codebase.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Why Maskweaver?
|
|
31
|
+
|
|
32
|
+
You're stuck debugging a race condition. Wouldn't it be great if **Linus Torvalds** could review your code?
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
// Instead of generic AI response...
|
|
36
|
+
"You have a potential race condition in your code."
|
|
37
|
+
|
|
38
|
+
// Get Linus-level insight:
|
|
39
|
+
"This is stupid. You're not even using memory barriers. Read the
|
|
40
|
+
assembly - the compiler reordered your loads. Use smp_rmb() or
|
|
41
|
+
better yet, redesign this without the stupid lock."
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Maskweaver makes this real.** It gives AI assistants expert personas (masks) with deep domain knowledge and distinct thinking styles.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
|
|
50
|
+
### For Humans
|
|
51
|
+
|
|
52
|
+
Copy and paste this prompt to your LLM agent (Claude Code, AmpCode, Cursor, etc.):
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Install and configure maskweaver by following the instructions here:
|
|
56
|
+
https://raw.githubusercontent.com/ulgerang/maskweaver/master/docs/installation.md
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Or read the [Installation Guide](docs/installation.md) directlyโbut **we strongly recommend letting an agent handle it. Humans make mistakes.**
|
|
60
|
+
|
|
61
|
+
### For LLM Agents
|
|
62
|
+
|
|
63
|
+
Fetch the installation guide and follow it:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
curl -s https://raw.githubusercontent.com/ulgerang/maskweaver/master/docs/installation.md
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Quick Install
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# npm
|
|
73
|
+
npm install maskweaver
|
|
74
|
+
|
|
75
|
+
# bun
|
|
76
|
+
bun add maskweaver
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### OpenCode Plugin Setup
|
|
80
|
+
|
|
81
|
+
Add to your OpenCode config - that's it!
|
|
82
|
+
|
|
83
|
+
**Global** (`~/.config/opencode/opencode.json`):
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"plugin": ["maskweaver"]
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Or per-project** (`opencode.json` in project root):
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"plugin": ["maskweaver"]
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
OpenCode automatically installs the plugin to `~/.cache/opencode/node_modules/` on startup.
|
|
98
|
+
|
|
99
|
+
**Windows:** `%USERPROFILE%\.config\opencode\opencode.json`
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Quick Start
|
|
104
|
+
|
|
105
|
+
### First Use
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# In your AI assistant chat:
|
|
109
|
+
@maskweaver Use Linus Torvalds mask to review this C code
|
|
110
|
+
|
|
111
|
+
# Or delegate to dummy-humans:
|
|
112
|
+
@dummy-human Linus mask: review my multithreading code
|
|
113
|
+
@dummy-flash Find all files with "unsafe" in them
|
|
114
|
+
@dummy-premium Design microservices architecture for this monolith
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Features
|
|
120
|
+
|
|
121
|
+
### ๐ญ Expert Personas (Masks)
|
|
122
|
+
|
|
123
|
+
Apply legendary developer personalities to your AI assistant:
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
# masks/software-engineering/linus-torvalds.yaml
|
|
127
|
+
profile:
|
|
128
|
+
name: Linus Torvalds
|
|
129
|
+
expertise:
|
|
130
|
+
- Kernel-level systems programming
|
|
131
|
+
- Performance optimization
|
|
132
|
+
- Memory management and concurrency
|
|
133
|
+
|
|
134
|
+
thinkingStyle: |
|
|
135
|
+
Bottom-up, pragmatic. Starts with code, not theory.
|
|
136
|
+
Ruthlessly eliminates complexity.
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Current Masks:**
|
|
140
|
+
- ๐ง **Linus Torvalds** - Systems, C, Linux, performance
|
|
141
|
+
- ๐๏ธ **Martin Fowler** - Architecture, refactoring, patterns
|
|
142
|
+
- ๐งช **Kent Beck** - TDD, XP, testing
|
|
143
|
+
- ๐ง **Andrew Ng** - ML/AI systems
|
|
144
|
+
- โ๏ธ **Dan Abramov** - React, frontend architecture
|
|
145
|
+
|
|
146
|
+
### ๐ค Dummy-Human System
|
|
147
|
+
|
|
148
|
+
Smart subagents for cost-efficient multi-agent workflows:
|
|
149
|
+
|
|
150
|
+
| Agent | Model Tier | Cost | Best For |
|
|
151
|
+
|-------|-----------|------|----------|
|
|
152
|
+
| `@dummy-flash` | Fast | ๐ฐ | File search, summaries, simple tasks |
|
|
153
|
+
| `@dummy-human` | Balanced | ๐ฐ๐ฐ | Code writing, reviews, general work |
|
|
154
|
+
| `@dummy-premium` | Powerful | ๐ฐ๐ฐ๐ฐ | Architecture, complex debugging |
|
|
155
|
+
|
|
156
|
+
### ๐ง Memory System
|
|
157
|
+
|
|
158
|
+
Remember past conversations, decisions, and mask effectiveness:
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
import { memory } from 'maskweaver';
|
|
162
|
+
|
|
163
|
+
// Index your project knowledge
|
|
164
|
+
await memory.indexFile('./docs/architecture.md', embedFn);
|
|
165
|
+
|
|
166
|
+
// Semantic search with multiple providers:
|
|
167
|
+
const results = await memory.hybridSearch(
|
|
168
|
+
'How does authentication work?',
|
|
169
|
+
embedding,
|
|
170
|
+
{ limit: 5, minScore: 0.7 }
|
|
171
|
+
);
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Embedding Providers:**
|
|
175
|
+
- ๐ฆ **Ollama** - Local, private (bge-m3, nomic-embed)
|
|
176
|
+
- ๐ค **OpenAI** - text-embedding-3-large
|
|
177
|
+
- ๐ **VoyageAI** - Code-specialized embeddings!
|
|
178
|
+
- ๐ **OpenRouter** - Access to multiple providers
|
|
179
|
+
- ๐ **Text-only** - No embeddings, pure FTS5
|
|
180
|
+
|
|
181
|
+
### ๐๏ธ Context System
|
|
182
|
+
|
|
183
|
+
Track long-running features with file associations:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# Start a feature
|
|
187
|
+
@context start name="oauth-login" goal="Implement OAuth2 flow"
|
|
188
|
+
|
|
189
|
+
# Add files to feature context
|
|
190
|
+
@context add file="src/auth/oauth.ts"
|
|
191
|
+
|
|
192
|
+
# Check status
|
|
193
|
+
@context status
|
|
194
|
+
|
|
195
|
+
# Mark as done
|
|
196
|
+
@context done
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### ๐ Retrospect System
|
|
200
|
+
|
|
201
|
+
Evaluate mask effectiveness after each session:
|
|
202
|
+
|
|
203
|
+
```typescript
|
|
204
|
+
{
|
|
205
|
+
"trigger": "session_end",
|
|
206
|
+
"masksUsed": [
|
|
207
|
+
{
|
|
208
|
+
"name": "linus-torvalds",
|
|
209
|
+
"task": "Review multithreading code",
|
|
210
|
+
"effectiveness": 9.5
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"wellDone": ["Found 3 critical race conditions"],
|
|
214
|
+
"lessons": ["Linus mask excels at concurrency reviews"]
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## ๐ฆ Package Structure
|
|
221
|
+
|
|
222
|
+
Maskweaver is a single npm package with modular exports:
|
|
223
|
+
|
|
224
|
+
```typescript
|
|
225
|
+
// Default export - OpenCode plugin
|
|
226
|
+
import maskweaver from 'maskweaver';
|
|
227
|
+
|
|
228
|
+
// Named exports - module namespaces
|
|
229
|
+
import { core, memory, context, retrospect, verify } from 'maskweaver';
|
|
230
|
+
|
|
231
|
+
// Subpath imports - direct module access
|
|
232
|
+
import { hybridSearch } from 'maskweaver/memory';
|
|
233
|
+
import { createFeature } from 'maskweaver/context';
|
|
234
|
+
import { MaskLoader } from 'maskweaver/core';
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Modules:**
|
|
238
|
+
- `maskweaver/core` - Mask loading, validation (YAML/JSON)
|
|
239
|
+
- `maskweaver/memory` - Embeddings + vector search (5 providers)
|
|
240
|
+
- `maskweaver/context` - Feature-based work tracking
|
|
241
|
+
- `maskweaver/verify` - Cross-mask code review
|
|
242
|
+
- `maskweaver/retrospect` - Session effectiveness analysis
|
|
243
|
+
- `maskweaver/plugin` - OpenCode plugin entry point
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## ๐ญ Creating Masks
|
|
248
|
+
|
|
249
|
+
Masks are simple YAML files:
|
|
250
|
+
|
|
251
|
+
```yaml
|
|
252
|
+
# masks/my-expert.yaml
|
|
253
|
+
metadata:
|
|
254
|
+
id: my-expert
|
|
255
|
+
version: '1.0'
|
|
256
|
+
language: en
|
|
257
|
+
|
|
258
|
+
profile:
|
|
259
|
+
name: Ada Lovelace
|
|
260
|
+
tagline: Pioneer of Computing - First Programmer
|
|
261
|
+
|
|
262
|
+
expertise:
|
|
263
|
+
- Algorithm design
|
|
264
|
+
- Mathematical thinking
|
|
265
|
+
- Analytical engines
|
|
266
|
+
|
|
267
|
+
thinkingStyle: |
|
|
268
|
+
Combines mathematical rigor with poetic imagination.
|
|
269
|
+
Sees patterns others miss.
|
|
270
|
+
|
|
271
|
+
behavior:
|
|
272
|
+
systemPrompt: |
|
|
273
|
+
You are Ada Lovelace, the first computer programmer.
|
|
274
|
+
|
|
275
|
+
You see algorithms as poetry - elegant, precise, beautiful.
|
|
276
|
+
You think in terms of mathematical transformations and
|
|
277
|
+
logical flows.
|
|
278
|
+
|
|
279
|
+
communicationStyle:
|
|
280
|
+
tone: thoughtful
|
|
281
|
+
verbosity: moderate
|
|
282
|
+
technicalDepth: expert
|
|
283
|
+
|
|
284
|
+
usage:
|
|
285
|
+
suitableFor:
|
|
286
|
+
- Algorithm design and optimization
|
|
287
|
+
- Mathematical problem-solving
|
|
288
|
+
- Pattern recognition in code
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## ๐ Multilingual
|
|
294
|
+
|
|
295
|
+
Infrastructure ready for:
|
|
296
|
+
- ๐บ๐ธ English
|
|
297
|
+
- ๐ฐ๐ท Korean
|
|
298
|
+
- ๐จ๐ณ Chinese *(coming soon)*
|
|
299
|
+
- ๐ฏ๐ต Japanese *(coming soon)*
|
|
300
|
+
|
|
301
|
+
Masks can have multiple language versions:
|
|
302
|
+
```
|
|
303
|
+
masks/
|
|
304
|
+
โโโ linus-torvalds.en.yaml
|
|
305
|
+
โโโ linus-torvalds.ko.yaml
|
|
306
|
+
โโโ linus-torvalds.zh.yaml
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## ๐ค Contributing
|
|
312
|
+
|
|
313
|
+
We need your help!
|
|
314
|
+
|
|
315
|
+
### Add a Mask
|
|
316
|
+
|
|
317
|
+
Create a YAML file in `masks/` and submit a PR:
|
|
318
|
+
- โ
Real expertise (domain knowledge)
|
|
319
|
+
- โ
Distinct personality (thinking style)
|
|
320
|
+
- โ
Clear use cases (when to use)
|
|
321
|
+
- โ
Examples (expected behavior)
|
|
322
|
+
|
|
323
|
+
### Report Bugs
|
|
324
|
+
|
|
325
|
+
Open an issue with:
|
|
326
|
+
1. What you tried
|
|
327
|
+
2. What happened
|
|
328
|
+
3. What you expected
|
|
329
|
+
|
|
330
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## ๐ License
|
|
335
|
+
|
|
336
|
+
MIT - See [LICENSE](LICENSE)
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## ๐ Acknowledgments
|
|
341
|
+
|
|
342
|
+
Inspired by:
|
|
343
|
+
- **Rob Pike** - Simplicity in design
|
|
344
|
+
- **TJ Holowaychuk** - Beautiful CLIs and tools
|
|
345
|
+
- **Sindre Sorhus** - npm ecosystem excellence
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
<p align="center">
|
|
350
|
+
<sub>Crafted with ๐ญ by <a href="https://github.com/ulgerang">ULJI SOFT</a></sub>
|
|
351
|
+
</p>
|