mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
docs: Emphasize on-demand file creation in workflow architecture
- Update unified file structure to stress on-demand creation principle - Add creation strategy section with explicit guidance: - Initial setup creates only required files (session.json, IMPL_PLAN.md, TODO_LIST.md, .task/) - Optional directories (.brainstorming/, .chat/, .summaries/) created when first needed - Update core design principles to include on-demand file creation - Add session initialization and directory creation examples in Data Operations This ensures workflows start lean and expand only as functionality is used. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,8 +9,9 @@ This document defines the complete workflow system architecture using a **JSON-o
|
|||||||
### Key Design Decisions
|
### Key Design Decisions
|
||||||
- **JSON files are the single source of truth** - All markdown documents are read-only generated views
|
- **JSON files are the single source of truth** - All markdown documents are read-only generated views
|
||||||
- **Marker files for session tracking** - Ultra-simple active session management
|
- **Marker files for session tracking** - Ultra-simple active session management
|
||||||
- **Unified file structure** - Same structure for all workflows regardless of complexity
|
- **Unified file structure definition** - Same structure template for all workflows, created on-demand
|
||||||
- **Dynamic task decomposition** - Subtasks created as needed during execution
|
- **Dynamic task decomposition** - Subtasks created as needed during execution
|
||||||
|
- **On-demand file creation** - Directories and files created only when required
|
||||||
- **Agent-agnostic task definitions** - Complete context preserved for autonomous execution
|
- **Agent-agnostic task definitions** - Complete context preserved for autonomous execution
|
||||||
|
|
||||||
## Session Management
|
## Session Management
|
||||||
@@ -224,25 +225,34 @@ impl-2.1 # Subtask of impl-2 (dynamically created)
|
|||||||
## File Structure
|
## File Structure
|
||||||
|
|
||||||
### Unified File Structure
|
### Unified File Structure
|
||||||
All workflows use the same file structure regardless of complexity. Task complexity is expressed through dynamic task decomposition, not file structure variations.
|
All workflows use the same file structure definition regardless of complexity. **Directories and files are created on-demand as needed**, not all at once during initialization.
|
||||||
|
|
||||||
|
#### Complete Structure Reference
|
||||||
```
|
```
|
||||||
.workflow/WFS-[topic-slug]/
|
.workflow/WFS-[topic-slug]/
|
||||||
├── workflow-session.json # Session metadata and state
|
├── workflow-session.json # Session metadata and state (REQUIRED)
|
||||||
├── [.brainstorming/] # Optional brainstorming phase
|
├── [.brainstorming/] # Optional brainstorming phase (created when needed)
|
||||||
├── .chat/ # CLI interaction sessions
|
├── [.chat/] # CLI interaction sessions (created when analysis is run)
|
||||||
│ ├── chat-*.md # Saved chat sessions
|
│ ├── chat-*.md # Saved chat sessions
|
||||||
│ └── analysis-*.md # Analysis results
|
│ └── analysis-*.md # Analysis results
|
||||||
├── IMPL_PLAN.md # Planning document
|
├── IMPL_PLAN.md # Planning document (REQUIRED)
|
||||||
├── TODO_LIST.md # Progress tracking
|
├── TODO_LIST.md # Progress tracking (REQUIRED)
|
||||||
├── .summaries/ # Task completion summaries
|
├── [.summaries/] # Task completion summaries (created when tasks complete)
|
||||||
│ ├── IMPL-*.md # Main task summaries
|
│ ├── IMPL-*.md # Main task summaries
|
||||||
│ └── IMPL-*.*.md # Subtask summaries
|
│ └── IMPL-*.*.md # Subtask summaries
|
||||||
└── .task/
|
└── .task/ # Task definitions (REQUIRED)
|
||||||
├── impl-*.json # Main task definitions
|
├── impl-*.json # Main task definitions
|
||||||
└── impl-*.*.json # Subtask definitions (dynamic)
|
└── impl-*.*.json # Subtask definitions (created dynamically)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Creation Strategy
|
||||||
|
- **Initial Setup**: Create only `workflow-session.json`, `IMPL_PLAN.md`, `TODO_LIST.md`, and `.task/` directory
|
||||||
|
- **On-Demand Creation**: Other directories created when first needed:
|
||||||
|
- `.brainstorming/` → When brainstorming phase is initiated
|
||||||
|
- `.chat/` → When CLI analysis commands are executed
|
||||||
|
- `.summaries/` → When first task is completed
|
||||||
|
- **Dynamic Files**: Subtask JSON files created during task decomposition
|
||||||
|
|
||||||
### File Naming Conventions
|
### File Naming Conventions
|
||||||
|
|
||||||
#### Session Identifiers
|
#### Session Identifiers
|
||||||
@@ -345,11 +355,28 @@ Agents receive complete task JSON plus workflow context:
|
|||||||
|
|
||||||
## Data Operations
|
## Data Operations
|
||||||
|
|
||||||
|
### Session Initialization
|
||||||
|
```bash
|
||||||
|
# Create minimal required structure
|
||||||
|
mkdir -p .workflow/WFS-topic-slug/.task
|
||||||
|
echo '{"session_id":"WFS-topic-slug",...}' > .workflow/WFS-topic-slug/workflow-session.json
|
||||||
|
echo '# Implementation Plan' > .workflow/WFS-topic-slug/IMPL_PLAN.md
|
||||||
|
echo '# Tasks' > .workflow/WFS-topic-slug/TODO_LIST.md
|
||||||
|
```
|
||||||
|
|
||||||
### Task Creation
|
### Task Creation
|
||||||
```bash
|
```bash
|
||||||
echo '{"id":"impl-1","title":"New task",...}' > .task/impl-1.json
|
echo '{"id":"impl-1","title":"New task",...}' > .task/impl-1.json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Directory Creation (On-Demand)
|
||||||
|
```bash
|
||||||
|
# Create directories only when needed
|
||||||
|
mkdir -p .brainstorming # When brainstorming is initiated
|
||||||
|
mkdir -p .chat # When analysis commands are run
|
||||||
|
mkdir -p .summaries # When first task completes
|
||||||
|
```
|
||||||
|
|
||||||
### Task Updates
|
### Task Updates
|
||||||
```bash
|
```bash
|
||||||
jq '.status = "active"' .task/impl-1.json > temp && mv temp .task/impl-1.json
|
jq '.status = "active"' .task/impl-1.json > temp && mv temp .task/impl-1.json
|
||||||
|
|||||||
Reference in New Issue
Block a user