---
description: Comprehensive project analysis workflow
agent: plan
---

# Project Analysis

**Project:** $(basename $(pwd))
**Path:** $(pwd)

## GKG Project Analysis

Available projects: !`gkg list_projects`

Current project structure: !`gkg repo_map --project_absolute_path $(pwd) --relative_paths . --depth 2`

## Existing Code Patterns

Key definitions: !`gkg search_codebase_definitions --project_absolute_path $(pwd) --search_terms ["config","middleware","utils","auth","api"] --page 1`

## Backlog Status

Current tasks: !`backlog task list --status "In Progress"`
Blocked tasks: !`backlog task list --status "To Do" | head -10`

## Knowledge Base Integration

Project specs: !`ls .opencode/memory/*.md 2>/dev/null | grep -v README | wc -l | tr -d ' '` specs found
Recent research: !`ls .opencode/memory/research/*.md 2>/dev/null | tail -5`

## Analysis Summary

### Architecture Patterns Found

- [ ] Configuration management
- [ ] Middleware patterns
- [ ] Authentication/Authorization
- [ ] API structure
- [ ] Utility functions

### Current Work Status

- **In Progress:** Count from backlog
- **Blocked:** Count from backlog
- **Ready for Implementation:** Count from backlog

### Recommendations

1. **Immediate Actions:** Tasks ready to start
2. **Architecture Decisions:** Patterns to follow
3. **Research Needs:** Missing documentation
4. **Dependencies:** Blocking items

### Next Steps

1. Address any architectural inconsistencies
2. Start highest priority ready tasks
3. Create specs for complex features
4. Research unknown patterns using Context7/Exa

---

_Run this command weekly or when starting new features_
