Skip to content

[unic-pr-review] Plugin scaffold + /unic-pr-review:doctor command #143

@orioltf

Description

@orioltf

Parent

docs/issues/unic-pr-review/PRD.md

What to build

Stand up the unic-pr-review plugin at apps/claude-code/unic-pr-review/ with the minimum scaffold required to be loadable, plus the /unic-pr-review:doctor slash command end-to-end. Doctor verifies the plugin's environmental preconditions (Azure CLI, azure-devops extension, login state, Confluence reachability, optional Jira reachability) so first-time users can debug setup without running a review.

This is the entry point for every later slice — nothing else can land until the plugin manifest, package layout, ADR set, and credential loader are in place.

Clean-slate doctrine. This plugin shares no code, no prompts, no fixtures, and no soft dependency with apps/claude-code/pr-review/. Every module is written fresh from the PRD and the 10 ADRs under apps/claude-code/unic-pr-review/docs/adr/.

Acceptance criteria

  • apps/claude-code/unic-pr-review/.claude-plugin/{plugin.json, marketplace.json} exists. plugin.json is at version 2.0.0 with the keywords pr-review, azure-devops, jira, confluence, code-review, unic.
  • package.json wires up the standard bump / sync-version / tag / verify:changelog scripts via @unic/release-tools.
  • CHANGELOG.md contains an initial [2.0.0] — YYYY-MM-DD entry; pnpm --filter unic-pr-review verify:changelog passes.
  • CONTEXT.md contains the plugin's domain glossary (Plugin, Review, Finding, Confidence, Severity, Intent Brief, Intent Check, Bot Signature, Iteration, Approval Loop, Mode, Provider, Work Item, Notice).
  • README.md is present.
  • Root CONTEXT-MAP.md lists this plugin's CONTEXT.md.
  • ADR files 0001–0010 are present under apps/claude-code/unic-pr-review/docs/adr/ together with their README.
  • LICENSE is not created by the implementation; instead the implementing agent surfaces a clear warning to the maintainer (per repo CLAUDE.md).
  • commands/doctor.md exists and is invocable as /unic-pr-review:doctor.
  • scripts/doctor.mjs checks: az CLI on PATH, azure-devops extension installed, az devops login valid, az devops user show --user me resolves (so identity caching will succeed at review time per ADR-0006), Confluence reachable from ~/.unic-confluence.json or env-var override, Jira reachable when jiraUrl is configured (silent otherwise per US 35).
  • scripts/lib/credentials.mjs exposes a single loader for both ~/.unic-confluence.json and ~/.unic-azure.json; env vars CONFLUENCE_URL, CONFLUENCE_USER, CONFLUENCE_TOKEN, JIRA_URL, AZURE_DEVOPS_ORG_URL, AZURE_DEVOPS_PAT override file values.
  • tests/doctor.test.mjs covers each preflight predicate with the underlying CLI/HTTP calls stubbed; the Jira-not-configured branch asserts silence.
  • pnpm --filter unic-pr-review test is green on macOS, Linux, and Windows × Node 22 and 24.
  • pnpm ci:check is green at the repo root.

Blocked by

None — can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew capabilityfeature/unic-pr-reviewIssues from the unic-pr-review featureready-for-agentFully specified, ready for an AFK agent

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions