Workflows
Import from code
Import is for a project that already has its code. An agent describes it, as it is, through Proposals for the Model and its evident Requirements. It does not judge or correct the code: what the documentation contradicts, or what the code seems to get wrong, is recorded as a doubt for you to read.
Choose Import from Code
In the Path step of the setup wizard, choose Import from Code and press Next; in a project whose Model is empty, the Import from Code button of the Diagram does the same (see Put Trama in a project).
- Import from Code chosen
- Next is now enabled
Leave out what the agent should not read
The Folders step lists the folders of the project. Uncheck the ones the agent should not import, such as vendored code or build output.
- Uncheck a folder to skip it
- Next
Confirm and start
The Summary shows Import from Code in the Path card. Press Set up Trama: the agent starts reading the code with the Analysis model.
- Edit goes back
- Set up Trama
- Creates .trama
Follow the import
An Import conversation opens in omp Chat, and the status bar shows Importing from code while the agent works.
- Import conversation
- Importing from code
Review the Proposals
The import arrives as several Proposals, one after the other. The first, Import: System and Actors, describes the System and its Actors and writes the Specs from what the repository declares; then one Proposal for each Feature, with its Machines and States and the Requirements that are evident from the code.
- The Proposal from the agent
- Cards to decide
Read each Proposal as any other (see Review, approve or reject a Proposal) and open its ## Doubts. Approve those that are right, and Rework with feedback… those that miss the point. Approving an import Proposal changes the Model files only; the code is not touched.
After the import
The Diagram now draws the System. Design the next change from the Board: Design a change. A scan compares the new Model with the code whenever you want to know where they differ.