Skip to content

Commit d8e98cc

Browse files
committed
feat: remove mode command
1 parent 0891140 commit d8e98cc

File tree

11 files changed

+202
-290
lines changed

11 files changed

+202
-290
lines changed

CHANGELOG.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Changed
1515

16-
- **BREAKING: Removed AD Mode**: Architecture support is now optional and available in all workflow modes
17-
- Removed "ad" mode option from `/mode` command
18-
- Only `build` and `spec` workflow modes remain
19-
- `/speckit.architect` and `/speckit.constitution` commands now work in all modes
20-
- Architecture and constitution files load silently when present, with no warnings if missing
21-
- Automatic migration: existing "ad" mode configurations treated as "spec" mode
22-
- Added `get_current_mode()` / `Get-CurrentMode` functions to bash and PowerShell scripts
23-
- Updated `setup-plan.sh` and `setup-plan.ps1` to detect mode and load architecture automatically
16+
- **BREAKING: Removed Global Mode Management**: Replaced global mode switching with per-spec mode architecture
17+
- **Deprecated**: `/mode` command removed (use `/specify` parameters instead)
18+
- **Per-Spec Architecture**: Each feature can operate in different modes simultaneously
19+
- **Auto-Detection System**: Commands automatically detect mode from spec.md metadata
20+
- **Parameter-Based Configuration**: Modes and framework options set via `/specify` parameters during feature creation
21+
- **Metadata Storage**: Mode and framework options stored in spec.md for traceability
22+
- **Architecture Mode-Agnostic**: `/architect` command remains mode-agnostic (system-level architecture should not be constrained by feature-level modes)
23+
- Added `detect_workflow_config()` / `Get-WorkflowConfig` functions to bash and PowerShell scripts
24+
- Updated `setup-plan.sh` and `setup-plan.ps1` to auto-detect mode from spec.md
2425

2526
### Added
2627

27-
- **Optional Architecture Support**: Architecture documentation available in all modes
28+
- **Per-Spec Mode Architecture**: Feature-level mode configuration with automatic detection
29+
- **Mixed-Mode Workflows**: Different features can use different modes simultaneously in the same project
30+
- **Optional Architecture Support**: Architecture documentation available in all modes
2831
- `/speckit.architect` command implementing Rozanski & Woods "Software Systems Architecture" methodology
2932
- 7 Core Viewpoints: Context, Functional, Information, Concurrency, Development, Deployment, Operational
3033
- 2 Cross-cutting Perspectives: Security, Performance & Scalability

README.md

Lines changed: 66 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -240,56 +240,90 @@ specify init my-project --spec-sync
240240
specify init my-project --ai claude --spec-sync
241241
```
242242

243-
### Workflow Mode Management
243+
### Per-Spec Workflow Mode Architecture
244244

245-
Specify supports two workflow modes that control the complexity level of the development process:
245+
Specify implements a **per-spec mode architecture** where each feature can operate in different modes simultaneously, providing maximum flexibility for mixed-mode workflows. The mode is configured at the specification level and applies to all downstream commands.
246246

247247
#### Available Modes
248248

249249
- **`spec` mode (default)**: Full structured specification with comprehensive requirements, research, and validation
250250
- **`build` mode**: Lightweight, conversational approach focused on quick validation and exploration
251251

252-
#### Mode Commands
252+
#### Mode Configuration
253+
254+
Modes are configured per-feature when creating the specification:
253255

254256
```bash
255-
# Show current mode and available options
256-
/mode
257+
# Create feature with specific mode
258+
/speckit.specify --mode=build "Quick API fix"
259+
/speckit.specify --mode=spec "Comprehensive user authentication"
260+
261+
# Override framework options per feature
262+
/speckit.specify --mode=build --tdd "Critical feature with tests"
263+
/speckit.specify --mode=spec --no-contracts "Feature without API contracts"
264+
265+
# Mode-specific defaults automatically applied
266+
# Build mode: tdd=false, contracts=false, data_models=false, risk_tests=false
267+
# Spec mode: tdd=true, contracts=true, data_models=true, risk_tests=true
268+
```
257269

258-
# Switch to build mode (lightweight development)
259-
/mode build
270+
#### Framework Options
271+
272+
Fine-grained control over development approach:
273+
274+
```bash
275+
# Test-Driven Development
276+
--tdd / --no-tdd
260277

261-
# Switch to spec mode (comprehensive development)
262-
/mode spec
278+
# Smart Contracts (API specifications)
279+
--contracts / --no-contracts
263280

