policy-draft
Draft or tighten a Runx operational policy from a governance brief, then validate the exact runx.operational_policy.v1 contract with the native policy engine. Use for repository/source/runner/owner policy design, fail-closed policy linting, or authority attenuation; never use this lane to widen an existing policy.
- License 许可
- Apache-2.0
- 所属仓库
- runxhq/runx
- 最近更新
- 2026-11-09
- Stars
- ★ 103
- Forks
- 108
01 前言 Front Matter
- name
- policy-draft
- description
- Draft or tighten a Runx operational policy from a governance brief, then validate the exact runx.operational_policy.v1 contract with the native policy engine. Use for repository/source/runner/owner policy design, fail-closed policy linting, or authority attenuation; never use this lane to widen an existing policy.
02 资源文件 12
- 参考文档fixtures/composes-in-graph.yaml3.8 KB
- 参考文档fixtures/issue-flow-policy-from-brief.yaml5.5 KB
- 其他fixtures/support/composed.graph521 B
- 参考文档fixtures/tighten-existing-policy.yaml4.6 KB
- 参考文档fixtures/vague-brief-needs-input.yaml1.3 KB
- 资产文件mark.svg520 B
- 参考文档packets/proposal.v1.schema.json3.1 KB
- 脚本policy-draft.mjs10.2 KB
- 脚本policy-draft.test.mjs3.4 KB
- 参考文档references/catalog.md160 B
- 参考文档references/mark-license.md3.1 KB
- 参考文档run.yaml10.8 KB
03 SKILL.md 正文
Policy Draft
Produce one reviewable operational-policy proposal. Let the agent translate
intent into policy fields; let the native policy.lint tool decide whether the
exact in-memory result is a valid Runx policy.
Workflow
- Require concrete target repositories, source locators, owner routes, and an
available runner. Return
needs_inputwhen any are unresolved. - Draft the smallest
runx.operational_policy.v1that admits the stated work. Unspecified work remains denied. - When
existing_policyis supplied, preserve its target/source/runner set and only attenuate authority. Do not add locators, actions, targets, sources, or runners; do not lower confidence or weaken human gates. - Pass the draft to the deterministic validation step. Never author or trust an agent-supplied lint verdict.
- Native
data.comparechecks retained identity, provider/kind, owner routing, branch, dedupe and opaque adapter settings. Those settings must remain equal: this generic lane cannot infer whether changing them narrows authority. - Return
readyonly when native lint and that comparison pass. A native failure or attempted widening returnsrejectwith structured findings.
Native policy contract
Draft the exact contract consumed by policy.lint and the Runx policy parser:
schema: runx.operational_policy.v1
schema_version: runx.operational_policy.v1
policy_id: string
sources:
- source_id: string
provider: string
allowed_locators: [string]
allowed_actions: [string]
source_thread:
required: boolean
publish_mode: reply | comment | none
missing_behavior: fail_closed
minimum_confidence: number # optional
runners:
- runner_id: string
kind: string
state: available | unavailable
allowed_actions: [string]
target_repos: [owner/repo]
scafld_required: boolean
owner_routes:
- route_id: string
owners: [string]
target_repos: [owner/repo]
targets:
- repo: owner/repo
runner_ids: [string]
allowed_actions: [string]
default_owner_route: string
scafld_required: boolean
base_branch: string # optional
dedupe:
strategy: source_digest
key_fields: [string]
on_duplicate: reuse | comment | block
outcomes:
observe_provider: boolean
verification_required: boolean
close_source_issue: never | when_verified | always
publish_final_source_thread_update: boolean
permissions:
auto_merge: boolean
mutate_target_repo: boolean
require_human_merge_gate: boolean
Stop conditions
- Missing repository, locator, runner, or owner evidence:
needs_inputwithpolicy: null; native lint is not run. - Proposed widening of an existing policy:
rejectbefore lint and identify the widened path. - Native parse or validation failure:
reject; never relabel it as ready. - A request to widen authority: stop and route it to a separate explicit policy decision. This skill's existing-policy lane is attenuation-only.
Output
The final policy_proposal contains:
decision: ready | needs_input | reject
policy: object | null
validation:
status: pass | fail | not_run
engine: runx policy
findings: [{ code, path, message }]
readback: object | null
reason: string
rationale: string
blockers: [string]
needs_input: [string]
success_checkpoint: object
The host supplies the actual current native-valid baseline; this is not authority to replace a different installed policy. Existing sources, targets and runners may be removed or their declared action/target sets narrowed. Confidence, required review and verification cannot weaken; an unavailable runner cannot be enabled. Owner-route roster reordering is immaterial, but changing its membership or unknown provider settings needs a separate explicit policy decision.
The runtime receipt proves which draft was validated. It does not approve or install the policy.
Agent task contracts
policy-draft-draft
Draft one policy proposal using the exact runx.operational_policy.v1 contract described by the
skill. Return decision, policy, rationale, blockers, needs_input, and success_checkpoint. Do not
author a lint verdict: the next deterministic step invokes native policy.lint. If required
repos, source locators, owners, or runner bindings are missing, return needs_input with policy
null. When existing_policy is supplied, never add authority, targets, sources, runners,
locators, or actions; only tighten permissions, confidence, routing, and outcomes.
04 同仓库更多 Skills
webhook-handoff
Validate a runx execution context and deliver a governed payload once to an n8n Cloud workflow webhook or a Zapier Catch Hook, with exact approval and the receiver's acknowledgement receipted.
web-search
Discover a bounded set of fresh web source candidates from one explicit search query, preserve provider evidence and reported cost, and prepare source selection for fetching and research.
web-fetch
Fetch and extract one public web source, optionally restrict its hosts, and return the content by digest with full provenance.
vuln-triage
Prioritize actual exact-coordinate vulnerability findings, preserve unknown exposure and partial coverage, and return practical remediation or an unsent advisory draft.
Govern X (Twitter) account work through three lanes: evidence reads, typed act plans for posting and account hygiene, and gated execution with per-act provider evidence. Nothing reaches a live timeline or mutates an account without an explicit approval recorded in the receipt.
team-delegate
Divide bounded work across an operator-selected team and return exact member assignments with source context, scope ceilings and acceptance checks.