Skip to content

Commit 8097df6

Browse files
authored
Merge pull request #250 from lbedner/changelog
Changelog
2 parents 1293dd8 + 94c1101 commit 8097df6

4 files changed

Lines changed: 1158 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,182 @@
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.2.0] - 2025-11-05
9+
10+
### 🌟 Major Features
11+
12+
#### Dynamic Component Management
13+
- **NEW**: `aegis add` command - Add components to existing projects post-generation
14+
- **NEW**: `aegis remove` command - Remove components from existing projects
15+
- **NEW**: `aegis update` command - Update projects with latest template changes
16+
- **NEW**: Copier template engine support with version tracking
17+
- Projects can now evolve after creation (Copier-based projects only)
18+
- Intelligent dependency resolution (e.g., worker auto-adds Redis, auth auto-adds database)
19+
- File-level component management without full project regeneration
20+
- Automatic dependency installation and code formatting after changes
21+
22+
#### Services Architecture (Business Logic Layer)
23+
- **NEW**: Authentication Service (`--services auth`)
24+
- JWT-based authentication with access and refresh tokens
25+
- User registration, login, and profile management
26+
- Password hashing with bcrypt
27+
- Protected API routes with FastAPI dependency injection
28+
- Database migrations via Alembic
29+
- User management CLI commands (`create-user`, `list-users`, `delete-user`, etc.)
30+
- Comprehensive test suite with 52+ authentication tests
31+
- Automatically includes database component
32+
33+
- **NEW**: AI Service (`--services ai`)
34+
- PydanticAI integration for type-safe AI interactions
35+
- Multi-provider support (OpenAI, Anthropic, Gemini, Groq)
36+
- Streaming chat responses with markdown rendering
37+
- Conversation memory and persistence to database
38+
- Interactive CLI chat interface with rich formatting
39+
- Health monitoring for AI provider connectivity
40+
- Environment variable configuration
41+
- API endpoints for chat operations
42+
43+
#### Enhanced Scheduler Component
44+
- **NEW**: SQLite-backed persistence option (`--scheduler-backend sqlite`)
45+
- Automatic database backup jobs when scheduler + database combined
46+
- Task monitoring API endpoints
47+
- Interactive CLI for viewing and managing scheduled tasks
48+
- Enhanced health checks with task execution tracking
49+
- Job statistics and history
50+
51+
### ✨ Added
52+
53+
#### CLI Commands
54+
- `aegis add` - Add components to existing projects
55+
- `aegis remove` - Remove components from projects
56+
- `aegis update` - Update projects with latest templates
57+
- `aegis services` - List available services
58+
- `aegis components` - Show detailed component information
59+
- `aegis version` - Display CLI version
60+
- Template engine selection via `--engine` flag (copier or cookiecutter)
61+
- Interactive service selection during project creation
62+
- Component backend selection (e.g., `--scheduler-backend sqlite`)
63+
64+
#### Developer Experience
65+
- **uvx support** - Run without installation (`uvx aegis-stack init my-project`)
66+
- Enhanced dashboard with component and service health cards:
67+
- Auth service card (user count, health status, database connection)
68+
- AI service card (provider status, model info, conversation stats)
69+
- Scheduler card (job stats, task history, next run times)
70+
- Worker card (queue stats, job history, worker health)
71+
- FastAPI card (route inspection, middleware detection)
72+
- Database card (table stats, connection pool info)
73+
- Redis card (memory usage, connection statistics)
74+
- Load testing CLI with visual progress indicators
75+
- FastAPI middleware and route inspection utilities
76+
- Rich terminal formatting for AI chat (markdown, code blocks, tables)
77+
- Comprehensive CLI tools for component management
78+
79+
#### Testing & Quality
80+
- Migrated from mypy to `ty` for faster type checking
81+
- Extensive test coverage for auth service (52+ tests)
82+
- Extensive test coverage for AI service
83+
- Template parity tests (Cookiecutter vs Copier output validation)
84+
- Component addition/removal integration tests
85+
- Auth integration tests (registration, login, JWT flows, protected routes)
86+
- AI conversation persistence tests
87+
- Middleware and route inspection tests
88+
- Extended test matrix for component combinations
89+
- Clean validation workflow for template testing
90+
91+
#### Documentation
92+
- Complete auth service documentation (API reference, CLI commands, integration guide, examples)
93+
- Complete AI service documentation (provider setup, API reference, CLI commands, integration)
94+
- Services architecture guide and dashboard integration docs
95+
- "Evolving Your Stack" guide - post-generation component management philosophy
96+
- Scheduler persistence and CLI documentation
97+
- Enhanced installation guide (uvx, uv tool, pip methods)
98+
- Integration patterns documentation
99+
- Component-specific CLAUDE.md files for AI development context
100+
- Release process documentation with PyPI/TestPyPI workflow
101+
102+
#### Infrastructure
103+
- GitHub Actions workflow for automated PyPI releases
104+
- TestPyPI pre-flight testing workflow
105+
- PyPI Trusted Publishing (OIDC, no API tokens)
106+
- Template versioning and compatibility tracking
107+
- Copier template infrastructure with `.copier-answers.yml`
108+
- Post-generation task system refactored
109+
- Component file management utilities
110+
- Service dependency resolver
111+
- Manual updater for Cookiecutter-based projects
112+
113+
### 🔧 Changed
114+
115+
- **Default template engine** is now Copier (Cookiecutter still fully supported via `--engine cookiecutter`)
116+
- Type checker migrated from mypy to `ty` for improved performance
117+
- Enhanced dashboard UI with modern card-based architecture
118+
- Improved component dependency resolution logic
119+
- Better error messages with actionable suggestions
120+
- Scheduler component refactored with service layer separation
121+
- Worker health check registration improved
122+
- Database health checks enhanced with connection pool monitoring
123+
- Restructured CLI command organization into separate modules
124+
- Dashboard rendering optimizations
125+
126+
### 🐛 Fixed
127+
128+
- Dashboard rendering bugs with component state management
129+
- Worker type annotations and kwargs handling
130+
- arq worker info retrieval issues
131+
- Scheduler component integration edge cases
132+
- Database card rendering and refactoring issues
133+
- Redis component card state updates
134+
- FastAPI middleware detection for edge cases
135+
- Template generation with various component combinations
136+
- Health check caching race conditions
137+
138+
### 🔐 Security
139+
140+
- JWT-based authentication with secure token handling
141+
- Password hashing with bcrypt (cost factor 12)
142+
- Protected API routes with dependency injection patterns
143+
- Secure user model implementation
144+
- API key handling for AI providers
145+
- Environment variable-based secrets management
146+
147+
### ⚡ Performance
148+
149+
- Faster type checking with `ty` replacing mypy
150+
- Optimized component dependency resolution
151+
- Improved dashboard rendering performance
152+
- Enhanced health check caching strategies
153+
- Reduced template generation time
154+
155+
### 📊 Statistics
156+
157+
- 62 pull requests merged since v0.1.0
158+
- 456 files changed (72,387 insertions, 4,590 deletions)
159+
- 8 new CLI commands
160+
- 2 new services (auth, AI)
161+
- 13+ new documentation files
162+
- 100+ new test files
163+
- 10 weeks of development (Aug 28 - Nov 5, 2025)
164+
165+
### 🎯 Highlights for Users
166+
167+
1. **Your stack can now evolve** - Add/remove components after project creation
168+
2. **Authentication ready** - Production JWT auth with one command (`--services auth`)
169+
3. **AI-ready** - Multi-provider AI integration built-in (`--services ai`)
170+
4. **No installation needed** - Run with `uvx aegis-stack init my-project`
171+
5. **Scheduler persistence** - SQLite-backed job storage for reliability
172+
6. **Enhanced DX** - Rich CLI tools, better dashboard, comprehensive health monitoring
173+
174+
### 📝 Notes
175+
176+
- Copier is now the default template engine, enabling `aegis add/remove/update` commands
177+
- Both Copier and Cookiecutter templates are fully supported
178+
- Auth service automatically includes Alembic for database migrations
179+
- AI service supports OpenAI, Anthropic, Gemini, and Groq providers
180+
- Scheduler persistence requires database component
181+
- Template version compatibility tracked in `.copier-answers.yml` (Copier projects)
182+
- Worker component still requires explicit Redis component specification
183+
8184
## [0.1.0] - 2025-08-27
9185

