Skip to content

Support field-value intent (rationale/confidence/suggestion) in issue_write#2670

Open
iulia-b wants to merge 1 commit into
iunia/rationale-issue-write-typesfrom
iunia/rationale-issue_write-fields
Open

Support field-value intent (rationale/confidence/suggestion) in issue_write#2670
iulia-b wants to merge 1 commit into
iunia/rationale-issue-write-typesfrom
iunia/rationale-issue_write-fields

Conversation

@iulia-b

@iulia-b iulia-b commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds per-value intent (rationale, confidence, is_suggestion) to issue field values in the issue_write update path, mirroring the existing labels and type intent support.

Why

Agents setting custom issue field values should be able to attach the same reasoning metadata (rationale/confidence) and mark a value as a suggestion, just like they can for labels and issue types.

Stacked on top of #2663 (type intent). Base this PR on iunia/rationale-issue-write-types; review after the parent merges.

What changed

  • issueWriteFieldInput now carries a valueIntent, parsed in optionalIssueWriteFields via the shared parseValueIntent helper.
  • resolveIssueRequestFieldValues returns a map[int64]valueIntent keyed by resolved field ID for fields that carry intent.
  • Added UpdateIssueOptions.FieldValuesWithIntent and a new issueFieldValueWithIntent marshaler emitting {field_id, value, rationale?, confidence?, suggest?}.
  • UpdateIssue's object-form PATCH path now also emits issue_field_values in object form (via issueRequestWithIntentOverrides) when any field carries intent; plain field values stay as {field_id, value}.
  • Added the shared intent properties to the issue_fields item schema via withIntentProperties.
  • Added Test_IssueWrite_UpdateFieldValuesWithIntent and Test_IssueWrite_UpdateFieldValuesWithIntentErrors; regenerated the affected toolsnap.

MCP impact

  • Tool schema or behavior changed
    • issue_write issue_fields items now accept optional rationale, confidence, and is_suggestion. Intent is honored only on update and stripped on create.

Prompts tested (tool changes only)

Security / limits

  • No security or limits impact

Tool renaming

  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Updated (README / docs / examples)
Copilot AI review requested due to automatic review settings June 11, 2026 07:50
@iulia-b iulia-b requested a review from a team as a code owner June 11, 2026 07:50

Copilot AI left a comment

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.

Pull request overview

This PR extends the issue_write tool’s issue_fields update path to support per-field-value intent metadata (rationale, confidence, suggestion), aligning custom field values with the existing intent support for labels and issue types.

Changes:

  • Parse and carry rationale/confidence/is_suggestion on issue_fields items, and propagate that intent through field resolution keyed by field ID.
  • Add UpdateIssueOptions.FieldValuesWithIntent and emit issue_field_values in object form on PATCH when any field value includes intent.
  • Update schema snapshot + add unit tests covering happy-path and validation errors for field-value intent.
Show a summary per file
File Description
pkg/github/issues.go Parses field-value intent, threads it through field resolution, and injects object-form issue_field_values into the custom PATCH payload when needed.
pkg/github/issues_test.go Adds tests verifying request payload shape for mixed intent/plain field values and validates intent input errors.
pkg/github/toolsnaps/issue_write_ff_remote_mcp_issue_fields.snap Updates the issue_write (FF issue-fields variant) schema snapshot to include shared intent properties on issue_fields items.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants