Get Started

Project Constitution

"The North Star for your Salesforce Project."

The 9 Salesforce Constitution Articles

I

Metadata-First

Objects and Fields must be defined and finalized before any business logic is written.

II

Bulk Awareness

Every piece of logic must handle 201+ records by default. No exceptions.

III

Declarative-First

If it can be done with Flow, it must be done with Flow. Use Apex ONLY when necessary.

IV

Absolute Security

Mandatory use of with sharing and WITH USER_MODE in all queries.

V

PNB Test Pattern

Every feature must have Positive, Negative, and Bulk test scenarios documented.

VI

Clean Layers

Strict separation between Service, Selector, and Domain layers.

VII

Deployment Safety

Mandatory dry-runs and metadata syncs before any deployment starts.

VIII

Platform Context

Always provide AI with clear architectural context and managed package interactions.

IX

Modular Logic

Break complex logic into reusable, testable domain units.

How to Create Your Constitution

1

Run the Command

Open your AI Agent and type the following slash command:

/speckit.sf.constitution
2

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
3

Review & Finalize

Review the generated constitution.md in the .specify/memory/ directory. This file acts as the "North Star" for all future AI interactions.