diff --git a/src/report.ts b/src/report.ts index 8024577..a9896b9 100644 --- a/src/report.ts +++ b/src/report.ts @@ -79,6 +79,7 @@ function renderMarkdown(report: BoundReport): string { if (report.findings.length === 0) { lines.push('No task scope creep findings.'); + lines.push('', ...feedbackFooter()); return `${lines.join('\n')}\n`; } @@ -115,9 +116,21 @@ function renderMarkdown(report: BoundReport): string { lines.push(''); } + lines.push(...feedbackFooter()); return `${lines.join('\n').trimEnd()}\n`; } +function feedbackFooter(): string[] { + return [ + '## Help improve TaskBound', + '', + '- False positive: https://github.com/Conalh/TaskBound/issues/new?template=false-positive.yml', + '- Missing signal: https://github.com/Conalh/TaskBound/issues/new?template=missing-signal.yml', + '- Team pilot or workflow need: https://github.com/Conalh/TaskBound/issues/new?template=team-pilot.yml', + '- Validation tracker: https://github.com/Conalh/TaskBound/issues/8' + ]; +} + function renderText(report: BoundReport): string { const lines = [`TaskBound scope review: ${report.rating.toUpperCase()}`]; if (report.taskScopeSummary.length > 0) { diff --git a/test/cli-output.test.mjs b/test/cli-output.test.mjs index d36e82b..23ab2a9 100644 --- a/test/cli-output.test.mjs +++ b/test/cli-output.test.mjs @@ -61,6 +61,23 @@ test('CLI emits Markdown task scope summary', async () => { assert.match(stdout, /header\.css|css/i); }); +test('CLI Markdown report links feedback and team pilot intake', async () => { + const oldDir = join(testDir, 'fixtures', 'on-task', 'old'); + const newDir = join(testDir, 'fixtures', 'on-task', 'new'); + + const { stdout } = await execFileAsync( + process.execPath, + ['dist/index.js', 'review', '--task', TASK, '--old', oldDir, '--new', newDir, '--format', 'markdown'], + { cwd: packageRoot } + ); + + assert.match(stdout, /## Help improve TaskBound/); + assert.match(stdout, /template=false-positive\.yml/); + assert.match(stdout, /template=missing-signal\.yml/); + assert.match(stdout, /template=team-pilot\.yml/); + assert.match(stdout, /\/issues\/8/); +}); + test('CLI emits GitHub warning annotations', async () => { const oldDir = join(testDir, 'fixtures', 'scope-creep', 'old'); const newDir = join(testDir, 'fixtures', 'scope-creep', 'new');