Skip to content

winapp agents generate — AI Coding Agent Support#333

Open
nmetulev wants to merge 4 commits intomainfrom
nm/agents
Open

winapp agents generate — AI Coding Agent Support#333
nmetulev wants to merge 4 commits intomainfrom
nm/agents

Conversation

@nmetulev
Copy link
Member

@nmetulev nmetulev commented Feb 28, 2026

Closes #269

Description

Adds first-class support for AI coding agents (GitHub Copilot, Claude Code, Cursor, etc.) by generating project-local skill files that teach agents how to use winapp CLI. Also ships a Copilot plugin for the repo itself.

1. winapp agents generate Command

New CLI command that writes SKILL.md files into the project's detected skills directory (.github/skills/, .agents/skills/, or .claude/skills/).

Each skill is a SKILL.md file with YAML frontmatter + hand-written workflow guidance + auto-generated command reference from the CLI binary:

Skill Covers
setup winapp init, winapp restore, winapp tool
package winapp package, winapp launch, winapp tool
identity winapp identity register, winapp identity status, winapp identity associate
signing winapp sign, winapp certificate
manifest winapp manifest new, winapp manifest validate, winapp manifest capabilities
troubleshoot winapp doctor, winapp clean, winapp telemetry, winapp version
frameworks winapp package with framework-specific guidance (Electron, .NET, C++, Flutter, Rust, Tauri)

During winapp init, users are now prompted:

? Generate winapp skills for AI coding agents? [y/n]

Copilot Plugin (.github/plugin/)

Ships a repo-level Copilot plugin with an agent file and the same 7 skills:

.github/plugin/
├── plugin.json
├── agents/
│   └── winapp-cli/
│       └── winapp.agent.md      # system prompt
└── skills/
    └── winapp-cli/
        ├── setup/SKILL.md
        ├── package/SKILL.md
        ├── identity/SKILL.md
        ├── signing/SKILL.md
        ├── manifest/SKILL.md
        ├── troubleshoot/SKILL.md
        └── frameworks/SKILL.md

The agent file (winapp.agent.md) includes:

  • Full command reference with syntax + descriptions
  • Decision tree for common workflows
  • Framework-specific packaging guidance
  • Error diagnosis patterns
  • Critical rules (e.g. "Run winapp --cli-schema for the full CLI reference")

Simplified AI Documentation

Removed redundant docs in favor of the skill-based approach:

  • Deleted docs/llm-context.md (full CLI reference doc — now covered by skills + winapp --cli-schema)
  • Deleted docs/using-with-llms.md (guide — now covered by README section + skills)
  • Merged two README AI sections into a single concise "🤖 Using with AI Coding Agents" section
  • Updated llms.txt with Copilot plugin structure

Type of Change

  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation
  • 🔧 Config/build
  • 🧪 Test update

Checklist

  • New tests added for new functionality (if applicable)
  • Tested locally on Windows
  • Main README.md updated (if applicable)
  • docs/usage.md updated (if CLI commands changed)

Breaking changes

Note: winapp init now includes a skill-generation prompt in interactive mode and generates skills automatically with --use-defaults. Use --no-skills to opt out.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds first-class AI coding agent support to winapp by introducing a new winapp agents generate command that writes SKILL.md files into a project's detected skills directory. It also ships a Copilot CLI plugin with an agent system prompt and 7 skill files. As part of cleanup, the older docs/llm-context.md, docs/using-with-llms.md, and .github/copilot-instructions.md (replaced by AGENTS.md) are removed.

Changes:

  • Adds AgentsCommand / AgentsGenerateCommand and AgentContextService in C# — the core skill file generation feature
  • Integrates skill generation into winapp init with --no-skills opt-out and an interactive prompt
  • Adds .github/plugin/ with a Copilot plugin (agent file + 7 SKILL.md files), updates generation/validation scripts, and replaces older LLM documentation

Reviewed changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/winapp-CLI/WinApp.Cli/Services/AgentContextService.cs New service that reads embedded SKILL.md resources and writes them to the project skills directory
src/winapp-CLI/WinApp.Cli/Services/IAgentContextService.cs New interface + result record for skill generation
src/winapp-CLI/WinApp.Cli/Commands/AgentsCommand.cs New agents parent command
src/winapp-CLI/WinApp.Cli/Commands/AgentsGenerateCommand.cs New agents generate subcommand with --skills-dir and --directory options
src/winapp-CLI/WinApp.Cli/Services/WorkspaceSetupService.cs Integrates skill generation into winapp init flow with prompt and shouldGenerateSkills flag
src/winapp-CLI/WinApp.Cli/Commands/InitCommand.cs Adds --no-skills option
src/winapp-CLI/WinApp.Cli/Helpers/HostBuilderExtensions.cs Registers AgentContextService and the two new commands
src/winapp-CLI/WinApp.Cli/Commands/WinAppRootCommand.cs Adds AgentsCommand to command tree and help grouping
src/winapp-CLI/WinApp.Cli/WinApp.Cli.csproj Embeds .github/plugin/skills/** into the CLI binary
src/winapp-CLI/WinApp.Cli.Tests/AgentContextServiceTests.cs New tests for AgentContextService
.github/plugin/plugin.json New Copilot plugin manifest
.github/plugin/agents/winapp.agent.md New Copilot agent system prompt
.github/plugin/skills/winapp-cli/*/SKILL.md Auto-generated skill files (7 skills)
docs/fragments/skills/winapp-cli/*.md Hand-written skill template fragments
scripts/generate-llm-docs.ps1 Updated to generate SKILL.md files instead of llm-context.md
scripts/validate-llm-docs.ps1 Updated to validate SKILL.md files instead of llm-context.md
docs/cli-schema.json Schema updated with new agents generate command and --no-skills option for init
docs/usage.md Documents new agents generate command and --no-skills flag
README.md / src/winapp-npm/README.md Refreshed AI agent section; lists agents generate
AGENTS.md New repo-level agent instructions, replacing .github/copilot-instructions.md
llms.txt Updated with Copilot plugin structure
docs/llm-context.md Deleted (replaced by skills)
docs/using-with-llms.md Deleted (replaced by skills + README section)
.github/copilot-instructions.md Deleted (replaced by AGENTS.md)
.github/PULL_REQUEST_TEMPLATE.md Adds skill template checklist item
scripts/assets/llm-context-footer.md Deleted (content merged into skill fragments)
scripts/build-cli.ps1 Minor text updates only

@github-actions
Copy link

github-actions bot commented Feb 28, 2026

Build Metrics Report

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 13.70 MB 13.78 MB 📈 +80.5 KB (+0.57%)
CLI (x64) 13.01 MB 13.08 MB 📈 +79.0 KB (+0.59%)
MSIX (ARM64) 5.96 MB 5.99 MB 📈 +22.8 KB (+0.37%)
MSIX (x64) 6.20 MB 6.23 MB 📈 +30.0 KB (+0.47%)
NPM Package 12.14 MB 12.19 MB 📈 +51.1 KB (+0.41%)

Test Results

312 passed, 6 skipped out of 318 tests in 70.1s (+13 tests, +11.6s vs. baseline)

CLI Startup Time

39ms median (x64, winapp --version) · ✅ no change vs. baseline


Updated 2026-03-02 19:10:15 UTC · commit f524eb5 · workflow run

nmetulev and others added 2 commits February 27, 2026 16:37
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: cli should have an option to setup agent.md, skills.md, and/or llm-context.md in project during init

2 participants