← ClaudeAtlas

module-attribution-inferencerlisted

Form a hypothesis about which existing module a user prompt belongs to when the deterministic extractor returns nothing. Reads existing module-map.yml features and source paths, scores token overlap, returns a ranked multi-choice draft, and surfaces it via the Decision Pause Contract. Second half of the Attribution Gate (issue
Eliyce/paqad-ai · ★ 4 · AI & Automation · score 76
Install: claude install-skill Eliyce/paqad-ai
## What It Does Runs **only** when the `module-attribution-extractor` returned `extractor: no-decision-needed` with zero raw candidates. Tokenises the prompt, scores each existing module's name + feature names + source paths + evidence (symbols, routes, tables) against it, weights name/slug tokens 2× over path tokens, and emits a ranked multi-choice draft. Always includes two fallback choices (`new-module-fallback`, `no-attribution`) so the Decision Pause packet is complete even when nothing scores above the floor. ## Use This When - The extractor produced zero candidates (no ticket headers, no `module:` markers, no `new module` phrasing). - You need to ask the user "which module does this belong to?" before continuing planning. Do **not** run this when the extractor already produced candidates — that path is owned by `module-attribution-extractor`. ## Inputs - `prompt` — required. The user-supplied text. - `project_root` — optional. Defaults to `cwd`. Used to load `module-map.yml`. - `max_choices` — optional. Cap on existing-module choices returned (default `3`). - Scoring details live in `runtime/base/skills/module-attribution-inferencer/references/scoring.md`. ## Procedure 1. Resolve the project root (default `cwd`). 2. Invoke the TS engine via the bundled wrapper: ``` bash scripts/infer.sh <prompt-file> [project-root] [max-choices] ``` The wrapper shells out to `paqad-ai module-decisions infer --project-root <root> --prompt-file <tmp> [--max-choices N]