The screen design document template can be used for the following use cases.

Purpose Agent Example Prompt
Generate screen design from requirements Document Agent, Lite Agent Refer to the use case document for xxx, design the necessary frontend screens, and output them according to the screen design document template format. Consider the technical stack of this system.
Generate screen design from an image Document Agent, Lite Agent Based on the attached screen image, design the necessary frontend screens and output them according to the screen design document template format. Consider the technical stack of this system.
Generate screen design from source code Full Stack Agent, Frontend Agent Analyze the relevant source code for the xx screen and output the design information according to the screen design document template. Only output content that can be clearly read from the code.

Below is an explanation based on the case of creating a screen definition document from requirements.

Prompt 1: Execute template modification

Agent: Document Agent

💡 When using this template, instruct the Document Agent to modify it according to your language or framework as follows before use. "@Screen Design Document Template, modify for {language/framework name}" In this document, the template is modified for React and utilized.

<aside> <img src="notion://custom_emoji/be6005d7-8302-4c8e-93fe-03d0d3d71970/12f3c107-d7a8-8009-8054-007a9b09b0b8" alt="notion://custom_emoji/be6005d7-8302-4c8e-93fe-03d0d3d71970/12f3c107-d7a8-8009-8054-007a9b09b0b8" width="40px" />

@Screen Design Document Template, modify for React

</aside>

Prompt 2: Execute screen definition document creation

Agent: Document Agent

After executing the "template modification prompt," specify the created template and instruct as follows:

<aside> <img src="notion://custom_emoji/be6005d7-8302-4c8e-93fe-03d0d3d71970/12f3c107-d7a8-8009-8054-007a9b09b0b8" alt="notion://custom_emoji/be6005d7-8302-4c8e-93fe-03d0d3d71970/12f3c107-d7a8-8009-8054-007a9b09b0b8" width="40px" />

Refer to the use case document for @Member Information Update, design the necessary frontend screens, and output them according to the @Screen Design Document Template format.

</aside>

Template

> 💡Save this template as "Screen Design Document Template". Adjust for your language/framework as needed.
> Example: "Please modify @Screen Design Document Template for {language/framework name}"

## 1. Basic Information

- Screen ID:
- Screen Name:
- Function Overview: (about 400 characters)

## 2. Screen Layout

### 2.1 Screen Structure

Create the screen structure using Mermaid. Use the legend below.

```mermaid
%%{init: {'theme': 'neutral', 'themeVariables': { 'fontFamily': 'arial', 'fontSize': '16px'}}}%%
flowchart TD
    A["Screen/Page"]
    B>"Component"]
    C{"Conditional Branch"}
    D[["Form Element"]]
    E[("Data Display")]
    F(["Action/Button"])
    classDef page fill:#d0d1ff,stroke:#333,stroke-width:2px,color:#000
    classDef component fill:#ffe680,stroke:#333,stroke-width:2px,color:#000
    classDef condition fill:#c2e0c2,stroke:#333,stroke-width:2px,color:#000
    classDef form fill:#ffcce0,stroke:#333,stroke-width:2px,color:#000
    classDef data fill:#c6c6ff,stroke:#333,stroke-width:2px,color:#000
    classDef action fill:#ffb3b3,stroke:#333,stroke-width:2px,color:#000
    class A page
    class B component
    class C condition
    class D form
    class E data
    class F action
    style A text-align:center
    style B text-align:center
    style C text-align:center
    style D text-align:center
    style E text-align:center
    style F text-align:center
Type Notation Meaning
--> Solid Transition, parent-child, direct relation
-.-> Dotted Event trigger, action
--- Text --- (labeled line: explanation)
--o White O Association (weak coupling)
--\* Black O Aggregation (strong coupling)

3. Input Item Definition

3.1 Form Item List

No Item ID Item Name Input Type Digits Required Initial Value Display Condition

3.2 Input Rules & Validation

Validation List

Item Name Validation Type Rule
Required/Length/Type/Format/Range/Duplicate/Correlation

4. Button & Action Definition

4.1 Button List

Button ID Label Display Condition Usability Condition

4.2 Action Definition

Action ID Related Button Event Processing Details Linked Backend

5. Error & Message Definition

5.1 Validation Error

Code Message Display Method

5.2 System Error

Code Message Display Method

6. Screen Transition

6.1 Screen Transition


### **Output image (template change)**

```markdown
# Screen Design Document Template (for React)

> 💡 This template is for "Screen Design Document (for React)". It is tailored for React (SPA/SSR) development workflows, with headings and samples adjusted accordingly. Please adapt it as needed to your project policies and design rules.

