codespeak update-managed-files

Add files to the managed files list for a specific spec.

Synopsis

codespeak update-managed-files [paths...] [--spec SPEC]

Description

Adds given files to the list of managed files for a spec. By default (when no paths are given), adds the files that were flagged as managed file violations during the last build.

Unlike codespeak whitelist which is project-wide, this command gives per-spec control โ€” the file is only managed by the specified spec.

Files that don't exist on disk are silently filtered out. The command requires exactly one spec to be registered (use --spec if multiple specs exist).

Flags

FlagDescription
pathsFiles or directories to add as managed files. Defaults to the violations from the last build
--spec SPECPath to the specification file. If omitted, all registered specs are considered

Examples

Add a specific file to a spec's managed files:

codespeak update-managed-files 'pyproject.toml'

Add all files that violated managed file rules in the last build:

codespeak update-managed-files

Error messages

ErrorCauseResolution
Can't find spec to buildNo .cs.md files found and no specs registered in codespeak.jsonCreate a spec file or register one in codespeak.json
Circular spec dependency detected: A -> B -> ASpec imports form a cycleRemove the circular import
{path} does not belong to a CodeSpeak projectNo codespeak.json foundRun codespeak init first
No paths provided, and the last run doesn't have any recorded managed files violationsNo explicit paths and no violations from last buildProvide explicit paths or run a build first

See also