CtrlK
BlogDocsLog inGet started
Tessl Logo

simon/skills

Auto-generated tile from GitHub (10 skills)

92

1.16x
Quality

94%

Does it follow best practices?

Impact

92%

1.16x

Average score across 44 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-41/

Document a Developer Library for Two Audiences

Problem / Feature Description

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.

Library API

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_PORTport)
  • filePath — string, default './config.json' — path to the JSON file when using 'file' source
  • defaults — object, default {} — in-memory default values applied when 'defaults' is listed in sources
  • strict — boolean, default false — when true, throws an error if any key listed in required is missing
  • required — array of strings, default [] — list of configuration keys that must be present when strict is true
  • timeout — number (milliseconds), default 5000 — how long to wait for remote source resolution before failing

Returns: 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.

Output Specification

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 quickly
  • docs/api-reference.md — technical documentation covering the full API for developers who need to look up specific details

The documentation should be self-contained and accurate based solely on the API described above. Do not introduce features or options not listed here.

evals

README.md

tile.json