twig-command-dev

Defines standards and audit checklists for developing and reviewing twig CLI commands.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/PolyphonyRequiem/twig --skill twig-command-dev-polyphonyrequiem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: twig-command-dev
Source: https://github.com/PolyphonyRequiem/twig/tree/main/.github/skills/twig-command-dev
Command: npx skills add https://github.com/PolyphonyRequiem/twig --skill twig-command-dev-polyphonyrequiem

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Ensuring every twig CLI command meets consistent quality standards—output formats, help text, error handling, telemetry, testing, and MCP parity—is hard to enforce manually across dozens of commands. This Skill provides a single authoritative checklist and set of rules for creating, modifying, reviewing, and auditing commands. ## Core Features & Use Cases - Universal Command Standards: Enforces nine requirements including --output format support (human, json, minimal, ids), thorough --help text with examples, consistent exit codes (0/1/2), telemetry instrumentation, AOT-safe JSON serialization, and dedicated test coverage. - Command Audit Checklist: Provides a ready-to-use verification checklist for PR reviews and quality audits, plus a catalog of known gaps (missing telemetry, tests, and MCP tools) as of v0.57.0. - Use Case: When reviewing a PR that adds a new twig query command, load this Skill to verify the command supports all output formats, registers examples in CommandExamples.cs, instruments telemetry without sensitive data, and includes tests covering happy paths and error cases. ## Quick Start Ask the AI to audit the twig state command against the command development standards and list any missing requirements.

Frequently Asked Questions about twig-command-dev

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

FAQPage Schema
How do I create a new twig CLI command that meets project standards?

Create the command class in src/Twig/Commands/, register it in Program.cs with a [Command] attribute and XML doc comments, add examples to CommandExamples.cs, support human/json/minimal output formats, instrument telemetry, and add tests in tests/Twig.Cli.Tests/Commands/.

What output formats must twig CLI commands support?

All non-interactive commands must support human (rich ANSI tables), json (structured machine-readable), and minimal (tab-separated) formats. List-like commands such as query and workspace must also support the ids format for piping bare numeric IDs.

What exit codes should a twig command return?

Return 0 for success, 1 for runtime errors like ADO failures or conflicts, and 2 for usage errors such as invalid arguments. Errors must be written to stderr using fmt.FormatError(), never as raw strings.

What telemetry data is allowed in twig command instrumentation?

Allowed properties are command name, exit_code, output_format, twig_version, os_platform, duration, and generic counts. Never send organization, project, or user names, work item IDs, titles, field names, area paths, or iteration paths.

Why does JSON serialization fail in twig commands with Native AOT?

Because PublishAot=true disables reflection-based serialization, every type used with JsonSerializer.Serialize must be registered with a [JsonSerializable] attribute on TwigJsonContext. Commands using manual Utf8JsonWriter output are less affected.

Which twig commands need MCP tool equivalents?

Commands useful to AI agents for reading, mutating, or navigating work items should have MCP tools in src/Twig.Mcp/. Context and mutation commands already have them; seed commands, query, and process are known gaps. Human-only commands like upgrade and web do not need MCP parity.