spectra_cli 0.1.5
spectra_cli: ^0.1.5 copied to clipboard
A Multi-LLM Spec-Driven Development System.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.5 - 2026-02-06 #
Added #
- Execution Modes: Three modes for different workflows.
ExecutionMode.automatic: AI plans and implements code (default).ExecutionMode.manual: AI plans, user implements code manually.ExecutionMode.interactive: AI generates, user reviews and approves.- New
--manualand--autoflags forexecuteandstartcommands. executionModefield inSpectraConfigfor persistent preference.- Allows using Spectra purely as a planning tool without code generation.
- See
doc/execution-modes.mdfor comprehensive guide.
- LLM Usage Type Separation: Separate provider configuration for planning vs coding tasks.
- New
LLMUsageTypeenum withplanningandcodingvariants. planningProviderandcodingProviderfields inSpectraConfig.getProviderForUsage(LLMUsageType)method inLLMService.- Planning tasks:
plan,map, Mayor/Witness agents (strategic analysis). - Coding tasks:
execute,start, Worker agents (code generation). - Allows cost optimization (e.g., Claude for planning, Gemini Flash for coding).
- Backward compatible with existing
preferredProviderconfiguration. - See
doc/llm-usage-types.mdfor comprehensive guide and recommendations.
- New
- Encrypted Credential Storage: API keys are now encrypted using machine-specific encryption.
- New
SecureStorageServicewith PBKDF2 key derivation (10,000 iterations). - Keys stored in
~/.spectra/.secure/with filesystem-based protection. - Automatic migration from legacy plain-text YAML config.
- Machine-bound encryption prevents credential theft across systems.
- New
- Comprehensive Test Suite: Significantly expanded test coverage to 85%+.
- Unit tests for
SecureStorageServiceand updatedConfigService. - Integration tests for
config,map, andplancommands. - End-to-end workflow tests covering complete user journeys:
- New project (greenfield) setup workflow.
- Existing project (brownfield) mapping workflow.
- Task execution and verification workflow.
- Multi-agent orchestration workflow.
- Configuration migration workflow.
- Model tests for
SpectraConfigwith serialization validation.
- Unit tests for
- Security Documentation: New
doc/security.mdwith detailed security features:- Encryption implementation details.
- Key derivation process.
- Migration guide from legacy format.
- Security best practices and limitations.
- FAQ for common security questions.
- Testing Documentation: New
doc/testing.mdwith comprehensive testing guide:- Test structure and organization.
- Running tests and coverage reports.
- Test categories (unit, integration, e2e).
- Testing best practices.
- Security and performance testing.
- CI/CD integration guidelines.
Changed #
- ConfigCommand: Enhanced to configure separate planning and coding providers.
- New interactive prompts for planning provider selection.
- New interactive prompts for coding provider selection.
- Clear descriptions and recommendations for each usage type.
- Shows selected providers on success.
- Commands Updated for Usage Types:
PlanCommandnow uses planning provider (strategic task breakdown).MapCommandnow uses planning provider (architecture analysis).ExecuteCommandnow uses coding provider (code generation).OrchestratorServiceuses both: planning for Mayor/Witness, coding for Workers.
- ConfigService: Refactored to use encrypted storage instead of plain YAML.
- All API keys now stored securely in encrypted format.
- Legacy
config.yamlautomatically migrated on first load. - New
clearConfig()andhasConfigmethods for better management.
- SpectraConfig Model: Enhanced with secure storage support.
- New
fromMap()factory for encrypted storage deserialization. - New
toMap()method for encrypted storage serialization. - Maintains backward compatibility with YAML format for migration.
- New
- README: Updated with security features and completed roadmap items.
- Added "Security Features" section highlighting encryption.
- Marked "Expand Test Coverage" and "Security Hardening" as complete.
- Updated configuration description to mention encrypted storage.
Dependencies #
- Added
path^1.9.0 for cross-platform path handling.
Security #
- Breaking Change: API keys are no longer stored in plain text.
- Existing
~/.spectra/config.yamlwill be automatically migrated. - Backup your keys before upgrading if you want to preserve plain-text access.
- After migration, legacy
config.yamlis deleted for security.
- Existing
Fixed #
- Eliminated plain-text API key storage vulnerability.
- Improved test isolation with proper setup/teardown in all test files.
- CRITICAL: Fixed deterministic encryption vulnerability in
SecureStorageService.- Encryption now uses random IV (Initialization Vector) for each operation.
- Same data produces different ciphertext each time (non-deterministic).
- Resistant to pattern analysis and ciphertext-only attacks.
- Uses
Random.secure()for cryptographically secure random generation. - Note: Users may need to re-enter API keys once after upgrade.
- Fixed null home directory handling in
ConfigService,SecureStorageService, andLLMService.- Now throws descriptive
StateErrorif HOME/USERPROFILE not set. - Prevents creation of invalid
"null/.spectra"paths. LLMServicenow validates home directory when caching is enabled.
- Now throws descriptive
- Fixed case-sensitive provider name lookup in
ConfigCommand.- Legacy v0.1.4 configs with capitalized provider names (e.g., "Gemini") now work correctly.
- Provider names automatically normalized to lowercase during deserialization.
- Prevents
indexOf()returning -1 and causing incorrect UI selections. - Handles whitespace trimming for robustness.
0.1.4 - 2026-01-08 #
0.1.3 - 2026-01-05 #
Added #
- Test Suite: Comprehensive unit tests for agents, models, and utilities.
- Tests for
AgentStateJSON serialization/deserialization. - Tests for
SpectraTaskXML parsing. - Tests for
WorkerAgenttask assignment and execution. - Tests for
StateManagerpruning logic.
- Tests for
- LLM Response Caching: New caching layer to reduce API costs.
- LRU cache with configurable size and TTL.
- Persistent file-based caching in
~/.spectra/cache.json. CachedLLMProviderwrapper for transparent caching.
- Timeout & Retry Handling: Robust HTTP request handling.
- Configurable timeouts for all LLM API calls (default: 60s).
- Automatic retry with exponential backoff.
- Rate limit detection and handling.
- Enhanced Error Recovery: Improved multi-agent resilience.
OrchestratorConfigfor customizable orchestrator behavior.- Automatic stuck agent detection and recovery.
- Consecutive failure tracking with configurable thresholds.
- Task release and reassignment when workers fail.
restartAgent()method for manual recovery.
- API Documentation: Comprehensive doc comments throughout codebase.
- All public APIs documented with examples.
- Agent roles, states, and lifecycle documented.
- LLM provider interface fully documented.
- Web Dashboard: Real-time browser-based agent monitoring UI.
- New
spectra dashboardcommand to launch the web server. - Built with Jaspr for component-based server-side rendering.
- Reusable components:
DashboardPage,AgentCard,ProgressCard. - Live agent status with role indicators (Mayor 👔, Worker 🔧, Witness 👁️).
- Project progress tracking with visual progress bar.
- Auto-refresh every 2 seconds.
- Modern dark theme with responsive design.
- Configurable port via
--portflag.
- New
Changed #
- Replaced
Timer.periodicwith proper async loop in orchestrator to prevent race conditions. - Workers now properly reset to
idlestatus after completing tasks. - All LLM providers now use
HttpUtilsfor consistent timeout/retry behavior. SpectraCommandnow extendsCommand<void>for type safety.- Added
analysis_options.yamlwith strict linting rules. - Updated minimum Dart SDK to 3.10.0 for modern language features.
Dependencies #
- Added
jaspr^0.22.0 for component-based web dashboard. - Added
shelf^1.4.1 andshelf_router^1.1.4 for HTTP server. - Added
crypto^3.0.3 for cache key hashing. - Added
mocktail^1.0.4 (dev) for testing.
Fixed #
- Fixed orchestrator race condition where agent steps could execute concurrently.
- Fixed worker agents becoming permanently unavailable after first task completion.
- Fixed nullable field promotion issues in
LLMCache. - Fixed LRU cache corruption when updating existing entries (duplicate keys in access order).
- Fixed potential null pointer exception in progress command's ANSI color wrapping.
- Fixed type casting issues in progress and start commands.
0.1.2 - 2026-01-04 #
Added #
- Multi-Agent Orchestrator: Introduced a new orchestration layer inspired by Gastown.
- Mayor Agent: New role for task coordination and assignment.
- Worker Agent: Parallelized execution engine for faster implementation.
- Witness Agent: Health monitoring role to detect stuck or timed-out agents.
spectra startCommand: New CLI command to launch the orchestrator with configurable worker counts (--workers).- Convoy System: Batch management for grouped tasks to enable better parallel orchestration.
Changed #
- Refactored implementation logic to be modular and reusable across single-agent and multi-agent execution.
- Renamed
docsdirectory todocto follow Dart Pub layout conventions.
0.1.1 - 2025-12-20 #
Added #
- Model Selection System: Users can now select specific model versions for each provider via
spectra config. - Preferred Provider Support: Ability to set a default provider for the entire workflow.
- LLM Context Awareness:
spectra executenow reads existing file contents to provide context to the LLM, preventing blind overwrites. - Autonomous Progress Tracking:
spectra executenow automatically updates task status inPLAN.mdand appends implementation logs toSTATE.md. - Interactive ASCII Banner: High-fidelity cyan banner added to onboarding and help commands.
- Enhanced Help System: Curated command guide and discoverable examples.
Changed #
- Flagship Model Updates: Defaulted to the latest 2025 frontier models: OpenAI GPT-5.2, Anthropic Claude 4.5, and Google Gemini 3 Pro.
- Gemini Migration: Switched from
google_generative_aiSDK to direct REST API implementation for better security (x-goog-api-keyheader) and reduced dependency bloat. - Logic Refinement: Replaced all mock implementations in
plan,execute,map,progress, andresumewith real production-ready logic. - Package Renaming: Project and imports migrated from
spectratospectra_cli.
Fixed #
- Fixed duplication of project description in help output.
- Fixed missing
mason_loggerimports for color constants in commands.
0.1.0 - 2025-12-20 #
Added #
- Initial release of Spectra CLI.
- Core Command Framework using
argsandmason_logger. - Multi-LLM Provider Layer (Gemini, Claude, OpenAI).
spectra newfor interactive project initialization.spectra mapfor brownfield codebase analysis.spectra planfor XML-based task generation.spectra executefor automated file modification and execution.spectra progressandspectra resumefor state management.StateManagerfor automatedSTATE.mdpruning and archiving.- Comprehensive README inspired by
get-shit-done.