10186
### Added
@@ -36,4 +212,5 @@
36212
- Worker (arq/Redis) - Optional
37213
- Scheduler (APScheduler) - Optional
38214

215+
[0.2.0]: https://github.com/lbedner/aegis-stack/compare/v0.1.0...v0.2.0
39216
[0.1.0]: https://github.com/lbedner/aegis-stack/releases/tag/v0.1.0

docs/cli-reference.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,130 @@ aegis remove --interactive
384384

385385
---
386386

387+
## aegis update
388+
389+
Update an existing Copier-based project to the latest template version.
390+
391+
**Usage:**
392+
```bash
393+
aegis update [OPTIONS]
394+
```
395+
396+
**Options:**
397+
398+
- `--project-path PATH` - Path to project to update (default: current directory)
399+
- `--version TEXT` - Update to specific template version (default: latest)
400+
- `--force, -f` - Accept all template changes automatically (skip conflict resolution)
401+
- `--yes, -y` - Skip confirmation prompt
402+
- `--dry-run` - Preview changes without applying them
403+
404+
**Examples:**
405+
```bash
406+
# Update current project to latest template
407+
aegis update
408+
409+
# Update specific project
410+
aegis update --project-path ../my-project
411+
412+
# Update to specific template version
413+
aegis update --version 0.2.0
414+
415+
# Preview changes without applying
416+
aegis update --dry-run
417+
418+
# Auto-accept all updates
419+
aegis update --force --yes
420+
```
421+
422+
**How It Works:**
423+
424+
1. Validates project was generated with Copier (required for updates)
425+
2. Checks current template version from `.copier-answers.yml`
426+
3. Fetches latest template version (or specified version)
427+
4. Compares current files with template updates
428+
5. Shows diff of changes to be applied
429+
6. Prompts for conflict resolution (which version to keep)
430+
7. Applies updates and creates backup files for conflicts
431+
8. Runs `uv sync` to update dependencies
432+
9. Runs `make fix` to format updated code
433+
434+
**What Gets Updated:**
435+
436+
- ✅ Template infrastructure files (configuration, base components)
437+
- ✅ Shared files (docker-compose.yml, pyproject.toml, Makefile)
438+
- ✅ Component implementations (if you haven't customized them)
439+
- ✅ Test infrastructure
440+
- ✅ Documentation templates
441+
442+
**What's Preserved:**
443+
444+
- ✅ Your custom business logic
445+
- ✅ Your environment variables (.env)
446+
- ✅ Your database migrations
447+
- ✅ Your custom models and services
448+
- ✅ Files you've modified (marked as conflicts for manual resolution)
449+
450+
**Conflict Resolution:**
451+
452+
When the template has changed a file you've also modified:
453+
454+
```bash
455+
# Option 1: Keep your version
456+
[1] Keep my changes
457+
458+
# Option 2: Use template version
459+
[2] Use template version
460+
461+
# Option 3: View diff
462+
[3] Show diff
463+
464+
# Option 4: Manual merge
465+
[4] I'll merge manually
466+
```
467+
468+
Conflict files are backed up to:
469+
- Original: `app/components/backend/api/router.py.backup-TIMESTAMP`
470+
- Template: `app/components/backend/api/router.py.copier-TIMESTAMP`
471+
472+
**Important Notes:**
473+
474+
- **Cookiecutter projects cannot use this command** - Only Copier-based projects support updates
475+
- **Always commit before updating**: `git add . && git commit -m "Pre-update checkpoint"`
476+
- **Review changes carefully**: Don't blindly accept all updates
477+
- **Test after updating**: Run `make check` to verify everything works
478+
- **Backup files are created**: Check `.backup-*` and `.copier-*` files after conflicts
479+
- **Major version updates**: May require manual intervention and migration steps
480+
481+
**Troubleshooting:**
482+
483+
```bash
484+
# Error: "Not a Copier project"
485+
# Solution: This project was created with Cookiecutter
486+
# See docs/upgrading.md for migration options
487+
488+
# Error: "Uncommitted changes"
489+
# Solution: Commit your changes first
490+
git add . && git commit -m "Save current work"
491+
492+
# Many conflicts after update
493+
# Solution: Review .copier-answers.yml to see what changed
494+
# Use --dry-run first to preview changes
495+
496+
# Update breaks tests
497+
# Solution: Roll back and review changes
498+
git reset --hard HEAD~1 # Undo update
499+
aegis update --dry-run # Preview what changed
500+
```
501+
502+
**See Also:**
503+
504+
- [Upgrading Guide](upgrading.md) - Comprehensive upgrade documentation
505+
- [Versioning](versioning.md) - Understanding version compatibility
506+
- `aegis add` - Add new components to existing projects
507+
- `aegis remove` - Remove components from projects
508+
509+
---
510+
387511
## Development Workflow
388512

389513
After creating a project:

0 commit comments

Comments
 (0)