264-
# Show detailed information about all modes
265-
/mode --info
281+
# Data Models (entity relationships)
282+
--data-models / --no-data-models
283+
284+
# Risk-Based Testing
285+
--risk-tests / --no-risk-tests
266286
```
267287

288+
#### Mode Detection and Auto-Detection
289+
290+
The mode is stored in the `spec.md` file metadata and automatically detected by downstream commands:
291+
292+
- **`/speckit.plan`**, **`/speckit.tasks`**, **`/speckit.implement`**, **`/speckit.clarify`**, **`/speckit.analyze`**, **`/speckit.checklist`**: Auto-detect mode and framework options from the current feature's spec.md
293+
- **`/speckit.architect`**: Mode-agnostic (system-level architecture should not be constrained by feature-level modes)
294+
268295
#### When to Use Each Mode
269296

270297
**Use `build` mode for:**
271298

272-
- Prototyping and exploration
273-
- Simple features with clear requirements
274-
- Quick validation of ideas
275-
- When you want to get something working fast
299+
- Individual development and rapid prototyping
300+
- Quick wins and simple features
301+
- Senior engineers who prefer autonomy
302+
- Situations requiring fast iteration
276303

277304
**Use `spec` mode for:**
278305

279-
- Complex features requiring thorough analysis
280-
- Team collaboration with detailed documentation
281-
- Production systems needing comprehensive validation
282-
- When you need full traceability and quality gates
306+
- Team collaboration and complex systems
307+
- Production features requiring comprehensive validation
308+
- Situations where thorough documentation is critical
309+
- Projects with multiple stakeholders
283310

284-
#### Mode-Aware Commands
311+
#### Mixed-Mode Workflows
285312

286-
All slash commands adapt their behavior based on the current mode:
313+
The per-spec architecture enables advanced workflows:
287314

288-
- **`/speckit.specify`**: Build mode uses simplified templates, spec mode uses comprehensive validation
289-
- **`/speckit.clarify`**: Build mode limits questions to 2, spec mode allows up to 5
290-
- **`/speckit.plan`**: Build mode creates lightweight plans, spec mode includes full research
291-
- **`/speckit.implement`**: Build mode focuses on core functionality, spec mode includes comprehensive quality gates
292-
- **`/speckit.analyze`**: Auto-detects pre vs post-implementation context based on project state
315+
```bash
316+
# Create multiple features with different modes in same project
317+
/speckit.specify --mode=build "Quick prototype feature"
318+
/speckit.specify --mode=spec "Production authentication system"
319+
/speckit.specify --mode=build "Bug fix"
320+
321+
# Each feature operates independently with its configured mode
322+
/speckit.plan # Auto-detects mode from current feature's spec.md
323+
/speckit.tasks # Respects framework options from spec.md
324+
/speckit.implement # Adapts validation based on detected mode
325+
/speckit.analyze # Auto-detects pre vs post-implementation context based on project state
326+
```
293327

294328
#### Complete Example
295329

@@ -462,7 +496,6 @@ The `specify` command supports the following options:
462496
|-------------|----------------------------------------------------------------|
463497
| `init` | Initialize a new Specify project from the latest template |
464498
| `check` | Check for installed tools (`git`, `claude`, `gemini`, `code`/`code-insiders`, `cursor-agent`, `windsurf`, `qwen`, `opencode`, `codex`, `shai`, `qoder`) |
465-
| `mode` | Manage workflow modes and framework opinions for development complexity control |
466499

467500
### `specify init` Arguments & Options
468501

@@ -484,17 +517,15 @@ The `specify` command supports the following options:
484517
| `--git-platform` | Option | Git platform MCP for PR operations: `github`, `gitlab` |
485518
| `--spec-sync` | Flag | Enable automatic spec-code synchronization (keeps specs/*.md files updated with code changes) |
486519

487-
### `/mode` Arguments & Options
520+
### `/speckit.specify` Mode & Framework Options
488521

489522
| Argument/Option | Type | Description |
490523
|-----------------|----------|-----------------------------------------------------------------------------|
491-
| `<mode>` | Argument | Workflow mode: `build` (lightweight) or `spec` (comprehensive) - leave empty to show current mode |
524+
| `--mode` | Option | Workflow mode: `build` (lightweight) or `spec` (comprehensive, default) |
492525
| `--tdd/--no-tdd` | Option | Enable/disable TDD (Test-Driven Development) |
493526
| `--contracts/--no-contracts` | Option | Enable/disable API contract generation |
494527
| `--data-models/--no-data-models` | Option | Enable/disable data model generation |
495528
| `--risk-tests/--no-risk-tests` | Option | Enable/disable risk-based test generation |
496-
| `--reset-opinions` | Option | Reset framework opinions to mode defaults |
497-
| `--info`, `-i` | Flag | Show detailed information about available modes |
498529

499530
### Examples
500531

@@ -557,11 +588,10 @@ specify init enterprise-app --ai claude --script sh --team-ai-directives https:/
557588
# Check system requirements
558589
specify check
559590

560-
# Workflow mode management
561-
/mode # Show current mode
562-
/mode build # Switch to lightweight build mode
563-
/mode spec # Switch to comprehensive spec mode
564-
/mode --info # Show detailed mode information
591+
# Workflow mode management is per-feature during specification
592+
/speckit.specify --mode build "Quick prototype feature" # Create feature in build mode
593+
/speckit.specify --mode spec "Complex feature" # Create feature in spec mode (default)
594+
/speckit.specify --mode build --tdd "Feature with tests" # Build mode with TDD enabled
565595
```
566596

