Files
legal-ai/.taskmaster/docs/prd-paperclip-workflow.txt
Chaim d5ccf03e4c Add docs, scripts, skills, commands, and taskmaster config to repo
Includes:
- docs/: architecture, block-schema, migration-plan, product-specification
- scripts/: bidi_table, decompose-decisions, extract-claims, seed-knowledge, etc.
- skill-legal-decision/: SKILL.md + references + block-schema
- skill-legal-assistant/: SKILL.md
- skill-legal-docx/: SKILL.md + references
- .claude/commands/: bidi-table skill
- .taskmaster/: task config + PRDs
- .gitignore: exclude legacy/, kiryat-yearim/, node_modules/, memory/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 14:19:17 +00:00

47 lines
4.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PRD — אינטגרציית Paperclip AI + תהליך תיק חדש
## הקשר
שתי משימות מחוברות שנגזרות מאיפיון המוצר (docs/product-specification.md) ומניתוח הפלאגין הקיים (/home/chaim/plugin-legal-ai/).
## משימות
### משימה: הרחבת DB schema לתהליך מלא
Priority: critical. Dependencies: none.
הוספת שדות וטבלאות חסרים: direction_doc JSONB ו-outcome_reasoning TEXT בטבלת decisions. הרחבת status בטבלת cases ל-13 ערכים (new, uploading, processing, documents_ready, outcome_set, brainstorming, direction_approved, drafting, qa_review, drafted, exported, reviewed, final). יצירת טבלת qa_results. כל זה ב-db.py כ-migration.
### משימה: הוספת 5 API endpoints חדשים ב-MCP server
Priority: critical. Dependencies: DB schema.
POST /api/cases/{case_number}/outcome — הזנת תוצאה + נימוק. GET /api/cases/{case_number}/claims — טענות מחולצות. POST /api/cases/{case_number}/direction — שמירת מסמך כיוון. POST /api/cases/{case_number}/qa — הרצת QA ולידציה. POST /api/cases/{case_number}/learn — הפעלת לולאת למידה.
### משימה: הוספת 8 tools חדשים לפלאגין Paperclip
Priority: high. Dependencies: API endpoints.
בקובץ src/worker.ts: legal_document_upload, legal_document_list, legal_document_text, legal_search_case, legal_find_similar, legal_set_outcome, legal_get_claims, legal_style_guide. בקובץ src/legal-api.ts: 8 methods חדשים. בקובץ plugin.json: עדכון רשימת tools.
### משימה: שיפור status sync ב-Paperclip
Priority: high. Dependencies: DB schema.
מיפוי 13 סטטוסים (במקום 5→3). הוספת comments מפורטים ב-Paperclip בכל מעבר סטטוס. עדכון job sync-case-status.
### משימה: כתיבת SOUL.md לסוכנים
Priority: high. Dependencies: none.
CEO Agent: הוראות בעברית — ניהול תהליך החלטה, מתי להתריע לחיים, מיפוי סטטוסים. Case Analyst Agent: הוראות בעברית — ניתוח מסמכים, חילוץ טענות, חיפוש תקדימים.
### משימה: יישום skill /brainstorm
Priority: critical. Dependencies: API endpoints.
Skill חדש ב-Claude Code: מציג טענות מרכזיות (ס-1), מציע 2-3 כיוונים (ס-2), מנהל שיח עם חיים (ס-3), מייצר מסמך כיוון JSON (ס-4), שומר ב-DB. כלל: לא מתחילים דיון בלי כיוון מאושר (ס-5).
### משימה: שיפור skill /draft-decision לכתיבה בלוק-אחרי-בלוק
Priority: critical. Dependencies: brainstorm skill, DB schema.
עכשיו הוא stub. צריך: כתיבה בלוק-אחרי-בלוק (ה→ו→ז→ח→ט→י→יא), שמירה ב-DB אחרי כל בלוק (כ-12), recovery ממצב שנפל (כ-13), חזרה אחורה (כ-14). בלוק י: CREAC + Opus + thinking + מסמך כיוון. פרמטרי עיבוד (temperature, model) לפי block-schema.
### משימה: יישום skill /qa-validate
Priority: critical. Dependencies: draft-decision.
Skill חדש: grounding check (כל הפניה מול מסמכים), מענה לכל טענה, רקע ניטרלי, משקלות בטווח, מספור רציף, הגדרות להלן. אם נכשל — חוסם ייצוא. דוח שגיאות מפורט.
### משימה: אינטגרציה E2E וחיבור Paperclip events
Priority: high. Dependencies: all skills.
חיבור Paperclip events ל-Claude Code (trigger כתיבה דרך issue comment). E2E test על תיק הכט: העלאת חומרים → הזנת תוצאה (דחייה) → כתיבה → QA → DOCX. השוואה להחלטה הסופית.
### משימה: מבחן הסמכה
Priority: critical. Dependencies: E2E integration.
שלב ב מסעיף 8 באיפיון: המערכת כותבת החלטה לתיק שכבר יש לו החלטה סופית. השוואת טיוטה להחלטה — פער ≤10%. שלב ג: תיק חי — דפנה בודקת.