Skip to content

Implement universal compliance workflow and remove project-type-specific tools#18

Merged
oscarvalenzuelab merged 1 commit intomainfrom
feature/universal-compliance-workflow
Nov 11, 2025
Merged

Implement universal compliance workflow and remove project-type-specific tools#18
oscarvalenzuelab merged 1 commit intomainfrom
feature/universal-compliance-workflow

Conversation

@oscarvalenzuelab
Copy link
Copy Markdown
Contributor

Summary

Replaces project-type-specific tools with a universal compliance workflow that works for ANY distribution type (mobile, desktop, SaaS, embedded, etc.).

Changes

1. Removed generate_mobile_legal_summary

  • Deleted specialized mobile-only tool
  • Doesn't scale - would need separate tools for desktop, embedded, etc.
  • Replaced with universal approach

2. Added run_compliance_check - Universal Workflow Tool

Single tool that executes complete compliance workflow for ANY project type:

run_compliance_check(
    path="/path/to/project",
    distribution_type="mobile",  # OR desktop, saas, embedded, etc.
    policy_file=None,  # Uses default if not specified
    check_vulnerabilities=True
)

Automatic workflow:

  1. Scan for licenses and packages
  2. Generate NOTICE.txt with purl2notices
  3. Validate against policy using ospac
  4. Generate sbom.json
  5. Check vulnerabilities
  6. Return APPROVED/REJECTED decision + risk level

Outputs:

  • NOTICE.txt - Complete legal notices with copyright extraction
  • sbom.json - Software Bill of Materials
  • Comprehensive report with actionable recommendations

3. Enhanced Tool Descriptions (Agent Usability)

All tools now include structured guidance:

  • WHEN TO USE - Clear scenarios
  • WHEN NOT TO USE - Prevents confusion
  • WORKFLOW POSITION - Where it fits in workflows
  • COMMON WORKFLOWS - Complete examples

Key improvements:

  • generate_legal_notices marked as PRIMARY TOOL for legal docs
  • scan_directory marked as FIRST STEP
  • validate_license_list positioned for QUICK validation
  • All tools show complete workflow sequences

4. Updated Server Instructions

  • Standard universal workflow documented
  • Two clear options: one-shot vs manual orchestration
  • Emphasized: NO project-type-specific tools exist
  • Distribution type is just a parameter for policy context

5. Updated All Configuration Files

Replaced generate_mobile_legal_summary with run_compliance_check in:

  • .cursor/mcp.json.example
  • .kiro/settings/mcp.json.example
  • examples/mcp_client_config.json
  • guides/IDE_INTEGRATION_GUIDE.md
  • README.md

Rationale

Problem: Creating specialized tools for each distribution type doesn't scale:

  • Would need: generate_mobile_*, generate_desktop_*, generate_embedded_*, etc.
  • Agents confused about which tool to use
  • Duplicated functionality with slight variations

Solution: Universal standardized workflow:

  • ONE tool works for EVERYTHING
  • Distribution type is policy validation context, not separate workflow
  • Uses default policy if user doesn't specify
  • Scales to any future distribution type without code changes

Standard Workflow (Works for Everything)

Option 1 - One-Shot (Recommended):

run_compliance_check(path, distribution_type="mobile")
→ APPROVED/REJECTED + NOTICE.txt + sbom.json

Option 2 - Manual Steps:

1. scan_directory (discover licenses + packages)
2. generate_legal_notices (PRIMARY - purl2notices for complete docs)
3. validate_license_list or validate_policy (ospac validation)
4. generate_sbom (documentation)
5. Compile final report

Benefits

Simplifies agent decision-making - clear which tool to use
Reduces tool count - one universal tool vs many specialized ones
Consistent workflow - same process for all project types
Better scalability - works for any distribution type
Default policy support - works without configuration
Clear guidance - agents understand tool purposes and sequences

Testing

Tested workflow execution:

  • ✅ Tool descriptions provide clear guidance
  • ✅ Universal workflow documented
  • ✅ All config files updated
  • ✅ No references to removed mobile tool

Breaking Changes

Removed: generate_mobile_legal_summary

Migration: Use run_compliance_check instead, or manually call generate_legal_notices which is the primary tool for legal documentation.

Note: generate_legal_notices was always the correct tool for complete legal documentation. The mobile tool was redundant and caused confusion.

…fic tools

CHANGES:

1. DELETED generate_mobile_legal_summary
   - Removed specialized mobile tool that didn't scale
   - No need for project-type-specific tools (mobile, desktop, etc.)

2. CREATED run_compliance_check - Universal Workflow Tool
   - ONE tool that works for ANY project type (mobile, desktop, saas, embedded, etc.)
   - Executes complete standard workflow:
     * scan_directory (licenses + packages)
     * generate_legal_notices (purl2notices - complete NOTICE file)
     * validate_policy (ospac - with default or custom policy)
     * generate_sbom (documentation)
     * check vulnerabilities (optional)
     * Return APPROVED/REJECTED decision + risk level
   - Distribution type is just a parameter, not separate workflows
   - Generates artifacts: NOTICE.txt + sbom.json
   - Returns comprehensive report with actionable recommendations

3. UPDATED SERVER INSTRUCTIONS
   - Added universal workflow guidance
   - Clear option 1 (one-shot) vs option 2 (manual orchestration)
   - Emphasized: NO project-type-specific tools exist
   - generate_legal_notices is PRIMARY tool for ALL legal documentation

4. ENHANCED TOOL DESCRIPTIONS (Priority 1 improvements)
   - scan_directory: Marked as FIRST STEP, added workflow examples
   - generate_legal_notices: Marked as PRIMARY TOOL with complete workflows
   - validate_license_list: Added QUICK validation positioning
   - All tools include: WHEN TO USE, WHEN NOT TO USE, WORKFLOW POSITION

5. UPDATED ALL CONFIGURATION FILES
   - Replaced generate_mobile_legal_summary with run_compliance_check
   - .cursor/mcp.json.example
   - .kiro/settings/mcp.json.example
   - examples/mcp_client_config.json
   - guides/IDE_INTEGRATION_GUIDE.md
   - README.md

RATIONALE:
- Don't create specialized tools for each distribution type (mobile, desktop, embedded, etc.)
- Use ONE standardized workflow that works for EVERYTHING
- Distribution type is policy validation context, not separate workflow
- If user doesn't specify type, use default policy
- Scales better - works for any future distribution type without code changes

STANDARD WORKFLOW NOW:
1. scan_directory (discover)
2. generate_legal_notices with purl2notices (ALWAYS for complete docs)
3. validate with ospac using appropriate policy
4. generate_sbom
5. check vulnerabilities
6. Decision: APPROVED/REJECTED with risk assessment

Addresses feedback: "Why mobile-specific tool? Doesn't scale. Need universal approach."
@oscarvalenzuelab oscarvalenzuelab merged commit 02704d5 into main Nov 11, 2025
2 checks passed
@oscarvalenzuelab oscarvalenzuelab deleted the feature/universal-compliance-workflow branch November 11, 2025 18:14
@oscarvalenzuelab oscarvalenzuelab mentioned this pull request Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant