Skip to content

Review Skill

The review skill assembles a comprehensive review package containing all artifacts, checklists, and interactive query capabilities for final human expert approval before committing the encoding.

Overview

Attribute Value
Skill Name review
Phase 4 of 5
Checkpoint 4: Final Approval
Prerequisites Checkpoint 3 (validate) approved, all tests passing
Outputs review-package.md (comprehensive)
Trigger Phrases "review encoding", "prepare review", "final review", "create review package", "assemble review"

Prerequisites

Before this skill can execute:

  1. Validate checkpoint MUST be approved
  2. All validation tests must have passed
  3. Session state shows validate.status: approved

Review Package Assembly

The review skill assembles five major components into a single comprehensive review package.

Component 1: Executive Summary

The executive summary provides a high-level overview:

## Executive Summary

**Reference:** Yoreh Deah 87:3
**Topic:** Fish and Dairy (Dag Bechalav)

### Encoding Metrics
| Metric | Value |
|--------|-------|
| Rules Encoded | 8 |
| Worlds Covered | base, mechaber, rema |
| Machloket Count | 1 |
| Complexity Score | 6/10 |

### Checkpoint Status
- Corpus Preparation: Approved (2026-01-25T10:30:00Z)
- HLL Encoding: Approved (2026-01-25T12:00:00Z)
- Validation: Approved (2026-01-25T14:00:00Z)

### Key Decisions
1. Encoded Mechaber's sakana position with explicit issur(achiila)
2. Used override/3 for Rema's mutar position (not deletion)
3. Topic-based rule naming (r_dag_*, r_rema_dag_*)

Component 2: Source Verification

The source verification section presents original sources for human review:

## Source Verification

### Original Hebrew Text
```hebrew
דגים וחגבים אין בהם איסור בשר בחלב ומותר לבשלם בחלב ולאכלם עם החלב אבל אסור
לאכלם עם הבשר מפני הסכנה

English Translation

Fish and locusts have no prohibition of meat-and-milk, and it is permitted to cook them with milk and to eat them with milk. However, it is forbidden to eat them with meat due to danger.

Translation Comparison

Version Key Phrase
Sefaria "due to danger"
Artscroll "because of the health hazard"

Derivation Chain

graph TD
    SA["SA YD 87:3"] --> TUR["Tur YD 87"]
    TUR --> BY["Beit Yosef YD 87"]
    BY --> MED["Medical Sources"]

Commentary Excerpts

Shach (sk 5)

"The custom in these lands is to eat fish with milk..." Classification: DISPUTE (against Mechaber) Encoding Impact: Supports Rema position

Taz (sk 3)

"Even the Mechaber agrees this is only a chumra..." Classification: CLARIFICATION Encoding Impact: Confirms non-d'oraita status

### Component 3: Encoding Review

The encoding review section presents all encoded rules:

```markdown
## Encoding Review

### Base World Rules (Universal)
```prolog
% All agree: Fish has no basar bechalav prohibition
rule(r_bb_dag_no_bb).
makor(r_bb_dag_no_bb, sa("yd:87:3")).
scope(r_bb_dag_no_bb, base).

asserts(base, no_bb_issur(M)) :-
    is_dag_chalav_mixture(M).

Mechaber World Rules

% Mechaber: Fish + dairy = sakana
rule(r_bb_dag_sakana).
makor(r_bb_dag_sakana, sa("yd:87:3")).
makor(r_bb_dag_sakana, beit_yosef("yd:87")).
scope(r_bb_dag_sakana, mechaber).

asserts(mechaber, sakana(M)) :-    % <-- KEY RULING
    is_dag_chalav_mixture(M).

asserts(mechaber, issur(achiila, M, sakana)) :-
    is_dag_chalav_mixture(M).

Rema World Rules

% Rema: Fish + dairy = mutar (DISAGREES with Mechaber)
rule(r_rema_dag_chalav_mutar).
makor(r_rema_dag_chalav_mutar, rema("yd:87:3")).
makor(r_rema_dag_chalav_mutar, shach("yd:87:5")).
scope(r_rema_dag_chalav_mutar, rema).

% Override Mechaber's sakana (descriptive value, not 'invalid')
override(rema, sakana(M), no_sakana) :-
    is_dag_chalav_mixture(M).

asserts(rema, heter(achiila, M)) :-
    is_dag_chalav_mixture(M).

Statement-to-Rule Traceability

Statement Rule ID Predicate World
s1: Fish has no BB issur r_bb_dag_no_bb no_bb_issur base
s2: Permitted to cook r_bb_dag_bishul_heter heter(bishul) base
s3: Forbidden due to sakana r_bb_dag_sakana sakana, issur mechaber
s3 (Rema disagrees) r_rema_dag_chalav_mutar heter, no_sakana rema

World Inheritance Diagram

graph TD
    BASE["base<br/>no_bb_issur(M)"] --> MECH["mechaber<br/>+ sakana(M)<br/>+ issur(achiila, sakana)"]
    BASE --> REMA["rema<br/>+ heter(achiila)<br/>override sakana→no_sakana"]
    MECH --> SEF["sefardi_yo<br/>(inherits sakana)"]
    REMA --> ASHK_MB["ashk_mb<br/>(inherits heter)"]
    REMA --> ASHK_AH["ashk_ah<br/>(inherits heter)"]

Machloket Summary

Topic: dag_chalav (Fish and Dairy)

Aspect Mechaber Rema
Ruling Forbidden (sakana) Permitted
Basis Medical sources via BY Ashkenazi practice
Encoded As sakana(M), issur(achiila, M, sakana) override→no_sakana, heter(achiila, M)
Practical No lox + cream cheese Lox + cream cheese OK
### Component 4: Validation Evidence

The validation evidence section presents test results:

```markdown
## Validation Evidence

