AIMAgentic Intent Model

TaskManager

nemicko.demo.todo.aim · intent nemicko.demo.todo · kind intent

Step 1: Extract the userId via `Auth.GetCurrentUser`.STEP 1 · STEPExtract the userId via `…Step 2: Construct a new TodoItem with input data and the extracted userId.STEP 2 · STEPConstruct a new TodoItem…Step 3: Insert the recordSTEP 3 · STEPInsert the recordTodoItemStep 4: Publish the creation eventSTEP 4 · STEPPublish the creation eve…TodoCreated
Workflow ExecuteCreateTodo: 4 steps with decision gates and waits, generated straight from the model. Click any step to jump to its operation or event.
9 facets and 10 edges, drawn from what the file declares. Each box leads to its lines. a declared edge and its verbrefs or holds, from a Schemain another intent✓ a requirement it satisfies
CompleteTodoPending (initial)PendingCompleted (final)Completed
State TodoStatus: how its value may move, and the operation behind each move. A dot marks the initial state, a double line a final one.
---aim: nemicko.demo.todokind: intent---# TaskManager## SummaryA complete personal task management system supporting creation, completion, and deletion of daily todos.## Requirements- Users can create new tasks with a title and optional description.- Users can mark active tasks as completed.- Users can delete tasks to remove them permanently.- Tasks must securely belong only to the authenticated user.## Tests- A user cannot view or complete a task owned by a different user.- Completing an already completed task returns safely without error.## Record: TodoItem### SummaryThe core data entity representing a single user task.### Schema```schemaid: string generated uniqueownerId: string requiredtitle: string required max(100)description: string optionalstatus: enum(PENDING, COMPLETED) required default(PENDING)createdAt: timestamp generated```## Contract: CreateTodo### SummaryCreates a new pending task for the active user.### Input```schematitle: string requireddescription: string optional```### Authz- User must be actively authenticated.### Expects- Title must not be empty or purely whitespace.### Ensures- Orchestration is delegated to the creation flow — [invokes](aim:#Flow:ExecuteCreateTodo).- Persists a new TodoItem with `status="PENDING"` and `ownerId=currentUser.id` — [mutates](aim:#Record:TodoItem).- Emits the creation event — [emits](aim:#Event:TodoCreated).### Returns- The created TodoItem.## Contract: CompleteTodo### SummarySafely marks an active task as complete.### Input```schematodoId: string required```### Authz- User must be authenticated.- User must be the `ownerId` of the TodoItem.### Expects- The TodoItem record must exist.- `TodoItem.status` must currently be `PENDING`.### Ensures- Updates `TodoItem.status` to `COMPLETED` — [mutates](aim:#Record:TodoItem).### Returns- The updated TodoItem.## Flow: ExecuteCreateTodo### SummaryOrchestrates database insertion and event publishing for new tasks.### Steps1. Extract the userId via `Auth.GetCurrentUser`.2. Construct a new TodoItem with input data and the extracted userId.3. Insert the record — [mutates](aim:#Record:TodoItem).4. Publish the creation event — [emits](aim:#Event:TodoCreated).### On Error- Log a warning via `Logger.Warn("Failed to create task")`.- Rethrow the error to surface to the UI.## Persona: StandardUserA regular individual managing their personal task list.### Role- `user:standard`### Access- [accesses](aim:#View:TodoDashboard)## View: TodoDashboard### SummaryThe main interface for viewing and interacting with the task list.### Display- A list of [reads](aim:#Record:TodoItem) records where `ownerId = currentUser.id`.- Visual distinction between PENDING and COMPLETED tasks.- Empty state message if no tasks exist.### Actions- Submitting the "New Task" form — [exposes](aim:#Contract:CreateTodo)- Tapping the checkbox on a PENDING task — [exposes](aim:#Contract:CompleteTodo)### Layout- The "New Task" form sits above the list.- Completed tasks below the pending ones.## Style: Plain### SummaryQuiet and legible: a white sheet, dark text, one blue for the action — nothing decorative.### Palette- surface: white- ink: near-black `#1f1f1f`- accent: one clear blue for the primary action### Type- body: the platform's own sans, comfortable size### Shape- corners: slightly rounded- elevation: flat## State: TodoStatus### SummaryA todo is pending until its owner completes it; a completed todo stays completed.### Of- `Record:TodoItem.status`### States- Pending — initial- Completed — final### Moves- Pending → Completed — [Contract:CompleteTodo]## Event: TodoCreated### SummaryEmitted when a new todo is persisted.### Payload```schematodoId: string requiredownerId: string requiredcreatedAt: timestamp required```### Routing- Channel: `todos.created`