constraint-charter

Solid

Persists Uncle Bob's "don't read the code" audit goals, gates, and numeric constraints as a versioned Constraint Charter (GATES.md), settled via grilling and wired into pre-commit/CI so correctness without reading code is part of the software itself. Use when the user says 约束宪章, constraint charter, 把约束固化下来, 立宪, 门禁写进仓库, wants Uncle Bob-style gates as a committed project artifact, or is onboarding a project for agent development under constraints.

AI & Automation 8 stars 3 forks Updated yesterday Apache-2.0

Install

View on GitHub

Quality Score: 82/100

Stars 20%
32
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
91
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 约束宪章 (Constraint Charter) > "What I do instead is to surround the agents with extreme constraints." — Robert C. Martin, Jul 2026 `dont-read-the-code`(或不读代码协议)是立场,`verification-gauntlet` 是单次执行的引擎;本技能是**持久化层**:把审计目标与约束写成仓库里一份受版本控制的宪章文件,让门禁跨任务、跨会话、跨 agent 存续。约束不是聊天记录里的口头协议,而是软件本身的一部分。 **宪章文件**:`GATES.md`,置于仓库根(或用户指定处),提交入库。它是 agent 开工前必读、人类合并时唯一需要读的裁决依据。 ## Agent discipline 歧义仅问改查证路径者;已述/已决不重问;可自证则推进;须裁断则一次一问。立宪阶段的决策题必须一次一问、附推荐答案。 ## 工作流 ### 1. 立宪 — grilling 式拷问(阻塞,先于任何代码) 用 `grilling` 的方式**一次只问一个问题**、每题附推荐答案,逐条确立下列决策。事实自己查(语言、工具链、现有 CI),**决策必须交用户拍板**: - **审计目标**:这个软件"正确"由什么裁决?哪些路径是钱/安全/合规敏感路径(QA 详审级)? - **验收语言**:Gherkin 场景用什么领域词汇(词汇未定先跑 `domain-modeling`)。 - **数值约束**,逐项确认阈值——每条约束必须是**工具强制执行的数字**,"写干净点"不是约束: - 圈复杂度上限(每���数) - 模块大小上限(行数 / 公共接口宽度,深模块词汇见 `codebase-design`) - 依赖方向(violations = build failure) - 覆盖率下限、变异分数下限(mutation score,这是"测试的测试",是敢不读单测的依据) - **读/不读矩阵**的项目级例外(默认:实现与单元测试不读;Gherkin / QA / 指标报告读)。 - **已知不测清单**:明确说出哪些东西有意不测、为什么。 ### 2. 落章 — 写 GATES.md 宪章固定五节,全部可裁决、无形容词: 1. **审计目标** — 正确性的裁决者;敏感路径清单及其审查级别。 2. **约束表** — `约束 | 阈值 | 强制工具 | 强制位置(pre-commit/CI)` 四列,一行一门禁。 3. **验收入口** — Gherkin 场景存放路径 + 人类必须评审/共同撰写的声明。 4. **已知不测清单** — 有意留白之处,逐条注明理由。 5. **修宪记录** — 每次阈值变更:日期、旧值→新值、决策人、理由。 可选:同时落盘 `GATES.template.md` 仅当用户要求模板可复用。 ### 3. 接线 — 宪章即执行 宪章里的每一行约束表都必须接到工具(`setup-pre-commit` + CI)。**写在宪章里但没有工具强制的约束,视为宪章缺陷**,与门禁红灯同级处理。靠人记得去跑的门禁不是门禁,是侥幸。 ### 4. 运行 — 日常开发 - 每个任务开工前,agent 读 `GATES.md`;任务级门禁执行走 `verification-gauntlet`。 - 门禁红灯:把失败输出和数字**原样**递给 agent...

Details

Author
ontology-of-everything
Repository
ontology-of-everything/SemanticSkills
Created
3 months ago
Last Updated
yesterday
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

goal-charter

为规格已冻结的施工编写 goal 执行章程,锁定目标、验证器、边界、自愈清单和启动参数。触发:写 goal 章程、定义自主执行边界、把施工/提交/部署/测试交给 goal 闭环。设计用 lightweight-design,用例用 test-case-design,总控用 task-control-doc。

6 Updated 2 weeks ago
BackToCimaCoppi
AI & Automation Listed

gating-work-before-speed

在 git 仓库里写任何实现代码之前必须先跑(包括 TDD 等方法论 skill 接管写法之前——本门禁决定能不能开工、在哪开工,然后交棒)。触发���任何加功能/实现/改代码/帮我做个X的请求,尤其是"直接开干、顺手提交、写完就提交"(打包授权正是需要拆开的东西)。动手前过五问(契约/数据源/改哪层/怎么证明/禁止事项),锁���正式仓库分支基线,commit→push→MR 逐级授权;改到共享代码立即暂停上报。/ MUST run BEFORE writing any implementation code in a git repository — this gate decides whether and where work may start, then hands off to methodology skills. Front-loads the five-question gate, battlefield lock (repo/branch/baseline), and the commit→push→MR authorization ladder so AI speed never outruns boundary confirmation.

0 Updated 3 weeks ago
zhaiby-web
AI & Automation Listed

dual-gates

声明闸+查询闸 双闸落地(正式定稿版)。前置意图定性路由:通道①意图硬路由(信号真源 trigger_signals.json:安全S-DANGER-CMD/问题S-PROBLEM-GATE)→ is_danger/is_problem + must_pull 机械指令不经裁量;通道②严格2字词根白名单、词语边界匹配、无黑名单 → 命中才进查询闸做会话锚点定向溯源检索,只输出原始数据+溯源元信息,推理/有效性/废弃判定/打分全部后置下游推理层。杜绝无脑全量grep扫描。触发:/dual-gates、声明闸、查询闸、数据源检索前置判定、评估基准/方案/源码/历史记录读取前置路由。

0 Updated 1 weeks ago
xu-jin-cs