mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
- Updated package name from `codexlens` to `codex-lens` in all relevant files to ensure consistency with `pyproject.toml`. - Enhanced `findLocalPackagePath()` to always search for local paths, even when running from `node_modules`. - Removed fallback logic for PyPI installation in several functions, providing clearer error messages for local installation failures. - Added detailed documentation on installation steps and error handling for local development packages. - Introduced a new summary document outlining the issues and fixes related to CodexLens installation.
445 lines
15 KiB
JSON
445 lines
15 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "Plan Object Schema",
|
|
"description": "Implementation plan from cli-lite-planning-agent or direct planning",
|
|
"type": "object",
|
|
"required": [
|
|
"summary",
|
|
"approach",
|
|
"tasks",
|
|
"estimated_time",
|
|
"recommended_execution",
|
|
"complexity",
|
|
"_metadata"
|
|
],
|
|
"properties": {
|
|
"summary": {
|
|
"type": "string",
|
|
"description": "2-3 sentence overview of the implementation plan"
|
|
},
|
|
"approach": {
|
|
"type": "string",
|
|
"description": "High-level implementation strategy and methodology"
|
|
},
|
|
"tasks": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"maxItems": 10,
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["id", "title", "scope", "action", "description", "implementation", "acceptance"],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^T[0-9]+$",
|
|
"description": "Task identifier (T1, T2, T3...)"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Task title (action verb + target module/feature)"
|
|
},
|
|
"scope": {
|
|
"type": "string",
|
|
"description": "Task scope: module path (src/auth/), feature name, or single file. Prefer module/feature level over single file."
|
|
},
|
|
"file": {
|
|
"type": "string",
|
|
"description": "Primary file (deprecated, use scope + modification_points instead)"
|
|
},
|
|
"action": {
|
|
"type": "string",
|
|
"enum": ["Create", "Update", "Implement", "Refactor", "Add", "Delete", "Configure", "Test", "Fix"],
|
|
"description": "Primary action type"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "What to implement (1-2 sentences)"
|
|
},
|
|
"modification_points": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["file", "target", "change"],
|
|
"properties": {
|
|
"file": {
|
|
"type": "string",
|
|
"description": "File path within scope"
|
|
},
|
|
"target": {
|
|
"type": "string",
|
|
"description": "Function/class/line range (e.g., 'validateToken:45-60')"
|
|
},
|
|
"change": {
|
|
"type": "string",
|
|
"description": "Brief description of change"
|
|
}
|
|
}
|
|
},
|
|
"description": "All modification points for this task. Group related changes (same feature/module) into one task with multiple modification_points."
|
|
},
|
|
"implementation": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"minItems": 2,
|
|
"maxItems": 7,
|
|
"description": "Step-by-step implementation guide"
|
|
},
|
|
"reference": {
|
|
"type": "object",
|
|
"properties": {
|
|
"pattern": {
|
|
"type": "string",
|
|
"description": "Pattern name to follow"
|
|
},
|
|
"files": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Reference file paths to study"
|
|
},
|
|
"examples": {
|
|
"type": "string",
|
|
"description": "Specific guidance or example references"
|
|
}
|
|
},
|
|
"description": "Reference materials for implementation (optional)"
|
|
},
|
|
"acceptance": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"minItems": 1,
|
|
"maxItems": 4,
|
|
"description": "Verification criteria (quantified, testable)"
|
|
},
|
|
"depends_on": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^T[0-9]+$"
|
|
},
|
|
"description": "Task IDs this task depends on (e.g., ['T1', 'T2'])"
|
|
},
|
|
"cli_execution_id": {
|
|
"type": "string",
|
|
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
"description": "Fixed CLI execution ID for this task (e.g., 'session-T1', 'IMPL-001-analysis')"
|
|
},
|
|
"cli_execution": {
|
|
"type": "object",
|
|
"properties": {
|
|
"strategy": {
|
|
"type": "string",
|
|
"enum": ["new", "resume", "fork", "merge_fork"],
|
|
"description": "CLI execution strategy: new (no deps), resume (1 dep, continue), fork (1 dep, branch), merge_fork (N deps, combine)"
|
|
},
|
|
"resume_from": {
|
|
"type": "string",
|
|
"description": "Parent task's cli_execution_id (for resume/fork strategies)"
|
|
},
|
|
"merge_from": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Multiple parents' cli_execution_ids (for merge_fork strategy)"
|
|
}
|
|
},
|
|
"description": "CLI execution strategy based on task dependencies"
|
|
},
|
|
"rationale": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chosen_approach": {
|
|
"type": "string",
|
|
"description": "The selected implementation approach and why it was chosen"
|
|
},
|
|
"alternatives_considered": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Alternative approaches that were considered but not chosen"
|
|
},
|
|
"decision_factors": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Key factors that influenced the decision (performance, maintainability, cost, etc.)"
|
|
},
|
|
"tradeoffs": {
|
|
"type": "string",
|
|
"description": "Known tradeoffs of the chosen approach"
|
|
}
|
|
},
|
|
"description": "Design rationale explaining WHY this approach was chosen (required for Medium/High complexity)"
|
|
},
|
|
"verification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"unit_tests": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "List of unit test names/descriptions to create"
|
|
},
|
|
"integration_tests": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "List of integration test names/descriptions to create"
|
|
},
|
|
"manual_checks": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Manual verification steps with specific actions"
|
|
},
|
|
"success_metrics": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Quantified metrics for success (e.g., 'Response time <200ms', 'Coverage >80%')"
|
|
}
|
|
},
|
|
"description": "Detailed verification steps beyond acceptance criteria (required for Medium/High complexity)"
|
|
},
|
|
"risks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["description", "probability", "impact", "mitigation"],
|
|
"properties": {
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Description of the risk"
|
|
},
|
|
"probability": {
|
|
"type": "string",
|
|
"enum": ["Low", "Medium", "High"],
|
|
"description": "Likelihood of the risk occurring"
|
|
},
|
|
"impact": {
|
|
"type": "string",
|
|
"enum": ["Low", "Medium", "High"],
|
|
"description": "Impact severity if the risk occurs"
|
|
},
|
|
"mitigation": {
|
|
"type": "string",
|
|
"description": "Strategy to mitigate or prevent the risk"
|
|
},
|
|
"fallback": {
|
|
"type": "string",
|
|
"description": "Alternative approach if mitigation fails"
|
|
}
|
|
}
|
|
},
|
|
"description": "Risk assessment and mitigation strategies (required for High complexity)"
|
|
},
|
|
"code_skeleton": {
|
|
"type": "object",
|
|
"properties": {
|
|
"interfaces": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {"type": "string"},
|
|
"definition": {"type": "string"},
|
|
"purpose": {"type": "string"}
|
|
}
|
|
},
|
|
"description": "Key interface/type definitions"
|
|
},
|
|
"key_functions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"signature": {"type": "string"},
|
|
"purpose": {"type": "string"},
|
|
"returns": {"type": "string"}
|
|
}
|
|
},
|
|
"description": "Critical function signatures"
|
|
},
|
|
"classes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {"type": "string"},
|
|
"purpose": {"type": "string"},
|
|
"methods": {
|
|
"type": "array",
|
|
"items": {"type": "string"}
|
|
}
|
|
}
|
|
},
|
|
"description": "Key class structures"
|
|
}
|
|
},
|
|
"description": "Code skeleton with interface/function signatures (required for High complexity)"
|
|
}
|
|
}
|
|
},
|
|
"description": "Structured task breakdown (1-10 tasks)"
|
|
},
|
|
"data_flow": {
|
|
"type": "object",
|
|
"properties": {
|
|
"diagram": {
|
|
"type": "string",
|
|
"description": "ASCII/text representation of data flow (e.g., 'A → B → C')"
|
|
},
|
|
"stages": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["stage", "input", "output", "component"],
|
|
"properties": {
|
|
"stage": {
|
|
"type": "string",
|
|
"description": "Stage name (e.g., 'Extraction', 'Processing', 'Storage')"
|
|
},
|
|
"input": {
|
|
"type": "string",
|
|
"description": "Input data format/type"
|
|
},
|
|
"output": {
|
|
"type": "string",
|
|
"description": "Output data format/type"
|
|
},
|
|
"component": {
|
|
"type": "string",
|
|
"description": "Component/module handling this stage"
|
|
},
|
|
"transformations": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Data transformations applied in this stage"
|
|
}
|
|
}
|
|
},
|
|
"description": "Detailed data flow stages"
|
|
},
|
|
"dependencies": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "External dependencies or data sources"
|
|
}
|
|
},
|
|
"description": "Global data flow design showing how data moves through the system (required for High complexity)"
|
|
},
|
|
"design_decisions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["decision", "rationale"],
|
|
"properties": {
|
|
"decision": {
|
|
"type": "string",
|
|
"description": "The design decision made"
|
|
},
|
|
"rationale": {
|
|
"type": "string",
|
|
"description": "Why this decision was made"
|
|
},
|
|
"tradeoff": {
|
|
"type": "string",
|
|
"description": "What was traded off for this decision"
|
|
},
|
|
"alternatives": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Alternatives that were considered"
|
|
}
|
|
}
|
|
},
|
|
"description": "Global design decisions that affect the entire plan"
|
|
},
|
|
"flow_control": {
|
|
"type": "object",
|
|
"properties": {
|
|
"execution_order": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"phase": {
|
|
"type": "string",
|
|
"description": "Phase name (e.g., 'parallel-1', 'sequential-1')"
|
|
},
|
|
"tasks": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Task IDs in this phase"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["parallel", "sequential"],
|
|
"description": "Execution type"
|
|
}
|
|
}
|
|
},
|
|
"description": "Ordered execution phases"
|
|
},
|
|
"exit_conditions": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "string",
|
|
"description": "Condition for successful completion"
|
|
},
|
|
"failure": {
|
|
"type": "string",
|
|
"description": "Condition that indicates failure"
|
|
}
|
|
},
|
|
"description": "Conditions for workflow termination"
|
|
}
|
|
},
|
|
"description": "Execution flow control (optional, auto-inferred from depends_on if not provided)"
|
|
},
|
|
"focus_paths": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Key file paths affected by this plan (aggregated from tasks)"
|
|
},
|
|
"estimated_time": {
|
|
"type": "string",
|
|
"description": "Total estimated implementation time (e.g., '30 minutes', '2 hours')"
|
|
},
|
|
"recommended_execution": {
|
|
"type": "string",
|
|
"enum": ["Agent", "Codex"],
|
|
"description": "Recommended execution method based on complexity"
|
|
},
|
|
"complexity": {
|
|
"type": "string",
|
|
"enum": ["Low", "Medium", "High"],
|
|
"description": "Task complexity level"
|
|
},
|
|
"_metadata": {
|
|
"type": "object",
|
|
"required": ["timestamp", "source"],
|
|
"properties": {
|
|
"timestamp": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "ISO 8601 timestamp of planning"
|
|
},
|
|
"source": {
|
|
"type": "string",
|
|
"enum": ["cli-lite-planning-agent", "direct-planning"],
|
|
"description": "Planning source"
|
|
},
|
|
"planning_mode": {
|
|
"type": "string",
|
|
"enum": ["direct", "agent-based"],
|
|
"description": "Planning execution mode"
|
|
},
|
|
"exploration_angles": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Exploration angles used for context"
|
|
},
|
|
"duration_seconds": {
|
|
"type": "integer",
|
|
"description": "Planning duration in seconds"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|