architecture-aware-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTable of Contents
目录
- Overview
- When to Use This Skill
- Required TodoWrite Items
- 5-Step Workflow
- Step 1: Gather Project Context
- Step 2: Research Best Practices ()
arch-init:research-completed - Step 3: Select Architecture Paradigm ()
arch-init:paradigm-selected - Step 4: Customize Templates ()
arch-init:templates-customized - Step 5: Create Architecture Decision Record ()
arch-init:decision-recorded - Date
- Status
- Context
- Decision
- Rationale
- Research Findings
- Key Considerations
- Alternatives Considered
- Consequences
- Positive
- Negative
- Implementation
- References
- Output: Complete Initialization Package
- Script Integration
- Architecture Research
- Template Customization
- Full Interactive Flow
- Using as Library (within Claude Code)
- Integration with Existing Commands
- Example Session
- Related Skills
- See Also
- 概述
- 适用场景
- 所需TodoWrite标记项
- 5步工作流
- 步骤1:收集项目上下文
- 步骤2:调研最佳实践 ()
arch-init:research-completed - 步骤3:选择架构范式 ()
arch-init:paradigm-selected - 步骤4:定制模板 ()
arch-init:templates-customized - 步骤5:创建架构决策记录 ()
arch-init:decision-recorded - 日期
- 状态
- 上下文
- 决策
- 依据
- 调研结果
- 核心考量
- 已评估备选方案
- 影响
- 正面影响
- 负面影响
- 落地实施
- 参考资料
- 输出:完整初始化包
- 脚本集成
- 架构调研
- 模板定制
- 完整交互流程
- 作为库使用(在Claude Code中)
- 与现有命令集成
- 会话示例
- 相关Skill
- 参考链接
Architecture-Aware Project Initialization
架构感知项目初始化
Overview
概述
Enhanced project initialization that combines:
- Deep online research into current best practices for your project type
- Archetype selection from the 14 paradigms in the archetypes plugin
- Template customization based on chosen architecture
- Decision documentation for future reference
增强型项目初始化能力,结合了以下特性:
- 深度在线调研 适配你项目类型的当前最佳实践
- 架构原型选型 从archetypes插件的14种范式中选择
- 模板定制 基于选中的架构生成适配模板
- 决策文档 留存记录供后续参考
When to Use This Skill
适用场景
Use this skill when:
- Starting a new project and unsure which architecture fits best
- Want modern, industry-standard architecture choices
- Need justification for architectural decisions
- Want templates customized to your chosen paradigm
Use instead of when architecture is undecided.
Use before to establish architectural foundation.
project-initproject-specification当出现以下情况时使用本Skill:
- 启动新项目,不确定哪种架构最适配
- 想要采用现代化、行业标准的架构选型
- 需要为架构决策提供依据
- 需要适配所选架构范式的定制模板
当架构尚未确定时,使用本工具替代
在使用 前使用本工具,以搭建架构基础
project-initproject-specificationRequired TodoWrite Items
所需TodoWrite标记项
- - Online research completed
arch-init:research-completed - - Architecture paradigm chosen
arch-init:paradigm-selected - - Templates adapted to paradigm
arch-init:templates-customized - - ADR created
arch-init:decision-recorded
- - 在线调研完成
arch-init:research-completed - - 架构范式已选定
arch-init:paradigm-selected - - 模板已适配范式
arch-init:templates-customized - - ADR(架构决策记录)已创建
arch-init:decision-recorded
5-Step Workflow
5步工作流
Step 1: Gather Project Context
步骤1:收集项目上下文
Essential Information (ask user):
markdown
1. **Project Type**: What are you building?
- Web API, CLI tool, data pipeline, desktop app, library, etc.
2. **Domain Complexity**: How complex are the business rules?
- Simple (CRUD), Moderate (some business logic), Complex (many rules),
Highly Complex (domain-specific language needed)
3. **Team Context**: Who will build and maintain this?
- Team size: < 5 | 5-15 | 15-50 | 50+
- Experience: Junior | Mixed | Senior | Expert
- Distribution: Co-located | Remote | Distributed
4. **Non-Functional Requirements**:
- Scalability needs (users, requests/sec, data volume)
- Performance requirements
- Security/compliance needs
- Integration points (external systems, databases, APIs)
5. **Timeline & Constraints**:
- Time to market: Rapid | Normal | Not urgent
- Budget constraints
- Technology constraints (must-use or must-avoid technologies)Verification: Run the command with flag to verify availability.
--help核心信息(询问用户):
markdown
1. **Project Type**: What are you building?
- Web API, CLI tool, data pipeline, desktop app, library, etc.
2. **Domain Complexity**: How complex are the business rules?
- Simple (CRUD), Moderate (some business logic), Complex (many rules),
Highly Complex (domain-specific language needed)
3. **Team Context**: Who will build and maintain this?
- Team size: < 5 | 5-15 | 15-50 | 50+
- Experience: Junior | Mixed | Senior | Expert
- Distribution: Co-located | Remote | Distributed
4. **Non-Functional Requirements**:
- Scalability needs (users, requests/sec, data volume)
- Performance requirements
- Security/compliance needs
- Integration points (external systems, databases, APIs)
5. **Timeline & Constraints**:
- Time to market: Rapid | Normal | Not urgent
- Budget constraints
- Technology constraints (must-use or must-avoid technologies)验证方式: 运行带 flag的命令验证工具可用性。
--helpStep 2: Research Best Practices (arch-init:research-completed
)
arch-init:research-completed步骤2:调研最佳实践 (arch-init:research-completed
)
arch-init:research-completedOnline Research Queries (use WebSearch):
For the project type, search for:
bash
undefined在线调研查询(使用WebSearch):
针对项目类型,搜索以下内容:
bash
undefinedPrimary: Architecture patterns for [project type] [year]
Primary: Architecture patterns for [project type] [year]
WebSearch("[project type] architecture best practices 2026")
WebSearch("[project type] architecture best practices 2026")
Secondary: Language-specific patterns
Secondary: Language-specific patterns
WebSearch("[language] [project type] architecture patterns 2026")
WebSearch("[language] [project type] architecture patterns 2026")
Tertiary: Framework-specific guidance
Tertiary: Framework-specific guidance
WebSearch("[framework] architecture patterns [project type]")
**Verification:** Run the command with `--help` flag to verify availability.
**Research Focus Areas**:
1. **Current Industry Standards**: What are practitioners recommending in 2026?
2. **Emerging Patterns**: Any new architectural approaches gaining traction?
3. **Anti-Patterns**: What practices are being actively discouraged?
4. **Technology Alignment**: Which patterns work best with your chosen stack?
5. **Case Studies**: Real-world examples of similar projects
**Synthesize Findings** into:
- Recommended architecture(s) for this project type
- Key trade-offs to consider
- Red flags or anti-patterns to avoid
- Technology-specific considerationsWebSearch("[framework] architecture patterns [project type]")
**验证方式:** 运行带 `--help` flag的命令验证工具可用性。
**调研核心方向:**
1. **当前行业标准**:2026年从业者推荐的方案是什么?
2. **新兴模式**:有没有正在流行的新架构方法?
3. **反模式**:哪些做法是当前明确不推荐的?
4. **技术适配性**:哪些模式最适配你选择的技术栈?
5. **案例研究**:同类项目的真实落地案例
**整合调研结果**输出:
- 适配该项目类型的推荐架构
- 需要考虑的核心权衡点
- 需要规避的风险点或反模式
- 技术栈相关的特殊考量Step 3: Select Architecture Paradigm (arch-init:paradigm-selected
)
arch-init:paradigm-selected步骤3:选择架构范式 (arch-init:paradigm-selected
)
arch-init:paradigm-selectedOption A: Manual Selection Using archetypes Plugin
Invoke the architecture paradigms skill:
**Verification:** Run the command with `--help` flag to verify availability.
Skill(architecture-paradigms)Verification: Run the command with flag to verify availability.
--helpThis will guide you through selecting from the 14 available paradigms:
- Layered Architecture
- Functional Core, Imperative Shell
- Hexagonal (Ports & Adapters)
- Modular Monolith
- Microservices
- Service-Based Architecture
- Event-Driven Architecture
- CQRS + Event Sourcing
- Serverless
- Space-Based Architecture
- Pipeline Architecture
- Microkernel Architecture
- Client-Server Architecture
Option B: Automated Paradigm Matching
Use the decision matrix below to recommend a paradigm based on project context:
**Verification:** Run the command with `--help` flag to verify availability.
┌─────────────────────┬─────────┬─────────┬──────────┬─────────────┐
│ Project Context │ Simple │ Moderate│ Complex │ Highly │
│ │ Domain │ Domain │ Domain │ Complex │
├─────────────────────┼─────────┼─────────┼──────────┼─────────────┤
│ < 5 engineers │ Layered │ Layered │ Hexagonal│ Functional │
│ │ │ Hexag. │ Functional│ Core │
├─────────────────────┼─────────┼─────────┼──────────┼─────────────┤
│ 5-15 engineers │ Layered │ Modular │ Modular │ Hexagonal │
│ │ │ Monolith│ Monolith │ + FC, IS │
├─────────────────────┼─────────┼─────────┼──────────┼─────────────┤
│ 15-50 engineers │ Modular │ Micro- │ Micro- │ CQRS/ES │
│ │ Monolith│ services│ services │ + Event │
├─────────────────────┼─────────┼─────────┼──────────┼─────────────┤
│ 50+ engineers │ Micro- │ Micro- │ Event- │ Microkernel │
│ │ services│ services│ Driven │ or Space- │
│ │ │ + Event │ │ Based │
└─────────────────────┴─────────┴─────────┴──────────┴─────────────┘Verification: Run the command with flag to verify availability.
--helpSpecial Cases:
- Real-time/Streaming: Event-Driven + Pipeline
- Bursty/Cloud-Native: Serverless
- Extensible Platform: Microkernel
- Data Processing: Pipeline + Event-Driven
- Legacy Integration: Hexagonal
- High-Throughput Stateful: Space-Based
选项A:使用archetypes插件手动选型
调用架构范式Skill:
**Verification:** Run the command with `--help` flag to verify availability.
Skill(architecture-paradigms)验证方式: 运行带 flag的命令验证工具可用性。
--help该工具会引导你从14种可用范式中选择:
- Layered Architecture
- Functional Core, Imperative Shell
- Hexagonal (Ports & Adapters)
- Modular Monolith
- Microservices
- Service-Based Architecture
- Event-Driven Architecture
- CQRS + Event Sourcing
- Serverless
- Space-Based Architecture
- Pipeline Architecture
- Microkernel Architecture
- Client-Server Architecture
选项B:自动化范式匹配
使用下方决策矩阵,基于项目上下文推荐适配的范式:
**Verification:** Run the command with `--help` flag to verify availability.
┌─────────────────────┬─────────┬─────────┬──────────┬─────────────┐
│ Project Context │ Simple │ Moderate│ Complex │ Highly │
│ │ Domain │ Domain │ Domain │ Complex │
├─────────────────────┼─────────┼─────────┼──────────┼─────────────┤
│ < 5 engineers │ Layered │ Layered │ Hexagonal│ Functional │
│ │ │ Hexag. │ Functional│ Core │
├─────────────────────┼─────────┼─────────┼──────────┼─────────────┤
│ 5-15 engineers │ Layered │ Modular │ Modular │ Hexagonal │
│ │ │ Monolith│ Monolith │ + FC, IS │
├─────────────────────┼─────────┼─────────┼──────────┼─────────────┤
│ 15-50 engineers │ Modular │ Micro- │ Micro- │ CQRS/ES │
│ │ Monolith│ services│ services │ + Event │
├─────────────────────┼─────────┼─────────┼──────────┼─────────────┤
│ 50+ engineers │ Micro- │ Micro- │ Event- │ Microkernel │
│ │ services│ services│ Driven │ or Space- │
│ │ │ + Event │ │ Based │
└─────────────────────┴─────────┴─────────┴──────────┴─────────────┘验证方式: 运行带 flag的命令验证工具可用性。
--help特殊场景适配:
- 实时/流处理场景:Event-Driven + Pipeline
- 波峰波谷明显/云原生场景:Serverless
- 可扩展平台场景:Microkernel
- 数据处理场景:Pipeline + Event-Driven
- 遗留系统集成场景:Hexagonal
- 高吞吐有状态场景:Space-Based
Step 4: Customize Templates (arch-init:templates-customized
)
arch-init:templates-customized步骤4:定制模板 (arch-init:templates-customized
)
arch-init:templates-customizedTemplate Adaptation Strategy:
- Load Base Templates for the chosen language (Python/Rust/TypeScript)
- Apply Architecture-Specific Modifications based on selected paradigm
- Generate Custom Configuration reflecting architectural choices
- Create Documentation explaining the architecture
Example Adaptations:
For Functional Core, Imperative Shell:
**Verification:** Run the command with `--help` flag to verify availability.
src/
├── core/ # Pure business logic
│ ├── domain.py # Domain models
│ ├── operations.py # Pure functions
│ └── commands.py # Command objects
└── adapters/ # Side effects
├── database.py # DB operations
├── api.py # HTTP operations
└── filesystem.py # File operationsVerification: Run the command with flag to verify availability.
--helpFor Hexagonal Architecture:
**Verification:** Run the command with `--help` flag to verify availability.
src/
├── domain/ # Business logic (no framework deps)
│ ├── models.py
│ ├── services.py
│ └── ports/ # Interfaces
│ ├── input.py # Use cases
│ └── output.py # Repository interfaces
└── infrastructure/ # Framework-specific code
├── persistence/ # Repositories
├── web/ # Controllers
└── messaging/ # Event handlersVerification: Run the command with flag to verify availability.
--helpFor Microservices:
**Verification:** Run the command with `--help` flag to verify availability.
project/
├── services/
│ ├── service-a/ # Independent service
│ │ ├── src/
│ │ ├── tests/
│ │ ├── Dockerfile
│ │ └── pyproject.toml
│ └── service-b/ # Independent service
│ ├── src/
│ ├── tests/
│ ├── Dockerfile
│ └── pyproject.toml
├── api-gateway/
├── shared/
│ └── events/
└── docker-compose.ymlVerification: Run to verify tests pass.
pytest -v模板适配策略:
- 加载基础模板 适配所选语言(Python/Rust/TypeScript)
- 应用架构专属修改 基于选中的范式调整
- 生成定制配置 体现架构选型差异
- 创建说明文档 解释架构设计逻辑
适配示例:
Functional Core, Imperative Shell 范式:
**Verification:** Run the command with `--help` flag to verify availability.
src/
├── core/ # Pure business logic
│ ├── domain.py # Domain models
│ ├── operations.py # Pure functions
│ └── commands.py # Command objects
└── adapters/ # Side effects
├── database.py # DB operations
├── api.py # HTTP operations
└── filesystem.py # File operations验证方式: 运行带 flag的命令验证工具可用性。
--helpHexagonal Architecture 范式:
**Verification:** Run the command with `--help` flag to verify availability.
src/
├── domain/ # Business logic (no framework deps)
│ ├── models.py
│ ├── services.py
│ └── ports/ # Interfaces
│ ├── input.py # Use cases
│ └── output.py # Repository interfaces
└── infrastructure/ # Framework-specific code
├── persistence/ # Repositories
├── web/ # Controllers
└── messaging/ # Event handlers验证方式: 运行带 flag的命令验证工具可用性。
--helpMicroservices 范式:
**Verification:** Run the command with `--help` flag to verify availability.
project/
├── services/
│ ├── service-a/ # Independent service
│ │ ├── src/
│ │ ├── tests/
│ │ ├── Dockerfile
│ │ └── pyproject.toml
│ └── service-b/ # Independent service
│ ├── src/
│ ├── tests/
│ ├── Dockerfile
│ └── pyproject.toml
├── api-gateway/
├── shared/
│ └── events/
└── docker-compose.yml验证方式: 运行 验证测试通过。
pytest -vStep 5: Create Architecture Decision Record (arch-init:decision-recorded
)
arch-init:decision-recorded步骤5:创建架构决策记录 (arch-init:decision-recorded
)
arch-init:decision-recordedGenerate ADR documenting the architecture choice:
markdown
undefined生成ADR 记录架构选型决策:
markdown
undefinedArchitecture Decision Record: [Paradigm Name]
Architecture Decision Record: [Paradigm Name]
Date
Date
[Current date]
[Current date]
Status
Status
Accepted | Proposed | Deprecated | Superseded by [link]
Accepted | Proposed | Deprecated | Superseded by [link]
Context
Context
[Project type, team size, domain complexity, key requirements]
[Project type, team size, domain complexity, key requirements]
Decision
Decision
[Chosen architecture paradigm]
[Chosen architecture paradigm]
Rationale
Rationale
Research Findings
Research Findings
[Summarize online research results]
[Summarize online research results]
Key Considerations
Key Considerations
- Team Fit: [Why this matches team size/experience]
- Domain Fit: [Why this matches problem complexity]
- Technology Fit: [Why this works with chosen stack]
- Scalability: [How this addresses scaling needs]
- Team Fit: [Why this matches team size/experience]
- Domain Fit: [Why this matches problem complexity]
- Technology Fit: [Why this works with chosen stack]
- Scalability: [How this addresses scaling needs]
Alternatives Considered
Alternatives Considered
- [Alternative 1]: Rejected because [reason]
- [Alternative 2]: Rejected because [reason]
- [Alternative 1]: Rejected because [reason]
- [Alternative 2]: Rejected because [reason]
Consequences
Consequences
Positive
Positive
- [Benefit 1]
- [Benefit 2]
- [Benefit 1]
- [Benefit 2]
Negative
Negative
- [Trade-off 1] with mitigation: [strategy]
- [Trade-off 2] with mitigation: [strategy]
- [Trade-off 1] with mitigation: [strategy]
- [Trade-off 2] with mitigation: [strategy]
Implementation
Implementation
- Templates: [Which templates were customized]
- Key Patterns: [Patterns to follow]
- Anti-Patterns: [What to avoid]
- Resources: [Links to paradigm skill, examples, etc.]
- Templates: [Which templates were customized]
- Key Patterns: [Patterns to follow]
- Anti-Patterns: [What to avoid]
- Resources: [Links to paradigm skill, examples, etc.]
References
References
- [Paradigm skill link]
- [Research sources]
- [Example projects]
**Verification:** Run the command with `--help` flag to verify availability.- [Paradigm skill link]
- [Research sources]
- [Example projects]
**验证方式:** 运行带 `--help` flag的命令验证工具可用性。Output: Complete Initialization Package
输出:完整初始化包
After completing this workflow, you'll have:
- Project Structure: Customized to chosen architecture
- Configuration: Architecture-appropriate tooling and dependencies
- Documentation: ADR explaining the architecture choice
- Guidance: Links to relevant paradigm skill for implementation
- Examples: Reference projects using similar architecture
完成工作流后,你将获得:
- 项目结构:适配所选架构的定制化目录结构
- 配置文件:适配架构的工具链与依赖配置
- 文档:解释架构选型逻辑的ADR
- 指引:相关架构范式Skill的落地参考链接
- 示例:采用同类架构的参考项目
Script Integration
脚本集成
Claude Code can invoke the architecture research and template customization scripts:
Claude Code可以调用架构调研与模板定制脚本:
Architecture Research
架构调研
bash
undefinedbash
undefinedRun architecture researcher for recommendations
Run architecture researcher for recommendations
uv run python plugins/attune/scripts/architecture_researcher.py
--project-type web-api
--domain-complexity complex
--team-size 5-15
--language python
--output-json
--project-type web-api
--domain-complexity complex
--team-size 5-15
--language python
--output-json
**Verification:** Run `python --version` to verify Python environment.
The researcher returns a recommendation with:
- Primary paradigm and rationale
- Trade-offs and mitigations
- Alternative paradigms considered
- Confidence leveluv run python plugins/attune/scripts/architecture_researcher.py
--project-type web-api
--domain-complexity complex
--team-size 5-15
--language python
--output-json
--project-type web-api
--domain-complexity complex
--team-size 5-15
--language python
--output-json
**验证方式:** 运行 `python --version` 验证Python环境可用。
调研工具将返回包含以下内容的推荐结果:
- 首选范式及选型依据
- 权衡点与缓解方案
- 已评估的备选范式
- 推荐置信度Template Customization
模板定制
bash
undefinedbash
undefinedGenerate architecture-specific directory structure
Generate architecture-specific directory structure
uv run python plugins/attune/scripts/template_customizer.py
--paradigm cqrs-es
--language python
--project-name my-project
--output-dir ./my-project
--paradigm cqrs-es
--language python
--project-name my-project
--output-dir ./my-project
**Verification:** Run `python --version` to verify Python environment.
This creates the paradigm-appropriate structure (e.g., commands/, queries/, events/ for CQRS).uv run python plugins/attune/scripts/template_customizer.py
--paradigm cqrs-es
--language python
--project-name my-project
--output-dir ./my-project
--paradigm cqrs-es
--language python
--project-name my-project
--output-dir ./my-project
**验证方式:** 运行 `python --version` 验证Python环境可用。
该命令将生成适配范式的目录结构(例如CQRS范式的commands/、queries/、events/目录)。Full Interactive Flow
完整交互流程
bash
undefinedbash
undefinedInteractive architecture-aware initialization
Interactive architecture-aware initialization
uv run python plugins/attune/scripts/attune_arch_init.py
--name my-project
--lang python
--name my-project
--lang python
uv run python plugins/attune/scripts/attune_arch_init.py
--name my-project
--lang python
--name my-project
--lang python
Non-interactive with explicit architecture
Non-interactive with explicit architecture
uv run python plugins/attune/scripts/attune_arch_init.py
--name my-project
--lang python
--arch hexagonal
--accept-recommendation
--name my-project
--lang python
--arch hexagonal
--accept-recommendation
**Verification:** Run `python --version` to verify Python environment.uv run python plugins/attune/scripts/attune_arch_init.py
--name my-project
--lang python
--arch hexagonal
--accept-recommendation
--name my-project
--lang python
--arch hexagonal
--accept-recommendation
**验证方式:** 运行 `python --version` 验证Python环境可用。Using as Library (within Claude Code)
作为库使用(在Claude Code中)
python
undefinedpython
undefinedImport and use programmatically
Import and use programmatically
from architecture_researcher import ArchitectureResearcher, ProjectContext
from template_customizer import TemplateCustomizer
from architecture_researcher import ArchitectureResearcher, ProjectContext
from template_customizer import TemplateCustomizer
Create context and get recommendation
Create context and get recommendation
context = ProjectContext(
project_type="web-api",
domain_complexity="complex",
team_size="5-15",
language="python"
)
researcher = ArchitectureResearcher(context)
recommendation = researcher.recommend()
context = ProjectContext(
project_type="web-api",
domain_complexity="complex",
team_size="5-15",
language="python"
)
researcher = ArchitectureResearcher(context)
recommendation = researcher.recommend()
Apply template customization
Apply template customization
customizer = TemplateCustomizer(
paradigm=recommendation.primary,
language="python",
project_name="my-project"
)
customizer.apply_structure(Path("./my-project"))
**Verification:** Run the command with `--help` flag to verify availability.customizer = TemplateCustomizer(
paradigm=recommendation.primary,
language="python",
project_name="my-project"
)
customizer.apply_structure(Path("./my-project"))
**验证方式:** 运行带 `--help` flag的命令验证工具可用性。Integration with Existing Commands
与现有命令集成
This skill enhances by adding an architecture selection phase:
/attune:project-initbash
undefined本Skill通过增加架构选型阶段增强了 能力:
/attune:project-initbash
undefinedStandard initialization (no architecture decision)
Standard initialization (no architecture decision)
/attune:project-init --lang python --name my-project
/attune:project-init --lang python --name my-project
Architecture-aware initialization
Architecture-aware initialization
/attune:brainstorm # Explore project needs
Skill(architecture-aware-init) # Select architecture based on research
/attune:project-init --arch <paradigm> # Initialize with chosen architecture
**Verification:** Run `python --version` to verify Python environment./attune:brainstorm # Explore project needs
Skill(architecture-aware-init) # Select architecture based on research
/attune:project-init --arch <paradigm> # Initialize with chosen architecture
**验证方式:** 运行 `python --version` 验证Python环境可用。Example Session
会话示例
User: I'm creating a Python web API for a fintech application. Team of 8 developers, complex business rules, need high security and audit trails.
Step 1 - Context: Project type=Web API, Domain=Highly Complex, Team=5-15, Requirements=Security, Auditability
Step 2 - Research:
bash
WebSearch("Python fintech API architecture patterns 2026")
WebSearch("financial services API audit trail architecture")
WebSearch("CQRS Event Sourcing Python examples")Verification: Run to verify Python environment.
python --versionStep 3 - Selection: Research + Decision Matrix → CQRS + Event Sourcing
Step 4 - Templates: Customized structure for CQRS/ES with:
- Command handling module
- Query handling module
- Event store configuration
- Aggregate patterns
- Projection handlers
Step 5 - ADR: Documenting why CQRS/ES for fintech (auditability, complex business rules, regulatory compliance)
Result: Project initialized with architecture-appropriate structure and clear decision rationale.
用户:我要为金融科技应用创建一个Python Web API,团队有8名开发者,业务规则复杂,需要高安全性和审计追溯能力。
步骤1 - 上下文收集:项目类型=Web API,领域=高复杂度,团队=5-15人,需求=安全、可审计
步骤2 - 调研:
bash
WebSearch("Python fintech API architecture patterns 2026")
WebSearch("financial services API audit trail architecture")
WebSearch("CQRS Event Sourcing Python examples")验证方式: 运行 验证Python环境可用。
python --version步骤3 - 选型:调研结果 + 决策矩阵 → CQRS + Event Sourcing
步骤4 - 模板生成:定制的CQRS/ES结构,包含:
- 命令处理模块
- 查询处理模块
- 事件存储配置
- 聚合模式
- 投影处理器
步骤5 - ADR:记录为何为金融科技场景选择CQRS/ES(可审计性、复杂业务规则适配、合规要求满足)
结果:项目完成初始化,拥有适配架构的目录结构和清晰的决策依据。
Related Skills
相关Skill
- - Comprehensive paradigm selection
Skill(architecture-paradigms) - - Specific paradigm implementation guidance
Skill(architecture-paradigm-*) - - Project ideation before architecture
Skill(attune:project-brainstorming) - - Requirements after architecture chosen
Skill(attune:project-specification)
- - 全量架构范式选型指南
Skill(architecture-paradigms) - - 特定架构范式的落地指引
Skill(architecture-paradigm-*) - - 架构选型前的项目创意梳理
Skill(attune:project-brainstorming) - - 架构选定后的需求整理
Skill(attune:project-specification)
See Also
参考链接
- - Basic project initialization
/attune:project-init - - Architecture planning after paradigm selection
/attune:blueprint - Architecture paradigms README for paradigm details
- - 基础项目初始化工具
/attune:project-init - - 范式选定后的架构规划工具
/attune:blueprint - 架构范式README获取范式详情
Troubleshooting
故障排查
Common Issues
常见问题
Command not found
Ensure all dependencies are installed and in PATH
Permission errors
Check file permissions and run with appropriate privileges
Unexpected behavior
Enable verbose logging with flag
--verbose命令不存在
确保所有依赖已安装且在PATH环境变量中
权限错误
检查文件权限,使用合适的权限运行
异常行为
添加 flag开启详细日志排查
--verbose