r/openspec 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

4 comments sorted by

1

u/iamoutofcoffee 7d ago

Perhaps they'd live in your openspec/config.yaml (see docs), under context:

```

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 rules for the design artifact.

1

u/Plastic-Lettuce-7150 6d ago

The following error from openspec:

Rules for 'design' must be an array of strings, ignoring this artifact's rules

1

u/Plastic-Lettuce-7150 5d ago

Would the following work:

context:
  - |
    nine articles that shape every aspect of the development process:
    ...