Generate Constitution

SKILL开发
开发 未标注权限 许可证不明确

Derive technical development principles FROM user needs in product.md using evidence-based reasoning. Creates constitution.md with architecture decisions, tech stack choices, and development constraints - all traced back to specific user needs. Use when user mentions "technical principles", "constitution", "architecture decisions", or after creating product.md.

一句话选型结论

按资料字段整理

Generate Constitution是开发类的 Agent Skill,安装方式:GitHub 仓库,权限级别未标注,许可证不明确,没有现成安装命令,需按说明手动放置 SKILL.md。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类开发 安装方式GitHub 仓库 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 0 仓库 nextjs-intelligence-toolkit
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

GitHub 仓库
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    按安装说明或仓库 README,把 SKILL.md 放到客户端的 skills 目录(一般一个技能一个文件夹)。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

开发
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方yangsi7仓库 nextjs-intelligence-toolkit · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式GitHub 仓库安装包 yangsi7/nextjs-intelligence-toolkit
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 未标注
正文体量14.3 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
写代码与改 bug

按需求补代码、定位并修掉报错。

读仓库与生成改动

让模型读懂项目结构,再给出可落地的改动。

跑测试与排查故障

按现象排查问题,补测试用例并复跑。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 基础信息齐全,可以先按说明装一个试试。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有现成安装命令,要按安装说明或仓库 README 手动放置。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在开发场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
Generate Constitution当前 未标注权限 GitHub 仓库 未标注 未标注 无
技能审查员 浏览器控制 ClawHub 市场 877.9 万 OpenClaw 有
Vercel React 最佳实践 浏览器控制 GitHub 仓库 849.1 万 Codex、Claude、Cursor 有
GitHub 代码协作 联网访问 ClawHub 市场 763.3 万 OpenClaw 有
网页设计指南 联网访问 GitHub 仓库 668.6 万 Codex、Claude、Cursor 有
本体论 只读 ClawHub 市场 663.7 万 OpenClaw 有

SKILL.md 全文

14.3 KB
模型实际读到的说明书原文,来自技能仓库

@.claude/shared-imports/constitution.md
@.claude/shared-imports/CoD_Σ.md
@.claude/templates/product-constitution-template.md

Generate Constitution Skill

Overview

This skill creates constitution.md by deriving technical principles FROM user needs documented in product.md. Every technical decision must trace back to a specific user pain point, differentiator, or journey requirement.

Core Derivation Pattern:

User Need (product.md) ≫ Capability Required → Technical Approach ≫ Specific Constraint (constitution.md)

Announce at start: "I'm using the generate-constitution skill to derive technical principles from user needs in product.md."

Note: constitution.md CANNOT be created without product.md. All technical principles MUST derive from user needs. If product.md doesn't exist, use define-product skill first.


Quick Reference

Workflow Key Activities Output
Derivation Load product.md → Map user needs → Derive principles → Organize → Create derivation map constitution.md (v1.0.0)
Amendment Identify product.md changes → Update Articles → Bump version → Add history constitution.md (vX.Y.Z)
Validation Check derivation chains → Verify traceability → Validate classifications Quality report

Workflow Files

Detailed Workflows:
- @.claude/skills/generate-constitution/workflows/derivation-workflow.md - Steps 1-6: Create new constitution
- @.claude/skills/generate-constitution/workflows/amendment-workflow.md - Update constitution when product.md changes
- @.claude/skills/generate-constitution/workflows/validation-checks.md - Quality gates and quick tests

References:
- @.claude/skills/generate-constitution/references/anti-patterns.md - Common mistakes to avoid
- @.claude/skills/generate-constitution/references/failure-modes.md - 12 failure modes with fixes


Workflow Decision Tree

User Request?
├─ Creating new constitution? → Derivation Workflow
├─ Updating existing? → Amendment Workflow
└─ Validating? → Validation Checks

Derivation Workflow (Create New Constitution)

See: @.claude/skills/generate-constitution/workflows/derivation-workflow.md

Summary:

Step 1: Load Product Definition

Read product.md and extract:
- Persona pain points → NON-NEGOTIABLE efficiency principles
- "Our Thing" differentiator → NON-NEGOTIABLE core principles
- North Star metric → Performance and usage principles
- User journeys → Capability requirements

Step 2: Map User Needs to Technical Requirements

For each user need, apply derivation pattern:

User Need ≫ Capability → Technical Approach ≫ Constraint

Example:

product.md:Persona1:Pain1:118: "Manual copying wastes 2hr/week"
  ≫ Automated sync required
  → API integrations with refresh
  ≫ <15 minute data latency
→ Constitution Article: Real-Time Sync (<15min, NON-NEGOTIABLE)

Step 3: Derive Technical Principles

For each user need, create an Article with:
- User Need Evidence - product.md quote with line reference
- Technical Derivation (CoD^Σ) - Reasoning chain with operators
- Principle - Specific measurable constraint
- Rationale - Why this serves the user need
- Verification - How to validate compliance

