contract-template
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseContract Template Skill
合约模板Skill
Overview
概述
This skill enables creation of smart contract templates using Accord Project - an open-source framework for legally enforceable, machine-readable contracts. Create templates with embedded logic that can automate contract execution.
本Skill支持使用Accord Project(一个用于创建具备法律约束力、机器可读合约的开源框架)创建智能合约模板。你可以创建嵌入逻辑的模板,实现合约执行自动化。
How to Use
使用方法
- Describe the contract type and terms
- Specify variables and logic rules
- I'll generate Accord Project template
Example prompts:
- "Create an NDA template with variable terms"
- "Build a service agreement with payment milestones"
- "Generate a rental agreement template"
- "Design a consulting contract with termination clauses"
- 描述合约类型与条款
- 指定变量和逻辑规则
- 我将生成Accord Project模板
示例提示词:
- "创建带有可变条款的NDA模板"
- "构建包含付款里程碑的服务协议"
- "生成租赁协议模板"
- "设计带有终止条款的咨询合同"
Domain Knowledge
领域知识
Template Structure
模板结构
contract-template/
├── package.json # Metadata
├── grammar/
│ └── template.tem.md # Natural language template
├── model/
│ └── model.cto # Data model
├── logic/
│ └── logic.ergo # Business logic
└── text/
└── sample.md # Sample contractcontract-template/
├── package.json # 元数据
├── grammar/
│ └── template.tem.md # 自然语言模板
├── model/
│ └── model.cto # 数据模型
├── logic/
│ └── logic.ergo # 业务逻辑
└── text/
└── sample.md # 示例合约Template Syntax (TemplateMark)
模板语法(TemplateMark)
markdown
undefinedmarkdown
undefinedService Agreement
服务协议
This Agreement is made between [{supplier}] ("Supplier")
and [{buyer}] ("Buyer").
本协议由[{supplier}]("供应商")与[{buyer}]("买方")签订。
Services
服务内容
The Supplier agrees to provide [{serviceDescription}].
供应商同意提供[{serviceDescription}]。
Payment
付款条款
The Buyer shall pay [{paymentAmount}] within
[{paymentDays}] days of invoice.
买方需在发票开具后的[{paymentDays}]日内支付[{paymentAmount}]。
Term
协议期限
This Agreement begins on [{startDate as "MMMM DD, YYYY"}]
and continues for [{termMonths}] months.
{{#if latePenalty}}
本协议自[{startDate as "MMMM DD, YYYY"}]起生效,持续[{termMonths}]个月。
{{#if latePenalty}}
Late Payment
逾期付款
A penalty of [{penaltyPercent}]% applies to late payments.
{{/if}}
undefined逾期付款将收取[{penaltyPercent}]%的违约金。
{{/if}}
undefinedData Model (Concerto)
数据模型(Concerto)
cto
namespace org.example.service
import org.accordproject.time.*
asset ServiceAgreement extends Contract {
o String supplier
o String buyer
o String serviceDescription
o Double paymentAmount
o Integer paymentDays
o DateTime startDate
o Integer termMonths
o Boolean latePenalty optional
o Double penaltyPercent optional
}
transaction PaymentRequest {
o Double amount
o DateTime dueDate
}
transaction PaymentResponse {
o Double amount
o Double penalty
o DateTime paymentDue
}cto
namespace org.example.service
import org.accordproject.time.*
asset ServiceAgreement extends Contract {
o String supplier
o String buyer
o String serviceDescription
o Double paymentAmount
o Integer paymentDays
o DateTime startDate
o Integer termMonths
o Boolean latePenalty optional
o Double penaltyPercent optional
}
transaction PaymentRequest {
o Double amount
o DateTime dueDate
}
transaction PaymentResponse {
o Double amount
o Double penalty
o DateTime paymentDue
}Business Logic (Ergo)
业务逻辑(Ergo)
ergo
namespace org.example.service
import org.accordproject.time.*
contract ServiceContract over ServiceAgreement {
clause payment(request : PaymentRequest) : PaymentResponse {
let dueDate = addDuration(request.dueDate,
Duration{ amount: contract.paymentDays, unit: ~org.accordproject.time.TemporalUnit.days });
let penalty =
if contract.latePenalty
then request.amount * contract.penaltyPercent / 100.0
else 0.0;
return PaymentResponse{
amount: request.amount,
penalty: penalty,
paymentDue: dueDate
}
}
}ergo
namespace org.example.service
import org.accordproject.time.*
contract ServiceContract over ServiceAgreement {
clause payment(request : PaymentRequest) : PaymentResponse {
let dueDate = addDuration(request.dueDate,
Duration{ amount: contract.paymentDays, unit: ~org.accordproject.time.TemporalUnit.days });
let penalty =
if contract.latePenalty
then request.amount * contract.penaltyPercent / 100.0
else 0.0;
return PaymentResponse{
amount: request.amount,
penalty: penalty,
paymentDue: dueDate
}
}
}Using Cicero CLI
使用Cicero CLI
bash
undefinedbash
undefinedInstall
安装
npm install -g @accordproject/cicero-cli
npm install -g @accordproject/cicero-cli
Parse contract
解析合约
cicero parse --template ./contract-template --sample ./text/sample.md
cicero parse --template ./contract-template --sample ./text/sample.md
Execute logic
执行逻辑
cicero trigger --template ./contract-template
--sample ./text/sample.md
--request ./request.json
--sample ./text/sample.md
--request ./request.json
cicero trigger --template ./contract-template
--sample ./text/sample.md
--request ./request.json
--sample ./text/sample.md
--request ./request.json
Draft new contract
起草新合约
cicero draft --template ./contract-template --data ./data.json
undefinedcicero draft --template ./contract-template --data ./data.json
undefinedExample: NDA Template
示例:NDA模板
template.tem.md
template.tem.md
markdown
undefinedmarkdown
undefinedNon-Disclosure Agreement
保密协议
This Non-Disclosure Agreement ("Agreement") is entered into
as of [{effectiveDate as "MMMM DD, YYYY"}] by and between:
Disclosing Party: [{disclosingParty}]
Receiving Party: [{receivingParty}]
本保密协议("协议")由以下双方于[{effectiveDate as "MMMM DD, YYYY"}]签订:
披露方: [{disclosingParty}]
接收方: [{receivingParty}]
1. Confidential Information
1. 保密信息
"Confidential Information" means all non-public information
disclosed by the Disclosing Party, including but not limited to:
[{confidentialScope}].
"保密信息"指披露方披露的所有非公开信息,包括但不限于:[{confidentialScope}]。
2. Obligations
2. 义务
The Receiving Party agrees to:
- Maintain confidentiality for [{termYears}] years
- Use information only for [{permittedPurpose}]
- Not disclose to third parties without written consent
接收方同意:
- 对保密信息保密[{termYears}]年
- 仅为[{permittedPurpose}]使用该信息
- 未经书面同意,不得向第三方披露
3. Exclusions
3. 例外情况
This Agreement does not apply to information that:
{{#if hasExclusions}}
[{exclusions}]
{{else}}
- Is or becomes publicly available
- Was known prior to disclosure
- Is independently developed {{/if}}
本协议不适用于以下信息:
{{#if hasExclusions}}
[{exclusions}]
{{else}}
- 已公开或后续公开的信息
- 披露前已知的信息
- 独立开发的信息 {{/if}}
4. Return of Materials
4. 材料返还
Upon termination, the Receiving Party shall return or destroy
all Confidential Information within [{returnDays}] days.
协议终止后,接收方需在[{returnDays}]日内返还或销毁所有保密信息。
5. Remedies
5. 救济措施
{{#if monetaryPenalty}}
Breach of this Agreement shall result in liquidated damages
of [{penaltyAmount}].
{{else}}
The Disclosing Party shall be entitled to seek injunctive relief.
{{/if}}
SIGNATURES
Disclosing Party: ____________________
Date: ____________________
Receiving Party: ____________________
Date: ____________________
undefined{{#if monetaryPenalty}}
违反本协议将导致[{penaltyAmount}]的违约金。
{{else}}
披露方有权寻求禁令救济。
{{/if}}
签字
披露方:____________________
日期:____________________
接收方:____________________
日期:____________________
undefineddata.json
data.json
json
{
"effectiveDate": "2024-01-15",
"disclosingParty": "Tech Corp",
"receivingParty": "Consultant LLC",
"confidentialScope": "trade secrets, customer lists, and technical specifications",
"termYears": 3,
"permittedPurpose": "evaluating a potential business relationship",
"hasExclusions": false,
"returnDays": 30,
"monetaryPenalty": true,
"penaltyAmount": "$50,000"
}json
{
"effectiveDate": "2024-01-15",
"disclosingParty": "Tech Corp",
"receivingParty": "Consultant LLC",
"confidentialScope": "trade secrets, customer lists, and technical specifications",
"termYears": 3,
"permittedPurpose": "evaluating a potential business relationship",
"hasExclusions": false,
"returnDays": 30,
"monetaryPenalty": true,
"penaltyAmount": "$50,000"
}