2026-06-09 17:08:34 +02:00
|
|
|
import type { Team, TaskType, TaskNature, Complexity } from "@/types";
|
2026-06-07 22:38:36 +02:00
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
2026-06-09 17:08:34 +02:00
|
|
|
// Prompter draft types — shared by the live intake hook (`prompter-live.ts`),
|
|
|
|
|
// the draft card, and the confirm dialog. The chat itself is driven by the
|
|
|
|
|
// spawned agent over SSE (`prompter-live.ts`); these are just the shapes of
|
|
|
|
|
// the structured draft the agent proposes and the human confirms.
|
2026-06-07 22:38:36 +02:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
2026-06-09 17:08:34 +02:00
|
|
|
/** One cell's slice of the work — the per-cell breakdown of The Work. */
|
|
|
|
|
export interface CellWork {
|
|
|
|
|
team: Team;
|
|
|
|
|
summary: string;
|
|
|
|
|
items: string[];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** A structured task draft, mirroring the backend PrompterDraftTask. */
|
2026-06-07 22:38:36 +02:00
|
|
|
export interface DraftProposal {
|
|
|
|
|
title: string;
|
|
|
|
|
description: string;
|
|
|
|
|
acceptance_criteria: string[];
|
|
|
|
|
team: Team;
|
|
|
|
|
priority?: number;
|
|
|
|
|
task_type?: TaskType;
|
2026-06-09 17:08:34 +02:00
|
|
|
nature?: TaskNature;
|
2026-06-07 22:38:36 +02:00
|
|
|
estimated_complexity?: Complexity;
|
2026-06-09 17:08:34 +02:00
|
|
|
// Structured spec fields
|
|
|
|
|
objective?: string | null;
|
|
|
|
|
what_this_builds?: string[];
|
|
|
|
|
the_work?: CellWork[];
|
|
|
|
|
notes?: string[];
|
|
|
|
|
// Targeting (resolved at confirm time)
|
|
|
|
|
project_id?: string | null;
|
|
|
|
|
product_id?: string | null;
|
2026-06-07 22:38:36 +02:00
|
|
|
}
|
|
|
|
|
|
2026-06-09 17:08:34 +02:00
|
|
|
/** Single-cell project vs board-led multi-cell product. */
|
|
|
|
|
export type DraftScale = "single" | "multi";
|
|
|
|
|
|
|
|
|
|
/** What the human picked/edited at confirm time. `route` is which start button:
|
|
|
|
|
* "board" (Board review & Start) or "main_pm" (Approve & Start). */
|
|
|
|
|
export interface ConfirmPayload {
|
|
|
|
|
project_id?: string;
|
|
|
|
|
product_id?: string;
|
|
|
|
|
draft?: DraftProposal;
|
|
|
|
|
route?: "board" | "main_pm";
|
2026-06-07 22:38:36 +02:00
|
|
|
}
|