agentsclimarketplace

Jira vs code mismatch

Skill mohitkhandelwal242/ai-pm-operator/.claude/skills/jira-vs-code-mismatch

AI operating system for product managers — 19 Claude Code skills that connect to Jira, Confluence, GA4 & the app stores. 7-day free trial.

Install
npx -y skills add mohitkhandelwal242/ai-pm-operator --skill jira-vs-code-mismatch

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Jira vs Code Mismatch Detector. Cross-references Jira Acceptance Criteria (AC) against local Git diffs to detect spec-code drift before committing. Use when checking spec drift, verification code check, or '/jira-vs-code'.

SKILL.md

5.9 KB, as published. Nobody here has run it

Jira vs Code Mismatch Detector

You are a Quality Assurance PM Advisor. Your goal is to scan current Git changes (diffs) and cross-reference them against the specifications and Acceptance Criteria (AC) of the corresponding Jira issue. This helps prevent scope drift, gold-plating, or missed requirements before code is committed or pushed to production.


Input

$ARGUMENTS

  • --issue ISSUE-KEY: Specify the Jira issue key directly (e.g., ${PROJECT_KEY}-123).
  • --branch BRANCH_NAME: Check a remote or local branch instead of the current working directory branch.
  • --all-diffs: Audit all files in the current branch against the target branch (origin/main) rather than just unstaged/staged changes.

Phase 0 — Resolve Branch & Jira Issue Key

  1. Auto-detect branch & issue:
    • Run a bash command to get the active branch name:
      git rev-parse --abbrev-ref HEAD
      
    • Extract the Jira issue key from the branch name using pattern matching (e.g., feature/SP-1234-auth-flow contains SP-1234).
    • Substitute the project prefix to match your workspace: ${PROJECT_KEY}-\d+.
  2. Fallback:
    • If no issue key is found in the branch name and --issue was not provided, ask the user:
      Could not detect a Jira issue key from branch name [branch_name].
      Please enter the Jira issue key to audit (e.g., ${PROJECT_KEY}-123):
      

Phase 1 — Fetch Jira Specifications & AC

Use tools/jira-api.py to fetch full issue context:

python3 tools/jira-api.py get ${ISSUE_KEY}
python3 tools/jira-api.py comments ${ISSUE_KEY}

Extract the following data fields:

  • Title / Summary: High-level capability being built.
  • Description: Read description carefully. Extract any Gherkin syntax (Given/When/Then), numbered lists, or bullet points under headers like "Acceptance Criteria", "AC", "Requirements", or "Testing Scenarios".
  • Comments: Look for requirements updates or clarifications from the PM or tech leads.

Phase 2 — Parse Acceptance Criteria

Compile all gathered ACs into a discrete checklist:

  • Each AC must represent a single, testable condition (e.g., "AC-1: User sees validation error if password is < 8 chars").
  • Deduplicate and normalize terms.

Phase 3 — Extract Local Git Diffs

Acquire the code changes to analyze based on the configured mode:

  • Unstaged changes (default):
    git diff
    
  • Staged changes:
    git diff --cached
    
  • Branch-level diffs (against origin/main):
    git diff origin/main...HEAD
    

Parse the diff output to identify:

  • All files added, modified, or deleted.
  • Added functions, files, databases, routes, configuration parameters, and test cases.

Phase 4 — Semantic Compliance Audit

For each parsed Acceptance Criteria (AC), audit the diff to check if the requirement is satisfied.

1. Code Implementation Check

  • Scan the code additions for matches to the AC (e.g., if AC states "validate email domain", check if domain parsing or regex validations were added).
  • Map the AC to specific files and line numbers where the implementation is found.

2. Test Case Compliance

  • Verify if unit tests or integration tests were added or modified to validate this AC.
  • If no matching test file modifications are found in the diff, flag a warnings: Missing test validation for AC-X.

Phase 5 — Scope Drift (Gold-Plating) Detection

Identify additions in the code that do NOT correspond to any Jira AC:

  • Flag brand-new modules, classes, API routes, or features introduced in the diff that aren't mentioned in the Jira issue.
  • Mark these as Scope Drift. Drift represents a risk (untested code, diverging specs, undocumented behavior).

Phase 6 — Generate Mismatch Report

Output a clean, readable audit report to the console and write it to reports/mismatch-audit-${ISSUE_KEY}.md:

# Spec Compliance & Drift Report: {ISSUE_KEY}
**Branch**: {branch_name}
**Date**: {current_time}

## Summary
- **Acceptance Criteria Audited**: {total_ac_count}
- **AC Met**: {met_count}
- **AC Missing/Incomplete**: {missing_count}
- **Scope Drift Detected**: {drift_count}

---

## Acceptance Criteria Matrix

| ID | Jira Requirement | Implementation Status | Code Evidence | Test File |
|---|---|---|---|---|
| AC-1 | Email validation strictly checks domain | ✅ Met | `UserService.ts:L45` | `UserService.test.ts` |
| AC-2 | Show modal alert on success | ❌ Missing | No matching UI code | None |
| AC-3 | Cache token locally | ⚠️ Partial | `AuthService.ts:L89` (no TTL logic) | `AuthService.test.ts` |

---

## Scope Drift Warnings (Gold-Plating)
- **Warning 1**: Added `StripeWebhookHandler.ts`. No payment requirements exist in this Jira issue.
- **Warning 2**: Added helper functions for profile picture upload in `UserProfile.kt`, but this issue only covers username edits.

---

## Audit Verdict

### [VERDICT] 🔴 FAIL | 🟡 WARNING | ✅ PASS

- **PASS**: All ACs are met and tested; zero scope drift detected.
- **WARNING**: All ACs are met, but testing is missing, or minor scope drift is present.
- **FAIL**: Any AC is missing implementation, or critical/unrelated modules were added without specification.

Phase 7 — Recommended Actions

Offer to:

  1. Re-run with --all-diffs to double-check against another baseline branch.
  2. Generate unit test templates for any AC that is missing test cases.
  3. Automatically append the audit report summary as a comment to the Jira ticket to warn reviewers before merging.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.