Legal pack
Legal pack template, contract assistant on fictitious data with a simulated clm connector.
Reference
| Field | Value |
|---|---|
| Name | legal |
| Version | 1.0.0 |
| Licence | MIT |
| Type | Template |
format | pack |
domain | legal |
| Category | legal |
namespace | enterprise-ai-packs |
publisher | Enterprise AI reference packs |
owner | enterprise-ai-packs |
compatibility.platform | >=1.0.0 <2.0.0 |
compatibility.sdk | >=1.0.0 <2.0.0 |
compatibility.runtimes | navin |
dependencies | None |
| Source | packs/templates/legal/plugin.yaml |
| Documentation | packs/templates/legal/docs/en/README.md, packs/templates/legal/docs/fr/README.md |
Capabilities
| Kind | Name |
|---|---|
tool | legal-search |
tool | legal-update-status |
connector | legal-clm |
policy | legal |
Requested permissions
The administrator grants a subset at install time; only the granted scopes are enforced.
| Scope | Sensitive | Classification | Reason |
|---|---|---|---|
legal.contracts.read | No | confidential | Read contract records to answer questions. |
legal.contracts.write | Yes | confidential | Change the status of a contract after a human approval. |
Data protection
| Field | Value |
|---|---|
classification_max | confidential |
pii | false |
residency | eu-west-1 |
retention_days | 30 |
dlp | mask |
fictitious_data | true |
piiDetectionRequired | true |
maskingPolicy | mask |
externalExportDefault | deny |
Approvals
Required for: install, upgrade, sensitivePermissions, production, externalExport, resume.
| Gate | Quorum | Roles |
|---|---|---|
install | 1 | tenant_admin, security_officer |
sensitive | 2 | tenant_admin, security_officer |
production | 2 | tenant_admin, security_officer |
Security and test flags
| Field | Value |
|---|---|
security.signedArtifactRequired | true |
security.sandboxRequired | true |
security.dynamicAuthorization | true |
security.auditRequired | true |
testFlags.sdkConformance | true |
testFlags.authorization | true |
testFlags.security | true |
Configuration
Properties of spec.configSchema, set by the administrator at install time:
| Name | Type | Constraints |
|---|---|---|
model_id | string | {"minLength": 3} |
mcp_servers | object | {"additionalProperties": {"additionalProperties": false, "properties": {"url": {"pattern": "^https?://", "type": "string"}}, "required": ["url"], "type": "object"}} |
Components
| Kind | Name | Version | Description | Details | Path |
|---|---|---|---|---|---|
| Agent | legal-assistant | 1.0.0 | Answers questions on contract records and prepares status changes for a human approval. | risk_level: limited, autonomy.level: supervised, tools tool:legal-search, tool:legal-update-status | packs/templates/legal/agents/legal-assistant.yaml |
| Subagent | legal-reviewer | 1.0.0 | Reviews a proposed contract status change against the rules before the human approval. | risk_level: minimal, autonomy.level: assisted, tools tool:legal-search | packs/templates/legal/subagents/legal-reviewer.yaml |
| Prompt | legal-summary | - | Summary of a contract record for a business user. | variables record_id, audience, language | packs/templates/legal/prompts/legal-summary.yaml |
| MCP server | legal-mcp | - | MCP server of the Legal pack (official MCP Python SDK, MIT licence). | transport: streamable_http, tools legal_search, legal_update_status | packs/templates/legal/mcp/servers/legal-mcp.yaml |
| MCP tool | legal-search | 1.0.0 | Search fictitious contract records through the pack MCP server. | action: read, scopes legal.contracts.read, risk_level: limited, requires_approval: false | packs/templates/legal/mcp/tools/legal-search.yaml |
| MCP tool | legal-update-status | 1.0.0 | Change the status of a fictitious contract record, idempotent, after a human approval. | action: write, scopes legal.contracts.write, risk_level: high, requires_approval: true | packs/templates/legal/mcp/tools/legal-update-status.yaml |
| Connector | legal-clm | 1.0.0 | clm connector of the Legal pack. Simulated on fictitious data until the tenant configures it. | system: clm, auth.type: api_key, scopes legal.contracts.read, legal.contracts.write | packs/templates/legal/connectors/legal-clm.yaml |
| Workflow | legal-status-change | - | Status change of a contract with a review and a four eyes approval. | steps search, review, approval, apply, on_failure: stop | packs/templates/legal/workflows/legal-status-change.yaml |
| Knowledge base | legal-knowledge | - | Knowledge base template of the Legal pack (fictitious documents). | classification: internal | packs/templates/legal/rag/config.yaml |
| Skill | legal-guidelines | 1.0.0 | How the Legal assistant handles contract records. | scopes legal.contracts.read, data_classification_max: confidential | packs/templates/legal/skills/legal-guidelines/SKILL.md |
Evaluations and tests
| Name | Type | Path | Threshold |
|---|---|---|---|
legal-answers | promptfoo | evaluations/promptfoo.yaml | 1.0 |
legal-retrieval | ragas | evaluations/ragas.jsonl | 0.8 |
| Kind | Path |
|---|---|
unit | tests/unit |
integration | tests/integration |
authz | tests/authz |
security | tests/security |
opa | policies/opa |
Files
| Kind | Path |
|---|---|
| Rules | packs/templates/legal/rules/legal-rules.md |
| Policies | packs/templates/legal/policies/opa/legal.rego, packs/templates/legal/policies/opa/legal_test.rego, packs/templates/legal/policies/openfga/model.fga, packs/templates/legal/policies/openfga/tests.fga.yaml |
| Observability | packs/templates/legal/observability/alerts/legal.yaml |
| Knowledge base documents | packs/templates/legal/rag/documents/guide.md |
Install it
Validate, build, sign and publish the pack, then install it from the Marketplace: the preflight checks the capabilities and the configuration before the installation.
enterprise-ai plugin validate packs/templates/legal
enterprise-ai plugin build packs/templates/legal --out /tmp/legal-dist
COSIGN_PASSWORD=... enterprise-ai plugin sign packs/templates/legal --out /tmp/legal-dist --key cosign.key --signer <publisher>
enterprise-ai plugin publish packs/templates/legal --out /tmp/legal-dist --key cosign.key \
--oci <registry>/packs/legal:1.0.0
cosign.key: signing key of your organization. <publisher>: publisher name registered in the Marketplace. <registry>: OCI registry of the Marketplace. Then call POST /v1/marketplace/preflight and POST /v1/marketplace/installations, see the Marketplace guide.