openteam 1.0.2 → 1.0.4
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/examples/dev-team/pm.md
CHANGED
package/examples/dev-team/qa.md
CHANGED
package/package.json
CHANGED
package/src/wrapper/index.js
CHANGED
|
@@ -60,7 +60,7 @@ async function main() {
|
|
|
60
60
|
const mcpConfigPath = writeMcpConfig(adapter, serverUrl, agent, projectDir);
|
|
61
61
|
|
|
62
62
|
// ── 3. 构建系统提示词 ──
|
|
63
|
-
const systemPrompt = buildSystemPrompt(agent, team, agents);
|
|
63
|
+
const systemPrompt = buildSystemPrompt(agent, team, agents, cliType);
|
|
64
64
|
|
|
65
65
|
// ── 4. 创建 PTY,启动 CLI ──
|
|
66
66
|
const cliLaunchArgs = adapter.buildLaunchArgs({ agent, systemPrompt, mcpConfigPath, cwd: projectDir, extraArgs: cliArgs });
|
|
@@ -238,7 +238,7 @@ function cleanupMcpConfig(configPath) {
|
|
|
238
238
|
|
|
239
239
|
// ── 系统提示词 ──
|
|
240
240
|
|
|
241
|
-
function buildSystemPrompt(agent, team, agents) {
|
|
241
|
+
function buildSystemPrompt(agent, team, agents, cliType) {
|
|
242
242
|
const teammates = agents.filter(a => a !== agent);
|
|
243
243
|
const lines = [
|
|
244
244
|
`You are agent "${agent}" in team "${team}".`,
|
|
@@ -253,6 +253,20 @@ function buildSystemPrompt(agent, team, agents) {
|
|
|
253
253
|
'NEVER use msg(who="boss") — boss is in your session, not an agent.',
|
|
254
254
|
'Use taskboard tool to manage tasks: create (leader only), done, list.',
|
|
255
255
|
);
|
|
256
|
+
|
|
257
|
+
// Claude Code 特有:记忆目录隔离
|
|
258
|
+
if (cliType === 'claude-code') {
|
|
259
|
+
lines.push(
|
|
260
|
+
'',
|
|
261
|
+
`Memory isolation: You are "${agent}" in a multi-agent team. To avoid conflicts with other agents' memory files, ` +
|
|
262
|
+
`store ALL your memory files (MEMORY.md, WORKING.md, topic files) under the subdirectory "memory/${agent}/" ` +
|
|
263
|
+
`instead of the default "memory/" directory. ` +
|
|
264
|
+
`Example: use "memory/${agent}/MEMORY.md" instead of "memory/MEMORY.md", ` +
|
|
265
|
+
`"memory/${agent}/WORKING.md" instead of "memory/WORKING.md". ` +
|
|
266
|
+
'This ensures each agent has isolated persistent state.',
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
|
|
256
270
|
return lines.join(' ');
|
|
257
271
|
}
|
|
258
272
|
|