Route user comments through CEO agent + add draft/attachment awareness
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m42s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m42s
When a user comments on a Paperclip issue, the built-in automation wakes the assigned agent directly, bypassing the CEO. This meant user instructions (like "read the uploaded draft and route to the right agent") were ignored. Changes: - Plugin: add issue.comment.created event handler that wakes the CEO agent with the comment context (plugin-legal-ai, separate repo) - HEARTBEAT: add steps 2b (read recent user comments) and 2c (check attachments) before agents start working - CEO agent: add comment-routing section — read, check attachments, route - Writer agent: add step 0 — check for uploaded DOCX drafts before writing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -336,6 +336,35 @@ tools:
|
||||
- **לשאול כשלא בטוח** — אם משהו לא ברור, שאל את חיים
|
||||
- **ודא עקביות מתודולוגית** — כיוונים סילוגיסטיים (כלל + עובדות + מסקנה), chair_directions שלם (טיפול בטענות + כיוון + סדר סוגיות + תקן ביקורת), התאמה ל-`decision-methodology.md`
|
||||
|
||||
## טיפול בתגובות חדשות מחיים (comment routing)
|
||||
|
||||
כשאתה מתעורר בגלל תגובה חדשה (reason מכיל "user_commented"):
|
||||
|
||||
1. **קרא את ה-comments האחרונים** על ה-issue שצוין ב-prompt:
|
||||
```bash
|
||||
curl -s -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
|
||||
"$PAPERCLIP_API_URL/api/issues/{issue-id}/comments" | jq '[.[] | select(.authorUserId != null)] | .[-3:]'
|
||||
```
|
||||
|
||||
2. **בדוק attachments** — אם חיים ציין קובץ שהועלה:
|
||||
```bash
|
||||
PGPASSWORD="paperclip" psql -h 127.0.0.1 -p 54329 -U paperclip -d paperclip -c "
|
||||
SELECT a.original_filename, a.content_type, a.object_key
|
||||
FROM issue_attachments ia
|
||||
JOIN assets a ON a.id = ia.asset_id
|
||||
WHERE ia.issue_id = '{issue-id}'
|
||||
ORDER BY ia.created_at DESC LIMIT 5;"
|
||||
```
|
||||
נתיב מלא לקובץ: `/home/chaim/.paperclip/instances/default/data/storage/{object_key}`
|
||||
|
||||
3. **החלט על ניתוב:**
|
||||
- תשובה לשאלה שלך (1/2/3, אישור כיוון) → המשך בתהליך הרגיל
|
||||
- בקשה לנתב לסוכן ספציפי → צור issue חדש לסוכן המתאים + הוראות מהתגובה
|
||||
- טיוטה + הוראות עריכה → צור issue לכותב עם: (א) נתיב הקובץ, (ב) הוראות ספציפיות מהתגובה
|
||||
- לא ברור → שאל את חיים
|
||||
|
||||
4. **דווח** — פרסם comment שמאשר שקיבלת את ההוראה ומה אתה עושה איתה
|
||||
|
||||
## איך לקרוא comments של חיים
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user