mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-14 02:42:04 +08:00
fix(workflow): complete path migration and enhance session:complete
Comprehensive update to eliminate all old path references and implement transactional archival in session:complete.
## Part 1: Complete Path Migration (43 files)
### Files Updated
- action-plan-verify.md
- session/list.md, session/resume.md
- tdd-verify.md, tdd-plan.md, test-*.md
- All brainstorm/*.md files (13 files)
- All tools/*.md files (10 files)
- All ui-design/*.md files (10 files)
- lite-plan.md, lite-execute.md, plan.md
### Path Changes
- `.workflow/.active-*` → `find .workflow/sessions/ -name "WFS-*" -type d`
- `.workflow/WFS-{session}` → `.workflow/sessions/WFS-{session}`
- `.workflow/.archives/` → `.workflow/archives/`
- Removed all marker file operations (touch/rm .active-*)
### Verification
- ✅ 0 references to .active-* markers remain
- ✅ 0 references to direct .workflow/WFS-* paths
- ✅ 0 references to .workflow/.archives/ (dot prefix)
## Part 2: Transactional Archival Enhancement
### session/complete.md - Complete Rewrite
**New Four-Phase Architecture**:
1. **Phase 1: Pre-Archival Preparation**
- Find active session in .workflow/sessions/
- Check for existing .archiving marker (resume detection)
- Create .archiving marker to prevent concurrent operations
2. **Phase 2: Agent Analysis (In-Place)**
- Agent processes session WHILE STILL in sessions/ directory
- Pure analysis - no file moves or manifest updates
- Returns complete metadata package for atomic commit
- Failure here → session remains active, safe to retry
3. **Phase 3: Atomic Commit**
- Only executes if Phase 2 succeeds
- Move session to archives/
- Update manifest.json
- Remove .archiving marker
- All-or-nothing guarantee
4. **Phase 4: Project Registry Update**
- Extract feature metadata and update project.json
**Key Improvements**:
- **Agent-first, move-second**: Prevents inconsistent states
- **Transactional guarantees**: All-or-nothing file operations
- **Resume capability**: .archiving marker enables safe retry
- **Error recovery**: Comprehensive failure handling documented
**Old Design Flaw (Fixed)**:
- Old: Move first → Agent processes → If agent fails, session moved but metadata incomplete
- New: Agent processes → If success, atomic commit → Guaranteed consistency
## Benefits
1. **Consistency**: All commands use identical path patterns
2. **Robustness**: Transactional archival prevents data loss
3. **Maintainability**: Single source of truth for directory structure
4. **Recoverability**: Failed operations can be safely retried
5. **Alignment**: Closer to OpenSpec's clean three-layer model
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ Identify inconsistencies, duplications, ambiguities, and underspecified items be
|
|||||||
IF --session parameter provided:
|
IF --session parameter provided:
|
||||||
session_id = provided session
|
session_id = provided session
|
||||||
ELSE:
|
ELSE:
|
||||||
CHECK: .workflow/.active-* marker files
|
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
|
||||||
IF active_session EXISTS:
|
IF active_session EXISTS:
|
||||||
session_id = get_active_session()
|
session_id = get_active_session()
|
||||||
ELSE:
|
ELSE:
|
||||||
@@ -40,7 +40,7 @@ ELSE:
|
|||||||
EXIT
|
EXIT
|
||||||
|
|
||||||
# Derive absolute paths
|
# Derive absolute paths
|
||||||
session_dir = .workflow/WFS-{session}
|
session_dir = .workflow/sessions/WFS-{session}
|
||||||
brainstorm_dir = session_dir/.brainstorming
|
brainstorm_dir = session_dir/.brainstorming
|
||||||
task_dir = session_dir/.task
|
task_dir = session_dir/.task
|
||||||
|
|
||||||
@@ -333,7 +333,7 @@ Output a Markdown report (no file writes) with the following structure:
|
|||||||
|
|
||||||
#### TodoWrite-Based Remediation Workflow
|
#### TodoWrite-Based Remediation Workflow
|
||||||
|
|
||||||
**Report Location**: `.workflow/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md`
|
**Report Location**: `.workflow/sessions/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md`
|
||||||
|
|
||||||
**Recommended Workflow**:
|
**Recommended Workflow**:
|
||||||
1. **Create TodoWrite Task List**: Extract all findings from report
|
1. **Create TodoWrite Task List**: Extract all findings from report
|
||||||
@@ -361,7 +361,7 @@ Priority Order:
|
|||||||
|
|
||||||
**Save Analysis Report**:
|
**Save Analysis Report**:
|
||||||
```bash
|
```bash
|
||||||
report_path = ".workflow/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md"
|
report_path = ".workflow/sessions/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md"
|
||||||
Write(report_path, full_report_content)
|
Write(report_path, full_report_content)
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -404,12 +404,12 @@ TodoWrite([
|
|||||||
**File Modification Workflow**:
|
**File Modification Workflow**:
|
||||||
```bash
|
```bash
|
||||||
# For task JSON modifications:
|
# For task JSON modifications:
|
||||||
1. Read(.workflow/WFS-{session}/.task/IMPL-X.Y.json)
|
1. Read(.workflow/sessions/WFS-{session}/.task/IMPL-X.Y.json)
|
||||||
2. Edit() to apply fixes
|
2. Edit() to apply fixes
|
||||||
3. Mark todo as completed
|
3. Mark todo as completed
|
||||||
|
|
||||||
# For IMPL_PLAN modifications:
|
# For IMPL_PLAN modifications:
|
||||||
1. Read(.workflow/WFS-{session}/IMPL_PLAN.md)
|
1. Read(.workflow/sessions/WFS-{session}/IMPL_PLAN.md)
|
||||||
2. Edit() to apply strategic changes
|
2. Edit() to apply strategic changes
|
||||||
3. Mark todo as completed
|
3. Mark todo as completed
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
|||||||
### Phase 1: Session & Framework Detection
|
### Phase 1: Session & Framework Detection
|
||||||
```bash
|
```bash
|
||||||
# Check active session and framework
|
# Check active session and framework
|
||||||
CHECK: .workflow/.active-* marker files
|
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
|
||||||
IF active_session EXISTS:
|
IF active_session EXISTS:
|
||||||
session_id = get_active_session()
|
session_id = get_active_session()
|
||||||
brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
|
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
|
||||||
|
|
||||||
CHECK: brainstorm_dir/guidance-specification.md
|
CHECK: brainstorm_dir/guidance-specification.md
|
||||||
IF EXISTS:
|
IF EXISTS:
|
||||||
@@ -162,7 +162,7 @@ IF update_mode = "incremental":
|
|||||||
|
|
||||||
### Output Files
|
### Output Files
|
||||||
```
|
```
|
||||||
.workflow/WFS-[topic]/.brainstorming/
|
.workflow/sessions/WFS-[topic]/.brainstorming/
|
||||||
├── guidance-specification.md # Input: Framework (if exists)
|
├── guidance-specification.md # Input: Framework (if exists)
|
||||||
└── api-designer/
|
└── api-designer/
|
||||||
└── analysis.md # ★ OUTPUT: Framework-based analysis
|
└── analysis.md # ★ OUTPUT: Framework-based analysis
|
||||||
@@ -181,7 +181,7 @@ IF update_mode = "incremental":
|
|||||||
Session detection and selection:
|
Session detection and selection:
|
||||||
```bash
|
```bash
|
||||||
# Check for active sessions
|
# Check for active sessions
|
||||||
active_sessions=$(find .workflow -name ".active-*" 2>/dev/null)
|
active_sessions=$(find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null)
|
||||||
if [ multiple_sessions ]; then
|
if [ multiple_sessions ]; then
|
||||||
prompt_user_to_select_session()
|
prompt_user_to_select_session()
|
||||||
else
|
else
|
||||||
@@ -280,7 +280,7 @@ TodoWrite tracking for two-step process:
|
|||||||
|
|
||||||
### Output Location
|
### Output Location
|
||||||
```
|
```
|
||||||
.workflow/WFS-{topic-slug}/.brainstorming/api-designer/
|
.workflow/sessions/WFS-{topic-slug}/.brainstorming/api-designer/
|
||||||
├── analysis.md # Primary API design analysis
|
├── analysis.md # Primary API design analysis
|
||||||
├── api-specification.md # Detailed endpoint specifications (OpenAPI/Swagger)
|
├── api-specification.md # Detailed endpoint specifications (OpenAPI/Swagger)
|
||||||
├── data-contracts.md # Request/response schemas and validation rules
|
├── data-contracts.md # Request/response schemas and validation rules
|
||||||
@@ -531,7 +531,7 @@ Upon completion, update `workflow-session.json`:
|
|||||||
"api_designer": {
|
"api_designer": {
|
||||||
"status": "completed",
|
"status": "completed",
|
||||||
"completed_at": "timestamp",
|
"completed_at": "timestamp",
|
||||||
"output_directory": ".workflow/WFS-{topic}/.brainstorming/api-designer/",
|
"output_directory": ".workflow/sessions/WFS-{topic}/.brainstorming/api-designer/",
|
||||||
"key_insights": ["endpoint_design", "versioning_strategy", "data_contracts"]
|
"key_insights": ["endpoint_design", "versioning_strategy", "data_contracts"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ allowed-tools: TodoWrite(*), Read(*), Write(*), Glob(*)
|
|||||||
Six-phase workflow: **Automatic project context collection** → Extract topic challenges → Select roles → Generate task-specific questions → Detect conflicts → Generate confirmed guidance (declarative statements only).
|
Six-phase workflow: **Automatic project context collection** → Extract topic challenges → Select roles → Generate task-specific questions → Detect conflicts → Generate confirmed guidance (declarative statements only).
|
||||||
|
|
||||||
**Input**: `"GOAL: [objective] SCOPE: [boundaries] CONTEXT: [background]" [--count N]`
|
**Input**: `"GOAL: [objective] SCOPE: [boundaries] CONTEXT: [background]" [--count N]`
|
||||||
**Output**: `.workflow/WFS-{topic}/.brainstorming/guidance-specification.md` (CONFIRMED/SELECTED format)
|
**Output**: `.workflow/sessions/WFS-{topic}/.brainstorming/guidance-specification.md` (CONFIRMED/SELECTED format)
|
||||||
**Core Principle**: Questions dynamically generated from project context + topic keywords/challenges, NOT from generic templates
|
**Core Principle**: Questions dynamically generated from project context + topic keywords/challenges, NOT from generic templates
|
||||||
|
|
||||||
**Parameters**:
|
**Parameters**:
|
||||||
@@ -32,7 +32,7 @@ Six-phase workflow: **Automatic project context collection** → Extract topic c
|
|||||||
**Standalone Mode**:
|
**Standalone Mode**:
|
||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
{"content": "Initialize session (.workflow/.active-* check, parse --count parameter)", "status": "pending", "activeForm": "Initializing"},
|
{"content": "Initialize session (.workflow/sessions/ session check, parse --count parameter)", "status": "pending", "activeForm": "Initializing"},
|
||||||
{"content": "Phase 0: Automatic project context collection (call context-gather)", "status": "pending", "activeForm": "Phase 0 context collection"},
|
{"content": "Phase 0: Automatic project context collection (call context-gather)", "status": "pending", "activeForm": "Phase 0 context collection"},
|
||||||
{"content": "Phase 1: Extract challenges, output 2-4 task-specific questions, wait for user input", "status": "pending", "activeForm": "Phase 1 topic analysis"},
|
{"content": "Phase 1: Extract challenges, output 2-4 task-specific questions, wait for user input", "status": "pending", "activeForm": "Phase 1 topic analysis"},
|
||||||
{"content": "Phase 2: Recommend count+2 roles, output role selection, wait for user input", "status": "pending", "activeForm": "Phase 2 role selection"},
|
{"content": "Phase 2: Recommend count+2 roles, output role selection, wait for user input", "status": "pending", "activeForm": "Phase 2 role selection"},
|
||||||
@@ -133,7 +133,7 @@ b) {role-name} ({中文名})
|
|||||||
## Execution Phases
|
## Execution Phases
|
||||||
|
|
||||||
### Session Management
|
### Session Management
|
||||||
- Check `.workflow/.active-*` markers first
|
- Check `.workflow/sessions/` for active sessions first
|
||||||
- Multiple sessions → Prompt selection | Single → Use it | None → Create `WFS-[topic-slug]`
|
- Multiple sessions → Prompt selection | Single → Use it | None → Create `WFS-[topic-slug]`
|
||||||
- Parse `--count N` parameter from user input (default: 3 if not specified)
|
- Parse `--count N` parameter from user input (default: 3 if not specified)
|
||||||
- Store decisions in `workflow-session.json` including count parameter
|
- Store decisions in `workflow-session.json` including count parameter
|
||||||
@@ -145,7 +145,7 @@ b) {role-name} ({中文名})
|
|||||||
**Detection Mechanism** (execute first):
|
**Detection Mechanism** (execute first):
|
||||||
```javascript
|
```javascript
|
||||||
// Check if context-package already exists
|
// Check if context-package already exists
|
||||||
const contextPackagePath = `.workflow/WFS-{session-id}/.process/context-package.json`;
|
const contextPackagePath = `.workflow/sessions/WFS-{session-id}/.process/context-package.json`;
|
||||||
|
|
||||||
if (file_exists(contextPackagePath)) {
|
if (file_exists(contextPackagePath)) {
|
||||||
// Validate package
|
// Validate package
|
||||||
@@ -229,7 +229,7 @@ Report completion with statistics.
|
|||||||
|
|
||||||
**Steps**:
|
**Steps**:
|
||||||
1. **Load Phase 0 context** (if available):
|
1. **Load Phase 0 context** (if available):
|
||||||
- Read `.workflow/WFS-{session-id}/.process/context-package.json`
|
- Read `.workflow/sessions/WFS-{session-id}/.process/context-package.json`
|
||||||
- Extract: tech_stack, existing modules, conflict_risk, relevant files
|
- Extract: tech_stack, existing modules, conflict_risk, relevant files
|
||||||
|
|
||||||
2. **Deep topic analysis** (context-aware):
|
2. **Deep topic analysis** (context-aware):
|
||||||
@@ -449,7 +449,7 @@ FOR each selected role:
|
|||||||
|
|
||||||
## Output Document Template
|
## Output Document Template
|
||||||
|
|
||||||
**File**: `.workflow/WFS-{topic}/.brainstorming/guidance-specification.md`
|
**File**: `.workflow/sessions/WFS-{topic}/.brainstorming/guidance-specification.md`
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
# [Project] - Confirmed Guidance Specification
|
# [Project] - Confirmed Guidance Specification
|
||||||
@@ -596,7 +596,7 @@ ELSE:
|
|||||||
## File Structure
|
## File Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
.workflow/WFS-[topic]/
|
.workflow/sessions/WFS-[topic]/
|
||||||
├── .active-brainstorming
|
├── .active-brainstorming
|
||||||
├── workflow-session.json # Session metadata ONLY
|
├── workflow-session.json # Session metadata ONLY
|
||||||
└── .brainstorming/
|
└── .brainstorming/
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ This workflow runs **fully autonomously** once triggered. Phase 1 (artifacts) ha
|
|||||||
**Validation**:
|
**Validation**:
|
||||||
- guidance-specification.md created with confirmed decisions
|
- guidance-specification.md created with confirmed decisions
|
||||||
- workflow-session.json contains selected_roles[] (metadata only, no content duplication)
|
- workflow-session.json contains selected_roles[] (metadata only, no content duplication)
|
||||||
- Session directory `.workflow/WFS-{topic}/.brainstorming/` exists
|
- Session directory `.workflow/sessions/WFS-{topic}/.brainstorming/` exists
|
||||||
|
|
||||||
**TodoWrite Update (Phase 1 SlashCommand invoked - tasks attached)**:
|
**TodoWrite Update (Phase 1 SlashCommand invoked - tasks attached)**:
|
||||||
```json
|
```json
|
||||||
@@ -132,13 +132,13 @@ Execute {role-name} analysis for existing topic framework
|
|||||||
|
|
||||||
## Context Loading
|
## Context Loading
|
||||||
ASSIGNED_ROLE: {role-name}
|
ASSIGNED_ROLE: {role-name}
|
||||||
OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/{role}/
|
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/{role}/
|
||||||
TOPIC: {user-provided-topic}
|
TOPIC: {user-provided-topic}
|
||||||
|
|
||||||
## Flow Control Steps
|
## Flow Control Steps
|
||||||
1. **load_topic_framework**
|
1. **load_topic_framework**
|
||||||
- Action: Load structured topic discussion framework
|
- Action: Load structured topic discussion framework
|
||||||
- Command: Read(.workflow/WFS-{session}/.brainstorming/guidance-specification.md)
|
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
|
||||||
- Output: topic_framework_content
|
- Output: topic_framework_content
|
||||||
|
|
||||||
2. **load_role_template**
|
2. **load_role_template**
|
||||||
@@ -148,7 +148,7 @@ TOPIC: {user-provided-topic}
|
|||||||
|
|
||||||
3. **load_session_metadata**
|
3. **load_session_metadata**
|
||||||
- Action: Load session metadata and original user intent
|
- Action: Load session metadata and original user intent
|
||||||
- Command: Read(.workflow/WFS-{session}/workflow-session.json)
|
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
|
||||||
- Output: session_context (contains original user prompt as PRIMARY reference)
|
- Output: session_context (contains original user prompt as PRIMARY reference)
|
||||||
|
|
||||||
4. **load_style_skill** (ONLY for ui-designer role when style_skill_package exists)
|
4. **load_style_skill** (ONLY for ui-designer role when style_skill_package exists)
|
||||||
@@ -194,7 +194,7 @@ TOPIC: {user-provided-topic}
|
|||||||
- guidance-specification.md path
|
- guidance-specification.md path
|
||||||
|
|
||||||
**Validation**:
|
**Validation**:
|
||||||
- Each role creates `.workflow/WFS-{topic}/.brainstorming/{role}/analysis.md` (primary file)
|
- Each role creates `.workflow/sessions/WFS-{topic}/.brainstorming/{role}/analysis.md` (primary file)
|
||||||
- If content is large (>800 lines), may split to `analysis-1.md`, `analysis-2.md` (max 3 files total)
|
- If content is large (>800 lines), may split to `analysis-1.md`, `analysis-2.md` (max 3 files total)
|
||||||
- **File naming pattern**: ALL files MUST start with `analysis` prefix (use `analysis*.md` for globbing)
|
- **File naming pattern**: ALL files MUST start with `analysis` prefix (use `analysis*.md` for globbing)
|
||||||
- **FORBIDDEN naming**: No `recommendations.md`, `recommendations-*.md`, or any non-`analysis` prefixed files
|
- **FORBIDDEN naming**: No `recommendations.md`, `recommendations-*.md`, or any non-`analysis` prefixed files
|
||||||
@@ -245,7 +245,7 @@ TOPIC: {user-provided-topic}
|
|||||||
**Input**: `sessionId` from Phase 1
|
**Input**: `sessionId` from Phase 1
|
||||||
|
|
||||||
**Validation**:
|
**Validation**:
|
||||||
- `.workflow/WFS-{topic}/.brainstorming/synthesis-specification.md` exists
|
- `.workflow/sessions/WFS-{topic}/.brainstorming/synthesis-specification.md` exists
|
||||||
- Synthesis references all role analyses
|
- Synthesis references all role analyses
|
||||||
|
|
||||||
**TodoWrite Update (Phase 3 SlashCommand invoked - tasks attached)**:
|
**TodoWrite Update (Phase 3 SlashCommand invoked - tasks attached)**:
|
||||||
@@ -280,7 +280,7 @@ TOPIC: {user-provided-topic}
|
|||||||
```
|
```
|
||||||
Brainstorming complete for session: {sessionId}
|
Brainstorming complete for session: {sessionId}
|
||||||
Roles analyzed: {count}
|
Roles analyzed: {count}
|
||||||
Synthesis: .workflow/WFS-{topic}/.brainstorming/synthesis-specification.md
|
Synthesis: .workflow/sessions/WFS-{topic}/.brainstorming/synthesis-specification.md
|
||||||
|
|
||||||
✅ Next Steps:
|
✅ Next Steps:
|
||||||
1. /workflow:concept-clarify --session {sessionId} # Optional refinement
|
1. /workflow:concept-clarify --session {sessionId} # Optional refinement
|
||||||
@@ -392,7 +392,7 @@ CONTEXT_VARS:
|
|||||||
|
|
||||||
## Session Management
|
## Session Management
|
||||||
|
|
||||||
**⚡ FIRST ACTION**: Check for `.workflow/.active-*` markers before Phase 1
|
**⚡ FIRST ACTION**: Check `.workflow/sessions/` for active sessions before Phase 1
|
||||||
|
|
||||||
**Multiple Sessions Support**:
|
**Multiple Sessions Support**:
|
||||||
- Different Claude instances can have different active brainstorming sessions
|
- Different Claude instances can have different active brainstorming sessions
|
||||||
@@ -408,15 +408,15 @@ CONTEXT_VARS:
|
|||||||
## Output Structure
|
## Output Structure
|
||||||
|
|
||||||
**Phase 1 Output**:
|
**Phase 1 Output**:
|
||||||
- `.workflow/WFS-{topic}/.brainstorming/guidance-specification.md` (framework content)
|
- `.workflow/sessions/WFS-{topic}/.brainstorming/guidance-specification.md` (framework content)
|
||||||
- `.workflow/WFS-{topic}/workflow-session.json` (metadata: selected_roles[], topic, timestamps, style_skill_package)
|
- `.workflow/sessions/WFS-{topic}/workflow-session.json` (metadata: selected_roles[], topic, timestamps, style_skill_package)
|
||||||
|
|
||||||
**Phase 2 Output**:
|
**Phase 2 Output**:
|
||||||
- `.workflow/WFS-{topic}/.brainstorming/{role}/analysis.md` (one per role)
|
- `.workflow/sessions/WFS-{topic}/.brainstorming/{role}/analysis.md` (one per role)
|
||||||
- `.superdesign/design_iterations/` (ui-designer artifacts, if --style-skill provided)
|
- `.superdesign/design_iterations/` (ui-designer artifacts, if --style-skill provided)
|
||||||
|
|
||||||
**Phase 3 Output**:
|
**Phase 3 Output**:
|
||||||
- `.workflow/WFS-{topic}/.brainstorming/synthesis-specification.md` (integrated analysis)
|
- `.workflow/sessions/WFS-{topic}/.brainstorming/synthesis-specification.md` (integrated analysis)
|
||||||
|
|
||||||
**⚠️ Storage Separation**: Guidance content in .md files, metadata in .json (no duplication)
|
**⚠️ Storage Separation**: Guidance content in .md files, metadata in .json (no duplication)
|
||||||
**⚠️ Style References**: When --style-skill provided, workflow-session.json stores style_skill_package name, ui-designer loads from `.claude/skills/style-{package-name}/`
|
**⚠️ Style References**: When --style-skill provided, workflow-session.json stores style_skill_package name, ui-designer loads from `.claude/skills/style-{package-name}/`
|
||||||
@@ -446,7 +446,7 @@ CONTEXT_VARS:
|
|||||||
|
|
||||||
**File Structure**:
|
**File Structure**:
|
||||||
```
|
```
|
||||||
.workflow/WFS-[topic]/
|
.workflow/sessions/WFS-[topic]/
|
||||||
├── .active-brainstorming
|
├── .active-brainstorming
|
||||||
├── workflow-session.json # Session metadata ONLY
|
├── workflow-session.json # Session metadata ONLY
|
||||||
└── .brainstorming/
|
└── .brainstorming/
|
||||||
|
|||||||
@@ -47,10 +47,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
|||||||
### Phase 1: Session & Framework Detection
|
### Phase 1: Session & Framework Detection
|
||||||
```bash
|
```bash
|
||||||
# Check active session and framework
|
# Check active session and framework
|
||||||
CHECK: .workflow/.active-* marker files
|
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
|
||||||
IF active_session EXISTS:
|
IF active_session EXISTS:
|
||||||
session_id = get_active_session()
|
session_id = get_active_session()
|
||||||
brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
|
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
|
||||||
|
|
||||||
CHECK: brainstorm_dir/guidance-specification.md
|
CHECK: brainstorm_dir/guidance-specification.md
|
||||||
IF EXISTS:
|
IF EXISTS:
|
||||||
@@ -87,13 +87,13 @@ Execute data-architect analysis for existing topic framework
|
|||||||
|
|
||||||
## Context Loading
|
## Context Loading
|
||||||
ASSIGNED_ROLE: data-architect
|
ASSIGNED_ROLE: data-architect
|
||||||
OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/data-architect/
|
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/data-architect/
|
||||||
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
||||||
|
|
||||||
## Flow Control Steps
|
## Flow Control Steps
|
||||||
1. **load_topic_framework**
|
1. **load_topic_framework**
|
||||||
- Action: Load structured topic discussion framework
|
- Action: Load structured topic discussion framework
|
||||||
- Command: Read(.workflow/WFS-{session}/.brainstorming/guidance-specification.md)
|
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
|
||||||
- Output: topic_framework_content
|
- Output: topic_framework_content
|
||||||
|
|
||||||
2. **load_role_template**
|
2. **load_role_template**
|
||||||
@@ -103,7 +103,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
|||||||
|
|
||||||
3. **load_session_metadata**
|
3. **load_session_metadata**
|
||||||
- Action: Load session metadata and existing context
|
- Action: Load session metadata and existing context
|
||||||
- Command: Read(.workflow/WFS-{session}/workflow-session.json)
|
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
|
||||||
- Output: session_context
|
- Output: session_context
|
||||||
|
|
||||||
## Analysis Requirements
|
## Analysis Requirements
|
||||||
@@ -163,7 +163,7 @@ TodoWrite({
|
|||||||
|
|
||||||
### Framework-Based Analysis
|
### Framework-Based Analysis
|
||||||
```
|
```
|
||||||
.workflow/WFS-{session}/.brainstorming/data-architect/
|
.workflow/sessions/WFS-{session}/.brainstorming/data-architect/
|
||||||
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ TodoWrite({
|
|||||||
"data_architect": {
|
"data_architect": {
|
||||||
"status": "completed",
|
"status": "completed",
|
||||||
"framework_addressed": true,
|
"framework_addressed": true,
|
||||||
"output_location": ".workflow/WFS-{session}/.brainstorming/data-architect/analysis.md",
|
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/data-architect/analysis.md",
|
||||||
"framework_reference": "@../guidance-specification.md"
|
"framework_reference": "@../guidance-specification.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
|||||||
### Phase 1: Session & Framework Detection
|
### Phase 1: Session & Framework Detection
|
||||||
```bash
|
```bash
|
||||||
# Check active session and framework
|
# Check active session and framework
|
||||||
CHECK: .workflow/.active-* marker files
|
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
|
||||||
IF active_session EXISTS:
|
IF active_session EXISTS:
|
||||||
session_id = get_active_session()
|
session_id = get_active_session()
|
||||||
brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
|
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
|
||||||
|
|
||||||
CHECK: brainstorm_dir/guidance-specification.md
|
CHECK: brainstorm_dir/guidance-specification.md
|
||||||
IF EXISTS:
|
IF EXISTS:
|
||||||
@@ -67,13 +67,13 @@ Execute product-manager analysis for existing topic framework
|
|||||||
|
|
||||||
## Context Loading
|
## Context Loading
|
||||||
ASSIGNED_ROLE: product-manager
|
ASSIGNED_ROLE: product-manager
|
||||||
OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/product-manager/
|
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/product-manager/
|
||||||
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
||||||
|
|
||||||
## Flow Control Steps
|
## Flow Control Steps
|
||||||
1. **load_topic_framework**
|
1. **load_topic_framework**
|
||||||
- Action: Load structured topic discussion framework
|
- Action: Load structured topic discussion framework
|
||||||
- Command: Read(.workflow/WFS-{session}/.brainstorming/guidance-specification.md)
|
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
|
||||||
- Output: topic_framework_content
|
- Output: topic_framework_content
|
||||||
|
|
||||||
2. **load_role_template**
|
2. **load_role_template**
|
||||||
@@ -83,7 +83,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
|||||||
|
|
||||||
3. **load_session_metadata**
|
3. **load_session_metadata**
|
||||||
- Action: Load session metadata and existing context
|
- Action: Load session metadata and existing context
|
||||||
- Command: Read(.workflow/WFS-{session}/workflow-session.json)
|
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
|
||||||
- Output: session_context
|
- Output: session_context
|
||||||
|
|
||||||
## Analysis Requirements
|
## Analysis Requirements
|
||||||
@@ -143,7 +143,7 @@ TodoWrite({
|
|||||||
|
|
||||||
### Framework-Based Analysis
|
### Framework-Based Analysis
|
||||||
```
|
```
|
||||||
.workflow/WFS-{session}/.brainstorming/product-manager/
|
.workflow/sessions/WFS-{session}/.brainstorming/product-manager/
|
||||||
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ TodoWrite({
|
|||||||
"product_manager": {
|
"product_manager": {
|
||||||
"status": "completed",
|
"status": "completed",
|
||||||
"framework_addressed": true,
|
"framework_addressed": true,
|
||||||
"output_location": ".workflow/WFS-{session}/.brainstorming/product-manager/analysis.md",
|
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/product-manager/analysis.md",
|
||||||
"framework_reference": "@../guidance-specification.md"
|
"framework_reference": "@../guidance-specification.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
|||||||
### Phase 1: Session & Framework Detection
|
### Phase 1: Session & Framework Detection
|
||||||
```bash
|
```bash
|
||||||
# Check active session and framework
|
# Check active session and framework
|
||||||
CHECK: .workflow/.active-* marker files
|
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
|
||||||
IF active_session EXISTS:
|
IF active_session EXISTS:
|
||||||
session_id = get_active_session()
|
session_id = get_active_session()
|
||||||
brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
|
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
|
||||||
|
|
||||||
CHECK: brainstorm_dir/guidance-specification.md
|
CHECK: brainstorm_dir/guidance-specification.md
|
||||||
IF EXISTS:
|
IF EXISTS:
|
||||||
@@ -67,13 +67,13 @@ Execute product-owner analysis for existing topic framework
|
|||||||
|
|
||||||
## Context Loading
|
## Context Loading
|
||||||
ASSIGNED_ROLE: product-owner
|
ASSIGNED_ROLE: product-owner
|
||||||
OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/product-owner/
|
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/product-owner/
|
||||||
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
||||||
|
|
||||||
## Flow Control Steps
|
## Flow Control Steps
|
||||||
1. **load_topic_framework**
|
1. **load_topic_framework**
|
||||||
- Action: Load structured topic discussion framework
|
- Action: Load structured topic discussion framework
|
||||||
- Command: Read(.workflow/WFS-{session}/.brainstorming/guidance-specification.md)
|
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
|
||||||
- Output: topic_framework_content
|
- Output: topic_framework_content
|
||||||
|
|
||||||
2. **load_role_template**
|
2. **load_role_template**
|
||||||
@@ -83,7 +83,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
|||||||
|
|
||||||
3. **load_session_metadata**
|
3. **load_session_metadata**
|
||||||
- Action: Load session metadata and existing context
|
- Action: Load session metadata and existing context
|
||||||
- Command: Read(.workflow/WFS-{session}/workflow-session.json)
|
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
|
||||||
- Output: session_context
|
- Output: session_context
|
||||||
|
|
||||||
## Analysis Requirements
|
## Analysis Requirements
|
||||||
@@ -143,7 +143,7 @@ TodoWrite({
|
|||||||
|
|
||||||
### Framework-Based Analysis
|
### Framework-Based Analysis
|
||||||
```
|
```
|
||||||
.workflow/WFS-{session}/.brainstorming/product-owner/
|
.workflow/sessions/WFS-{session}/.brainstorming/product-owner/
|
||||||
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ TodoWrite({
|
|||||||
"product_owner": {
|
"product_owner": {
|
||||||
"status": "completed",
|
"status": "completed",
|
||||||
"framework_addressed": true,
|
"framework_addressed": true,
|
||||||
"output_location": ".workflow/WFS-{session}/.brainstorming/product-owner/analysis.md",
|
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/product-owner/analysis.md",
|
||||||
"framework_reference": "@../guidance-specification.md"
|
"framework_reference": "@../guidance-specification.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
|||||||
### Phase 1: Session & Framework Detection
|
### Phase 1: Session & Framework Detection
|
||||||
```bash
|
```bash
|
||||||
# Check active session and framework
|
# Check active session and framework
|
||||||
CHECK: .workflow/.active-* marker files
|
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
|
||||||
IF active_session EXISTS:
|
IF active_session EXISTS:
|
||||||
session_id = get_active_session()
|
session_id = get_active_session()
|
||||||
brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
|
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
|
||||||
|
|
||||||
CHECK: brainstorm_dir/guidance-specification.md
|
CHECK: brainstorm_dir/guidance-specification.md
|
||||||
IF EXISTS:
|
IF EXISTS:
|
||||||
@@ -67,13 +67,13 @@ Execute scrum-master analysis for existing topic framework
|
|||||||
|
|
||||||
## Context Loading
|
## Context Loading
|
||||||
ASSIGNED_ROLE: scrum-master
|
ASSIGNED_ROLE: scrum-master
|
||||||
OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/scrum-master/
|
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/scrum-master/
|
||||||
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
||||||
|
|
||||||
## Flow Control Steps
|
## Flow Control Steps
|
||||||
1. **load_topic_framework**
|
1. **load_topic_framework**
|
||||||
- Action: Load structured topic discussion framework
|
- Action: Load structured topic discussion framework
|
||||||
- Command: Read(.workflow/WFS-{session}/.brainstorming/guidance-specification.md)
|
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
|
||||||
- Output: topic_framework_content
|
- Output: topic_framework_content
|
||||||
|
|
||||||
2. **load_role_template**
|
2. **load_role_template**
|
||||||
@@ -83,7 +83,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
|||||||
|
|
||||||
3. **load_session_metadata**
|
3. **load_session_metadata**
|
||||||
- Action: Load session metadata and existing context
|
- Action: Load session metadata and existing context
|
||||||
- Command: Read(.workflow/WFS-{session}/workflow-session.json)
|
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
|
||||||
- Output: session_context
|
- Output: session_context
|
||||||
|
|
||||||
## Analysis Requirements
|
## Analysis Requirements
|
||||||
@@ -143,7 +143,7 @@ TodoWrite({
|
|||||||
|
|
||||||
### Framework-Based Analysis
|
### Framework-Based Analysis
|
||||||
```
|
```
|
||||||
.workflow/WFS-{session}/.brainstorming/scrum-master/
|
.workflow/sessions/WFS-{session}/.brainstorming/scrum-master/
|
||||||
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ TodoWrite({
|
|||||||
"scrum_master": {
|
"scrum_master": {
|
||||||
"status": "completed",
|
"status": "completed",
|
||||||
"framework_addressed": true,
|
"framework_addressed": true,
|
||||||
"output_location": ".workflow/WFS-{session}/.brainstorming/scrum-master/analysis.md",
|
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/scrum-master/analysis.md",
|
||||||
"framework_reference": "@../guidance-specification.md"
|
"framework_reference": "@../guidance-specification.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
|||||||
### Phase 1: Session & Framework Detection
|
### Phase 1: Session & Framework Detection
|
||||||
```bash
|
```bash
|
||||||
# Check active session and framework
|
# Check active session and framework
|
||||||
CHECK: .workflow/.active-* marker files
|
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
|
||||||
IF active_session EXISTS:
|
IF active_session EXISTS:
|
||||||
session_id = get_active_session()
|
session_id = get_active_session()
|
||||||
brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
|
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
|
||||||
|
|
||||||
CHECK: brainstorm_dir/guidance-specification.md
|
CHECK: brainstorm_dir/guidance-specification.md
|
||||||
IF EXISTS:
|
IF EXISTS:
|
||||||
@@ -67,13 +67,13 @@ Execute subject-matter-expert analysis for existing topic framework
|
|||||||
|
|
||||||
## Context Loading
|
## Context Loading
|
||||||
ASSIGNED_ROLE: subject-matter-expert
|
ASSIGNED_ROLE: subject-matter-expert
|
||||||
OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/subject-matter-expert/
|
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/subject-matter-expert/
|
||||||
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
||||||
|
|
||||||
## Flow Control Steps
|
## Flow Control Steps
|
||||||
1. **load_topic_framework**
|
1. **load_topic_framework**
|
||||||
- Action: Load structured topic discussion framework
|
- Action: Load structured topic discussion framework
|
||||||
- Command: Read(.workflow/WFS-{session}/.brainstorming/guidance-specification.md)
|
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
|
||||||
- Output: topic_framework_content
|
- Output: topic_framework_content
|
||||||
|
|
||||||
2. **load_role_template**
|
2. **load_role_template**
|
||||||
@@ -83,7 +83,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
|||||||
|
|
||||||
3. **load_session_metadata**
|
3. **load_session_metadata**
|
||||||
- Action: Load session metadata and existing context
|
- Action: Load session metadata and existing context
|
||||||
- Command: Read(.workflow/WFS-{session}/workflow-session.json)
|
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
|
||||||
- Output: session_context
|
- Output: session_context
|
||||||
|
|
||||||
## Analysis Requirements
|
## Analysis Requirements
|
||||||
@@ -143,7 +143,7 @@ TodoWrite({
|
|||||||
|
|
||||||
### Framework-Based Analysis
|
### Framework-Based Analysis
|
||||||
```
|
```
|
||||||
.workflow/WFS-{session}/.brainstorming/subject-matter-expert/
|
.workflow/sessions/WFS-{session}/.brainstorming/subject-matter-expert/
|
||||||
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ TodoWrite({
|
|||||||
"subject_matter_expert": {
|
"subject_matter_expert": {
|
||||||
"status": "completed",
|
"status": "completed",
|
||||||
"framework_addressed": true,
|
"framework_addressed": true,
|
||||||
"output_location": ".workflow/WFS-{session}/.brainstorming/subject-matter-expert/analysis.md",
|
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/subject-matter-expert/analysis.md",
|
||||||
"framework_reference": "@../guidance-specification.md"
|
"framework_reference": "@../guidance-specification.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ Three-phase workflow to eliminate ambiguities and enhance conceptual depth in ro
|
|||||||
|
|
||||||
### Phase 1: Discovery & Validation
|
### Phase 1: Discovery & Validation
|
||||||
|
|
||||||
1. **Detect Session**: Use `--session` parameter or `.workflow/.active-*` marker
|
1. **Detect Session**: Use `--session` parameter or find `.workflow/sessions/WFS-*` directories
|
||||||
2. **Validate Files**:
|
2. **Validate Files**:
|
||||||
- `guidance-specification.md` (optional, warn if missing)
|
- `guidance-specification.md` (optional, warn if missing)
|
||||||
- `*/analysis*.md` (required, error if empty)
|
- `*/analysis*.md` (required, error if empty)
|
||||||
@@ -59,7 +59,7 @@ Three-phase workflow to eliminate ambiguities and enhance conceptual depth in ro
|
|||||||
**Main flow prepares file paths for Agent**:
|
**Main flow prepares file paths for Agent**:
|
||||||
|
|
||||||
1. **Discover Analysis Files**:
|
1. **Discover Analysis Files**:
|
||||||
- Glob(.workflow/WFS-{session}/.brainstorming/*/analysis*.md)
|
- Glob(.workflow/sessions/WFS-{session}/.brainstorming/*/analysis*.md)
|
||||||
- Supports: analysis.md, analysis-1.md, analysis-2.md, analysis-3.md
|
- Supports: analysis.md, analysis-1.md, analysis-2.md, analysis-3.md
|
||||||
- Validate: At least one file exists (error if empty)
|
- Validate: At least one file exists (error if empty)
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ Three-phase workflow to eliminate ambiguities and enhance conceptual depth in ro
|
|||||||
|
|
||||||
3. **Pass to Agent** (Phase 3):
|
3. **Pass to Agent** (Phase 3):
|
||||||
- `session_id`
|
- `session_id`
|
||||||
- `brainstorm_dir`: .workflow/WFS-{session}/.brainstorming/
|
- `brainstorm_dir`: .workflow/sessions/WFS-{session}/.brainstorming/
|
||||||
- `role_analysis_paths`: ["product-manager/analysis.md", "system-architect/analysis-1.md", ...]
|
- `role_analysis_paths`: ["product-manager/analysis.md", "system-architect/analysis-1.md", ...]
|
||||||
- `participating_roles`: ["product-manager", "system-architect", ...]
|
- `participating_roles`: ["product-manager", "system-architect", ...]
|
||||||
|
|
||||||
@@ -361,7 +361,7 @@ Updated {role2}/analysis.md with Clarifications section + enhanced content
|
|||||||
|
|
||||||
## Output
|
## Output
|
||||||
|
|
||||||
**Location**: `.workflow/WFS-{session}/.brainstorming/[role]/analysis*.md` (in-place updates)
|
**Location**: `.workflow/sessions/WFS-{session}/.brainstorming/[role]/analysis*.md` (in-place updates)
|
||||||
|
|
||||||
**Updated Structure**:
|
**Updated Structure**:
|
||||||
```markdown
|
```markdown
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
|||||||
### Phase 1: Session & Framework Detection
|
### Phase 1: Session & Framework Detection
|
||||||
```bash
|
```bash
|
||||||
# Check active session and framework
|
# Check active session and framework
|
||||||
CHECK: .workflow/.active-* marker files
|
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
|
||||||
IF active_session EXISTS:
|
IF active_session EXISTS:
|
||||||
session_id = get_active_session()
|
session_id = get_active_session()
|
||||||
brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
|
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
|
||||||
|
|
||||||
CHECK: brainstorm_dir/guidance-specification.md
|
CHECK: brainstorm_dir/guidance-specification.md
|
||||||
IF EXISTS:
|
IF EXISTS:
|
||||||
@@ -162,7 +162,7 @@ IF update_mode = "incremental":
|
|||||||
|
|
||||||
### Output Files
|
### Output Files
|
||||||
```
|
```
|
||||||
.workflow/WFS-[topic]/.brainstorming/
|
.workflow/sessions/WFS-[topic]/.brainstorming/
|
||||||
├── guidance-specification.md # Input: Framework (if exists)
|
├── guidance-specification.md # Input: Framework (if exists)
|
||||||
└── system-architect/
|
└── system-architect/
|
||||||
└── analysis.md # ★ OUTPUT: Framework-based analysis
|
└── analysis.md # ★ OUTPUT: Framework-based analysis
|
||||||
@@ -279,7 +279,7 @@ TodoWrite tracking for two-step process:
|
|||||||
|
|
||||||
### Output Location
|
### Output Location
|
||||||
```
|
```
|
||||||
.workflow/WFS-{topic-slug}/.brainstorming/system-architect/
|
.workflow/sessions/WFS-{topic-slug}/.brainstorming/system-architect/
|
||||||
├── analysis.md # Primary architecture analysis
|
├── analysis.md # Primary architecture analysis
|
||||||
├── architecture-design.md # Detailed system design and diagrams
|
├── architecture-design.md # Detailed system design and diagrams
|
||||||
├── technology-stack.md # Technology stack recommendations and justifications
|
├── technology-stack.md # Technology stack recommendations and justifications
|
||||||
@@ -340,7 +340,7 @@ Upon completion, update `workflow-session.json`:
|
|||||||
"system_architect": {
|
"system_architect": {
|
||||||
"status": "completed",
|
"status": "completed",
|
||||||
"completed_at": "timestamp",
|
"completed_at": "timestamp",
|
||||||
"output_directory": ".workflow/WFS-{topic}/.brainstorming/system-architect/",
|
"output_directory": ".workflow/sessions/WFS-{topic}/.brainstorming/system-architect/",
|
||||||
"key_insights": ["scalability_bottleneck", "architecture_pattern", "technology_recommendation"]
|
"key_insights": ["scalability_bottleneck", "architecture_pattern", "technology_recommendation"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,10 +48,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
|||||||
### Phase 1: Session & Framework Detection
|
### Phase 1: Session & Framework Detection
|
||||||
```bash
|
```bash
|
||||||
# Check active session and framework
|
# Check active session and framework
|
||||||
CHECK: .workflow/.active-* marker files
|
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
|
||||||
IF active_session EXISTS:
|
IF active_session EXISTS:
|
||||||
session_id = get_active_session()
|
session_id = get_active_session()
|
||||||
brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
|
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
|
||||||
|
|
||||||
CHECK: brainstorm_dir/guidance-specification.md
|
CHECK: brainstorm_dir/guidance-specification.md
|
||||||
IF EXISTS:
|
IF EXISTS:
|
||||||
@@ -88,13 +88,13 @@ Execute ui-designer analysis for existing topic framework
|
|||||||
|
|
||||||
## Context Loading
|
## Context Loading
|
||||||
ASSIGNED_ROLE: ui-designer
|
ASSIGNED_ROLE: ui-designer
|
||||||
OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/ui-designer/
|
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/ui-designer/
|
||||||
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
||||||
|
|
||||||
## Flow Control Steps
|
## Flow Control Steps
|
||||||
1. **load_topic_framework**
|
1. **load_topic_framework**
|
||||||
- Action: Load structured topic discussion framework
|
- Action: Load structured topic discussion framework
|
||||||
- Command: Read(.workflow/WFS-{session}/.brainstorming/guidance-specification.md)
|
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
|
||||||
- Output: topic_framework_content
|
- Output: topic_framework_content
|
||||||
|
|
||||||
2. **load_role_template**
|
2. **load_role_template**
|
||||||
@@ -104,7 +104,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
|||||||
|
|
||||||
3. **load_session_metadata**
|
3. **load_session_metadata**
|
||||||
- Action: Load session metadata and existing context
|
- Action: Load session metadata and existing context
|
||||||
- Command: Read(.workflow/WFS-{session}/workflow-session.json)
|
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
|
||||||
- Output: session_context
|
- Output: session_context
|
||||||
|
|
||||||
## Analysis Requirements
|
## Analysis Requirements
|
||||||
@@ -164,7 +164,7 @@ TodoWrite({
|
|||||||
|
|
||||||
### Framework-Based Analysis
|
### Framework-Based Analysis
|
||||||
```
|
```
|
||||||
.workflow/WFS-{session}/.brainstorming/ui-designer/
|
.workflow/sessions/WFS-{session}/.brainstorming/ui-designer/
|
||||||
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ TodoWrite({
|
|||||||
"ui_designer": {
|
"ui_designer": {
|
||||||
"status": "completed",
|
"status": "completed",
|
||||||
"framework_addressed": true,
|
"framework_addressed": true,
|
||||||
"output_location": ".workflow/WFS-{session}/.brainstorming/ui-designer/analysis.md",
|
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/ui-designer/analysis.md",
|
||||||
"framework_reference": "@../guidance-specification.md"
|
"framework_reference": "@../guidance-specification.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,10 +48,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
|||||||
### Phase 1: Session & Framework Detection
|
### Phase 1: Session & Framework Detection
|
||||||
```bash
|
```bash
|
||||||
# Check active session and framework
|
# Check active session and framework
|
||||||
CHECK: .workflow/.active-* marker files
|
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
|
||||||
IF active_session EXISTS:
|
IF active_session EXISTS:
|
||||||
session_id = get_active_session()
|
session_id = get_active_session()
|
||||||
brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
|
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
|
||||||
|
|
||||||
CHECK: brainstorm_dir/guidance-specification.md
|
CHECK: brainstorm_dir/guidance-specification.md
|
||||||
IF EXISTS:
|
IF EXISTS:
|
||||||
@@ -88,13 +88,13 @@ Execute ux-expert analysis for existing topic framework
|
|||||||
|
|
||||||
## Context Loading
|
## Context Loading
|
||||||
ASSIGNED_ROLE: ux-expert
|
ASSIGNED_ROLE: ux-expert
|
||||||
OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/ux-expert/
|
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/ux-expert/
|
||||||
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
||||||
|
|
||||||
## Flow Control Steps
|
## Flow Control Steps
|
||||||
1. **load_topic_framework**
|
1. **load_topic_framework**
|
||||||
- Action: Load structured topic discussion framework
|
- Action: Load structured topic discussion framework
|
||||||
- Command: Read(.workflow/WFS-{session}/.brainstorming/guidance-specification.md)
|
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
|
||||||
- Output: topic_framework_content
|
- Output: topic_framework_content
|
||||||
|
|
||||||
2. **load_role_template**
|
2. **load_role_template**
|
||||||
@@ -104,7 +104,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
|
|||||||
|
|
||||||
3. **load_session_metadata**
|
3. **load_session_metadata**
|
||||||
- Action: Load session metadata and existing context
|
- Action: Load session metadata and existing context
|
||||||
- Command: Read(.workflow/WFS-{session}/workflow-session.json)
|
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
|
||||||
- Output: session_context
|
- Output: session_context
|
||||||
|
|
||||||
## Analysis Requirements
|
## Analysis Requirements
|
||||||
@@ -164,7 +164,7 @@ TodoWrite({
|
|||||||
|
|
||||||
### Framework-Based Analysis
|
### Framework-Based Analysis
|
||||||
```
|
```
|
||||||
.workflow/WFS-{session}/.brainstorming/ux-expert/
|
.workflow/sessions/WFS-{session}/.brainstorming/ux-expert/
|
||||||
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ TodoWrite({
|
|||||||
"ux_expert": {
|
"ux_expert": {
|
||||||
"status": "completed",
|
"status": "completed",
|
||||||
"framework_addressed": true,
|
"framework_addressed": true,
|
||||||
"output_location": ".workflow/WFS-{session}/.brainstorming/ux-expert/analysis.md",
|
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/ux-expert/analysis.md",
|
||||||
"framework_reference": "@../guidance-specification.md"
|
"framework_reference": "@../guidance-specification.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ Mark the currently active workflow session as complete, analyze it for lessons l
|
|||||||
|
|
||||||
## Implementation Flow
|
## Implementation Flow
|
||||||
|
|
||||||
### Phase 1: Prepare for Archival (Minimal Manual Operations)
|
### Phase 1: Pre-Archival Preparation (Transactional Setup)
|
||||||
|
|
||||||
**Purpose**: Find active session, move to archive location, pass control to agent. Minimal operations.
|
**Purpose**: Find active session, create archiving marker to prevent concurrent operations. Session remains in active location for agent processing.
|
||||||
|
|
||||||
#### Step 1.1: Find Active Session and Get Name
|
#### Step 1.1: Find Active Session and Get Name
|
||||||
```bash
|
```bash
|
||||||
@@ -33,129 +33,202 @@ bash(basename .workflow/sessions/WFS-session-name)
|
|||||||
```
|
```
|
||||||
**Output**: Session name `WFS-session-name`
|
**Output**: Session name `WFS-session-name`
|
||||||
|
|
||||||
#### Step 1.2: Move Session to Archive
|
#### Step 1.2: Check for Existing Archiving Marker (Resume Detection)
|
||||||
```bash
|
```bash
|
||||||
# Create archive directory if needed
|
# Check if session is already being archived
|
||||||
bash(mkdir -p .workflow/archives/)
|
bash(test -f .workflow/sessions/WFS-session-name/.archiving && echo "RESUMING" || echo "NEW")
|
||||||
|
|
||||||
# Move session to archive location
|
|
||||||
bash(mv .workflow/sessions/WFS-session-name .workflow/archives/WFS-session-name)
|
|
||||||
```
|
```
|
||||||
**Result**: Session now at `.workflow/archives/WFS-session-name/`
|
|
||||||
|
|
||||||
### Phase 2: Agent-Orchestrated Completion (All Data Processing)
|
**If RESUMING**:
|
||||||
|
- Previous archival attempt was interrupted
|
||||||
|
- Skip to Phase 2 to resume agent analysis
|
||||||
|
|
||||||
**Purpose**: Agent analyzes archived session, generates metadata, updates manifest, and removes active marker.
|
**If NEW**:
|
||||||
|
- Continue to Step 1.3
|
||||||
|
|
||||||
|
#### Step 1.3: Create Archiving Marker
|
||||||
|
```bash
|
||||||
|
# Mark session as "archiving in progress"
|
||||||
|
bash(touch .workflow/sessions/WFS-session-name/.archiving)
|
||||||
|
```
|
||||||
|
**Purpose**:
|
||||||
|
- Prevents concurrent operations on this session
|
||||||
|
- Enables recovery if archival fails
|
||||||
|
- Session remains in `.workflow/sessions/` for agent analysis
|
||||||
|
|
||||||
|
**Result**: Session still at `.workflow/sessions/WFS-session-name/` with `.archiving` marker
|
||||||
|
|
||||||
|
### Phase 2: Agent Analysis (In-Place Processing)
|
||||||
|
|
||||||
|
**Purpose**: Agent analyzes session WHILE STILL IN ACTIVE LOCATION. Generates metadata but does NOT move files or update manifest.
|
||||||
|
|
||||||
#### Agent Invocation
|
#### Agent Invocation
|
||||||
|
|
||||||
Invoke `universal-executor` agent to complete the archival process.
|
Invoke `universal-executor` agent to analyze session and prepare archive metadata.
|
||||||
|
|
||||||
**Agent Task**:
|
**Agent Task**:
|
||||||
```
|
```
|
||||||
Task(
|
Task(
|
||||||
subagent_type="universal-executor",
|
subagent_type="universal-executor",
|
||||||
description="Complete session archival",
|
description="Analyze session for archival",
|
||||||
prompt=`
|
prompt=`
|
||||||
Complete workflow session archival. Session already moved to archive location.
|
Analyze workflow session for archival preparation. Session is STILL in active location.
|
||||||
|
|
||||||
## Context
|
## Context
|
||||||
- Session: .workflow/archives/WFS-session-name/
|
- Session: .workflow/sessions/WFS-session-name/
|
||||||
|
- Status: Marked as archiving (.archiving marker present)
|
||||||
|
- Location: Active sessions directory (NOT archived yet)
|
||||||
|
|
||||||
## Tasks
|
## Tasks
|
||||||
|
|
||||||
1. **Extract session data** from workflow-session.json (session_id, description/topic, started_at/timestamp, completed_at, status)
|
1. **Extract session data** from workflow-session.json
|
||||||
|
- session_id, description/topic, started_at, completed_at, status
|
||||||
- If status != "completed", update it with timestamp
|
- If status != "completed", update it with timestamp
|
||||||
|
|
||||||
2. **Count files**: tasks (.task/*.json) and summaries (.summaries/*.md)
|
2. **Count files**: tasks (.task/*.json) and summaries (.summaries/*.md)
|
||||||
|
|
||||||
3. **Generate lessons**: Use gemini with ~/.claude/workflows/cli-templates/prompts/archive/analysis-simple.txt (fallback: analyze files directly)
|
3. **Generate lessons**: Use gemini with ~/.claude/workflows/cli-templates/prompts/archive/analysis-simple.txt
|
||||||
- Return: {successes, challenges, watch_patterns}
|
- Return: {successes, challenges, watch_patterns}
|
||||||
|
|
||||||
4. **Build archive entry**:
|
4. **Build archive entry**:
|
||||||
- Calculate: duration_hours, success_rate, tags (3-5 keywords)
|
- Calculate: duration_hours, success_rate, tags (3-5 keywords)
|
||||||
- Construct complete JSON with session_id, description, archived_at, archive_path, metrics, tags, lessons
|
- Construct complete JSON with session_id, description, archived_at, metrics, tags, lessons
|
||||||
|
- Include archive_path: ".workflow/archives/WFS-session-name" (future location)
|
||||||
|
|
||||||
5. **Update manifest**: Initialize .workflow/archives/manifest.json if needed, append entry
|
5. **Extract feature metadata** (for Phase 4):
|
||||||
|
- Parse IMPL_PLAN.md for title (first # heading)
|
||||||
|
- Extract description (first paragraph, max 200 chars)
|
||||||
|
- Generate feature tags (3-5 keywords from content)
|
||||||
|
|
||||||
6. **Return result**: {"status": "success", "session_id": "...", "archived_at": "...", "metrics": {...}, "lessons_summary": {...}}
|
6. **Return result**: Complete metadata package for atomic commit
|
||||||
|
{
|
||||||
|
"status": "success",
|
||||||
|
"session_id": "WFS-session-name",
|
||||||
|
"archive_entry": {
|
||||||
|
"session_id": "...",
|
||||||
|
"description": "...",
|
||||||
|
"archived_at": "...",
|
||||||
|
"archive_path": ".workflow/archives/WFS-session-name",
|
||||||
|
"metrics": {...},
|
||||||
|
"tags": [...],
|
||||||
|
"lessons": {...}
|
||||||
|
},
|
||||||
|
"feature_metadata": {
|
||||||
|
"title": "...",
|
||||||
|
"description": "...",
|
||||||
|
"tags": [...]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
## Important Constraints
|
||||||
|
- DO NOT move or delete any files
|
||||||
|
- DO NOT update manifest.json yet
|
||||||
|
- Session remains in .workflow/sessions/ during analysis
|
||||||
|
- Return complete metadata package for orchestrator to commit atomically
|
||||||
|
|
||||||
## Error Handling
|
## Error Handling
|
||||||
- On failure: return {"status": "error", "task": "...", "message": "..."}
|
- On failure: return {"status": "error", "task": "...", "message": "..."}
|
||||||
|
- Do NOT modify any files on error
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
**Expected Output**:
|
**Expected Output**:
|
||||||
- Agent returns JSON result confirming successful archival
|
- Agent returns complete metadata package
|
||||||
- Display completion summary to user based on agent response
|
- Session remains in `.workflow/sessions/` with `.archiving` marker
|
||||||
|
- No files moved or manifests updated yet
|
||||||
|
|
||||||
## Workflow Execution Strategy
|
### Phase 3: Atomic Commit (Transactional File Operations)
|
||||||
|
|
||||||
### Two-Phase Approach (Optimized)
|
**Purpose**: Atomically commit all changes. Only execute if Phase 2 succeeds.
|
||||||
|
|
||||||
**Phase 1: Minimal Manual Setup** (2 simple operations)
|
#### Step 3.1: Create Archive Directory
|
||||||
- Find active session and extract name
|
```bash
|
||||||
- Move session to archive location
|
bash(mkdir -p .workflow/archives/)
|
||||||
- **No data extraction** - agent handles all data processing
|
```
|
||||||
- **No counting** - agent does this from archive location
|
|
||||||
- **Total**: 2 bash commands (find + move)
|
|
||||||
|
|
||||||
**Phase 2: Agent-Driven Completion** (1 agent invocation)
|
#### Step 3.2: Move Session to Archive
|
||||||
- Extract all session data from archived location
|
```bash
|
||||||
- Count tasks and summaries
|
bash(mv .workflow/sessions/WFS-session-name .workflow/archives/WFS-session-name)
|
||||||
- Generate lessons learned analysis
|
```
|
||||||
- Build complete archive metadata
|
**Result**: Session now at `.workflow/archives/WFS-session-name/`
|
||||||
- Update manifest
|
|
||||||
- Return success/error result
|
|
||||||
|
|
||||||
### Phase 3: Update Project Feature Registry
|
#### Step 3.3: Update Manifest
|
||||||
|
```bash
|
||||||
|
# Read current manifest (or create empty array if not exists)
|
||||||
|
bash(test -f .workflow/archives/manifest.json && cat .workflow/archives/manifest.json || echo "[]")
|
||||||
|
```
|
||||||
|
|
||||||
|
**JSON Update Logic**:
|
||||||
|
```javascript
|
||||||
|
// Read agent result from Phase 2
|
||||||
|
const agentResult = JSON.parse(agentOutput);
|
||||||
|
const archiveEntry = agentResult.archive_entry;
|
||||||
|
|
||||||
|
// Read existing manifest
|
||||||
|
let manifest = [];
|
||||||
|
try {
|
||||||
|
const manifestContent = Read('.workflow/archives/manifest.json');
|
||||||
|
manifest = JSON.parse(manifestContent);
|
||||||
|
} catch {
|
||||||
|
manifest = []; // Initialize if not exists
|
||||||
|
}
|
||||||
|
|
||||||
|
// Append new entry
|
||||||
|
manifest.push(archiveEntry);
|
||||||
|
|
||||||
|
// Write back
|
||||||
|
Write('.workflow/archives/manifest.json', JSON.stringify(manifest, null, 2));
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Step 3.4: Remove Archiving Marker
|
||||||
|
```bash
|
||||||
|
bash(rm .workflow/archives/WFS-session-name/.archiving)
|
||||||
|
```
|
||||||
|
**Result**: Clean archived session without temporary markers
|
||||||
|
|
||||||
|
**Output Confirmation**:
|
||||||
|
```
|
||||||
|
✓ Session "${sessionId}" archived successfully
|
||||||
|
Location: .workflow/archives/WFS-session-name/
|
||||||
|
Lessons: ${archiveEntry.lessons.successes.length} successes, ${archiveEntry.lessons.challenges.length} challenges
|
||||||
|
Manifest: Updated with ${manifest.length} total sessions
|
||||||
|
```
|
||||||
|
|
||||||
|
### Phase 4: Update Project Feature Registry
|
||||||
|
|
||||||
**Purpose**: Record completed session as a project feature in `.workflow/project.json`.
|
**Purpose**: Record completed session as a project feature in `.workflow/project.json`.
|
||||||
|
|
||||||
**Execution**: After agent successfully completes archival, extract feature information and update project registry.
|
**Execution**: Uses feature metadata from Phase 2 agent result to update project registry.
|
||||||
|
|
||||||
#### Step 3.1: Check Project State Exists
|
#### Step 4.1: Check Project State Exists
|
||||||
```bash
|
```bash
|
||||||
bash(test -f .workflow/project.json && echo "EXISTS" || echo "SKIP")
|
bash(test -f .workflow/project.json && echo "EXISTS" || echo "SKIP")
|
||||||
```
|
```
|
||||||
|
|
||||||
**If SKIP**: Output warning and skip Phase 3
|
**If SKIP**: Output warning and skip Phase 4
|
||||||
```
|
```
|
||||||
WARNING: No project.json found. Run /workflow:session:start to initialize.
|
WARNING: No project.json found. Run /workflow:session:start to initialize.
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Step 3.2: Extract Feature Information (Simple Text Processing)
|
#### Step 4.2: Extract Feature Information from Agent Result
|
||||||
|
|
||||||
```bash
|
**Data Processing** (Uses Phase 2 agent output):
|
||||||
# Read archived IMPL_PLAN.md
|
|
||||||
bash(cat .workflow/archives/WFS-session-name/IMPL_PLAN.md | head -20)
|
|
||||||
```
|
|
||||||
|
|
||||||
**Data Processing** (No agent needed):
|
|
||||||
1. Extract feature title: First `#` heading line
|
|
||||||
2. Extract description: First paragraph after heading (max 200 chars)
|
|
||||||
3. Get session_id from archive path
|
|
||||||
4. Get completion timestamp
|
|
||||||
|
|
||||||
**Extraction Logic**:
|
|
||||||
```javascript
|
```javascript
|
||||||
// Read IMPL_PLAN.md
|
// Extract feature metadata from agent result
|
||||||
const planContent = Read(`${archivePath}/IMPL_PLAN.md`);
|
const agentResult = JSON.parse(agentOutput);
|
||||||
|
const featureMeta = agentResult.feature_metadata;
|
||||||
|
|
||||||
// Extract title (first # heading)
|
// Data already prepared by agent:
|
||||||
const titleMatch = planContent.match(/^#\s+(.+)$/m);
|
const title = featureMeta.title;
|
||||||
const title = titleMatch ? titleMatch[1].trim() : sessionId.replace('WFS-', '');
|
const description = featureMeta.description;
|
||||||
|
const tags = featureMeta.tags;
|
||||||
// Extract description (first paragraph, max 200 chars)
|
|
||||||
const descMatch = planContent.match(/^#[^\n]+\n\n([^\n]+)/m);
|
|
||||||
const description = descMatch ? descMatch[1].substring(0, 200).trim() : '';
|
|
||||||
|
|
||||||
// Create feature ID (lowercase slug)
|
// Create feature ID (lowercase slug)
|
||||||
const featureId = title.toLowerCase().replace(/[^a-z0-9]+/g, '-').substring(0, 50);
|
const featureId = title.toLowerCase().replace(/[^a-z0-9]+/g, '-').substring(0, 50);
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Step 3.3: Update project.json
|
#### Step 4.3: Update project.json
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Read current project state
|
# Read current project state
|
||||||
@@ -245,7 +318,7 @@ function getLatestCommitHash() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Step 3.4: Output Confirmation
|
#### Step 4.4: Output Confirmation
|
||||||
|
|
||||||
```
|
```
|
||||||
✓ Feature "${title}" added to project registry
|
✓ Feature "${title}" added to project registry
|
||||||
@@ -256,7 +329,162 @@ function getLatestCommitHash() {
|
|||||||
|
|
||||||
**Error Handling**:
|
**Error Handling**:
|
||||||
- If project.json malformed: Output error, skip update
|
- If project.json malformed: Output error, skip update
|
||||||
- If IMPL_PLAN.md missing: Use session_id as title
|
- If feature_metadata missing from agent result: Skip Phase 4
|
||||||
- If extraction fails: Use minimal defaults
|
- If extraction fails: Use minimal defaults
|
||||||
|
|
||||||
**Phase 3 Total Commands**: 2 bash reads + JSON manipulation
|
**Phase 4 Total Commands**: 1 bash read + JSON manipulation
|
||||||
|
|
||||||
|
## Error Recovery
|
||||||
|
|
||||||
|
### If Agent Fails (Phase 2)
|
||||||
|
|
||||||
|
**Symptoms**:
|
||||||
|
- Agent returns `{"status": "error", ...}`
|
||||||
|
- Agent crashes or times out
|
||||||
|
- Analysis incomplete
|
||||||
|
|
||||||
|
**Recovery Steps**:
|
||||||
|
```bash
|
||||||
|
# Session still in .workflow/sessions/WFS-session-name
|
||||||
|
# Remove archiving marker
|
||||||
|
bash(rm .workflow/sessions/WFS-session-name/.archiving)
|
||||||
|
```
|
||||||
|
|
||||||
|
**User Notification**:
|
||||||
|
```
|
||||||
|
ERROR: Session archival failed during analysis phase
|
||||||
|
Reason: [error message from agent]
|
||||||
|
Session remains active in: .workflow/sessions/WFS-session-name
|
||||||
|
|
||||||
|
Recovery:
|
||||||
|
1. Fix any issues identified in error message
|
||||||
|
2. Retry: /workflow:session:complete
|
||||||
|
|
||||||
|
Session state: SAFE (no changes committed)
|
||||||
|
```
|
||||||
|
|
||||||
|
### If Move Fails (Phase 3)
|
||||||
|
|
||||||
|
**Symptoms**:
|
||||||
|
- `mv` command fails
|
||||||
|
- Permission denied
|
||||||
|
- Disk full
|
||||||
|
|
||||||
|
**Recovery Steps**:
|
||||||
|
```bash
|
||||||
|
# Archiving marker still present
|
||||||
|
# Session still in .workflow/sessions/ (move failed)
|
||||||
|
# No manifest updated yet
|
||||||
|
```
|
||||||
|
|
||||||
|
**User Notification**:
|
||||||
|
```
|
||||||
|
ERROR: Session archival failed during move operation
|
||||||
|
Reason: [mv error message]
|
||||||
|
Session remains in: .workflow/sessions/WFS-session-name
|
||||||
|
|
||||||
|
Recovery:
|
||||||
|
1. Fix filesystem issues (permissions, disk space)
|
||||||
|
2. Retry: /workflow:session:complete
|
||||||
|
- System will detect .archiving marker
|
||||||
|
- Will resume from Phase 2 (agent analysis)
|
||||||
|
|
||||||
|
Session state: SAFE (analysis complete, ready to retry move)
|
||||||
|
```
|
||||||
|
|
||||||
|
### If Manifest Update Fails (Phase 3)
|
||||||
|
|
||||||
|
**Symptoms**:
|
||||||
|
- JSON parsing error
|
||||||
|
- Write permission denied
|
||||||
|
- Session moved but manifest not updated
|
||||||
|
|
||||||
|
**Recovery Steps**:
|
||||||
|
```bash
|
||||||
|
# Session moved to .workflow/archives/WFS-session-name
|
||||||
|
# Manifest NOT updated
|
||||||
|
# Archiving marker still present in archived location
|
||||||
|
```
|
||||||
|
|
||||||
|
**User Notification**:
|
||||||
|
```
|
||||||
|
ERROR: Session archived but manifest update failed
|
||||||
|
Reason: [error message]
|
||||||
|
Session location: .workflow/archives/WFS-session-name
|
||||||
|
|
||||||
|
Recovery:
|
||||||
|
1. Fix manifest.json issues (syntax, permissions)
|
||||||
|
2. Manual manifest update:
|
||||||
|
- Add archive entry from agent output
|
||||||
|
- Remove .archiving marker: rm .workflow/archives/WFS-session-name/.archiving
|
||||||
|
|
||||||
|
Session state: PARTIALLY COMPLETE (session archived, manifest needs update)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Workflow Execution Strategy
|
||||||
|
|
||||||
|
### Transactional Four-Phase Approach
|
||||||
|
|
||||||
|
**Phase 1: Pre-Archival Preparation** (Marker creation)
|
||||||
|
- Find active session and extract name
|
||||||
|
- Check for existing `.archiving` marker (resume detection)
|
||||||
|
- Create `.archiving` marker if new
|
||||||
|
- **No data processing** - just state tracking
|
||||||
|
- **Total**: 2-3 bash commands (find + marker check/create)
|
||||||
|
|
||||||
|
**Phase 2: Agent Analysis** (Read-only data processing)
|
||||||
|
- Extract all session data from active location
|
||||||
|
- Count tasks and summaries
|
||||||
|
- Generate lessons learned analysis
|
||||||
|
- Extract feature metadata from IMPL_PLAN.md
|
||||||
|
- Build complete archive + feature metadata package
|
||||||
|
- **No file modifications** - pure analysis
|
||||||
|
- **Total**: 1 agent invocation
|
||||||
|
|
||||||
|
**Phase 3: Atomic Commit** (Transactional file operations)
|
||||||
|
- Create archive directory
|
||||||
|
- Move session to archive location
|
||||||
|
- Update manifest.json with archive entry
|
||||||
|
- Remove `.archiving` marker
|
||||||
|
- **All-or-nothing**: Either all succeed or session remains in safe state
|
||||||
|
- **Total**: 4 bash commands + JSON manipulation
|
||||||
|
|
||||||
|
**Phase 4: Project Registry Update** (Optional feature tracking)
|
||||||
|
- Check project.json exists
|
||||||
|
- Use feature metadata from Phase 2 agent result
|
||||||
|
- Build feature object with complete traceability
|
||||||
|
- Update project statistics
|
||||||
|
- **Independent**: Can fail without affecting archival
|
||||||
|
- **Total**: 1 bash read + JSON manipulation
|
||||||
|
|
||||||
|
### Transactional Guarantees
|
||||||
|
|
||||||
|
**State Consistency**:
|
||||||
|
- Session NEVER in inconsistent state
|
||||||
|
- `.archiving` marker enables safe resume
|
||||||
|
- Agent failure leaves session in recoverable state
|
||||||
|
- Move/manifest operations grouped in Phase 3
|
||||||
|
|
||||||
|
**Failure Isolation**:
|
||||||
|
- Phase 1 failure: No changes made
|
||||||
|
- Phase 2 failure: Session still active, can retry
|
||||||
|
- Phase 3 failure: Clear error state, manual recovery documented
|
||||||
|
- Phase 4 failure: Does not affect archival success
|
||||||
|
|
||||||
|
**Resume Capability**:
|
||||||
|
- Detect interrupted archival via `.archiving` marker
|
||||||
|
- Resume from Phase 2 (skip marker creation)
|
||||||
|
- Idempotent operations (safe to retry)
|
||||||
|
|
||||||
|
### Benefits Over Previous Design
|
||||||
|
|
||||||
|
**Old Design Weakness**:
|
||||||
|
- Move first → agent second
|
||||||
|
- Agent failure → session moved but metadata incomplete
|
||||||
|
- Inconsistent state requires manual cleanup
|
||||||
|
|
||||||
|
**New Design Strengths**:
|
||||||
|
- Agent first → move second
|
||||||
|
- Agent failure → session still active, safe to retry
|
||||||
|
- Transactional commit → all-or-nothing file operations
|
||||||
|
- Marker-based state → resume capability
|
||||||
|
|||||||
@@ -19,35 +19,35 @@ Display all workflow sessions with their current status, progress, and metadata.
|
|||||||
|
|
||||||
### Step 1: Find All Sessions
|
### Step 1: Find All Sessions
|
||||||
```bash
|
```bash
|
||||||
ls .workflow/WFS-* 2>/dev/null
|
ls .workflow/sessions/WFS-* 2>/dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 2: Check Active Session
|
### Step 2: Check Active Session
|
||||||
```bash
|
```bash
|
||||||
ls .workflow/.active-* 2>/dev/null | head -1
|
find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null | head -1
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 3: Read Session Metadata
|
### Step 3: Read Session Metadata
|
||||||
```bash
|
```bash
|
||||||
jq -r '.session_id, .status, .project' .workflow/WFS-session/workflow-session.json
|
jq -r '.session_id, .status, .project' .workflow/sessions/WFS-session/workflow-session.json
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 4: Count Task Progress
|
### Step 4: Count Task Progress
|
||||||
```bash
|
```bash
|
||||||
find .workflow/WFS-session/.task/ -name "*.json" -type f 2>/dev/null | wc -l
|
find .workflow/sessions/WFS-session/.task/ -name "*.json" -type f 2>/dev/null | wc -l
|
||||||
find .workflow/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
|
find .workflow/sessions/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 5: Get Creation Time
|
### Step 5: Get Creation Time
|
||||||
```bash
|
```bash
|
||||||
jq -r '.created_at // "unknown"' .workflow/WFS-session/workflow-session.json
|
jq -r '.created_at // "unknown"' .workflow/sessions/WFS-session/workflow-session.json
|
||||||
```
|
```
|
||||||
|
|
||||||
## Simple Bash Commands
|
## Simple Bash Commands
|
||||||
|
|
||||||
### Basic Operations
|
### Basic Operations
|
||||||
- **List sessions**: `find .workflow/ -maxdepth 1 -type d -name "WFS-*"`
|
- **List sessions**: `find .workflow/sessions/ -name "WFS-*" -type d`
|
||||||
- **Find active**: `find .workflow/ -name ".active-*" -type f`
|
- **Find active**: `find .workflow/sessions/ -name "WFS-*" -type d`
|
||||||
- **Read session data**: `jq -r '.session_id, .status' session.json`
|
- **Read session data**: `jq -r '.session_id, .status' session.json`
|
||||||
- **Count tasks**: `find .task/ -name "*.json" -type f | wc -l`
|
- **Count tasks**: `find .task/ -name "*.json" -type f | wc -l`
|
||||||
- **Count completed**: `find .summaries/ -name "*.md" -type f 2>/dev/null | wc -l`
|
- **Count completed**: `find .summaries/ -name "*.md" -type f 2>/dev/null | wc -l`
|
||||||
@@ -89,11 +89,8 @@ Total: 3 sessions (1 active, 1 paused, 1 completed)
|
|||||||
### Quick Commands
|
### Quick Commands
|
||||||
```bash
|
```bash
|
||||||
# Count all sessions
|
# Count all sessions
|
||||||
ls .workflow/WFS-* | wc -l
|
ls .workflow/sessions/WFS-* | wc -l
|
||||||
|
|
||||||
# Show only active
|
|
||||||
ls .workflow/.active-* | basename | sed 's/^\.active-//'
|
|
||||||
|
|
||||||
# Show recent sessions
|
# Show recent sessions
|
||||||
ls -t .workflow/WFS-*/workflow-session.json | head -3
|
ls -t .workflow/sessions/WFS-*/workflow-session.json | head -3
|
||||||
```
|
```
|
||||||
@@ -17,45 +17,39 @@ Resume the most recently paused workflow session, restoring all context and stat
|
|||||||
|
|
||||||
### Step 1: Find Paused Sessions
|
### Step 1: Find Paused Sessions
|
||||||
```bash
|
```bash
|
||||||
ls .workflow/WFS-* 2>/dev/null
|
ls .workflow/sessions/WFS-* 2>/dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 2: Check Session Status
|
### Step 2: Check Session Status
|
||||||
```bash
|
```bash
|
||||||
jq -r '.status' .workflow/WFS-session/workflow-session.json
|
jq -r '.status' .workflow/sessions/WFS-session/workflow-session.json
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 3: Find Most Recent Paused
|
### Step 3: Find Most Recent Paused
|
||||||
```bash
|
```bash
|
||||||
ls -t .workflow/WFS-*/workflow-session.json | head -1
|
ls -t .workflow/sessions/WFS-*/workflow-session.json | head -1
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 4: Update Session Status
|
### Step 4: Update Session Status
|
||||||
```bash
|
```bash
|
||||||
jq '.status = "active"' .workflow/WFS-session/workflow-session.json > temp.json
|
jq '.status = "active"' .workflow/sessions/WFS-session/workflow-session.json > temp.json
|
||||||
mv temp.json .workflow/WFS-session/workflow-session.json
|
mv temp.json .workflow/sessions/WFS-session/workflow-session.json
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 5: Add Resume Timestamp
|
### Step 5: Add Resume Timestamp
|
||||||
```bash
|
```bash
|
||||||
jq '.resumed_at = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"' .workflow/WFS-session/workflow-session.json > temp.json
|
jq '.resumed_at = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"' .workflow/sessions/WFS-session/workflow-session.json > temp.json
|
||||||
mv temp.json .workflow/WFS-session/workflow-session.json
|
mv temp.json .workflow/sessions/WFS-session/workflow-session.json
|
||||||
```
|
|
||||||
|
|
||||||
### Step 6: Create Active Marker
|
|
||||||
```bash
|
|
||||||
touch .workflow/.active-WFS-session-name
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Simple Bash Commands
|
## Simple Bash Commands
|
||||||
|
|
||||||
### Basic Operations
|
### Basic Operations
|
||||||
- **List sessions**: `ls .workflow/WFS-*`
|
- **List sessions**: `ls .workflow/sessions/WFS-*`
|
||||||
- **Check status**: `jq -r '.status' session.json`
|
- **Check status**: `jq -r '.status' session.json`
|
||||||
- **Find recent**: `ls -t .workflow/*/workflow-session.json | head -1`
|
- **Find recent**: `ls -t .workflow/sessions/*/workflow-session.json | head -1`
|
||||||
- **Update status**: `jq '.status = "active"' session.json > temp.json`
|
- **Update status**: `jq '.status = "active"' session.json > temp.json`
|
||||||
- **Add timestamp**: `jq '.resumed_at = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"'`
|
- **Add timestamp**: `jq '.resumed_at = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"'`
|
||||||
- **Create marker**: `touch .workflow/.active-session`
|
|
||||||
|
|
||||||
### Resume Result
|
### Resume Result
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -496,7 +496,7 @@ Supports action-planning-agent for more autonomous TDD planning with:
|
|||||||
|
|
||||||
**Session Structure**:
|
**Session Structure**:
|
||||||
```
|
```
|
||||||
.workflow/WFS-xxx/
|
.workflow/sessions/WFS-xxx/
|
||||||
├── IMPL_PLAN.md (unified plan with TDD Implementation Tasks section)
|
├── IMPL_PLAN.md (unified plan with TDD Implementation Tasks section)
|
||||||
├── TODO_LIST.md (with internal TDD phase indicators)
|
├── TODO_LIST.md (with internal TDD phase indicators)
|
||||||
├── .process/
|
├── .process/
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(gemini:*)
|
|||||||
sessionId = argument
|
sessionId = argument
|
||||||
|
|
||||||
# Else auto-detect active session
|
# Else auto-detect active session
|
||||||
find .workflow/ -name '.active-*' | head -1 | sed 's/.*active-//'
|
find .workflow/sessions/ -name "WFS-*" -type d | head -1 | sed 's/.*\///'
|
||||||
```
|
```
|
||||||
|
|
||||||
**Extract**: sessionId
|
**Extract**: sessionId
|
||||||
@@ -44,18 +44,18 @@ find .workflow/ -name '.active-*' | head -1 | sed 's/.*active-//'
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Load all task JSONs
|
# Load all task JSONs
|
||||||
find .workflow/{sessionId}/.task/ -name '*.json'
|
find .workflow/sessions/{sessionId}/.task/ -name '*.json'
|
||||||
|
|
||||||
# Extract task IDs
|
# Extract task IDs
|
||||||
find .workflow/{sessionId}/.task/ -name '*.json' -exec jq -r '.id' {} \;
|
find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.id' {} \;
|
||||||
|
|
||||||
# Check dependencies
|
# Check dependencies
|
||||||
find .workflow/{sessionId}/.task/ -name 'IMPL-*.json' -exec jq -r '.context.depends_on[]?' {} \;
|
find .workflow/sessions/{sessionId}/.task/ -name 'IMPL-*.json' -exec jq -r '.context.depends_on[]?' {} \;
|
||||||
find .workflow/{sessionId}/.task/ -name 'REFACTOR-*.json' -exec jq -r '.context.depends_on[]?' {} \;
|
find .workflow/sessions/{sessionId}/.task/ -name 'REFACTOR-*.json' -exec jq -r '.context.depends_on[]?' {} \;
|
||||||
|
|
||||||
# Check meta fields
|
# Check meta fields
|
||||||
find .workflow/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.tdd_phase' {} \;
|
find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.tdd_phase' {} \;
|
||||||
find .workflow/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.agent' {} \;
|
find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.agent' {} \;
|
||||||
```
|
```
|
||||||
|
|
||||||
**Validation**:
|
**Validation**:
|
||||||
@@ -82,9 +82,9 @@ find .workflow/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.agent' {} \;
|
|||||||
- Compliance score
|
- Compliance score
|
||||||
|
|
||||||
**Validation**:
|
**Validation**:
|
||||||
- `.workflow/{sessionId}/.process/test-results.json` exists
|
- `.workflow/sessions/{sessionId}/.process/test-results.json` exists
|
||||||
- `.workflow/{sessionId}/.process/coverage-report.json` exists
|
- `.workflow/sessions/{sessionId}/.process/coverage-report.json` exists
|
||||||
- `.workflow/{sessionId}/.process/tdd-cycle-report.md` exists
|
- `.workflow/sessions/{sessionId}/.process/tdd-cycle-report.md` exists
|
||||||
|
|
||||||
**TodoWrite**: Mark phase 3 completed, phase 4 in_progress
|
**TodoWrite**: Mark phase 3 completed, phase 4 in_progress
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ find .workflow/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.agent' {} \;
|
|||||||
cd project-root && gemini -p "
|
cd project-root && gemini -p "
|
||||||
PURPOSE: Generate TDD compliance report
|
PURPOSE: Generate TDD compliance report
|
||||||
TASK: Analyze TDD workflow execution and generate quality report
|
TASK: Analyze TDD workflow execution and generate quality report
|
||||||
CONTEXT: @{.workflow/{sessionId}/.task/*.json,.workflow/{sessionId}/.summaries/*,.workflow/{sessionId}/.process/tdd-cycle-report.md}
|
CONTEXT: @{.workflow/sessions/{sessionId}/.task/*.json,.workflow/sessions/{sessionId}/.summaries/*,.workflow/sessions/{sessionId}/.process/tdd-cycle-report.md}
|
||||||
EXPECTED:
|
EXPECTED:
|
||||||
- TDD compliance score (0-100)
|
- TDD compliance score (0-100)
|
||||||
- Chain completeness verification
|
- Chain completeness verification
|
||||||
@@ -106,7 +106,7 @@ EXPECTED:
|
|||||||
- Red-Green-Refactor cycle validation
|
- Red-Green-Refactor cycle validation
|
||||||
- Best practices adherence assessment
|
- Best practices adherence assessment
|
||||||
RULES: Focus on TDD best practices and workflow adherence. Be specific about violations and improvements.
|
RULES: Focus on TDD best practices and workflow adherence. Be specific about violations and improvements.
|
||||||
" > .workflow/{sessionId}/TDD_COMPLIANCE_REPORT.md
|
" > .workflow/sessions/{sessionId}/TDD_COMPLIANCE_REPORT.md
|
||||||
```
|
```
|
||||||
|
|
||||||
**Output**: TDD_COMPLIANCE_REPORT.md
|
**Output**: TDD_COMPLIANCE_REPORT.md
|
||||||
@@ -134,7 +134,7 @@ Function Coverage: {percentage}%
|
|||||||
|
|
||||||
## Compliance Score: {score}/100
|
## Compliance Score: {score}/100
|
||||||
|
|
||||||
Detailed report: .workflow/{sessionId}/TDD_COMPLIANCE_REPORT.md
|
Detailed report: .workflow/sessions/{sessionId}/TDD_COMPLIANCE_REPORT.md
|
||||||
|
|
||||||
Recommendations:
|
Recommendations:
|
||||||
- Complete missing REFACTOR-3.1 task
|
- Complete missing REFACTOR-3.1 task
|
||||||
@@ -168,7 +168,7 @@ TodoWrite({todos: [
|
|||||||
|
|
||||||
### Chain Validation Algorithm
|
### Chain Validation Algorithm
|
||||||
```
|
```
|
||||||
1. Load all task JSONs from .workflow/{sessionId}/.task/
|
1. Load all task JSONs from .workflow/sessions/{sessionId}/.task/
|
||||||
2. Extract task IDs and group by feature number
|
2. Extract task IDs and group by feature number
|
||||||
3. For each feature:
|
3. For each feature:
|
||||||
- Check TEST-N.M exists
|
- Check TEST-N.M exists
|
||||||
@@ -202,7 +202,7 @@ Final Score: Max(0, Base Score - Deductions)
|
|||||||
|
|
||||||
## Output Files
|
## Output Files
|
||||||
```
|
```
|
||||||
.workflow/{session-id}/
|
.workflow/sessions/{session-id}/
|
||||||
├── TDD_COMPLIANCE_REPORT.md # Comprehensive compliance report ⭐
|
├── TDD_COMPLIANCE_REPORT.md # Comprehensive compliance report ⭐
|
||||||
└── .process/
|
└── .process/
|
||||||
├── test-results.json # From tdd-coverage-analysis
|
├── test-results.json # From tdd-coverage-analysis
|
||||||
@@ -215,8 +215,8 @@ Final Score: Max(0, Base Score - Deductions)
|
|||||||
### Session Discovery Errors
|
### Session Discovery Errors
|
||||||
| Error | Cause | Resolution |
|
| Error | Cause | Resolution |
|
||||||
|-------|-------|------------|
|
|-------|-------|------------|
|
||||||
| No active session | No .active-* file | Provide session-id explicitly |
|
| No active session | No WFS-* directories | Provide session-id explicitly |
|
||||||
| Multiple active sessions | Multiple .active-* files | Provide session-id explicitly |
|
| Multiple active sessions | Multiple WFS-* directories | Provide session-id explicitly |
|
||||||
| Session not found | Invalid session-id | Check available sessions |
|
| Session not found | Invalid session-id | Check available sessions |
|
||||||
|
|
||||||
### Validation Errors
|
### Validation Errors
|
||||||
|
|||||||
@@ -543,7 +543,7 @@ This package is passed to agents via the Task tool's prompt context.
|
|||||||
"coverage_target": 80
|
"coverage_target": 80
|
||||||
},
|
},
|
||||||
"session": {
|
"session": {
|
||||||
"workflow_dir": ".workflow/WFS-test-{session}/",
|
"workflow_dir": ".workflow/sessions/WFS-test-{session}/",
|
||||||
"iteration_state_file": ".process/iteration-state.json",
|
"iteration_state_file": ".process/iteration-state.json",
|
||||||
"test_results_file": ".process/test-results.json",
|
"test_results_file": ".process/test-results.json",
|
||||||
"fix_history_file": ".process/fix-history.json"
|
"fix_history_file": ".process/fix-history.json"
|
||||||
@@ -555,7 +555,7 @@ This package is passed to agents via the Task tool's prompt context.
|
|||||||
|
|
||||||
### Test-Fix Session Files
|
### Test-Fix Session Files
|
||||||
```
|
```
|
||||||
.workflow/WFS-test-{session}/
|
.workflow/sessions/WFS-test-{session}/
|
||||||
├── workflow-session.json # Session metadata with workflow_type
|
├── workflow-session.json # Session metadata with workflow_type
|
||||||
├── IMPL_PLAN.md # Test plan
|
├── IMPL_PLAN.md # Test plan
|
||||||
├── TODO_LIST.md # Progress tracking
|
├── TODO_LIST.md # Progress tracking
|
||||||
|
|||||||
@@ -513,7 +513,7 @@ If quality gate fails:
|
|||||||
|
|
||||||
### Output Files Structure
|
### Output Files Structure
|
||||||
|
|
||||||
Created in `.workflow/WFS-test-[session]/`:
|
Created in `.workflow/sessions/WFS-test-[session]/`:
|
||||||
|
|
||||||
```
|
```
|
||||||
WFS-test-[session]/
|
WFS-test-[session]/
|
||||||
@@ -579,7 +579,7 @@ Test-Fix-Gen Workflow Orchestrator (Dual-Mode Support)
|
|||||||
└─ Command ends, control returns to user
|
└─ Command ends, control returns to user
|
||||||
|
|
||||||
Artifacts Created:
|
Artifacts Created:
|
||||||
├── .workflow/WFS-test-[session]/
|
├── .workflow/sessions/WFS-test-[session]/
|
||||||
│ ├── workflow-session.json
|
│ ├── workflow-session.json
|
||||||
│ ├── IMPL_PLAN.md
|
│ ├── IMPL_PLAN.md
|
||||||
│ ├── TODO_LIST.md
|
│ ├── TODO_LIST.md
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ Test-Gen Workflow Orchestrator
|
|||||||
└─ Command ends, control returns to user
|
└─ Command ends, control returns to user
|
||||||
|
|
||||||
Artifacts Created:
|
Artifacts Created:
|
||||||
├── .workflow/WFS-test-[session]/
|
├── .workflow/sessions/WFS-test-[session]/
|
||||||
│ ├── workflow-session.json
|
│ ├── workflow-session.json
|
||||||
│ ├── IMPL_PLAN.md
|
│ ├── IMPL_PLAN.md
|
||||||
│ ├── TODO_LIST.md
|
│ ├── TODO_LIST.md
|
||||||
@@ -444,7 +444,7 @@ See `/workflow:tools:test-task-generate` for complete task JSON schemas.
|
|||||||
|
|
||||||
## Output Files
|
## Output Files
|
||||||
|
|
||||||
Created in `.workflow/WFS-test-[session]/`:
|
Created in `.workflow/sessions/WFS-test-[session]/`:
|
||||||
- `workflow-session.json` - Session metadata
|
- `workflow-session.json` - Session metadata
|
||||||
- `.process/test-context-package.json` - Coverage analysis
|
- `.process/test-context-package.json` - Coverage analysis
|
||||||
- `.process/TEST_ANALYSIS_RESULTS.md` - Test requirements
|
- `.process/TEST_ANALYSIS_RESULTS.md` - Test requirements
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ name: conflict-resolution
|
|||||||
description: Detect and resolve conflicts between plan and existing codebase using CLI-powered analysis with Gemini/Qwen
|
description: Detect and resolve conflicts between plan and existing codebase using CLI-powered analysis with Gemini/Qwen
|
||||||
argument-hint: "--session WFS-session-id --context path/to/context-package.json"
|
argument-hint: "--session WFS-session-id --context path/to/context-package.json"
|
||||||
examples:
|
examples:
|
||||||
- /workflow:tools:conflict-resolution --session WFS-auth --context .workflow/WFS-auth/.process/context-package.json
|
- /workflow:tools:conflict-resolution --session WFS-auth --context .workflow/sessions/WFS-auth/.process/context-package.json
|
||||||
- /workflow:tools:conflict-resolution --session WFS-payment --context .workflow/WFS-payment/.process/context-package.json
|
- /workflow:tools:conflict-resolution --session WFS-payment --context .workflow/sessions/WFS-payment/.process/context-package.json
|
||||||
---
|
---
|
||||||
|
|
||||||
# Conflict Resolution Command
|
# Conflict Resolution Command
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ The context-search-agent MUST perform historical archive analysis as Track 1 in
|
|||||||
**Step 1: Check for Archive Manifest**
|
**Step 1: Check for Archive Manifest**
|
||||||
```bash
|
```bash
|
||||||
# Check if archive manifest exists
|
# Check if archive manifest exists
|
||||||
if [[ -f .workflow/.archives/manifest.json ]]; then
|
if [[ -f .workflow/archives/manifest.json ]]; then
|
||||||
# Manifest available for querying
|
# Manifest available for querying
|
||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
@@ -235,7 +235,7 @@ if (historicalConflicts.length > 0 && currentRisk === "low") {
|
|||||||
### Archive Query Algorithm
|
### Archive Query Algorithm
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
1. IF .workflow/.archives/manifest.json does NOT exist → Skip Track 1, continue to Track 2
|
1. IF .workflow/archives/manifest.json does NOT exist → Skip Track 1, continue to Track 2
|
||||||
2. IF manifest exists:
|
2. IF manifest exists:
|
||||||
a. Load manifest.json
|
a. Load manifest.json
|
||||||
b. Extract keywords from task_description (nouns, verbs, technical terms)
|
b. Extract keywords from task_description (nouns, verbs, technical terms)
|
||||||
|
|||||||
@@ -231,13 +231,13 @@ const agentContext = {
|
|||||||
// Use memory if available, else load
|
// Use memory if available, else load
|
||||||
session_metadata: memory.has("workflow-session.json")
|
session_metadata: memory.has("workflow-session.json")
|
||||||
? memory.get("workflow-session.json")
|
? memory.get("workflow-session.json")
|
||||||
: Read(.workflow/WFS-[id]/workflow-session.json),
|
: Read(.workflow/sessions/WFS-[id]/workflow-session.json),
|
||||||
|
|
||||||
context_package_path: ".workflow/WFS-[id]/.process/context-package.json",
|
context_package_path: ".workflow/sessions/WFS-[id]/.process/context-package.json",
|
||||||
|
|
||||||
context_package: memory.has("context-package.json")
|
context_package: memory.has("context-package.json")
|
||||||
? memory.get("context-package.json")
|
? memory.get("context-package.json")
|
||||||
: Read(".workflow/WFS-[id]/.process/context-package.json"),
|
: Read(".workflow/sessions/WFS-[id]/.process/context-package.json"),
|
||||||
|
|
||||||
// Extract brainstorm artifacts from context package
|
// Extract brainstorm artifacts from context package
|
||||||
brainstorm_artifacts: extractBrainstormArtifacts(context_package),
|
brainstorm_artifacts: extractBrainstormArtifacts(context_package),
|
||||||
|
|||||||
@@ -338,19 +338,19 @@ const agentContext = {
|
|||||||
// Use memory if available, else load
|
// Use memory if available, else load
|
||||||
session_metadata: memory.has("workflow-session.json")
|
session_metadata: memory.has("workflow-session.json")
|
||||||
? memory.get("workflow-session.json")
|
? memory.get("workflow-session.json")
|
||||||
: Read(.workflow/WFS-[id]/workflow-session.json),
|
: Read(.workflow/sessions/WFS-[id]/workflow-session.json),
|
||||||
|
|
||||||
context_package_path: ".workflow/WFS-[id]/.process/context-package.json",
|
context_package_path: ".workflow/sessions/WFS-[id]/.process/context-package.json",
|
||||||
|
|
||||||
context_package: memory.has("context-package.json")
|
context_package: memory.has("context-package.json")
|
||||||
? memory.get("context-package.json")
|
? memory.get("context-package.json")
|
||||||
: Read(".workflow/WFS-[id]/.process/context-package.json"),
|
: Read(".workflow/sessions/WFS-[id]/.process/context-package.json"),
|
||||||
|
|
||||||
test_context_package_path: ".workflow/WFS-[id]/.process/test-context-package.json",
|
test_context_package_path: ".workflow/sessions/WFS-[id]/.process/test-context-package.json",
|
||||||
|
|
||||||
test_context_package: memory.has("test-context-package.json")
|
test_context_package: memory.has("test-context-package.json")
|
||||||
? memory.get("test-context-package.json")
|
? memory.get("test-context-package.json")
|
||||||
: Read(".workflow/WFS-[id]/.process/test-context-package.json"),
|
: Read(".workflow/sessions/WFS-[id]/.process/test-context-package.json"),
|
||||||
|
|
||||||
// Extract brainstorm artifacts from context package
|
// Extract brainstorm artifacts from context package
|
||||||
brainstorm_artifacts: extractBrainstormArtifacts(context_package),
|
brainstorm_artifacts: extractBrainstormArtifacts(context_package),
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ Each task JSON embeds all necessary context, artifacts, and execution steps usin
|
|||||||
- `id`: Task identifier (format: `IMPL-N` or `IMPL-N.M` for subtasks)
|
- `id`: Task identifier (format: `IMPL-N` or `IMPL-N.M` for subtasks)
|
||||||
- `title`: Descriptive task name
|
- `title`: Descriptive task name
|
||||||
- `status`: Task state (`pending|active|completed|blocked|container`)
|
- `status`: Task state (`pending|active|completed|blocked|container`)
|
||||||
- `context_package_path`: Path to context package (`.workflow/WFS-[session]/.process/context-package.json`)
|
- `context_package_path`: Path to context package (`.workflow/sessions/WFS-[session]/.process/context-package.json`)
|
||||||
- `meta`: Task metadata
|
- `meta`: Task metadata
|
||||||
- `context`: Task-specific context and requirements
|
- `context`: Task-specific context and requirements
|
||||||
- `flow_control`: Execution steps and workflow
|
- `flow_control`: Execution steps and workflow
|
||||||
@@ -269,7 +269,7 @@ Each task JSON embeds all necessary context, artifacts, and execution steps usin
|
|||||||
"id": "IMPL-1",
|
"id": "IMPL-1",
|
||||||
"title": "Implement feature X with Y components",
|
"title": "Implement feature X with Y components",
|
||||||
"status": "pending",
|
"status": "pending",
|
||||||
"context_package_path": ".workflow/WFS-session/.process/context-package.json",
|
"context_package_path": ".workflow/sessions/WFS-session/.process/context-package.json",
|
||||||
"meta": {
|
"meta": {
|
||||||
"type": "feature",
|
"type": "feature",
|
||||||
"agent": "@code-developer",
|
"agent": "@code-developer",
|
||||||
@@ -291,7 +291,7 @@ Each task JSON embeds all necessary context, artifacts, and execution steps usin
|
|||||||
"depends_on": [],
|
"depends_on": [],
|
||||||
"artifacts": [
|
"artifacts": [
|
||||||
{
|
{
|
||||||
"path": ".workflow/WFS-session/.brainstorming/system-architect/analysis.md",
|
"path": ".workflow/sessions/WFS-session/.brainstorming/system-architect/analysis.md",
|
||||||
"priority": "highest",
|
"priority": "highest",
|
||||||
"usage": "Architecture decisions and API specifications"
|
"usage": "Architecture decisions and API specifications"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,6 +272,6 @@ Function Coverage: 91%
|
|||||||
|
|
||||||
Overall Compliance: 93/100
|
Overall Compliance: 93/100
|
||||||
|
|
||||||
Detailed report: .workflow/WFS-auth/.process/tdd-cycle-report.md
|
Detailed report: .workflow/sessions/WFS-auth/.process/tdd-cycle-report.md
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name: test-concept-enhanced
|
|||||||
description: Analyze test requirements and generate test generation strategy using Gemini with test-context package
|
description: Analyze test requirements and generate test generation strategy using Gemini with test-context package
|
||||||
argument-hint: "--session WFS-test-session-id --context path/to/test-context-package.json"
|
argument-hint: "--session WFS-test-session-id --context path/to/test-context-package.json"
|
||||||
examples:
|
examples:
|
||||||
- /workflow:tools:test-concept-enhanced --session WFS-test-auth --context .workflow/WFS-test-auth/.process/test-context-package.json
|
- /workflow:tools:test-concept-enhanced --session WFS-test-auth --context .workflow/sessions/WFS-test-auth/.process/test-context-package.json
|
||||||
---
|
---
|
||||||
|
|
||||||
# Test Concept Enhanced Command
|
# Test Concept Enhanced Command
|
||||||
|
|||||||
@@ -273,19 +273,19 @@ const agentContext = {
|
|||||||
// Use memory if available, else load
|
// Use memory if available, else load
|
||||||
session_metadata: memory.has("workflow-session.json")
|
session_metadata: memory.has("workflow-session.json")
|
||||||
? memory.get("workflow-session.json")
|
? memory.get("workflow-session.json")
|
||||||
: Read(.workflow/WFS-test-[id]/workflow-session.json),
|
: Read(.workflow/sessions/WFS-test-[id]/workflow-session.json),
|
||||||
|
|
||||||
test_analysis_results_path: ".workflow/WFS-test-[id]/.process/TEST_ANALYSIS_RESULTS.md",
|
test_analysis_results_path: ".workflow/sessions/WFS-test-[id]/.process/TEST_ANALYSIS_RESULTS.md",
|
||||||
|
|
||||||
test_analysis_results: memory.has("TEST_ANALYSIS_RESULTS.md")
|
test_analysis_results: memory.has("TEST_ANALYSIS_RESULTS.md")
|
||||||
? memory.get("TEST_ANALYSIS_RESULTS.md")
|
? memory.get("TEST_ANALYSIS_RESULTS.md")
|
||||||
: Read(".workflow/WFS-test-[id]/.process/TEST_ANALYSIS_RESULTS.md"),
|
: Read(".workflow/sessions/WFS-test-[id]/.process/TEST_ANALYSIS_RESULTS.md"),
|
||||||
|
|
||||||
test_context_package_path: ".workflow/WFS-test-[id]/.process/test-context-package.json",
|
test_context_package_path: ".workflow/sessions/WFS-test-[id]/.process/test-context-package.json",
|
||||||
|
|
||||||
test_context_package: memory.has("test-context-package.json")
|
test_context_package: memory.has("test-context-package.json")
|
||||||
? memory.get("test-context-package.json")
|
? memory.get("test-context-package.json")
|
||||||
: Read(".workflow/WFS-test-[id]/.process/test-context-package.json"),
|
: Read(".workflow/sessions/WFS-test-[id]/.process/test-context-package.json"),
|
||||||
|
|
||||||
// Load source session summaries if exists
|
// Load source session summaries if exists
|
||||||
source_session_id: session_metadata.source_session_id || null,
|
source_session_id: session_metadata.source_session_id || null,
|
||||||
@@ -312,7 +312,7 @@ This section provides quick reference for test task JSON structure. For complete
|
|||||||
|
|
||||||
## Output Files Structure
|
## Output Files Structure
|
||||||
```
|
```
|
||||||
.workflow/WFS-test-[session]/
|
.workflow/sessions/WFS-test-[session]/
|
||||||
├── workflow-session.json # Test session metadata
|
├── workflow-session.json # Test session metadata
|
||||||
├── IMPL_PLAN.md # Test validation plan
|
├── IMPL_PLAN.md # Test validation plan
|
||||||
├── TODO_LIST.md # Progress tracking
|
├── TODO_LIST.md # Progress tracking
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ if [ -n "$DESIGN_ID" ]; then
|
|||||||
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
|
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
|
||||||
elif [ -n "$SESSION_ID" ]; then
|
elif [ -n "$SESSION_ID" ]; then
|
||||||
# Latest in session
|
# Latest in session
|
||||||
relative_path=$(find .workflow/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
||||||
else
|
else
|
||||||
# Latest globally
|
# Latest globally
|
||||||
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ Synchronize finalized design system references to brainstorming artifacts, prepa
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Validate session
|
# Validate session
|
||||||
CHECK: .workflow/.active-* marker files; VALIDATE: session_id matches active session
|
CHECK: find .workflow/sessions/ -name "WFS-*" -type d; VALIDATE: session_id matches active session
|
||||||
|
|
||||||
# Verify design artifacts in latest design run
|
# Verify design artifacts in latest design run
|
||||||
latest_design = find_latest_path_matching(".workflow/WFS-{session}/design-run-*")
|
latest_design = find_latest_path_matching(".workflow/sessions/WFS-{session}/design-run-*")
|
||||||
|
|
||||||
# Detect design system structure
|
# Detect design system structure
|
||||||
IF exists({latest_design}/style-extraction/style-1/design-tokens.json):
|
IF exists({latest_design}/style-extraction/style-1/design-tokens.json):
|
||||||
@@ -51,7 +51,7 @@ REPORT: "Found {count} design artifacts, {prototype_count} prototypes"
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check if role analysis documents contains current design run reference
|
# Check if role analysis documents contains current design run reference
|
||||||
synthesis_spec_path = ".workflow/WFS-{session}/.brainstorming/role analysis documents"
|
synthesis_spec_path = ".workflow/sessions/WFS-{session}/.brainstorming/role analysis documents"
|
||||||
current_design_run = basename(latest_design) # e.g., "design-run-20250109-143022"
|
current_design_run = basename(latest_design) # e.g., "design-run-20250109-143022"
|
||||||
|
|
||||||
IF exists(synthesis_spec_path):
|
IF exists(synthesis_spec_path):
|
||||||
@@ -68,8 +68,8 @@ IF exists(synthesis_spec_path):
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Load target brainstorming artifacts (files to be updated)
|
# Load target brainstorming artifacts (files to be updated)
|
||||||
Read(.workflow/WFS-{session}/.brainstorming/role analysis documents)
|
Read(.workflow/sessions/WFS-{session}/.brainstorming/role analysis documents)
|
||||||
IF exists(.workflow/WFS-{session}/.brainstorming/ui-designer/analysis.md): Read(analysis.md)
|
IF exists(.workflow/sessions/WFS-{session}/.brainstorming/ui-designer/analysis.md): Read(analysis.md)
|
||||||
|
|
||||||
# Optional: Read prototype notes for descriptions (minimal context)
|
# Optional: Read prototype notes for descriptions (minimal context)
|
||||||
FOR each selected_prototype IN selected_list:
|
FOR each selected_prototype IN selected_list:
|
||||||
@@ -113,7 +113,7 @@ Update `.brainstorming/role analysis documents` with design system references.
|
|||||||
**Implementation**:
|
**Implementation**:
|
||||||
```bash
|
```bash
|
||||||
# Option 1: Edit existing section
|
# Option 1: Edit existing section
|
||||||
Edit(file_path=".workflow/WFS-{session}/.brainstorming/role analysis documents",
|
Edit(file_path=".workflow/sessions/WFS-{session}/.brainstorming/role analysis documents",
|
||||||
old_string="## UI/UX Guidelines\n[existing content]",
|
old_string="## UI/UX Guidelines\n[existing content]",
|
||||||
new_string="## UI/UX Guidelines\n\n[new design reference content]")
|
new_string="## UI/UX Guidelines\n\n[new design reference content]")
|
||||||
|
|
||||||
@@ -128,15 +128,15 @@ IF section not found:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Always update ui-designer
|
# Always update ui-designer
|
||||||
ui_designer_files = Glob(".workflow/WFS-{session}/.brainstorming/ui-designer/analysis*.md")
|
ui_designer_files = Glob(".workflow/sessions/WFS-{session}/.brainstorming/ui-designer/analysis*.md")
|
||||||
|
|
||||||
# Conditionally update other roles
|
# Conditionally update other roles
|
||||||
has_animations = exists({latest_design}/animation-extraction/animation-tokens.json)
|
has_animations = exists({latest_design}/animation-extraction/animation-tokens.json)
|
||||||
has_layouts = exists({latest_design}/layout-extraction/layout-templates.json)
|
has_layouts = exists({latest_design}/layout-extraction/layout-templates.json)
|
||||||
|
|
||||||
IF has_animations: ux_expert_files = Glob(".workflow/WFS-{session}/.brainstorming/ux-expert/analysis*.md")
|
IF has_animations: ux_expert_files = Glob(".workflow/sessions/WFS-{session}/.brainstorming/ux-expert/analysis*.md")
|
||||||
IF has_layouts: architect_files = Glob(".workflow/WFS-{session}/.brainstorming/system-architect/analysis*.md")
|
IF has_layouts: architect_files = Glob(".workflow/sessions/WFS-{session}/.brainstorming/system-architect/analysis*.md")
|
||||||
IF selected_list: pm_files = Glob(".workflow/WFS-{session}/.brainstorming/product-manager/analysis*.md")
|
IF selected_list: pm_files = Glob(".workflow/sessions/WFS-{session}/.brainstorming/product-manager/analysis*.md")
|
||||||
```
|
```
|
||||||
|
|
||||||
**Content Templates**:
|
**Content Templates**:
|
||||||
@@ -223,7 +223,7 @@ For complete token definitions and usage examples, see:
|
|||||||
|
|
||||||
**Implementation**:
|
**Implementation**:
|
||||||
```bash
|
```bash
|
||||||
Write(file_path=".workflow/WFS-{session}/.brainstorming/ui-designer/design-system-reference.md",
|
Write(file_path=".workflow/sessions/WFS-{session}/.brainstorming/ui-designer/design-system-reference.md",
|
||||||
content="[generated content with @ references]")
|
content="[generated content with @ references]")
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ Next: /workflow:plan [--agent] "<task description>"
|
|||||||
|
|
||||||
**Updated Files**:
|
**Updated Files**:
|
||||||
```
|
```
|
||||||
.workflow/WFS-{session}/.brainstorming/
|
.workflow/sessions/WFS-{session}/.brainstorming/
|
||||||
├── role analysis documents # Updated with UI/UX Guidelines section
|
├── role analysis documents # Updated with UI/UX Guidelines section
|
||||||
├── ui-designer/
|
├── ui-designer/
|
||||||
│ ├── analysis*.md # Updated with design system references
|
│ ├── analysis*.md # Updated with design system references
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ STORE: device_type, device_source
|
|||||||
### Phase 4: Run Initialization & Directory Setup
|
### Phase 4: Run Initialization & Directory Setup
|
||||||
```bash
|
```bash
|
||||||
design_id = "design-run-$(date +%Y%m%d)-$RANDOM"
|
design_id = "design-run-$(date +%Y%m%d)-$RANDOM"
|
||||||
relative_base_path = --session ? ".workflow/WFS-{session}/${design_id}" : ".workflow/${design_id}"
|
relative_base_path = --session ? ".workflow/sessions/WFS-{session}/${design_id}" : ".workflow/${design_id}"
|
||||||
|
|
||||||
# Create directory and convert to absolute path
|
# Create directory and convert to absolute path
|
||||||
Bash(mkdir -p "${relative_base_path}/style-extraction")
|
Bash(mkdir -p "${relative_base_path}/style-extraction")
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ if [ -n "$DESIGN_ID" ]; then
|
|||||||
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
|
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
|
||||||
elif [ -n "$SESSION_ID" ]; then
|
elif [ -n "$SESSION_ID" ]; then
|
||||||
# Latest in session
|
# Latest in session
|
||||||
relative_path=$(find .workflow/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
||||||
else
|
else
|
||||||
# Latest globally
|
# Latest globally
|
||||||
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Write(*), Bash(*)
|
|||||||
|
|
||||||
**Optional Parameters**:
|
**Optional Parameters**:
|
||||||
- `--session <id>`: Workflow session ID
|
- `--session <id>`: Workflow session ID
|
||||||
- Integrate into existing session (`.workflow/WFS-{session}/`)
|
- Integrate into existing session (`.workflow/sessions/WFS-{session}/`)
|
||||||
- Enable automatic design system integration (Phase 4)
|
- Enable automatic design system integration (Phase 4)
|
||||||
- If not provided: standalone mode (`.workflow/`)
|
- If not provided: standalone mode (`.workflow/`)
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ design_id = "design-run-$(date +%Y%m%d)-$RANDOM"
|
|||||||
|
|
||||||
IF --session:
|
IF --session:
|
||||||
session_id = {provided_session}
|
session_id = {provided_session}
|
||||||
relative_base_path = ".workflow/WFS-{session_id}/{design_id}"
|
relative_base_path = ".workflow/sessions/WFS-{session_id}/{design_id}"
|
||||||
session_mode = "integrated"
|
session_mode = "integrated"
|
||||||
ELSE:
|
ELSE:
|
||||||
session_id = null
|
session_id = null
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ if [ -n "$DESIGN_ID" ]; then
|
|||||||
fi
|
fi
|
||||||
elif [ -n "$SESSION_ID" ]; then
|
elif [ -n "$SESSION_ID" ]; then
|
||||||
# Latest in session
|
# Latest in session
|
||||||
relative_path=$(find .workflow/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
||||||
if [ -z "$relative_path" ]; then
|
if [ -z "$relative_path" ]; then
|
||||||
echo "ERROR: No design run found in session: $SESSION_ID"
|
echo "ERROR: No design run found in session: $SESSION_ID"
|
||||||
echo "HINT: Create a design run first or provide --design-id"
|
echo "HINT: Create a design run first or provide --design-id"
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ if [ -n "$DESIGN_ID" ]; then
|
|||||||
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
|
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
|
||||||
elif [ -n "$SESSION_ID" ]; then
|
elif [ -n "$SESSION_ID" ]; then
|
||||||
# Latest in session
|
# Latest in session
|
||||||
relative_path=$(find .workflow/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
||||||
else
|
else
|
||||||
# Latest globally
|
# Latest globally
|
||||||
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ if [ -n "$DESIGN_ID" ]; then
|
|||||||
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
|
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
|
||||||
elif [ -n "$SESSION_ID" ]; then
|
elif [ -n "$SESSION_ID" ]; then
|
||||||
# Latest in session
|
# Latest in session
|
||||||
relative_path=$(find .workflow/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
||||||
else
|
else
|
||||||
# Latest globally
|
# Latest globally
|
||||||
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
|
||||||
|
|||||||
Reference in New Issue
Block a user