infrastructure-overview

Top-level skill for the research template infrastructure layer. Use in Cursor, Claude Code, or similar agents when editing or importing anything under infrastructure/, understanding the two-layer architecture, or wiring build/validation/rendering/publishing. Covers module discovery, import patterns, thin orchestrators, per-subpackage SKILL.md paths, and .cursor/skill_manifest.json (see infrastructure.skills).

13 stars

Best use case

infrastructure-overview is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Top-level skill for the research template infrastructure layer. Use in Cursor, Claude Code, or similar agents when editing or importing anything under infrastructure/, understanding the two-layer architecture, or wiring build/validation/rendering/publishing. Covers module discovery, import patterns, thin orchestrators, per-subpackage SKILL.md paths, and .cursor/skill_manifest.json (see infrastructure.skills).

Teams using infrastructure-overview should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/infrastructure/SKILL.md --create-dirs "https://raw.githubusercontent.com/docxology/template/main/infrastructure/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/infrastructure/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How infrastructure-overview Compares

Feature / Agentinfrastructure-overviewStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Top-level skill for the research template infrastructure layer. Use in Cursor, Claude Code, or similar agents when editing or importing anything under infrastructure/, understanding the two-layer architecture, or wiring build/validation/rendering/publishing. Covers module discovery, import patterns, thin orchestrators, per-subpackage SKILL.md paths, and .cursor/skill_manifest.json (see infrastructure.skills).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Infrastructure Layer

The `infrastructure/` package provides generic, reusable functionality for research projects. All business logic resides here (Layer 1) or in project-specific `src/` (Layer 2). Scripts are thin orchestrators that coordinate these modules.

## Finding skills (Cursor and other agents)

- **Hub:** This file lists every subpackage skill and a module map.
- **Manifest:** `.cursor/skill_manifest.json` lists every skill (`name`, `description`, `path`); regenerate with `uv run python -m infrastructure.skills write`.
- **Search:** `infrastructure/**/SKILL.md` (hub `infrastructure/SKILL.md`, top-level subpackage skills, and nested skills such as `infrastructure/core/telemetry/SKILL.md`, `infrastructure/reference/citation/SKILL.md`, and `infrastructure/search/literature/SKILL.md`).
- **In Cursor:** `@infrastructure/SKILL.md` or `@infrastructure/<module>/SKILL.md` to load context; pair with the matching `AGENTS.md` for API tables.
- **Frontmatter:** Each `SKILL.md` has YAML `name` and `description` for routing (see also the table in `infrastructure/README.md`).

## Module Map

| Module | Purpose | Key Imports |
|--------|---------|-------------|
| `autoresearch/` | Deterministic research plans, stage-gate readiness, artifact/evidence reports | `build_autoresearch_plan`, `validate_autoresearch_plan` |
| `benchmark/` | Deterministic benchmark manifests and public exemplar readiness scoring | `run_benchmark_manifest`, `score_project_against_manifest` |
| `config/` | Repo defaults (`.env.template`, `secure_config.yaml`) | (YAML/dotenv; use `core.config_loader`) |
| `core/` | Logging, config, exceptions, pipeline, progress, retry, security | `get_logger`, `load_config`, `PipelineExecutor` |
| `docker/` | `Dockerfile`, `docker-compose.yml` for container runs | (CLI / `docs/CLOUD_DEPLOY.md`) |
| `validation/` | PDF/Markdown/output validation, link checking, audits | `validate_pdf_rendering`, `validate_markdown`, `verify_output_integrity` |
| `rendering/` | Multi-format output (PDF, HTML, slides) | `RenderManager`, `RenderingConfig` |
| `documentation/` | Figure/image management, markdown integration, glossary | `FigureManager`, `ImageManager`, `MarkdownIntegration` |
| `llm/` | Local LLM integration via Ollama | `LLMClient`, `OllamaClientConfig`, `detect_repetition`, `check_format_compliance` |
| `methods/` | Methods orchestration plans over DAG, manuscript methods, artifacts, and evidence | `build_methods_orchestration_plan`, `validate_methods_orchestration_plan` |
| `orchestration/` | Pipeline CLI, menu, project discovery, stage logging, secure-run wrapper (backs `run.sh`/`secure_run.sh`) | `build_parser`, `PipelineRunner`, `validate_project_slug`, `run_secure_pipeline` |
| `publishing/` | Academic publishing (DOI, citations, Zenodo, arXiv) | `publish_to_zenodo`, `generate_citation_bibtex` |
| `reference/` | BibTeX I/O (read / write / convert) matching `references.bib` syntax | `parse_bibfile`, `render_database`, `paper_to_bibentry` |
| `search/` | Paperclip-style multi-source literature search (arXiv, Crossref, local, Paperclip) | `LiteratureClient`, `SearchQuery`, `ArxivBackend`, `CrossrefBackend` |
| `prose/` | Prose analysis (readability, structure, editorial quality, manuscript reports) | `analyze_manuscript`, `compute_metrics`, `analyze_structure`, `analyze_quality` |
| `reporting/` | Pipeline reports, error aggregation, dashboards | `generate_pipeline_report`, `get_error_aggregator` |
| `scientific/` | Benchmarking, numerical stability, scientific templates | `benchmark_function`, `check_numerical_stability` |
| `project/` | Multi-project discovery and validation | `discover_projects`, `validate_project_structure` |
| `skills/` | Enumerate and parse `SKILL.md`; maintain Cursor manifest | `discover_skills`, `write_skill_manifest` |
| `steganography/` | Cryptographic PDF watermarking and verification | `SteganographyProcessor`, `SteganographyConfig`, `embed_steganography` |
| `core/telemetry/` | Unified pipeline telemetry (stage resources + diagnostics, JSON/text reports) | `TelemetryCollector`, `TelemetryConfig` |

