Skip to content

chore: add measurable impact verification to PR and issue templates#34

Closed
venikman wants to merge 4 commits into
mainfrom
devin/1776103000-measurable-impact-templates
Closed

chore: add measurable impact verification to PR and issue templates#34
venikman wants to merge 4 commits into
mainfrom
devin/1776103000-measurable-impact-templates

Conversation

@venikman
Copy link
Copy Markdown
Owner

@venikman venikman commented Apr 13, 2026

What

Add a required "Impact verification" section to the PR template and a required "Measurable impact" field to all three issue templates (feature request, task, bug report).

Why

Every PR and issue should declare its measurable impact upfront so reviewers can independently verify the change's effect with a reproducible command. This closes the gap between "tests pass" and "this PR actually achieved what it claims."

Type

  • chore — maintenance (deps, CI, cleanup)

Changes

  • PR template: Add ## Impact verification section with a | Metric | Before | After | How to measure | table and examples of measurable metrics (LOC, file count, hard-coded IDs, test count, build time, etc.)
  • feature_request.yml: Add required Measurable impact textarea with before/after target format
  • task.yml: Add required Measurable impact textarea with before/after target format
  • bug_report.yml: Add required Measurable impact of the fix textarea with before/after broken/fixed format
  • PR template example fix: Updated LOC example to reference query-engine.ts (1614 LOC) instead of compiler.ts (144 LOC) after FPF-spec revalidation

Impact verification

Metric Before After How to measure
PR template has impact section No Yes grep -c 'Impact verification' .github/pull_request_template.md
Issue templates with required impact field 0/3 3/3 grep -c 'Measurable impact' .github/ISSUE_TEMPLATE/*.yml

FPF-spec revalidation

Validated all templates and 7 open issues against FPF-spec.md via query_fpf_spec (local vectorless runtime, sha256:15a77f8e…ecd879).

Item FPF Status Confidence Grounded IDs Verdict
PR Template ok 0.98 E.19 PASS
Issue #2 (query-engine split) ambiguous 0.78 E.19, E.17.2 PASS
Issue #3 (indexing view) ok 0.98 C.2.1, E.19 PASS
Issue #4 (heuristics) ok 0.88 C.24, E.8, G.6, E.10, A.2.6, F.18, A.6.1, A.19 PASS
Issue #5 (adjacency list) ok 0.98 C.2.1, F.18, A.19 PASS
Issue #6 (contract tests) ok 0.98 E.19, A.6.Q PASS
Issue #9 (session cache) ambiguous 0.78 A.19, F.18 PASS
Issue #15 (discovery layer) ok 0.98 C.24, F.18 PASS

Key FPF alignment: E.19 (Pattern Quality Gates / PQG) mandates profile-based review with reproducible checks — the | Metric | Before | After | How to measure | table maps directly to this. All codebase metrics verified against actual values (query-engine.ts=1614 LOC, 14 runtime modules, 10 createTool calls, 6 hard-coded IDs, 5 test files).

Validation

  • bun run lint passes locally
  • bun run check passes locally
  • bun run test passes locally
  • No new warnings introduced

Boundary check

  • Runtime source set is FPF-spec.md only — no additional corpora added
  • No vector database or remote indexing introduced
  • No Python code added
  • MCP tool contracts stay in src/mcp/tool-contracts.ts

Agent metadata

Field Value
Agent Devin
Session https://app.devin.ai/sessions/8fa4d238c77d45b2bfa931f5547007bc
Prompt Update PR/issue templates to require measurable impact verification, then update open issues, then revalidate against FPF-spec

Requested by: @venikman

Co-Authored-By: Stanislau <nedbailov375426@gmail.com>
Copilot AI review requested due to automatic review settings April 13, 2026 17:58
@devin-ai-integration
Copy link
Copy Markdown
Contributor

Original prompt from Stanislau

Your role, "Merger," is to get the branch to the point where it's ready to be merged. You have the freedom to comment on PR (only the current one you are working on, because you will work on one PR at a time). And when it's ready, you have to ask me; this is the only place where you will have to wait for me. And don't forget to use https://mastra.ai/docs

Recommended merge order:
#25 (Devin Review) — CI workflow (lint, typecheck, tests)
#30 (Devin Review) — Split compiler.ts into stages
#28 (Devin Review) — Replace hard-coded heuristics with metadata
#27 (Devin Review) — Persist session cache
#29 (Devin Review) — Stable indexing view + semantic refresh
#32 (Devin Review) — Stage-local contract tests (depends on #30 + #31 splits)
#33 (Devin Review) — Browse/search discovery layer

#31 (Devin Review) — Split query-engine.ts into stages
#26 (Devin Review) — Pre-build adjacency list

@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 13, 2026

📝 Walkthrough

Walkthrough

Added a required "impact" textarea field to three GitHub issue templates (bug_report, feature_request, task) and added an "Impact verification" section to the pull request template; each asks for at least one measurable metric with before/after values and reproducible measurement instructions.

Changes

Cohort / File(s) Summary
Issue Templates
.github/ISSUE_TEMPLATE/bug_report.yml, .github/ISSUE_TEMPLATE/feature_request.yml, .github/ISSUE_TEMPLATE/task.yml
Inserted a new required textarea field with id: impact and label “Measurable impact” / “Measurable impact of the fix”; includes table-style placeholder and requires a measurement command/method.
Pull Request Template
.github/pull_request_template.md
Added an "Impact verification" section with a metrics table (Before / After / How to measure) and instructions to include reproducible measurement steps.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I tally hops in metric rows,

Before and after, how it shows,
A carrot test, a command to run,
Proof of change when work is done,
Hooray—small measures, mighty fun!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding measurable impact verification to PR and issue templates, which matches the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description is comprehensive and well-structured, following the template with all required sections completed: What, Why, Type, Changes, Impact verification, Validation, Boundary check, and Agent metadata.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch devin/1776103000-measurable-impact-templates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a mandatory 'Impact verification' section across the repository's issue and pull request templates to ensure all changes include measurable verification criteria. The review feedback identifies several opportunities to improve the accuracy of the provided examples, including updating tool counts and file references to match the current codebase, and enhancing the portability of a grep command example.

label: Measurable impact
description: |
How will we know this feature works? List at least one metric with a before/after target and a command or method to measure it.
Example: "MCP tool count: before 8 → after 10. Measure: count tools in `src/mcp/tools.ts`"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current count of MCP tools in src/mcp/tools.ts is 9. Updating the example from before 8 to before 9 ensures the template reflects the actual state of the codebase.

      Example: "MCP tool count: before 9 → after 11. Measure: count tools in `src/mcp/tools.ts`"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct — there are 10 createTool calls currently. Updated the example to before 10 → after 12 with a concrete grep -c createTool src/mcp/tools.ts command.

Comment thread .github/ISSUE_TEMPLATE/task.yml Outdated
label: Measurable impact
description: |
How will we verify the impact of this task? List at least one metric with a before/after target and a reproducible measurement command.
Example: "LOC in compiler.ts: before 1509 → after ≤300. Measure: `wc -l src/runtime/compiler.ts`"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example LOC for compiler.ts (1509 lines) is inaccurate as the file is currently only 145 lines long. query-engine.ts is the file that matches the ~1600 line count. Updating the example to use query-engine.ts makes it more realistic and less confusing for contributors.

      Example: "LOC in query-engine.ts: before 1615 → after ≤1200. Measure: `wc -l src/runtime/query-engine.ts`"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right — compiler.ts is now 144 lines after the split. Updated example to reference query-engine.ts (1614 lines) which is the actual large file.

Comment thread .github/pull_request_template.md Outdated

| Metric | Before | After | How to measure |
|--------|--------|-------|----------------|
| <!-- e.g. hard-coded node IDs in query-engine.ts --> | <!-- e.g. 12 --> | <!-- e.g. 0 --> | <!-- e.g. `grep -c 'C\.\|A\.' src/runtime/query-engine.ts` --> |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The grep command in the example uses \| for alternation, which is not portable across all grep implementations (e.g., it fails on BSD grep used in macOS). Using grep -E (Extended Regular Expressions) is the standard, portable way to perform alternation.

Suggested change
| <!-- e.g. hard-coded node IDs in query-engine.ts --> | <!-- e.g. 12 --> | <!-- e.g. 0 --> | <!-- e.g. `grep -c 'C\.\|A\.' src/runtime/query-engine.ts` --> |
| <!-- e.g. hard-coded node IDs in query-engine.ts --> | <!-- e.g. 12 --> | <!-- e.g. 0 --> | <!-- e.g. `grep -Ec 'C\.|A\.' src/runtime/query-engine.ts` --> |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — switched to grep -Ec for portable alternation. Fixed in the next commit.

Co-Authored-By: Stanislau <nedbailov375426@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates GitHub PR/issue templates to require authors to specify measurable impact and how reviewers can reproduce/verify it, strengthening reviewability and outcome verification across the repo.

Changes:

  • Added an Impact verification section to the PR template with a metric before/after table and measurement examples.
  • Added required Measurable impact fields to the Feature Request and Task issue forms.
  • Added required Measurable impact of the fix field to the Bug Report issue form.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
.github/pull_request_template.md Adds an “Impact verification” section and examples to make PR impact measurable/reproducible.
.github/ISSUE_TEMPLATE/feature_request.yml Adds a required “Measurable impact” textarea with before/after target format.
.github/ISSUE_TEMPLATE/task.yml Adds a required “Measurable impact” textarea with before/after target format.
.github/ISSUE_TEMPLATE/bug_report.yml Adds a required “Measurable impact of the fix” textarea with broken/fixed format.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/pull_request_template.md Outdated

| Metric | Before | After | How to measure |
|--------|--------|-------|----------------|
| <!-- e.g. hard-coded node IDs in query-engine.ts --> | <!-- e.g. 12 --> | <!-- e.g. 0 --> | <!-- e.g. `grep -Ec 'C\.|A\.' src/runtime/query-engine.ts` --> |
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table includes a pre-populated (but visually empty) row whose contents are entirely HTML comments. This can make it easy to submit the template without actually providing a measurable metric, despite the instruction to "Fill in at least one row." Consider removing the placeholder row entirely (or moving the example row into the surrounding HTML comment) so the author has to add a real row.

Suggested change
| <!-- e.g. hard-coded node IDs in query-engine.ts --> | <!-- e.g. 12 --> | <!-- e.g. 0 --> | <!-- e.g. `grep -Ec 'C\.|A\.' src/runtime/query-engine.ts` --> |

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional — the HTML-comment placeholder row renders as a visually empty row with the table headers visible, which shows authors the expected column structure. Removing it would leave just headers with no hint of what a filled row looks like. The surrounding comment block already has richer examples. Keeping it as-is.

Comment thread .github/pull_request_template.md Outdated

| Metric | Before | After | How to measure |
|--------|--------|-------|----------------|
| <!-- e.g. hard-coded node IDs in query-engine.ts --> | <!-- e.g. 12 --> | <!-- e.g. 0 --> | <!-- e.g. `grep -Ec 'C\.|A\.' src/runtime/query-engine.ts` --> |
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example measurement command uses grep -c 'C\.\|A\.' ... which relies on BRE alternation via \| and may not work consistently across grep implementations (notably BSD/macOS). Prefer an explicitly portable form (e.g., use grep -E/egrep or rg) in templates so reviewers can reproduce measurements on common dev environments.

Suggested change
| <!-- e.g. hard-coded node IDs in query-engine.ts --> | <!-- e.g. 12 --> | <!-- e.g. 0 --> | <!-- e.g. `grep -Ec 'C\.|A\.' src/runtime/query-engine.ts` --> |
| <!-- e.g. hard-coded node IDs in query-engine.ts --> | <!-- e.g. 12 --> | <!-- e.g. 0 --> | <!-- e.g. `grep -E -c 'C\.|A\.' src/runtime/query-engine.ts` --> |

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already addressed — the previous commit switched to grep -Ec which uses ERE explicitly. The current code on the branch already reads grep -Ec 'C\.|A\.'.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration Bot and others added 2 commits April 13, 2026 18:02
Co-Authored-By: Stanislau <nedbailov375426@gmail.com>
…C) instead of compiler.ts (144 LOC)

FPF-spec revalidation found the compiler.ts example misleading since it's
already 144 LOC after prior splits. query-engine.ts (1614 LOC) is the actual
refactor target per issue #2.

Grounded in: E.19 (Pattern Quality Gates — reproducible measurement examples)

Co-Authored-By: Stanislau <nedbailov375426@gmail.com>
@venikman
Copy link
Copy Markdown
Owner Author

Code Review

Overview

Adds an "Impact verification" section to .github/pull_request_template.md and a "Measurable impact" textarea (with table placeholder) to the three issue templates (bug, feature, task). required: true on all three issue templates; the PR template just has an HTML comment instructing authors to fill it.

Strengths

  • Right goal — measurable before/after numbers are a genuinely useful forcing function to avoid "works better"-style PR descriptions.
  • Good examples in the comments — LOC, grep counts, test counts, build time, artifact size. These are concrete and reproducible.
  • Consistent table shape across all four templates.

Issues

Duplicate of #35

This PR and #35 (chore: add required measurable impact verification...) appear to be two revisions of the same change, both open, same author. #35 has:

  • Cleaner single-metric label (Measurable impact verification) — one phrase instead of two different ones
  • Tighter placeholder with 2 concrete example rows instead of 1
  • Explicit "no vague criteria" guardrail text
  • Same required: true semantics

Recommendation: close this PR and land #35. Keeping both open will produce conflicting merges.

Template friction for trivial PRs

Requiring a measurable-impact table on every PR adds cost for typo fixes, docs-only changes, and mechanical renames. Consider a "trivial" opt-out row (e.g. | trivial change | N/A | N/A | n/a |) or a checkbox to skip the table for doc-only PRs. This PR itself would technically need a measurable-impact row under its own rule — which isn't meaningfully measurable.

PR template is a markdown file, not a yaml form

Unlike the issue forms, the PR template can't enforce required: true. The guardrail is honor-system. Consider a CI check that fails the build if the table is unfilled (e.g. scan for placeholder text like <!-- e.g. in the PR body).

grep -c createTool example is a bit fragile

In the feature-request placeholder: grep -c createTool src/mcp/tools.ts. If createTool ever wraps in a factory, this count becomes stale. Fine as an illustrative example, but worth a note that the specific command should match the actual PR's impact.

Recommendation

Close this PR in favor of #35. If you want to keep this one instead, close #35 — but don't land both.

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Thanks for the thorough review. Agreed on all points:

  1. Duplicate of chore: add required measurable impact verification to issue and PR templates #35 — PR chore: add required measurable impact verification to issue and PR templates #35 is the cleaner version with tighter placeholders, the "no vague criteria" guardrail, and corrected grep commands for issues Split query-engine.ts into retrieval stages #2/Replace hard-coded heuristic seeds and route special-casing with metadata #4/Pre-build adjacency list for relation graph traversal #5/Add public browse/search MCP discovery layer for Codex-facing workflows #15. Closing this PR in favor of chore: add required measurable impact verification to issue and PR templates #35.

  2. Template friction for trivial PRs — Good call. A | trivial change | N/A | N/A | n/a | opt-out row or a doc-only checkbox would reduce friction without losing the forcing function for substantive changes. Can address in a follow-up on chore: add required measurable impact verification to issue and PR templates #35.

  3. PR template is honor-system — Correct, markdown templates can't enforce required: true. A CI check scanning for unfilled placeholder text (<!-- e.g.) would make this enforceable. Worth adding to the CI workflow (chore: add CI workflow for lint, typecheck, and tests #25).

  4. grep -c createTool fragility — Fair point. The command is meant as an illustrative example, not a permanent fixture. chore: add required measurable impact verification to issue and PR templates #35's placeholder already notes this should match the actual PR's impact.

Closing in favor of #35.

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Closing in favor of #35 per code review feedback.

@venikman venikman deleted the devin/1776103000-measurable-impact-templates branch May 9, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants