Skip to content

feat(claude): add /board-triage and fix org + WIQL handling in azure-boards-organiser - #47

Merged
jinyeow merged 2 commits into
mainfrom
feat/boards-organiser-triage
Jul 30, 2026
Merged

feat(claude): add /board-triage and fix org + WIQL handling in azure-boards-organiser#47
jinyeow merged 2 commits into
mainfrom
feat/boards-organiser-triage

Conversation

@jinyeow

@jinyeow jinyeow commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Adds a /board-triage command, and fixes two defects that made the existing commands unrunnable on this machine.

What /board-triage does

Answers "what's in flight, what's next, am I overloaded" from live data instead of a stale snapshot. It queries ADO for items assigned to me that are in the In Development Kanban column or in state Blocked, joins each to its matching initiative in a separate project-brain repo, then reports a load band and exactly three ranked recommendations.

Two deliberate constraints:

  • Read-only against ADO. It reports; it never changes work-item or PR state.
  • It never writes a priority snapshot back into the brain. ADO is the system of record for item state; a second copy goes stale within days, which is the failure mode the command exists to avoid.

Bug fixes to existing commands

Multi-line WIQL here-strings break az boards query on Windows. The --wiql value is truncated at the first newline, so every flag after it — including --organization — never reaches az, and it fails with --organization must be specified. That reads like an auth problem and is not. Verified against four queries: all four failed un-flattened, all four succeeded flattened. Fix is -replace '\s*\r?\n\s*', ' '.

Org was documented as coming from az devops configure --list, which can be empty. Now a required org key in config.json, passed explicitly as --organization on every call. --org is not an accepted abbreviation and fails the same misleading way.

Review

Reviewed by Codex and a Claude subagent independently. Both found the load classification non-deterministic — the rule list and its fallback could both fire on one item and disagree, changing the reported colour band. Fixed as an ordered, first-match-wins, exhaustive procedure with the staleness trust gate above every content-reading rule.

Codex additionally found that two of the four prioritisation criteria rank on pull-request state and unanswered work-item questions, which no step fetched — so they were being inferred from prose. This was not hypothetical: the first live run ranked an item on "a reviewer is waiting" when that item has zero external commenters. Fixed with a read-only shortlist-only enrichment step plus an evidence-or-skip rule, so a criterion applies only with a citable fact and ties are reported as ties.

Also closed: exactly-one-match required per join pass (ambiguous joins are reported, never resolved by iteration order); a child item can no longer inherit blockers from a parent initiative that never mentions it; deterministic truncation limits and ordering.

Verified live

  • The full triage query, returning 15 real items.
  • Linked-PR discovery via ArtifactLink relations (vstfs:///Git/PullRequestId/..., URL-decoded).
  • az repos pr show returning the status / mergeStatus / reviewers[].vote triple.
  • Work-item comments via the REST tier — the skill's first worked az rest example.
  • All four previously-broken sibling queries, flattened.

Follow-up

The other 9 commands still carry both defects and are tracked in #46. Not in scope here.

jinyeow added 2 commits July 30, 2026 10:32
…boards-organiser

Add a /board-triage command that joins live ADO against the project-brain
initiative files to report what is in flight, what is blocked, and whether the
load is too high. Read-only against ADO, and deliberately writes no priority
snapshot back to the brain.

Fix two defects that made the existing commands unrunnable on a machine with no
az devops default organisation:

- A multi-line WIQL here-string is truncated at the first newline on Windows, so
  every flag after --wiql is lost and the call fails with '--organization must
  be specified'. Flatten before passing. Verified against four queries: all
  four failed un-flattened, all four succeeded flattened.
- Org was documented as coming from 'az devops configure --list', which can be
  empty. Make it a required 'org' key in config.json and pass --organization
  explicitly on every call.
Two reviewers (Codex and Claude) independently found the load classification
non-deterministic: the rule list and the named-anywhere fallback could both fire
on one item and disagree, which changes the reported colour band.

- Replace Step 4 with an ordered, first-match-wins, exhaustive 8-rule procedure.
  The staleness trust gate now sits above every content-reading rule.
- Add a read-only, shortlist-only enrichment step. The rubric ranks on PR state
  and unanswered work-item questions, which no step previously fetched, so those
  criteria were being inferred from prose. Verified live: PR relation parse,
  az repos pr show, and the REST comments tier all work.
- Add an evidence-or-skip rule: a rubric criterion applies only with a citable
  fact, else ranking falls through. Ties are reported as ties.
- Require exactly one join match per pass; ambiguous joins are unknown. Guard
  the parent pass so a child cannot inherit blockers that never mention it.
- Fix deterministic truncation limits and ordering in the output.
- Close five az calls in SKILL.md that omitted --organization, and drop the
  prerequisite telling readers to rely on an az default org.
@jinyeow
jinyeow merged commit 5a88b18 into main Jul 30, 2026
5 checks passed
@jinyeow
jinyeow deleted the feat/boards-organiser-triage branch July 30, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant