clawd/memory/2026-02-25.md

2.4 KiB

Dealspace — Responses / AI Matching / Assignment Rules (04:05 AM)

Claude Code agent built and deployed in ~12 minutes. Commit: 9cbd6db

What shipped:

  • responses table (document | statement), response_chunks, request_links, assignment_rules
  • Fireworks client: Llama 90B Vision for extraction, nomic-embed-text-v1.5 for embeddings
  • PDF→images via pdftoppm subprocess, XLSX via excelize, images direct
  • Markdown chunker (heading/paragraph split, ~1600 char, 80 char overlap)
  • Async worker (2 goroutines): extract→chunk→embed→cosine match at 0.72 threshold
  • Per-deal assignment rules (keyword→assignee), auto-assigns on import
  • Human confirmation required before match counts as answered
  • Template: status pills, assignee badges, AI match prompts, pending matches panel, Statement modal, Assignment Rules panel, extraction status on files tab

Pending (Misha decisions needed):

  1. Upload the XLSX files to test the full pipeline
  2. Define assignment rules for Project Muskepo
  3. Statements in scope — test typing a direct answer to a request

Dealspace — Night Shift Session (late Feb 24 → early Feb 25)

Bugs fixed & deployed

  • Stage constraint: prod DB had old CHECK ('pipeline','loi',...) — migration recreated table with new stages
  • Folder drag: children now draggable; drop on bottom 60% = reparent as child; root drop zone for promoting subfolders

XLSX upload

  • Added excelize for XLSX parsing
  • Smart header detection scanning first 12 rows (many DD checklists have title rows before actual headers)
  • File saved to data/uploads/ on every upload
  • Debug logging via log.Printf (not fmt.Printf — systemd doesn't capture fmt)
  • After upload → redirects to ?tab=requests (auto-switches tab via URLSearchParams JS)

Architecture locked in (Responses / AI matching)

  • responses table: document | statement
  • response_chunks: chunked markdown, float32 vectors
  • request_links: N:M with confidence + confirmed flag (human must confirm)
  • assignment_rules: keyword → assignee per deal
  • Fireworks: llama-v3p2-90b-vision for extraction, nomic-embed-text-v1.5 for embeddings
  • Async worker: 2 goroutines, 0.72 cosine threshold
  • Statements (typed answers) in scope

Committed: 9cbd6db

  • All 4 tables live in prod DB
  • Extraction worker confirmed running (2 goroutines in logs)
  • Full template changes: status pills, assignee badges, AI match panel, statement modal, assignment rules panel