mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
Fix session management location inference and ccw command usage
This commit addresses multiple issues in session management and command documentation: Session Management Fixes: - Add auto-inference of location from type parameter in session.ts - When --type lite-plan/lite-fix is specified, automatically set location accordingly - Preserve explicit --location parameter when provided - Update session-manager.ts to support type-based location inference - Fix metadata filename selection (session-metadata.json vs workflow-session.json) Command Documentation Fixes: - Add missing --mode analysis parameter (3 locations): * commands/memory/docs.md * commands/workflow/lite-execute.md (2 instances) - Add missing --mode write parameter (4 locations): * commands/workflow/tools/task-generate-agent.md - Remove non-existent subcommands (3 locations): * commands/workflow/session/complete.md (manifest, project) - Update session command syntax to use simplified format: * Changed from 'ccw session manifest read' to 'test -f' checks * Changed from 'ccw session project read' to 'test -f' checks Documentation Updates: - Update lite-plan.md and lite-fix.md to use --type parameter - Update session/start.md to document lite-plan and lite-fix types - Sync all fixes to skills/command-guide/reference directory (84 files) All ccw command usage across the codebase is now consistent and correct. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -354,10 +354,14 @@ function executeInit(params: Params): any {
|
||||
// Validate session_id format
|
||||
validateSessionId(session_id);
|
||||
|
||||
// Determine session location (default: active for WFS, or specified for lite)
|
||||
const sessionLocation = (location === 'lite-plan' || location === 'lite-fix')
|
||||
? location
|
||||
: 'active';
|
||||
// Auto-infer location from metadata.type if location not explicitly provided
|
||||
// Priority: explicit location > metadata.type > default 'active'
|
||||
const sessionLocation: 'active' | 'archived' | 'lite-plan' | 'lite-fix' =
|
||||
(location === 'active' || location === 'archived' || location === 'lite-plan' || location === 'lite-fix')
|
||||
? location
|
||||
: (metadata?.type === 'lite-plan' ? 'lite-plan' :
|
||||
metadata?.type === 'lite-fix' ? 'lite-fix' :
|
||||
'active');
|
||||
|
||||
// Check if session already exists (auto-detect all locations)
|
||||
const existing = findSession(session_id);
|
||||
@@ -392,7 +396,7 @@ function executeInit(params: Params): any {
|
||||
|
||||
const sessionData = {
|
||||
session_id,
|
||||
type: sessionLocation,
|
||||
type: metadata?.type || sessionLocation, // Preserve user-specified type if provided
|
||||
status: 'initialized',
|
||||
created_at: new Date().toISOString(),
|
||||
...metadata,
|
||||
|
||||
Reference in New Issue
Block a user