## Import Patterns

```python
# Convenience imports (exported on infrastructure package root)
from infrastructure import get_logger, load_config, TemplateError

# Direct submodule imports (recommended for clarity)
from infrastructure.core import CheckpointManager
from infrastructure.core.pipeline import PipelineExecutor
from infrastructure.rendering import RenderManager
from infrastructure.llm.core.client import LLMClient
from infrastructure.methods import build_methods_orchestration_plan
from infrastructure.validation import validate_markdown, validate_pdf_rendering
from infrastructure.skills import discover_skills

# In project scripts (thin orchestrator pattern)
from infrastructure.core.logging.utils import get_logger
from infrastructure.validation import validate_pdf_rendering
```

## Architecture Principles

1. **Thin Orchestrator Pattern** — Scripts import from infrastructure; never implement business logic
2. **No Mocks Policy** — All tests use real data and computations
3. **Test Coverage** — Infrastructure requires 60%+ coverage
4. **Exception Hierarchy** — All errors extend `TemplateError` from `infrastructure.core.exceptions`
5. **Unified Logging** — Always use `get_logger(__name__)` for consistent output

## Common Workflows

### Running Infrastructure Tests

```bash
uv run pytest tests/infra_tests/ --cov=infrastructure --cov-fail-under=60
```

### Using the Pipeline

```bash
uv run python scripts/execute_pipeline.py --project template_code_project --core-only
```

### Validating Outputs

```bash
uv run python -m infrastructure.validation.cli.main markdown projects/template_code_project/manuscript/
uv run python -m infrastructure.validation.cli.main pdf output/template_code_project/pdf/
```

## Submodule Skills

Each subpackage has a `SKILL.md` (YAML frontmatter + body) for agent discovery—search the repo for `infrastructure/**/SKILL.md` or open paths below:

- `infrastructure/config/SKILL.md` — Repo configuration templates and secure defaults
- `infrastructure/autoresearch/SKILL.md` — Deterministic AutoResearch readiness planning
- `infrastructure/benchmark/SKILL.md` — Deterministic public exemplar benchmark harnesses
- `infrastructure/core/SKILL.md` — Foundation utilities
- `infrastructure/docker/SKILL.md` — Container build and compose
- `infrastructure/doctor/SKILL.md` — Repository diagnostics and audited repairs
- `infrastructure/documentation/SKILL.md` — Figure and doc management
- `infrastructure/llm/SKILL.md` — LLM integration
- `infrastructure/methods/SKILL.md` — Methods orchestration plans
- `infrastructure/orchestration/SKILL.md` — Pipeline CLI, menu, and runner orchestration
- `infrastructure/prose/SKILL.md` — Manuscript prose quality analysis
- `infrastructure/project/SKILL.md` — Project discovery and validation
- `infrastructure/publishing/SKILL.md` — Academic publishing
- `infrastructure/reference/SKILL.md` — Bibliographic reference workflows
- `infrastructure/rendering/SKILL.md` — Output generation
- `infrastructure/reporting/SKILL.md` — Pipeline reporting
- `infrastructure/scientific/SKILL.md` — Scientific computing
- `infrastructure/search/SKILL.md` — Literature discovery and search workflows
- `infrastructure/skills/SKILL.md` — Programmatic skill discovery and manifest I/O
- `infrastructure/steganography/SKILL.md` — Secure PDF post-processing
- `infrastructure/core/telemetry/SKILL.md` — Unified pipeline telemetry (nested under `core/`)
- `infrastructure/validation/SKILL.md` — Quality assurance

Related Skills

infrastructure-validation

13
from docxology/template

Skill for the validation infrastructure module providing PDF validation, markdown validation, output integrity checks, link verification, documentation audits, issue categorization, and repository scanning. Use when validating research outputs, checking document quality, running audits, or verifying cross-references.

