one-thing-functions
v0.1.4
Published
Strict function-design checker CLI.
Downloads
49
Maintainers
Readme
one-thing-functions
Strict function-design checker CLI.
Rules default to FP-first domain records:
- one function does one thing
- max one argument
- max 25 lines by default
- no currying tricks
- no array packs
- no object bags outside boundary/factory records
Setup
npx one-thing-functions init
npm install -D one-thing-functions
npm run lint:functions:auditinit detects common roots (src, lib, app, scripts, packages, etc.). If none exist, it falls back to .. lint:functions:audit is advisory and exits successfully after reporting findings. Use lint:functions when ready for CI enforcement.
Custom roots:
npx one-thing-functions init --roots=src,scriptsCLI
npx one-thing-functions check src --advisory
npx one-thing-functions check src
npx one-thing-functions check src --profile=legacy-migration
npx one-thing-functions check src --config=one-thing-functions.config.mjsConfig
export default {
profile: "fp-first",
roots: ["src"],
maxLines: 25,
utilityAllowlist: ["clamp"],
};Profiles:
fp-firstdefaultoo-friendlylegacy-migration
Agent skill
The skill lives once at repo root:
../../skills/engineering/one-thing-function/SKILL.mdInstall it with the open skills CLI:
npx skills add <owner>/arc-forge --skill one-thing-function