Skip to content

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

Go

feat(daemon): inject project description into the agent brief (MUL-3465) (#4395)

Bohan Jiangda72e2fa2230
diff --git a/packages/views/locales/en/modals.json b/packages/views/locales/en/modals.json
index c13f16a215..d359dd840b 100644
--- a/packages/views/locales/en/modals.json
+++ b/packages/views/locales/en/modals.json
@@ -90,6 +90,7 @@
"icon_tooltip": "Choose icon",
"title_placeholder": "Project title",
"description_placeholder": "Add description...",
+ "description_hint": "Shared with agents as context for every task in this project.",
"lead": "Lead",
"no_lead": "No lead",
"lead_placeholder": "Assign lead...",
diff --git a/packages/views/locales/en/projects.json b/packages/views/locales/en/projects.json
index a2f608640c..e52c4dac68 100644
--- a/packages/views/locales/en/projects.json
+++ b/packages/views/locales/en/projects.json
@@ -69,6 +69,7 @@
"section_progress": "Progress",
"section_description": "Description",
"description_placeholder": "Add description...",
+ "description_hint": "Shared with agents as context for every task in this project.",
"empty_issues_title": "No issues linked",
"empty_issues_hint": "Create a new issue or assign existing ones to this project.",
"empty_issues_new_button": "New Issue",
diff --git a/packages/views/locales/ja/modals.json b/packages/views/locales/ja/modals.json
index 263f61f000..a84ca28641 100644
--- a/packages/views/locales/ja/modals.json
+++ b/packages/views/locales/ja/modals.json
@@ -89,6 +89,7 @@
"icon_tooltip": "アイコンを選択",
"title_placeholder": "プロジェクトのタイトル",
"description_placeholder": "説明を追加...",
+ "description_hint": "このプロジェクトのすべてのタスクで、コンテキストとしてエージェントに共有されます。",
"lead": "リード",
"no_lead": "リードなし",
"lead_placeholder": "リードを指定...",
diff --git a/packages/views/locales/ja/projects.json b/packages/views/locales/ja/projects.json
index 5e10de688d..8757d9d062 100644
--- a/packages/views/locales/ja/projects.json
+++ b/packages/views/locales/ja/projects.json
@@ -69,6 +69,7 @@
"section_progress": "進捗",
"section_description": "説明",
"description_placeholder": "説明を追加...",
+ "description_hint": "このプロジェクトのすべてのタスクで、コンテキストとしてエージェントに共有されます。",
"empty_issues_title": "リンクされたイシューはありません",
"empty_issues_hint": "新しいイシューを作成するか、既存のイシューをこのプロジェクトに割り当ててください。",
"empty_issues_new_button": "新規イシュー",
diff --git a/packages/views/locales/ko/modals.json b/packages/views/locales/ko/modals.json
index 13c56692ee..342ffcfa3e 100644
--- a/packages/views/locales/ko/modals.json
+++ b/packages/views/locales/ko/modals.json
@@ -90,6 +90,7 @@
"icon_tooltip": "아이콘 선택",
"title_placeholder": "프로젝트 제목",
"description_placeholder": "설명 추가...",
+ "description_hint": "이 프로젝트의 모든 작업에서 컨텍스트로 에이전트에게 공유됩니다.",
"lead": "리드",
"no_lead": "리드 없음",
"lead_placeholder": "리드 지정...",
diff --git a/packages/views/locales/ko/projects.json b/packages/views/locales/ko/projects.json
index 7735bb222d..d88154a291 100644
--- a/packages/views/locales/ko/projects.json
+++ b/packages/views/locales/ko/projects.json
@@ -69,6 +69,7 @@
"section_progress": "진행률",
"section_description": "설명",
"description_placeholder": "설명 추가...",
+ "description_hint": "이 프로젝트의 모든 작업에서 컨텍스트로 에이전트에게 공유됩니다.",
"empty_issues_title": "연결된 이슈가 없습니다",
"empty_issues_hint": "새 이슈를 만들거나 기존 이슈를 이 프로젝트에 할당하세요.",
"empty_issues_new_button": "새 이슈",
diff --git a/packages/views/locales/zh-Hans/modals.json b/packages/views/locales/zh-Hans/modals.json
index e6c5ebffe7..96694f08ff 100644
--- a/packages/views/locales/zh-Hans/modals.json
+++ b/packages/views/locales/zh-Hans/modals.json
@@ -90,6 +90,7 @@
"icon_tooltip": "选择图标",
"title_placeholder": "项目标题",
"description_placeholder": "添加描述...",
+ "description_hint": "会作为项目上下文提供给智能体,应用于该项目下的每个任务。",
"lead": "负责人",
"no_lead": "无负责人",
"lead_placeholder": "指派负责人...",
diff --git a/packages/views/locales/zh-Hans/projects.json b/packages/views/locales/zh-Hans/projects.json
index a346136acc..defa2c3f50 100644
--- a/packages/views/locales/zh-Hans/projects.json
+++ b/packages/views/locales/zh-Hans/projects.json
@@ -69,6 +69,7 @@
"section_progress": "进度",
"section_description": "描述",
"description_placeholder": "添加描述...",
+ "description_hint": "会作为项目上下文提供给智能体,应用于该项目下的每个任务。",
"empty_issues_title": "还没有关联的 issue",
"empty_issues_hint": "新建一个 issue,或把已有的 issue 关联到这个项目。",
"empty_issues_new_button": "新建 issue",
diff --git a/packages/views/modals/create-project.tsx b/packages/views/modals/create-project.tsx
index 2cee221717..d443a9c096 100644
--- a/packages/views/modals/create-project.tsx
+++ b/packages/views/modals/create-project.tsx
@@ -394,6 +394,9 @@ export function CreateProjectModal({ onClose }: { onClose: () => void }) {
onUpdate={(md) => setDraft({ description: md })}
debounceMs={500}
/>
+ <p className="mt-1 text-xs text-muted-foreground">
+ {t(($) => $.create_project.description_hint)}
+ </p>
</div>
{/* Footer: properties (left, wrap) + Create button (right). Single row
diff --git a/packages/views/projects/components/project-detail.tsx b/packages/views/projects/components/project-detail.tsx
index f0aa07a43b..ad0f4c68ad 100644
--- a/packages/views/projects/components/project-detail.tsx
+++ b/packages/views/projects/components/project-detail.tsx
@@ -768,6 +768,9 @@ export function ProjectDetail({ projectId }: { projectId: string }) {
onUpdate={(md) => handleUpdateField({ description: md || null })}
debounceMs={1500}
/>
+ <p className="mt-1 px-2 text-xs text-muted-foreground">
+ {t(($) => $.detail.description_hint)}
+ </p>
</div>}
</div>
diff --git a/server/internal/daemon/daemon.go b/server/internal/daemon/daemon.go
index 5ea7bb65b8..1695bf0892 100644
--- a/server/internal/daemon/daemon.go
+++ b/server/internal/daemon/daemon.go
@@ -155,8 +155,8 @@ type Daemon struct {
// command resolves; read by runTask via customCommandPathForRuntime to
// launch the custom command for a claimed task. Guarded by mu.
profileCommandPaths map[string]string
- reloading sync.Mutex // prevents concurrent workspace syncs
- runtimeSet *runtimeSetWatcher // multi-subscriber pub/sub for runtime-set changes
+ reloading sync.Mutex // prevents concurrent workspace syncs
+ runtimeSet *runtimeSetWatcher // multi-subscriber pub/sub for runtime-set changes
versionsMu sync.RWMutex // guards agentVersions
agentVersions map[string]string // provider -> detected CLI version (set during registration)
@@ -3166,6 +3166,7 @@ func (d *Daemon) runTask(ctx context.Context, task Task, provider string, slot i
Repos: convertReposForEnv(task.Repos),
ProjectID: task.ProjectID,
ProjectTitle: task.ProjectTitle,
+ ProjectDescription: task.ProjectDescription,
ProjectResources: convertProjectResourcesForEnv(task.ProjectResources),
ChatSessionID: task.ChatSessionID,
AutopilotRunID: task.AutopilotRunID,
diff --git a/server/internal/daemon/execenv/context.go b/server/internal/daemon/execenv/context.go
index c670b80458..8be5906cba 100644
--- a/server/internal/daemon/execenv/context.go
+++ b/server/internal/daemon/execenv/context.go
@@ -85,9 +85,10 @@ func writeContextFiles(workDir, provider string, ctx TaskContextForEnv, manifest
// directory. Schema is intentionally a thin pass-through of the API response
// so consumers (skills, future tooling) don't need a separate parser.
type projectResourceFile struct {
- ProjectID string `json:"project_id,omitempty"`
- ProjectTitle string `json:"project_title,omitempty"`
- Resources []ProjectResourceForEnv `json:"resources"`
+ ProjectID string `json:"project_id,omitempty"`
+ ProjectTitle string `json:"project_title,omitempty"`
+ ProjectDescription string `json:"project_description,omitempty"`
+ Resources []ProjectResourceForEnv `json:"resources"`
}
// MarshalJSON renders the resource_ref field as raw JSON instead of a base64
@@ -132,9 +133,10 @@ func writeProjectResources(workDir string, ctx TaskContextForEnv, manifest *side
resources = []ProjectResourceForEnv{}
}
payload := projectResourceFile{
- ProjectID: ctx.ProjectID,
- ProjectTitle: ctx.ProjectTitle,
- Resources: resources,
+ ProjectID: ctx.ProjectID,
+ ProjectTitle: ctx.ProjectTitle,
+ ProjectDescription: ctx.ProjectDescription,
+ Resources: resources,
}
data, err := json.MarshalIndent(payload, "", " ")
if err != nil {
diff --git a/server/internal/daemon/execenv/execenv.go b/server/internal/daemon/execenv/execenv.go
index b904c8ab79..36cdd4001d 100644
--- a/server/internal/daemon/execenv/execenv.go
+++ b/server/internal/daemon/execenv/execenv.go
@@ -75,6 +75,7 @@ type TaskContextForEnv struct {
Repos []RepoContextForEnv // workspace repos available for checkout
ProjectID string // issue's project, when present
ProjectTitle string // human-readable project title
+ ProjectDescription string // durable project-level context, rendered into the brief's Project Context section
ProjectResources []ProjectResourceForEnv // resources attached to the project
ChatSessionID string // non-empty for chat tasks
AutopilotRunID string // non-empty for autopilot run_only tasks
diff --git a/server/internal/daemon/execenv/execenv_test.go b/server/internal/daemon/execenv/execenv_test.go
index 2ea9dd18d4..cf21160a2d 100644
--- a/server/internal/daemon/execenv/execenv_test.go
+++ b/server/internal/daemon/execenv/execenv_test.go
@@ -149,9 +149,10 @@ func TestPrepareWithProjectResources(t *testing.T) {
workspacesRoot := t.TempDir()
taskCtx := TaskContextForEnv{
- IssueID: "11111111-2222-3333-4444-555555555555",
- ProjectID: "22222222-3333-4444-5555-666666666666",
- ProjectTitle: "Agent UX 2026",
+ IssueID: "11111111-2222-3333-4444-555555555555",
+ ProjectID: "22222222-3333-4444-5555-666666666666",
+ ProjectTitle: "Agent UX 2026",
+ ProjectDescription: "Always write copy in British English. Ship behind a feature flag.",
ProjectResources: []ProjectResourceForEnv{
{
ID: "33333333-4444-5555-6666-777777777777",
@@ -180,9 +181,10 @@ func TestPrepareWithProjectResources(t *testing.T) {
t.Fatalf("failed to read resources.json: %v", err)
}
var got struct {
- ProjectID string `json:"project_id"`
- ProjectTitle string `json:"project_title"`
- Resources []struct {
+ ProjectID string `json:"project_id"`
+ ProjectTitle string `json:"project_title"`
+ ProjectDescription string `json:"project_description"`
+ Resources []struct {
ID string `json:"id"`
ResourceType string `json:"resource_type"`
ResourceRef json.RawMessage `json:"resource_ref"`
@@ -197,6 +199,9 @@ func TestPrepareWithProjectResources(t *testing.T) {
if got.ProjectTitle != taskCtx.ProjectTitle {
t.Errorf("resources.json project_title = %q, want %q", got.ProjectTitle, taskCtx.ProjectTitle)
}
+ if got.ProjectDescription != taskCtx.ProjectDescription {
+ t.Errorf("resources.json project_description = %q, want %q", got.ProjectDescription, taskCtx.ProjectDescription)
+ }
if len(got.Resources) != 1 || got.Resources[0].ResourceType != "github_repo" {
t.Fatalf("resources.json resources mismatch: %+v", got.Resources)
}
@@ -213,6 +218,7 @@ func TestPrepareWithProjectResources(t *testing.T) {
for _, want := range []string{
"## Project Context",
"Agent UX 2026",
+ "Always write copy in British English. Ship behind a feature flag.",
"GitHub repo",
"https://github.com/multica-ai/multica",
"default branch: `main`",
diff --git a/server/internal/daemon/execenv/runtime_config.go b/server/internal/daemon/execenv/runtime_config.go
index 0a4f507ac0..4895b708bf 100644
--- a/server/internal/daemon/execenv/runtime_config.go
+++ b/server/internal/daemon/execenv/runtime_config.go
@@ -564,6 +564,11 @@ func buildMetaSkillContent(provider string, ctx TaskContextForEnv) string {
if ctx.ProjectTitle != "" {
fmt.Fprintf(&b, "This issue belongs to **%s**.\n\n", ctx.ProjectTitle)
}
+ if desc := strings.TrimSpace(ctx.ProjectDescription); desc != "" {
+ b.WriteString("Project description — durable context the project owner set for every task in this project:\n\n")
+ b.WriteString(desc)
+ b.WriteString("\n\n")
+ }
if len(ctx.ProjectResources) > 0 {
b.WriteString("Project resources (also written to `.multica/project/resources.json`):\n\n")
for _, r := range ctx.ProjectResources {
diff --git a/server/internal/daemon/types.go b/server/internal/daemon/types.go
index 93f9ef68b1..aad4eb5e38 100644
--- a/server/internal/daemon/types.go
+++ b/server/internal/daemon/types.go
@@ -55,6 +55,7 @@ type Task struct {
Repos []RepoData `json:"repos,omitempty"`
ProjectID string `json:"project_id,omitempty"` // issue's project, when present
ProjectTitle string `json:"project_title,omitempty"` // human-readable project title for context injection
+ ProjectDescription string `json:"project_description,omitempty"` // durable project-level context injected into the brief
ProjectResources []ProjectResourceData `json:"project_resources,omitempty"` // project-scoped resources to expose to the agent
PriorSessionID string `json:"prior_session_id,omitempty"` // Claude session ID from a previous task on this issue
PriorWorkDir string `json:"prior_work_dir,omitempty"` // work_dir from a previous task on this issue
diff --git a/server/internal/handler/agent.go b/server/internal/handler/agent.go
index 4f37fcab45..2ffeae49be 100644
--- a/server/internal/handler/agent.go
+++ b/server/internal/handler/agent.go
@@ -233,28 +233,29 @@ type AgentTaskResponse struct {
// as `## Workspace Context` so every agent running in this workspace —
// regardless of issue / chat / autopilot / quick-create — sees the same
// shared context. Empty when the workspace owner hasn't set it.
- WorkspaceContext string `json:"workspace_context,omitempty"`
- ThreadName string `json:"thread_name,omitempty"` // semantic title for provider-native session/thread history
- Status string `json:"status"`
- Priority int32 `json:"priority"`
- DispatchedAt *string `json:"dispatched_at"`
- StartedAt *string `json:"started_at"`
- CompletedAt *string `json:"completed_at"`
- Result any `json:"result"`
- Error *string `json:"error"`
- FailureReason string `json:"failure_reason,omitempty"` // see TaskService.MaybeRetryFailedTask
- Attempt int32 `json:"attempt"`
- MaxAttempts int32 `json:"max_attempts"`
- ParentTaskID *string `json:"parent_task_id,omitempty"`
- Agent *TaskAgentData `json:"agent,omitempty"`
- Repos []RepoData `json:"repos,omitempty"`
- ProjectID string `json:"project_id,omitempty"` // issue's project, when present
- ProjectTitle string `json:"project_title,omitempty"` // for surfacing in agent context
- ProjectResources []ProjectResourceData `json:"project_resources,omitempty"` // resources attached to the project
- CreatedAt string `json:"created_at"`
- PriorSessionID string `json:"prior_session_id,omitempty"` // session ID from a previous task on same issue
- PriorWorkDir string `json:"prior_work_dir,omitempty"` // work_dir from a previous task on same issue
- WorkDir string `json:"work_dir,omitempty"` // local working directory pinned for this task; populated once the daemon reports it
+ WorkspaceContext string `json:"workspace_context,omitempty"`
+ ThreadName string `json:"thread_name,omitempty"` // semantic title for provider-native session/thread history
+ Status string `json:"status"`
+ Priority int32 `json:"priority"`
+ DispatchedAt *string `json:"dispatched_at"`
+ StartedAt *string `json:"started_at"`
+ CompletedAt *string `json:"completed_at"`
+ Result any `json:"result"`
+ Error *string `json:"error"`
+ FailureReason string `json:"failure_reason,omitempty"` // see TaskService.MaybeRetryFailedTask
+ Attempt int32 `json:"attempt"`
+ MaxAttempts int32 `json:"max_attempts"`
+ ParentTaskID *string `json:"parent_task_id,omitempty"`
+ Agent *TaskAgentData `json:"agent,omitempty"`
+ Repos []RepoData `json:"repos,omitempty"`
+ ProjectID string `json:"project_id,omitempty"` // issue's project, when present
+ ProjectTitle string `json:"project_title,omitempty"` // for surfacing in agent context
+ ProjectDescription string `json:"project_description,omitempty"` // durable project-level context injected into the brief
+ ProjectResources []ProjectResourceData `json:"project_resources,omitempty"` // resources attached to the project
+ CreatedAt string `json:"created_at"`
+ PriorSessionID string `json:"prior_session_id,omitempty"` // session ID from a previous task on same issue
+ PriorWorkDir string `json:"prior_work_dir,omitempty"` // work_dir from a previous task on same issue
+ WorkDir string `json:"work_dir,omitempty"` // local working directory pinned for this task; populated once the daemon reports it
// RelativeWorkDir is a privacy-safe display form of WorkDir intended for
// the UI. For standard tasks it strips the daemon's workspaces root so
// the user sees `<wsUUID>/<taskShort>/workdir`; for local_directory
diff --git a/server/internal/handler/daemon.go b/server/internal/handler/daemon.go
index 78775541b2..70eb901c8a 100644
--- a/server/internal/handler/daemon.go
+++ b/server/internal/handler/daemon.go
@@ -1337,6 +1337,7 @@ func (h *Handler) ClaimTaskByRuntime(w http.ResponseWriter, r *http.Request) {
resp.ProjectID = uuidToString(issue.ProjectID)
if proj, err := h.Queries.GetProject(r.Context(), issue.ProjectID); err == nil {
resp.ProjectTitle = proj.Title
+ resp.ProjectDescription = proj.Description.String
}
if rows := h.listProjectResourcesForProject(r.Context(), issue.ProjectID); len(rows) > 0 {
out := make([]ProjectResourceData, 0, len(rows))
@@ -1612,6 +1613,7 @@ func (h *Handler) ClaimTaskByRuntime(w http.ResponseWriter, r *http.Request) {
resp.ProjectID = qc.ProjectID
if proj, err := h.Queries.GetProject(r.Context(), projectUUID); err == nil {
resp.ProjectTitle = proj.Title
+ resp.ProjectDescription = proj.Description.String
}
if rows := h.listProjectResourcesForProject(r.Context(), projectUUID); len(rows) > 0 {
out := make([]ProjectResourceData, 0, len(rows))
diff --git a/server/internal/handler/daemon_test.go b/server/internal/handler/daemon_test.go
index d41c746b12..8e5ffa58c9 100644
--- a/server/internal/handler/daemon_test.go
+++ b/server/internal/handler/daemon_test.go
@@ -1930,6 +1930,128 @@ func TestClaimTask_ProjectGithubReposOverrideWorkspaceRepos(t *testing.T) {
}
}
+// When an issue belongs to a project that has a description, the claim handler
+// must surface that description as project_description so the daemon can inject
+// it into the brief. This is the handler-side boundary the execenv tests can't
+// cover: if this assignment regresses, the description silently stops reaching
+// the agent while the execenv rendering tests still pass.
+func TestClaimTask_ProjectDescriptionInjected(t *testing.T) {
+ if testHandler == nil {
+ t.Skip("database not available")
+ }
+
+ ctx := context.Background()
+
+ const projectDescription = "Always write copy in British English. Ship behind a feature flag."
+ var projectID string
+ if err := testPool.QueryRow(ctx, `
+ INSERT INTO project (workspace_id, title, description) VALUES ($1, $2, $3) RETURNING id
+ `, testWorkspaceID, "Claim project description", projectDescription).Scan(&projectID); err != nil {
+ t.Fatalf("create project: %v", err)
+ }
+ t.Cleanup(func() { testPool.Exec(context.Background(), `DELETE FROM project WHERE id = $1`, projectID) })
+
+ var agentID, runtimeID string
+ if err := testPool.QueryRow(ctx,
+ `SELECT id, runtime_id FROM agent WHERE workspace_id = $1 LIMIT 1`,
+ testWorkspaceID,
+ ).Scan(&agentID, &runtimeID); err != nil {
+ t.Fatalf("get agent: %v", err)
+ }
+
+ var issueID string
+ if err := testPool.QueryRow(ctx, `
+ INSERT INTO issue (
+ workspace_id, project_id, title, status, priority, creator_id, creator_type, number, position
+ ) VALUES ($1, $2, 'project description', 'todo', 'medium', $3, 'member', 88002, 0)
+ RETURNING id
+ `, testWorkspaceID, projectID, testUserID).Scan(&issueID); err != nil {
+ t.Fatalf("create issue: %v", err)
+ }
+ t.Cleanup(func() { testPool.Exec(context.Background(), `DELETE FROM issue WHERE id = $1`, issueID) })
+
+ var taskID string
+ if err := testPool.QueryRow(ctx, `
+ INSERT INTO agent_task_queue (
+ agent_id, runtime_id, issue_id, status, priority
+ ) VALUES ($1, $2, $3, 'queued', 0)
+ RETURNING id
+ `, agentID, runtimeID, issueID).Scan(&taskID); err != nil {
+ t.Fatalf("create task: %v", err)
+ }
+ t.Cleanup(func() { testPool.Exec(context.Background(), `DELETE FROM agent_task_queue WHERE id = $1`, taskID) })
+
+ w := httptest.NewRecorder()
+ req := newDaemonTokenRequest("POST", "/api/daemon/runtimes/"+runtimeID+"/claim", nil, testWorkspaceID, "test-claim-project-desc")
+ req = withURLParam(req, "runtimeId", runtimeID)
+ testHandler.ClaimTaskByRuntime(w, req)
+ if w.Code != http.StatusOK {
+ t.Fatalf("ClaimTaskByRuntime: %d %s", w.Code, w.Body.String())
+ }
+
+ var resp struct {
+ Task *struct {
+ ProjectID string `json:"project_id"`
+ ProjectDescription string `json:"project_description"`
+ } `json:"task"`
+ }
+ if err := json.NewDecoder(w.Body).Decode(&resp); err != nil {
+ t.Fatalf("decode: %v", err)
+ }
+ if resp.Task == nil {
+ t.Fatal("expected task in response")
+ }
+ if resp.Task.ProjectID != projectID {
+ t.Errorf("project_id = %q, want %q", resp.Task.ProjectID, projectID)
+ }
+ if resp.Task.ProjectDescription != projectDescription {
+ t.Errorf("project_description = %q, want %q", resp.Task.ProjectDescription, projectDescription)
+ }
+}
+
+// The quick-create path resolves its project from the task context JSONB
+// (not an issue row), so its project_description wiring is a separate branch
+// in the claim handler and needs its own boundary assertion.
+func TestClaimTask_QuickCreateInjectsProjectDescription(t *testing.T) {
+ if testHandler == nil {
+ t.Skip("database not available")
+ }
+
+ ctx := context.Background()
+ agentID, runtimeID, daemonID := createRuntimeGuardAgent(t, ctx)
+
+ const projectDescription = "Use the design system tokens; never hardcode colors."
+ var projectID string
+ if err := testPool.QueryRow(ctx, `
+ INSERT INTO project (workspace_id, title, description) VALUES ($1, $2, $3) RETURNING id
+ `, testWorkspaceID, "Quick-create project description", projectDescription).Scan(&projectID); err != nil {
+ t.Fatalf("create project: %v", err)
+ }
+ t.Cleanup(func() { testPool.Exec(context.Background(), `DELETE FROM project WHERE id = $1`, projectID) })
+
+ quickContext, _ := json.Marshal(map[string]any{
+ "type": "quick_create",
+ "prompt": "create a follow-up issue",
+ "requester_id": testUserID,
+ "workspace_id": testWorkspaceID,
+ "project_id": projectID,
+ })
+ if _, err := testPool.Exec(ctx, `
+ INSERT INTO agent_task_queue (agent_id, runtime_id, status, priority, context)
+ VALUES ($1, $2, 'queued', 2, $3)
+ `, agentID, runtimeID, quickContext); err != nil {
+ t.Fatalf("setup: create quick-create task: %v", err)
+ }
+
+ task := claimTaskForRuntimeGuard(t, runtimeID, daemonID)
+ if task.ProjectID != projectID {
+ t.Errorf("quick-create project_id = %q, want %q", task.ProjectID, projectID)
+ }
+ if task.ProjectDescription != projectDescription {
+ t.Errorf("quick-create project_description = %q, want %q", task.ProjectDescription, projectDescription)
+ }
+}
+
// When the issue's project has no github_repo resources, the claim handler
// must fall back to workspace repos (the pre-override behavior).
func TestClaimTask_ProjectWithoutRepos_FallsBackToWorkspaceRepos(t *testing.T) {
@@ -2510,6 +2632,8 @@ type claimRuntimeGuardTask struct {
ChatMessage string `json:"chat_message"`
ThreadName string `json:"thread_name"`
QuickCreateAttachmentIDs []string `json:"quick_create_attachment_ids"`
+ ProjectID string `json:"project_id"`
+ ProjectDescription string `json:"project_description"`
}
func claimTaskForRuntimeGuard(t *testing.T, runtimeID, daemonID string) *claimRuntimeGuardTask {
diff --git a/server/internal/service/builtin_skills/multica-projects-and-resources/SKILL.md b/server/internal/service/builtin_skills/multica-projects-and-resources/SKILL.md
index 2d126861c2..e7ee3c21fa 100644
--- a/server/internal/service/builtin_skills/multica-projects-and-resources/SKILL.md
+++ b/server/internal/service/builtin_skills/multica-projects-and-resources/SKILL.md
@@ -24,6 +24,8 @@ comments do not create durable project resources.
A project groups work and carries durable resources. A resource is not just display metadata; it is context later injected into task briefs and `.multica/project/resources.json`.
+A project's `description` is also durable context: when an issue (or a quick-create task) is bound to a project, the project description is injected into the agent's brief under `## Project Context` and written to `.multica/project/resources.json` as `project_description`. Use it for project-wide rules/context that should apply to every task in the project.
+
Common resource types:
- `github_repo` — durable GitHub repo context, with `resource_ref.url` and optional `default_branch_hint`;
diff --git a/server/internal/service/builtin_skills/multica-projects-and-resources/references/projects-and-resources-source-map.md b/server/internal/service/builtin_skills/multica-projects-and-resources/references/projects-and-resources-source-map.md
index 3339d05ada..d207dea773 100644
--- a/server/internal/service/builtin_skills/multica-projects-and-resources/references/projects-and-resources-source-map.md
+++ b/server/internal/service/builtin_skills/multica-projects-and-resources/references/projects-and-resources-source-map.md
@@ -8,3 +8,4 @@
- `server/cmd/server/router.go` exposes `/api/projects` plus `/api/projects/{projectId}/resources` routes.
- `server/pkg/db/queries/project_resource.sql` is the CRUD query surface for `project_resource` rows.
- Project resources are written into `.multica/project/resources.json` for agent workdirs.
+- A project's `description` is injected as durable context for every task in the project. The claim handler (`server/internal/handler/daemon.go`) reads `proj.Description` onto the claim response (`ProjectDescription`, `server/internal/handler/agent.go`); the daemon carries it through `Task` (`server/internal/daemon/types.go`) and `TaskContextForEnv` (`server/internal/daemon/execenv/execenv.go`) into the brief's `## Project Context` section (`server/internal/daemon/execenv/runtime_config.go`) and into `.multica/project/resources.json` as `project_description` (`server/internal/daemon/execenv/context.go`).