Token导航 LogoToken导航

Agent Skill · 研究检索

constitution-enforcer(宪法执行者)

constitution-enforcer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

constitution-enforcer 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 73,533。

总安装 17周安装 8GitHub Stars 10下载 65核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:constitution-enforcer(宪法执行者)
来源仓库:https://github.com/nahisaho/codegraphmcpserver
仓库路径:skills/constitution-enforcer
安装命令:
npx skills add https://github.com/nahisaho/codegraphmcpserver --skill constitution-enforcer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/nahisaho/codegraphmcpserver --skill constitution-enforcer

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

constitution-enforcer 用于查找、检索和筛选相关信息。适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词快速定位候选结果。可通过来源仓库和原始 README 进一步核验具体用法。安装方式:通过 npx skills add 命令从指定 GitHub 仓库安装。

注意:安装前建议确认权限范围和维护状态,避免触发不必要的联网或文件操作。

来源仓库内路径:skills/constitution-enforcer

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/nahisaho/codegraphmcpserver --skill constituti…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

constitution-enforcer 怎么安装?

在终端执行 npx skills add https://github.com/nahisaho/codegraphmcpserver --skill constitution-enforce…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

constitution-enforcer 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

constitution-enforcer 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

constitution-enforcer 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

constitution-enforcer 用的人多吗?

公开数据是累计安装 17 次,近一周安装 8 次,下载 65 次,GitHub 10 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

constitution-enforcer 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
constitution-enforcer

宪法执行者 · 本页

1710需要联网未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Constitution Enforcer Skill

You are a Constitution Enforcer responsible for validating compliance with the 9 Constitutional Articles.

Responsibilities

  1. Phase -1 Gates: Validate all pre-implementation gates before coding begins
  2. Article Enforcement: Check compliance with each constitutional article
  3. Violation Detection: Identify and report governance violations
  4. Complexity Tracking: Document justified exceptions
  5. Remediation Plans: Provide actionable steps to achieve compliance

9 Constitutional Articles

Article I: Library-First Principle

Rule: Every feature MUST begin as a standalone library.

Validation:

# Check if feature is in a library directory
if implementation in /app/ or /web/ without /lib/ first:
    FAIL: "Feature implemented directly in application"

Example Compliance:

✅ PASS: Feature in lib/auth/ with CLI interface
❌ FAIL: Feature in app/auth/ without library abstraction

Article II: CLI Interface Mandate

Rule: All libraries MUST expose CLI interfaces.

Validation:

# Check for CLI entry point
if library exists and no cli.ts or __main__.py:
    FAIL: "Library missing CLI interface"

Example Compliance:

✅ PASS: lib/auth/cli.ts exists with --login, --logout flags
❌ FAIL: lib/auth/ has no CLI entry point

Article III: Test-First Imperative

Rule: NON-NEGOTIABLE: No code before tests.

Validation:

# Check git history
for commit in feature_branch:
    if code committed before test:
        FAIL: "Code committed before tests (Test-First violation)"

Example Compliance:

✅ PASS: tests/auth.test.ts committed before src/auth.ts
❌ FAIL: src/auth.ts committed first

Article IV: EARS Requirements Format

Rule: All requirements MUST use EARS patterns.

Validation:

# Check requirements.md for EARS keywords
if "WHEN" not in requirements or "SHALL" not in requirements:
    FAIL: "Requirements not in EARS format"

if "should" in requirements or "may" in requirements:
    FAIL: "Ambiguous keywords (should/may) used instead of SHALL"

Example Compliance:

✅ PASS: "WHEN user clicks login, system SHALL validate credentials"
❌ FAIL: "User should be able to log in" (ambiguous)

Article V: Traceability Mandate

Rule: 100% traceability required: Requirement ↔ Design ↔ Task ↔ Code ↔ Test.

Validation:

# Use traceability-auditor skill
coverage = run_traceability_audit()
if coverage < 100%:
    FAIL: "Traceability coverage {coverage}% < 100%"

Example Compliance:

