AI Assisted Insight Report


The AI-powered report functionality generates comprehensive analysis reports for your Salesforce projects using advanced language models. This feature provides deep insights into code quality, architecture, and best practices specific to the Flxbl framework.

Overview

The report generator analyzes your codebase through multiple perspectives:

  • Package architecture and design patterns
  • Dependencies and coupling between packages
  • Code quality and technical debt
  • Flxbl best practices compliance
  • Security and compliance considerations

Prerequisites

A configured AI provider. Locally, set the provider's API key (e.g. ANTHROPIC_API_KEY); when connected to an sfp server, the report command fetches credentials from the server automatically. For complete setup and configuration instructions, see Configuring LLM Providers.

Basic Usage

Package Analysis

# Analyze single package
sfp project report --package nextGen

# Analyze multiple packages
sfp project report --package core --package utils --output core-utils-analysis.md

Domain Analysis ( sfp-pro only)

# Analyze all packages in a domain
sfp project report --domain billing --output billing-analysis.md

Provider-Specific Examples

# Uses defaults (provider: anthropic, model: claude-sonnet-4-5-20250929)
sfp project report --package nextGen --output nextgen-analysis.md

# Specify a different model (if needed)
sfp project report --model claude-sonnet-4-5-20250929 --package core

Amazon Bedrock

# Set an explicit Bedrock model id via --model
sfp project report --provider amazon-bedrock --model anthropic.claude-sonnet-4-5-20250929-v1:0 --package core

# Specify a different region (if not in environment)
export AWS_REGION=eu-west-1
sfp project report --provider amazon-bedrock --domain billing

Command Flags

sfp project report (alias sfp project:ai-report) accepts:

FlagAliasDefaultPurpose
--outputanalysis-report.mdOutput markdown file path.
--package-pPackage(s) to analyse. Repeatable; mutually exclusive with --domain.
--domain-dDomain to analyse (sfp-pro only). Mutually exclusive with --package.
--provideranthropicAI provider: anthropic, openai, amazon-bedrock, github-copilot.
--modelprovider defaultModel id to use.
--prompt-countallLimit the number of analysis prompts (useful for quick test runs).

When connected to an sfp server, the command also accepts the standard server flags (--sfp-server-url, --application-token, --repository) and uses them to fetch provider credentials. With no package or domain specified, the whole project is analysed.

Output Format

Reports are generated in Markdown format with the following structure:

  1. Executive Summary - High-level findings and recommendations
  2. Package/Domain Overview - Architecture and design analysis
  3. Dependencies Analysis - Inter-package relationships
  4. Code Quality Insights - Technical debt and improvement opportunities
  5. Recommendations - Prioritized action items

Troubleshooting

Rate Limiting

If you encounter rate limits:

  • Reduce --prompt-count to lower token usage
  • Analyze smaller scopes (single package vs domain)
  • Consider using a different model with higher limits

On this page