Skip to content

Commit f725a2c

Browse files
committed
Add opt-in --simple flag for Implementation Constraints
Users can pass --simple/--simplify or say "make it simple" to /speckit.constitution or /speckit.specify to inject an immutable Implementation Constraints section into the constitution. Once added, the section persists through all future constitution edits.
1 parent 86d29a8 commit f725a2c

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ Essential commands for the Spec-Driven Development workflow:
267267

268268
| Command | Description |
269269
| ----------------------- | ------------------------------------------------------------------------ |
270-
| `/speckit.constitution` | Create or update project governing principles and development guidelines |
271-
| `/speckit.specify` | Define what you want to build (requirements and user stories) |
270+
| `/speckit.constitution` | Create or update project governing principles and development guidelines. Use `--simple` (or "make it simple") to add immutable Implementation Constraints that enforce minimal, simple code. Once added, the constraints persist through all future constitution edits. |
271+
| `/speckit.specify` | Define what you want to build (requirements and user stories). Supports `--simple` flag — if the constitution doesn't have Implementation Constraints yet, adds them automatically before proceeding. |
272272
| `/speckit.plan` | Create technical implementation plans with your chosen tech stack |
273273
| `/speckit.tasks` | Generate actionable task lists for implementation |
274274
| `/speckit.implement` | Execute all tasks to build the feature according to the plan |

templates/commands/constitution.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,21 @@ Follow this execution flow:
4747
- Preserve heading hierarchy and comments can be removed once replaced unless they still add clarifying guidance.
4848
- Ensure each Principle section: succinct name line, paragraph (or bullet list) capturing non‑negotiable rules, explicit rationale if not obvious.
4949
- Ensure Governance section lists amendment procedure, versioning policy, and compliance review expectations.
50+
- **Implementation Constraints (opt-in, then immutable)**:
51+
- **Trigger**: If the user includes `--simple`, `--simplify`, or phrases like "make it simple", "simple solution", "keep it simple", "simplify" in their input, add the `## Implementation Constraints` section (see below) immediately before `## Governance`.
52+
- **Persistence**: If the constitution already contains a `## Implementation Constraints` section with the `<!-- DO NOT MODIFY -->` comment, it MUST be preserved exactly as-is through any update. Never edit, reorder, remove, or rephrase any part of it.
53+
- The section content to insert when triggered:
54+
```
55+
## Implementation Constraints
56+
<!-- DO NOT MODIFY — this section is immutable and must survive all constitution edits -->
57+
- Implement only what this spec explicitly describes. Nothing more.
58+
- Do not infer or add implied features, edge case handling, or extensibility hooks.
59+
- Prefer inline logic over abstraction unless reuse is explicitly required.
60+
- Prefer a single function/module over a class hierarchy unless state management is required.
61+
- Do not wrap simple logic in services, managers, or handlers unless the spec names them.
62+
- If uncertain between two approaches, choose the one with fewer lines of code.
63+
- Flag any decision that adds more than ~20% code beyond the minimal solution and ask before proceeding.
64+
```
5065
5166
4. Consistency propagation checklist (convert prior checklist into active validations):
5267
- Read `.specify/templates/plan-template.md` and ensure any "Constitution Check" or rules align with updated principles.
@@ -68,6 +83,7 @@ Follow this execution flow:
6883
- Version line matches report.
6984
- Dates ISO format YYYY-MM-DD.
7085
- Principles are declarative, testable, and free of vague language ("should" → replace with MUST/SHOULD rationale where appropriate).
86+
- If a `## Implementation Constraints` section exists, verify it is unchanged from the canonical version defined in step 3 above.
7187
7288
7. Write the completed constitution back to `.specify/memory/constitution.md` (overwrite).
7389

templates/commands/specify.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Given that feature description, do this:
3131
Before proceeding, check if `.specify/memory/constitution.md` has its identity fields populated:
3232
- Read the YAML frontmatter and check that `project_name` and `project_acronym` are set to real values (not `[PROJECT_NAME]` / `[PROJECT_ACRONYM]` placeholders)
3333
- If either field is still a placeholder, run the full `/speckit.constitution` flow first
34+
- **Simplicity flag**: If the user includes `--simple`, `--simplify`, or phrases like "make it simple", "simple solution", "keep it simple", "simplify" in their input, and the constitution does NOT already contain a `## Implementation Constraints` section with the `<!-- DO NOT MODIFY -->` comment, run the `/speckit.constitution --simple` flow to add it before continuing
3435
- Once both fields are populated, continue with step 1
3536

3637
1. **Generate a concise short name** (2-4 words) for the branch:

0 commit comments

Comments
 (0)