Feature Spec: Project Slimming (F-001)¶
Feature ID: F-001 Priority: P0 Phase: Phase 1 (0.20.0-alpha.1) Tech Design Reference: Section 4.2
Purpose¶
Remove legacy self-built protocol layers, the old standalone CLI implementation, and extensions that are superseded by the apcore ecosystem or out of scope for v2. The current source keeps thin API and CLI surfaces backed by apcore protocol adapters.
File Changes¶
Directories to Delete (Complete List)¶
src/flowvane/api/a2a/ # Legacy self-built A2A package
src/flowvane/api/mcp/ # Legacy self-built MCP package
src/flowvane/api/graphql/ # Legacy GraphQL package
src/flowvane/api/docs/ # Legacy docs UI package
src/flowvane/cli/ # Legacy multi-file CLI package
src/flowvane/extensions/crewai/ # Entire directory (4 files)
src/flowvane/extensions/llm/ # Entire directory (2 files)
src/flowvane/extensions/generate/ # Entire directory (8 files)
src/flowvane/extensions/grpc/ # Entire directory (2 files)
src/flowvane/extensions/tools/ # Entire directory (3 files)
Test Directories to Delete¶
tests/api/a2a/ # Legacy self-built A2A tests
tests/api/mcp/ # Legacy self-built MCP tests
tests/api/graphql/ # Legacy GraphQL tests
tests/cli/legacy/ # Legacy multi-file CLI tests
tests/extensions/crewai/ # All CrewAI tests
tests/extensions/llm/ # All LLM tests
tests/extensions/generate/ # All generate tests
tests/extensions/grpc/ # All gRPC tests
tests/extensions/tools/ # All tools tests
Modified Files¶
pyproject.toml
Step-by-step changes:
- Update package
versionfor the target release. - Update
descriptionto"AI-Perceivable Distributed Orchestration". - Update
requires-pythonfrom">=3.10"to">=3.11". - Remove from
classifiers:"Programming Language :: Python :: 3.10". - In
dependencies, remove:"duckdb-engine>=0.10.0","pytz>=2024.1". - In
dependencies, add:"apcore>=0.14.0". - Delete these
[project.optional-dependencies]sections entirely: a2a(a2a-sdk, fastapi, uvicorn, starlette, websockets, httpx, aiohttp, python-jose)cli(legacy CLI extra; the current thin CLI keepsclickas a core dependency)crewai(crewai, litellm, anthropic, aiodns)llm(litellm)grpc(grpclib, protobuf)graphql(strawberry-graphql, fastapi, starlette, uvicorn)tools(requests, beautifulsoup4, trafilatura, brotli, bs4)llm-key-config(empty)mcp(empty, comments only)standard(meta extra referencing deleted extras)- old
alldefinition if it references deleted extras - Add
apcore-mcp>=0.11.0,apcore-a2a>=0.3.0,apcore-cli>=0.3.0to coredependencies(not optional — MCP, A2A, CLI are standard features of flowvane). - In
dev, remove:"apdev[dev]>=0.1.6","jsonfinder>=0.4.0","memory-profiler>=0.61.0","psutil>=5.9.0". - Preserve
[project.scripts] flowvane = "flowvane.cli:main"as the supported CLI entry point; remove only obsolete script entries such asflowvane-server. - Update
[tool.black]target-versionto['py311', 'py312']. - Update
[tool.ruff]target-versionto"py311". - Update
[tool.mypy]python_versionto"3.11".
src/flowvane/__init__.py
- Keep
__version__aligned with the package version inpyproject.toml. - Update module docstring:
""" flowvane - AI-Perceivable Distributed Orchestration A distributed task orchestration engine where every capability is AI-perceivable via the apcore module standard. Core modules (always included): - core.interfaces: Core interfaces (ExecutableTask, BaseTask) - core.execution: Task orchestration (TaskManager, StreamingCallbacks) - core.extensions: Unified extension system (ExtensionRegistry) - core.storage: Database session factory (SQLite default, PostgreSQL optional) - bridge: apcore Module registration - durability: Checkpoint/resume, retry, circuit breaker - governance: Token budget, cost policy, usage reporting """ - Remove deprecated backward-compatibility exports from
__all__:"create_storage","get_default_storage". - Remove the lazy import branch for
create_storageandget_default_storagein__getattr__.
Import Reference Cleanup¶
After deletion, search for and fix any remaining references to deleted modules:
Search pattern: from flowvane.extensions.crewai - Location: src/flowvane/core/execution/task_executor.py (lazy import for CrewAI executor type detection) - Action: Remove the lazy import block. The executor registry handles type resolution; no special-casing needed.
Search pattern: from flowvane.api.a2a, from flowvane.api.mcp, from flowvane.api.graphql - Location: Possibly in test conftest files or deleted legacy tests. - Action: Remove references to deleted legacy protocol packages. Keep imports from the current flowvane.api REST/combined server package.
Search pattern: from flowvane.cli.main - Location: Possibly in legacy CLI tests. - Action: Remove references to the deleted legacy CLI package. Keep imports from the current flowvane.cli module.
Search pattern: crewai in pyproject.toml - Action: Ensure no remaining references in extras or dependency lists.
Search pattern: duckdb anywhere in src/ - Action: Remove references in storage code (handled by storage-migration.md), documentation comments, and any config defaults.
Method Signatures¶
No new methods. This feature is purely subtractive.
Data Models¶
No data model changes.
Test Requirements¶
Pre-Deletion Baseline¶
Before any deletions, run the full test suite and record: - Total test count - Pass count - Failure count - Test duration
Post-Deletion Verification¶
After all deletions:
def test_preserved_imports():
"""All preserved public imports still work."""
from flowvane import ExecutableTask, BaseTask, TaskManager
from flowvane import StreamingCallbacks, create_session
from flowvane import executor_register, storage_register, hook_register
from flowvane.core.execution.task_creator import TaskCreator
from flowvane.core.storage.sqlalchemy.task_repository import TaskRepository
from flowvane.core.extensions.scanner import ExtensionScanner
def test_deleted_imports_fail():
"""Deleted module imports raise ImportError."""
with pytest.raises(ImportError):
from flowvane.api.a2a import agent
with pytest.raises(ImportError):
from flowvane.cli.main import main
with pytest.raises(ImportError):
from flowvane.extensions.crewai import CrewaiExecutor
with pytest.raises(ImportError):
from flowvane.extensions.generate import GenerateExecutor
with pytest.raises(ImportError):
from flowvane.extensions.grpc import GrpcExecutor
def test_pip_install_succeeds():
"""pip install flowvane succeeds with only core + apcore deps."""
# Verify via subprocess: pip install . --dry-run
# Check no duckdb-engine, no crewai, no fastapi in resolved deps
def test_remaining_tests_pass():
"""All preserved test files pass."""
# Run: pytest tests/ --ignore=tests/api --ignore=tests/cli ...
# Verify exit code 0
Acceptance Criteria¶
- All listed directories are deleted from the source tree.
pyproject.tomlhas no references to deleted modules or their dependencies.pip install flowvanesucceeds with only core + apcore dependencies.pip install flowvanedoes not install removed optional integration dependencies such as duckdb-engine, crewai, litellm, rich, typer, strawberry-graphql, grpclib, protobuf, beautifulsoup4, or trafilatura. The thin CLI remains part of core, soclickis expected; HTTP server dependencies may arrive transitively through apcore protocol adapters.- Remaining test suite passes (tests for deleted modules are also removed).
- No
from flowvane.extensions.crewai,from flowvane.extensions.llm,from flowvane.extensions.generate,from flowvane.extensions.grpc, orfrom flowvane.extensions.toolsimports exist in preserved source code. __version__matches the package version inpyproject.toml.- The
flowvaneconsole script is preserved as the supported CLI entry point.