Classification:
- NON-NEGOTIABLE - "Our Thing", core promises (breaks user promise if violated)
- SHOULD - Strong preferences (flexibility when justified)
- MAY - Options allowed (guidelines only)

Step 4: Organize by Category

Group principles into 7 standard Articles:
1. Architecture Patterns (microservices, event-driven, etc.)
2. Data & Integration (database, API, sync patterns)
3. Performance & Reliability (SLAs, latency, uptime)
4. Security & Privacy (auth, encryption, compliance)
5. User Experience (UI constraints, accessibility)
6. Development Process (testing, deployment, quality)
7. Scalability (growth constraints, capacity)

Priority within each: NON-NEGOTIABLE → SHOULD → MAY

Step 5: Create Derivation Map

Document traceability:

## Appendix: Constitution Derivation Map

| Article | Product.md Source | User Need | Technical Principle |
|---------|-------------------|-----------|---------------------|
| Article II | Persona1:Pain1:118 | Manual copying | <15min sync latency |
| Article III | OurThing:283 | Instant visibility | <2s dashboard load |

Enables: Tracing principles back, identifying orphans, validating coverage.

Step 6: Version & Metadata

---
version: 1.0.0
ratified: YYYY-MM-DD
derived_from: product.md (v1.0)
---

# Development Constitution

**Purpose**: Technical principles derived FROM user needs
**Amendment Process**: See Article VIII
**Derivation Evidence**: See Appendix

Amendment Workflow (Update Existing Constitution)

See: @.claude/skills/generate-constitution/workflows/amendment-workflow.md

Summary:

Trigger: product.md changes → constitution.md MUST update

Version Semantics:
- MAJOR (X.0.0): Article added/removed (architectural shift)
- MINOR (1.X.0): Article modified (principle change)
- PATCH (1.0.X): Formatting, typos, clarifications

Process:
1. Identify which user needs changed in product.md
2. Update affected Articles with new derivation chains
3. Bump version number (MAJOR/MINOR/PATCH)
4. Update ratified date
5. Update derivation map
6. Add amendment history entry with before/after

Amendment Entry Template:

### Version X.Y.Z - YYYY-MM-DD
**Changed**: Article III (Performance)
**Reason**: product.md North Star updated
**Before**: Dashboard <2s only
**After**: Dashboard <2s AND reports <10s
**Evidence**: product.md:NorthStar:line:15

Validation Checks

See: @.claude/skills/generate-constitution/workflows/validation-checks.md

Summary:

Quality Checklist (For Each Article)

  • [ ] Has explicit product.md reference (file:section:line)
  • [ ] User need quoted verbatim
  • [ ] CoD^Σ derivation chain documented
  • [ ] Principle is specific and measurable
  • [ ] Verification method defined
  • [ ] Classification clear (NON-NEGOTIABLE | SHOULD | MAY)

Overall Validation

  • [ ] No orphaned principles (all trace to user needs)
  • [ ] All "Our Thing" items have NON-NEGOTIABLE principles
  • [ ] All pain resolutions have technical support
  • [ ] Derivation map complete
  • [ ] Version metadata current

Quick Tests

  1. "Can I delete this without breaking a user promise?"
    - YES → Might not be needed
    - NO → Should be NON-NEGOTIABLE

  2. "Can I trace this to a specific user pain?"
    - YES → Good principle
    - NO → Remove it

  3. "Does this enable 'Our Thing'?"
    - YES → Upgrade to NON-NEGOTIABLE
    - NO → Evaluate if needed


Anti-Patterns

See: @.claude/skills/generate-constitution/references/anti-patterns.md

Summary of Common Mistakes:

  1. Tech preferences without user justification - "Use React because popular" → Derive from user need
  2. Over-constraining without evidence - "MUST use PostgreSQL only" → Constrain capability (ACID), not product
  3. Vague principles - "System should be performant" → Specific measurable criteria
  4. Missing derivation chains - State principle without CoD^Σ → Add full reasoning chain
  5. No verification method - Can't validate compliance → Define specific checks
  6. Orphaned principles - No connection to product.md → Remove or find user need

Failure Modes

See: @.claude/skills/generate-constitution/references/failure-modes.md

Summary of Top 12 Failures:

  1. Constitution created without product.md → STOP, create product.md first
  2. Technical preferences without CoD^Σ → Add derivation chain
  3. Orphaned principles → Trace to product.md or delete
  4. "Our Thing" not NON-NEGOTIABLE → Upgrade classification
  5. Over-constraining tech stack → Constrain capability, not product
  6. Missing verification methods → Define checks
  7. Amendment without version bump → Follow semantic versioning
  8. Derivation map incomplete → Add all Articles to map
  9. User needs not addressed → Add missing Articles
  10. Classification incorrect → Run 3 quick tests
  11. No amendment history → Add before/after entry
  12. Technical jargon in evidence → Fix product.md (boundary violation)

Example

Complete Constitution: See examples/b2b-saas-constitution.md