567597
### Available Slash Commands

docs/quickstart.md

Lines changed: 95 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,89 @@ This guide will help you get started with Spec-Driven Development using Agentic
1111
**Note:** Run these steps in a standard terminal before opening the Intelligent IDE.
1212
**Alignment with 12 Factors:** This stage establishes the foundation guided by [I. Strategic Mindset](https://tikalk.github.io/agentic-sdlc-12-factors/content/strategic-mindset.html) and [II. Context Scaffolding](https://tikalk.github.io/agentic-sdlc-12-factors/content/context-scaffolding.html), positioning the developer as orchestrator and assembling necessary context for AI collaboration.
1313

14-
### Choose Your Workflow Mode
14+
### Per-Spec Workflow Mode Architecture
1515

16-
Specify supports two workflow modes that control development complexity, plus configurable framework opinions:
16+
Specify implements a **per-spec mode architecture** where each feature can operate in different modes simultaneously, providing maximum flexibility for mixed-mode workflows.
1717

18-
- **`spec` mode (default)**: Full structured development with comprehensive requirements, research, validation, and blocking review gates for team coordination
19-
- **`build` mode (GSD - Get Sh*t Done)**: High-velocity execution with atomic commits, non-blocking post-hoc review, and minimal documentation for rapid iteration
18+
#### Available Modes
2019

21-
**Framework Opinions** (configurable within each mode):
20+
- **`spec` mode (default)**: Full structured development with comprehensive requirements, research, and validation
21+
- **`build` mode**: Lightweight, conversational approach focused on quick validation and exploration
2222

23-
- **TDD**: Test-Driven Development (tests before implementation)
24-
- **API Contracts**: Automatic contract generation during planning
25-
- **Data Models**: Automatic data model generation during planning
23+
#### Mode Configuration
24+
25+
Modes are configured per-feature using parameters during specification:
2626

2727
```bash
28-
# Check current mode and opinions
29-
/mode
28+
# Create feature with specific mode
29+
/speckit.specify --mode=build "Quick API fix"
30+
/speckit.specify --mode=spec "Comprehensive user authentication"
31+
32+
# Override framework options per feature
33+
/speckit.specify --mode=build --tdd "Critical feature with tests"
34+
/speckit.specify --mode=spec --no-contracts "Feature without API contracts"
35+
36+
# Mode-specific defaults automatically applied
37+
# Build mode: tdd=false, contracts=false, data_models=false, risk_tests=false
38+
# Spec mode: tdd=true, contracts=true, data_models=true, risk_tests=true
39+
```
40+
41+
#### Framework Options
3042

31-
# Switch to lightweight mode for prototyping
32-
/speckit.mode build
43+
Fine-grained control over development approach:
3344

34-
# Switch to comprehensive mode for production features
35-
/speckit.mode spec
45+
```bash
46+
# Test-Driven Development
47+
--tdd / --no-tdd
3648

37-
# Customize framework opinions
38-
/speckit.mode --no-contracts # Disable API contracts
39-
/speckit.mode --tdd # Enable TDD
40-
/speckit.mode --risk-tests # Enable risk-based testing
41-
/speckit.mode --reset-opinions # Reset to mode defaults
49+
# Smart Contracts (API specifications)
50+
--contracts / --no-contracts
4251

43-
# Learn more about modes and opinions
44-
/speckit.mode --info
52+
# Data Models (entity relationships)
53+
--data-models / --no-data-models
54+
55+
# Risk-Based Testing
56+
--risk-tests / --no-risk-tests
4557
```
4658

47-
**Recommendation:**
59+
#### Auto-Detection System
60+
61+
Downstream commands automatically detect the mode from spec.md metadata:
62+
63+
- **`/speckit.plan`**, **`/speckit.tasks`**, **`/speckit.implement`**, **`/speckit.clarify`**, **`/speckit.analyze`**, **`/speckit.checklist`**: Auto-detect mode and framework options from spec.md
64+
- **`/speckit.architect`**: Mode-agnostic (system-level architecture should not be constrained by feature-level modes)
65+
66+
#### When to Use Each Mode
67+
68+
**Use `build` mode for:**
4869

49-
- Use **`build` mode** for: Individual development, rapid prototyping, quick wins, senior engineer autonomy
50-
- Use **`spec` mode** for: Team collaboration, complex systems, comprehensive documentation, rigorous validation
51-
- Switch between modes as needed: `/speckit.mode build` for fast iteration, `/speckit.mode spec` for thorough planning
70+
- Individual development and rapid prototyping
71+
- Quick wins and simple features
72+
- Senior engineers who prefer autonomy
73+
- Situations requiring fast iteration
74+
75+
**Use `spec` mode for:**
76+
77+
- Team collaboration and complex systems
78+
- Production features requiring comprehensive validation
79+
- Situations where thorough documentation is critical
80+
- Projects with multiple stakeholders
81+
82+
#### Mixed-Mode Workflows
83+
84+
The per-spec architecture enables advanced workflows:
85+
86+
```bash
87+
# Create multiple features with different modes in same project
88+
/speckit.specify --mode=build "Quick prototype feature"
89+
/speckit.specify --mode=spec "Production authentication system"
90+
/speckit.specify --mode=build "Bug fix"
91+
92+
# Each feature operates independently with its configured mode
93+
/speckit.plan # Auto-detects mode from current feature's spec.md
94+
/speckit.tasks # Respects framework options from spec.md
95+
/speckit.implement # Adapts validation based on detected mode
96+
```
5297

5398
1. **Project Initialization (`/init`)**
5499
**Action:** From the project root, run the Agentic SDLC Spec Kit `init` command (e.g., `specify init <project> --team-ai-directives https://github.com/your-org/team-ai-directives.git`) to configure local settings and clone the shared `team-ai-directives` modules.
@@ -152,7 +197,7 @@ Specify supports two workflow modes that control development complexity, plus co
152197

153198
**In your terminal**, run the `specify` CLI command to initialize your project:
154199

155-
> **Note:** All slash commands adapt their behavior based on your current workflow mode. Use `/mode` to check or change modes.
200+
> **Note:** All slash commands automatically detect the workflow mode from the current feature's spec.md metadata. No manual mode switching required.
156201
157202
```bash
158203
# Create a new project directory
@@ -297,35 +342,43 @@ Finally, implement the solution:
297342
- **Let the AI agent handle** the implementation details
298343
- **Choose your complexity level** with workflow modes (build for speed, spec for thoroughness)
299344
300-
## Mode Transitions
345+
## Creating Features in Different Modes
346+
347+
Your development needs may vary between different features:
301348
302-
Your development needs may change as features evolve:
349+
### For Build Mode Features
303350
304-
### When to Switch from Build to Spec Mode
351+
Create lightweight features focused on quick validation:
305352
306353
```bash
307-
/speckit.mode spec
354+
/speckit.specify --mode=build "Your feature description"
308355
```
309356
310-
**Indicators:**
357+
**Best for:**
358+
359+
- Exploratory prototyping
360+
- Quick validation of technical approaches
361+
- Throwaway proof-of-concepts
362+
- Time-sensitive features
311363
312-
- Feature scope is growing beyond initial expectations
313-
- Multiple stakeholders need detailed documentation
314-
- Production deployment requires comprehensive testing
315-
- Integration with existing systems becomes complex
364+
### For Spec Mode Features (Default)
316365
317-
### When to Switch from Spec to Build Mode
366+
Create comprehensive features with detailed planning and validation:
318367
319368
```bash
320-
/speckit.mode build
369+
/speckit.specify --mode=spec "Your feature description"
321370
```
322371
323-
**Indicators:**
372+
**Best for:**
373+
374+
- Features growing in scope
375+
- Multiple stakeholder involvement
376+
- Production-critical functionality
377+
- Complex system integration
378+
379+
### Transitioning Between Modes
324380
325-
- Shifting to exploratory prototyping
326-
- Need to quickly validate a technical approach
327-
- Working on throwaway proof-of-concepts
328-
- Time pressure requires simplified process
381+
If your feature needs change after initial creation, create a new feature spec with the appropriate mode rather than trying to modify the existing feature's mode. This preserves the original intent and decisions in the original spec.md.
329382

330383
## Next Steps
331384

0 commit comments

Comments
 (0)