From hyperfleet-devtools
Analyzes code changes in HyperFleet components (API, Sentinel, Adapter, Broker) to determine if architecture docs need updates via full doc reading and single LLM analysis. Use for PRs or git ranges.
npx claudepluginhub openshift-hyperfleet/hyperfleet-claude-plugins --plugin hyperfleet-devtoolsThis skill uses the workspace's default tool permissions.
This skill analyzes code changes in HyperFleet component repositories and determines whether architecture documentation in the `openshift-hyperfleet/architecture` repository needs to be updated.
Reviews architecture of codebase or staged git changes via Zachman viewpoint analysis and principles validation, reporting violations with severity, remediations, and ADR links.
Analyzes pull requests for architectural impact, generating before/after diagrams, business effects, enabled features, and risks for decision makers.
Scans codebase and generates high-level architecture graph as interlinked markdown files in docs/professor/architecture/. Use for new project analysis or significant changes.
Share bugs, ideas, or general feedback.
This skill analyzes code changes in HyperFleet component repositories and determines whether architecture documentation in the openshift-hyperfleet/architecture repository needs to be updated.
This skill activates automatically when users:
Zero setup required!
This skill automatically manages the architecture repository:
The architecture repository is cached at:
~/.claude/plugins/cache/hyperfleet-devtools/architecture/
Supported Components:
Analysis Scope:
main..HEAD)Analysis Method:
Parameters:
--range <git-range>: Analyze commits in a git range (e.g., --range main..HEAD)--last <n>: Analyze last N commits (e.g., --last 5)Verify the execution environment and prerequisites:
Detect Current Repository and Component Type
# Get repository name from git remote and extract component name
REPO_URL=$(git remote get-url origin)
COMPONENT=$(echo "$REPO_URL" | grep -oE "hyperfleet-(api|sentinel|adapter|broker)")
# Set component type based on detected component
case $COMPONENT in
hyperfleet-api) COMPONENT_TYPE="API Service" ;;
hyperfleet-sentinel) COMPONENT_TYPE="Sentinel" ;;
hyperfleet-adapter) COMPONENT_TYPE="Adapter" ;;
hyperfleet-broker) COMPONENT_TYPE="Broker" ;;
esac
Requirements:
❌ Error: Component not supported
Current repository: {detected_repo}
This skill supports the following HyperFleet components:
- hyperfleet-api (API Service)
- hyperfleet-sentinel (Sentinel)
- hyperfleet-adapter (Adapter)
- hyperfleet-broker (Broker)
Navigate to a supported repository and try again.
Parse Parameters and Determine Analysis Scope
# Parse optional parameters
RANGE=""
LAST=""
# Check for --range parameter
if [[ "$@" =~ --range[[:space:]]+([^[:space:]]+) ]]; then
RANGE="${BASH_REMATCH[1]}"
SCOPE="range:$RANGE"
fi
# Check for --last parameter
if [[ "$@" =~ --last[[:space:]]+([0-9]+) ]]; then
LAST="${BASH_REMATCH[1]}"
SCOPE="last:$LAST"
fi
# Default: uncommitted changes
if [ -z "$SCOPE" ]; then
SCOPE="uncommitted"
fi
Verify Git Status
# Check if we're in a git repository
git rev-parse --git-dir
# Check if there are changes based on scope
if [ "$SCOPE" == "uncommitted" ]; then
git status --porcelain
# If no changes, show friendly message
elif [[ "$SCOPE" =~ ^range: ]]; then
# Validate git range
git rev-parse "$RANGE" 2>/dev/null || {
echo "❌ Error: Invalid git range: $RANGE"
exit 1
}
elif [[ "$SCOPE" =~ ^last: ]]; then
# Validate we have enough commits
COMMIT_COUNT=$(git rev-list --count HEAD)
if [ "$COMMIT_COUNT" -lt "$LAST" ]; then
echo "⚠️ Warning: Only $COMMIT_COUNT commits available, requested last $LAST"
fi
fi
Requirements:
ℹ️ No code changes detected
There are no uncommitted changes to analyze.
Options:
- Make code changes and run this skill again
- Use --range to analyze a commit range (e.g., --range main..HEAD)
- Use --last to analyze recent commits (e.g., --last 5)
Ensure Architecture Repository Exists
Use the ensure_arch_repo.sh script to clone/update the architecture repository:
ARCH_REPO=$(bash {skill_base_directory}/ensure_arch_repo.sh)
if [ $? -ne 0 ] || [ -z "$ARCH_REPO" ]; then
echo "❌ Error: Failed to ensure architecture repository"
exit 1
fi
echo "✅ Architecture repository ready: $ARCH_REPO"
What this does:
~/.claude/plugins/cache/hyperfleet-devtools/architecture/git pull origin mainOnce environment validation passes, launch the specialized architecture-impact-analyzer agent:
Use Task tool with:
- subagent_type: "hyperfleet-devtools:architecture-impact-analyzer:architecture-impact-analyzer"
- description: "Analyze architecture impact"
- prompt: "Analyze code changes in {repo_name} and determine architecture documentation impact.
Repository: {repo_name}
Component Type: {component_type}
Analysis Scope: {scope}
Git Range: {range} (if applicable)
Last N Commits: {last} (if applicable)
Please provide a detailed impact analysis report."
Context Passed to Agent:
Expected Agent Output: The agent will return a structured markdown report containing:
Format and display the agent's analysis report to the user:
Display Report
Provide Next Steps
If documentation updates are needed:
📋 Next Steps:
1. Review the documentation update recommendations above
2. Update the identified sections in the architecture repository
3. Submit a PR to openshift-hyperfleet/architecture
4. Link the architecture PR to your code PR
Tip: You can ask to create tracking tickets for documentation updates.
The jira-ticket-creator skill auto-activates when you request ticket creation.
If no updates needed:
✅ No architecture documentation updates required
Your changes don't impact existing architecture documentation.
You can proceed with your PR.
❌ Error: Not a HyperFleet repository
Current directory: {cwd}
Detected repository: {repo_name}
This skill only works in HyperFleet component repositories.
Supported repositories:
- hyperfleet-api (API Service)
- hyperfleet-sentinel (Sentinel)
- hyperfleet-adapter (Adapter)
- hyperfleet-broker (Broker)
Navigate to a HyperFleet repository and try again.
❌ Error: Component not supported
Current repository: {repo_name}
This skill supports the following HyperFleet components:
- hyperfleet-api (API Service)
- hyperfleet-sentinel (Sentinel)
- hyperfleet-adapter (Adapter)
- hyperfleet-broker (Broker)
Please navigate to a supported HyperFleet repository and try again.
ℹ️ No changes to analyze
There are no uncommitted changes in the repository.
To use this skill:
1. Make code changes to your repository
2. Run this skill again before committing
Or use alternative analysis modes:
- --range main..HEAD : Analyze commits in a branch
- --last 5 : Analyze last 5 commits
Examples:
analyze impact --range main..HEAD
analyze impact --last 5
❌ Error: Invalid git range
Range specified: {range}
The git range is not valid. Please check:
- Both refs exist (e.g., main, HEAD, branch names, commit hashes)
- The range syntax is correct (e.g., main..HEAD, abc123..def456)
Examples of valid ranges:
--range main..HEAD
--range feature-branch..HEAD
--range abc1234..def5678
❌ Error: Failed to setup architecture repository
The architecture repository could not be cloned or updated.
Possible causes:
- Network connectivity issues
- GitHub authentication required
- Disk space issues
Please check your network connection and try again.
❌ Error: Analysis agent failed
The architecture-impact-analyzer agent encountered an error:
{error_message}
Please try again or contact the HyperFleet DevTools team if the issue persists.
Debug information:
- Repository: {repo_name}
- Component: {component_type}
- Analysis scope: {scope}
Before submitting a PR:
For best results:
Integration with other skills:
hyperfleet-architecture to understand existing documentation structure