Shows:
- Full derivation chains with CoD^Σ reasoning
- 7 Articles (Architecture, Data, Performance, Security, UX, Development, Scalability)
- Complete derivation map tracing principles to product.md
- Amendment history example
- NON-NEGOTIABLE vs SHOULD classifications

Template: Use @.claude/templates/product-constitution-template.md


Key Reminders

  1. Every principle MUST trace to user need - No orphaned tech preferences
  2. "Our Thing" drives NON-NEGOTIABLE - Core differentiators are non-negotiable
  3. Use CoD^Σ for all derivations - Evidence chain required
  4. Version amendments - Track why principles change
  5. Validate bidirectionally - Product → Constitution AND Constitution → Product

Prerequisites

Before using this skill:
- ✅ product.md exists (REQUIRED - created by define-product skill)
- ✅ product.md has personas with pain points
- ✅ product.md has "Our Thing" (key differentiator)
- ✅ product.md has North Star metric
- ✅ product.md has user journeys
- ⚠️ Optional: Existing constitution.md to amend (will be versioned)
- ⚠️ Optional: @.claude/templates/product-constitution-template.md (for structure)

Note: constitution.md CANNOT be created without product.md. All technical principles MUST derive from user needs documented in product.md.


Dependencies

Depends On:
- define-product skill - MUST run before this skill (provides product.md)
- @.claude/shared-imports/CoD_Σ.md - For derivation chains and evidence traces
- product.md - Source of ALL user needs (critical input)

Integrates With:
- create-implementation-plan skill - Uses constitution.md for architecture decisions
- specify-feature skill - References constitution.md constraints in features
- /generate-constitution command - User-facing command that invokes this skill

Tool Dependencies:
- Read tool (to load product.md)
- Write tool (to create constitution.md)
- CoD^Σ operators (for derivation chains)


Next Steps

After constitution.md creation completes:

Main Development Flow:

generate-constitution (creates constitution.md)
    ↓ (manual invocation)
specify-feature (user runs /feature with feature idea)
    ↓ (references constitution.md constraints)
create-implementation-plan (tech stack FROM constitution)
    ↓ (automatic)
generate-tasks → /audit → /implement

Amendment Flow (when product.md changes):

product.md updated (personas, pain points, or differentiators changed)
    ↓ (manual invocation)
generate-constitution --amend (user runs /generate-constitution)
    ↓
constitution.md updated (version bumped, derivation map updated)
    ↓
Review affected features/plans for constitutional compliance

User Action Required:
- Review constitution.md for completeness and accuracy
- Validate all Articles have derivation chains to product.md
- Share constitution.md with team for alignment
- Use as guide for ALL technical decisions going forward

Outputs Modified:
- constitution.md - Technical principles derived from user needs (project root)
- Version number incremented if amending existing constitution
- Derivation map updated with all product.md traces

Commands:
- /generate-constitution - Create or amend constitution.md
- /feature - After constitution exists, create features with constitutional constraints
- /plan - After constitution exists, plans must comply with principles


Related Skills & Commands

Direct Integration:
- define-product skill - MUST run before this skill (provides product.md input)
- create-implementation-plan skill - Uses constitution.md for architecture decisions (successor)
- specify-feature skill - References constitution.md constraints in specifications
- /generate-constitution command - User-facing command that invokes this skill

Workflow Context:
- Position: Phase 2 of product development (after product.md, before features)
- Triggers: User mentions "technical principles", "constitution", OR after product.md created
- Output: constitution.md with technical principles derived FROM user needs

Constitution Chain:

User Context (define-product: product.md)
    ↓ (this skill derives technical principles)
Technical Principles (this skill: constitution.md)
    ↓ (guides all technical decisions)
Feature Specifications (specify-feature: spec.md with constitutional constraints)
    ↓
Implementation Plans (create-implementation-plan: tech stack FROM constitution)

Core Principle: ALL technical decisions derive from user needs. constitution.md is the bridge between user-centric product.md and technical implementation.

Quality Gates:
- Traceability: Every Article MUST trace to product.md (file:section:line)
- CoD^Σ Evidence: Every derivation MUST use Chain of Decisions operators
- Classification: NON-NEGOTIABLE for "Our Thing", SHOULD for preferences, MAY for flexibility
- Verification: Every Article MUST have verification method
- Derivation Map: Complete bidirectional traceability

Amendment Process: When product.md changes, re-run this skill to update constitution.md with version bump and amendment history.

Workflow Recommendation: Run this skill IMMEDIATELY after define-product to establish technical foundation before any feature development.


Version: 1.1.0
Last Updated: 2025-10-23
Change Log:
- v1.1.0 (2025-10-23): Refactored to progressive disclosure pattern (<500 lines)
- v1.0.0 (2025-10-22): Initial version

常见问题

5 问
答案由本站依据条目字段整理
Generate Constitution怎么安装?

没有现成安装命令:按安装说明或仓库 README,把 SKILL.md 放进客户端的 skills 目录(一般一个技能一个文件夹)。

Generate Constitution支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

Generate Constitution权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

Generate Constitution收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

Generate Constitution用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。