rsyslog/AGENTS.md
Rainer Gerhards 2f4ebd9a99 core: streamline agent instructions with modular skills
Modernize the rsyslog contribution workflow for AI agents to
improve policy compliance and reduce instruction verbosity.

Impact: Repository-wide reduction in AGENTS.md bloat.

Before: Fragmented and redundant procedural instructions in AGENTS.md.
After: Modular skills in .agent/skills/ with streamlined subtree guides.

This change encapsulates build, test, documentation, module authoring,
and commit policies into reusable skills. It introduces:
- A specialized AI memory lifecycle auditor.
- A boilerplate snippets library.
- The 'rsyslog_doc_dist' skill for doc/Makefile.am synchronization.
- YAML frontmatter 'triggers' for automatic skill activation.

The workflow is further optimized to skip redundant builds after stylistc
code formatting, ensuring faster iteration for AI-led development.

AI-Agent: Antigravity 2026-01
2026-01-23 13:52:13 +01:00

2.8 KiB
Raw Blame History

AGENTS.md rsyslog Repository Agent Guide

This file defines the high-level roadmap for AI assistants to understand and contribute to the rsyslog codebase. Technical workflows are now modularized into Skills.

AI Agent Skills

To ensure consistency and high-quality contributions, AI agents SHOULD use the following standardized skills located in .agent/skills/:

Skill Purpose
rsyslog_build Environment setup and incremental parallel builds.
rsyslog_test Standardized validation and debugging via diag.sh.
rsyslog_doc Structured, RAG-optimized documentation and metadata.
rsyslog_doc_dist Syncing documentation files in doc/Makefile.am.
rsyslog_module Technical patterns for concurrency and module authoring.
rsyslog_commit Compliant commit messages and branching policies.

Agent Quick Start: The "Happy Path"

Follow these three steps for a typical development task:

  1. Build: Use the rsyslog_build skill to set up and compile.
  2. Validate: Use the rsyslog_test skill to run relevant shell tests.
  3. Commit: Use the rsyslog_commit skill to format code and draft your message.
    • Tip: You do NOT need to re-run your build/test cycle after formatting if you already validated the code immediately before.

Repository Overview

  • Primary Language: C (v8 worker model)
  • Architecture: Microkernel core (runtime/) + Loadable Plugins (plugins/)
  • Metadata: Every module directory contains MODULE_METADATA.yaml.
  • Knowledge Base: doc/ai/ contains canonical patterns for RAG ingestion.

Context Discovery (Subtree Guides)

Each major subtree contains a specialized AGENTS.md that points to area-specific context and requirements:

Agent Chat Keywords

  • SETUP: Triggers the rsyslog_build setup workflow.
  • BUILD: Triggers the rsyslog_build incremental build workflow.
  • TEST: Triggers the rsyslog_test validation workflow.
  • SUMMARIZE: Generates PR and commit summaries using rsyslog_commit templates.
  • FINISH: Final review of code and style before conclusion.

For human-facing guidelines, see CONTRIBUTING.md and DEVELOPING.md.