[object Object]

← back to Morning Review Features

initial scaffold (gitify-all 2026-05-06)

3c5448b025eefc412a79de310ead0a7e38529432 · 2026-05-06 10:25:42 -0700 · Steve Abrams

Files touched

Diff

commit 3c5448b025eefc412a79de310ead0a7e38529432
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed May 6 10:25:42 2026 -0700

    initial scaffold (gitify-all 2026-05-06)
---
 .gitignore         | 12 ++++++++++
 build-overnight.sh | 39 ++++++++++++++++++++++++++++++
 specs/SPECS.md     | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 121 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7e6a9c3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,12 @@
+node_modules/
+.env
+.env.local
+.env.*.local
+.env.*
+tmp/
+*.log
+.DS_Store
+dist/
+build/
+.next/
+*.bak
diff --git a/build-overnight.sh b/build-overnight.sh
new file mode 100755
index 0000000..438dc7e
--- /dev/null
+++ b/build-overnight.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+# Overnight build for morning-review features #6-10.
+# Fires Claude CLI with the specs in SPECS.md. Strict 90-min budget.
+# Emails Steve a digest of what shipped via George.
+set -uo pipefail
+
+LOG_DIR=$HOME/Projects/morning-review-features/logs
+mkdir -p "$LOG_DIR"
+TS=$(date +%Y%m%d-%H%M%S)
+LOG="$LOG_DIR/build-$TS.log"
+DIGEST="$LOG_DIR/build-$TS.md"
+
+echo "[overnight-build] start $(date -Iseconds)" | tee -a "$LOG"
+
+SPECS=$(cat "$HOME/Projects/morning-review-features/specs/SPECS.md")
+PROMPT="You are an overnight builder. Build features #6-10 from this spec, in order, with a strict 90-minute total budget. After each feature: restart morning-review (pm2 restart morning-review), smoke-test the server, write progress to $DIGEST. NO pm2 restart on cncp-listed domains besides morning-review itself, NO git push, NO modifications to dw_unified. Single git-style commit message per feature. If budget is tight, partial-ship + write FIXME blocks. End by writing a SHIPPED/PARTIAL/SKIPPED summary to $DIGEST.
+
+SPEC:
+
+$SPECS"
+
+# 90-min cap via perl alarm (macOS lacks GNU timeout).
+perl -e 'alarm shift; exec @ARGV' 5400 \
+  /Users/stevestudio2/.claude/local/claude --print "$PROMPT" >> "$LOG" 2>&1
+RC=$?
+
+echo "[overnight-build] claude rc=$RC $(date -Iseconds)" | tee -a "$LOG"
+
+# Email digest via George (GEORGE_AUTH from env or default)
+GEORGE_AUTH=${GEORGE_AUTH:-admin:DWSecure2024!}
+if [ -s "$DIGEST" ]; then
+  PAYLOAD=$(BODY="$(cat "$DIGEST")" /usr/local/bin/node -e \
+    'process.stdout.write(JSON.stringify({to:"steveabramsdesigns@gmail.com",subject:"Morning-review overnight build "+new Date().toISOString().slice(0,10),body:process.env.BODY}))')
+  curl -sS --max-time 12 -X POST http://localhost:9850/api/send \
+    -u "$GEORGE_AUTH" -H 'content-type: application/json' \
+    -d "$PAYLOAD" >> "$LOG" 2>&1 || echo "[overnight-build] email failed" | tee -a "$LOG"
+fi
+
+exit $RC
diff --git a/specs/SPECS.md b/specs/SPECS.md
new file mode 100644
index 0000000..63c9fcc
--- /dev/null
+++ b/specs/SPECS.md
@@ -0,0 +1,70 @@
+# Morning-Review Feature Backlog (#6-10)
+
+Server: `~/.claude/skills/morning-review/scripts/server.js`
+Frontend: `~/.claude/skills/morning-review/templates/report.html`
+Pm2: `morning-review` on :9762
+
+Build features in order. After each:
+1. Restart server: `pm2 restart morning-review`
+2. Smoke: `curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:9762/`
+3. Single git-style commit message (no actual git repo here, just include in summary).
+
+## #6 — One-click "Disapprove all from {reviewer}" (15 min)
+
+Add a top-of-page reviewer-stats summary table in the LEFT pane. Each row = one reviewer with: count, signal_rate (from `/api/reviewer-stats`), and a [DISAPPROVE ALL] button.
+
+- New endpoint `POST /api/disapprove-bulk` body `{reviewer, severity?, only_hallucinated?}` → loops findings matching the filter, appends a `disapprove` decision for each.
+- Frontend: render the table from `/api/reviewer-stats` + `/api/findings`. Wire button to POST + reload.
+
+## #7 — Dry-run preview before Apply (3 hr)
+
+Today: clicking Apply spawns Claude CLI which writes files immediately.
+Goal: clicking Preview spawns Claude CLI in `--dry-run` mode (or with a prompt that says "produce a unified diff but do NOT write files or commit"). Stash the diff in `data/preview-{finding_id}.diff`. Right-pane shows the diff; Apply button uses that exact diff.
+
+- New endpoint `POST /api/preview` body `{finding_id}` → spawns Claude in plan-only mode with prompt: "Plan the fix and output ONLY a unified diff to stdout, no other text. Do not write files. Do not commit."
+- Save to `data/preview-{finding_id}.diff`.
+- Frontend: replace single Apply button with Preview → review-the-diff → Apply (the existing Apply uses the saved diff directly via `git apply`).
+
+## #8 — Cross-project finding consolidation (2 hr)
+
+When multiple findings flag the SAME pattern (same regex on body's first 200 chars), group them.
+
+- New helper `consolidateFindings(list)` that buckets findings by similarity hash (Levenshtein on first sentence).
+- Group becomes one card showing N member-findings; approve/disapprove cascades to all.
+- Add `?consolidate=1` query param to `/api/findings`; UI defaults to consolidated view, toggle to flat.
+
+## #9 — Voice approve (1 hr)
+
+Use macOS dictation + a shell-listening daemon: Steve says "approve all small-business-builder commits" → script POSTs approve for each.
+
+- New skill or simple bash daemon that polls macOS dictation output (or accepts STDIN) and parses commands.
+- For now: simpler one-shot — `~/Projects/morning-review-features/voice-approve.sh "approve all smb-builder"` parses the command and does the bulk action via existing `/api/decision`.
+- No real-time mic listening required for v1; just the parse + action path.
+
+## #10 — Daily digest commit (30 min)
+
+At end of each day's review session (or via cron at 6pm PT), generate `~/Projects/morning-review-features/digests/{date}.md` summarizing:
+- Approved findings → list with the resulting commit hash + project
+- Disapproved findings → reviewer + reason snippet
+- Errored / orphaned findings still pending
+- Reviewer scorecard (pulled from `/api/reviewer-stats`)
+
+Email via George: `curl -sS -X POST http://localhost:9850/api/send -u admin:DWSecure2024! -H content-type:application/json -d {to:"steveabramsdesigns@gmail.com",subject:"Morning-review digest YYYY-MM-DD",body:...}`
+
+- New endpoint `GET /api/digest?date=YYYY-MM-DD` returns the markdown.
+- New script `~/Projects/morning-review-features/generate-digest.sh` calls it, saves, optionally emails.
+- Launchd plist fires daily 18:00 PT.
+
+## Constraints
+
+- NO `git push`, NO pm2 restart on cncp-listed domains, NO modifications to `dw_unified`.
+- Local commits only. Single-commit-per-feature when modifying files in this skill.
+- Smoke test the morning-review server after each feature; revert that feature's changes if /api/findings starts 5xxing.
+- Total Claude CLI budget: 90 minutes. If over, write FIXME blocks where remaining work would go and exit cleanly.
+
+## Verification checklist
+
+After all features attempted, write `~/Projects/morning-review-features/logs/build-{date}.md` with:
+- Each feature: SHIPPED / PARTIAL / SKIPPED + 1-line reason
+- Endpoint smoke results
+- Any new files created

(oldest)  ·  back to Morning Review Features  ·  gitignore: add missing backup-file patterns (*.bak-*, *.pre- b02a148 →