aiwg
Version:
Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo
51 lines • 2.13 kB
TypeScript
/**
* Contributor Discovery
*
* Walks the installed framework registry and project-local override directory
* to find `<framework>/<kind>/contributor.md` files. Parses, validates, and
* runs detection on each candidate. Returns kept records and skipped entries
* with reasons. Failures of one contributor never abort discovery.
*
* @architecture @.aiwg/architecture/decisions/ADR-023-contributor-discovery-convention.md
* @issue #938
*/
import type { ContributorKind, DiscoveryResult } from './types.js';
interface DiscoverOptions {
/**
* Root of the AIWG installation (where `agentic/code/` lives). Required —
* callers pass the result of `getFrameworkRoot()`. Tests can pass a fixture
* path.
*/
frameworkRoot: string;
/** Project root — where `.aiwg/` lives and where detection globs run. */
projectRoot: string;
/**
* Override the registry path. Defaults to
* `<projectRoot>/.aiwg/frameworks/registry.json`. Tests can pass a fixture.
*/
registryPath?: string;
}
/**
* Discover all in-use contributors of a given kind for a project.
*
* Walks two source classes:
*
* 1. Framework-shipped contributors — for each framework id in the project's
* `.aiwg/frameworks/registry.json`, look up its source path under the
* AIWG installation and check for `<kind>/contributor.md`.
*
* 2. Project-local contributors — every `.aiwg/contributors/<kind>/*.md`
* file in the project root. Lets users add custom contributors without
* forking a framework.
*
* Order is preserved: framework contributors appear in registry order, then
* project-local contributors in glob order. Each kept record carries its
* `origin` (framework id or `'project-local'`) and absolute `path`.
*
* Failures (parse, validation, detection-throw, detection-no-match) are
* captured as `SkippedContributor` entries — discovery never aborts on a
* single bad contributor.
*/
export declare function discoverContributors(kind: ContributorKind, options: DiscoverOptions): Promise<DiscoveryResult>;
export {};
//# sourceMappingURL=discover.d.ts.map