Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-9256 fix(daemon): keep the brief's multica-platform domain list in sync with the skill description (#10595)

Jiayuan Zhangf0eef060dfe6
diff --git a/server/internal/daemon/execenv/platform_skill_identity_test.go b/server/internal/daemon/execenv/platform_skill_identity_test.go
index f7fd4f26c3..8ee64a4e37 100644
--- a/server/internal/daemon/execenv/platform_skill_identity_test.go
+++ b/server/internal/daemon/execenv/platform_skill_identity_test.go
@@ -120,6 +120,40 @@ func TestPlatformSkillHintsFollowPreparedDirectories(t *testing.T) {
}
}
+// TestPlatformSkillDomainsMatchDescription keeps the brief's recall hint and
+// the skill's description naming the same domains (MUL-9256). The description
+// is guarded against the skill's references in the service package; this
+// closes the last hop, so a reference added there reaches every runtime's brief.
+func TestPlatformSkillDomainsMatchDescription(t *testing.T) {
+ t.Parallel()
+ data, err := os.ReadFile(filepath.Join("..", "..", "service", "builtin_skills", platformSkillName, "SKILL.md"))
+ if err != nil {
+ t.Fatal(err)
+ }
+ var description string
+ for _, line := range strings.Split(string(data), "\n") {
+ if value, ok := strings.CutPrefix(line, "description: "); ok {
+ description = strings.Trim(value, `"`)
+ break
+ }
+ }
+ _, after, ok := strings.Cut(description, "does not fully cover: ")
+ domains, _, ok2 := strings.Cut(after, ". ")
+ if !ok || !ok2 {
+ t.Fatalf("cannot find the domain list in the description %q; update this parser with the new wording", description)
+ }
+ if domains != platformSkillDomains {
+ t.Errorf("brief domains drifted from the skill description:\n description: %s\n brief: %s", domains, platformSkillDomains)
+ }
+
+ for _, provider := range []string{"claude", "codex", "traecli"} {
+ brief := buildMetaSkillContent(provider, TaskContextForEnv{IssueID: "issue-platform-domains", AgentSkills: []SkillContextForEnv{platformSkillFixture()}})
+ if !strings.Contains(brief, "does not fully cover — "+platformSkillDomains+" — ") {
+ t.Errorf("%s brief does not list the platform skill's domains", provider)
+ }
+ }
+}
+
func assertPlatformSkillHints(t *testing.T, provider, brief, slug string) {
t.Helper()
if slug == "" {
diff --git a/server/internal/daemon/execenv/runtime_config_sections.go b/server/internal/daemon/execenv/runtime_config_sections.go
index 5028a43807..9a76416b1a 100644
--- a/server/internal/daemon/execenv/runtime_config_sections.go
+++ b/server/internal/daemon/execenv/runtime_config_sections.go
@@ -743,6 +743,12 @@ func writeSubIssueCreation(b *strings.Builder, ctx TaskContextForEnv) {
// import; the brief's rendered-output tests pin the two together.
const platformSkillName = "multica-platform"
+// platformSkillDomains is the domain list from the platform skill's
+// description, repeated in the brief's recall hint for agents that never read
+// the skill listing. TestPlatformSkillDomainsMatchDescription keeps it equal to
+// the description, so a new reference cannot ship without reaching the brief.
+const platformSkillDomains = "issue and PR contracts, sub-issues, saved views, charts and files in comments, mentions, agents, squads, autopilots, projects, runtimes, local environments, skill import, themes"
+
// subIssueContractsSkill returns how the brief should refer to the skill
// carrying the sub-issue contracts, and whether any such skill is installed.
//
@@ -796,7 +802,7 @@ func writeSkills(b *strings.Builder, provider string, ctx TaskContextForEnv) {
// what keeps that consolidation from costing recall, and it must therefore
// name the skill that actually holds those contracts.
if platformSlug != "" {
- b.WriteString("For a Multica platform action this brief does not fully cover — issue and PR contracts, saved views, mentions, agents, squads, autopilots, projects, runtimes, local environments, skill import — load the `" + platformSlug + "` skill and open the reference(s) its routing table names for the domains your task touches.\n\n")
+ b.WriteString("For a Multica platform action this brief does not fully cover — " + platformSkillDomains + " — load the `" + platformSlug + "` skill and open the reference(s) its routing table names for the domains your task touches.\n\n")
}
}
@@ -822,7 +828,7 @@ func writeTraecliSkills(b *strings.Builder, skills []SkillContextForEnv) {
}
b.WriteString("\n")
if platformSlug != "" {
- b.WriteString("For a Multica platform action this brief does not fully cover — issue and PR contracts, saved views, mentions, agents, squads, autopilots, projects, runtimes, local environments, skill import — read `" + skillPath(platformSlug) + "` and open the reference(s) its routing table names for the domains your task touches.\n\n")
+ b.WriteString("For a Multica platform action this brief does not fully cover — " + platformSkillDomains + " — read `" + skillPath(platformSlug) + "` and open the reference(s) its routing table names for the domains your task touches.\n\n")
}
}
diff --git a/server/internal/daemon/localenv/config_test.go b/server/internal/daemon/localenv/config_test.go
index ba9e9d5410..618cf0d9cc 100644
--- a/server/internal/daemon/localenv/config_test.go
+++ b/server/internal/daemon/localenv/config_test.go
@@ -109,8 +109,8 @@ func TestRepositoryConfigParses(t *testing.T) {
if err != nil {
t.Fatalf("ParseConfig: %v", err)
}
- if got := strings.Join(cfg.Names(), ","); got != "desktop,web" {
- t.Fatalf("declared = %s, want desktop and web", got)
+ if got := strings.Join(cfg.Names(), ","); got != "desktop,storybook,web" {
+ t.Fatalf("declared = %s, want desktop, storybook and web", got)
}
// Desktop has nothing to open, but still waits for its app to be up.
if desktop := cfg.Environments["desktop"]; desktop.URL != "" || desktop.Ready == "" {