Docs/Skills and code/src/
src/stages/32-within-channel-performance-report.js
import path from "node:path";
import Database from "better-sqlite3";
import { config as projectConfig } from "../../config.js";
import { writeWithinChannelPerformanceReports } from "../analysis/within-channel-performance-report.js";
const args = process.argv.slice(2);
const argValue = name => args.find(value => value.startsWith(`${name}=`))?.slice(name.length + 1);
const databasePath = path.resolve(projectConfig.dbPath);
const db = new Database(databasePath, { readonly: true, fileMustExist: true });
try {
const runId = argValue("--run-id") ?? null;
const result = writeWithinChannelPerformanceReports(db, process.cwd(), runId);
console.log("[within-channel:report] Done", result);
} catch (error) {
console.error("[within-channel:report] Failed", { database: databasePath, message: error.message, stack: error.stack });
process.exitCode = 1;
} finally {
db.close();
}
Shown as it is in the repository at build time (2026-11-03); the home directory appears as <home>. If this page and the file differ, the file is right. Back to the catalogue.