consensus-code-merge-guard
INLINECODE0 turns code merge approval into a governed, auditable decision.
What this skill does
- - consumes PR/change summary input
- runs persona-weighted vote arbitration
- enforces hard constraints (e.g., tests/security flags)
- maps to engineering decision states: INLINECODE1
- writes decision and updated persona artifacts to board state
Why this matters
CI passing does not guarantee risk-aware merge quality. Consensus review reduces silent failure propagation into production.
Ecosystem role
Uses the same consensus substrate as other guards, enabling cross-domain governance with comparable metrics.
Useful for
- - autonomous or semi-autonomous merge pipelines
- high-risk repos needing policy checks
- repeatable release governance with artifact history
Runtime, credentials, and network behavior
- - runtime binaries:
node, INLINECODE3 - network calls: none in the guard decision path itself
- 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 (registry)
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:
INLINECODE7 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. - INLINECODE10 : requires an existing
persona_set_id; guard will not generate persona sets internally.
consensus-code-merge-guard
consensus-code-merge-guard 将代码合并审批转变为可治理、可审计的决策过程。
该技能的功能
- - 接收PR/变更摘要输入
- 运行角色加权投票仲裁
- 强制执行硬性约束(如测试/安全标志)
- 映射到工程决策状态:MERGE | BLOCK | REVISE
- 将决策和更新的角色工件写入看板状态
为何重要
CI通过并不能保证风险感知的合并质量。共识审查可减少静默故障传播到生产环境。
生态系统角色
使用与其他防护相同的共识基础,通过可比较的指标实现跨域治理。
适用场景
- - 自主或半自主合并流水线
- 需要策略检查的高风险仓库
- 具有工件历史记录的可重复发布治理
运行时、凭证和网络行为
- - 运行时二进制文件:node、tsx
- 网络调用:防护决策路径本身无网络调用
- 文件系统写入:在配置的共识状态路径下的看板/状态工件
依赖信任模型
- - consensus-guard-core 是防护执行中使用的一方共识包
- 版本在 package.json 中使用 semver 锁定以实现可重现安装
- 该技能不请求主机级权限,也不修改其他技能
安装(注册)
bash
npm i consensus-code-merge-guard
快速开始
bash
node --import tsx run.js --input ./examples/input.json
工具调用集成
该技能通过共享的 consensus-guard-core 包装器(适用时)连接到共识交互合约边界:
- - readBoardPolicy
- getLatestPersonaSet / getPersonaSet
- writeArtifact / writeDecision
- 幂等决策查找
这使看板编排在各技能间保持标准化。
调用合约
该技能暴露一个规范入口点:
- - invoke(input, opts?) -> Promise
invoke() 启动防护流程,并通过共享的防护核心包装器执行带有看板操作的确定性策略评估。
external_agent 模式
防护支持两种模式:
- - mode=externalagent:调用者提供来自代理/人类/模型的 externalvotes[] 用于确定性聚合。
- mode=persona:需要现有的 personasetid;防护不会在内部生成角色集。