---
name: Smart X Development
slug: smart-x-development
category: Frontend
description: Smart X Development covers building, migrating, and troubleshooting TOTVS Smart X routines that generate PO-UI screens from the data dictionary. It includes the Model, Interface, and Launcher chain plus ADVPL integration and legacy MVC browse migration.
github: "https://github.com/thalysjuvenal/advpl-specialist/tree/main/skills/smartx-development"
language: Shell
stars: 186
forks: 37
install: "npx degit https://github.com/thalysjuvenal/advpl-specialist/tree/main/skills/smartx-development ~/.claude/skills/smartx-development"
installs_to: ~/.claude/skills/smartx-development
source_path: skills/smartx-development/SKILL.md
collection_size: 18
category_size: 670
collection_url: "https://dirskills.com/collections/thalysjuvenal/advpl-specialist"
added: 2026-09-06T05:20:30.020Z
last_synced: 2026-09-06T05:20:30.020Z
canonical_url: "https://dirskills.com/skills/smart-x-development"
---

# Smart X Development

Smart X Development covers building, migrating, and troubleshooting TOTVS Smart X routines that generate PO-UI screens from the data dictionary. It includes the Model, Interface, and Launcher chain plus ADVPL integration and legacy MVC browse migration.

**Install:**

```bash
npx degit https://github.com/thalysjuvenal/advpl-specialist/tree/main/skills/smartx-development ~/.claude/skills/smartx-development
```

## README

# Smart X

This skill covers developing TOTVS Smart X routines: the Object -> Model -> Interface -> Launcher chain that turns a data dictionary table (SX2/SX3) into an automatically-rendered PO-UI screen without hand-written Angular components. It documents the required includes and annotations for the Model (`totvs.framework.structure.model.th`) and Interface (`totvs.framework.structure.Interface.th`) TLPP classes, the Launcher function that registers the routine in the Protheus menu, integrating existing ADVPL functions into the interface via `pageActions`/`tableActions`/events, and converting only the browse (Data View) of a legacy MVC routine to Smart X while keeping ModelDef/ViewDef/MenuDef intact.

Activate this skill when the user is creating a new Smart X routine from scratch, wiring an ADVPL function call into a Smart X page/table action, converting a legacy MVC browse to a Smart X browse, or debugging a Smart X screen/model/interface issue. It does not cover classic MVC routine development without Smart X (see `advpl-code-generation`, file `patterns-mvc.md`), nor data dictionary configuration scripts for SX2/SX3 themselves (see `sx-configuration`).

The referenced files are written in Brazilian Portuguese.

| Reference file | Read when |
|---|---|
| reference.md | Always -- Smart X concept, Object/Model/Interface/Launcher architecture, includes/annotations, minimal end-to-end example |
| patterns-model.md | Writing or reviewing the Model (`model.tlpp`) class and its data/business-rule definitions |
| patterns-interface.md | Writing or reviewing the Interface (`interface.tlpp`) class and its UI contract (browse/forms) |
| patterns-launcher-browse.md | Converting only the browse (Data View) of an existing MVC routine to Smart X rendering |
| patterns-advpl-integration.md | Calling existing ADVPL functions from Smart X via `pageActions`, `tableActions`, or events like `onChange` |
| patterns-migration.md | Migrating a full legacy routine to a 100% Smart X implementation |
| troubleshooting.md | Diagnosing errors or unexpected behavior in a Smart X screen, Model, or Interface |
