Skip to content

ns-pdalai/dataplane-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dataplane Automation

Automation scripts and Claude AI tooling for analyzing JIRA tickets and generating implementation plans for the dataplane codebase.

🎯 Overview

This repository contains scripts that use Claude AI with Serena semantic search to:

  • Fetch JIRA ticket details
  • Analyze codebases semantically
  • Generate implementation plans
  • Build persistent knowledge over time

πŸ“ Repository Structure

dataplane-automation/
β”œβ”€β”€ scripts/               # Shell scripts for automation
β”‚   β”œβ”€β”€ jira_plan.sh                    # Static cache approach
β”‚   β”œβ”€β”€ jira_plan_serena.sh             # Serena non-interactive
β”‚   β”œβ”€β”€ jira_plan_interactive.sh        # Serena interactive (recommended)
β”‚   β”œβ”€β”€ generate-codebase-context.sh    # Generate static context
β”‚   β”œβ”€β”€ README_SERENA.md                # Full documentation
β”‚   └── INTERACTIVE_GUIDE.md            # Interactive workflow guide
β”‚
β”œβ”€β”€ .claude/               # Claude configuration
β”‚   β”œβ”€β”€ skills/                         # Skill templates
β”‚   β”‚   β”œβ”€β”€ jira_plan.md               # Static cache skill
β”‚   β”‚   └── jira_plan_serena.md        # Serena skill
β”‚   β”œβ”€β”€ agents/                         # Custom agents
β”‚   β”‚   └── jira-analyst.json          # JIRA analysis agent
β”‚   └── codebase-context.md            # Cached codebase context
β”‚
└── plans/                 # Generated implementation plans
    └── plan_*.md          # Plans organized by JIRA ticket ID

πŸš€ Quick Start

Prerequisites

  1. Claude Code CLI installed and authenticated
  2. Serena MCP plugin installed
  3. Jira skill configured (/jira command available)
  4. Access to the dataplane codebase at ~/dataplane

Installation

  1. Clone this repo:

    git clone <repo-url> ~/dataplane-automation
    cd ~/dataplane-automation
  2. Make scripts executable:

    chmod +x scripts/*.sh
  3. Link scripts to your dataplane repo (optional):

    cd ~/dataplane
    ln -s ~/dataplane-automation/scripts claude-scripts
    ln -s ~/dataplane-automation/.claude .claude
    ln -s ~/dataplane-automation/plans plans

πŸ“– Usage

Method 1: Interactive (Recommended for Complex Bugs)

cd ~/dataplane
~/dataplane-automation/scripts/jira_plan_interactive.sh ENG-825217

This opens an interactive Claude session where you can:

  • Guide the investigation
  • Ask follow-up questions
  • Explore multiple hypotheses
  • Build knowledge in real-time

See scripts/INTERACTIVE_GUIDE.md for detailed workflow.

Method 2: Automated with Serena

cd ~/dataplane
~/dataplane-automation/scripts/jira_plan_serena.sh ENG-825217

Automatically generates a plan using Serena semantic search.

Method 3: Static Cache (Fast)

cd ~/dataplane

# One-time: Generate codebase context
~/dataplane-automation/scripts/generate-codebase-context.sh

# Generate plan
~/dataplane-automation/scripts/jira_plan.sh ENG-825217

Fast analysis using pre-generated codebase context.

πŸ“Š Approach Comparison

Feature Static Cache Serena Automated Serena Interactive
Speed ⚑⚑⚑ ⚑⚑ ⚑
Depth ⭐⭐ ⭐⭐⭐ ⭐⭐⭐⭐⭐
Token Cost Low Medium Medium-High
Learning ❌ βœ… βœ…βœ…
Exploration ❌ 🟑 βœ…βœ…
Use Case Quick/Simple Standard bugs Complex/Novel

🧠 Serena Features

Semantic Code Search

  • find_symbol - Find classes/functions by name
  • search_for_pattern - Search for patterns from logs
  • get_symbols_overview - Understand file structure
  • find_referencing_symbols - Track dependencies

Persistent Memory

Serena learns and remembers:

  • architecture/overview - Codebase structure
  • bugs/common_patterns - Known bug patterns
  • Custom memories you create during analysis

πŸ“ Generated Plans

Plans are saved to plans/plan_<JIRA-ID>.md with:

  • JIRA Summary - Problem description
  • Root Cause Hypothesis - Analysis with evidence
  • Affected Areas - Files and line numbers
  • Implementation Plan - Step-by-step fix strategy
  • Test Strategy - Testing requirements

Example: plans/plan_ENG-825217.md

πŸ”§ Configuration

Environment Variables

Scripts expect:

  • ATLASSIAN_API_TOKEN - Jira API token
  • ATLASSIAN_EMAIL - Your email
  • ATLASSIAN_SITE - Site name (e.g., "netskope")

Claude Configuration

The .claude/ directory contains:

  • Skills - Prompt templates for different approaches
  • Agents - Custom agent configurations
  • Context - Cached codebase information

Customization

Edit scripts to change:

  • Output directory (default: plans/)
  • Skill file location
  • Claude CLI flags

🀝 Contributing

This is a personal automation repo, but you can:

  1. Fork for your own projects
  2. Adapt scripts for your codebase
  3. Share improvements

πŸ“š Documentation

πŸŽ“ Examples

Example 1: Analyze a Critical Bug

cd ~/dataplane
~/dataplane-automation/scripts/jira_plan_interactive.sh ENG-825217

# Inside the session:
You: "Search for __skip_object_scan in the logs"
You: "Find where this flag is set"
You: "Show me the inspect_cibuffer function"
You: "Save this finding to memory"
You: "Generate the implementation plan"

Example 2: Batch Process Tickets

for ticket in ENG-12345 ENG-12346 ENG-12347; do
  ~/dataplane-automation/scripts/jira_plan_serena.sh $ticket
done

Example 3: Continue Previous Analysis

cd ~/dataplane
claude --continue --agent jira-analyst

# Then:
"Continue analyzing ENG-825217 with the new information"

πŸ” Troubleshooting

"No active project" Error

Make sure you're in the dataplane directory when running scripts.

Scripts Not Executable

chmod +x ~/dataplane-automation/scripts/*.sh

JIRA Command Not Found

Verify the eng-skills plugin is installed and /jira works.

Serena Errors

Activate the project:

cd ~/dataplane
claude
# Then: "Activate the dataplane project with Serena"

πŸ“„ License

Personal automation scripts. Use at your own discretion.

πŸ™ Credits

  • Claude AI by Anthropic
  • Serena MCP for semantic code search
  • eng-skills for JIRA integration

Happy Bug Hunting! πŸ›πŸ”

About

JIRA automation scripts with Claude AI and Serena semantic search for dataplane codebase analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages