- Clear side-by-side comparison of current vs proposed structure - Safety indicators (safe vs dangerous operations) - Command output examples showing the improvements - User experience improvements with concrete examples - Performance impact analysis - Timeline and decision framework - Complements OUTPUT_DIRECTORY_REORGANIZATION.md with visual summary
10 KiB
Output Structure: Before vs After
Quick Visual Comparison
Current Structure (v1.0) - ⚠️ Problematic
.workflow/active/WFS-session/
├── .chat/ ⚠️ MIXED: Safe + Dangerous operations
│ ├── analyze-*.md ✅ Read-only
│ ├── plan-*.md ✅ Read-only
│ ├── chat-*.md ✅ Read-only
│ └── execute-*.md ⚠️ MODIFIES CODE!
│
├── .summaries/ ✅ OK
├── .task/ ✅ OK
└── .process/ ⚠️ MIXED: Multiple purposes
├── context-package.json (planning context)
├── phase2-analysis.json (temp data)
├── CONFLICT_RESOLUTION.md (planning artifact)
└── backup/ (history)
Problems:
- ❌
.chat/mixes safe (read-only) and dangerous (code-modifying) operations - ❌
.process/serves too many purposes - ❌ No clear organization by operation type
- ❌ Hard to find specific outputs
Proposed Structure (v2.0) - ✅ Clear & Semantic
.workflow/active/WFS-session/
│
├── 🟢 SAFE: Read-only Operations
│ ├── analysis/ Split from .chat/
│ │ ├── code/ Code understanding
│ │ ├── architecture/ Architecture analysis
│ │ └── bugs/ Bug diagnosis
│ │
│ ├── planning/ Split from .chat/
│ │ ├── discussions/ Multi-round planning
│ │ ├── architecture/ Architecture plans
│ │ └── revisions/ Replan history
│ │
│ └── interactions/ Split from .chat/
│ └── *-chat.md Q&A sessions
│
├── ⚠️ DANGEROUS: Code-modifying Operations
│ └── executions/ Split from .chat/
│ ├── implementations/ Code implementations
│ ├── test-fixes/ Test fixes
│ └── refactors/ Refactoring
│
├── 📊 RECORDS: Completion & Quality
│ ├── summaries/ Keep same (task completions)
│ │
│ └── quality/ Split from .process/
│ ├── verifications/ Plan verifications
│ ├── reviews/ Code reviews
│ └── tdd-compliance/ TDD checks
│
├── 📦 CONTEXT: Planning Artifacts
│ └── context/ Split from .process/
│ ├── project/ Context packages
│ ├── brainstorm/ Brainstorm artifacts
│ └── conflicts/ Conflict resolutions
│
├── 📜 HISTORY: Backups & Archives
│ └── history/ Rename from .process/backup/
│ ├── replans/ Replan backups
│ └── snapshots/ Session snapshots
│
└── 📋 TASKS: Definitions
└── tasks/ Rename from .task/
Benefits:
- ✅ Clear separation: Safe vs Dangerous operations
- ✅ Semantic organization by purpose
- ✅ Easy to find outputs by type
- ✅ Self-documenting structure
Key Changes Summary
1. Split .chat/ by Safety Level
| Current | New | Safety |
|---|---|---|
.chat/analyze-*.md |
analysis/code/ |
🟢 Safe |
.chat/plan-*.md |
planning/architecture/ |
🟢 Safe |
.chat/chat-*.md |
interactions/ |
🟢 Safe |
.chat/execute-*.md |
executions/implementations/ |
⚠️ Dangerous |
2. Split .process/ by Purpose
| Current | New | Purpose |
|---|---|---|
.process/context-package.json |
context/project/ |
Planning context |
.process/CONFLICT_RESOLUTION.md |
context/conflicts/ |
Planning artifact |
.process/ACTION_PLAN_VERIFICATION.md |
quality/verifications/ |
Quality check |
.process/backup/ |
history/replans/ |
Backups |
.process/phase2-analysis.json |
temp/ |
Temporary data |
3. Rename for Clarity
| Current | New | Reason |
|---|---|---|
.task/ |
tasks/ |
Remove dot prefix (not hidden) |
.summaries/ |
summaries/ |
Keep same (already clear) |
Command Output Changes (Examples)
Analysis Commands
# Current (v1.0)
/cli:analyze "review auth code"
→ .chat/analyze-2024-01-15.md ⚠️ Mixed with dangerous ops
# Proposed (v2.0)
/cli:analyze "review auth code"
→ analysis/code/2024-01-15T10-30-auth.md ✅ Clearly safe
Execution Commands
# Current (v1.0)
/cli:execute "implement auth"
→ .chat/execute-2024-01-15.md ⚠️ Looks safe, but dangerous!
# Proposed (v2.0)
/cli:execute "implement auth"
→ executions/implementations/2024-01-15T11-00-auth.md ⚠️ Clearly dangerous
Planning Commands
# Current (v1.0)
/cli:discuss-plan "design caching"
→ .chat/discuss-plan-2024-01-15.md ⚠️ Mixed with dangerous ops
# Proposed (v2.0)
/cli:discuss-plan "design caching"
→ planning/discussions/2024-01-15T15-00-caching-3rounds.md ✅ Clearly safe
Migration Impact
Affected Commands: ~30
Analysis Commands (6):
/cli:analyze/cli:mode:code-analysis/cli:mode:bug-diagnosis/cli:chat/memory:code-map-memory/workflow:review
Planning Commands (5):
/cli:mode:plan/cli:discuss-plan/workflow:plan/workflow:replan/workflow:brainstorm:*
Execution Commands (8):
/cli:execute/cli:codex-execute/workflow:execute/workflow:lite-execute/task:execute/workflow:test-cycle-execute/workflow:test-fix-gen/workflow:test-gen
Quality Commands (4):
/workflow:action-plan-verify/workflow:review/workflow:tdd-verify/workflow:tdd-coverage-analysis
Context Commands (7):
/workflow:tools:context-gather/workflow:tools:conflict-resolution/workflow:brainstorm:artifacts/memory:skill-memory/memory:docs/memory:load/memory:tech-research
Safety Indicators
Directory Color Coding
-
🟢 Green (Safe): Read-only operations, no code changes
analysis/planning/interactions/summaries/quality/context/history/
-
⚠️ Yellow (Dangerous): Code-modifying operations
executions/
File Naming Patterns
Safe Operations (🟢):
analysis/code/2024-01-15T10-30-auth-patterns.md
planning/discussions/2024-01-15T15-00-caching-3rounds.md
interactions/2024-01-15T14-00-jwt-question.md
Dangerous Operations (⚠️):
executions/implementations/2024-01-15T11-00-impl-auth.md
executions/test-fixes/2024-01-16T09-00-fix-login-tests.md
executions/refactors/2024-01-16T15-00-refactor-middleware.md
User Experience Improvements
Before (v1.0) - Confusing ❌
User wants to review analysis logs:
$ ls .workflow/active/WFS-auth/.chat/
analyze-2024-01-15.md
execute-2024-01-15.md # ⚠️ Wait, which one is safe?
plan-2024-01-14.md
execute-2024-01-16.md # ⚠️ More dangerous files mixed in!
chat-2024-01-15.md
User thinks: "They're all in .chat/, so they're all logs... right?" 😰
After (v2.0) - Clear ✅
User wants to review analysis logs:
$ ls .workflow/active/WFS-auth/
analysis/ # ✅ Safe - code understanding
planning/ # ✅ Safe - planning discussions
interactions/ # ✅ Safe - Q&A logs
executions/ # ⚠️ DANGER - code modifications
User thinks: "Oh, executions/ is separate. I know that modifies code!" 😊
Performance Impact
Storage
Overhead: Negligible
- Deeper directory nesting adds ~10 bytes per file
- For 1000 files: ~10 KB additional metadata
Access Speed
Overhead: Negligible
- Modern filesystems handle nested directories efficiently
- Typical lookup: O(log n) regardless of depth
Migration Cost
Phase 1 (Dual Write): ~5-10% overhead
- Writing to both old and new locations
- Temporary during migration period
Phase 2+ (New Structure Only): No overhead
- Single write location
- Actually slightly faster (better organization)
Rollback Plan
If migration causes issues:
Easy Rollback (Phase 1-2)
# Stop using new structure
git revert <migration-commit>
# Continue with old structure
# No data loss (dual write preserved both)
Manual Rollback (Phase 3+)
# Copy files back to old locations
cp -r analysis/code/* .chat/
cp -r executions/implementations/* .chat/
cp -r context/project/* .process/
# etc.
Timeline Summary
| Phase | Duration | Status | Risk |
|---|---|---|---|
| Phase 1: Dual Write | 2 weeks | 📋 Planned | LOW |
| Phase 2: Dual Read | 1 week | 📋 Planned | LOW |
| Phase 3: Deprecation | 1 week | 📋 Planned | MEDIUM |
| Phase 4: Full Migration | Future | 🤔 Optional | MEDIUM |
Total: 4 weeks for Phases 1-3 Effort: ~20-30 hours development time
Decision: Which Approach?
Option A: Full v2.0 Migration (Recommended) ✅
Pros:
- ✅ Clear semantic separation
- ✅ Future-proof organization
- ✅ Best user experience
- ✅ Solves all identified problems
Cons:
- ❌ 4-week migration period
- ❌ Affects 30+ commands
- ❌ Requires documentation updates
Recommendation: YES - Worth the investment
Option B: Minimal Changes (Quick Fix)
Change:
.chat/ → Split into .analysis/ and .executions/
.process/ → Keep as-is with better docs
Pros:
- ✅ Quick implementation (1 week)
- ✅ Solves main safety confusion
Cons:
- ❌ Partial solution
- ❌ Still some confusion
- ❌ May need full migration later anyway
Recommendation: Only if time-constrained
Option C: Status Quo (No Change)
Pros:
- ✅ No development effort
Cons:
- ❌ Problems remain
- ❌ User confusion continues
- ❌ Safety risks
Recommendation: NO - Not recommended
Conclusion
Recommended Action: Proceed with Option A (Full v2.0 Migration)
Key Benefits:
- 🟢 Clear safety separation (read-only vs code-modifying)
- 📁 Semantic organization by purpose
- 🔍 Easy to find specific outputs
- 📈 Scales for future growth
- 👥 Better user experience
Next Steps:
- ✅ Review and approve this proposal
- 📋 Create detailed implementation tasks
- 🚀 Begin Phase 1: Dual Write implementation
- 📚 Update documentation in parallel
Questions?
- See detailed analysis in:
OUTPUT_DIRECTORY_REORGANIZATION.md - Implementation guide: Migration Strategy section
- Risk assessment: Risk Assessment section