-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor reporting skill to use template-based architecture #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
tekgrunt
wants to merge
11
commits into
master
Choose a base branch
from
reporting-refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Replace monolithic reporting skill with clean template-driven design - Add billing-report.json template defining input/output schema - Create billing-collector agent for parallel multi-org data collection - Skill now calls MCP tools directly (like detection-engineering pattern) - Single-org: direct MCP calls from skill - Multi-org: parallel billing-collector agents Templates define contracts, skill handles orchestration, agents handle data collection. Never fabricates data - all values from API responses. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove MSSP Executive Summary, Customer Health Dashboard, and Detection Analytics templates - Keep only Monthly Billing Report as the single template option - Delete unused schemas: mssp-report.json, custom-report.json, security-overview.json - Delete unused HTML templates: mssp-dashboard.html.j2, custom-report.html.j2, security-overview.html.j2 - Enhance billing-summary.json schema with explicit examples for all variables - Add comprehensive field descriptions and example values throughout schema 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New JSON templates for the reporting skill: - mssp-executive-report.json: Fleet health overview with sensor status, detections, and per-org health metrics - detection-analytics-report.json: Detection volume, categories, trends, and rule performance across tenants 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Combines sensor coverage, detection activity, and health scoring into a single customer success tracking report. Includes: - Fleet-wide health rollup with online/offline sensor counts - Per-customer health status (healthy/warning/critical/inactive) - Detection severity breakdown and top categories - Attention items highlighting issues requiring follow-up 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
8729e9d to
deaceec
Compare
- Add 3 new schemas: fleet-health, detection-analytics, customer-health - Add 3 new Jinja2 templates for visualizing report data - Update billing-summary schema/template to match reporting skill output - Update SKILL.md with new template documentation - Update reporting-templates.md with execution flows for all 4 reports Templates use schema-based decoupling - no direct dependency on reporting skill. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add explicit 3-step wizard flow with mandatory markers to prevent the model from skipping the time period question and assuming defaults. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Problem: The billing report had redundant sections - a summary table showing per-org costs AND a separate expandable card section showing SKU details. Users saw the same organization data twice. Solution: Consolidated into a single "Per-Organization Breakdown" section with expandable cards that show both summary info and SKU details: - All 25 orgs displayed in one list (sorted by cost, highest first) - Card header shows: org name, status badge, line item count, % of total - Click to expand reveals SKU breakdown with amounts - Visual distinction by status: - Success: normal styling - Permission Denied: red left border, grayed out - No Invoice: gray left border, grayed out - Summary footer with total org count and combined amount Also updated render-html.py validation to expect data.tenants and data.rollup instead of deprecated data.usage structure. Tested with live billing data from 25 LimaCharlie organizations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace bar charts with detailed list views for better readability: - Organization Health: Now shows full org names, health %, color-coded progress bars, and online/total sensor counts - Top Detection Categories: List with severity badges, percentages, affected orgs/hosts counts - Organizations by Detection Volume: List with sensor counts and top category info Convert Organization Details table to expandable cards showing: - Platform breakdown with online/offline counts per platform - Top detections with severity badges - Top offline sensors with days offline Add CSS for: - Severity badges (critical/high/medium/low/info) - Expandable card components - Detail list items with progress bars - Limited access status styling Handle null health values properly for orgs with limited permissions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add new fields to align with the refactored template: metadata.organizations: - Add limited_access count for orgs with partial permissions data.organizations[]: - Add status: "limited_access" enum value - Add status_reason for explaining limited/error status - Add platforms[] with per-org platform breakdown (online/offline) - Add top_detections[] with severity and host - Add top_offline_sensors[] with hostname, platform, days_offline data.top_categories[]: - Add severity (critical/high/medium/low/info) - Add affected_orgs and affected_hosts counts data.top_orgs_by_detections[]: - Add top_category and sensors count data.offline_summary (new): - total_offline, offline_7_plus_days, offline_30_plus_days - by_platform breakdown Updated example to demonstrate all new fields including limited_access org scenario. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Focus on JSON data output to templates rather than auto-opening HTML. Users can choose to open generated reports themselves. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove invalid ternary operator in for loop filter that was causing template rendering failures. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Refactors the reporting skill to use a declarative JSON template system, making it easier to add new report types and maintain consistent data collection patterns.
Changes
Template System
scopeparameter for single-org or all-org reportsReport Templates
Key Features
Test plan
/lc-essentials:reporting-templatesto list available templates🤖 Generated with Claude Code