Skip to content

feat: add-work-item-comment safe output #70

@jamesadevine

Description

@jamesadevine

Summary

Add an add-work-item-comment safe output that allows agents to add comments to existing Azure DevOps work items.

ADO API

POST /_apis/wit/workitems/{id}/comments?api-version=7.1-preview.4

Agent Parameters

  • id (required) — Work item ID to comment on
  • comment (required) — Comment text in markdown format (min 10 characters)

Front Matter Configuration (safe-outputs.add-work-item-comment)

  • comment-prefix — Prefix prepended to all comments (e.g., [Agent] )
  • max-length — Maximum comment length (default: reasonable limit)
  • format — Comment format: markdown (default) or html

Use Cases

  • Status update agents posting progress on work items
  • Investigation agents leaving findings/analysis
  • Triage agents explaining priority/assignment decisions
  • Code review agents cross-referencing PR findings with linked work items

Security Considerations

  • Standard IS-10 text sanitization on comment body
  • Work item ID validation (must exist in project)
  • Comment prefix ensures agent-generated comments are clearly identified
  • Length limits prevent abuse

Priority

Tier 1 — High value, common agent pattern. Low implementation complexity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions