Documentation Index
Fetch the complete documentation index at: https://docs.humaniq.dev/llms.txt
Use this file to discover all available pages before exploring further.
These recipes provide approval workflows for legal operations, with focus on document control, audit trails, and compliance requirements.
Contract Review
Court Filings
Document Classification
Legal Hold
Contract Review
Manage AI-generated contract reviews with legal oversight.const reviewContract = needsHumanApproval({
type: 'async',
title: 'Contract Review',
ask: (args) => `Review AI-generated contract for ${args.clientName}`,
autoApprove: async (args) => args.riskLevel === 'LOW'
})
- AI-generated contract review
- Template deviation approval
- High-value contract oversight
- Non-standard term review
- Include comprehensive risk analysis
- Highlight template deviations
- Maintain approval audit trail
- Document review decisions
Court Filing Review
Manage court filing approvals with deadline awareness.const reviewCourtFiling = needsHumanApproval({
type: 'sync',
title: 'Court Filing Review',
ask: (args) => {
const deadline = new Date(args.filingDeadline);
const hoursLeft = Math.round((deadline - new Date()) / (60 * 60 * 1000));
const urgent = hoursLeft < 24 ? `⚠️ URGENT (${hoursLeft}h left): ` : '';
return `${urgent}Review ${args.filingType} for case ${args.caseNumber}`;
},
approvalArguments: {
filingType: {
type: 'string',
value: args.filingType,
label: 'Filing Type',
editable: false
},
jurisdiction: {
type: 'string',
value: args.jurisdiction,
label: 'Jurisdiction',
editable: false
},
content: {
type: 'longString',
value: args.filingContent,
label: 'Filing Content',
editable: true
},
citations: {
type: 'longString',
value: args.citations,
label: 'Citations Check',
editable: true
},
deadline: {
type: 'date',
value: args.filingDeadline,
label: 'Filing Deadline',
editable: false
}
},
// Route to jurisdiction experts
approvers: (args) => {
const jurisdictionExperts = {
'CA': { name: 'California Team', email: 'ca-legal@company.com' },
'NY': { name: 'New York Team', email: 'ny-legal@company.com' }
};
return [jurisdictionExperts[args.jurisdiction] ||
{ name: 'Legal Team', email: 'legal@company.com' }];
}
})
Approval timeout is automatically adjusted based on filing deadlines to ensure timely reviews.
Document Classification
Approve AI-suggested document classifications and retention policies.const classifyDocument = needsHumanApproval({
type: 'async',
title: 'Document Classification',
ask: (args) => `Review classification for document ${args.documentId}`,
approvalArguments: {
suggestedClass: {
type: 'string',
value: args.aiClassification,
label: 'AI Classification',
editable: true
},
confidence: {
type: 'number',
value: args.aiConfidence,
label: 'AI Confidence Score',
editable: false
},
retention: {
type: 'string',
value: args.retentionPolicy,
label: 'Retention Policy',
editable: true
},
keywords: {
type: 'string',
value: args.extractedKeywords.join(', '),
label: 'Extracted Keywords',
editable: true
}
},
// Auto-approve high-confidence classifications
autoApprove: async (args) => args.aiConfidence > 0.95
})
- Privileged communications
- Confidential materials
- Public records
- Discovery documents
- Internal memos
Legal Hold Management
Handle legal hold implementations and modifications.const manageLegalHold = needsHumanApproval({
type: 'sync',
title: 'Legal Hold Management',
ask: (args) => `Approve ${args.action} legal hold for matter ${args.matterId}`,
approvalArguments: {
scope: {
type: 'longString',
value: args.holdScope,
label: 'Hold Scope',
editable: true
},
custodians: {
type: 'longString',
value: args.custodians.join('\n'),
label: 'Affected Custodians',
editable: true
},
duration: {
type: 'string',
value: args.estimatedDuration,
label: 'Estimated Duration',
editable: true
},
holdReason: {
type: 'string',
value: args.reason,
label: 'Hold Reason',
editable: true
}
},
// Always require approval for hold removal
shouldSeekApprovals: async (args) => {
return args.action === 'REMOVE' || args.custodians.length > 10;
},
// Notify compliance team
onApprovedCallbackUrl: 'https://compliance.company.com/legal-hold-notification'
})
- Hold implementation
- Scope modifications
- Custodian additions/removals
- Hold termination
Next Steps
Compliance Integration
Explore healthcare approval workflows
Document Management
Explore financial approval workflows