Skip to content

Commit a836a07

Browse files
committed
Default strictness to conservative for fewer false positives
1 parent 279807e commit a836a07

File tree

1 file changed

+18
-4
lines changed
  • docusaurus/scripts/strapi-release-analyzer

1 file changed

+18
-4
lines changed

docusaurus/scripts/strapi-release-analyzer/index.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const OPTIONS = {
4444
refresh: false,
4545
cacheDir: path.join(process.cwd(), 'docusaurus', 'scripts', 'strapi-release-analyzer', '.cache'),
4646
limit: null,
47-
strict: 'aggressive', // aggressive | balanced | conservative
47+
strict: 'conservative', // aggressive | balanced | conservative (default conservative)
4848
};
4949

5050
// Minimal loader for llms-full.txt (with graceful fallback to llms.txt)
@@ -411,6 +411,7 @@ Respond with a JSON object in this minimal shape (JSON only, no markdown):
411411
{
412412
"summary": "≤200 chars plain text what/why",
413413
"needsDocs": "yes" | "no" | "maybe",
414+
"docsWorthy": true | false,
414415
"rationale": "1–2 sentence justification",
415416
"targets": [
416417
{ "path": "docs/cms/...md", "anchor": "optional-section-anchor" }
@@ -452,7 +453,19 @@ Respond with a JSON object in this minimal shape (JSON only, no markdown):
452453
- Minor typo fixes in code comments
453454
- Changes to development tooling
454455
455-
6. **Grounding and targeting**:
456+
6. **Docs‑worthiness rubric**:
457+
- Mark as YES only if at least one applies:
458+
- Breaking change or deprecation
459+
- New capability/setting/endpoint or config key
460+
- Persistent workflow/UX change (not cosmetic)
461+
- New concept that requires explanation
462+
- Otherwise, prefer NO for:
463+
- Cosmetic UI fixes (spacing, margins, alignment, borders, icons)
464+
- Restoring expected behavior/regressions
465+
- Minor labels/translations/tooltips only
466+
- Internal refactors without external impact
467+
468+
7. **Grounding and targeting**:
456469
- Prefer targets among the "Candidate Documentation Pages" when applicable.
457470
- Include an anchor from the page's anchors list when relevant.
458471
- Keep the response JSON-only (no markdown outside JSON).
@@ -487,6 +500,7 @@ Respond ONLY with valid JSON, no markdown formatting, no additional text.`;
487500
// Lightweight normalization
488501
const needs = (obj.needsDocs || '').toLowerCase();
489502
const needsDocs = ['yes','no','maybe'].includes(needs) ? needs : 'maybe';
503+
const docsWorthy = Boolean(obj.docsWorthy);
490504
const summary = String(obj.summary || prAnalysis._summary || '').trim().slice(0, 200);
491505
const rationale = String(obj.rationale || '').trim().slice(0, 300);
492506
const targets = Array.isArray(obj.targets) ? obj.targets : [];
@@ -495,8 +509,8 @@ Respond ONLY with valid JSON, no markdown formatting, no additional text.`;
495509
.filter(t => t.path);
496510
const cappedTargets = normTargets.slice(0, 5);
497511

498-
const normalized = { summary, needsDocs, rationale, targets: cappedTargets };
499-
console.log(` ✅ LLM verdict: ${needsDocs.toUpperCase()}${cappedTargets.length} target(s)`);
512+
const normalized = { summary, needsDocs, docsWorthy, rationale, targets: cappedTargets };
513+
console.log(` ✅ LLM verdict: ${needsDocs.toUpperCase()} | worthy=${docsWorthy ? 'Y' : 'N'} ${cappedTargets.length} target(s)`);
500514
return normalized;
501515
} catch (error) {
502516
console.error(` ❌ Error calling Claude API: ${error.message}`);

0 commit comments

Comments
 (0)