Auto-generated tile from GitHub (10 skills)
92
94%
Does it follow best practices?
Impact
92%
1.16xAverage score across 44 eval scenarios
Advisory
Suggest reviewing before use
A small open-source library called confz provides a configuration loading and validation utility for Node.js. It was originally documented in a single README.md that was written incrementally over two years. The result is a sprawling document that mixes examples with API tables, step-by-step walkthroughs with conceptual background, and quick start code with deep-dive explanations — all on one page.
The library now has enough users that the maintainers want proper structured documentation. They have assembled rough notes covering four main areas they want documented: getting started for new users, solving common configuration problems, a full reference of the configuration options, and background on how the layered resolution system works under the hood. The maintainers want these areas separated into well-organized pages that serve different user needs.
Your job is to take the raw notes below and produce a set of properly structured documentation pages. Each page should serve a single purpose and be easy for its intended reader to navigate. A first-time user should be able to get something working from the getting-started page without needing to read anything else. An experienced user who already knows confz should be able to solve a specific problem without reading conceptual background. Someone looking up an option should be able to find it in under 30 seconds.
Produce the following documentation files:
docs/tutorial.md — for users learning confz for the first timedocs/how-to.md — for experienced users solving a specific problemdocs/reference.md — for users looking up options or API detailsdocs/explanation.md — for users who want to understand how confz worksEach file should be written in Markdown.
The following are the raw notes from the maintainers. Extract them before beginning.
=============== FILE: raw-notes/getting-started.txt =============== confz is a library for loading config. You call loadConfig() with a schema. Users are often new to validation libraries. They need to see a working example quickly. They should install it with npm install confz. Then they create a schema with z.object from zod. Then they call loadConfig({ schema }) and it reads from process.env. A good example is building a server config: PORT, DATABASE_URL, NODE_ENV. They should be able to run node server.ts at the end and see "Server running on port 3000". Each step should have something they can run or verify. Assume no prior knowledge.
=============== FILE: raw-notes/common-tasks.txt =============== A common ask: how to add a .env file as a source alongside process.env. Another common ask: how to set a default value for an optional field. Another common ask: how to validate that a string matches a specific format (e.g. a URL). Users asking these questions already know how to use confz basics. Just show the solution — no need to explain what confz is. Note alternatives: for defaults, you can use .default() in zod or the defaults option in loadConfig.
=============== FILE: raw-notes/options-reference.txt =============== loadConfig(options) accepts:
processEnv() — no options — reads from process.env dotenv(path) — path: string — reads from a .env file at the given path memory(values) — values: Record<string,string> — in-memory source for testing
=============== FILE: raw-notes/internals.txt =============== confz uses a layered resolution approach. Sources are merged left-to-right — later sources override earlier ones. This is similar to how webpack config merging works. The reason for left-to-right merging is that it makes defaults easy: put your defaults source first, env vars last. After merging, the combined object is passed to the Zod schema for validation. Unknown keys are stripped by default (strict: false). With strict: true they throw. The design decision to use Zod was made because Zod is widely used and provides good error messages. An alternative would have been to use a custom validator, but that would require users to learn another API.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
scenario-27
scenario-28
scenario-29
scenario-30
scenario-31
scenario-32
scenario-33
scenario-34
scenario-35
scenario-36
scenario-37
scenario-38
scenario-39
scenario-40
scenario-41
scenario-42
scenario-43
scenario-44
skills
documentation
fastify
init
linting-neostandard-eslint9
node
nodejs-core
rules
oauth
octocat
snipgrapher