/** * community.ts * Ingestion side of the community feedback flow: list/parse/close * `community-feedback`-labeled GitHub issues on jparkerweb/plan2code. */ import { execa } from 'execa'; import type { RunMetrics, PromptVersions, UserFeedback, Step1PlanMetrics, Step2DocumentMetrics, Step3ImplementMetrics, Step4FinalizeMetrics, } from './types.js'; import { extractMetricsJson } from './collector.js'; import { backfillPromptVersions } from './aggregator.js'; // ── GitHub interaction (via gh CLI) ────────────────────────────────────────── export interface CommunityIssue { number: number; body: string; } interface RawIssue { number: number; title: string; body: string; labels: { name: string }[]; } const COMMUNITY_LABEL = 'community-feedback'; const FEEDBACK_TITLE_PREFIX = '[Feedback]'; const METRICS_JSON_MARKER = /