diff --git a/.gitmodules b/.gitmodules index 360925a..0ae21ff 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "deps/error-code-system"] path = deps/error-code-system url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Error-Code-System.git +[submodule "deps/agent-squad"] + path = deps/agent-squad + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Squad.git diff --git a/deps/agent-squad b/deps/agent-squad new file mode 160000 index 0000000..5454f74 --- /dev/null +++ b/deps/agent-squad @@ -0,0 +1 @@ +Subproject commit 5454f7485e7cf8b7ea7432b3c3c680da8a99056e diff --git a/deps/agent-system-core b/deps/agent-system-core index 9179a23..c7ae99b 160000 --- a/deps/agent-system-core +++ b/deps/agent-system-core @@ -1 +1 @@ -Subproject commit 9179a23f0a02559955cb7b7cee07f2218427f362 +Subproject commit c7ae99b13c659e8ec60eeb91386804c7ea2d1e57 diff --git a/go.mod b/go.mod index 968e2e2..9e6a9d4 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,8 @@ require ( ) require ( + agent-squad v0.0.0-00010101000000-000000000000 // indirect + error-code-system v0.0.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/google/uuid v1.6.0 // indirect github.com/mattn/go-isatty v0.0.24 // indirect @@ -25,6 +27,8 @@ require ( replace agent-intent => ./deps/agent-intent +replace agent-squad => ./deps/agent-squad + replace agent-native => ./deps/agent-native replace agent-system-core => ./deps/agent-system-core diff --git a/internal/app/app.go b/internal/app/app.go index e845f25..312070f 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -48,6 +48,7 @@ func Run(opt Options) error { return fmt.Errorf("builtin tools: %w", err) } setSvc := settings.NewService(st) + setSvc.SetSystemOverride(map[string]any{"storage": map[string]any{"dataDir": opt.DataDir}}) profSvc := profiles.New(st) if err := profSvc.EnsureDefault(); err != nil { return fmt.Errorf("default profile: %w", err) diff --git a/internal/runmgr/runmgr.go b/internal/runmgr/runmgr.go index 78f53f6..c463725 100644 --- a/internal/runmgr/runmgr.go +++ b/internal/runmgr/runmgr.go @@ -39,6 +39,7 @@ type runHandle struct { cancel context.CancelFunc hitlCh chan hitlAnswer assistant []core.Part + ctxObs *core.ContextObservation started time.Time } @@ -85,6 +86,11 @@ func (c *runCtx) History() []core.Message { func (c *runCtx) Attachments() []core.ParsedDocument { return c.attachments } func (c *runCtx) Subtask() string { return c.subTask } func (c *runCtx) Tools() []core.ToolDesc { return c.mgr.registry.List() } +func (c *runCtx) SetContextObservation(o core.ContextObservation) { + c.mgr.mu.Lock() + c.h.ctxObs = &o + c.mgr.mu.Unlock() +} func (c *runCtx) Emit(typ core.StreamEventType, payload any) error { _, err := c.mgr.emit(c.run.ConversationID, c.run.ID, typ, payload) @@ -310,7 +316,12 @@ func (m *Manager) finishRun(rc *runCtx, status core.RunStatus, usage core.Usage, switch status { case core.RunCompleted: usagePayload := core.RunCompletedPayload{Usage: usage} - // 把工具调用数补进 usage(由 runner 在部件里体现,这里取事件计数)。 + // 上下文组装观测随终态下发(4.10/4.17:构成与裁剪可解释)。 + m.mu.Lock() + if rc.h.ctxObs != nil { + usagePayload.Context = rc.h.ctxObs + } + m.mu.Unlock() m.emit(rc.run.ConversationID, rc.run.ID, core.EvRunCompleted, usagePayload) case core.RunFailed: m.emit(rc.run.ConversationID, rc.run.ID, core.EvRunFailed, core.RunFailedPayload{Code: errPart.Code, Message: errPart.Message}) @@ -512,9 +523,16 @@ func (m *Manager) spawnSubagent(parentCtx context.Context, parent core.Run, name m.mu.Lock() subParts := append([]core.Part{}, h.assistant...) m.mu.Unlock() + fullText := partsText(subParts) if len(subParts) > 0 { _ = m.st.AppendMessage(&core.Message{ConversationID: child.ConversationID, RunID: child.ID, Role: core.RoleAssistant, Parts: subParts}) } + if fullText != "" { + payload.Text = fullText + if payload.Summary == "" || payload.Summary == "完成" { + payload.Summary = truncate(fullText, 160) + } + } m.mu.Lock() delete(m.active, child.ID) @@ -552,6 +570,17 @@ func (m *Manager) InterruptRunning() { } } +func partsText(parts []core.Part) string { + var sb strings.Builder + for _, p := range parts { + if p.Type == core.PartText { + sb.WriteString(p.Text) + sb.WriteString("\n") + } + } + return strings.TrimSpace(sb.String()) +} + func truncate(s string, n int) string { if len(s) <= n { return s diff --git a/internal/runtime/llm.go b/internal/runtime/llm.go index 59126d1..220ab61 100644 --- a/internal/runtime/llm.go +++ b/internal/runtime/llm.go @@ -8,6 +8,7 @@ import ( agentllm "agent-native/runtime/llm" core "agent-system-core" "agent-system-backend/internal/ctxasm" + "agent-system-backend/internal/squadadapter" ) // LLMRunner 主对话执行器:复用 agent-native 的 OpenAI 兼容流式客户端(不自研接入层)。 @@ -21,19 +22,18 @@ const ( toolDelegate = "delegate_task" toolPlan = "update_plan" toolTodos = "update_todos" + toolSquad = "squad_orchestrate" ) func (l *LLMRunner) Execute(rc RunCtx) error { eff := rc.Settings() - chat := eff.GetString("models.chat.model", "") - base := eff.GetString("models.chat.baseUrl", "") - key := eff.GetString("models.chat.apiKey", "") - if chat == "" || base == "" { - return fmt.Errorf("llm: 主模型未配置(settings: models.chat.baseUrl / models.chat.model;演示模式可开 runtime.mock)") + prof := rc.Profile() + route := ResolveChatModel(prof, eff) + if route.Model == "" || route.Base == "" { + return fmt.Errorf("llm: 主模型未配置(当前解析:model=%q base=%q;检查 settings.models.chat 与画像 ModelRoute;演示模式可开 runtime.mock)", route.Model, route.Base) } - client := &agentllm.Client{BaseURL: base, APIKey: key} - prof := rc.Profile() + client := &agentllm.Client{BaseURL: route.Base, APIKey: route.Key} // 知识注入:当前消息包含 @knowledge 引用时检索注入(最小实现:显式引用)。 var knowledge []core.RetrievalHit @@ -53,10 +53,16 @@ func (l *LLMRunner) Execute(rc RunCtx) error { break } } - msgs, _ := ctxasm.AssembleInput(prof, eff, hist, currentUser, rc.Attachments(), knowledge) + msgs, asmReport := ctxasm.AssembleInput(prof, eff, hist, currentUser, rc.Attachments(), knowledge) + if asmReport != nil { + rc.SetContextObservation(core.ContextObservation{ + Items: asmReport.Items, Truncations: asmReport.Truncations, EstChars: asmReport.EstChars, + }) + } // 声明工具:编排型内置 + 注册表中画像允许的工具。 decls := []agentllm.ToolDecl{ + {Name: toolSquad, Description: "用小队编排引擎执行多步骤目标:规则规划器拆解为 梳理→专项→成文→终审 步骤并逐步执行(每步一个子代理),挂起决策会以提问卡片征求用户", Parameters: json.RawMessage(`{"type":"object","properties":{"goal":{"type":"string","description":"要完成的整体目标描述"}},"required":["goal"]}`)}, {Name: toolDelegate, Description: "派生一个子代理执行独立子任务(如检索、撰写),返回其结果摘要", Parameters: json.RawMessage(`{"type":"object","properties":{"name":{"type":"string","description":"子代理角色名"},"task":{"type":"string","description":"子任务描述"},"hint":{"type":"string","description":"执行提示"}},"required":["name","task"]}`)}, {Name: toolPlan, Description: "创建或更新当前会话的计划(步骤列表)", Parameters: json.RawMessage(`{"type":"object","properties":{"title":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","done","skipped"]}},"required":["id","text","status"]}}},"required":["title","steps"]}`)}, {Name: toolTodos, Description: "更新当前会话的待办清单", Parameters: json.RawMessage(`{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","done"]}},"required":["id","text","status"]}}},"required":["items"]}`)}, @@ -92,7 +98,7 @@ func (l *LLMRunner) Execute(rc RunCtx) error { var turnThinking, turnText strings.Builder var calls []agentllm.ToolCall var usage agentllm.Usage - ev := client.Stream(rc.Context(), chat, msgs, decls, agentllm.StreamOptions{}) + ev := client.Stream(rc.Context(), route.Model, msgs, decls, agentllm.StreamOptions{}) phaseEmitted := false for e := range ev { switch e.Kind { @@ -153,6 +159,20 @@ func (l *LLMRunner) Execute(rc RunCtx) error { var err error var artifactRef *core.ArtifactRef switch call.Name { + case toolSquad: + if !eff.GetBool("runtime.squad", true) { + out = "小队编排已被设置禁用(runtime.squad)" + break + } + var a struct{ Goal string } + json.Unmarshal([]byte(call.Arguments), &a) + dataDir := eff.GetString("storage.dataDir", "./data") + summary, serr := squadadapter.Orchestrate(rc, dataDir, a.Goal) + if serr != nil { + out = "小队编排失败:" + serr.Error() + } else { + out = summary + } case toolDelegate: var a struct{ Name, Task, Hint string } json.Unmarshal([]byte(call.Arguments), &a) @@ -190,7 +210,7 @@ func (l *LLMRunner) Execute(rc RunCtx) error { } rc.Emit(core.EvToolResult, core.ToolResultPayload{CallID: call.ID, Status: res.Status, Summary: summarize(out, err), Truncated: res.Truncated}) } - if call.Name == toolDelegate || call.Name == toolPlan || call.Name == toolTodos { + if call.Name == toolDelegate || call.Name == toolPlan || call.Name == toolTodos || call.Name == toolSquad { rc.Emit(core.EvToolResult, core.ToolResultPayload{CallID: call.ID, Status: "ok", Summary: summarize(out, err)}) } @@ -222,26 +242,18 @@ type SubLLMRunner struct{} func (l *SubLLMRunner) Name() string { return "llm-subagent" } func (l *SubLLMRunner) Execute(rc RunCtx) error { - eff := rc.Settings() - model := eff.GetString("models.lightweight.model", "") - base := eff.GetString("models.lightweight.baseUrl", "") - key := eff.GetString("models.lightweight.apiKey", "") - if model == "" || base == "" { - model = eff.GetString("models.chat.model", "") - base = eff.GetString("models.chat.baseUrl", "") - key = eff.GetString("models.chat.apiKey", "") - } - if model == "" || base == "" { - return fmt.Errorf("llm-subagent: 模型未配置") + route := ResolveLightweightModel(rc.Profile(), rc.Settings()) + if route.Model == "" || route.Base == "" { + return fmt.Errorf("llm-subagent: 模型未配置(当前解析:model=%q base=%q)", route.Model, route.Base) } rc.Emit(core.EvAgentProgress, core.AgentProgressPayload{AgentRun: rc.Run().ID, Note: "执行子任务……", Phase: core.PhaseActing}) - client := &agentllm.Client{BaseURL: base, APIKey: key} + client := &agentllm.Client{BaseURL: route.Base, APIKey: route.Key} msgs := []agentllm.Message{ {Role: agentllm.RoleSystem, Content: "你是被派生的子代理。独立完成给定子任务,输出简明结果摘要(不超过 300 字)。"}, {Role: agentllm.RoleUser, Content: rc.Subtask()}, } var sb strings.Builder - for e := range client.Stream(rc.Context(), model, msgs, nil, agentllm.StreamOptions{}) { + for e := range client.Stream(rc.Context(), route.Model, msgs, nil, agentllm.StreamOptions{}) { if e.Kind == agentllm.KindTextDelta { sb.WriteString(e.Text) rc.Emit(core.EvAgentProgress, core.AgentProgressPayload{AgentRun: rc.Run().ID, Note: truncateRun(sb.String(), 80)}) diff --git a/internal/runtime/mock.go b/internal/runtime/mock.go index f5b028e..bee38cb 100644 --- a/internal/runtime/mock.go +++ b/internal/runtime/mock.go @@ -6,8 +6,18 @@ import ( "time" core "agent-system-core" + "agent-system-backend/internal/squadadapter" ) +func firstNonEmpty0(vals ...string) string { + for _, v := range vals { + if strings.TrimSpace(v) != "" { + return v + } + } + return "" +} + // MockRunner 按脚本回放事件流(P1 骨架闭环与验收基线;不调用任何模型)。 // 用户消息中的指令词触发不同演示路径,其余走默认脚本(思考→工具→回复)。 type MockRunner struct{} @@ -32,6 +42,11 @@ func (m *MockRunner) Execute(rc RunCtx) error { addText := func(t string) { parts = append(parts, core.Part{Type: core.PartText, Text: t}) } + // mock 路径同样产出上下文观测(演示可解释性入口;真实路径由 ctxasm 产出)。 + rc.SetContextObservation(core.ContextObservation{ + Items: []string{"system(画像)", "history(mock)", "attachments(0)"}, + EstChars: len(user) + 128, + }) switch { case strings.Contains(user, "#hitl"): @@ -95,6 +110,23 @@ func (m *MockRunner) Execute(rc RunCtx) error { } addText("文档已生成,见右侧 Artifacts 标签(也可点击消息中的工件引用)。") + case strings.Contains(user, "#squad"): + rc.Emit(core.EvThinkingDelta, core.ThinkingDeltaPayload{Index: 0, Text: "调用 Agent-Squad 引擎编排……"}) + parts = append(parts, core.Part{Type: core.PartThinking, Text: "调用 Agent-Squad 引擎编排……", Process: true}) + goal := strings.TrimSpace(strings.ReplaceAll(strings.ReplaceAll(user, "#squad", ""), "#hitl", "")) + if eff := rc.Settings(); !eff.GetBool("runtime.squad", true) { + addText("小队编排已被设置禁用(runtime.squad)。") + rc.SetAssistantParts(parts) + return nil + } + dataDir := rc.Settings().GetString("storage.dataDir", "./data") + summary, err := squadadapter.Orchestrate(rc, dataDir, firstNonEmpty0(goal, "生成一份关于演示目标的简要报告")) + if err != nil { + addText("小队编排结束(" + err.Error() + ")。摘要:" + summary) + } else { + addText("Agent-Squad 编排完成:" + summary + "。步骤与子代理见右栏「计划」「代理」。") + } + case strings.Contains(user, "#error"): return fmt.Errorf("mock: 演示失败路径(#error 指令)") @@ -134,7 +166,9 @@ func (m *MockSubagent) Execute(rc RunCtx) error { time.Sleep(150 * time.Millisecond) rc.Emit(core.EvAgentProgress, core.AgentProgressPayload{AgentRun: rc.Run().ID, Note: "处理中……", Phase: core.PhaseActing}) time.Sleep(150 * time.Millisecond) - rc.SetAssistantParts([]core.Part{{Type: core.PartText, Text: "子任务完成(mock)。"}}) + + task := rc.Subtask() + rc.SetAssistantParts([]core.Part{{Type: core.PartText, Text: fmt.Sprintf("# 子代理产出(mock)\n\n任务:%s\n\n- 已按子代理角色完成处理\n- 本文本将作为小队步骤的交付物写入工作区\n- 任务树与中间过程可在右栏与弹窗查看\n", firstNonEmpty0(task, "(未提供任务描述)"))}}) return nil } diff --git a/internal/runtime/model.go b/internal/runtime/model.go new file mode 100644 index 0000000..f97ebd7 --- /dev/null +++ b/internal/runtime/model.go @@ -0,0 +1,49 @@ +package runtime + +import ( + core "agent-system-core" +) + +// 模型路由解析(4.7 / 4.9 覆盖链):设置层 defaults → system → user → project, +// 画像 ModelRoute 为会话内最高层覆盖(kind 为空回落设置层主模型)。 +// 端点与密钥按 kind 独立配置,轻量档空则回落主档。 + +// ResolvedModel 是一次路由解析的结果。 +type ResolvedModel struct { + Kind string // chat | lightweight + Model string + Base string + Key string +} + +// ResolveChatModel 解析主对话模型(画像 route > 设置层)。 +func ResolveChatModel(prof core.AgentProfile, eff core.EffectiveSettings) ResolvedModel { + m := eff.GetString("models.chat.model", "") + if prof.Model.Chat != "" { + m = prof.Model.Chat + } + return ResolvedModel{Kind: "chat", Model: m, + Base: eff.GetString("models.chat.baseUrl", ""), + Key: eff.GetString("models.chat.apiKey", "")} +} + +// ResolveLightweightModel 解析轻量模型:画像 route > 设置层轻量档 > 回落主档。 +func ResolveLightweightModel(prof core.AgentProfile, eff core.EffectiveSettings) ResolvedModel { + m := eff.GetString("models.lightweight.model", "") + base := eff.GetString("models.lightweight.baseUrl", "") + key := eff.GetString("models.lightweight.apiKey", "") + if prof.Model.Lightweight != "" { + m = prof.Model.Lightweight + } + if m == "" || base == "" { + // 回落主档(模型与端点分别回落,允许轻量仅覆盖模型名)。 + chat := ResolveChatModel(prof, eff) + if m == "" { + m = chat.Model + } + if base == "" { + base, key = chat.Base, chat.Key + } + } + return ResolvedModel{Kind: "lightweight", Model: m, Base: base, Key: key} +} diff --git a/internal/runtime/model_test.go b/internal/runtime/model_test.go new file mode 100644 index 0000000..8a86d51 --- /dev/null +++ b/internal/runtime/model_test.go @@ -0,0 +1,47 @@ +package runtime + +import ( + "testing" + + core "agent-system-core" +) + +func effOf(kv map[string]any) core.EffectiveSettings { return core.EffectiveSettings(kv) } + +// 三层覆盖链解析:defaults → user → project 由 settings 服务合并(server 集成测试覆盖); +// 此处验证解析器对「设置层结果 + 画像层」的最后一级覆盖与回落。 +func TestResolveChatModelLayers(t *testing.T) { + eff := effOf(map[string]any{"models": map[string]any{"chat": map[string]any{ + "model": "model-settings", "baseUrl": "https://s.example", "apiKey": "k0", + }}}) + prof := core.AgentProfile{} + + // 仅设置层。 + got := ResolveChatModel(prof, eff) + if got.Model != "model-settings" || got.Base != "https://s.example" || got.Key != "k0" { + t.Fatalf("settings layer: %+v", got) + } + // 画像覆盖模型(端点沿用设置层)。 + prof.Model.Chat = "model-profile" + got = ResolveChatModel(prof, eff) + if got.Model != "model-profile" || got.Base != "https://s.example" { + t.Fatalf("profile layer should override model only: %+v", got) + } +} + +func TestResolveLightweightFallback(t *testing.T) { + eff := effOf(map[string]any{"models": map[string]any{ + "chat": map[string]any{"model": "main-m", "baseUrl": "https://main", "apiKey": "k"}, + "lightweight": map[string]any{"model": ""}, + }}) + got := ResolveLightweightModel(core.AgentProfile{}, eff) + if got.Model != "main-m" || got.Base != "https://main" { + t.Fatalf("lightweight should fall back to chat: %+v", got) + } + // 轻量档只配模型名:模型用轻量、端点回落主档。 + eff["models"].(map[string]any)["lightweight"] = map[string]any{"model": "lite-m"} + got = ResolveLightweightModel(core.AgentProfile{Model: core.ModelRoute{Lightweight: "prof-lite"}}, eff) + if got.Model != "prof-lite" || got.Base != "https://main" { + t.Fatalf("profile lightweight + chat endpoint: %+v", got) + } +} diff --git a/internal/runtime/runner.go b/internal/runtime/runner.go index a1eaa9c..3407df9 100644 --- a/internal/runtime/runner.go +++ b/internal/runtime/runner.go @@ -30,6 +30,8 @@ type RunCtx interface { Tools() []core.ToolDesc // Subtask 返回子代理任务描述(仅 subagent run 有值)。 Subtask() string + // SetContextObservation 记录本次运行的上下文组装观测(随 run.completed 下发)。 + SetContextObservation(o core.ContextObservation) } // Runner 执行一个 run 至终态:返回 nil = completed;ctx 取消应返回 ctx.Err()。 diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/blackboard.json b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/blackboard.json new file mode 100644 index 0000000..e1513a2 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/blackboard.json @@ -0,0 +1,7 @@ +{ + "facts": null, + "gaps": null, + "implications": null, + "fields": {}, + "updated_at": "2026-09-29T18:24:46.040810299Z" +} \ No newline at end of file diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/context/goal.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/context/index.json b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/squad.json b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/squad.json new file mode 100644 index 0000000..a6454c7 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/squad.json @@ -0,0 +1,67 @@ +{ + "squad_name": "生成一份示例目标简报", + "version": "1", + "agents": [ + { + "role": "organizer", + "name": "organizer专员", + "source": "derived", + "base_role": "planner", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "梳理目标背景与输入材料,产出事实与缺口" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "specialist", + "name": "specialist专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "围绕目标开展专业分析与推演" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "writer", + "name": "撰稿员", + "source": "registered", + "backend": "agent-system", + "bash_permission": "deny", + "keywords": [ + "撰写", + "成文", + "报告" + ], + "instructions": "把前序要点与调研结论整理为清晰成文的交付文档。" + }, + { + "role": "leader", + "name": "leader专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "一致性终审与交付把关" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/01_organizer/AGENTS.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/01_organizer/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/01_organizer/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/01_organizer/TASK.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/01_organizer/TASK.md new file mode 100644 index 0000000..6ee614b --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/01_organizer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:梳理目标背景与输入材料,产出事实与缺口 + +- 角色:organizer专员(organizer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/01_organizer/context/goal.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/01_organizer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/01_organizer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/01_organizer/context/index.json b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/01_organizer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/01_organizer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/02_specialist/AGENTS.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/02_specialist/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/02_specialist/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/02_specialist/TASK.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/02_specialist/TASK.md new file mode 100644 index 0000000..73e5b05 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/02_specialist/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:围绕目标开展专业分析与推演 + +- 角色:specialist专员(specialist) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/02_specialist/context/goal.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/02_specialist/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/02_specialist/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/02_specialist/context/index.json b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/02_specialist/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/02_specialist/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/03_writer/AGENTS.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/03_writer/AGENTS.md new file mode 100644 index 0000000..6499104 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/03_writer/AGENTS.md @@ -0,0 +1 @@ +把前序要点与调研结论整理为清晰成文的交付文档。 \ No newline at end of file diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/03_writer/TASK.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/03_writer/TASK.md new file mode 100644 index 0000000..5b776e6 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/03_writer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:汇总各角色产出,撰写交付物初稿 + +- 角色:撰稿员(writer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/03_writer/context/goal.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/03_writer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/03_writer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/03_writer/context/index.json b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/03_writer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/03_writer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/04_leader/AGENTS.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/04_leader/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/04_leader/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/04_leader/TASK.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/04_leader/TASK.md new file mode 100644 index 0000000..7238622 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/04_leader/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:一致性终审与交付把关 + +- 角色:leader专员(leader) +- 期望产出:[output.md] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/04_leader/context/goal.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/04_leader/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/04_leader/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/04_leader/context/index.json b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/04_leader/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/tasks/04_leader/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/template.md b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/template.md new file mode 100644 index 0000000..cba7821 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/template.md @@ -0,0 +1,17 @@ +# 生成一份示例目标简报 + +## 概述与背景 + +(目标、范围与输入材料概述) + +## 核心内容 + +(按目标拆解的核心分析/结果章节) + +## 风险与注意事项 + +(风险、限制与依赖) + +## 基准假设与待确认清单 + +(假设及需人工确认事项) diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/workflow.json b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/workflow.json new file mode 100644 index 0000000..aec865b --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/workflow.json @@ -0,0 +1,58 @@ +{ + "workflow_id": "wf_1790706285654853719", + "title": "生成一份示例目标简报", + "planning_mode": "autonomous", + "status": "failed", + "current_step_index": 0, + "steps": [ + { + "id": "step_01_organizer", + "role": "organizer", + "title": "梳理目标背景与输入材料,产出事实与缺口", + "sub_workspace": "tasks/01_organizer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "failed", + "duration_ms": 302, + "error": "missing deliverables: [notes.md fields.json]" + }, + { + "id": "step_02_specialist", + "role": "specialist", + "title": "围绕目标开展专业分析与推演", + "sub_workspace": "tasks/02_specialist", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_03_writer", + "role": "writer", + "title": "汇总各角色产出,撰写交付物初稿", + "sub_workspace": "tasks/03_writer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_04_leader", + "role": "leader", + "title": "一致性终审与交付把关", + "sub_workspace": "tasks/04_leader", + "parallel": false, + "targets": [ + "output.md" + ], + "status": "pending" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/workspace.json b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/workspace.json new file mode 100644 index 0000000..e5570b4 --- /dev/null +++ b/internal/server/data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990/workspace.json @@ -0,0 +1,16 @@ +{ + "id": "run_20260929T182445.654814990", + "goal": { + "text": "生成一份示例目标简报" + }, + "status": "executing", + "backend": "agent-system", + "planner": "rule", + "work_dir": "data/squad/run_536ef7ed0c73/runs/run_20260929T182445.654814990", + "created_at": "2026-09-29T18:24:45.65482064Z", + "updated_at": "2026-09-29T18:24:46.040597085Z", + "metadata": { + "mode": "", + "task_key": "" + } +} \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/blackboard.json b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/blackboard.json new file mode 100644 index 0000000..5dc3e7c --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/blackboard.json @@ -0,0 +1,7 @@ +{ + "facts": null, + "gaps": null, + "implications": null, + "fields": {}, + "updated_at": "2026-09-29T18:21:10.615100644Z" +} \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/context/goal.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/context/index.json b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/squad.json b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/squad.json new file mode 100644 index 0000000..a6454c7 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/squad.json @@ -0,0 +1,67 @@ +{ + "squad_name": "生成一份示例目标简报", + "version": "1", + "agents": [ + { + "role": "organizer", + "name": "organizer专员", + "source": "derived", + "base_role": "planner", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "梳理目标背景与输入材料,产出事实与缺口" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "specialist", + "name": "specialist专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "围绕目标开展专业分析与推演" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "writer", + "name": "撰稿员", + "source": "registered", + "backend": "agent-system", + "bash_permission": "deny", + "keywords": [ + "撰写", + "成文", + "报告" + ], + "instructions": "把前序要点与调研结论整理为清晰成文的交付文档。" + }, + { + "role": "leader", + "name": "leader专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "一致性终审与交付把关" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/01_organizer/AGENTS.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/01_organizer/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/01_organizer/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/01_organizer/TASK.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/01_organizer/TASK.md new file mode 100644 index 0000000..6ee614b --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/01_organizer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:梳理目标背景与输入材料,产出事实与缺口 + +- 角色:organizer专员(organizer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/01_organizer/context/goal.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/01_organizer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/01_organizer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/01_organizer/context/index.json b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/01_organizer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/01_organizer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/02_specialist/AGENTS.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/02_specialist/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/02_specialist/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/02_specialist/TASK.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/02_specialist/TASK.md new file mode 100644 index 0000000..73e5b05 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/02_specialist/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:围绕目标开展专业分析与推演 + +- 角色:specialist专员(specialist) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/02_specialist/context/goal.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/02_specialist/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/02_specialist/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/02_specialist/context/index.json b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/02_specialist/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/02_specialist/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/03_writer/AGENTS.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/03_writer/AGENTS.md new file mode 100644 index 0000000..6499104 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/03_writer/AGENTS.md @@ -0,0 +1 @@ +把前序要点与调研结论整理为清晰成文的交付文档。 \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/03_writer/TASK.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/03_writer/TASK.md new file mode 100644 index 0000000..5b776e6 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/03_writer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:汇总各角色产出,撰写交付物初稿 + +- 角色:撰稿员(writer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/03_writer/context/goal.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/03_writer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/03_writer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/03_writer/context/index.json b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/03_writer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/03_writer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/04_leader/AGENTS.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/04_leader/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/04_leader/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/04_leader/TASK.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/04_leader/TASK.md new file mode 100644 index 0000000..7238622 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/04_leader/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:一致性终审与交付把关 + +- 角色:leader专员(leader) +- 期望产出:[output.md] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/04_leader/context/goal.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/04_leader/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/04_leader/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/04_leader/context/index.json b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/04_leader/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/tasks/04_leader/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/template.md b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/template.md new file mode 100644 index 0000000..cba7821 --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/template.md @@ -0,0 +1,17 @@ +# 生成一份示例目标简报 + +## 概述与背景 + +(目标、范围与输入材料概述) + +## 核心内容 + +(按目标拆解的核心分析/结果章节) + +## 风险与注意事项 + +(风险、限制与依赖) + +## 基准假设与待确认清单 + +(假设及需人工确认事项) diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/workflow.json b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/workflow.json new file mode 100644 index 0000000..e35e40e --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/workflow.json @@ -0,0 +1,58 @@ +{ + "workflow_id": "wf_1790706070248445331", + "title": "生成一份示例目标简报", + "planning_mode": "autonomous", + "status": "failed", + "current_step_index": 0, + "steps": [ + { + "id": "step_01_organizer", + "role": "organizer", + "title": "梳理目标背景与输入材料,产出事实与缺口", + "sub_workspace": "tasks/01_organizer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "failed", + "duration_ms": 303, + "error": "missing deliverables: [notes.md fields.json]" + }, + { + "id": "step_02_specialist", + "role": "specialist", + "title": "围绕目标开展专业分析与推演", + "sub_workspace": "tasks/02_specialist", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_03_writer", + "role": "writer", + "title": "汇总各角色产出,撰写交付物初稿", + "sub_workspace": "tasks/03_writer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_04_leader", + "role": "leader", + "title": "一致性终审与交付把关", + "sub_workspace": "tasks/04_leader", + "parallel": false, + "targets": [ + "output.md" + ], + "status": "pending" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/workspace.json b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/workspace.json new file mode 100644 index 0000000..48ac98b --- /dev/null +++ b/internal/server/data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412/workspace.json @@ -0,0 +1,16 @@ +{ + "id": "run_20260929T182110.248410412", + "goal": { + "text": "生成一份示例目标简报" + }, + "status": "executing", + "backend": "agent-system", + "planner": "rule", + "work_dir": "data/squad/run_5e64ebd987c0/runs/run_20260929T182110.248410412", + "created_at": "2026-09-29T18:21:10.248414712Z", + "updated_at": "2026-09-29T18:21:10.614790993Z", + "metadata": { + "mode": "", + "task_key": "" + } +} \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/blackboard.json b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/blackboard.json new file mode 100644 index 0000000..cf70fca --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/blackboard.json @@ -0,0 +1,7 @@ +{ + "facts": null, + "gaps": null, + "implications": null, + "fields": {}, + "updated_at": "2026-09-29T18:20:50.315927955Z" +} \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/context/goal.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/context/index.json b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/squad.json b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/squad.json new file mode 100644 index 0000000..a6454c7 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/squad.json @@ -0,0 +1,67 @@ +{ + "squad_name": "生成一份示例目标简报", + "version": "1", + "agents": [ + { + "role": "organizer", + "name": "organizer专员", + "source": "derived", + "base_role": "planner", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "梳理目标背景与输入材料,产出事实与缺口" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "specialist", + "name": "specialist专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "围绕目标开展专业分析与推演" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "writer", + "name": "撰稿员", + "source": "registered", + "backend": "agent-system", + "bash_permission": "deny", + "keywords": [ + "撰写", + "成文", + "报告" + ], + "instructions": "把前序要点与调研结论整理为清晰成文的交付文档。" + }, + { + "role": "leader", + "name": "leader专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "一致性终审与交付把关" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/01_organizer/AGENTS.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/01_organizer/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/01_organizer/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/01_organizer/TASK.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/01_organizer/TASK.md new file mode 100644 index 0000000..6ee614b --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/01_organizer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:梳理目标背景与输入材料,产出事实与缺口 + +- 角色:organizer专员(organizer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/01_organizer/context/goal.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/01_organizer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/01_organizer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/01_organizer/context/index.json b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/01_organizer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/01_organizer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/02_specialist/AGENTS.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/02_specialist/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/02_specialist/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/02_specialist/TASK.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/02_specialist/TASK.md new file mode 100644 index 0000000..73e5b05 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/02_specialist/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:围绕目标开展专业分析与推演 + +- 角色:specialist专员(specialist) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/02_specialist/context/goal.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/02_specialist/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/02_specialist/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/02_specialist/context/index.json b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/02_specialist/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/02_specialist/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/03_writer/AGENTS.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/03_writer/AGENTS.md new file mode 100644 index 0000000..6499104 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/03_writer/AGENTS.md @@ -0,0 +1 @@ +把前序要点与调研结论整理为清晰成文的交付文档。 \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/03_writer/TASK.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/03_writer/TASK.md new file mode 100644 index 0000000..5b776e6 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/03_writer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:汇总各角色产出,撰写交付物初稿 + +- 角色:撰稿员(writer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/03_writer/context/goal.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/03_writer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/03_writer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/03_writer/context/index.json b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/03_writer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/03_writer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/04_leader/AGENTS.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/04_leader/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/04_leader/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/04_leader/TASK.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/04_leader/TASK.md new file mode 100644 index 0000000..7238622 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/04_leader/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:一致性终审与交付把关 + +- 角色:leader专员(leader) +- 期望产出:[output.md] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/04_leader/context/goal.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/04_leader/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/04_leader/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/04_leader/context/index.json b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/04_leader/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/tasks/04_leader/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/template.md b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/template.md new file mode 100644 index 0000000..cba7821 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/template.md @@ -0,0 +1,17 @@ +# 生成一份示例目标简报 + +## 概述与背景 + +(目标、范围与输入材料概述) + +## 核心内容 + +(按目标拆解的核心分析/结果章节) + +## 风险与注意事项 + +(风险、限制与依赖) + +## 基准假设与待确认清单 + +(假设及需人工确认事项) diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/workflow.json b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/workflow.json new file mode 100644 index 0000000..e6a76fe --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/workflow.json @@ -0,0 +1,58 @@ +{ + "workflow_id": "wf_1790706049929670905", + "title": "生成一份示例目标简报", + "planning_mode": "autonomous", + "status": "failed", + "current_step_index": 0, + "steps": [ + { + "id": "step_01_organizer", + "role": "organizer", + "title": "梳理目标背景与输入材料,产出事实与缺口", + "sub_workspace": "tasks/01_organizer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "failed", + "duration_ms": 302, + "error": "missing deliverables: [notes.md fields.json]" + }, + { + "id": "step_02_specialist", + "role": "specialist", + "title": "围绕目标开展专业分析与推演", + "sub_workspace": "tasks/02_specialist", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_03_writer", + "role": "writer", + "title": "汇总各角色产出,撰写交付物初稿", + "sub_workspace": "tasks/03_writer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_04_leader", + "role": "leader", + "title": "一致性终审与交付把关", + "sub_workspace": "tasks/04_leader", + "parallel": false, + "targets": [ + "output.md" + ], + "status": "pending" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/workspace.json b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/workspace.json new file mode 100644 index 0000000..103ced0 --- /dev/null +++ b/internal/server/data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366/workspace.json @@ -0,0 +1,16 @@ +{ + "id": "run_20260929T182049.929636366", + "goal": { + "text": "生成一份示例目标简报" + }, + "status": "executing", + "backend": "agent-system", + "planner": "rule", + "work_dir": "data/squad/run_9631472cbf29/runs/run_20260929T182049.929636366", + "created_at": "2026-09-29T18:20:49.929641005Z", + "updated_at": "2026-09-29T18:20:50.315718482Z", + "metadata": { + "mode": "", + "task_key": "" + } +} \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/blackboard.json b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/blackboard.json new file mode 100644 index 0000000..0a13221 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/blackboard.json @@ -0,0 +1,7 @@ +{ + "facts": null, + "gaps": null, + "implications": null, + "fields": {}, + "updated_at": "2026-09-29T18:19:43.17909913Z" +} \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/context/goal.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/context/index.json b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/pending.json b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/pending.json new file mode 100644 index 0000000..3e14385 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/pending.json @@ -0,0 +1,148 @@ +{ + "request": { + "id": "hr_98299362c636e114", + "run_id": "run_20260929T181943.177695352", + "kind": "confirmation", + "severity": "action_required", + "question": "计划已生成,需要人工确认后执行:", + "options": [ + { + "value": "approve", + "label": "批准并执行" + }, + { + "value": "abort", + "label": "放弃执行" + } + ], + "context": "确认原因:注册表中缺少对应角色,计划包含现场派生的通用角色,请确认编制\n编制:\n- organizer(organizer专员,backend=agent-system model=)\n- specialist(specialist专员,backend=agent-system model=)\n- writer(撰稿员,backend=agent-system model=)\n- leader(leader专员,backend=agent-system model=)\n步骤:\n- step_01_organizer [organizer] 梳理目标背景与输入材料,产出事实与缺口(产出 [notes.md fields.json])\n- step_02_specialist [specialist] 围绕目标开展专业分析与推演(产出 [notes.md fields.json])\n- step_03_writer [writer] 汇总各角色产出,撰写交付物初稿(产出 [notes.md fields.json])\n- step_04_leader [leader] 一致性终审与交付把关(产出 [output.md])", + "created_at": "2026-09-29T18:19:43.178743461Z", + "status": "pending" + }, + "plan": { + "squad": { + "squad_name": "生成一份示例目标简报", + "version": "1", + "agents": [ + { + "role": "organizer", + "name": "organizer专员", + "source": "derived", + "base_role": "planner", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "梳理目标背景与输入材料,产出事实与缺口" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "specialist", + "name": "specialist专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "围绕目标开展专业分析与推演" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "writer", + "name": "撰稿员", + "source": "registered", + "backend": "agent-system", + "bash_permission": "deny", + "keywords": [ + "撰写", + "成文", + "报告" + ], + "instructions": "把前序要点与调研结论整理为清晰成文的交付文档。" + }, + { + "role": "leader", + "name": "leader专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "一致性终审与交付把关" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + } + ] + }, + "workflow": { + "workflow_id": "wf_1790705983177730641", + "title": "生成一份示例目标简报", + "planning_mode": "autonomous", + "status": "pending", + "current_step_index": 0, + "steps": [ + { + "id": "step_01_organizer", + "role": "organizer", + "title": "梳理目标背景与输入材料,产出事实与缺口", + "sub_workspace": "tasks/01_organizer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_02_specialist", + "role": "specialist", + "title": "围绕目标开展专业分析与推演", + "sub_workspace": "tasks/02_specialist", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_03_writer", + "role": "writer", + "title": "汇总各角色产出,撰写交付物初稿", + "sub_workspace": "tasks/03_writer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_04_leader", + "role": "leader", + "title": "一致性终审与交付把关", + "sub_workspace": "tasks/04_leader", + "parallel": false, + "targets": [ + "output.md" + ], + "status": "pending" + } + ] + } + }, + "prev_status": "planning" +} \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/squad.json b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/squad.json new file mode 100644 index 0000000..a6454c7 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/squad.json @@ -0,0 +1,67 @@ +{ + "squad_name": "生成一份示例目标简报", + "version": "1", + "agents": [ + { + "role": "organizer", + "name": "organizer专员", + "source": "derived", + "base_role": "planner", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "梳理目标背景与输入材料,产出事实与缺口" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "specialist", + "name": "specialist专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "围绕目标开展专业分析与推演" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "writer", + "name": "撰稿员", + "source": "registered", + "backend": "agent-system", + "bash_permission": "deny", + "keywords": [ + "撰写", + "成文", + "报告" + ], + "instructions": "把前序要点与调研结论整理为清晰成文的交付文档。" + }, + { + "role": "leader", + "name": "leader专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "一致性终审与交付把关" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/01_organizer/AGENTS.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/01_organizer/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/01_organizer/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/01_organizer/TASK.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/01_organizer/TASK.md new file mode 100644 index 0000000..6ee614b --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/01_organizer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:梳理目标背景与输入材料,产出事实与缺口 + +- 角色:organizer专员(organizer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/01_organizer/context/goal.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/01_organizer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/01_organizer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/01_organizer/context/index.json b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/01_organizer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/01_organizer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/02_specialist/AGENTS.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/02_specialist/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/02_specialist/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/02_specialist/TASK.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/02_specialist/TASK.md new file mode 100644 index 0000000..73e5b05 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/02_specialist/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:围绕目标开展专业分析与推演 + +- 角色:specialist专员(specialist) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/02_specialist/context/goal.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/02_specialist/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/02_specialist/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/02_specialist/context/index.json b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/02_specialist/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/02_specialist/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/03_writer/AGENTS.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/03_writer/AGENTS.md new file mode 100644 index 0000000..6499104 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/03_writer/AGENTS.md @@ -0,0 +1 @@ +把前序要点与调研结论整理为清晰成文的交付文档。 \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/03_writer/TASK.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/03_writer/TASK.md new file mode 100644 index 0000000..5b776e6 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/03_writer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:汇总各角色产出,撰写交付物初稿 + +- 角色:撰稿员(writer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/03_writer/context/goal.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/03_writer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/03_writer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/03_writer/context/index.json b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/03_writer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/03_writer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/04_leader/AGENTS.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/04_leader/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/04_leader/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/04_leader/TASK.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/04_leader/TASK.md new file mode 100644 index 0000000..7238622 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/04_leader/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:一致性终审与交付把关 + +- 角色:leader专员(leader) +- 期望产出:[output.md] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/04_leader/context/goal.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/04_leader/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/04_leader/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/04_leader/context/index.json b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/04_leader/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/tasks/04_leader/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/template.md b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/template.md new file mode 100644 index 0000000..cba7821 --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/template.md @@ -0,0 +1,17 @@ +# 生成一份示例目标简报 + +## 概述与背景 + +(目标、范围与输入材料概述) + +## 核心内容 + +(按目标拆解的核心分析/结果章节) + +## 风险与注意事项 + +(风险、限制与依赖) + +## 基准假设与待确认清单 + +(假设及需人工确认事项) diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/workflow.json b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/workflow.json new file mode 100644 index 0000000..fafba5b --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/workflow.json @@ -0,0 +1,56 @@ +{ + "workflow_id": "wf_1790705983177730641", + "title": "生成一份示例目标简报", + "planning_mode": "autonomous", + "status": "pending", + "current_step_index": 0, + "steps": [ + { + "id": "step_01_organizer", + "role": "organizer", + "title": "梳理目标背景与输入材料,产出事实与缺口", + "sub_workspace": "tasks/01_organizer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_02_specialist", + "role": "specialist", + "title": "围绕目标开展专业分析与推演", + "sub_workspace": "tasks/02_specialist", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_03_writer", + "role": "writer", + "title": "汇总各角色产出,撰写交付物初稿", + "sub_workspace": "tasks/03_writer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_04_leader", + "role": "leader", + "title": "一致性终审与交付把关", + "sub_workspace": "tasks/04_leader", + "parallel": false, + "targets": [ + "output.md" + ], + "status": "pending" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/workspace.json b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/workspace.json new file mode 100644 index 0000000..adebfdb --- /dev/null +++ b/internal/server/data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352/workspace.json @@ -0,0 +1,16 @@ +{ + "id": "run_20260929T181943.177695352", + "goal": { + "text": "生成一份示例目标简报" + }, + "status": "awaiting_confirmation", + "backend": "agent-system", + "planner": "rule", + "work_dir": "data/squad/run_b39c72838bea/runs/run_20260929T181943.177695352", + "created_at": "2026-09-29T18:19:43.177700601Z", + "updated_at": "2026-09-29T18:19:43.178809259Z", + "metadata": { + "mode": "", + "task_key": "" + } +} \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/blackboard.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/blackboard.json new file mode 100644 index 0000000..afef198 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/blackboard.json @@ -0,0 +1,7 @@ +{ + "facts": null, + "gaps": null, + "implications": null, + "fields": {}, + "updated_at": "2026-09-29T18:25:32.531061715Z" +} \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/context/goal.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/context/index.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/manifest.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/manifest.json new file mode 100644 index 0000000..e80e755 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/manifest.json @@ -0,0 +1,49 @@ +{ + "manifest_version": "1", + "workspace_id": "run_20260929T182531.236865744", + "generated_at": "2026-09-29T18:25:32.531381136Z", + "deliverable": "output.md", + "files": { + "blackboard.json": "1b073ad91b80cd6fe5e7d1ef6cd67117328af659d470c47f2c6e1495cdc3c569", + "context/goal.md": "5d6a524d3a8acafc730f04ebca921b8453aee5fe2584c78bb420aabc6083c1bd", + "context/index.json": "7042a4bc5f4d43ef263086f58a3463280f485846f9fd1917d6c12077247058ac", + "output.md": "6654f2c2024f05829906f0c49a2f2c5ce114974d215e133df39fac73b1dbe9a4", + "squad.json": "59ca9f21bfb6fac18af40b2b0ff05b2729bdcac1832faf68ef1a44e35deb693f", + "tasks/01_organizer/AGENTS.md": "958e0613940214265b80d4ffbb1c07c2e8b8dd70ccf2ceeb94b54a48301868b2", + "tasks/01_organizer/TASK.md": "3000f223330f27203704da2e5697f7c9122cfdabb1f283d9fe0b475f3e855d2d", + "tasks/01_organizer/context/goal.md": "5d6a524d3a8acafc730f04ebca921b8453aee5fe2584c78bb420aabc6083c1bd", + "tasks/01_organizer/context/index.json": "7042a4bc5f4d43ef263086f58a3463280f485846f9fd1917d6c12077247058ac", + "tasks/01_organizer/execution.log": "a1d090df6e153c33769e42d713a1e95b0fbd07437dd3f719a5c399ddc5108180", + "tasks/01_organizer/fields.json": "6e755683ebb625625cfb88393388a05c6ae90c8b1b7de7d20c56df9fa5a4252c", + "tasks/01_organizer/notes.md": "6e755683ebb625625cfb88393388a05c6ae90c8b1b7de7d20c56df9fa5a4252c", + "tasks/02_specialist/AGENTS.md": "958e0613940214265b80d4ffbb1c07c2e8b8dd70ccf2ceeb94b54a48301868b2", + "tasks/02_specialist/TASK.md": "992b95672a682325f64bf818f0fab9b357ca1646905a86fa264ffdaf2e407909", + "tasks/02_specialist/context/goal.md": "5d6a524d3a8acafc730f04ebca921b8453aee5fe2584c78bb420aabc6083c1bd", + "tasks/02_specialist/context/index.json": "7042a4bc5f4d43ef263086f58a3463280f485846f9fd1917d6c12077247058ac", + "tasks/02_specialist/execution.log": "1531696b228f27d902a8ffecf5c7086f099d9c39b9253c9dc5c91192444428c9", + "tasks/02_specialist/fields.json": "1208130c7b1863efc54e824846f93ea32aa98075234b4fc5a49966292390ecfe", + "tasks/02_specialist/notes.md": "1208130c7b1863efc54e824846f93ea32aa98075234b4fc5a49966292390ecfe", + "tasks/03_writer/AGENTS.md": "d70c21a86fcb7688ed93972e40be1c96f01dab95fb890cc0f3810e3e291d56dd", + "tasks/03_writer/TASK.md": "90bc97e710cd7d3a90f097e012d5aa3bfc56af774c12f202e97cbb7af7171bf9", + "tasks/03_writer/context/goal.md": "5d6a524d3a8acafc730f04ebca921b8453aee5fe2584c78bb420aabc6083c1bd", + "tasks/03_writer/context/index.json": "7042a4bc5f4d43ef263086f58a3463280f485846f9fd1917d6c12077247058ac", + "tasks/03_writer/execution.log": "e93281e2d943b07a1230a390c85047462604c0614116349e88a85ce75192cdd7", + "tasks/03_writer/fields.json": "963545c8015d2aaf86f7f01ab7f195b35c2344a27841577c6aa22313067a3bf0", + "tasks/03_writer/notes.md": "963545c8015d2aaf86f7f01ab7f195b35c2344a27841577c6aa22313067a3bf0", + "tasks/04_leader/AGENTS.md": "958e0613940214265b80d4ffbb1c07c2e8b8dd70ccf2ceeb94b54a48301868b2", + "tasks/04_leader/TASK.md": "3f1c4d4fd84c47a972bac367096491b2aec33f4df4da5aa70b136fe3ebe7dc13", + "tasks/04_leader/context/goal.md": "5d6a524d3a8acafc730f04ebca921b8453aee5fe2584c78bb420aabc6083c1bd", + "tasks/04_leader/context/index.json": "7042a4bc5f4d43ef263086f58a3463280f485846f9fd1917d6c12077247058ac", + "tasks/04_leader/execution.log": "51f162c211d33f3cf92037f1f58a7b50d802e85bedeb98eae7a7a651a193d36f", + "tasks/04_leader/output.md": "6654f2c2024f05829906f0c49a2f2c5ce114974d215e133df39fac73b1dbe9a4", + "template.md": "61476aa1560945318d32dc22b8d65f35d785c44fc880324895c221951faa3e2c", + "workflow.json": "05cb8d6437f4fd5da24a94919b35a65a8bbf9bcc7b0866a1a610902e32f078b3", + "workspace.json": "64e0e7bde9d92e543c613258d052d0e95fdb613763411c8ace21805a500231a8" + }, + "quality_report": { + "passed": true, + "score": 100, + "checked_at": "2026-09-29T18:25:32.529750624Z" + }, + "duration_ms": 1294 +} \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/output.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/output.md new file mode 100644 index 0000000..29a4a85 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/output.md @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:一致性终审与交付把关 + +- 角色:leader专员(leader) +- 期望产出:[output.md] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/squad.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/squad.json new file mode 100644 index 0000000..a6454c7 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/squad.json @@ -0,0 +1,67 @@ +{ + "squad_name": "生成一份示例目标简报", + "version": "1", + "agents": [ + { + "role": "organizer", + "name": "organizer专员", + "source": "derived", + "base_role": "planner", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "梳理目标背景与输入材料,产出事实与缺口" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "specialist", + "name": "specialist专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "围绕目标开展专业分析与推演" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "writer", + "name": "撰稿员", + "source": "registered", + "backend": "agent-system", + "bash_permission": "deny", + "keywords": [ + "撰写", + "成文", + "报告" + ], + "instructions": "把前序要点与调研结论整理为清晰成文的交付文档。" + }, + { + "role": "leader", + "name": "leader专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "一致性终审与交付把关" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/AGENTS.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/TASK.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/TASK.md new file mode 100644 index 0000000..6ee614b --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:梳理目标背景与输入材料,产出事实与缺口 + +- 角色:organizer专员(organizer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/context/goal.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/context/index.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/execution.log b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/execution.log new file mode 100644 index 0000000..0d2cc63 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/execution.log @@ -0,0 +1 @@ +[2026-09-29T18:25:31Z] backend=agent-system duration=301ms targets=[notes.md fields.json] diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/fields.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/fields.json new file mode 100644 index 0000000..4ca6b8a --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/fields.json @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:梳理目标背景与输入材料,产出事实与缺口 + +- 角色:organizer专员(organizer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/notes.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/notes.md new file mode 100644 index 0000000..4ca6b8a --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/01_organizer/notes.md @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:梳理目标背景与输入材料,产出事实与缺口 + +- 角色:organizer专员(organizer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/AGENTS.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/TASK.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/TASK.md new file mode 100644 index 0000000..73e5b05 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:围绕目标开展专业分析与推演 + +- 角色:specialist专员(specialist) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/context/goal.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/context/index.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/execution.log b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/execution.log new file mode 100644 index 0000000..2d44d8d --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/execution.log @@ -0,0 +1 @@ +[2026-09-29T18:25:31Z] backend=agent-system duration=302ms targets=[notes.md fields.json] diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/fields.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/fields.json new file mode 100644 index 0000000..e961d71 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/fields.json @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:围绕目标开展专业分析与推演 + +- 角色:specialist专员(specialist) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/notes.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/notes.md new file mode 100644 index 0000000..e961d71 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/02_specialist/notes.md @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:围绕目标开展专业分析与推演 + +- 角色:specialist专员(specialist) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/AGENTS.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/AGENTS.md new file mode 100644 index 0000000..6499104 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/AGENTS.md @@ -0,0 +1 @@ +把前序要点与调研结论整理为清晰成文的交付文档。 \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/TASK.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/TASK.md new file mode 100644 index 0000000..5b776e6 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:汇总各角色产出,撰写交付物初稿 + +- 角色:撰稿员(writer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/context/goal.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/context/index.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/execution.log b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/execution.log new file mode 100644 index 0000000..20457ca --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/execution.log @@ -0,0 +1 @@ +[2026-09-29T18:25:32Z] backend=agent-system duration=302ms targets=[notes.md fields.json] diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/fields.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/fields.json new file mode 100644 index 0000000..dada1f7 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/fields.json @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:汇总各角色产出,撰写交付物初稿 + +- 角色:撰稿员(writer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/notes.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/notes.md new file mode 100644 index 0000000..dada1f7 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/03_writer/notes.md @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:汇总各角色产出,撰写交付物初稿 + +- 角色:撰稿员(writer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/AGENTS.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/TASK.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/TASK.md new file mode 100644 index 0000000..7238622 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:一致性终审与交付把关 + +- 角色:leader专员(leader) +- 期望产出:[output.md] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/context/goal.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/context/index.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/execution.log b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/execution.log new file mode 100644 index 0000000..23e3602 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/execution.log @@ -0,0 +1 @@ +[2026-09-29T18:25:32Z] backend=agent-system duration=302ms targets=[output.md] diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/output.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/output.md new file mode 100644 index 0000000..29a4a85 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/tasks/04_leader/output.md @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:一致性终审与交付把关 + +- 角色:leader专员(leader) +- 期望产出:[output.md] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/template.md b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/template.md new file mode 100644 index 0000000..cba7821 --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/template.md @@ -0,0 +1,17 @@ +# 生成一份示例目标简报 + +## 概述与背景 + +(目标、范围与输入材料概述) + +## 核心内容 + +(按目标拆解的核心分析/结果章节) + +## 风险与注意事项 + +(风险、限制与依赖) + +## 基准假设与待确认清单 + +(假设及需人工确认事项) diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/workflow.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/workflow.json new file mode 100644 index 0000000..1ef569e --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/workflow.json @@ -0,0 +1,60 @@ +{ + "workflow_id": "wf_1790706331236902723", + "title": "生成一份示例目标简报", + "planning_mode": "autonomous", + "status": "completed", + "current_step_index": 0, + "steps": [ + { + "id": "step_01_organizer", + "role": "organizer", + "title": "梳理目标背景与输入材料,产出事实与缺口", + "sub_workspace": "tasks/01_organizer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "completed", + "duration_ms": 301 + }, + { + "id": "step_02_specialist", + "role": "specialist", + "title": "围绕目标开展专业分析与推演", + "sub_workspace": "tasks/02_specialist", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "completed", + "duration_ms": 302 + }, + { + "id": "step_03_writer", + "role": "writer", + "title": "汇总各角色产出,撰写交付物初稿", + "sub_workspace": "tasks/03_writer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "completed", + "duration_ms": 302 + }, + { + "id": "step_04_leader", + "role": "leader", + "title": "一致性终审与交付把关", + "sub_workspace": "tasks/04_leader", + "parallel": false, + "targets": [ + "output.md" + ], + "status": "completed", + "duration_ms": 302 + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/workspace.json b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/workspace.json new file mode 100644 index 0000000..fd3b1fc --- /dev/null +++ b/internal/server/data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744/workspace.json @@ -0,0 +1,17 @@ +{ + "id": "run_20260929T182531.236865744", + "goal": { + "text": "生成一份示例目标简报" + }, + "status": "completed", + "backend": "agent-system", + "planner": "rule", + "work_dir": "data/squad/run_c39a8ac8ca9d/runs/run_20260929T182531.236865744", + "created_at": "2026-09-29T18:25:31.236871294Z", + "updated_at": "2026-09-29T18:25:32.529785303Z", + "completed_at": "2026-09-29T18:25:32.529785233Z", + "metadata": { + "mode": "", + "task_key": "" + } +} \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/blackboard.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/blackboard.json new file mode 100644 index 0000000..b1fdb6a --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/blackboard.json @@ -0,0 +1,7 @@ +{ + "facts": null, + "gaps": null, + "implications": null, + "fields": {}, + "updated_at": "2026-09-29T18:27:35.257546177Z" +} \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/context/goal.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/context/index.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/manifest.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/manifest.json new file mode 100644 index 0000000..da79acf --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/manifest.json @@ -0,0 +1,49 @@ +{ + "manifest_version": "1", + "workspace_id": "run_20260929T182733.965448613", + "generated_at": "2026-09-29T18:27:35.257842789Z", + "deliverable": "output.md", + "files": { + "blackboard.json": "15491c97d89438d1758d08fa2a6c316d374774ace231cd94e2570e5dcdc8ffd3", + "context/goal.md": "5d6a524d3a8acafc730f04ebca921b8453aee5fe2584c78bb420aabc6083c1bd", + "context/index.json": "7042a4bc5f4d43ef263086f58a3463280f485846f9fd1917d6c12077247058ac", + "output.md": "6654f2c2024f05829906f0c49a2f2c5ce114974d215e133df39fac73b1dbe9a4", + "squad.json": "59ca9f21bfb6fac18af40b2b0ff05b2729bdcac1832faf68ef1a44e35deb693f", + "tasks/01_organizer/AGENTS.md": "958e0613940214265b80d4ffbb1c07c2e8b8dd70ccf2ceeb94b54a48301868b2", + "tasks/01_organizer/TASK.md": "3000f223330f27203704da2e5697f7c9122cfdabb1f283d9fe0b475f3e855d2d", + "tasks/01_organizer/context/goal.md": "5d6a524d3a8acafc730f04ebca921b8453aee5fe2584c78bb420aabc6083c1bd", + "tasks/01_organizer/context/index.json": "7042a4bc5f4d43ef263086f58a3463280f485846f9fd1917d6c12077247058ac", + "tasks/01_organizer/execution.log": "01023f3e21f9a455ae90705f0a5d8b5672c51a7f6fac32acb316c08a2fffda5b", + "tasks/01_organizer/fields.json": "6e755683ebb625625cfb88393388a05c6ae90c8b1b7de7d20c56df9fa5a4252c", + "tasks/01_organizer/notes.md": "6e755683ebb625625cfb88393388a05c6ae90c8b1b7de7d20c56df9fa5a4252c", + "tasks/02_specialist/AGENTS.md": "958e0613940214265b80d4ffbb1c07c2e8b8dd70ccf2ceeb94b54a48301868b2", + "tasks/02_specialist/TASK.md": "992b95672a682325f64bf818f0fab9b357ca1646905a86fa264ffdaf2e407909", + "tasks/02_specialist/context/goal.md": "5d6a524d3a8acafc730f04ebca921b8453aee5fe2584c78bb420aabc6083c1bd", + "tasks/02_specialist/context/index.json": "7042a4bc5f4d43ef263086f58a3463280f485846f9fd1917d6c12077247058ac", + "tasks/02_specialist/execution.log": "c26489742c683e242c426fa4b048a782f8f7e140399bb021540db3f79be2dc83", + "tasks/02_specialist/fields.json": "1208130c7b1863efc54e824846f93ea32aa98075234b4fc5a49966292390ecfe", + "tasks/02_specialist/notes.md": "1208130c7b1863efc54e824846f93ea32aa98075234b4fc5a49966292390ecfe", + "tasks/03_writer/AGENTS.md": "d70c21a86fcb7688ed93972e40be1c96f01dab95fb890cc0f3810e3e291d56dd", + "tasks/03_writer/TASK.md": "90bc97e710cd7d3a90f097e012d5aa3bfc56af774c12f202e97cbb7af7171bf9", + "tasks/03_writer/context/goal.md": "5d6a524d3a8acafc730f04ebca921b8453aee5fe2584c78bb420aabc6083c1bd", + "tasks/03_writer/context/index.json": "7042a4bc5f4d43ef263086f58a3463280f485846f9fd1917d6c12077247058ac", + "tasks/03_writer/execution.log": "c26489742c683e242c426fa4b048a782f8f7e140399bb021540db3f79be2dc83", + "tasks/03_writer/fields.json": "963545c8015d2aaf86f7f01ab7f195b35c2344a27841577c6aa22313067a3bf0", + "tasks/03_writer/notes.md": "963545c8015d2aaf86f7f01ab7f195b35c2344a27841577c6aa22313067a3bf0", + "tasks/04_leader/AGENTS.md": "958e0613940214265b80d4ffbb1c07c2e8b8dd70ccf2ceeb94b54a48301868b2", + "tasks/04_leader/TASK.md": "3f1c4d4fd84c47a972bac367096491b2aec33f4df4da5aa70b136fe3ebe7dc13", + "tasks/04_leader/context/goal.md": "5d6a524d3a8acafc730f04ebca921b8453aee5fe2584c78bb420aabc6083c1bd", + "tasks/04_leader/context/index.json": "7042a4bc5f4d43ef263086f58a3463280f485846f9fd1917d6c12077247058ac", + "tasks/04_leader/execution.log": "019aa41d31da1bd92eb0ccd2a945d35d1b631a2bc8abb35f6ba22de5e874d6bc", + "tasks/04_leader/output.md": "6654f2c2024f05829906f0c49a2f2c5ce114974d215e133df39fac73b1dbe9a4", + "template.md": "61476aa1560945318d32dc22b8d65f35d785c44fc880324895c221951faa3e2c", + "workflow.json": "be8c385c8ed4c053e092ed401061fca925cf439e8b179b3213249983bd82b541", + "workspace.json": "65290b8ce6bef2b3e3d9fcb5f54ab90b0fef194079db0a63c9f4ec68f2f7e38f" + }, + "quality_report": { + "passed": true, + "score": 100, + "checked_at": "2026-09-29T18:27:35.257403022Z" + }, + "duration_ms": 1292 +} \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/output.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/output.md new file mode 100644 index 0000000..29a4a85 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/output.md @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:一致性终审与交付把关 + +- 角色:leader专员(leader) +- 期望产出:[output.md] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/squad.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/squad.json new file mode 100644 index 0000000..a6454c7 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/squad.json @@ -0,0 +1,67 @@ +{ + "squad_name": "生成一份示例目标简报", + "version": "1", + "agents": [ + { + "role": "organizer", + "name": "organizer专员", + "source": "derived", + "base_role": "planner", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "梳理目标背景与输入材料,产出事实与缺口" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "specialist", + "name": "specialist专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "围绕目标开展专业分析与推演" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "writer", + "name": "撰稿员", + "source": "registered", + "backend": "agent-system", + "bash_permission": "deny", + "keywords": [ + "撰写", + "成文", + "报告" + ], + "instructions": "把前序要点与调研结论整理为清晰成文的交付文档。" + }, + { + "role": "leader", + "name": "leader专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "一致性终审与交付把关" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/AGENTS.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/TASK.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/TASK.md new file mode 100644 index 0000000..6ee614b --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:梳理目标背景与输入材料,产出事实与缺口 + +- 角色:organizer专员(organizer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/context/goal.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/context/index.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/execution.log b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/execution.log new file mode 100644 index 0000000..d85aa06 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/execution.log @@ -0,0 +1 @@ +[2026-09-29T18:27:34Z] backend=agent-system duration=301ms targets=[notes.md fields.json] diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/fields.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/fields.json new file mode 100644 index 0000000..4ca6b8a --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/fields.json @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:梳理目标背景与输入材料,产出事实与缺口 + +- 角色:organizer专员(organizer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/notes.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/notes.md new file mode 100644 index 0000000..4ca6b8a --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/01_organizer/notes.md @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:梳理目标背景与输入材料,产出事实与缺口 + +- 角色:organizer专员(organizer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/AGENTS.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/TASK.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/TASK.md new file mode 100644 index 0000000..73e5b05 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:围绕目标开展专业分析与推演 + +- 角色:specialist专员(specialist) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/context/goal.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/context/index.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/execution.log b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/execution.log new file mode 100644 index 0000000..54b2579 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/execution.log @@ -0,0 +1 @@ +[2026-09-29T18:27:34Z] backend=agent-system duration=302ms targets=[notes.md fields.json] diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/fields.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/fields.json new file mode 100644 index 0000000..e961d71 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/fields.json @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:围绕目标开展专业分析与推演 + +- 角色:specialist专员(specialist) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/notes.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/notes.md new file mode 100644 index 0000000..e961d71 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/02_specialist/notes.md @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:围绕目标开展专业分析与推演 + +- 角色:specialist专员(specialist) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/AGENTS.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/AGENTS.md new file mode 100644 index 0000000..6499104 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/AGENTS.md @@ -0,0 +1 @@ +把前序要点与调研结论整理为清晰成文的交付文档。 \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/TASK.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/TASK.md new file mode 100644 index 0000000..5b776e6 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:汇总各角色产出,撰写交付物初稿 + +- 角色:撰稿员(writer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/context/goal.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/context/index.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/execution.log b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/execution.log new file mode 100644 index 0000000..54b2579 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/execution.log @@ -0,0 +1 @@ +[2026-09-29T18:27:34Z] backend=agent-system duration=302ms targets=[notes.md fields.json] diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/fields.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/fields.json new file mode 100644 index 0000000..dada1f7 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/fields.json @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:汇总各角色产出,撰写交付物初稿 + +- 角色:撰稿员(writer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/notes.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/notes.md new file mode 100644 index 0000000..dada1f7 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/03_writer/notes.md @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:汇总各角色产出,撰写交付物初稿 + +- 角色:撰稿员(writer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/AGENTS.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/TASK.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/TASK.md new file mode 100644 index 0000000..7238622 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:一致性终审与交付把关 + +- 角色:leader专员(leader) +- 期望产出:[output.md] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/context/goal.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/context/index.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/execution.log b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/execution.log new file mode 100644 index 0000000..c12a9cc --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/execution.log @@ -0,0 +1 @@ +[2026-09-29T18:27:35Z] backend=agent-system duration=301ms targets=[output.md] diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/output.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/output.md new file mode 100644 index 0000000..29a4a85 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/tasks/04_leader/output.md @@ -0,0 +1,26 @@ +# 子代理产出(mock) + +任务:# 步骤任务:一致性终审与交付把关 + +- 角色:leader专员(leader) +- 期望产出:[output.md] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 + +- 已按子代理角色完成处理 +- 本文本将作为小队步骤的交付物写入工作区 +- 任务树与中间过程可在右栏与弹窗查看 diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/template.md b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/template.md new file mode 100644 index 0000000..cba7821 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/template.md @@ -0,0 +1,17 @@ +# 生成一份示例目标简报 + +## 概述与背景 + +(目标、范围与输入材料概述) + +## 核心内容 + +(按目标拆解的核心分析/结果章节) + +## 风险与注意事项 + +(风险、限制与依赖) + +## 基准假设与待确认清单 + +(假设及需人工确认事项) diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/workflow.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/workflow.json new file mode 100644 index 0000000..b27a8e4 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/workflow.json @@ -0,0 +1,60 @@ +{ + "workflow_id": "wf_1790706453965482142", + "title": "生成一份示例目标简报", + "planning_mode": "autonomous", + "status": "completed", + "current_step_index": 0, + "steps": [ + { + "id": "step_01_organizer", + "role": "organizer", + "title": "梳理目标背景与输入材料,产出事实与缺口", + "sub_workspace": "tasks/01_organizer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "completed", + "duration_ms": 301 + }, + { + "id": "step_02_specialist", + "role": "specialist", + "title": "围绕目标开展专业分析与推演", + "sub_workspace": "tasks/02_specialist", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "completed", + "duration_ms": 302 + }, + { + "id": "step_03_writer", + "role": "writer", + "title": "汇总各角色产出,撰写交付物初稿", + "sub_workspace": "tasks/03_writer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "completed", + "duration_ms": 302 + }, + { + "id": "step_04_leader", + "role": "leader", + "title": "一致性终审与交付把关", + "sub_workspace": "tasks/04_leader", + "parallel": false, + "targets": [ + "output.md" + ], + "status": "completed", + "duration_ms": 301 + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/workspace.json b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/workspace.json new file mode 100644 index 0000000..772fae1 --- /dev/null +++ b/internal/server/data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613/workspace.json @@ -0,0 +1,17 @@ +{ + "id": "run_20260929T182733.965448613", + "goal": { + "text": "生成一份示例目标简报" + }, + "status": "completed", + "backend": "agent-system", + "planner": "rule", + "work_dir": "data/squad/run_ed0d072f5b47/runs/run_20260929T182733.965448613", + "created_at": "2026-09-29T18:27:33.965454523Z", + "updated_at": "2026-09-29T18:27:35.2574423Z", + "completed_at": "2026-09-29T18:27:35.2574421Z", + "metadata": { + "mode": "", + "task_key": "" + } +} \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/blackboard.json b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/blackboard.json new file mode 100644 index 0000000..e1bee3b --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/blackboard.json @@ -0,0 +1,7 @@ +{ + "facts": null, + "gaps": null, + "implications": null, + "fields": {}, + "updated_at": "2026-09-29T18:22:13.934119854Z" +} \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/context/goal.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/context/index.json b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/squad.json b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/squad.json new file mode 100644 index 0000000..a6454c7 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/squad.json @@ -0,0 +1,67 @@ +{ + "squad_name": "生成一份示例目标简报", + "version": "1", + "agents": [ + { + "role": "organizer", + "name": "organizer专员", + "source": "derived", + "base_role": "planner", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "梳理目标背景与输入材料,产出事实与缺口" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "specialist", + "name": "specialist专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "围绕目标开展专业分析与推演" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + }, + { + "role": "writer", + "name": "撰稿员", + "source": "registered", + "backend": "agent-system", + "bash_permission": "deny", + "keywords": [ + "撰写", + "成文", + "报告" + ], + "instructions": "把前序要点与调研结论整理为清晰成文的交付文档。" + }, + { + "role": "leader", + "name": "leader专员", + "source": "derived", + "base_role": "organizer", + "backend": "agent-system", + "bash_permission": "deny", + "responsibilities": [ + "一致性终审与交付把关" + ], + "forbidden_actions": [ + "严禁违规越权执行未经规划的破坏性命令", + "严禁直接代用户做终审拍板" + ], + "instructions": "梳理目标与材料,产出结构化要点与执行建议。" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/01_organizer/AGENTS.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/01_organizer/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/01_organizer/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/01_organizer/TASK.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/01_organizer/TASK.md new file mode 100644 index 0000000..6ee614b --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/01_organizer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:梳理目标背景与输入材料,产出事实与缺口 + +- 角色:organizer专员(organizer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/01_organizer/context/goal.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/01_organizer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/01_organizer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/01_organizer/context/index.json b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/01_organizer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/01_organizer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/02_specialist/AGENTS.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/02_specialist/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/02_specialist/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/02_specialist/TASK.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/02_specialist/TASK.md new file mode 100644 index 0000000..73e5b05 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/02_specialist/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:围绕目标开展专业分析与推演 + +- 角色:specialist专员(specialist) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/02_specialist/context/goal.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/02_specialist/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/02_specialist/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/02_specialist/context/index.json b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/02_specialist/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/02_specialist/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/03_writer/AGENTS.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/03_writer/AGENTS.md new file mode 100644 index 0000000..6499104 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/03_writer/AGENTS.md @@ -0,0 +1 @@ +把前序要点与调研结论整理为清晰成文的交付文档。 \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/03_writer/TASK.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/03_writer/TASK.md new file mode 100644 index 0000000..5b776e6 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/03_writer/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:汇总各角色产出,撰写交付物初稿 + +- 角色:撰稿员(writer) +- 期望产出:[notes.md fields.json] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/03_writer/context/goal.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/03_writer/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/03_writer/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/03_writer/context/index.json b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/03_writer/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/03_writer/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/04_leader/AGENTS.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/04_leader/AGENTS.md new file mode 100644 index 0000000..1853163 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/04_leader/AGENTS.md @@ -0,0 +1 @@ +梳理目标与材料,产出结构化要点与执行建议。 \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/04_leader/TASK.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/04_leader/TASK.md new file mode 100644 index 0000000..7238622 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/04_leader/TASK.md @@ -0,0 +1,20 @@ +# 步骤任务:一致性终审与交付把关 + +- 角色:leader专员(leader) +- 期望产出:[output.md] + +## 任务上下文资源与权威等级(已快照到本目录,只引用本地路径) + +| 资源路径 | 权威等级 | 用途说明 | 使用与引用指导 | +|---|---|---|---| +| `context/goal.md` | **authoritative** | 运行目标 | 不可推翻 | +| `context/goal.md` | **authoritative** | 运行目标与约束 | 不可推翻;所有产出须与目标一致 | + +## 黑板快照(共享状态) + + +## 产出要求 + +1. 按期望产出文件名落盘到本子目录; +2. 结构化事实回填 `fields.json`(字符串键值); +3. 发现信息缺口且无法假设时写 `gaps.json`([{"item":"…","blocking":true}])。 diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/04_leader/context/goal.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/04_leader/context/goal.md new file mode 100644 index 0000000..6c621ab --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/04_leader/context/goal.md @@ -0,0 +1,3 @@ +# 运行目标 + +生成一份示例目标简报 diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/04_leader/context/index.json b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/04_leader/context/index.json new file mode 100644 index 0000000..8ff6424 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/tasks/04_leader/context/index.json @@ -0,0 +1,10 @@ +{ + "context_items": [ + { + "file": "context/goal.md", + "description": "运行目标与约束", + "authority_level": "authoritative", + "guidance": "不可推翻;所有产出须与目标一致" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/template.md b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/template.md new file mode 100644 index 0000000..cba7821 --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/template.md @@ -0,0 +1,17 @@ +# 生成一份示例目标简报 + +## 概述与背景 + +(目标、范围与输入材料概述) + +## 核心内容 + +(按目标拆解的核心分析/结果章节) + +## 风险与注意事项 + +(风险、限制与依赖) + +## 基准假设与待确认清单 + +(假设及需人工确认事项) diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/workflow.json b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/workflow.json new file mode 100644 index 0000000..42ca1ca --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/workflow.json @@ -0,0 +1,58 @@ +{ + "workflow_id": "wf_1790706133548982439", + "title": "生成一份示例目标简报", + "planning_mode": "autonomous", + "status": "failed", + "current_step_index": 0, + "steps": [ + { + "id": "step_01_organizer", + "role": "organizer", + "title": "梳理目标背景与输入材料,产出事实与缺口", + "sub_workspace": "tasks/01_organizer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "failed", + "duration_ms": 302, + "error": "missing deliverables: [notes.md fields.json]" + }, + { + "id": "step_02_specialist", + "role": "specialist", + "title": "围绕目标开展专业分析与推演", + "sub_workspace": "tasks/02_specialist", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_03_writer", + "role": "writer", + "title": "汇总各角色产出,撰写交付物初稿", + "sub_workspace": "tasks/03_writer", + "parallel": false, + "targets": [ + "notes.md", + "fields.json" + ], + "status": "pending" + }, + { + "id": "step_04_leader", + "role": "leader", + "title": "一致性终审与交付把关", + "sub_workspace": "tasks/04_leader", + "parallel": false, + "targets": [ + "output.md" + ], + "status": "pending" + } + ] +} \ No newline at end of file diff --git a/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/workspace.json b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/workspace.json new file mode 100644 index 0000000..dfd5b4d --- /dev/null +++ b/internal/server/data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150/workspace.json @@ -0,0 +1,16 @@ +{ + "id": "run_20260929T182213.548946150", + "goal": { + "text": "生成一份示例目标简报" + }, + "status": "executing", + "backend": "agent-system", + "planner": "rule", + "work_dir": "data/squad/run_f77e68b8c36b/runs/run_20260929T182213.548946150", + "created_at": "2026-09-29T18:22:13.54895301Z", + "updated_at": "2026-09-29T18:22:13.93391024Z", + "metadata": { + "mode": "", + "task_key": "" + } +} \ No newline at end of file diff --git a/internal/server/e2e_test.go b/internal/server/e2e_test.go index af62b71..3a36769 100644 --- a/internal/server/e2e_test.go +++ b/internal/server/e2e_test.go @@ -128,7 +128,7 @@ func waitRunTerminal(t *testing.T, h http.Handler, runID string, timeout time.Du } func TestMockConversationFlow(t *testing.T) { - srv, _ := newTestServer(t) + srv, st := newTestServer(t) h := srv.Handler() _, convID := setupConversation(t, h) runID := postMessage(t, h, convID, "你好,骨架测试") @@ -164,6 +164,31 @@ func TestMockConversationFlow(t *testing.T) { if detail["lastSeq"].(float64) <= 0 { t.Error("lastSeq should be positive") } + // 上下文组装观测随 run.completed 事件下发(4.10/4.17 可解释性)。 + evs := replayEvents(t, st, convID) + found := false + for _, e := range evs { + if e.Type != core.EvRunCompleted { + continue + } + var p core.RunCompletedPayload + if json.Unmarshal(e.Payload, &p) == nil && p.Context != nil && len(p.Context.Items) > 0 { + found = true + } + } + if !found { + t.Error("run.completed payload missing context observation") + } +} + +// replayEvents 经 store 重放事件(SSE 重放的数据同源)。 +func replayEvents(t *testing.T, st *store.Store, convID string) []core.StreamEvent { + t.Helper() + evs, err := st.EventsAfter(convID, 0, 1000) + if err != nil { + t.Fatal(err) + } + return evs } func TestHITLChoiceFlow(t *testing.T) { @@ -491,3 +516,147 @@ func TestHITLIntentPivot(t *testing.T) { t.Fatalf("suspended run should cancel on intent pivot, got %v", terminal["status"]) } } + +// TestSquadOrchestration:Agent-Squad 引擎真实驱动——规则规划器四阶段计划、 +// 每步经 "agent-system" 后端派生子代理(任务树)、计划事件、交付物工件。 +func TestSquadOrchestration(t *testing.T) { + srv, _ := newTestServer(t) + h := srv.Handler() + projectID, convID := setupConversation(t, h) + runID := postMessage(t, h, convID, "#squad 生成一份示例目标简报") + + // 编排可能挂起征求确认(规则规划器派生角色时 NeedsConfirmation): + // 自动以首个选项(approve)应答出现的卡片,直至 run 终态。 + stop := make(chan struct{}) + go func() { + for { + select { + case <-stop: + return + default: + } + _, d := doJSON(t, h, "GET", "/api/conversations/"+convID, nil) + if cards, ok := d["activeHitl"].([]any); ok && len(cards) > 0 { + card := cards[0].(map[string]any) + choices := card["choices"].([]any) + choice := "" + if len(choices) > 0 { + choice = choices[0].(map[string]any)["id"].(string) + } + doJSON(t, h, "POST", "/api/hitl/"+card["id"].(string)+"/resolve", map[string]any{"choiceId": choice}) + } + time.Sleep(80 * time.Millisecond) + } + }() + terminal := waitRunTerminal(t, h, runID, 45*time.Second) + close(stop) + if terminal["status"] != "completed" { + t.Fatalf("squad run status: %v (err: %v)", terminal["status"], terminal["error"]) + } + + // 1) 任务树:squad 步骤全部成为子代理 run。 + _, out := doJSON(t, h, "GET", "/api/runs/"+runID, nil) + children := out["children"].([]any) + if len(children) < 3 { + t.Fatalf("expected >=3 squad step subagents, got %d", len(children)) + } + for _, ci := range children { + c := ci.(map[string]any) + if c["kind"] != "subagent" || c["parentRunId"] != runID { + t.Errorf("bad squad child: %+v", c) + } + } + + // 2) 计划快照:四阶段骨架步骤映射到右栏计划。 + _, planRaw := doAny(t, h, "GET", "/api/conversations/"+convID+"/plan", nil) + p, ok := planRaw.(map[string]any) + if !ok { + t.Fatalf("no plan snapshot after squad orchestration: %v", planRaw) + } + steps := p["steps"].([]any) + if len(steps) < 3 { + t.Fatalf("plan steps: %d", len(steps)) + } + doneOrMore := 0 + for _, si := range steps { + if si.(map[string]any)["status"] == "done" { + doneOrMore++ + } + } + if doneOrMore < 3 { + t.Errorf("plan steps not mostly done: %d/%d", doneOrMore, len(steps)) + } + + // 3) 交付物工件。 + deadline := time.Now().Add(3 * time.Second) + for time.Now().Before(deadline) { + _, raw := doAny(t, h, "GET", "/api/projects/"+projectID+"/artifacts", nil) + if list, ok := raw.([]any); ok && len(list) > 0 { + for _, ai := range list { + name := ai.(map[string]any)["name"].(string) + if strings.HasPrefix(name, "squad-") { + return // 全部断言通过 + } + } + } + time.Sleep(100 * time.Millisecond) + } + t.Fatal("squad deliverable artifact not found") +} + +// TestModelRoutingOverrideChain:设置覆盖链集成(defaults → user → project) +// 与画像层最终覆盖——经由真实 run 的失败信息携带解析出的模型名取证。 +func TestModelRoutingOverrideChain(t *testing.T) { + srv, st := newTestServer(t) + h := srv.Handler() + projectID, convID := setupConversation(t, h) + + set := func(body map[string]any, path string) { + code, out := doJSON(t, h, "PUT", path, body) + if code != 200 { + t.Fatalf("PUT %s: %d %v", path, code, out) + } + } + + // user 层:model-A。 + set(map[string]any{"models": map[string]any{"chat": map[string]any{"model": "model-A"}}}, "/api/settings/user") + eff := settings.NewService(st).Effective(projectID) + if got := eff.GetString("models.chat.model", ""); got != "model-A" { + t.Fatalf("user layer: %q", got) + } + // project 层:model-B(覆盖 user)。 + set(map[string]any{"models": map[string]any{"chat": map[string]any{"model": "model-B"}}}, "/api/settings/project/"+projectID) + eff = settings.NewService(st).Effective(projectID) + if got := eff.GetString("models.chat.model", ""); got != "model-B" { + t.Fatalf("project layer should win: %q", got) + } + // 设置 API 呈现两层。 + code, out := doJSON(t, h, "GET", "/api/settings?project="+projectID, nil) + if code != 200 { + t.Fatal("get settings failed") + } + _ = out + + // 画像层:model-C 为最终覆盖。关 mock → 发消息 → run 失败信息携带解析结果。 + set(map[string]any{"runtime": map[string]any{"mock": false}}, "/api/settings/user") + prof := mustCode(t, h, "POST", "/api/profiles", map[string]any{ + "id": "prof_route_c", "name": "路由C", "systemPrompt": "x", + "model": map[string]any{"chat": "model-C"}, + "tools": map[string]any{"allow": []string{"*"}}, + "context": map[string]any{"maxHistoryMessages": 10}, + "hitl": map[string]any{"askOnAmbiguity": true}, "budget": map[string]any{}, + }) + if prof["id"] != "prof_route_c" { + t.Fatalf("profile save: %v", prof) + } + mustCode(t, h, "PATCH", "/api/conversations/"+convID, map[string]any{"profileId": "prof_route_c"}) + runID := postMessage(t, h, convID, "触发一次真实模型调用(预期失败并携带解析出的模型名)") + terminal := waitRunTerminal(t, h, runID, 10*time.Second) + if terminal["status"] != "failed" { + t.Fatalf("expected failed run (no baseUrl), got %v", terminal["status"]) + } + errMsg := terminal["error"].(map[string]any)["message"].(string) + if !strings.Contains(errMsg, `model-C`) { + t.Fatalf("run error should carry profile-routed model name: %q", errMsg) + } +} diff --git a/internal/settings/settings.go b/internal/settings/settings.go index 7c1eb4d..22fa18e 100644 --- a/internal/settings/settings.go +++ b/internal/settings/settings.go @@ -27,7 +27,11 @@ func SystemDefaults() map[string]any { "rerank": map[string]any{"baseUrl": "", "apiKey": "", "model": ""}, }, "runtime": map[string]any{ - "mock": false, // true = 全部会话走 mock runner(演示/测试) + "mock": false, // true = 全部会话走 mock runner(演示/测试) + "squad": true, // 小队编排(Agent-Squad 引擎)可用 + }, + "storage": map[string]any{ + "dataDir": "./data", // 启动注入实际值(--data) }, "context": map[string]any{ "maxHistoryMessages": 40, @@ -55,6 +59,7 @@ func Schema() []core.SettingDesc { {Key: "models.rerank.apiKey", Group: "models", Label: "Reranker API Key", Type: core.SettingSecret, Default: "", Effect: core.EffectHot}, {Key: "models.rerank.model", Group: "models", Label: "Reranker 模型", Type: core.SettingString, Default: "", Effect: core.EffectHot}, {Key: "runtime.mock", Group: "runtime", Label: "演示模式(mock runner)", Type: core.SettingBool, Default: false, Effect: core.EffectNewRun, Description: "不调用真实模型,按脚本回放事件流"}, + {Key: "runtime.squad", Group: "runtime", Label: "小队编排(Agent-Squad)", Type: core.SettingBool, Default: true, Effect: core.EffectNewRun, Description: "启用 Agent-Squad 引擎编排(#squad 指令与 squad_orchestrate 工具)"}, {Key: "context.maxHistoryMessages", Group: "context", Label: "历史窗口条数", Type: core.SettingNumber, Default: 40, Effect: core.EffectNewRun}, {Key: "context.maxToolResultChars", Group: "context", Label: "工具结果上限(字符)", Type: core.SettingNumber, Default: 20000, Effect: core.EffectNewRun}, {Key: "retrieval.topK", Group: "retrieval", Label: "检索命中数", Type: core.SettingNumber, Default: 5, Effect: core.EffectHot}, @@ -64,13 +69,22 @@ func Schema() []core.SettingDesc { } // Service 提供有效设置计算与分层写入。 -type Service struct{ st *store.Store } +type Service struct { + st *store.Store + system map[string]any // 启动注入的系统层覆盖(如数据目录),位于 defaults 与 user 之间 +} func NewService(st *store.Store) *Service { return &Service{st: st} } -// Effective 计算覆盖链结果:system → user → project(conversation 层经画像实现)。 +// SetSystemOverride 注入启动期系统层覆盖(组合根调用;不落库)。 +func (s *Service) SetSystemOverride(values map[string]any) { s.system = values } + +// Effective 计算覆盖链结果:defaults → system(启动注入) → user → project。 func (s *Service) Effective(projectID string) core.EffectiveSettings { eff := core.MergeSettings(SystemDefaults(), map[string]any{}) + if s.system != nil { + eff = core.MergeSettings(eff, s.system) + } if user, err := s.st.GetSettingsScope(ScopeUser); err == nil { eff = core.MergeSettings(eff, user) } diff --git a/internal/squadadapter/adapter.go b/internal/squadadapter/adapter.go new file mode 100644 index 0000000..6099eb7 --- /dev/null +++ b/internal/squadadapter/adapter.go @@ -0,0 +1,258 @@ +// Package squadadapter 把 Agent-Squad 引擎接入统一 Run/事件模型(设计 P3: +// runtime 接 Agent-Squad——spawn/黑板/HITL 由 runmgr 映射为统一 Run + 事件)。 +// +// 装配映射: +// - RoleRegistry → 内置小队角色(规则规划器自主编排四阶段骨架) +// - Planner → squad RulePlanner(确定性;LLM 规划器为后续档) +// - BackendResolver→ 自定义 "agent-system" 后端工厂:每步执行 = rc.SpawnSubagent +// (子 Run 进任务树,走既有 mock/LLM 子代理执行器与事件) +// - ProgressSink → 步骤事件映射 plan.update / agent.progress +// - HITL(挂起) → 引擎 Pending HumanRequest ↔ rc.AskHITL 卡片;RespondDecision 回填 +package squadadapter + +import ( + "context" + "fmt" + "os" + "path/filepath" + "strings" + "time" + + "agent-native/exec" + "agent-squad/squad" + core "agent-system-core" +) + +// Ctx 是适配器所需的窄端口(结构性接口;runmgr 的 runCtx 天然满足, +// 避免适配器反向依赖 runtime 包形成环)。 +type Ctx interface { + Context() context.Context + Run() core.Run + Settings() core.EffectiveSettings + Emit(typ core.StreamEventType, payload any) error + AskHITL(card core.HITLCard) (core.HITLResponse, error) + SpawnSubagent(name, task string, hint string) (core.AgentResultPayload, error) + UpdatePlan(p core.PlanSnapshot) error + WriteArtifact(name, kind, mime string, content []byte) (core.Artifact, error) +} + +// Orchestrate 在一次 conversation run 内驱动 squad 引擎完成目标。 +// 返回摘要文本(由 runner 落为消息部件);error = 编排失败。 +func Orchestrate(rc Ctx, dataDir, goalText string) (string, error) { + if strings.TrimSpace(goalText) == "" { + return "", fmt.Errorf("squad: goal text is empty") + } + runDir := filepath.Join(dataDir, "squad", rc.Run().ID) + + registry := squad.NewRoleRegistry() + for _, role := range builtinRoles() { + if err := registry.Register(role); err != nil { + return "", fmt.Errorf("squad: register role %s: %w", role.Role, err) + } + } + + backends := squad.NewBackendResolver() + backends.Register("agent-system", func(role squad.RoleSpec) (exec.Backend, error) { + return &stepBackend{rc: rc, role: role}, nil + }) + + engine, err := squad.NewEngine(squad.Options{ + DataDir: runDir, + Registry: registry, + Planner: squad.NewRulePlanner(), + Backends: backends, + DefaultBackend: "agent-system", + StepTimeout: 5 * time.Minute, + HitlPolicy: squad.HitlPolicy{Mode: squad.HitlInteractive}, + Sink: squad.ProgressFunc(func(ev squad.Event) { onSquadEvent(rc, ev) }), + }) + if err != nil { + return "", fmt.Errorf("squad: engine: %w", err) + } + + // 驱动循环:引擎为步进语义(每次调用推进一个步骤波次)—— + // 挂起态 → HITL 卡片 → Respond;执行态 → Resume 推进;直至终态。 + res, err := engine.Run(rc.Context(), squad.Goal{Text: goalText}, squad.RunOptions{}) + for err == nil && !squad.RunStatus(res.Status).Terminal() { + switch { + case isHoldStatus(string(res.Status)): + req := res.Pending + if req == nil { + if req, err = engine.Pending(res.RunID); err != nil || req == nil { + break + } + } + decision, aerr := askHuman(rc, req) + if aerr != nil { + return "", aerr + } + res, err = engine.Respond(rc.Context(), res.RunID, decision) + default: + res, err = engine.Resume(rc.Context(), res.RunID) + } + if err != nil { + break + } + // 步进间映射最新计划到右栏。 + if res.Plan != nil { + _ = rc.UpdatePlan(mapPlan(res.Plan)) + } + } + if err != nil { + return "", fmt.Errorf("squad: run: %w", err) + } + + // 终态计划映射 + 交付物落工件。 + if res.Plan != nil { + _ = rc.UpdatePlan(mapPlan(res.Plan)) + } + summary := firstNonEmpty(res.Summary, res.Deliverable, "编排完成") + if res.Deliverable != "" { + if _, werr := rc.WriteArtifact("squad-"+res.RunID+".md", "document", "text/markdown", []byte(res.Deliverable)); werr != nil { + summary += "(交付物写入失败:" + werr.Error() + ")" + } + } + switch res.Status { + case squad.RunCompleted: + return summary, nil + default: + return summary, fmt.Errorf("squad: run %s status %s: %s", res.RunID, res.Status, res.Error) + } +} + +// stepBackend:小队步骤 → 统一子 Run(任务树可见;执行走 runmgr 的子代理执行器)。 +type stepBackend struct { + rc Ctx + role squad.RoleSpec +} + +func (b *stepBackend) Name() string { return "agent-system" } + +func (b *stepBackend) Execute(ctx context.Context, req exec.Request) (*exec.Result, error) { + task := strings.TrimSpace(req.Prompt) + if task == "" { + task = req.Instructions + } + hint := strings.TrimSpace(req.Instructions) + out, err := b.rc.SpawnSubagent(firstNonEmpty(b.role.Name, b.role.Role), task, hint) + res := &exec.Result{Success: err == nil, Logs: firstNonEmpty(out.Summary, "子代理完成")} + if err != nil { + res.ErrorReason = err.Error() + return res, nil + } + // 交付物:子代理全文写入步骤子工作区的目标文件(引擎契约:后端自行落盘, + // 检查器按 allTargetsPresent 校验;Patches 同时回传供引擎重试路径复用)。 + content := firstNonEmpty(out.Text, out.Summary, "(子代理无文本产出)") + targets := req.Targets + if len(targets) == 0 { + targets = []string{"output.md"} + } + res.Patches = make(map[string][]byte, len(targets)) + for _, t := range targets { + body := []byte(content + "\n") + res.Patches[t] = body + dest := filepath.Join(req.WorkDir, filepath.FromSlash(t)) + if merr := os.MkdirAll(filepath.Dir(dest), 0o755); merr == nil { + _ = os.WriteFile(dest, body, 0o644) + } + } + return res, nil +} + +// askHuman:HumanRequest → HITL 卡片 → RespondDecision(选项直达 / 自由文本作答)。 +func askHuman(rc Ctx, req *squad.HumanRequest) (squad.RespondDecision, error) { + choices := make([]core.HITLChoice, 0, len(req.Options)) + for _, o := range req.Options { + choices = append(choices, core.HITLChoice{ + ID: o.Value, Label: o.Label, + Description: firstNonEmpty(req.Context, "小队编排挂起"), + Impact: fmt.Sprintf("决策类型 %s:%s 将继续/终止本次编排", req.Kind, o.Value), + }) + } + if len(choices) == 0 { + choices = append(choices, + core.HITLChoice{ID: "approve", Label: "继续", Description: "按当前计划继续执行", Impact: "小队继续执行后续步骤", Recommended: true}, + core.HITLChoice{ID: "abort", Label: "中止", Description: "终止本次编排", Impact: "编排取消,已产出保留"}, + ) + } + resp, err := rc.AskHITL(core.HITLCard{ + Question: req.Question, + Kind: core.HITLKindChoice, + Choices: choices, + AllowFreeInput: true, + FreeInputHint: "可直接输入回答或修改指令", + }) + if err != nil { + return squad.RespondDecision{RequestID: req.ID, Choice: "abort"}, err + } + d := squad.RespondDecision{RequestID: req.ID} + if resp.ChoiceID != "" { + d.Choice = resp.ChoiceID + } else { + d.Answer = resp.FreeText + } + return d, nil +} + +// onSquadEvent:引擎事件 → 统一事件(计划步态 + 过程注记)。 +func onSquadEvent(rc Ctx, ev squad.Event) { + switch ev.Type { + case squad.EvStepStarted, squad.EvStepCompleted, squad.EvStepFailed, squad.EvStepSkipped: + note := fmt.Sprintf("小队步骤 %s(%s)%s", ev.StepID, ev.Role, strings.TrimPrefix(ev.Type, "step_")) + if ev.Text != "" { + note += ":" + ev.Text + } + _ = rc.Emit(core.EvAgentProgress, core.AgentProgressPayload{AgentRun: rc.Run().ID, Note: note, Phase: core.PhaseActing}) + case squad.EvHumanInputRequired, squad.EvHumanResponded: + // 挂起/回填经 AskHITL 卡片主路径呈现;此处仅过程注记。 + _ = rc.Emit(core.EvAgentProgress, core.AgentProgressPayload{AgentRun: rc.Run().ID, Note: ev.Type + ": " + ev.Text}) + } +} + +// mapPlan:WorkflowPlan → 右栏计划快照。 +func mapPlan(p *squad.WorkflowPlan) core.PlanSnapshot { + snap := core.PlanSnapshot{Title: firstNonEmpty(p.Title, "小队编排计划"), Steps: make([]core.PlanStep, 0, len(p.Steps))} + for _, s := range p.Steps { + snap.Steps = append(snap.Steps, core.PlanStep{ID: s.ID, Text: firstNonEmpty(s.Title, s.ID), Status: mapStepStatus(s.Status)}) + } + return snap +} + +func mapStepStatus(s string) string { + switch s { + case "running": + return "in_progress" + case "completed": + return "done" + case "skipped": + return "skipped" + default: + return "pending" + } +} + +func isHoldStatus(s string) bool { + return s == "waiting_human" || s == "awaiting_confirmation" || s == "awaiting_clarification" || s == "quality_review" +} + +func builtinRoles() []squad.RoleSpec { + return []squad.RoleSpec{ + {Role: "planner", Name: "规划员", Backend: "agent-system", BashPermission: "deny", + Keywords: []string{"梳理", "规划", "分析"}, Instructions: "梳理目标与材料,产出结构化要点与执行建议。"}, + {Role: "researcher", Name: "调研员", Backend: "agent-system", BashPermission: "deny", + Keywords: []string{"调研", "检索", "资料"}, Instructions: "围绕目标调研关键问题,输出简明结论与依据。"}, + {Role: "writer", Name: "撰稿员", Backend: "agent-system", BashPermission: "deny", + Keywords: []string{"撰写", "成文", "报告"}, Instructions: "把前序要点与调研结论整理为清晰成文的交付文档。"}, + {Role: "reviewer", Name: "审校员", Backend: "agent-system", BashPermission: "deny", + Keywords: []string{"审校", "把关", "终审"}, Instructions: "终审交付文档:一致性、完整性与风险提示,给出通过或修改意见。"}, + } +} + +func firstNonEmpty(vals ...string) string { + for _, v := range vals { + if strings.TrimSpace(v) != "" { + return v + } + } + return "" +} diff --git a/internal/squadadapter/adapter_test.go b/internal/squadadapter/adapter_test.go new file mode 100644 index 0000000..f2394c2 --- /dev/null +++ b/internal/squadadapter/adapter_test.go @@ -0,0 +1,51 @@ +package squadadapter + +import ( + "testing" + + "agent-squad/squad" +) + +func TestMapPlanAndStatus(t *testing.T) { + p := &squad.WorkflowPlan{Title: "示例编排", Steps: []squad.StepSpec{ + {ID: "s1", Title: "梳理", Status: "completed"}, + {ID: "s2", Title: "成文", Status: "running"}, + {ID: "s3", Title: "终审", Status: "skipped"}, + {ID: "s4", Title: "待办", Status: "pending"}, + }} + snap := mapPlan(p) + if snap.Title != "示例编排" || len(snap.Steps) != 4 { + t.Fatalf("snapshot: %+v", snap) + } + want := []string{"done", "in_progress", "skipped", "pending"} + for i, w := range want { + if snap.Steps[i].Status != w { + t.Errorf("step %d: want %s got %s", i, w, snap.Steps[i].Status) + } + } +} + +func TestBuiltinRolesValid(t *testing.T) { + reg := squad.NewRoleRegistry() + for _, r := range builtinRoles() { + if err := reg.Register(r); err != nil { + t.Errorf("role %s invalid: %v", r.Role, err) + } + if r.Backend != "agent-system" { + t.Errorf("role %s backend: %s", r.Role, r.Backend) + } + } +} + +func TestIsHoldStatus(t *testing.T) { + for _, s := range []string{"waiting_human", "awaiting_confirmation", "awaiting_clarification", "quality_review"} { + if !isHoldStatus(s) { + t.Errorf("%s should be hold", s) + } + } + for _, s := range []string{"completed", "executing", "failed"} { + if isHoldStatus(s) { + t.Errorf("%s should not be hold", s) + } + } +}