Conversation
…nce pages (v0.9.0) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All four issues were implemented by Ralph in feat(spec-10). Housekeeping to sync issue state with the shipped code. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds “Doc Context” enrichment to the pr-review Claude Code plugin by pulling business intent from linked Azure DevOps work items and (optionally) linked Confluence pages, then injecting that context into review-agent prompts. Also ships a new Confluence client script + tests and bumps the plugin to v0.9.0.
Changes:
- Documented a new Step 4a in
commands/review-pr.mdto gather work-item + Confluence-derived business context and prepend it to agent prompts. - Added
scripts/confluence-client.mjs(credentials loading + Confluence v2 page fetch) and anode:testsuite for credential/URL parsing helpers. - Version bump + changelog/docs/issue status updates to reflect completion.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/issues/pr-review-doc-context-enrichment/01-confluence-page-client.md | Issue status updated to resolved |
| docs/issues/pr-review-doc-context-enrichment/02-work-item-doc-context-enrichment.md | Issue status updated to resolved |
| docs/issues/pr-review-doc-context-enrichment/03-confluence-page-doc-context-enrichment.md | Issue status updated to resolved |
| docs/issues/pr-review-doc-context-enrichment/04-version-bump-and-docs.md | Issue status updated to resolved |
| apps/claude-code/pr-review/tests/confluence-client.test.mjs | Adds unit tests for credential loading + page-id extraction |
| apps/claude-code/pr-review/scripts/confluence-client.mjs | New Confluence credential loader + page fetch CLI/module |
| apps/claude-code/pr-review/package.json | Bumps version to 0.9.0; adds new test file to pnpm test |
| apps/claude-code/pr-review/docs/plans/README.md | Marks doc-context enrichment spec as done |
| apps/claude-code/pr-review/docs/plans/10-doc-context-enrichment.md | Marks spec status as done with date |
| apps/claude-code/pr-review/commands/review-pr.md | Adds Step 4a doc-context workflow + prompt preamble; updates allowed-tools |
| apps/claude-code/pr-review/CHANGELOG.md | Adds 0.9.0 entry describing doc-context enrichment |
| apps/claude-code/pr-review/.claude-plugin/plugin.json | Bumps plugin version to 0.9.0 |
| apps/claude-code/pr-review/.claude-plugin/marketplace.json | Bumps marketplace version to 0.9.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ment - Remove WebFetch from allowed-tools (Confluence fetching goes via Bash/node, not WebFetch directly) - Fix dead reference to push-to-confluence.mjs --setup in both review-pr.md and confluence-client.mjs error messages; replace with correct env-var / ~/.unic-confluence.json instructions - Guard isMain check against undefined/relative process.argv[1] with try/catch to prevent module-load crash in node -e / REPL contexts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…xt fallbacks Improve Confluence credential and fetch error handling so failures surface with actionable messages instead of being swallowed: differentiate JSON parse failures from missing-fields, fix extractPageId for URLs with query strings or anchors, attach error causes through the network stack, and add a response-stream error handler. Add reviewer-facing fallbacks in step 4a for work-item fetch failures, --check-creds timeout, and total Confluence failure on a work item. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…se tests Adds tests for query-string and anchor-fragment URLs in extractPageId, a partial env-var fallback case for loadCredentials, and a full fetchPageText suite covering 2xx/4xx/non-JSON/missing-body/network-error paths. To make fetchPageText testable without mocking node:https (experimental), the function now accepts an optional injectable httpGet transport that defaults to the internal httpsGet — public callers are unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
review-pr.md: fetches ADO work items linked to the PR and spawns parallel Doc Context Sub-agents to produce diff-aware business context summariesconfluence-client.mjsscriptscripts/confluence-client.mjs: zero-dependency Node.js script that loads Confluence credentials (env vars →~/.unic-confluence.json) and fetches page storage-format XML via the Confluence v2 REST API; includes fullnode:testsuiteWhy
Review agents previously had no visibility into the business intent of a PR. This enrichment gives them structured, diff-aware context from ADO work items and linked Confluence pages before they analyse the diff — without requiring any new comments or threads on the PR.
Test plan
pnpm --filter pr-review testpasses (confluence-client unit tests, no live connection needed)pnpm checkpassesnode scripts/confluence-client.mjs --check-credsexits 0 with credentials configured## Business context for this PRpreamble in review agent prompts🤖 Generated with Claude Code