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:
jparkerweb committed 2026-08-08 12:39:28 -07:00
1 parent 987f7b8b04
commit 1d88d787a3
9 files changed
+788 -26

No files matched your search

+2 -1
View File
@@ -43,7 +43,7 @@ function readFileSafe(filePath: string): string | null {
* If `stepFilter` is provided, returns only the block with matching "step" field.
* Returns parsed object or null if not found / invalid.
*/
function extractMetricsJson(content: string, stepFilter?: string): Record<string, unknown> | null {
export function extractMetricsJson(content: string, stepFilter?: string): Record<string, unknown> | null {
const re = /<!--\s*METRICS_JSON\s+(\{[\s\S]*?\})\s*-->/g;
let match: RegExpExecArray | null;
while ((match = re.exec(content)) !== null) {
@@ -611,6 +611,7 @@ export async function collectRun(opts: CollectorOptions): Promise<RunMetrics> {
schema_version: '1.0',
run_id: runId,
plan2code_version: plan2codeVersion,
source: 'local',
prompt_versions: collectPromptVersions(plan2codeRoot),
project: {
name: projectName,