refactor: rename workspace targets to TDD Workspace with tdd- prefix

- Rename "Issue Workspace" category to "TDD Workspace" in help output
- Add tdd- prefix to all workspace-related targets:
  - start-issue → tdd-start
  - add-test → tdd-add-test
  - workspace-status → tdd-status
  - finish-issue → tdd-finish
- Update .PHONY declarations for new target names
- Update all CLI output messages to reference new target names
- Maintain backward compatibility in CLI functionality

This provides clearer naming that emphasizes the TDD focus and avoids
confusion with general issue management targets.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-22 02:14:57 +02:00
parent 84161e77a9
commit 41193d0746
2 changed files with 21 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
# MarkiTect - Advanced Markdown Engine # MarkiTect - Advanced Markdown Engine
# Makefile for common development tasks # Makefile for common development tasks
.PHONY: help setup install test build clean update status dev lint format check-deps venv-status update-digest add-diary-entry list-issues show-issue list-open-issues test-from-issue start-issue add-test finish-issue workspace-status .PHONY: help setup install test build clean update status dev lint format check-deps venv-status update-digest add-diary-entry list-issues show-issue list-open-issues test-from-issue tdd-start tdd-add-test tdd-finish tdd-status
# Default target # Default target
help: help:
@@ -41,11 +41,11 @@ help:
@echo "Test-Driven Development:" @echo "Test-Driven Development:"
@echo " test-from-issue NUM=X - Generate test skeleton from issue (requires Claude Code)" @echo " test-from-issue NUM=X - Generate test skeleton from issue (requires Claude Code)"
@echo "" @echo ""
@echo "Issue Workspace:" @echo "TDD Workspace:"
@echo " start-issue NUM=X - Start working on issue (creates workspace)" @echo " tdd-start NUM=X - Start working on issue (creates workspace)"
@echo " add-test - Add test to current issue workspace" @echo " tdd-add-test - Add test to current issue workspace"
@echo " workspace-status - Show current workspace state" @echo " tdd-status - Show current workspace state"
@echo " finish-issue - Complete issue work (moves tests to main)" @echo " tdd-finish - Complete issue work (moves tests to main)"
# Python and virtual environment setup # Python and virtual environment setup
PYTHON := python3 PYTHON := python3
@@ -268,21 +268,21 @@ test-from-issue:
@curl -s "$(ISSUES_API)/$(NUM)" | jq -r 'if .title then "✅ Issue #$(NUM): " + .title + "\n\n🧪 Generating test skeleton...\n Please ask Claude Code to generate a test for this issue:\n\n Command: '"'"'Generate a test skeleton for issue #$(NUM)'"'"'\n\n📋 Issue Details:\n Title: " + .title + "\n Description: " + .body + "\n\n📝 Test Requirements:\n - Follow TDD principles (test first, then implementation)\n - Use pytest framework (existing project convention)\n - Place test in tests/ directory\n - Name test file: test_issue_$(NUM)_*.py\n - Include docstring referencing issue #$(NUM)\n - Test should initially fail (red state)\n\n💡 After generation, run '"'"'make test'"'"' to verify test fails initially" else "❌ Issue #$(NUM) not found or API error\n Use '"'"'make list-open-issues'"'"' to see available issues" end' 2>/dev/null || echo "❌ Issue #$(NUM) not found or API error" @curl -s "$(ISSUES_API)/$(NUM)" | jq -r 'if .title then "✅ Issue #$(NUM): " + .title + "\n\n🧪 Generating test skeleton...\n Please ask Claude Code to generate a test for this issue:\n\n Command: '"'"'Generate a test skeleton for issue #$(NUM)'"'"'\n\n📋 Issue Details:\n Title: " + .title + "\n Description: " + .body + "\n\n📝 Test Requirements:\n - Follow TDD principles (test first, then implementation)\n - Use pytest framework (existing project convention)\n - Place test in tests/ directory\n - Name test file: test_issue_$(NUM)_*.py\n - Include docstring referencing issue #$(NUM)\n - Test should initially fail (red state)\n\n💡 After generation, run '"'"'make test'"'"' to verify test fails initially" else "❌ Issue #$(NUM) not found or API error\n Use '"'"'make list-open-issues'"'"' to see available issues" end' 2>/dev/null || echo "❌ Issue #$(NUM) not found or API error"
# Start working on an issue (creates workspace) # Start working on an issue (creates workspace)
start-issue: $(VENV)/bin/activate tdd-start: $(VENV)/bin/activate
@if [ -z "$(NUM)" ]; then \ @if [ -z "$(NUM)" ]; then \
echo "❌ Please specify issue number: make start-issue NUM=1"; \ echo "❌ Please specify issue number: make tdd-start NUM=1"; \
exit 1; \ exit 1; \
fi fi
@PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py start-issue $(NUM) @PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py start-issue $(NUM)
# Add test to current issue workspace # Add test to current issue workspace
add-test: $(VENV)/bin/activate tdd-add-test: $(VENV)/bin/activate
@PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py add-test @PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py add-test
# Show current workspace status # Show current workspace status
workspace-status: $(VENV)/bin/activate tdd-status: $(VENV)/bin/activate
@PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py workspace-status @PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py workspace-status
# Complete issue work (move tests to main and cleanup) # Complete issue work (move tests to main and cleanup)
finish-issue: $(VENV)/bin/activate tdd-finish: $(VENV)/bin/activate
@PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py finish-issue @PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py finish-issue