## 1. Basic Information

- Screen ID:
- Screen Name:
- Functional Overview: Describe in about 400 characters

## 2. Screen Layout

### 2.1 Component Structure

Using the Mermaid notation below, illustrate the main React component structure, parent-child relationships, responsibilities, and dependencies. Specify file separation examples for each page/main component (e.g., `PageName.jsx`, `Header.jsx`, `FormSection.jsx`, etc.).

```mermaid
%%{init: {'theme': 'neutral', 'themeVariables': { 'fontFamily': 'arial', 'fontSize': '16px'}}}%%
flowchart TD
  Page["Page (Root Component)"]
  Header["Header"]
  Content["Content"]
  FormSection["FormSection"]
  Footer["Footer"]
  
  Page --> Header
  Page --> Content
  Content --> FormSection
  Page --> Footer

  classDef page fill:#76d7c4,stroke:#333,stroke-width:2px,color:#000
  classDef component fill:#f7ca18,stroke:#333,stroke-width:2px,color:#000

  class Page page
  class Header,Content,FormSection,Footer component

  style Page text-align:center
  style Header text-align:center
  style Content text-align:center
  style FormSection text-align:center
  style Footer text-align:center

Other Events and State Management (Context, Redux, Hook, etc.) Integration:


3. Input Item Definition

3.1 Form Item List

No Item ID Item Name Input Type Max Length Required Initial Value Display Condition Component Example

3.2 Input Rules & Validation

Item Name Validation Type Rule Example (Yup/Custom)
Required, Length, etc.

4. Button & Action Definition

4.1 Button List

Button ID Label Display Condition Enabled Condition Component Example

4.2 Action (Event) Definition

Action ID Related Button Event Main React Processing API/Integration

5. Error & Message Definition

5.1 Validation Errors

Code Message Display Location/Method

5.2 System Errors

Code Message Display Location/Method

6. Screen Transition & URL

6.1 URL Path, Transition


\[Main Changes for React Projects]


### **Output image (creation of screen design document)**

```markdown
# Screen Design Document: Member Information Update Screen (React)

## 1. Basic Information

- Screen ID: MemberProfileEdit
- Name: Member Information Update Screen
- Overview: Authenticated users can update email, password, and profile image securely. Validation・エラー/結果表示あり。

## 2. Screen Layout

### 2.1 Component Structure

```mermaid
flowchart TD
  MemberProfileEditPage["MemberProfileEditPage"]
  EmailForm["EmailUpdateForm"]
  PasswordForm["PasswordUpdateForm"]
  ProfileImageForm["ProfileImageUpdateForm"]
  SaveSection["SaveSection"]
  MessageBar["MessageBar"]
  MemberProfileEditPage --> EmailForm
  MemberProfileEditPage --> PasswordForm
  MemberProfileEditPage --> ProfileImageForm
  MemberProfileEditPage --> SaveSection
  MemberProfileEditPage --> MessageBar

3. Input Items

3.1 Form Items

ID Name Type Required Component
currentEmail Current Email label - EmailUpdateForm
newEmail New Email email Yes EmailUpdateForm
emailPassword Password (for check) password Yes\* EmailUpdateForm
oldPassword Current Password password Yes\* PasswordUpdateForm
newPassword New Password password Yes\* PasswordUpdateForm
confirmPassword New Password (again) password Yes\* PasswordUpdateForm
profileImage Profile Image file - ProfileImageUpdateForm
\*必要時のみ必須

3.2 Validation

Item Validation
New Email Format, required, unique
Passwords Required, min 8 chars, mix
Confirm Pass Must match newPassword
Profile Image .jpg/.png/.webp, ≤5MB

4. Buttons & Actions

4.1 Buttons

ID Label Shown/Enabled Component
saveBtn Save Always / No errors SaveSection
cancelBtn Cancel Always SaveSection
uploadBtn Upload Img Image selected/Valid format ProfileImageUpdateForm

4.2 Actions

Action ID Button Event Main Process API/Integration
saveProfile saveBtn onClick Validate, update server, show result /api/member/update
uploadProfileImg uploadBtn onChange Validate/upload file, update thumbnail /api/member/image
cancelEdit cancelBtn onClick Reset and go back -

5. Error & Message

5.1 Validation Errors

Code Message
email.invalid Invalid email format
email.duplicate Email already in use
password.weak Weak password
password.mismatch Passwords do not match
image.format Invalid image format
image.size Image too large

5.2 System Errors

Code Message
server.error System error occurred
network.failed Communication error
auth.sessionOut Session expired

6. Screen Transition & URL


\[Reference & Design Basis]