Project Constitution
"The North Star for your Salesforce Project."
The 9 Salesforce Constitution Articles
Metadata-First
Objects and Fields must be defined and finalized before any business logic is written.
Bulk Awareness
Every piece of logic must handle 201+ records by default. No exceptions.
Declarative-First
If it can be done with Flow, it must be done with Flow. Use Apex ONLY when necessary.
Absolute Security
Mandatory use of with sharing and WITH USER_MODE in all queries.
PNB Test Pattern
Every feature must have Positive, Negative, and Bulk test scenarios documented.
Clean Layers
Strict separation between Service, Selector, and Domain layers.
Deployment Safety
Mandatory dry-runs and metadata syncs before any deployment starts.
Platform Context
Always provide AI with clear architectural context and managed package interactions.
Modular Logic
Break complex logic into reusable, testable domain units.
How to Create Your Constitution
Run the Command
Open your AI Agent and type the following slash command:
/speckit.sf.constitution
Automated Discovery
SFSpeckit will automatically scan your Salesforce Org for:
- Installed Packages (CPQ, FSC, etc.)
- Integration Endpoints and Named Credentials
- Metadata Maturity (Flow vs. Apex posture)
- Org Limits and Constraints
Review & Finalize
Review the generated constitution.md in the .specify/memory/ directory. This file acts as the "North Star" for all future AI interactions.