From 41193d07463b24e968f5bd722f9f0ff3ae71338d Mon Sep 17 00:00:00 2001 From: Bernd Worsch Date: Mon, 22 Sep 2025 02:14:57 +0200 Subject: [PATCH] refactor: rename workspace targets to TDD Workspace with tdd- prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- Makefile | 22 +++++++++++----------- tddai_cli.py | 20 ++++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 9d06b8d6..c5b78bb7 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # MarkiTect - Advanced Markdown Engine # 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 help: @@ -41,11 +41,11 @@ help: @echo "Test-Driven Development:" @echo " test-from-issue NUM=X - Generate test skeleton from issue (requires Claude Code)" @echo "" - @echo "Issue Workspace:" - @echo " start-issue NUM=X - Start working on issue (creates workspace)" - @echo " add-test - Add test to current issue workspace" - @echo " workspace-status - Show current workspace state" - @echo " finish-issue - Complete issue work (moves tests to main)" + @echo "TDD Workspace:" + @echo " tdd-start NUM=X - Start working on issue (creates workspace)" + @echo " tdd-add-test - Add test to current issue workspace" + @echo " tdd-status - Show current workspace state" + @echo " tdd-finish - Complete issue work (moves tests to main)" # Python and virtual environment setup 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" # Start working on an issue (creates workspace) -start-issue: $(VENV)/bin/activate +tdd-start: $(VENV)/bin/activate @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; \ fi @PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py start-issue $(NUM) # 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 # Show current workspace status -workspace-status: $(VENV)/bin/activate +tdd-status: $(VENV)/bin/activate @PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py workspace-status # 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 diff --git a/tddai_cli.py b/tddai_cli.py index 880bfbfa..6cda064e 100644 --- a/tddai_cli.py +++ b/tddai_cli.py @@ -24,12 +24,12 @@ def workspace_status(): if status == WorkspaceStatus.CLEAN: 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 if status == WorkspaceStatus.DIRTY: 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 workspace = manager.get_current_workspace() @@ -61,8 +61,8 @@ def workspace_status(): print(" - tests/ (generated test files)") print() print("๐Ÿ’ก Commands:") - print(" - make add-test (generate another test)") - print(" - make finish-issue (complete and move tests to main)") + print(" - make tdd-add-test (generate another test)") + print(" - make tdd-finish (complete and move tests to main)") except TddaiError as e: print(f"โŒ Error: {e}") @@ -80,7 +80,7 @@ def start_issue(issue_number: int): if status == WorkspaceStatus.ACTIVE: current = manager.get_current_workspace() 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) print(f"๐Ÿ” Starting work on issue #{issue_number}...") @@ -100,8 +100,8 @@ def start_issue(issue_number: int): print("๐Ÿ’ก Next steps:") print(" 1. Review requirements.md and break down the issue") print(" 2. Plan test scenarios in test_plan.md") - print(" 3. Use 'make add-test' to generate tests") - print(" 4. Use 'make finish-issue' when complete") + print(" 3. Use 'make tdd-add-test' to generate tests") + print(" 4. Use 'make tdd-finish' when complete") except TddaiError as e: print(f"โŒ Error: {e}") @@ -140,7 +140,7 @@ def finish_issue(): print("๐Ÿ’ก Next steps:") print(" - Run 'make test' to verify tests fail (red 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: print(f"โŒ Error: {e}") @@ -155,7 +155,7 @@ def add_test_guidance(): workspace = manager.get_current_workspace() if not 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) 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" Description: {workspace.issue_body}") 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: print(f"โŒ Error: {e}")