feat: restructure to Python monorepo with /init customization skill#9
Merged
feat: restructure to Python monorepo with /init customization skill#9
Conversation
Major restructuring of Python codebase: **Architecture:** - Split into py-core (shared library) and py-app (FastAPI application) - Added turbo for intra-project orchestration - SQLAlchemy 2.0 with PgEnum for type-safe enums - uuid7 for time-sortable IDs **Chat System:** - Admin-only AI chat with streaming SSE - Redis-based cancellation signaling - Completion lifecycle tracking (pending -> processing -> completed/cancelled/failed) - Tool call support with async execution tracking **Type Safety:** - All enums use PgEnum directly (no .value conversions) - Proper SQLAlchemy column type casts - Full type checker compliance (ty) **Documentation:** - Added MULTI_TENANCY.md guide for future tenant isolation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update Python homepage to reflect completed features (AI chat, TaskIQ, turbo) - Update static homepage Python description - Add ANTHROPIC_API_KEY to deploy secrets for chat feature Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add interactive `/init` command that guides users through customizing the template for their project. Asks about stack selection (Python, TypeScript, or hybrid), features (database, background jobs, auth), and deployment targets, then enters plan mode to design the transformation. - Create .claude/commands/init.md skill definition - Create docs/CUSTOMIZING.md manual customization guide - Update CLAUDE.md with /init command and customization section - Update README.md with getting started section Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address code review feedback: - Add StringEnum utility for type-safe enum storage as VARCHAR - Add uuid7_str utility for time-sortable IDs - Update User, Widget, CronJobRun, AsyncToolExecution models to use Mapped/mapped_column syntax with StringEnum and uuid7_str - Fix timestamp type annotations (datetime instead of TIMESTAMP) - Update cron decorator to use enums directly (no .value needed) - Create fresh migration dated 2026-02-12 with all tables - Add database tests for utils and models (40 tests passing) - Update CLAUDE.md to reference StringEnum Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix docstring in utils.py to reference StringEnum instead of PgEnum - Add conftest.py with documented fixture examples for future DB tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move customization documentation from flat docs/CUSTOMIZING.md to structured docs/customizing/ folder with specialized guides for project setup, TypeScript/Python packages, hybrid stack, and multi-tenancy patterns. Philosophy: keep features, don't remove them - easier to ignore than add back. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Emphasize interview-style conversation over checklist questions - Align with "keep features, don't remove" philosophy - Remove deployment as a choice - describe what's needed instead - Focus on identity config and cleaning up template docs - Remove git history preservation emphasis Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document the convention for keeping server-rendered routes alongside the SPA: /_status/* for health checks and /_admin/* for admin pages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace separate py/ and ts/ directories with single unified workspace where turbo orchestrates both Python and TypeScript packages. Single `pnpm dev` runs everything - API, workers, and frontend. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-core Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All tenant members should see events, not just the user who made the change. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
One command, one terminal, all services. No tmux needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
asyncpg can't insert timezone-aware datetimes into timezone-naive columns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All datetimes are now naive UTC, no need for _ensure_tz_aware. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Parse JSON string in ToolResultPart.result to extract ref_id for async tool lookup - Add session factory (get_session) to AgentDeps for isolated DB sessions in parallel tool calls - Use naive UTC datetimes for TIMESTAMP WITHOUT TIME ZONE columns - Update StringEnum docs to clarify ORM vs Core usage - Add async tools polling endpoint for completed tool refresh - Update landing page with async tools feature badge Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covered by customization docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Kamal handles registry setup during deployment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These were hallucinated and don't reflect reality. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cb7add2 to
d3aafc2
Compare
The py/Makefile install target requires pnpm. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
py-corelibrary andpy-appapplication/initskill for interactive template customizationKey Changes
Monorepo Structure
py/packages/py-core/- Shared library (database, AI/ML, events)py/apps/py-app/- FastAPI applicationNew Features
Developer Experience
/initskill for guided template customizationdocs/CUSTOMIZING.mdfor manual customization referenceTest plan
make checkin py/ directorymake dev/initskill flow🤖 Generated with Claude Code