Skip to main content

Legal pack

Legal pack template, contract assistant on fictitious data with a simulated clm connector.

Reference​

FieldValue
Namelegal
Version1.0.0
LicenceMIT
TypeTemplate
formatpack
domainlegal
Categorylegal
namespaceenterprise-ai-packs
publisherEnterprise AI reference packs
ownerenterprise-ai-packs
compatibility.platform>=1.0.0 <2.0.0
compatibility.sdk>=1.0.0 <2.0.0
compatibility.runtimesnavin
dependenciesNone
Sourcepacks/templates/legal/plugin.yaml
Documentationpacks/templates/legal/docs/en/README.md, packs/templates/legal/docs/fr/README.md

Capabilities​

KindName
toollegal-search
toollegal-update-status
connectorlegal-clm
policylegal

Requested permissions​

The administrator grants a subset at install time; only the granted scopes are enforced.

ScopeSensitiveClassificationReason
legal.contracts.readNoconfidentialRead contract records to answer questions.
legal.contracts.writeYesconfidentialChange the status of a contract after a human approval.

Data protection​

FieldValue
classification_maxconfidential
piifalse
residencyeu-west-1
retention_days30
dlpmask
fictitious_datatrue
piiDetectionRequiredtrue
maskingPolicymask
externalExportDefaultdeny

Approvals​

Required for: install, upgrade, sensitivePermissions, production, externalExport, resume.

GateQuorumRoles
install1tenant_admin, security_officer
sensitive2tenant_admin, security_officer
production2tenant_admin, security_officer

Security and test flags​

FieldValue
security.signedArtifactRequiredtrue
security.sandboxRequiredtrue
security.dynamicAuthorizationtrue
security.auditRequiredtrue
testFlags.sdkConformancetrue
testFlags.authorizationtrue
testFlags.securitytrue

Configuration​

Properties of spec.configSchema, set by the administrator at install time:

NameTypeConstraints
model_idstring{"minLength": 3}
mcp_serversobject{"additionalProperties": {"additionalProperties": false, "properties": {"url": {"pattern": "^https?://", "type": "string"}}, "required": ["url"], "type": "object"}}

Components​

KindNameVersionDescriptionDetailsPath
Agentlegal-assistant1.0.0Answers 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-statuspacks/templates/legal/agents/legal-assistant.yaml
Subagentlegal-reviewer1.0.0Reviews a proposed contract status change against the rules before the human approval.risk_level: minimal, autonomy.level: assisted, tools tool:legal-searchpacks/templates/legal/subagents/legal-reviewer.yaml
Promptlegal-summary-Summary of a contract record for a business user.variables record_id, audience, languagepacks/templates/legal/prompts/legal-summary.yaml
MCP serverlegal-mcp-MCP server of the Legal pack (official MCP Python SDK, MIT licence).transport: streamable_http, tools legal_search, legal_update_statuspacks/templates/legal/mcp/servers/legal-mcp.yaml
MCP toollegal-search1.0.0Search fictitious contract records through the pack MCP server.action: read, scopes legal.contracts.read, risk_level: limited, requires_approval: falsepacks/templates/legal/mcp/tools/legal-search.yaml
MCP toollegal-update-status1.0.0Change the status of a fictitious contract record, idempotent, after a human approval.action: write, scopes legal.contracts.write, risk_level: high, requires_approval: truepacks/templates/legal/mcp/tools/legal-update-status.yaml
Connectorlegal-clm1.0.0clm 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.writepacks/templates/legal/connectors/legal-clm.yaml
Workflowlegal-status-change-Status change of a contract with a review and a four eyes approval.steps search, review, approval, apply, on_failure: stoppacks/templates/legal/workflows/legal-status-change.yaml
Knowledge baselegal-knowledge-Knowledge base template of the Legal pack (fictitious documents).classification: internalpacks/templates/legal/rag/config.yaml
Skilllegal-guidelines1.0.0How the Legal assistant handles contract records.scopes legal.contracts.read, data_classification_max: confidentialpacks/templates/legal/skills/legal-guidelines/SKILL.md

Evaluations and tests​

NameTypePathThreshold
legal-answerspromptfooevaluations/promptfoo.yaml1.0
legal-retrievalragasevaluations/ragas.jsonl0.8
KindPath
unittests/unit
integrationtests/integration
authztests/authz
securitytests/security
opapolicies/opa

Files​

KindPath
Rulespacks/templates/legal/rules/legal-rules.md
Policiespacks/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
Observabilitypacks/templates/legal/observability/alerts/legal.yaml
Knowledge base documentspacks/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.