Skip to content

Commit 5dd2884

Browse files
committed
BREAKING: Remove AD Mode - architecture support now optional in all modes
- Removed 'ad' mode option from /mode command - Only build and spec workflow modes remain - /architect and /constitution commands now work in all modes - Architecture and constitution files load silently when present - Automatic migration: existing 'ad' configs treated as 'spec' - Added get_current_mode() functions to bash and PowerShell - Updated setup-plan scripts to detect mode and load architecture - Architecture loading matches constitution pattern exactly - No warnings when architecture.md or constitution.md missing BREAKING CHANGE: Projects using 'ad' mode will automatically migrate to 'spec' mode. Architecture commands remain available but are no longer tied to a specific mode. Closes: unified workflow implementation Version: 0.1.0
1 parent 737dd84 commit 5dd2884

File tree

11 files changed

+172
-143
lines changed

11 files changed

+172
-143
lines changed

CHANGELOG.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12+
## [0.1.0] - 2026-01-30
13+
14+
### Changed
15+
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
24+
1225
### Added
1326

14-
- **Architecture Description (AD) Mode**: New workflow mode for architecture-first development
15-
- New `/speckit.architect` command implementing Rozanski & Woods "Software Systems Architecture" methodology
27+
- **Optional Architecture Support**: Architecture documentation available in all modes
28+
- `/speckit.architect` command implementing Rozanski & Woods "Software Systems Architecture" methodology
1629
- 7 Core Viewpoints: Context, Functional, Information, Concurrency, Development, Deployment, Operational
1730
- 2 Cross-cutting Perspectives: Security, Performance & Scalability
1831
- Four actions: `init` (greenfield), `map` (brownfield/reverse-engineering), `update` (sync with changes), `review` (validation)
1932
- Language-agnostic codebase scanning for brownfield projects
2033
- Generates `memory/architecture.md` as central architecture artifact
21-
- AD mode added to mode configuration alongside `build` and `spec` modes
34+
- Works silently in both build and spec modes
2235
- Templates: `templates/architecture-template.md` and `templates/commands/architect.md`
2336
- Scripts: `scripts/bash/setup-architecture.sh` and `scripts/powershell/setup-architecture.ps1`
2437

README.md

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ Specify supports two workflow modes that control the complexity level of the dev
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
251-
- **`ad` mode**: Architecture-first workflow using Rozanski & Woods methodology for complex enterprise systems
252251

253252
#### Mode Commands
254253

@@ -262,9 +261,6 @@ Specify supports two workflow modes that control the complexity level of the dev
262261
# Switch to spec mode (comprehensive development)
263262
/mode spec
264263

265-
# Switch to AD mode (architecture-driven development)
266-
/mode ad
267-
268264
# Show detailed information about all modes
269265
/mode --info
270266
```
@@ -285,13 +281,6 @@ Specify supports two workflow modes that control the complexity level of the dev
285281
- Production systems needing comprehensive validation
286282
- When you need full traceability and quality gates
287283

288-
**Use `ad` mode for:**
289-
290-
- Complex enterprise systems requiring formal architecture documentation
291-
- Brownfield/modernization projects needing existing system mapping
292-
- Microservices architectures with multiple stakeholders
293-
- Systems with strict security, performance, or compliance requirements
294-
295284
#### Mode-Aware Commands
296285

297286
All slash commands adapt their behavior based on the current mode:
@@ -313,26 +302,26 @@ specify init my-project \
313302
--async-agent jules
314303
```
315304

316-
### Architecture-Driven Development (AD Mode)
305+
### Optional Architecture Support
317306

318-
For complex enterprise systems, use Architecture-Driven Development to establish system-level architecture before feature implementation.
307+
The toolkit includes comprehensive architecture documentation support that works with both build and spec modes. Architecture commands are optional and can be used at any time, regardless of workflow mode.
319308

320-
#### AD Mode Workflow
309+
#### Architecture Workflow
321310

322311
```bash
323-
# 1. Switch to AD mode
324-
/mode ad
325-
326-
# 2. Initialize architecture (greenfield)
312+
# Initialize architecture documentation (greenfield projects)
327313
/speckit.architect init
328314

329-
# 3. Or map existing codebase (brownfield)
315+
# Map existing codebase architecture (brownfield projects)
330316
/speckit.architect map
331317

332-
# 4. Review architecture against constitution
318+
# Review architecture against constitution
333319
/speckit.architect review
334320

335-
# 5. Then proceed with normal workflow
321+
# Update architecture as system evolves
322+
/speckit.architect update
323+
324+
# Then proceed with normal workflow
336325
/speckit.specify "Feature within this architecture"
337326
```
338327

@@ -470,7 +459,7 @@ The `specify` command supports the following options:
470459

471460
| Argument/Option | Type | Description |
472461
|-----------------|----------|-----------------------------------------------------------------------------|
473-
| `<mode>` | Argument | Workflow mode: `build` (lightweight), `spec` (comprehensive), or `ad` (architecture-driven) - leave empty to show current mode |
462+
| `<mode>` | Argument | Workflow mode: `build` (lightweight) or `spec` (comprehensive) - leave empty to show current mode |
474463
| `--tdd/--no-tdd` | Option | Enable/disable TDD (Test-Driven Development) |
475464
| `--contracts/--no-contracts` | Option | Enable/disable API contract generation |
476465
| `--data-models/--no-data-models` | Option | Enable/disable data model generation |
@@ -543,7 +532,6 @@ specify check
543532
/mode # Show current mode
544533
/mode build # Switch to lightweight build mode
545534
/mode spec # Switch to comprehensive spec mode
546-
/mode ad # Switch to architecture-driven mode
547535
/mode --info # Show detailed mode information
548536
```
549537

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "agentic-sdlc-specify-cli"
3-
version = "0.0.26"
3+
version = "0.1.0"
44
description = "Specify CLI, part of GitHub Spec Kit. A tool to bootstrap your projects for Spec-Driven Development (SDD)."
55
requires-python = ">=3.11"
66
dependencies = [

roadmap.md

Lines changed: 26 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,11 @@
114114
#### **Configurable Framework Options** *(100% Complete)* - **MEDIUM PRIORITY** - Addresses over-opinionated critique
115115

116116
-**Opt-in Architecture Patterns**: TDD, contracts, data models, risk-based testing become user-configurable via `/mode` command
117-
-**Consolidated Configuration**: Unified `mode.json` with `options` section (renamed from `opinions.json`)
117+
-**Consolidated Configuration**: Unified `config.json` with `options` section
118118
-**Mode-Based Preferences**: Different defaults for build vs spec modes
119119
-**Reduced Mandatory Options**: Core workflow preserved, options made optional
120120
-**User-Driven Defaults**: Users can override mode defaults with custom settings
121+
-**Architecture Support**: Optional architecture documentation available in all modes via `/architect` commands
121122

122123
---
123124

@@ -131,82 +132,22 @@
131132
-**Smart Trace Validation**: Enhanced `/analyze` claims trace detection but implementation not found
132133
-**Task-to-Issues Command**: Template exists but actual implementation script missing
133134

134-
### **Architecture Description (AD) Mode** *(40% Complete)* - **HIGH PRIORITY** - Enterprise Architecture Support
135-
136-
**Codebase Status**: Infrastructure 90% complete; critical blocker preventing user adoption. See implementation plan below.
137-
138-
-**CLI Config Update**: AD mode in `src/specify_cli/__init__.py:433-438` with all options enabled by default.
139-
-**Architecture Templates**: `templates/architecture-template.md` complete with 7 Rozanski & Woods viewpoints + 2 perspectives (Security, Performance & Scalability).
140-
-**Architect Command**: `templates/commands/architect.md` fully implemented with init/map/update/review actions + handoffs.
141-
-**Setup Scripts (Bash)**: `scripts/bash/setup-architecture.sh` (449 lines) with tech detection, directory mapping, API scanning - production-ready.
142-
-**Setup Scripts (PS1)**: `scripts/powershell/setup-architecture.ps1` - PowerShell equivalent complete.
143-
-**Mode Documentation**: `templates/commands/mode.md:128-138` - AD mode workflow fully documented with use cases and artifacts.
144-
-**Codebase Mapper (/map)**: `/architect map` action fully implemented with language, framework, database, and infrastructure detection for brownfield projects. **[DESIGN DECISION LOCKED - Option A]**: Detects technologies and **populates `architecture.md` Section C** (Tech Stack Summary) directly. Single source of truth: `architecture.md` Section C (no separate `tech-stack.md` file). Enables Constitution validation against architecture.
145-
- ⚠️ **Plan Script Updates**: `scripts/bash/setup-plan.sh:46` hardcoded to `plan-template.md` - **MISSING MODE DETECTION** (critical blocker).
146-
- ⚠️ **plan-template-ad.md**: **DOES NOT EXIST** - template file missing (blocks schema generation guidance).
147-
-**Mode Detection Utility**: No `get_current_mode()` function in `scripts/bash/common.sh` - needed by setup-plan.sh.
148-
-**Schema Generation** *(ThoughtWorks SDD - Executable Specifications)*: Enhance `plan` templates in AD mode to explicitly output standard schema formats (OpenAPI, JSON Schema, AsyncAPI) into the `contracts/` folder, making the spec "executable." Templates exist but no generation logic or `/contracts/` scaffolding. **Phase 2 feature (design + decision required)**.
149-
-**Spec-Code Drift Detector** *(ThoughtWorks SDD - Drift Detection)*: No drift detection in `/analyze` command. **Phase 3 feature (design + decision required)**.
150-
151-
**🎯 AD Mode Implementation Plan** *(3-Phase Critical Path - See Below)*
152-
153-
| Phase | Duration | Blocker | Result |
154-
|-------|----------|---------|--------|
155-
| **Phase 1: Enable AD Mode** | 2-3 days | Mode detection + templates | Users can use `/mode ad``/plan` → get AD-specific template |
156-
| **Phase 2: Schema Generation** | 3-4 days | Format decisions (OpenAPI? + JSON Schema?) | `/contracts/openapi.yaml` + schema generation working |
157-
| **Phase 3: Drift Detection** | 4-5 days | Scope decisions (API only?) | `/analyze` reports spec-code misalignment |
158-
159-
**Phase 1 Tasks (CRITICAL - Must Complete First)**:
160-
1. Add `get_current_mode()` function to `scripts/bash/common.sh` (2-3 hours)
161-
2. Update `scripts/bash/setup-plan.sh` with mode detection logic (1-2 hours)
162-
3. Create `templates/plan-template-ad.md` with schema guidance (3-4 hours)
163-
4. Add `Get-CurrentMode` to `scripts/powershell/common.ps1` (2-3 hours)
164-
5. Update `scripts/powershell/setup-plan.ps1` with mode detection (1-2 hours)
165-
6. Update `src/specify_cli/__init__.py` help text to mention AD mode (1 hour)
166-
7. **[NEW] Modify `scripts/bash/setup-architecture.sh` action_map()** to populate `architecture.md` Section C (2-3 hours)
167-
- Parse architecture.md and locate Section C: Tech Stack Summary
168-
- Replace [PLACEHOLDER] values with detected technologies
169-
- Update architecture.md directly (single source of truth)
170-
- **REMOVE tech-stack.md generation** (no separate inventory file)
171-
- Add PowerShell equivalent in `scripts/powershell/setup-architecture.ps1`
172-
173-
**Total Phase 1: ~12-17 hours (~3 days)** (was 10-13 hours; design improvement adds proper integration)
174-
175-
**Phase 2 Decisions (Before Implementation)**:
176-
- Which schema formats? (Recommendation: OpenAPI 3.1 + JSON Schema)
177-
- When to generate? (Recommendation: On-demand + optional auto during /plan)
178-
- How to generate? (Recommendation: AI generation from plan.md description)
179-
180-
**Phase 3 Decisions (Before Implementation)**:
181-
- Drift scope? (Recommendation: API endpoints focus, expand to database later)
182-
- Detection strategy? (Recommendation: Language-specific pattern matching)
183-
- Integration? (Recommendation: Both auto in /analyze + on-demand command)
184-
185-
**🎯 CRITICAL DESIGN DECISION - SINGLE SOURCE OF TRUTH FOR TECH STACK** *(User-Identified & Locked)*:
186-
187-
**Issue Identified**: architecture.md already has Section C (Tech Stack Summary), but `/architect map` was creating separate `memory/tech-stack.md` → redundancy and broken Constitution validation.
188-
189-
**Decision LOCKED - Option A** ✅:
190-
- `/architect map` detects tech from codebase (existing ✅)
191-
- **POPULATES `architecture.md` Section C directly** (NEW)
192-
- **NO separate `tech-stack.md` file** (removed from design)
193-
- **Single source of truth**: `architecture.md` Section C
194-
- **Constitution can validate** against official architecture doc
195-
196-
**Rationale**:
197-
- ✅ One authoritative system design document (architecture.md)
198-
- ✅ Constitution validation path clear (references architecture.md Section C)
199-
- ✅ Complete architecture docs (no [PLACEHOLDER] format)
200-
- ✅ Phases 2 & 3 can reference unified tech context
201-
- ✅ Easier maintenance (no file sync needed)
202-
203-
**Implementation Impact**:
204-
- Phase 1 Task 7 (NEW): Modify setup-architecture.sh action_map() to populate architecture.md Section C
205-
- Phase 1F adds 2-3 hours → total Phase 1 now 12-17 hours
206-
- Both Bash and PowerShell scripts updated
207-
208-
**Phase 2 Benefit**: Schema generation references architecture.md Section C for tech context
209-
**Phase 3 Benefit**: /analyze validates code against architecture.md Section C AND constitution
135+
### **Optional Architecture Support** *(100% Complete)* - **COMPLETED** - Enterprise Architecture Features
136+
137+
Architecture support is now available in all workflow modes as optional commands. The `/architect` and `/constitution` commands work silently in any mode, with no warnings if files are missing.
138+
139+
-**Architecture Templates**: Complete Rozanski & Woods 7 viewpoints + 2 perspectives (Security, Performance & Scalability)
140+
-**Architect Command**: `/architect` with init/map/update/review actions fully implemented
141+
-**Setup Scripts**: Both bash and PowerShell implementations complete
142+
-**Brownfield Support**: `/architect map` detects technologies and populates `architecture.md` Section C directly
143+
-**Mode Integration**: Architecture commands available in both build and spec modes
144+
-**Silent Operation**: No errors or warnings when architecture.md missing
145+
-**Constitution Support**: Optional project principles via `/constitution` command
146+
-**Single Source of Truth**: `architecture.md` Section C contains tech stack (no separate files)
147+
148+
**Future Enhancements** *(Deferred - Not Blocking)*:
149+
- **Schema Generation** *(ThoughtWorks SDD - Executable Specifications)*: Auto-generate OpenAPI/JSON Schema from plan.md into `contracts/` folder
150+
- **Spec-Code Drift Detector** *(ThoughtWorks SDD - Drift Detection)*: Automated detection of spec-code misalignment in `/analyze` command
210151

211152
---
212153

@@ -402,6 +343,8 @@
402343
-**Mode Compatibility Validation**: Ensure feature modes are compatible with project infrastructure
403344
-**Mode Migration Support**: Tools to change feature modes mid-development
404345

346+
**Note**: Architecture support is now available in all modes, not tied to specific workflow modes.
347+
405348
#### **Issue Tracker Automation** *(0% Complete)* - **FUTURE ENHANCEMENT** - Separate from documentation updates
406349

407350
-**Automated Status Updates**: Sync documentation changes with issue status (GitHub/Jira/Linear)
@@ -508,10 +451,12 @@
508451
3. **HIGH**: Levelup command build mode compatibility (0% → 100%) - AI session context management blocker (depends on #2)
509452
4. **HIGH**: Persistent issue ID storage enhancement (0% → 100%) - Issue-tracker-first workflow improvement
510453
5. **HIGH**: Build Mode "GSD" Upgrade (0% → 100%) - High-velocity execution mode (depends on #2)
511-
6. **HIGH**: Architecture Description (AD) Mode - Phase 1 (40% → 100%) - **CRITICAL BLOCKER: Mode detection + plan-template-ad.md** (2-3 days work unlocks enterprise architecture support)
512-
- Phase 1 (2-3 days): Mode detection utility + plan-template-ad.md → AD mode becomes USABLE
513-
- Phase 2 (3-4 days): Schema generation design + implementation → EXECUTABLE SPECIFICATIONS
514-
- Phase 3 (4-5 days): Drift detection design + implementation → SPEC-CODE SYNC
454+
6. **COMPLETED**: Optional Architecture Support (100%) - Architecture commands now available in all modes
455+
- ✅ Mode detection utilities implemented (get_current_mode functions)
456+
- ✅ Architecture loading matches constitution pattern
457+
- ✅ Silent operation - no warnings when files missing
458+
- ⏭️ Schema generation (deferred - future enhancement)
459+
- ⏭️ Drift detection (deferred - future enhancement)
515460
7. **MEDIUM**: Context Intelligence & Optimization (0% → 100%) - Directives scanner + compliance validation
516461
8. **MEDIUM**: Multi-tracker task-to-issues extension (0% → 100%) - Enhanced traceability across platforms
517462
9. **MEDIUM**: Spec management & cleanup (0% → 100%) - Workflow maintenance

scripts/bash/common.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,30 @@ get_global_config_path() {
1313
echo "$config_home/specify/config.json"
1414
}
1515

16+
# Get current workflow mode from global config (build or spec)
17+
# Defaults to "spec" if config doesn't exist or mode is invalid
18+
get_current_mode() {
19+
local config_file
20+
config_file=$(get_global_config_path)
21+
22+
# Default to spec mode if no config exists
23+
if [[ ! -f "$config_file" ]] || ! command -v jq >/dev/null 2>&1; then
24+
echo "spec"
25+
return
26+
fi
27+
28+
# Read mode from config, default to spec
29+
local mode
30+
mode=$(jq -r '.workflow.current_mode // "spec"' "$config_file" 2>/dev/null)
31+
32+
# Validate mode (only build or spec allowed, treat "ad" as spec for migration)
33+
if [[ "$mode" == "build" || "$mode" == "spec" ]]; then
34+
echo "$mode"
35+
else
36+
echo "spec" # Fallback for invalid values including "ad"
37+
fi
38+
}
39+
1640
load_team_directives_config() {
1741
local repo_root="$1"
1842

scripts/bash/setup-plan.sh

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,15 @@ fi
4242
# Ensure the feature directory exists
4343
mkdir -p "$FEATURE_DIR"
4444

45-
# Copy plan template if it exists
46-
TEMPLATE="$REPO_ROOT/.specify/templates/plan-template.md"
45+
# Detect current workflow mode and select appropriate plan template
46+
CURRENT_MODE=$(get_current_mode)
47+
48+
if [[ "$CURRENT_MODE" == "build" ]]; then
49+
TEMPLATE="$REPO_ROOT/.specify/templates/plan-template-build.md"
50+
else
51+
TEMPLATE="$REPO_ROOT/.specify/templates/plan-template.md"
52+
fi
53+
4754
if [[ -f "$TEMPLATE" ]]; then
4855
cp "$TEMPLATE" "$IMPL_PLAN"
4956
echo "Copied plan template to $IMPL_PLAN"
@@ -90,10 +97,21 @@ else
9097
TEAM_DIRECTIVES_DIR=""
9198
fi
9299

100+
# Resolve architecture path (prefer env override, silent if missing)
101+
ARCHITECTURE_FILE="${SPECIFY_ARCHITECTURE:-}"
102+
if [[ -z "$ARCHITECTURE_FILE" ]]; then
103+
ARCHITECTURE_FILE="$REPO_ROOT/.specify/memory/architecture.md"
104+
fi
105+
if [[ -f "$ARCHITECTURE_FILE" ]]; then
106+
export SPECIFY_ARCHITECTURE="$ARCHITECTURE_FILE"
107+
else
108+
ARCHITECTURE_FILE=""
109+
fi
110+
93111
# Output results
94112
if $JSON_MODE; then
95-
printf '{"FEATURE_SPEC":"%s","IMPL_PLAN":"%s","SPECS_DIR":"%s","BRANCH":"%s","HAS_GIT":"%s","CONSTITUTION":"%s","TEAM_DIRECTIVES":"%s","CONTEXT_FILE":"%s"}\n' \
96-
"$FEATURE_SPEC" "$IMPL_PLAN" "$FEATURE_DIR" "$CURRENT_BRANCH" "$HAS_GIT" "$CONSTITUTION_FILE" "$TEAM_DIRECTIVES_DIR" "$CONTEXT_FILE"
113+
printf '{"FEATURE_SPEC":"%s","IMPL_PLAN":"%s","SPECS_DIR":"%s","BRANCH":"%s","HAS_GIT":"%s","CONSTITUTION":"%s","TEAM_DIRECTIVES":"%s","ARCHITECTURE":"%s","CONTEXT_FILE":"%s"}\n' \
114+
"$FEATURE_SPEC" "$IMPL_PLAN" "$FEATURE_DIR" "$CURRENT_BRANCH" "$HAS_GIT" "$CONSTITUTION_FILE" "$TEAM_DIRECTIVES_DIR" "$ARCHITECTURE_FILE" "$CONTEXT_FILE"
97115
else
98116
echo "FEATURE_SPEC: $FEATURE_SPEC"
99117
echo "IMPL_PLAN: $IMPL_PLAN"
@@ -110,6 +128,11 @@ else
110128
else
111129
echo "TEAM_DIRECTIVES: (missing)"
112130
fi
131+
if [[ -n "$ARCHITECTURE_FILE" ]]; then
132+
echo "ARCHITECTURE: $ARCHITECTURE_FILE"
133+
else
134+
echo "ARCHITECTURE: (missing)"
135+
fi
113136
echo "CONTEXT_FILE: $CONTEXT_FILE"
114137
fi
115138

0 commit comments

Comments
 (0)