一键导入
speckit-constitution
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Use when starting work on any project (technical or non-technical) to understand structure, standards, and best practices before making changes
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Apply the code-quality checklist to audit files or directories and produce a Markdown report with findings and suggested fixes. Use when asked to "audit these files", "run a quality check", "code quality review", or "check against the code-quality checklist".
Generate a structured deep research prompt. USE WHEN the user needs to research a complex topic, market, or bug deeply. Capabilities include objective clarification, tech stack validation, and prompt generation.
Use for go-to-market strategy, user acquisition, channel analysis, and performance marketing.
Generate documentation for an existing project. USE WHEN onboarded to a new codebase OR documenting legacy code. Capabilities include architectural mapping, tech stack inventory, and technical debt documentation.
| name | speckit-constitution |
| description | Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync |
Create or update the project constitution - a set of non-negotiable principles and standards that govern all specifications, plans, and implementations in the project.
The constitution (specify/memory/constitution.md) defines:
.specify/ directory structure (created by setup scripts)When constitution updates:
All execution logic is now contained within this skill. The skill handles:
.specify/memory/constitution.md# Project Constitution
## Core Principles
### Architecture
- [MUST] Use microservices pattern for backend services
- [SHOULD] Prefer REST over GraphQL for public APIs
### Security
- [MUST] All data encrypted at rest and in transit
- [MUST] Authentication required for all protected resources
- [SHOULD] Use OAuth2 for third-party integrations
### Quality
- [MUST] All code must pass linting before commit
- [MUST] Test coverage ≥80% for all new code
- [SHOULD] Performance budgets defined for critical paths
### Technology Constraints
- [MUST] Use TypeScript (no JavaScript)
- [MUST] PostgreSQL for relational data
- [FORBIDDEN] MongoDB, MySQL (use PostgreSQL instead)
### Documentation
- [MUST] All public APIs have OpenAPI specs
- [SHOULD] All components have README files
- [SHOULD] Architecture decisions recorded in ADRs
## Quality Gates
### Specification Phase
- [ ] No implementation details in spec.md
- [ ] All success criteria measurable
- [ ] All user stories have acceptance criteria
### Planning Phase
- [ ] All design decisions documented in research.md
- [ ] Constitution compliance validated
- [ ] Data model complete
### Implementation Phase
- [ ] All tests pass
- [ ] Linting clean
- [ ] Code review approved
If user doesn't provide full constitution, ask:
Provide options with recommendations for each.
Constitution is ready when:
.specify/memory/
└── constitution.md # Project constitution
Updated templates:
- .specify/templates/spec-template.md
- .specify/templates/plan-template.md
- .specify/templates/tasks-template.md
- .specify/templates/checklist-template.md
Wrong: 50 MUST requirements (impossible to enforce) Right: 5-10 critical MUST requirements, rest are SHOULD
Wrong: "Code should be clean and maintainable" Right: "All functions <50 lines, test coverage ≥80%, ESLint clean"
Wrong: "MUST use PostgreSQL" (why?) Right: "MUST use PostgreSQL (team expertise, ACID guarantees required, proven scale)"
Wrong: "MUST use microservices" + "MUST deploy as single binary" Right: Resolve contradiction before finalizing
Wrong: Constitution exists but never checked Right: All tools validate constitution compliance automatically
# Project Constitution
## Architecture Principles
- [MUST] Use multi-agent system with OpenAI Agents SDK
- [MUST] Follow Composition Root dependency injection pattern
- [SHOULD] Prefer deterministic flows (low temperature) for sales agents
## Security Principles
- [MUST] Never expose internal identifiers to external systems
- [MUST] All secrets in environment variables, never committed
- [MUST] Authentication required for all customer-facing interactions
## Quality Principles
- [MUST] All code passes `npm test` before commit
- [MUST] All code passes `npm run lint` before commit
- [SHOULD] Test coverage ≥80% for critical paths
## Technology Constraints
- [MUST] TypeScript (no JavaScript)
- [MUST] MongoDB for persistence
- [MUST] OpenAI Agents SDK (no custom routing verbs)
- [FORBIDDEN] Custom SDK abstractions (YAGNI)
## Documentation Standards
- [MUST] All agents documented in README
- [SHOULD] Complex tools include usage examples
- [SHOULD] Architecture decisions in docs/architecture/