Skip to content

Conversation

@cmd-ob
Copy link
Contributor

@cmd-ob cmd-ob commented Oct 28, 2025

Description

Refactored the AI E2E tags selector.

Key Changes

Architecture:

  • Split monolithic file into organized modules: tools/, prompts/, analysis/, utils/, config/
  • Created selector.ts as main orchestrator
  • Added comprehensive TypeScript types

Tag Configuration:

  • Centralized all tag definitions in e2e/tags.js via aiE2EConfig array
  • Single source of truth for tag names and descriptions
  • Eliminated duplicate definitions across files

Documentation:

  • Added README.md with architecture overview
  • Included examples for extending functionality

Files Changed

  • e2e/scripts/ai-e2e-tags-selector.ts - Reduced to entry point
  • e2e/scripts/ai-e2e-tags-selector/ - 22 new modular files
  • e2e/tags.js - Added aiE2EConfig export

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Refactors the AI E2E tag selector into a modular TypeScript architecture with tool handlers and centralized tag configuration, adding a CLI entry and documentation.

  • E2E AI Tag Selector (modularization):
    • Architecture split: Introduces analysis/, tools/, prompts/, utils/, config/ with selector.ts as orchestrator and shared types/.
    • Tools: Adds handlers for read_file, get_git_diff, get_pr_diff, find_related_files, finalize_decision with a tool registry and executor.
    • Prompts: Adds system and agent prompt builders.
    • Analysis: Adds file categorizer, decision parser, and tag analyzer (test file counting and split calculation).
    • Utils: Adds git utilities, input validation, and output formatter.
    • CLI: New index.ts; legacy e2e/scripts/ai-e2e-tags-selector.ts reduced to thin entry/export wrapper.
  • Tags configuration:
    • Centralizes smoke tags via aiE2EConfig in e2e/tags.js (single source of truth with descriptions); exports for selector use.
  • Docs:
    • Adds README.md detailing architecture, usage, and extension guidelines.

Written by Cursor Bugbot for commit 352bf98. This will update automatically on new commits. Configure here.

- Removed backward compatibility wrapper comments and unnecessary exports in ai-e2e-tags-selector.ts.
- Updated README.md to reflect the modular architecture and removed redundant sections.
- Simplified decision-parser.ts by removing filtering of valid tags and directly using selected_tags from the response.
- Cleaned up file-categorizer.ts by removing unused imports.
- Streamlined patterns.config.ts by eliminating checks for specific core files.
- Adjusted system-prompt-builder.ts to use availableTags instead of pipelineTags for consistency.
- Removed pipelineTags from AIE2ETagsSelector class, using availableTags instead for clarity.
- Updated selector.ts to ensure fallback analysis uses availableTags.
- Cleaned up e2e/tags.js by removing unused tags export.
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

cursor[bot]

This comment was marked as outdated.

@cmd-ob cmd-ob requested a review from a team as a code owner October 28, 2025 17:51
@cmd-ob cmd-ob changed the title Ai analysis refactor test: AI analysis refactor Oct 28, 2025
@sonarqubecloud
Copy link

cursor[bot]

This comment was marked as outdated.

@cmd-ob cmd-ob removed the request for review from a team October 29, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants