Grade on ingest

From jmagly/aiwg · View interactive version

Grade on ingest is an AI agent skill from the GitHub repository jmagly/aiwg. Trigger GRADE quality assessment automatically when new research sources or findings enter the corpus

How to use this skill

Skill file

GRADE-on-Ingest

Automatically triggers GRADE quality assessment when new research sources or findings are added to the corpus.

Triggers

Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):

Purpose

Ensures every research source entering the corpus receives a GRADE quality assessment at ingestion time, preventing unassessed sources from being cited without quality context. Implements the "assess at entry" pattern to maintain corpus-wide quality visibility.

Activation Conditions

This skill activates when:

  1. New file created in .aiwg/research/sources/ or .aiwg/research/findings/
  2. File pattern matches: REF-*.md, *.pdf added to research directories
  3. Agent activity: Any agent writes to research corpus directories
  4. Manual trigger: User requests source assessment

Skip Conditions

Behavior

When a new research source is detected:

  1. Extract metadata
  1. Determine baseline quality
  1. Invoke Quality Assessor
  1. Store assessment
  1. Update corpus index
  1. Report

Agent Orchestration

Integration

With Citation Guard

After assessment completes, Citation Guard uses the GRADE level to enforce hedging:

integration:
  citation_guard:
    action: update_grade_cache
    data: new_assessment

With Research Metadata

Assessment populates fields required by research metadata rules:

integration:
  research_metadata:
    fields_populated:
      - quality_assessment.grade_level
      - quality_assessment.baseline
      - quality_assessment.downgrade_factors
      - quality_assessment.upgrade_factors

With Provenance Tracking

Assessment activity recorded in provenance chain:

integration:
  provenance:
    activity_type: quality_assessment
    agent: quality-assessor

Configuration

skill:
  name: grade-on-ingest
  type: passive
  always_active_for:
    - quality-assessor
    - technical-researcher
    - citation-verifier
  file_triggers:
    - pattern: ".aiwg/research/sources/REF-*.md"
    - pattern: ".aiwg/research/findings/REF-*.md"
  auto_assess: true
  update_frontmatter: false  # Requires --update-frontmatter flag
  notify_on_low_quality: true
  block_on_missing_frontmatter: false

Output Locations

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.