feat: Add issue relations support (blocks, related, duplicate, similar) #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why Issue Relations Matter for AI Agents
When AI agents work on complex projects, understanding task dependencies is critical. An agent needs to know:
Without visibility into these relationships, agents make suboptimal decisions—starting blocked work, missing related context, or duplicating effort. Linearis, being designed for LLM agents, should expose this relationship data to enable smarter task planning and execution.
Summary
This PR adds comprehensive issue relations support through a new
issues relationssubcommand group:linearis issues relations list ABC-123linearis issues relations add ABC-123 --blocks DEF-456,DEF-789linearis issues relations remove <relation-uuid>All four Linear relation types are supported:
--blocks- This issue blocks the specified issues--related- General relationship between issues--duplicate- This issue is a duplicate of another--similar- Similar issues (note: typically AI-generated by Linear)Relations are also now included in
issues readoutput, giving agents complete context when examining an issue.Example Usage
Output Format
{ "issueId": "550e8400-e29b-12d3-a456-426614174000", "identifier": "ABC-123", "relations": [ { "id": "660e8400-e29b-12d3-a456-426614174001", "type": "blocks", "issue": {"id": "...", "identifier": "ABC-123", "title": "Parent task"}, "relatedIssue": {"id": "...", "identifier": "DEF-456", "title": "Blocked task"}, "createdAt": "2025-01-15T10:30:00.000Z" } ] }Technical Implementation
ISSUE_RELATIONS_FRAGMENTin GraphQL queries fetching bothrelationsandinverseRelationsLinearIssueRelationTypeScript interface for type safety_options: unknownwith explanatory comments)Test Plan
🤖 Generated with Claude Code