DORA query tools for agent reasoning #28
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
test:label-a
test:label-b
test:set-label
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/forgejo-mcp#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
New issue — created as part of DORA measurement expansion (2026-06-13). Agent DORA expansion line in the DORA framework measurement automation roadmap.
Repo
ldraney/forgejo-mcpUser Story
As an AI agent
I want to query PR velocity, lead time, and rework rate from Forgejo
So that I can reason about DORA metrics and make data-driven recommendations
Context
This is the "Agent DORA expansion" line in the DORA framework measurement automation roadmap. PR merge frequency and lead time are derivable from Forgejo's existing PR data. Rework rate can be approximated from review cycle count.
Agents currently have no way to reason about DORA data. Adding query tools lets agents correlate Forgejo activity with DORA metrics, enabling data-driven decisions about code quality, deployment cadence, and process improvements.
File Targets
src/forgejo_mcp/tools/dora.py— new tool module for DORA query toolssrc/forgejo_mcp/tools/__init__.py— register new module viaregister_all_tools()(addfrom . import doraimport)tests/test_dora_tools.py— tests for new toolsFeature Flag
None required — new MCP tools are additive.
Acceptance Criteria
Test Expectations
Constraints
src/forgejo_mcp/tools/workflows.pyfor examples)Checklist
Related
update_issuetool (most recent tool addition, pattern reference)set_label,comment_on_issue,create_repotools (batch tool addition pattern)dora-framework— DORA measurement automation roadmapproject-dora-metrics— parent projectIssue #28 Template Review
TEMPLATE CONFORMANCE
### Typepresent and valid (Feature)### Lineagepresent and non-empty### Repopresent (ldraney/forgejo-mcp)### User Storypresent with proper As a / I want / So that format### Contextpresent and non-empty### File Targetspresent with specific paths### Feature Flagpresent ("None required" -- reasonable for additive MCP tools)### Acceptance Criteriapresent with- [ ]checkboxes### Test Expectationspresent with- [ ]checkboxes### Constraintspresent and non-empty### Checklistpresent with standard items### RelatedpresentAll required sections from
template-issue-featureare present and non-empty.CONTENT QUALITY
User Story: Clear and well-formed. The persona ("AI agent") and value prop ("reason about DORA metrics") are concrete.
Acceptance Criteria: Four checkboxes, all testable. "At minimum one new MCP tool" is pragmatic scoping -- leaves room for the implementer to add rework-rate tooling without requiring it.
Test Expectations: Three unit tests covering velocity, lead time, and pagination. Missing: error handling tests (e.g., invalid repo, API failure, empty time range). This is a nit, not a blocker -- the implementer can add those.
Extra sections: The issue includes
### Whatand### Whysections that are not in the template. These are not blockers -- they provide useful context -- but they duplicate information already in### User Storyand### Context. Minor redundancy.FILE TARGETS REVIEW
src/forgejo_mcp/tools/dora.pysrc/forgejo_mcp/server.pytests/test_dora_tools.pyIssue with
server.pytarget: The issue listsserver.pyas needing modification to "register new tools." However, inspecting the actual codebase, tool registration happens insrc/forgejo_mcp/tools/__init__.pyvia theregister_all_tools()function (line 8:from . import workflows). A newdoramodule would need an additional import there, not a change toserver.py. The file target is inaccurate and will misdirect the implementing agent.Missing file target:
src/forgejo_mcp/tools/__init__.pymust be modified to addfrom . import dorainregister_all_tools(). This file is not listed.BLOCKERS
server.py-- The issue statesserver.pyneeds modification to register new tools. In reality, registration happens intools/__init__.py. This will misdirect the implementing agent. Fix: replaceserver.pywithsrc/forgejo_mcp/tools/__init__.pyin File Targets, or add__init__.pyand clarify thatserver.pyneeds no changes.NITS
Extra
### Whatand### Whysections -- Not in the template. The information is useful but redundant with### User Storyand### Context. Consider folding the content into those canonical sections for template consistency.Test Expectations could be stronger -- No error-handling test cases listed (API failures, invalid repos, empty results). Not a blocker since the AC says "at minimum," but worth adding for implementer guidance.
### Relatedis vague -- Referencesdora-metricsproject and "DORA framework measurement automation roadmap" but does not link to specific issue numbers or pal-e-docs slugs. An agent cannot trace these references.SCOPE CHECK
VERDICT: NEEDS_REWORK
Reason: The
server.pyfile target is inaccurate. The implementing agent will modify the wrong file for tool registration. Addsrc/forgejo_mcp/tools/__init__.pyto File Targets and either remove or correct theserver.pyentry. Once fixed, this issue is ready fornext_up.Updated per QA review: fixed file targets (
tools/__init__.pyfor registration viaregister_all_tools(),workflows.pypattern for implementation reference), removed duplicate### Whatand### Whysections (User Story and Context already cover this), added error-handling test expectations (invalid repo, API timeout), fixed Related references with explicit issue numbers and pal-e-docs slugs.Issue #28 Template Review (Re-review)
TEMPLATE CONFORMANCE
### Typeheader present and valid (Feature)- [ ]format in Acceptance Criteria, Test Expectations, and ChecklistPREVIOUS BLOCKER RESOLUTION
All five blockers from the prior review are resolved:
tools/dora.py,tools/__init__.py, andtests/test_dora_tools.py. No mention ofserver.py.register_all_tools()(addfrom . import doraimport)". This matches the actual pattern in the codebase where__init__.pyimports tool modules.### User Story,### Context) with no duplicates.dora-framework-- resolves in pal-e-docs (DORA Framework: Platform Axiom)project-dora-metrics-- resolves in pal-e-docs (Project: DORA Metrics)CONTENT QUALITY
__init__.pyregistration instruction includes the exact import statement needed. The pattern reference toworkflows.pyis accurate -- that is the only existing tool module.tests/test_dora_tools.py) is clear enough forpytest tests/test_dora_tools.py.BLOCKERS
None.
NITS
pytest tests/test_dora_tools.py). Template guidance says "Run command:pytest tests/ -k test_nameor equivalent." Low impact since the test file path is self-evident.VERDICT: APPROVED