360 Secure SkillHub
360 安全技能中心

consensus-code-merge-guard

面向 AI 辅助工程的合并治理 Skill:读取 PR/变更摘要,执行 persona 加权投票仲裁,强制测试与安全等硬约束,输出 MERGE、BLOCK 或 REVISE 决策,并把决策与 persona 产物写入 board 状态,形成可审计的合并审批记录。

kaicianflone
kaicianflone
热度 62.77
最近更新 2026-05-11 17:27:32
分类:开发依赖:代码执行 / 读写文件应用场景:代码审查 / 工作流 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add consensus-code-merge-guard
Metadata
name
consensus-code-merge-guard
description
Persona-weighted merge governance for AI-assisted engineering. Evaluates PR risk (tests, security markers, reliability signals), returns MERGE/BLOCK/REVISE decisions, and records board-native audit artifacts.
version
1.1.14
homepage
https://github.com/kaicianflone/consensus-code-merge-guard
source
https://github.com/kaicianflone/consensus-code-merge-guard
upstream
{"consensus-guard-core":"https://github.com/kaicianflone/consensus-guard-core"}
requires
{"bins":["node","tsx"],"env":["CONSENSUS_STATE_FILE","CONSENSUS_STATE_ROOT"]}
metadata
{"openclaw":{"requires":{"bins":["node","tsx"],"env":["CONSENSUS_STATE_FILE","CONSENSUS_STATE_ROOT"]},"install":[{"kind":"node","package":"consensus-code-merge-guard"}]}}

consensus-code-merge-guard

consensus-code-merge-guard 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: MERGE | BLOCK | REVISE
  • 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, tsx
  • 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)

npm i consensus-code-merge-guard

Quick start

node --import tsx run.js --input ./examples/input.json

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:

  • invoke(input, opts?) -> Promise<OutputJson | ErrorJson>

invoke() 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.
  • mode="persona": requires an existing persona_set_id; guard will not generate persona sets internally.