[object Object]

← back to Gated Queue Runner

quality-gate note extraction (prose only, else title)

bf673dad342b26726607038070789bb0927c4541 · 2026-08-18 13:19:08 -0700 · steve

Files touched

Diff

commit bf673dad342b26726607038070789bb0927c4541
Author: steve <steve@designerwallcoverings.com>
Date:   Tue Aug 18 13:19:08 2026 -0700

    quality-gate note extraction (prose only, else title)
---
 selected.json |  6 +-----
 server.js     | 18 +++++++++++++-----
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/selected.json b/selected.json
index b5fb184..fb1fad1 100644
--- a/selected.json
+++ b/selected.json
@@ -1,5 +1 @@
-{
-  "savedAt": "2026-08-18T20:18:26.694Z",
-  "count": 0,
-  "files": []
-}
\ No newline at end of file
+{"savedAt":null,"count":0,"files":[]}
diff --git a/server.js b/server.js
index 54c1d4e..f88f233 100644
--- a/server.js
+++ b/server.js
@@ -75,11 +75,19 @@ function extractSummary(body) {
     if (/^[>|\-*]|^```|^\||^\d+\.\s/.test(l)) continue;     // quote/table/list/code
     if (/^\*\*(date|ticket|agent|status|cost|store|api|mode|owner|by|drafted|supersedes|context)\b/i.test(l)) continue;
     const prose = l.replace(/\*\*/g, '').replace(/[`*_#>]/g, '').trim();
-    if (prose.length >= 40 && /[a-z]/i.test(prose[0])) {
-      let s = prose.split(/(?<=[.!?])\s/)[0];              // first sentence
-      if (s.length > 170) s = s.slice(0, 167) + '…';
-      return simplify(s);
-    }
+    if (prose.length < 40) continue;
+    // quality gate: must read like a sentence, not a CSV header / code / path
+    const words = prose.split(/\s+/);
+    const commas = (prose.match(/,/g) || []).length;
+    const nonAlpha = (prose.replace(/[a-z0-9\s.,'"-]/gi, '').length) / prose.length;
+    if (words.length < 6) continue;                        // too few words = not prose
+    if (commas >= 4 && !/ and | or |, /.test(prose)) continue; // CSV-ish
+    if (nonAlpha > 0.18) continue;                         // symbol/path/code heavy
+    if (/[\/\\]{1}\w+\.\w|http|=>|\bSELECT\b|\{|\}/.test(prose)) continue; // code/path
+    if (!/[a-z]/i.test(prose[0])) continue;
+    let s = prose.split(/(?<=[.!?])\s/)[0];                // first sentence
+    if (s.length > 165) s = s.slice(0, 162) + '…';
+    return simplify(s);
   }
   return null;
 }

← 1a013f7 real per-memo kid-summaries + checkbox selection → selected.  ·  back to Gated Queue Runner  ·  add sortable Table view + Cards/Table toggle (every column c 5efaf26 →