F13 · Foundation Session 13
Paper to glass
Everything so far comes together in one workflow: a paper form on the floor becomes a screen, a record, a review and a chart. The agent builds it from your briefs. You check every step, and the plant only lets go of the paper when the screen has proved itself.
8 min5 chapters≈ 1¾ hours3 hands-on exercises12-question assessment · 80% passes
By the end of this chapter you can
- Describe the end-to-end path a record takes, from operator to manager.
- Describe how this element is scored.
- Know what you will deliver: one paper form replaced, proved end to end.
One workflow, all the way through
Sessions 3 to 12 each built one part: the schema, the names, the matrix, the access rules, sign-in, the clamps, three surfaces and the skill of directing an agent. Session 13 joins them into one working loop for one real form, so a record entered on the operator screen reaches the manager view through the review queue. That is also the end-to-end criterion of Homework 4 and an item on the certification practical.
The course example stays with Acme's first-off check sheet on Line 3 (Acme is an illustrative plant). Use the paper form your own intent named: a start-up checklist, a downtime log, a torque record, a sanitation sign-off. The method is the same.
How it is scored
The element is complete when you have opened every chapter and taken the assessment, and passed at 80% or more.
Knowledge check
What proves a workflow works end to end?
Chapter 1 · Read the form like a specification
From paper to fields
A paper form is a specification someone wrote years ago. Read every box, ask who fills it, when and why, and decide for each one: captured for the operator, typed by the operator, decided by the server, or dropped.
25 min1 form4 kinds of field0 boxes copied blindly
By the end of this chapter you can
- Turn each box on a paper form into a field with a name, type, unit, limits and source.
- Capture automatically what paper asked people to write: time, place, person.
- Decide on the server what paper asked people to judge, and drop what no decision uses.
Go and see the form in use
Before you design anything, watch the form being filled in, on the floor, on a real shift. Lean practice calls this going to the gemba, the place where the work is done [1]. You will see what no document says: the box nobody fills, the column people use for something else, the note scribbled in the margin because there was no box for it. Bring three filled-in sheets back with you; they are your first test data.
Paper forms in quality work are often check sheets: simple, structured forms for collecting data where it happens [2]. Their strength is that anyone can fill them in; their weakness is everything after: copying, adding up and finding them. The screen keeps the strength and removes the weakness.
Four questions for every box
| Question | If the answer is | Then |
|---|---|---|
| Does anyone use it to decide something? | No | Drop it, and write down why in the intent |
| Can the platform know it without asking? | Yes: time, person, place, job | Capture it: the server's clock, the signed-in user, the scanned QR label, the press's current job |
| Is it a judgement from other values? | Yes: pass or fail, in or out of limits | Decide it on the server from the limits; never let the browser send it |
| Otherwise | It is a measurement or an observation | The operator types it, with the right keypad, unit and limits shown |
Write the field list
For each field that survives, write one row: the name in your naming standard from Session 5, its type, its unit, its limits, where it comes from and which roles in the matrix may read or write it. This list is the input to Brief 1; with it, the agent has almost nothing to guess.
| Field | Type | Unit / limits | Source | Write / read |
|---|---|---|---|---|
| id | uuid | – | Operator's device (outbox) | Operator / all plant roles |
| entered_at | timestamptz | – | Server clock | Server / all plant roles |
| press | text | ISA-95 name, such as L3-P02 | Scanned QR label | Operator / all plant roles |
| part | text | Drawing number | Press's current job | Server / all plant roles |
| hole_mm | numeric(6,3) | 11.900 to 12.100 | Typed | Operator / all plant roles |
| flange_mm | numeric(6,3) | 24.800 to 25.200 | Typed | Operator / all plant roles |
| burr_mm | numeric(5,3) | 0 to 0.100 | Typed | Operator / all plant roles |
| result | text | pass or fail | Server, from the limits | Server / all plant roles |
| entered_by | uuid | – | Signed-in user | Server / supervisor, quality |
| corrects_id | uuid, nullable | – | Set when re-measuring after a reject | Operator / all plant roles |
Paper rules still apply
If your plant works under a quality system such as ISO 9001, the form is a controlled record: it must be identifiable, protected from loss and kept for a defined time [3]. If it is a record FDA rules require, moving it to a screen brings it under the electronic records rule, with its audit trail and access requirements [4]. The design from Sessions 7 to 11 (append-only records, attributable entries, role-based access, an audit trail of every review) is built to meet that kind of requirement; check the specific rules that apply to your plant with your quality lead before you retire the paper.
Knowledge check
The paper form has a box for the operator's initials. What does the screen do?
Knowledge check
Where is pass or fail decided?
Knowledge check
A box on the form has been blank on every sheet for a year. What should you do?
You need: Your plant's paper form; three filled-in sheets; a text editor
Turn your own paper form into the field list Brief 1 will need.
Outcome: A field list every box on the form is accounted for in, checked by the person who uses the form.
References
- Lean Enterprise Institute: Gemba (Lean Lexicon). https://www.lean.org/lexicon-terms/gemba/
- ASQ: What is a check sheet?. https://asq.org/quality-resources/check-sheet
- ISO 9001:2015 Quality management systems: Requirements. https://www.iso.org/standard/62085.html
- eCFR: 21 CFR Part 11, Electronic records; electronic signatures. https://www.ecfr.gov/current/title-21/chapter-I/subchapter-A/part-11
Chapter 2 · Built by the agent, in order
Four briefs, one workflow
One workflow is too big for one brief. Split it into four, each one pull request with its own checks, in the order the layers depend on each other: schema first, then the three surfaces.
30 min4 briefs4 pull requests1 end-to-end test
By the end of this chapter you can
- Split a workflow into briefs that each make one reviewable pull request.
- Order them so each stands on finished, tested work.
- Write the end-to-end acceptance test that the last brief must pass.
Split by layer, in order
Each layer stands on the one below. The surfaces cannot be built well until the table, its access rules and some realistic data exist, and the board cannot count approved checks until reviews exist. So the briefs run in order, each merged before the next starts. Anthropic's guidance for its agent recommends exactly this kind of decomposition into well-defined steps with checks between them [1].
| Brief | Builds | Acceptance checks you write first | Built on |
|---|---|---|---|
| 1 Schema | The migration for the field list, row-level security from the matrix, and synthetic data from your three real sheets | Each role reads and writes exactly what the matrix says; another plant's user sees nothing | Sessions 3, 4, 6, 7 |
| 2 Operator screen | The screen from Session 10 for this form, with the outbox | At 360 px: a good entry is saved with a server result; offline entries arrive once | Session 10 |
| 3 Review queue | The queue and reviews table from Session 11 | Reject needs a reason; self-review refused; corrected check links to the rejected one | Session 11 |
| 4 Board | The tile and trend from Session 11, counting approved checks | An approved check changes the count; a rejected one is counted as a first-time fail | Session 11 |
The end-to-end test
The four briefs each have their own checks. One more test proves they work together: it signs in as an operator and a supervisor in two browser contexts, sends a record through the whole path, and reads the database at every stop. Write it before Brief 2 starts; it fails until Brief 4 is merged, and then it guards the workflow on every pull request after that. Playwright supports several independent browser contexts in one test, which is how one test can play two people [2].
test("a first-off check travels from operator to board, including a rejection", async ({ browser }) => {
const operator = await signedInPage(browser, "operator-line3");
const supervisor = await signedInPage(browser, "supervisor-shift-b");
// 1. The operator enters a check with flange height above its limit.
const first = await submitFirstOff(operator, { press: "L3-P02", hole: "12.02", flange: "25.31", burr: "0.03" });
expect(await row("first_off_checks", first)).toMatchObject({ result: "fail", entered_by: ids.operator });
// 2. The supervisor sees the difference and rejects it with a reason.
await supervisor.goto("/review");
await expect(supervisor.getByText("+0.11 above limit")).toBeVisible();
await reject(supervisor, first, "Flange high: adjust die and re-measure");
expect(await reviews(first)).toEqual([expect.objectContaining({ decision: "rejected", reviewer: ids.supervisor })]);
// 3. The operator re-measures; the new check corrects the first.
const second = await submitFirstOff(operator, { press: "L3-P02", hole: "12.01", flange: "25.04", burr: "0.02", corrects: first });
await approve(supervisor, second);
// 4. The board counts both: one first-time fail, one approved release.
await supervisor.goto("/board");
await expect(supervisor.getByTestId("first-pass-yield")).toContainText("0 of 1 first time");
await expect(supervisor.getByTestId("checks-approved")).toContainText("1");
});Keep the evidence
Homework 4 asks for your briefs, the changes the agent made, and your acceptance checks with their results. Keep each brief in docs/briefs/, link each pull request to its brief, and note in the pull request any problem you found while reading it and how it was fixed. If you rewrite a brief, keep both versions and one line on why. Record what the agent's work cost if your plan shows it: that is the exemplary level.
Knowledge check
Why must Brief 1 (schema and access rules) be merged before the others start?
Knowledge check
When is the end-to-end test written, and when does it first pass?
Knowledge check
Why run these four briefs with one agent, one after another?
You need: Your AI coding agent; github.com; your field list
Direct the agent through the four briefs, reading each change in the order from Session 12 before it merges.
Outcome: One workflow built by the agent in four reviewed pull requests, with a passing end-to-end test on main.
References
- Anthropic: Claude Code best practices. https://www.anthropic.com/engineering/claude-code-best-practices
- Playwright documentation: Isolation and browser contexts. https://playwright.dev/docs/browser-contexts
Chapter 3 · The data trail and the parallel week
Checking it end to end
A green test proves the workflow works in a test. The floor proves it works. Follow the data trail, put it in front of the people who will use it, and run it beside the paper until the two agree.
27 min5 steps on the data trail1 parallel week1 signed go/no-go
By the end of this chapter you can
- Follow the data trail: check the database, not just the screen, after each step.
- Pilot the workflow on one line and run it in parallel with paper.
- Make and record a go or no-go decision before retiring the paper.
Follow the data trail
A screen can say Saved while the database holds nothing, or two rows, or the right row with the wrong person. So the end-to-end test reads the database after every step, and so should you the first time you run the workflow by hand. Open the table in Supabase's table editor beside the screen and watch each row arrive [1].
Put it in front of the floor
Tests find what you thought of. Operators find the rest: the label that reads differently on a dirty screen, the field order that does not match how they measure, the glove that does not register on one button. Ask one operator and one supervisor to use it on a real shift on one line, with you watching and not helping. Homework 3's exemplary level asks for exactly this: tested by an operator on the floor.
Run it beside the paper
Do not retire the paper on day one. For a week, on the pilot line, the operator fills in both. At the end of each shift, compare: the same number of checks, the same values, the same pass or fail. Every mismatch has a cause, and the cause is either a bug, a training gap or a paper error the screen has just caught. Medical-device software guidance makes the same point in general terms: confirm a system works for its intended use, in its real environment, before relying on it [2].
| Mismatch | Likely cause | Fix |
|---|---|---|
| Screen has fewer than paper | An entry made offline never sent, or an operator skipped the screen | Check the outbox on that device; check the shift's training |
| Screen has more than paper | A duplicate from a retry, or paper not filled in | Check ids: a duplicate means the idempotent insert is broken |
| Same count, different value | A typing error on one of them | The review card shows which; the paper is not automatically right |
| Different pass or fail | Limits differ between the drawing, the paper and the platform | Fix the limits at their source and record the change |
Decide, and write it down
At the end of the parallel week, the supervisor and the quality lead decide: go, or another week. Write the decision as a short record in the repository (docs/go-live/workflow-1.md): the week's counts, every mismatch and its cause, who decided and when. Then, and only then, retire the paper on that line. The other lines follow one at a time. Session 21 does the same for the whole platform.
Knowledge check
The screen says Saved. Why does the end-to-end test still read the database?
Knowledge check
During the parallel week the screen shows one more check than the paper. What do you check first?
Knowledge check
When is the paper form retired?
You need: The deployed workflow; the paper form; Supabase's table editor
Prove the workflow on one line before the paper goes.
Outcome: A workflow proved on the floor, with a recorded go decision before any paper is retired.
References
- Supabase Docs: Tables and data (Table Editor). https://supabase.com/docs/guides/database/tables
- U.S. FDA: General Principles of Software Validation (guidance for industry and FDA staff). https://www.fda.gov/regulatory-information/search-fda-guidance-documents/general-principles-software-validation
Chapter 4 · 12 questions · 80% passes
Final assessment
Twelve questions across the element. Score 80% (10 of 12) to pass. Your LMS records your score and each answer; you can review the chapters and try again.
15 min12 questions≈ 15 minutesRetake allowed
Your result
CivOps AI Academy
Your First Workflow, End to End: Paper to Screen, Record, Review and Chart
Element F13 complete · Learner
Your LMS records this completion. For the CivOps Foundation certificate, finish the Foundation Course at https://civops.io/learn.