@@ -856,8 +856,9 @@ async function main() {
856856 const { releaseUrl } = parseArgs ( rawArgs ) ;
857857
858858 if ( ! releaseUrl ) {
859- console . error ( '❌ Usage: node index.js <github-release-url> [--no-cache] [--refresh] [--cache-dir=PATH] [--limit=N] [--strict=aggressive|balanced|conservative] [--model=NAME]' ) ;
860- console . error ( 'Example: node index.js https://github.com/strapi/strapi/releases/tag/v5.29.0 --strict=aggressive --limit=10' ) ;
859+ console . error ( '❌ Usage: node index.js <github-release-url> [--no-cache] [--refresh] [--cache-dir=PATH] [--limit=N-for-LLM] [--strict=aggressive|balanced|conservative] [--model=NAME]' ) ;
860+ console . error ( 'Example: node index.js https://github.com/strapi/strapi/releases/tag/v5.29.0 --strict=aggressive' ) ;
861+ console . error ( 'Note: All PRs are screened heuristically; --limit caps only LLM calls if provided.' ) ;
861862 process . exit ( 1 ) ;
862863 }
863864
@@ -891,8 +892,7 @@ async function main() {
891892 let skipped = 0 ;
892893
893894 const prList = Array . isArray ( releaseInfo . prNumbers ) ? releaseInfo . prNumbers : [ ] ;
894- const limited = ( OPTIONS . limit && OPTIONS . limit > 0 ) ? prList . slice ( 0 , OPTIONS . limit ) : prList ;
895- for ( const prNumber of limited ) {
895+ for ( const prNumber of prList ) {
896896 const prAnalysis = await analyzePR ( prNumber ) ;
897897
898898 if ( ! prAnalysis ) {
@@ -905,7 +905,8 @@ async function main() {
905905 const impact = classifyImpact ( prAnalysis ) ;
906906
907907 const candidates = suggestCandidateDocs ( llmsIndex , prAnalysis , 5 ) ;
908- const runLLM = impact . verdict !== 'no' ;
908+ // Optional cap: apply limit only to LLM calls
909+ const runLLM = impact . verdict !== 'no' && ( ! OPTIONS . limit || analyses . filter ( a => a . claudeSuggestions ) . length < OPTIONS . limit ) ;
909910 const claudeSuggestions = runLLM
910911 ? await generateDocSuggestionsWithClaude ( {
911912 ...prAnalysis ,
0 commit comments