Make all agent instructions self-contained — no reliance on hope

Every agent now has explicit instructions in its own definition file,
not just in HEARTBEAT.md. An agent following only its own step-by-step
instructions will do the right thing on any new case.

All 6 non-CEO agents: explicit wakeup CEO block in completion step
  (curl API + psql fallback, with agent name customized)

legal-ceo.md: issue template for analyst with 5 mandatory items
  (document mapping table, no-extract list, split large docs,
   wakeup CEO, blocked if failed)

legal-writer.md: explicit Read of decision-methodology.md as step 1
  (before case_get, not just "read before starting")

legal-qa.md: methodology_compliance severity → critical
  (was warning — decisions without syllogisms/steel-man now blocked)

legal-proofreader.md: added case_update tool + status='proofread'
  (was missing entirely — CEO couldn't know proofreading was done)

legal-researcher.md: added case_update + mail notification
  (was missing — CEO couldn't know research was done)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 13:17:44 +00:00
parent df4d28eb5c
commit 3f6a130cf9
7 changed files with 152 additions and 9 deletions

View File

@@ -71,11 +71,12 @@ tools:
## תהליך עבודה
### שלב 1: הכנה
1. קרא פרטי התיק (`case_get`)
2. קרא טענות מחולצות (`get_claims`)
3. **קרא את עמדות יו"ר הוועדה (`get_chair_directions`) — חובה!**
4. קבל תבנית החלטה (`get_decision_template`)
5. קרא מדריך סגנון (`get_style_guide`)
1. **קרא את המתודולוגיה**: `Read docs/decision-methodology.md` — חובה לפני כל כתיבה
2. קרא פרטי התיק (`case_get`)
3. קרא טענות מחולצות (`get_claims`)
4. **קרא את עמדות יו"ר הוועדה (`get_chair_directions`) — חובה!**
5. קבל תבנית החלטה (`get_decision_template`)
6. קרא מדריך סגנון (`get_style_guide`)
### שלב 1ב: בדיקת עמדות יו"ר — חובה לפני כתיבה!
@@ -142,6 +143,26 @@ case_update(case_number, status="drafted")
- ספירת מילים לכל בלוק
- יחסי משקל (% מהמסמך)
### העֵר את העוזר המשפטי (CEO) — חובה!
```bash
curl -s -X POST -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
-H "Content-Type: application/json" \
"$PAPERCLIP_API_URL/api/agents/752cebdd-6748-4a04-aacd-c7ab0294ef33/wake" \
-d '{"reason": "כותב החלטה סיים משימה [issue-id] בסטטוס [done/blocked]"}'
```
אם ה-API לא עובד:
```bash
PGPASSWORD="paperclip" psql -h 127.0.0.1 -p 54329 -U paperclip -d paperclip -c "
INSERT INTO agent_wakeup_requests (company_id, agent_id, source, reason, status, requested_by_actor_type)
VALUES (
(SELECT company_id FROM agents WHERE id = '\$PAPERCLIP_AGENT_ID'),
'752cebdd-6748-4a04-aacd-c7ab0294ef33',
'agent_completion',
'כותב החלטה סיים משימה — נדרשת בדיקה',
'pending', 'agent'
);"
```
**אם לא תעדכן סטטוס ל-drafted — בודק האיכות לא יוכל לרוץ!**
## בלוק י — דיון (הבלוק החשוב ביותר)