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
Your team has just open-sourced Konfig, a lightweight Node.js library that loads application configuration from environment variables, JSON files, and in-memory defaults. The library has been in internal use for a year, but now that it's public, it needs proper documentation.
Two distinct groups will use these docs. The first group is new adopters — developers who have never used Konfig and want a practical, hands-on introduction that gets them from zero to a working configuration setup as quickly as possible. The second group is experienced developers who already know how to use the library but need to look up the exact name of a parameter, its accepted type, its default value, or check which options are available — they don't need hand-holding, just accurate, scannable facts.
Your task is to write documentation that serves both groups well. The documentation should live in a docs/ folder and be written in Markdown.
The following describes Konfig's public API. Use this as the source material for your documentation.
konfig.load(options)Loads and resolves configuration from all configured sources.
sources — array of strings, default ['env', 'file'] — ordered list of sources to read from; supported values are 'env' (environment variables), 'file' (JSON file), 'defaults' (in-memory defaults object)prefix — string, default 'APP' — prefix applied to environment variable names when reading from 'env' source (e.g., prefix 'APP' maps APP_PORT → port)filePath — string, default './config.json' — path to the JSON file when using 'file' sourcedefaults — object, default {} — in-memory default values applied when 'defaults' is listed in sourcesstrict — boolean, default false — when true, throws an error if any key listed in required is missingrequired — array of strings, default [] — list of configuration keys that must be present when strict is truetimeout — number (milliseconds), default 5000 — how long to wait for remote source resolution before failingReturns: a Config object.
config.get(key)Returns the resolved value for key, or undefined if not set.
config.set(key, value)Sets key to value in the in-memory layer. Does not persist to file or environment.
config.has(key)Returns true if key is present in any resolved source.
config.validate(schema)Validates the resolved configuration against a JSON Schema object. Throws a ValidationError if validation fails.
Produce two Markdown files inside a docs/ folder:
docs/getting-started.md — introductory documentation for a developer who has never used Konfig before and wants to get a working configuration setup running quicklydocs/api-reference.md — technical documentation covering the full API for developers who need to look up specific detailsThe documentation should be self-contained and accurate based solely on the API described above. Do not introduce features or options not listed here.
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