Per-project constitution: auto-injected project governance for assembled prompts
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- developer-experience
Research direction
Begin by reviewing the existing guardrail protocols and tracing prompt assembly through the bootstrap engine or CLI. Define the author-project-constitution template and injection behavior, with completion demonstrated by a project constitution being included in assembled prompts only when present and its project-specific rules remaining distinct from generic guardrails.
Written by the indexing model from the issue text.
Description
Summary
Add a per-project constitution concept — a project-specific governance document (principles, constraints, coding standards, banned patterns) that auto-injects into every assembled prompt for that project.
Motivation
GitHub Spec Kit introduced a "constitution" pattern that has proven highly effective: a per-project governance document that all downstream artifacts must comply with. Constitution violations are flagged as CRITICAL, and exceptions require explicit justification.
PromptKit already has guardrail protocols (anti-hallucination, self-verification, operational-constraints), but these are generic — they apply identically to every project. A project constitution would let teams encode project-specific rules like:
- "Always enforce MISRA-C compliance"
- "Never suggest adding dependencies without approval"
- "All public APIs must have OpenAPI specifications"
- "Use the company's internal auth library, never roll your own"
Proposed Design
- New template:
author-project-constitution— interactive template that walks users through defining their project's principles, constraints, and development guidelines - New protocol category or injection mechanism: The assembled constitution becomes a project-specific guardrail that the bootstrap engine or CLI auto-injects during assembly when present in the project directory
- Format: Could follow Spec Kit's
MUST/SHOULD/MAYhierarchy for principles
Key difference from generic guardrails
Generic guardrails say "don't hallucinate." A constitution says "in this project, we use PostgreSQL, we follow the Airbnb style guide, and we never use any in TypeScript."
Credit
This pattern is inspired by GitHub Spec Kit's constitution concept. See their constitution-template.md and spec-driven workflow for the original implementation.
- Dominant language
- JavaScript
- Stars
- 105
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/PromptKit
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
All issues in microsoft/PromptKit
Similar issues
-
curation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
amponce/archive-movie-browser#186 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
clerk/javascript#9852 ·
-
bug p1 tools
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
Difficulty 2/5 1-3 hours Newbie friendliness 84/100