Skip to main content
Prompt: “Create a simple to-do app”
Output:
{
    "domainModel": {
        "models": [
            {
                "id": "urn:sutro:model:user",
                "name": "User",
                "isUserModel": true,
                "fields": [
                    {
                        "id": "urn:sutro:edge:name",
                        "name": "name",
                        "to": "p_TEXT",
                        "relationshipType": "hasOne"
                    },
                    {
                        "id": "urn:sutro:edge:email",
                        "name": "email",
                        "to": "p_TEXT",
                        "relationshipType": "hasOne"
                    },
                    {
                        "id": "urn:sutro:edge:todos",
                        "name": "todos",
                        "to": "urn:sutro:model:todo",
                        "relationshipType": "hasMany"
                    }
                ],
                "requirements": [
                    {
                        "id": "@requirement/userProfileInspection",
                        "type": "usability",
                        "parentId": null,
                        "description": "User can view their profile and account information via the inspect action",
                        "importanceForUser": "optional",
                        "importanceForBusiness": "optional",
                        "frequencyOfUse": "rarely"
                    },
                    {
                        "id": "@requirement/userDataPersistence",
                        "type": "usability",
                        "parentId": "@requirement/dataPeristence",
                        "description": "User profile data must be persisted and available when user returns to the app",
                        "importanceForUser": "critical",
                        "importanceForBusiness": "required",
                        "frequencyOfUse": "always"
                    }
                ],
                "navigateToOnCreate": "/",
                "navigateToOnDelete": "/"
            },
            {
                "id": "urn:sutro:model:todo",
                "name": "Todo",
                "isUserModel": false,
                "fields": [
                    {
                        "id": "urn:sutro:edge:title",
                        "name": "title",
                        "to": "p_TEXT",
                        "relationshipType": "hasOne"
                    },
                    {
                        "id": "urn:sutro:edge:description",
                        "name": "description",
                        "to": "p_TEXT",
                        "relationshipType": "hasOne"
                    },
                    {
                        "id": "urn:sutro:edge:status",
                        "name": "status",
                        "to": "p_TEXT",
                        "relationshipType": "hasOne"
                    },
                    {
                        "id": "urn:sutro:edge:completedAt",
                        "name": "completedAt",
                        "to": "p_DATE_TIME",
                        "relationshipType": "hasOne"
                    },
                    {
                        "id": "urn:sutro:edge:modifiedAt",
                        "name": "modifiedAt",
                        "to": "p_DATE_TIME",
                        "relationshipType": "hasOne"
                    },
                    {
                        "id": "urn:sutro:edge:createdAt",
                        "name": "createdAt",
                        "to": "p_DATE_TIME",
                        "relationshipType": "hasOne"
                    },
                    {
                        "id": "urn:sutro:edge:owner",
                        "name": "owner",
                        "to": "urn:sutro:model:user",
                        "relationshipType": "belongsToOne"
                    }
                ],
                "requirements": [
                    {
                        "id": "@requirement/todoInspection",
                        "type": "usability",
                        "parentId": null,
                        "description": "User can view the details of a todo item including title, description, and status",
                        "importanceForUser": "vital",
                        "importanceForBusiness": "vital",
                        "frequencyOfUse": "often"
                    },
                    {
                        "id": "@requirement/todoCompletion",
                        "type": "usability",
                        "parentId": null,
                        "description": "User can mark a todo as completed, recording the completion timestamp",
                        "importanceForUser": "critical",
                        "importanceForBusiness": "required",
                        "frequencyOfUse": "often"
                    },
                    {
                        "id": "@requirement/todoReopening",
                        "type": "usability",
                        "parentId": null,
                        "description": "User can reopen a completed todo to mark it as incomplete again",
                        "importanceForUser": "required",
                        "importanceForBusiness": "required",
                        "frequencyOfUse": "occasionally"
                    },
                    {
                        "id": "@requirement/todoContentUpdate",
                        "type": "usability",
                        "parentId": null,
                        "description": "User can modify the title and description of a todo, with modification timestamp recorded",
                        "importanceForUser": "vital",
                        "importanceForBusiness": "vital",
                        "frequencyOfUse": "often"
                    },
                    {
                        "id": "@requirement/todoDeletion",
                        "type": "usability",
                        "parentId": null,
                        "description": "User can permanently delete a todo from their list",
                        "importanceForUser": "vital",
                        "importanceForBusiness": "vital",
                        "frequencyOfUse": "often"
                    },
                    {
                        "id": "@requirement/todoOwnership",
                        "type": "usability",
                        "parentId": null,
                        "description": "Each todo maintains a reference to its owner user for scoping and access control",
                        "importanceForUser": "critical",
                        "importanceForBusiness": "required",
                        "frequencyOfUse": "always"
                    },
                    {
                        "id": "@requirement/todoDataPersistence",
                        "type": "usability",
                        "parentId": "@requirement/dataPeristence",
                        "description": "Todo items must be persisted and available when user returns to the app",
                        "importanceForUser": "critical",
                        "importanceForBusiness": "required",
                        "frequencyOfUse": "always"
                    },
                    {
                        "id": "@requirement/displayTodoList",
                        "type": "userJourneyStep",
                        "parentId": "@userJourney/viewTodos",
                        "description": "User opens the app and the TodoList aggregate is retrieved to display all todos",
                        "importanceForUser": "critical",
                        "importanceForBusiness": "required",
                        "frequencyOfUse": "always"
                    },
                    {
                        "id": "@requirement/renderTodos",
                        "type": "userJourneyStep",
                        "parentId": "@userJourney/viewTodos",
                        "description": "TodoList.viewAll is called to retrieve all todos and display them in the UI",
                        "importanceForUser": "critical",
                        "importanceForBusiness": "required",
                        "frequencyOfUse": "always"
                    },
                    {
                        "id": "@requirement/saveTodo",
                        "type": "userJourneyStep",
                        "parentId": "@userJourney/createTodo",
                        "description": "TodoList.addTodo is called with the title and description, creating a new Todo in the list",
                        "importanceForUser": "critical",
                        "importanceForBusiness": "required",
                        "frequencyOfUse": "often"
                    },
                    {
                        "id": "@requirement/markComplete",
                        "type": "userJourneyStep",
                        "parentId": "@userJourney/completeTodo",
                        "description": "Todo.complete is called to update the todo status to completed",
                        "importanceForUser": "critical",
                        "importanceForBusiness": "required",
                        "frequencyOfUse": "often"
                    },
                    {
                        "id": "@requirement/saveTodoChanges",
                        "type": "userJourneyStep",
                        "parentId": "@userJourney/editTodo",
                        "description": "Todo.updateContent is called with the new title and description to persist changes",
                        "importanceForUser": "vital",
                        "importanceForBusiness": "vital",
                        "frequencyOfUse": "often"
                    },
                    {
                        "id": "@requirement/removeTodo",
                        "type": "userJourneyStep",
                        "parentId": "@userJourney/deleteTodo",
                        "description": "Todo.remove is called to permanently delete the todo from the list",
                        "importanceForUser": "vital",
                        "importanceForBusiness": "vital",
                        "frequencyOfUse": "often"
                    }
                ],
                "navigateToOnCreate": "/",
                "navigateToOnDelete": "/"
            }
        ]
    },
    "sitemap": {
        "nodes": [
            {
                "id": "dashboard",
                "type": "Page",
                "route": "/",
                "context": null,
                "content": [
                    {
                        "title": "TodoList",
                        "description": "A list of all todos owned by the current user, showing title, status, and allowing quick actions to complete/reopen todos"
                    },
                    {
                        "title": "Quick Add",
                        "description": "A form to quickly add a new todo with title and description"
                    }
                ],
                "referencesRequirements": [
                    "@requirement/displayTodoList",
                    "@requirement/renderTodos",
                    "@requirement/dataPeristence",
                    "@requirement/responsiveUI",
                    "@requirement/fastPerformance",
                    "@requirement/todoDataPersistence",
                    "@requirement/userDataPersistence"
                ]
            },
            {
                "id": "viewTodoDetails",
                "type": "Page",
                "route": "/todos/:todoId",
                "context": {
                    "todoId": "urn:sutro:model:todo"
                },
                "content": [
                    {
                        "title": "TodoDetail",
                        "description": "Displays the full details of a single todo including title, description, status, and timestamps"
                    },
                    {
                        "title": "TodoActions",
                        "description": "Action buttons to complete/reopen the todo, edit it, or delete it"
                    }
                ],
                "referencesRequirements": [
                    "@requirement/todoInspection",
                    "@requirement/todoCompletion",
                    "@requirement/todoReopening",
                    "@requirement/todoContentUpdate",
                    "@requirement/todoDeletion",
                    "@requirement/findTodoToComplete",
                    "@requirement/markComplete",
                    "@requirement/displayUpdatedStatus",
                    "@requirement/findTodoToEdit",
                    "@requirement/inspectTodo",
                    "@requirement/findTodoToDelete",
                    "@requirement/confirmDelete",
                    "@requirement/removeTodo"
                ]
            },
            {
                "id": "editTodo",
                "type": "FormView",
                "route": "/todos/:todoId/edit",
                "context": {
                    "todoId": "urn:sutro:model:todo"
                },
                "content": [
                    {
                        "title": "TodoEditForm",
                        "description": "A form to modify the title and description of an existing todo with save and cancel options"
                    }
                ],
                "referencesRequirements": [
                    "@requirement/modifyTodoContent",
                    "@requirement/saveTodoChanges",
                    "@requirement/todoContentUpdate"
                ]
            },
            {
                "id": "createTodo",
                "type": "FormView",
                "route": "/todos/create",
                "context": null,
                "content": [
                    {
                        "title": "TodoCreateForm",
                        "description": "A form to create a new todo with title and description fields, and submit button"
                    }
                ],
                "referencesRequirements": [
                    "@requirement/openAddTodoForm",
                    "@requirement/enterTodoContent",
                    "@requirement/saveTodo"
                ]
            },
            {
                "id": "userProfile",
                "type": "Page",
                "route": "/profile",
                "context": null,
                "content": [
                    {
                        "title": "ProfileInfo",
                        "description": "Displays the current user's profile information including name and email"
                    }
                ],
                "referencesRequirements": [
                    "@requirement/userProfileInspection"
                ]
            }
        ],
        "edges": [
            {
                "from": "dashboard",
                "to": "viewTodoDetails",
                "type": "Navigate",
                "context": {
                    "todoId": null
                },
                "outputContext": null
            },
            {
                "from": "dashboard",
                "to": "createTodo",
                "type": "Navigate",
                "context": null,
                "outputContext": null
            },
            {
                "from": "dashboard",
                "to": "userProfile",
                "type": "Navigate",
                "context": null,
                "outputContext": null
            },
            {
                "from": "createTodo",
                "to": "dashboard",
                "type": "Create",
                "context": null,
                "outputContext": null
            },
            {
                "from": "viewTodoDetails",
                "to": "editTodo",
                "type": "Navigate",
                "context": {
                    "todoId": null
                },
                "outputContext": null
            },
            {
                "from": "editTodo",
                "to": "viewTodoDetails",
                "type": "Edit",
                "context": {
                    "todoId": null
                },
                "outputContext": null
            },
            {
                "from": "viewTodoDetails",
                "to": "dashboard",
                "type": "Delete",
                "context": {
                    "todoId": null
                },
                "outputContext": null
            },
            {
                "from": "userProfile",
                "to": "dashboard",
                "type": "Navigate",
                "context": null,
                "outputContext": null
            }
        ]
    }
}