Error in user YAML: (<unknown>): did not find expected key while parsing a block mapping at line 1 column 1
---
title: "Agent Includes Directory"
description: "Shared utility modules for LightSpeedWP automation agents"
version: "1.0"
last_updated: "2026-09-22""
file_type: "documentation"
---
This directory contains shared utility modules used by multiple automation agents across the LightSpeedWP organization. These are NOT standalone agents themselves, but reusable libraries that provide common functionality.
- Modularity: Reusable code shared across multiple agents
- Maintainability: Single source of truth for common operations
- Testability: Centralized testing of shared functionality
- Consistency: Standardized approaches to common tasks
Files in this directory are utilities/libraries, not standalone agents. They should:
- Be named descriptively (e.g.,
report-writer.js,label-utils.js) - Export functions that other modules can import
- Have corresponding test files in
__tests__/ - Be documented with JSDoc comments
Files in the parent agents/ directory are executable agents that:
- Have a main execution function
- Can be run directly via workflows
- Orchestrate multiple utilities from this includes folder
- Have corresponding
.agent.mdspecification files
| Utility | Purpose | Used By |
|---|---|---|
report-writer.js |
Generate Markdown reports for labeling runs | labeling.agent.js, workflows |
label-utils.js |
Label manipulation and validation | Multiple labeling agents |
label-lookup.js |
Label alias resolution and canonicalization | labeling.agent.js |
label-reporting.js |
Label analytics and reporting | Labeling workflows |
status-enforcer.js |
One-hot label enforcement | labeling.agent.js |
readmeUtils.js |
README file discovery and updates | manage-readmes.agent.js |
badgeUtils.js |
Badge generation and management | meta.agent.js |
header-footer.js |
Footer generation and insertion | meta.agent.js |
yaml-parser.js |
YAML configuration parsing | Multiple agents |
yaml-validator.js |
Schema validation for YAML files | Validation workflows |
// In an agent file: ../my-agent.agent.js
const { generateReport } = require("./includes/report-writer.js");
const { findReadmeFiles } = require("./includes/readmeUtils.js");
async function run() {
const readmes = findReadmeFiles(".");
// ... process readmes
const report = generateReport(telemetryData);
console.log(report);
}Each utility should have comprehensive tests in __tests__/:
# Run all utility tests
npm run test:js
# Run specific utility tests
jest includes/__tests__/report-writer.test.jsWhen creating a new shared utility:
- Name it descriptively without
.agent.jssuffix - Add JSDoc documentation for all exported functions
- Create tests in
__tests__/[name].test.js - Update this README with the new utility
- Export functions using CommonJS or ES modules consistently
includes/
├── __tests__/ # Test files for utilities
│ ├── report-writer.test.js
│ ├── label-utils.test.js
│ └── ...
├── report-writer.js # Report generation utilities
├── label-utils.js # Label manipulation utilities
├── readmeUtils.js # README file utilities
├── badgeUtils.js # Badge generation utilities
└── README.md # This file
- Agent Directory - Main agent index
- Coding Standards
- Quality Assurance
- Automation Governance
Shared utilities for the LightSpeedWP automation ecosystem
Need help? Say hi—work with us.