Ingest community feedback submissions in plan2code-metrics

Adds a CLI flow that lists open community-feedback issues via gh, validates
and parses each METRICS_JSON payload, imports them deduped by run_id,
re-aggregates and closes the issue. Community runs cohort by Plan2Code
version rather than prompt fingerprint, and local cohorts stay preferred so
ingested feedback never displaces the maintainer's current generation. Adds
Devin CLI as an AI backend.

AI Assisted
This commit is contained in:
2026-08-08 12:39:28 -07:00
parent 161e424632
commit 474c76e564
9 changed files with 788 additions and 26 deletions
+7 -1
View File
@@ -66,6 +66,11 @@ export interface RunMetrics {
schema_version: '1.0';
run_id: string;
plan2code_version: string;
// Origin of the run. Local runs are collected on the maintainer's machine;
// community runs are ingested from GitHub feedback issues. Absent on pre-v1.17
// run files, which are treated as 'local'. Drives cohort keying (see
// cohortKeyForRun in aggregator.ts).
source?: 'local' | 'community';
prompt_versions: PromptVersions;
project: {
name: string;
@@ -102,7 +107,8 @@ export interface PromptProposal {
// Aggregated metrics schema
export interface CohortMetrics {
cohort_key: string; // hash of sorted prompt_versions
cohort_key: string; // local: hash of sorted prompt_versions; community: `community:v<version>`
source?: 'local' | 'community';
prompt_versions: PromptVersions;
run_count: number;
run_ids: string[];