Inspiration

Software teams write PRDs and Architecture Decision Records (ADRs) in Confluence, track sprint execution in Jira, and write implementation code in AI coding clients such as Claude Code and Cursor. When a product manager or architect revises a Confluence spec mid-sprint, two failures happen immediately. First, the Jira ticket keeps moving forward against stale acceptance criteria. Second, the developer's AI coding session generates code from yesterday's mental model.

Teams do not need another external webhook server or third-party database to fix this. They need live spec baselines enforced directly where work happens: inside Jira, inside Confluence, and inside the IDE's MCP loop.

What It Does

ScopeGuard MCP connects Confluence specifications, Jira execution, Rovo Agents, and external AI coding IDEs into a closed verification loop.

  1. Deterministic Spec Baseline & Before/After Diffs: Engineers lock a Confluence PRD or ADR baseline directly from jira:issuePanel. ScopeGuard parses <h1> through <h3> sections from Confluence storage XHTML, hashes each section with SHA-256 in @forge/kvs, and computes exact UNCHANGED, MODIFIED, ADDED, and REMOVED diffs with baselineExcerpt vs liveExcerpt side-by-side text previews.
  2. Bidirectional IDE Contract Gate (rovo:mcp): Claude Code, Cursor, or VS Code connects over OAuth 2.1 to https://mcp.atlassian.com/forge/2c23e057-b94d-4702-ab93-8692a99039c3. Before writing code, the IDE calls verify-contract-gate to inspect live acceptance criteria and changed ADR excerpts. After tests run, it calls log-impl-evidence with commitSha, testsPassed, testsFailed, and specVersion, flipping the Jira ticket to DRIFT VERIFIED (95/100) and posting a traceable Jira comment.
  3. Autonomous Release Triage (rovo:agent): Inside Jira and Confluence, ScopeGuard Steward runs sprint-wide scans (scan-sprint-readiness), inspects individual tickets (check-spec-drift and verify-contract-gate), drafts corrective sub-tasks (sync-adr-to-subtasks), and flags unverified changes (flag-release-blocker) using 5 agent actions (excluding log-impl-evidence, which is reserved for IDE and CI clients).
  4. Sprint Readiness & Reverse Spec Visibility: jira:projectPage (ScopeGuard Readiness) scans active project issues and surfaces a KPI strip (Total Scanned, Aligned, Drifted, Active Blockers, Avg Readiness), interactive status filters (All, Drifted, Blocked, Aligned, Unbaselined), and historical KVS audit snapshots. On Confluence, confluence:contentBylineItem (ScopeGuard Linked Jira Status) shows every Jira issue tied to that spec and its live readiness score.
  5. Instant Judge Preview (Quick Demo Mode): Any unlinked Jira issue (NO_LINKED_SPEC) offers Run Quick Demo Preview and Clear Demo Preview buttons backed by isolated demo: KVS keys, letting reviewers inspect Before/After diffs and structured IDE evidence in seconds without mutating real project data.

How We Built It

ScopeGuard MCP is built strictly on native Atlassian Forge modules in manifest.yml using TypeScript (nodejs22.x) and UI Kit 2 (@forge/react):

  • Shared Core Engine (src/engine/): driftEngine.ts handles deterministic XHTML parsing and SHA-256 section hashing via node:crypto. service.ts coordinates Jira v3 and Confluence v2 REST calls via api.asUser(). storage.ts persists baselines, evidence logs, blockers, reverse page-to-issue links, sprint audit history, and isolated demo: preview records in @forge/kvs.
  • Unified Action & MCP Layer (src/actions.ts): All 6 action modules (check-spec-drift, verify-contract-gate, scan-sprint-readiness, sync-adr-to-subtasks, log-impl-evidence, flag-release-blocker) share a single action-handler entry point. rovo:mcp exposes all 6 tools to external IDEs, while rovo:agent exposes the 5 sprint triage and audit actions.
  • Native UI Kit 2 Surfaces (src/frontend/): issuePanel.tsx, projectPage.tsx, and byline.tsx use @forge/react components with render: native so light/dark themes, tables, lozenges, and progress bars match Jira and Confluence natively.

Challenges We Ran Into

  1. Zero-Server Deterministic Diffing: Computing readable Before vs After diffs without shipping a heavy AST parser or external diff microservice required normalizing Confluence storage XHTML macros, HTML entities, and heading duplicates cleanly inside node:crypto + pure TypeScript.
  2. Keeping Demo Previews Safe: Reviewers need instant visibility on fresh Jira projects, yet demo clicks must never corrupt active sprint baselines or Jira audit comments. Isolating Quick Demo Mode under demo: KVS keys solved both requirements cleanly.
  3. Node Engine Parity for Tooling: @forge/[email protected] enforces strict Node LTS/Current engine bands (^22.23.4 || ^24.22.1 || >=26.12.1), which required aligning local CLI tooling on Node 22.23.4 while targeting nodejs22.x in Forge runtime.

Accomplishments We Are Proud Of

  • Built a complete, zero-infrastructure Forge app ($0 runtime cost) uniting rovo:mcp, rovo:agent, Jira issue panels, Jira project dashboards, and Confluence bylines.
  • Achieved deterministic, auditable spec drift scoring (0-100) backed by 33 passing unit tests in tests/ with zero third-party API dependencies.
  • Delivered structured commit and test evidence logging (commitSha, testsPassed, testsFailed, specVersion) directly from AI IDEs into Jira.

What We Learned

Designing for rovo:mcp and rovo:agent simultaneously forces clean action contracts. Strongly typed, side-effect-clear actions (GET for check-spec-drift, verify-contract-gate, and scan-sprint-readiness; CREATE for sync-adr-to-subtasks, log-impl-evidence, and flag-release-blocker) make both autonomous Rovo chat agents and external IDE coding agents predictable under api.asUser() permissions.

What Is Next for ScopeGuard MCP

  • Multi-page ADR dependency graphs per Jira epic so upstream platform changes notify every downstream service ticket automatically.
  • Optional CI webhook bridge for GitHub Actions and Bitbucket Pipelines to append signed test artifacts via log-impl-evidence.
  • Atlassian Marketplace Forge packaging (0% revenue share up to $1M).

Built With

Share this project:

Updates

Submission history