← ClaudeAtlas

module-attribution-extractorlisted

Run the deterministic module-attribution extractor over a user prompt and surface any MD-XXXX drafts via the Decision Pause Contract. This is the first half of the Attribution Gate spliced into feature-development.planning (issue
Eliyce/paqad-ai · ★ 4 · AI & Automation · score 76
Install: claude install-skill Eliyce/paqad-ai
## What It Does Applies the framework-owned pattern set (`Module:` / `Component:` / `Area:` / `Subsystem:` ticket headers; `module: <slug>`; `new module <Name>`; `in the <name> module`) to the prompt. Emits one candidate per distinct slug, classified as `exact-match`, `near-collision` (Levenshtein ≤ 2 against an existing slug), or `unknown`. Multiple modules in a single prompt produce one MD-XXXX draft each (spec AC #9). ## Use This When - Running the Attribution Gate at the start of `feature-development.planning`. - A user pastes a ticket and you need a deterministic first pass before invoking the inferencer. - A user prompt explicitly names a module (`module: billing`, `Subsystem: Reporting`). ## Inputs - `prompt` — required. The user-supplied text (typically a ticket body or feature request). - `project_root` — optional. Used to resolve `module-map.yml` for collision detection. Defaults to `cwd`. - The pattern set itself is closed and lives in `runtime/base/skills/module-attribution-extractor/references/pattern-set.md`. ## Procedure 1. Resolve the project root (default `cwd`). 2. Invoke the TS engine via the bundled wrapper: ``` bash scripts/extract.sh <prompt-file> [project-root] ``` The wrapper shells out to `paqad-ai module-decisions extract --project-root <root> --prompt-file <tmp>`. Prefer `--prompt-file` (the wrapper always uses it) so multiline ticket text survives the shell. 3. Parse the emitted JSON. Each entry in `candidates` has: `slug`, `disp