consensus-publish-guard
INLINECODE0 protects public-facing content before release.
What this skill does
- - reviews content drafts with persona consensus
- flags policy/legal/sensitive-risk patterns
- decides INLINECODE1
- emits rewrite patch when fixable
- persists decision artifacts to board state
Why this matters
Public content creates brand, legal, and trust exposure. Consensus review creates a safer publish gate than single-pass generation.
Ecosystem role
Uses deterministic logic from consensus-guard-core and existing persona inputs, persisted via consensus board primitives.
Good fit for
- - AI-assisted social/media pipelines
- product launch copy checks
- policy-sensitive communications
Runtime, credentials, and network behavior
- - runtime binaries:
node, INLINECODE4 - network calls: none in the guard decision path itself
- environment config read by this package:
CONSENSUS_STATE_FILE, INLINECODE6 - filesystem writes: board/state artifacts under the configured consensus state path
Dependency trust model
- -
consensus-guard-core is the first-party consensus package used in guard execution - 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 assumptions
This repository currently expects a local sibling checkout of consensus-guard-core.
CODEBLOCK0
Then install dependencies in this repo:
CODEBLOCK1
Install (registry)
CODEBLOCK2
Quick start
CODEBLOCK3
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:
INLINECODE11 starts the guard flow and executes deterministic policy evaluation with board operations via shared guard-core wrappers.
external_agent mode
Guards support two modes:
- -
mode="external_agent": caller supplies external_votes[] from agents/humans/models for deterministic aggregation. - INLINECODE14 : requires an existing
persona_set_id; guard will not generate persona sets internally.
consensus-publish-guard
consensus-publish-guard 在发布前保护面向公众的内容。
该技能的功能
- - 通过角色共识审查内容草稿
- 标记政策/法律/敏感风险模式
- 决定批准 | 阻止 | 重写
- 在可修复时输出重写补丁
- 将决策产物持久化到看板状态
为何重要
公开内容会带来品牌、法律和信任风险。共识审查比单次生成创建了更安全的发布关卡。
生态系统角色
使用来自consensus-guard-core的确定性逻辑和现有角色输入,通过共识看板原语进行持久化。
适用场景
- - AI辅助社交/媒体管道
- 产品发布文案检查
- 政策敏感型通信
运行时、凭证和网络行为
- - 运行时二进制文件:node、tsx
- 网络调用:守卫决策路径本身无网络调用
- 此包读取的环境配置:CONSENSUSSTATEFILE、CONSENSUSSTATEROOT
- 文件系统写入:配置的共识状态路径下的看板/状态产物
依赖信任模型
- - consensus-guard-core是守卫执行中使用的一方共识包
- 版本在package.json中使用语义化版本锁定,以实现可重现安装
- 此技能不请求主机级权限,也不修改其他技能
安装前提
此仓库当前期望本地同级目录中存在consensus-guard-core。
bash
从 repos/ 目录
repos/
consensus-guard-core/
consensus-publish-guard/
然后在此仓库中安装依赖:
bash
npm i
安装(注册表)
bash
npm i consensus-publish-guard
快速开始
bash
node --import tsx run.js --input ./examples/input.json
工具调用集成
此技能连接到共识交互合约边界(在适用处通过共享的consensus-guard-core包装器):
- - readBoardPolicy
- getLatestPersonaSet / getPersonaSet
- writeArtifact / writeDecision
- 幂等决策查找
这使得看板编排在各技能间保持标准化。
调用合约
此技能暴露一个规范入口点:
- - invoke(input, opts?) -> Promise
invoke()启动守卫流程,并通过共享的guard-core包装器执行带看板操作的确定性策略评估。
external_agent模式
守卫支持两种模式:
- - mode=externalagent:调用方提供来自代理/人类/模型的externalvotes[],用于确定性聚合。
- mode=persona:需要现有的personasetid;守卫不会在内部生成角色集。