← writing
·3 min read

One session, many desks

A résumé was never the app. It was one desk.

Story. Write. Tailor. Explain a PDF. Rank a lesson. The person still sits in one chair. The model still has one conversation. What changes is the job, the tools on the desk, and how long the memory is allowed to get.

I kept writing that job into Swift.

A multiline string inside a switch. A second string for the prompt. A third session constructed beside the first, because the instructions had changed and I did not trust the old one to notice. The prose and the control flow grew up in the same file. A prompt edit looked like a logic edit. A new desk meant a new function.

Apple's Origami sample does not do that. One orchestrator. One LanguageModelSession. A DynamicProfile watches the mode and rebuilds the profile: brainstorm, tutorial, or term. Each mode brings its own DynamicInstructions, its own tools, sometimes a different model, sometimes a shorter history. Four transcript entries on device. The essay of what the coach is allowed to say still sits in the sample as a literal. The choice of coach does not.

Checkmate already pulled the essay out. Instructions.xcstrings holds piece-discussion.v2.instructions. Prompts.xcstrings holds piece-discussion.v2.prompt. The call is String(localized:table:). The key is a version. The value is the words. extractionState is manual, so Xcode does not mistake the key for a sentence. v1 stays in the file. v2 is what the session loads. A new coach is a new row.

The two moves belong together.

struct DeskProfile: LanguageModelSession.DynamicProfile {
    var desk: Desk

    var body: some DynamicProfile {
        switch desk.stage {
        case .tailor:
            Profile {
                Instructions {
                    String(
                        localized: "resume.tailor.v1",
                        table: "Instructions",
                        locale: Locale(identifier: "en")
                    )
                }
                QuoteTool()
            }
        case .explain:
            Profile {
                Instructions {
                    String(
                        localized: "document.explain.v1",
                        table: "Instructions",
                        locale: Locale(identifier: "en")
                    )
                }
            }
            .historyTransform { Array($0.suffix(4)) }
        }
    }
}

Pin English on the prompt. The interface can be in another language. The schema the model must fill is still English. If the key is missing, String(localized:) hands the key back, and the model is instructed with resume.tailor.v1. A test should fail when the resolved string equals the key.

Steps are a second layer, and they stay in code. Read the PDF. Keep a line only when it quotes the person. Match a posting. Draw the page. That order is not the model's to invent. Origami's profile decides who is speaking. A step runner decides what has already been proven. Screen Room adds the brake: after two tool calls, toolCallingMode(.disallowed).

So the résumé desk, the PDF explainer, and the lesson coach are rows. Same session. Same catalog. A new orchestration is a new case and a new key, not a new string buried in a view.