Include complexity data in swarm issue output (il list --json)#848
Include complexity data in swarm issue output (il list --json)#848
il list --json)#848Conversation
Combined Analysis & Plan - Issue #847Executive SummaryThe VS Code extension's kanban board needs complexity indicators on swarm issue cards. Currently, complexity data lives only in recap files ( Implementation OverviewHigh-Level Execution Phases
Quick Stats
Complete Analysis & Implementation Details (click to expand)Research FindingsProblem Space
Codebase Research
Affected Files
Integration Points
Medium Severity Risks
Implementation PlanAutomated Test Cases to CreateTest File: Click to expand complete test structure (20 lines)// Add to existing 'enrichSwarmIssues' describe block
it('should include complexity from complexityMap when worktreePath matches', () => {
// childIssues with #101, #102
// allMetadata with worktreePaths for both
// complexityMap with entry for #101's worktreePath -> { level: 'simple', reason: 'Single file' }
// Expect result[0].complexity = { level: 'simple', reason: 'Single file' }
// Expect result[1].complexity = null (no complexity in map)
})
it('should set complexity to null when no complexityMap is provided', () => {
// Same as existing test but verify complexity: null is present
})
it('should set complexity to null when child has no worktreePath', () => {
// childIssues with #101, no matching metadata
// complexityMap with some entries
// Expect result[0].complexity = null
})Files to Modify1.
|
Implementation CompleteSummaryAdded an optional Changes Made
Validation Results
Detailed Changes by File (click to expand)src/utils/loom-formatter.tsChanges: Added types, helper function, and threaded complexity through formatting pipeline
src/cli.tsChanges: Built and passed complexity map to all JSON formatting call sites
src/utils/loom-formatter.test.tsChanges: Updated existing tests and added comprehensive new test coverage
docs/iloom-commands.mdChanges: Added complexity field documentation
|
Add optional `complexity` field ({ level, reason }) to SwarmIssue objects
returned by `il list --json`. Complexity data is loaded from recap files
for each child loom, enabling the VS Code kanban board to display
complexity indicators on swarm issue cards.
Fixes #847
a68ec8b to
c6e10ed
Compare
Remove loadComplexityMap helper and complexityMap parameter threading. Instead, read recap files inline in enrichSwarmIssues for each child with a worktreePath. Removes unnecessary pre-loading, deduplication, and parameter plumbing across 4 function signatures.
Fixes #847
Include complexity data in swarm issue output (
il list --json)Context
The VS Code extension's kanban board (epic board) needs to display complexity indicators on swarm issue cards. Currently, complexity data is only available in recap files (
il recap --json), but the kanban board sources its data fromil list --jsonvia theswarmIssuesarray.Request
When
il list --jsonreturns swarm issues, include the complexity data from each issue's recap file (if available) in the swarm issue object.Current SwarmIssue shape:
{ "number": "#123", "title": "Fix login bug", "url": "https://github.com/...", "state": "in_progress", "worktreePath": "/path/to/worktree" }Desired SwarmIssue shape:
{ "number": "#123", "title": "Fix login bug", "url": "https://github.com/...", "state": "in_progress", "worktreePath": "/path/to/worktree", "complexity": { "level": "simple", "reason": "Single file change" } }The
complexityfield should be optional/nullable — only present when the issue has a recap file with complexity set.Related
This PR was created automatically by iloom.