### Test Results
| Category | Passed | Failed | Total |
|----------|--------|--------|-------|
| Positive Tests | 10 | 0 | 10 |
| Negative Tests | 5 | 0 | 5 |
| Edge Cases | 3 | 0 | 3 |
| Machloket | 1 | 0 | 1 |
| Regression | 495 | 0 | 495 |

### Sample Query Results

#### Query 1: Fish + Dairy in Mechaber World
```python
>>> engine.analyze('''
...     food(salmon). food_type(salmon, dag).
...     food(cream). food_type(cream, chalav).
...     mixture(m1). contains(m1, salmon). contains(m1, cream).
... ''', world="mechaber")

Relevant atoms:
- is_dag_chalav_mixture(m1)
- sakana(m1)
- issur(achiila, m1, sakana)

Query 2: Same Scenario in Rema World

>>> engine.analyze(same_setup, world="rema")

Relevant atoms:
- is_dag_chalav_mixture(m1)
- no_sakana(m1)
- heter(achiila, m1)

Query 3: Machloket Detection

>>> engine.query("machloket(dag_chalav, A, B, M)")
[{'A': 'mechaber', 'B': 'rema', 'M': 'm1'}]

Derivation Tree

holds(sakana(m1), mechaber)
├─ asserts(mechaber, sakana(m1))
│  ├─ is_dag_chalav_mixture(m1)
│  │  ├─ mixture_has_basar(m1, dag)
│  │  │  └─ food_type(salmon, dag)
│  │  └─ mixture_has_chalav(m1)
│  │     └─ food_type(cream, chalav)
│  └─ rule(r_bb_dag_sakana)
│     └─ makor(r_bb_dag_sakana, sa("yd:87:3"))
└─ world(mechaber)
### Component 5: Questions & Concerns

Any open issues are documented:

```markdown
## Questions & Concerns

### Resolved Questions

#### Q1: Sakana Scope
**Question:** Does sakana include cooking or only eating?
**Resolution:** Encoded only for eating per literal SA reading.
**Confidence:** Medium

### Outstanding Concerns

| Issue | Severity | Notes |
|-------|----------|-------|
| Shach sk 5 interpretation | Low | Multiple readings possible |
| Modern practice divergence | Info | Some Sefardim follow Rema |

### Recommended Follow-Up
1. Consult with posek on sakana scope
2. Consider encoding Yalkut Yosef position
3. Add cross-reference to YD 116 (general sakana)

Checklists

Halachic Accuracy Checklist

The human reviewer must complete this checklist:

## Halachic Accuracy Checklist

| # | Check | Status | Notes |
|---|-------|--------|-------|
| H1 | Ruling accurately represents SA text | [ ] | |
| H2 | All conditions from source captured | [ ] | |
| H3 | Machloket positions accurately encoded | [ ] | |
| H4 | Makor chain reaches authoritative source | [ ] | |
| H5 | Commentary interpretations correct | [ ] | |
| H6 | Madrega levels appropriate | [ ] | |
| H7 | No rulings invented or inferred | [ ] | |
| H8 | World assignments match authority | [ ] | |

### Specific Verifications

1. SA YD 87:3 states: "דגים וחגבים אין בהם איסור בשר בחלב"
   - [ ] Encoded as `no_bb_issur(M)` for dag - CORRECT?

2. Mechaber holds fish + dairy = sakana
   - [ ] Encoded as `asserts(mechaber, sakana(M))` - CORRECT?

3. Rema/Ashkenazi practice permits
   - [ ] Encoded as `override` + `heter` - CORRECT?

