mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-05 13:29:44 +02:00
MUL-3446: keep chat output in chat (#4387)
* MUL-3446: keep chat output in chat Co-authored-by: multica-agent <github@multica.ai> * MUL-3446: simplify chat output guidance Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -781,6 +781,8 @@ func buildMetaSkillContent(provider string, ctx TaskContextForEnv) string {
|
||||
b.WriteString("- Do NOT call `multica issue comment add` — the issue you just created has no conversation context for this run.\n")
|
||||
b.WriteString("- Print exactly one final line: `Created <identifier-or-id>: <title>` after a successful `multica issue create`. Use the created issue's `identifier` from JSON output when available; otherwise use its `id`. Do not assume any workspace issue prefix such as `MUL-`; workspaces can use custom prefixes.\n")
|
||||
b.WriteString("- On CLI failure, exit with the CLI error as the only output. The platform translates that into a `quick_create_failed` inbox item carrying the original prompt for the user.\n")
|
||||
case ctx.ChatSessionID != "":
|
||||
b.WriteString("This is a chat session. Your reply is delivered directly to the chat window the user is reading.\n")
|
||||
default:
|
||||
if ctx.IsSquadLeader {
|
||||
b.WriteString("⚠️ **Final results MUST be delivered via `multica issue comment add`** — unless your outcome is `no_action`. When you evaluate a trigger and decide no action is needed, calling `multica squad activity <issue-id> no_action --reason \"...\"` alone is sufficient; you MUST exit without posting any comment. DO NOT post a comment that announces no_action, acknowledges another agent, or says you are exiting silently — such comments are noise. For all other outcomes (`action`, `failed`), a comment is still mandatory.\n\n")
|
||||
|
||||
@@ -337,6 +337,32 @@ func TestInstructionPrecedenceOnlyAppliesToAssignmentWorkflow(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestChatOutputDoesNotRequireIssueComment(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
out := buildMetaSkillContent("claude", TaskContextForEnv{ChatSessionID: "chat-1"})
|
||||
|
||||
for _, want := range []string{
|
||||
"This is a chat session",
|
||||
"Your reply is delivered directly to the chat window the user is reading",
|
||||
} {
|
||||
if !strings.Contains(out, want) {
|
||||
t.Errorf("chat brief missing chat output guidance %q\n---\n%s", want, out)
|
||||
}
|
||||
}
|
||||
|
||||
for _, banned := range []string{
|
||||
"Final results MUST be delivered via `multica issue comment add`",
|
||||
"The user does NOT see your terminal output",
|
||||
"do not call `multica issue comment add`",
|
||||
"unless the user explicitly asks",
|
||||
} {
|
||||
if strings.Contains(out, banned) {
|
||||
t.Errorf("chat brief must not inherit issue-comment output warning %q\n---\n%s", banned, out)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The sub-issue creation rule must reach top-level parents that have no
|
||||
// `parent_issue_id` of their own — that is where the `todo` vs `backlog`
|
||||
// decision matters most. The section must not gate on this issue being
|
||||
|
||||
Reference in New Issue
Block a user