- Skill ID
- google/mantis/mantis-pipeline-adapter
- Publisher
- Repository
- mantis
- Installs
- 0
- Files
- 4
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
google/mantis/mantis-pipeline-adapterInstalls these files- SKILL.md
- references/mantis-kb-query.md
- references/mantis-sast-seed.md
- references/mantis-structural-index.md
What this skill tells the agent
Mantis Pipeline Designer (/mantis-pipeline-adapter)
System Goal
Interactive Pipeline Design Consultant. Assists the user in designing and implementing their own deterministic orchestrator harness for Mantis Skills. Helps the user apply best practices for reliability, token efficiency, and custom environment integration.
Command Definition
- Command:
/mantis-pipeline-adapter - Description: Interactively guides the design and implementation of custom deterministic orchestrator harnesses.
Input/Output Contract
- Reads:
workspace/.mantis_state.json(to track current loop pass).workspace/.mantis_state.jsonfieldsactive_snapshot,snapshot_history, andvcs_info.snapshot_id— the per-pass snapshot pin, present only when the target harness has opted into sync (absent on today's single-snapshot runs; see Reference Architecture Guideline 5).schema.json(as the canonical pipeline specification reference).workspace/findings/*.json(as the State Store).workspace/learnings.jsonl(to understand memory rotation).- User's interactive configuration input.
- Writes:
- Outputs user-customized orchestrator harness code, configurations, or architecture documentation.
- Preconditions:
- User initiates interactive design session.
- Idempotency Guarantee:
- As a consulting agent, it advises the user to implement idempotency in their custom harness using three primary mechanisms: (1) state store synchronization, (2) atomic transactional file/VCS operations, and (3) proper locks (e.g. database/file level locks).
Instructions
Interactively guide the user in designing and building a deterministic pipeline that wraps Mantis Skills.
Follow these guidelines during the consultation:
- Understand User Context: Ask about their target programming language, agent framework (if any), execution environments (VMs, local containers, physical hardware), and scale requirements.
- Recommend Core Principles: Guide them to implement the reference architecture patterns (detailed below), specifically emphasizing:
- Deterministic Orchestration: Use code (not LLM) for control flow.
- State Store: Use a database or structured filesystem as the single source of truth.
- Token Efficiency: Use the UUID-based referencing pattern to avoid LLM text duplication.
- Custom Environment Integration: Use Custom MCP servers for isolated testing (VMs) or hardware interaction.
- Ensure Schema Consistency: Advise the user to strictly adhere to the inter-stage data contracts defined in schema.json when building their harness.
- Adaptive Design: Help them draft the code/architecture tailored to their specific stack, rather than imposing a rigid template.
- Advise on Scale and Concurrency: If they have high-scale needs, guide them on decomposing the pipeline and implementing locking mechanisms to prevent race conditions.
- Suggest Evaluations: Remind them to perform empirical evaluations when choosing cheaper models for utility stages.
- Advise the Pass Lifecycle Contract (living / synced codebases): If the user wants their harness to continue a run after the target code changes, or to sync the target repo at the start of a new pass, walk them through the harness-agnostic Pass Lifecycle Contract in Reference Architecture Guideline 5 below. Emphasize that this support is opt-in: a harness that does not implement the contract MUST leave
snapshot_pinnedunset, which preserves today's single-snapshot behavior byte-for-byte. When--syncis requested, the harness PINs in the PIN step and passes--snapshot_root/--snapshot_idnormally; Block A (Locator Resolution) is universal across all code-reading stages. - Advise on Semantic Retrieval at Scale: If the user is targeting a large codebase (e.g., thousands of source files, multi-pass campaigns, or multiple teams contributing findings), walk them through the optional semantic retrieval patterns in Reference Architecture Guidelines 6 and 7 below. Emphasize that these are opt-in: they augment the pipeline via a dedicated query skill or MCP tools, but never modify the existing skills' own deterministic logic or fail-safe invariants.
- Advise on SAST Seeding: If the user wants to augment LLM-based discovery with external SAST tool findings (CodeQL, Semgrep, etc.), walk them through the optional SAST seeding pattern in Reference Architecture Guideline 8 below. Emphasize that this is opt-in: it ingests external findings as candidates that must earn their verdict through unchanged downstream gates, and it follows exactly the RAG pattern (provenance-tracked, snapshot-aware, fallback on failure).
- Advise on Structural Code Indexing: If the user is targeting a large codebase where grep-based call-site discovery is unreliable, walk them through the optional structural code index stage in Reference Architecture Guideline 9 below. Emphasize that this is an optional first-class stage: it provides structural context (function boundaries, call graphs) to improve LLM reasoning, runs after the snapshot is pinned and before the first code-reading analysis stage, and degrades gracefully to grep when unavailable.
- Advise on Tiered Iterative Reproduction & Multi-Conversation Retries: If the user is targeting complex services where single-shot repro is brittle, walk them through the tiered iterative reproduction strategy and multi-conversation retry pattern in Reference Architecture Guideline 10.
Reference Architecture Guidelines
Use the following guidelines as your technical reference when advising the user.
Core Principles
- Deterministic Orchestration: Do not let the LLM decide the control flow of the pipeline. Use a programmatic harness to call skills sequentially or in parallel.
- State on Disk / Database: Use the filesystem (
workspace/findings/*.json) or a database as the single source of truth. Skills should read from and write to this store. For horizontal scaling, recommend a centralized database. - Deterministic Reporting: Treat findings as internal state. Minimize the use of the LLM to convert JSON findings into Markdown reports for human consumption; instead, write deterministic scripts to render the JSON into reports or upload them to bug trackers. Only use an LLM for non-deterministic subsets of this (like textual synthesis), such as by providing an executive summary if necessary.
- Token Efficiency & Reusable Deterministic Tools: Structure LLM outputs to return only the minimum necessary information (e.g., UUIDs, status codes). Do not force the LLM to write one-off scripts (e.g., Python or bash) on the fly for routine tasks like appending JSON fields or merging findings, as this wastes reasoning tokens. Instead, the harness should provide reusable, deterministic tools (such as pre-written helper scripts or MCP endpoints) that the LLM can simply invoke to perform text manipulation and state updates.
- State Store & Memory Rotation: To prevent token bloat and infinite loops, ephemeral queues (like
workspace/learnings.jsonl) must be rotated. Upon successful completion and verification of the Knowledge Base synthesis stage, the orchestrator should ensure the archive directory exists (e.g.,mkdir -p workspace/archive/learnings/) and moveworkspace/learnings.jsonlto a numbered archive (e.g.,workspace/archive/learnings/learnings_pass_${N}_${X}.jsonlwhere${N}is the loop pass and${X}is a sub-index). If the synthesis fails, the active queue must be left intact to prevent data loss.
Architectural Overview
More from google
Use this skill in a project
Open any RiverX project, search the Skills panel for google/mantis/mantis-pipeline-adapter, and install it in one click.
