Refactor workflow output paths to use a standardized sessions directory structure

- Updated output paths in various command files to reflect the new structure: `.workflow/sessions/{session_id}/` instead of `.workflow/{session_id}/`.
- Adjusted documentation and code comments to ensure consistency across all agents and commands.
- Ensured that all references to session-related files are correctly pointing to the new directory format.
This commit is contained in:
catlog22
2025-11-19 23:04:10 +08:00
parent 9b07310d68
commit 89a61acb71
37 changed files with 492 additions and 316 deletions

View File

@@ -102,7 +102,7 @@ Phase 2: Document Generation (Autonomous Output)
1. **Extract Tasks**: Parse `analysis_results.tasks` array
2. **Map Artifacts**: Use `artifacts_inventory` to add artifact references to task.context
3. **Assess Complexity**: Use `analysis_results.complexity` for document structure decision
4. **Session Paths**: Use `session_id` to construct output paths (.workflow/{session_id}/)
4. **Session Paths**: Use `session_id` to construct output paths (.workflow/sessions/{session_id}/)
### MCP Integration Guidelines
@@ -244,14 +244,14 @@ Generate individual `.task/IMPL-*.json` files with:
- Low priority: role_analyses
### 3. Implementation Plan Creation
Generate `IMPL_PLAN.md` at `.workflow/{session_id}/IMPL_PLAN.md`:
Generate `IMPL_PLAN.md` at `.workflow/sessions/{session_id}/IMPL_PLAN.md`:
**Structure**:
```markdown
---
identifier: {session_id}
source: "User requirements"
analysis: .workflow/{session_id}/.process/ANALYSIS_RESULTS.md
analysis: .workflow/sessions/{session_id}/.process/ANALYSIS_RESULTS.md
---
# Implementation Plan: {Project Title}
@@ -280,7 +280,7 @@ analysis: .workflow/{session_id}/.process/ANALYSIS_RESULTS.md
```
### 4. TODO List Generation
Generate `TODO_LIST.md` at `.workflow/{session_id}/TODO_LIST.md`:
Generate `TODO_LIST.md` at `.workflow/sessions/{session_id}/TODO_LIST.md`:
**Structure**:
```markdown

View File

@@ -98,7 +98,7 @@ Phase 3: Task JSON Generation
1. Load task JSON template
2. Populate template with parsed CLI results
3. Add iteration context and previous attempts
4. Write task JSON to .workflow/{session}/.task/IMPL-fix-N.json
4. Write task JSON to .workflow/session/{session}/.task/IMPL-fix-N.json
5. Return success status and task ID to orchestrator
```

View File

@@ -238,7 +238,7 @@ const context = {
**3.5 Brainstorm Artifacts Integration**
If `.workflow/{session}/.brainstorming/` exists, read and include content:
If `.workflow/session/{session}/.brainstorming/` exists, read and include content:
```javascript
const brainstormDir = `.workflow/${session}/.brainstorming`;
if (dir_exists(brainstormDir)) {
@@ -274,7 +274,7 @@ Calculate risk level based on:
**3.7 Context Packaging & Output**
**Output**: `.workflow/{session-id}/.process/context-package.json`
**Output**: `.workflow/sessions//{session-id}/.process/context-package.json`
**Note**: Task JSONs reference via `context_package_path` field (not in `artifacts`)
@@ -422,7 +422,7 @@ Calculate risk level based on:
## Quality Validation
Before completion verify:
- [ ] context-package.json in `.workflow/{session}/.process/`
- [ ] context-package.json in `.workflow/session/{session}/.process/`
- [ ] Valid JSON with all required fields
- [ ] Metadata complete (description, keywords, complexity)
- [ ] Project context documented (patterns, conventions, tech stack)
@@ -456,7 +456,7 @@ Conflict Detection:
- Affected: {modules}
- Mitigation: {strategy}
Output: .workflow/{session}/.process/context-package.json
Output: .workflow/session/{session}/.process/context-package.json
(Referenced in task JSONs via top-level `context_package_path` field)
```

View File

@@ -304,7 +304,7 @@ if (!validation.all_passed()) {
## Output Location
```
.workflow/{test_session_id}/.process/test-context-package.json
.workflow/sessions/{test_session_id}/.process/test-context-package.json
```
## Helper Functions Reference