Skip to content

pipeio_mod_resolve: fill doc_path gap and add modkey.bib citation support

Problem

pipeio_mod_resolve currently returns doc_path: null for mods that have documentation, and has no support for citing pipeline mods in manuscripts. pixecog has a project-local modkey_resolve tool that fills both gaps. Once pipeio covers these, the entire pixecog_mcp server can be retired.

Gap 1: Doc path resolution

pipeio finds the mod and its rules but doesn't resolve the documentation path. pixecog convention is docs/pipelines/pipe-X/flow-Y/mod-Z/index.md (via the docs tree). pipeio should:

  1. Check for a doc directory following the pipe-X/flow-Y/mod-Z convention (configurable root)
  2. Return doc_path (relative) and doc_exists (bool) in the mod_resolve response
  3. This enables agents to read mod docs without guessing paths

Reference: pixecog:code/utils/pixecog_mcp/mods.py lines 83-86 — checks docs/explanation/pipelines/pipe-X/flow-Y/mod-Z/index.md

Gap 2: modkey.bib — citable pipeline mods

Research manuscripts need to reference pipeline mods as structured citations (e.g. @pipe-preprocess_flow-ieeg_mod-badlabel in Pandoc/LaTeX). pixecog generates a modkey.bib file with @misc entries for each mod, containing: - title: Pixecog mod: pipe=X flow=Y mod=Z - author: project name - year: generation date - note: doc path

This enables [@pipe-preprocess_flow-ieeg_mod-badlabel] in markdown → proper citation in PDF output.

Proposal

Add a pipeio_modkey_bib() MCP tool (or integrate into pipeio_registry_scan) that: 1. Generates a BibTeX file with @misc entries for all registered mods 2. Writes to a configurable path (default: docs/pipelines/modkey.bib or similar) 3. Each entry includes: modkey as citekey, pipe/flow/mod in title, doc path in note field 4. Autogenerated header with timestamp

This is valuable for any research project that wants traceability between manuscript text and pipeline components.

Reference: pixecog:code/utils/cli/gen_mod_registry.py _dump_bib() function (lines 52-80)

Gap 3: gen_*_registry CLI scripts are fully redundant

gen_pipe_flow_mod_registry.py (filesystem scan → registry YAML) and gen_mod_registry.py (registry YAML → mod registry + modkey.bib) are fully covered by pipeio_registry_scan() for the scan part. The mod registry flattening and bib generation are the only unique functionality — which this issue proposes to absorb.

Once these gaps are filled: - pixecog can remove gen_mod_registry.py, gen_pipe_flow_mod_registry.py - pixecog can remove pipeline_registry.py, mods.py from pixecog_mcp - pixecog_mcp server becomes fully redundant and can be retired

Summary of changes needed

Feature Tool Effort
Doc path resolution in mod_resolve pipeio_mod_resolve Small — add path convention check
modkey.bib generation New pipeio_modkey_bib() or flag on pipeio_registry_scan Medium — BibTeX generation
Doc path + exists in response pipeio_mod_resolve response schema Small — add fields

Source context: pixecog

PixEcog (pixecog): Neuropixels and ECoG dataset and analysis

Recent commits:

2601c54 Cleanup: remove legacy tooling superseded by projio ecosystem (pixecog_mcp modules, RAG system, foam templates, workflow makefiles, context builder, dead CLI scripts)
1cdc964 Pre-cleanup checkpoint: update bib and docs subdatasets, indexio config v3
6429574 untrack

README:


type: readme


Quick Start for Collaborators

Follow this checklist to get started with Pixecog documentation and workflows.

🐀 Pixecog Project — Compact Overview

Core principles

  • One immutable BIDS raw dataset (raw/) as the canonical baseline
  • Each analysis pipeline ha