polyphony-cli-developer

Implement polyphony CLI verbs with ConsoleAppFramework patterns and snake_case JSON output.

Updated Apr 29, 2026
One-click install
npx skills add https://github.com/PolyphonyRequiem/polyphony --skill polyphony-cli-developer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: polyphony-cli-developer
Source: https://github.com/PolyphonyRequiem/polyphony/tree/main/.github/skills/polyphony-cli-developer
Command: npx skills add https://github.com/PolyphonyRequiem/polyphony --skill polyphony-cli-developer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps contributors implement polyphony CLI verbs consistently and correctly by enforcing the project’s command shape, DI wiring, JSON serialization rules, exit-code conventions, and required test coverage.

Core Features & Use Cases

  • Consistent verb implementation: Use the ConsoleAppFramework command pattern, primary-constructor DI, and consistent parameter/flag mapping.
  • Correct deterministic output: Emit AOT-safe JSON using PolyphonyJsonContext with mandatory snake_case field names.
  • Production-grade error behavior: Return only the approved exit codes (including consistent not-found error JSON formats) and integrate postcondition/state durability expectations.
  • Test-driven integration: Add/extend CommandTestBase-based verb tests and update JsonOutputContractTests to prevent contract regressions.

Quick Start

Update or add a verb under src/Polyphony/Commands/ and then run the existing command and JSON contract tests to confirm exit code, snake_case JSON, and serializer context behavior match the repo’s conventions.

Frequently Asked Questions about polyphony-cli-developer

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

FAQPage Schema
How do I implement a new CLI verb in a .NET console application using ConsoleAppFramework?

To implement a new CLI verb in a .NET console application, use the ConsoleAppFramework command pattern with primary-constructor dependency injection. Ensure verbs perform routing decisions, validate transitions, and load config while adhering to strict exit-code conventions and deterministic output rules.

How do I ensure AOT-safe JSON serialization with snake_case fields in a .NET CLI?

AOT-safe JSON serialization requires using PolyphonyJsonContext with mandatory snake_case field names for all structured output. This ensures deterministic, trimming-safe serialization when emitting JSON results from CLI commands.

What tests do I need to add when creating a new CLI command?

When creating a new CLI command, you must add or extend CommandTestBase-based verb tests and update JsonOutputContractTests. This validates exit codes, JSON contract compliance, and prevents serialization regressions.

Why does my .NET CLI command return an incorrect exit code?

Incorrect exit codes occur when commands deviate from strict exit-code conventions. You must return only approved exit codes and use the consistent not-found error JSON formats to maintain production-grade error behavior and state durability expectations.

Does this CLI development approach work with Azure DevOps pipelines and dependency injection?

Yes, this CLI development approach integrates seamlessly with Azure DevOps pipelines and dependency injection. It enforces primary-constructor DI registration and AOT-safe serialization, making commands reliable for automated testing and deployment workflows.