View File

@@ -24,12 +24,12 @@ def workspace_status():
if status == WorkspaceStatus.CLEAN: if status == WorkspaceStatus.CLEAN:
print("📋 No active issue workspace") print("📋 No active issue workspace")
print(" Use 'make start-issue NUM=X' to begin working on an issue") print(" Use 'make tdd-start NUM=X' to begin working on an issue")
return return
if status == WorkspaceStatus.DIRTY: if status == WorkspaceStatus.DIRTY:
print("⚠️ Workspace directory exists but no current issue file") print("⚠️ Workspace directory exists but no current issue file")
print(" Run 'make finish-issue' to clean up or 'make start-issue' to create new workspace") print(" Run 'make tdd-finish' to clean up or 'make tdd-start' to create new workspace")
return return
workspace = manager.get_current_workspace() workspace = manager.get_current_workspace()
@@ -61,8 +61,8 @@ def workspace_status():
print(" - tests/ (generated test files)") print(" - tests/ (generated test files)")
print() print()
print("💡 Commands:") print("💡 Commands:")
print(" - make add-test (generate another test)") print(" - make tdd-add-test (generate another test)")
print(" - make finish-issue (complete and move tests to main)") print(" - make tdd-finish (complete and move tests to main)")
except TddaiError as e: except TddaiError as e:
print(f"❌ Error: {e}") print(f"❌ Error: {e}")
@@ -80,7 +80,7 @@ def start_issue(issue_number: int):
if status == WorkspaceStatus.ACTIVE: if status == WorkspaceStatus.ACTIVE:
current = manager.get_current_workspace() current = manager.get_current_workspace()
print(f"⚠️ Already working on issue #{current.issue_number}") print(f"⚠️ Already working on issue #{current.issue_number}")
print(" Run 'make finish-issue' first or 'make workspace-status' to see details") print(" Run 'make tdd-finish' first or 'make tdd-status' to see details")
sys.exit(1) sys.exit(1)
print(f"🔍 Starting work on issue #{issue_number}...") print(f"🔍 Starting work on issue #{issue_number}...")
@@ -100,8 +100,8 @@ def start_issue(issue_number: int):
print("💡 Next steps:") print("💡 Next steps:")
print(" 1. Review requirements.md and break down the issue") print(" 1. Review requirements.md and break down the issue")
print(" 2. Plan test scenarios in test_plan.md") print(" 2. Plan test scenarios in test_plan.md")
print(" 3. Use 'make add-test' to generate tests") print(" 3. Use 'make tdd-add-test' to generate tests")
print(" 4. Use 'make finish-issue' when complete") print(" 4. Use 'make tdd-finish' when complete")
except TddaiError as e: except TddaiError as e:
print(f"❌ Error: {e}") print(f"❌ Error: {e}")
@@ -140,7 +140,7 @@ def finish_issue():
print("💡 Next steps:") print("💡 Next steps:")
print(" - Run 'make test' to verify tests fail (red state)") print(" - Run 'make test' to verify tests fail (red state)")
print(" - Implement code to make tests pass (green state)") print(" - Implement code to make tests pass (green state)")
print(" - Start next issue with 'make start-issue NUM=X'") print(" - Start next issue with 'make tdd-start NUM=X'")
except TddaiError as e: except TddaiError as e:
print(f"❌ Error: {e}") print(f"❌ Error: {e}")
@@ -155,7 +155,7 @@ def add_test_guidance():
workspace = manager.get_current_workspace() workspace = manager.get_current_workspace()
if not workspace: if not workspace:
print("❌ No active issue workspace") print("❌ No active issue workspace")
print(" Run 'make start-issue NUM=X' first") print(" Run 'make tdd-start NUM=X' first")
sys.exit(1) sys.exit(1)
print(f"🧪 Adding test to issue #{workspace.issue_number} workspace") print(f"🧪 Adding test to issue #{workspace.issue_number} workspace")
@@ -178,7 +178,7 @@ def add_test_guidance():
print(f" Title: {workspace.issue_title}") print(f" Title: {workspace.issue_title}")
print(f" Description: {workspace.issue_body}") print(f" Description: {workspace.issue_body}")
print() print()
print("💡 After generation: Use 'make workspace-status' to see all tests") print("💡 After generation: Use 'make tdd-status' to see all tests")
except TddaiError as e: except TddaiError as e:
print(f"❌ Error: {e}") print(f"❌ Error: {e}")