Files
issue-core/Makefile
tegwick 324453bd8d feat: transform to agent coordination platform with comprehensive documentation
Transform Issue Facade from a universal CLI tool into an agent coordination platform with comprehensive documentation and enhanced capabilities for autonomous coding agents.

Major Changes:
- Complete README rewrite focusing on agent-driven coordination
- New comprehensive documentation (AGENT_INTEGRATION.md, CLAUDE.md, ROADMAP.md)
- Capability integration setup with CAPABILITY.yaml and integration scripts
- Enhanced Makefile with local development targets for easier workflows

Bug Fixes:
- Fix schema initialization using executescript() for multi-line SQL support
- Disable FTS5 triggers due to compatibility issues (documented for future re-enablement)

Features:
- Enhanced CLI list command with full parameter passthrough
- New examples directory with agent integration patterns
- New comprehensive test suite (test_core_models.py, test_local_backend.py)

Code Quality:
- Remove @cached_property decorators for Label properties (simplification)
- Clean up test organization (removed old test_gitea_integration.py)

This milestone establishes Issue Facade as a production-ready coordination layer for multi-agent software development, with clear integration paths and comprehensive developer documentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 19:32:37 +01:00

329 lines
10 KiB
Makefile

# Issue Facade Capability Makefile
# Universal CLI for issue tracking across multiple backends
# Capability metadata
CAPABILITY_NAME := issue-facade
CAPABILITY_DESCRIPTION := Universal CLI for issue tracking across multiple backends
# Default target
.PHONY: help
help: ## Show issue facade capability help
@echo "🎯 Issue Facade - Universal Issue Tracking CLI"
@echo "==============================================="
@echo ""
@echo "Core Issue Operations:"
@echo " issue-list List all issues from configured backend"
@echo " issue-show ID=42 Show details for issue #42"
@echo " issue-create TITLE=\"Bug\" Create new issue with title"
@echo " issue-close ID=42 Close issue #42"
@echo " issue-stats Show issue statistics"
@echo ""
@echo "Backend Management:"
@echo " issue-backend-list List configured backends"
@echo " issue-backend-detect Auto-detect backend from repository"
@echo " issue-backend-set-local Configure local SQLite backend"
@echo " issue-backend-set-gitea Configure Gitea backend"
@echo ""
@echo "Synchronization:"
@echo " issue-sync Sync with remote backend"
@echo " issue-sync-pull Pull issues from remote"
@echo " issue-sync-push Push local issues to remote"
@echo ""
@echo "Development & Setup (local):"
@echo " install Install issue facade for local development"
@echo " install-dev Install with development dependencies"
@echo " test Run all tests"
@echo " test-unit Run unit tests only"
@echo " test-integration Run integration tests only"
@echo " test-cov Run tests with coverage report"
@echo " test-verbose Run tests with verbose output"
@echo ""
@echo "Development & Setup (from parent):"
@echo " issue-facade-install Install issue facade capability"
@echo " issue-facade-install-dev Install with development dependencies"
@echo " issue-facade-test Run issue facade tests"
@echo " issue-facade-test-cov Run tests with coverage report"
@echo " issue-facade-lint Run code quality checks"
@echo " issue-facade-clean Clean build artifacts"
@echo ""
@echo "CLI Functionality:"
@echo " issue-facade-help Show CLI help documentation"
@echo " issue-facade-demo Demonstrate facade functionality"
# Check if issue command is available
ISSUE_CLI := $(shell command -v issue 2> /dev/null)
# Core Issue Operations
.PHONY: issue-list
issue-list: ## List all issues from configured backend
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@echo " Install with: make issue-facade-install"
@exit 1
endif
issue list
.PHONY: issue-show
issue-show: ## Show details for specific issue (requires ID=number)
ifndef ID
@echo "❌ ID is required. Usage: make issue-show ID=42"
@exit 1
endif
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
issue show $(ID)
.PHONY: issue-create
issue-create: ## Create new issue (requires TITLE="Issue Title")
ifndef TITLE
@echo "❌ TITLE is required. Usage: make issue-create TITLE=\"Bug in parser\""
@exit 1
endif
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
issue create "$(TITLE)"
.PHONY: issue-close
issue-close: ## Close issue (requires ID=number)
ifndef ID
@echo "❌ ID is required. Usage: make issue-close ID=42"
@exit 1
endif
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
issue close $(ID)
.PHONY: issue-stats
issue-stats: ## Show issue statistics
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
issue stats
# Backend Management
.PHONY: issue-backend-list
issue-backend-list: ## List configured backends
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
issue backend list
.PHONY: issue-backend-detect
issue-backend-detect: ## Auto-detect backend from repository
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
issue config detect
.PHONY: issue-backend-set-local
issue-backend-set-local: ## Configure local SQLite backend
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
issue backend set local
.PHONY: issue-backend-set-gitea
issue-backend-set-gitea: ## Configure Gitea backend (requires REPO=repository-name)
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
ifdef REPO
issue backend add gitea $(REPO)
else
issue backend set gitea
endif
# Synchronization
.PHONY: issue-sync
issue-sync: ## Sync with remote backend
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
issue sync
.PHONY: issue-sync-pull
issue-sync-pull: ## Pull issues from remote
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
issue sync pull
.PHONY: issue-sync-push
issue-sync-push: ## Push local issues to remote
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
issue sync push
# Development and Setup
.PHONY: integrate
integrate: ## Integrate capability into main project (interactive)
@./.capability/integrate.sh
.PHONY: install
install: ## Install issue facade (local development)
pip install -e .
.PHONY: install-dev
install-dev: ## Install with development dependencies (local development)
pip install -e ".[dev]"
.PHONY: test
test: ## Run all tests (local development)
pytest tests/
.PHONY: test-unit
test-unit: ## Run unit tests only (local development)
pytest tests/ -m unit -v
.PHONY: test-integration
test-integration: ## Run integration tests only (local development)
pytest tests/ -m integration -v
.PHONY: test-cov
test-cov: ## Run tests with coverage report (local development)
pytest tests/ --cov=issue_tracker --cov-report=html --cov-report=term
.PHONY: test-verbose
test-verbose: ## Run tests with verbose output (local development)
pytest tests/ -v
.PHONY: issue-facade-install
issue-facade-install: ## Install issue facade capability
pip install -e capabilities/issue-facade/
.PHONY: issue-facade-install-dev
issue-facade-install-dev: ## Install issue facade capability with development dependencies
pip install -e "capabilities/issue-facade/[dev]"
.PHONY: issue-facade-test
issue-facade-test: ## Run issue facade tests
cd capabilities/issue-facade && pytest tests/
.PHONY: issue-facade-test-cov
issue-facade-test-cov: ## Run tests with coverage report
cd capabilities/issue-facade && pytest tests/ --cov=issue_tracker --cov-report=html --cov-report=term
.PHONY: issue-facade-lint
issue-facade-lint: ## Run code quality checks
@echo "🔍 Running code quality checks for issue-facade..."
cd capabilities/issue-facade && python -m py_compile cli/*.py core/*.py backends/*/*.py 2>/dev/null || echo "⚠️ Some files may not compile due to missing dependencies"
@echo "✅ Code quality checks completed"
.PHONY: issue-facade-clean
issue-facade-clean: ## Clean build artifacts
cd capabilities/issue-facade && rm -rf build/ dist/ *.egg-info/ __pycache__/ .pytest_cache/ htmlcov/ .coverage
find capabilities/issue-facade -name "*.pyc" -delete
find capabilities/issue-facade -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
# CLI Functionality
.PHONY: issue-facade-help
issue-facade-help: ## Show CLI help documentation
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@echo " Install with: make issue-facade-install"
@exit 1
endif
issue --help
.PHONY: issue-facade-demo
issue-facade-demo: ## Demonstrate facade functionality
@echo "🎬 Issue Facade Demonstration"
@echo "============================="
@echo ""
@echo "The Issue Facade provides a unified CLI for issue tracking across:"
@echo " • GitHub Issues"
@echo " • GitLab Issues"
@echo " • Gitea Issues"
@echo " • Local SQLite storage"
@echo ""
@echo "Key features:"
@echo " • Repository-aware backend detection"
@echo " • Offline capability with sync"
@echo " • Consistent CLI across all platforms"
@echo ""
ifndef ISSUE_CLI
@echo "To try it out:"
@echo " 1. make issue-facade-install"
@echo " 2. make issue-backend-detect"
@echo " 3. make issue-list"
else
@echo "Current backend status:"
@$(MAKE) --no-print-directory issue-backend-list 2>/dev/null || echo " No backends configured yet"
@echo ""
@echo "Try: make issue-backend-detect"
endif
# Repository Integration
.PHONY: issue-detect-repo
issue-detect-repo: ## Detect and configure backend for current repository
@echo "🔍 Analyzing repository for issue tracking configuration..."
@if [ -d .git ]; then \
echo "✅ Git repository detected"; \
if git remote -v 2>/dev/null | grep -q github; then \
echo "🐙 GitHub remote detected"; \
elif git remote -v 2>/dev/null | grep -q gitlab; then \
echo "🦊 GitLab remote detected"; \
elif git remote -v 2>/dev/null | grep -q gitea; then \
echo "🦋 Gitea remote detected"; \
else \
echo "📁 Generic git repository - local backend recommended"; \
fi; \
else \
echo "❌ Not a git repository"; \
fi
@echo ""
@echo "Run 'make issue-backend-detect' to auto-configure"
# Advanced Operations
.PHONY: issue-export
issue-export: ## Export issues to backup file (requires FILE=backup.json)
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
ifdef FILE
issue export "$(FILE)"
else
@echo "❌ FILE is required. Usage: make issue-export FILE=backup.json"
@exit 1
endif
.PHONY: issue-import
issue-import: ## Import issues from backup file (requires FILE=backup.json)
ifndef ISSUE_CLI
@echo "❌ Issue facade not installed"
@exit 1
endif
ifdef FILE
issue import "$(FILE)"
else
@echo "❌ FILE is required. Usage: make issue-import FILE=backup.json"
@exit 1
endif
# Meta information for capability discovery
.PHONY: capability-info
capability-info: ## Show capability information
@echo "Name: $(CAPABILITY_NAME)"
@echo "Description: $(CAPABILITY_DESCRIPTION)"
@echo "Type: CLI application with backend facade pattern"
@echo "Main command: issue"
@echo "Supported backends: Local SQLite, GitHub, GitLab, Gitea"
@echo "Key features: Repository-aware, offline-capable, unified interface"
@echo "Targets:"
@$(MAKE) --no-print-directory help | grep "^ " | sed 's/^ / /'