# Your first standard-library workflow

You do not need to read the entire library before writing a useful program.
Start with one input, one transformation and an observable result. This path
assumes you have completed [your first Vex project](first-project.md).

## Build confidence in three steps

| Step | Do this | You are ready to continue when |
| --- | --- | --- |
| Parse a value | Run the complete [checked JSON example](../std/serde/json.md) and print the result | You can change a field and explain how parse failure reaches the caller |
| Transform it | Use [checked string conversion](../std/strconv.md) and [string construction](../std/strings.md) for the value you need | You can handle a missing or invalid field without inventing a default |
| Keep it working | Put the expected result and a rejected input into a [test](../std/testing.md) | The test detects a deliberate change to the expected behavior |

Run each complete example before combining packages. Retain its imports and
expected output. When the guide marks a snippet as a fragment, read the
surrounding setup rather than pasting it as an independent program.

## Choose the next package by the job

| I want to… | Start here | Decide before connecting it |
| --- | --- | --- |
| Read arguments and print a result | [CLI](../std/cli.md), [logging](../std/log.md) | Required versus optional input; output intended for people or machines |
| Read a configuration file | [Files](../std/fs/index.md), [serde](../std/serde/index.md) | Who owns the bytes, size limits, and required fields |
| Order or search records | [Sort](../std/sort.md), [collections](../std/collections.md) | Key type, ordering and whether stable order matters |
| Call an HTTP endpoint | [HTTP](../std/http/index.md), [context](../std/context.md) | Response ownership, deadline and failure handling |
| Store local records | [Database](../std/db/index.md) | Connection lifetime, statement errors and the native provider |
| Parse a URL or encoded text | [URL](../std/url.md), [encoding](../std/encoding.md) | Accepted syntax and whether the returned data owns its storage |
| Measure elapsed work | [Time](../std/time/index.md) | Monotonic elapsed time versus a wall-clock timestamp |

Use the [complete package map](../std/index.md) for media, numerical work, cryptography
and language tooling. Read the particular package's provider and integration
requirements before extending a small example to a full service.

## Keep three boundaries visible

**Imports.** `Vec`, `Map`, `Option` and `Result` belong to the prelude. Import
packages using their documented paths, such as `"fs"` or `"serde/json"`.
The [prelude and package guide](stdlib.md) explains which names need imports.

**Ownership.** An owning result can outlive its input; a view needs its owner.
Check the receiver and return type before storing or returning a value. Use
[ownership workflows](memory/ownership-workflows.md) when connecting two
APIs across a function, collection or async boundary.

**Validation.** Successful parsing establishes the format contract. Your
application still checks required fields, value types and ranges. For a binary
format, follow the safe dynamic path described by [CBOR](../std/serde/cbor.md) or
[MessagePack](../std/serde/msgpack.md) before constructing domain values.

## A small exercise

Adapt the JSON example to accept a configuration with an `enabled` boolean.
Keep one accepted input and reject both a missing field and a string in place
of the boolean. Print a result only after validation. Then move the validation
into a function and test it. Your completion check is the same behavior before
and after that refactor, including the two rejected inputs.

For a larger next step, choose one [worked application example](examples.md).
Keep the compiler identity and commands with your result using
[verification evidence](verification-evidence.md).
