feat(spec-11): fix doc context spawn reliability (v0.9.1)#23
Merged
orioltf merged 18 commits intoMay 8, 2026
Conversation
…ents Pre-commit to get a clean working tree before pnpm bump. Contains the spec-11 implementation: orchestrator agent, synthesizer agent, step 4a rewrite in review-pr.md, ADR-0012, .prettierignore scratchpad exclusion, and the CHANGELOG entry under [Unreleased]. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…solved Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three defects caused the Doc Context phase to be silently skipped on every run: step 4a lacked an explicit Agent() spawn, confluence-client.mjs was called with a relative path, and DOC_CONTEXT was never initialised. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All three issues verified resolved; PRD closed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR (spec 11, v0.9.1) aims to make the Doc Context phase in the pr-review plugin run reliably by explicitly spawning a dedicated doc-context orchestrator agent, initializing DOC_CONTEXT, and resolving the Confluence client path from ${CLAUDE_PLUGIN_ROOT}.
Changes:
- Adds new plugin agents:
doc-context-orchestrator(gathering) anddoc-context-synthesizer(flattened narrative output). - Rewrites
commands/review-pr.mdstep 4a to initializeDOC_CONTEXTand delegate doc-context gathering via an explicitAgent()spawn. - Adds ADR-0012 documenting the plain-markdown (non-JSON) return contract; bumps plugin version to
0.9.1with changelog updates.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/issues/pr-review-doc-context-spawn-reliability/PRD.md | Adds PRD detailing the doc-context spawn reliability problem and intended solution. |
| docs/issues/pr-review-doc-context-spawn-reliability/01-adr-and-synthesizer-agent.md | Tracks work for ADR-0012 + synthesizer agent. |
| docs/issues/pr-review-doc-context-spawn-reliability/02-orchestrator-agent.md | Tracks work for the orchestrator agent requirements. |
| docs/issues/pr-review-doc-context-spawn-reliability/03-wire-up-and-housekeeping.md | Tracks wiring step 4a + README/CHANGELOG housekeeping. |
| docs/inbox/pr-review-supress-thanks-comments-on-addressed-threads.md | Adds an inbox note about suppressing “thanks” replies on addressed threads. |
| docs/inbox/pr-review-request-user-confirmation-before.md | Adds an inbox note/request about user confirmation before branch checkout. |
| docs/inbox/plugin-naming-conventions-add-unic-prefix.md | Adds an inbox note on adding a unic- prefix to plugin names. |
| docs/inbox/extend-pr-review-to-check-docs.md | Removes an older inbox note (superseded by doc-context work). |
| apps/claude-code/pr-review/package.json | Bumps plugin package version to 0.9.1. |
| apps/claude-code/pr-review/.claude-plugin/plugin.json | Bumps plugin manifest version to 0.9.1. |
| apps/claude-code/pr-review/.claude-plugin/marketplace.json | Bumps marketplace version to 0.9.1. |
| apps/claude-code/pr-review/docs/plans/README.md | Adds spec 11 row to the plans status table. |
| apps/claude-code/pr-review/docs/plans/11-doc-context-spawn-reliability.md | Adds spec 11 plan describing the reliability fixes and contracts. |
| apps/claude-code/pr-review/docs/adr/0012-plain-text-doc-context-agent-return.md | Adds ADR-0012 for plain-text (markdown) agent return contract. |
| apps/claude-code/pr-review/CONTEXT.md | Updates domain language definitions around Doc Context + Synthesizer. |
| apps/claude-code/pr-review/commands/review-pr.md | Rewrites step 4a to initialize DOC_CONTEXT, resolve Confluence client path, and spawn orchestrator agent. |
| apps/claude-code/pr-review/CHANGELOG.md | Adds 0.9.1 release notes describing the doc-context reliability fix. |
| apps/claude-code/pr-review/.agents/doc-context-synthesizer.md | Adds the synthesizer agent prompt (flat ## Business context for this PR output). |
| apps/claude-code/pr-review/.agents/doc-context-orchestrator.md | Adds the orchestrator agent prompt (work items + Confluence + synthesis orchestration). |
| .prettierignore | Ignores .agents/scratchpad/ paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…em IDs in step 4a Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eholder mismatch in synthesizer delegation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ONTEXT.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…guard, fix step numbering wording Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced May 22, 2026
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
doc-context-orchestratorplugin agent to prevent it from being silently skippeddoc-context-synthesizeragent to merge work item + Confluence summaries into a flat## Business context for this PRnarrativereview-pr.md: initialiseDOC_CONTEXT='', resolveCONFLUENCE_CLIENT_PATHfrom${CLAUDE_PLUGIN_ROOT}, and spawn the orchestrator via an explicitAgent()callpr-review-doc-context-spawn-reliabilitytriage groupWhy
Three defects caused the Doc Context phase to be silently skipped on every run: no
DOC_CONTEXT=''initialisation, no explicitAgent()spawn (intent was satisfied inline), and a relative path toconfluence-client.mjsthat failed when the working directory was the reviewed project root.Test plan
## Business contextpreambleDOC_CONTEXT='', prompts unchanged🤖 Generated with Claude Code