infrastructure-steganography

13
from docxology/template

Skill for the steganography infrastructure module providing QR code generation with dynamic mailto links, hash manifests, metadata payloads, and document-wide overlay processing. Use this module to insert opt-in cryptographic and steganographic provenance data onto PDFs.

infrastructure-skills

13
from docxology/template

Programmatic discovery of first-party agent SKILL.md files under configured public repo roots (infrastructure, projects, docs/prompts, and .cursor/skills). Use when enumerating skills, validating .cursor/skill_manifest.json, writing docs/_generated/skills_index.md, checking docs/prompts workflow contracts, or wiring editor automation. Exposes discover_skills, write_skill_manifest, manifest_matches_discovery, and check_skill_contracts.

infrastructure-search-literature

13
from docxology/template

Paperclip-style multi-source literature search across arXiv, Crossref, local JSON corpora, and (opt-in) the Paperclip API. Provides Paper/SearchQuery/SearchResult data models, a LiteratureClient aggregator with per-backend failure isolation, DOI/arXiv-aware deduplication via merge_papers, deterministic JSON caching via SearchCache, an HttpClient protocol for test injection, and a CLI (search/to-bibtex). Use when finding papers by topic, building reading lists, populating references.bib from a query, or replaying a prior search reproducibly.

infrastructure-search

13
from docxology/template

Discovery utilities for academic literature. Currently exposes the `literature` submodule — Paperclip-style multi-source search across arXiv, Crossref, local JSON corpora, and (opt-in) the Paperclip API, with deterministic JSON caching, a `LiteratureClient` aggregator, normalised `Paper` records, and a CLI. Use when the user wants to find papers, build reading lists, populate references.bib from a query, or replay a prior search reproducibly. Designed to host additional discovery workflows without breaking the public API.

infrastructure-scientific

13
from docxology/template

Skill for the scientific infrastructure module providing numerical stability checks, performance benchmarking, scientific documentation generation, implementation validation, and module/workflow templates. Use when benchmarking functions, checking numerical stability, validating scientific implementations, or creating scientific module scaffolds.

infrastructure-reporting

13
from docxology/template

Skill for the reporting infrastructure module providing pipeline reporting, error aggregation, executive summaries, dashboard generation, test reporting, and multi-project reports. Use when generating build reports, aggregating errors, creating visual dashboards, or producing executive summaries across projects.

infrastructure-rendering

13
from docxology/template

Skill for the rendering infrastructure module providing multi-format output generation including PDF manuscripts, HTML web pages, Beamer/Reveal.js slides, and posters. Use when rendering research outputs, converting markdown to PDF, generating slides, or configuring LaTeX rendering.

infrastructure-reference-citation

13
from docxology/template

BibTeX read/write/convert that matches the syntax/semantics of projects/template_code_project/manuscript/references.bib (consumed by Pandoc with --natbib -- see infrastructure/rendering/_pdf_combined_renderer.py). Provides BibEntry/BibDatabase models, parse_bibfile/render_database functions, paper_to_bibentry conversion from literature search results, generate_citation_key in the project's house style (firstauthorlastname+year+firsttitleword), LaTeX-special-character escape helpers, and a CLI (validate/format/convert). Use when reading or writing .bib files, exporting search results to BibTeX, or generating citation keys.

infrastructure-reference

13
from docxology/template

Bibliographic-reference utilities for research projects. Read, write, and convert BibTeX entries that match the syntax/semantics of projects/template_code_project/manuscript/references.bib (consumed by Pandoc with --natbib during PDF render -- see infrastructure/rendering/_pdf_combined_renderer.py). Currently exposes the `citation` submodule (BibTeX I/O + Paper→BibEntry conversion); designed to host additional reference workflows (e.g. CSL-JSON export, ORCID lookups) without breaking the public API.

infrastructure-publishing

13
from docxology/template

Skill for the publishing infrastructure module providing academic publishing workflows including BibTeX CLI citation generation, APA/MLA citation helper functions, DOI management, Zenodo publication, arXiv submission preparation, GitHub releases, and publication readiness validation. Use when publishing research, generating citations, minting DOIs, or preparing submissions.

infrastructure-prose

13
from docxology/template

Prose analysis utilities for research manuscripts and prose-focused projects. Provides readability metrics (Flesch, Flesch-Kincaid, Gunning Fog), heading-outline structural analysis, editorial quality flags (passive voice, hedge words, citation density, long sentences), aggregate ManuscriptReport across a manuscript directory, and a CLI (metrics/outline/quality/report). Use when analyzing manuscripts for readability, building editorial dashboards, validating heading structure, extracting citation keys from prose, or wiring prose-quality gates into the pipeline.