MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / formatReviewReport

Function formatReviewReport

src/artifacts/review.ts:142–160  ·  view source on GitHub ↗
(artifactId: string, version: number, report: ReviewReport)

Source from the content-addressed store, hash-verified

140
141/** Render the report as the text the parent model reads back. */
142export function formatReviewReport(artifactId: string, version: number, report: ReviewReport): string {
143 const lines: string[] = [];
144 const badge: Record<ReviewVerdict, string> = {
145 looks_good: '✓ LOOKS_GOOD',
146 needs_work: '✎ NEEDS_WORK',
147 broken: '✗ BROKEN',
148 unverified: '? UNVERIFIED',
149 };
150 lines.push(`Review of "${artifactId}" v${version}: ${badge[report.verdict]}`);
151 lines.push(report.summary);
152 if (report.issues.length) {
153 lines.push('Issues:');
154 for (const i of report.issues) lines.push(` - ${i}`);
155 }
156 if (report.verdict === 'needs_work' || report.verdict === 'broken') {
157 lines.push(`Fix with artifact_update id="${artifactId}" (new version), then artifact_review again.`);
158 }
159 return lines.join('\n');
160}

Callers 2

executeMethod · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected