Settings.Skills (fnord v0.9.29)

View Source

Manage skill enablement in settings.json.

Schema:

  • Global: ["skills"] :: [string]
  • Per-project: ["projects", pn, "skills"] :: [string]

Effective enablement (additive / union)

The effective set of enabled skills is the union of the global list and the project list (when a project is selected). This matches the semantics used by Settings.Frobs.

All mutations are performed via Settings APIs that provide cross-process locking and atomic writes.

Summary

Functions

Disable a skill in the given scope. Idempotent.

Return the effective set of enabled skills for the current project context.

Enable a skill in the given scope. Idempotent.

Is the given skill enabled in the current project context?

List enabled skill names for the given scope.

Types

scope()

@type scope() :: :global | :project | {:project, String.t()}

Functions

disable(scope, name)

@spec disable(scope(), String.t()) :: :ok

Disable a skill in the given scope. Idempotent.

effective_enabled()

@spec effective_enabled() :: MapSet.t(String.t())

Return the effective set of enabled skills for the current project context.

Additive semantics: the effective set is the union of the global list and the project list (when a project is selected).

The return is a MapSet for convenient membership checks.

enable(scope, name)

@spec enable(scope(), String.t()) :: :ok

Enable a skill in the given scope. Idempotent.

enabled?(name)

@spec enabled?(String.t()) :: boolean()

Is the given skill enabled in the current project context?

list(arg1)

@spec list(scope()) :: [String.t()]

List enabled skill names for the given scope.

  • :global reads the top-level skills list.
  • :project reads the selected project's list (or returns [] if no project).
  • {:project, name} reads the named project's list.

This function does not apply override semantics; it reads exactly the requested scope.