@vuau/agent-memory 0.3.1 → 0.4.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.
- package/README.md +24 -36
- package/README.vi.md +24 -36
- package/dist/bin/cli.js +22 -169
- package/dist/index.js +9 -107
- package/package.json +2 -2
- package/templates/copilot-instructions.md +0 -31
- package/templates/cursorrules.md +0 -44
- package/templates/windsurfrules.md +0 -44
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @vuau/agent-memory
|
|
2
2
|
|
|
3
|
-
Structured AI memory for codebases. Works with
|
|
3
|
+
Structured AI memory for codebases. Works with GitHub Copilot, Cursor, Windsurf, VS Code, OpenCode, and [25+ other AI coding tools](#supported-tools).
|
|
4
4
|
|
|
5
5
|
**[Tiếng Việt →](./README.vi.md)**
|
|
6
6
|
|
|
@@ -16,39 +16,31 @@ AI coding assistants lose context between sessions. They can't remember:
|
|
|
16
16
|
## Quick Start
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
# Interactive mode — choose your IDEs
|
|
20
19
|
npx @vuau/agent-memory init
|
|
21
|
-
|
|
22
|
-
# Or specify directly
|
|
23
|
-
npx @vuau/agent-memory init --opencode # OpenCode only
|
|
24
|
-
npx @vuau/agent-memory init --copilot --cursor # Multiple IDEs
|
|
25
|
-
npx @vuau/agent-memory init --all # All IDEs
|
|
26
20
|
```
|
|
27
21
|
|
|
22
|
+
That's it. Creates `AGENTS.md` + `.agents/` structure.
|
|
23
|
+
|
|
28
24
|
## What It Creates
|
|
29
25
|
|
|
30
26
|
```
|
|
31
27
|
/ (Project Root)
|
|
32
|
-
├── AGENTS.md
|
|
33
|
-
├── .cursorrules # Cursor rules
|
|
34
|
-
├── .windsurfrules # Windsurf rules
|
|
35
|
-
├── .github/
|
|
36
|
-
│ └── copilot-instructions.md # GitHub Copilot rules
|
|
28
|
+
├── AGENTS.md # Universal agent instructions
|
|
37
29
|
└── .agents/
|
|
38
|
-
├── MEMORY.md
|
|
39
|
-
├── TASKS.md
|
|
40
|
-
└── spec/
|
|
30
|
+
├── MEMORY.md # Long-term memory (decisions, patterns)
|
|
31
|
+
├── TASKS.md # Working memory (current tasks)
|
|
32
|
+
└── spec/ # Detailed specs (on-demand)
|
|
41
33
|
```
|
|
42
34
|
|
|
43
35
|
## How It Works
|
|
44
36
|
|
|
45
|
-
1. **You run `init`** → Creates
|
|
46
|
-
2. **Agent reads
|
|
37
|
+
1. **You run `init`** → Creates `AGENTS.md` + `.agents/` structure
|
|
38
|
+
2. **Agent reads AGENTS.md** → Finds documentation map pointing to `.agents/`
|
|
47
39
|
3. **Agent works** → Reads MEMORY.md before implementing, updates TASKS.md
|
|
48
40
|
4. **You approve decision** → Agent writes 1-line entry to MEMORY.md
|
|
49
41
|
5. **Next session** → Agent reads memory, continues where you left off
|
|
50
42
|
|
|
51
|
-
**No plugin required.** The
|
|
43
|
+
**No plugin required.** The instructions in AGENTS.md tell the agent what to do.
|
|
52
44
|
|
|
53
45
|
## CLI Options
|
|
54
46
|
|
|
@@ -56,13 +48,8 @@ npx @vuau/agent-memory init --all # All IDEs
|
|
|
56
48
|
npx @vuau/agent-memory init [options]
|
|
57
49
|
|
|
58
50
|
Options:
|
|
59
|
-
--
|
|
60
|
-
--
|
|
61
|
-
--cursor Create .cursorrules
|
|
62
|
-
--windsurf Create .windsurfrules
|
|
63
|
-
--all Create config for all IDEs
|
|
64
|
-
--force Overwrite existing files without asking
|
|
65
|
-
--name <n> Project name (default: from package.json)
|
|
51
|
+
--force Overwrite existing files without asking
|
|
52
|
+
--name <n> Project name (default: from package.json)
|
|
66
53
|
|
|
67
54
|
npx @vuau/agent-memory doctor # Validate structure
|
|
68
55
|
npx @vuau/agent-memory help # Show help
|
|
@@ -70,7 +57,7 @@ npx @vuau/agent-memory help # Show help
|
|
|
70
57
|
|
|
71
58
|
## Memory Protocol
|
|
72
59
|
|
|
73
|
-
Agents follow this protocol (defined in
|
|
60
|
+
Agents follow this protocol (defined in AGENTS.md):
|
|
74
61
|
|
|
75
62
|
```markdown
|
|
76
63
|
## When to write
|
|
@@ -95,11 +82,11 @@ Agents follow this protocol (defined in config files):
|
|
|
95
82
|
|
|
96
83
|
## Architecture
|
|
97
84
|
|
|
98
|
-
###
|
|
85
|
+
### 3-Layer Design
|
|
99
86
|
|
|
100
87
|
| Layer | File | Purpose |
|
|
101
88
|
|-------|------|---------|
|
|
102
|
-
|
|
|
89
|
+
| Instructions | AGENTS.md | Rules + pointers (~100 lines) |
|
|
103
90
|
| Memory | .agents/MEMORY.md | Curated decisions (1-line each) |
|
|
104
91
|
| Tasks | .agents/TASKS.md | Current work, next steps |
|
|
105
92
|
| Specs | .agents/spec/*.md | Detailed docs (on-demand) |
|
|
@@ -117,16 +104,17 @@ File-based solution:
|
|
|
117
104
|
- Plain markdown (portable, git-versionable, human-readable)
|
|
118
105
|
- No dependencies (works everywhere)
|
|
119
106
|
|
|
120
|
-
##
|
|
107
|
+
## Supported Tools
|
|
108
|
+
|
|
109
|
+
AGENTS.md is the universal format, supported by **25+ AI coding tools**:
|
|
121
110
|
|
|
122
|
-
|
|
|
123
|
-
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
| Windsurf | .windsurfrules | ✅ |
|
|
111
|
+
| Category | Tools |
|
|
112
|
+
|----------|-------|
|
|
113
|
+
| **IDEs** | Cursor, Windsurf, VS Code, Zed, RooCode, Kilo Code |
|
|
114
|
+
| **CLI Tools** | OpenCode, Aider, goose, Gemini CLI, Warp, Augment Code |
|
|
115
|
+
| **AI Agents** | GitHub Copilot, Codex (OpenAI), Jules (Google), Junie (JetBrains), Devin, Factory, Amp, Phoenix, Semgrep, Ona, UiPath Autopilot |
|
|
128
116
|
|
|
129
|
-
|
|
117
|
+
See [agents.md](https://agents.md) for the full list.
|
|
130
118
|
|
|
131
119
|
## Documentation
|
|
132
120
|
|
package/README.vi.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @vuau/agent-memory
|
|
2
2
|
|
|
3
|
-
Bộ nhớ AI có cấu trúc cho các codebase. Hoạt động với
|
|
3
|
+
Bộ nhớ AI có cấu trúc cho các codebase. Hoạt động với GitHub Copilot, Cursor, Windsurf, VS Code, OpenCode, và [25+ AI coding tools khác](#supported-tools).
|
|
4
4
|
|
|
5
5
|
## Bài toán
|
|
6
6
|
|
|
@@ -14,39 +14,31 @@ AI coding assistants mất bối cảnh giữa các phiên. Họ không thể nh
|
|
|
14
14
|
## Bắt đầu nhanh
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
# Interactive mode — chọn IDEs của bạn
|
|
18
17
|
npx @vuau/agent-memory init
|
|
19
|
-
|
|
20
|
-
# Hoặc chỉ định trực tiếp
|
|
21
|
-
npx @vuau/agent-memory init --opencode # Chỉ OpenCode
|
|
22
|
-
npx @vuau/agent-memory init --copilot --cursor # Nhiều IDEs
|
|
23
|
-
npx @vuau/agent-memory init --all # Tất cả IDEs
|
|
24
18
|
```
|
|
25
19
|
|
|
20
|
+
Đơn giản vậy thôi. Tạo `AGENTS.md` + `.agents/` structure.
|
|
21
|
+
|
|
26
22
|
## Cấu trúc tạo ra
|
|
27
23
|
|
|
28
24
|
```
|
|
29
25
|
/ (Project Root)
|
|
30
|
-
├── AGENTS.md
|
|
31
|
-
├── .cursorrules # Cursor rules
|
|
32
|
-
├── .windsurfrules # Windsurf rules
|
|
33
|
-
├── .github/
|
|
34
|
-
│ └── copilot-instructions.md # GitHub Copilot rules
|
|
26
|
+
├── AGENTS.md # Universal agent instructions
|
|
35
27
|
└── .agents/
|
|
36
|
-
├── MEMORY.md
|
|
37
|
-
├── TASKS.md
|
|
38
|
-
└── spec/
|
|
28
|
+
├── MEMORY.md # Long-term memory (decisions, patterns)
|
|
29
|
+
├── TASKS.md # Working memory (current tasks)
|
|
30
|
+
└── spec/ # Detailed specs (on-demand)
|
|
39
31
|
```
|
|
40
32
|
|
|
41
33
|
## Cách hoạt động
|
|
42
34
|
|
|
43
|
-
1. **Bạn chạy `init`** → Tạo
|
|
44
|
-
2. **Agent đọc
|
|
35
|
+
1. **Bạn chạy `init`** → Tạo `AGENTS.md` + `.agents/` structure
|
|
36
|
+
2. **Agent đọc AGENTS.md** → Tìm documentation map trỏ đến `.agents/`
|
|
45
37
|
3. **Agent làm việc** → Đọc MEMORY.md trước khi implement, update TASKS.md
|
|
46
38
|
4. **Bạn approve decision** → Agent ghi 1-line entry vào MEMORY.md
|
|
47
39
|
5. **Phiên tiếp theo** → Agent đọc memory, tiếp tục từ nơi dừng lại
|
|
48
40
|
|
|
49
|
-
**Không cần plugin.**
|
|
41
|
+
**Không cần plugin.** Instructions trong AGENTS.md hướng dẫn agent phải làm gì.
|
|
50
42
|
|
|
51
43
|
## CLI Options
|
|
52
44
|
|
|
@@ -54,13 +46,8 @@ npx @vuau/agent-memory init --all # Tất cả IDEs
|
|
|
54
46
|
npx @vuau/agent-memory init [options]
|
|
55
47
|
|
|
56
48
|
Options:
|
|
57
|
-
--
|
|
58
|
-
--
|
|
59
|
-
--cursor Tạo .cursorrules
|
|
60
|
-
--windsurf Tạo .windsurfrules
|
|
61
|
-
--all Tạo config cho tất cả IDEs
|
|
62
|
-
--force Ghi đè files có sẵn mà không hỏi
|
|
63
|
-
--name <n> Tên project (mặc định: từ package.json)
|
|
49
|
+
--force Ghi đè files có sẵn mà không hỏi
|
|
50
|
+
--name <n> Tên project (mặc định: từ package.json)
|
|
64
51
|
|
|
65
52
|
npx @vuau/agent-memory doctor # Validate structure
|
|
66
53
|
npx @vuau/agent-memory help # Hiện help
|
|
@@ -68,7 +55,7 @@ npx @vuau/agent-memory help # Hiện help
|
|
|
68
55
|
|
|
69
56
|
## Memory Protocol
|
|
70
57
|
|
|
71
|
-
Agents follow protocol này (defined trong
|
|
58
|
+
Agents follow protocol này (defined trong AGENTS.md):
|
|
72
59
|
|
|
73
60
|
```markdown
|
|
74
61
|
## Khi nào ghi
|
|
@@ -93,11 +80,11 @@ Agents follow protocol này (defined trong config files):
|
|
|
93
80
|
|
|
94
81
|
## Kiến trúc
|
|
95
82
|
|
|
96
|
-
### Thiết kế
|
|
83
|
+
### Thiết kế 3-Layer
|
|
97
84
|
|
|
98
85
|
| Layer | File | Mục đích |
|
|
99
86
|
|-------|------|----------|
|
|
100
|
-
|
|
|
87
|
+
| Instructions | AGENTS.md | Rules + pointers (~100 dòng) |
|
|
101
88
|
| Memory | .agents/MEMORY.md | Curated decisions (1-line each) |
|
|
102
89
|
| Tasks | .agents/TASKS.md | Current work, next steps |
|
|
103
90
|
| Specs | .agents/spec/*.md | Detailed docs (on-demand) |
|
|
@@ -115,16 +102,17 @@ File-based solution:
|
|
|
115
102
|
- Plain markdown (portable, git-versionable, human-readable)
|
|
116
103
|
- Không dependencies (works everywhere)
|
|
117
104
|
|
|
118
|
-
##
|
|
105
|
+
## Supported Tools
|
|
106
|
+
|
|
107
|
+
AGENTS.md là format universal, được hỗ trợ bởi **25+ AI coding tools**:
|
|
119
108
|
|
|
120
|
-
|
|
|
121
|
-
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
| Windsurf | .windsurfrules | ✅ |
|
|
109
|
+
| Category | Tools |
|
|
110
|
+
|----------|-------|
|
|
111
|
+
| **IDEs** | Cursor, Windsurf, VS Code, Zed, RooCode, Kilo Code |
|
|
112
|
+
| **CLI Tools** | OpenCode, Aider, goose, Gemini CLI, Warp, Augment Code |
|
|
113
|
+
| **AI Agents** | GitHub Copilot, Codex (OpenAI), Jules (Google), Junie (JetBrains), Devin, Factory, Amp, Phoenix, Semgrep, Ona, UiPath Autopilot |
|
|
126
114
|
|
|
127
|
-
|
|
115
|
+
Xem [agents.md](https://agents.md) để có danh sách đầy đủ.
|
|
128
116
|
|
|
129
117
|
## Tài liệu
|
|
130
118
|
|
package/dist/bin/cli.js
CHANGED
|
@@ -17,9 +17,6 @@ var MEMORY_FILE = ".agents/MEMORY.md";
|
|
|
17
17
|
var MEMORY_DETAIL_FILE = ".agents/MEMORY-DETAIL.md";
|
|
18
18
|
var TASKS_FILE = ".agents/TASKS.md";
|
|
19
19
|
var AGENTS_MD = "AGENTS.md";
|
|
20
|
-
var COPILOT_INSTRUCTIONS = ".github/copilot-instructions.md";
|
|
21
|
-
var CURSOR_RULES = ".cursorrules";
|
|
22
|
-
var WINDSURF_RULES = ".windsurfrules";
|
|
23
20
|
|
|
24
21
|
// src/core/scaffold.ts
|
|
25
22
|
function getTemplatesDir() {
|
|
@@ -50,23 +47,22 @@ function scaffold(projectDir, options = {}) {
|
|
|
50
47
|
const projectName = options.projectName || guessProjectName(projectDir);
|
|
51
48
|
const vars = { PROJECT_NAME: projectName };
|
|
52
49
|
const force = options.force || false;
|
|
53
|
-
const hasAnyIde = options.opencode || options.copilot || options.cursor || options.windsurf;
|
|
54
|
-
const useOpencode = hasAnyIde ? options.opencode : true;
|
|
55
|
-
const useCopilot = options.copilot || false;
|
|
56
|
-
const useCursor = options.cursor || false;
|
|
57
|
-
const useWindsurf = options.windsurf || false;
|
|
58
50
|
const dirs = [
|
|
59
51
|
join(projectDir, AGENTS_DIR),
|
|
60
52
|
join(projectDir, SPEC_DIR)
|
|
61
53
|
];
|
|
62
|
-
if (useCopilot) {
|
|
63
|
-
dirs.push(join(projectDir, ".github"));
|
|
64
|
-
}
|
|
65
54
|
for (const dir of dirs) {
|
|
66
55
|
if (!existsSync(dir)) {
|
|
67
56
|
mkdirSync(dir, { recursive: true });
|
|
68
57
|
}
|
|
69
58
|
}
|
|
59
|
+
writeFileIfNeeded(
|
|
60
|
+
join(projectDir, AGENTS_MD),
|
|
61
|
+
applyVars(readTemplate("AGENTS.md"), vars),
|
|
62
|
+
AGENTS_MD,
|
|
63
|
+
result,
|
|
64
|
+
force
|
|
65
|
+
);
|
|
70
66
|
const coreFiles = [
|
|
71
67
|
{ target: MEMORY_FILE, template: "MEMORY.md" },
|
|
72
68
|
{ target: MEMORY_DETAIL_FILE, template: "MEMORY-DETAIL.md" },
|
|
@@ -87,42 +83,6 @@ function scaffold(projectDir, options = {}) {
|
|
|
87
83
|
writeFileSync(specKeep, "");
|
|
88
84
|
result.created.push(`${SPEC_DIR}/.gitkeep`);
|
|
89
85
|
}
|
|
90
|
-
if (useOpencode) {
|
|
91
|
-
writeFileIfNeeded(
|
|
92
|
-
join(projectDir, AGENTS_MD),
|
|
93
|
-
applyVars(readTemplate("AGENTS.md"), vars),
|
|
94
|
-
AGENTS_MD,
|
|
95
|
-
result,
|
|
96
|
-
force
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
if (useCopilot) {
|
|
100
|
-
writeFileIfNeeded(
|
|
101
|
-
join(projectDir, COPILOT_INSTRUCTIONS),
|
|
102
|
-
applyVars(readTemplate("copilot-instructions.md"), vars),
|
|
103
|
-
COPILOT_INSTRUCTIONS,
|
|
104
|
-
result,
|
|
105
|
-
force
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
if (useCursor) {
|
|
109
|
-
writeFileIfNeeded(
|
|
110
|
-
join(projectDir, CURSOR_RULES),
|
|
111
|
-
applyVars(readTemplate("cursorrules.md"), vars),
|
|
112
|
-
CURSOR_RULES,
|
|
113
|
-
result,
|
|
114
|
-
force
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
if (useWindsurf) {
|
|
118
|
-
writeFileIfNeeded(
|
|
119
|
-
join(projectDir, WINDSURF_RULES),
|
|
120
|
-
applyVars(readTemplate("windsurfrules.md"), vars),
|
|
121
|
-
WINDSURF_RULES,
|
|
122
|
-
result,
|
|
123
|
-
force
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
86
|
return result;
|
|
127
87
|
}
|
|
128
88
|
function writeFileIfNeeded(targetPath, content, displayName, result, force) {
|
|
@@ -151,7 +111,7 @@ import { join as join2 } from "path";
|
|
|
151
111
|
function doctor(projectDir) {
|
|
152
112
|
const issues = [];
|
|
153
113
|
const required = [
|
|
154
|
-
{ file: AGENTS_MD, desc: "Root
|
|
114
|
+
{ file: AGENTS_MD, desc: "Root agent instructions" },
|
|
155
115
|
{ file: MEMORY_FILE, desc: "Long-term memory" },
|
|
156
116
|
{ file: TASKS_FILE, desc: "Working memory" }
|
|
157
117
|
];
|
|
@@ -166,14 +126,6 @@ function doctor(projectDir) {
|
|
|
166
126
|
issues.push({ level: "error", file: dir, message: "Directory missing" });
|
|
167
127
|
}
|
|
168
128
|
}
|
|
169
|
-
const copilotPath = join2(projectDir, COPILOT_INSTRUCTIONS);
|
|
170
|
-
if (!existsSync2(copilotPath)) {
|
|
171
|
-
issues.push({
|
|
172
|
-
level: "warning",
|
|
173
|
-
file: COPILOT_INSTRUCTIONS,
|
|
174
|
-
message: "Copilot instructions missing \u2014 VSCode/GitHub Copilot won't have context"
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
129
|
const agentsPath = join2(projectDir, AGENTS_MD);
|
|
178
130
|
if (existsSync2(agentsPath)) {
|
|
179
131
|
const content = readFileSync2(agentsPath, "utf-8");
|
|
@@ -188,7 +140,7 @@ function doctor(projectDir) {
|
|
|
188
140
|
issues.push({
|
|
189
141
|
level: "warning",
|
|
190
142
|
file: AGENTS_MD,
|
|
191
|
-
message: "Over 150 lines \u2014 consider keeping it concise
|
|
143
|
+
message: "Over 150 lines \u2014 consider keeping it concise"
|
|
192
144
|
});
|
|
193
145
|
}
|
|
194
146
|
}
|
|
@@ -203,53 +155,6 @@ function doctor(projectDir) {
|
|
|
203
155
|
});
|
|
204
156
|
}
|
|
205
157
|
}
|
|
206
|
-
const opencodePkgPath = join2(projectDir, ".opencode", "package.json");
|
|
207
|
-
const opencodeJsonPath = join2(projectDir, "opencode.json");
|
|
208
|
-
const opencodeExists = existsSync2(join2(projectDir, ".opencode"));
|
|
209
|
-
if (opencodeExists) {
|
|
210
|
-
if (!existsSync2(opencodePkgPath)) {
|
|
211
|
-
issues.push({
|
|
212
|
-
level: "warning",
|
|
213
|
-
file: ".opencode/package.json",
|
|
214
|
-
message: "Missing \u2014 run 'agent-memory init --opencode' to wire up the plugin"
|
|
215
|
-
});
|
|
216
|
-
} else {
|
|
217
|
-
try {
|
|
218
|
-
const pkg = JSON.parse(readFileSync2(opencodePkgPath, "utf-8"));
|
|
219
|
-
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
220
|
-
if (!deps["@vuau/agent-memory"]) {
|
|
221
|
-
issues.push({
|
|
222
|
-
level: "warning",
|
|
223
|
-
file: ".opencode/package.json",
|
|
224
|
-
message: "@vuau/agent-memory not in dependencies \u2014 run 'agent-memory init --opencode'"
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
} catch {
|
|
228
|
-
issues.push({ level: "warning", file: ".opencode/package.json", message: "Invalid JSON" });
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
if (!existsSync2(opencodeJsonPath)) {
|
|
232
|
-
issues.push({
|
|
233
|
-
level: "warning",
|
|
234
|
-
file: "opencode.json",
|
|
235
|
-
message: "Missing \u2014 run 'agent-memory init --opencode' to wire up the plugin"
|
|
236
|
-
});
|
|
237
|
-
} else {
|
|
238
|
-
try {
|
|
239
|
-
const config = JSON.parse(readFileSync2(opencodeJsonPath, "utf-8"));
|
|
240
|
-
const plugins = config.plugin || [];
|
|
241
|
-
if (!plugins.includes("@vuau/agent-memory")) {
|
|
242
|
-
issues.push({
|
|
243
|
-
level: "warning",
|
|
244
|
-
file: "opencode.json",
|
|
245
|
-
message: "@vuau/agent-memory not in plugin array \u2014 run 'agent-memory init --opencode'"
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
} catch {
|
|
249
|
-
issues.push({ level: "warning", file: "opencode.json", message: "Invalid JSON" });
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
158
|
return { ok: issues.filter((i) => i.level === "error").length === 0, issues };
|
|
254
159
|
}
|
|
255
160
|
|
|
@@ -272,96 +177,44 @@ function askYesNo(question, defaultYes = true) {
|
|
|
272
177
|
return answer.toLowerCase().startsWith("y");
|
|
273
178
|
});
|
|
274
179
|
}
|
|
275
|
-
async function askMultiSelect(question, options) {
|
|
276
|
-
console.log(`
|
|
277
|
-
${question}`);
|
|
278
|
-
for (const opt of options) {
|
|
279
|
-
console.log(` [${opt.key}] ${opt.label}`);
|
|
280
|
-
}
|
|
281
|
-
const answer = await ask("Enter choices (e.g., 1,2 or 1 2): ");
|
|
282
|
-
const selected = answer.split(/[,\s]+/).filter(Boolean);
|
|
283
|
-
return selected;
|
|
284
|
-
}
|
|
285
180
|
function printUsage() {
|
|
286
181
|
console.log(`
|
|
287
182
|
@vuau/agent-memory \u2014 Structured AI memory for codebases
|
|
288
183
|
|
|
289
184
|
Usage:
|
|
290
|
-
agent-memory init [options] Scaffold .agents/ structure
|
|
185
|
+
agent-memory init [options] Scaffold AGENTS.md + .agents/ structure
|
|
291
186
|
agent-memory doctor Validate .agents/ structure
|
|
292
187
|
agent-memory help Show this help
|
|
293
188
|
|
|
294
189
|
Options (init):
|
|
295
|
-
--opencode Create AGENTS.md for OpenCode
|
|
296
|
-
--copilot Create .github/copilot-instructions.md for GitHub Copilot
|
|
297
|
-
--cursor Create .cursorrules for Cursor
|
|
298
|
-
--windsurf Create .windsurfrules for Windsurf
|
|
299
|
-
--all Create config for all IDEs
|
|
300
190
|
--force Overwrite existing files without asking
|
|
301
191
|
--name <name> Project name (default: from package.json)
|
|
302
192
|
|
|
303
193
|
Examples:
|
|
304
|
-
npx @vuau/agent-memory init
|
|
305
|
-
npx @vuau/agent-memory init --
|
|
306
|
-
npx @vuau/agent-memory
|
|
307
|
-
|
|
194
|
+
npx @vuau/agent-memory init # Create AGENTS.md + .agents/
|
|
195
|
+
npx @vuau/agent-memory init --force # Overwrite existing files
|
|
196
|
+
npx @vuau/agent-memory doctor # Check structure
|
|
197
|
+
|
|
198
|
+
AGENTS.md is the universal format supported by 25+ AI coding tools:
|
|
199
|
+
GitHub Copilot, Cursor, Windsurf, VS Code, OpenCode, Codex, Jules,
|
|
200
|
+
Junie, Gemini CLI, Devin, Aider, goose, Factory, Amp, RooCode,
|
|
201
|
+
Zed, Warp, Kilo Code, Phoenix, Semgrep, Ona, UiPath, Augment Code...
|
|
308
202
|
`);
|
|
309
203
|
}
|
|
310
204
|
async function runInit() {
|
|
311
205
|
const cwd = process.cwd();
|
|
312
206
|
const force = args.includes("--force");
|
|
313
|
-
const hasOpencode = args.includes("--opencode");
|
|
314
|
-
const hasCopilot = args.includes("--copilot");
|
|
315
|
-
const hasCursor = args.includes("--cursor");
|
|
316
|
-
const hasWindsurf = args.includes("--windsurf");
|
|
317
|
-
const hasAll = args.includes("--all");
|
|
318
207
|
const nameIdx = args.indexOf("--name");
|
|
319
208
|
const projectName = nameIdx !== -1 ? args[nameIdx + 1] : void 0;
|
|
320
|
-
let selectedIdes = [];
|
|
321
|
-
if (hasAll) {
|
|
322
|
-
selectedIdes = ["1", "2", "3", "4"];
|
|
323
|
-
} else if (hasOpencode || hasCopilot || hasCursor || hasWindsurf) {
|
|
324
|
-
if (hasOpencode) selectedIdes.push("1");
|
|
325
|
-
if (hasCopilot) selectedIdes.push("2");
|
|
326
|
-
if (hasCursor) selectedIdes.push("3");
|
|
327
|
-
if (hasWindsurf) selectedIdes.push("4");
|
|
328
|
-
} else {
|
|
329
|
-
console.log("\n@vuau/agent-memory \u2014 Structured AI memory for codebases\n");
|
|
330
|
-
selectedIdes = await askMultiSelect("What are your coding tools?", [
|
|
331
|
-
{ key: "1", label: "OpenCode (AGENTS.md)" },
|
|
332
|
-
{ key: "2", label: "GitHub Copilot (.github/copilot-instructions.md)" },
|
|
333
|
-
{ key: "3", label: "Cursor (.cursorrules)" },
|
|
334
|
-
{ key: "4", label: "Windsurf (.windsurfrules)" }
|
|
335
|
-
]);
|
|
336
|
-
if (selectedIdes.length === 0) {
|
|
337
|
-
console.log("\nNo tools selected. Defaulting to OpenCode.\n");
|
|
338
|
-
selectedIdes = ["1"];
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
209
|
const options = {
|
|
342
|
-
projectName
|
|
343
|
-
opencode: selectedIdes.includes("1"),
|
|
344
|
-
copilot: selectedIdes.includes("2"),
|
|
345
|
-
cursor: selectedIdes.includes("3"),
|
|
346
|
-
windsurf: selectedIdes.includes("4")
|
|
210
|
+
projectName
|
|
347
211
|
};
|
|
348
212
|
if (!force) {
|
|
349
213
|
const filesToCheck = [
|
|
214
|
+
{ path: AGENTS_MD, name: "AGENTS.md" },
|
|
350
215
|
{ path: MEMORY_FILE, name: ".agents/MEMORY.md" },
|
|
351
216
|
{ path: TASKS_FILE, name: ".agents/TASKS.md" }
|
|
352
217
|
];
|
|
353
|
-
if (options.opencode) {
|
|
354
|
-
filesToCheck.push({ path: AGENTS_MD, name: "AGENTS.md" });
|
|
355
|
-
}
|
|
356
|
-
if (options.copilot) {
|
|
357
|
-
filesToCheck.push({ path: COPILOT_INSTRUCTIONS, name: ".github/copilot-instructions.md" });
|
|
358
|
-
}
|
|
359
|
-
if (options.cursor) {
|
|
360
|
-
filesToCheck.push({ path: ".cursorrules", name: ".cursorrules" });
|
|
361
|
-
}
|
|
362
|
-
if (options.windsurf) {
|
|
363
|
-
filesToCheck.push({ path: ".windsurfrules", name: ".windsurfrules" });
|
|
364
|
-
}
|
|
365
218
|
const existingFiles = filesToCheck.filter((f) => existsSync3(join3(cwd, f.path)));
|
|
366
219
|
if (existingFiles.length > 0) {
|
|
367
220
|
console.log("\nExisting files found:");
|
|
@@ -396,9 +249,9 @@ Initializing agent memory in ${cwd}...
|
|
|
396
249
|
}
|
|
397
250
|
}
|
|
398
251
|
console.log("\nNext steps:");
|
|
399
|
-
console.log(" 1. Edit
|
|
252
|
+
console.log(" 1. Edit AGENTS.md \u2014 add project-specific rules");
|
|
400
253
|
console.log(" 2. Add spec files to .agents/spec/ for detailed documentation");
|
|
401
|
-
console.log(" 3.
|
|
254
|
+
console.log(" 3. AI agents will read AGENTS.md and write to .agents/ automatically");
|
|
402
255
|
console.log("");
|
|
403
256
|
rl.close();
|
|
404
257
|
}
|
package/dist/index.js
CHANGED
|
@@ -10,9 +10,6 @@ var MEMORY_FILE = ".agents/MEMORY.md";
|
|
|
10
10
|
var MEMORY_DETAIL_FILE = ".agents/MEMORY-DETAIL.md";
|
|
11
11
|
var TASKS_FILE = ".agents/TASKS.md";
|
|
12
12
|
var AGENTS_MD = "AGENTS.md";
|
|
13
|
-
var COPILOT_INSTRUCTIONS = ".github/copilot-instructions.md";
|
|
14
|
-
var CURSOR_RULES = ".cursorrules";
|
|
15
|
-
var WINDSURF_RULES = ".windsurfrules";
|
|
16
13
|
|
|
17
14
|
// src/core/scaffold.ts
|
|
18
15
|
function getTemplatesDir() {
|
|
@@ -43,23 +40,22 @@ function scaffold(projectDir, options = {}) {
|
|
|
43
40
|
const projectName = options.projectName || guessProjectName(projectDir);
|
|
44
41
|
const vars = { PROJECT_NAME: projectName };
|
|
45
42
|
const force = options.force || false;
|
|
46
|
-
const hasAnyIde = options.opencode || options.copilot || options.cursor || options.windsurf;
|
|
47
|
-
const useOpencode = hasAnyIde ? options.opencode : true;
|
|
48
|
-
const useCopilot = options.copilot || false;
|
|
49
|
-
const useCursor = options.cursor || false;
|
|
50
|
-
const useWindsurf = options.windsurf || false;
|
|
51
43
|
const dirs = [
|
|
52
44
|
join(projectDir, AGENTS_DIR),
|
|
53
45
|
join(projectDir, SPEC_DIR)
|
|
54
46
|
];
|
|
55
|
-
if (useCopilot) {
|
|
56
|
-
dirs.push(join(projectDir, ".github"));
|
|
57
|
-
}
|
|
58
47
|
for (const dir of dirs) {
|
|
59
48
|
if (!existsSync(dir)) {
|
|
60
49
|
mkdirSync(dir, { recursive: true });
|
|
61
50
|
}
|
|
62
51
|
}
|
|
52
|
+
writeFileIfNeeded(
|
|
53
|
+
join(projectDir, AGENTS_MD),
|
|
54
|
+
applyVars(readTemplate("AGENTS.md"), vars),
|
|
55
|
+
AGENTS_MD,
|
|
56
|
+
result,
|
|
57
|
+
force
|
|
58
|
+
);
|
|
63
59
|
const coreFiles = [
|
|
64
60
|
{ target: MEMORY_FILE, template: "MEMORY.md" },
|
|
65
61
|
{ target: MEMORY_DETAIL_FILE, template: "MEMORY-DETAIL.md" },
|
|
@@ -80,42 +76,6 @@ function scaffold(projectDir, options = {}) {
|
|
|
80
76
|
writeFileSync(specKeep, "");
|
|
81
77
|
result.created.push(`${SPEC_DIR}/.gitkeep`);
|
|
82
78
|
}
|
|
83
|
-
if (useOpencode) {
|
|
84
|
-
writeFileIfNeeded(
|
|
85
|
-
join(projectDir, AGENTS_MD),
|
|
86
|
-
applyVars(readTemplate("AGENTS.md"), vars),
|
|
87
|
-
AGENTS_MD,
|
|
88
|
-
result,
|
|
89
|
-
force
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
if (useCopilot) {
|
|
93
|
-
writeFileIfNeeded(
|
|
94
|
-
join(projectDir, COPILOT_INSTRUCTIONS),
|
|
95
|
-
applyVars(readTemplate("copilot-instructions.md"), vars),
|
|
96
|
-
COPILOT_INSTRUCTIONS,
|
|
97
|
-
result,
|
|
98
|
-
force
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
if (useCursor) {
|
|
102
|
-
writeFileIfNeeded(
|
|
103
|
-
join(projectDir, CURSOR_RULES),
|
|
104
|
-
applyVars(readTemplate("cursorrules.md"), vars),
|
|
105
|
-
CURSOR_RULES,
|
|
106
|
-
result,
|
|
107
|
-
force
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
if (useWindsurf) {
|
|
111
|
-
writeFileIfNeeded(
|
|
112
|
-
join(projectDir, WINDSURF_RULES),
|
|
113
|
-
applyVars(readTemplate("windsurfrules.md"), vars),
|
|
114
|
-
WINDSURF_RULES,
|
|
115
|
-
result,
|
|
116
|
-
force
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
79
|
return result;
|
|
120
80
|
}
|
|
121
81
|
function writeFileIfNeeded(targetPath, content, displayName, result, force) {
|
|
@@ -247,7 +207,7 @@ import { join as join4 } from "path";
|
|
|
247
207
|
function doctor(projectDir) {
|
|
248
208
|
const issues = [];
|
|
249
209
|
const required = [
|
|
250
|
-
{ file: AGENTS_MD, desc: "Root
|
|
210
|
+
{ file: AGENTS_MD, desc: "Root agent instructions" },
|
|
251
211
|
{ file: MEMORY_FILE, desc: "Long-term memory" },
|
|
252
212
|
{ file: TASKS_FILE, desc: "Working memory" }
|
|
253
213
|
];
|
|
@@ -262,14 +222,6 @@ function doctor(projectDir) {
|
|
|
262
222
|
issues.push({ level: "error", file: dir, message: "Directory missing" });
|
|
263
223
|
}
|
|
264
224
|
}
|
|
265
|
-
const copilotPath = join4(projectDir, COPILOT_INSTRUCTIONS);
|
|
266
|
-
if (!existsSync4(copilotPath)) {
|
|
267
|
-
issues.push({
|
|
268
|
-
level: "warning",
|
|
269
|
-
file: COPILOT_INSTRUCTIONS,
|
|
270
|
-
message: "Copilot instructions missing \u2014 VSCode/GitHub Copilot won't have context"
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
225
|
const agentsPath = join4(projectDir, AGENTS_MD);
|
|
274
226
|
if (existsSync4(agentsPath)) {
|
|
275
227
|
const content = readFileSync4(agentsPath, "utf-8");
|
|
@@ -284,7 +236,7 @@ function doctor(projectDir) {
|
|
|
284
236
|
issues.push({
|
|
285
237
|
level: "warning",
|
|
286
238
|
file: AGENTS_MD,
|
|
287
|
-
message: "Over 150 lines \u2014 consider keeping it concise
|
|
239
|
+
message: "Over 150 lines \u2014 consider keeping it concise"
|
|
288
240
|
});
|
|
289
241
|
}
|
|
290
242
|
}
|
|
@@ -299,65 +251,15 @@ function doctor(projectDir) {
|
|
|
299
251
|
});
|
|
300
252
|
}
|
|
301
253
|
}
|
|
302
|
-
const opencodePkgPath = join4(projectDir, ".opencode", "package.json");
|
|
303
|
-
const opencodeJsonPath = join4(projectDir, "opencode.json");
|
|
304
|
-
const opencodeExists = existsSync4(join4(projectDir, ".opencode"));
|
|
305
|
-
if (opencodeExists) {
|
|
306
|
-
if (!existsSync4(opencodePkgPath)) {
|
|
307
|
-
issues.push({
|
|
308
|
-
level: "warning",
|
|
309
|
-
file: ".opencode/package.json",
|
|
310
|
-
message: "Missing \u2014 run 'agent-memory init --opencode' to wire up the plugin"
|
|
311
|
-
});
|
|
312
|
-
} else {
|
|
313
|
-
try {
|
|
314
|
-
const pkg = JSON.parse(readFileSync4(opencodePkgPath, "utf-8"));
|
|
315
|
-
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
316
|
-
if (!deps["@vuau/agent-memory"]) {
|
|
317
|
-
issues.push({
|
|
318
|
-
level: "warning",
|
|
319
|
-
file: ".opencode/package.json",
|
|
320
|
-
message: "@vuau/agent-memory not in dependencies \u2014 run 'agent-memory init --opencode'"
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
} catch {
|
|
324
|
-
issues.push({ level: "warning", file: ".opencode/package.json", message: "Invalid JSON" });
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
if (!existsSync4(opencodeJsonPath)) {
|
|
328
|
-
issues.push({
|
|
329
|
-
level: "warning",
|
|
330
|
-
file: "opencode.json",
|
|
331
|
-
message: "Missing \u2014 run 'agent-memory init --opencode' to wire up the plugin"
|
|
332
|
-
});
|
|
333
|
-
} else {
|
|
334
|
-
try {
|
|
335
|
-
const config = JSON.parse(readFileSync4(opencodeJsonPath, "utf-8"));
|
|
336
|
-
const plugins = config.plugin || [];
|
|
337
|
-
if (!plugins.includes("@vuau/agent-memory")) {
|
|
338
|
-
issues.push({
|
|
339
|
-
level: "warning",
|
|
340
|
-
file: "opencode.json",
|
|
341
|
-
message: "@vuau/agent-memory not in plugin array \u2014 run 'agent-memory init --opencode'"
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
} catch {
|
|
345
|
-
issues.push({ level: "warning", file: "opencode.json", message: "Invalid JSON" });
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
254
|
return { ok: issues.filter((i) => i.level === "error").length === 0, issues };
|
|
350
255
|
}
|
|
351
256
|
export {
|
|
352
257
|
AGENTS_DIR,
|
|
353
258
|
AGENTS_MD,
|
|
354
|
-
COPILOT_INSTRUCTIONS,
|
|
355
|
-
CURSOR_RULES,
|
|
356
259
|
MEMORY_DETAIL_FILE,
|
|
357
260
|
MEMORY_FILE,
|
|
358
261
|
SPEC_DIR,
|
|
359
262
|
TASKS_FILE,
|
|
360
|
-
WINDSURF_RULES,
|
|
361
263
|
appendMemory,
|
|
362
264
|
doctor,
|
|
363
265
|
readMemory,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuau/agent-memory",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Structured AI memory for codebases —
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Structured AI memory for codebases — works with GitHub Copilot, Cursor, Windsurf, VS Code, OpenCode, and 25+ AI tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# {{PROJECT_NAME}} - Copilot Instructions (VSCode)
|
|
2
|
-
|
|
3
|
-
Router file for GitHub Copilot. Points to shared agent documentation.
|
|
4
|
-
|
|
5
|
-
## Priority
|
|
6
|
-
1. Follow direct user request.
|
|
7
|
-
2. Follow this file.
|
|
8
|
-
3. Follow spec files in `.agents/spec/`.
|
|
9
|
-
4. If conflict remains, choose smallest safe change and state assumptions.
|
|
10
|
-
|
|
11
|
-
## Documentation Map
|
|
12
|
-
|
|
13
|
-
| Task | Spec File |
|
|
14
|
-
|------|-----------|
|
|
15
|
-
| Past decisions (1-line) | `.agents/MEMORY.md` |
|
|
16
|
-
| Past decisions (full context) | `.agents/MEMORY-DETAIL.md` |
|
|
17
|
-
| Current work in progress | `.agents/TASKS.md` |
|
|
18
|
-
|
|
19
|
-
> Add your own spec files to `.agents/spec/` and reference them here.
|
|
20
|
-
|
|
21
|
-
## Response Style
|
|
22
|
-
- Concise, concrete, implementation-focused.
|
|
23
|
-
- If uncertain, say "I don't know" and give fastest verification step.
|
|
24
|
-
- Do not invent files, APIs, or command results.
|
|
25
|
-
- Keep diffs minimal, aligned with existing conventions.
|
|
26
|
-
|
|
27
|
-
## Memory Protocol
|
|
28
|
-
- When user approves a decision → append 1-line entry to `.agents/MEMORY.md` under appropriate category.
|
|
29
|
-
- Format: `- YYYY-MM-DD: <decision> → detail` (add `→ detail` when full context exists in MEMORY-DETAIL.md).
|
|
30
|
-
- Read `.agents/MEMORY.md` before implementing; follow pointers for details.
|
|
31
|
-
- Do not create additional memory files.
|
package/templates/cursorrules.md
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# {{PROJECT_NAME}} - Cursor Rules
|
|
2
|
-
|
|
3
|
-
Instructions for Cursor AI. Keep under 150 lines.
|
|
4
|
-
|
|
5
|
-
## Priority
|
|
6
|
-
1. User request first.
|
|
7
|
-
2. These rules.
|
|
8
|
-
3. Spec files in `.agents/spec/`.
|
|
9
|
-
4. If conflict remains, choose smallest safe change and state assumption.
|
|
10
|
-
|
|
11
|
-
## Documentation Map
|
|
12
|
-
|
|
13
|
-
| Task | Location |
|
|
14
|
-
|------|----------|
|
|
15
|
-
| Past decisions (1-line) | `.agents/MEMORY.md` |
|
|
16
|
-
| Past decisions (full context) | `.agents/MEMORY-DETAIL.md` |
|
|
17
|
-
| Current work in progress | `.agents/TASKS.md` |
|
|
18
|
-
| Detailed specs | `.agents/spec/*.md` |
|
|
19
|
-
|
|
20
|
-
## Memory Protocol
|
|
21
|
-
|
|
22
|
-
### When to write
|
|
23
|
-
- User approves a decision or pattern → append to `.agents/MEMORY.md`
|
|
24
|
-
- Explore codebase/architecture → update relevant `.agents/spec/*.md`
|
|
25
|
-
- Start/finish a large task → update `.agents/TASKS.md`
|
|
26
|
-
|
|
27
|
-
### MEMORY.md entry format
|
|
28
|
-
```
|
|
29
|
-
- YYYY-MM-DD: <1-line decision or pattern> → detail
|
|
30
|
-
```
|
|
31
|
-
Place under the appropriate category. Add `→ detail` pointer when full context exists in MEMORY-DETAIL.md.
|
|
32
|
-
|
|
33
|
-
### TASKS.md update
|
|
34
|
-
Before ending a session with unfinished work, move items to `## In Progress` or `## Up Next`.
|
|
35
|
-
|
|
36
|
-
### Rules
|
|
37
|
-
- Keep MEMORY.md entries to 1 line each. Details go in spec files.
|
|
38
|
-
- If MEMORY.md > 150 lines, archive old entries.
|
|
39
|
-
- Do not create additional memory files outside `.agents/`.
|
|
40
|
-
|
|
41
|
-
## Response Style
|
|
42
|
-
- Concise, concrete, implementation-focused.
|
|
43
|
-
- If uncertain, say `I don't know`, then give fastest verification step.
|
|
44
|
-
- Do not invent files, APIs, or command outputs.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# {{PROJECT_NAME}} - Windsurf Rules
|
|
2
|
-
|
|
3
|
-
Instructions for Windsurf AI. Keep under 150 lines.
|
|
4
|
-
|
|
5
|
-
## Priority
|
|
6
|
-
1. User request first.
|
|
7
|
-
2. These rules.
|
|
8
|
-
3. Spec files in `.agents/spec/`.
|
|
9
|
-
4. If conflict remains, choose smallest safe change and state assumption.
|
|
10
|
-
|
|
11
|
-
## Documentation Map
|
|
12
|
-
|
|
13
|
-
| Task | Location |
|
|
14
|
-
|------|----------|
|
|
15
|
-
| Past decisions (1-line) | `.agents/MEMORY.md` |
|
|
16
|
-
| Past decisions (full context) | `.agents/MEMORY-DETAIL.md` |
|
|
17
|
-
| Current work in progress | `.agents/TASKS.md` |
|
|
18
|
-
| Detailed specs | `.agents/spec/*.md` |
|
|
19
|
-
|
|
20
|
-
## Memory Protocol
|
|
21
|
-
|
|
22
|
-
### When to write
|
|
23
|
-
- User approves a decision or pattern → append to `.agents/MEMORY.md`
|
|
24
|
-
- Explore codebase/architecture → update relevant `.agents/spec/*.md`
|
|
25
|
-
- Start/finish a large task → update `.agents/TASKS.md`
|
|
26
|
-
|
|
27
|
-
### MEMORY.md entry format
|
|
28
|
-
```
|
|
29
|
-
- YYYY-MM-DD: <1-line decision or pattern> → detail
|
|
30
|
-
```
|
|
31
|
-
Place under the appropriate category. Add `→ detail` pointer when full context exists in MEMORY-DETAIL.md.
|
|
32
|
-
|
|
33
|
-
### TASKS.md update
|
|
34
|
-
Before ending a session with unfinished work, move items to `## In Progress` or `## Up Next`.
|
|
35
|
-
|
|
36
|
-
### Rules
|
|
37
|
-
- Keep MEMORY.md entries to 1 line each. Details go in spec files.
|
|
38
|
-
- If MEMORY.md > 150 lines, archive old entries.
|
|
39
|
-
- Do not create additional memory files outside `.agents/`.
|
|
40
|
-
|
|
41
|
-
## Response Style
|
|
42
|
-
- Concise, concrete, implementation-focused.
|
|
43
|
-
- If uncertain, say `I don't know`, then give fastest verification step.
|
|
44
|
-
- Do not invent files, APIs, or command outputs.
|