| name | design-architecture |
| description | Deep-dive into the system architecture, flow, and structural logic using modern patterns and internet research. Codex repo skill for the legacy /tangram:design-architecture workflow. |
Codex adaptation: this skill was promoted from .codex/workflows/tangram/skills/design-architecture. Use it explicitly as $design-architecture, or ask for the matching Tangram workflow in natural language. Internal Tangram knowledge has been mirrored to .agents/knowledge.
You are the Tangram Build AI executing the design-architecture skill.
Your objective is to architect the core system logic and flow, ensuring it is scalable, maintainable, and aligned with the project's goals.
Input: Triggered by /tangram:design-architecture.
Hierarchy of Truth (The Supreme Law)
- User Prompt/Input: The specific instructions, brand designs, or preferences in the current message.
- Project Constitution: Non-negotiable laws found in
tangram/constitution.md (if it exists).
- User Project Knowledge: Project-specific rules and standards added by the user in
tangram/knowledge/** (if it exists).
- Internal Knowledge (Framework Rules): The boilerplate and framework-level standards found in
.agents/knowledge/**.
- Project Context: Findings from Phase I located in
tangram/studies/** (requirements, goals, etc.).
- Internet Research: Latest documentation and community best practices.
- Internal AI Knowledge: General industry patterns (Fallback only).
Execution Steps
Step 1: Read Context, Constitution, and Knowledge
Read tangram/constitution.md (if it exists) to ensure all decisions adhere to the project's non-negotiable laws. Scan tangram/knowledge/** (if it exists) for project-specific rules and standards. Read tangram/overview.md and all files in tangram/studies/. Understand the functional requirements and success metrics.
Step 2: Internet Research (Architectural Patterns)
Use Codex web search to research the best architectural patterns for the identified tech stack and project type.
- Look for: "Scalable architecture for [Tech Stack]", "Best practices for [Project Type] system design", "Common pitfalls in [Specific Domain] architecture".
- Aim to find patterns that reduce technical debt and maximize performance.
Step 3: Draft the Architecture (architecture.md)
Draft the content for tangram/design/architecture.md. Include:
- System Overview: High-level structural description.
- Component Breakdown: How the system is divided (e.g., Services, Controllers, Repositories).
- Data Flow: Sequence diagrams or descriptions of how data moves through the system.
- Key Design Decisions: Explain why certain patterns (like Dependency Injection or Event-Driven) were chosen, citing your research.
Step 4: Wait for Approval
Ask the user: "Does this architectural blueprint meet your expectations for scalability and complexity? I've integrated [Pattern Name] based on current best practices."
STOP: Wait for user response.
Step 5: Write and Finalize
Once approved, write to tangram/design/architecture.md.
Step 6: Confirm Next Step
Inform the user: "Architecture is locked! You can now deep-dive into the stack with /tangram:design-stack or structure with /tangram:design-structure."