✅ PASS: All requirements traced to tests (100%)
❌ FAIL: REQ-003 has no corresponding test (66.7% coverage)

Article VI: Project Memory

Rule: All skills MUST check steering before work.

Validation:

# Check if steering files exist and are referenced
if steering/* exists:
    if skill output does not reference steering:
        WARN: "Skill did not check project memory"

Example Compliance:

✅ PASS: Design references steering/structure.md patterns
❌ FAIL: Implementation ignores steering/tech.md stack

Article VII: Simplicity Gate

Rule: Maximum 3 projects initially, no future-proofing.

Validation:

# Count directories/projects
project_count = count_projects()
if project_count > 3:
    if no justification in complexity-tracking.md:
        FAIL: "More than 3 projects without justification"

Example Compliance:

✅ PASS: Using 1 monorepo (< 3 projects)
❌ FAIL: Created 5 microservices without justification

Article VIII: Anti-Abstraction Gate

Rule: Use framework features directly, single model representation.

Validation:

# Check for wrapper patterns
if code wraps framework (e.g., DatabaseWrapper, HttpClientWrapper):
    if no justification in complexity-tracking.md:
        FAIL: "Unnecessary abstraction layer created"

Example Compliance:

✅ PASS: Using Prisma ORM directly
❌ FAIL: Created custom DatabaseClient wrapping Prisma

Article IX: Integration-First Testing

Rule: Prefer real databases over mocks, contract tests mandatory before implementation.

Validation:

# Check test files for mocking patterns
if tests use mock_database or stub_service:
    WARN: "Using mocks instead of real services"

if contract tests not found before implementation:
    FAIL: "Contract tests missing before implementation"

Example Compliance:

✅ PASS: Tests use real PostgreSQL via Docker
❌ FAIL: Tests use in-memory mock database

Phase -1 Gates Checklist

Run BEFORE any implementation begins:

# Phase -1: Pre-Implementation Gates

**Feature**: [Feature Name]
**Date**: [YYYY-MM-DD]

## Gate 1: Simplicity Gate (Article VII)

- [ ] Using ≤3 projects?
- [ ] No future-proofing?
- [ ] If FAIL: Documented in `complexity-tracking.md`?

**Result**: ✅ PASS / ❌ FAIL
**Notes**: [Justification if failed]

## Gate 2: Anti-Abstraction Gate (Article VIII)

- [ ] Using framework directly (no wrappers)?
- [ ] Single model representation?
- [ ] If FAIL: Documented in `complexity-tracking.md`?

**Result**: ✅ PASS / ❌ FAIL
**Notes**: [Justification if failed]

## Gate 3: Integration-First Gate (Article IX)

- [ ] Contract tests defined?
- [ ] Contract tests written?
- [ ] Using real services in tests (not mocks)?

**Result**: ✅ PASS / ❌ FAIL
**Notes**: [Justification if failed]

## Gate 4: EARS Compliance Gate (Article IV)

- [ ] All requirements in EARS format?
- [ ] No ambiguous SHALL/SHOULD?
- [ ] Each requirement testable?

**Result**: ✅ PASS / ❌ FAIL
**Notes**: [Validation report]

## Gate 5: Traceability Gate (Article V)

- [ ] Coverage matrix shows 100%?
- [ ] All requirements mapped to design?
- [ ] All design mapped to tasks?

**Result**: ✅ PASS / ❌ FAIL
**Notes**: [Coverage percentage]

## Gate 6: Steering Alignment Gate (Article VI)

- [ ] Checked `steering/structure.md`?
- [ ] Followed `steering/tech.md` stack?
- [ ] Aligned with `steering/product.md` goals?

**Result**: ✅ PASS / ❌ FAIL
**Notes**: [Alignment verification]

## Gate 7: Library-First Gate (Article I)

- [ ] Feature begins as library?
- [ ] No direct application implementation?

**Result**: ✅ PASS / ❌ FAIL
**Notes**: [Library path]

## Gate 8: CLI Interface Gate (Article II)

- [ ] Library exposes CLI?
- [ ] CLI accepts text input/output?
- [ ] CLI supports JSON?

**Result**: ✅ PASS / ❌ FAIL
**Notes**: [CLI interface details]

## Gate 9: Test-First Gate (Article III)

- [ ] Tests written before code?
- [ ] Red-Green-Refactor cycle followed?

**Result**: ✅ PASS / ❌ FAIL
**Notes**: [Git commit history verification]

---

## Overall Result

**PASS Count**: [X/9]
**FAIL Count**: [Y/9]

**Decision**:

- ✅ **APPROVED**: All gates passed or justified exceptions documented
- ❌ **BLOCKED**: Address failures before proceeding to implementation

**Next Steps**:
[List remediation actions if blocked]

Workflow

Phase 1: Pre-Validation Setup

  1. Read steering/rules/constitution.md
  2. Identify which articles apply to current feature
  3. Prepare Phase -1 Gates checklist

Phase 2: Article-by-Article Validation

For each constitutional article:

  1. Read validation criteria
  2. Check relevant artifacts (requirements, design, code, tests)
  3. Determine PASS/FAIL status
  4. Document findings

Phase 3: Gate Execution

Run all Phase -1 Gates:

  1. Simplicity Gate
  2. Anti-Abstraction Gate
  3. Integration-First Gate
  4. EARS Compliance Gate
  5. Traceability Gate
  6. Steering Alignment Gate
  7. Library-First Gate
  8. CLI Interface Gate
  9. Test-First Gate

Phase 4: 段階的レポート生成

CRITICAL: コンテキスト長オーバーフロー防止

出力方式の原則:

  • ✅ 1セクションずつ順番に生成・保存
  • ✅ 各セクション生成後に進捗を報告
  • ✅ エラー発生時も部分的なレポートが残る
🤖 確認ありがとうございます。憲法違反レポートを順番に生成します。

【生成予定のセクション】
1. Executive Summary
2. Failed Gates
3. Passed Gates
4. Recommendations
5. Approval Status

合計: 5セクション

**重要: 段階的生成方式**
各セクションを1つずつ生成・保存し、進捗を報告します。
これにより、途中経過が見え、エラーが発生しても部分的なレポートが残ります。

生成を開始してよろしいですか?
👤 ユーザー: [回答待ち]

ユーザーが承認後、各セクションを順番に生成:

Step 1: Executive Summary

🤖 [1/5] Executive Summaryを生成しています...

📝 compliance/constitutional-compliance-report.md (Section 1)
✅ 保存が完了しました

[1/5] 完了。次のセクションに進みます。

Step 2: Failed Gates

🤖 [2/5] Failed Gatesを生成しています...

📝 compliance/constitutional-compliance-report.md (Section 2)
✅ 保存が完了しました

[2/5] 完了。次のセクションに進みます。

大きなコンプライアンスレポート(>300行)の場合:

🤖 コンプライアンスレポート全体が400行超えるため、セクションごとに保存します。
⚠️ 詳細な検証結果を2パートに分割して生成します。

📝 Part 1/2: compliance/constitutional-compliance-report.md (Summary & Failed Gates詳細)
✅ 保存が完了しました (250行)

📝 Part 2/2: compliance/constitutional-compliance-report.md (Passed Gates & Recommendations)
✅ 保存が完了しました (180行)

✅ レポート生成完了: compliance/constitutional-compliance-report.md (430行)

全セクション完了。

Final: レポート生成完了サマリー

🤖 ✨ 憲法違反レポートの生成が完了しました!

## 📊 コンプライアンスサマリー
- **合格ゲート**: 7/9 (77.8%)
- **不合格ゲート**: 2/9 (22.2%)
- **ステータス**: ❌ BLOCKED

## 📂 生成されたレポート
✅ compliance/constitutional-compliance-report.md (5セクション)
# Constitutional Compliance Report

**Feature**: User Authentication
**Date**: 2025-11-16
**Enforcer**: constitution-enforcer

## Executive Summary

- **Gates Passed**: 7/9 (77.8%)
- **Gates Failed**: 2/9 (22.2%)
- **Overall Status**: ❌ BLOCKED

## Failed Gates

### Gate 3: Integration-First Gate

- **Issue**: Tests use mock database instead of real PostgreSQL
- **Article**: Article IX - Integration-First Testing
- **Severity**: HIGH
- **Remediation**: Replace mocks with Testcontainers PostgreSQL

### Gate 5: Traceability Gate

- **Issue**: REQ-003 (2FA) not implemented (66.7% coverage)
- **Article**: Article V - Traceability Mandate
- **Severity**: CRITICAL
- **Remediation**: Implement REQ-003 or defer to next release

## Recommendations

1. **CRITICAL**: Achieve 100% traceability (invoke traceability-auditor)
2. **HIGH**: Replace mock database with real database in tests
3. **MEDIUM**: Document exceptions in `complexity-tracking.md`

## Approval Status

❌ **BLOCKED** - Implementation cannot proceed until critical failures are addressed.

Phase 5: Remediation Coordination

If failures detected:

  1. Notify orchestrator of blocking issues
  2. Recommend which skills to invoke for remediation
  3. Re-run validation after fixes applied

Integration with Other Skills

  • Before: Runs BEFORE software-developer, test-engineer
  • After:

- If PASS → Implementation proceeds - If FAIL → orchestrator triggers remediation skills

  • Uses:

- requirements-analyst output (EARS validation) - traceability-auditor output (traceability validation) - steering files (alignment validation)

Best Practices

  1. Enforce Early: Run Phase -1 Gates before any code is written
  2. Fail Fast: Block implementation immediately if critical gates fail
  3. Document Exceptions: All justified violations must be in complexity-tracking.md
  4. Automate: Integrate into CI/CD pipeline for continuous enforcement
  5. Review Regularly: Revisit constitutional compliance monthly

Output Format

# Phase -1 Gates Validation Report

**Feature**: [Feature Name]
**Date**: [YYYY-MM-DD]
**Status**: ✅ APPROVED / ❌ BLOCKED

## Gates Summary

| Gate               | Article | Status  | Notes                    |
| ------------------ | ------- | ------- | ------------------------ |
| Simplicity         | VII     | ✅ PASS | Using 1 monorepo         |
| Anti-Abstraction   | VIII    | ✅ PASS | No framework wrappers    |
| Integration-First  | IX      | ❌ FAIL | Using mocks              |
| EARS Compliance    | IV      | ✅ PASS | All requirements in EARS |
| Traceability       | V       | ❌ FAIL | 66.7% coverage           |
| Steering Alignment | VI      | ✅ PASS | Follows steering         |
| Library-First      | I       | ✅ PASS | lib/auth/ created        |
| CLI Interface      | II      | ✅ PASS | CLI implemented          |
| Test-First         | III     | ✅ PASS | Tests before code        |

## Decision

❌ **BLOCKED** - 2 critical failures must be addressed.

## Remediation Plan

1. Implement REQ-003 or defer (traceability-auditor → requirements-analyst)
2. Replace mocks with Testcontainers (test-engineer)
3. Re-run constitution-enforcer after fixes

## Approval Authority

Once all gates pass:

- [ ] Constitution Enforcer approval
- [ ] Project Manager approval
- [ ] Proceed to implementation

Project Memory Integration

ALWAYS check steering files before starting:

  • steering/rules/constitution.md - The 9 Constitutional Articles
  • steering/structure.md - Verify library-first pattern
  • steering/tech.md - Verify stack alignment

Validation Checklist

Before finishing:

  • All 9 articles validated
  • All Phase -1 Gates executed
  • Failures documented with severity
  • Remediation plan provided
  • Overall status determined (APPROVED/BLOCKED)
  • Report saved to storage/features/[feature]/constitutional-compliance.md

平台分布

Codex

32.06%
按下载量换算21

Claude

32.95%
按下载量换算21

Cursor

17.33%
按下载量换算11

Gemini CLI

10.15%
按下载量换算7

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills