Skip to content

Commit 5656bcd

Browse files
committed
fix: analyze command with build mode
1 parent 067d05b commit 5656bcd

File tree

2 files changed

+30
-17
lines changed

2 files changed

+30
-17
lines changed

roadmap.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@
204204
-**Archive Option**: Optional archiving instead of permanent deletion
205205
-**Cleanup Verification**: Confirm all related files and branches are removed
206206

207+
#### **Feature-Level Mode Configuration** *(0% Complete)* - **FUTURE ENHANCEMENT**
208+
-**Per-Feature Mode Settings**: Allow different workflow modes (build/spec) per feature instead of project-wide
209+
-**Feature Mode Inheritance**: Default to project mode with ability to override per feature
210+
-**Mode Compatibility Validation**: Ensure feature modes are compatible with project infrastructure
211+
-**Mode Migration Support**: Tools to change feature modes mid-development
212+
207213
#### **Issue Tracker Labeling** *(0% Complete)* - **FUTURE ENHANCEMENT**
208214
-**Issue Label Application**: `apply_issue_labels()` for `async-ready` and `agent-delegatable` labels
209215
-**Spec vs Task Complexity**: Handle original spec issues vs. generated implementation tasks
@@ -244,6 +250,7 @@
244250
| **Context Engineering** | 0% | 🆕 New |
245251
| **Knowledge Evals** | 0% | 🆕 New |
246252
| **Spec Management** | 0% | 🆕 New |
253+
| **Feature-Level Modes** | 0% | 🆕 New |
247254

248255
**Overall Implementation Status**: ~92% Complete
249256
- **Core Workflow**: 100% Complete (constitution, dual execution, MCP integration)
@@ -269,7 +276,8 @@
269276
7. **MEDIUM**: Strategic tooling improvements (50% → 100%)
270277
8. **MEDIUM**: Enhanced traceability (60% → 100%)
271278
9. **MEDIUM**: Methodology documentation integration (30% → 100%)
272-
10. **LOW**: IDE Integration & Cockpit Features (0% → future consideration)
279+
10. **LOW**: Feature-level mode configuration (0% → future consideration)
280+
11. **LOW**: IDE Integration & Cockpit Features (0% → future consideration)
273281

274282
**Context Engineering Implementation Timeline:**
275283
- Phase 1 (2 weeks): Context chunking and progressive layering

templates/commands/analyze.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
description: Perform cross-artifact consistency and quality analysis. Automatically detects pre vs post-implementation context based on workflow mode and project state.
33
scripts:
4-
sh: scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks
5-
ps: scripts/powershell/check-prerequisites.ps1 -Json -RequireTasks -IncludeTasks
4+
sh: scripts/bash/check-prerequisites.sh --json --include-tasks
5+
ps: scripts/powershell/check-prerequisites.ps1 -Json -IncludeTasks
66
---
77

88
## User Input
@@ -34,7 +34,9 @@ This command adapts its behavior based on project state and workflow mode.
3434
**Auto-Detection Logic**:
3535
1. Check workflow mode (build vs spec) from `.specify/config/mode.json`
3636
2. Analyze project state:
37-
- **Pre-implementation**: tasks.md exists, no source code or build artifacts
37+
- **Pre-implementation**:
38+
- **Build mode**: spec.md exists, no implementation artifacts (plan.md/tasks.md optional)
39+
- **Spec mode**: tasks.md exists, no source code or build artifacts
3840
- **Post-implementation**: Source code directories, compiled outputs, or deployment artifacts exist
3941
3. Apply mode-aware analysis depth:
4042
- **Build mode**: Lightweight analysis appropriate for rapid iteration
@@ -63,33 +65,35 @@ For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot
6365
- Check git history for implementation commits
6466
- Verify if `/implement` has been run recently
6567
3. **Determine Analysis Type**:
66-
- **Pre-Implementation**: No implementation artifacts + tasks.md exists
68+
- **Pre-Implementation**:
69+
- **Build mode**: No implementation artifacts (regardless of plan.md/tasks.md status)
70+
- **Spec mode**: No implementation artifacts + tasks.md exists
6771
- **Post-Implementation**: Implementation artifacts exist
6872
4. **Apply Mode-Aware Depth**:
6973
- **Build Mode**: Focus on core functionality and quick iterations
7074
- **Spec Mode**: Comprehensive analysis with full validation
7175

