Codex

corpus-health

Report on research corpus health, completeness, and integrity

104 stars

Best use case

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

It is a strong fit for teams already working in Codex.

Report on research corpus health, completeness, and integrity

Teams using corpus-health 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/corpus-health/SKILL.md --create-dirs "https://raw.githubusercontent.com/jmagly/aiwg/main/.agents/skills/corpus-health/SKILL.md"

Manual Installation

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

How corpus-health Compares

Feature / Agentcorpus-healthStandard Approach
Platform SupportCodexLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Report on research corpus health, completeness, and integrity

Which AI agents support this skill?

This skill is designed for Codex.

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

# Corpus Health Command

Assess the health and completeness of the research corpus at `.aiwg/research/`.

## Kernel Delegation

> As of ADR-021, `corpus-health` delegates structural lint to the semantic memory kernel.

**Delegation pattern**:
1. `corpus-health` retains its research-specific health-check UX
2. Delegates to `memory-lint --consumer research-complete --severity warning`
3. Research-specific layers remain in this wrapper:
   - GRADE coverage check
   - Citation completeness validation
   - Research corpus-specific metrics

**Backward compatibility**: No UX changes.

@agentic/code/addons/semantic-memory/skills/memory-lint/SKILL.md

## Instructions

When invoked, analyze the research corpus and report on its health:

1. **Scan Corpus Structure**
   - Count sources in `.aiwg/research/sources/`
   - Count findings in `.aiwg/research/findings/`
   - Count quality assessments in `.aiwg/research/quality-assessments/`
   - Count provenance records in `.aiwg/research/provenance/records/`

2. **Frontmatter Completeness**
   - Check each source for required frontmatter per @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/schemas/research/frontmatter-schema.yaml
   - Report sources missing: ref_id, title, authors, year, DOI, key_findings
   - Calculate completeness percentage

3. **PDF Integrity**
   - Check `.aiwg/research/pdfs/` for downloaded papers
   - Verify SHA-256 checksums against frontmatter `pdf_hash` values
   - Report missing PDFs and checksum mismatches

4. **Cross-Reference Integrity**
   - Verify all REF-XXX in findings reference valid sources
   - Check for orphaned findings (no source reference)
   - Check for orphaned sources (never cited in any artifact)

5. **Staleness Check**
   - Flag sources with `last_verified` > 90 days old
   - Flag DOIs that haven't been re-verified
   - Report sources needing refresh

6. **Evidence Gaps**
   - Load `.aiwg/research/TODO.md` for planned research
   - Count unresolved evidence gaps
   - Report gap severity distribution

7. **Generate Health Report**
   - Summary dashboard with pass/warn/fail indicators
   - Detailed findings per category
   - Action items prioritized by severity

## Arguments

- `--brief` - Show summary only
- `--fix` - Attempt to fix frontmatter gaps and regenerate checksums
- `--report` - Save report to `.aiwg/reports/corpus-health.md`

## References

- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/schemas/research/frontmatter-schema.yaml - Frontmatter requirements
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/schemas/research/fixity-manifest.yaml - Fixity verification
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/rules/research-metadata.md - Research metadata rules
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/agents/citation-verifier.md - Citation Verifier agent

Related Skills

workspace-health

104
from jmagly/aiwg

Assess workspace alignment and recommend cleanup or realignment actions at key lifecycle transition points

Codex

project-health-check

104
from jmagly/aiwg

Analyze overall project health and metrics

Codex

kb-health

104
from jmagly/aiwg

Lint and health-check the knowledge base. Finds orphan pages, missing cross-references, stale claims, broken wiki-links, and regenerates the index.

Codex

corpus-snapshot

104
from jmagly/aiwg

Generate a comprehensive corpus snapshot report from template, computing all metrics (dimensions, topology, degree distribution, delta from previous) and assisting with analysis sections (clusters, chains, gaps).

Codex

corpus-index-build

104
from jmagly/aiwg

Build graph indices (by-topic, by-year, authors, citation-network) from corpus state using definitions in .aiwg/config.yaml. Replaces manual 3-agent dispatch with a single command.

Codex

corpus-export

104
from jmagly/aiwg

Package corpus subsets as distribution archives. Select papers by cluster, topic, REF range, or custom filter; bundle PDFs, analysis docs, citation sidecars, web sources, and BibTeX into a tar.gz with manifest.

Codex

codebase-health

104
from jmagly/aiwg

Scan source code and report agent-readiness metrics with actionable recommendations

Codex

aiwg-orchestrate

104
from jmagly/aiwg

Route structured artifact work to AIWG workflows via MCP with zero parent context cost

venv-manager

104
from jmagly/aiwg

Create, manage, and validate Python virtual environments. Use for project isolation and dependency management.

pytest-runner

104
from jmagly/aiwg

Execute Python tests with pytest, supporting fixtures, markers, coverage, and parallel execution. Use for Python test automation.

vitest-runner

104
from jmagly/aiwg

Execute JavaScript/TypeScript tests with Vitest, supporting coverage, watch mode, and parallel execution. Use for JS/TS test automation.

eslint-checker

104
from jmagly/aiwg

Run ESLint for JavaScript/TypeScript code quality and style enforcement. Use for static analysis and auto-fixing.