2 Commits

Author SHA1 Message Date
root
991db7be1a scrum: wrapper resilience + Python tz deprecation fix
Two small fixes after testing the tool end-to-end:

1. scrum_review.sh's tally-aggregation step occasionally exits non-zero
   even when the per-reviewer markdown verdicts are all written
   correctly. Wrapper was bailing on that exit code and dropping the
   KB write. Now the wrapper:
   - Treats scrum_review.sh's exit code as advisory
   - If a tally markdown exists, uses it
   - If only per-reviewer markdowns exist, auto-rebuilds a minimal
     tally listing them (so KB row still gets written)
   - Only bails if NO per-reviewer verdicts at all

2. Python `datetime.utcnow()` deprecated. Switched to
   `datetime.now(datetime.UTC).isoformat().replace("+00:00", "Z")`
   for the same Z-suffix shape callers expect.

Verified: ./scrum --since=HEAD~1 now writes KB row even when
scrum_review.sh's tally step has issues. KB rows: 2 (and growing).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 02:44:45 -05:00
root
2f5ca95875 scrum: real tool — auto-bundle current diff, run 3-reviewer scrum, push to KB
J's frustration captured: scrum was a TOOL meant to find gaps in the work
and push findings to a KB that informs how WE work on the code. It became
welded into architecture instead of staying a tool. This commits the tool
in the form J actually meant.

Usage:
  ./scrum                       auto-bundle origin/main..HEAD, auto-label
  ./scrum my_label              same with explicit label
  ./scrum --staged              bundle staged-only diff (pre-commit)
  ./scrum --since=COMMIT        bundle from a specific commit

Output:
  KB row    → data/_kb/scrum_findings.jsonl  (one row per scrum run)
  Verdicts  → reports/scrum/_evidence/<date>/verdicts/<label>_*.md

The KB row carries: timestamp, label, diff size, findings count,
convergent count, branch, head SHA, tally excerpt, paths to full
verdicts. Queryable via jq or DuckDB.

Cloud models (opus + kimi-k2 + qwen3-coder) are used here BY DESIGN
— 3-lineage cross-review needs distinct training corpora. This is dev
tooling, not the runtime hot path. PRD line 70 (no cloud APIs) applies
to customer requests, not to J's dev tools.

Tested live: ./scrum --since=HEAD~1 revert_only → 7 findings, 1 convergent
(INFO), all 3 reviewers VERDICT: ship for the revert commit.

KB row written:
  {"label":"revert_only","findings_total":7,"findings_convergent":1,
   "diff_bytes":5806,"branch":"demo/post-pr11-polish-2026-04-28",...}

What scrum does NOT do (intentionally):
- It does NOT auto-fold findings into architecture / design docs
- It does NOT block any commit/push
- It does NOT mutate any code
- It does NOT run as part of normal customer requests

It reports. J reads. J decides what to do with the findings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 01:59:32 -05:00