Loading...
Loading...
Compare original and translation side by side
| Aspect | CREATE | TRANSFORM |
|---|---|---|
| Input | Empty directory or target stack config | Existing project (Replit, StackBlitz, CodeSandbox, Glitch, custom) |
| Detection | No source files found | Source files + optional platform config detected |
| ln-710 | SKIP (no deps to upgrade) | RUN (upgrade existing deps) |
| ln-720 | SCAFFOLD + GENERATE | RESTRUCTURE + MIGRATE |
| ln-724 | SKIP (no artifacts) | CONDITIONAL (if platform detected) |
| ln-730–780 | RUN (same for both modes) | RUN (same for both modes) |
| 维度 | CREATE模式 | TRANSFORM模式 |
|---|---|---|
| 输入 | 空目录或目标技术栈配置 | 现有项目(Replit、StackBlitz、CodeSandbox、Glitch、自定义项目) |
| 检测逻辑 | 未发现源码文件 | 检测到源码文件 + 可选平台配置 |
| ln-710执行逻辑 | 跳过(无依赖需要升级) | 执行(升级现有依赖) |
| ln-720执行逻辑 | 搭建骨架 + 生成代码 | 重构结构 + 迁移代码 |
| ln-724执行逻辑 | 跳过(无遗留产物) | 条件执行(若检测到特定平台则执行) |
| ln-730–780执行逻辑 | 执行(与TRANSFORM模式逻辑一致) | 执行(与CREATE模式逻辑一致) |
| Aspect | Details |
|---|---|
| Input | Empty directory (CREATE) or source project (TRANSFORM) |
| Output | Production-ready project with all infrastructure |
| Delegations | ln-710 (conditional) -> ln-720 -> ln-730 -> ln-740 -> ln-750 -> ln-760 -> ln-770 -> ln-780 |
| 维度 | 详情 |
|---|---|
| 输入 | 空目录(CREATE模式)或现有源码项目(TRANSFORM模式) |
| 输出 | 包含完整基础设施的可生产级项目 |
| 任务委托流程 | ln-710(条件触发)-> ln-720 -> ln-730 -> ln-740 -> ln-750 -> ln-760 -> ln-770 -> ln-780 |
Phase 0: Analyze (Tech Detection)
|
v
Phase 1: Plan (Generate Transformation Plan)
|
v
Phase 2: Confirm (User Approval)
|
v
Phase 3: Execute (Delegate to L2 Coordinators)
|
+---> ln-710: Dependency Upgrader
+---> ln-720: Structure Migrator
+---> ln-730: DevOps Setup
+---> ln-740: Quality Setup
+---> ln-750: Commands Generator
+---> ln-760: Security Setup
+---> ln-770: Crosscutting Setup
+---> ln-780: Bootstrap Verifier
|
v
Phase 4: Report (Summary of Changes)Phase 0: Analyze (Tech Detection)
|
v
Phase 1: Plan (Generate Transformation Plan)
|
v
Phase 2: Confirm (User Approval)
|
v
Phase 3: Execute (Delegate to L2 Coordinators)
|
+---> ln-710: Dependency Upgrader
+---> ln-720: Structure Migrator
+---> ln-730: DevOps Setup
+---> ln-740: Quality Setup
+---> ln-750: Commands Generator
+---> ln-760: Security Setup
+---> ln-770: Crosscutting Setup
+---> ln-780: Bootstrap Verifier
|
v
Phase 4: Report (Summary of Changes)| Condition | Mode | Action |
|---|---|---|
| Empty directory (no source files) | CREATE | Ask user for target stack, project name, entities |
| Source files found | TRANSFORM | Auto-detect stack, scan for platform artifacts |
| Ambiguous (few files, unclear) | ASK | Present both options, let user choose |
| 条件 | 模式 | 操作 |
|---|---|---|
| 空目录(无源码文件) | CREATE | 询问用户目标技术栈、项目名称、核心实体 |
| 检测到源码文件 | TRANSFORM | 自动检测技术栈,扫描平台遗留产物 |
| 模糊状态(文件极少,无法明确判断) | 询问 | 向用户展示两种模式选项,由用户选择 |
| Parameter | Required | Default | Example |
|---|---|---|---|
| Project name | Yes | — | MyApp |
| Target backend | Yes | — | .NET / Node.js / Python |
| Target frontend | Yes | — | React / Vue / Angular / Svelte |
| Database | Yes | — | PostgreSQL / MongoDB / MySQL |
| Main entities | No | User, Role (starter) | User, Product, Order |
| 参数 | 是否必填 | 默认值 | 示例 |
|---|---|---|---|
| 项目名称 | 是 | — | MyApp |
| 目标后端技术栈 | 是 | — | .NET / Node.js / Python |
| 目标前端技术栈 | 是 | — | React / Vue / Angular / Svelte |
| 数据库 | 是 | — | PostgreSQL / MongoDB / MySQL |
| 核心实体 | 否 | User、Role(初始模板) | User、Product、Order |
Frontend:
React:
- package.json contains "react"
- Files: *.tsx, *.jsx with React imports
Vue:
- package.json contains "vue"
- Files: *.vue
Angular:
- package.json contains "@angular/core"
- Files: *.component.ts
Svelte:
- package.json contains "svelte"
- Files: *.svelte
Backend:
.NET:
- *.csproj files exist
- *.sln files exist
Node.js:
- package.json + (express|fastify|nest|koa)
- tsconfig.json or jsconfig.json
Python:
- requirements.txt OR pyproject.toml OR setup.py
- (fastapi|flask|django) in dependencies
Go:
- go.mod exists
Database:
PostgreSQL:
- DATABASE_URL contains "postgres"
- docker-compose.yml contains "postgres"
MongoDB:
- MONGODB_URI in env
- docker-compose.yml contains "mongo"
MySQL:
- DATABASE_URL contains "mysql"
ORM:
Drizzle: drizzle.config.ts exists
Prisma: prisma/schema.prisma exists
EF Core: *.csproj references Microsoft.EntityFrameworkCore
SQLAlchemy: "sqlalchemy" in requirementsFrontend:
React:
- package.json contains "react"
- Files: *.tsx, *.jsx with React imports
Vue:
- package.json contains "vue"
- Files: *.vue
Angular:
- package.json contains "@angular/core"
- Files: *.component.ts
Svelte:
- package.json contains "svelte"
- Files: *.svelte
Backend:
.NET:
- *.csproj files exist
- *.sln files exist
Node.js:
- package.json + (express|fastify|nest|koa)
- tsconfig.json or jsconfig.json
Python:
- requirements.txt OR pyproject.toml OR setup.py
- (fastapi|flask|django) in dependencies
Go:
- go.mod exists
Database:
PostgreSQL:
- DATABASE_URL contains "postgres"
- docker-compose.yml contains "postgres"
MongoDB:
- MONGODB_URI in env
- docker-compose.yml contains "mongo"
MySQL:
- DATABASE_URL contains "mysql"
ORM:
Drizzle: drizzle.config.ts exists
Prisma: prisma/schema.prisma exists
EF Core: *.csproj references Microsoft.EntityFrameworkCore
SQLAlchemy: "sqlalchemy" in requirementsDetected Stack:
Frontend:
Framework: React
Version: 19.x
Build Tool: Vite
UI Library: shadcn/ui
State: React Query
Backend:
Current: Node.js + Express
Target: .NET 10 (user preference)
ORM: Drizzle -> EF Core
Database:
Type: PostgreSQL
Version: 17
Structure:
Type: Monolith (Prototype)
Origin: replit | stackblitz | codesandbox | glitch | custom
Target: Clean ArchitectureDetected Stack:
Frontend:
Framework: React
Version: 19.x
Build Tool: Vite
UI Library: shadcn/ui
State: React Query
Backend:
Current: Node.js + Express
Target: .NET 10 (user preference)
ORM: Drizzle -> EF Core
Database:
Type: PostgreSQL
Version: 17
Structure:
Type: Monolith (Prototype)
Origin: replit | stackblitz | codesandbox | glitch | custom
Target: Clean Architectureundefinedundefined
---
---Bootstrap Plan Ready!
Summary:
- Frontend: React 19 (upgrade from 18)
- Backend: .NET 10 (replacing Node.js)
- Docker: Multi-container setup
- CI/CD: GitHub Actions
- Quality: ESLint, Prettier, Husky
Proceed with bootstrap? [Y/n]初始化计划已准备完成!
摘要:
- 前端:React 19(从18升级)
- 后端:.NET 10(替换Node.js)
- Docker:多容器部署配置
- CI/CD:GitHub Actions
- 质量工具:ESLint、Prettier、Husky
是否继续执行初始化?[Y/n]| Order | Skill | Purpose | CREATE mode | TRANSFORM mode | Depends On |
|---|---|---|---|---|---|
| 1 | ln-710 | Upgrade dependencies | SKIP | RUN | — |
| 2 | ln-720 | Structure (SCAFFOLD/RESTRUCTURE) | RUN (SCAFFOLD) | RUN (RESTRUCTURE) | ln-710 |
| 3 | ln-730 | Setup Docker/CI | RUN | RUN | ln-720 |
| 4 | ln-740 | Configure quality tools | RUN | RUN | ln-720 |
| 5 | ln-750 | Generate .claude/commands | RUN | RUN | ln-720 |
| 6 | ln-760 | Security scanning | RUN | RUN | ln-710 |
| 7 | ln-770 | Crosscutting concerns | RUN | RUN | ln-720 |
| 8 | ln-780 | Build and verify | RUN | RUN | All above |
| 顺序 | 技能ID | 目标 | CREATE模式 | TRANSFORM模式 | 依赖项 |
|---|---|---|---|---|---|
| 1 | ln-710 | 升级依赖 | 跳过 | 执行 | — |
| 2 | ln-720 | 项目结构(搭建/重构) | 执行(搭建骨架) | 执行(重构结构) | ln-710 |
| 3 | ln-730 | Docker/CI配置 | 执行 | 执行 | ln-720 |
| 4 | ln-740 | 质量工具配置 | 执行 | 执行 | ln-720 |
| 5 | ln-750 | 生成.claude/命令 | 执行 | 执行 | ln-720 |
| 6 | ln-760 | 安全扫描 | 执行 | 执行 | ln-710 |
| 7 | ln-770 | 横切关注点配置 | 执行 | 执行 | ln-720 |
| 8 | ln-780 | 构建与验证 | 执行 | 执行 | 以上所有任务 |
Stack:
frontend: { framework, version, buildTool }
backend: { framework, version }
database: { type, version }
Paths:
root: /project
frontend: /project/src/frontend
backend: /project/src/MyApp.Api
Options:
skipTests: false
allowFailures: falseStatus: success | partial | failed
FilesCreated: [...]
FilesModified: [...]
Warnings: [...]
Errors: [...]Stack:
frontend: { framework, version, buildTool }
backend: { framework, version }
database: { type, version }
Paths:
root: /project
frontend: /project/src/frontend
backend: /project/src/MyApp.Api
Options:
skipTests: false
allowFailures: falseStatus: success | partial | failed
FilesCreated: [...]
FilesModified: [...]
Warnings: [...]
Errors: [...]Bootstrap Complete!
Duration: 24 minutes 32 seconds
Changes Summary:
Files Created: 47
Files Modified: 15
Files Deleted: 9
By Category:
Dependencies:
- Upgraded 23 packages
- No breaking changes detected
Structure:
- Created 5 .NET projects
- Restructured frontend (12 components extracted)
- Migrated 8 mock data files
DevOps:
- Created Dockerfile.frontend
- Created Dockerfile.backend
- Created docker-compose.yml
- Created .github/workflows/ci.yml
Quality:
- Configured ESLint + Prettier
- Installed Husky hooks
- Created 3 test files
Commands:
- Generated 3 .claude/commands
Security:
- Scanned 156 files
- Found 0 secrets
- 2 vulnerability warnings (low severity)
Crosscutting:
- Configured Serilog
- Added error handling
- CORS enabled for localhost
- Health checks at /health
- Swagger at /swagger
Verification:
Build: SUCCESS
Tests: 42 passed, 0 failed
Docker: 3 containers running
Health: All endpoints responding
Next Steps:
1. Open http://localhost:3000 (frontend)
2. Open http://localhost:5000/swagger (API docs)
3. Review generated .claude/commands
4. Run 'git add . && git commit -m "Bootstrap complete"'初始化执行完成!
耗时:24分32秒
变更摘要:
新增文件:47个
修改文件:15个
删除文件:9个
按分类统计:
依赖管理:
- 升级23个包
- 未检测到破坏性变更
项目结构:
- 创建5个.NET项目
- 重构前端代码(提取12个组件)
- 迁移8个模拟数据文件
DevOps配置:
- 创建Dockerfile.frontend
- 创建Dockerfile.backend
- 创建docker-compose.yml
- 创建.github/workflows/ci.yml
质量工具:
- 配置ESLint + Prettier
- 安装Husky钩子
- 创建3个测试文件
命令生成:
- 生成3个.claude/命令
安全检测:
- 扫描156个文件
- 未发现硬编码密钥
- 2个低危漏洞警告
横切关注点:
- 配置Serilog日志
- 添加错误处理中间件
- 为localhost启用CORS
- 配置/health健康检查端点
- 启用Swagger文档
验证结果:
构建:成功
测试:42个通过,0个失败
Docker:3个容器运行中
健康检查:所有端点正常响应
下一步操作:
1. 打开http://localhost:3000(前端页面)
2. 打开http://localhost:5000/swagger(API文档)
3. 查看生成的.claude/命令
4. 执行'git add . && git commit -m "Bootstrap complete"'| Error | Action |
|---|---|
| Dependency conflict | Try with --legacy-peer-deps |
| Build failure | Log error, suggest fix, continue |
| Test failure | Log warning, continue with --allow-failures |
| Docker build fail | Suggest Dockerfile fixes |
| 错误类型 | 处理操作 |
|---|---|
| 依赖冲突 | 尝试添加--legacy-peer-deps参数重新执行 |
| 构建失败 | 记录错误,给出修复建议,继续执行后续任务 |
| 测试失败 | 记录警告,使用--allow-failures参数继续执行 |
| Docker构建失败 | 给出Dockerfile修复建议 |
| Error | Action | Mode |
|---|---|---|
| No package.json (TRANSFORM) | Abort: "Not a Node.js project" | TRANSFORM |
| Unsupported stack | Abort: "Stack not supported: {stack}" | Both |
| Permission denied | Abort: "Cannot write to {path}" | Both |
| No stack selected | Abort: "Target stack required for CREATE mode" | CREATE |
| Conflicting files | Abort if user chose "Abort" in pre-flight | CREATE |
| 错误类型 | 处理操作 | 适用模式 |
|---|---|---|
| 未找到package.json(TRANSFORM模式) | 终止:"非Node.js项目" | TRANSFORM |
| 不支持的技术栈 | 终止:"不支持的技术栈:{stack}" | 两种模式 |
| 权限不足 | 终止:"无法写入路径:{path}" | 两种模式 |
| 未选择技术栈(CREATE模式) | 终止:"CREATE模式必须指定目标技术栈" | CREATE |
| 文件冲突 | 若用户在预检查中选择"终止"则终止流程 | CREATE |
Options:
# Backend replacement
targetBackend: ".NET" | "Node" | "Python" | "keep"
# Frontend refactoring depth
frontendRefactoring: "minimal" | "moderate" | "full"
# Docker setup
dockerEnabled: true
dockerRegistry: null # Optional: ghcr.io/user
# CI/CD
cicdProvider: "github" | "azure" | "gitlab" | "none"
# Quality tools
linterConfig: "recommended" | "strict"
precommitHooks: true
# Commands to generate
commands: ["refresh_context", "refresh_infrastructure", "build-and-test"]
# Verification
runTests: true
startContainers: true
keepContainersRunning: trueOptions:
# 后端技术栈替换
targetBackend: ".NET" | "Node" | "Python" | "keep"
# 前端重构深度
frontendRefactoring: "minimal" | "moderate" | "full"
# Docker配置
dockerEnabled: true
dockerRegistry: null # 可选:ghcr.io/user
# CI/CD提供商
cicdProvider: "github" | "azure" | "gitlab" | "none"
# 质量工具配置
linterConfig: "recommended" | "strict"
precommitHooks: true
# 要生成的命令
commands: ["refresh_context", "refresh_infrastructure", "build-and-test"]
# 验证选项
runTests: true
startContainers: true
keepContainersRunning: trueundefinedundefined
---
---| Skill | Integration |
|---|---|
| ln-001-standards-researcher | Query for best practices during ln-720 |
| ln-002-best-practices-researcher | Generate guides during ln-720 |
| ln-100-documents-pipeline | Call after bootstrap for docs |
| ln-310-story-validator | Validate generated tasks |
| 技能ID | 集成方式 |
|---|---|
| ln-001-standards-researcher | 在ln-720执行期间查询最佳实践 |
| ln-002-best-practices-researcher | 在ln-720执行期间生成指南 |
| ln-100-documents-pipeline | 初始化完成后调用以生成文档 |
| ln-310-story-validator | 验证生成的任务 |