custom-engine-implementation

Add and test declarative behavior-defined agentic engines in the gh-aw Go codebase.

5.1k|530|Updated Aug 12, 2025
One-click install
npx skills add https://github.com/github/gh-aw --skill custom-engine-implementation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: custom-engine-implementation
Source: https://github.com/github/gh-aw/tree/main/.github/skills/custom-engine-implementation
Command: npx skills add https://github.com/github/gh-aw --skill custom-engine-implementation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adding a new AI agentic engine to gh-aw requires choosing between a declarative shared engine definition, extending the behavior-defined runtime, or writing a dedicated Go engine, and each path involves catalog registration, smoke workflows, schema updates, and focused tests that are easy to miss.

Core Features & Use Cases

  • Implementation Path Selection: Decision table for choosing between a shared Markdown engine definition, extending the declarative behavior model, or a dedicated Go engine registered in pkg/workflow/agentic_engine.go.
  • Declarative Engine Authoring: Step-by-step guidance for creating .github/workflows/shared/<engine>.md definitions with pinned installation, execution, MCP, network, and log-parsing behaviors, plus engines.json registration and smoke workflows.
  • Testing and Validation Guidance: Maps each changed behavior to the correct Go test files and prescribes make build, make recompile, and agent progress-report commands.
  • Use Case: When adding support for a new AI coding CLI to gh-aw, follow this Skill to declare its installation and execution behaviors, register it in the engine catalog, add a smoke workflow, and run the matching focused tests.

Quick Start

Ask the agent to add a new agentic engine definition for your CLI tool to gh-aw following the custom engine implementation guidelines.

Frequently Asked Questions about custom-engine-implementation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new agentic engine to gh-aw?

Create a shared engine definition in `.github/workflows/shared/<engine>.md` declaring installation, execution, and provider behaviors, then register it in `.github/aw/engines.json`. Add a smoke workflow, update the engines documentation, and run `make recompile` to generate the lock file.

When should I write a dedicated Go engine instead of a shared definition?

Only add a dedicated Go engine when the shared behavior-defined runtime fundamentally cannot run the engine. Prefer a declarative definition first, and extend the behavior model only when a reusable capability is missing from existing installation, execution, harness, or adapter fields.

Does a shared engine definition need to be registered in NewEngineRegistry?

No. Imported behavior-defined engines are registered dynamically through `.github/aw/engines.json`, so they must not be added to `NewEngineRegistry()` in `pkg/workflow/agentic_engine.go`. Only dedicated Go engines are registered there.

Which tests should I run after changing engine behavior code?

Match tests to the changed area: harness and MCP changes use `behavior_defined_engine_harness_test.go`, log parsing uses `behavior_defined_engine_log_parser_test.go`, and catalog changes use `engine_definition_test.go`. Run `make build` and `make fmt` after Go changes and `make recompile` after workflow Markdown changes.

What are the security requirements for engine harness scripts?

Inline JavaScript in harnesses, adapters, and log parsers is treated as production code: avoid shell interpolation, validate paths and child-process arguments, preserve nonzero exit codes, and never print secret values. Enabling package lifecycle scripts requires a pinned version and an explicit reason.