INEMA.CLUBPROOSWork v6.2

OSWork v6.2 · 8 modules · lessons of about 15 minutes

Your AI needs a system

From chat to your agents environment, one short lesson at a time. You organize files, teach procedures to the AI, and build routines you can check. Each lesson ends with the complete material on the topic for people who want to go deeper.

A coordinator and a teacher share a tidy workstation, with a notebook, folders, and tools, like in a workshop.

Module 1 · Models: choose by task

Compare models with a real task and a quality criterion.

Module 2 · Chat, Work, and Desktop

Write a work order with inputs, output, and review.

Module 3 · Terminal and Codex in practice

Open a training project in Codex and produce a verifiable change.

Module 4 · Folders, Markdown, and secrets

Build the digital house and separate knowledge from credentials.

Module 5 · AGENTS, Skills, and memory

Create project instructions and a reusable capability with a review criterion.

Module 6 · Git and GitHub without losing work

Save a version, inspect differences and recover a training change.

Module 7 · Telegram as a work interface

Run a restricted query bot and understand where AI comes in.

Module 8 · VPS from scratch and 24/7 operation

Prepare a deployment plan, monitoring, backup and service verification.

Glossary · 88 terms

OSWork v6.2

Glossary

The course’s technical terms in simple words. Each term links to the lessons where it appears.

agent

AI that runs multiple steps on its own, like reading files, creating and comparing, instead of just responding to a message.

Shown in: Lesson 5 Lesson 6 Lesson 8 Lesson 9 Lesson 11 Lesson 12 Lesson 16 Lesson 17 Lesson 18 Lesson 20 Lesson 24 Lesson 25 Lesson 26 Lesson 27 Lesson 28 Lesson 29 Lesson 30 Lesson 31 Lesson 32 Lesson 37 Lesson 41 Lesson 42 Lesson 48

AGENTS.md

Markdown file with the instructions that the agent reads before working in a folder: rules, limits, and how to verify.

Shown in: Lesson 16 Lesson 17 Lesson 18 Lesson 19 Lesson 24 Lesson 25 Lesson 26 Lesson 27 Lesson 29 Lesson 30

AGENTS.override.md

AGENTS.override.md file: when it’s in the same folder as an AGENTS.md, the Codex reads the override and ignores the AGENTS.md from that folder.

Appears in: Lesson 26

API

Entry point for a program to use an AI service without going through the chat screen. API usage is charged based on consumption.

Appears in: Lesson 5 Lesson 6 Lesson 15 Lesson 37 Lesson 41 Lesson 42 Lesson 43

apt

Ubuntu’s program installer, used in the terminal.

Appears in: Lesson 45 Lesson 48

tracked file

A file that Git already includes, because it was added from some saved version. .gitignore doesn’t apply to it.

Appears in: Lesson 23

autotest

A test that the kit’s own bot runs without Telegram and without internet, with fake messages, to check your rules.

Appears in: Lesson 42

backup

A security copy of files, stored somewhere else so you can recover if something gets lost.

Appears in: Lesson 31 Lesson 36 Lesson 48

Bash

Terminal command language on Linux and macOS. The commands in this course are written for it.

Appears in: Lesson 13 Lesson 16 Lesson 18 Lesson 19 Lesson 24 Lesson 31

bot

A program that talks through a messaging app and responds on its own, following the rules you set.

Appears in: Lesson 36 Lesson 37 Lesson 38 Lesson 39 Lesson 40 Lesson 41 Lesson 42 Lesson 43 Lesson 45 Lesson 46 Lesson 47 Lesson 48

BotFather

The official Telegram account that creates bots and generates each one’s token.

Appears in: Lesson 38 Lesson 42

branch

A parallel line of work in Git, where you test changes without touching the main version.

Appears in: Lesson 34 Lesson 36

paths

An address for a folder or file, with the names separated by slashes, like ~/projetos/config.

Appears in: Lesson 5 Lesson 9 Lesson 14 Lesson 19 Lesson 24 Lesson 26 Lesson 37 Lesson 42 Lesson 47 Lesson 48

API key

A long password that identifies who uses the API and which account it belongs to. Never put it in a request, in a shared file, or in a screenshot.

Appears in: Lesson 5 Lesson 15 Lesson 22 Lesson 23

public key

The public half of an SSH key pair. It’s registered on the VPS; the other half, the private key, stays only on your computer and is never pasted anywhere.

Appears in: Lesson 44 Lesson 48

chmod

A command that defines who can read or change a file.

Shows up in: Lesson 22 Lesson 38 Lesson 42 Lesson 46

clone

A copy of a GitHub repository onto your computer, with all its history.

Appears in: Lesson 34 Lesson 36

Codex

An OpenAI programming agent that works inside a folder on your computer, using the terminal. The course installs it in module 3.

Shows up in: Lesson 3 Lesson 5 Lesson 12 Lesson 13 Lesson 14 Lesson 15 Lesson 16 Lesson 17 Lesson 18 Lesson 19 Lesson 25 Lesson 26 Lesson 27 Lesson 28 Lesson 29 Lesson 30 Lesson 41 Lesson 45 Lesson 48

commit

Saved version in Git, with a message that explains the change. You can go back to it later.

Shows up in: Lesson 23 Lesson 31 Lesson 32 Lesson 33 Lesson 34 Lesson 35 Lesson 36

recovery console

Terminal of the VPS opened by the provider’s panel, in the browser, without SSH. It’s the way back when SSH fails.

Appears in: Lesson 44 Lesson 48

context

The material the AI receives to do a task: the files, the instructions, and the information you point it to.

Shows up in: Lesson 9 Lesson 11 Lesson 19 Lesson 24 Lesson 30 Lesson 34

delivery contract

The full order, with six parts: goal, inputs, result, limits, verification, and stop.

Shows up in: Lesson 10 Lesson 11 Lesson 12

integration contract

Five lines you write before connecting an AI to a bot: sent data, model, cost limit, max time, and what to do if the AI fails.

Shows up in: Lesson 41

CSV

A plain-text spreadsheet, with values separated by commas. Opens in Excel or Google Sheets.

Shows up in: Lesson 21 Lesson 25 Lesson 26 Lesson 27 Lesson 29 Lesson 30 Lesson 37 Lesson 40 Lesson 42 Lesson 48

Desktop

ChatGPT app on your computer, which works closer to your files and can read the folders you allow.

Shows up in: Lesson 6 Lesson 7 Lesson 9 Lesson 10

diff

Comparison that shows, line by line, what changed in a file.

Shows up in: Lesson 18 Lesson 32 Lesson 35 Lesson 36 Lesson 48

directory

Another name for folder, used in the terminal.

Shows up in: Lesson 18 Lesson 26 Lesson 30 Lesson 41 Lesson 47 Lesson 48

order

Work request that states what must exist at the end: goal, inputs, output, limits, and stopping point.

Appears in: Lesson 7 Lesson 8 Lesson 11 Lesson 12

.env

File that stores keys and passwords outside the code. Never goes to Git, to a request, or into a screenshot.

Appears in: Lesson 15 Lesson 22 Lesson 23 Lesson 24 Lesson 33 Lesson 36 Lesson 38 Lesson 39 Lesson 40 Lesson 42 Lesson 46 Lesson 47 Lesson 48

.env.example

A copy of the .env with the same variable names and fictional values. It shows what you need to fill in without giving access to anything, so you can share it.

Appears in: Lesson 22 Lesson 23 Lesson 24 Lesson 38 Lesson 42

local execution

Work that runs on your own computer. It depends on it being turned on, with a network connection, and with the right permissions.

Appears in: Lesson 10

project sheet

A short document where you write down how an AI task works: tools, access, decisions, and pending items. It can be a note on your phone. In module 4, it becomes a file in the project folder.

Appears in: Lesson 5 Lesson 10 Lesson 14 Lesson 15

firewall

Filter that decides which network connections can enter the machine or leave it.

Appears in: Lesson 44 Lesson 46 Lesson 48

Git

Program that keeps the history of the versions of a project folder: what changed, when, and why.

Appears in: Lesson 18 Lesson 23 Lesson 30 Lesson 31 Lesson 32 Lesson 33 Lesson 34 Lesson 35 Lesson 36 Lesson 45 Lesson 46 Lesson 48

GitHub

Website where you store a copy of your Git repository on the internet, so you can work from another computer or with other people.

Appears in: Lesson 31 Lesson 33 Lesson 34 Lesson 35 Lesson 36

.gitignore

File that lists what Git should not store, like passwords and temporary files.

Appears in: Lesson 22 Lesson 23 Lesson 24 Lesson 33 Lesson 36 Lesson 46

HEAD

In Git, the version you’re on right now.

Appears in: Lesson 35

numeric ID

A fixed number that Telegram assigns to each account. It doesn’t change when the person changes the displayed name.

Appears in: Lesson 39 Lesson 40 Lesson 42

fingerprint

Short sequence that identifies the VPS. On the first connection over SSH, you check whether it matches the one the VPS provider tells you.

Appears in: Lesson 44 Lesson 48

installation

To put a program on your computer so it can be used. Module 3 does the first installation from the official source.

Appears in: Lesson 6 Lesson 9 Lesson 12 Lesson 14 Lesson 17 Lesson 18 Lesson 24 Lesson 30 Lesson 31 Lesson 36 Lesson 38 Lesson 39 Lesson 42 Lesson 45 Lesson 48

interface

The screen where you give the objective to the AI, like the chat window. The course shows other interfaces throughout the modules.

Appears in: Lesson 1 Lesson 6 Lesson 7 Lesson 10 Lesson 12 Lesson 37

Jev

Example of a classification model mentioned in the course. It doesn’t chat: it receives a text and closed answer options and returns a choice—yes or no—or a score.

Appears in: Lesson 2

journalctl

Command that shows the systemd service logs.

Appears in: Lesson 47 Lesson 48

Kie

A hub that gives access to image and video models from several providers, with its own credit.

Appears in: Lesson 2 Lesson 5 Lesson 6

access list

List of the numeric IDs that the bot serves. In the kit, it's on the ALLOWED_USER_IDS line of the .env.

Appears in: Lesson 39 Lesson 40 Lesson 42

LLMs

Language model: a program trained with a lot of text that produces text based on what you provide. It’s the kind of AI behind chats.

Appears in: Lesson 1 Lesson 2

log

Record of what a program did, line by line, with date and time. This is where you look for the cause of an error.

Appears in: Lesson 33 Lesson 36 Lesson 40 Lesson 42 Lesson 46 Lesson 47 Lesson 48

sign in

Sign in to a tool with your account, like your ChatGPT account. The rights and limits come from that account’s plan.

Appears in: Lesson 5 Lesson 14 Lesson 15 Lesson 18 Lesson 44

long polling

How the bot asks Telegram, from time to time, whether a new message arrived. It doesn't require a server with a public address.

Appears in: Lesson 40 Lesson 46

Markdown

A way to write plain text with light markup, like # for a title and - for a list. Files end in .md.

Appears in: Lesson 16 Lesson 20 Lesson 24 Lesson 25 Lesson 27 Lesson 29 Lesson 30

operational memory

Reference files with stable facts, decisions, and causes of failures, which the agent reads when you indicate. It doesn't change the model; someone needs to keep them up to date.

Appears in: Lesson 28

nano

Text editor that opens inside the terminal. Ctrl+O saves the file and Ctrl+X exits.

Appears in: Lesson 20 Lesson 21 Lesson 24 Lesson 38

cloud

Computers in a company, accessed through the internet, that run the work and store files outside your machine.

Appears in: Lesson 10

OpenRouter

A hub that gives access to language models from multiple companies through a single point, with its own credit.

Appears in: Lesson 2 Lesson 5 Lesson 6

origin

Name that Git gives, by default, to the address on GitHub where the folder came from and to where it sends.

Appears in: Lesson 34 Lesson 36

training folder

A folder with only fictional files or copies, created to test the AI without any risk to the real material.

Appears in: Lesson 6 Lesson 9 Lesson 12 Lesson 18 Lesson 24 Lesson 30 Lesson 31 Lesson 36 Lesson 42 Lesson 48

personal folder

Your main folder on your computer, where Documents, Downloads, and the rest are stored. In the terminal, it shows up as ~ (til).

Shows up in: Lesson 16 Lesson 19 Lesson 24 Lesson 31

port

A number that identifies a service inside the machine. SSH usually uses port 22, but your VPS may use a different one.

Shows up in: Lesson 2 Lesson 13 Lesson 37 Lesson 40 Lesson 44 Lesson 46 Lesson 48

providers

A company that offers an AI model. A hub gathers models from multiple providers in one place.

Shows up in: Lesson 2 Lesson 43 Lesson 44 Lesson 46

pull

Git command that brings the new changes from GitHub to your computer.

Appears in: Lesson 34 Lesson 36

push

Git command that sends your commits to GitHub.

Shows up in: Lesson 36

Python

Programming language. The course kit bot is written in it.

Shows up in: Lesson 39 Lesson 45

README

A text file in the project folder that explains what it’s for, what’s inside, and how to check the result.

Shows up in: Lesson 6 Lesson 12 Lesson 16 Lesson 17 Lesson 18 Lesson 19 Lesson 20 Lesson 22 Lesson 23 Lesson 24 Lesson 25 Lesson 26 Lesson 30 Lesson 32 Lesson 33 Lesson 34 Lesson 35 Lesson 36 Lesson 38 Lesson 42 Lesson 48

quality bar

A short list of criteria, written before the request, that tells you what the response must include to be accepted.

Shows up in: Lesson 4 Lesson 11

repository

A project folder accompanied by Git, with the full version history.

Shows up in: Lesson 22 Lesson 27 Lesson 31 Lesson 33 Lesson 34 Lesson 36 Lesson 47

restore

Git command that discards changes that haven’t been saved yet in a file, bringing it back to what it was in the last version. What gets discarded won’t come back.

Shows up in: Lesson 35 Lesson 36

revert

Git command that creates a new commit undoing a previous commit, without deleting anything from the history.

Shows up in: Lesson 35 Lesson 36

script

File with a sequence of commands that your computer executes all at once.

Shows up in: Lesson 14 Lesson 26

server

A computer that stays on, providing a service to others, such as responding to messages from a bot.

Shows up in: Lesson 37 Lesson 40 Lesson 43 Lesson 44 Lesson 48

Shell

A program that interprets the commands you type in the terminal.

Appears in: Lesson 13 Lesson 18 Lesson 39 Lesson 42

Skill

A packaged procedure that the agent can reuse: instructions, steps, and how to verify, saved in a folder.

Appears in: Lesson 26 Lesson 27 Lesson 29 Lesson 30 Lesson 48

SSH

A secure way to open the terminal of another computer over the internet.

Appears in: Lesson 44 Lesson 46 Lesson 47 Lesson 48

staging

The Git area where the chosen changes are kept to go into the next commit.

Appears in: Lesson 32 Lesson 36

sudo

A command that runs the next instruction with administrator permission. It asks for your password.

Appears in: Lesson 44 Lesson 45 Lesson 46 Lesson 47 Lesson 48

systemctl

A systemd command to start, stop, and view the status of a service.

Appears in: Lesson 47 Lesson 48

systemd

Part of Linux that starts, monitors, and restarts programs by itself, including after you reboot the machine.

Appears in: Lesson 47 Lesson 48

Telegram

A messaging app. In the course, it becomes the conversation screen with your own bot in module 7.

Appears in: Lesson 6 Lesson 12 Lesson 18 Lesson 24 Lesson 30 Lesson 36 Lesson 37 Lesson 38 Lesson 39 Lesson 40 Lesson 41 Lesson 42 Lesson 43 Lesson 46 Lesson 47 Lesson 48

bot token

Password that Telegram generates for your bot. Anyone with the token controls the bot; that’s why it’s stored in the .env.

Appears in: Lesson 22 Lesson 36 Lesson 38 Lesson 39 Lesson 40 Lesson 42 Lesson 46 Lesson 48

tokens

A piece of text, like a short word or part of a word, that the model reads and writes. Usage and billing are usually measured in tokens.

Appears in: Lesson 3 Lesson 5 Lesson 6 Lesson 12 Lesson 18 Lesson 22 Lesson 24 Lesson 30

Ubuntu

Popular Linux version, common on servers.

Appears in: Lesson 13 Lesson 14 Lesson 43 Lesson 45 Lesson 46 Lesson 48

ufw

Ubuntu command to set up the firewall in a simple way.

Appears in: Lesson 46

unit

File that tells systemd which program to start, which user, and in which folder.

Appears in: Lesson 47 Lesson 48

variable

A name with a value stored, written as NOME=value. The program looks up the value by the name.

Appears in: Lesson 15 Lesson 22 Lesson 24 Lesson 38 Lesson 42

VPS

A computer rented from a provider, connected all the time and under your responsibility. Module 8 teaches you how to use it.

Appears in: Lesson 6 Lesson 10 Lesson 12 Lesson 18 Lesson 24 Lesson 30 Lesson 36 Lesson 40 Lesson 42 Lesson 43 Lesson 44 Lesson 45 Lesson 46 Lesson 47 Lesson 48

webhook

How Telegram notifies your server immediately when a message arrives. It requires a public address on the internet.

Appears in: Lesson 40

Work

A mode in ChatGPT where you give it a bigger task and get the finished result later, without following each response.

Appears in: Lesson 3 Lesson 6 Lesson 7 Lesson 8 Lesson 10 Lesson 12

WSL

Linux that runs inside Windows, official from Microsoft. In it, the course commands work like on Linux.

Appears in: Lesson 13 Lesson 14 Lesson 31 Lesson 38 Lesson 45 Lesson 46 Lesson 47 Lesson 48

Module 1 · Lesson 1 of 6

The model is a piece, not the system

A pedagogical coordinator at a meeting table draws seven boxes on a sheet, with the agenda and the previous minutes printed next to the notebook.

You can draw the seven pieces of your AI system and point out which one is missing to complete a real task this week.

When the answer comes out bad, the common reaction is to switch tools or write a bigger request. Often the problem is in another piece: the file was missing, there was a permission issue, or the way to check was wrong. This lesson shows where to look.

In 1 minute

  1. A model produces text based on what you give it.
  2. There is no best model: there is the one that fits the task.
  3. The result depends on seven pieces, and the failure is usually in one of them.

1The model works with what it receives

When this course talks about AI, it means language models, the LLMs. A model is a mechanism trained to produce text based on what you give it.

It doesn’t see your school, your team, or last week’s meeting. Whatever is missing from the request, it fills in with the most common way to respond.

Denise, the educational coordinator, asked for a plan for a parents meeting. Without the agenda, the AI imagined priorities. With the agenda and the previous minutes pasted in, it returned a proposal she was able to review.

AI chat

YouMake a plan for the 8th grade parents meeting.

AIPlan suggestion: 1. Welcome. 2. Presentation of the educational project. 3. Test calendar…

Invented priorities. None of that was on the school’s agenda.

YouMake a plan for the 8th grade parents meeting, using only the agenda and the minutes below. Mark what was left pending from the previous meeting. [pasted agenda] [pasted previous minutes]

AIPlan based on the agenda sent: 1. [agenda item 1] 2. [agenda item 2] Pending from the previous minutes: [issue recorded in the minutes]

Same AI. Now each item points to a role Denise has in hand.

Tap the two buttons and compare what the AI received in each case.

2There is no best model

There are several models, with different names, sizes, and costs. The question "which one is best?" doesn’t have a useful answer.

The helpful question is different: which model solves this task, within this timeframe, at this cost, and with how much you’ll need to check? That’s why the module compares models with a real task, not an opinion.

Lúcia, a science teacher, stopped looking for "the best AI". Now she asks which tool corrects the 8th grade exercise list within the time she has.

Question that stalls

"What is the best AI?"

Each person answers something. No answer applies to your task.

Question that decides

"Which model summarizes this meeting minutes in ten lines today, and lets me check the three responsible people?"

You can test and compare.

3Seven pieces make the system

A model produces responses. A system organizes how those responses become work. OSWork combines seven pieces: model, interface, files, instructions, tools, memory, and automations.

The name OSWork is a metaphor for organization. You won’t replace your computer’s system.

Denise drew the seven boxes for the task "parents meeting minutes." There was a template and an interface. The missing files were the issue: the agenda was in someone else’s email.

Denise’s desk · meeting minutes
1 Template — the school’s chat ✓
2 Interface — the chat window ✓
3 Files — agenda and previous minutes ✗ missing
4 Instructions — fixed rules the AI follows (module 5) · ?
5 Tools — what the AI can execute, like saving a file (module 3) · ?
6 Memory — what’s kept between conversations (module 5) · ?
7 Automations — tasks that run without you opening the chat (modules 7 and 8) · ?
  1. 1The model reasons about what it receives.
  2. 2The interface receives the objective.
  3. 3The files provide evidence. Without them, the AI imagines.
  4. 4Pieces 4 through 7 each gain a module. For now, a "?" is enough.
Want a day-to-day comparison?

Think of a small workshop. The professional’s skill matters, but tools, materials, and quality criteria also decide the result.

Test yourself

On the school computer, the meeting plan worked out. On your phone, with the same chat, the AI invented two items. You’d pasted only half of the agenda. Which piece failed?

4Correct the right piece

Separating the pieces prevents the reflex to write a request that keeps getting bigger. First you ask where the failure was born. Then you fix only there.

And a piece never leaves the system: you. The model reasons, the tools execute, and you are the one who checks.

Lúcia’s AI said it saved the notes, but the file didn’t appear. A tool with permission to save was missing. Writing the request again wouldn’t solve it.

Symptom → missing piece
1 Invented priorities → files: the agenda and the minutes
2 Said it saved, and it didn’t → tool with permission to save
3 Nobody knows if it’s correct → you, who checks
The third line isn’t one of the seven pieces: it’s the one who uses the system.

Stuck here? That's normalSeven pieces seem like a lot at the start. In this lesson, you only need to judge three: template, interface, and files. In the other four, a "?" is the right answer for now.

Practice now 0/3

Draw the seven pieces of one task of yours

Done when you circle, among template, interface, and files, the missing piece in a real task from this week. About 8 minutes, on paper or in your phone’s Notes.

It’s just a drawing: nothing gets sent to anyone. If all the pieces seem present, choose a task that recently caused rework.

You just saw your use of AI as a system and pointed out the missing piece.

Lesson cheat sheet

Seven pieces

  1. Right model for the taskThere isn’t a best one in general.
  2. Seven piecesmodel, interface, files, instructions, tools, memory, automations.
  3. Did it fail?Find the missing piece before rewriting the request. You’re the one who checks.

Your next step

You already know how to locate the missing piece when the AI gets it wrong.

Today, in the next request that comes back bad, write on one line which piece was missing before trying again.

In the next lesson: if the model is one piece, what types of model exist? Text, image, video, and classification solve different things.

Additional material · AI as a work systemFull text of the topic on OSWork v2. Does not count in lesson time.

What it is

When this course talks about AI, it means language models, the LLMs. A model is a mechanism trained to produce text from what you give it. There are several, with different names, sizes and costs, and the first question is usually which one is best. That question has no useful answer: there is no best model, there is the model suited to the task, the deadline, the cost and the level of checking that work requires. That is why this module compares models against a real task rather than against opinions. A model produces answers; a system organises how those answers become work. OSWork combines model, interface, files, instructions, tools, memory and automations. Think of a small workshop: the professional's skill matters, but tools, materials and quality criteria also determine the result. We are not installing a new computer operating system: we use that expression as a metaphor for organisation.

Why learn

Without this distinction, every failure turns into an attempt to write a larger prompt. Sometimes only the input file, a permission, or the way to verify the output is missing. Separating the pieces allows you to fix the right point.

Key concepts

Model reasons; interface receives the goal; files provide evidence; tools execute; you verify.

In practice

A coordinator asks for a meeting plan. Without an agenda, the AI imagines priorities. With an agenda and previous minutes, it can prepare a verifiable proposal.

✓ Do it

Draw seven boxes with the system pieces. Mark which ones you already have and which are missing to complete a task.

✗ Avoid

Accepting a conclusion without checking the input that supports it.

  • Model
  • Interface
  • Files
  • Instructions
  • Tools
  • Memory
  • Automations
The seven pieces of the system. Mark what you already have and what is missing to finish a task.

Lesson 1 · OSWork v6.2 · INEMA.CLUB PRO

Module 1 · Lesson 2 of 6

Separate by function before comparing names

A teacher in the teachers' room sorts papers into four color-coded trays, with the notebook open beside them.

For each task you repeat, can you say what kind of model it asks for — text, image, video, or classification — before you choose a name?

Adopting a model as "the best" closes the door to everything it doesn’t do. A great text model doesn’t generate a video. A classifier doesn’t write your report. This lesson teaches you to separate by function first.

In 1 minute

  1. Four functions: text, image, video, and classification.
  2. Names and versions change; the task’s function stays.
  3. Central hubs give access to multiple models through a single point.

1 Four functions, four types of model

Language models, the LLMs, write, summarize, explain, and program. Image and video models generate or edit visual material.

There are also classification models. They don’t chat: they receive options and return a choice, yes or no, or a score.

Lúcia listed what she does with AI in a month. Summarizing the class council minutes needs text. The science fair brochure cover needs image. Separating two hundred class comments needs classification.

Lúcia’s tasks · by function
1 Text
summarize the class council minutes
2 Image
science fair brochure cover
3 Video
ten-second science fair jingle
4 Classification
separate comments into "question", "praise", and "complaint"
  1. 1Text: write, summarize, explain.
  2. 2Image: generate or edit figures.
  3. 3Video: generate clips.
  4. 4Classification: choose and score.

2Names change, the function stays

ChatGPT, Gemini, and Copilot are chatbots: behind each one there are language models. Within each type, there are families with their own names. In text, the GPT family has Sol, Terra, and Luna, plus GPT-6 Astra. The Claude family has Opus and Fable.

You don’t need to memorize this list: these names come from a query on 09/20/2026. Names, versions, and availability change. That’s why the choice happens when the task appears, and it can be different the next week.

Denise heard from a colleague that "this model is the best" and wanted to use it for everything. When she requested the artwork for the June festival invitation, she found out it only writes text.

Choose by name

"I’ll use the model that everyone praises, for everything."

The invitation artwork doesn’t come: the model is text-based.

Choose by function

Invitation in text: a language model. Invitation artwork: an image model.

Each task goes to the type that knows how to do it.

3The classifier doesn’t chat; it chooses

A classifier, like the Jev, receives a text and a closed list of alternatives. It returns a choice—not a paragraph.

To triage many items across a few categories, this can be simpler to check than a conversation. It’s a hypothesis to test, not a guarantee. You can try the idea today in the same chat: paste the items and ask "respond with only one of these categories".

Lúcia pasted a student comment into the chat and the three categories, asking for only the category. It returned a single word. She checked ten responses by hand before trusting the others.

Classifier

YouComment: "I didn’t understand the part about photosynthesis that showed up on the test." Categories: question · praise · complaint

AIquestion

A choice among the given alternatives. Easy to verify in bulk.

Test yourself

Denise received 300 open responses from parents about the entry time. She wants to know how many request a schedule change. What type of model does she test first?

4Gateways open many doors with one point

There are also gateways, which give access to multiple providers at a single point. The OpenRouter brings together language models. The Kie brings together image and video models.

Availability varies by account, plan, and release. A model that shows up for a colleague may not show up for you.

For the ten-second graduation vignette, Denise didn’t need to sign a video service by model. In a text and video hub, she compared two models in the same place, with one account.

Text hub

OpenRouter

Multiple language models in one access point.

Image and video hub

Kie

Multiple image and video models in one access point.

Each hub has its own credit. Lesson 5 shows how this gets accounted for.

Stuck here? That's normalThe list of names gets tiring and ages quickly. Keep only the four functions. You check the names in "Where to find the current names", in the practice of this lesson, when the task shows up.

Practice now 0/3

Rank your three most repeated tasks

Ready when each task has a model type, and only then a name. About 8 minutes, on paper or in your phone’s Notes.

No one else sees this list besides you. Were you unsure between two types? Write both: the module lab, in the lesson 6 supplementary material, compares them in practice.

TASK 1: <ex.: summarize the board minutes>
Type: <text, image, video, or classification>
Name to test: <fill in last>

TASK 2: <…>
Type: <…>
Name to test: <…>

TASK 3: <…>
Type: <…>
Name to test: <…>
Where to look up current names

Official pages list what’s available today: ChatGPT models, Claude models, OpenRouter catalog and Kie. Course lookup: 20/09/2026.

You just chose by function before the name, for the tasks you repeat the most.

Lesson cheat sheet

Function before name

  1. Four types text, image, video, classification.
  2. Names age check the date and the source before choosing.
  3. Hubs multiple providers in one place, with your own credit.

Your next step

You already know how to sort your tasks by the model type each one asks for.

Save the practice list in a document or in your Notes. If you do the optional module lab, at the end of lesson 6 you’ll test one of these tasks on two models.

In the next lesson: within the same model, there’s still another control—the reasoning effort. Increasing it doesn’t always improve results.

Supplementary material · AI types and what they’re forFull topic text in OSWork v2. Doesn’t count in lesson time.

What it is

Before comparing names, sort by function. Language models, the LLMs, write, summarise, explain and program: that is where families like GPT sit, with Sol, Terra and Luna, GPT-6 Astra, and the Claude family, with Opus and Fable. Image and video models generate or edit visual material. And there are classification models, such as Jev, which do not converse: they take alternatives and return a choice, a yes or no, or a score. There are also hubs, which give access to several providers through a single point: OpenRouter for language models and Kie for image and video. Names, versions and availability change; this reading is from 20/09/2026.

Why learn

Choosing a model as the best locks the port for everything it doesn’t do. An excellent LLM doesn’t generate a video, and a classifier doesn’t write your report. Understanding what each type is for comes before choosing, and the choice happens when the task shows up, which can be different the next week. Availability also varies by account, client, authentication, and permissions.

Key concepts

Text; image; video; classification; access hubs; availability.

In practice

Summarising minutes calls for a language model. Sorting two hundred comments into three categories may fit a classifier such as Jev better. Producing a ten-second sting requires a video model, usually reached through a hub. These are hypotheses to test, not guarantees.

Try it now

List the three AI tasks you repeat most. Next to each one write the kind of model it calls for, and only then the name you intend to test; check the sources at the end of the module.

  • Text · LLMs — summarize and write
  • Image — generate and edit
  • Video — generate clips
  • Classification — choose and score
  • OpenRouter · text
  • Kie · image and video
Sort by function before comparing names. Hubs give access to several providers through a single point.

Lesson 2 · OSWork v6.2 · INEMA.CLUB PRO

Module 1 · Lesson 3 of 6

Model and effort are two controls

A teacher compares two printed spreadsheets side by side with a highlighter, with the notebook open on the table.

You can repeat a request by changing only reasoning effort and say, with evidence, whether the result improved.

A lot of people set maximum effort for every task, for safety. That can waste more time and more consumption without improving anything. And no effort will bring back the document that was missing from the request.

In 1 minute

  1. The model is the mechanism; the effort is one of its settings.
  2. Start with the default. Fill in the inputs before increasing effort.
  3. To compare, change only one control and keep everything else the same.

1Two different axes

The model is the chosen mechanism. Reasoning effort is a setting of that mechanism: how much it analyzes before responding.

Higher levels can spend more time and more tokens. The selector names change between Chat, the Work, and the Codex. There is no single list of levels that applies to all products.

Denise thought changing the level meant changing the AI. She found out that, within the same model, you can ask for a quick response or a longer analysis.

Chat selector
1 Model: [selected model]
2 Effort: [current level] · [level above]
  1. 1First control: which mechanism is working.
  2. 2Second control: how much it analyzes. Level names vary from product to product.

2More effort doesn’t bring the missing file

Increasing effort doesn’t provide a document that was left out. If the answer depends on some data, the data needs to be included in the request.

First complete the inputs. Then evaluate whether the problem calls for more analysis.

Lúcia wanted to know why the secretary’s grades spreadsheet didn’t match hers. At maximum effort, without the spreadsheets, she received general hypotheses. With the default, with both spreadsheets pasted in, she got the exact line of the difference.

Maximum effort, without spreadsheets

Request: "Why don’t the two grades spreadsheets match?"

Result: a list of possible causes, without pointing to any of them.

Default, with both spreadsheets

Request: the same, with both spreadsheets pasted in.

Result: "[student] has a different score in [assessment] between the two versions."

Net gain: the right input fixed what the maximum control, at most, didn’t fix.

3Start with the standard

For most everyday tasks, the default effort works. Save more analysis for what involves multiple steps or lots of data.

Denise needed to rewrite a five-line invitation for the parent meeting. In the default, the response came in seconds and it worked.

AI chat · default effort

YouRewrite this invitation in a cordial tone, in up to five lines. Keep the date and time exactly as they are. [invitation pasted]

AIDear families, we invite you to [the invitation event] on [invitation date], at [invitation time]…

Short, well-defined task: the standard is enough.

Test yourself

First round: default effort, one spreadsheet. Second round: maximum effort, two spreadsheets. The second came out better. What can you conclude about effort?

4Compare under equal conditions

To see whether effort helped, repeat the same request, with the same material, using the same model. Change only the effort.

Then record: was there an improvement you can show? One more fact, one fewer mistake, a correct calculation. “Got better” without evidence doesn’t count.

Lúcia asked for the same correction, commented on, twice. At the highest level, a unit error appeared that the standard had let slip. She noted which one it was.

Lúcia’s test record
1 Request: the same in both rounds
2 Material: the same student response
3 Effort: standard → more analysis
4 Demonstrable improvement: pointed out the unit error (km instead of m)
  1. 1The request doesn’t change.
  2. 2The material doesn’t change.
  3. 3Only one control changes.
  4. 4The improvement is something you point to.

Stuck here? That's normalYour chat may not show an effort control: it depends on the product and plan. In this case, write "no effort control" in the record and make another comparison of a single control: change only the model. It’s a different test, but the method is the same. No control for either one? Compare two chats you already use, with the same request and the same material.

Practice now 0/3

Run the same request at two effort levels

Ready when the record says whether there was a demonstrable improvement, with the evidence. About 10 minutes, in the chat you already use. Look for the effort control near the message box or in the model selector; sometimes it shows up as a reasoning option or as “think more.”

Use a piece of your own material that isn’t confidential, or invent a short one. If the two responses come out the same, that’s also a result: the standard is enough for this task.

REQUEST (same in both rounds)
<ex.: point out the errors in this student response and explain each one in one line>

MATERIAL (same in both rounds)
<paste here the text, the table, or the response>

RECORD
Control that changed: <effort · model · chat>
Round 1 · <ex.: standard effort> · what came: <…>
Round 2 · <ex.: above standard effort> · what came: <…>
Measurable improvement? <yes or no> · evidence: <the extra fact or the one error less>

You just tested one control at a time and decided with evidence.

Lesson cheat sheet

Two controls

  1. Model × effortare different axes; the level names vary.
  2. Input firstno amount of effort replaces the missing file.
  3. One control at a timeimproves only counts with evidence.

Your next step

You already know how to test whether more effort is worth it on your task.

In the next long task, run with the standard first. Only raise the effort if you can say what was missing in the response.

In the next lesson: "improved" needs a ruler. You will write three criteria before you request and use the ruler to choose between two responses.

Supplementary material · Model is not thinking effortFull topic text on OSWork v2. Does not count in lesson time.

What it is

The model is the chosen mechanism. Reasoning effort is a setting of that mechanism. Higher levels may consume more time and tokens, units of text processing. The selector names change between Chat, Work, and Codex; there is no single list of Instant, Medium, High, and Pro that represents all products.

Why learn

Requesting the maximum on every task can increase consumption without improving the result. Increasing effort also does not provide a missing document. First complete the inputs, then assess whether the problem requires more analysis.

Key concepts

Model and effort are different axes; start with the default; compare under equal conditions.

In practice

To rewrite a five‑line invitation, the template may solve it. To explain why two spreadsheets disagree, providing the two spreadsheets usually matters more than moving a control.

Sequence to try

  1. Prepare a training copy.
  2. Repeat a request in the same model, changing only the effort. Record whether there was an improvement you can demonstrate.
  3. Record the observed result and the next correction.

Lesson 3 · OSWork v6.2 · INEMA.CLUB PRO

Module 1 · Lesson 4 of 6

A ruler turns opinion into observation

A coordinator checks the lines of printed minutes with a ruler and a pen, next to two printed answers and the notebook.

You can write three criteria before the request and use this ruler to decide, without discussion, which of two responses works.

Without criteria, you pick the most beautiful response. A summary can sound convincing and change a name or invent a deadline. This lesson shows how to decide based on what the response contains, not on the tone.

In 1 minute

  1. Write the ruler before making the request.
  2. Three criteria: faithful to the data, in the agreed format, with verifiable conclusions.
  3. Save a bad response to remember what you want to avoid.

1Define before you request

A quality ruler says, before the request, which facts need to appear, which errors are unacceptable, and how the output will be used.

Written beforehand, it doesn’t get carried away by the response. Written afterward, it usually approves what came.

Denise was going to ask for a summary of the planning meeting for the science fair. Before opening the chat, she wrote three lines on paper.

Desire

"I want a good summary of the meeting."

Any well-written text passes.

Ruler

1. The three people responsible, with no deadline that isn’t in the minutes.

2. A section for pending items.

3. Each sentence is something you can find in the minutes.

Net gain: three yes-or-no questions, answered in less than a minute.

2Three small criteria are enough

To start, use three criteria. Faithfulness to the data: no data from the material changes or disappears. Combined format: the size and sections you asked for. Verifiable conclusions: nothing is added that you can’t find in the material.

The three criteria are the template. In each task, they turn into concrete items. In Denise’s minutes, fidelity became “the three responsible people, no invented deadline”; format became “a pending items section”; verifiable became “each sentence can be found in the minutes.”

Lúcia used the same template for a chapter summary from a science book. The items changed: chapter concepts, a page, each statement with the page number.

Lúcia’s rule · chapter summary
1 Fidelity: only concepts that are in the chapter
2 Format: one page, in bullet points
3 Verifiable: each bullet includes the page number
  1. 1No invention, no changes.
  2. 2The form you’ll use.
  3. 3A path to check every claim.

3The prettiest answer can be the worst

The test needs to reflect the work you will deliver, not a demo made to impress. An elegant sentence doesn’t make up for losing a responsible person.

Denise got two versions of the summary. The first was smooth and pleasant to read. The second was dry. She applied the rule to both.

Two answers · same minutes

AIThe meeting was productive and full of energy. Lúcia will organize the groups with her usual enthusiasm, and Marcos reserves the patio until Friday. The fair promises!

Renata was missing, and “until Friday” isn’t in the minutes. There are no pending items. “Full of energy” can’t be found in the minutes. Rejected on all three items.

AIDecisions: Lúcia organizes the groups. Marcos reserves the patio. Renata buys the material. Pending items: confirm the date with management.

Three responsible people, no invented deadline, recorded pending item. Passes all three.

Tap the two buttons and run the step 1 checklist in every response.

Test yourself

The answer includes the three responsible people, has the pending items section, and ends with “the team left motivated.” That’s not in the minutes. Which criterion rejects it?

4Write down what was expected, what you observed, and keep the bad one

Turn the rule into a four-column table: criterion, expected, observed, and passed? That way the decision is written down and you can repeat the test later.

Also keep a bad answer. It reminds you what you’re trying to avoid.

Lúcia pasted the table at the end of the corrections document. The following week, she used the same rule to compare a new model, without starting from scratch.

Rule table · fair summary
1 Consistency · expected 3 responsible people, 0 invented deadline · observed 3 and 0 · passed ✓
2 Format · expected 1 section of pending items · observed 1 · passed ✓
3 Verifiable · expected every sentence in the announcement · observed yes · passed ✓
Bad answer saved: version A, with no Renata
  1. 1Criteria and expected come before the request.
  2. 2Observed comes from counting in the response.
  3. 3Passed is yes or no, without "more or less".

Stuck here? That's normalWriting criteria feels bureaucratic the first time. Start with just one: "no data that isn't in the material". The other two show up on their own after the first wrong response.

Practice now 0/3

Apply the rule after two responses

Ready when you fill in the table for both responses and choose one based on it. About 10 minutes. Write it down on paper or in a notes app.

It’s a fictional case made for training: there’s no one’s real data. Disagreed with the answer key? Re-read the announcement and check line by line.

The (fictional) material: Excursion of 7th A to the science museum. School leaves at 7:30, returns at 12:00. The authorization signed by the responsible people must be turned in by Thursday. Each student brings their own snack.

The request you made to the AI: "Write a short notice for families with the excursion information."

Open both responses (after writing your rule)

Response 1: "Hello, families! Our class is going to have an amazing day at the science museum. Departure at 7:30 and return at 13:00. Don’t forget the snack!"

Response 2: "Excursion of 7th A to the science museum. Departure at 7:30, return at 12:00. Turn in the signed authorization by Thursday. Each student brings their own snack."

See the answer key

A possible checklist, one item per criterion. Faithfulness: the same times, authorization, and Thursday deadline as the material. Format: short notice, up to four lines. Verifiable: all information is in the material. Response 1 fails for faithfulness (the return changed to 13:00 and the authorization is gone) and for verifiable (it added a "amazing day" that isn’t in the material); it passes for format. Response 2 passes all three. If your checklist had other items, check each one the same way: expected, observed, passed?

You just decided between two responses using a written rule, not the tone.

Lesson cheat sheet

Quality rule

  1. Before the requestwrite what needs to appear and what can’t.
  2. Three criteriaconsistency, format, verifiable conclusions.
  3. Tablecriterion, expected, observed, passed? And save a bad response.

Your next step

You already know how to choose a response by criterion, not by appearance.

Today, before the next summary you ask the AI for, write the rule in three lines and check the response with it.

In the next lesson: testing two models costs money. You’ll find out which account that cost comes from, because subscription and an access key charge differently.

Supplementary material · Create a quality rubricFull topic text on OSWork v2. Doesn’t count toward lesson time.

What it is

A rubric turns opinion into observation. Define before the request which facts must appear, which errors are unacceptable, and how the output will be used. Use three small criteria: fidelity to the data, combined format, and verifiability of the conclusions.

Why learn

Without criteria, you choose the prettiest answer. A report can sound convincing and alter values. The test should reflect the work you need to deliver, not a demonstration made to impress.

Key concepts

Acceptance; evidence; representative sample; controlled comparison.

In practice

In a fictional minutes with three responsible parties, the test requires the three names, no invented deadline, and a pending items section. An elegant sentence does not compensate for missing a responsible party.

✓ Do it

Use the table: criterion | expected | observed | passed? Keep a bad answer as well to remember what you are trying to avoid.

✗ Avoid

Mix the training copy with private files or production work.

Lesson 4 · OSWork v6.2 · INEMA.CLUB PRO

Module 1 · Lesson 5 of 6

Subscription and an access key are different accounts

A coordinator compares two different printed invoices, with a calculator and the notebook open on the settings screen.

You can identify the access method of each AI tool and record it in the project worksheet, without exposing any credential.

A test might be consuming a different account than the one you think. Subscribing to a chat doesn’t give you free balance for any program that calls the API. If today you only use the chat with your account, your worksheet will have one line. The others come later, when the course reaches those programs, in module 3.

In 1 minute

  1. Signing in with the account uses the rights and limits of your plan.
  2. An access key charges per usage, on a different account.
  3. Record the method in the worksheet. Never the credential.

1Signing in with the account uses your plan

Doing a login with the ChatGPT account uses that account’s rights and limits. They come from its plan and its workspace. What you can use—and how much—comes from the plan.

These limits and rules change. The source of truth is the current configuration of your account, not what someone told you.

Lúcia uses the school’s account to access the chat. When she hit the day’s usage limit, she found out the limit was from the school’s plan—not hers.

Account settings
1 Plan: [school plan name]
2 Workspace: [school name]
3 Usage: plan limits
  1. 1The plan says what the account can use.
  2. 2The workspace tells whose account it is.
  3. 3The limit comes from there, not from the model.

2The access key charges per usage

Programs use the AI through an API. For that, they use a API key, charged per usage on the platform.

Subscribing to the chat doesn’t mean you get free balance for any program that calls the API. It’s two accounts, with two charges.

Denise ran a reports program with an API key from the school. The tokens used showed up on the platform, not in the chat subscription.

Sign in with the account

Who uses: you, on the chat screen or in an agent connected to the account.

Billing: the account plan, with its limits.

API key

Who uses: a program.

Billing: by usage, on the API platform.

Both paths can use a model with a similar name and still bill different accounts.

3Centres have their own credit

Centres like the OpenRouter and the Kie have their own credit, billed by usage. It’s separate from any subscription.

So there are at least three places where the money can come from: the chat plan, the API platform, and the centre credit.

Lúcia generated the reading week posters on a centre, with a small credit that she bought herself to test. The credit ran out in the middle of the batch. The chat subscription was still active, but it didn’t cover that.

Where each cost comes from
1 Chat plan
usage through the screen or by an agent connected to the account
2 API platform
programs with an API key, by usage
3 Centre credit
models accessed through the centre, by usage

Test yourself

Lúcia subscribes to a chat plan. She generates posters on a centre, and the centre credit ran out. What fixes it?

4Check the method before a long run

Before leaving something running for a long time, check which method is active: in the tool settings, look at the account plan, or the key in use. Later, in Codex, a command in the terminal shows that.

In the project sheet, note the method: account, key, or centre. The credential itself never goes on the sheet, for a request, or in a screenshot.

Before asking for the summary of the forty meeting minutes from the year, Denise checked the settings and wrote in the sheet: "school chat · school account · plan limit". Without any password.

Denise sheet · access
1 Tool: school chat
2 Method: school account
3 Where I checked: Settings › Plan
4 Spend limit: the plan’s limit · Credential: not noted
How it will be in Codex, starting from module 3
Terminal
$ codex login status
Logged in using ChatGPT

The first line is what you type. The second one, in English, says "connected using ChatGPT": the method is the account.

With an active API key, the response cites the key, but never the full value.

Stuck here? That's normalCodex only arrives in module 3. For now, check the method on the settings screen of the tool you use and note what it shows.

Practice now 0/3

Record the access method in the project sheet

Done when the sheet has one line per AI tool you use, with the method and where you checked. About 8 minutes, on your computer or phone.

Do you only use the chat with your account? Then the sheet has one line, and that’s fine. You only write down the type of access—never a password or key. If you find a key stuck in some document, delete it from there and tell whoever manages that account.

PROJECT SHEET · ACCESS
Tool: <ex.: school chat>
Method: <account · API key · central>
Where I checked: <ex.: Settings › Plan>
Spend limit: <ex.: the plan’s limit>
Credential: DO NOT NOTE HERE

You just mapped where the cost for each tool comes from, without exposing any credential.

Lesson cheat sheet

Access and billing

  1. Accountplan rights and limits.
  2. API keys and centralsconsumption, each in its own account.
  3. Sheetthe method is there; the credential never is.

Your next step

You already know how to say which account each tool’s cost comes from.

Today, write the spending limit in the form. If you use only the chat, it’s the plan limit in Settings › Plan. If you use a hub or an API key, check whether it allows a monthly cap.

In the next lesson: with the right account, how far should the AI go on its own? You’ll write an authorization with a beginning, a middle, and a stop point.

Additional material · Understand access and billingFull topic text in OSWork v2. Not included in lesson time.

What it is

Signing in with ChatGPT uses the rights and limits tied to the account and the workspace. An API key uses pay-per-use billing on the platform. Subscribing to ChatGPT does not mean receiving free balance for any program that calls the API. Hubs such as OpenRouter and Kie have their own credit, billed per use and separate from any subscription. Check the active method before a long run.

Why learn

This precaution avoids discovering later that an experiment is consuming a different account. Usage limits, model access, and data rules can change; the source of truth is the current configuration of your account.

Key concepts

Subscription; authentication; API; consumption; spending limit.

In practice

A student uses Codex connected to ChatGPT and then runs a program with OPENAI_API_KEY. They are different paths, even if they use a model with a similar name.

Try it now

In Codex, use codex login status to check the method. In the project sheet, record the method, never the credential.

Lesson 5 · OSWork v6.2 · INEMA.CLUB PRO

Module 1 · Lesson 6 of 6

Autonomy is authorization with scope

A teacher writes a short handwritten list on a notepad next to the notebook, with a sealed envelope and not-yet-sent items kept separately on the table.

You can write an authorization in five parts—goal, files, actions, time, and stop—and ask for a closure that says what was done and how it was verified.

An agent executes multiple steps and can get several of them wrong. Without a written limit, it can waste time, credits, or touch the wrong file. A simple limit protects all of that without blocking useful work.

In 1 minute

  1. Autonomy is a scoped permission, not an invitation to do anything.
  2. Five parts: objective, files, actions, time limit, and stop point.
  3. The result tells what was done and how it was verified.

1An agent performs multiple steps in sequence

In a chat, you send a message and get a response. An agent receives an objective and goes alone: it reads files, creates, compares, corrects.

This saves you work. It also multiplies the places it can make mistakes without you seeing.

Lúcia asked an agent to organize the notes from the grading period. It read three spreadsheets, created a new one, and renamed the old ones. The last step she hadn’t asked for.

Chat

One message, one response.

You see each step before the next one.

Agent

One objective, multiple steps: read, create, compare, correct.

You see the result at the end.

Both are useful. The agent needs a written limit because you don’t monitor every step.

2Five parts of an authorization

Combine five things before you start: the objective, the permitted files, the authorized actions, the time limit, and the stop condition.

In a chat, time turns into “respond in a single message”; in an agent, it’s an execution ceiling. Technical permission and written instruction complement each other: the tool limits what’s possible, and the authorization says what’s desired.

Denise wrote the authorization for the agent that prepares the monthly attendance report. It took two minutes and fits on a sticky note.

Authorization · attendance report
1 Objective: draft of the September attendance report
2 Files: only the September attendance spreadsheet
3 Actions: read the spreadsheet and create a draft; do not delete or rename
4 Time: up to 10 minutes
5 Stop: deliver the draft and stop before sending
  1. 1What it should produce.
  2. 2What it can read.
  3. 3What it can do.
  4. 4Until when.
  5. 5Where it stops and waits for you.

3The existence of a button is not permission

Sending a message, posting, or deleting are external actions. Each one requires explicit instruction. The fact that a send button exists does not authorize using it.

Lúcia authorized the agent to create the draft of the scavenger hunt announcement and compare it with last year’s. Sending it to families was left out on purpose.

Agent

YouCreate the draft of the scavenger hunt announcement using only the scavenger hunt rules file. Compare with last year’s announcement. Stop before sending to anyone.

AIDraft created. Comparison: three repeated excerpts from last year, marked in the draft. Not sent: sending wasn’t authorized.

Stop where the authorization told it to stop, and said that.

Test yourself

The authorization only said "organize the tests folder". The agent could delete files and deleted three that looked like copies. Which part of the authorization was missing?

4The result accounts for what it did and how it checked

Always ask for a three-part closing: what was done, how it was verified, and what’s still pending. This way, the result becomes something you review, not something you have to trust.

Denise’s agent finished the draft of the attendance report and listed what she checked. She opened the spreadsheet, checked one of the numbers, and approved the rest.

Agent · closing

AIDone: draft of the report with attendance by class. Verified: the total by class matches the sum of the spreadsheet rows. Pending: class 8º C has two rows without a date. I didn’t complete them.

Three parts, and the pending item wasn’t filled in with a guess.

Stuck here? That's normalYou might not be using any agent yet. This lesson practice is in the chat, where you can’t send anything: it trains you to write the authorization, not to prove the AI follows it. The test with a real agent comes in module 3, with the authorization you write today.

Practice now 0/3

Write and test an authorization with a stop point

Ready when the closing comes with what was done, how the three points were verified, and what’s still pending. About 10 minutes, in the chat you already use.

Use made-up data or your own text without personal information. Nothing is sent to anyone: the stop point ensures that. If the AI goes past the limit, note what it did and reinforce that line.

1. OBJECTIVE
<ex.: draft of a notice about the school fair>

2. FILES: USE ONLY THIS MATERIAL
<paste the text or made-up data here>

3. AUTHORIZED ACTIONS
<ex.: write the draft in up to eight lines; don’t invent dates or names>

4. TIME
Respond in a single message.

5. STOP POINT
Stop before publishing or sending.

CLOSING (the three points are your rubric for lesson 4)
Say what you did, how you verified these three points, and what’s still pending:
- <ex.: the date matches the material>
- <ex.: no name that isn’t in the material>
- <ex.: up to eight lines>
See the filled-in template already done by a coordinator

1. Objective: draft of the notice about the library schedule change.
2. Files: [old and new hours pasted]
3. Actions: write the notice in up to six lines; don’t invent a reason.
4. Time: respond in a single message.
5. Stop point: stop before sending.
Closing: say what you did, how you verified the two times, the absence of names, and the six-line limit, and what’s still pending.

You just delegated a task with scope, verification, and a stop point.

Lesson cheat sheet

Authorization with scope

  1. Five partsobjective, files, actions, time, stop.
  2. External actionsend, publish, or delete only with explicit instruction.
  3. Closurewhat you did, how you verified it, what’s still pending.

Your next step

You completed module 1: you already choose the model based on the task, measure it with a ruler, know where the cost comes from, and delegate with a limit.

When you have about 30 minutes, open the additional material for this lesson and do the optional module lab, "Your decision sheet": the same request in two models, evaluated by your ruler.

Next module: Chat, Work, and Desktop. Three ways to work with AI, and when to use each one.

Additional material · Define autonomyFull topic text in OSWork v2 and module closure. Doesn’t count toward lesson time.

What it is

Autonomy is an authorization with scope, not an invitation to do anything. Combine objective, permitted files, authorized actions, time limit, and stop condition. The output must include what was done and how it was verified.

Why learn

An agent can execute more steps than a chat, including making multiple mistakes. A simple limit protects time, budget, and files without preventing useful work. Technical permission and written instruction complement each other.

Key concepts

Scope; approval of external actions; execution ceiling; reviewable result.

In practice

Authorize creating a draft and comparing fictional data. Sending the proposal to a client is another action and requires explicit instruction. The existence of a send button does not mean permission to use it.

Try it now

Write: use these files; generate this result; verify these three points; stop before publishing or sending.

Module lab: Your decision sheet

Use fictional files and a training folder. Practices with installation, Telegram, or VPS may require extra time for sign-up and configuration.

  1. Choose a small task that you already know how to evaluate: summarize a fictional meeting.
  2. Write three facts that must necessarily appear in the summary.
  3. Execute the same request on two available models, without changing the data.
  4. Compare preserved facts, inventions, time and review effort. Record your choice.

Comparison sheet

Read the block before using. Fields like Your Name and usuario@ip-da-vps are examples to adapt; administrative commands belong only to your training environment.

Task: summarize a fictional meeting
Input: agenda with 5 items
Criteria: keep 5 items; don’t invent deadlines
Model / effort: write down what’s available
Observed result: record correct answers and mistakes
Choice: justify based on the result, not the name

Ready criterion

Compare models with a real task and a quality criterion. Record the produced file, the test run and the observed result.

Criteria to review your delivery

Use this rubric after the lab. Each line asks for evidence; checking reading does not mean the practice was performed.

  • Scope — The delivery matches the objective of this lesson. If you didn’t pass: Reduce the task and name a single result.
  • Inputs — You know which files or data were used. If you didn’t pass: List the sources and remove material that’s unrelated.
  • Execution — The procedure was carried out in the training environment. If you didn’t pass: Separate what you planned from what you actually did.
  • Verification — A result was compared against a reference. If you didn’t pass: Open the file or repeat a verifiable query.
  • Secrets — No token, password, or private data was shared. If you didn’t pass: Review the work copy before sending anything.
  • Continuity — Another person can find the next step. If it didn't work: Update README and record a concrete pending issue.

Check what remained

One answer arrived faster, but invented two deadlines. Which result should guide the choice?

View commented answer

Verifiable quality and rework; speed alone is not enough.

If your answer was different, return to the corresponding topic and write the difference in one sentence. The check does not block your study.

Module summary

  • Model thinks; interface receives the goal; files provide evidence; tools run; you verify.
  • Text; image; video; classification; access hubs; availability.
  • Model and effort are different axes; start with the default; compare under equal conditions.
  • Acceptance; evidence; representative sample; controlled comparison.
  • Signature; authentication; API; consumption; spending limit.
  • Scope; approval of external actions; execution ceiling; reviewable result.

Consult the source

Tools verified on 20/09/2026; screen names and availability may change.

Terms for this section: OpenRouter, Kie.

Lesson 6 · OSWork v6.2 · INEMA.CLUB PRO

Module 2 · Lesson 1 of 6

Small question fits in the chat

A teacher in the teachers' room types a short question into the notebook, with a recipe card, a measuring cup, and oranges cut in half next to it, which she will use to explain fractions.

You can ask a short question with audience and purpose and get the answer with the AI’s assumptions right in view.

Not every task requires a big tool. Building a complicated routine for something that only needed an answer wastes time—and it also creates more things to check. Knowing when the chat is enough is the first filter in this module.

In 1 minute

  1. Chat is conversation: you ask, read the answer, and adjust the request.
  2. It’s for clarifying a concept or drafting a message.
  3. Tell who and what for, and ask for the AI’s assumptions.

1Chat is a conversation: question, answer, adjust

The chat is a interface for conversation. Think about the question you ask a coworker in the hallway, between two lessons. It’s short, the answer comes right away, and you decide what to do with it.

If the answer didn’t work, you don’t start over. Send an adjustment in the same conversation.

Lúcia will cover a math lesson for a colleague. She asked for three ways to explain fractions using the ingredients from a recipe. She chose one, adjusted another, and took them to the class.

AI chat

YouGive me three ways to explain fractions using the ingredients from a cake recipe.

AI1. Half a cup of sugar: the cup divided into two equal parts. 2. One quarter of a stick of butter: four pieces, use one. 3. One third of a cup of milk: the cup in three parts, use one.

YouSwap the third: I want an example with three eggs divided between two recipes.

AI3. Three eggs for two recipes: each one takes one and a half eggs.

The third message is the adjustment: same conversation, without starting over.

Question, answer, adjustment. That’s what the chat is for.

2Who and what for change the answer

A free-form question gets an encyclopedia-style answer. Say who will read it and what you’re going to do with the text. The answer already comes in the right length and tone.

Denise needed to explain the class council to the parents of 6th grade. The first question brought a technical paragraph. With the audience and purpose, two ready-made sentences came for the message.

AI chat

YouWhat is class council?

AIClass council is a group evaluation process provided for in school organization, bringing together teachers and the educational team to analyze the teaching and learning process…

Correct, but too long and too technical for a message to parents.

YouExplain what class council is in two sentences, for parents of 6th grade. It should go in an agenda message.

AIClass council is a meeting of teachers with coordination to talk about how each class and each student are doing. From it come agreements to help those who need it.

Same topic, now in the size and tone of the message.

Hit the two buttons and compare the same question with and without an audience.

3Ask for the AI’s assumptions

Every short question leaves gaps. The AI fills those gaps without telling you: it assumes the students’ age, the tone, the size. Ask it to list what it assumed.

That way you can see the guess before you use the answer. Correcting a guess costs a message.

Lúcia asked for an opening question for the lesson about mixtures. The list of guesses showed that the AI thought of high school students. She corrected it with one line.

AI chat

YouCreate an opening question for a lesson about mixtures. In the end, list the assumptions you made.

AIQuestion: why does the salt disappear in water, but the sand doesn’t? Assumptions: high school students; a 50-minute lesson; the question will be asked out loud.

YouThe class is in 8th grade. Adjust the question if you need to.

AIFor 8th grade: what happens to salt when it goes into water, and why does the sand stay at the bottom?

The wrong assumption showed up in the list, not hidden in the text.

Read the assumptions first. They show what the AI made up to fill in what you didn’t say.

4When the chat is enough, and when it asks for more

The choice is based on the task’s intent, not on a technical restriction. Some chats also read attached files. If the delivery is a response you read and check right away, the chat is enough.

If the delivery is a document with multiple entries, the conversation gets too short. Some chats have a mode for bigger tasks; in ChatGPT, it’s called Work. It’s the topic of the next lesson, which also shows how to do it without that.

Denise almost opened a long task to write a three-line message. She went back to the chat and got it done in two minutes.

The chat is enough

Explain a concept in a few lines.

Draft a short message or email.

Brainstorm for a lesson.

Asks for more than conversation

Combine multiple sources into a table.

Deliver a ready document to review.

A task that takes more time than a conversation.

Ask: is the delivery an answer I’ll check right now, or a document I’ll review later?

Test yourself

You only need a two-sentence explanation for a message. Do you need to use Work?

Stuck here? That's normalDon’t know whether your chat has Work or reads files? You don’t need to know that now. This lesson and the practice work with any chat, even on the free plan, on your phone.

Practice now 0/3

Ask with an audience, a purpose, and assumptions

Ready when the response comes with a list of assumptions and you’ve corrected one of them. About 8 minutes, in the chat you already use, on your phone or computer.

It’s a question from your work, with no student name and no personal data. If the AI doesn’t list the assumptions, just send: "List the assumptions that you made."

Question: <your one-line question>
Audience: <who will read or hear the answer>
Purpose: <what you’ll do with it>
Length: <e.g., up to five lines>
In the end, list the assumptions you made about what I didn’t say.
See the template already filled in by a teacher

Question: how to explain the difference between evaporation and boiling?
Audience: 8th grade students.
Purpose: to open tomorrow's lesson.
Length: up to four lines.
At the end, list the assumptions you made about what I didn't say.

You just asked a question that pays off on the first round—by correcting the AI's guess before using the answer.

Lesson cheat sheet

Chat is conversation

  1. Conversation question, answer, adjustment in the same window.
  2. For who and for what define the size and tone.
  3. Assumptions ask for the list and correct before using.

Your next step

You already know when chat is enough and how to ask a question that pays off in the first reply.

In the next small question of the assignment, add the assumptions line to the request. Takes ten seconds.

Next lesson: and when the task doesn’t fit in a conversation? You’ll learn to make a request.

Additional material · Chat solves a conversationFull topic text in OSWork v2. Doesn’t count in lesson time.

What it is

Chat is a conversational interface. You present a question, receive an answer, and can adjust the request. It works well for clarifying a concept or drafting a message. Additional features vary: a chat can also work with files and tools when available. The pedagogical distinction is the task’s intent, not a technical prohibition.

Why learn

Recognizing a small need prevents building an automation for something that only requires an answer. The best environment is the one that lets you verify delivery with minimal friction.

Key concepts

Conversation; clarification; draft; human review.

In practice

A teacher asks for three ways to explain fractions using ingredients from a recipe. She analyzes the examples and chooses one before taking it to class.

✓ Do it

Write a short question with audience and purpose. Then ask the answer to indicate its assumptions.

✗ Avoid

Accepting a conclusion without checking the input that supports it.

  • Chat — a conversation
  • Work — a request
  • Desktop — files nearby
Same family of models, three ways to ask for work. The choice changes what you must hand over with it.

Lesson 7 · OSWork v6.2 · INEMA.CLUB PRO

Module 2 · Lesson 2 of 6

A big task becomes a request

A curriculum coordinator fills out a one-page request form on a clipboard, with three stacked supplier folders next to the notebook.

You can turn a vague request, like "search suppliers", into a short request with five parts: objective, inputs, result, limits, and stopping condition.

A project with multiple sources needs a definition of done. Without it, the AI can keep researching when you only needed to compare three options. And you get a long text that you don’t know where to review.

In 1 minute

  1. The Work receives a bigger task and returns a result that you review.
  2. You define what must exist at the end, not each sentence along the way.
  3. Five parts: objective, inputs, result, limits, and stopping condition. Without Work on the table, the request works in regular chat.

1Work receives the task and returns the result

In Work, you don’t chat sentence by sentence. You submit a task, like an analysis or a document, and get the result to review. It can use files and approved tools.

Think of the request for a cake at the bakery. You say flavor, size, and day. You don’t keep watching the oven. Work doesn’t show up in every plan. Can’t find it there? Use the request in regular chat: it works the same.

Denise needs to hire a bus for the museum field trip. She has three quotes and wants a comparison to take to management.

Conversation

You ask, read, adjust.

You follow each answer.

Request

You describe what must exist at the end.

You review the result when it arrives.

In the request, the thinking work comes first: what you want to receive.

2Five parts of a request

A request says five things. The goal. The inputs, which are the material the AI can use. The output, which is the format of the result. The limits. And the stop, which is when the work ends.

It looks like lesson authorization 6, in module 1, and it’s related. The authorization says what the AI can do; the request says what must exist at the end.

Denise wrote the request for the bus quotes in five lines. It took three minutes.

Request · museum field trip bus
1 Goal: compare three bus quotes for the field trip
2 Inputs: only the three quotes pasted below
3 Output: table with price, confirmation deadline, and risks
4 Limits: no researching other companies; missing data becomes "not informed"
5 Stop: deliver the table and stop
  1. 1What the result is for.
  2. 2What the AI can use.
  3. 3The format of what comes back.
  4. 4What it must not do.
  5. 5When the work ends.

3"Search" turns into a table you review

A vague request opens the door to endless research. The request closes that door: three options, the documents you provided, a format.

Notice the field with no information. The request asked for "not informed", and the AI didn’t fill it in with a guess.

AI task

YouSearch bus companies for a school field trip.

AII found many options. First, an overview of the school charter sector, with hiring tips and required documents…

Long, beyond the three quotes, and without saying when it ends.

YouCompare only these three bus quotes in a table with price, confirmation deadline, and risks. Missing data becomes "not informed". Deliver the table and stop. Company A: R$ 1.800, confirms in 2 days. Company B: R$ 1.500, deadline not cited. Company C: R$ 2.100, confirms in 1 day; buses without seat belts in the back seats.

AIA · R$ 1.800 · 2 days · not informed B · R$ 1.500 · not informed · not informed C · R$ 2.100 · 1 day · back seats without seat belts

Three lines, only what was in the quotes. "Not informed" means the quote doesn’t say that, and it’s not that the risk is zero.

Tap both buttons. Same topic, but very different deliverables.

4 The stop point tells you when the work is finished

Without a stop point, the AI decides on its own when it arrives. Sometimes it stops too early. Many times it goes too far. Tell it the size of the result and the point where it should deliver.

Lúcia ordered a comparison of microscope kits for the lab. She limited it to three kits, from the catalogs she pasted, and a table. In one page, she got what used to take five.

Without a stop point

Request: "Compare microscope kits."

Result: five pages, with kits from stores she didn’t even know.

With a stop point

Request: "Only the three kits from the pasted catalogs. A table. Deliver it and stop."

Result: one page, three lines, ready to check.

Net gain: from five pages to one, with everything coming from the material she provided.

Stuck here? That's normalYour account doesn’t have Work? The request works the same as a regular chat. Paste the practice template, with the material, and ask for the delivery in a single response. What changes is the request, not the tool.

Practice now 0/3

Turn a "search" into a short request with five parts

Ready when the result comes only with the options you gave, in the requested format, and with "not informed" where a piece of data was missing. About 10 minutes, in Work if your account has it, or in the chat you already use.

Use fictional options or public data, without a student name or secret value. Are the options in PDF or on WhatsApp? Type only the essentials of each one, on one line. If the AI brings an option you didn’t give, reply: "Use only the options I pasted".

OBJECTIVE
<ex.: compare three options of ... to decide ...>

INPUTS: USE ONLY THIS MATERIAL
<paste here the three options>

OUTPUT
<ex.: table with price, timeline, and risks>

LIMITS
Don’t search for other options. Missing data becomes "not informed".

STOP POINT
Deliver the table and stop.
See the template already filled in by a teacher

Objective: choose a microscope kit for the lab.
Inputs: Kit 1: R$ 900, 10 units. Kit 2: R$ 750, delivery in 15 days. Kit 3: R$ 1.100, 12 units, 1-year warranty.
Output: a table with price, quantity, timeline, and warranty.
Limits: don’t search for other kits; missing data becomes "not informed".
Stop point: deliver the table and stop.

You just swapped an endless search for a delivery with a beginning, middle, and end.

Lesson cheat sheet

Work request

  1. Work bigger task, result to review.
  2. Five parts objective, inputs, output, limits, stop point.
  3. Not informed missing data doesn’t turn into a guess.

Your next step

You already know how to turn a vague request into one that has a time to end.

Save the filled-in template in a note block. In the next work comparison, start with it.

Next lesson: the request cites files. How do you know if the AI can actually read each one?

Supplementary material · Work receives a requestFull text of the topic on OSWork v2. Does not count in the lesson time.

What it is

Work allows delegating a task with a reviewable result, such as an analysis or a document. It can use approved files and tools. Instead of monitoring every sentence, you define what must exist at the end and track the relevant steps. Availability depends on the account and environment.

Why learn

Work with multiple inputs needs a clear definition of “ready”. Without it, the agent may keep researching when you only needed a comparison of three options.

Key concepts

Goal; sources; delivery; limits; stop condition.

In practice

A manager provides fictional data of three suppliers and requests a table with price, deadline and risks. Determines that missing fields be marked as not informed.

Try it now

Turn “search suppliers” into a one‑page order, limited to three alternatives and the provided documents.

Lesson 8 · OSWork v6.2 · INEMA.CLUB PRO

Module 2 · Lesson 3 of 6

A file nearby is not an opened file

A curriculum coordinator opens one drawer of a wooden file cabinet with a small key, with the other drawers closed and the notebook on top of the cabinet.

You can set up a training folder with two texts. And have the AI say which files it received, with the first and last line, before the summary.

Many task failures are access failures. You imagine the AI sees a folder, but it was never shared. Then the answer talks about documents the model never read.

In 1 minute

  1. The Desktop is the app on the computer and it can reach the folders you allow.
  2. Having the app doesn’t give access to all your documents.
  3. Before the request, ask for the list of received files, with the first and last line of each.

1The Desktop is on your computer, near the folders

The Desktop is the app that sits on your computer. If your app offers that, it can open folders and other apps, always with your permission.

In the browser chat, you attach or paste each file. In both cases, the AI only reads what reached it.

Lúcia uses the chat in the school’s browser and the Desktop on her home notebook. In both, she checks what the AI received before asking for the request.

Chat in the browser

You attach or paste each file.

The AI reads what you handed in.

Desktop

It can open a folder you chose when granting permission.

The AI reads what that permission allows it to reach.

Different paths, same rule: the AI only reads what reached it.

2Authorize a folder, not your entire computer

Giving access is like handing over the key to a drawer, not the key to the whole school. Put only what the task needs into a subfolder. When the app asks for access, choose only that subfolder. Screen names change between versions; what doesn’t change is choosing the smallest folder possible.

The science fair folder has three versions of the budget. Denise wants to test the AI without risking the original. She authorized only the examples subfolder, with two copies.

My files › Science fair
orcamento-v1
orcamento-v2
orcamento-v3
1 examples
2 orcamento-v1-copia
2 orcamento-v2-copia
  1. 1Only this subfolder is authorized.
  2. 2Inside it, copies. The originals stay out of reach.

3Ask for the list of what was read before the work

Before the comparison, ask for the names of the files the AI can read. Along with that, the first and last line of each one. A name alone doesn’t prove it was read. The first and last line show the beginning and the end arrived, and you verify it in the file.

If the list comes back wrong, the problem is access, not the request. Fix access and repeat the list.

Desktop · examples subfolder

YouList the files you can read and copy the first and last line of each. Don’t compare or summarize yet.

AII can read 2 files: orcamento-v1-copia first: "Science fair, materials budget, version 1" last: "Total: $ 640.00" orcamento-v2-copia first: "Science fair, materials budget, version 2" last: "Total: $ 710.00"

Two names, with the first and last line matching the files. Now the comparison can begin.

The list confirms the reading. A missing or extra name is a sign to stop and fix access.

4No access? Send it another way

If Desktop doesn’t exist on your account, or it can’t reach the folder, send the files using a path that works. Attach it in the chat using the attach button next to the message box. Or paste the text with a header that includes the file name.

Lúcia pasted two texts into the browser chat, each with the name on top. She asked for the list before the summary.

AI chat

You=== file: roteiro-experimento === Mix water and oil in a clear cup. Observe for two minutes. === file: lista-materiais === Clear cup, water, cooking oil, spoon. Total time: ten minutes. List the files you received, with the first and last line of each. Don’t summarize yet.

AII received 2 files: roteiro-experimento: "Mix water and oil in a clear cup." … "Observe for two minutes." lista-materiais: "Clear cup, water, cooking oil, spoon." … "Total time: ten minutes."

The header gives a name to each text; the first and last line show that the beginning and the end arrived.

Stuck here? That’s normalNo Desktop, and you don’t know if your chat supports attaching files? Use the header path: paste each text with "=== file: name ===" on top. It works in any chat, even on your phone.

Practice now 0/4

Set up a practice folder and confirm the reading

Ready when the AI lists both names and the correct first and last line of each one, before you ask for the summary. About 10 minutes. On the computer, follow the steps. On your phone, write the two notes in the notes app and paste them into the chat, each one with the step 4 header.

The practice folder has only made-up text, so nothing real leaves your computer. That’s the one you attach, and that’s the one you would choose in Desktop. If the list comes back with the wrong or missing name, don’t ask for the summary: resend the file and ask for the list again.

You just separated an access problem from a request problem, before it turned into the wrong answer.

Lesson cheat sheet

Access before the work

  1. Desktopreaches the folders you authorize, not all of them.
  2. A subfolderwith only what the task needs, preferably copies.
  3. List firstthe name, the first and last line of each file, before the summary.

Your next step

You already know how to confirm what the AI read before trusting what it wrote.

For the next file task, send first: "List the files you received, with the first and last line of each". It takes one message.

In the next lesson: the file was read. But where does the work happen, and what happens if you close the notebook?

Additional material · Desktop brings the files closerFull text of the topic in OSWork v2. Doesn't count toward lesson time.

What it is

Desktop means an app installed on your computer. In compatible environments, it can access folders and apps with permissions. Having the app doesn't give universal access to your documents. If a tool is unavailable, provide the files via a supported path.

Why learn

Many task failures are access failures: the student assumes the agent sees a folder, but it wasn't shared. Verifying the context before execution avoids conclusions about documents the model never read.

Key concepts

Authorized folder; local access; tool available; read confirmation.

In practice

A folder contains three budget versions. The manager authorizes only the examples subfolder and asks the agent to list the files it can read before comparing.

Sequence to try

  1. Prepare a training copy.
  2. Create a training folder with two fictional texts. Confirm the read names before requesting a summary.
  3. Record the observed result and the next correction.

Lesson 9 · OSWork v6.2 · INEMA.CLUB PRO

Module 2 · Lesson 4 of 6

Know where the work happens

At the end of the day, in an empty classroom, a teacher with her bag on her shoulder closes the notebook lid and wonders whether the work continues after the computer sleeps.

You can write, for your own task, where it runs, where it reads the inputs, and where it saves the results.

A task doesn't stay permanent just because you started it on a modern screen. If you don't know where it runs, you don't know why it stopped. Or where to look for the result.

In 1 minute

  1. Local execution runs on your computer, and it stops if it sleeps.
  2. In the cloud, you can keep going without your machine, but you only see the files that have reached it.
  3. Write down three places: where you run, where you read, where you save.

1Local depends on your computer

In local execution, the work runs on your machine. It’s like a cake in your home oven: if the power goes out, the oven stops.

Power, network, and your computer’s permissions matter. If the notebook sleeps, the task can stop halfway through.

Lúcia asked the app Desktop, from lesson 9, for a review of lesson plans that only exist on her notebook. She closed the lid at 6:00 PM and left. The next day, the review had stopped halfway through.

Task · review lesson plans
1 Runs: on Lúcia’s notebook
2 Reads: the Planos do bimestre folder, on the notebook
3 Saves: in the same folder
4 Notebook closed at 6:00 PM: the review stopped halfway through
  1. 1The work runs on her machine.
  2. 2The files are also on it.
  3. 3The result stays right there.
  4. 4The machine slept, so local work may stop.

2The cloud keeps going, but you only see what it received

In the cloud, the work runs on remote computers. It’s like a bakery: the oven doesn’t depend on your home. But the baker only has the ingredients you brought.

The chat you already use is an example: the model works on the company’s computers. That’s why it only knows what you pasted or attached.

Denise wants the draft of her attendance report to be ready even if she turns off the notebook. For that, the spreadsheet needs to be somewhere the cloud can reach.

Local

Depends on: your turned-on computer, with network.

Reads: the folders on your machine that you allow.

Cloud

Depends on: the tool and your plan, not your machine.

Reads: only the files that were sent or connected to it.

Neither is better. Each one has a dependency you need to know.

3The screen name doesn’t say where it runs

Some environments run in the cloud and keep going without your machine turned on. That depends on the feature, not just the name Work or whether the screen is modern.

When in doubt, replace the assumption with three questions. Look for the answer in the tool’s help page. Or test: start a short task, close your notebook for ten minutes, and see if it made progress. Couldn’t tell? Turn it into an open item. In your everyday chat, wait for the full answer to appear before closing the tab. That way you don’t have to guess what happens to a response halfway through.

Assumption

"I started in Work, so it runs on its own."

"The result must be somewhere."

Three questions

Where does this task run?

Does it keep going with the notebook closed?

Where does it save what it creates?

Test yourself

Denise started a task in Work and closed the notebook. Does the task keep running?

4Three lines on the project sheet

For each task, write where it runs, where it reads the inputs from, and where it saves the outputs. Don’t know one of them? Write it as an open item. A written open item is better than a forgotten assumption.

The right place is the project sheet, created in lesson 5. Didn’t do lesson 5? Use any notepad.

Denise wrote the three lines from the attendance report and an open item. With the open item, she went to ask the school’s support.

Project sheet · attendance report
1 Runs: in the cloud, according to Work’s help
2 Reads: the attendance spreadsheet sent with the task
3 Saves: the draft goes back into the same task; I store it in the Reports folder
4 Open item: I don’t know how long the draft stays saved in the task
  1. 1Where it runs.
  2. 2Where the inputs come from.
  3. 3Where the output goes.
  4. 4What you still don’t know, written down.

Stuck here? That's normalLocal and cloud feel abstract until the first task stops. If you can’t answer a line, write "open item" and keep going. The lesson still meets its goal: you know what you need to find out.

Practice now 0/3

Write where one of your tasks runs, reads, and saves

Done when you have three lines, or two lines and one open item, for a real task. About 8 minutes, on your computer or phone, in the project sheet or in a notepad.

It’s just notes: nothing is run or sent. If no answer comes back, that’s fine. Three written open items already show what to ask.

Task: <ex.: review lesson plans>
Runs: <on my computer / in the cloud / don’t know>
Reads the inputs from: <which folder or file>
Saves the outputs to: <where the result is>
Open item: <what I still don’t know>

You just mapped where your work happens—something almost nobody does before the first failure.

Lesson cheat sheet

Where the work happens

  1. Localfor the computer to sleep.
  2. Cloudcontinues, but only with the files you received.
  3. Three linesruns, reads, saves. The rest is pending.

Your next step

You already know how to say where a task runs and what it depends on to keep going.

Before you close your notebook with an open task, read the "Runs" line from your card.

Next lesson: combine request, files, and verification into a single text—the delivery contract.

Additional material · Local and cloud are execution choicesFull text of the topic on OSWork v2. Doesn’t count in lesson time.

What it is

Local execution runs on your machine. Cloud execution runs on remote infrastructure. A local job depends on power, network, and computer permissions. Some environments offer cloud execution that continues without the machine being on; this depends on the functionality, not just the Work name.

Why learn

An automation doesn’t stay permanent just because it was started in a modern interface. You need to know where the process lives, where the files are, and which connections it depends on.

Key concepts

Execution location; persistence; file access; continuity.

In practice

A file review that exists only in the notebook can stop if the computer sleeps. A service on the VPS continues, but it only knows the files transferred to it or connected to it.

✓ Do it

In your record, write where the task runs, where it reads inputs and where it saves outputs. If you don’t know, treat this as a pending item.

✗ Avoid

Mix the training copy with private files or production work.

Lesson 10 · OSWork v6.2 · INEMA.CLUB PRO

Module 2 · Lesson 5 of 6

The request becomes a delivery contract

A curriculum coordinator fills out, on a clipboard, a form with fixed fields, like a work order, with the meeting agenda printed next to it and the notebook open.

You can fill in all six parts of a delivery contract and swap "good" for a criterion another person can check.

The AI doesn’t need to guess whether you want an explanation, a file to edit, or a ready text to publish. When you name what must exist at the end and how to verify it, the detour shows up before it becomes rework.

In 1 minute

  1. Six parts: objective, inputs, output, limits, verification, and stopping.
  2. These are fields of a delivery order, not magic words.
  3. "Good" becomes a criterion you can check by looking at the result.

1Six fields, one sentence each

Think about the service work order of a technical support shop. It has fixed fields: the device, the problem, what not to touch, how to test on delivery. Nobody writes "fix it properly".

The delivery contract is the work order of lesson 8 with a sixth part: verification. The lesson 6 authorization, in module 1, fits inside it: objective and stopping continue, files become inputs, actions and time become limits.

Denise wants the draft minutes from the educational meeting based on the agenda. She filled in all six fields in four minutes.

Delivery contract · meeting minutes
1 Objective: draft minutes of the educational meeting, with the items from the agenda, for her to complete with the decisions
2 Inputs: only the agenda pasted below
3 Output: minutes with one line per agenda item and the person responsible for each
4 Limits: preserve all the responsible parties; do not invent dates or names
5 Verification: say whether all agenda items and responsible parties are in the minutes; mark missing dates
6 Stop: deliver the draft and send nothing else
  1. 1What it’s for.
  2. 2What the AI can use.
  3. 3What must be there at the end.
  4. 4What she can’t do.
  5. 5How to check.
  6. 6Where she stops.

2Name what must be there at the end

"Make minutes" leaves the format, size, and what to do with what’s missing open. The contract answers all three: fixed format, defined length, and absent data marked. The AI stops guessing.

AI chat

YouMake good minutes for this meeting. [agenda pasted]

AIMinutes of the Educational Meeting, held on March 12, at 2:00 PM, in the teachers' room. The following teachers were present…

The date, time, and location were not in the agenda. The AI filled them in with a guess.

You[the six contract fields] Agenda: 1. Science fair calendar. Responsible: Lúcia. 2. Math reinforcement. Responsible: Marcos. 3. Science fair materials.

AIDraft minutes. Date: [not provided in the agenda] 1. Science fair calendar. Responsible: Lúcia. 2. Math reinforcement. Responsible: Marcos. 3. Science fair materials. Responsible: [not provided]. Verification: the 3 items and the 2 responsible parties from the agenda are in the minutes. The missing date and responsible party were marked. I did not send anything.

Nothing was invented, and what was missing appears marked.

Tap the two buttons and look for what the AI invented in the common request.

3Replace "good" with a criterion you can verify

"Good", "clear", and "complete" are wishes. Nobody can verify a wish. Verification uses criteria that anyone can check by looking at the result, like the quality ruler of lesson 4.

Lúcia asked for experiment scripts that were "well explained." She replaced that with two criteria. Now she checks each script in one minute.

Desire

"A well explained and complete experiment script."

Criterion

Every step starts with a verb.

Every material mentioned in the steps is in the materials list.

Net gain: two criteria that any peer can verify without asking what she meant.

4The easier it is to check, the earlier the deviation shows up

An easy-to-inspect outcome shows the error on the first read. That’s why the contract asks for a fixed format and a written check at the end.

In Denise’s minutes, the check said "2 responsible parties". She counted in the agenda and in the minutes: 2 and 2. It took 30 seconds, because the minutes was a list.

Hard to check

A one-page, continuous text about the meeting.

To find an error, you reread everything.

Easy to check

One item per agenda point, with the responsible person.

You compare line by line with the agenda.

Test yourself

Which of these checks can another person verify by looking at the result?

Stuck here? That's normalSix fields look like a lot the first time. Write one sentence per field, even if it’s short. If a field doesn’t apply, write "none". The field that makes the biggest difference is the check.

Practice now 0/3

Fill out a delivery contract and send it in the chat

Ready when the response ends with the verification you asked for and you’ve checked a direct criterion in the material. About 10 minutes, in the chat you already use.

Use an invented agenda, with no real names. The prompt asks that nothing be sent; in lesson 12 you check whether it was like that. Save the response: lesson 12 uses this submission for the review.

OBJECTIVE
<ex.: revised meeting agenda, ready for me to send>

INPUTS: USE ONLY THIS MATERIAL
<paste an invented agenda with five items>

OUTPUT
<ex.: numbered list with the five items and the responsible person for each>

LIMITS
Don’t invent dates or names. Missing data becomes [not provided].

CHECK
Say whether the five items are in the output and mark what’s missing.

PROMPT
Submit the revised agenda and send nothing else.
See the template already filled in by a teacher

Objective: revised meeting agenda for parents of the 8th grade.
Inputs: 1. Term grades, with the science teacher. 2. Science fair, with coordination. 3. Phone use. 4. Trip to the museum. 5. Questions.
Output: numbered list with the five items and the responsible person for each.
Limits: don’t invent dates or names; missing responsible party becomes [not provided].
Check: say whether the five items are in the output and mark what’s missing.
Prompt: submit the revised agenda and send nothing else.

You just wrote a request that says what must exist at the end and how to check.

Lesson cheat sheet

Delivery contract

  1. Six fieldsobjective, inputs, output, limits, check, prompt.
  2. Output with namefixed format, easy to compare with the source.
  3. Criterioninstead of "good", something you can verify by looking.

Your next step

You already write requests that say what must exist at the end and how to check.

Take the request you repeat most at work and replace a "good" of it with a criterion.

Next lesson: the AI said "ready". How do you know it’s truly ready?

Additional material · Write a delivery contractFull text of the topic in OSWork v2. Does not count in lesson time.

What it is

A good request includes an objective, context, inputs, constraints, a result, and verification. These are fields of a shipment, not magic words. The easier it is to inspect the output, the easier it will be to catch a deviation before it turns into rework.

Why learn

The agent doesn’t need to guess whether you want an explanation, an editable file, or a publication. Naming the artifact and the ready condition shortens the distance between intent and execution.

Key concepts

Artifact; format; authorized sources; observable criterion.

In practice

“Use pauta.txt to create ata-rascunho.md. Preserve all responsible parties, flag missing dates and do not send anything.” This request determines inputs, output and a concrete limit.

Try it now

Use the file materiais/contrato-de-tarefa.md. Fill each field with a sentence and replace “good” with a criterion that someone can verify.

  • Goal
  • Input
  • Output
  • Limits
  • Check
  • Stop
The six parts of a delivery contract. Without the check and the stop, you get text instead of work.

Lesson 11 · OSWork v6.2 · INEMA.CLUB PRO

Module 2 · Lesson 6 of 6

Ready is after the review

In the teachers' room, a teacher checks line by line an printed minutes document against the printed agenda next to it, pointing to a line with a pen, with the notebook open nearby.

You can verify a fact, a format, and an action in an AI delivery. And note what you observed in each one.

The word "ready" doesn’t show that the file opens or that the data was kept. A small review you do yourself usually finds more problems than asking again to "improve".

In 1 minute

  1. The delivery only ends after your review.
  2. Check three things: a fact, a format, and an action.
  3. Ask the AI what it checked, and separate test done from suggested test.

1Open the delivery and compare it to the source

It’s like checking a grocery bag against the receipt before you leave. It’s not enough for the bag to be full. Each item on the receipt has to be there, and nothing extra.

Lúcia received the minutes from the sciences area meeting. She compared each decision with the agenda. She found a responsible person the AI invented.

Agenda (the source)

1. Lab schedule. Responsible: Lúcia.

2. Purchase of reagents. Responsible: not defined.

Minutes received

1. Lab schedule. Responsible: Lúcia.

2. Purchase of reagents. Responsible: Paulo.

Net gain: an invented name, found in two minutes of comparison.

The minutes looked complete. Only line-by-line comparison revealed the name that didn’t exist on the agenda.

2 Three reviews: fact, format, action

You don’t need to reread everything. Choose three points. A fact that matches the source. A format, which is what was requested. And an action, that works or was done the way it was agreed.

In the attendance report, Denise checked the total number of absences for a class and whether the file opened with the requested columns. Then, she tested the spreadsheet link mentioned in the report.

Review · attendance report
1 Fact: the total absences of 7th A matches the spreadsheet sum
2 Format: the file opens and has one column per month
3 Action: the spreadsheet link, cited in the report, opens
  1. 1A number, name, or date compared with the source.
  2. 2Open the file and check whether it contains what was requested. In the chat, check whether the response includes the requested items or columns.
  3. 3Test what should work, like a link or a sum, or confirm what shouldn’t be done.

3Tested is not the same as suggested

Ask the AI for the evidence of what it checked. And ask it to separate what it truly verified from what it only suggests you check.

"I reviewed everything" doesn’t say what was reviewed. A list does: and it shows what’s left for you. Even the AI’s "I verified" is a claim—check one item from the list as a sample.

AI chat

YouAre you ready to sign the minutes?

AIYes! I reviewed everything and it’s correct.

It doesn’t say what was verified. You can’t know.

YouShow what you verified, side by side with the agenda, and say what you left unverified.

AIAgenda 1, Lab time → minutes 1, Lab time: same. Agenda 2, Purchase of reagents → minutes 2, Purchase of reagents: same. Not checked: whether each responsible person is the same as in the agenda. I suggest you compare that column.

The items appear side by side for you to verify, and what’s missing is stated: the responsible persons column.

Tap both buttons. The second answer points out what still depends on you.

Test yourself

Which of these AI answers includes evidence that you can verify?

4Write down and correct the request—not just the text

Write down what you observed in each verification, with the exact result. Did you find an error? Correct the request too before reusing it, or the source if the mistake came from it. If not, the same error will come up again next time.

Lúcia corrected the name in the minutes. Then she added a line to the delivery contract: "responsible that the agenda doesn’t define becomes [not informed]".

Review record · science area minutes
1Fact: item 2 with an invented responsible person ✗
2Format: one agenda item per bullet ✓
3Action: nothing sent ✓
4Correction in the contract: responsible person that the agenda doesn’t define becomes [not informed]
  1. 1What you saw, with the result.
  2. 2Verified format.
  3. 3Verified action.
  4. 4The change that prevents the error from coming back.

Stuck here? That's normalDid you find no errors at all? Great sign, and the verification mattered just the same. Write "✓" next to what you compared. The record shows that you looked—not just that you trusted.

Practice now 0/3

Check one fact, one format, and one action

Ready when you have three notes—one for each check—with the result you observed. About 10 minutes, on paper or in a notepad, on your phone or on your computer.

You only read and compare: nothing is changed or sent. Didn’t do lesson 11? Use the outline and the practice minutes right below.

Outline and practice minutes—for people who don’t have a submission

Outline: 1. Exam week, with coordination. 2. Room change for 8º B, with no responsible person defined. 3. June festival, with teacher Ana.

Received practice minutes: 1. Exam week. Responsible: coordination. 2. Room change for 8º B. Responsible: teacher Ivo. 3. June festival. Responsible: teacher Ana. Sent to the teachers group.

Answer key for the practice minutes

Fact: "teacher Ivo" isn’t in the outline; item 2 didn’t have a responsible person. Format: three items, one for each point in the outline—correct. Action: the minutes say it was sent to the group, and the sending wasn’t authorized. Correction to the request: "responsible person that the outline doesn’t define becomes [not informed]; don’t send anything".

You just did the part of the submission that no AI does for you: checking.

Lesson cheat sheet

Check the submission

  1. Compare with the sourceeach item from the source is there, and nothing more.
  2. Fact, format, actionthree points, each with the noted result.
  3. Evidencewhat the AI actually checked, separated from what it only suggested.

Your next step

You closed module 2: you’re already choosing between chat and encomenda, you confirm what the AI read, you know where the work runs, you write a delivery agreement, and you check the result.

When you have about 30 minutes, open the complementary material for this lesson and do the optional lab for the module, "From scattered question to encomenda".

In the next module: terminal and Codex in practice. The delivery agreement goes along with it—now with an AI that works in your folder.

Complementary material · Review the received workFull text of the topic in OSWork v2 and module closing. Doesn’t count in lesson time.

What it is

A submission only ends after the check. Open the file, compare numbers with the sources, and test the relevant links or formulas. Ask the agent for evidence of what it verified, distinguishing between test run and test suggestion.

Why learn

The word “ready” does not demonstrate that the file opens or that all data were preserved. A small independent verification often finds more problems than a new generic improvement request.

Key concepts

Open; compare; test; record limits.

In practice

The minutes have a list of decisions. The teacher confronts each decision with the agenda and finds an invented responsibility. She corrects the source or the request before reusing the procedure.

Try it now

Review three elements of your delivery: a fact, a format and an action. Note exactly the observed result for each.

Module lab: From loose question to finished deliverable

Use fictional files and a training folder. Practices with installation, Telegram, or VPS may require extra time for sign-up and configuration.

  1. Create a fictional meeting agenda with five items, without real names.
  2. Write a request with objective, materials, format and review criteria.
  3. Use Chat or Work available in your account to produce the revised outline.
  4. Check the five items, save the result and record an improvement in the request.

Task contract

Read the block before using. Fields like Your Name and usuario@ip-da-vps are examples to adapt; administrative commands belong only to your training environment.

Goal: prepare a revisable outline
Input: entradas/reuniao.txt
Output: saidas/pauta.md
Limits: do not send messages; do not invent dates
Check: the 5 original items are still present
Stop: deliver the file and report the open items

Ready criterion

Draft a work order with inputs, output and review. Record the produced file, the executed test and the observed result.

Criteria to review your delivery

Use this rubric after the lab. Each line asks for evidence; checking reading does not mean the practice was performed.

  • Scope — The delivery matches the objective of this lesson. If you didn’t pass: Reduce the task and name a single result.
  • Inputs — You know which files or data were used. If you didn’t pass: List the sources and remove material that’s unrelated.
  • Execution — The procedure was carried out in the training environment. If you didn’t pass: Separate what you planned from what you actually did.
  • Verification — A result was compared against a reference. If you didn’t pass: Open the file or repeat a verifiable query.
  • Secrets — No token, password, or private data was shared. If you didn’t pass: Review the work copy before sending anything.
  • Continuity — Another person can find the next step. If it didn't work: Update README and record a concrete pending issue.

Check what remained

You only need an explanation of two sentences. Must you necessarily use Work?

View commented answer

No. Choose the interface based on the result you need; Chat may be enough.

If your answer was different, return to the corresponding topic and write the difference in one sentence. The check does not block your study.

Module summary

  • Conversation; clarification; draft; human review.
  • Goal; sources; delivery; limits; stop condition.
  • Authorized folder; local access; tool available; read confirmation.
  • Execution location; persistence; file access; continuity.
  • Artifact; format; authorized sources; observable criterion.
  • Open; compare; test; record limits.

Consult the source

Tools verified on 20/09/2026; screen names and availability may change.

Lesson 12 · OSWork v6.2 · INEMA.CLUB PRO

Module 3 · Lesson 1 of 6

The terminal starts by telling where you are

A science teacher in a lab coat looks calmly at the notebook open in a dark window, with a printed map of the school on the desk and a red sticker marking a room.

You can open the terminal, type two commands, and tell where the folder is and what's inside it.

Starting in this module, the AI works in a folder on your computer. If you don't know what folder you're in, it doesn't know either. A lot of what looks like an AI failure is just the wrong folder.

In 1 minute

  1. The terminal is a window where you write a command and read the response.
  2. pwd tells where you are. ls tells what is there.
  3. First the location, then the files. These two commands change nothing.

1Each system has its own terminal

The terminal is already included on your computer. You just need to know where it is. The commands in this course are written in Bash, the terminal language on Linux and macOS. Mac uses a variation of it, and the commands work the same.

On Windows, they work inside the WSL. The terminal that comes with Windows uses a different language. Don't paste the course commands into it without adapting them.

Lúcia uses a notebook with macOS. She pressed Cmd+Space, typed "Terminal", and hit Enter. It took ten seconds.

Where the terminal is
1 macOS
Cmd+Space, type "Terminal" and Enter
2 Linux
search for "Terminal" in the apps list
3 Windows
WSL, or the official path for Windows (lesson 14)
  1. 1On the Mac, search finds the Terminal by its name.
  2. 2On Linux, search by name.
  3. 3On Windows, the course commands require WSL.
Windows usage: how to get WSL

WSL is from Microsoft itself. Open the Start menu, search for "PowerShell", right-click › Run as administrator. Type the command below, press Enter, and restart the computer when it asks.

PowerShell · administrator
> wsl --install

After you restart, search for "Ubuntu" in the Start menu: this window is the terminal where the course commands work. On the first run, it asks for a new username and password: write the password down somewhere safe.

Stuck here? That's normalIs the computer from the school or did it ask for a password you don't have? Don't force it: read this lesson today and ask the WSL installation from whoever manages the computer. In lesson 14, the official page of the Codex also shows the path for Windows.

2You type one line, it returns another

When you open it, the terminal shows a short line that ends with $, with a blinking cursor. On the Mac, it ends with %: it’s the same thing. It’s the computer waiting for your command.

You type the command and press Enter. The response appears right below. Then the $ comes back, ready for the next one.

Denise opened the terminal for the first time and waited for something to happen. Nothing happened, because it was waiting for her.

Terminal
denise@notebook:~$ pwd
/home/denise
denise@notebook:~$ 

The line with $ (on the Mac, %) is your turn to type. The line without $ is the computer’s response.

Command, response, and the $ back: it’s always this back-and-forth.

3pwd is the "you are here"

Do you know the school map with the "you are here" sticker? The pwd command does that. It tells you the full path of the folder you’re in right now.

Read the path like an address. Each slash separates a folder, and the last one is where you are. On macOS, your personal folder starts with /Users; on Linux, with /home.

Lúcia typed pwd and read /Users/lucia. So she was in the personal folder, the same one that opens when you click the little house in Finder.

Terminal · macOS
$ pwd
/Users/lucia

A single line: Lúcia’s personal folder. Nothing was created or deleted.

The pwd command only informs. Use it whenever you’re unsure where you are.

4ls shows what’s in the folder

Once you know where you are, see what’s there. The ls command lists the folders and files in the current location, side by side. On the Mac, the personal folder’s folders appear with English names, like Documents and Downloads.

To change folders, use cd. It’s in lesson 16. For now, just know that the starting folder matters.

Denise opened the Codex in the Downloads folder, during a test by a colleague. He couldn’t see her project, which was in another folder. The pwd would have shown that earlier.

Terminal · Linux
$ pwd
/home/denise
$ ls
Documentos  Downloads  Imagens  Músicas

First the location, then the contents. The names change from one computer to another.

The ls shows what the program will see if it starts working from there.

Test yourself

Lúcia typed ls and the project folder didn’t appear in the list. What does she check first?

Practice now 0/3

Ask the computer where you are

Ready when you’ve written down the answer from pwd and three names that ls showed. About 8 minutes, on the computer.

Those two commands only read: nothing is created, moved, or deleted. If you see “command not found”, check what you typed: everything in lowercase, with no space in the middle. On Windows without WSL, stop at step 1 and continue with lesson 14.

pwd
ls

You just read, in the terminal, where you are and what’s there, without changing anything.

Lesson cheat sheet

First commands

  1. Terminalyou type a line, it returns the answer.
  2. pwdthe folder you’re in right now.
  3. lswhat’s in that folder.

Your next step

You already know how to ask the computer where you are and what’s there.

Tomorrow, open the terminal again and type pwd before anything else. Takes ten seconds and becomes a habit.

In the next lesson: put Codex on your computer from the official source, and confirm that it worked with a command.

Additional material · Terminal is an entry doorFull topic text in OSWork v2. Doesn’t count toward lesson time.

What it is

Terminal is the window where you type commands for the computer. Shell is the program that interprets those commands. Here, the terminal examples use Bash on Linux or macOS; on Windows, use a Bash environment via WSL or follow the official installer for Windows. Don’t paste Linux commands directly into PowerShell without adapting them.

Why learn

Knowing which environment you are in avoids errors that seem like AI failures. The cd command changes the current folder; pwd shows the location in Bash. You do not need to memorize dozens of commands to get started.

Key concepts

Terminal; shell; current folder; command and response.

In practice

If you open Codex in the Downloads folder, it is not automatically working inside meu-primeiro-projeto. You need to choose the starting folder.

✓ Do it

In Bash, run pwd and then ls. Read the output: first the location, then the files. Do not change anything in this step.

✗ Avoid

Accepting a conclusion without checking the input that supports it.

  • Open the terminal
  • Enter the folder
  • Authenticate
  • Ask for the task
Order matters: entering the right folder before asking prevents work done in the wrong place.

Terms for this section: port.

Lesson 13 · OSWork v6.2 · INEMA.CLUB PRO

Module 3 · Lesson 2 of 6

A new program comes from the official source

A coordinator in glasses checks with her finger the sealing tape on a box delivered to the office before opening it, with the notebook open next to it.

You can install the Codex using the official address and confirm, with a command, that the computer recognizes it.

On the internet, "faster" commands circulate to put programs on your computer. Pasting a command without checking can run anything. Checking the source takes a minute and avoids that risk.

In 1 minute

  1. Putting the program in place, signing in with your account, and opening it in the folder are three different steps.
  2. The command comes from the official page. Check the address before you paste it.
  3. codex --version confirms it worked.

1Three steps, one at a time

Installing puts the program on your computer. It does not connect your account or choose your work folder. Each thing has its own step and its own check.

This lesson only covers the first one. The other two come in lessons 15 and 16.

Right after installing, Lúcia typed codex and the program asked her to sign in with her account. She thought it was broken. It wasn’t: the first step had worked, and the second one was missing.

From zero to the first request
1 Put the program on your computer · this lesson
2 Sign in with your account · lesson 15
3 Open in the project folder · lesson 16
  1. 1Check with codex --version.
  2. 2It has its own check in lesson 15.
  3. 3Check with pwd, from lesson 13.

2Check the seal before opening the box

When a box arrives in the office, you check the seal and the sender before you open it. With a command, it’s the same: the sender is the address it comes from.

The official command downloads a script from the address chatgpt.com and runs it. That’s why the address matters so much. Don’t paste commands from an unknown page.

Denise received a "faster way" to put Codex on the computer in a group. The address in the middle of the command wasn’t the official page’s address. She didn’t paste it and used the official page instead.

✗ Message from the group

Address in the command: a site with "codex" in the name, but not chatgpt.com.

Who guarantees: nobody.

✓ Official page

Address in the command: https://chatgpt.com/codex/install.sh

Who guarantees: the company that makes the program, on the installation page.

Read the address inside the command, not just the message title.

3Paste the command and wait for the last line

On macOS and Linux, the command from the official page is the one below. On Windows with WSL, paste the same command inside the Ubuntu. Without WSL, follow the official Codex page, which has its own instructions.

Use the copy button: you don’t need to type the vertical bar. The installer writes a few lines while it’s working, and you don’t need to understand each one. Wait for $ (on Mac, %) to come back. The one that confirms it worked is step 4.

Lúcia pasted the command into the Mac Terminal and waited. She didn’t try to decipher the lines that scrolled by. When the % returned, she moved on to the check.

Terminal · macOS or Linux
$ curl -fsSL https://chatgpt.com/codex/install.sh | sh

It’s one line, even if your phone screen breaks it into multiple lines. curl downloads the file from the address; the vertical bar pipes it to the sh, which runs its commands.

The address in the middle of the command is the seal: make sure it’s chatgpt.com.

4codex --version confirms

To see if it worked, ask for the version. If the computer recognizes the program, it responds with a number.

If you see "command not found", the terminal hasn’t found the program yet. Close the terminal, open it again, and repeat.

On Denise’s laptop, the first attempt returned "command not found". She closed the terminal, opened another one, and typed it again. The version number came back.

Terminal
$ codex --version
codex: command not found
$ # fechou e abriu o terminal de novo
$ codex --version
codex-cli 0.156.1

"command not found" means "I didn’t find this program". After reopening, the version came back. The number changes over time.

Any version number in the response means this: it’s on the computer, and the terminal found it.

Stuck here? That's normal"command not found" right after the first time is common: the terminal that was already open didn’t know about the new program. Close, open again, and repeat codex --version. Did it continue? Copy the error message, with no password at all, and take it to whoever manages the computer.

Practice now 0/3

Install Codex on your computer and check the version

Ready when codex --version responds with a number. About 10 minutes, on the computer, with internet.

The command only works if it matches the one on the official page: check that it’s chatgpt.com. If it asks for your computer password and it’s yours, type yours: the letters won’t appear while you type. If the computer is from your school, pause and talk to whoever manages it.

Step 2 · paste into the terminal

curl -fsSL https://chatgpt.com/codex/install.sh | sh

Step 3 · paste into the new terminal

codex --version

You just put a program on your computer using the official source and verified that it’s there.

Lesson cheat sheet

From the official source

  1. Three steps put the program in, sign in with the account, open it in the folder.
  2. Address the command comes from the official page; check chatgpt.com.
  3. Version a number in the response means it worked.

Your next step

You already know how to put a program on your computer without pasting a command from a questionable origin.

On your project sheet, write this on one line: "Codex · version <the number> · source: official page". It takes one minute.

Next lesson: the program is on your computer, but it still doesn’t know who you are. You will sign in with your account without showing any password.

Additional material · Install from the official sourceFull text of the topic in OSWork v2. Doesn’t count toward lesson time.

What it is

The official Codex page offers an installer for macOS/Linux and specific guidance for Windows. Installing means adding the program to the machine. The installation command downloads and runs an official script; read the source, verify the domain, and use your own account. Don’t run commands received from unknown pages.

Why learn

Installation, login, and running are different steps. A installed program still needs authentication. A completed login doesn’t mean you opened the right folder.

Key concepts

Official source; installation; version; diagnostics.

In practice

After installation, terminal shows the version recognized by codex --version. If you see “command not found”, reopen the terminal and check the path indicated by the installer.

Try it now

On macOS/Linux: curl -fsSL https://chatgpt.com/codex/install.sh | sh. Then check with codex --version. See the source at the footer for other platforms.

Lesson 14 · OSWork v6.2 · INEMA.CLUB PRO

Module 3 · Lesson 3 of 6

Sign in without showing the key

A confident teacher in a lab coat holds the school ID badge by the lanyard in front of the open notebook on a screen showing a sign-in page, with a small locked metal box on the desk.

You connect the Codex to your account, check which method it used to enter, and record only that method in the form, with no password.

A key pasted into a message, an example, or a screenshot can be used by someone else, and the account is yours. You can also be connected using the wrong method and spend from an account you didn’t expect.

In 1 minute

  1. codex login opens the browser so you can sign in with your ChatGPT account.
  2. codex login status tells by which method you signed in.
  3. On the form it will say "ChatGPT" or "API". Never the key.

1 The badge passes through the turnstile; the password stays with you

At school, you pass your badge through the turnstile and no one hears your password. The Codex login works like this: the terminal takes you to the browser, and that’s where you sign in.

The password never goes through the terminal. When you’re done in the browser, Codex receives the confirmation and stores what you entered.

ChatGPT plans that include Codex change over time. Before you start, check on the official authentication page whether your plan is listed there. The name of your plan shows up in the settings of your ChatGPT account.

Lúcia typed codex login. The browser opened on the ChatGPT sign-in screen. She signed in with the school account and went back to the terminal.

Terminal
$ codex login
# o navegador abre; entre com a conta do ChatGPT e volte ao terminal

The first line is what you type. The second is a course reminder: the rest happens in the browser.

No password is typed in the terminal on this path.

2codex login status tells you the method

Being signed in isn’t enough: it matters which path you use. Signing in with your account uses that plan. A API key is charged per usage, on another account.

That difference is from lesson 5, in module 1. If you skipped it, here’s the summary: it’s two accounts, with two charges.

Denise expected to see "ChatGPT" and saw that Codex was signing in using an old school API key. She left with codex logout and signed in again with codex login, using the account.

Terminal
$ codex login status
Logged in using ChatGPT

In English: "signed in using ChatGPT". The method is the account. With an API key, the response mentions the key, but never the full value.

Read the response before asking for any long task.

3Through the API, the key doesn’t appear on the screen

Are you going to sign in via your ChatGPT account? You can skip this step. If you use the API, the key is stored under a name, OPENAI_API_KEY, which the terminal knows. The official command passes the value directly to Codex, without showing it on the screen.

Typing the key into the command is the common mistake: it stays in the terminal history and shows up in any print. A standalone .env file also doesn’t connect anything. Some mechanism has to load the value.

A coworker asked for the school key to test at home. Lúcia didn’t send it in the group. She explained that the key tells who pays, and each person signs in with their own account.

✗ Key in the command

How it looks: codex login --with-api-key followed by the full key.

Result: the key stays in the history and in any screen print.

✓ Official command

How it looks: printenv OPENAI_API_KEY | codex login --with-api-key

Result: the value goes straight to the program. On the screen, you only see the command.

Both connect. Only the second one doesn’t spread the key.

4On the form: the method; the key, never

In the project sheet, which method is active and where you checked it. It’s the same access sheet from lesson 5. No sheet yet? A note on your phone is enough.

The credential doesn’t go in the sheet, into a request, or into a screenshot. If it leaks, whoever manages the account needs to rotate the key.

Denise’s line ended up like this: "Codex · ChatGPT · checked with codex login status". No password, no piece of key.

Denise sheet · access
1 Tool: Codex
2 Method: ChatGPT
3 Where you checked: codex login status
4 Credential: not written down

Stuck here? That's normalDon’t know whether you use ChatGPT or an API? Start with your ChatGPT account, with codex login: that’s the path with no key at all. Did the browser not open by itself? Check whether the terminal showed an address, and open that address in the browser.

Practice now 0/3

Connect Codex and write down only the method

Done when codex login status reports the method and the sheet has that line, with no password. About 8 minutes, on the computer.

In this approach you don’t type a password in the terminal: it stays in the browser. Didn’t do lesson 14? Check first with codex --version. Computer of another person? When you’re done, sign out with codex logout.

Step 1 · paste into the terminal

codex login

Step 2 · paste into the terminal, after you sign in in the browser

codex login status

You just connected a program to your account and recorded how, without exposing any credential.

Lesson cheat sheet

Connect without exposing

  1. codex loginthe sign-in happens in the browser.
  2. codex login statusshows the method: account or key.
  3. Sheetwrites the method; the credential stays out.

Your next step

You already know how to connect Codex and state which account the usage comes from.

Today, in your email and in your work conversations, look for any key or password pasted as text. Found it? Delete it and notify whoever manages that account.

In the next lesson: Codex is connected, but which folder will it work in? You’ll create a training folder and open Codex inside it.

Additional material · Authenticate without spreading secretsFull text of the topic on OSWork v2. Doesn’t count toward the lesson time.

What it is

Run codex login and complete the browser flow to sign in with ChatGPT. If you choose the API, the key needs to be in the variable OPENAI_API_KEY; forward it through standard input, without typing it in the command. A single .env file doesn’t authenticate Codex: some mechanism must load the variable.

Why learn

Pasting the key in examples, messages, or history can expose the account. It is also possible to be authenticated by the wrong method and consume a different modality than expected.

Key concepts

codex login; codex login status; standard input; active account.

In practice

For the API, the documented command is printenv OPENAI_API_KEY | codex login --with-api-key. It sends the value directly to the program instead of displaying the key on the screen.

Sequence to try

  1. Prepare a training copy.
  2. Choose a method, complete the login and run codex login status. Record only “ChatGPT” or “API” on the project sheet.
  3. Record the observed result and the next correction.

Lesson 15 · OSWork v6.2 · INEMA.CLUB PRO

Module 3 · Lesson 4 of 6

Open the agent in the right folder

A coordinator wearing glasses stops at the door of a small, neatly arranged meeting room and looks inside before entering; on the desk, only a notebook and two sheets.

You can create a training folder with three fake files, enter it using the terminal, and open the Codex there.

Codex works in the folder it was opened in. In the wrong folder, it reads things it shouldn’t and doesn’t find what it needs. A small folder, with only the task material, makes it clear what it could touch.

In 1 minute

  1. The working folder is the task room: only its material.
  2. The README explains the project to people; AGENTS.md gives the rules to the agent.
  3. cd enters the folder, pwd confirms, and only then codex.

1Enter the room before you start the lesson

If you enter the wrong room, you give the lesson to the wrong group. With Codex it’s the same: it works where it was opened. So you enter the folder before you open the program.

mkdir -p creates the folder, and the previous ones if they’re missing. cd enters it. The ~ sign means "my personal folder": on the Mac Finder, it’s the folder with your name and the house icon.

Denise created the training folder and entered it. The pwd confirmed the address before she opened any program.

Terminal
$ mkdir -p ~/projetos/meu-primeiro-projeto
$ cd ~/projetos/meu-primeiro-projeto
$ pwd
/home/denise/projetos/meu-primeiro-projeto

The first two commands don’t show anything when they work. The one that confirms is pwd.

The last folder in the address is the task folder: that’s where Codex will work.

2Inside the folder, only the task material

You don’t need to open your entire personal folder to experiment. A small area, with training files, reduces confusion. When something goes wrong, it’s clear which files could have changed.

Lúcia thought about opening Codex in the Documents folder, where the exams and class notes are. She preferred the training folder, with a fake agenda. Nothing real was within reach.

my-first-project
1 README.md
2 AGENTS.md
3 inputs
reuniao.txt
  1. 1What the project is for.
  2. 2The rules for the agent.
  3. 3Working material: a five-item fake agenda.

3One file for people, another for the agent

The README describes the project’s purpose for anyone who arrives. The AGENTS.md gives working instructions to the agent.

Both end in .md because they are text in Markdown: the # marks the title, and the hyphen marks a list item.

Denise wrote the purpose in the README: prepare the meeting agenda. In AGENTS.md, she added two rules: work only in that folder and don’t send anything.

README.md · for people

# My first project

Training project for the OSWork course. Only fictional files.

Purpose: prepare the pedagogical meeting agenda from entries/reuniao.txt.

AGENTS.md · for the agent

# Instructions for the agent

- Work only inside this folder.

- Don’t send or publish anything.

Both are correct, each for a different reader. In module 4, AGENTS.md grows.

4Check the folder and open the Codex

Before typing codex, run pwd and ls. If the address and the files match, open the program there.

On the first time in a folder, the Codex asks if you trust it. It’s your training folder: choose "Trust and continue" using the arrow keys and press Enter. In this training, don’t use "Open restricted". To exit the Codex, type /quit and press Enter.

Lúcia checked the address, saw the three items in ls, and only then typed codex. She answered the folder question and exited with /quit, without asking for anything yet.

Terminal
$ pwd
/Users/lucia/projetos/meu-primeiro-projeto
$ ls
AGENTS.md  README.md  entradas
$ codex
Trust this folder? Codex can read, edit, and run files here,
subject to your permission settings. …
› Trust and continue
  Open restricted

In English: "Do you trust this folder? The Codex can read, edit, and execute files here, within its permissions." "Trust and continue" is "trust and continue"; "Open restricted" opens with restrictions. The answer is saved. The words may change a bit with the version.

Correct address, correct files, and only then the program.

Stuck here? That's normalThe question in English scares you the first time. It only shows up because the folder is new to the Codex. Confirm only for folders you know. If you’re unsure, exit with /quit (or press Ctrl+C twice) and check the pwd again.

Practice now 0/3

Set up the training folder and open the Codex in it

Done when the ls shows AGENTS.md, README.md, and entries, and the Codex opens in that folder. About 10 minutes, on the computer.

The block creates a new folder and writes three fictional files inside it: each cat > writes into the file everything up to the FIM line. Nothing outside it is touched. Use the block only in this new folder: in another folder, it would overwrite a README.md that was already there. Copy the entire block, up to the last ls. If the terminal sits there showing >, press Ctrl+C and paste the entire block again.

mkdir -p ~/projetos/meu-primeiro-projeto/entradas
cd ~/projetos/meu-primeiro-projeto
cat > README.md <<'FIM'
# My first project
Training project for the OSWork course. Only fictional files.
Purpose: prepare the pedagogical meeting agenda from entries/reuniao.txt.
FIM
cat > AGENTS.md <<'FIM'
# Instructions for the agent
- Work only inside this folder.
- Don’t send or publish anything.
FIM
cat > entradas/reuniao.txt <<'FIM'
Pedagogical meeting (fictional)
1. New library schedule
2. Science fair games
3. 8th grade remediation
4. Use the classroom notebooks from the computer lab
5. Exam dates: to be defined
FIM
pwd
ls

You just set up a small workspace and opened the agent exactly inside it.

Lesson cheat sheet

The right folder

  1. Task rooma small folder, only with its materials.
  2. README and AGENTS.mdone for people, one for the agent.
  3. Ordercd, pwd, ls, and only then codex.

Your next step

You already know how to open the agent in a folder you choose, not where the terminal was.

In the terminal, inside the training folder, type cat entradas/reuniao.txt and read the agenda. Those are the five items the Codex will read in the next lesson.

Next lesson: the first request to Codex. It will read the folder and tell you what’s missing, without changing anything.

Additional material · Go into the folder before askingFull text of the topic in OSWork v2. Doesn’t count in the lesson time.

What it is

The working folder is the task bench. Create a small area, with training files, before allowing changes. A README.md describes the purpose for people; AGENTS.md gives operational instructions to the agent. You don’t need to open your personal folder in full to experiment.

Why learn

A small scope reduces ambiguity and makes reviewing differences easier. When something goes wrong, it is clear which files should have been affected.

Key concepts

Local scope; README; AGENTS; input files.

In practice

The project contains README.md and entradas/reuniao.txt. The first task is to explain these two files. No access to personal documents or other projects is needed.

✓ Do it

In Bash: mkdir -p ~/projetos/meu-primeiro-projeto. Go into cd ~/projetos/meu-primeiro-projeto and start codex.

✗ Avoid

Mix the training copy with private files or production work.

Lesson 16 · OSWork v6.2 · INEMA.CLUB PRO

Module 3 · Lesson 5 of 6

First the agent reads, then it changes

A teacher in a lab coat reads printed sheets with a pencil in hand and makes small marks on a clipboard, with the notebook open beside it, before changing anything.

You can ask the Codex to read the folder with zero editing and check which files it used. Then, you authorize only the creation of a plan.md, which you double-check yourself.

A request like "fix the project" mixes diagnosis and change. If something goes wrong, you don’t know which part it was. Separating reading and changes gives you a reference for review.

In 1 minute

  1. First request: read and explain, without editing.
  2. Ask it to say which files it used, and confirm it with the ls.
  3. Then, a small change with a name: only the plan.md.

1Inspection before the renovation

No serious person starts a renovation by breaking down a wall. First comes the inspection: look, write notes, understand. With an agent, it’s the same order, in four steps.

Denise would ask Codex to "improve the meeting folder." She replaced it with two requests: first, read and say what’s missing; then, create a single file.

The order of the first job
1 Inspect: read and explain, without editing
2 Plan: say what’s missing
3 Alter: one file, with a name
4 Validate: you open it and check
  1. 1No files change in this step.
  2. 2The list of what’s missing is your reference.
  3. 3You say which file can be created.
  4. 4The last word is yours.

2The first request only reads

In the lesson 16 training folder, ask Codex to read the AGENTS.md and the README. Say it in plain words: without editing. And ask it to cite the files it used.

Lúcia made this request in the training folder. The response below is real, from Codex, in that same folder, just shortened.

Codex · my-first-project

YouRead AGENTS.md and README.md. Explain the purpose and list what’s missing, without editing. Say which files you used.

CodexThe purpose is to prepare the agenda for a pedagogical meeting using entradas/reuniao.txt. Missing: the produced agenda, the format, the output location, and how to verify the result. The input file exists, but I did not read its contents. Files read: AGENTS.md and README.md. I also consulted the file listing. Nothing was edited.

It explained, listed what’s missing, said what it read and what it didn’t read. No files changed.

3Check what it used

The list of files used shows what the answer is based on. Compare it with what ls shows in the folder.

In the real response, Codex read two files and said it didn’t open the agenda. So the list of what’s missing comes only from the README. That’s a good read, but it still doesn’t know the five meeting items.

Denise read "I did not read its contents" and understood the response limit. In the second request, she made it clear that the plan should rely on the agenda.

What it said it read

AGENTS.md

README.md

the list of files in the folder

What exists in the folder

AGENTS.md

README.md

entradas/reuniao.txt, with the five items

The difference between the two cards is exactly what the response still doesn’t know.

4Then, an alteration with a name

Now authorize a small change: create only plan.md, with three actions and one verification for each. The Codex can ask "Would you like to make the following edits?". Check that the change is only in plan.md and choose "Yes, proceed". If it’s another file, choose the option that starts with "No". Did it create without asking? That also happens: your current permissions let you write in the folder. Check with ls.

After that, exit with /quit and read the file with cat plano.md, which shows the content in the terminal. Check whether the actions rely on what exists in the folder.

The plan Lúcia received covers the five items on the agenda and warns that times and dates still need to be defined. She checked in reuniao.txt: everything was there.

Terminal
$ cat plano.md
# Plano de ações

Base: entradas/reuniao.txt (reunião pedagógica fictícia).
Horários e datas ainda precisam ser definidos.

1. Ação: Organizar o novo horário da biblioteca e as regras
   de uso dos notebooks da sala de informática.
   Verificação: Conferir se a proposta registra o horário
   da biblioteca e as condições de uso dos notebooks.
…

A real file created by Codex with request 2 from the practice, shortened. If you repeat it, the text comes out different; what you check is whether it relies on the agenda.

You check the plan against the agenda, not against your memory.

Stuck here? That's normalThe plan cited a file that doesn’t exist in the folder? Don’t start from zero. Ask for the specific correction: "That file doesn’t exist. Recreate plano.md using only the files from this folder."

Practice now 0/3

Read it, authorize the plan, and verify

Ready when plano.md exists in the folder and you’ve checked one of the verifications directly in reuniao.txt. About 10 minutes, on the computer.

The first request changes nothing; the second creates only one file in the training folder. Didn’t you do lesson 16? Her practice block sets up the folder in one minute. If Codex wants to change another file, refuse and repeat the request.

Step 1 · paste into the terminal

cd ~/projetos/meu-primeiro-projeto
codex

Request 1 · paste inside Codex and press Enter

Read AGENTS.md and README.md. Explain the purpose and list what’s missing, without editing. Tell me which files you used.

Request 2 · paste inside Codex, only after the response to request 1

Create only plano.md, with three actions and one verification for each. Base the plan on entradas/reuniao.txt. Do not change any other file.

Step 3 · paste in the terminal, after exiting with /quit

cat plano.md
cat entradas/reuniao.txt

You just separated diagnosis and change, and checked the result in the real material.

Lesson cheat sheet

Read before changing

  1. Request 1read and explain, without editing.
  2. Files usedcompare with ls.
  3. Request 2one file, with a name; you check.

Your next step

You already know how to carry out the first task of an agent: read, plan, change a little, and check.

In today’s lesson: read the entire plano.md and mark the action you would do first in the real meeting. Write the reason on one line.

In the next lesson: the agent wrote a file. What if it had written the wrong one? You’ll save a point to return to before each change.

Additional material · Do a first reading taskFull topic text on OSWork v2. Doesn’t count in lesson time.

What it is

Start by requesting inspection: list the structure, read instructions and explain pending items. Ask the agent to cite which files it used. After checking, authorize a small, named change, such as creating plano.md with three next steps.

Why learn

Separating diagnosis and change creates a reference for review. You learn the flow without mixing installation, major refactoring, and publishing in a single attempt.

Key concepts

Inspect; plan; change; validate.

In practice

Initial request: “Read AGENTS.md and README.md. Explain the purpose and list what is missing, without editing.” Second request: “Create only plano.md, with three actions and one verification for each.”

Try it now

Open plano.md in the editor and check whether the steps are based on the actual project. Ask for specific correction if the agent assumed nonexistent files.

Lesson 17 · OSWork v6.2 · INEMA.CLUB PRO

Module 3 · Lesson 6 of 6

Small permission and a point of return

A coordinator wearing glasses, in front of the office key board, takes a single key from a large key ring to hand to a younger colleague.

You can save a copy of the training folder and ask the Codex to add two new rules in AGENTS.md. Then, you compare the two versions and see that only this file changed.

In the last lesson, the agent created a file. If it had created the wrong one, or deleted something else, would you be able to say what existed before? Going back requires that you saved the "before" and compare.

In 1 minute

  1. Give the agent the smallest permission that handles the task.
  2. Written rule guides; program permission actually limits.
  3. Before changing, save a copy. After, compare.

1The key to a room, not the master key

Whoever will use the lab gets the lab’s key, not the whole bunch. With an agent, it’s the permissions that control what it can reach in files, on the internet, and in commands.

Go up one step at a time. Reading files is low risk; writing is medium risk; executing commands is high risk. Each step increases the possible damage.

Denise gave the intern only the reading room key. With Codex, it started from the same principle: access only to the training folder.

Permission steps
1 Read files · low risk
2 Write files · medium risk
3 Execute commands · high risk
  1. 1The reading request from lesson 17 is here.
  2. 2The plan.md you created was moved here.
  3. 3Only with a saved point of return.

2Written rule guides; permission limits

What you write in AGENTS.md guides the agent’s behavior. But it’s text: it doesn’t technically prevent anything. What prevents things is the program’s permissions.

In Codex, the /permissions command shows and changes what it can do. Start with the most restricted option that covers the task. Don’t remove all protections to work around an error.

Codex asked Lúcia for internet access to consult documentation. She evaluated that request on her own, without also allowing it to delete files or send messages.

Rule in AGENTS.md

Example: "Do not send or publish anything."

What it does: guides the agent on what you want.

Program permission

Example: access only to the training folder.

What it does: limits what it can actually do.

Both are necessary and they complete each other. One doesn’t replace the other.

3Save the "before" with a copy

The cp -r command copies an entire folder, with everything inside. Make the copy before the change, with a name that tells you what it is.

Later, in module 5, the Git will do this in a more complete way. For now, the copy already gives you a rollback point.

Before authorizing the change in AGENTS.md, Denise copied the training folder with the ending "-before". The ls confirmed both.

Terminal
$ cp -r ~/projetos/meu-primeiro-projeto ~/projetos/meu-primeiro-projeto-antes
$ ls ~/projetos
meu-primeiro-projeto  meu-primeiro-projeto-antes

The cp returns nothing when it works. The ls confirms it: the two folders are side by side.

The "-before" folder is not touched by the agent: it’s your rollback point.

4Compare: did only what you were supposed to change?

After the change, the diff compares the copy with the current folder. It shows only the differences, file by file. The lines that start with > are the new ones.

If another file shows up in the comparison, the agent changed something it shouldn’t have. The "-before" copy has the old version for you to recover.

In Lúcia’s diff, only one file appeared: AGENTS.md, with two new lines. It was exactly what she authorized.

Terminal
$ diff -r ~/projetos/meu-primeiro-projeto-antes ~/projetos/meu-primeiro-projeto
diff -r …/meu-primeiro-projeto-antes/AGENTS.md …/meu-primeiro-projeto/AGENTS.md
3a4,5
> - Todo resultado vem com a verificação que você observou.
> - Esta tarefa não autoriza publicar nada.

One file mentioned, two lines with >. "3a4,5" means: after line 3, lines 4 and 5 were added.

Nothing else appeared: the README, the syllabus, and the plan stayed the same.

Stuck here? That's normalThe diff output looks like code, but you only need two things: which files appear and which lines have >. Nothing appeared? Then nothing changed: check whether Codex saved the file.

How to roll back a file to the previous version

Only if the diff showed a change you didn’t authorize. Copy the file from the "-before" folder over the current one. Attention: this replaces the current AGENTS.md with the old version.

Terminal
$ cp ~/projetos/meu-primeiro-projeto-antes/AGENTS.md ~/projetos/meu-primeiro-projeto/AGENTS.md

Then, run the diff again: with no differences, the rollback worked.

Practice now 0/3

Change with a rollback point and compare

You’re done when the diff shows only AGENTS.md, with the two new lines. About 10 minutes, on your computer.

Everything happens in the training folder; the "-before" copy stays stored next to it. Didn’t do lessons 16 and 17? The practice block in lesson 16 sets up the folder in one minute. If the diff shows another file, don’t delete anything: write down what changed and recover it using the copy.

Step 1 · paste into the terminal, once

cp -r ~/projetos/meu-primeiro-projeto ~/projetos/meu-primeiro-projeto-antes
ls ~/projetos

Step 2 · paste into the terminal

cd ~/projetos/meu-primeiro-projeto
codex

Step 3 · paste inside Codex and press Enter

Add these two lines to AGENTS.md, without changing the ones that already exist:
- Every result comes with the verification you observed.
- This task does not authorize publishing anything.
Don’t change any other file.

Step 4 · paste into the terminal, after exiting with /quit

diff -r ~/projetos/meu-primeiro-projeto-antes ~/projetos/meu-primeiro-projeto
I’ve done this practice before

Does the "-antes" folder already exist? Use these two blocks instead of steps 1 and 4. They use the name "-antes2".

cp -r ~/projetos/meu-primeiro-projeto ~/projetos/meu-primeiro-projeto-antes2
ls ~/projetos
diff -r ~/projetos/meu-primeiro-projeto-antes2 ~/projetos/meu-primeiro-projeto

You just made a verifiable change: you know what existed before, what changed, and how to get back.

Lesson cheat sheet

Change safely

  1. Minimum permissionread, write, execute: one step at a time.
  2. Rule and permissionone guides, the other limits.
  3. Before and aftercopy with cp -r, compare with diff -r.

Your next step

You finished module 3: open the terminal, put Codex on your computer, sign in with your account, work in the right folder, and check each change.

When you have about 30 minutes, open the supplementary material for this lesson and do the module lab, "First guided project". You’ve done almost everything; it just strings the steps together.

In the next module: the project’s digital home, with folders, instruction files, and a separate place for passwords.

Supplementary material · Use permissions and recoveryFull topic text in OSWork v2 and module closeout. Doesn’t count toward lesson time.

What it is

The client’s permissions control access to files, the network, and execution. Instructions in natural language guide behavior, but they don’t replace technical isolation. Start with permissions restricted to the training folder. Don’t teach removing all protections to bypass any error.

Why learn

Recovering a change requires knowing what existed before. Git and file copies provide rollback points; they will be practiced later. Read what the command will do before expanding permissions.

Key concepts

Minimum permission; small changes; comparison; rollback point.

In practice

The agent requests external access to consult the documentation. Evaluate this need separately from permissions to delete files or send messages.

Try it now

Write in AGENTS.md what results must come with observed verification and that the task does not authorize publishing. Review the diff when Git is active.

  • Read files
  • Write files
  • Run commands
Climb one step at a time. Each level widens the possible damage and calls for a recovery point.

Module lab: First guided project

Use fictional files and a training folder. The practices with installation, Telegram, or VPS may require extra time for sign-up and configuration.

  1. Prepare the folder meu-primeiro-projeto and a README.md with no private information.
  2. Check the installation and authentication according to the commands in this lesson.
  3. Start Codex in this folder and ask for an analysis without changes.
  4. Authorize creating plano.md, read the file and verify that it respects the README.

Bash · Linux or macOS

Read the block before using. Fields like Your Name and usuario@ip-da-vps are examples to adapt; administrative commands belong only to your training environment.

mkdir -p ~/projetos/meu-primeiro-projeto
cd ~/projetos/meu-primeiro-projeto
pwd
codex --version
codex login
codex login status
codex

Ready criterion

Open a training project in Codex and produce a verifiable change. Record the file created, the test run, and the observed result.

Criteria to review your delivery

Use this rubric after the lab. Each line asks for evidence; checking reading does not mean the practice was performed.

  • Scope — The delivery matches the objective of this lesson. If you didn’t pass: Reduce the task and name a single result.
  • Inputs — You know which files or data were used. If you didn’t pass: List the sources and remove material that’s unrelated.
  • Execution — The procedure was carried out in the training environment. If you didn’t pass: Separate what you planned from what you actually did.
  • Verification — A result was compared against a reference. If you didn’t pass: Open the file or repeat a verifiable query.
  • Secrets — No token, password, or private data was shared. If you didn’t pass: Review the work copy before sending anything.
  • Continuity — Another person can find the next step. If you didn’t pass: Update README and record a concrete pending item.

Check what remained

Codex did not find README.md. Is the first step to increase reasoning?

View commented answer

No. Check the current directory, the file name, and the read permission.

If your answer was different, return to the corresponding topic and write the difference in one sentence. The check does not block your study.

Module summary

  • Terminal; shell; current folder; command and response.
  • Official source; installation; version; diagnostics.
  • codex login; codex login status; default entry; active account.
  • Local scope; README; AGENTS; input files.
  • Inspect; plan; change; validate.
  • Minimum permission; small changes; comparison; rollback point.

Consult the source

Tools verified on 20/09/2026; screen names and availability may change.

Lesson 18 · OSWork v6.2 · INEMA.CLUB PRO

Module 4 · Lesson 1 of 6

A folder represents a context

A pedagogical coordinator opens a drawer in the steel filing cabinet in the school office; inside, only the class folders, and the other drawers stay closed.

You can draw the tree of your projects folder, with config and a training project. And you can create it with a command in the terminal.

When everything is in just one folder, the AI reads material on topics that have nothing to do with the request. Then it becomes hard to say where a conclusion came from. Today you separate topics before creating any file.

In 1 minute

  1. One folder, one work topic, with a clear name.
  2. The config folder stores what applies to all projects.
  3. Inside the project, inputs separated from the outputs.

1The folder tells the AI where the topic starts and ends

In the secretary's steel file, each drawer holds a class. Nobody searches for 8th A in the 7th B drawer. A work folder does the same: it gathers the material for just one topic. That material is the context of the task.

When you open the Codex in a folder, it works from that folder. If the folder mixes topics, anything that doesn't relate to the request becomes noise.

Lúcia stored the science fair project in the same folder as the report cards. She asked the AI for a summary of the fair and got a paragraph with a student's grade mixed in.

All together

Everything in the same place: feira-de-ciencias.docx, boletins-8A.xlsx, ata-do-conselho.pdf.

Result: the fair summary mentions a report card grade.

One folder per context

feira-de-ciencias folder: only the regulations and the groups list.

Result: the summary talks only about the fair.

Net gain: the AI reads less material, and you know where each sentence came from.

2The tilde ~ is the nickname for your personal folder

In the terminal, the ~ (tilde) symbol represents your personal folder. Inside it, you will create a projects folder, which gathers independent work.

You read the path ~/projetos/config in this order: personal folder, then projects, then config. On the Brazilian keyboard, the tilde is produced with the tilde key followed by the space bar.

Denise typed pwd in the terminal, as in module 3, and saw the full address of her personal folder. The ~ is just the short way to write that address.

Terminal
$ cd ~
$ pwd
/Users/denise

cd ~ takes you to your personal folder; pwd shows where you are. On Linux, and on Windows with the terminal from module 3, the address starts with /home, like /home/denise.

The address changes from computer to computer. ~ works everywhere.

3What applies to everyone goes in config, outside the projects

The config folder, for configuration, stores the knowledge that applies to any project, like your preferences. It sits inside projects, but outside each individual project.

Each project keeps its own entries, the material the AI reads, like minutes or spreadsheets. And it keeps its own results, what it produces. Separated, you can check one against the other. Don’t mix in a project documents from different classes or different schools.

Denise prefers short reports, with the pending items at the end. This applies to the council report and to the agenda for the parents meeting. So you go to config, just once.

~/projetos
1 config
memoria.md · decisoes.md (lesson 3 of this module)
2 meu-primeiro-projeto
3 inputs
4 saidas
  1. 1Applies to all projects.
  2. 2A context: the training project.
  3. 3What the AI reads.
  4. 4What the AI produces, for you to review.

Test yourself

Denise wants to store the note "I prefer short reports". Where does she put it?

4Draw the tree before creating the folders

Before creating anything, draw the tree on paper: one config folder and a single training project. That way you decide the names calmly.

Use short names, with no space and no accent, like meu-primeiro-projeto and saidas. In the terminal, space and accent add work to every command.

Lúcia drew it on a napkin: projects, with config and feira-de-ciencias; inside the fair, entries and saidas. It took a minute and avoided three folders with similar names.

Terminal
$ mkdir -p ~/projetos/config ~/projetos/meu-primeiro-projeto/entradas ~/projetos/meu-primeiro-projeto/saidas
$ ls ~/projetos
config  meu-primeiro-projeto

mkdir -p creates the folders and any folders above that are missing. If a folder already exists, it stays as it is.

One command creates the entire tree. The ls checks the result.

Stuck here? That's normalThe command is long because it creates four folders at once. Copy and paste it exactly as it is, on a single line. To paste into the terminal, use the right mouse button › Paste; on your keyboard, Ctrl+Shift+V on Linux and Windows, Cmd+V on Mac. Prefer the mouse? Type cd ~ and then open . on the Mac, or explorer.exe . on Windows, inside the Linux terminal from module 3: the file manager opens in your terminal’s personal folder. Create the folders there, using right click › New folder.

Practice now 0/3

Create the training project folder structure

Ready when the first ls shows config and my-first-project, and the second shows inputs and outputs. About 8 minutes, on your computer.

The commands only create empty folders inside your home folder; nothing is deleted. Did you create my-first-project in module 3? All good—the things that are already there stay. Did an error message appear? Stop, check that you pasted the entire line, and try again once.

mkdir -p ~/projetos/config ~/projetos/meu-primeiro-projeto/entradas ~/projetos/meu-primeiro-projeto/saidas
ls ~/projetos
ls ~/projetos/meu-primeiro-projeto
What you should see
config  meu-primeiro-projeto
entradas  saidas

The first line answers to ls for projetos; the second, to ls for the training project.

You just created, with one command, the folder structure that separates what always matters from what belongs to a single project.

Lesson cheat sheet

Folders by context

  1. One folder, one topicthe AI reads only what belongs to it.
  2. config outside the projectwhat applies to everyone, in one place.
  3. inputs and outputswhat the AI reads, separated from what it produces.

Your next step

You already have your digital house set up: one folder for what always applies, and one for the training project.

Today, open your Documents folder and write down two topics that are mixed in it. Don’t move anything yet; just write them down.

In the next lesson: the folder exists, but someone who comes later won’t know what it’s for. You will write its README in plain text.

Additional material · One folder represents a contextFull topic text on OSWork v2. Doesn’t count toward lesson time.

What it is

The symbol ~ represents your home folder in the Bash shell. Inside it, projects brings together independent works. Use clear names and avoid mixing documents from different clients. The config folder stores cross-cutting knowledge; each project keeps its own entries and results.

Why learn

Separate contexts help limit what the AI needs to read. A folder full of unrelated topics adds noise and makes it hard to explain where a conclusion came from.

Key concepts

Personal folder; projects; context; inputs and outputs.

In practice

In ~/projetos/website, you’ll find the site files. In ~/projetos/estudos, you’ll find experiments. On Windows, the manager may show paths like C:\Users\SeuNome\projetos.

✓ Do it

Draw the tree before creating files. Choose a single training project and a single global config folder.

✗ Avoid

Accepting a conclusion without checking the input that supports it.

  • ~/projetos/
  • config/
  • memoria.md
  • decisoes.md
  • meu-projeto/
  • AGENTS.md
  • entradas/
  • saidas/
One folder per context. Configuration stays outside the project; inputs and outputs stay apart.

Lesson 19 · OSWork v6.2 · INEMA.CLUB PRO

Module 4 · Lesson 2 of 6

Markdown is organized text

A science teacher, in the school lab, writes an experiment worksheet divided into three blocks with titles, next to a notebook with a simple text document.

You can write the README for the training project in Markdown. Each field has real information or "to be defined".

An explanation that only exists in a conversation disappears when the conversation ends. Someone who comes later doesn't know what the folder is for. A small text file solves it and lasts.

In 1 minute

  1. # makes a title, ## makes a subtitle, - makes a list item.
  2. The file ends in .md and opens in any text editor.
  3. The README tells what the project is for and how to check the result.

1Markdown is text with three simple marks

Every lab experiment script for Lúcia has a title, materials, and procedure. She underlines the titles and puts a dash before each material. Markdown does the same with the signs you type.

The # at the beginning of the line creates a title, the ## creates a subtitle, and the hyphen creates a list item. The file is still text: you can read it even without a special program.

Lúcia took the script "Germinação do feijão" and turned it into Markdown in five minutes. She learned nothing beyond these three marks.

In the file

# Germinação do feijão

## Materials

- 10 grains of beans

- cotton and a cup

How to read

Title: Germinação do feijão.

Subtitle: Materials.

List: two items, one per line.

The marks stay in the text. Someone reading understands the structure even without seeing formatting.

2The name ends in .md and opens in any editor

A Markdown file is a text file whose name ends in .md, like README.md. It opens in the computer's text editor and also in the terminal.

In the terminal, the nano opens the file so you can edit it right there. Then the cat command shows the content on the screen so you can check it.

Denise opened the board project's README with nano. She changed one line, saved with Ctrl+O, confirmed the name with Enter, and exited with Ctrl+X. Then she checked with cat.

Terminal · inside nano
  GNU nano                    README.md
# Meu primeiro projeto OSWork

## Propósito
Produzir relatórios de treino a partir de dados fictícios.

^G Help    ^O Write Out    ^W Where Is    ^X Exit

That's what nano looks like: the text in the middle and the shortcuts in the footer, in English. The ^ means Ctrl. Write Out is saving; Exit is exiting. After Ctrl+O, it shows the file name underneath: press Enter.

There’s no mouse menu: you use the arrow keys and type directly. When you exit, cat README.md shows what you saved.

3The README explains the project for people who arrive later

The course kit template has five sections: Purpose, Read first, Organization, How to check, and Current status. You replace each template text with what matters in your project.

Still unsure about a field? Write "to be defined". An honest open field is better than a template text that nobody checked.

On the science fair README, Lúcia wrote under Purpose: "organize the fair sign-ups". Under How to check: "every registered group shows up on the final list".

README.md
1 # Science fair 2026
2 ## Purpose
Organize the fair sign-ups.
## Read first
To be defined.
## Organization
- entries: sign-up forms
- results: final list
3 ## How to check
Every registered group shows up on the final list.
4 ## Current status
To be defined.
  1. 1A title with the project name.
  2. 2Why the project exists, in one sentence.
  3. 3How someone checks whether the result is correct.
  4. 4What you still don’t know stays written as "to be defined". The Read first section will be completed in lesson 6 of this module.

4Clarity beats formatting

Small files with a clear name last longer than a lost conversation. People can review them, and agents can look them up.

The value comes from clarity. The three marks are enough. Bold, table, and link are optional.

Denise took a week off. The colleague who covered in her place opened the council project README and continued the work without needing to call her.

Only in the chat

Where it is: in a March conversation with the AI.

Result: the colleague can’t find it and calls Denise.

On the README

Where it is: README.md, in the project folder.

Result: the colleague reads the file and moves on.

Net gain: the explanation ends up living in the folder, not in someone’s memory.

Stuck here? That's normalThe nano surprises you the first time: there’s no mouse menu. Want another path? In the project folder, type open -e README.md on Mac, or explorer.exe . on Windows, inside the Linux terminal of module 3, and open the README.md with Notepad. When saving, under Type, choose All files, so it doesn’t turn into README.md.txt.

Practice now 0/3

Write the training project README

Done when the cat shows the titles with # and you’ve read each section and put your own text there or "to be defined". About 10 minutes, on your computer.

The template is a text file from the course kit, with no one’s data. Attention: the second line replaces an existing README.md in that folder. Did you already write one? Skip that line. Didn’t you do the previous lesson? Run this first: mkdir -p ~/projetos/meu-primeiro-projeto

cd ~/projetos/meu-primeiro-projeto
curl -fsSL https://inematds.github.io/oswork/materiais/README-projeto.md -o README.md
nano README.md
What you should see (start)
$ cat README.md
# Meu primeiro projeto OSWork

## Propósito
A definir.

## Leia primeiro
A definir.

The title can stay like in the template. The section text is yours; check the titles with # and no section is empty. If the terminal tells you it doesn't know nano, use Notepad, as the board "Stuck here? That's normal" says, at the end of step 4 of the lesson.

You just wrote, in Markdown, the project explanation that lives in the folder, not in a conversation.

Lesson cheat sheet

Markdown and README

  1. # ## -title, subtitle, and list item. Nothing else is required.
  2. .mdstill is text; it opens in nano or any editor.
  3. READMEpurpose and verification; what’s missing becomes "to be defined".

Your next step

You already know how to record, in a lasting file, what a project is for and how to check the result.

Today, pick a real work of yours and write only its Propósito section, in one sentence, in a notepad.

In the next lesson: the README talks about a project. And what applies to everyone—like your preferences and decisions? You’re going to create one file for each type of note.

Additional material · Markdown is organized textFull topic text on OSWork v2. Doesn’t count in lesson time.

What it is

Markdown uses simple symbols to organize text: # creates a title, ## creates a subtitle and a hyphen starts a list item. The file remains plain text, readable even without a special editor. The name ends with .md. You do not need to write code to record clear instructions.

Why learn

Small, named, easy‑to‑edit files last longer than a lost conversation. They can be reviewed by people and consulted by agents. The value comes from clarity, not elaborate formatting.

Key concepts

Title; list; code block; link; plain text.

In practice

A README can contain: purpose, input files, expected result and how to verify. Anyone arriving later understands the task without relying on the original conversation.

Try it now

Open materiais/README-projeto.md. Copy the template to your project and replace each field with real information or "to be defined".

Lesson 20 · OSWork v6.2 · INEMA.CLUB PRO

Module 4 · Lesson 3 of 6

Each file has one job

A pedagogical coordinator files a sheet into one of the four colorful logbooks on the secretary office shelf, with each book having a different purpose.

You can put the four memory files from the kit into the config folder. And you can say which one each note lives in.

A giant document with everything turns into a pile that nobody consults. Worse: an old rule lives alongside the new one, and the AI doesn’t know which one to follow. One file per function fixes this.

In 1 minute

  1. Your unchanged way goes to memoria.md.
  2. Date-and-reason choices go to decisoes.md.
  3. How to do it goes to dicas.md; what went wrong, to falhas.md.

1Each secretariat book answers a question

The school secretariat doesn’t write everything in just one notebook. There’s the minutes book, the incidents book, and the procedures notebook. Each one answers a different question.

In the config folder, four files do that job. Separated, you look up only what you need—and the AI does too.

Denise was looking for why the parents meeting had been moved to Saturday. The reason was in a 40-page notebook, among messages and phone numbers. It took half an hour to find it.

~/projetos/config
1 memoria.md
2 decisoes.md
3 dicas.md
4 falhas.md
  1. 1How do I prefer the work to turn out?
  2. 2What did we choose, when, and why?
  3. 3How do you do it, step by step, the way that already worked?
  4. 4What went wrong, and what was the correction?

2Preference and decision live in different files

Preference is your steady way of working, like "I prefer short reports". It goes in memoria.md.

A decision is a choice with a reason, and the reason can change. "We chose a spreadsheet because the whole team uses the same one" is a decision. It goes in decisoes.md, with a date.

Lúcia prefers exercises with an answer key at the end: that's memory. But "the 8th grade tests have 10 questions because the coordinator standardized them" is a decision.

Preference · memoria.md

"I prefer exercises with an answer key at the end."

Change? Almost never. You don't need a reason.

Decision · decisoes.md

"8th grade tests with 10 questions, because the coordinator standardized them."

Change? It can change; that's why it includes a date and a reason.

Both notes are correct. They just live in different files.

3Failures get consulted when they come back, and you don't copy them into every request

The falhas.md records a problem, the cause, and the smallest correction—that is, the small protection that prevents repetition. It's for checking when the problem comes back. The dicas.md stores procedures that already worked.

Copy the entire falhas.md into every request, "just in case." It fills the chat with warnings that have nothing to do with the task. You open it when the problem shows up again.

The meeting minutes summary came out empty on a Monday. The entradas folder was empty. Denise noted it in falhas.md and started checking the folder before asking.

falhas.md
1 Symptom: the meeting minutes summary came out empty
2 Observed cause: the entradas folder was empty
3 Smallest correction: check whether there are files before asking
  1. 1What you saw happen.
  2. 2The confirmed why, not a guess.
  3. 3The small protection that avoids repetition.

4Did the decision change? Write the new one with a date and a reason

When a decision changes, don't replace the old line in silence. Write the new one with a date and a reason, and mark the old one as replaced.

That way, you never have two contradictory rules valid at the same time. And whoever reads it understands the path the decision took.

In October, Lúcia's tests went from 10 to 12 questions, with two graph-reading questions. She added the new line and marked the August one as replaced.

decisoes.md
| Date | Decision | Reason | Review when |
| 08/2026 | Tests with 10 questions (replaced in 10/2026) | coordinator's standard | the coordinator changes the standard |
| 10/2026 | Tests with 12 questions | two graph reading questions | end of the year |
This is the format of the decisoes.md file in the kit: one line per decision, with separate columns split by |. The old line stays, marked; the new one says when and why.

Test yourself

"The summary stopped halfway because the file was huge; splitting it into parts solved it." Where does this note live?

Stuck here? That's normalSometimes a note seems like it could fit in two files. Ask: does it say how I like it, what we chose, how it’s done, or what went wrong? The first answer that fits decides.

Practice now 0/3

Create the config folder and place five notes in it

Ready when the ls shows the four files and you’ve written, on paper, the file for each of the five notes. About 10 minutes, on the computer, in the terminal from module 3.

The models are text files from the course kit, and the notes are fictional. If you’ve already written in one of these four files, skip its line: curl overwrites a file with the same name. Did one line fail? The curl command prints an error message right below it; run only that one again. Didn’t do lesson 1 of this module? Run it first: mkdir -p ~/projetos/config

cd ~/projetos/config
curl -fsSL https://inematds.github.io/oswork/materiais/memoria.md -o memoria.md
curl -fsSL https://inematds.github.io/oswork/materiais/decisoes.md -o decisoes.md
curl -fsSL https://inematds.github.io/oswork/materiais/dicas.md -o dicas.md
curl -fsSL https://inematds.github.io/oswork/materiais/falhas.md -o falhas.md
ls

The five notes (fictional): 1) "I prefer to send notices to families in up to five lines." 2) "The newsletter goes in PDF starting in September, because not all families open spreadsheets." 3) "To combine the month’s minutes: first request the list of the read files, then the summary." 4) "The meeting summary included a date that wasn’t in the minutes; the fix was to ask the AI to leave a blank space when the date is missing." 5) "Reports always have the open items at the end."

See the answer key

1 and 5: memoria.md, because it’s your stable way and there’s no reason for it to change. 2: decisoes.md, because it’s a choice with a date and a reason. 3: dicas.md, because it’s a procedure that has already worked. 4: falhas.md, because it has a symptom, a cause, and a correction. Want to go further? Open memoria.md with nano and write a real preference of your own.

You just set up the config folder and placed each note where it belongs.

Lesson cheat sheet

One file, one function

  1. memoria and decisoesstable way in one; choice with date and reason in the other.
  2. tips and failureshow you do it in one; symptom, cause, and correction in the other.
  3. Did it change?new line with a date; the old one stays marked.

Your next step

You already know how to separate preference, decision, procedure, and failure—each one in its own file.

Today, open the file with nano ~/projetos/config/decisoes.md and add a real decision from your team at the end of the table, copying the format of Lúcia’s lines in step 4.

In the next lesson: and the school’s system password—goes in which of those files? None of them. You’ll see where it’s kept.

Additional material · Each file has workFull topic text in OSWork v2. Doesn’t count in lesson time.

What it is

memoria.md records stable preferences; decisoes.md explains choices; dicas.md stores useful procedures; falhas.md documents problems and fixes. Do not put everything in one giant document. When a decision changes, record the date and reason so you don’t keep contradictory rules.

Why learn

Separating functions makes it easier to consult only what’s needed. A failure history should not become a list of mandatory commands in every task. Queryable knowledge and permanent instructions are different things.

Key concepts

Selective memory; dated decisions; procedure; history.

In practice

“I prefer short reports” is a preference. “We chose CSV because it’s compatible with the team’s spreadsheet” is a decision. “The service stopped without supervision” belongs to failures.

Sequence to try

  1. Prepare a training copy.
  2. Distribute five fictional notes among the four files. For each one, explain why that is the appropriate place.
  3. Record the observed result and the next correction.

Lesson 21 · OSWork v6.2 · INEMA.CLUB PRO

Module 4 · Lesson 4 of 6

Secret isn’t knowledge to share

At the school gatehouse, a coordinator talks with the doorman while he closes the wall key cabinet; the list of rooms can be visible, and the keys are locked.

You can create the .env.example from the training project, with the variable names and fictional values. No real values go into it.

A password pasted into a document, a screenshot, or a request turns into access for whoever reads it. And it keeps working after the conversation ends. Separating the secret from the rest lets you share the folder without worry.

In 1 minute

  1. The .env keeps the real keys—only on your computer.
  2. It isn’t a vault: whoever opens the file, reads.
  3. The .env.example has only the names, with fake values. This one can circulate.

1Who has the credential acts on behalf of the account

At the school’s front desk, the key board shows which rooms exist. Nobody worries about that list being visible. With keys, it’s different: whoever takes the key opens the room.

A credential works like a key. A password, a API key or the bot token let whoever has them act on behalf of your account.

Denise was going to send to the team group a screenshot of the notes system configuration. Before sending, she noticed the entire coordination password in the corner of the image.

Screenshot as it was

What it shows: the settings screen, with the password visible.

Result: the 30 people in the group now have access.

Fixed screenshot

What it shows: the same screen, with the password covered before sending.

Result: the team sees what it needs, and access stays limited to coordination.

The image helps the same way without the password value.

2The .env stores variables, but it's not a vault

The file .env stores variables: a name, an equal sign, and a value. For example, TELEGRAM_BOT_TOKEN or DATABASE_URL, the address of a database, with the password inside.

It's not encrypted. Anyone with access to the file can read what's inside. That's why it stays only on your machine. In lesson 7, the command chmod restricts reading to you only.

In lesson 7, Lúcia will create a lookup bot for the class. Its token will live in the .env in the project folder, and nowhere else.

.env · on your computer only
1 TELEGRAM_BOT_TOKEN = ●●●●●●●●●●
2 DATABASE_URL = ●●●●●●●●●●
  1. 1The name tells you what it is; the program looks up the value by it.
  2. 2The real value, covered here, never appears in a print.

3O .env.example shows the structure without giving access

The .env.example has the same names, with fake values. Anyone who receives the project sees what they need to fill in, but gets no access to anything.

The course kit includes TELEGRAM_BOT_TOKEN=fill_in_locally. You replace the value only in your private copy, the .env. With the example value, no bot works.

Denise shared the reports project with the vice-director using the .env.example. The vice filled in her own .env with the password she received from the office.

.env.example · can circulate

TELEGRAM_BOT_TOKEN=fill_in_locally

DATABASE_URL=fill_in_locally

.env · stays on your machine

TELEGRAM_BOT_TOKEN=[the real token]

DATABASE_URL=[the real address]

Same names in both. Only the .env has values that open something.

Stuck here? That's normalThe two names look like twins. Remember it like this: what ends in example is the example, and it can circulate. The other one is the real one, and it stays at home.

4AI needs the variable name, not the value

Real values don't go in prints, in course examples, or in a file you send to the AI without need. To help, the AI almost always only needs to know that the variable exists.

Did you paste a key by mistake? Deleting the message isn't enough. Replace the key on the site that generated it, in the security area or the account keys area. If you never generated a key, keep this rule for when you generate one.

Lúcia's report wasn't connecting to the school's spreadsheet. Instead of pasting the .env, she told the AI which variables had been filled in.

AI chat

YouThe report won’t connect. My .env: DATABASE_URL=[real address with the password inside]

AILet’s take a look. I’ll use that address to test the connection…

The password is now in the conversation history.

YouThe report won’t connect. In my .env, DATABASE_URL is filled in. What do I check, without sending you the value?

AICheck whether the address is complete and whether the password inside it still works. You don’t need to send me the value.

The help is the same, and the secret stays at home.

Tap both buttons and compare what shows up in the conversation.

Test yourself

A colleague will test your project on their computer. What do you send?

Practice now 0/3

Create the training project’s .env.example

Ready when the cat shows both names with the value: fill in preencha_localmente and make sure `ls -a` lists the .env.example. About 8 minutes, on your computer, in the terminal.

The values are fake; no real access goes into the file. Never replace preencha_localmente with a real value in the .env.example. Don’t create the .env now: it will only be needed in module 7. Didn’t you do lesson 1 of this module? Run first: mkdir -p ~/projetos/meu-primeiro-projeto

cd ~/projetos/meu-primeiro-projeto
printf '%s\n' 'TELEGRAM_BOT_TOKEN=preencha_localmente' 'DATABASE_URL=preencha_localmente' > .env.example
cat .env.example
ls -a
What you should see
TELEGRAM_BOT_TOKEN=preencha_localmente
DATABASE_URL=preencha_localmente
.  ..  .env.example  README.md  entradas  saidas

The first two lines come from cat; the last one comes from ls -a. The order can vary, and there may be other files of yours.

You just created the template that shows what to fill in without handing over any key.

Lesson cheat sheet

Secret stays at home

  1. .envreal values, only on your machine; it’s not a vault.
  2. .env.examplesame names, fake values; you can share it.
  3. Leaked? change the key at the source; deleting the message isn’t enough.

Your next step

You already know how to share a project’s structure without giving access to it.

Today, look in your documents and conversations for a password stuck in place. Found it? Delete it from there and change the password on the source site.

In the next lesson: how to make sure the .env is never saved along with the project history, not even by accident.

Additional material · Secrets aren’t knowledge you can shareFull topic text on OSWork v2. Doesn’t count in lesson time.

What it is

A .env file can store variables such as TELEGRAM_BOT_TOKEN or DATABASE_URL. It is not encrypted: anyone with access to the file can read it. Use appropriate permissions and never include real values in screenshots, course examples, or files sent to the AI without necessity.

Why learn

Credentials allow actions on behalf of an account. Separating the .env.example model, without real values, from the local .env lets you share the structure without distributing access.

Key concepts

Variable; secret; .env.example; runtime reading.

In practice

The kit includes TELEGRAM_BOT_TOKEN=fill_locally. The student replaces this only in their private copy. No bot is authenticated with this example.

✓ Do it

Create .env.example with variable names and fake values. Keep .env outside the repository and never paste your key into the chat.

✗ Avoid

Mix the training copy with private files or production work.

  • Version — README, AGENTS, code
  • Don’t version — .env, tokens, passwords
  • .gitignore separates the two
The .gitignore is the border between what the team reads and what never leaves your machine.

Lesson 22 · OSWork v6.2 · INEMA.CLUB PRO

Module 4 · Lesson 5 of 6

Ignore before the first commit

In the school office, a coordinator checks the papers one by one before closing the document holder; one sheet is kept separate on the desk, outside the document holder.

You can create the .gitignore before the first commit. And you can point to the line that keeps the .env out and the one that keeps the .env.example.

In module 6, the Git will store versions of your folder. What goes into a version stays in the history. That’s why the list of what never goes in comes before the first version.

In 1 minute

  1. The .gitignore is the list of what Git does not store.
  2. It only applies to what the Git hasn’t stored yet.
  3. Did a key leak? Replace it at the source first; deleting the line doesn’t undo it.

1The .gitignore separates what the team reads from what stays at home

Each version saved by Git is called a commit. The .gitignore is a text file in the project folder with the list of what Git should leave out.

This list includes the .env, its private variants, and the temporary folders that programs create on their own.

In the reports project, Denise put the .env in the list before saving the first version. The file with the notes system password never made it into the history.

Goes into the history

README.md, .env.example, and the other files from the work.

Left out

.env, keys, passwords, and temporary folders.

Who decides: the .gitignore, written before the first version.

2Each line in .gitignore is a pattern

The .env line picks up the .env file. The .env.* line picks up variants like .env.local: the asterisk matches any ending. The line that starts with ! opens an exception.

So !.env.example returns the example to the list of what’s kept. The last lines cover temporary folders and files that some programs create on their own. You don’t need to touch them.

Lúcia found the exclamation strange on the third line of the kit file. It was the one that kept the .env.example in the project, so her math classmate would know what to fill in.

.gitignore (kit template start)
1 .env
2 .env.*
3 !.env.example
4 __pycache__/
  1. 1Leave out the file with the real values.
  2. 2Leave out any variant, like .env.local.
  3. 3The exclamation brings the example back: it’s kept.
  4. 4Temporary folder that a program creates on its own. You don’t need to touch it.

3Ignoring only applies to what hasn’t been saved yet

The .gitignore doesn’t apply to a file that’s already been saved, the tracked file. If the .env already entered a commit, the line written afterward doesn’t remove it from the history.

It’s like the office courier envelope: the paper that shouldn’t go out stays in the pile until the envelope is sealed. After the envelope has left, scratching the paper off the list doesn’t bring it back.

A coworker of Denise put the .env into the .gitignore a week after the first version. The file with the password was still there, in the old version.

Project history of the coworker
1Version from Monday
README.md · .env (with the password)
2Version from the following Monday
.gitignore with the .env line
  1. 1The .env entered this version and stays inside it.
  2. 2The new line applies going forward; version 1 doesn’t change.

4Leaked? Rotate the key before you clean the file

If a key was published, the first fix is to revoke the key at the source—meaning cancel it on the site that created it. This is in the keys or security area of the account, like the API platform’s keys page. Deleting the line from the file doesn’t invalidate a copy that someone already saw.

Only then comes the fix to the history, depending on the case. Module 6 shows how.

The API key from a Lucia project appeared in a version shared with the team. She canceled the key on the platform site in the same minute and created a new one. Only then did she take care of the file.

Just deleted the line

What you did: removed the key from the file.

Result: the old key still works for whoever copied.

Canceled the key first

What you did: canceled at the source, created another one, and then cleared the file.

Result: the leaked copy won’t open anything anymore.

Net gain: the risk ends when the key dies, not when the file changes.

Test yourself

A key was already published in a version. Putting the .env in .gitignore now fix it?

Stuck here? That's normalThe Git only reaches module 6. Today, you just need the .gitignore ready in the folder. When you save the first version, it will already be in place.

Practice now 0/3

Put the .gitignore in the practice project

Ready when cat -n shows the lines .env and !.env.example and ls -a lists the .gitignore. About 8 minutes, on your computer, in the terminal.

The template is a text file from the course kit and stores nothing by itself: it only becomes a rule once Git sees it, in module 6. Pay attention: the second line replaces a .gitignore that already exists in this folder. Didn’t do lesson 1 of this module? Run first: mkdir -p ~/projetos/meu-primeiro-projeto

cd ~/projetos/meu-primeiro-projeto
curl -fsSL https://inematds.github.io/oswork/materiais/gitignore.txt -o .gitignore
cat -n .gitignore
ls -a
What you should see
     1	.env
     2	.env.*
     3	!.env.example
     4	__pycache__/
     5	*.pyc
     6	node_modules/
     7	.verificacao/

This is the cat -n answer. Lines 4 through 7 are temporary program settings; leave them as they are. Line 1 keeps .env out; line 3 keeps .env.example in.

You just added the list of what must never enter the history before the first version exists.

Lesson cheat sheet

Ignore before saving

  1. .env and .env.* out; !.env.example back in.
  2. Orderfirst .gitignore, then the first version.
  3. Leakedcancel the key at the source before touching the file.

Your next step

You already know how to keep the secret out of the history before it exists.

Today, find out where to cancel the key for a tool you use. Write the path in the project sheet, without the key.

In the next lesson: with everything in place, what should the AI read first? You will clear the context and point to three correct files.

Additional material · Ignore before the first commitFull topic text in OSWork v2. Doesn’t count in lesson time.

What it is

The .gitignore lists files that Git should ignore when they’re not being tracked yet. Include .env, private variants, and temporary folders. Keep an explicit exception for .env.example. Before saving a version, check git status and the prepared files.

Why learn

Ignoring later does not erase a secret from history. If the key leaked, the first fix is to revoke or rotate it at the source; deleting the line from the file does not invalidate a copy already seen.

Key concepts

Tracked files; exclusion patterns; change review; revocation.

In practice

Useful patterns: .env, .env.*, !.env.example, __pycache__/. To discover which rule applies, use git check-ignore -v .env.

Try it now

Copy materiais/gitignore.txt as .gitignore before git add. Verify that .env.example remains available and .env does not appear among new files.

Lesson 23 · OSWork v6.2 · INEMA.CLUB PRO

Module 4 · Lesson 6 of 6

Do a context cleanup

In the teachers’ room, a teacher takes an old, yellowed notice from the corkboard and leaves only the new sheets pinned.

You can add to the README a "Read first" section with three paths that exist and are up to date.

Having memory in the folder is not enough: the AI doesn't open every file that’s there by itself. And an old file gets in the way more than no file at all, if it includes a process that has already changed. Cleaning the context means choosing what the AI reads and keeping that material up to date.

In 1 minute

  1. Tell the AI which files to read; it won't read everything on its own.
  2. The Read first in the README lists three paths, in order.
  3. Open each one and check whether it describes the situation today.

1The AI reads what you point to, not the entire folder

The AI doesn't automatically read every computer file in Markdown. You tell it which documents it should consult.

When a reference applies to the whole project task, it goes in AGENTS.md, the project's instruction file. Module 5 takes care of that.

Denise asked for a draft of the council report without citing any file. The AI didn't consult decidedes.md, and the format came out different from what the team had decided.

Agent in the project folder

YouDraft the council report.

AIHere’s a draft in a table, with the average for each class and three recommendations…

Format on its own and numbers nobody provided.

YouRead README.md and ../config/decisoes.md. Then build the council report draft, without making up any data.

AII read both files. I’ll follow the format recorded in decisoes.md and list as pending anything that isn’t in the entries.

The answer says what it read and follows the team’s decision.

Tap the two buttons and compare what the AI used.

2The Read first points to three paths, in order

In the README, the Read first section lists the files that any project task must open before starting. Three paths are enough.

Write each path starting from the project folder. The ## makes a subtitle, like in lesson 2 of this module. Read ../ as "go up one folder": from meu-primeiro-projeto you go to projetos and, from there, enter config.

In the science fair project, Lúcia put the fair regulations second. In your training project, use the three paths from the board below.

README.md · new section
## Read first
1 1. AGENTS.md
2 2. ../config/decisoes.md
3 3. ../config/memoria.md
  1. 1The project instructions, in the same folder.
  2. 2The team’s choices, one folder above, in config.
  3. 3Your stable preferences, also in config.

3 An expired file causes more trouble than anything

The teachers’ lounge bulletin board with the notice of a March meeting confuses more than an empty board. The same happens with AI memory.

An old file can bring the address of a service or process that has already changed. Before a task, update the expired decision and remove from the working folder what doesn’t matter.

Lúcia’s decisoes.md still said "exams with 10 questions". The AI built the exam with 10. It added the new line and marked the old one as replaced, as in lesson 3 of this module.

Expired file

decisoes.md: only the August line, exams with 10 questions.

Result: the AI builds the exam in the old format.

Up-to-date file

decisoes.md: the October line, with 12 questions, and the August one marked as replaced.

Result: the exam comes out with 12 questions.

Net gain: an updated line prevented redoing the entire exam.

4Check the paths, and then the content

When you start a task, ask for the README and the decision that matters to be read. Don’t load contact lists or passwords just because they’re in the same folder.

Review now and then. First check whether each path exists; then open the file and see if it still describes today’s situation.

Denise put on the coordination calendar: every first Monday of the month, ten minutes to review the council project’s first read.

Terminal
$ ls AGENTS.md ../config/decisoes.md ../config/memoria.md
AGENTS.md  ../config/decisoes.md  ../config/memoria.md

All three paths exist. If one were missing, the ls would warn you with "No such file or directory", and the first read would be wrong.

The ls checks whether the path exists. If it’s up to date, just open the file.

Stuck here? That’s normalDid the ls respond "No such file or directory"? Check the name letter by letter, including the dot and slash. Still stuck? The file doesn’t exist yet: practice tells you which lesson it’s created in.

Practice now 0/4

Write and check the first read

Ready when the ls lists the three paths with no error, the README has the first read section, and the two config files have today’s date. About 10 minutes, on the computer, on the terminal.

The files are from the course kit, with fictional data. Nothing is being replaced: the second line only downloads the AGENTS.md from the kit if the folder doesn’t have it yet. Did the last ls show "No such file or directory"? Go back to the lesson that creates what’s missing: README in lesson 2 of this module, config in lesson 3.

cd ~/projetos/meu-primeiro-projeto
ls AGENTS.md || curl -fsSL https://inematds.github.io/oswork/materiais/AGENTS-projeto.md -o AGENTS.md
ls AGENTS.md ../config/decisoes.md ../config/memoria.md
nano README.md
What you should see
$ ls AGENTS.md ../config/decisoes.md ../config/memoria.md
AGENTS.md  ../config/decisoes.md  ../config/memoria.md
$ nano ../config/memoria.md

Three listed paths, in any order, and no error warning. Then, the nano opens each config file for the date.

You just, in writing, told the AI what it should read first, and checked that everything exists and is up to date.

Lesson cheat sheet

Clean context

  1. Pointthe AI reads the files you name.
  2. Read firstthree paths in the README, checked with ls.
  3. Up to datean expired decision gets in the way; review date in each file.

Your next step

You just set up the entire digital house: folders, README, memory, secrets separated out, and a Leia primeiro that points to what's worth it.

Today, mark on your calendar a monthly ten-minute review of Leia primeiro.

Next module: the AGENTS.md you just put in the folder will start guiding every run of the agent. You will write the instructions for your project.

Additional material · Do a context cleanupFull text of the topic in OSWork v2 and module wrap-up. Doesn't count toward lesson time.

What it is

The AI does not automatically read every existing Markdown file on the computer. Specify which documents to consult and keep references in AGENTS.md when needed. Before a task, remove irrelevant data from the working copy and update expired decisions.

Why learn

Useful memory needs to be findable and correct. An old file can be more harmful than no memory if it contains a service address or process that has already changed.

Key concepts

Context selection; date; source of truth; periodic review.

In practice

When starting a report, request reading of README.md and the decision about format. Do not load contact lists or credentials because they are in the same folder.

Try it now

Add to the README a section “Leia primeiro” with three real paths. Open each path and check whether it describes the current situation.

Module lab: Organize your second operational brain

Use fictional files and a training folder. Practices with installation, Telegram, or VPS may require extra time for sign-up and configuration.

  1. Create config and meu-primeiro-projeto inside projects, using a file manager or Bash.
  2. In the config folder, create memoria.md, falhas.md, dicas.md and decisoes.md from the kit.
  3. In the project, add README.md, AGENTS.md, and .gitignore.
  4. Review with the class table: each file has a role and no secret appears in the documents.

Work structure

Read the block before using. Fields like Your Name and usuario@ip-da-vps are examples to adapt; administrative commands belong only to your training environment.

~/projetos/
├── config/
│   ├── memoria.md
│   ├── falhas.md
│   ├── dicas.md
│   └── decisoes.md
└── meu-primeiro-projeto/
    ├── AGENTS.md
    ├── README.md
    ├── .gitignore
    ├── entradas/
    └── saidas/

Ready criterion

Build the digital house and separate knowledge from credentials. Record the produced file, the test run and the observed result.

Criteria to review your delivery

Use this rubric after the lab. Each line asks for evidence; checking reading does not mean the practice was performed.

  • Scope — The delivery matches the objective of this lesson. If you didn’t pass: Reduce the task and name a single result.
  • Inputs — You know which files or data were used. If you didn’t pass: List the sources and remove material that’s unrelated.
  • Execution — The procedure was carried out in the training environment. If you didn’t pass: Separate what you planned from what you actually did.
  • Verification — A result was compared against a reference. If you didn’t pass: Open the file or repeat a verifiable query.
  • Secrets — No token, password, or private data was shared. If you didn’t pass: Review the work copy before sending anything.
  • Continuity — Another person can find the next step. If you didn’t pass: Update README and record a concrete pending item.

Check what remained

If you add .env to .gitignore, does it automatically remove a key that was already published?

View commented answer

No. Revoke the exposed key and fix the history as appropriate; ignoring only prevents new untracked files.

If your answer was different, return to the corresponding topic and write the difference in one sentence. The check does not block your study.

Module summary

  • Personal folder; projects; context; inputs; and outputs.
  • Title; list; code block; link; plain text.
  • Selective memory; dated decisions; procedure; history.
  • Variable; secret; .env.example; read at runtime.
  • Tracked files; exclusion patterns; change review; revocation.
  • Context selection; date; source of truth; periodic review.

Consult the source

Tools verified on 20/09/2026; screen names and availability may change.

Lesson 24 · OSWork v6.2 · INEMA.CLUB PRO

Module 5 · Lesson 1 of 6

A good rule is a rule that you can verify

A science teacher attaches a short set of rules to the door of the school lab, next to the hanging safety goggles, with the notebook open on the bench.

You can rewrite the AGENTS.md of your training folder with five short rules, and for each one, say how you check that it was followed.

Every new conversation with the agent starts from scratch. Without an instructions file, you repeat the same warnings for every request. And a vague instruction, like "do your best", doesn’t change anything in what it does.

In 1 minute

  1. AGENTS.md tells the agent how to work in that folder.
  2. Each rule must be verifiable: you should be able to see if it was followed.
  3. A rule that changes no decision leaves the file.

1The AGENTS.md is the sign on the door of the folder

In a science lab, the sign on the door tells you how to work inside. AGENTS.md does the same for a project folder. The Codex looks for that file by itself when it starts working in the folder.

It’s a text file in Markdown. You open and edit it in a text editor, like any other text.

Lúcia created the training folder in module 3 and completed it in module 4. Inside it, next to the README, there’s AGENTS.md. It’s the first file she will improve.

~/projetos/meu-primeiro-projeto
1 AGENTS.md
README.md
2 entries
vendas.csv
3 results
  1. 1The work instructions for this folder.
  2. 2The material the agent can read: here, a fictional spreadsheet in CSV.
  3. 3Where it delivers the drafts.
The training folder for modules 3 and 4. Didn’t set it up? In your personal folder, create the projects folder and, inside it, meu-primeiro-projeto, with an empty text file AGENTS.md.

2It explains how to work, it doesn’t tell the story

Four topics fit in AGENTS.md: where to start reading, how to check the result, what not to do, and the delivery format. The school story and the reasons behind each decision are left out.

A short file is read in full. A long file hides the rule that matters in the middle of paragraphs.

Denise opened the AGENTS.md she had written for the meeting minutes project. They were two paragraphs about the school’s founding and only one work rule. She deleted the paragraphs.

Tells the story

"The school was founded in 1987 and has always valued communication with families. That’s why it’s very important that everything is done carefully."

Tells you how to work

"1. Read README.md before editing."

"2. Use only entries/ and results/."

"3. Report what you changed and how you checked it."

The card Tells you how to work changes what the agent does. The other one only takes up space.

3An observable rule has action and evidence

Do the plate test. "Use protective eyewear before starting the experiment" can be checked by looking. "Be careful" can’t.

In AGENTS.md it’s the same. A good rule asks for an action and leaves evidence you can see in the delivery.

In the training report, Lúcia replaced "be excellent" with a checking rule. In the next delivery, the agent wrote the sum and the difference it found. She checked it in one minute.

Vague

"Be excellent."

How to check: there’s no way.

Observable

"Compare the total from the report with vendas.csv and indicate the difference."

How to check: the delivery includes the sum and the difference.

The example comes from the course material: the observable rule states the action (compare) and the evidence (the difference written down).

Test yourself

Which of these rules can you check just by looking at the agent’s delivery?

4Five short rules are enough to get started

Start with five rules and run each one through this question: can I observe whether it was followed? If the answer is no, rewrite it with an action. If the rule changes nothing in the work, delete it.

The board below is the course template, with rules like this. You adapt the purpose to your folder.

Denise started from these five rules for the AGENTS.md of the minutes and only changed the folder names. Most useful: "Don’t invent missing data: describe the pending item."

AGENTS.md · training folder
1 Read README.md and list the sources before making changes.
2 Use only entries/ and outcomes/ .
3 Don’t invent missing data: describe the pending item.
4 Compare the totals with the input before delivering.
5 Don’t send or publish without explicit instruction.
  1. 1Check: the answer starts with the list of sources, the files where the data comes from.
  2. 2Check: no new files outside these folders.
  3. 3Check: what’s missing shows up as a pending item.
  4. 4Check: the total and the comparison are written.
  5. 5Check: nothing left the folder.

Stuck here? That’s normalWriting an observable rule feels hard the first time. Use the test phrase: "I’ll know it was followed because in the delivery it shows up ___". If you can’t fill in the blank, the rule is still too vague.

Practice now 0/3

Rewrite the AGENTS.md with five observable rules

Done when the AGENTS.md has five rules and, next to each one, the evidence you’ll see in the delivery. About 10 minutes, on your computer.

You only edit a text file from the training folder; nothing is executed. Don’t have the folder? In your personal folder, create projects and, inside it, my-first-project. Creating the AGENTS.md from scratch? In the Save as window, choose the type "All files" and type the full name, so it doesn’t turn into AGENTS.md.txt. If a rule doesn’t pass the test, rewrite or delete it; there’s no single correct answer.

# Training project instructions

Purpose: <e.g., report drafts based on fictitious data>

1. <rule>  (I check because in the delivery it appears: <evidence>)
2. <rule>  (I check because in the delivery it appears: <evidence>)
3. <rule>  (I check because in the delivery it appears: <evidence>)
4. <rule>  (I check because in the delivery it appears: <evidence>)
5. <rule>  (I check because in the delivery it appears: <evidence>)

Replace everything that’s between < and >, including symbols. What’s inside parentheses is your check: it can stay in the file; it won’t interfere with the agent.

See two filled-in rules by a teacher

Purpose: drafts of science exercise lists based on my lessons.
Rule: use only files from the entries folder. I check because the delivery lists the sources, and all of them are in entries.
Rule: mark with [check] every exercise answer that isn’t in the material. I check because I can see the marks in the draft.

You just turned loose notes into rules you can verify at delivery.

Lesson cheat sheet

AGENTS.md that works

  1. How to work sources, verification, limits and format, without the story.
  2. Observable action that leaves evidence in the delivery.
  3. Short rule that doesn’t change the work—just keep it.

Your next step

You’re already writing work instructions that an agent follows, and that you check.

Today, pick one rule you repeat every time you ask something to the AI at work, and write its observable version in one line.

In the next lesson: these rules apply only in this folder. And the ones you want in every project? Global and project—each in its place.

Additional material · AGENTS.md guides the executionFull text of the topic in OSWork v2. Doesn’t count in lesson time.

What it is

AGENTS.md is the instruction file that Codex discovers in the applicable scope. It describes how to work: initial files, verification commands, limits and delivery format. No need to explain the whole organization history; prefer short rules that change a real decision.

Why learn

Objective instructions avoid repeating the same details in each conversation. The file should help the agent choose a concrete action, such as verifying the report before considering it finished.

Key concepts

Operational instruction; scope; observable rule; conciseness.

In practice

“Be excellent” is hard to test. “Compare the total of the report with vendas.csv and indicate the difference” defines an action and its evidence.

✓ Do it

Write five rules. For each one, ask: can I observe if it was fulfilled? Remove guidelines that do not change the work.

✗ Avoid

Accepting a conclusion without checking the input that supports it.

Lesson 25 · OSWork v6.2 · INEMA.CLUB PRO

Module 5 · Lesson 2 of 6

The rule book applies at school, but the agreement applies in the room

A pedagogical coordinator compares the school’s thick bylaws, in one hand, with a short sheet of classroom agreements, in the other, sitting at the table with the notebook open.

You can say which instruction files apply in a folder. And you can check the summary the Codex makes from them against the real files.

Sometimes the agent follows a rule you don’t remember writing. Other times it ignores one you wrote, but in another folder. Before you blame the model, it’s worth knowing where each instruction comes from.

In 1 minute

  1. There’s a global instruction file that applies to everything, and a project one that applies in that folder.
  2. The file closest to the working folder takes precedence there.
  3. Ask Codex for the summary of what it loaded and verify it in the files.

1 The global applies everywhere; the project one, only in the folder

The rule book applies across the whole school. The class agreement applies in the room. With AGENTS.md, it’s the same: by default, the global one is in the hidden folder .codex, inside your personal folder. The project one is in the project folder.

In the terminal, the ~ sign is a shortcut to your personal folder. Folders with a name starting with a dot are hidden.

Denise wants the agent to always include what it checked, in any project. This rule was for the global. "Compare the total with the frequency sheet" only makes sense in the frequency project.

Where the instructions are
1 ~/.codex
AGENTS.md · "relate what you checked"
2 ~/projetos/frequencia
AGENTS.md · "compare the total with the attendance spreadsheet"
  1. 1Global: applies to all projects. It’s small.
  2. 2Project: applies in this folder. The details are here.
The two rules work together. You don’t need to repeat in the global the detail of each project.

2The closest file can decide there

A subfolder can have its own AGENTS.md. With Codex open in it, both apply, and the closest instruction takes precedence, like a lab agreement inside the school.

"Can" because it applies to what it covers. What the nearby rule doesn’t mention keeps coming from the upper file.

Lúcia created a provas subfolder inside her science project, with an AGENTS.md that asks for a separate answer key. When she opens the Codex inside provas, this rule applies. If it’s opened in the exercise lists, it doesn’t.

~/projetos/ciencias-8ano
1 AGENTS.md · applies to the whole project
lists
tests
2 AGENTS.md · "answer key in a separate file"
  1. 1Project instruction.
  2. 2Closest instruction: takes precedence inside exams.
A file that gets in front: the override

There’s also the AGENTS.override.md. In the same folder, the Codex reads the override and ignores the AGENTS.md. You didn’t create any? Great. But it can show up in a folder copied from a colleague and, forgotten there, it explains a lot of weird behavior.

3The AGENTS.md doesn’t override everything

None of these files beats three things. The system instructions, which are the tool’s factory rules. The permissions, which you approve or deny, like in module 3. And what you explicitly ask for in the conversation. They guide; they don’t unlock what the tool blocks.

Denise’s AGENTS.md says "submit in bullet points". Today she asked, in the conversation, for a continuous paragraph for the email to the administration. Today’s request is valid.

The AGENTS.md decides

How to work in the folder when the request doesn’t say anything: sources, checking, format.

The AGENTS.md doesn’t beat

The system instructions.

Tool permissions.

Your explicit request in the session.

Writing "don’t read passwords" gives guidance. What actually blocks are the permissions.

Test yourself

The global says "respond in bullet points." The project’s AGENTS.md doesn’t talk about format. In the conversation, you ask for a table. Which one counts?

4Ask for the summary and check in the files

Inside the folder, ask the Codex to summarize the instructions it loaded and to say which file each one came from. Then open the files and compare.

The summary cites a rule that isn’t in any file? Or does it forget one that is? That’s where you found the cause before blaming the model.

Lúcia asked for the summary in the training folder. The rule showed up: "relate what you checked", which she hadn’t written there. It was in global, which she created in March and forgot.

Codex · training folder

YouSummarize the instructions you loaded into this folder and say which file each one came from. Don’t change anything.

AIFrom the global: relate what you checked. From the AGENTS.md of this folder: read README.md and list the sources before you change anything; use only entries/ and saidas/; don’t invent missing data; compare the totals before you deliver; don’t send or publish without explicit instruction. I didn’t change any file.

Each rule with its source. Now you can open both files and verify.

Example using the rules from the previous lesson; the README is the file that explains the folder. In your folder, the list will be the one from your AGENTS.md.

Stuck here? That's normalDidn’t you find the .codex folder? It’s hidden, and you may have never created a global. It’s okay: then only the project’s AGENTS.md counts, and practice shows you how to verify it.

Practice now 0/3

Discover which instructions apply in the training folder

Ready when you’ve written down every rule from the Codex summary and the file where you found it. About 10 minutes, on your computer, using the module 3 terminal.

The three commands only read and list; nothing is changed. The request to Codex says "don’t change anything". If Codex asks for permission to change any file, refuse. Still no Codex? Just do steps 1 and 2 and write down what you found.

Terminal

$ cd ~/projetos/meu-primeiro-projeto
$ ls -a
.  ..  AGENTS.md  README.md  entradas  saidas
$ cat ~/.codex/AGENTS.md
cat: /home/seu-nome/.codex/AGENTS.md: No such file or directory

The ls -a list also includes hidden files; the dot and the two dots at the beginning represent the folder itself and the one above, so you can ignore that. Look for an AGENTS.override.md: if it shows up, open it and see whether it should still exist. The last line, in English, says "file or folder does not exist": there’s no global. If the file exists, the cat shows its text.

Your list may include more files, like the ones you created in module 4. The path in the last line shows your username.
Summarize the instructions you loaded into this folder and say which file each one came from. Don’t change anything.

You just traced where each instruction the agent follows in that folder comes from.

Lesson cheat sheet

Global and project

  1. Small global~/.codex/AGENTS.md, rules that apply everywhere.
  2. Project with details the closest file takes precedence in that folder.
  3. Check the sourceCodex summary against the files, before blaming the model.

Your next step

You already know where each instruction the agent follows comes from in a folder.

Today, pick a rule you want in all projects and decide: should it be global or only for one project? Write the decision in a single line.

In the next lesson: the rule tells you what to respect. And the procedure you repeat every week, step by step? That becomes a Skill.

Additional material · Global and project complement each otherFull text of the topic on OSWork v2. Not counted in lesson time.

What it is

By default, ~/.codex/AGENTS.md stores global instructions. In the project, AGENTS.md adds specific rules; files in closer folders can prevail in the corresponding scope. AGENTS.override.md has priority over AGENTS.md at the same level. This does not override system instructions, permissions or the explicit request of the session.

Why learn

The path matters. A local rule may not apply to another folder, and a forgotten override file can explain an unexpected behavior. Keep the global rule small and leave local details in the project.

Key concepts

Discovery; hierarchy; scope of directory; override.

In practice

Global: “record the tests you ran”. Project: “validate the CSV with python3 validar.py”. The two instructions work together; you don’t need to repeat the script for each project in the global file.

Try it now

Ask Codex to summarize the instructions you loaded. Check the response against the real files before attributing an error to the model.

  • Global AGENTS.md
  • Project AGENTS.md
  • Skill
  • Task
Layers of instruction: the top one applies everywhere, and the most specific one, at the bottom, decides the case at hand.

Lesson 26 · OSWork v6.2 · INEMA.CLUB PRO

Module 5 · Lesson 3 of 6

The door plate is updated every day; the script goes into the notebook

A science teacher in a lab coat takes a card from a wooden box with experiment worksheets, on the lab bench, next to beakers and the notebook.

You can create the Skill semanal report in the training folder, with the name and description at the start of the file. And you can also check that it’s in the right place.

There are tasks where you explain to the agent every week, step by step, the same way. Pasting all that into the AGENTS.md makes the file huge. And the agent starts loading the entire manual even for tasks that don’t need it.

In 1 minute

  1. The rule says what to respect; Skill teaches a procedure.
  2. The Skill is a SKILL.md file that starts with name and description.
  3. From the project: .agents/skills, inside the folder. Personal: ~/.agents/skills.

1Rule always applies; Skill kicks in when it’s needed

The lab door plate is valid every day. The experiment script comes out of the notebook only on the day of that experiment. The AGENTS.md file is the plate. The Skill is the script.

A Skill brings together the instructions for an activity that repeats. The agent triggers it when the task calls for it.

Lúcia explained every Friday to the agent how to set up the weekly exercise list: read the lesson, choose five questions, and separate the answer key. This step-by-step became a Skill. The AGENTS.md kept five rules.

AGENTS.md · the board

"Use only inputs/ and outputs/."

Valid for every task in the folder.

Skill · the worksheet

"1. Read the weekly lesson. 2. Choose five questions. 3. Separate the answer key."

Enter only when the task is the weekly list.

Both are right—each in its role. Separating prevents carrying the whole manual into every task.

2The file starts with name and description

The Skill lives in a folder named after it, in a file called SKILL.md. At the top, between two lines of three dashes, the name and description appear. This block is the header.

After the header comes the procedure: what goes in, the steps, what comes out, and how to check. In the terminal, a command shows the beginning of the file.

Before writing the Skill for the list, Lúcia opened the course report Skill—the same one used in the practice—to understand the format. In four lines, she learned the name, when to use it, and when not to use it.

Terminal

$ head -4 .agents/skills/relatorio-semanal/SKILL.md
---
name: relatorio-semanal
description: Gerar rascunho de relatório semanal quando o usuário fornecer um CSV de vendas. Não usar para enviar relatórios ou tratar credenciais.
---

The command in the first line shows the first four lines of the file. The dashed lines open and close the header.

The header of the course Skill that you’ll create in practice. The input sheet is a CSV.

3The description says when to use and when not to

The description is what the agent reads to decide whether to activate the Skill. It needs to say in what situation to use it. And it’s worth saying where the Skill stops.

In this description, "credentials" are passwords and access keys: the Skill doesn’t touch them.

The first description of Denise’s report Skill was "help with reports". The agent activated the Skill even in a request for meeting minutes. She rewrote it, stating the situation and the limit, in the same way as the card.

Vague

"Help with reports."

When to use? When not to use? It doesn’t say.

With a situation and a limit

"Generate a draft of the weekly report when the user provides a sales CSV. Do not use it to send reports or to handle credentials."

The course description makes it clear that the Skill drafts and sends nothing on its own.

Test yourself

Which description helps the agent decide when to activate the meeting minutes Skill?

4The right folder decides who uses it

The project Skill goes in .agents/skills, inside the project’s folder. Personal Skill—one you want in all projects—goes in ~/.agents/skills. The folder ~/.codex is for the Codex: it stores the configuration and the global AGENTS.md from the previous lesson. Skills don’t go there.

Skill notes only serve the notes project: Denise saved it in the project. Her spelling review Skill she uses for everything: she put it in the personal folder.

Where everything goes
1 ~/projetos/meu-primeiro-projeto/.agents/skills
relatorio-semanal
SKILL.md
2 ~/.agents/skills
3 ~/.codex
  1. 1For the project: one folder per Skill, with SKILL.md inside.
  2. 2Personal: works in any project you have.
  3. 3For the Codex: configuration and global AGENTS.md. Not a Skill folder.

Stuck here? That's normalFolders that start with a dot are hidden, and the file manager won’t show them. That’s why the practice creates the folder using the terminal and checks it with a command. You don’t need to see it in the window.

Practice now 0/3

Create the relatorio-semanal Skill in the practice project

Done when the last command shows the four header lines. About 10 minutes, on your computer, using the terminal.

The commands only create a new folder and move your file into it; nothing is deleted. Don’t you have the practice folder for modules 3 and 4? Create one with mkdir -p ~/projetos/meu-primeiro-projeto and follow the same steps. If you see "No such file or directory", check you’re in the right folder with pwd.

---
name: relatorio-semanal
description: Generate a draft of a weekly report when the user provides a sales CSV. Don’t use it to send reports or handle credentials.
---

# Weekly report

## Input
CSV specified by the user, containing product and value. Use only sources explicitly authorized.

## Procedure
1. Read README.md and the project instructions.
2. Check the header, line count, and values; explain invalid fields.
3. Calculate totals with an available calculation tool, without inventing missing data.
4. Produce output/relatorio.md with sources, known total, valid records, and pending items.
5. Verify the total against the sum of the records.
6. Report the check and stop before sending or publishing.

## Behavior tests
- Complete data: total consistent with the sum.
- Incomplete data: pending item visible, with no fabricated numbers.
- Request out of scope: explain the limitation; don’t run external actions.
Save as
1 Folder: your personal folder › projects › meu-primeiro-projeto
2 Name: SKILL.md
3 Type: All files
Save
  1. 1Open the practice folder before saving.
  2. 2Name with uppercase letters and the .md at the end.
  3. 3Without this, some editors save as SKILL.md.txt.
The field names change a bit from editor to editor; the three dots are the same.
Terminal

$ cd ~/projetos/meu-primeiro-projeto
$ ls
AGENTS.md  README.md  SKILL.md  entradas  saidas
$ mkdir -p .agents/skills/relatorio-semanal
$ mv SKILL.md .agents/skills/relatorio-semanal/
$ head -4 .agents/skills/relatorio-semanal/SKILL.md

The ls confirms that SKILL.md is there. Did SKILL.md.txt show up? Run mv SKILL.md.txt SKILL.md to fix the name. The mkdir -p creates the folder and any missing ones above it. The mv moves SKILL.md into it. The last command should show the header, like in step 2.

You just packaged a procedure that the agent can reuse, in the place where it looks for it.

Lesson cheat sheet

Skill

  1. Rule AGENTS.md is the rule; Skill is the procedure that repeats.
  2. Header name and description between dashed lines: when to use and when not to.
  3. Place .agents/skills in the project; ~/.agents/skills personal; never in ~/.codex.

Your next step

You already turn a repeated step-by-step into a procedure the agent reuses.

Today, write down a task that you explain every week the same way. Write only its name and description, including the situation and the limit.

In the next lesson: the Skill doesn’t remember what you agreed on yesterday. Where do you store what needs to keep being true? Memory, in a file.

Supplementary material · Skills package proceduresFull topic text on OSWork v2. Doesn’t count in lesson time.

What it is

One Skill brings together instructions for a recurring activity, with a name and description at the start of SKILL.md. It can include supporting resources and programs. Personal Skills go in ~/.agents/skills; project ones can go in .agents/skills inside the repository. The ~/.codex folder stays as Codex configuration.

Why learn

A rule says what to respect; a Skill teaches a procedure that can be triggered when needed. Separating these roles avoids loading the entire manual into every task.

Key concepts

Name; trigger description; procedure; input and output; validation.

In practice

relatorio-semanal receives a fake CSV, computes a verifiable total, and produces a Markdown with pending items. The description makes it clear that it doesn’t send the result automatically.

Sequence to try

  1. Prepare a training copy.
  2. Read materiais/SKILL-relatorio.md. Create the indicated folder and save the file as SKILL.md, keeping the header delimited by ---.
  3. Record the observed result and the next correction.

Lesson 27 · OSWork v6.2 · INEMA.CLUB PRO

Module 5 · Lesson 4 of 6

Memory is a dated and owned bulletin board

In the teachers’ room, a coordinator takes an old, yellowed notice from the corkboard and pins a new card to a board with only a few notices.

You can write a short, dated memory with three useful facts. And you can ask the agent to say which of those facts it used in a task.

Pasting the entire conversation from yesterday into every request gets tiring and brings back instructions that have already changed. Waiting for the AI to “remember on its own” also fails. A small file, with a date and reviewed by someone, solves both problems.

In 1 minute

  1. Here, memory is an file the agent consults, not the model learning.
  2. Store stable facts, decisions, and causes of failures, not the whole conversation.
  3. Point to the file in the request and review on the scheduled date.

1Memory is a file that someone maintains

The model doesn’t change because you chatted with it. The course’s operational memory is a set of files that the agent reads when you indicate them.

It works with two conditions: the agent reads the part that matters, and someone keeps the file updated. In practice for this lesson, the one reading is the Codex, opened in the terminal as in module 3.

Denise created the config folder in module 4, next to the projects. That’s where the files that apply to multiple projects for the coordination are kept.

~/projetos/config
1 memoria.md
2 decisoes.md
3 falhas.md
dicas.md
  1. 1Stable facts and preferences.
  2. 2Decisions made, with the reason.
  3. 3Causes of failures. That’s the topic of the next lesson.
The support files folder for module 4. Didn’t you? Create the config folder inside projects, next to meu-primeiro-projeto, and create a text file memoria.md in it.

2Keep what still applies

Three things deserve to go into memory: stable facts, decisions, and causes of failures. Every sentence from each conversation does not.

Copying the entire history increases the volume and can bring back an old instruction. No one can verify an enormous file.

Lúcia noted that the course materials use accessible language and fictional examples. In the next task, she pointed to that file instead of repeating the entire conversation about the class.

Pasted history

Two hundred lines of conversation, from March to September.

In the middle, "use the old list model," which has already changed.

Short memory

"Reviewed on: 09/25/2026."

"8th grade materials: accessible language and fictional examples."

"Weekly list: five questions and separate answer key."

Net gain: from two hundred lines to three, and no expired instructions.

3Indicate the file and ask for the fact used

Having the file exist in the folder doesn’t guarantee the agent will read it. In your request, tell it which file to consult.

And ask it to cite which fact it used. That way you can check whether the memory was used, instead of assuming.

Denise asked the parent meeting reminder to include the memory. The answer ended by saying which fact it had used, and she checked it in the file.

Codex · training folder

YouConsult ../config/memoria.md. Write a three-line reminder about the parent meeting; the agenda is the close of the grading period. Use [date] and [time] in place of those data. In the end, say which fact from memory you used.

AIParent meeting on [date], at [time]. The agenda is the close of the grading period. We count on everyone’s presence. Fact used: "Reminders for families: up to three lines, no abbreviations".

The fact cited is in Denise’s memory, which appears in step 4, and the response followed it: three lines, no abbreviations, and no made-up date.

The ../ means "the parent folder": from inside the project, the agent goes up one level and finds the config folder.

Test yourself

Lúcia created memoria.md in the config folder, but the agent ignored the facts. What does she do first?

4Revision date keeps memory alive

Stable facts also change. Mark at the top when the file was reviewed. In the next review, delete what’s expired and confirm the rest.

Write down where each fact came from: a meeting, a document, a decision. This helps you verify later.

In the September review, Denise deleted the fact "notices are printed on the backpack". The school started sending the notices through the app. She changed the top date.

memoria.md · Denise
1 Reviewed on: 25/09/2026 · next review: end of the term
2 Notices to families: up to three lines, no abbreviations (source: coordination meeting)
Reports: with sources and visible open items (source: decisoes.md)
Training project: only fictional data (source: coordination decision)
  1. 1The date tells you whether you can trust the file today.
  2. 2Every fact with its origin in parentheses.

Stuck here? That's normalDon't know what facts to write? Think about what you repeat most to the AI: the audience for the material, your preferred format, and a detail you always forget. Three lines are enough to start.

Practice now 0/3

Write the memory and have the agent quote the fact

Ready when the agent finishes the answer by saying which memory fact it used, and that fact is in your file. About 10 minutes, on your computer.

Steps 2 and 3 use the terminal and the Codex from module 3. Does the file not exist? In the Save as window, choose the type "All files" and type the full name, so the file doesn’t turn into .txt. Write only work facts, with no student name, password, or personal data. No Codex? Do it in the chat you use: paste the memory text at the start of the request. If the response cites a fact that isn’t in the file, write this down: it’s a sign that it made it up.

# Operational memory

Reviewed on: <today's date> · next review: <e.g., end of the term>

- <fact 1> (source: <where it came from>)
- <fact 2> (source: <where it came from>)
- <fact 3> (source: <where it came from>)
Check ../config/memoria.md. <your short task, e.g.: write a three-line notice about the science fair; use [date] instead of the date>. In the end, say which memory fact you used.
See the memory filled in by a teacher

Reviewed on: 25/09/2026 · next review: end of the term.
- 8th grade materials: accessible language and fictional examples (source: conversation with coordination).
- Weekly list: five questions and separate answer key (source: term planning).
- Notices to families: up to three lines, no abbreviations (source: coordination meeting).

You just created a memory that the agent consults, and you can check it.

Lesson cheat sheet

Memory that works

  1. Storedthe memory is consulted; the model doesn’t change.
  2. Small and steadyfacts, decisions, and failure causes, with the source.
  3. Named and datedin the request, say which file to read; review it on the date.

Your next step

You save what you need to keep staying valid, in a file the agent consults when you point to it.

Today, mark on your calendar the review date you wrote at the top of the file. It’s a five-minute reminder.

In the next lesson: when something goes wrong, what goes into the record? A failure becomes a small protection, not a full rebuild.

Additional material · Memory needs maintenanceFull topic text on OSWork v2. Doesn’t count in lesson time.

What it is

The course's operational memory is a set of queryable files, not a change to the model weights. It works when the agent reads the relevant information and when someone keeps that information up to date. Store stable facts, decisions and causes of failures; do not preserve every sentence of every conversation.

Why learn

Copying the entire history increases volume and can reintroduce old instructions. A small, dated and reviewed memory helps more than a massive file that no one can validate.

Key concepts

External memory; explicit query; summary; validity; source.

In practice

A teacher notes that the class materials use accessible language and fictitious examples. In the next task, reference this file instead of repeating the whole conversation about the class.

✓ Do it

Include in memoria.md three useful facts and a review date. In the next task, ask the agent to cite which fact was used.

✗ Avoid

Mix the training copy with private files or production work.

Lesson 28 · OSWork v6.2 · INEMA.CLUB PRO

Module 5 · Lesson 5 of 6

After the slip, the tape on the step

A science teacher in a lab coat, kneeling on the lab entrance staircase, sticks a yellow anti-slip tape on a step, with an open notebook beside it.

You can record a failure in the file falhas.md, with symptom, cause, smallest fix, and verification, and write the check that would catch the problem before the next run.

When the result comes out wrong, you feel like redoing everything or switching tools. That burns hours and often hides a simple problem. In school, nobody rebuilds the stairs after a slip: you put the tape on the step and check that it’s solid.

In 1 minute

  1. Record symptom, observed cause, smallest correction, and verification.
  2. Say whether the failure was in the request or in the infrastructure.
  3. The fix goes to where the next run reads.

1Symptom is not the cause

"The report came out empty" is the symptom: what you saw. The cause is the reason you observed, like "the spreadsheet had no records". Write both separately.

Then, the smallest correction and how to verify it works. It’s four content columns, plus the date and type, all in a single line of a table in Markdown.

In the training project, Lúcia saw the report come out empty. Before changing anything, she wrote down the symptom and opened the input spreadsheet: it had no records at all.

~/projetos/config/falhas.md
1 Symptom: empty report
2 Observed cause: spreadsheet with no records
3 Smallest correction: check the number of lines before generating
4 Verification: an empty spreadsheet triggers an alert, not a report
Type: infrastructure
  1. 1What you saw.
  2. 2The reason you confirmed, not what you assume.
  3. 3The small protection.
  4. 4How to know the protection works.
The course’s example line. In the file, it becomes a table row, with the date and the type alongside those four. Didn’t you do module 4? Create falhas.md in ~/projetos/config.

2Request failure or infrastructure failure

Request failure is when the goal was ambiguous or information was missing. Infrastructure failure is when the text was good, but something outside it failed: a missing or empty file, a process that stopped.

The fix changes depending on the type. Requests are fixed in the text. Infrastructure is fixed with a check.

Denise had two failures in the same week. The summary of the minutes came out too long: she hadn’t mentioned the size. The attendance report didn’t come out: the spreadsheet wasn’t in the folder.

Request

Symptom: minutes summary with two pages.

Cause: the request didn’t say the size.

Correction: "up to ten lines".

Infrastructure

Symptom: the attendance report didn’t come out.

Cause: the spreadsheet wasn’t in the folder.

Correction: check that the file exists before you start.

Both types are normal. Knowing which type it is tells you where to change things.

Test yourself

The agent used last year’s student list because the request only said "use the student list". What type of failure is it?

3The smallest fix, not a rebuild

Redoing the entire project can hide a simple problem. A small protection is easier to test and maintain.

Given the empty report from step 1, with the spreadsheet in CSV with no rows, Lúcia thought about switching models. The fix was different: check the header and the number of records before generating the report.

Rebuild

Switch models, rewrite the Skill, redo the folders.

Two hours, and the empty spreadsheet is still breaking the next report.

Small safeguard

A new line: "check the header and the number of records before generating".

An empty spreadsheet now generates an alert.

4The protection goes where the next execution reads

A record only teaches something when the following procedure changes. That’s why the protection goes into the AGENTS.md or in the Skill, which the agent reads again for every task.

At the end of the practice, the Codex shows whether the rule worked. Before you write the rule, see the check working yourself in the terminal.

Denise added to AGENTS.md for the frequency: "Before you read, check whether the spreadsheet exists. If it’s missing, stop and say which file is missing." The following week, the agent stopped and warned.

Terminal

$ cd ~/projetos/meu-primeiro-projeto
$ ls entradas/
vendas.csv
$ ls entradas/vendas-outubro.csv
ls: cannot access 'entradas/vendas-outubro.csv': No such file or directory

The first ls lists what exists. The second looks for a file that isn’t there; the response, in English, says "could not access: file or folder does not exist". This is what the check catches before running anything.

In your folder, the entries/ list may have other files. What matters is the response when the file is missing.

Stuck here? That's normalNot sure whether the failure was from the request or the infrastructure? Ask: "if I had written better, would it have worked?" If yes, it was from the request. If the text was good and something from the machine was missing, it was infrastructure. If both, mark both.

Practice now 0/3

Record a missing file failure and the check

Once falhas.md has the new line, the rule is in AGENTS.md, and Codex stops warning you which file is missing. About 12 minutes, on your computer.

In the file, the vertical bars draw a table: that’s how Markdown writes tables, and the editor shows it that way. The failure is fictional, and the commands only list; nothing is deleted. If your entries/ folder doesn’t exist, the first ls also warns that it doesn’t exist: note that as a real failure and create the folder using the file manager.

| Date | Symptom | Observed cause | Smallest fix | Verification | Request or infrastructure |
|---|---|---|---|---|---|
| <today's date> | October report didn’t come out | <e.g., entradas/vendas-outubro.csv doesn’t exist> | <e.g., check whether the file exists before reading it> | <e.g., a missing file triggers a warning and stops> | Infrastructure (fictional example) |
Before reading an entries/ file, check whether it exists. If it’s missing, stop and say which file is missing.

You just turned a failure into a small protection, recorded where the next run will read it.

Lesson cheat sheet

Failure becomes protection

  1. Four columnssymptom, observed cause, smallest correction, verification; plus date and type.
  2. Type request when you fix it in the text; infrastructure, with a check.
  3. Where in AGENTS.md or in the Skill, so the next run reads it.

Your next step

You already turn an error into a small protection, instead of redoing everything.

Today, think about the last time an AI result went wrong at work. Write its line: symptom, cause, smallest correction, verification.

In the next lesson: the Skill worked once. Does it always work? You’ll test it with a normal case, an incomplete one, and one outside the agreement.

Supplementary material · Failures become small protectionsFull topic text on OSWork v2. Doesn't count in lesson time.

What it is

Record the symptom, the observed cause, the minimal fix and how to verify. Differentiate failure of request, such as ambiguous objective, from infrastructure failure, such as a terminated process. The record only generates operational learning when it changes the next procedure.

Why learn

Redoing the whole project can mask a simple problem. A small protection, like checking for a file's existence before reading, is usually easier to test and maintain.

Key concepts

Symptom is not cause; minimal correction; prevention; evidence.

In practice

The report came out empty because the CSV had no rows. The safeguard is to validate the header and number of records before generating the report, not to switch models.

Try it now

In falhas.md, create a line for a fictitious missing file error. Write a check that would detect the problem before execution.

  • Failure observed
  • Small safeguard
  • Memory updated
A failure does not become a rewrite. It becomes a small safeguard recorded where the next run will read it.

Lesson 29 · OSWork v6.2 · INEMA.CLUB PRO

Module 5 · Lesson 6 of 6

Practice the Skill before the real day

In the school courtyard, a coordinator with a clipboard and a stopwatch follows teachers and staff walking to the meeting point during an evacuation drill.

You can test the Skill weekly report with three cases: normal, incomplete, and not as agreed. And you can note whether it preserved the data, marked the pending item, and stopped where it should.

A Skill that worked once may have succeeded by chance, thanks to something that was in the conversation. The evacuation simulation practices the normal day, the blocked door, and the person who wants to go back to grab the backpack. With the Skill, it’s the same: vary the input before you trust it.

In 1 minute

  1. Test with three cases: normal, incomplete, and not as agreed.
  2. Measure the behavior: data preserved, pending item visible, stop in the right place.
  3. Fix it with the smallest rule that resolves the failure you observed.

1 Three cases, each with the expected result

Before you run it, write in the checklist what each case should produce. That way you compare to a reference, not to your impression in the moment.

The normal case uses the complete data. The incomplete case is missing a value. The not as agreed case asks for something the Skill must not do. Each case runs on the Codex, opened in the terminal inside the training folder.

Denise set up the checklist the way you set up the simulation worksheet: first what should happen in each scenario, then the run-through.

Checklist · weekly report
1 Normal · vendas.csv: Notebook 35.50 · Pen 9.50 · Agenda 55.00 → total 100.00
2 Incomplete · vendas-incompleto.csv: Notebook 35.50 · Pen with no value · Agenda 55.00 → known total 90.50 and Pen pending item
3 Not as agreed · "generate and send to management" → only the draft, without sending
  1. 1The total matches the sum: 35.50 + 9.50 + 55.00.
  2. 2No made-up number for the Pen.
  3. 3The Skill prepares a draft; sending isn’t part of it.
The data is fictional from the course, in CSV. The expected values are already calculated.

2 Incomplete: separate what’s known from what’s pending

In the incomplete case, the correct result doesn’t invent the missing value. It shows the total of what you know and makes the pending part clearly visible.

In the first version that Lúcia wrote of the Skill relatorio-semanal, the rule "sem inventar ausências" was missing. In the incomplete case, the agent filled in the missing value. It was the test that showed that.

Codex · incomplete case

YouUse the Skill relatorio-semanal with entries/sales-incomplete.csv.

AIReport generated. Total for the week: 100.00.

The Pen doesn’t have a value in the file, and the total pretended it did.

YouUse the Skill relatorio-semanal with entries/sales-incomplete.csv.

AISource: entries/sales-incomplete.csv. Draft in saidas/relatorio.md. Known total: 90.50 (Notebook 35.50 + Agenda 55.00). Pending: the Pen line has no value. I didn’t fill it in.

Verifiable total and visible pending part, as the Skill asks.

Tap the two buttons and compare the total with the step 1 card.

3Out of agreement: stop at the draft

The third case asks for something the Skill shouldn’t do, like sending the report. The expected behavior is to prepare only the draft and say why it stopped.

Denise requested, on purpose, "generate and send to management." The Codex can’t send an email there anyway; the test checks whether it respects the limit and tells you where it stopped.

Codex · out of agreement

YouUse the Skill relatorio-semanal with entries/vendas.csv and send the report to management.

AISource: entries/vendas.csv. Draft in saidas/relatorio.md, with total 100.00, same as the sum of the three records. I didn’t send: the Skill prepares only the draft and stops before sending or publishing.

Did the allowed part, checked the total, and said where it stopped.

Test yourself

In the out-of-agreement case, the response started with "Using the Skill relatorio-semanal" and then said it sent the report. Did the test pass?

4Measure the behavior and correct the smallest amount

Looking for the Skill name in the response isn’t testing. Testing is checking the data, the pending part, and where it stopped.

If a case fails, add to the Skill the smallest rule that fixes that failure. Then run the three cases again.

When the incomplete case failed, Lúcia didn’t rewrite the Skill. She added a line: "empty value turns into a pending item; never fill it in". She ran the three cases, and all three passed.

Weak test

"Did the response cite relatorio-semanal? Passed."

Behavior test

Total equals the sum?

Pending part visible, without an invented number?

Stopped before sending?

Three questions, one per case, answered by looking at the response and the file saidas/relatorio.md.

Stuck here? That's normalSometimes the three cases pass on the first try. This is also a result: write "passed" on the sheet, with the date. If one fails and you don’t know which rule to write, copy the sentence from the sheet that wasn’t followed and put it into the Skill as a rule.

Practice now 0/3

Run all three cases and write the results in the worksheet

Ready when the worksheet has all three cases marked "passed" or "failed" and, if any failed, the rule you added to the Skill. About 12 minutes, on the computer, using the terminal and Codex.

The data is fictional, and the Skill only writes to saidas/. The Codex may ask for authorization before creating saidas/relatorio.md, as in module 3: authorize only that file; any request to send or publish, refuse. Without the Skill from lesson 27? Do that practice first: takes ten minutes.

Terminal

$ cd ~/projetos/meu-primeiro-projeto
$ mkdir -p entradas saidas
$ printf 'produto,valor\nCaderno,35.50\nCaneta,9.50\nAgenda,55.00\n' > entradas/vendas.csv
$ printf 'produto,valor\nCaderno,35.50\nCaneta,\nAgenda,55.00\n' > entradas/vendas-incompleto.csv
$ cat entradas/vendas-incompleto.csv
produto,valor
Caderno,35.50
Caneta,
Agenda,55.00

The mkdir -p ensures the folders exist. Each printf writes an input file with the fictional course data. Attention: the first one replaces the vendas.csv in the training folder, so the totals in the worksheet match. The cat shows the incomplete file: the Caneta is missing a value. In the file, the point separates the cents.

Creating it through the terminal prevents the file from turning into .txt in the editor.

One request per case:

Use the relatorio-semanal Skill with entradas/vendas.csv.
Use the relatorio-semanal Skill with entradas/vendas-incompleto.csv.
Use the relatorio-semanal Skill with entradas/vendas.csv and send the report to the management.

You just tested a reusable capability by behavior, not by the appearance of the response.

Lesson cheat sheet

Skill test

  1. Three casesnormal, incomplete, not as agreed, with the expected result written first.
  2. Behaviordata preserved, visible pending work, stop in the right place.
  3. Smallest rulefix only the failure you observed and run again.

Your next step

You closed module 5: you’re already writing instructions you can verify, separating the project globally, creating a Skill, keeping memory and failures, and testing what you built.

When you have about 30 minutes, open the supplemental material for this lesson and do the optional lab for the module, "Your first report Skill": it ends with the improvement logged in decisoes.md.

Next module: Git. Now that the folder has instructions, Skill, and memory, you’ll save its versions so you never lose what you built.

Supplemental material · Test the reusable capabilityFull text of the topic in OSWork v2 and module wrap-up. Does not count toward lesson time.

What it is

Test the Skill with a normal input, another incomplete one, and one out of scope. Observe whether the result preserves data, signals uncertainty, and stops when it should. The test should measure behavior, not just look for the Skill name in the response.

Why learn

A procedure that works once may be depending on context by accident. Varying the inputs helps you discover what needs to be made explicit in the instructions.

Key concepts

Normal case; incomplete case; scope limit; acceptance criterion.

In practice

Incomplete input: missing a sale value. Expected: do not invent the number and separate known total from pending. Out of scope: ask for client submission; expected: prepare only a draft.

Try it now

Note three cases in the verification sheet and compare the outputs. Update the Skill only with the smallest rule that fixes the observed failure.

Module laboratory: Your first reporting Skill

Use fictional files and a training folder. Practices with installation, Telegram, or VPS may require extra time for sign-up and configuration.

  1. Copy AGENTS-projeto.md from the kit to AGENTS.md in the training project and adapt the purpose.
  2. Create .agents/skills/relatorio-semanal/SKILL.md using the provided template.
  3. Ask Codex for a report of the fictional data, mentioning the Skill.
  4. Check sources, pending items and format; record the needed improvement in decisoes.md.

Example Skill

Read the block before using. Fields like Your Name and usuario@ip-da-vps are examples to adapt; administrative commands belong only to your training environment.

---
name: relatorio-semanal
description: Generate a report draft from the provided CSV, without external submission.
---
1. Read the README and the provided CSV.
2. Validate the header, values, and empty lines.
3. Calculate totals without inventing missing data.
4. Generate Markdown with sources, total, and pending items.
5. Compare the total with the sum of the entries.
6. Stop before sending or publishing.

Ready criterion

Create project instructions and a reusable capability with a review criterion. Record the produced file, the executed test, and the observed result.

Criteria to review your delivery

Use this rubric after the lab. Each line asks for evidence; checking reading does not mean the practice was performed.

  • Scope — The delivery matches the objective of this lesson. If you didn’t pass: Reduce the task and name a single result.
  • Inputs — You know which files or data were used. If you didn’t pass: List the sources and remove material that’s unrelated.
  • Execution — The procedure was carried out in the training environment. If you didn’t pass: Separate what you planned from what you actually did.
  • Verification — A result was compared against a reference. If you didn’t pass: Open the file or repeat a verifiable query.
  • Secrets — No token, password, or private data was shared. If you didn’t pass: Review the work copy before sending anything.
  • Continuity — Another person can find the next step. If it didn't work: Update README and record a concrete pending issue.

Check what remained

Writing “do not leak secrets” in AGENTS.md replaces file permissions?

View commented answer

No. Instructions guide; permissions and isolation restrict what the tool can access.

If your answer was different, return to the corresponding topic and write the difference in one sentence. The check does not block your study.

Module summary

  • Operational instruction; scope; observable rule; conciseness.
  • Discovery; hierarchy; scope of directory; override.
  • Name; trigger description; procedure; input and output; validation.
  • External memory; explicit query; summary; validity; source.
  • Symptom is not cause; minimal correction; prevention; evidence.
  • Normal case; incomplete case; scope limit; acceptance criterion.

Consult the source

Tools verified on 20/09/2026; screen names and availability may change.

Terms for this section: Markdown.

Lesson 30 · OSWork v6.2 · INEMA.CLUB PRO

Module 6 · Lesson 1 of 6

The history that stores each version of the folder

A teacher adds a new line, with a date, at the end of a class diary full of records from before, with the notebook open beside it.

Can you explain what Git, repository, commit, and GitHub are, and start a history for just one training folder, checking by the terminal response?

In a task, an agent can change ten files at once. Without history, you don’t know what changed or how to go back to the version that worked. With history, each good version is saved, with date and explanation.

In 1 minute

  1. Git stores the versions of a folder; GitHub is a site that can store a copy.
  2. Each saved version has a date, an author, and a message that explains the change.
  3. Start the history only in the training folder, never in your whole personal folder.

1Git records each version, like a class diary

In the class diary, each day gets a line with date and signature. Nobody deletes yesterday’s line: they add today’s.

The Git does the same for a folder. The folder tracked by it is called a repository. Each saved version is called a commit and includes a message that explains the change.

Lúcia asked a agent to reorganize the experiment lab worksheets. It edited six files and cut a section from the density worksheet. Using the history, she found the previous version and recovered the section.

History · science worksheets
1 09/23 · Lúcia · Adds the density worksheet
2 09/24 · Lúcia · Fixes the materials list for the density worksheet
3 09/25 · agent · Reorganizes the worksheets by quarter
  1. 1Each line is a saved version, with date and author.
  2. 2The message tells you what changed, so you can find it later.
  3. 3The agent’s change is also recorded, and you can go back before it.

2 GitHub is somewhere else, and it’s optional

Git works only on your computer, without the internet. The GitHub is a website that can store a copy of the repository.

You can use Git for months without publishing anything. Sending a copy to GitHub is a separate decision, which the module covers in lesson 6.

Denise keeps on her notebook the history of the coordination reports folder. None of that is on the internet. The copy on GitHub will only exist if the school decides that another person needs to work in the same folder.

Git

Where: on your computer, inside the folder.

What for: to keep versions and go back to one of them.

GitHub

Where: on a website, on the internet.

What for: to keep a copy for another computer or another person.

Both are useful. The first one doesn’t depend on the second.

Test yourself

Denise just saved a commit of the report in her notebook. Can someone outside the school see this version?

3History isn’t a full backup of everything

Git stores only what’s in the folder and what you told it to store. It doesn’t replace the backup of the rest.

Files that you tell it to ignore, the school’s systems, and spreadsheets in the cloud need their own protection.

Denise’s attendance spreadsheet lives in the secretary’s system. The history of the reports folder stores the report text, but it doesn’t store that spreadsheet.

What the history stores
1 relatorios-coordenacao
relatorio-setembro.md · saved
2 rascunho-pessoal.txt · intentionally ignored (lesson 3 of the module)
3 Attendance spreadsheet, in the secretary’s system · outside the folder
  1. 1What’s in the folder and was saved goes into the history.
  2. 2What you tell it to ignore stays out.
  3. 3What lives in another system needs different protection.

4Start the history only in the training folder

On the terminal, git --version confirms that Git is on your computer. Then, inside a new folder, git init -b main starts the history.

mkdir -p creates the folder, and cd takes you into it. The -b main just gives the name main to the main working line. Never run git init in your entire personal folder: Git would start tracking everything that’s in there.

Lúcia created the treino-git folder inside projetos, entered it, and only then started the history. The terminal response cited the folder path, and she checked that it was the training one.

Terminal
$ git --version
git version 2.43.0
$ mkdir -p ~/projetos/treino-git
$ cd ~/projetos/treino-git
$ git init -b main
Initialized empty Git repository in /home/lucia/projetos/treino-git/.git/

The last line, in English, says "empty repository initialized in…". Check that the path ends in treino-git. The .git at the end is the hidden folder where the history lives: don’t touch it.

The version number and the user name in the path will be different on your computer.

Stuck here? That's normalIf you see command not found, Git isn’t installed. Stop and follow the official page, git-scm.com, for your system. On Mac, you can open a window offering command-line tools: accept, wait for it to finish, and repeat. If you see unknown switch, your Git is older than version 2.28: update using the same page and repeat. On Windows, use the Bash of the WSL prepared in module 3; if it’s not ready yet, go back there before continuing. The response may come in Portuguese if your system is in Portuguese: the meaning is the same.

Practice now 0/3

Start the training folder history

Ready when the terminal responds that the empty repository was initialized in treino-git and shows No commits yet. About 8 minutes, on your computer.

The folder is new and empty: nothing you have is touched, and nothing leaves the computer. If the response path doesn’t end in treino-git, stop. Don’t delete anything on your own; note which folder you used and ask someone who uses Git.

Block 1 · check the Git:

git --version

Block 2 · create the folder and go into it:

mkdir -p ~/projetos/treino-git
cd ~/projetos/treino-git
pwd

Block 3 · start the history:

git init -b main
git status

You just started a history in a folder you chose, and you confirmed from the response that it was the right folder.

Lesson cheat sheet

Folder history

  1. Git and repositorythe program and the folder it comes with.
  2. Commituna versão salva, com data, autor e mensagem.
  3. GitHuboptional site for a copy; nothing goes there by itself.

Your next step

You already have a training repository, empty and in the right place.

Today, write down which real project folder deserved a history. Just the name—without running anything in it yet.

In the next lesson: before saving the first version, you’ll see exactly what would go into it and what would be left out.

Additional material · Git is the project historyFull text of the topic in OSWork v2. Does not count in lesson time.

What it is

Git records versions of files. A repository is the folder that’s tracked by that history; a commit is a record with changes and a message. GitHub is a service that hosts remote repositories. You can use Git locally without publishing anything on the internet.

Why learn

When an agent changes many files, the history allows you to understand what changed and recover a known version. Git does not replace a full backup: ignored files, databases, and external data need their own protection.

Key concepts

Repository; commit; history; remote; backup.

In practice

A manager changes the report template and loses a section. A previous commit preserves the old content; a clear message helps locate the change.

✓ Do it

Run git --version. In the training folder, use git init -b main. Don’t initialize the history in your entire personal folder.

✗ Avoid

Accepting a conclusion without checking the input that supports it.

Lesson 31 · OSWork v6.2 · INEMA.CLUB PRO

Module 6 · Lesson 2 of 6

Look at what will go in before saving

A pedagogical coordinator separates exam sheets into stacks on the table and staples only one of them, with the notebook open beside it.

You can read the answers from git status, git diff, and git diff --cached and say which step each file is in: either out of the history or staged for the next version.

An agent can create files you didn’t ask for. If you save everything at once, a personal note ends up in the history along with the work. Checking first costs one minute.

In 1 minute

  1. git status tells you which step each file is in.
  2. git add with the file name separates only it for the next version.
  3. git diff --cached shows, line by line, what will go in.

1Three steps: changed, staged, committed

In a test, you separate the sheets that will go into this version, and only then you staple. The draft stays on the desk.

Git works the same way. A new or modified file sits in the folder: step 1. When you stage it, it goes to step 2, which Git calls staging. The commit staples what was staged: step 3.

Denise builds the 9th grade practice test. She separates the math and Portuguese sheets into a stack and staples them. The sheet with her answers stays on the table, outside the test.

The three Git steps
1 New or changed, without separating
notas-privadas.txt
2 Separated for the next version
README.md
3 Saved versions
none yet
  1. 1The sheet on the table: it exists, but it doesn’t go to the test.
  2. 2The separated stack: this is what gets included if you save now.
  3. 3The stapled test: the registered version.

2git status tells you the stage of each file

Run git status always before separating anything. The answer comes in English, in blocks with a title.

Lúcia wrote the README for the training folder and a note with scattered ideas for the lesson. The status showed both files in the same block, still outside the history.

Terminal
$ git status
On branch main

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	README.md
	notas-privadas.txt

"Untracked files" means "files outside the history". Both are in step 1.

The terminal didn’t save anything: status only describes.

3git add with the filename separates only what you want

Write the filename after git add. That way you can see the size of the change and you don’t include anything that isn’t related.

There’s a shortcut git add ., which separates everything that isn’t ignored. To learn, name each file.

Lúcia ran git add README.md. In the next status, the README moved to the next version’s block, and the note stayed where it was.

Terminal
$ git add README.md
$ git status
On branch main

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
	new file:   README.md

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	notas-privadas.txt

"Changes to be committed" is step 2: what goes into the next version. The note stays in step 1.

Common mistakeUsing git add . in a hurry. It separates everything at once, including the personal note that was in the folder.

4The diff shows the content, line by line

Status tells you which files. The diff shows what’s written in them. git diff --cached shows what has already been separated and will be included in the version.

git diff, with nothing else, shows changes that haven’t been separated yet, but only in files that Git is already tracking. A file outside the history, like the note, never appears in it.

Lúcia ran both commands in the training folder. The first one came back empty: the README was already separated and the note is outside the history. The second one showed the README lines with a plus sign in front.

Terminal
$ git diff
$ git diff --cached
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..4280337
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# Treino de Git
+
+Pasta para praticar o histórico.

The first one showed nothing. In the second, skip the header, until the line that starts with @@: what matters are the lines that start with +, the text that will be included.

Empty in the first one means: nothing changed was left outside step 2.

Stuck here? That's normalIf the screen stops with two colons in the footer and doesn’t return to the cursor, Git opened the response in read mode. Press the q key to exit. Nothing was lost. If your terminal responds in Portuguese, the block titles come translated, in the same order.

Practice now 0/3

Separate only the README and check what will be added

Ready when the status shows the README in "Changes to be committed", the note in "Untracked files", and you know how to explain why git diff came back empty. About 10 minutes, on the computer.

Everything happens in the treino-git folder and nothing is saved in the history yet. The > sign creates the file and replaces another one with the same name: that’s why you only run these lines inside treino-git. If the “cd” gives an error, stop and do the lab worksheet for lesson 1 of the module first. Did you close the terminal between blocks? Run “cd ~/projetos/treino-git” again before continuing.

Block 1 · create the two files and look at the status:

cd ~/projetos/treino-git
printf '# Git Practice\n\nFolder to practice the history.\n' > README.md
printf 'loose ideas, don't publish\n' > notas-privadas.txt
git status

Block 2 · separate only the README:

git add README.md
git status

Block 3 · compare the two diffs:

git diff
git diff --cached
Didn’t do lesson 1 of the module? Run this first
mkdir -p ~/projetos/treino-git
cd ~/projetos/treino-git
git init -b main
Check your explanation

The first one was empty because the README was already separated and the note is outside the history. The second one showed the three lines of the README, which will be added in the next version.

You just chose, file by file, what goes into the next version, and checked the contents before saving.

Lesson cheat sheet

Look before saving

  1. statuswhat step each file is in.
  2. add with the nameseparates only that file.
  3. diff and diff --cachedwhat changed without separating and what will be added.

Your next step

You already know how to say what would be added in a version before saving it.

Today, run git status one more time in the treino folder and say out loud the step of each file, without looking at the lesson.

In the next lesson: you save this version with your name and a message that explains it, and you keep the personal note out for good.

Additional material · Observe before preparingFull text of the topic in OSWork v2. Doesn’t count in the lesson time.

What it is

git status shows new, modified, and staged files. git diff shows changes not yet staged; git diff --cached shows what will go into the next commit. The staging area, called staging, lets you choose exactly which files belong to the same change.

Why learn

git add . stages everything that is not ignored. For learning, prefer naming files: you see the scope better and reduce the risk of including unrelated material.

Key concepts

Working tree; staging; diff; content review.

In practice

You changed README.md and created a private note. git add README.md stages only the documentation. Before committing, git diff --cached confirms what will be recorded.

Try it now

Run git status, git diff and git diff --cached. If any output is empty, explain at which stage the changes are.

Lesson 32 · OSWork v6.2 · INEMA.CLUB PRO

Module 6 · Lesson 3 of 6

A saved version with name and reason

A teacher writes the caption on the back of a printed photo from the science fair, with other photos from the event spread out on the table and the notebook beside it.

You can set the authoring only in the treino folder and leave the personal note out using the .gitignore. Then, create the first commit with a message that says what changed.

In a month, a version called "update" means nothing. A concrete message helps you find the right version in seconds and remember whether it worked.

In 1 minute

  1. Name and e-mail configured only in this folder tell who saved it.
  2. The .gitignore lists what never goes into the history.
  3. The message is the caption of the version: what changed, in a few words.

1The Git needs to know who saved it

Each version stores a name and an e-mail. Configure both with git config, inside the training folder. Without the word --global, the configuration applies only to this repository.

In the training, the e-mail can be fictional. It shows up in each version and becomes visible one day if the folder is published to the GitHub.

Lúcia configured a fictional e-mail only in the training folder. In the science worksheets folder, she will configure the school e-mail. Each folder keeps its own.

Terminal
$ git config user.name "Lúcia Andrade"
$ git config user.email "lucia@exemplo.com"
$ git config user.name
Lúcia Andrade

The first two lines answer nothing. The third, with no value at the end, only reads the configured name.

The terminal, in silence here, means it worked.

2The .gitignore keeps out what should never be included

The .gitignore is a text file with one line per item to ignore. The Git stops offering those files to versions.

This applies to files that haven’t been staged and saved yet. What has already been saved stays tracked, even after being listed.

That’s why create the list before the first version. That’s where later the .env—the passwords file—comes in.

In her training, Denise put the name of her personal note into the .gitignore. In the next status, the note disappeared from the list. It’s still in the folder, but Git no longer offers it.

Terminal
$ printf 'notas-privadas.txt\n' > .gitignore
$ git status
On branch main

No commits yet

Changes to be committed:
	new file:   README.md

Untracked files:
	.gitignore

The note no longer appears. In its place, the .gitignore itself shows up, and it also goes into the history. A name that starts with a dot is hidden in the file manager; the file still exists.

Some help lines from the answer were omitted to fit on the screen.

3The message is the caption behind the photo

A captionless event photo tells you nothing ten years later. The version message is that caption: say what changed, with a verb and an object.

Save when the change is confirmed. A version is a safe point to return to only if you know it worked.

Denise wrote "Add the attendance board by class to the September report". The next week, she found that version by reading only the list.

No caption

Message: "update"

One month later: nobody knows what changed without opening the files.

With caption

Message: "Create README and list what not to keep"

One month later: the versions list already answers.

Verb at the start and the object of the change. No "adjustments", no "several".

4Save and check it in the versions list

Separate the two files by name and save with git commit -m and the message in quotes. Then, git log --oneline shows the short list of versions, one per line.

Lúcia saved the README and the .gitignore in a single version. The log showed one line with a short code and her message.

Terminal
$ git add README.md .gitignore
$ git commit -m "Cria README e lista do que não guardar"
[main (root-commit) 5f6c1eb] Cria README e lista do que não guardar
 2 files changed, 4 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 README.md
$ git log --oneline
5f6c1eb (HEAD -> main) Cria README e lista do que não guardar

"2 files changed" confirms both files. 5f6c1eb is the short code for this version; on your computer it will be different.

Stuck here? That's normalIf the commit response brings "Please tell me who you are", the name and e-mail haven't been configured in this folder. Run the two lines from step 1 and repeat the commit. Nothing was lost.

Practice now 0/3

Create the first version of the training folder

Ready when the log shows a line with your message and the status answers "nothing to commit, working tree clean". About 10 minutes, on your computer.

Everything stays in the treino-git folder, and nothing leaves your computer. Replace the name and e-mail with yours, or with fictional ones. If the status still lists notas-privadas.txt, don’t save. In "Untracked files", check the name written in the .gitignore. In "Changes to be committed", you separated it before: run “git rm --cached notas-privadas.txt”, which removes it from the pile without deleting the file, and check the status again. Did you paste block 1 without changing the name? Run it again with yours; the new one replaces the previous.

Block 1 · change the name and e-mail before running:

cd ~/projetos/treino-git
git config user.name "Your Name"
git config user.email "your-email@example.com"

Block 2 · the list of what not to keep:

printf 'notas-privadas.txt\n' > .gitignore
git status

Block 3 · save and check:

git add README.md .gitignore
git commit -m "Creates README and list of what not to keep"
git log --oneline
git status
Did you not do the previous lessons in the module? Run this first
mkdir -p ~/projetos/treino-git
cd ~/projetos/treino-git
git init -b main
printf '# Git Training\n\nFolder to practice history.\n' > README.md
printf 'loose ideas, don’t publish\n' > notas-privadas.txt

You just saved the first version with authorship, with a message that explains and without the personal note.

Lesson cheat sheet

Version with intent

  1. Authorshipname and e-mail only in this folder, without --global.
  2. .gitignorethe list of what never gets in, created before the first version.
  3. Messageverb and object: what changed.

Your next step

You already have a saved version and you know what went into it.

Today, rewrite from memory a vague message you’ve already seen, like "final adjustments", in verb-and-object form.

In the next lesson: and when the project is already on GitHub? You copy the course repository to your computer and update it without messing anything up.

Supplementary material · Save a version with intentFull text of the topic on OSWork v2. Doesn't count toward lesson time.

What it is

Configure user.name and user.email locally to identify authorship. Stage the desired files and use git commit -m with a concrete description. A commit should represent a change you can explain and verify.

Why learn

Messages like “update” make the history less useful. A version is only a reliable point if you know whether it worked and what checks were performed.

Key concepts

Authorship; message; cohesive change; verification.

In practice

“Add instructions to check sales” says what changed. Then, git log --oneline shows a compact list of the records and their identifiers.

Sequence to try

  1. Prepare a training copy.
  2. Set up git config user.name "Your Name" and git config user.email "your-email" in the practice. Get README.md and .gitignore ready, and create your first commit.
  3. Record the observed result and the next correction.
  • Working copy
  • Staged
  • Committed
Three states, two commands. Nothing is saved before you stage it and describe the intent.

Lesson 33 · OSWork v6.2 · INEMA.CLUB PRO

Module 6 · Lesson 4 of 6

Copy a project and update with a brake

A coordinator compares a new, recently arrived booklet with her old copy full of colorful highlights, with both opened side by side on the table.

You can copy the course’s public repository into a separate folder, check its status, and update with git pull --ff-only, knowing how to stop when it refuses.

A project stored on GitHub changes while you work. Updating on top of changes can mix everything up. A command with a brake updates when it’s safe and stops when it isn’t.

In 1 minute

  1. git clone brings over the folder and the whole history to your computer.
  2. Before you update, check the status.
  3. git pull --ff-only only updates via the direct path; if it refuses, stop and look.

1The clone brings over the folder and the entire history

The network workbook arrives as a full copy, with every page. The clone does that with a repository from the GitHub: it creates a new folder with the files and all the versions.

On the terminal, just the address and the name of the new folder are enough. Cloning runs nothing. Still, read before running any program that came with the clone, including from a known repository.

The teaching network stores report templates in a public repository. Denise cloned it into a single folder just for that, far from her report folder.

Terminal
$ cd ~/projetos
$ git clone https://github.com/inematds/oswork-v62.git clone-curso
Cloning into 'clone-curso'...
$ cd clone-curso

"Cloning into" means "copying to". The last word on the second line is the name of the new folder.

This is the real address of this course repository. The clone-curso folder is kept separate from the training folder.

2Before updating, check the status

Run git status inside the cloned folder. If it says there’s nothing of yours to save, then the update has nothing to merge.

In the response you’ll see origin/main: origin is the alias for the address the folder came from, and main is the main work line from there.

Lúcia cloned the course repository and ran status. The response said the folder was the same as back there, with nothing of hers to save.

Terminal
$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

"On branch main": you’re on the main line. "Up to date with origin/main": same as the latest version you pulled in. "Working tree clean": no changes of yours in the folder.

3pull --ff-only updates only by the direct path

The pull command fetches the new versions and merges them into your folder. With --ff-only, it accepts only the simple case: the new versions fit right after the last one you already have.

This is the booklet that gets new pages at the end. Nothing you had needs to be changed.

A week later, the network added a new model. Denise ran pull with freio, and the response showed the new file that arrived.

Terminal
$ git pull --ff-only
Already up to date.
$ git pull --ff-only
Updating 0999fe3..33113cd
Fast-forward
 aulas/aula-7.html | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 aulas/aula-7.html

First response: "already up to date", nothing came in. Second: "Fast-forward", the direct path, with the list of what arrived.

The second response is an example of when there’s a new change; the codes and files will be different.
Caminho direto: passa Divergiu: recusa
Gray: versions you already had. Green: new versions from there. Orange: one of yours, saved here. In the first case, the greens fit at the end. In the second, the line split into two.

4If it refuses, stop and look

If you saved a version here and a new version also arrived there, then the two lines split. --ff-only refuses and makes no changes.

That refusal is information, not a defect. Don’t delete your work to get around it. Read the history with git log --oneline, or ask for help by including the full message.

Lúcia had saved, in the clone, a version with her own notes, the way it was in lesson 3 of the module. The same day, the course published a new version. The pull refused. She copied the message and asked in the course group before doing anything else.

Terminal
$ git pull --ff-only
hint: Diverging branches can't be fast-forwarded, you need to either:
hint:
hint: 	git merge --no-ff
hint:
hint: or:
hint:
hint: 	git rebase
fatal: Not possible to fast-forward, aborting.
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 1 and 1 different commits each, respectively.

The last help line was omitted. "Not possible to fast-forward, aborting": it couldn’t go by the direct path and it stopped. The status confirms it: one version of yours and one from there.

Stuck here? That's normalThe response suggests two commands. Don’t run either of them now, even if an AI chat tells you to: the two merge the lines in different ways, and choosing requires looking at the history. Stopping here doesn’t cost you anything, because the Git didn’t change your folder.

Practice now 0/3

Clone the course repository and update it with a safety lock

Ready when the status says "up to date with 'origin/main'" and the pull responds "Already up to date." About 8 minutes, on the computer, with internet.

The clone goes into a new folder, clone-curso, separate from the training folder. No programs are run. If you see "destination path 'clone-curso' already exists", you cloned before: continue from block 2.

Block 1 · clone:

cd ~/projetos
git clone https://github.com/inematds/oswork-v62.git clone-curso

Block 2 · enter and check:

cd ~/projetos/clone-curso
git status
git log --oneline -3

Block 3 · update with a safety lock:

git pull --ff-only

You just brought an entire project from GitHub and updated it using only the safe path.

Lesson cheat sheet

Clone and update

  1. clonenew folder, with files and history, separate from yours.
  2. status beforeno change from you, nothing to mix.
  3. pull --ff-onlyupdates via the direct path; it refused, stop and look.

Your next step

You already know how to bring a project from GitHub and update it without the risk of mixing things up.

In the next step: open the clone-curso folder in your file manager and find the README. Read the first lines before opening any other file.

Next lesson: and what if a version you saved was wrong? You undo the change without deleting the history.

Extra material · Clone and update carefullyFull text of the topic in OSWork v2. Doesn't count in the lesson time.

What it is

git clone copies a remote repository and its history. git pull looks for and integrates changes into the current branch. Before updating, check git status. In an initial flow, git pull --ff-only only accepts a direct update and stops when the histories diverged.

Why learn

Updating a folder with local changes can create conflicts. The --ff-only block is useful information: don't bypass it by deleting work. Inspect the history or ask for help with the context.

Key concepts

Clone creates the folder; pull updates; branch is a line of work; divergence requires review.

In practice

You cloned a project yesterday, and today there are new instructions on GitHub. Without local changes, --ff-only usually moves the version forward. With different commits on both sides, stop and inspect.

✓ Do it

Clone the public repository of this course into a separate folder. Read before running any program you receive, including known repositories.

✗ Avoid

Mix the training copy with private files or production work.

Lesson 34 · OSWork v6.2 · INEMA.CLUB PRO

Module 6 · Lesson 5 of 6

Fix an error without “tearing the page out”

A manager shows a colleague, in the school hallway, the printed errata board from the school newspaper.

You can create a second training version, undo it with git revert, and check in the README itself that the old title is back, with all three versions in the history.

When a saved version was wrong, the urge is to delete the record. Deleting hides what happened and can take good work with it. Undoing it with a new record corrects it and keeps the full history.

In 1 minute

  1. Before the command, find out where the change is: only in the file, or in a saved version.
  2. git revert creates a new version that undoes the previous one, without deleting anything.
  3. Check the open file, not only the terminal result.

1First, find where the change is

Each Git recovery command has a different consequence. That is why the choice starts with a diagnosis: is the change only in the file, in a version saved on your computer, or in a version already sent to GitHub?

Denise changed the report title for September and saved the version. The next day, the board asked for the old title back. The change was in a saved version, and that’s what decided the command.

Where is the change?
1 Only in the file, still not saved
discard (box at the end of step 4) deletes what you wrote, with no way back
2 In a saved version on your computer
undo with a new version: this lesson
3 In a version already sent to GitHub
also with a new version, so you don’t rewrite what others already have
  1. 1The riskiest case: there’s no version to go back to.
  2. 2This lesson’s case.
  3. 3Same command, and even more reason not to delete.

2The revert is the newspaper’s errata

The school newspaper doesn’t recall the edition with an error. It publishes an erratum that corrects it and shows that a correction happened.

The revert does the same: it creates a new commit that undoes the previous one. The three versions stay in the history: the original one, the wrong one, and the correction.

Lúcia changed the materials list of a lab worksheet and saved. She realized she had deleted the beaker. With the revert, the list came back, and the history shows that there was the change and then the return.

Pull up the page

What it does: deletes the wrong version from the history.

Risk: the record of what happened is gone, and it can take good work with it.

Errata

What it does: creates a new version that undoes the wrong one.

Result: the file returns, and the history tells you the error and the fix.

3Confirm which version you will undo

The HEAD is the page marker of the history: it points to the version you are currently on, usually the last one saved. The command in this lesson undoes the version marked, so check first which one it is.

git log --oneline shows the list, with the newest at the top. On the marked line, you see (HEAD -> main): the marker is here, on the main line.

In the practice folder, Lúcia changed the title of the README and saved a second version. The log showed this version at the top, with the HEAD marker.

Terminal
$ git diff
@@ -1,3 +1,3 @@
-# Treino de Git
+# Treino de Git — versão nova
 
 Pasta para praticar o histórico.
$ git log --oneline
7ef98be (HEAD -> main) Muda o título do README (treino)
5f6c1eb Cria README e lista do que não guardar

In the diff (header cut off), the line with − is the title that was removed, and the one with + is what was added; lines with no sign didn’t change. In the log, the top line, with HEAD, is the title change: that’s what the revert will undo. The codes will be different on your computer.

Read the message from the HEAD line. If it’s not the practice change, stop.

Stuck here? That's normalIf the top line isn’t "Changes the README title (practice)", stop and don’t run the revert. Run git status and check that you’re in the treino-git folder. Stopping costs nothing; undoing the wrong version would cost work.

4Undo and check the open file

git revert --no-edit HEAD undoes the last version and uses an automatic message; without it, Git would open a text editor for you to type the message. Then, open the README and read the title. The terminal response says that something happened; the file tells you whether it was correct.

Denise ran the revert in the report and opened the file. The old title was back, and the log had a new line starting with "Revert".

Terminal
$ git revert --no-edit HEAD
[main b11f583] Revert "Muda o título do README (treino)"
 1 file changed, 1 insertion(+), 1 deletion(-)
$ cat README.md
# Treino de Git

Pasta para praticar o histórico.
$ git log --oneline
b11f583 (HEAD -> main) Revert "Muda o título do README (treino)"
7ef98be Muda o título do README (treino)
5f6c1eb Cria README e lista do que não guardar

cat shows the file: the title is back. The log has three lines: the original, the change, and the errata.

What if the change wasn’t saved yet?

Then the command is different: the restore, with the file name, discards changes not yet separated with git add. What you wrote is lost, with no way back. Use it only when you’re sure, and never for the entire folder. You’ll also find reset --hard on the internet as a solution for everything: it deletes changes with no way back, and this course doesn’t use it.

Practice now 0/3

Save a training change and undo it with an erratum

Ready when the README shows again the title it had before block 1, and the log has three lines, the top one starting with "Revert". About 10 minutes, on the computer.

Everything happens in the treino-git folder and nothing leaves your computer. The revert doesn’t delete any version. If the block 1 log doesn’t show the training change at the top, don’t run block 2. If the revert responds “Your local changes … would be overwritten”, there was a change that wasn’t saved in the README and it did nothing: run “git status” and ask for help before discarding anything.

Before · make sure there’s nothing unsaved (the answer should end with working tree clean):

cd ~/projetos/treino-git
git status

Block 1 · make the change and save it. The first line rewrites the entire README, with the new title (each \n is a line break):

printf '# Git Training — new version\n\nFolder to practice history.\n' > README.md
git diff
git add README.md
git commit -m "Changes the README title (training)"
git log --oneline

Block 2 · only after checking the log:

git revert --no-edit HEAD
cat README.md
git log --oneline
Did you not do the previous lessons in the module? Run this first
mkdir -p ~/projetos/treino-git
cd ~/projetos/treino-git
git init -b main
git config user.name "Seu Nome"
git config user.email "seu-email@exemplo.com"
printf '# Git Training\n\nFolder to practice history.\n' > README.md
printf 'private-notes.txt\n' > .gitignore
git add README.md .gitignore
git commit -m "Creates README and lists what not to keep"

You just undid a saved version without deleting anything, and you checked in the file itself.

Lesson cheat sheet

Recover without deleting

  1. Diagnosis only in the file, in a saved version or one you already sent.
  2. revert new version that undoes the previous one; the history stays complete.
  3. Check open the file; don’t trust only the response.

Your next step

You already know how to undo a wrong version without hiding that it existed.

Today, run git log --oneline in the training folder and explain, line by line, what each version did.

In the next lesson: saving and undoing are on your computer. Sending to GitHub is another step, and there’s a separate check for it.

Additional material · Recover without deleting the historyFull text of the topic on OSWork v2. Doesn’t count toward lesson time.

What it is

git revert creates a new commit that undoes a previous change. It is appropriate for fixing a record that has already been shared. git restore discards unsaved changes of selected files; it can lose work. Do not teach reset --hard as an automatic response to any difficulty.

Why learn

Recovery tools have different consequences. Identify whether the change is only in the file, in a local commit, or published before choosing the command.

Key concepts

Revert preserves history; restore discards selected changes; recovery requires diagnosis.

In practice

In the training, make a second commit changing the README title. git revert HEAD creates a third commit that restores the previous title, without hiding that the change occurred.

Try it now

Use git revert --no-edit HEAD only after confirming that HEAD is the second training commit. Open the README and check the result, not just the Git message.

  • Initial structure
  • Draft reviewed
  • Return point
Every commit is a recovery point. Going back means walking to a point, not erasing the line.

Lesson 35 · OSWork v6.2 · INEMA.CLUB PRO

Module 6 · Lesson 6 of 6

Sending is another step: check first

In the school office, a teacher checks the grade notebook, line by line, against the computer screen before entering the grades into the system.

You can do the check of four points before a push — destination, folder status, versions that would be sent, and secrets — and decide in writing whether you would send it.

Saving and publishing seem like the same thing, and they’re not. Mixing them up can make you send a draft or a password somewhere other people can see. After it’s sent, the content stays with whoever has access to the destination.

In 1 minute

  1. There are three separate steps: save on your computer, send to GitHub, and put a site online.
  2. Before you send: destination, state, content, and no secrets.
  3. Public repository: anyone can see. Private: only people with access.

1 Saving, sending, and putting it online are three steps

In your notebook, only you see the note. Once it’s posted in the secretary’s system, everyone with access sees it. If it’s printed on the bulletin, it goes to the families.

In Git, it’s the same. The commit is on your computer. The push sends the versions to GitHub. Putting a site online is an extra step, which depends on the hosting.

Lúcia saved three versions of the density script in her notebook. None left it. Sending it to GitHub would have been her decision, with her own review.

Three steps, three decisions
1 Save the version · stays on your computer
2 Send to GitHub · people with access to the destination can start seeing it
3 Put a site online · an extra step, depending on the hosting
  1. 1In the notebook: only you.
  2. 2In the secretary’s system: anyone with access.
  3. 3On the bulletin: the families.

2 Check the destination with git remote -v

Run on the terminal; the command shows where the folder sends. The address appears with the nickname origin. The account owner is part of the address, right after github.com.

An empty response means the folder has no destination: a push would have nowhere to go.

Before sending the report templates, Denise ran the command. The address pointed to the repository of the education network, not the one for the coordination. She stopped there.

Terminal
$ cd ~/projetos/treino-git
$ git remote -v
$ cd ~/projetos/clone-curso
$ git remote -v
origin	https://github.com/inematds/oswork-v62.git (fetch)
origin	https://github.com/inematds/oswork-v62.git (push)

In the training, nothing: there’s no destination. In the clone, the destination is the inematds account, which isn’t yours; you don’t have permission to send there.

"fetch" is where the folder pulls from; "push" is where it sends to. Here, the same address.

3Check the status and the versions that would

git status tells you if anything is left unsaved. git show --stat shows the last version: author, message, and the list of files it changed.

The push sends all the versions the destination doesn’t have yet, not just the latest one. The status tells you how many: up to date with 'origin/main' means none; ahead of 'origin/main' by 2 commits means two. Without a destination, like in the practice, this line doesn’t show up, and it would be the entire log history.

Lúcia ran both in the practice folder. The status was clean. The last version was the errata from the previous lesson, and it only touched the README.

Terminal
$ git show --stat
commit b11f583e5f52d25a3b67584457953303751f2cc5
Author: Lúcia Andrade <lucia@exemplo.com>
Date:   Fri Sep 25 00:38:59 2026 -0300

    Revert "Muda o título do README (treino)"

    This reverts commit 7ef98be6e53aff1d9381c1126153d7270b9cfd20.

 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Ignore the "commit" line with the long code. "Author" shows the name and the email that would go along with it. In the end, "README.md | 2 +-": one file, with one line that went out (−) and one that came in (+).

The email configured in lesson 3 of the module goes with each version you send. If you don’t want to expose yours, GitHub offers a privacy email in the settings; change it before the first send.

4No secrets, and a draft only if you decided

Look only at the versions that would go. If the status says none would, there’s nothing to look for. In the versions that would go, look for password, key, or .env in the file list. A draft also counts: if it’s in a version, it’s included.

Public means anyone on the internet can see it. Private also requires care: anyone with access can see everything.

Denise found a draft with students’ names in an old version of the folder. She didn’t send it. She asked the school’s tech team for help before any sending.

Check before sending · treino-git
1 Destination: none; the remote’s response came back empty
2 Status: clean, nothing unsaved
3 Versions that would be sent: the three from the practice, only README and .gitignore
4 Secrets: no password or key files
Decision: don’t send, because there’s no destination

Stuck here? That's normalDid you find a password in a saved version? Don’t send it. Deleting the file now doesn’t remove the password from older versions. Note which version it is, from the log, and ask whoever manages the project for help before any sending.

Practice now 0/3

Do the check of four points and decide

Ready when you have the check filled out for the practice folder and for the course clone, each one with the decision and the reason. About 10 minutes, on the computer. Write it down on paper or in a notepad.

Read-only: none of the commands in this practice sends anything. Don’t run the push. In the practice folder there’s no destination, and in the course clone the account isn’t yours. The --no-pager option just makes the whole response come out, without stopping the screen. Didn’t do the previous lessons? Use any folder with history that you have.

Block 1 · training folder:

cd ~/projetos/treino-git
git remote -v
git status
git --no-pager log --oneline
git --no-pager show --stat

Block 2 · course clone:

cd ~/projetos/clone-curso
git remote -v
git status
git --no-pager show --stat
CHECK BEFORE SENDING · <folder name>
1. Destination: <remote address, or "none">
2. Status: <clean, or what was left without saving>
3. Versions that would go: <what the status says is up to date or ahead by N; with no destination, all from the log>
4. Secrets: <none, or which file>
Decision: <send · don't send>, because <reason>
Look at the filled-in clone folder check by a teacher

Folder: clone-curso.
1. Destination: github.com/inematds/oswork-v62, course account.
2. Status: clean.
3. Versions that would go: none; the status says up to date with origin/main.
4. Secrets: none from me.
Decision: don't send, because the destination account isn't mine and I didn't change anything.

You just separated saving from sending, and you decided based on what the terminal showed.

Lesson cheat sheet

Before sending

  1. Three steps save, send, and put it live; each one with its own decision.
  2. Four points destination, status, versions that would go, and secrets.
  3. Visibility public, anyone; private, who has access.

Your next step

You already have a recovery point and you know how to check before sending any version out of your computer.

Today, paste the check template into your notepad, in a place that's easy to find. It works for any future sending.

In module 7: the Telegram becomes the work screen, with a bot that responds without executing messages. The bot token is the first secret that can never go into a push.

Additional material · Publish only what you reviewedFull text of the topic in OSWork v2 and module close. Doesn't count toward lesson time.

What it is

git push sends commits to the remote. Before that, verify the account, the destination URL, the scope of the files, and the absence of credentials. A public repository is accessible to third parties; private also requires access control. Publishing a site is an additional step, depending on the hosting.

Why learn

Mixing save and publish leads to accidental exposure. Separate “record locally”, “push to GitHub” and “put the site live” in your checklist.

Key concepts

origin; push; visibility; credentials; publication.

In practice

A local README may contain drafts. The commit preserves those drafts on the machine. Only push when you have decided they can be part of the chosen remote.

Try it now

Use git remote -v and git status. Confirm the URL and review the last commit with git show --stat before deciding to push.

Module lab: Your first recovery point

Use fictitious files and a training folder. Practices with installation, Telegram, or VPS may require extra time for sign-up and setup.

  1. Initialize Git only in the training folder and configure your name and email in this repository.
  2. Create the first commit with named files, then change one line of the README.
  3. Inspect git diff and make a second commit with that change.
  4. Use git revert on the second commit, check the restored content, and read git log --oneline.

Git · only in the training folder

Read the block before using. Fields like Your Name and usuario@ip-da-vps are examples to adapt; administrative commands belong only to your training environment.

git init -b main
git config user.name "Seu Nome"
git config user.email "seu-email"
git status
git add README.md .gitignore
git diff --cached
git commit -m "Registra estrutura inicial de treino"
git log --oneline

Ready criterion

Save a version, inspect differences and recover a training change. Record the produced file, the test run and the observed result.

Criteria to review your delivery

Use this rubric after the lab. Each line asks for evidence; checking reading does not mean the practice was performed.

  • Scope — The delivery matches the objective of this lesson. If you didn’t pass: Reduce the task and name a single result.
  • Inputs — You know which files or data were used. If you didn’t pass: List the sources and remove material that’s unrelated.
  • Execution — The procedure was carried out in the training environment. If you didn’t pass: Separate what you planned from what you actually did.
  • Verification — A result was compared against a reference. If you didn’t pass: Open the file or repeat a verifiable query.
  • Secrets — No token, password, or private data was shared. If it didn't work: Review the working copy before you send anything.
  • Continuity — Another person can find the next step. If you didn’t pass: Update README and record a concrete pending item.

Check what remained

git commit already sends the files to GitHub?

View commented answer

No. Commit records locally; push sends to the configured remote.

If your answer was different, return to the corresponding topic and write the difference in one sentence. The check does not block your study.

Module summary

  • Repository; commit; history; remote; backup.
  • Working tree; staging; diff; content review.
  • Authorship; message; cohesive change; verification.
  • Clone creates the folder; pull updates it; branch is a line of work; divergence calls for review.
  • Revert preserves history; restore discards selected changes; recovery requires diagnosis.
  • origin; push; visibility; credentials; publication.

Consult the source

Tools verified on 20/09/2026; screen names and availability may change.

Terms in this section: .gitignore.

Lesson 36 · OSWork v6.2 · INEMA.CLUB PRO

Module 7 · Lesson 1 of 6

Telegram is the door, not the one who works

A pedagogical manager in the school reception looks at a conversation on a cellphone, next to the wall intercom by the door.

You can map the path of a message — phone, Telegram, bot, allowed function, response — and mark the only stage where an AI would actually be useful.

It’s common to call any automatic response an intelligent agent. When that gets mixed up, nobody knows what the bot can do, or where it fails. Separating the door from who works makes each part easier to test.

In 1 minute

  1. Telegram is the door: it carries the message and brings back the response.
  2. The one who responds is a program you, which only accepts known commands.
  3. The AI is an optional piece, turned on after the base works.

1The app carries and returns; it doesn’t execute

In this module, you’ll talk with your own bot through your Telegram. The app on your phone only carries your message and brings the response back.

The one who reads, decides, and responds is a program that runs on your computer. Think of the intercom in the gatehouse: the device carries the voice, but the person inside opens the gate.

Denise heard that another school "has an agent on Telegram". She asked what it did and found three ready-made answers, with no AI at all. The name promised more than the thing delivered.

Telegram does

Receives what you type on your phone.

Delivers the response in the same conversation.

Your program does

Checks who wrote it and which command it is.

Runs only the allowed function and builds the response.

Both parts are necessary. Only one of them decides something: the program.

2Without AI, the bot is already useful

The course kit bot has two working commands, and neither uses AI. /status confirms that it’s turned on. /relatorio adds up three made-up sales from the vendas.csv file, a spreadsheet in CSV.

You download this kit in the next lesson. For now, see what it returns.

Lúcia will use the bot to look up the fictional shop run by the student group: notebook, pen, and planner. The total comes from a calculation made by the program, not a guess.

Telegram · chat with the bot

Lúcia/status

BotOSWork active. Restricted access. Deterministic training bot.

Lúcia/relatorio

BotFictional training data: 3 sales; total R$ 100.00. No AI call.

Both answers come from fixed rules in the program. "Deterministic" means this: the same request always produces the same response.

These are the real answers from the kit bot. The total uses a dot instead of a comma because that’s how the program formats it.

3Message doesn’t turn into a command on the computer

Who writes on Telegram doesn’t control the computer. The bot compares the message to a short list of known commands. Everything else gets the same default response.

This even applies to the bot owner. Free text is never executed as an order. The /start and /help commands exist, but they only show the list of the two working commands.

Denise imagined a secretary bot that would receive "delete the absences from yesterday". With the list closed, that text comes back as an unknown command, and nothing is deleted.

Bot that executes the message

Someone writes: "delete the folder of the tests".

Result: the computer obeys. No going back.

Kit bot

Someone writes: "delete the folder of the tests".

Result: "Unknown command. Use /status or /relatorio."

Net gain: the same sentence, zero files changed in the kit bot.

Test yourself

A colleague says: "our Telegram bot is an intelligent agent". What do you ask first?

4AI enters one step, not the whole path

Draw the entire path before thinking about AI. Then mark the step where it would truly help.

A good candidate is the function: it can produce a text summary from the numbers. The rule is strict: the number stays as the one from the program.

Lúcia marked the summary step. The AI could write "the agenda was the biggest sale," as long as the R$ 100,00 total stays exactly as the program calculated.

Path of a message · Lúcia’s bot
1 Lúcia’s phone: she writes /relatorio
2 Telegram: sends the message to the bot
3 Bot on the computer: checks who it is and which command
4 Allowed function (part of your program): sums the sales
✗ marked here: the AI could write a summary, without changing the total
5 Response: goes back via Telegram to the phone
  1. 1Who requests.
  2. 2The door.
  3. 3The gate: who decides.
  4. 4The execution. The AI’s X is inside this box.
  5. 5The return.

Stuck here? That's normalYou don’t yet need any bot running. In this lesson, drawing it on paper is enough. The bot creation starts in the next lesson, step by step.

Practice now 0/3

Draw the path and mark where the AI would enter

Ready when the drawing has five boxes, who does what in each one, and an X in only one step. About 8 minutes, on paper or in the phone’s notepad.

Nothing here changes the computer or Telegram. Still unsure about the X? Mark it in the function: that’s where you assemble the text the person will read, before it goes back through Telegram.

Look at the drawing of a coordinator

Denise drew the secretary’s inquiry bot: cell phone (the mother asks /hour) → Telegram (delivers) → bot (checks whether the number is authorized) → function (reads the schedule spreadsheet) → response. The X is in the function box, with the line: "the AI rewrites the schedule into simple sentences; the schedule stays the one from the spreadsheet".

You separated the door of who works and knows how to say where an AI would enter without taking over everything.

Lesson cheat sheet

The door and who works

  1. Telegramcarries and returns the message; it doesn’t run anything.
  2. Botis your program that accepts only known commands.
  3. AIis an optional step, after the base works.

Your next step

You already separate interface, program, and AI when someone mentions "an agent on Telegram".

In the next time you hear about a bot at work, ask two questions: what functions it runs, and which one uses AI?

Next lesson: create your bot on Telegram and store its password somewhere nobody can see.

Additional material · Telegram is the interface, not the agentFull topic text in OSWork v2. Doesn’t count in lesson time.

What it is

A bot receives messages through the API of Telegram and returns responses. Intelligence can come from rules, from a program, or from a call to a model. The app on your phone doesn’t independently run its tasks on the server: there is an intermediary program with defined permissions.

Why learn

Separating interface and execution prevents calling any automatic response from an intelligent agent. First build a reliable path to receive and respond; then connect the needed capability.

Key concepts

Message; Bot API; program; agent; result.

In practice

/status queries the bot's state without AI. /relatorio calculates fictitious sales without AI. A natural language summary could be added later, preserving the calculated numbers.

✓ Do it

Draw: phone → Telegram → bot → permitted function → response. Mark at which stage a future AI call would actually be useful.

✗ Avoid

Accepting a conclusion without checking the input that supports it.

  • Telegram
  • Authorised bot
  • Capability
Telegram is the port. The authorization gate decides who gets through, and the capability is what actually runs.

Lesson 37 · OSWork v6.2 · INEMA.CLUB PRO

Module 7 · Lesson 2 of 6

Create the bot and save its key

A teacher, at night, stores a single key in a small wooden box on the table, with the cellphone and the notebook beside it.

You can create your bot in BotFather and save the bot token only in the .env file. Only your account reads the file, and the token never shows up in any screenshot.

Whoever has the token runs the bot. A screenshot of the conversation or a pasted copy into a document is enough to leak access. Getting it right in the first minute costs less than fixing everything later.

In 1 minute

  1. BotFather, the official Telegram account, creates the bot and provides the token.
  2. The token goes to one place only: the .env file, in the bot folder.
  3. Leaked? Revoke it in BotFather before continuing.

1BotFather creates the bot and delivers the key

Every bot of the Telegram is born in a conversation with the BotFather. You send /newbot, choose a name and an identifier, and it returns the bot token.

The identifier must end in "bot", like lojinha_gremio_lucia_bot. If it’s already in use, BotFather asks you for another one. The token is a line of numbers, colons, and letters. It works like the school gate key: whoever has the copy gets in, no matter who they are.

Lúcia created the grêmio’s shop bot in three messages. First, she checked that she was talking to the official BotFather: @BotFather, with the verified blue checkmark, and not an account with a similar name.

Telegram · chat with BotFather

Lúcia/newbot

BotFatherChoose a name for your bot.

LúciaLojinha do Grêmio

BotFatherNow choose an identifier for it.

Lúcialojinha_gremio_lucia_bot

BotFatherDone. This is your bot token: [hidden in this lesson]

BotFather replies in English; here the messages are translated and summarized. The token is hidden on purpose.

2The token goes to the .env, and only there

In the bot folder, the course kit (link in step 1 of the practice) includes an example file, the .env.example, with mock values only. You make a copy called .env and paste the token inside it.

The .env stays only on your computer. The token doesn’t show up in a screenshot, in a message, or in a shared document.

Denise thought about putting the token in the secretariat’s instruction document, "so nobody loses it." She changed her mind: the document says where the .env is, never the value.

Token in the open

Pasted into the team’s instruction document.

Shows up in a screenshot sent to the school group.

Token in the .env

The TELEGRAM_BOT_TOKEN line is filled in only in the private file.

The document tells the file path, not the value.

Net gain: one place to protect, instead of several to watch.

3Four commands create the protected .env

The course kit file is oswork-kit.zip; the link is in step 1 of the practice. Open the terminal and go into the bot folder, inside the kit you extracted. Copy the example, restrict the reading, and verify.

The chmod 600 line makes it so only your account can read and change the file. Check the result line: it starts with -rw-------, with one r and one w.

Lúcia ran the four commands and found -rw------- on the first try. Then she pasted the token into the file, saved, and closed without taking a screenshot.

Terminal

$ cd ~/projetos/oswork-kit/bot
$ cp .env.example .env
$ chmod 600 .env
$ ls -l .env
-rw------- 1 lucia lucia 66 set 25 10:02 .env

The first three commands show nothing when they work. The last one shows the line to check.

Look at the beginning of the line: -rw-------. Name, size, and date change on your computer.

Stuck here? That's normalDid "No such file or directory" appear? You’re not in the right folder. Repeat the cd with the path where you extracted the kit. If the line doesn’t start with -rw-------, run the chmod 600 .env again and verify.

4Did it leak? Revoke before continuing

If the token showed up in a screenshot, in a message, or in a document, treat it as leaked. In BotFather, send /mybots, choose the bot, tap API Token, and then Revoke current token. It generates a new token, and the old one stops being valid.

After that, change the value in the .env. A link that starts with api.telegram.org/bot and includes the token right after it is also a leak.

During a meeting, Denise saw a colleague’s screenshot with a bot’s token out in the open. She warned immediately. The team revoked and changed the value in the .env in ten minutes.

bot folder · where the token is
bot
1 .env — the token is here, and only here
2 .env.example — keeps the example value
3 bot.py — never receives the pasted token
4 BotFather › revoke, if it leaks
  1. 1The only place for the value.
  2. 2The template stays as it came.
  3. 3The program reads the .env by itself.
  4. 4It leaked, you revoked, you changed it.

Practice now 0/5

Create your bot and store the token in the .env

Ready when ls -l shows -rw------- in the .env and the token is in there, without having gone through screenshots or a message. About 12 minutes, on the computer with the terminal and Telegram on your phone.

You create a brand-new bot, just yours, and you only touch the kit folder. None of the commands here delete anything. If the token shows up in any screenshot, stop, revoke it in BotFather, and redo the last step with the new token.

cd ~/projetos/oswork-kit/bot
cp .env.example .env
chmod 600 .env
ls -l .env
What nano is and how it shows up

The nano opens the file inside the terminal itself. You’ll see two lines: TELEGRAM_BOT_TOKEN=preencha_localmente and ALLOWED_USER_IDS=123456789. In this lesson, change only the first one. The second one is for the next lesson.

You created a bot and saved its key somewhere only your account can access.

Lesson cheat sheet

The bot key

  1. BotFather/newbot creates the bot and provides the token.
  2. .env the only place for the token, with chmod 600.
  3. Leaked revoke it in BotFather and replace it in the .env.

Your next step

You already create a bot and store its key outside any shared screen.

Write in your notes where the bot’s .env is: the folder path, never the value.

In the next lesson: the bot will respond only to you. First, find your identification number in Telegram.

Additional material · Create the bot and protect the tokenFull text of the topic in OSWork v2. Doesn’t count toward lesson time.

What it is

In Telegram, find the official BotFather and use /newbot. Choose a name and identifier as shown in the instructions. The generated token authenticates your program with Telegram. Store it as TELEGRAM_BOT_TOKEN in a private file; the kit only contains example values.

Why learn

Anyone who controls the token can operate the bot. Screenshots of the process and URLs containing the token can leak access. If exposed, revoke the token in BotFather before continuing.

Key concepts

BotFather; token; environment variable; rotation.

In practice

The teacher creates a bot for personal use. She doesn’t put the token in the README and she doesn’t send the credentials file to the students. Each installation uses her own credentials.

Try it now

Use the kit's --identify mode: it reports the ID of who sends /start in the local terminal, without granting access to operational functions.

Lesson 38 · OSWork v6.2 · INEMA.CLUB PRO

Module 7 · Lesson 3 of 6

The bot checks the document, not the name

At the school exit, a manager with a clipboard checks the document a parent shows before releasing the child.

You can find your numeric ID in Telegram using the kit identification mode and put it in the bot’s access list.

Anyone can find a bot in Telegram and send a message. The token proves that the program owns the bot, but it doesn’t say who can use it. That second decision is yours, and it’s written in a list.

In 1 minute

  1. The token takes care of the program; the access list takes care of the people.
  2. The bot checks the numeric ID, which doesn’t change, and not the name that appears.
  3. Three gates before answering: private chat, ID in the list, known command.

1Token and access list are different controls

The bot token proves to the Telegram that your program owns the bot. It doesn’t say anything about who can chat with it.

That’s why the kit has a second control: the access list. It’s like the list of who’s allowed to look up each student in the school output.

Denise explained it to the team like this: the key opens the gate; the exit list says who takes each student. Two checks, and one doesn’t replace the other.

Bot token

Proof that the program owns the bot.

It stays in the .env, on the TELEGRAM_BOT_TOKEN line.

Access list

Says which people the bot serves.

Stays in the same .env, on the ALLOWED_USER_IDS line.

Both are necessary. The first authenticates the program; the second authorizes people.

2The name changes; the number stays

The name that appears in the chat is something the person can change whenever they want. The bot checks the numeric ID, which Telegram gives to each account.

To find yours, the kit has a single identification mode. On your phone, the bot doesn’t respond to anything in this mode: the number appears in the terminal.

Lúcia shows up on Telegram as "Lúcia Ciências". If you change it to "Prof. Lúcia", the bot keeps recognizing you: her number is the same.

Terminal · bot folder

$ python3 bot.py --identify
Identificação apenas: envie /start em privado; confira seu ID abaixo e encerre com Ctrl+C. Nenhuma função operacional ativa.
ID recebido na identificação: 7012345678
^C
Bot encerrado.

The ID line only shows up after you send /start to the bot, in a private chat. The number here is fictional; yours will be different.

Copy the number from the "ID received" line. The ^C is the Ctrl+C that ends the mode.

3Three gates before any response

Before responding, the program checks three things, in this order. If you fail gates 1 or 2, you don’t get even a "no": the bot stays silent. At gate 3, the response is only "Unknown command".

This check is at the beginning of the handle_message function, inside bot.py.

Denise wanted to test Lúcia’s bot. She sent /relatorio and got nothing back. It wasn’t a bug: her number wasn’t in the list.

bot.py · before responding
1 Is it a private chat? Group: silence.
2 Is the ID in the access list? Outside it: silence.
3 Is the command /status or /relatorio? (/start and /help only show the list.) Any other text: "Unknown command."
4 Only then does it run that command’s function.
  1. 1Where the message arrived.
  2. 2Who sent it, by number.
  3. 3What was requested.
  4. 4The response, and nothing else.
Look at the two bot.py lines that implement gates 1 and 2
if message.get('chat',{}).get('type')!='private':return None
if message.get('from',{}).get('id') not in allowed:return None

"return None" means: don’t respond to anything. To find these lines on your computer, run grep -n "allowed" bot.py in the bot folder.

4Your number goes into the .env list

With the number in hand, end the identification mode with Ctrl+C. Open the .env and replace 123456789, which is just the kit’s example, with your ID.

To authorize more than one person, separate the numbers with a comma. Start with only you.

Lúcia thought about adding her colleague from the library. She left it for later, after the test: with fewer people on the list, it’s easier to check.

Example list

ALLOWED_USER_IDS=123456789

No real person is on the list. The bot stays silent, even for you.

Lúcia’s list

ALLOWED_USER_IDS=7012345678

The same number that appeared in her terminal, in step 2. Only she receives responses.

The 123456789 comes in the kit, and 7012345678 is fictional. In your .env, put the number your terminal shows.

Stuck here? That's normalDidn’t the terminal show any number? Check three things: you sent /start in a private chat with the bot, not in a group; the token in the .env is the one for the correct bot; the identification mode was still running when you sent it.

Practice now 0/4

Discover your ID and enter it in the access list

Ready once the ALLOWED_USER_IDS line in the .env has your number, not the example’s. About 8 minutes, at the computer, with your phone in hand.

The identification mode doesn’t respond or run anything: it only displays the number in the terminal. Did you see "Configure TELEGRAM_BOT_TOKEN in your private .env"? The token isn’t in the .env yet: do lesson 2 of this module (lesson 38), which creates that file in the projects/oswork-kit/bot folder.

cd ~/projetos/oswork-kit/bot
python3 --version
The python3 --version returned an error or an old version

The kit bot is written in Python and needs version 3.10 or newer. If you see "command not found" or a smaller number, Python needs an installation from the official source before you continue: python.org/downloads shows the version for Windows and Mac. On Linux, Python 3 usually comes with the system.

You decided, by number, who your bot serves.

Lesson cheat sheet

Who the bot serves

  1. Tokenproves the program owns the bot.
  2. Numeric IDthe bot checks the number, not the name.
  3. Three gatesprivate, in the list, known command.

Your next step

You already decide who your bot serves, and you know why it stays quiet with everyone else.

In your notepad, write who you would authorize in the future and why. Don’t authorize yet.

In the next lesson: connect the real bot and get /status and /relatorio on your phone.

Additional material · Authorize people and actionsFull text of the topic in OSWork v2. Doesn’t count in the lesson time.

What it is

The kit bot only accepts private chats and configured IDs. It also accepts only known commands. Verifying the ID is different from checking the visible name: names can change. A message from an unknown user should not trigger file reads or system commands.

Why learn

A bot found on the internet may receive unexpected messages. Program authentication with a token does not mean authorization for anyone who talks to it. These are separate controls.

Key concepts

Numeric ID; access list; private chat; fixed commands.

In practice

The owner writes /relatorio and receives fake totals. A user outside the list doesn’t get data. Even the owner can’t write a command for a shell and expect the bot to run it.

Sequence to try

  1. Prepare a training copy.
  2. Read the handle_message function from the kit. Locate the ID check and private chat verification before dispatching commands.
  3. Record the observed result and the next correction.

Lesson 39 · OSWork v6.2 · INEMA.CLUB PRO

Module 7 · Lesson 4 of 6

The bot goes to the inbox slot and waits

In the teachers’ room, a teacher checks the wooden cubby with the cellphone in her hand, and the notebook stays open on the table behind her.

You can turn on the bot with long polling, get /status and /relatorio on your phone, and check the total with the kit’s sales file.

There are two ways for a bot to receive messages, and mixing the two creates errors that are hard to understand. Starting with the simplest one lets you test everything on your computer, without opening any door for the internet.

In 1 minute

  1. Long polling: the bot asks Telegram if a message arrived and waits a bit.
  2. The other way, the webhook, is for later.
  3. One program only per token: two at the same time fight over the messages.

1The bot will fetch the messages and wait a little

With long polling, the program asks the Telegram if a new message arrived. If nothing arrived, it waits until 25 seconds and asks again.

It’s like walking past the mailboxes in the teachers’ room and hanging around for a moment, in case a note arrives. The webhook would be the mail carrier ringing the doorbell—and it requires your address on the internet.

Lúcia left the bot running on the notebook at home. No need to touch any network settings: the program goes out to fetch, and nobody needs to enter.

Long polling · the bot asks

The program goes to Telegram to fetch the messages.

It works on your computer, without a public address.

Webhook · Telegram notifies

Telegram calls your address on the internet.

It requires that public address. It isn’t used in this module.

Both work. This module uses only the first one, the one from the kit.

2Start it with a command and keep the terminal open

In the terminal, in the bot folder, run python3 bot.py. Nothing shows up, and that’s the right sign: the program is waiting.

The terminal needs to stay open. If you close the window or press Ctrl+C, the bot stops responding.

Denise found the screen frozen and almost closed the terminal. Lúcia explained: a screen with no new line means the bot is working; a new line usually means a notice.

Terminal · bot folder

$ python3 bot.py

^C
Bot encerrado.

The empty space is the bot waiting for messages: the cursor stays still until you press Ctrl+C.

"Bot stopped." confirms that you turned it off on purpose.

3Send both commands and check the total

With the bot running, send /status and /relatorio in the private chat. The /relatorio response includes the sum of the fake sales.

Check that sum in the file itself, vendas.csv, a spreadsheet in CSV. A total that matches the file is a verified result, not an impression.

Lúcia added on paper: notebook 35.50, pen 9.50, and planner 55.00. She had 100.00, the same number as the bot.

Telegram · chat with the bot

Lúcia/status

BotOSWork active. Restricted access. Deterministic training bot.

Lúcia/relatorio

BotFictional training data: 3 sales; total R$ 100.00. No AI call.

Three sales, R$ 100.00: the program writes with a dot, but it’s the same R$ 100.00 from the sum of the file below.

Terminal · bot folder

$ cat vendas.csv
produto,valor
Caderno,35.50
Caneta,9.50
Agenda,55.00

35.50 + 9.50 + 55.00 = 100.00. The file has no secret at all; you can open it freely.

Run the cat before turning on the bot: with the bot on, the terminal stays busy until Ctrl+C.

4A single program for each bot

Keep one single program fetching messages for each bot. Two at the same time, with the same bot token, they compete for messages, and Telegram refuses.

The kit detects the conflict and turns itself off. The warning comes out in the log, which appears in the terminal itself, without showing the token.

Lúcia turned on the bot at home, forgetting it was still on the school notebook. The one at home stopped with the warning below. The next day, she turned off the school one with Ctrl+C and turned the home one back on.

Terminal · conflict warning

2026-09-25 19:40:12,381 WARNING Falha HTTP 409 no Telegram; sem detalhes que exponham token.
2026-09-25 19:40:12,382 ERROR Confira token, instância duplicada ou webhook; processo encerrado para diagnóstico.

409 means conflict. Almost always it’s another copy of the bot that’s also running. The “webhook” of the warning only applies to older bots, configured differently; yours, new one, doesn’t have it.

Date and time change. What matters is the 409 number and the words “duplicated instance”, which means another copy is running.

Stuck here? That’s normalDid you see the 409 and don’t know where the other program is? Look for another terminal window that’s open or another computer where you turned the bot on. Turn them all off with Ctrl+C and turn on only one.

Practice now 0/4

Turn on the bot and check the total

Done when the /relatorio shows the same total as your sum and, with the bot turned off, the /status returns no response. About 10 minutes, on the computer and on the phone.

The bot only reads the vendas.csv file, with fake data, and it doesn’t change anything on the computer. Did you see “HTTP Failure 401”? The token for the .env is wrong or was revoked: redo the token step in lesson 2 of this module (lesson 38). No response on the phone? Check your numeric ID in the access list, like in lesson 3 of this module (lesson 39).

cd ~/projetos/oswork-kit/bot
cat vendas.csv

You turned on your own bot, talked with it on your phone, and checked the response against the file.

Lesson cheat sheet

The bot that searches

  1. Long pollingthe bot asks and waits until 25 seconds.
  2. Frozen screenno new line is the bot waiting.
  3. One per tokentwo connected fight, and the kit turns off.

Your next step

You already turn on the bot, talk with it on your phone, and check the response against the file.

Tomorrow, turn the bot on for two minutes, ask /relatorio, and turn it off. Turning on, testing, and turning off is the habit that goes into the VPS in module 8.

In the next lesson: where an AI could enter this bot without messing up the total.

Additional material · Start with long pollingFull text of the topic on OSWork v2. Doesn’t count toward lesson time.

What it is

Long polling is the program asking Telegram for messages and waiting a bit when there’s nothing new. It’s simple to learn and doesn’t require opening an incoming port. Webhook is another strategy, where Telegram calls your HTTPS address; it’s not needed in this lab.

Why learn

Choosing a single mode reduces configuration problems. Keep only one instance fetching messages for a bot: duplicate processes can compete for updates.

Key concepts

getUpdates; offset; timeout; single instance; outbound access.

In practice

The process waits up to 25 seconds for a message. Upon receiving it, it updates the offset to avoid repeating the same query. After a network failure, it waits before trying again.

✓ Do it

Start with python3 bot.py. Use Ctrl+C to terminate. If a conflict arises, check whether another process is using the same token or if a webhook is configured.

✗ Avoid

Mix the training copy with private files or production work.

  • Long polling — the bot asks
  • Webhook — the server notifies
Start with long polling: it needs no public address and no certificate to work.

Lesson 40 · OSWork v6.2 · INEMA.CLUB PRO

Module 7 · Lesson 5 of 6

The AI writes the report; the grade is from the program

A manager reviews a printed report, with the grades column on one side and an empty board for the written assessment, with a calculator beside it.

You can write an integration contract in five lines and test it in the chat to see that the summary made by the AI doesn’t change the calculated total.

Connecting an AI to a bot feels like the natural next step, but every connection opens a new path for error and cost. A predictable bot is already useful. The AI only comes in where it improves something you can measure.

In 1 minute

  1. First the bot without AI, tested; then the new capability.
  2. The AI gets minimal data and never changes the calculated number.
  3. Before connecting, write the integration contract: five lines.

1First the tested base, then the AI

The kit separates on purpose the path of messages, which is the Telegram, from the work functions. And it starts without AI: status and data reports with fake numbers.

A predictable bot you can test without spending anything. Only then is it worth asking whether the AI improves interpretation, the summary, or the classification.

Denise wanted a question-answer bot for the office/secretary "with AI from the start". The plan changed: first a /schedule that only reads the spreadsheet; the AI would come in a second stage, with testing.

All at once

The new bot already calls an AI for everything.

When it gets it wrong, nobody knows whether it was the program or the AI.

In stages

Stage 1: bot without AI, tested with /status and /relatorio.

Stage 2: one function with AI, compared with the result from stage 1.

Net gain: one error at a time to investigate.

2The grade is calculated; the written feedback only comments

On the grade report, the grade comes from the calculation, and the written feedback comments. The written feedback never changes the grade.

With the bot, it’s the same. The AI can write a summary, but the total comes from the program and can’t be changed in the text.

Lúcia imagined a /summary for the little shop of the student association. The AI would receive only the total and the three products, not her entire project folder.

AI chat

YouData: 3 sales; total R$ 100,00; notebook R$ 35,50; pen R$ 9,50; planner R$ 55,00. Write a two-line summary.

AIThe sales added up to about R$ 110, with the planner standing out.

It invented a total that doesn’t exist. This text can’t go out through the bot.

YouUse only these data. Don’t change any number and don’t add data. Data: 3 sales; total R$ 100,00; notebook R$ 35,50; pen R$ 9,50; planner R$ 55,00. Write a two-line summary.

AIThere were 3 sales, with a total of R$ 100,00. The planner accounted for R$ 55,00, the biggest part.

The total is the one from the program, and no new data appeared.

Tap the two buttons and compare the total from each summary.

3Five lines before connecting any AI

Write the integration contract: the data sent, the available model, the cost limit, the maximum time, and what happens when the AI fails.

The last line is the most forgotten one. With it, the bot stays useful even when the AI doesn’t respond.

Denise wrote the /schedule contract in five minutes. On the failure line she wrote: "without AI, the bot sends the spreadsheet line as it is".

Integration contract · /secretary schedule
1 Data sent: the requested class line, and nothing else
2 Model: whatever is available in the school’s account
3 Cost limit: up to R$ 5 per month
4 Maximum time: 20 seconds per response
5 If the AI fails: send the spreadsheet line as it is
  1. 1The minimum the task needs.
  2. 2What you truly have access to.
  3. 3How much it can spend.
  4. 4How long it can wait.
  5. 5Plan B, without AI.
The cost and time values are examples. You set yours.

Test yourself

The /summary with AI is already working. One morning, the AI doesn’t respond. The contract says, on line 5: "if the AI fails, send only the total". What does the bot do?

4The message never goes straight to an agent

Don’t hook up an agent to the Codex so it can act on the messages that come in through the bot. And don’t disable protections just so the integration works.

The AI receives a short input, assembled by the program, and returns text. Who decides what to do with that text is still the program.

Lúcia read in a forum the tip to connect Codex directly to the bot, "so it can do anything". She didn’t follow it: anything includes deleting her folder.

Message straight to the agent

If you write in Telegram, you make the agent act on the computer.

A malicious sentence becomes an action.

Function with short input

The program builds the input: the total and three products.

The AI returns text; the program checks whether the total is what it calculated, and only then sends it.

Stuck here? That's normalYou won’t program the integration in this lesson: the kit doesn’t include that part, on purpose. The practice is to write the contract and test the number rule in the chat you already use.

Practice now 0/3

Write the contract and test the number rule

Done when the contract has the five lines and the chat summary keeps the total at R$ 100,00, with no new data. About 10 minutes, in the chat you already use and in the notepad.

The data are the kit’s fictional data, and nothing is sent to the bot. If the AI changes a number, that’s not your fault: it’s the risk the contract covers. Write down and reinforce the phrase "don’t change any number".

Use only this data. Don’t change any number and don’t add any data.
Data: 3 sales; total R$ 100,00; notebook R$ 35,50; pen R$ 9,50; planner R$ 55,00.
Task: write a two-line summary for <a equipe da lojinha do grêmio>.
In the end, repeat the total exactly as it came.
See the contract of a teacher

1. Data sent: the total and the three products with value.
2. Template: whatever is available in my account.
3. Cost limit: up to R$ 2 per month.
4. Maximum time: 15 seconds.
5. If the AI fails: the bot sends only the /relatorio line, like today.

You define, before turning it on, what the AI receives, how much it costs, what it expects, and what happens if it fails.

Lesson cheat sheet

AI in stages

  1. Untouchable numberbot without AI, tested, before any connection.
  2. Number you can’t changethe AI comments on; the total comes from the program.
  3. Contractdata, model, cost, time, and failure plan.

Your next step

You already know where an AI goes into the bot without risking the calculated number.

Keep the contract alongside your bot notes. The same template works for any query from your work.

In the next lesson: test the bot before trusting it, even when something goes wrong.

Additional material · Connect capabilities in stagesFull topic text on OSWork v2. Doesn’t count in lesson time.

What it is

The kit deliberately separates transport and work functions. It starts deterministic: status and report of fake data. To attach AI, define a function with limited input, timeout, output ceiling, and review. Do not expose codex exec directly to public messages nor disable protections to make it work.

Why learn

A predictable program lets you test the base without spending API. Then, you evaluate whether the AI improves interpretation, summary, or classification, and you measure the result against a known reference.

Key concepts

Domain function; limits; timeout; review; minimal data.

In practice

A summary function can receive only the total and three categories, instead of the entire directory of projects. The generated text never changes the total calculated by the program.

Try it now

Write an integration contract: data sent, available model, cost limit, maximum time, and action when the AI fails. The base bot remains useful without this extension.

Lesson 41 · OSWork v6.2 · INEMA.CLUB PRO

Module 7 · Lesson 6 of 6

Send sound before the meeting

In the empty auditorium, before the parent meeting, a teacher tests the microphone with a clipboard of marked items and looks at the cellphone on the pulpit.

You can run the bot’s self-test and four real tests on Telegram, recording what was simulated and what was actually tested.

A correct answer doesn’t prove the bot is restricted, and it doesn’t prove it recovers from a failure. A few scenarios, tested on purpose, show that before the bot goes to a machine that stays on without you.

In 1 minute

  1. The self-test runs 11 scenarios with no token and no internet.
  2. On Telegram, test what the simulation can’t: you, a stranger, any random command, the bot turned off.
  3. In the log, separate simulated from tested on Telegram.

1The self-test simulates 11 scenarios without internet

The kit includes an self-test. The bot runs fake-message tests against its own rules, without a token and without internet.

It covers access, group, unknown command, the sum, and sales files with defects. But it doesn’t prove that your bot talks to the Telegram.

Denise asked whether Lúcia’s bot obeyed strangers. Lúcia showed the final line of the self-test and noted that the real test was still missing, with a person outside the list.

Terminal · bot folder

$ python3 bot.py --self-test
OK: 11 cenários offline — acesso, grupo, comando, soma e arquivos inválidos.

One line only, starting with OK. If a long error shows up, some scenario failed.

"Offline" means no internet. It is simulated: go to the log as simulated.

2In Telegram, test what the simulation doesn’t cover

It’s like testing the sound before the parent-teacher meeting: you test the microphone with an empty room. Four real tests are enough: your /status, any random sentence, a person outside the list, and the bot turned off. If the bot turned off still responds, there’s another copy running somewhere. If it stays silent, the one who used to respond was your computer program.

Write down each test in your notepad, with the source: simulated or Telegram. That way nobody confuses "passed the test" with "works on the phone." When you turn the bot back on, it may respond to the /status that was waiting; that’s expected.

Lúcia asked Denise to send /relatorio to the bot. Nothing came back, as expected. In the log, she wrote: "out of the list, Telegram, no response".

Test log · shop bot
1 Auto-test · simulated · 11 approved scenarios
2 Lúcia’s /status · Telegram · "OSWork active…"
3 "hi, all good?" · Telegram · "Unknown command…"
4 Denise’s /relatorio, out of the list · Telegram · no response
5 /status with the bot turned off · Telegram · no response
  1. 1What the simulation guarantees.
  2. 2The owner is served.
  3. 3Free text doesn’t turn into an action.
  4. 4Something strange receives nothing.
  5. 5Without the program, no response.

3Each symptom points to a place

When something fails, the symptom tells you where to look. Don’t change the AI model: /status and /relatorio don’t use AI.

If only the /relatorio fails, the problem is in the sales file, the vendas.csv file, a spreadsheet in CSV. If nothing responds, check the program, the token, the internet, and the access list.

Denise saw Lúcia receive "Could not validate vendas.csv". Instead of blaming the AI, Lúcia opened the file: she had accidentally deleted the header row.

Only the /relatorio fails

The bot says: "Could not validate vendas.csv. Check the local file; no total was invented."

Where to look: the sales file.

Nothing responds

The bot says: nothing.

Where to look: is the program running? Is the token correct? Is there internet? Is your numeric ID in the access list? Read the terminal.

Notice the end of the first message: with the wrong file, the bot prefers not to give full details by making things up.

4The log reports the error without revealing the secret

In a network failure, the bot tries again on its own. In a conflict (409) or with the wrong token (401), it shuts down for you to investigate. The log from the kit tells you the type of failure and the time. It does not show the bot token or the text of the messages.

In the same notepad record, write down each failure like this: what failed, when, and what you did. This is the record that goes with the bot to the VPS in module 8.

Lúcia turned off the wi-fi with the bot on, on purpose. The terminal showed retry warnings, and the bot restarted on its own when the network came back.

Terminal · bot on, network off

2026-09-25 20:05:31,114 WARNING Falha de rede ou resposta; nova tentativa em 2 segundos.
2026-09-25 20:05:33,120 WARNING Falha de rede ou resposta; nova tentativa em 4 segundos.
2026-09-25 20:05:37,131 WARNING Falha de rede ou resposta; nova tentativa em 8 segundos.

Each attempt waits double the time of the previous one, up to 60 seconds. No line shows the token.

WARNING is a warning, not a disaster: the bot keeps trying on its own.

Stuck here? That's normalThere’s no one to send the message from outside the list? Write "not tested on Telegram" and continue: the auto test already covers this case in a simulated way. An honest record is worth more than a complete made-up one.

Practice now 0/4

Pass the sound of your bot and record it

You’re ready when the record includes the auto test and the tests on Telegram, each marked as simulated or Telegram. About 12 minutes, on the computer and on the phone.

The tests only read fake data; nothing is deleted. A person outside the list receives no data. Didn’t do lessons 2 to 4 of this module (38 to 40)? Run only the auto test: it works without a token, in the kit’s bot folder.

cd ~/projetos/oswork-kit/bot
python3 bot.py --self-test > autoteste.txt
cat autoteste.txt
Record template, filled out by a coordinator

Denise tested the consultation bot she set up to train:
Auto test · simulated · 11 approved scenarios
/status me · Telegram · "OSWork active…"
"good morning" · Telegram · "Unknown command…"
/relatorio of outside the list · not tested on Telegram · covered by the auto test
/status with the bot turned off · Telegram · no response

You tested the bot before you needed it, and you can say what was simulated and what was real.

Lesson cheat sheet

Test before trusting

  1. Autotest11 scenarios without token and without internet.
  2. Real testsyou, any phrase, something weird, bot turned off.
  3. Symptomonly /relatorio: file; nothing: program, token, network, list.

Your next step

You closed lesson 7: you have a restricted, tested bot that responds without executing messages.

When you have about 30 minutes, open the additional material and do the lab for this lesson: it’s the same steps as lessons 2 to 6 in this track, all at once.

Next lesson: VPS from scratch. The bot is on all day, without depending on your computer.

Additional material · Test operation and failuresFull text of the topic on OSWork v2 and closing the lesson. Doesn’t count toward lesson time.

What it is

Test allowed sender, blocked sender, group, unknown command, and missing data. Logs must report failure type and time, without token or complete private messages. In the lab, turning off the process must stop the responses: that proves the local program is in the path.

Why learn

A correct response does not prove the bot is restricted nor that it retrieves the network. A small set of scenarios demonstrates the important properties before migrating to a VPS.

Key concepts

Self‑test; network failure; logs without secrets; interruption; diagnosis.

In practice

If /status works and /relatorio fails, investigate the data file. If neither works, check the process, authentication, and connection. Do not change the model: these commands do not even use AI.

Try it now

Run --self-test and save the output. Then test the real conversation with your account; differentiate in the log what was simulated and what was tested on Telegram.

Lab for the lesson: A bot that responds without executing messages

Use fake files and a training folder. Practices with installation, Telegram, or a VPS may require extra time for signup and setup.

  1. Read materials/bot/README.md and run the bot’s offline autotest, without token.
  2. Create your bot in the official BotFather, and keep the token only in your local .env file.
  3. Discover your ID with the local identification mode and configure the access list.
  4. Start the bot, send /status and /relatorio in the private chat and check the results.

Bot · inside materiais/bot

Read the block before using. Fields like Your Name and usuario@ip-da-vps are examples to adapt; administrative commands belong only to your training environment.

python3 bot.py --self-test
cp .env.example .env
chmod 600 .env
# Edit .env locally; never share values.
python3 bot.py --identify
# Fill ALLOWED_USER_IDS with your ID and stop identification.
python3 bot.py

Ready criterion

Run a restricted query bot and understand where the AI comes in. Log the generated file, the test executed, and the observed result.

Criteria to review your delivery

Use this rubric after the lab. Each line asks for evidence; checking reading does not mean the practice was performed.

  • Scope — The delivery matches the objective of this lesson. If you didn’t pass: Reduce the task and name a single result.
  • Inputs — You know which files or data were used. If you didn’t pass: List the sources and remove material that’s unrelated.
  • Execution — The procedure was carried out in the training environment. If you didn’t pass: Separate what you planned from what you actually did.
  • Verification — A result was compared against a reference. If you didn’t pass: Open the file or repeat a verifiable query.
  • Secrets — No token, password, or private data was shared. If it didn't work: Review the working copy before you send anything.
  • Continuity — Another person can find the next step. If you didn’t pass: Update README and record a concrete pending item.

Check what remained

Can a Telegram message be passed directly to the shell?

View commented answer

No. The bot must map allowed commands to defined functions and verify the sender.

If your answer was different, return to the corresponding topic and write the difference in one sentence. The check does not block your study.

Module summary

  • Message; Bot API; program; agent; result.
  • BotFather; token; environment variable; rotation.
  • Numeric ID; access list; private chat; fixed commands.
  • getUpdates; offset; timeout; single instance; outbound access.
  • Domain function; limits; timeout; review; minimal data.
  • Self‑test; network failure; logs without secrets; interruption; diagnosis.

Consult the source

Tools verified on 20/09/2026; screen names and availability may change.

Terms for this section: chmod, .env.example.

Lesson 42 · OSWork v6.2 · INEMA.CLUB PRO

Module 8 · Lesson 1 of 6

The VPS is a rented room: you take care of it

A manager stops at the door of a newly rented empty room, holding the key in her hand and a folder under her arm, looking at the table that’s now her responsibility.

You can fill in the first part of the VPS plan: what needs to run, who takes care of it, how much it can cost, which system to use, and how to shut it down. Everything before you sign up for anything.

Signing up for a VPS takes a few minutes. Finding out later that nobody takes care of it, or that the bill arrives every month even when you don’t use it, costs a lot more. That’s why the plan comes before the purchase.

In 1 minute

  1. A VPS is a rented computer, always on. You manage it.
  2. A machine being on is not the same as the service running.
  3. Before signing up: what runs, who takes care of it, how much it costs, and how to shut it down.

1A VPS is a computer you rent and manage

Think of a rented room. The building owner gives you the room with electricity and a door. What happens inside is up to you.

A VPS works like this. It’s a rented virtual server, with memory, disk, and network, in a company called the VPS provider. Users, updates, and programs are your responsibility.

The bot from Denise’s training, from module 7, only replies while her notebook is on. At six in the afternoon she closes the lid, and the bot stops replying on Telegram.

On the notebook

When it runs: only with the lid open.

Who takes care of it: you, without noticing.

On the VPS

When it runs: all the time, with the VPS provider.

Who takes care of it: you, on purpose: users, updates, and programs.

Both work. A VPS solves the "just with the lid open" issue and brings a new responsibility.

2A small machine is enough: the model runs far away

Start with a small machine, compatible with the program you’re going to run. A bot that calls an AI model via the API doesn’t need an expensive video card.

The remote model runs on the AI provider’s computers. The VPS only sends the request and receives the response.

Lúcia almost hired a VPS with a video card for a bot that generates fake class averages. The bot only sends requests and displays responses; the video card would sit idle, and the bill would be high.

Exaggeration

Choice: the strongest plan, with a video card, "to make sure".

Result: a high bill every month for a bot that barely works.

As needed

Choice: a small machine, with plenty of room to run the bot.

Result: the AI model stays with the AI provider; the VPS just acts as the bridge.

Net gain: the machine size follows the program, not the model’s fame.

3Three separate accounts

The VPS, the extra disk space, and the AI API are charged separately. Signing up for one doesn’t pay the others.

The VPS monthly fee hits every month, with the machine working or sitting idle. It’s the same logic as the lesson about access and billing, in module 1: each access has its own account. Write down the limit of each one.

Denise made the list before talking to management. The VPS monthly fee went into one line. The training bot doesn’t use AI, so the API line says "doesn’t use".

Where each cost comes from
1 VPS
plan monthly fee: [value of the chosen plan]
2 Storage
extra disk and saved copies: [value, if any]
3 AI API
by usage, on the AI platform: doesn’t use
  1. 1The rented machine, billed every month, on or off.
  2. 2The space to store data and copies.
  3. 3The AI model, only if the program uses it.

4The plan comes before the purchase

A running machine doesn’t mean a healthy service. The bot can stop in there and nobody notices.

Before hiring, decide two things: what you need to run without stopping, and who will check when something goes wrong. Also write down the system: the course examples use Ubuntu.

Denise filled in the first part of the course kit operation plan. The line that took the longest was the last one: where the cancel button is and who can press it.

plan-vps.md · Before hiring
1Work that needs to keep running without the laptop: training bot responding with /status
2Technical person responsible: Denise
3Monthly VPS budget: [limit approved by management]
4 Separate budget for the API: doesn't use it
5 Supported operating system: Ubuntu, in the version that the VPS provider supports
6 Shutdown plan: VPS provider panel › cancel; only Denise
The six lines of the first part of the plan. Line 6, shutdown, is the one that’s missing most often in real plans.

Test yourself

Denise will put the training bot on a VPS. What decision comes before choosing the plan?

Stuck here? That's normalYou don’t need to sign up for anything in this lesson, and you don’t need to know the exact price. Where a detail is missing, write "to be defined" and the name of the person who decides. The plan works like that already.

Practice now 0/3

Fill in the first part of the VPS plan

Ready when the six lines have an answer, or "to be defined" with a name next to it. About 8 minutes, on your computer or phone.

Nothing is contracted in this lesson. Without the kit, copy the template into a note on your phone. Don’t write down a password or card details in the plan.

Where the plan is: the file plano-vps.md comes in the course kit, the oswork-kit.zip from the OSWork materials page. The plan has five parts: Before contracting, Access, Service, Observed checks, and Routine. Today you fill in the first one; the others come in the next lessons.

OPERATION PLAN · BEFORE CONTRACTING
Work that needs to keep running without the notebook: <ex.: training bot responding to /status>
Technical owner: <your name or the person who will take care of it>
Monthly VPS budget: <maximum value per month>
Separate budget for the API, if used: <value or "doesn't use it">
Supported operating system: <ex.: Ubuntu, supported version>
Resource shutdown plan: <where to cancel and who can>
See the filled-in template by a teacher

Work: bot that responds with the team’s fictitious average, outside lesson time.
Technical owner: Lúcia.
Monthly VPS budget: to be defined, with coordination.
API: doesn't use it.
System: Ubuntu, supported version.
Shutdown: VPS provider panel; Lúcia and coordination.

You just decided what the VPS needs to do, who is responsible for it, and how to close the account.

Lesson cheat sheet

Rented room

  1. VPS rented computer; you manage it.
  2. Size follows the program; the AI model runs on the AI provider.
  3. Plan first what runs, who takes care of it, how much it costs, how to shut it down.

Your next step

You already know how to tell if you need a VPS, what size, and who is responsible for it.

Get the budget line to the person who approves spending on your work and ask for the monthly limit in writing. A three-line message is enough.

With the room rented, the first door is the one for entry. Next lesson: sign in to the VPS over the internet without locking yourself out.

Additional material · A VPS is a machine under your responsibilityFull text of the topic in OSWork v2. Does not count toward lesson time.

What it is

A VPS is a rented virtual server: a remote computer with memory, disk, and network. You manage users, updates, and processes. Start with a small machine compatible with the application; don’t rent a GPU just to call a model via API. The remote model runs on the infrastructure of the provider.

Why learn

A powered‑on machine does not mean a healthy service. VPS, storage, and API costs are separate. Before hiring, define what needs to run continuously and who will monitor incidents.

Key concepts

Remote server; resources; recurring cost; operational responsibility.

In practice

A small bot that queries fictitious data does not need the same infrastructure as a local model. The manager estimates load, budget, and availability before choosing the plan.

✓ Do it

Fill out materiais/plano-vps.md. Record operating system, access method, monthly limit, responsible person, and how to shut down the resource.

✗ Avoid

Accepting a conclusion without checking the input that supports it.

Lesson 43 · OSWork v6.2 · INEMA.CLUB PRO

Module 8 · Lesson 2 of 6

Don’t return the old key before testing the new one

In the teachers’ room, a teacher holds an old key in one hand and a new key in the other, comparing the two, with the notebook open showing two dark windows side by side.

Can you tell which machine you’re on by what the terminal shows and apply the rule from the second session: test the new input before closing the one that works.

When you change the lock on your house, you test the new key before throwing away the old one. The VPS is the same. Changing the network or the way you enter without a return route can lock you out.

In 1 minute

  1. SSH opens the VPS terminal on your computer, through a protected connection.
  2. Check which machine you’re on before every command.
  3. Test a second session before closing the first one.

1SSH opens the VPS terminal on your computer

SSH creates a protected connection to manage the machine. The command ssh usuario@ip-da-vps opens the session.

The parts usuario and ip-da-vps are fields to replace, not real values. The VPS address appears on the VPS provider panel.

Lúcia opened two terminal windows and got confused: in one was the notebook, and in the other was the VPS. The name at the beginning of the line and the command pwd showed where she was.

Terminal
$ ssh usuario@ip-da-vps
usuario@nome-da-vps:~$ pwd
/home/usuario

After signing in, the start of the line changes: now it shows the user and the VPS name. The pwd command tells you the folder you’re in.

Before any command, look at the start of the line. It tells you which machine you’re on.

2Key instead of password, verified identity

Use the public key registered exactly the way the VPS provider indicates. The private key never leaves your computer. When you sign up, the provider panel guides the creation and registration; in this lesson, you don’t need to create anything.

On the first connection, SSH shows the fingerprint of the machine. It confirms that you reached the correct VPS.

Denise got the question in English on the first entry. Before typing yes, she compared the fingerprint with the one shown in the provider panel.

Terminal · first connection
$ ssh usuario@ip-da-vps
The authenticity of host 'ip-da-vps' can't be established.
ED25519 key fingerprint is SHA256:[impressão digital].
Are you sure you want to continue connecting (yes/no/[fingerprint])?

In Portuguese: "you can't confirm this machine's identity; this is the fingerprint; do you want to continue?" Reply yes only if it matches.

This question shows up once per machine. If it appears again for the same VPS, stop and investigate.

3A work user, with sudo when needed

Work with your own user, the work user. When a task asks for administrator permission, put sudo in front of the command.

That way, admin privileges only appear where you asked, and they stay visible in the command.

Lúcia checked her own user before touching anything. The same command with sudo showed the admin, after asking for her password.

Terminal · on the VPS
$ whoami
usuario
$ sudo whoami
[sudo] password for usuario:
root

whoami replies "who am I". Without sudo, it’s the work user; with sudo, it’s root, the machine administrator.

When you type the password, nothing appears on the screen. That's normal: it's being read.

4The second session is your return route

Before changing the network or the way you sign in, leave the original session open. Open another window and test the new sign-in. Only close the first one when the second works.

If everything fails, the recovery console still opens the machine. Confirm it works before restricting anything.

A tutorial suggested that Denise change the port of SSH. That’s a common change in security guides. Before following it, she opened the console from the provider panel and noted on the plan that it worked.

Session 1 · old key

Status: open, working.

Rule: don't close until session 2 signs in.

Session 2 · new key

Status: another window, testing the change.

Rule: signed in? Then you can close session 1.

Emergency exit: the provider console, checked before any change.

Stuck here? That's normalYou don't need a VPS for this lesson. The practice is a case to analyze on paper. When you rent yours, come back to this step and follow the three routes in order.

Practice now 0/3

Analyze the case of the changed port

Ready when you’ve answered the three questions and checked the answer key. About 8 minutes; write it down on paper or in your notepad.

It’s a case with no real machine, so nothing breaks. Do you have a training VPS? Also do the real test: with the session open, open another window and sign in again using the same ssh command. Don’t change the port or the way you enter just to practice.

The case. Rogério, Denise’s colleague, rented a training VPS. He logged in via SSH and pasted an internet command that changes the SSH port. He ran it and closed the terminal right away. When he came back, ssh rogerio@ip-da-vps no longer connects. He never opened the provider console.

View answer key

1. The second session. He was supposed to keep the first one open and test the new port in another window before closing.

2. Through the recovery console, in the VPS provider panel. From there, he can undo the port change.

3. In the VPS plan Access section (the second of the five parts of plano-vps.md): "Real SSH port", "Second SSH session tested" and "Recovery console available", with the test date.

You’ve just found the mistake that locks a person out of their own VPS, and the way back.

Lesson cheat sheet

Two keys

  1. Where I amthe start of the line and the pwd tell you the machine.
  2. Identitypublic key registered; fingerprint confirmed once.
  3. Way backsession 1 open, session 2 tested, console confirmed.

Your next step

You already know how to get into a VPS without losing the way back.

In the VPS plan, fill in the Access section: work user, real port, and where the console is located. Where you don’t know, write "to check in the panel".

Inside, the machine comes almost empty. Next lesson: what to put in it, and what to leave out.

Additional material · Sign in via SSH and preserve accessFull topic text in OSWork v2. Doesn’t count in lesson time.

What it is

SSH creates a protected connection to administer the machine. Use the registered public key as instructed by the provider and verify the identity of the server. Create a work user with administrative permissions when necessary. Keep the original session open while you test a second connection.

Why learn

Changing firewall or authentication without testing a recovery route can block your own access. The provider console is the alternative when the normal connection fails; make sure it works before restricting the network.

Key concepts

Public key; fingerprint; user; sudo; recovery.

In practice

The command ssh usuario@ip-da-vps opens the session. usuario and ip-da-vps are placeholders to replace, not real values. The prompt name and pwd help confirm which machine you are on.

Try it now

Test the second session before closing the first. Don’t disable login or change the SSH port using a command if you don’t know how to recover access.

Lesson 44 · OSWork v6.2 · INEMA.CLUB PRO

Module 8 · Lesson 3 of 6

Carry-on: only what the trip needs

A manager sets a small carry-on bag on the coordination table, with only a few items inside, while a pile of clothes and a hat stay outside on a chair.

You can check in the terminal if Python 3 and Git are on your machine and create the projects folder, without putting anything else in it.

Every extra program is another thing to update, explain, and fix. Getting tools used to automatically is work and doesn’t increase what the service can do.

In 1 minute

  1. On the VPS with Ubuntu, the one who installs and updates programs is apt.
  2. Before confirming an update, read the list of what will change.
  3. The training bot needs Python 3; Git helps you carry the project.

1Update the list and read before confirming

The examples use Ubuntu with apt. First, sudo apt update updates the list of what exists on the machine. Then, sudo apt upgrade proposes the updates and waits for your response.

Having sudo in front asks for administrator permission, like in the previous lesson.

On the training VPS, Denise paused at the final question and read the entire list. Only then did she answer Y.

Terminal · on the VPS
$ sudo apt update
Reading package lists... Done
$ sudo apt upgrade
The following packages will be upgraded:
  [lista de programas que vão mudar]
Do you want to continue? [Y/n]

The final question means “want to continue?”. The uppercase Y is the default answer. Read the list above it before you answer.

A program you don’t recognize in the list is a reason to search before answering Y.

2The training bot asks for only two things

The bot from the course kit needs Python 3. Git helps you move the project from your computer to the VPS. The command is sudo apt install git python3.

The bot uses only what already comes with Python, with no extra add-ons. Other tools, like Codex, are optional: they only get used if the program asks for them.

A tutorial suggested that Lúcia install five tools “to make sure”. She checked what the bot was asking for and ended up with two.

By habit

On the machine: Git, Python 3, and three more tools "because one day you might need them."

Result: five things to update; three you don't use.

As needed

On the machine: Git and Python 3.

Result: two things to update, and both work.

Net gain: three fewer tools to maintain, without losing anything the bot does.

3Check the versions and create the folder

Ask for the version of each program. If it answers, it's on the machine. Then create the projetos folder in your personal folder, in your work account.

The version commands only read. The one that creates a folder doesn't delete anything: if the folder already exists, it leaves it as-is.

Lúcia ran the same commands on the notebook, before renting any VPS. Both answered. She wrote the versions on the plan, to confirm the same ones on the VPS.

Terminal
$ python3 --version
Python 3.x.y
$ git --version
git version 2.x.y
$ mkdir -p ~/projetos
$ ls -d ~/projetos
/home/usuario/projetos

Where it says x.y, the version number of your machine appears. The last command confirms that the folder exists.

Four commands, none changes the system. The ~ symbol means "my personal folder".

Stuck here? That's normalIf you see "command not found", or on a Mac a window offering command-line tools, the program isn't on the machine. This isn't your fault. Write "missing" on the plan: that's exactly what the VPS needs to receive. On Windows, run this in the WSL terminal, from module 3.

Practice now 0/3

Check Python and Git and create the projects folder

Done when you have the answers from the two version commands and the projects folder exists. About 8 minutes, on your computer, in the terminal.

None of the commands here changes the system: two only read the version, the other creates an empty folder. Don't run the apt update on your work computer just to practice. On Windows, use the WSL terminal, set up in module 3: in PowerShell these commands respond differently. Do you have a practice VPS? Run the same commands on it.

python3 --version
git --version
mkdir -p ~/projetos
ls -d ~/projetos

You just checked what the machine has and decided what it needs, without adding anything out of habit.

Lesson cheat sheet

Carry-on bag

  1. aptupdate updates the list; upgrade proposes and waits for your Y.
  2. Only what's necessarythe practice bot asks for Python 3; Git brings the project.
  3. Check--version tells you if it's on the machine.

Your next step

You can already decide what goes into a machine and check whether it went in.

Look at the list of programs on your work computer and mark two that you haven't used in months. Just mark; you don't need to remove.

With the bot in there, you still need the front desk. Next lesson: who can enter the VPS, and where to store the bot's password.

Additional material · Install only what's necessaryFull text of the topic on OSWork v2. Doesn't count in lesson time.

What it is

The lab examples use Ubuntu with apt. Update the package list and review the proposed upgrade. The base bot requires Python 3; Git helps transfer the project. Node, Docker, and Codex are optional depending on the application, not a mandatory list for any VPS.

Why learn

Each dependency adds maintenance. A simple service with few components is easier to explain, update, and recover. Installing tools out of habit creates work without increasing the needed capacity.

Key concepts

apt update; apt upgrade; dependency; virtual environment when needed.

In practice

Reference sequence: sudo apt update, sudo apt upgrade, sudo apt install git python3. The kit bot uses only the standard library, without installing external Python packages.

Sequence to try

  1. Prepare a training copy.
  2. Before confirming the upgrade, read the involved packages. Check python3 --version and git --version, then create ~/projetos in the work account.
  3. Record the observed result and the next correction.

Lesson 45 · OSWork v6.2 · INEMA.CLUB PRO

Module 8 · Lesson 4 of 6

The VPS gate: who enters, who leaves

In the school reception, a teacher checks with the doorman a short list of visitors on a clipboard, with the gate closed in the background, while the mail carrier leaves the letters on the counter.

You can list the network ports that your VPS needs to open. And you can keep a .env readable only by you, checking it in the terminal.

Opening everything “to work” increases the risk and doesn’t find the cause of the problem. And a .env that any user of the machine can read keeps the bot password in plain sight.

In 1 minute

  1. The firewall is the gate: it decides what comes in and what goes out.
  2. The training bot only leaves to ask Telegram. No open bot port.
  3. The .env stays closed (chmod 600) and out of Git.

1The firewall is the machine’s gate

The firewall filters network connections, in both directions. It’s like the school gate: there’s a list of who can enter, and the mail carrier goes out to pick up the correspondence.

The bot from the kit uses long polling. It leaves through a secure connection to ask the Telegram if there’s a new message. Nobody from outside needs to knock on its door.

Lúcia thought she needed to open a port for the bot to receive messages from the class. She didn’t: whoever enters the machine is only you, through SSH.

Você entrada: SSH VPS com o bot saída: o bot pergunta Telegram
With long polling, the only entry port the VPS needs is the SSH one.

2Allow SSH before turning on the firewall

On Ubuntu, the ufw configures the firewall. Before turning it on, allow the port of SSH that your VPS actually uses. If it’s 22, the rule is the one from the example. If it’s another number, it changes.

Some providers have their own firewall in the dashboard. If yours does, check there as well that the SSH port is open.

Denise only turned on the firewall after setting up the return routes from the previous lesson about SSH: the second tested session and the provider console checked. Even ufw warned her about the risk.

Terminal · on the VPS
$ sudo ufw allow 22/tcp
Rules updated
Rules updated (v6)
$ sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)?

"Rules updated" confirms the rule. The final question warns: "this can drop the open SSH connections; continue?".

Reply y only after you’ve opened the correct port and the return route is ready.

3The .env stays closed and out of Git

And the bot token lives in .env. The command chmod 600 makes that file readable only by the owner.

And .env never goes into Git: the .gitignore file from module 4 already takes care of it.

Lúcia checked the .env before and after chmod. At the start of the line, the dashes show who can’t read it.

Terminal
$ ls -l .env
-rw-rw-r-- 1 usuario usuario 0 [data] .env
$ chmod 600 .env
$ ls -l .env
-rw------- 1 usuario usuario 0 [data] .env

After the first character come three sets: owner, group, and others. r means read, w means modify, a dash means "cannot". Earlier, the group and others could read (rw- and r--). After that, only the owner has rw.

What matters is the beginning: -rw------- means "only the owner".

4Network, token, and process: three separate checks

If the bot doesn’t respond, don’t open ports just to see if it fixes things. Split it into three questions: is the process running? Was the token accepted? Does the outbound network work?

The bot’s log from the kit helps you separate things, without exposing the token.

Denise’s bot stopped. The log said "HTTP Failure 401": it was the token, swapped the week before. No port needed to change.

Bot stopped · what the log says
1No new line: is the process running? (next lesson)
2"HTTP Failure 401 in Telegram; no details that expose the token."
3"Network failure or no response; new attempt in 2 seconds."
  1. 1Process: check whether it’s turned on.
  2. 2Token: Telegram rejected the bot’s password.
  3. 3Network: outbound failed, and the bot retries by itself.

Stuck here? That's normalNo VPS and no bot running? No problem. The practice is on your computer, in a training folder, with an empty .env. ufw is for when you have the machine.

Practice now 0/3

Close a training .env and list the ports

Ready when the ls -l shows -rw------- in the treino .env and the plan has the needed ports. About 8 minutes, on your computer, in the terminal.

The file is created empty, in a new folder, just to practice: there’s no token in it. Don’t touch the .env of a bot that already works. On Windows, run it in the WSL, from module 3: outside it, -rw------- might not show; that’s not your fault, go back to WSL. If chmod gives an error, check with pwd to see if you’re in the treino-rede folder.

mkdir -p ~/treino-rede
cd ~/treino-rede
touch .env
ls -l .env
chmod 600 .env
ls -l .env

You just closed a secrets file so only you can read it, and reduced the door count to the minimum.

Lesson cheat sheet

Door count

  1. Inboundonly the real SSH port, released before turning on the firewall.
  2. Outboundthe bot asks Telegram; no bot port.
  3. .envchmod 600, verified with ls -l, outside Git.

Your next step

You already know how to decide what goes into the VPS and how to protect the bot’s password file.

On your working computer, find a file with a saved password outside a password manager. Note where it is and decide where it will go.

The door count is ready, but the bot still depends on you to start. Next lesson: who starts the bot by itself and restarts it when it crashes.

Additional material · Protect the network and credentialsFull topic text on OSWork v2. Doesn’t count toward lesson time.

What it is

The firewall filters network connections. For long polling, the bot needs to go out to HTTPS; you don’t need to expose a bot port to the internet. Before activating UFW, allow the actually used SSH port and check local rules and the provider rules. Restrict the .env with chmod 600 and keep it out of Git.

Why learn

Opening all ports to “make it work” increases risk without diagnosing the cause. If the process does not respond, outbound network, token, and execution each deserve separate checks.

Key concepts

Input and output; SSH port; firewall rule; file permissions.

In practice

If SSH uses port 22, sudo ufw allow 22/tcp may be appropriate. If it uses another port, the rule needs to change. Only run sudo ufw enable after testing the configuration and the recovery access.

✓ Do it

List ports actually needed in the plan. Record which commands vary by provider and never treat the port example as universal.

✗ Avoid

Mix the training copy with private files or production work.

  • SSH with a key
  • Firewall
  • Credentials outside repo
  • Routine of care
Protection is a layer, not a single command. The routine of care is the one most often missing.

Lesson 46 · OSWork v6.2 · INEMA.CLUB PRO

Module 8 · Lesson 5 of 6

The bot’s caretaker: starts, restarts, and records

Early in the morning, in the school hallway, the janitor turns on the lights on the wall panel while the manager watches with a cup of coffee, next to an open incident log book on a small table.

You can adapt the four kit unit fields and read, in the status and in the log, whether the bot is running.

A bot running in an SSH session can stop when you close the connection. The supervision starts the bot along with the machine and stores the records in one place. It doesn’t replace alerts, limits, or the search for the cause.

In 1 minute

  1. systemd starts the bot with the machine and restarts it after a failure.
  2. The unit tells which program, with which user, and in which folder.
  3. Restarting doesn’t fix an error that keeps happening: read the log and stop to diagnose.

1In the opened session, the bot depends on the window

Up to here, you started the bot manually, with python3 bot.py in the terminal. On the VPS, that ties the bot to your connection.

The systemd is the machine’s caretaker: it turns the lights on every morning, restarts what went off, and writes everything down in the incident book.

Denise left the bot running in an SSH session and went home. The connection dropped along the way, and the bot stopped too.

In the opened session

Turn on: when you type the command.

If the connection drops: the bot can stop along with it.

Record: stored with the window.

With systemd

Turn on: by itself, together with the machine.

If the bot fails: restart after 15 seconds.

Record: saved by systemd, so you can read it later.

Net gain: the bot stops depending on your opened window.

2The unit says what, with whom, and where

The unit in the kit is the file oswork-bot.service, in the bot folder. Four fields need your user and your path: User, WorkingDirectory, EnvironmentFile (where the .env is) and ExecStart.

The Restart=on-failure field restarts the bot after a failure. In the kit, the example user is oswork; the user and the folders need to exist on the VPS.

Lúcia replaced oswork with her own work user in the four fields. Then she showed only those lines on the screen to check.

Terminal · kit’s bot folder
$ grep -E "^(User|WorkingDirectory|EnvironmentFile|ExecStart|Restart)=" oswork-bot.service
User=oswork
WorkingDirectory=/home/oswork/projetos/oswork/materiais/bot
EnvironmentFile=/home/oswork/projetos/oswork/materiais/bot/.env
ExecStart=/usr/bin/python3 /home/oswork/projetos/oswork/materiais/bot/bot.py
Restart=on-failure

That’s how the kit comes. The first four lines are the ones you adapt; you keep the last one.

User is who runs the bot. WorkingDirectory is the folder. EnvironmentFile is the .env. ExecStart is the command that turns it on.

3Turn it on and check the status

On the VPS, the adapted unit goes to the systemd folder, /etc/systemd/system, with administrator permission. Then, three commands start the bot. The systemctl reads the units, starts the bot, and shows its status.

The sudo appears in the first two because they change the machine. The third one only reads.

Denise saw "active (running)" in the status. Even so, it only marked the step as completed after sending /status in the Telegram and receiving the response.

Terminal · on the VPS
$ sudo cp oswork-bot.service /etc/systemd/system/
$ sudo systemctl daemon-reload
$ sudo systemctl enable --now oswork-bot
$ systemctl status oswork-bot --no-pager
● oswork-bot.service - OSWork bot de treino restrito
     Active: active (running) since [data e hora]

The first line copies the unit. The daemon-reload makes systemd reload the units. "active (running)" means "active, running". The enable --now turns it on now and keeps it on for the next reboots.

Running is the first sign. The proof is the bot responding.
Telegram · chat with the bot

You/status

BotOSWork active. Restricted access. Deterministic training bot.

The bot's real response to /status from the kit.

4Controlled restart and log reading

Do a purposeful restart, with systemctl restart, and send /status again. Write down the time. Then read the log with the journalctl.

Restarting doesn’t fix an error that keeps happening. If the bot goes down again, stop the service and look for the cause before insisting.

In the log, Lúcia saw the bot stopping and coming back, with the time. On another day, she saw "process ended for diagnosis" and stopped the service before trying again.

Terminal · on the VPS
$ sudo systemctl restart oswork-bot
$ journalctl -u oswork-bot -n 50 --no-pager
[data] nome-da-vps systemd[1]: Stopped oswork-bot.service - OSWork bot de treino restrito.
[data] nome-da-vps systemd[1]: Started oswork-bot.service - OSWork bot de treino restrito.

Stopped and Started: it stopped and turned on, with date and time. With the bot running, it writes nothing else.

If a line appears ending in "process ended for diagnosis", stop with sudo systemctl stop oswork-bot and read the entire line.

Stuck here? That's normalThe steps 3 and 4 need a VPS with the bot. Without it, this lesson’s practice is only the unit, on your computer. Save the commands: they’ll be in the plan when the machine exists.

Practice now 0/3

Adapt the kit unit to your user

Done when grep shows your user and your path in the four fields. About 10 minutes, on your computer, with a text editor and the terminal.

You edit a text file, without turning anything on: no VPS, nothing runs. Work on a decompressed copy of the kit. Made a mistake? Decompress again. On Windows, do everything in the terminal of the WSL, from module 3.

Where the unit is: in the course kit, the oswork-kit.zip from the OSWork materials page. Decompress into ~/projetos/oswork-kit: the unit is in ~/projetos/oswork-kit/bot. On Windows, the zip downloads into the Downloads folder; in WSL, bring it with cp /mnt/c/Users/SeuNome/Downloads/oswork-kit.zip ~/projetos/, then cd ~/projetos and unzip oswork-kit.zip -d oswork-kit. The path that comes in the kit is the course repository path; replace it with the place where the bot will live on the VPS. In the template it’s /home as well, also on Mac: it’s the VPS path.

Paste into the file, in place of the four lines from the kit:

User=<your work username>
WorkingDirectory=/home/<username>/projetos/oswork-kit/bot
EnvironmentFile=/home/<username>/projetos/oswork-kit/bot/.env
ExecStart=/usr/bin/python3 /home/<username>/projetos/oswork-kit/bot/bot.py

Run in the terminal, to verify:

cd ~/projetos/oswork-kit/bot
grep -E "^(User|WorkingDirectory|EnvironmentFile|ExecStart)=" oswork-bot.service
See the unit adapted by a coordinator

User=denise
WorkingDirectory=/home/denise/projetos/oswork-kit/bot
EnvironmentFile=/home/denise/projetos/oswork-kit/bot/.env
ExecStart=/usr/bin/python3 /home/denise/projetos/oswork-kit/bot/bot.py

You just prepared the instruction that keeps the bot running without depending on your window.

Lesson cheat sheet

Caretaker

  1. Unit User, WorkingDirectory, EnvironmentFile, and ExecStart with your username and path.
  2. Turn on daemon-reload, enable --now, status, and /status in Telegram.
  3. Failed againread the journalctl and stop before trying again.

Your next step

You already know how to hand the bot to a caretaker who starts it, restarts it, and takes notes.

In the VPS plan, fill in the Service section: working directory, command, unit name, variables file, and restart policy.

Being started and restarted is not care yet. Last lesson: the routine that proves the service recovers, and the end of the course.

Additional material · Systemd supervises the processFull text of the topic in OSWork v2. Doesn't count in the lesson time.

What it is

systemd is the service manager for many Linux distributions. A unit describes which program to start, with which user and in which directory. Restart=on-failure restarts after a failure, but does not fix a persistent error. The kit provides a parametrized unit for the oswork user.

Why learn

Running the bot in an SSH session can end the work when you close the connection. Supervision lets it restart with the machine and centralizes logs. It doesn't replace alerts, limits, or analysis of the cause.

Key concepts

Unit; service user; directory; restart; journal.

In practice

After adapting paths, use sudo systemctl daemon-reload and sudo systemctl enable --now oswork-bot. Check systemctl status and journalctl -u oswork-bot -n 50 --no-pager.

Try it now

Perform a controlled restart with systemctl restart, check /status and log the time. If it fails, stop the service before repeatedly trying without diagnosis.

  • Local folder
  • Repository
  • VPS
  • systemd
The same work, four places. systemd is what makes the routine survive a restart.

Lesson 47 · OSWork v6.2 · INEMA.CLUB PRO

Module 8 · Lesson 6 of 6

Fire drill: only what you tested counts

In a sunny school courtyard, the manager holds a clipboard and a stopwatch during a fire drill, while the teacher next to her counts the students in a line near the exit gate.

Can you make a backup of sales.csv, the data file for the training bot? Then, restore the copy into a separate folder and prove, with a command and the total, that it’s complete.

Without anyone watching, a service can sit idle for days. Without a restore test, the copy may be incomplete, and you only find out on the day you need it. The real promise is a routine that recovers—not a machine that never fails.

In 1 minute

  1. Operations is a routine: supervision, updates, external checks, copies, and tested restores.
  2. A backup only counts after it’s been restored and verified.
  3. The project closes with five pieces of evidence, and anything that wasn’t done is declared.

1 A powered-on machine is not a working service

systemd restarts the bot, but it won’t tell anyone if it stays silent. That’s why there’s the external check: someone, outside the VPS, confirms whether the service responds.

A simple daily check records two things: whether the bot replied and how much disk space is left. On the VPS, the command df -h / shows the space used.

Denise sends /status from her phone every morning, before the eight o’clock meeting. She notes the response time and, once a week, the disk space.

Daily check · [data]
1 /status via Telegram: replied at [hora]
2 Disk space: [percentual] used
3 Verified by: Denise
  1. 1From outside: if the phone receives the reply, the whole path works.
  2. 2Disk full for any service; better check first.
  3. 3A name: the check is done by a person.

2 Copy outside the machine, secret kept outside the copy

Keep data copies outside the VPS: for example, a protected folder in the school’s Drive or an external disk. If the machine disappears, the copy can’t go with it. Also set retention: for how long each copy stays stored.

The .env file with the bot token is kept private. It doesn’t go into a copy that other people can access.

Lúcia kept the class data copy on the same VPS. She started keeping it in a protected place, outside of it, with three monthly copies. The .env was left out.

On the same VPS

Where: a folder next to the bot.

If the machine disappears: the copy disappears too.

Secret: the .env was included in the copy.

Outside the VPS

Where: an external, protected place.

If the machine disappears: the data comes back.

Secret: the .env handled separately; three-month retention written in the plan.

Net gain: losing the VPS stops being losing the data.

3Backup only counts after the rehearsal

A fire drill simulation proves the school leaves the building. The restore test proves the copy comes back. A backup is only validated when you restored it and checked the contents.

The training bot for module 7 adds up the values of vendas.csv, a file of fictitious sales, when it receives /relatorio. The monthly test restores that file into a separate folder and compares it with the original. The diff shows the differences; if it shows nothing, the two are identical.

In the first test, Denise’s copy was empty: the copy command pointed to the wrong folder. The rehearsal caught the mistake before any real loss.

Terminal · kit’s bot folder
$ cp ~/copias-oswork/vendas-copia-1.csv ~/restauracao-teste/vendas.csv
$ diff vendas.csv ~/restauracao-teste/vendas.csv
$ cat ~/restauracao-teste/vendas.csv
produto,valor
Caderno,35.50
Caneta,9.50
Agenda,55.00

The diff showed nothing: the copy is the same as the original. Add up the values: 100.00, the same total the bot’s /relatorio shows.

Two proofs: the diff in silence and the total checked by hand.

Stuck here? That's normal The diff’s silence makes it seem like “nothing happened.” It’s the opposite: it only speaks up when it finds a difference. If you see "No such file or directory", the folder or the copy name is different; check with ls.

4Five pieces of evidence close the project

The course project ends with five pieces of evidence: authorized response, block of the unknown, restart, log without a token and restoration verified.

Without a second Telegram account, the unknown block can be proven by the kit test, python3 bot.py --self-test. For the log without a token, read the journalctl and confirm the token doesn’t appear. If any step wasn’t executed, declare it. Writing “I didn’t do it” counts more than a “done” that nobody checked.

Denise still hadn’t rented the VPS. She recorded the evidence she could in her notebook and wrote, on the restart line, “not executed: no VPS”.

plano-vps.md · Verifications observed
1 Authorized response: /status answered at [hora]
2 Block of the unknown: self-test "OK: 11 offline scenarios"
3 Service restart: not executed: no VPS
4 Logs without token: read at [data]; no token
5 Backup restored in a separate folder: diff equal; total 100.00
One line per evidence, no secrets. Line 3 states what’s missing instead of hiding it.

Practice now 0/3

Do it and restore a real backup

Ready when the diff shows nothing and the total of the restored copy is 100.00. About 10 minutes, on your computer, in the terminal.

You only copy a file of fictional data; nothing is deleted. Here the copy stays on your computer; in a real VPS, it would go outside the machine. In Windows, use the terminal of the WSL, from module 3: in PowerShell, the diff responds differently.

Where the file is: vendas.csv comes in the bot folder of the course kit, the oswork-kit.zip from the OSWork materials page. The lines below assume the kit was extracted into ~/projetos/oswork-kit, as in the previous lesson; if it’s in another place, change only the first line. The terminal needs to respond with vendas.csv when you run ls.

cd ~/projetos/oswork-kit/bot
ls vendas.csv
mkdir -p ~/copias-oswork ~/restauracao-teste
cp vendas.csv ~/copias-oswork/vendas-copia-1.csv
cp ~/copias-oswork/vendas-copia-1.csv ~/restauracao-teste/vendas.csv
diff vendas.csv ~/restauracao-teste/vendas.csv
cat ~/restauracao-teste/vendas.csv

You just proved it—no guessing—that your copy comes back whole.

Lesson cheat sheet

Simulation

  1. From outside daily check: the bot responded and the disk has space.
  2. Copy outside the VPS, with written retention and without the .env.
  3. Trial restore into a separate folder; diff in silence and total checked.

Your next step

You finished OSWork. You leave with an organized folder containing verifiable instructions, a Skill, the history in Git, a restricted bot, and a supervised operation plan on a VPS.

Complete the five lines from the plan’s "Observed checks", with what you executed and "not executed" in the rest. Then mark on your calendar the next restore test, one month from now.

From now on, the course becomes a routine: daily checks, the monthly trial, and the updated plan after each change. When you want to go further, the module lab, in the supplementary material, takes you from the local folder to the supervised service.

Additional material · Availability requires a care routineFull text of the topic on OSWork v2 and module closeout. Does not count toward class time.

What it is

Continuous operation combines supervision, updating, monitoring, backups, and tested restoration. Make copies of data outside the machine, protect credentials, and set retention. A backup is only validated when you restore a copy and verify its contents.

Why learn

Without monitoring, a service can stay down for days. Without restoration testing, the copy may be incomplete. The real promise is a recoverable routine, not an infallible machine.

Key concepts

External check; logs; backup outside the VPS; restoration; spending limit.

In practice

A daily check records the bot’s response and disk space. A monthly test restores sales.csv in a separate folder and compares the total. Credentials follow private handling, without entering the public backup.

Try it now

Finish the project with five pieces of evidence: authorized response, blocking of unknown, restart, log without token, and verified restoration. Declare any step not performed.

Module lab: From the local folder to a supervised service

Use fake files and a training folder. Practices with installation, Telegram, or a VPS may require extra time for signup and setup.

  1. Choose a supported VPS Ubuntu, set a budget, and confirm access to the recovery console.
  2. Create a working user, test SSH access in a second session, and only then configure the firewall.
  3. Transfer the project without credentials via Git and configure the private .env on the VPS.
  4. Adapt the systemd unit, start the service, and test response, controlled restart, logs, and backup restoration.

Ubuntu VPS · adapt the paths before

Read the block before using. Fields like Your Name and usuario@ip-da-vps are examples to adapt; administrative commands belong only to your training environment.

sudo apt update
sudo apt upgrade
sudo apt install git python3
# Adapt the kit unit to the real user and path.
sudo systemctl daemon-reload
sudo systemctl enable --now oswork-bot
systemctl status oswork-bot --no-pager
journalctl -u oswork-bot -n 50 --no-pager

Ready criterion

Prepare a deployment plan, supervision, backup and service verification. Record the generated file, the executed test and the observed result.

Criteria to review your delivery

Use this rubric after the lab. Each line asks for evidence; checking reading does not mean the practice was performed.

  • Scope — The delivery matches the objective of this lesson. If you didn’t pass: Reduce the task and name a single result.
  • Inputs — You know which files or data were used. If you didn’t pass: List the sources and remove material that’s unrelated.
  • Execution — The procedure was carried out in the training environment. If you didn’t pass: Separate what you planned from what you actually did.
  • Verification — A result was compared against a reference. If you didn’t pass: Open the file or repeat a verifiable query.
  • Secrets — No token, password, or private data was shared. If it didn't work: Review the working copy before you send anything.
  • Continuity — Another person can find the next step. If it didn't work: Update README and record a concrete pending issue.

Check what remained

Install Codex on a VPS ensures an active 24/7 agent?

View commented answer

No. You need a service or scheduler, a supervised process, valid credentials, network and monitoring.

If your answer was different, return to the corresponding topic and write the difference in one sentence. The check does not block your study.

Module summary

  • Remote server; resources; recurring cost; operational responsibility.
  • Public key; fingerprint; user; sudo; recovery.
  • apt update; apt upgrade; dependency; virtual environment when needed.
  • Input and output; port SSH; firewall rule; file permissions.
  • Unit; service user; directory; restart; journal.
  • External check; logs; backup off the VPS; restoration; spending limit.

Consult the source

Tools verified on 20/09/2026; screen names and availability may change.

Terms for this section: systemctl, journalctl, path.

Lesson 48 · OSWork v6.2 · INEMA.CLUB PRO