Technical Accuracy Checklist

## Technical Accuracy Checklist

| # | Check | Status | Notes |
|---|-------|--------|-------|
| T1 | Predicates correctly chosen | [ ] | |
| T2 | Arity matches predicate definition | [ ] | |
| T3 | Variables properly scoped | [ ] | |
| T4 | NAF used appropriately | [ ] | |
| T5 | World inheritance correct | [ ] | |
| T6 | Overrides properly structured | [ ] | |
| T7 | All rules have unique IDs | [ ] | |
| T8 | File structure follows conventions | [ ] | |

Quality Checklist

## Quality Checklist

| # | Check | Status | Notes |
|---|-------|--------|-------|
| Q1 | All tests pass | [ ] | |
| Q2 | No regression failures | [ ] | |
| Q3 | Documentation complete | [ ] | |
| Q4 | Source chain logged | [ ] | |
| Q5 | Session artifacts preserved | [ ] | |
| Q6 | Ready for production use | [ ] | |

Interactive Testing Interface

The review package includes instructions for interactive testing:

## Interactive Testing

### CLI Commands
```bash
# Test specific scenario
mistaber -o ./mistaber/ontology analyze '''
food(lox). food_type(lox, dag).
food(cream_cheese). food_type(cream_cheese, chalav).
mixture(m1). contains(m1, lox). contains(m1, cream_cheese).
''' --world mechaber

# Compare across worlds
mistaber -o ./mistaber/ontology compare "holds(sakana(M), W)" --worlds mechaber,rema

# Explain derivation
mistaber -o ./mistaber/ontology explain "holds(sakana(m1), mechaber)"

Python API

from mistaber.engine import HsrsEngine
from pathlib import Path

engine = HsrsEngine(Path("mistaber/ontology"))

# Test scenario
result = engine.analyze('''
    food(lox). food_type(lox, dag).
    food(cream_cheese). food_type(cream_cheese, chalav).
    mixture(m1). contains(m1, lox). contains(m1, cream_cheese).
''', world="mechaber")

print("Mechaber world atoms:")
for atom in result['atoms']:
    if 'sakana' in atom or 'issur' in atom or 'heter' in atom:
        print(f"  {atom}")

Suggested Test Scenarios

  1. Lox and cream cheese - Classic fish+dairy
  2. Gefilte fish with butter - Another common case
  3. Salmon in cream sauce - Cooked together
    ## Approval Actions
    
    The review package concludes with approval instructions:
    
    ```markdown
    ## Final Approval
    
    ### Requirements Before Approving
    
    1. **All checkpoints approved:**
       - Corpus Preparation
       - HLL Encoding
       - Validation
    
    2. **All checklists complete:**
       - Halachic Accuracy (8 items)
       - Technical Accuracy (8 items)
       - Quality (6 items)
    
    3. **No blocking concerns**
    
    ### Approval Actions
    
    **To APPROVE and proceed to commit:**
    > "Approved" or "Final approval granted"
    
    This will:
    1. Mark review checkpoint as approved
    2. Proceed to commit phase
    3. Write files to ontology
    4. Create git commit
    5. Archive session
    
    **To REQUEST CHANGES:**
    > "Needs revision: [specific feedback]"
    
    This will:
    1. Return to appropriate phase
    2. Clear relevant checkpoint
    3. Allow corrections
    
    **To REJECT:**
    > "Rejected: [reason]"
    
    This will:
    1. Cancel encoding session
    2. Archive with rejected status
    

Checkpoint Criteria

Before presenting to human, the skill verifies:

  • [ ] All prior checkpoints approved
  • [ ] All test results available
  • [ ] All artifacts accessible
  • [ ] Checklists populated with specifics
  • [ ] Interactive testing instructions complete

Session State Update

After human approval:

current_phase: review
checkpoints:
  review:
    status: approved  # Set by human
    approved_by: "human_reviewer_name"
    timestamp: "2026-01-25T16:00:00Z"
    artifacts:
      - review-package-YD-87-3.md
    checklists:
      halachic: complete
      technical: complete
      quality: complete
    interactive_testing: passed

Output Files

Review Package File

review-package-YD-{siman}-{seif}.md

Uses template from templates/review-package.md to generate comprehensive package including all five components.

Common Issues

Incomplete Checklist

Symptom: Human approves without completing all items.

Solution: Skill prompts for missing items before accepting approval.

Interactive Testing Fails

Symptom: Queries return unexpected results during review.

Solution: Return to validation phase to investigate discrepancy.

Outstanding Concerns Not Addressed

Symptom: Critical concerns remain unresolved.

Solution: Document for follow-up or require resolution before approval.