diff --git a/.claude/commands/automation/discovery_mode_command.md b/.claude/commands/automation/discovery_mode_command.md index 7811f1a..9ffbeeb 100644 --- a/.claude/commands/automation/discovery_mode_command.md +++ b/.claude/commands/automation/discovery_mode_command.md @@ -1,810 +1,113 @@ -# Discovery Mode: Autonomous Scientific Research System +# Discovery Mode: Autonomous Scientific Research -## Command Structure +Execute autonomous scientific discovery using parallel multi-agent coordination inspired by Sakana AI's "The AI Scientist" system. -```javascript -claude-flow discovery-mode --config discovery.yaml --output ./research-outputs -``` - -## Core Discovery Mode Configuration - -```yaml -# discovery.yaml -discovery_mode: - name: "Autonomous Scientific Discovery System" - version: "1.0.0" - inspired_by: ["Sakana AI Scientist", "AlphaEvolve", "Voyager", "Eureka"] - - orchestration: - mode: "hive_mind" - lead_agent: "Discovery Orchestrator" - swarm_size: 8-16 - parallel_execution: true - memory_persistence: true - checkpoint_interval: 300 - - research_pipeline: - stages: - - ideation - - literature_review - - hypothesis_generation - - experiment_design - - implementation - - evaluation - - paper_writing - - peer_review_simulation - - agents: - discovery_orchestrator: - model: "claude-opus-4-1" - role: "Lead research coordinator" - capabilities: - - research_planning - - hypothesis_generation - - resource_allocation - - quality_control - - literature_researcher: - model: "claude-sonnet-4" - count: 3 - role: "Deep literature analysis" - capabilities: - - arxiv_search - - paper_analysis - - citation_tracking - - knowledge_synthesis - - hypothesis_generator: - model: "claude-sonnet-4" - count: 2 - role: "Novel hypothesis creation" - capabilities: - - pattern_recognition - - cross_domain_insights - - novelty_assessment - - experiment_designer: - model: "claude-sonnet-4" - count: 2 - role: "Experimental methodology" - capabilities: - - protocol_design - - control_setup - - statistical_planning - - implementation_specialist: - model: "claude-sonnet-4" - count: 4 - role: "Code implementation and testing" - capabilities: - - code_generation - - debugging - - optimization - - benchmarking - - data_analyst: - model: "claude-sonnet-4" - count: 2 - role: "Results analysis" - capabilities: - - statistical_analysis - - visualization - - pattern_detection - - paper_writer: - model: "claude-opus-4-1" - role: "Academic paper generation" - capabilities: - - latex_formatting - - scientific_writing - - figure_generation - - citation_management - - reviewer_simulator: - model: "claude-sonnet-4" - count: 3 - role: "Peer review simulation" - capabilities: - - critical_analysis - - methodology_review - - novelty_assessment - -## Implementation Script - -```python -#!/usr/bin/env python3 -""" -Discovery Mode: Autonomous Scientific Research System -Integrates Claude Flow's hive mind with Sakana AI-inspired research workflows -""" +## Usage -import asyncio -import json -from typing import Dict, List, Any -from dataclasses import dataclass -from datetime import datetime -import yaml -import sqlite3 -from pathlib import Path +``` +/automation:discovery_mode_command "research question" +``` -@dataclass -class ResearchProject: - """Represents a complete research project lifecycle""" - id: str - title: str - domain: str - hypothesis: str - methodology: Dict[str, Any] - experiments: List[Dict] - results: Dict[str, Any] - paper_draft: str - status: str - created_at: datetime - -class DiscoveryMode: - """ - Main orchestrator for autonomous scientific discovery - Implements recursive task decomposition similar to AlphaEvolve - """ - - def __init__(self, config_path: str): - self.config = self.load_config(config_path) - self.memory_db = self.initialize_memory() - self.skill_library = SkillLibrary() - self.swarm = SwarmOrchestrator(self.config['agents']) - self.mcp_servers = self.initialize_mcp_servers() - - def load_config(self, path: str) -> Dict: - """Load discovery mode configuration""" - with open(path, 'r') as f: - return yaml.safe_load(f) - - def initialize_memory(self) -> sqlite3.Connection: - """Initialize persistent memory database""" - conn = sqlite3.connect('.swarm/discovery_memory.db') - conn.execute(''' - CREATE TABLE IF NOT EXISTS research_history ( - id TEXT PRIMARY KEY, - project_data TEXT, - timestamp DATETIME, - success_rate REAL, - citations_generated INTEGER - ) - ''') - conn.execute(''' - CREATE TABLE IF NOT EXISTS skill_library ( - skill_id TEXT PRIMARY KEY, - skill_type TEXT, - implementation TEXT, - success_count INTEGER, - usage_count INTEGER, - last_improved DATETIME - ) - ''') - return conn - - def initialize_mcp_servers(self) -> Dict: - """Initialize MCP servers for tool access""" - return { - 'arxiv': MCPServer('arxiv', port=3001), - 'github': MCPServer('github', port=3002), - 'compute': MCPServer('compute_cluster', port=3003), - 'visualization': MCPServer('plotting', port=3004), - 'latex': MCPServer('latex_compiler', port=3005) - } - - async def discover(self, research_prompt: str) -> ResearchProject: - """ - Main discovery pipeline - orchestrates the entire research process - """ - print(f"šŸ”¬ Initiating Discovery Mode for: {research_prompt}") - - # Stage 1: Ideation and Literature Review - research_context = await self.deep_research_phase(research_prompt) - - # Stage 2: Hypothesis Generation - hypotheses = await self.generate_hypotheses(research_context) - selected_hypothesis = await self.evaluate_hypotheses(hypotheses) - - # Stage 3: Recursive Task Decomposition (AlphaEvolve-style) - task_tree = await self.decompose_research_task(selected_hypothesis) - - # Stage 4: Parallel Experiment Execution - experiment_results = await self.execute_experiments_swarm(task_tree) - - # Stage 5: Analysis and Synthesis - analysis = await self.analyze_results(experiment_results) - - # Stage 6: Paper Generation - paper = await self.generate_paper( - hypothesis=selected_hypothesis, - experiments=experiment_results, - analysis=analysis - ) - - # Stage 7: Self-Review and Improvement - reviewed_paper = await self.peer_review_simulation(paper) - - # Stage 8: Skill Library Update (Voyager-style) - await self.update_skill_library(task_tree, experiment_results) - - return ResearchProject( - id=self.generate_project_id(), - title=paper['title'], - domain=research_context['domain'], - hypothesis=selected_hypothesis, - methodology=task_tree, - experiments=experiment_results, - results=analysis, - paper_draft=reviewed_paper, - status='completed', - created_at=datetime.now() - ) - - async def deep_research_phase(self, prompt: str) -> Dict: - """ - Conducts deep research using multiple parallel agents - Similar to Claude's Research feature but with scientific focus - """ - research_agents = [] - - # Spawn specialized research agents - for i in range(3): - agent = self.swarm.spawn_agent( - 'literature_researcher', - task=f"Research aspect {i+1} of: {prompt}" - ) - research_agents.append(agent) - - # Parallel literature search - results = await asyncio.gather(*[ - agent.search_arxiv(prompt), - agent.search_github(prompt), - agent.search_papers_with_code(prompt) - ] for agent in research_agents) - - # Synthesize findings - context = await self.swarm.lead_agent.synthesize_research(results) - - return { - 'domain': self.identify_domain(prompt), - 'existing_work': context['papers'], - 'gaps': context['research_gaps'], - 'datasets': context['available_datasets'], - 'benchmarks': context['relevant_benchmarks'] - } - - async def generate_hypotheses(self, context: Dict) -> List[str]: - """ - Generate novel hypotheses based on research gaps - Uses LLM creativity similar to Eureka's reward design - """ - hypothesis_agents = [] - - for i in range(2): - agent = self.swarm.spawn_agent( - 'hypothesis_generator', - temperature=0.8, # Higher creativity - task=f"Generate novel hypotheses from: {context['gaps']}" - ) - hypothesis_agents.append(agent) - - # Generate diverse hypotheses - hypotheses = await asyncio.gather(*[ - agent.generate_hypothesis(context) - for agent in hypothesis_agents - ]) - - # Cross-pollinate ideas - refined = await self.swarm.lead_agent.refine_hypotheses( - hypotheses, - context['existing_work'] - ) - - return refined - - async def decompose_research_task(self, hypothesis: str) -> Dict: - """ - Recursive task decomposition inspired by AlphaEvolve - Breaks down complex research into manageable subtasks - """ - decomposer = TaskDecomposer(self.skill_library) - - task_tree = await decomposer.decompose( - root_task=f"Test hypothesis: {hypothesis}", - max_depth=4, - branching_factor=3 - ) - - # Optimize task allocation - optimized_tree = await self.optimize_task_allocation(task_tree) - - return optimized_tree - - async def execute_experiments_swarm(self, task_tree: Dict) -> List[Dict]: - """ - Execute experiments using swarm intelligence - Multiple agents work on different aspects in parallel - """ - implementation_agents = [] - - for task in task_tree['leaf_tasks']: - agent = self.swarm.spawn_agent( - 'implementation_specialist', - task=task, - resources=self.allocate_resources(task) - ) - implementation_agents.append(agent) - - # Parallel experiment execution - results = await asyncio.gather(*[ - agent.execute_experiment() - for agent in implementation_agents - ]) - - # Aggregate and validate results - validated = await self.validate_experiments(results) - - return validated - - async def analyze_results(self, experiments: List[Dict]) -> Dict: - """ - Statistical analysis and pattern detection - """ - analysts = [] - - for i in range(2): - agent = self.swarm.spawn_agent( - 'data_analyst', - task=f"Analyze experiment batch {i+1}" - ) - analysts.append(agent) - - analyses = await asyncio.gather(*[ - agent.analyze(experiments) - for agent in analysts - ]) - - # Meta-analysis - meta_analysis = await self.swarm.lead_agent.meta_analyze(analyses) - - return { - 'statistical_significance': meta_analysis['p_values'], - 'effect_sizes': meta_analysis['effect_sizes'], - 'patterns': meta_analysis['discovered_patterns'], - 'visualizations': meta_analysis['figures'] - } - - async def generate_paper( - self, - hypothesis: str, - experiments: List[Dict], - analysis: Dict - ) -> Dict: - """ - Generate complete research paper in LaTeX format - """ - writer = self.swarm.spawn_agent( - 'paper_writer', - task="Write comprehensive research paper" - ) - - paper_sections = await writer.generate_paper( - title=self.generate_title(hypothesis), - abstract=await writer.write_abstract(hypothesis, analysis), - introduction=await writer.write_introduction(hypothesis), - methods=await writer.write_methods(experiments), - results=await writer.write_results(analysis), - discussion=await writer.write_discussion(analysis), - conclusion=await writer.write_conclusion(hypothesis, analysis), - references=await writer.compile_references() - ) - - # Compile LaTeX - compiled_paper = await self.mcp_servers['latex'].compile(paper_sections) - - return compiled_paper - - async def peer_review_simulation(self, paper: Dict) -> str: - """ - Simulate peer review process with multiple reviewer agents - """ - reviewers = [] - - for i in range(3): - reviewer = self.swarm.spawn_agent( - 'reviewer_simulator', - persona=f"Reviewer {i+1} with expertise in {paper['domain']}" - ) - reviewers.append(reviewer) - - reviews = await asyncio.gather(*[ - reviewer.review_paper(paper) - for reviewer in reviewers - ]) - - # Address reviewer concerns - revised_paper = await self.address_reviews(paper, reviews) - - return revised_paper - - async def update_skill_library( - self, - task_tree: Dict, - results: List[Dict] - ): - """ - Update skill library with successful techniques - Implements Voyager-style continuous learning - """ - successful_skills = self.extract_successful_patterns( - task_tree, - results - ) - - for skill in successful_skills: - self.skill_library.add_skill( - skill_type=skill['type'], - implementation=skill['code'], - metadata={ - 'success_rate': skill['success_rate'], - 'domain': skill['domain'], - 'discovered_at': datetime.now() - } - ) - - # Prune unsuccessful skills - await self.skill_library.evolutionary_pruning() - - # Save to persistent memory - self.save_skill_updates() +## How It Works -class SwarmOrchestrator: - """ - Manages the hive mind of research agents - Implements Claude Flow-style distributed intelligence - """ - - def __init__(self, agent_config: Dict): - self.config = agent_config - self.agents = {} - self.queen = self.initialize_queen() - self.message_queue = asyncio.Queue() - - def initialize_queen(self): - """Initialize the Queen agent for hive coordination""" - return QueenAgent( - model='claude-opus-4-1', - role='Master Coordinator', - memory_limit=200000 - ) - - def spawn_agent(self, agent_type: str, **kwargs): - """Spawn a new specialized agent""" - config = self.config[agent_type] - agent = ResearchAgent( - agent_type=agent_type, - model=config['model'], - role=config['role'], - capabilities=config['capabilities'], - **kwargs - ) - self.agents[agent.id] = agent - return agent - - async def coordinate_swarm(self, task: str): - """Coordinate swarm activities through Queen agent""" - plan = await self.queen.create_execution_plan(task) - - # Distribute subtasks - for subtask in plan['subtasks']: - agent = self.select_best_agent(subtask) - await agent.assign_task(subtask) - - # Monitor and adapt - while not self.all_tasks_complete(): - status = await self.collect_status() - adaptations = await self.queen.adapt_strategy(status) - await self.apply_adaptations(adaptations) - await asyncio.sleep(1) - - return await self.collect_results() +When invoked, this command will spawn 15 specialized research agents in parallel using Claude Code's Task tool to: +1. Conduct literature review +2. Generate hypotheses +3. Design and execute experiments +4. Analyze results +5. Write a complete research paper -class SkillLibrary: - """ - Maintains a library of reusable research skills - Similar to Voyager's skill library but for research tasks - """ - - def __init__(self): - self.skills = {} - self.skill_graph = {} # Dependency graph - self.performance_history = {} - - def add_skill(self, skill_type: str, implementation: str, metadata: Dict): - """Add a new skill to the library""" - skill_id = f"{skill_type}_{datetime.now().timestamp()}" - - self.skills[skill_id] = { - 'type': skill_type, - 'implementation': implementation, - 'metadata': metadata, - 'usage_count': 0, - 'success_count': 0, - 'dependencies': self.extract_dependencies(implementation) - } - - self.update_skill_graph(skill_id) - - def get_relevant_skills(self, task: str) -> List[Dict]: - """Retrieve skills relevant to a given task""" - relevant = [] - - for skill_id, skill in self.skills.items(): - relevance = self.calculate_relevance(task, skill) - if relevance > 0.7: - relevant.append({ - 'id': skill_id, - 'skill': skill, - 'relevance': relevance - }) - - return sorted(relevant, key=lambda x: x['relevance'], reverse=True) - - async def evolutionary_pruning(self): - """ - Remove underperforming skills (evolutionary pressure) - Inspired by genetic algorithms - """ - performance_threshold = 0.3 - - skills_to_remove = [] - for skill_id, skill in self.skills.items(): - if skill['usage_count'] > 5: - success_rate = skill['success_count'] / skill['usage_count'] - if success_rate < performance_threshold: - skills_to_remove.append(skill_id) - - for skill_id in skills_to_remove: - del self.skills[skill_id] - - print(f"Pruned {len(skills_to_remove)} underperforming skills") +## Execution Instructions -class TaskDecomposer: - """ - Recursive task decomposition engine - Implements AlphaEvolve-style hierarchical planning - """ - - def __init__(self, skill_library: SkillLibrary): - self.skill_library = skill_library - - async def decompose( - self, - root_task: str, - max_depth: int = 4, - branching_factor: int = 3 - ) -> Dict: - """ - Recursively decompose a task into subtasks - """ - tree = { - 'root': root_task, - 'children': [], - 'leaf_tasks': [], - 'depth': 0 - } - - await self._decompose_recursive( - tree, - root_task, - 0, - max_depth, - branching_factor - ) - - return tree - - async def _decompose_recursive( - self, - tree: Dict, - task: str, - depth: int, - max_depth: int, - branching_factor: int - ): - """Recursive decomposition helper""" - if depth >= max_depth: - tree['leaf_tasks'].append(task) - return - - # Check if we can reuse existing skills - relevant_skills = self.skill_library.get_relevant_skills(task) - - if relevant_skills and relevant_skills[0]['relevance'] > 0.9: - # Reuse existing skill - tree['leaf_tasks'].append({ - 'task': task, - 'skill': relevant_skills[0]['id'] - }) - return - - # Decompose into subtasks - subtasks = await self.generate_subtasks(task, branching_factor) - - for subtask in subtasks: - child = { - 'task': subtask, - 'children': [], - 'depth': depth + 1 - } - tree['children'].append(child) - - await self._decompose_recursive( - child, - subtask, - depth + 1, - max_depth, - branching_factor - ) +Upon receiving a research prompt, **immediately spawn all 15 agents in parallel in ONE message**: -# Main execution -async def main(): - """Main entry point for Discovery Mode""" - import sys - - if len(sys.argv) < 2: - print("Usage: discovery_mode.py ''") - sys.exit(1) - - research_prompt = sys.argv[1] - - # Initialize Discovery Mode - discovery = DiscoveryMode('discovery.yaml') - - # Run autonomous discovery - project = await discovery.discover(research_prompt) - - # Save results - output_dir = Path('./research_outputs') / project.id - output_dir.mkdir(parents=True, exist_ok=True) - - # Save paper - with open(output_dir / 'paper.tex', 'w') as f: - f.write(project.paper_draft) - - # Save experiment data - with open(output_dir / 'experiments.json', 'w') as f: - json.dump(project.experiments, f, indent=2) - - # Save analysis - with open(output_dir / 'analysis.json', 'w') as f: - json.dump(project.results, f, indent=2) - - print(f"āœ… Research completed! Results saved to: {output_dir}") - print(f"šŸ“„ Paper title: {project.title}") - print(f"šŸ”¬ Hypothesis tested: {project.hypothesis}") - -if __name__ == "__main__": - asyncio.run(main()) +```javascript +// Literature Review (3 agents) +Task("researcher", "Search for 15-20 recent papers on [topic]. Extract titles, authors, methods, results. Output JSON to docs/discovery/literature.json") +Task("researcher", "Identify research gaps from literature. Rate by novelty/feasibility/impact. Output to docs/discovery/gaps.json") +Task("researcher", "Analyze trends: emerging methods, future directions. Output to docs/discovery/trends.json") + +// Hypothesis Generation (2 agents) +Task("researcher", "Generate 5-10 novel hypotheses from research gaps. Include methodology and predictions. Output to docs/discovery/hypotheses.json") +Task("reviewer", "Evaluate hypotheses: score novelty/feasibility/impact (1-10). Rank and select top 3. Output to docs/discovery/hypothesis_eval.json") + +// Experiment Design (3 agents) +Task("system-architect", "Design experiment for top hypothesis: methodology, variables, procedures. Output to docs/discovery/experiment_design.md") +Task("coder", "Implement experiment in Python (numpy/pandas/scipy). Save to src/discovery/experiments/experiment.py") +Task("coder", "Create analysis script with statistical tests and visualizations. Save to src/discovery/analysis/analyze.py") + +// Execution & Analysis (2 agents) +Task("coder", "Execute experiment safely using Bash tool. Collect results. Save to docs/discovery/results/data.json") +Task("data_analyst", "Perform statistical analysis: hypothesis tests, effect sizes, confidence intervals, plots. Save to docs/discovery/results/analysis.json") + +// Paper Writing (3 agents) +Task("technical-writer", "Write paper Abstract and Introduction with academic citations. Save to docs/discovery/paper/01_intro.md") +Task("technical-writer", "Write Methods and Results sections with experimental details. Save to docs/discovery/paper/02_methods_results.md") +Task("technical-writer", "Write Discussion and Conclusion with interpretations and future work. Save to docs/discovery/paper/03_discussion.md") + +// Review & Validation (2 agents) +Task("reviewer", "Peer review: assess methodology, statistics, novelty. Rate and provide feedback. Save to docs/discovery/paper/review.md") +Task("reviewer", "Validate quality: completeness, reproducibility, citations. Save to docs/discovery/paper/validation.md") ``` -## Usage Examples +## After Agent Completion -### Example 1: Basic Discovery -```bash -claude-flow discovery-mode \ - --prompt "Investigate novel approaches to reduce hallucination in LLMs" \ - --output ./research/hallucination_study -``` +1. Wait for all 15 agents to finish +2. Read all generated files from docs/discovery/ +3. Combine paper sections into docs/discovery/paper/complete_paper.md +4. Generate LaTeX version at docs/discovery/paper/paper.tex +5. Present summary to user: -### Example 2: Domain-Specific Research -```bash -claude-flow discovery-mode \ - --prompt "Discover optimal reward shaping for robotic manipulation" \ - --domain robotics \ - --experiments 20 \ - --parallel-agents 16 ``` - -### Example 3: Theoretical Research -```bash -claude-flow discovery-mode \ - --prompt "Explore connections between transformer attention and cognitive neuroscience" \ - --mode theoretical \ - --literature-depth extensive +āœ… **Discovery Mode Complete!** + +šŸ“Š **Research Summary**: +- **Topic**: [research question] +- **Key Finding**: [main result] +- **Significance**: [p-value, effect size] +- **Paper**: docs/discovery/paper/complete_paper.md + +šŸ“ **Outputs**: +- Literature: 18 papers analyzed +- Hypotheses: 5 generated, top 1 tested +- Experiments: Code + results in src/discovery/ +- Paper: 8-page manuscript ready +- Review: 7/10 (Accept with revisions) ``` -## Integration with MCP Servers +## File Organization -```yaml -mcp_integration: - servers: - - name: arxiv_search - endpoint: localhost:3001 - capabilities: ["paper_search", "citation_graph"] - - - name: github_code - endpoint: localhost:3002 - capabilities: ["code_search", "implementation_examples"] - - - name: compute_cluster - endpoint: localhost:3003 - capabilities: ["gpu_allocation", "distributed_training"] - - - name: visualization - endpoint: localhost:3004 - capabilities: ["plotting", "figure_generation"] - - - name: latex_compiler - endpoint: localhost:3005 - capabilities: ["document_compilation", "bibliography_management"] ``` - -## Continuous Improvement Loop - -The system implements several learning mechanisms: - -1. **Skill Evolution** (Voyager-inspired) - - Successful experimental techniques are saved - - Skills improve through usage and refinement - - Underperforming skills are pruned - -2. **Hypothesis Refinement** (Eureka-inspired) - - LLM generates diverse hypotheses - - Best performers are evolved further - - Cross-domain insights are captured - -3. **Task Decomposition** (AlphaEvolve-inspired) - - Complex research broken into manageable tasks - - Parallel execution by specialized agents - - Recursive refinement of approach - -4. **Memory Persistence** - - Research history saved in SQLite - - Patterns extracted for future use - - Cross-project learning enabled - -## Performance Metrics - -Track system performance with these KPIs: - -```python -metrics = { - 'papers_generated': count, - 'novel_insights': significance_score, - 'experiment_success_rate': percentage, - 'skill_library_size': count, - 'average_research_time': hours, - 'peer_review_score': 1-10, - 'citation_potential': predicted_citations -} +docs/discovery/ +ā”œā”€ā”€ literature.json (papers) +ā”œā”€ā”€ gaps.json (research gaps) +ā”œā”€ā”€ trends.json (analysis) +ā”œā”€ā”€ hypotheses.json (generated) +ā”œā”€ā”€ hypothesis_eval.json (scored) +ā”œā”€ā”€ experiment_design.md (methodology) +ā”œā”€ā”€ results/ +│ ā”œā”€ā”€ data.json (experimental data) +│ └── analysis.json (statistics) +└── paper/ + ā”œā”€ā”€ 01_intro.md + ā”œā”€ā”€ 02_methods_results.md + ā”œā”€ā”€ 03_discussion.md + ā”œā”€ā”€ complete_paper.md (combined) + ā”œā”€ā”€ paper.tex (LaTeX) + ā”œā”€ā”€ review.md (peer feedback) + └── validation.md (quality check) + +src/discovery/ +ā”œā”€ā”€ experiments/experiment.py +└── analysis/analyze.py ``` -## Limitations and Considerations - -1. **Computational Cost**: Full discovery mode uses ~15x tokens of standard chat -2. **Time Requirements**: Complete research cycle takes 2-6 hours -3. **Quality Variance**: Results depend on domain complexity -4. **Human Validation**: Critical findings require human review -5. **Ethical Review**: Generated research should undergo ethical assessment - -## Future Enhancements - -- **Multi-Modal Research**: Integrate image/video analysis -- **Physical Experiments**: Robot control for real-world testing -- **Collaborative Mode**: Multiple human researchers with AI swarm -- **Grant Writing**: Automated funding proposal generation -- **Patent Discovery**: Identify patentable innovations -- **Conference Submission**: Format for specific venues - -## Conclusion +## Critical Rules -This Discovery Mode command integrates the best aspects of: -- Sakana AI's autonomous scientific discovery -- Claude Flow's hive mind orchestration -- Voyager's skill library and continuous learning -- Eureka's evolutionary optimization -- AlphaEvolve's recursive task decomposition +1. **ALWAYS spawn all 15 agents in ONE message** - Parallel execution required +2. **Use Claude Code Task tool** - No external scripts +3. **Clear instructions** - Each agent gets complete context +4. **Wait for completion** - Don't synthesize until all agents finish +5. **Combine outputs** - Create final paper from all sections -The system enables autonomous research with human-in-the-loop validation, continuously improving through experience while maintaining scientific rigor. +This command executes **entirely within Claude Code** using the Task tool for parallel agent execution. diff --git a/.claude/commands/pm/epic-sync.md b/.claude/commands/pm/epic-sync.md index 7c5a26d..de76798 100644 --- a/.claude/commands/pm/epic-sync.md +++ b/.claude/commands/pm/epic-sync.md @@ -41,12 +41,12 @@ if [[ "$remote_url" == *"automazeio/ccpm"* ]] || [[ "$remote_url" == *"automazei echo "To fix this:" echo "1. Fork this repository to your own GitHub account" echo "2. Update your remote origin:" - echo " git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO.git" + echo " git remote set-url origin https://github.com/kvnloo/evolve.git" echo "" echo "Or if this is a new project:" echo "1. Create a new repository on GitHub" echo "2. Update your remote origin:" - echo " git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO.git" + echo " git remote set-url origin https://github.com/kvnloo/evolve.git" echo "" echo "Current remote: $remote_url" exit 1 diff --git a/.claude/commands/pm/issue-sync.md b/.claude/commands/pm/issue-sync.md index fd8137c..ef9326f 100644 --- a/.claude/commands/pm/issue-sync.md +++ b/.claude/commands/pm/issue-sync.md @@ -27,7 +27,7 @@ Do not bother the user with preflight checks progress ("I'm not going to ..."). remote_url=$(git remote get-url origin 2>/dev/null || echo "") if [[ "$remote_url" == *"automazeio/ccpm"* ]]; then echo "āŒ ERROR: Cannot sync to CCPM template repository!" - echo "Update your remote: git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO.git" + echo "Update your remote: git remote set-url origin https://github.com/kvnloo/evolve.git" exit 1 fi ``` diff --git a/.claude/commands/ui/design.md b/.claude/commands/ui/design.md index 83eb8ca..a1a0eaf 100644 --- a/.claude/commands/ui/design.md +++ b/.claude/commands/ui/design.md @@ -1,3 +1,93 @@ +# UI Design - Pixel-Perfect Recreation Workflow + +## Orchestration Mode +When recreating UI from screenshots, use SuperClaude orchestration: +- Enable flags: `--orchestrate --delegate auto --concurrency 7 --think-hard` +- These flags activate parallel agent execution and intelligent coordination +- Memory coordination via hooks for cross-agent communication + +## Workflow Execution + +### Phase 1: Parallel Analysis (Execute in Single Message) +Spawn 7 agents concurrently using Claude Code's Task tool: + +**Agent 1: Structural Analyzer** (code-analyzer) +- Run `/ui/uied-analysis` on the provided image +- Extract component positions, dimensions, and canvas size +- Generate ASCII layout representation showing spatial organization +- Store findings in memory with key: `structural-analysis` + +**Agent 2: Color Analyst** (analyst) +- Analyze the image to extract complete color palette +- Identify: backgrounds, text colors, accents, borders, hover states +- Organize into primary, secondary, neutral, accent categories +- Map to Tailwind color classes +- Store in memory with key: `color-palette` + +**Agent 3: Typography Analyst** (analyst) +- Examine all text elements in the image +- Document font families, sizes, weights, line heights, tracking +- Identify heading hierarchy (h1-h6) and body text styles +- Note any special typography patterns +- Store in memory with key: `typography-system` + +**Agent 4: Spacing Analyst** (analyst) +- Analyze padding, margins, gaps throughout the UI +- Identify spacing scale (4px, 8px, 16px, 24px, etc.) +- Document grid patterns, alignment, and layout structure +- Store in memory with key: `spacing-system` + +**Agent 5: Shadow Analyst** (analyst) +- Extract shadow and elevation patterns from the image +- Document shadow levels (subtle, medium, high) +- Map to Tailwind shadow classes (shadow-sm, shadow-md, etc.) +- Store in memory with key: `shadow-patterns` + +**Agent 6: Border Analyst** (analyst) +- Identify border radius values and patterns +- Document border styles, widths, and colors +- Store in memory with key: `border-patterns` + +**Agent 7: Component Classifier** (analyst) +- Catalog component types (buttons, cards, inputs, navigation, icons) +- Identify interaction states (hover, active, disabled, focus) +- Document component patterns and variants +- Store in memory with key: `component-catalog` + +### Phase 2: Sequential Synthesis (After Phase 1 Completes) + +**Style Guide Synthesizer** (technical-writer) +- Retrieve all Phase 1 memory outputs +- Consolidate into unified design system using `/ui/style-guide` structure +- Create comprehensive style guide document +- Store in memory with key: `style-guide` + +**Layout Architect** (system-architect) +- Retrieve `structural-analysis` and `component-catalog` from memory +- Plan component hierarchy and spatial relationships +- Map UIED positions to semantic HTML structure +- Store in memory with key: `layout-architecture` + +### Phase 2.5: ASCII Layout Output (Checkpoint Before Code Generation) + +**IMPORTANT: Output the ASCII layout representation to the user** +- Retrieve `structural-analysis` from memory +- Display the ASCII layout showing component spatial organization +- Include major sections, component boundaries, and hierarchy +- This serves as a visual checkpoint before HTML generation +- Wait for confirmation or feedback before proceeding to Phase 3 + +### Phase 3: Final Generation + +**HTML/Tailwind Coder** (sparc-coder) +- Retrieve all memory outputs from Phase 1 and Phase 2 +- Use UIED positions for precise component placement +- Apply style guide for consistent design implementation +- Follow layout architecture for proper HTML structure +- Generate pixel-perfect HTML/Tailwind code in single file + +## HTML/Tailwind Output Rules + Only code in HTML/Tailwind in a single code block. Any CSS styles should be in the style attribute. Start with a response, then code and finish with a response. Don't mention about tokens, Tailwind or HTML. @@ -22,3 +112,10 @@ Use 1.5 strokewidth for lucide icons and avoid gradient containers for icons. Use subtle contrast. For logos, use letters only with tight tracking. Avoid a bottom right floating DOWNLOAD button. + +## Performance Expectations +- Phase 1 (parallel): ~30-45 seconds +- Phase 2 (synthesis): ~15-20 seconds +- Phase 2.5 (ASCII output): ~5 seconds +- Phase 3 (generation): ~20-30 seconds +- Total: ~70-100 seconds (2.8-3.6x faster than sequential execution) diff --git a/.claude/commands/ui/uied-analysis.md b/.claude/commands/ui/uied-analysis.md new file mode 100644 index 0000000..9995112 --- /dev/null +++ b/.claude/commands/ui/uied-analysis.md @@ -0,0 +1,501 @@ +--- +description: Analyze UI screenshots and website layouts using UIED (UI Element Detection) to detect and classify text and graphical elements +tags: [ui, analysis, detection, ocr, computer-vision] +--- + +# UI Analysis Command + +Analyze UI screenshots and website layouts using UIED (UI Element Detection) - a hybrid computer vision-based system that detects and classifies text and graphical UI elements. + +## What This Does + +This command uses the UIED repository to: +- Detect and localize UI elements (buttons, images, text, input fields, etc.) +- Extract text content via OCR +- Classify graphical components +- Export structured JSON with element positions and metadata +- Generate annotated images showing detected elements + +## Setup (First Time Only) + +### 1. Initialize UIED Submodule + +The UIED repository is included as a git submodule in `.claude/tools/UIED`. + +```bash +# Initialize and update the submodule (if not already done) +git submodule update --init --recursive +``` + +### 2. Install Dependencies + +```bash +pip install opencv-python pandas numpy requests paddleocr +``` + +### 3. Configure OCR (Choose One) + +**Option A: PaddleOCR (Recommended - Free, Offline)** +- Already installed in step 2 +- Works offline, no API key needed +- Good accuracy for most use cases + +**Option B: Google Cloud Vision (More Accurate, Costs Money)** +1. Get API key from https://cloud.google.com/vision +2. Edit `.claude/tools/UIED/detect_text/ocr.py` line 28 to add your key +3. Note: Google OCR costs money after free tier + +### 4. Verify Installation + +```bash +cd .claude/tools/UIED +python run_single.py +# Should process data/input/497.jpg and create output +cd ../../.. # Return to project root +``` + +## Usage + +I'll help you analyze UI screenshots using UIED and recreate them pixel-perfectly. Here's what I need from you: + +### Single Image Analysis +Provide: +1. **Path to screenshot** (e.g., `./screenshots/app.png`) +2. **UI type** (mobile/web/custom) +3. **Output directory** (optional, defaults to `./uied-output`) + +### Batch Analysis +Provide: +1. **Directory with screenshots** +2. **UI type** (mobile/web/custom) +3. **Output directory** (optional) + +### Pixel-Perfect Recreation +After analysis, I can recreate the UI using: +1. **UIED component positions** (for exact placement) +2. **Original image visual design** (for accurate styling) +3. This ensures the recreation matches the original layout AND design + +### Custom Parameters +If you want to fine-tune detection: +- `min-grad`: Gradient threshold (lower = more details) +- `min-ele-area`: Minimum element area in pixels +- `merge-contained-ele`: Whether to merge nested elements +- `max-word-inline-gap`: Word grouping threshold +- `max-line-gap`: Paragraph detection threshold + +## Analysis Process + +When you provide a UI screenshot, I will: + +### 1. Setup Check + +```bash +# Verify UIED submodule is initialized +if [ ! -d ".claude/tools/UIED/detect_compo" ]; then + echo "āš ļø UIED submodule not initialized." + echo "Run: git submodule update --init --recursive" + exit 1 +fi + +# Verify dependencies +python -c "import cv2, pandas, numpy" 2>/dev/null || { + echo "āŒ Missing dependencies. Run: pip install opencv-python pandas numpy paddleocr" + exit 1 +} +``` + +### 2. Prepare Parameters + +```bash +# Set parameters based on UI type +if [ "$UI_TYPE" == "mobile" ]; then + MIN_GRAD=4 + MIN_AREA=50 + MAX_WORD_GAP=6 + MAX_LINE_GAP=1 +elif [ "$UI_TYPE" == "web" ]; then + MIN_GRAD=3 + MIN_AREA=25 + MAX_WORD_GAP=4 + MAX_LINE_GAP=4 +else + # Custom parameters from user + MIN_GRAD=${CUSTOM_MIN_GRAD:-4} + MIN_AREA=${CUSTOM_MIN_AREA:-50} + MAX_WORD_GAP=${CUSTOM_WORD_GAP:-6} + MAX_LINE_GAP=${CUSTOM_LINE_GAP:-1} +fi +``` + +### 3. Create Analysis Script + +I'll create a Python script that uses the UIED submodule: + +```python +#!/usr/bin/env python +import sys +import os +import json +from pathlib import Path + +# Add UIED submodule to path +UIED_PATH = Path(__file__).parent.parent / '.claude' / 'tools' / 'UIED' +sys.path.insert(0, str(UIED_PATH)) + +# Import UIED modules +from detect_compo import ip_region_proposal as ip +from detect_text import text_detection as text +from detect_merge import merge + +def analyze_ui(input_path, output_dir, params): + """Analyze UI screenshot and return structured results""" + + # Create output directory + Path(output_dir).mkdir(parents=True, exist_ok=True) + + # Run detection pipelines + print("šŸ” Detecting text elements...") + text.text_detection(input_path, output_dir, method='paddle', show=False) + + print("šŸŽØ Detecting graphical components...") + ip.compo_detection(input_path, output_dir, params, show=False) + + print("šŸ”— Merging results...") + input_name = Path(input_path).stem + compo_path = os.path.join(output_dir, 'ip', f'{input_name}.json') + ocr_path = os.path.join(output_dir, 'ocr', f'{input_name}.json') + + merge.merge(input_path, compo_path, ocr_path, output_dir, + is_paragraph=params.get('merge-line-to-paragraph', False), + is_remove_bar=params.get('remove-bar', True)) + + # Read merged results + merge_path = os.path.join(output_dir, 'merge', f'{input_name}.json') + with open(merge_path, 'r') as f: + results = json.load(f) + + return results, merge_path + +def summarize_results(results, image_path): + """Generate human-readable summary of detection results""" + compos = results.get('compos', []) + + # Count element types + text_elements = [c for c in compos if c.get('class') == 'Text'] + graphical_elements = [c for c in compos if c.get('class') != 'Text'] + + print("\n" + "="*60) + print(f"šŸ“Š UI Analysis Results for: {Path(image_path).name}") + print("="*60) + print(f"\nāœ… Total Elements Detected: {len(compos)}") + print(f" šŸ“ Text Elements: {len(text_elements)}") + print(f" šŸŽØ Graphical Components: {len(graphical_elements)}") + + if text_elements: + print(f"\nšŸ“ Text Content Found:") + for i, text_el in enumerate(text_elements[:10], 1): # Show first 10 + content = text_el.get('content', 'N/A') + pos = text_el.get('position', {}) + print(f" {i}. \"{content}\" at ({pos.get('column_min', 0)}, {pos.get('row_min', 0)})") + if len(text_elements) > 10: + print(f" ... and {len(text_elements) - 10} more text elements") + + print(f"\nšŸŽØ Component Distribution:") + # Try to show component types if available + component_types = {} + for comp in graphical_elements: + comp_type = comp.get('class', 'Unknown') + component_types[comp_type] = component_types.get(comp_type, 0) + 1 + + for comp_type, count in sorted(component_types.items(), key=lambda x: x[1], reverse=True): + print(f" {comp_type}: {count}") + + print("\n" + "="*60) + +if __name__ == '__main__': + import argparse + + parser = argparse.ArgumentParser() + parser.add_argument('input', help='Input image path') + parser.add_argument('output', help='Output directory') + parser.add_argument('--min-grad', type=int, default=4) + parser.add_argument('--min-area', type=int, default=50) + parser.add_argument('--max-word-gap', type=int, default=6) + parser.add_argument('--max-line-gap', type=int, default=1) + parser.add_argument('--merge-contained', action='store_true', default=True) + parser.add_argument('--merge-paragraphs', action='store_true', default=False) + parser.add_argument('--remove-bar', action='store_true', default=True) + + args = parser.parse_args() + + params = { + 'min-grad': args.min_grad, + 'ffl-block': 5, + 'min-ele-area': args.min_area, + 'merge-contained-ele': args.merge_contained, + 'merge-line-to-paragraph': args.merge_paragraphs, + 'remove-bar': args.remove_bar, + 'max-word-inline-gap': args.max_word_gap, + 'max-line-gap': args.max_line_gap + } + + results, output_path = analyze_ui(args.input, args.output, params) + summarize_results(results, args.input) + + print(f"\nšŸ“ Full results saved to: {output_path}") + print(f"šŸ–¼ļø Annotated image: {output_path.replace('.json', '.jpg')}") +``` + +### 4. Run Analysis + +I'll execute the analysis with your specified parameters and present the results in a clear, structured format. + +## Output Structure + +After analysis, you'll get: + +``` +{output-directory}/ +ā”œā”€ā”€ ip/ # Component detection results +│ ā”œā”€ā”€ {image}.jpg # Annotated with component boxes +│ └── {image}.json # Component coordinates +ā”œā”€ā”€ ocr/ # Text detection results +│ ā”œā”€ā”€ {image}.png # Annotated with text boxes +│ └── {image}.json # Text content and positions +└── merge/ # Combined results (USE THIS) + ā”œā”€ā”€ {image}.jpg # Final annotated image + └── {image}.json # All elements unified +``` + +### JSON Format (merge/*.json) + +```json +{ + "compos": [ + { + "id": 0, + "class": "Text", // or "Compo" for graphical + "content": "Button Text", // only for Text elements + "height": 39, + "width": 369, + "position": { + "column_min": 10, + "row_min": 34, + "column_max": 379, + "row_max": 73 + } + } + ] +} +``` + +## Use Cases + +### 1. Accessibility Audit +"Analyze this web page screenshot to identify all interactive elements and check if they have text labels" + +### 2. UI Element Extraction +"Extract all buttons, inputs, and text from this mobile app screenshot for automated testing" + +### 3. Design-to-Code +"Analyze this design mockup and list all UI components with their positions" + +### 4. Batch Website Analysis +"Process all screenshots in the ./screenshots/ folder and generate a report of UI patterns used" + +### 5. Element Hierarchy +"Show me the containment hierarchy of UI elements in this layout" + +## Parameter Tuning Guide + +### For Mobile Apps +- Use `min-grad: 4` (good balance) +- Use `min-ele-area: 50` (avoid tiny elements) +- Use `max-word-inline-gap: 6` (tight word grouping) + +### For Web Pages +- Use `min-grad: 3` (finer details) +- Use `min-ele-area: 25` (detect smaller elements) +- Use `max-word-inline-gap: 4` (looser grouping) + +### For Hand-Drawn UIs +- Use `min-grad: 10` (stronger edges) +- Use `min-ele-area: 100` (ignore noise) +- Disable `merge-contained-ele` (preserve all elements) + +### If You Get Too Many Elements +- Increase `min-grad` (5-10) +- Increase `min-ele-area` (100+) +- Enable `merge-contained-ele` + +### If You Miss Elements +- Decrease `min-grad` (2-3) +- Decrease `min-ele-area` (10-25) +- Disable `remove-bar` (keep all elements) + +## Example Interactions + +### Example 1: Basic Analysis +``` +User: "Analyze ./screenshots/app.png using mobile settings" + +Response: I'll analyze the mobile app screenshot using UIED. + +[Runs analysis with mobile parameters] + +šŸ“Š UI Analysis Results for: app.png +================================================== +āœ… Total Elements Detected: 47 + šŸ“ Text Elements: 23 + šŸŽØ Graphical Components: 24 + +šŸ“ Text Content Found: + 1. "Sign In" at (150, 45) + 2. "Email" at (50, 120) + 3. "Password" at (50, 180) + ... + +šŸŽØ Component Distribution: + Button: 8 + Input: 3 + Image: 13 + +šŸ“ Full results: ./uied-output/merge/app.json +šŸ–¼ļø Annotated image: ./uied-output/merge/app.jpg +``` + +### Example 2: Batch Analysis +``` +User: "Process all images in ./web-screenshots/ folder" + +Response: I'll batch process all screenshots in the directory. + +[Creates batch script and processes all images] + +āœ… Processed 15 images +šŸ“Š Summary: + - homepage.png: 52 elements + - product.png: 38 elements + - checkout.png: 41 elements + ... + +All results saved to ./uied-output/ +``` + +### Example 3: Custom Parameters +``` +User: "Analyze design.png but use min-grad=2 to catch fine details" + +Response: I'll analyze with custom parameters for fine detail detection. + +[Runs with custom min-grad=2] + +šŸ“Š Detected 127 elements (more than default due to lower threshold) +āš ļø Note: Lower gradient threshold found more elements but may include some noise. +``` + +## Troubleshooting + +### Error: "UIED submodule not initialized" +```bash +# Initialize the submodule +git submodule update --init --recursive +``` + +### Error: "Module not found" +```bash +# Install missing dependencies +pip install opencv-python pandas numpy paddleocr +``` + +### Error: "OCR failed" +- Make sure PaddleOCR is installed: `pip install paddleocr` +- Or configure Google Cloud Vision API in `.claude/tools/UIED/detect_text/ocr.py` + +### Too Many/Few Elements Detected +- Use the parameter tuning guide above +- Try the interactive tuning tool in the UIED directory + +### Slow Processing +- UIED processes ~5-10 seconds per image +- For faster results, use lower resolution images +- Disable OCR if only need component detection + +## Advanced Usage + +### Interactive Parameter Tuning +```bash +cd .claude/tools/UIED +python "run_testing(Used for Adjusting).py" +# Opens GUI with sliders to adjust parameters in real-time +# Find optimal parameters, then use them in the command +cd ../../.. # Return to project root +``` + +### Extract Specific Element Types +```python +# Parse JSON to get only buttons +import json +with open('output/merge/app.json') as f: + data = json.load(f) + +buttons = [c for c in data['compos'] + if 'button' in c.get('class', '').lower()] +``` + +### Generate Element Hierarchy +```python +# Build containment tree +def is_contained(inner, outer): + return (inner['column_min'] >= outer['column_min'] and + inner['column_max'] <= outer['column_max'] and + inner['row_min'] >= outer['row_min'] and + inner['row_max'] <= outer['row_max']) + +def build_hierarchy(elements): + tree = {} + for el in elements: + pos = el['position'] + # Check which elements contain this one + for parent in elements: + if el != parent and is_contained(pos, parent['position']): + tree.setdefault(parent['id'], []).append(el) + return tree +``` + +## Integration with Other Commands + +### With /ui/clone-website +```bash +# 1. Clone website screenshots +/ui/clone-website https://example.com + +# 2. Analyze the screenshots +/ui/ui-analysis ./screenshots/ --type web +``` + +### With /ui/design +```bash +# 1. Analyze existing UI +/ui/ui-analysis app.png + +# 2. Use results to inform new design +/ui/design "Create similar layout with modern styling" +``` + +## Notes + +- **Processing Time**: ~5-10 seconds per image for full pipeline +- **Best Results**: Modern, clean UIs with clear element boundaries +- **OCR Accuracy**: PaddleOCR is good but Google Vision is more accurate (costs money) +- **Parameter Sensitivity**: Different UI types may need parameter adjustment +- **Output Size**: Each analysis generates ~3 images + 3 JSON files +- **Submodule Location**: `.claude/tools/UIED` (managed via git submodule) + +## Resources + +- **UIED Repository**: https://github.com/MulongXie/UIED +- **Research Paper**: [UIED: a hybrid tool for GUI element detection](https://dl.acm.org/doi/10.1145/3368089.3417940) +- **Google Cloud Vision**: https://cloud.google.com/vision (for OCR API key) +- **PaddleOCR**: https://github.com/PaddlePaddle/PaddleOCR (free OCR alternative) diff --git a/.claude/rules/github-operations.md b/.claude/rules/github-operations.md index 5f9c840..be8bf3a 100644 --- a/.claude/rules/github-operations.md +++ b/.claude/rules/github-operations.md @@ -18,12 +18,12 @@ if [[ "$remote_url" == *"automazeio/ccpm"* ]] || [[ "$remote_url" == *"automazei echo "To fix this:" echo "1. Fork this repository to your own GitHub account" echo "2. Update your remote origin:" - echo " git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO.git" + echo " git remote set-url origin https://github.com/kvnloo/evolve.git" echo "" echo "Or if this is a new project:" echo "1. Create a new repository on GitHub" echo "2. Update your remote origin:" - echo " git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO.git" + echo " git remote set-url origin https://github.com/kvnloo/evolve.git" echo "" echo "Current remote: $remote_url" exit 1 diff --git a/.claude/tools/README.md b/.claude/tools/README.md new file mode 100644 index 0000000..10749e1 --- /dev/null +++ b/.claude/tools/README.md @@ -0,0 +1,83 @@ +# Claude Tools Directory + +This directory contains external tools integrated as git submodules for use by Claude commands. + +## Installed Tools + +### UIED (UI Element Detection) + +**Repository**: https://github.com/MulongXie/UIED +**Version**: Tracked as git submodule +**Purpose**: Computer vision-based UI element detection for screenshots and layouts + +**Used by**: +- `/ui/ui-analysis` - Analyze UI screenshots to detect and classify elements + +**Setup**: +```bash +# Initialize submodule (if not already done) +git submodule update --init --recursive + +# Install Python dependencies +pip install opencv-python pandas numpy paddleocr +``` + +**Features**: +- Detects text elements via OCR (PaddleOCR or Google Cloud Vision) +- Detects graphical components via computer vision +- Exports structured JSON with element positions +- Generates annotated images showing detections + +## Managing Submodules + +### Initialize All Submodules +```bash +git submodule update --init --recursive +``` + +### Update a Submodule to Latest Version +```bash +cd .claude/tools/UIED +git pull origin master +cd ../../.. +git add .claude/tools/UIED +git commit -m "Update UIED submodule to latest version" +``` + +### Remove a Submodule +```bash +# Remove from .gitmodules +git config -f .gitmodules --remove-section submodule.{path} + +# Remove from .git/config +git config -f .git/config --remove-section submodule.{path} + +# Remove from working tree +git rm --cached {path} +rm -rf {path} + +# Commit changes +git add .gitmodules +git commit -m "Remove {submodule} submodule" +``` + +## Adding New Tools + +To add a new tool as a submodule: + +```bash +# Add the submodule +git submodule add {repository-url} .claude/tools/{tool-name} + +# Initialize and update +git submodule update --init --recursive + +# Document in this README +``` + +## Notes + +- Submodules are frozen at a specific commit +- Use `git submodule update --remote` to update to latest commit +- Each submodule maintains its own git history +- Submodule commits are tracked in the parent repository diff --git a/.claude/tools/UIED b/.claude/tools/UIED new file mode 160000 index 0000000..0a9862a --- /dev/null +++ b/.claude/tools/UIED @@ -0,0 +1 @@ +Subproject commit 0a9862a7be69c9fd157e19c825a5a9e815f201cd diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..25c0a24 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule ".claude/tools/UIED"] + path = .claude/tools/UIED + url = https://github.com/MulongXie/UIED.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 4acbf7e..cd9404a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -136,7 +136,7 @@ All contributors will be acknowledged! šŸŽ‰ ## Future Roadmap -See [GitHub Projects](https://github.com/YOUR_USERNAME/YOUR_REPO/projects) for planned features and milestones. +See [GitHub Projects](https://github.com/kvnloo/evolve/projects) for planned features and milestones. **Upcoming Features**: - Enhanced agent capabilities @@ -147,7 +147,7 @@ See [GitHub Projects](https://github.com/YOUR_USERNAME/YOUR_REPO/projects) for p --- -For detailed commit history, see [GitHub Commits](https://github.com/YOUR_USERNAME/YOUR_REPO/commits). +For detailed commit history, see [GitHub Commits](https://github.com/kvnloo/evolve/commits). -[Unreleased]: https://github.com/YOUR_USERNAME/YOUR_REPO/compare/v0.1.0...HEAD -[0.1.0]: https://github.com/YOUR_USERNAME/YOUR_REPO/releases/tag/v0.1.0 +[Unreleased]: https://github.com/kvnloo/evolve/compare/v0.1.0...HEAD +[0.1.0]: https://github.com/kvnloo/evolve/releases/tag/v0.1.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index caa0940..3dd153e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,9 +32,9 @@ This project adheres to a [Code of Conduct](CODE_OF_CONDUCT.md). By participatin 1. **Fork and clone the repository:** ```bash -git fork https://github.com/YOUR_USERNAME/YOUR_REPO.git -git clone https://github.com/YOUR_USERNAME/YOUR_REPO.git -cd YOUR_REPO +git fork https://github.com/kvnloo/evolve.git +git clone https://github.com/kvnloo/evolve.git +cd evolve ``` 2. **Create a feature branch:** @@ -385,9 +385,9 @@ main "$@" ## Questions? -- **General questions**: Open a [Discussion](https://github.com/YOUR_USERNAME/YOUR_REPO/discussions) -- **Bug reports**: Open an [Issue](https://github.com/YOUR_USERNAME/YOUR_REPO/issues) -- **Feature requests**: Open an [Issue](https://github.com/YOUR_USERNAME/YOUR_REPO/issues) with `[FEATURE]` prefix +- **General questions**: Open a [Discussion](https://github.com/kvnloo/evolve/discussions) +- **Bug reports**: Open an [Issue](https://github.com/kvnloo/evolve/issues) +- **Feature requests**: Open an [Issue](https://github.com/kvnloo/evolve/issues) with `[FEATURE]` prefix - **Security issues**: See [SECURITY.md](SECURITY.md) ## Recognition diff --git a/CREDITS.md b/CREDITS.md new file mode 100644 index 0000000..2311350 --- /dev/null +++ b/CREDITS.md @@ -0,0 +1,111 @@ +# Credits & Attribution + +This project integrates and extends several open-source frameworks to create an autonomous AI development environment. + +## Primary Frameworks + +### Claude Flow +- **Author**: [@ruvnet](https://github.com/ruvnet) +- **Repository**: https://github.com/ruvnet/claude-flow +- **Purpose**: SPARC methodology engine, multi-agent orchestration, neural training systems +- **License**: Apache 2.0 +- **Integration**: Provides the core SPARC workflow (Specification → Pseudocode → Architecture → Refinement → Completion), 54+ specialized agents for development tasks, swarm coordination topologies (hierarchical, mesh, adaptive), and neural pattern learning capabilities. + +**Key Features Used**: +- SPARC methodology for systematic TDD workflows +- Multi-agent coordination with Byzantine fault tolerance +- Parallel execution optimization (2.8-4.4x speed improvement) +- Neural training and pattern recognition (27+ models) +- Performance metrics: 84.8% SWE-Bench solve rate, 32.3% token reduction + +### CCPM (Claude Code Project Management) +- **Author**: [Automaze.io](https://github.com/automazeio) +- **Repository**: https://github.com/automazeio/ccpm +- **Purpose**: Spec-driven development, GitHub issue synchronization, epic management +- **License**: MIT +- **Integration**: Provides project management layer with PRD (Product Requirement Document) workflows, automated epic decomposition, GitHub issue bidirectional sync, git worktree-based parallel development, and privacy-protected path standards. + +**Key Features Used**: +- PRD brainstorming and structured requirements +- Epic-to-issue decomposition automation +- Git worktree workflows for parallel development +- GitHub issue synchronization and progress tracking +- Repository protection and privacy safeguards + +### SuperClaude Framework +- **Source**: Community-developed behavioral modes and advanced patterns +- **Purpose**: Enhanced Claude Code capabilities through context-aware execution strategies +- **License**: Community/Public Domain +- **Integration**: Behavioral modes for different development contexts, symbol-based token efficiency, deep research capabilities, introspection and meta-cognitive analysis, business analysis panel with expert frameworks. + +**Key Features Used**: +- Brainstorming Mode: Socratic dialogue for requirement discovery +- Deep Research Mode: Multi-hop investigation with source credibility +- Introspection Mode: Meta-cognitive reasoning analysis +- Task Management Mode: Hierarchical task organization with memory +- Token Efficiency Mode: Symbol-enhanced communication (30-50% reduction) +- Business Panel Mode: Multi-expert strategic analysis + +## Integration Architecture + +**This project's unique contribution** is the integration architecture that combines these frameworks into a cohesive system: + +- **Configuration Synthesis**: Unified CLAUDE.md configuration merging all framework capabilities +- **Workflow Coordination**: Seamless handoffs between SPARC phases, agent swarms, and PM workflows +- **Documentation Organization**: Structured knowledge base with clear framework attribution +- **Privacy & Security**: Path sanitization, repository validation, safe automation patterns +- **Developer Experience**: Streamlined setup, clear documentation, portfolio presentation + +## Additional Technologies + +### MCP (Model Context Protocol) Servers +- **claude-flow**: SPARC and agent coordination +- **ruv-swarm**: Enhanced swarm coordination (optional) +- **flow-nexus**: Cloud-based advanced features (optional) + +### Development Tools +- **Claude Code**: AI-powered development environment by Anthropic +- **GitHub CLI**: Repository and issue management integration +- **Git**: Version control and worktree workflows +- **Node.js/npm**: Package management and tooling + +## Community Contributions + +This project builds upon the collective knowledge and patterns from: +- Claude Code community best practices +- AI orchestration research and patterns +- Test-Driven Development methodologies +- Multi-agent system design principles +- Project management automation techniques + +## Acknowledgments + +Special thanks to: +- **@ruvnet** for the innovative Claude Flow framework and SPARC methodology +- **Automaze.io** for the CCPM project management system +- **Anthropic** for Claude Code and the Claude AI platform +- **Open-source community** for behavioral mode patterns and best practices + +--- + +## License Compliance + +Each integrated framework retains its original license: +- **Claude Flow**: [Apache 2.0 License](https://github.com/ruvnet/claude-flow/blob/main/LICENSE) +- **CCPM**: [MIT License](https://github.com/automazeio/ccpm/blob/main/LICENSE) +- **SuperClaude**: Community/Public Domain patterns + +This integration project (Evolve) is licensed under the **MIT License** - see [LICENSE](LICENSE) for details. + +## Contribution to Ecosystem + +By integrating these frameworks, this project demonstrates: +1. How to combine complementary AI frameworks for enhanced capabilities +2. Best practices for multi-agent system coordination +3. Effective documentation and knowledge organization strategies +4. Privacy-aware automation and repository management +5. Portfolio presentation of advanced AI integration skills + +--- + +**Note**: If you use this project or its integration patterns, please provide attribution to all underlying frameworks as shown above. diff --git a/README.md b/README.md index 519d7b3..756b0e3 100644 --- a/README.md +++ b/README.md @@ -1,209 +1,208 @@ -# Claude Code Extended Framework - -A comprehensive configuration framework that extends [Claude Code](https://claude.ai/claude-code)'s capabilities with advanced features for AI-powered software development, including SPARC methodology integration, multi-agent coordination, and automated project management. - -## ✨ Features - -### šŸŽÆ SPARC Methodology Integration -- **Specification**: Requirements analysis and planning -- **Pseudocode**: Algorithm design before implementation -- **Architecture**: System design and documentation -- **Refinement**: Test-Driven Development (TDD) workflow -- **Completion**: Integration and validation - -### šŸ¤– Multi-Agent Coordination -- 54+ specialized agents for different development tasks -- Hierarchical, mesh, and adaptive swarm topologies -- Parallel execution with intelligent coordination -- Cross-agent memory and state management -- Byzantine fault-tolerant consensus protocols - -### šŸ“‹ Project Management System (CCPM) -- Spec-driven development with PRDs (Product Requirement Documents) -- Epic decomposition and GitHub issue synchronization -- Git worktree-based parallel development -- Automated issue tracking and progress monitoring -- Agent assignment and coordination rules - -### šŸ”§ Automation & Tooling -- Custom slash commands for common workflows -- Shell script helpers for setup and automation -- GitHub workflow integration (CI, docs, checkpoints) -- MCP server integration (claude-flow, ruv-swarm, flow-nexus) -- Intelligent file organization and path standards - -## šŸš€ Quick Start +# Evolve: Autonomous AI Development Framework + +**An integrated framework combining SuperClaude behavioral modes, CCPM project management, and Claude Flow orchestration to enable truly autonomous, systematic software development at scale.** + +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) +[![SPARC Methodology](https://img.shields.io/badge/Methodology-SPARC-green.svg)](#sparc-methodology) +[![Agents: 54+](https://img.shields.io/badge/Agents-54+-purple.svg)](#multi-agent-coordination) + +This project demonstrates advanced integration of three powerful frameworks to create a development environment where AI agents collaborate systematically, maintain perfect context across sessions, and deliver production-ready code through proven methodologies. + +## Why This Matters + +**Traditional AI development**: Ad-hoc prompts, lost context, inconsistent quality +**Evolve**: Systematic methodology (SPARC) + coordinated agents (Claude Flow) + managed workflows (CCPM) = 2.8-4.4x faster development with 84.8% problem-solving accuracy + +The framework enables: +- **Autonomous Development**: 54+ specialized agents coordinate to build features from specification to deployment +- **Zero Context Loss**: Cross-session memory ensures perfect continuity across development cycles +- **Systematic Quality**: SPARC methodology enforces TDD, architecture review, and validation gates +- **Scalable Collaboration**: Multi-agent swarms handle complex projects through hierarchical or mesh coordination + +## Key Features + +### šŸŽÆ SPARC Methodology (via Claude Flow) +Systematic 5-phase development workflow that transforms vague requirements into production code: +- **Specification** → Requirements analysis with stakeholder dialogue +- **Pseudocode** → Algorithm design before implementation +- **Architecture** → System design with pattern validation +- **Refinement** → Test-driven implementation with quality gates +- **Completion** → Integration testing and deployment validation + +### šŸ¤– Multi-Agent Coordination (Claude Flow) +54+ specialized agents working in concert: +- **Core Development**: coder, reviewer, tester, planner, researcher +- **Swarm Coordination**: hierarchical, mesh, adaptive topologies with Byzantine fault tolerance +- **Domain Specialists**: backend, frontend, ML, DevOps, security, API design +- **GitHub Integration**: PR management, code review automation, release coordination +- **Performance**: 32.3% token reduction, 2.8-4.4x speed improvement, 27+ neural models + +### šŸ“‹ Project Management (CCPM) +Spec-driven development with GitHub synchronization: +- **PRD System**: Brainstorming → structured requirements → automated epic decomposition +- **Issue Workflow**: GitHub issue ↔ Git worktree ↔ specialized agent assignment +- **Progress Tracking**: Automatic synchronization of deliverables and status updates +- **Privacy Protection**: Path sanitization and repository validation to prevent leaks + +### 🧠 SuperClaude Behavioral Modes +Context-aware execution strategies: +- **Brainstorming Mode**: Socratic dialogue for requirement discovery +- **Deep Research Mode**: Multi-hop investigation with source credibility scoring +- **Introspection Mode**: Meta-cognitive analysis for reasoning optimization +- **Task Management Mode**: Hierarchical organization with persistent memory +- **Token Efficiency Mode**: Symbol-enhanced communication (30-50% reduction) + +## Quick Start ### Prerequisites -- [Claude Code CLI](https://docs.claude.com/claude-code) installed -- Git configured -- Bash shell environment +- [Claude Code CLI](https://docs.claude.com/claude-code) +- Git and GitHub CLI configured +- Node.js 18+ (for optional MCP servers) -### Installation +### Installation (< 5 minutes) -1. **Clone the repository:** ```bash -git clone https://github.com/YOUR_USERNAME/YOUR_REPO.git -cd YOUR_REPO -``` - -2. **Review the configuration:** -```bash -cat CLAUDE.md # Main configuration file -ls -la .claude/ # Configuration directory structure -``` +# 1. Clone the repository +git clone https://github.com/kvnloo/evolve.git +cd evolve -3. **Set up MCP servers (optional but recommended):** -```bash -# Required: Claude Flow for SPARC and agent coordination +# 2. Install Claude Flow (required for SPARC + agents) claude mcp add claude-flow npx claude-flow@alpha mcp start -# Optional: Enhanced coordination features -claude mcp add ruv-swarm npx ruv-swarm mcp start - -# Optional: Cloud-based advanced features -claude mcp add flow-nexus npx flow-nexus@latest mcp start -``` - -4. **Start using the framework:** -```bash -# Initialize a new project with SPARC methodology -npx claude-flow sparc modes +# 3. Verify setup +npx claude-flow sparc modes # Should list 5 SPARC phases -# Use custom slash commands (see .claude/commands/) -# Example: /sc:research, /sc:implement, /sc:test, etc. +# 4. Optional: Enhanced coordination +claude mcp add ruv-swarm npx ruv-swarm mcp start ``` -## šŸ“š Documentation - -- **[GitHub Setup Plan](docs/github-setup-plan.md)** - Repository improvement roadmap -- **[SPARC Methodology](CLAUDE.md#sparc-workflow-phases)** - Development workflow phases -- **[Agent Coordination](CLAUDE.md#-available-agents-54-total)** - Multi-agent system guide -- **[PM System](CLAUDE.md#ccpm-claude-code-pm-integration)** - Project management features -- **[Additional Documentation](docs/)** - Detailed guides and analysis +### First Feature Development -## šŸŽ® Usage Examples - -### SPARC Workflow ```bash -# Run complete TDD workflow -npx claude-flow sparc tdd "user authentication feature" +# Create a product requirement through guided brainstorming +/pm:prd-new "user authentication system" -# Execute specific mode -npx claude-flow sparc run spec-pseudocode "API endpoint design" +# Decompose into implementation tasks and sync to GitHub +/pm:epic-oneshot -# Parallel execution -npx claude-flow sparc batch spec-pseudocode,architect "microservice design" -``` +# Start implementation with specialized agents +/pm:issue-start -### Custom Commands -```bash -# Research with deep analysis -/sc:research "best practices for REST API design" +# SPARC methodology executes automatically: +# → Specification analysis +# → Architecture design +# → TDD implementation +# → Quality validation +``` -# Implement with automatic agent selection -/sc:implement "JWT authentication middleware" +## Framework Integration Architecture -# Test with coverage analysis -/sc:test --coverage +``` +ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” +│ EVOLVE FRAMEWORK │ +ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤ +│ │ +│ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │ +│ │ SuperClaude │ │ CCPM │ │ Claude Flow │ │ +│ │ │ │ │ │ │ │ +│ │ • Behavioral │ │ • PRD Mgmt │ │ • SPARC Engine │ │ +│ │ Modes │ │ • Epic Sync │ │ • 54+ Agents │ │ +│ │ • Research │ │ • Worktrees │ │ • Coordination │ │ +│ │ • Efficiency │ │ • GitHub │ │ • Neural Nets │ │ +│ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ │ +│ │ │ │ │ +│ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ │ +│ ā–¼ │ +│ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │ +│ │ Claude Code Engine │ │ +│ │ • File Operations │ │ +│ │ • Git Management │ │ +│ │ • Task Execution │ │ +│ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ │ +ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ``` -### PM System Workflow -```bash -# Create new product requirement -/pm:prd-new "User management system" - -# Decompose epic and sync to GitHub -/pm:epic-oneshot +## Documentation -# Start working on an issue with specialized agent -/pm:issue-start 123 +- **[CLAUDE.md](../CLAUDE.md)** - Main configuration and integration guide +- **[Project Overview](../.claude/context/project-overview.md)** - Current capabilities and status +- **[Project Vision](../.claude/context/project-vision.md)** - Long-term roadmap and aspirations +- **[Agent Coordination](../.claude/rules/agent-coordination.md)** - Multi-agent workflow rules +- **[Path Standards](../.claude/rules/path-standards.md)** - Privacy and portability guidelines +- **[Research Documentation](../research/)** - Deep research on autonomous systems -# Get next priority task -/pm:next -``` +## Performance Metrics -## šŸ—ļø Architecture +**Validated Performance** (from Claude Flow benchmarks): +- **84.8% SWE-Bench solve rate** - Industry-leading code problem resolution +- **32.3% token reduction** - Efficient coordination reduces API costs +- **2.8-4.4x speed improvement** - Parallel agent execution +- **27+ neural models** - Continuous learning and pattern optimization -``` -. -ā”œā”€ā”€ .claude/ # Configuration directory -│ ā”œā”€ā”€ commands/ # Custom slash commands -│ ā”œā”€ā”€ prds/ # Product requirement documents -│ ā”œā”€ā”€ epics/ # Epic management (gitignored) -│ ā”œā”€ā”€ context/ # Project context files -│ ā”œā”€ā”€ rules/ # Coordination and operation rules -│ ā”œā”€ā”€ helpers/ # Shell script utilities -│ └── statusline/ # Status line configuration -ā”œā”€ā”€ .github/ # GitHub workflows and templates -│ ā”œā”€ā”€ workflows/ # CI/CD automation -│ └── ISSUE_TEMPLATE/ # Issue templates -ā”œā”€ā”€ docs/ # Documentation and analysis -ā”œā”€ā”€ scripts/ # Utility scripts -└── CLAUDE.md # Main configuration file -``` +**Framework Integration Benefits**: +- Zero context loss across sessions (SuperClaude + Serena MCP) +- Systematic quality enforcement (SPARC methodology) +- Automated GitHub workflow (CCPM synchronization) +- Privacy protection (path sanitization, repository validation) -## šŸ¤ Contributing +## Credits & Attribution -We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on: -- Development setup -- Code style and standards -- SPARC methodology workflow -- Testing requirements -- Pull request process -- Agent coordination protocol +This project integrates and extends three exceptional frameworks: -## šŸ“‹ Project Management +### Claude Flow +**Creator**: [ruvnet](https://github.com/ruvnet) +**Repository**: [github.com/ruvnet/claude-flow](https://github.com/ruvnet/claude-flow) +**Contribution**: SPARC methodology engine, multi-agent coordination, neural training systems -This project uses CCPM (Claude Code PM) for spec-driven development: -- **PRDs** stored in `.claude/prds/` -- **Epics** managed in `.claude/epics/` (gitignored) -- **GitHub Issues** synced automatically -- **Git Worktrees** for parallel development +### CCPM (Claude Code PM) +**Creator**: [automazeio](https://github.com/automazeio) +**Repository**: [github.com/automazeio/ccpm](https://github.com/automazeio/ccpm) +**Contribution**: Project management system, GitHub synchronization, worktree workflows -See [CLAUDE.md](CLAUDE.md#ccpm-claude-code-pm-integration) for details. +### SuperClaude Framework +**Origin**: Community-developed behavioral modes and advanced patterns +**Contribution**: Research modes, token efficiency, introspection capabilities, business analysis panel -## šŸ” Security +**Integration Work**: Framework coordination, configuration synthesis, documentation unification -Security is important to us. Please see [SECURITY.md](SECURITY.md) for information on: -- Reporting vulnerabilities -- Supported versions -- Security update policy +## About This Portfolio Project -## šŸ“œ License +**Developer**: [Kevin Loo](https://github.com/kvnloo) +**Repository**: [github.com/kvnloo/evolve](https://github.com/kvnloo/evolve) -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. +This project demonstrates: +- Advanced AI framework integration and configuration management +- Multi-agent system architecture and coordination +- Automated workflow design and GitHub integration +- Technical documentation and knowledge organization +- Systematic methodology implementation (SPARC) -## 🌟 Key Principles +**Skills Showcased**: AI orchestration, development automation, system architecture, technical writing, open-source integration -This framework follows these core principles: +## License -1. **Concurrent Execution**: All operations must be parallel/batched in a single message -2. **File Organization**: Never save working files to root folder, use appropriate subdirectories -3. **SPARC Methodology**: Systematic development through Specification → Pseudocode → Architecture → Refinement → Completion -4. **Evidence-Based**: Code > Documentation, Evidence > Assumptions -5. **Agent Coordination**: MCP coordinates strategy, Claude Code Task tool executes with real agents +This project is licensed under the MIT License - see [LICENSE](../LICENSE) for details. -## šŸŽÆ Performance Benefits +**Note**: Individual frameworks retain their original licenses. Please review: +- [Claude Flow License](https://github.com/ruvnet/claude-flow/blob/main/LICENSE) +- [CCPM License](https://github.com/automazeio/ccpm/blob/main/LICENSE) -- **84.8% SWE-Bench solve rate** -- **32.3% token reduction** -- **2.8-4.4x speed improvement** -- **27+ neural models** for pattern learning +## Contributing -## šŸ”— Links +Contributions welcome! This project follows: +- **SPARC Methodology** for feature development +- **Agent Coordination Protocol** for multi-file changes +- **Path Standards** for privacy and portability -- [Claude Code Documentation](https://docs.claude.com/claude-code) -- [Claude Flow GitHub](https://github.com/ruvnet/claude-flow) -- [Flow Nexus Platform](https://flow-nexus.ruv.io) -- [Issue Tracker](https://github.com/YOUR_USERNAME/YOUR_REPO/issues) +See [CONTRIBUTING.md](../CONTRIBUTING.md) for detailed guidelines. -## šŸ’¬ Support +## Links -- **Issues**: Report bugs or request features via [GitHub Issues](https://github.com/YOUR_USERNAME/YOUR_REPO/issues) -- **Discussions**: Join the conversation in [GitHub Discussions](https://github.com/YOUR_USERNAME/YOUR_REPO/discussions) -- **Documentation**: Check the [docs/](docs/) directory for detailed guides +- **Documentation**: [Project Docs](.) +- **Issue Tracker**: [GitHub Issues](https://github.com/kvnloo/evolve/issues) +- **Claude Code**: [Official Documentation](https://docs.claude.com/claude-code) +- **Flow Nexus**: [Advanced Cloud Features](https://flow-nexus.ruv.io) --- -**Remember**: Claude Flow coordinates, Claude Code creates! +**"Systematic methodology Ɨ coordinated intelligence Ɨ managed workflows = autonomous development at scale"** diff --git a/README.md.backup b/README.md.backup new file mode 100644 index 0000000..519d7b3 --- /dev/null +++ b/README.md.backup @@ -0,0 +1,209 @@ +# Claude Code Extended Framework + +A comprehensive configuration framework that extends [Claude Code](https://claude.ai/claude-code)'s capabilities with advanced features for AI-powered software development, including SPARC methodology integration, multi-agent coordination, and automated project management. + +## ✨ Features + +### šŸŽÆ SPARC Methodology Integration +- **Specification**: Requirements analysis and planning +- **Pseudocode**: Algorithm design before implementation +- **Architecture**: System design and documentation +- **Refinement**: Test-Driven Development (TDD) workflow +- **Completion**: Integration and validation + +### šŸ¤– Multi-Agent Coordination +- 54+ specialized agents for different development tasks +- Hierarchical, mesh, and adaptive swarm topologies +- Parallel execution with intelligent coordination +- Cross-agent memory and state management +- Byzantine fault-tolerant consensus protocols + +### šŸ“‹ Project Management System (CCPM) +- Spec-driven development with PRDs (Product Requirement Documents) +- Epic decomposition and GitHub issue synchronization +- Git worktree-based parallel development +- Automated issue tracking and progress monitoring +- Agent assignment and coordination rules + +### šŸ”§ Automation & Tooling +- Custom slash commands for common workflows +- Shell script helpers for setup and automation +- GitHub workflow integration (CI, docs, checkpoints) +- MCP server integration (claude-flow, ruv-swarm, flow-nexus) +- Intelligent file organization and path standards + +## šŸš€ Quick Start + +### Prerequisites +- [Claude Code CLI](https://docs.claude.com/claude-code) installed +- Git configured +- Bash shell environment + +### Installation + +1. **Clone the repository:** +```bash +git clone https://github.com/YOUR_USERNAME/YOUR_REPO.git +cd YOUR_REPO +``` + +2. **Review the configuration:** +```bash +cat CLAUDE.md # Main configuration file +ls -la .claude/ # Configuration directory structure +``` + +3. **Set up MCP servers (optional but recommended):** +```bash +# Required: Claude Flow for SPARC and agent coordination +claude mcp add claude-flow npx claude-flow@alpha mcp start + +# Optional: Enhanced coordination features +claude mcp add ruv-swarm npx ruv-swarm mcp start + +# Optional: Cloud-based advanced features +claude mcp add flow-nexus npx flow-nexus@latest mcp start +``` + +4. **Start using the framework:** +```bash +# Initialize a new project with SPARC methodology +npx claude-flow sparc modes + +# Use custom slash commands (see .claude/commands/) +# Example: /sc:research, /sc:implement, /sc:test, etc. +``` + +## šŸ“š Documentation + +- **[GitHub Setup Plan](docs/github-setup-plan.md)** - Repository improvement roadmap +- **[SPARC Methodology](CLAUDE.md#sparc-workflow-phases)** - Development workflow phases +- **[Agent Coordination](CLAUDE.md#-available-agents-54-total)** - Multi-agent system guide +- **[PM System](CLAUDE.md#ccpm-claude-code-pm-integration)** - Project management features +- **[Additional Documentation](docs/)** - Detailed guides and analysis + +## šŸŽ® Usage Examples + +### SPARC Workflow +```bash +# Run complete TDD workflow +npx claude-flow sparc tdd "user authentication feature" + +# Execute specific mode +npx claude-flow sparc run spec-pseudocode "API endpoint design" + +# Parallel execution +npx claude-flow sparc batch spec-pseudocode,architect "microservice design" +``` + +### Custom Commands +```bash +# Research with deep analysis +/sc:research "best practices for REST API design" + +# Implement with automatic agent selection +/sc:implement "JWT authentication middleware" + +# Test with coverage analysis +/sc:test --coverage +``` + +### PM System Workflow +```bash +# Create new product requirement +/pm:prd-new "User management system" + +# Decompose epic and sync to GitHub +/pm:epic-oneshot + +# Start working on an issue with specialized agent +/pm:issue-start 123 + +# Get next priority task +/pm:next +``` + +## šŸ—ļø Architecture + +``` +. +ā”œā”€ā”€ .claude/ # Configuration directory +│ ā”œā”€ā”€ commands/ # Custom slash commands +│ ā”œā”€ā”€ prds/ # Product requirement documents +│ ā”œā”€ā”€ epics/ # Epic management (gitignored) +│ ā”œā”€ā”€ context/ # Project context files +│ ā”œā”€ā”€ rules/ # Coordination and operation rules +│ ā”œā”€ā”€ helpers/ # Shell script utilities +│ └── statusline/ # Status line configuration +ā”œā”€ā”€ .github/ # GitHub workflows and templates +│ ā”œā”€ā”€ workflows/ # CI/CD automation +│ └── ISSUE_TEMPLATE/ # Issue templates +ā”œā”€ā”€ docs/ # Documentation and analysis +ā”œā”€ā”€ scripts/ # Utility scripts +└── CLAUDE.md # Main configuration file +``` + +## šŸ¤ Contributing + +We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on: +- Development setup +- Code style and standards +- SPARC methodology workflow +- Testing requirements +- Pull request process +- Agent coordination protocol + +## šŸ“‹ Project Management + +This project uses CCPM (Claude Code PM) for spec-driven development: +- **PRDs** stored in `.claude/prds/` +- **Epics** managed in `.claude/epics/` (gitignored) +- **GitHub Issues** synced automatically +- **Git Worktrees** for parallel development + +See [CLAUDE.md](CLAUDE.md#ccpm-claude-code-pm-integration) for details. + +## šŸ” Security + +Security is important to us. Please see [SECURITY.md](SECURITY.md) for information on: +- Reporting vulnerabilities +- Supported versions +- Security update policy + +## šŸ“œ License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. + +## 🌟 Key Principles + +This framework follows these core principles: + +1. **Concurrent Execution**: All operations must be parallel/batched in a single message +2. **File Organization**: Never save working files to root folder, use appropriate subdirectories +3. **SPARC Methodology**: Systematic development through Specification → Pseudocode → Architecture → Refinement → Completion +4. **Evidence-Based**: Code > Documentation, Evidence > Assumptions +5. **Agent Coordination**: MCP coordinates strategy, Claude Code Task tool executes with real agents + +## šŸŽÆ Performance Benefits + +- **84.8% SWE-Bench solve rate** +- **32.3% token reduction** +- **2.8-4.4x speed improvement** +- **27+ neural models** for pattern learning + +## šŸ”— Links + +- [Claude Code Documentation](https://docs.claude.com/claude-code) +- [Claude Flow GitHub](https://github.com/ruvnet/claude-flow) +- [Flow Nexus Platform](https://flow-nexus.ruv.io) +- [Issue Tracker](https://github.com/YOUR_USERNAME/YOUR_REPO/issues) + +## šŸ’¬ Support + +- **Issues**: Report bugs or request features via [GitHub Issues](https://github.com/YOUR_USERNAME/YOUR_REPO/issues) +- **Discussions**: Join the conversation in [GitHub Discussions](https://github.com/YOUR_USERNAME/YOUR_REPO/discussions) +- **Documentation**: Check the [docs/](docs/) directory for detailed guides + +--- + +**Remember**: Claude Flow coordinates, Claude Code creates! diff --git a/TODO.md b/TODO.md index 15fbf82..e1459c2 100644 --- a/TODO.md +++ b/TODO.md @@ -21,7 +21,7 @@ - Usage examples for SPARC workflow, custom commands, PM system - Architecture diagram and project structure - Links to documentation -- **Remaining**: Update placeholders (`YOUR_USERNAME/YOUR_REPO`) +- **Remaining**: Update placeholders (`kvnloo/evolve`) #### Task: Create CONTRIBUTING.md - **Status**: āœ… Completed @@ -185,7 +185,7 @@ ### Before Moving to Phase 2 1. **Update Placeholders**: - - [ ] Replace `YOUR_USERNAME/YOUR_REPO` in README.md + - [ ] Replace `kvnloo/evolve` in README.md - [ ] Add contact email in CODE_OF_CONDUCT.md - [ ] Add security email in SECURITY.md diff --git a/ccpm/commands/context/create.md b/ccpm/commands/context/create.md deleted file mode 100644 index 2218a15..0000000 --- a/ccpm/commands/context/create.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -allowed-tools: Bash, Read, Write, LS ---- - -# Create Initial Context - -This command creates the initial project context documentation in `.claude/context/` by analyzing the current project state and establishing comprehensive baseline documentation. - -## Required Rules - -**IMPORTANT:** Before executing this command, read and follow: -- `.claude/rules/datetime.md` - For getting real current date/time - -## Preflight Checklist - -Before proceeding, complete these validation steps. -Do not bother the user with preflight checks progress ("I'm not going to ..."). Just do them and move on. - -### 1. Context Directory Check -- Run: `ls -la .claude/context/ 2>/dev/null` -- If directory exists and has files: - - Count existing files: `ls -1 .claude/context/*.md 2>/dev/null | wc -l` - - Ask user: "āš ļø Found {count} existing context files. Overwrite all context? (yes/no)" - - Only proceed with explicit 'yes' confirmation - - If user says no, suggest: "Use /context:update to refresh existing context" - -### 2. Project Type Detection -- Check for project indicators: - - Node.js: `test -f package.json && echo "Node.js project detected"` - - Python: `test -f requirements.txt || test -f pyproject.toml && echo "Python project detected"` - - Rust: `test -f Cargo.toml && echo "Rust project detected"` - - Go: `test -f go.mod && echo "Go project detected"` -- Run: `git status 2>/dev/null` to confirm this is a git repository -- If not a git repo, ask: "āš ļø Not a git repository. Continue anyway? (yes/no)" - -### 3. Directory Creation -- If `.claude/` doesn't exist, create it: `mkdir -p .claude/context/` -- Verify write permissions: `touch .claude/context/.test && rm .claude/context/.test` -- If permission denied, tell user: "āŒ Cannot create context directory. Check permissions." - -### 4. Get Current DateTime -- Run: `date -u +"%Y-%m-%dT%H:%M:%SZ"` -- Store this value for use in all context file frontmatter - -## Instructions - -### 1. Pre-Analysis Validation -- Confirm project root directory is correct (presence of .git, package.json, etc.) -- Check for existing documentation that can inform context (README.md, docs/) -- If README.md doesn't exist, ask user for project description - -### 2. Systematic Project Analysis -Gather information in this order: - -**Project Detection:** -- Run: `find . -maxdepth 2 \( -name 'package.json' -o -name 'requirements.txt' -o -name 'pyproject.toml' -o -name 'pom.xml' -o -name 'build.gradle' -o -name 'build.gradle.kts' -o -name '*.sln' -o -name '*.csproj' -o -name 'Gemfile' -o -name 'Cargo.toml' -o -name 'go.mod' -o -name 'composer.json' -o -name 'pubspec.yaml' -o -name 'CMakeLists.txt' -o -name 'Dockerfile' -o -name 'docker-compose.yml' -o -name 'Package.swift' -o -type d -name '*.xcodeproj' -o -type d -name '*.xcworkspace' \) 2>/dev/null` -- Run: `git remote -v 2>/dev/null` to get repository information -- Run: `git branch --show-current 2>/dev/null` to get current branch - -**Codebase Analysis:** -- Run: `find . -type f \( -name '*.js' -o -name '*.ts' -o -name '*.jsx' -o -name '*.tsx' -o -name '*.py' -o -name '*.rs' -o -name '*.go' -o -name '*.php' -o -name '*.swift' -o -name '*.java' -o -name '*.kt' -o -name '*.kts' -o -name '*.cs' -o -name '*.rb' -o -name '*.dart' -o -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' -o -name '*.sh' \) 2>/dev/null | head -20` -- Run: `ls -la` to see root directory structure -- Read README.md if it exists - -### 3. Context File Creation with Frontmatter - -Each context file MUST include frontmatter with real datetime: - -```yaml ---- -created: [Use REAL datetime from date command] -last_updated: [Use REAL datetime from date command] -version: 1.0 -author: Claude Code PM System ---- -``` - -Generate the following initial context files: - - `progress.md` - Document current project status, completed work, and immediate next steps - - Include: Current branch, recent commits, outstanding changes - - `project-structure.md` - Map out the directory structure and file organization - - Include: Key directories, file naming patterns, module organization - - `tech-context.md` - Catalog current dependencies, technologies, and development tools - - Include: Language version, framework versions, dev dependencies - - `system-patterns.md` - Identify existing architectural patterns and design decisions - - Include: Design patterns observed, architectural style, data flow - - `product-context.md` - Define product requirements, target users, and core functionality - - Include: User personas, core features, use cases - - `project-brief.md` - Establish project scope, goals, and key objectives - - Include: What it does, why it exists, success criteria - - `project-overview.md` - Provide a high-level summary of features and capabilities - - Include: Feature list, current state, integration points - - `project-vision.md` - Articulate long-term vision and strategic direction - - Include: Future goals, potential expansions, strategic priorities - - `project-style-guide.md` - Document coding standards, conventions, and style preferences - - Include: Naming conventions, file structure patterns, comment style -### 4. Quality Validation - -After creating each file: -- Verify file was created successfully -- Check file is not empty (minimum 10 lines of content) -- Ensure frontmatter is present and valid -- Validate markdown formatting is correct - -### 5. Error Handling - -**Common Issues:** -- **No write permissions:** "āŒ Cannot write to .claude/context/. Check permissions." -- **Disk space:** "āŒ Insufficient disk space for context files." -- **File creation failed:** "āŒ Failed to create {filename}. Error: {error}" - -If any file fails to create: -- Report which files were successfully created -- Provide option to continue with partial context -- Never leave corrupted or incomplete files - -### 6. Post-Creation Summary - -Provide comprehensive summary: -``` -šŸ“‹ Context Creation Complete - -šŸ“ Created context in: .claude/context/ -āœ… Files created: {count}/9 - -šŸ“Š Context Summary: - - Project Type: {detected_type} - - Language: {primary_language} - - Git Status: {clean/changes} - - Dependencies: {count} packages - -šŸ“ File Details: - āœ… progress.md ({lines} lines) - Current status and recent work - āœ… project-structure.md ({lines} lines) - Directory organization - [... list all files with line counts and brief description ...] - -ā° Created: {timestamp} -šŸ”„ Next: Use /context:prime to load context in new sessions -šŸ’” Tip: Run /context:update regularly to keep context current -``` - -## Context Gathering Commands - -Use these commands to gather project information: -- Target directory: `.claude/context/` (create if needed) -- Current git status: `git status --short` -- Recent commits: `git log --oneline -10` -- Project README: Read `README.md` if exists -- Package files: Check for package.json, requirements.txt, pyproject.toml, composer.json, Gemfile, Cargo.toml, go.mod, pom.xml, build.gradle, build.gradle.kts, *.sln, *.csproj, Package.swift, *.xcodeproj, *.xcworkspace, pubspec.yaml, CMakeLists.txt, Dockerfile, or docker-compose.yml etc. -- Documentation scan: `find . -type f -name '*.md' -path '*/docs/*' 2>/dev/null | head -10` -- Test detection: `find . \( -path '*/.*' -prune\) -o \( -type d \( -name 'test' -o -name 'tests' -o -name '__tests__' -o -name 'spec' \) -o -type f \( -name '*[._]test.*' -o -name '*[._]spec.*' -o -name 'test_*.*' -o -name '*_test.*' \)\) 2>/dev/null | head -10` - -## Important Notes - -- **Always use real datetime** from system clock, never placeholders -- **Ask for confirmation** before overwriting existing context -- **Validate each file** is created successfully -- **Provide detailed summary** of what was created -- **Handle errors gracefully** with specific guidance - -$ARGUMENTS diff --git a/ccpm/commands/context/prime.md b/ccpm/commands/context/prime.md deleted file mode 100644 index 45e5684..0000000 --- a/ccpm/commands/context/prime.md +++ /dev/null @@ -1,146 +0,0 @@ ---- -allowed-tools: Bash, Read, LS ---- - -# Prime Context - -This command loads essential context for a new agent session by reading the project context documentation and understanding the codebase structure. - -## Preflight Checklist - -Before proceeding, complete these validation steps. -Do not bother the user with preflight checks progress ("I'm not going to ..."). Just do them and move on. - -### 1. Context Availability Check -- Run: `ls -la .claude/context/ 2>/dev/null` -- If directory doesn't exist or is empty: - - Tell user: "āŒ No context found. Please run /context:create first to establish project context." - - Exit gracefully -- Count available context files: `ls -1 .claude/context/*.md 2>/dev/null | wc -l` -- Report: "šŸ“ Found {count} context files to load" - -### 2. File Integrity Check -- For each context file found: - - Verify file is readable: `test -r ".claude/context/{file}" && echo "readable"` - - Check file has content: `test -s ".claude/context/{file}" && echo "has content"` - - Check for valid frontmatter (should start with `---`) -- Report any issues: - - Empty files: "āš ļø {filename} is empty (skipping)" - - Unreadable files: "āš ļø Cannot read {filename} (permission issue)" - - Missing frontmatter: "āš ļø {filename} missing frontmatter (may be corrupted)" - -### 3. Project State Check -- Run: `git status --short 2>/dev/null` to see current state -- Run: `git branch --show-current 2>/dev/null` to get current branch -- Note if not in git repository (context may be less complete) - -## Instructions - -### 1. Context Loading Sequence - -Load context files in priority order for optimal understanding: - -**Priority 1 - Essential Context (load first):** -1. `project-overview.md` - High-level understanding of the project -2. `project-brief.md` - Core purpose and goals -3. `tech-context.md` - Technical stack and dependencies - -**Priority 2 - Current State (load second):** -4. `progress.md` - Current status and recent work -5. `project-structure.md` - Directory and file organization - -**Priority 3 - Deep Context (load third):** -6. `system-patterns.md` - Architecture and design patterns -7. `product-context.md` - User needs and requirements -8. `project-style-guide.md` - Coding conventions -9. `project-vision.md` - Long-term direction - -### 2. Validation During Loading - -For each file loaded: -- Check frontmatter exists and parse: - - `created` date should be valid - - `last_updated` should be ≄ created date - - `version` should be present -- If frontmatter is invalid, note but continue loading content -- Track which files loaded successfully vs failed - -### 3. Supplementary Information - -After loading context files: -- Run: `git ls-files --others --exclude-standard | head -20` to see untracked files -- Read `README.md` if it exists for additional project information -- Check for `.env.example` or similar for environment setup needs - -### 4. Error Recovery - -**If critical files are missing:** -- `project-overview.md` missing: Try to understand from README.md -- `tech-context.md` missing: Analyze project configuration files directly (package.json, requirements.txt, pyproject.toml, composer.json, Gemfile, Cargo.toml, go.mod, pom.xml, build.gradle, build.gradle.kts, *.sln, *.csproj, Package.swift, pubspec.yaml, CMakeLists.txt, etc.) -- `progress.md` missing: Check recent git commits for status - -**If context is incomplete:** -- Inform user which files are missing -- Suggest running `/context:update` to refresh context -- Continue with partial context but note limitations - -### 5. Loading Summary - -Provide comprehensive summary after priming: - -``` -🧠 Context Primed Successfully - -šŸ“– Loaded Context Files: - āœ… Essential: {count}/3 files - āœ… Current State: {count}/2 files - āœ… Deep Context: {count}/4 files - -šŸ” Project Understanding: - - Name: {project_name} - - Type: {project_type} - - Language: {primary_language} - - Status: {current_status from progress.md} - - Branch: {git_branch} - -šŸ“Š Key Metrics: - - Last Updated: {most_recent_update} - - Context Version: {version} - - Files Loaded: {success_count}/{total_count} - -āš ļø Warnings: - {list any missing files or issues} - -šŸŽÆ Ready State: - āœ… Project context loaded - āœ… Current status understood - āœ… Ready for development work - -šŸ’” Project Summary: - {2-3 sentence summary of what the project is and current state} -``` - -### 6. Partial Context Handling - -If some files fail to load: -- Continue with available context -- Clearly note what's missing -- Suggest remediation: - - "Missing technical context - run /context:create to rebuild" - - "Progress file corrupted - run /context:update to refresh" - -### 7. Performance Optimization - -For large contexts: -- Load files in parallel when possible -- Show progress indicator: "Loading context files... {current}/{total}" -- Skip extremely large files (>10000 lines) with warning -- Cache parsed frontmatter for faster subsequent loads - -## Important Notes - -- **Always validate** files before attempting to read -- **Load in priority order** to get essential context first -- **Handle missing files gracefully** - don't fail completely -- **Provide clear summary** of what was loaded and project state -- **Note any issues** that might affect development work diff --git a/ccpm/commands/context/update.md b/ccpm/commands/context/update.md deleted file mode 100644 index 008de8a..0000000 --- a/ccpm/commands/context/update.md +++ /dev/null @@ -1,229 +0,0 @@ ---- -allowed-tools: Bash, Read, Write, LS ---- - -# Update Context - -This command updates the project context documentation in `.claude/context/` to reflect the current state of the project. Run this at the end of each development session to keep context accurate. - -## Required Rules - -**IMPORTANT:** Before executing this command, read and follow: -- `.claude/rules/datetime.md` - For getting real current date/time - -## Preflight Checklist - -Before proceeding, complete these validation steps. -Do not bother the user with preflight checks progress ("I'm not going to ..."). Just do them and move on. - -### 1. Context Validation -- Run: `ls -la .claude/context/ 2>/dev/null` -- If directory doesn't exist or is empty: - - Tell user: "āŒ No context to update. Please run /context:create first." - - Exit gracefully -- Count existing files: `ls -1 .claude/context/*.md 2>/dev/null | wc -l` -- Report: "šŸ“ Found {count} context files to check for updates" - -### 2. Change Detection - -Gather information about what has changed: - -**Git Changes:** -- Run: `git status --short` to see uncommitted changes -- Run: `git log --oneline -10` to see recent commits -- Run: `git diff --stat HEAD~5..HEAD 2>/dev/null` to see files changed recently - -**File Modifications:** -- Check context file ages: `find .claude/context -name "*.md" -type f -exec ls -lt {} + | head -5` -- Note which context files are oldest and may need updates - -**Dependency Changes:** -- Node.js: `git diff HEAD~5..HEAD package.json 2>/dev/null` -- Python: `git diff HEAD~5..HEAD requirements.txt pyproject.toml 2>/dev/null` -- Java: `git diff HEAD~5..HEAD pom.xml build.gradle build.gradle.kts 2>/dev/null` -- C#/.NET: `git diff HEAD~5..HEAD *.sln *.csproj 2>/dev/null` -- Ruby: `git diff HEAD~5..HEAD Gemfile Gemfile.lock 2>/dev/null` -- Rust: `git diff HEAD~5..HEAD Cargo.toml Cargo.lock 2>/dev/null` -- Go: `git diff HEAD~5..HEAD go.mod go.sum 2>/dev/null` -- PHP: `git diff HEAD~5..HEAD composer.json composer.lock 2>/dev/null` -- Dart/Flutter: `git diff HEAD~5..HEAD pubspec.yaml pubspec.lock 2>/dev/null` -- Swift: `git diff HEAD~5..HEAD Package.swift Package.resolved 2>/dev/null` -- C/C++: `git diff HEAD~5..HEAD CMakeLists.txt 2>/dev/null` -- Check if new dependencies were added or versions changed across any build system - -### 3. Get Current DateTime -- Run: `date -u +"%Y-%m-%dT%H:%M:%SZ"` -- Store for updating `last_updated` field in modified files - -## Instructions - -### 1. Systematic Change Analysis - -For each context file, determine if updates are needed: - -**Check each file systematically:** -#### `progress.md` - **Always Update** - - Check: Recent commits, current branch, uncommitted changes - - Update: Latest completed work, current blockers, next steps - - Run: `git log --oneline -5` to get recent commit messages - - Include completion percentages if applicable - -#### `project-structure.md` - **Update if Changed** - - Check: `git diff --name-status HEAD~10..HEAD | grep -E '^A'` for new files - - Update: New directories, moved files, structural reorganization - - Only update if significant structural changes occurred - -#### `tech-context.md` - **Update if Dependencies Changed** - - Check: Package files for new dependencies or version changes - - Update: New libraries, upgraded versions, new dev tools - - Include security updates or breaking changes - -#### `system-patterns.md` - **Update if Architecture Changed** - - Check: New design patterns, architectural decisions - - Update: New patterns adopted, refactoring done - - Only update for significant architectural changes - -#### `product-context.md` - **Update if Requirements Changed** - - Check: New features implemented, user feedback incorporated - - Update: New user stories, changed requirements - - Include any pivot in product direction - -#### `project-brief.md` - **Rarely Update** - - Check: Only if fundamental project goals changed - - Update: Major scope changes, new objectives - - Usually remains stable - -#### `project-overview.md` - **Update for Major Milestones** - - Check: Major features completed, significant progress - - Update: Feature status, capability changes - - Update when reaching project milestones - -#### `project-vision.md` - **Rarely Update** - - Check: Strategic direction changes - - Update: Only for major vision shifts - - Usually remains stable - -#### `project-style-guide.md` - **Update if Conventions Changed** - - Check: New linting rules, style decisions - - Update: Convention changes, new patterns adopted - - Include examples of new patterns -### 2. Smart Update Strategy - -**For each file that needs updating:** - -1. **Read existing file** to understand current content -2. **Identify specific sections** that need updates -3. **Preserve frontmatter** but update `last_updated` field: - ```yaml - --- - created: [preserve original] - last_updated: [Use REAL datetime from date command] - version: [increment if major update, e.g., 1.0 → 1.1] - author: Claude Code PM System - --- - ``` -4. **Make targeted updates** - don't rewrite entire file -5. **Add update notes** at the bottom if significant: - ```markdown - ## Update History - - {date}: {summary of what changed} - ``` - -### 3. Update Validation - -After updating each file: -- Verify file still has valid frontmatter -- Check file size is reasonable (not corrupted) -- Ensure markdown formatting is preserved -- Confirm updates accurately reflect changes - -### 4. Skip Optimization - -**Skip files that don't need updates:** -- If no relevant changes detected, skip the file -- Report skipped files in summary -- Don't update timestamp if content unchanged -- This preserves accurate "last modified" information - -### 5. Error Handling - -**Common Issues:** -- **File locked:** "āŒ Cannot update {file} - may be open in editor" -- **Permission denied:** "āŒ Cannot write to {file} - check permissions" -- **Corrupted file:** "āš ļø {file} appears corrupted - skipping update" -- **Disk space:** "āŒ Insufficient disk space for updates" - -If update fails: -- Report which files were successfully updated -- Note which files failed and why -- Preserve original files (don't leave corrupted state) - -### 6. Update Summary - -Provide detailed summary of updates: - -``` -šŸ”„ Context Update Complete - -šŸ“Š Update Statistics: - - Files Scanned: {total_count} - - Files Updated: {updated_count} - - Files Skipped: {skipped_count} (no changes needed) - - Errors: {error_count} - -šŸ“ Updated Files: - āœ… progress.md - Updated recent commits, current status - āœ… tech-context.md - Added 3 new dependencies - āœ… project-structure.md - Noted new /utils directory - -ā­ļø Skipped Files (no changes): - - project-brief.md (last updated: 5 days ago) - - project-vision.md (last updated: 2 weeks ago) - - system-patterns.md (last updated: 3 days ago) - -āš ļø Issues: - {any warnings or errors} - -ā° Last Update: {timestamp} -šŸ”„ Next: Run this command regularly to keep context current -šŸ’” Tip: Major changes? Consider running /context:create for full refresh -``` - -### 7. Incremental Update Tracking - -**Track what was updated:** -- Note which sections of each file were modified -- Keep changes focused and surgical -- Don't regenerate unchanged content -- Preserve formatting and structure - -### 8. Performance Optimization - -For large projects: -- Process files in parallel when possible -- Show progress: "Updating context files... {current}/{total}" -- Skip very large files with warning -- Use git diff to quickly identify changed areas - -## Context Gathering Commands - -Use these commands to detect changes: -- Context directory: `.claude/context/` -- Current git status: `git status --short` -- Recent commits: `git log --oneline -10` -- Changed files: `git diff --name-only HEAD~5..HEAD 2>/dev/null` -- Branch info: `git branch --show-current` -- Uncommitted changes: `git diff --stat` -- New untracked files: `git ls-files --others --exclude-standard | head -10` -- Dependency changes: Check package.json, requirements.txt, pyproject.toml, composer.json, Gemfile, Cargo.toml, go.mod, pom.xml, build.gradle, build.gradle.kts, *.sln, *.csproj, Package.swift, pubspec.yaml, CMakeLists.txt, etc. - -## Important Notes - -- **Only update files with actual changes** - preserve accurate timestamps -- **Always use real datetime** from system clock for `last_updated` -- **Make surgical updates** - don't regenerate entire files -- **Validate each update** - ensure files remain valid -- **Provide detailed summary** - show what changed and what didn't -- **Handle errors gracefully** - don't corrupt existing context - -$ARGUMENTS diff --git a/ccpm/commands/pm/blocked.md b/ccpm/commands/pm/blocked.md deleted file mode 100644 index d2cde75..0000000 --- a/ccpm/commands/pm/blocked.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -allowed-tools: Bash(bash ccpm/scripts/pm/blocked.sh) ---- - -Output: -!bash ccpm/scripts/pm/blocked.sh diff --git a/ccpm/commands/pm/clean.md b/ccpm/commands/pm/clean.md deleted file mode 100644 index 58a88e3..0000000 --- a/ccpm/commands/pm/clean.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -allowed-tools: Bash, Read, Write, LS ---- - -# Clean - -Clean up completed work and archive old epics. - -## Usage -``` -/pm:clean [--dry-run] -``` - -Options: -- `--dry-run` - Show what would be cleaned without doing it - -## Instructions - -### 1. Identify Completed Epics - -Find epics with: -- `status: completed` in frontmatter -- All tasks closed -- Last update > 30 days ago - -### 2. Identify Stale Work - -Find: -- Progress files for closed issues -- Update directories for completed work -- Orphaned task files (epic deleted) -- Empty directories - -### 3. Show Cleanup Plan - -``` -🧹 Cleanup Plan - -Completed Epics to Archive: - {epic_name} - Completed {days} days ago - {epic_name} - Completed {days} days ago - -Stale Progress to Remove: - {count} progress files for closed issues - -Empty Directories: - {list_of_empty_dirs} - -Space to Recover: ~{size}KB - -{If --dry-run}: This is a dry run. No changes made. -{Otherwise}: Proceed with cleanup? (yes/no) -``` - -### 4. Execute Cleanup - -If user confirms: - -**Archive Epics:** -```bash -mkdir -p .claude/epics/.archived -mv .claude/epics/{completed_epic} .claude/epics/.archived/ -``` - -**Remove Stale Files:** -- Delete progress files for closed issues > 30 days -- Remove empty update directories -- Clean up orphaned files - -**Create Archive Log:** -Create `.claude/epics/.archived/archive-log.md`: -```markdown -# Archive Log - -## {current_date} -- Archived: {epic_name} (completed {date}) -- Removed: {count} stale progress files -- Cleaned: {count} empty directories -``` - -### 5. Output - -``` -āœ… Cleanup Complete - -Archived: - {count} completed epics - -Removed: - {count} stale files - {count} empty directories - -Space recovered: {size}KB - -System is clean and organized. -``` - -## Important Notes - -Always offer --dry-run to preview changes. -Never delete PRDs or incomplete work. -Keep archive log for history. \ No newline at end of file diff --git a/ccpm/commands/pm/epic-close.md b/ccpm/commands/pm/epic-close.md deleted file mode 100644 index db2b181..0000000 --- a/ccpm/commands/pm/epic-close.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -allowed-tools: Bash, Read, Write, LS ---- - -# Epic Close - -Mark an epic as complete when all tasks are done. - -## Usage -``` -/pm:epic-close -``` - -## Instructions - -### 1. Verify All Tasks Complete - -Check all task files in `.claude/epics/$ARGUMENTS/`: -- Verify all have `status: closed` in frontmatter -- If any open tasks found: "āŒ Cannot close epic. Open tasks remain: {list}" - -### 2. Update Epic Status - -Get current datetime: `date -u +"%Y-%m-%dT%H:%M:%SZ"` - -Update epic.md frontmatter: -```yaml -status: completed -progress: 100% -updated: {current_datetime} -completed: {current_datetime} -``` - -### 3. Update PRD Status - -If epic references a PRD, update its status to "complete". - -### 4. Close Epic on GitHub - -If epic has GitHub issue: -```bash -gh issue close {epic_issue_number} --comment "āœ… Epic completed - all tasks done" -``` - -### 5. Archive Option - -Ask user: "Archive completed epic? (yes/no)" - -If yes: -- Move epic directory to `.claude/epics/.archived/{epic_name}/` -- Create archive summary with completion date - -### 6. Output - -``` -āœ… Epic closed: $ARGUMENTS - Tasks completed: {count} - Duration: {days_from_created_to_completed} - -{If archived}: Archived to .claude/epics/.archived/ - -Next epic: Run /pm:next to see priority work -``` - -## Important Notes - -Only close epics with all tasks complete. -Preserve all data when archiving. -Update related PRD status. \ No newline at end of file diff --git a/ccpm/commands/pm/epic-decompose.md b/ccpm/commands/pm/epic-decompose.md deleted file mode 100644 index 2af2572..0000000 --- a/ccpm/commands/pm/epic-decompose.md +++ /dev/null @@ -1,230 +0,0 @@ ---- -allowed-tools: Bash, Read, Write, LS, Task ---- - -# Epic Decompose - -Break epic into concrete, actionable tasks. - -## Usage -``` -/pm:epic-decompose -``` - -## Required Rules - -**IMPORTANT:** Before executing this command, read and follow: -- `.claude/rules/datetime.md` - For getting real current date/time - -## Preflight Checklist - -Before proceeding, complete these validation steps. -Do not bother the user with preflight checks progress ("I'm not going to ..."). Just do them and move on. - -1. **Verify epic exists:** - - Check if `.claude/epics/$ARGUMENTS/epic.md` exists - - If not found, tell user: "āŒ Epic not found: $ARGUMENTS. First create it with: /pm:prd-parse $ARGUMENTS" - - Stop execution if epic doesn't exist - -2. **Check for existing tasks:** - - Check if any numbered task files (001.md, 002.md, etc.) already exist in `.claude/epics/$ARGUMENTS/` - - If tasks exist, list them and ask: "āš ļø Found {count} existing tasks. Delete and recreate all tasks? (yes/no)" - - Only proceed with explicit 'yes' confirmation - - If user says no, suggest: "View existing tasks with: /pm:epic-show $ARGUMENTS" - -3. **Validate epic frontmatter:** - - Verify epic has valid frontmatter with: name, status, created, prd - - If invalid, tell user: "āŒ Invalid epic frontmatter. Please check: .claude/epics/$ARGUMENTS/epic.md" - -4. **Check epic status:** - - If epic status is already "completed", warn user: "āš ļø Epic is marked as completed. Are you sure you want to decompose it again?" - -## Instructions - -You are decomposing an epic into specific, actionable tasks for: **$ARGUMENTS** - -### 1. Read the Epic -- Load the epic from `.claude/epics/$ARGUMENTS/epic.md` -- Understand the technical approach and requirements -- Review the task breakdown preview - -### 2. Analyze for Parallel Creation - -Determine if tasks can be created in parallel: -- If tasks are mostly independent: Create in parallel using Task agents -- If tasks have complex dependencies: Create sequentially -- For best results: Group independent tasks for parallel creation - -### 3. Parallel Task Creation (When Possible) - -If tasks can be created in parallel, spawn sub-agents: - -```yaml -Task: - description: "Create task files batch {X}" - subagent_type: "general-purpose" - prompt: | - Create task files for epic: $ARGUMENTS - - Tasks to create: - - {list of 3-4 tasks for this batch} - - For each task: - 1. Create file: .claude/epics/$ARGUMENTS/{number}.md - 2. Use exact format with frontmatter and all sections - 3. Follow task breakdown from epic - 4. Set parallel/depends_on fields appropriately - 5. Number sequentially (001.md, 002.md, etc.) - - Return: List of files created -``` - -### 4. Task File Format with Frontmatter -For each task, create a file with this exact structure: - -```markdown ---- -name: [Task Title] -status: open -created: [Current ISO date/time] -updated: [Current ISO date/time] -github: [Will be updated when synced to GitHub] -depends_on: [] # List of task numbers this depends on, e.g., [001, 002] -parallel: true # Can this run in parallel with other tasks? -conflicts_with: [] # Tasks that modify same files, e.g., [003, 004] ---- - -# Task: [Task Title] - -## Description -Clear, concise description of what needs to be done - -## Acceptance Criteria -- [ ] Specific criterion 1 -- [ ] Specific criterion 2 -- [ ] Specific criterion 3 - -## Technical Details -- Implementation approach -- Key considerations -- Code locations/files affected - -## Dependencies -- [ ] Task/Issue dependencies -- [ ] External dependencies - -## Effort Estimate -- Size: XS/S/M/L/XL -- Hours: estimated hours -- Parallel: true/false (can run in parallel with other tasks) - -## Definition of Done -- [ ] Code implemented -- [ ] Tests written and passing -- [ ] Documentation updated -- [ ] Code reviewed -- [ ] Deployed to staging -``` - -### 3. Task Naming Convention -Save tasks as: `.claude/epics/$ARGUMENTS/{task_number}.md` -- Use sequential numbering: 001.md, 002.md, etc. -- Keep task titles short but descriptive - -### 4. Frontmatter Guidelines -- **name**: Use a descriptive task title (without "Task:" prefix) -- **status**: Always start with "open" for new tasks -- **created**: Get REAL current datetime by running: `date -u +"%Y-%m-%dT%H:%M:%SZ"` -- **updated**: Use the same real datetime as created for new tasks -- **github**: Leave placeholder text - will be updated during sync -- **depends_on**: List task numbers that must complete before this can start (e.g., [001, 002]) -- **parallel**: Set to true if this can run alongside other tasks without conflicts -- **conflicts_with**: List task numbers that modify the same files (helps coordination) - -### 5. Task Types to Consider -- **Setup tasks**: Environment, dependencies, scaffolding -- **Data tasks**: Models, schemas, migrations -- **API tasks**: Endpoints, services, integration -- **UI tasks**: Components, pages, styling -- **Testing tasks**: Unit tests, integration tests -- **Documentation tasks**: README, API docs -- **Deployment tasks**: CI/CD, infrastructure - -### 6. Parallelization -Mark tasks with `parallel: true` if they can be worked on simultaneously without conflicts. - -### 7. Execution Strategy - -Choose based on task count and complexity: - -**Small Epic (< 5 tasks)**: Create sequentially for simplicity - -**Medium Epic (5-10 tasks)**: -- Batch into 2-3 groups -- Spawn agents for each batch -- Consolidate results - -**Large Epic (> 10 tasks)**: -- Analyze dependencies first -- Group independent tasks -- Launch parallel agents (max 5 concurrent) -- Create dependent tasks after prerequisites - -Example for parallel execution: -```markdown -Spawning 3 agents for parallel task creation: -- Agent 1: Creating tasks 001-003 (Database layer) -- Agent 2: Creating tasks 004-006 (API layer) -- Agent 3: Creating tasks 007-009 (UI layer) -``` - -### 8. Task Dependency Validation - -When creating tasks with dependencies: -- Ensure referenced dependencies exist (e.g., if Task 003 depends on Task 002, verify 002 was created) -- Check for circular dependencies (Task A → Task B → Task A) -- If dependency issues found, warn but continue: "āš ļø Task dependency warning: {details}" - -### 9. Update Epic with Task Summary -After creating all tasks, update the epic file by adding this section: -```markdown -## Tasks Created -- [ ] 001.md - {Task Title} (parallel: true/false) -- [ ] 002.md - {Task Title} (parallel: true/false) -- etc. - -Total tasks: {count} -Parallel tasks: {parallel_count} -Sequential tasks: {sequential_count} -Estimated total effort: {sum of hours} -``` - -Also update the epic's frontmatter progress if needed (still 0% until tasks actually start). - -### 9. Quality Validation - -Before finalizing tasks, verify: -- [ ] All tasks have clear acceptance criteria -- [ ] Task sizes are reasonable (1-3 days each) -- [ ] Dependencies are logical and achievable -- [ ] Parallel tasks don't conflict with each other -- [ ] Combined tasks cover all epic requirements - -### 10. Post-Decomposition - -After successfully creating tasks: -1. Confirm: "āœ… Created {count} tasks for epic: $ARGUMENTS" -2. Show summary: - - Total tasks created - - Parallel vs sequential breakdown - - Total estimated effort -3. Suggest next step: "Ready to sync to GitHub? Run: /pm:epic-sync $ARGUMENTS" - -## Error Recovery - -If any step fails: -- If task creation partially completes, list which tasks were created -- Provide option to clean up partial tasks -- Never leave the epic in an inconsistent state - -Aim for tasks that can be completed in 1-3 days each. Break down larger tasks into smaller, manageable pieces for the "$ARGUMENTS" epic. diff --git a/ccpm/commands/pm/epic-edit.md b/ccpm/commands/pm/epic-edit.md deleted file mode 100644 index 850dd7d..0000000 --- a/ccpm/commands/pm/epic-edit.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -allowed-tools: Read, Write, LS ---- - -# Epic Edit - -Edit epic details after creation. - -## Usage -``` -/pm:epic-edit -``` - -## Instructions - -### 1. Read Current Epic - -Read `.claude/epics/$ARGUMENTS/epic.md`: -- Parse frontmatter -- Read content sections - -### 2. Interactive Edit - -Ask user what to edit: -- Name/Title -- Description/Overview -- Architecture decisions -- Technical approach -- Dependencies -- Success criteria - -### 3. Update Epic File - -Get current datetime: `date -u +"%Y-%m-%dT%H:%M:%SZ"` - -Update epic.md: -- Preserve all frontmatter except `updated` -- Apply user's edits to content -- Update `updated` field with current datetime - -### 4. Option to Update GitHub - -If epic has GitHub URL in frontmatter: -Ask: "Update GitHub issue? (yes/no)" - -If yes: -```bash -gh issue edit {issue_number} --body-file .claude/epics/$ARGUMENTS/epic.md -``` - -### 5. Output - -``` -āœ… Updated epic: $ARGUMENTS - Changes made to: {sections_edited} - -{If GitHub updated}: GitHub issue updated āœ… - -View epic: /pm:epic-show $ARGUMENTS -``` - -## Important Notes - -Preserve frontmatter history (created, github URL, etc.). -Don't change task files when editing epic. -Follow `/rules/frontmatter-operations.md`. \ No newline at end of file diff --git a/ccpm/commands/pm/epic-list.md b/ccpm/commands/pm/epic-list.md deleted file mode 100644 index 4fe9b85..0000000 --- a/ccpm/commands/pm/epic-list.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -allowed-tools: Bash(bash ccpm/scripts/pm/epic-list.sh) ---- - -Output: -!bash ccpm/scripts/pm/epic-list.sh - diff --git a/ccpm/commands/pm/epic-merge.md b/ccpm/commands/pm/epic-merge.md deleted file mode 100644 index e0f886e..0000000 --- a/ccpm/commands/pm/epic-merge.md +++ /dev/null @@ -1,261 +0,0 @@ ---- -allowed-tools: Bash, Read, Write ---- - -# Epic Merge - -Merge completed epic from worktree back to main branch. - -## Usage -``` -/pm:epic-merge -``` - -## Quick Check - -1. **Verify worktree exists:** - ```bash - git worktree list | grep "epic-$ARGUMENTS" || echo "āŒ No worktree for epic: $ARGUMENTS" - ``` - -2. **Check for active agents:** - Read `.claude/epics/$ARGUMENTS/execution-status.md` - If active agents exist: "āš ļø Active agents detected. Stop them first with: /pm:epic-stop $ARGUMENTS" - -## Instructions - -### 1. Pre-Merge Validation - -Navigate to worktree and check status: -```bash -cd ../epic-$ARGUMENTS - -# Check for uncommitted changes -if [[ $(git status --porcelain) ]]; then - echo "āš ļø Uncommitted changes in worktree:" - git status --short - echo "Commit or stash changes before merging" - exit 1 -fi - -# Check branch status -git fetch origin -git status -sb -``` - -### 2. Run Tests (Optional but Recommended) - -```bash -# Look for test commands based on project type -if [ -f package.json ]; then - npm test || echo "āš ļø Tests failed. Continue anyway? (yes/no)" -elif [ -f pom.xml ]; then - mvn test || echo "āš ļø Tests failed. Continue anyway? (yes/no)" -elif [ -f build.gradle ] || [ -f build.gradle.kts ]; then - ./gradlew test || echo "āš ļø Tests failed. Continue anyway? (yes/no)" -elif [ -f composer.json ]; then - ./vendor/bin/phpunit || echo "āš ļø Tests failed. Continue anyway? (yes/no)" -elif [ -f *.sln ] || [ -f *.csproj ]; then - dotnet test || echo "āš ļø Tests failed. Continue anyway? (yes/no)" -elif [ -f Cargo.toml ]; then - cargo test || echo "āš ļø Tests failed. Continue anyway? (yes/no)" -elif [ -f go.mod ]; then - go test ./... || echo "āš ļø Tests failed. Continue anyway? (yes/no)" -elif [ -f Gemfile ]; then - bundle exec rspec || bundle exec rake test || echo "āš ļø Tests failed. Continue anyway? (yes/no)" -elif [ -f pubspec.yaml ]; then - flutter test || echo "āš ļø Tests failed. Continue anyway? (yes/no)" -elif [ -f Package.swift ]; then - swift test || echo "āš ļø Tests failed. Continue anyway? (yes/no)" -elif [ -f CMakeLists.txt ]; then - cd build && ctest || echo "āš ļø Tests failed. Continue anyway? (yes/no)" -elif [ -f Makefile ]; then - make test || echo "āš ļø Tests failed. Continue anyway? (yes/no)" -fi -``` - -### 3. Update Epic Documentation - -Get current datetime: `date -u +"%Y-%m-%dT%H:%M:%SZ"` - -Update `.claude/epics/$ARGUMENTS/epic.md`: -- Set status to "completed" -- Update completion date -- Add final summary - -### 4. Attempt Merge - -```bash -# Return to main repository -cd {main-repo-path} - -# Ensure main is up to date -git checkout main -git pull origin main - -# Attempt merge -echo "Merging epic/$ARGUMENTS to main..." -git merge epic/$ARGUMENTS --no-ff -m "Merge epic: $ARGUMENTS - -Completed features: -# Generate feature list -feature_list="" -if [ -d ".claude/epics/$ARGUMENTS" ]; then - cd .claude/epics/$ARGUMENTS - for task_file in [0-9]*.md; do - [ -f "$task_file" ] || continue - task_name=$(grep '^name:' "$task_file" | cut -d: -f2 | sed 's/^ *//') - feature_list="$feature_list\n- $task_name" - done - cd - > /dev/null -fi - -echo "$feature_list" - -# Extract epic issue number -epic_github_line=$(grep 'github:' .claude/epics/$ARGUMENTS/epic.md 2>/dev/null || true) -if [ -n "$epic_github_line" ]; then - epic_issue=$(echo "$epic_github_line" | grep -oE '[0-9]+' || true) - if [ -n "$epic_issue" ]; then - echo "\nCloses epic #$epic_issue" - fi -fi" -``` - -### 5. Handle Merge Conflicts - -If merge fails with conflicts: -```bash -# Check conflict status -git status - -echo " -āŒ Merge conflicts detected! - -Conflicts in: -$(git diff --name-only --diff-filter=U) - -Options: -1. Resolve manually: - - Edit conflicted files - - git add {files} - - git commit - -2. Abort merge: - git merge --abort - -3. Get help: - /pm:epic-resolve $ARGUMENTS - -Worktree preserved at: ../epic-$ARGUMENTS -" -exit 1 -``` - -### 6. Post-Merge Cleanup - -If merge succeeds: -```bash -# Push to remote -git push origin main - -# Clean up worktree -git worktree remove ../epic-$ARGUMENTS -echo "āœ… Worktree removed: ../epic-$ARGUMENTS" - -# Delete branch -git branch -d epic/$ARGUMENTS -git push origin --delete epic/$ARGUMENTS 2>/dev/null || true - -# Archive epic locally -mkdir -p .claude/epics/archived/ -mv .claude/epics/$ARGUMENTS .claude/epics/archived/ -echo "āœ… Epic archived: .claude/epics/archived/$ARGUMENTS" -``` - -### 7. Update GitHub Issues - -Close related issues: -```bash -# Get issue numbers from epic -# Extract epic issue number -epic_github_line=$(grep 'github:' .claude/epics/archived/$ARGUMENTS/epic.md 2>/dev/null || true) -if [ -n "$epic_github_line" ]; then - epic_issue=$(echo "$epic_github_line" | grep -oE '[0-9]+$' || true) -else - epic_issue="" -fi - -# Close epic issue -gh issue close $epic_issue -c "Epic completed and merged to main" - -# Close task issues -for task_file in .claude/epics/archived/$ARGUMENTS/[0-9]*.md; do - [ -f "$task_file" ] || continue - # Extract task issue number - task_github_line=$(grep 'github:' "$task_file" 2>/dev/null || true) - if [ -n "$task_github_line" ]; then - issue_num=$(echo "$task_github_line" | grep -oE '[0-9]+$' || true) - else - issue_num="" - fi - if [ ! -z "$issue_num" ]; then - gh issue close $issue_num -c "Completed in epic merge" - fi -done -``` - -### 8. Final Output - -``` -āœ… Epic Merged Successfully: $ARGUMENTS - -Summary: - Branch: epic/$ARGUMENTS → main - Commits merged: {count} - Files changed: {count} - Issues closed: {count} - -Cleanup completed: - āœ“ Worktree removed - āœ“ Branch deleted - āœ“ Epic archived - āœ“ GitHub issues closed - -Next steps: - - Deploy changes if needed - - Start new epic: /pm:prd-new {feature} - - View completed work: git log --oneline -20 -``` - -## Conflict Resolution Help - -If conflicts need resolution: -``` -The epic branch has conflicts with main. - -This typically happens when: -- Main has changed since epic started -- Multiple epics modified same files -- Dependencies were updated - -To resolve: -1. Open conflicted files -2. Look for <<<<<<< markers -3. Choose correct version or combine -4. Remove conflict markers -5. git add {resolved files} -6. git commit -7. git push - -Or abort and try later: - git merge --abort -``` - -## Important Notes - -- Always check for uncommitted changes first -- Run tests before merging when possible -- Use --no-ff to preserve epic history -- Archive epic data instead of deleting -- Close GitHub issues to maintain sync \ No newline at end of file diff --git a/ccpm/commands/pm/epic-oneshot.md b/ccpm/commands/pm/epic-oneshot.md deleted file mode 100644 index 80f2e06..0000000 --- a/ccpm/commands/pm/epic-oneshot.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -allowed-tools: Read, LS ---- - -# Epic Oneshot - -Decompose epic into tasks and sync to GitHub in one operation. - -## Usage -``` -/pm:epic-oneshot -``` - -## Instructions - -### 1. Validate Prerequisites - -Check that epic exists and hasn't been processed: -```bash -# Epic must exist -test -f .claude/epics/$ARGUMENTS/epic.md || echo "āŒ Epic not found. Run: /pm:prd-parse $ARGUMENTS" - -# Check for existing tasks -if ls .claude/epics/$ARGUMENTS/[0-9]*.md 2>/dev/null | grep -q .; then - echo "āš ļø Tasks already exist. This will create duplicates." - echo "Delete existing tasks or use /pm:epic-sync instead." - exit 1 -fi - -# Check if already synced -if grep -q "github:" .claude/epics/$ARGUMENTS/epic.md; then - echo "āš ļø Epic already synced to GitHub." - echo "Use /pm:epic-sync to update." - exit 1 -fi -``` - -### 2. Execute Decompose - -Simply run the decompose command: -``` -Running: /pm:epic-decompose $ARGUMENTS -``` - -This will: -- Read the epic -- Create task files (using parallel agents if appropriate) -- Update epic with task summary - -### 3. Execute Sync - -Immediately follow with sync: -``` -Running: /pm:epic-sync $ARGUMENTS -``` - -This will: -- Create epic issue on GitHub -- Create sub-issues (using parallel agents if appropriate) -- Rename task files to issue IDs -- Create worktree - -### 4. Output - -``` -šŸš€ Epic Oneshot Complete: $ARGUMENTS - -Step 1: Decomposition āœ“ - - Tasks created: {count} - -Step 2: GitHub Sync āœ“ - - Epic: #{number} - - Sub-issues created: {count} - - Worktree: ../epic-$ARGUMENTS - -Ready for development! - Start work: /pm:epic-start $ARGUMENTS - Or single task: /pm:issue-start {task_number} -``` - -## Important Notes - -This is simply a convenience wrapper that runs: -1. `/pm:epic-decompose` -2. `/pm:epic-sync` - -Both commands handle their own error checking, parallel execution, and validation. This command just orchestrates them in sequence. - -Use this when you're confident the epic is ready and want to go from epic to GitHub issues in one step. \ No newline at end of file diff --git a/ccpm/commands/pm/epic-refresh.md b/ccpm/commands/pm/epic-refresh.md deleted file mode 100644 index 7fa511e..0000000 --- a/ccpm/commands/pm/epic-refresh.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -allowed-tools: Read, Write, LS ---- - -# Epic Refresh - -Update epic progress based on task states. - -## Usage -``` -/pm:epic-refresh -``` - -## Instructions - -### 1. Count Task Status - -Scan all task files in `.claude/epics/$ARGUMENTS/`: -- Count total tasks -- Count tasks with `status: closed` -- Count tasks with `status: open` -- Count tasks with work in progress - -### 2. Calculate Progress - -``` -progress = (closed_tasks / total_tasks) * 100 -``` - -Round to nearest integer. - -### 3. Update GitHub Task List - -If epic has GitHub issue, sync task checkboxes: - -```bash -# Get epic issue number from epic.md frontmatter -epic_issue={extract_from_github_field} - -if [ ! -z "$epic_issue" ]; then - # Get current epic body - gh issue view $epic_issue --json body -q .body > /tmp/epic-body.md - - # For each task, check its status and update checkbox - for task_file in .claude/epics/$ARGUMENTS/[0-9]*.md; do - # Extract task issue number - task_github_line=$(grep 'github:' "$task_file" 2>/dev/null || true) - if [ -n "$task_github_line" ]; then - task_issue=$(echo "$task_github_line" | grep -oE '[0-9]+$' || true) - else - task_issue="" - fi - task_status=$(grep 'status:' $task_file | cut -d: -f2 | tr -d ' ') - - if [ "$task_status" = "closed" ]; then - # Mark as checked - sed -i "s/- \[ \] #$task_issue/- [x] #$task_issue/" /tmp/epic-body.md - else - # Ensure unchecked (in case manually checked) - sed -i "s/- \[x\] #$task_issue/- [ ] #$task_issue/" /tmp/epic-body.md - fi - done - - # Update epic issue - gh issue edit $epic_issue --body-file /tmp/epic-body.md -fi -``` - -### 4. Determine Epic Status - -- If progress = 0% and no work started: `backlog` -- If progress > 0% and < 100%: `in-progress` -- If progress = 100%: `completed` - -### 5. Update Epic - -Get current datetime: `date -u +"%Y-%m-%dT%H:%M:%SZ"` - -Update epic.md frontmatter: -```yaml -status: {calculated_status} -progress: {calculated_progress}% -updated: {current_datetime} -``` - -### 6. Output - -``` -šŸ”„ Epic refreshed: $ARGUMENTS - -Tasks: - Closed: {closed_count} - Open: {open_count} - Total: {total_count} - -Progress: {old_progress}% → {new_progress}% -Status: {old_status} → {new_status} -GitHub: Task list updated āœ“ - -{If complete}: Run /pm:epic-close $ARGUMENTS to close epic -{If in progress}: Run /pm:next to see priority tasks -``` - -## Important Notes - -This is useful after manual task edits or GitHub sync. -Don't modify task files, only epic status. -Preserve all other frontmatter fields. \ No newline at end of file diff --git a/ccpm/commands/pm/epic-show.md b/ccpm/commands/pm/epic-show.md deleted file mode 100644 index d87a264..0000000 --- a/ccpm/commands/pm/epic-show.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -allowed-tools: Bash(bash ccpm/scripts/pm/epic-show.sh $ARGUMENTS) ---- - -Output: -!bash ccpm/scripts/pm/epic-show.sh $ARGUMENTS diff --git a/ccpm/commands/pm/epic-start-worktree.md b/ccpm/commands/pm/epic-start-worktree.md deleted file mode 100644 index 29d6cb5..0000000 --- a/ccpm/commands/pm/epic-start-worktree.md +++ /dev/null @@ -1,221 +0,0 @@ ---- -allowed-tools: Bash, Read, Write, LS, Task ---- - -# Epic Start - -Launch parallel agents to work on epic tasks in a shared worktree. - -## Usage -``` -/pm:epic-start -``` - -## Quick Check - -1. **Verify epic exists:** - ```bash - test -f .claude/epics/$ARGUMENTS/epic.md || echo "āŒ Epic not found. Run: /pm:prd-parse $ARGUMENTS" - ``` - -2. **Check GitHub sync:** - Look for `github:` field in epic frontmatter. - If missing: "āŒ Epic not synced. Run: /pm:epic-sync $ARGUMENTS first" - -3. **Check for worktree:** - ```bash - git worktree list | grep "epic-$ARGUMENTS" - ``` - -## Instructions - -### 1. Create or Enter Worktree - -Follow `/rules/worktree-operations.md`: - -```bash -# If worktree doesn't exist, create it -if ! git worktree list | grep -q "epic-$ARGUMENTS"; then - git checkout main - git pull origin main - git worktree add ../epic-$ARGUMENTS -b epic/$ARGUMENTS - echo "āœ… Created worktree: ../epic-$ARGUMENTS" -else - echo "āœ… Using existing worktree: ../epic-$ARGUMENTS" -fi -``` - -### 2. Identify Ready Issues - -Read all task files in `.claude/epics/$ARGUMENTS/`: -- Parse frontmatter for `status`, `depends_on`, `parallel` fields -- Check GitHub issue status if needed -- Build dependency graph - -Categorize issues: -- **Ready**: No unmet dependencies, not started -- **Blocked**: Has unmet dependencies -- **In Progress**: Already being worked on -- **Complete**: Finished - -### 3. Analyze Ready Issues - -For each ready issue without analysis: -```bash -# Check for analysis -if ! test -f .claude/epics/$ARGUMENTS/{issue}-analysis.md; then - echo "Analyzing issue #{issue}..." - # Run analysis (inline or via Task tool) -fi -``` - -### 4. Launch Parallel Agents - -For each ready issue with analysis: - -```markdown -## Starting Issue #{issue}: {title} - -Reading analysis... -Found {count} parallel streams: - - Stream A: {description} (Agent-{id}) - - Stream B: {description} (Agent-{id}) - -Launching agents in worktree: ../epic-$ARGUMENTS/ -``` - -Use Task tool to launch each stream: -```yaml -Task: - description: "Issue #{issue} Stream {X}" - subagent_type: "{agent_type}" - prompt: | - Working in worktree: ../epic-$ARGUMENTS/ - Issue: #{issue} - {title} - Stream: {stream_name} - - Your scope: - - Files: {file_patterns} - - Work: {stream_description} - - Read full requirements from: - - .claude/epics/$ARGUMENTS/{task_file} - - .claude/epics/$ARGUMENTS/{issue}-analysis.md - - Follow coordination rules in /rules/agent-coordination.md - - Commit frequently with message format: - "Issue #{issue}: {specific change}" - - Update progress in: - .claude/epics/$ARGUMENTS/updates/{issue}/stream-{X}.md -``` - -### 5. Track Active Agents - -Create/update `.claude/epics/$ARGUMENTS/execution-status.md`: - -```markdown ---- -started: {datetime} -worktree: ../epic-$ARGUMENTS -branch: epic/$ARGUMENTS ---- - -# Execution Status - -## Active Agents -- Agent-1: Issue #1234 Stream A (Database) - Started {time} -- Agent-2: Issue #1234 Stream B (API) - Started {time} -- Agent-3: Issue #1235 Stream A (UI) - Started {time} - -## Queued Issues -- Issue #1236 - Waiting for #1234 -- Issue #1237 - Waiting for #1235 - -## Completed -- {None yet} -``` - -### 6. Monitor and Coordinate - -Set up monitoring: -```bash -echo " -Agents launched successfully! - -Monitor progress: - /pm:epic-status $ARGUMENTS - -View worktree changes: - cd ../epic-$ARGUMENTS && git status - -Stop all agents: - /pm:epic-stop $ARGUMENTS - -Merge when complete: - /pm:epic-merge $ARGUMENTS -" -``` - -### 7. Handle Dependencies - -As agents complete streams: -- Check if any blocked issues are now ready -- Launch new agents for newly-ready work -- Update execution-status.md - -## Output Format - -``` -šŸš€ Epic Execution Started: $ARGUMENTS - -Worktree: ../epic-$ARGUMENTS -Branch: epic/$ARGUMENTS - -Launching {total} agents across {issue_count} issues: - -Issue #1234: Database Schema - ā”œā”€ Stream A: Schema creation (Agent-1) āœ“ Started - └─ Stream B: Migrations (Agent-2) āœ“ Started - -Issue #1235: API Endpoints - ā”œā”€ Stream A: User endpoints (Agent-3) āœ“ Started - ā”œā”€ Stream B: Post endpoints (Agent-4) āœ“ Started - └─ Stream C: Tests (Agent-5) āø Waiting for A & B - -Blocked Issues (2): - - #1236: UI Components (depends on #1234) - - #1237: Integration (depends on #1235, #1236) - -Monitor with: /pm:epic-status $ARGUMENTS -``` - -## Error Handling - -If agent launch fails: -``` -āŒ Failed to start Agent-{id} - Issue: #{issue} - Stream: {stream} - Error: {reason} - -Continue with other agents? (yes/no) -``` - -If worktree creation fails: -``` -āŒ Cannot create worktree - {git error message} - -Try: git worktree prune -Or: Check existing worktrees with: git worktree list -``` - -## Important Notes - -- Follow `/rules/worktree-operations.md` for git operations -- Follow `/rules/agent-coordination.md` for parallel work -- Agents work in the SAME worktree (not separate ones) -- Maximum parallel agents should be reasonable (e.g., 5-10) -- Monitor system resources if launching many agents diff --git a/ccpm/commands/pm/epic-start.md b/ccpm/commands/pm/epic-start.md deleted file mode 100644 index 51628a4..0000000 --- a/ccpm/commands/pm/epic-start.md +++ /dev/null @@ -1,247 +0,0 @@ ---- -allowed-tools: Bash, Read, Write, LS, Task ---- - -# Epic Start - -Launch parallel agents to work on epic tasks in a shared branch. - -## Usage -``` -/pm:epic-start -``` - -## Quick Check - -1. **Verify epic exists:** - ```bash - test -f .claude/epics/$ARGUMENTS/epic.md || echo "āŒ Epic not found. Run: /pm:prd-parse $ARGUMENTS" - ``` - -2. **Check GitHub sync:** - Look for `github:` field in epic frontmatter. - If missing: "āŒ Epic not synced. Run: /pm:epic-sync $ARGUMENTS first" - -3. **Check for branch:** - ```bash - git branch -a | grep "epic/$ARGUMENTS" - ``` - -4. **Check for uncommitted changes:** - ```bash - git status --porcelain - ``` - If output is not empty: "āŒ You have uncommitted changes. Please commit or stash them before starting an epic" - -## Instructions - -### 1. Create or Enter Branch - -Follow `/rules/branch-operations.md`: - -```bash -# Check for uncommitted changes -if [ -n "$(git status --porcelain)" ]; then - echo "āŒ You have uncommitted changes. Please commit or stash them before starting an epic." - exit 1 -fi - -# If branch doesn't exist, create it -if ! git branch -a | grep -q "epic/$ARGUMENTS"; then - git checkout main - git pull origin main - git checkout -b epic/$ARGUMENTS - git push -u origin epic/$ARGUMENTS - echo "āœ… Created branch: epic/$ARGUMENTS" -else - git checkout epic/$ARGUMENTS - git pull origin epic/$ARGUMENTS - echo "āœ… Using existing branch: epic/$ARGUMENTS" -fi -``` - -### 2. Identify Ready Issues - -Read all task files in `.claude/epics/$ARGUMENTS/`: -- Parse frontmatter for `status`, `depends_on`, `parallel` fields -- Check GitHub issue status if needed -- Build dependency graph - -Categorize issues: -- **Ready**: No unmet dependencies, not started -- **Blocked**: Has unmet dependencies -- **In Progress**: Already being worked on -- **Complete**: Finished - -### 3. Analyze Ready Issues - -For each ready issue without analysis: -```bash -# Check for analysis -if ! test -f .claude/epics/$ARGUMENTS/{issue}-analysis.md; then - echo "Analyzing issue #{issue}..." - # Run analysis (inline or via Task tool) -fi -``` - -### 4. Launch Parallel Agents - -For each ready issue with analysis: - -```markdown -## Starting Issue #{issue}: {title} - -Reading analysis... -Found {count} parallel streams: - - Stream A: {description} (Agent-{id}) - - Stream B: {description} (Agent-{id}) - -Launching agents in branch: epic/$ARGUMENTS -``` - -Use Task tool to launch each stream: -```yaml -Task: - description: "Issue #{issue} Stream {X}" - subagent_type: "{agent_type}" - prompt: | - Working in branch: epic/$ARGUMENTS - Issue: #{issue} - {title} - Stream: {stream_name} - - Your scope: - - Files: {file_patterns} - - Work: {stream_description} - - Read full requirements from: - - .claude/epics/$ARGUMENTS/{task_file} - - .claude/epics/$ARGUMENTS/{issue}-analysis.md - - Follow coordination rules in /rules/agent-coordination.md - - Commit frequently with message format: - "Issue #{issue}: {specific change}" - - Update progress in: - .claude/epics/$ARGUMENTS/updates/{issue}/stream-{X}.md -``` - -### 5. Track Active Agents - -Create/update `.claude/epics/$ARGUMENTS/execution-status.md`: - -```markdown ---- -started: {datetime} -branch: epic/$ARGUMENTS ---- - -# Execution Status - -## Active Agents -- Agent-1: Issue #1234 Stream A (Database) - Started {time} -- Agent-2: Issue #1234 Stream B (API) - Started {time} -- Agent-3: Issue #1235 Stream A (UI) - Started {time} - -## Queued Issues -- Issue #1236 - Waiting for #1234 -- Issue #1237 - Waiting for #1235 - -## Completed -- {None yet} -``` - -### 6. Monitor and Coordinate - -Set up monitoring: -```bash -echo " -Agents launched successfully! - -Monitor progress: - /pm:epic-status $ARGUMENTS - -View branch changes: - git status - -Stop all agents: - /pm:epic-stop $ARGUMENTS - -Merge when complete: - /pm:epic-merge $ARGUMENTS -" -``` - -### 7. Handle Dependencies - -As agents complete streams: -- Check if any blocked issues are now ready -- Launch new agents for newly-ready work -- Update execution-status.md - -## Output Format - -``` -šŸš€ Epic Execution Started: $ARGUMENTS - -Branch: epic/$ARGUMENTS - -Launching {total} agents across {issue_count} issues: - -Issue #1234: Database Schema - ā”œā”€ Stream A: Schema creation (Agent-1) āœ“ Started - └─ Stream B: Migrations (Agent-2) āœ“ Started - -Issue #1235: API Endpoints - ā”œā”€ Stream A: User endpoints (Agent-3) āœ“ Started - ā”œā”€ Stream B: Post endpoints (Agent-4) āœ“ Started - └─ Stream C: Tests (Agent-5) āø Waiting for A & B - -Blocked Issues (2): - - #1236: UI Components (depends on #1234) - - #1237: Integration (depends on #1235, #1236) - -Monitor with: /pm:epic-status $ARGUMENTS -``` - -## Error Handling - -If agent launch fails: -``` -āŒ Failed to start Agent-{id} - Issue: #{issue} - Stream: {stream} - Error: {reason} - -Continue with other agents? (yes/no) -``` - -If uncommitted changes are found: -``` -āŒ You have uncommitted changes. Please commit or stash them before starting an epic. - -To commit changes: - git add . - git commit -m "Your commit message" - -To stash changes: - git stash push -m "Work in progress" - # (Later restore with: git stash pop) -``` - -If branch creation fails: -``` -āŒ Cannot create branch - {git error message} - -Try: git branch -d epic/$ARGUMENTS -Or: Check existing branches with: git branch -a -``` - -## Important Notes - -- Follow `/rules/branch-operations.md` for git operations -- Follow `/rules/agent-coordination.md` for parallel work -- Agents work in the SAME branch (not separate branches) -- Maximum parallel agents should be reasonable (e.g., 5-10) -- Monitor system resources if launching many agents diff --git a/ccpm/commands/pm/epic-status.md b/ccpm/commands/pm/epic-status.md deleted file mode 100644 index b969b19..0000000 --- a/ccpm/commands/pm/epic-status.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -allowed-tools: Bash(bash ccpm/scripts/pm/epic-status.sh $ARGUMENTS) ---- - -Output: -!bash ccpm/scripts/pm/epic-status.sh $ARGUMENTS diff --git a/ccpm/commands/pm/epic-sync.md b/ccpm/commands/pm/epic-sync.md index 7c5a26d..de76798 100644 --- a/ccpm/commands/pm/epic-sync.md +++ b/ccpm/commands/pm/epic-sync.md @@ -41,12 +41,12 @@ if [[ "$remote_url" == *"automazeio/ccpm"* ]] || [[ "$remote_url" == *"automazei echo "To fix this:" echo "1. Fork this repository to your own GitHub account" echo "2. Update your remote origin:" - echo " git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO.git" + echo " git remote set-url origin https://github.com/kvnloo/evolve.git" echo "" echo "Or if this is a new project:" echo "1. Create a new repository on GitHub" echo "2. Update your remote origin:" - echo " git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO.git" + echo " git remote set-url origin https://github.com/kvnloo/evolve.git" echo "" echo "Current remote: $remote_url" exit 1 diff --git a/ccpm/commands/pm/help.md b/ccpm/commands/pm/help.md deleted file mode 100644 index c06de88..0000000 --- a/ccpm/commands/pm/help.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -allowed-tools: Bash(bash ccpm/scripts/pm/help.sh) ---- - -Output: -!bash ccpm/scripts/pm/help.sh diff --git a/ccpm/commands/pm/import.md b/ccpm/commands/pm/import.md deleted file mode 100644 index dac9c9e..0000000 --- a/ccpm/commands/pm/import.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -allowed-tools: Bash, Read, Write, LS ---- - -# Import - -Import existing GitHub issues into the PM system. - -## Usage -``` -/pm:import [--epic ] [--label