feat(#44): add az-Show-AzDevOpsAreas and az-Show-AzDevOpsIterations#45
feat(#44): add az-Show-AzDevOpsAreas and az-Show-AzDevOpsIterations#45jdschleicher wants to merge 1 commit intomainfrom
Conversation
Two keyboard-discoverable Show- entry points for the area/iteration
classification trees. Closes the last gap in the az-Show- family - users
can now tab-tab on `az-Show-` and see Tree, Areas, Iterations together.
New public functions in powcuts_by_cli/azdevops_workitems.ps1:
az-Show-AzDevOpsAreas - prints the project's area-path tree
az-Show-AzDevOpsIterations - prints the iteration-path tree (with
start/finish dates per node)
Both are 3-line wrappers that delegate to a private
Show-AzDevOpsClassification -Kind helper (CLAUDE.md
extract-repeated-branches rule).
Internal helpers added alongside:
Get-AzDevOpsClassificationRows - depth-first flattener; emits one
PSCustomObject per node with Depth,
Name, Path. For -Kind 'Iteration',
also surfaces StartDate / FinishDate
as ISO yyyy-MM-dd strings from the
cached attributes.
Format-AzDevOpsClassificationNode - text-fallback per-node formatter:
'<indent><name>' for areas;
'<indent><name><tab><start> ->
<finish>' for iterations when
both dates are present.
Show-AzDevOpsClassification - orchestrator: cache-first via
Read-AzDevOpsClassificationCache,
on $null falls back to live
Invoke-AzDevOpsClassificationLive
(gated by Assert-AzDevOpsAuthOrAbort)
and prints the
`(run az-Sync-AzDevOpsCache to make
this instant)` hint. Stale-banner on
cache hits. Dispatches to
Show-AzDevOpsRows for grid-when-
available + Format-Table fallback,
or per-node text print when grid +
Format-Table unavailable.
Note: issue #44's AC said "indented text output" with grid migration
listed in Out of Scope. That deferral is now obsolete - PR #36 already
migrated az-Show-AzDevOpsTree to grid-when-available + text-fallback.
This implementation adopts the same pattern so the Show- family stays
uniform.
README updated:
- Day-to-day shortcuts code block adds two bullets after Tree
- Stale-banner sentence extended to mention the two new commands
- Out-ConsoleGridView consumer list extended
- Long intro paragraph mentions the two new commands
Diagrams updated (docs/azure-devops-diagrams.md):
- Diagram 1 (high-level architecture): adds ShowAreas + ShowIters
nodes in Public cluster; cache-first edges to AreasJson / IterJson
plus dotted live-fallback edges to AzBoards
- Diagram 9 (function dependency map): adds the two public nodes,
plus a "Classification tree views" cluster with the three new
private helpers, edges into ReadCls / InvCls / Stale / ShowRows /
Indent
https://claude.ai/code/session_01P7znUKccAohZYEwYRBNVfo
🐚 Senior Bash EngineerSummaryPR #45 adds Files Changed (bash scope)Checks Performed
Sourcing Wire-UpN/A — no new bash files added. Naming ConventionN/A — no new bash aliases or functions. VerdictAPPROVE — no bash files in this diff. This is a PowerShell-only PR per the Shell Parity Note; nothing in the bash surface area is at risk. Deferring all substantive review to the Senior PowerShell Engineer. https://claude.ai/code/session_01P7znUKccAohZYEwYRBNVfo Generated by Claude Code |
💠 Senior PowerShell EngineerVerdict: APPROVE Reviewed Checks
Minor notes (non-blocking)
Ship it. https://claude.ai/code/session_01P7znUKccAohZYEwYRBNVfo Generated by Claude Code |
🛡️ Senior Security EngineerVerdict: APPROVE Reviewed Findings
Notes
https://claude.ai/code/session_01P7znUKccAohZYEwYRBNVfo Generated by Claude Code |
🧼 Senior Clean-Code EngineerSummaryOne file of substance changed — Findings
Duplication Map
Function Sizes
Notes — Items Verified Clean
VerdictAPPROVE — well-factored. One MEDIUM duplication to consider before a third caller appears, two LOW polish notes; none block merge. https://claude.ai/code/session_01P7znUKccAohZYEwYRBNVfo Generated by Claude Code |
Summary
Adds
az-Show-AzDevOpsAreasandaz-Show-AzDevOpsIterationsso the area / iteration classification trees joinaz-Show-AzDevOpsTreein the keyboard-discoverableaz-Show-family. Both functions delegate to a privateShow-AzDevOpsClassification -Kindhelper that does cache-first reads with a liveazfallback (gated byAssert-AzDevOpsAuthOrAbort), and renders toOut-ConsoleGridViewwhen available with an indented text-tree fallback.Issue
Closes #44
Changes
New public functions (
powcuts_by_cli/azdevops_workitems.ps1)az-Show-AzDevOpsAreas— prints the area-path treeaz-Show-AzDevOpsIterations— prints the iteration-path tree (withStartDate/FinishDatecolumns from cachedattributes)New private helpers
Show-AzDevOpsClassification -Kind <Iteration|Area>— orchestrator; cache-first with live fallback, stale banner, dispatches toShow-AzDevOpsRows(grid) orFormat-AzDevOpsClassificationNode(text fallback)Get-AzDevOpsClassificationRows— depth-first flattener; emits one PSCustomObject per node withDepth/Name/Path(andStartDate/FinishDatefor iterations as ISOyyyy-MM-dd); skips the synthetic\<Project>\<Kind>rootFormat-AzDevOpsClassificationNode— text-fallback per-node formatter (<indent><name>for areas;<indent><name><tab><start> → <finish>for iterations when both dates present)Documentation
README.md— adds bullets to the day-to-day shortcuts code block, extends the stale-banner sentence andOut-ConsoleGridViewconsumer list, mentions the two new commands in the long intro paragraphdocs/azure-devops-diagrams.md— Diagram 1 gainsShowAreas+ShowItersnodes wired toAreasJson/IterJson(cache-first) andAzBoards(dotted live-fallback); Diagram 9 gains a "Classification tree views" cluster with the three new private helpersAC Adaptation Note
Issue #44's AC said "indented text output" with grid migration in Out of Scope ("defer to whenever az-Show-AzDevOpsTree migrates"). That deferral is now obsolete — PR #36 already migrated
az-Show-AzDevOpsTreeto grid-when-available + text-fallback. This PR follows the same shape so theaz-Show-family stays uniform; the indented text-tree path is preserved as the fallback whenOut-ConsoleGridViewisn't installed.Test Plan
pwsh -NoProfile -Command "[System.Management.Automation.Language.Parser]::ParseFile('powcuts_by_cli/azdevops_workitems.ps1', [ref]\$null, [ref]\$null) | Out-Null; 'PARSE OK'"— should printPARSE OK$profile; typeaz-Show-+ tab-tab —Tree,Areas,Iterations(and any otheraz-Show-*already shipped) appear togetheraz-Sync-AzDevOpsCache, thenaz-Show-AzDevOpsAreas— instant render from cacheaz-Show-AzDevOpsIterations— same, withStartDate/FinishDatecolumns populated for sprint nodes that have datesRemove-Item $HOME/.bashcuts-cache/azure-devops/iterations.json; az-Show-AzDevOpsIterations— fires live, prints the(run az-Sync-AzDevOpsCache to make this instant)hint, then rendersMicrosoft.PowerShell.ConsoleGuiToolsinstalled (or in an environment whereOut-ConsoleGridViewisn't on PATH), both commands fall back toFormat-TableviaShow-AzDevOpsRowsGenerated by Claude Code