consensus-persona-generator
INLINECODE0 is the entrypoint for evaluator diversity in the Consensus.Tools ecosystem.
What this skill does
- - creates N distinct decision personas (role, bias, risk posture, voting style)
- assigns initial reputation baselines for weighted arbitration (ongoing updates handled by consensus-persona-engine)
- persists a versioned
persona_set artifact to board state - reuses compatible persona sets when possible to reduce churn
Why this matters
Most agent pipelines fail because one model self-approves its own output. This skill injects structured disagreement first, so later guards operate over explicit multi-perspective review.
Ecosystem role
Stack position:
INLINECODE2
- - consensus-tools: board/job/submission ledger substrate
- consensus-interact: board-native orchestration contract
- persona-generator: lightweight multi-agent initialization layer
- persona-engine: reputation update and persona lifecycle state transition layer
Inputs / outputs (automation-friendly)
- - strict JSON input contract (
board_id, task_context, n_personas, etc.) - strict JSON output with
persona_set_id, personas[], and board write refs - deterministic/replayable behavior where feasible
Typical use cases
- - bootstrap evaluators for email/publish/support/merge/action guards
- regenerate persona cohorts by domain or risk profile
- establish reusable governance personas for long-running automation
Runtime, credentials, and network behavior
- - runtime binaries:
node, INLINECODE9 - network calls: none in shipped generator logic
- environment config read by this package:
CONSENSUS_STATE_FILE, INLINECODE11 - filesystem writes: board/state artifacts under the configured consensus state path
Dependency trust model
- -
consensus-guard-core is the first-party consensus runtime dependency for this package - versions are semver-pinned in
package.json for reproducible installs - this skill does not request host-wide privileges and does not mutate other skills
Install
CODEBLOCK0
Quick start
CODEBLOCK1
Tool-call integration
This skill is wired to the consensus-interact contract boundary (via shared consensus-guard-core wrappers where applicable):
- - readBoardPolicy
- getLatestPersonaSet / getPersonaSet
- writeArtifact / writeDecision
- idempotent decision lookup
This keeps board orchestration standardized across skills.
Invoke Contract
This skill exposes a canonical entrypoint:
INLINECODE15 initializes or reuses persona sets and executes board operations via shared guard-core wrappers. It does not perform ongoing reputation mutation; that belongs to consensus-persona-engine.
consensus-persona-generator
consensus-persona-generator 是 Consensus.Tools 生态系统中评估者多样性的入口点。
该技能的功能
- - 创建 N 个不同的决策角色(角色、偏见、风险偏好、投票风格)
- 为加权仲裁分配初始声誉基线(持续更新由 consensus-persona-engine 处理)
- 将带版本号的 persona_set 工件持久化到板状态
- 尽可能复用兼容的角色集以减少变更
重要性说明
大多数代理流水线失败的原因是单一模型自我批准其输出。该技能首先注入结构化分歧,使后续守卫能够基于明确的多视角审查进行操作。
生态系统角色
堆栈位置:
consensus-tools -> consensus-interact 模式 -> consensus-persona-generator -> 领域守卫 -> consensus-persona-engine
- - consensus-tools:板/任务/提交分类账底层
- consensus-interact:板原生编排合约
- persona-generator:轻量级多代理初始化层
- persona-engine:声誉更新和角色生命周期状态转换层
输入/输出(自动化友好)
- - 严格的 JSON 输入合约(boardid、taskcontext、npersonas 等)
- 严格的 JSON 输出,包含 personaset_id、personas[] 和板写入引用
- 在可行的情况下具有确定性/可重放行为
典型用例
- - 为邮件/发布/支持/合并/操作守卫引导评估者
- 按领域或风险配置文件重新生成角色队列
- 为长期运行的自动化建立可复用的治理角色
运行时、凭证和网络行为
- - 运行时二进制文件:node、tsx
- 网络调用:已发布的生成器逻辑中无网络调用
- 此包读取的环境配置:CONSENSUSSTATEFILE、CONSENSUSSTATEROOT
- 文件系统写入:配置的共识状态路径下的板/状态工件
依赖信任模型
- - consensus-guard-core 是此包的第一方共识运行时依赖
- 版本在 package.json 中使用 semver 固定以实现可重现安装
- 该技能不请求主机级权限,也不修改其他技能
安装
bash
npm i consensus-persona-generator
快速开始
bash
node --import tsx run.js --input ./examples/persona-input.json
工具调用集成
该技能连接到 consensus-interact 合约边界(在适用情况下通过共享的 consensus-guard-core 包装器):
- - readBoardPolicy
- getLatestPersonaSet / getPersonaSet
- writeArtifact / writeDecision
- 幂等决策查找
这使得板编排在各技能间保持标准化。
调用合约
该技能暴露一个规范入口点:
- - invoke(input, opts?) -> Promise
invoke() 初始化或复用角色集,并通过共享的 guard-core 包装器执行板操作。它不执行持续的声誉变更;这属于 consensus-persona-engine 的职责。