72-
**Fallback Logic**: If detection is ambiguous, default to pre-implementation analysis and prompt user for clarification.
76+
**Fallback Logic**: If detection is ambiguous, default to pre-implementation analysis appropriate for the current mode and prompt user for clarification.
7377

7478
### 3. Load Artifacts (Auto-Detected Mode)
7579

7680
**Pre-Implementation Mode Artifacts:**
77-
Load only the minimal necessary context from each artifact:
81+
Load available artifacts (build mode may have only spec.md):
7882

79-
**From spec.md:**
83+
**From spec.md (required):**
8084
- Overview/Context
8185
- Functional Requirements
8286
- Non-Functional Requirements
8387
- User Stories
8488
- Edge Cases (if present)
8589

86-
**From plan.md:**
90+
**From plan.md (optional in build mode):**
8791
- Architecture/stack choices
8892
- Data Model references
8993
- Phases
9094
- Technical constraints
9195

92-
**From tasks.md:**
96+
**From tasks.md (optional in build mode):**
9397
- Task IDs
9498
- Descriptions
9599
- Phase grouping
@@ -143,7 +147,7 @@ Focus on high-signal findings. Limit to 50 findings total; aggregate remainder i
143147

144148
- Requirements with verbs but missing object or measurable outcome
145149
- User stories missing acceptance criteria alignment
146-
- Tasks referencing files or components not defined in spec/plan
150+
- Tasks referencing files or components not defined in spec/plan (if tasks.md exists)
147151

148152
#### D. Constitution Alignment
149153

@@ -152,9 +156,9 @@ Focus on high-signal findings. Limit to 50 findings total; aggregate remainder i
152156

153157
#### E. Coverage Gaps
154158

155-
- Requirements with zero associated tasks
156-
- Tasks with no mapped requirement/story
157-
- Non-functional requirements not reflected in tasks (e.g., performance, security)
159+
- Requirements with zero associated tasks (if tasks.md exists)
160+
- Tasks with no mapped requirement/story (if tasks.md exists)
161+
- Non-functional requirements not reflected in tasks (if tasks.md exists)
158162

159163
#### F. Inconsistency
160164

@@ -194,9 +198,9 @@ Focus on high-signal findings. Limit to 50 findings total; aggregate remainder i
194198
Use this heuristic to prioritize findings:
195199

196200
**Pre-Implementation Severities:**
197-
- **CRITICAL**: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality
201+
- **CRITICAL**: Violates constitution MUST, missing spec.md, or requirement with zero coverage that blocks baseline functionality
198202
- **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion
199-
- **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case
203+
- **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case, missing plan.md/tasks.md (build mode only)
200204
- **LOW**: Style/wording improvements, minor redundancy not affecting execution order
201205

202206
**Post-Implementation Severities:**
@@ -265,7 +269,8 @@ Output a Markdown report (no file writes) with auto-detected mode-appropriate st
265269
At end of report, output a concise Next Actions block based on detected mode and findings:
266270

267271
**Pre-Implementation Next Actions:**
268-
- If CRITICAL issues exist: Recommend resolving before `/implement`
272+
- **Build Mode**: Missing plan.md/tasks.md is not critical - user may proceed to `/implement` for lightweight development
273+
- **Spec Mode**: If CRITICAL issues exist: Recommend resolving before `/implement`
269274
- If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
270275
- Provide explicit command suggestions: e.g., "Run /specify with refinement", "Run /plan to adjust architecture", "Manually edit tasks.md to add coverage for 'performance-metrics'"
271276

0 commit comments

Comments
 (0)