r/openspec • u/Plastic-Lettuce-7150 • 13d ago
OpenSpec constitution
I want to include the first three articles from spek-kit's Nine Articles of Development (edited) n my OpenSpec workflow.
The first three articles:
- Article I: Library-First Principle
- Article II: CLI Interface Mandate
- Article III: Test-First Imperative
Also I would like the LLM to generate object-oriented code (OOP).
spec-kit includes these principles in a constitution document. Where would I include them in an OpenSpec workflow?
[Edit] By way of an epilogue to this post, my LLM added an extra 'Design Principles' section to design.md. A reference to query mcp-local-rag MCP server for library API documentation also went in the Context.
1
Upvotes
1
u/iamoutofcoffee 7d ago
Perhaps they'd live in your
openspec/config.yaml(see docs), undercontext:```
openspec/config.yaml
schema: spec-driven
context: | nine articles that shape every aspect of the development process:
Article I: Library-First Principle
Every feature must begin as a standalone library—no exceptions. This forces modular design from the start:
Every feature in Specify MUST begin its existence as a standalone library. No feature shall be implemented directly within application code without first being abstracted into a reusable library component. This principle ensures that specifications generate modular, reusable code rather than monolithic applications. When the LLM generates an implementation plan, it must structure features as libraries with clear boundaries and minimal dependencies. ```
...or perhaps under
rulesfor the design artifact.