feat(bg-tasks): coding-from-meetings — auto-implement coding action items (#630)

* feat(bg-tasks): coding-from-meetings — auto-implement coding action items

A background-task flavor that watches for meeting notes, scans them for
actionable coding items, and autonomously implements them in isolated git
worktrees, summarizing results in the task's index.md.

- Emit `meeting.notes_ready` when Fireflies/Granola first write a meeting note
- Add optional `projectId` to BackgroundTask (pins a coding task to a repo)
- New `launch-code-task` builtin tool: per group of items, create a
  worktree-isolated, yolo, direct code session, wrap the prompt in an
  autonomous scaffold, run async, and finalize a per-session row in index.md
- Group code sessions under their meeting heading in index.md
- Summary from the code agent's `## Summary` section; file counts from
  `git diff` vs the worktree fork point (counts committed work, not just dirty)
- Guardrails: self-heal projectId across runs, cap launches per run, and bar
  the bg-task agent from managing/spawning tasks
- UI: "View available templates" -> Coding-from-meetings preset (repo picker,
  prefilled trigger + instructions)

See plan.md for the full design.

* let the copilot able to configure a coding background agent

* Delete plan.md

---------

Co-authored-by: Arjun <6592213+arkml@users.noreply.github.com>
This commit is contained in:
gagan 2026-06-18 22:56:43 -07:00 committed by GitHub
parent 2f926f8dc0
commit 1f8ac2cf34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 795 additions and 11 deletions

View file

@ -27,6 +27,10 @@ export type BackgroundTask = {
instructions: string;
active: boolean;
triggers?: Triggers;
// When set, this is a *coding* task: it implements code in the pinned code
// project (a registered repo) via the `launch-code-task` tool, each launch
// running in its own isolated worktree. Omit for ordinary OUTPUT/ACTION tasks.
projectId?: string;
model?: string;
provider?: string;
createdAt: string;
@ -48,6 +52,7 @@ export type BackgroundTaskSummary = {
instructions: string;
active: boolean;
triggers?: Triggers;
projectId?: string;
createdAt: string;
lastAttemptAt?: string;
lastRunId?: string;
@ -56,11 +61,14 @@ export type BackgroundTaskSummary = {
lastRunError?: string;
};
// NOTE: keep `BackgroundTaskSummary` (above) and `BackgroundTask` (top) in sync.
export const BackgroundTaskSchema = z.object({
name: z.string().min(1).describe('User-facing display name.'),
instructions: z.string().min(1).describe('A persistent instruction in the user\'s words — what should this task keep doing? E.g. "Summarize my unread emails every morning into a brief digest." The agent re-reads instructions on every run and decides whether to rewrite index.md (OUTPUT mode) or perform a side-effect and journal it (ACTION mode) based on the verbs.'),
active: z.boolean().default(true).describe('Set false to pause without deleting.'),
triggers: TriggersSchema.optional().describe('When the agent fires. Omit for manual-only.'),
projectId: z.string().optional().describe('When set, marks this as a coding task pinned to a registered code project (repo). The agent implements detected work via the launch-code-task tool, each launch in its own isolated worktree.'),
model: z.string().optional().describe('ADVANCED — leave unset. Per-task model override.'),
provider: z.string().optional().describe('ADVANCED — leave unset. Per-task provider name override.'),
createdAt: z.string().describe('ISO timestamp set once at create-time.'),
@ -77,6 +85,7 @@ export const BackgroundTaskSummarySchema = z.object({
instructions: z.string(),
active: z.boolean(),
triggers: TriggersSchema.optional(),
projectId: z.string().optional(),
createdAt: z.string(),
lastAttemptAt: z.string().optional(),
lastRunId: z.string().optional(),

View file

@ -1299,6 +1299,7 @@ const ipcSchemas = {
name: z.string(),
instructions: z.string(),
triggers: TriggersSchema.optional(),
projectId: z.string().optional(),
model: z.string().optional(),
provider: z.string().optional(),
}),