akm-cli
Version:
akm (Agent Knowledge Manager) — a portable, local-first capability library for AI agents. Discover, load, share, and improve reusable skills, scripts, workflows, and knowledge across any shell-capable coding agent, including Claude Code, OpenCode, and Cur
26 lines (25 loc) • 1.48 kB
JavaScript
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
/**
* The issue codes that are ADVISORY: surfaced in lint output but never routed
* into `flagged`, so `--fail-on-flagged` cannot fail a run over one.
*
* ONE home for that decision. EVERY routing point consults it — the adapter
* path (`lint/index.ts#lintViaAdapter`), the sweep's per-file loop, and the
* sweep's workflow-frontend pass — so a new advisory code cannot be classified
* correctly in one place and land in `flagged` (exit 1) in another; a finding
* is never filed by which producer emitted it. A future advisory belongs in
* BOTH this set and {@link LintIssueType}: an unrecognized code is folded onto
* `adapter-diagnostic` at the adapter boundary, which is deliberately NOT
* advisory, so a code missing from the union cannot be routed by this set.
*
* Advisory-ness is deliberately NOT a field on {@link LintIssue}: issues are
* serialized verbatim by `--format json`, and a new key on every advisory
* would change every consumer's output to restate what `issue` already says.
*/
export const ADVISORY_LINT_ISSUES = new Set(["workflow-warning"]);
/** True when `issue` belongs to the advisory channel — see {@link ADVISORY_LINT_ISSUES}. */
export function isAdvisoryLintIssue(issue) {
return ADVISORY_LINT_ISSUES.has(issue.issue);
}