Expose readiness_score on the agent plan widget for read and write
What does this MR do and why?
Exposes readinessScore on the WorkItemWidgetAgentPlan GraphQL type and makes it writable through the existing workItemUpdate mutation. Both paths are gated by the existing workplan_score feature flag (default off).
Read:
- Returns a 0-100 integer when the flag is enabled and a score has been set.
- Returns
nullwhen the flag is disabled, or when no score is available yet. - Scopes match sibling fields:
[:api, :read_api, :ai_workflows].
Write:
- Adds a
readinessScoreargument toWorkItemWidgetAgentPlanInput, so clients such as AI workflows persist the score throughworkItemUpdateinstead of a separate write path. contenton that input becomes optional, so a caller can update the score alone without resending the plan content.- The
AgentPlancallback appliescontentandreadiness_scoreindependently and validates the record. Plan create/update instrumentation events still fire on content changes only. - A supplied score is ignored while the flag is disabled, matching the read path.
GraphQL schema docs and introspection results are regenerated. EE-only change.
This is MR 2 of 2 for #611320 (closed), stacked on !249416 (merged) (model/storage layer).
References
- Issue: #611320 (closed)
- MR 1 (model/storage): !249416 (merged)
- UI MR: !248374 (merged)
- Feature flag rollout: #607899
- Parent epic: &23050
Screenshots or screen recordings
Query:
Mutation:
How to set up and validate locally
-
Enable the feature flag:
Feature.enable(:workplan_score) -
Write a score through the mutation:
mutation { workItemUpdate(input: { id: "gid://gitlab/WorkItem/1", agentPlanWidget: { readinessScore: 75 } }) { workItem { widgets { ... on WorkItemWidgetAgentPlan { content readinessScore } } } errors } } -
Verify
readinessScorereturns75andcontentis unchanged. -
Read it back:
query { workItem(id: "gid://gitlab/WorkItem/1") { features { agentPlan { readinessScore } } } } -
Send
readinessScore: 150and verify the mutation returns a validation error. -
Disable the flag:
Feature.disable(:workplan_score). Verify reads returnnulland writes are ignored.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

