@abarcenas/ai-workflow-template 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/.github/agents/implementation-plan.agent.md +192 -0
  2. package/.github/agents/plan.agent.md +135 -0
  3. package/.github/agents/research-spike.agent.md +204 -0
  4. package/.github/instructions/agent-safety.instructions.md +98 -0
  5. package/.github/instructions/agent-skill.instructions.md +272 -0
  6. package/.github/instructions/agent.instructions.md +1068 -0
  7. package/.github/instructions/ai-prompt-engineering-safety.instructions.md +991 -0
  8. package/.github/instructions/angular.instructions.md +116 -0
  9. package/.github/instructions/context7.instructions.md +109 -0
  10. package/.github/instructions/go.instructions.md +374 -0
  11. package/.github/instructions/html-to-css-guide.instructions.md +104 -0
  12. package/.github/instructions/instructions.instructions.md +264 -0
  13. package/.github/instructions/markdown.instructions.md +51 -0
  14. package/.github/instructions/memory-bank.instructions.md +322 -0
  15. package/.github/instructions/nodejs-vitest.instructions.md +34 -0
  16. package/.github/instructions/playwright-typescript.instructions.md +88 -0
  17. package/.github/instructions/prompt.instructions.md +99 -0
  18. package/.github/instructions/security-owasp.instructions.md +59 -0
  19. package/.github/instructions/shell.instructions.md +132 -0
  20. package/.github/instructions/task-implementation.instructions.md +203 -0
  21. package/.github/instructions/typescript.instructions.md +114 -0
  22. package/.github/prompts/copilot-instructions-blueprint-generator.prompt.md +317 -0
  23. package/.github/prompts/documentation-writer.prompt.md +46 -0
  24. package/.github/prompts/editconfig.prompt.md +64 -0
  25. package/.github/prompts/playwright-explore.prompt.md +39 -0
  26. package/.github/prompts/playwright-generate-test.prompt.md +39 -0
  27. package/.github/skills/agent-governance/SKILL.md +572 -0
  28. package/.github/skills/boost-prompt/SKILL.md +25 -0
  29. package/.github/skills/chrome-devtools/SKILL.md +97 -0
  30. package/.github/skills/context-map/SKILL.md +57 -0
  31. package/.github/skills/conventional-commit/SKILL.md +72 -0
  32. package/.github/skills/create-readme/SKILL.md +21 -0
  33. package/.github/skills/editorconfig/SKILL.md +63 -0
  34. package/.github/skills/gh-cli/SKILL.md +2188 -0
  35. package/.github/skills/git-commit/SKILL.md +124 -0
  36. package/.github/skills/github-issues/SKILL.md +134 -0
  37. package/.github/skills/github-issues/references/templates.md +110 -0
  38. package/.github/skills/microsoft-docs/SKILL.md +114 -0
  39. package/.github/skills/playwright-explore-website/SKILL.md +17 -0
  40. package/.github/skills/playwright-generate-test/SKILL.md +17 -0
  41. package/.github/skills/polygot-test-agent/SKILL.md +171 -0
  42. package/.github/skills/polygot-test-agent/unit-test-genearation.prompt.md +155 -0
  43. package/.github/skills/prompt-builder/SKILL.md +159 -0
  44. package/.github/workflows/npm-publish.yml +25 -0
  45. package/README.md +111 -0
  46. package/package.json +32 -0
  47. package/scripts/bump-version.js +29 -0
  48. package/scripts/sync.js +122 -0
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: git-commit
3
+ description: 'Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping'
4
+ license: MIT
5
+ allowed-tools: Bash
6
+ ---
7
+
8
+ # Git Commit with Conventional Commits
9
+
10
+ ## Overview
11
+
12
+ Create standardized, semantic git commits using the Conventional Commits specification. Analyze the actual diff to determine appropriate type, scope, and message.
13
+
14
+ ## Conventional Commit Format
15
+
16
+ ```
17
+ <type>[optional scope]: <description>
18
+
19
+ [optional body]
20
+
21
+ [optional footer(s)]
22
+ ```
23
+
24
+ ## Commit Types
25
+
26
+ | Type | Purpose |
27
+ | ---------- | ------------------------------ |
28
+ | `feat` | New feature |
29
+ | `fix` | Bug fix |
30
+ | `docs` | Documentation only |
31
+ | `style` | Formatting/style (no logic) |
32
+ | `refactor` | Code refactor (no feature/fix) |
33
+ | `perf` | Performance improvement |
34
+ | `test` | Add/update tests |
35
+ | `build` | Build system/dependencies |
36
+ | `ci` | CI/config changes |
37
+ | `chore` | Maintenance/misc |
38
+ | `revert` | Revert commit |
39
+
40
+ ## Breaking Changes
41
+
42
+ ```
43
+ # Exclamation mark after type/scope
44
+ feat!: remove deprecated endpoint
45
+
46
+ # BREAKING CHANGE footer
47
+ feat: allow config to extend other configs
48
+
49
+ BREAKING CHANGE: `extends` key behavior changed
50
+ ```
51
+
52
+ ## Workflow
53
+
54
+ ### 1. Analyze Diff
55
+
56
+ ```bash
57
+ # If files are staged, use staged diff
58
+ git diff --staged
59
+
60
+ # If nothing staged, use working tree diff
61
+ git diff
62
+
63
+ # Also check status
64
+ git status --porcelain
65
+ ```
66
+
67
+ ### 2. Stage Files (if needed)
68
+
69
+ If nothing is staged or you want to group changes differently:
70
+
71
+ ```bash
72
+ # Stage specific files
73
+ git add path/to/file1 path/to/file2
74
+
75
+ # Stage by pattern
76
+ git add *.test.*
77
+ git add src/components/*
78
+
79
+ # Interactive staging
80
+ git add -p
81
+ ```
82
+
83
+ **Never commit secrets** (.env, credentials.json, private keys).
84
+
85
+ ### 3. Generate Commit Message
86
+
87
+ Analyze the diff to determine:
88
+
89
+ - **Type**: What kind of change is this?
90
+ - **Scope**: What area/module is affected?
91
+ - **Description**: One-line summary of what changed (present tense, imperative mood, <72 chars)
92
+
93
+ ### 4. Execute Commit
94
+
95
+ ```bash
96
+ # Single line
97
+ git commit -m "<type>[scope]: <description>"
98
+
99
+ # Multi-line with body/footer
100
+ git commit -m "$(cat <<'EOF'
101
+ <type>[scope]: <description>
102
+
103
+ <optional body>
104
+
105
+ <optional footer>
106
+ EOF
107
+ )"
108
+ ```
109
+
110
+ ## Best Practices
111
+
112
+ - One logical change per commit
113
+ - Present tense: "add" not "added"
114
+ - Imperative mood: "fix bug" not "fixes bug"
115
+ - Reference issues: `Closes #123`, `Refs #456`
116
+ - Keep description under 72 characters
117
+
118
+ ## Git Safety Protocol
119
+
120
+ - NEVER update git config
121
+ - NEVER run destructive commands (--force, hard reset) without explicit request
122
+ - NEVER skip hooks (--no-verify) unless user asks
123
+ - NEVER force push to main/master
124
+ - If commit fails due to hooks, fix and create NEW commit (don't amend)
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: github-issues
3
+ description: 'Create, update, and manage GitHub issues using MCP tools. Use this skill when users want to create bug reports, feature requests, or task issues, update existing issues, add labels/assignees/milestones, or manage issue workflows. Triggers on requests like "create an issue", "file a bug", "request a feature", "update issue X", or any GitHub issue management task.'
4
+ ---
5
+
6
+ # GitHub Issues
7
+
8
+ Manage GitHub issues using the `@modelcontextprotocol/server-github` MCP server.
9
+
10
+ ## Available MCP Tools
11
+
12
+ | Tool | Purpose |
13
+ | -------------------------------- | ---------------------- |
14
+ | `mcp__github__create_issue` | Create new issues |
15
+ | `mcp__github__update_issue` | Update existing issues |
16
+ | `mcp__github__get_issue` | Fetch issue details |
17
+ | `mcp__github__search_issues` | Search issues |
18
+ | `mcp__github__add_issue_comment` | Add comments |
19
+ | `mcp__github__list_issues` | List repository issues |
20
+
21
+ ## Workflow
22
+
23
+ 1. **Determine action**: Create, update, or query?
24
+ 2. **Gather context**: Get repo info, existing labels, milestones if needed
25
+ 3. **Structure content**: Use appropriate template from [references/templates.md](references/templates.md)
26
+ 4. **Execute**: Call the appropriate MCP tool
27
+ 5. **Confirm**: Report the issue URL to user
28
+
29
+ ## Creating Issues
30
+
31
+ ### Required Parameters
32
+
33
+ ```
34
+ owner: repository owner (org or user)
35
+ repo: repository name
36
+ title: clear, actionable title
37
+ body: structured markdown content
38
+ ```
39
+
40
+ ### Optional Parameters
41
+
42
+ ```
43
+ labels: ["bug", "enhancement", "documentation", ...]
44
+ assignees: ["username1", "username2"]
45
+ milestone: milestone number (integer)
46
+ ```
47
+
48
+ ### Title Guidelines
49
+
50
+ - Start with type prefix when useful: `[Bug]`, `[Feature]`, `[Docs]`
51
+ - Be specific and actionable
52
+ - Keep under 72 characters
53
+ - Examples:
54
+ - `[Bug] Login fails with SSO enabled`
55
+ - `[Feature] Add dark mode support`
56
+ - `Add unit tests for auth module`
57
+
58
+ ### Body Structure
59
+
60
+ Always use the templates in [references/templates.md](references/templates.md). Choose based on issue type:
61
+
62
+ | User Request | Template |
63
+ | ------------------------------- | --------------- |
64
+ | Bug, error, broken, not working | Bug Report |
65
+ | Feature, enhancement, add, new | Feature Request |
66
+ | Task, chore, refactor, update | Task |
67
+
68
+ ## Updating Issues
69
+
70
+ Use `mcp__github__update_issue` with:
71
+
72
+ ```
73
+ owner, repo, issue_number (required)
74
+ title, body, state, labels, assignees, milestone (optional - only changed fields)
75
+ ```
76
+
77
+ State values: `open`, `closed`
78
+
79
+ ## Examples
80
+
81
+ ### Example 1: Bug Report
82
+
83
+ **User**: "Create a bug issue - the login page crashes when using SSO"
84
+
85
+ **Action**: Call `mcp__github__create_issue` with:
86
+
87
+ ```json
88
+ {
89
+ "owner": "github",
90
+ "repo": "awesome-copilot",
91
+ "title": "[Bug] Login page crashes when using SSO",
92
+ "body": "## Description\nThe login page crashes when users attempt to authenticate using SSO.\n\n## Steps to Reproduce\n1. Navigate to login page\n2. Click 'Sign in with SSO'\n3. Page crashes\n\n## Expected Behavior\nSSO authentication should complete and redirect to dashboard.\n\n## Actual Behavior\nPage becomes unresponsive and displays error.\n\n## Environment\n- Browser: [To be filled]\n- OS: [To be filled]\n\n## Additional Context\nReported by user.",
93
+ "labels": ["bug"]
94
+ }
95
+ ```
96
+
97
+ ### Example 2: Feature Request
98
+
99
+ **User**: "Create a feature request for dark mode with high priority"
100
+
101
+ **Action**: Call `mcp__github__create_issue` with:
102
+
103
+ ```json
104
+ {
105
+ "owner": "github",
106
+ "repo": "awesome-copilot",
107
+ "title": "[Feature] Add dark mode support",
108
+ "body": "## Summary\nAdd dark mode theme option for improved user experience and accessibility.\n\n## Motivation\n- Reduces eye strain in low-light environments\n- Increasingly expected by users\n- Improves accessibility\n\n## Proposed Solution\nImplement theme toggle with system preference detection.\n\n## Acceptance Criteria\n- [ ] Toggle switch in settings\n- [ ] Persists user preference\n- [ ] Respects system preference by default\n- [ ] All UI components support both themes\n\n## Alternatives Considered\nNone specified.\n\n## Additional Context\nHigh priority request.",
109
+ "labels": ["enhancement", "high-priority"]
110
+ }
111
+ ```
112
+
113
+ ## Common Labels
114
+
115
+ Use these standard labels when applicable:
116
+
117
+ | Label | Use For |
118
+ | ------------------ | ----------------------------- |
119
+ | `bug` | Something isn't working |
120
+ | `enhancement` | New feature or improvement |
121
+ | `documentation` | Documentation updates |
122
+ | `good first issue` | Good for newcomers |
123
+ | `help wanted` | Extra attention needed |
124
+ | `question` | Further information requested |
125
+ | `wontfix` | Will not be addressed |
126
+ | `duplicate` | Already exists |
127
+ | `high-priority` | Urgent issues |
128
+
129
+ ## Tips
130
+
131
+ - Always confirm the repository context before creating issues
132
+ - Ask for missing critical information rather than guessing
133
+ - Link related issues when known: `Related to #123`
134
+ - For updates, fetch current issue first to preserve unchanged fields
@@ -0,0 +1,110 @@
1
+ # Issue Templates
2
+
3
+ Copy and customize these templates for issue bodies.
4
+
5
+ ## Bug Report Template
6
+
7
+ ```markdown
8
+ ## Description
9
+
10
+ [Clear description of the bug]
11
+
12
+ ## Steps to Reproduce
13
+
14
+ 1. [First step]
15
+ 2. [Second step]
16
+ 3. [And so on...]
17
+
18
+ ## Expected Behavior
19
+
20
+ [What should happen]
21
+
22
+ ## Actual Behavior
23
+
24
+ [What actually happens]
25
+
26
+ ## Environment
27
+
28
+ - Browser: [e.g., Chrome 120]
29
+ - OS: [e.g., macOS 14.0]
30
+ - Version: [e.g., v1.2.3]
31
+
32
+ ## Screenshots/Logs
33
+
34
+ [If applicable]
35
+
36
+ ## Additional Context
37
+
38
+ [Any other relevant information]
39
+ ```
40
+
41
+ ## Feature Request Template
42
+
43
+ ```markdown
44
+ ## Summary
45
+
46
+ [One-line description of the feature]
47
+
48
+ ## Motivation
49
+
50
+ [Why is this feature needed? What problem does it solve?]
51
+
52
+ ## Proposed Solution
53
+
54
+ [How should this feature work?]
55
+
56
+ ## Acceptance Criteria
57
+
58
+ - [ ] [Criterion 1]
59
+ - [ ] [Criterion 2]
60
+ - [ ] [Criterion 3]
61
+
62
+ ## Alternatives Considered
63
+
64
+ [Other approaches considered and why they weren't chosen]
65
+
66
+ ## Additional Context
67
+
68
+ [Mockups, examples, or related issues]
69
+ ```
70
+
71
+ ## Task Template
72
+
73
+ ```markdown
74
+ ## Objective
75
+
76
+ [What needs to be accomplished]
77
+
78
+ ## Details
79
+
80
+ [Detailed description of the work]
81
+
82
+ ## Checklist
83
+
84
+ - [ ] [Subtask 1]
85
+ - [ ] [Subtask 2]
86
+ - [ ] [Subtask 3]
87
+
88
+ ## Dependencies
89
+
90
+ [Any blockers or related work]
91
+
92
+ ## Notes
93
+
94
+ [Additional context or considerations]
95
+ ```
96
+
97
+ ## Minimal Template
98
+
99
+ For simple issues:
100
+
101
+ ```markdown
102
+ ## Description
103
+
104
+ [What and why]
105
+
106
+ ## Tasks
107
+
108
+ - [ ] [Task 1]
109
+ - [ ] [Task 2]
110
+ ```
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: microsoft-docs
3
+ description: "Query official Microsoft documentation to find concepts, tutorials, and code examples across Azure, .NET, Agent Framework, Aspire, VS Code, GitHub, and more. Uses Microsoft Learn MCP as the default, with Context7 and Aspire MCP for content that lives outside learn.microsoft.com."
4
+ ---
5
+
6
+ # Microsoft Docs
7
+
8
+ Research skill for the Microsoft technology ecosystem. Covers learn.microsoft.com and documentation that lives outside it (VS Code, GitHub, Aspire, Agent Framework repos).
9
+
10
+ ---
11
+
12
+ ## Default: Microsoft Learn MCP
13
+
14
+ Use these tools for **everything on learn.microsoft.com** — Azure, .NET, M365, Power Platform, Agent Framework, Semantic Kernel, Windows, and more. This is the primary tool for the vast majority of Microsoft documentation queries.
15
+
16
+ | Tool | Purpose |
17
+ | ------------------------------ | ------------------------------------------------------------------------------------------------------- |
18
+ | `microsoft_docs_search` | Search learn.microsoft.com — concepts, guides, tutorials, configuration |
19
+ | `microsoft_code_sample_search` | Find working code snippets from Learn docs. Pass `language` (`python`, `csharp`, etc.) for best results |
20
+ | `microsoft_docs_fetch` | Get full page content from a specific URL (when search excerpts aren't enough) |
21
+
22
+ Use `microsoft_docs_fetch` after search when you need complete tutorials, all config options, or when search excerpts are truncated.
23
+
24
+ ---
25
+
26
+ ## Exceptions: When to Use Other Tools
27
+
28
+ The following categories live **outside** learn.microsoft.com. Use the specified tool instead.
29
+
30
+ ### .NET Aspire — Use Aspire MCP Server (preferred) or Context7
31
+
32
+ Aspire docs live on **aspire.dev**, not Learn. The best tool depends on your Aspire CLI version:
33
+
34
+ **CLI 13.2+** (recommended) — The Aspire MCP server includes built-in docs search tools:
35
+
36
+ | MCP Tool | Description |
37
+ | ------------- | ------------------------------------------------- |
38
+ | `list_docs` | Lists all available documentation from aspire.dev |
39
+ | `search_docs` | Weighted lexical search across aspire.dev content |
40
+ | `get_doc` | Retrieves a specific document by slug |
41
+
42
+ These ship in Aspire CLI 13.2 ([PR #14028](https://github.com/dotnet/aspire/pull/14028)). To update: `aspire update --self --channel daily`. Ref: https://davidpine.dev/posts/aspire-docs-mcp-tools/
43
+
44
+ **CLI 13.1** — The MCP server provides integration lookup (`list_integrations`, `get_integration_docs`) but **not** docs search. Fall back to Context7:
45
+
46
+ | Library ID | Use for |
47
+ | -------------------------- | --------------------------------------------------------- |
48
+ | `/microsoft/aspire.dev` | Primary — guides, integrations, CLI reference, deployment |
49
+ | `/dotnet/aspire` | Runtime source — API internals, implementation details |
50
+ | `/communitytoolkit/aspire` | Community integrations — Go, Java, Node.js, Ollama |
51
+
52
+ ### VS Code — Use Context7
53
+
54
+ VS Code docs live on **code.visualstudio.com**, not Learn.
55
+
56
+ | Library ID | Use for |
57
+ | --------------------------------- | ------------------------------------------------------------------ |
58
+ | `/websites/code_visualstudio` | User docs — settings, features, debugging, remote dev |
59
+ | `/websites/code_visualstudio_api` | Extension API — webviews, TreeViews, commands, contribution points |
60
+
61
+ ### GitHub — Use Context7
62
+
63
+ GitHub docs live on **docs.github.com** and **cli.github.com**.
64
+
65
+ | Library ID | Use for |
66
+ | ---------------------- | --------------------------------------------- |
67
+ | `/websites/github_en` | Actions, API, repos, security, admin, Copilot |
68
+ | `/websites/cli_github` | GitHub CLI (`gh`) commands and flags |
69
+
70
+ ### Agent Framework — Use Learn MCP + Context7
71
+
72
+ Agent Framework tutorials are on learn.microsoft.com (use `microsoft_docs_search`), but the **GitHub repo** has API-level detail that is often ahead of published docs — particularly DevUI REST API reference, CLI options, and .NET integration.
73
+
74
+ | Library ID | Use for |
75
+ | ------------------------------------------------- | ------------------------------------------------------------------------------ |
76
+ | `/websites/learn_microsoft_en-us_agent-framework` | Tutorials — DevUI guides, tracing, workflow orchestration |
77
+ | `/microsoft/agent-framework` | API detail — DevUI REST endpoints, CLI flags, auth, .NET `AddDevUI`/`MapDevUI` |
78
+
79
+ **DevUI tip:** Query the Learn website source for how-to guides, then the repo source for API-level specifics (endpoint schemas, proxy config, auth tokens).
80
+
81
+ ---
82
+
83
+ ## Context7 Setup
84
+
85
+ For any Context7 query, resolve the library ID first (one-time per session):
86
+
87
+ 1. Call `mcp_context7_resolve-library-id` with the technology name
88
+ 2. Call `mcp_context7_query-docs` with the returned library ID and a specific query
89
+
90
+ ---
91
+
92
+ ## Writing Effective Queries
93
+
94
+ Be specific — include version, intent, and language:
95
+
96
+ ```
97
+ # ❌ Too broad
98
+ "Azure Functions"
99
+ "agent framework"
100
+
101
+ # ✅ Specific
102
+ "Azure Functions Python v2 programming model"
103
+ "Cosmos DB partition key design best practices"
104
+ "GitHub Actions workflow_dispatch inputs matrix strategy"
105
+ "Aspire AddUvicornApp Python FastAPI integration"
106
+ "DevUI serve agents tracing OpenTelemetry directory discovery"
107
+ "Agent Framework workflow conditional edges branching handoff"
108
+ ```
109
+
110
+ Include context:
111
+
112
+ - **Version** when relevant (`.NET 8`, `Aspire 13`, `VS Code 1.96`)
113
+ - **Task intent** (`quickstart`, `tutorial`, `overview`, `limits`, `API reference`)
114
+ - **Language** for polyglot docs (`Python`, `TypeScript`, `C#`)
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: playwright-explore-website
3
+ description: "Website exploration for testing using Playwright MCP"
4
+ ---
5
+
6
+ # Website Exploration for Testing
7
+
8
+ Your goal is to explore the website and identify key functionalities.
9
+
10
+ ## Specific Instructions
11
+
12
+ 1. Navigate to the provided URL using the Playwright MCP Server. If no URL is provided, ask the user to provide one.
13
+ 2. Identify and interact with 3-5 core features or user flows.
14
+ 3. Document the user interactions, relevant UI elements (and their locators), and the expected outcomes.
15
+ 4. Close the browser context upon completion.
16
+ 5. Provide a concise summary of your findings.
17
+ 6. Propose and generate test cases based on the exploration.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: playwright-generate-test
3
+ description: "Generate a Playwright test based on a scenario using Playwright MCP"
4
+ ---
5
+
6
+ # Test Generation with Playwright MCP
7
+
8
+ Your goal is to generate a Playwright test based on the provided scenario after completing all prescribed steps.
9
+
10
+ ## Specific Instructions
11
+
12
+ - You are given a scenario, and you need to generate a playwright test for it. If the user does not provide a scenario, you will ask them to provide one.
13
+ - DO NOT generate test code prematurely or based solely on the scenario without completing all prescribed steps.
14
+ - DO run steps one by one using the tools provided by the Playwright MCP.
15
+ - Only after all steps are completed, emit a Playwright TypeScript test that uses `@playwright/test` based on message history
16
+ - Save generated test file in the tests directory
17
+ - Execute the test file and iterate until the test passes
@@ -0,0 +1,171 @@
1
+ ---
2
+ name: polyglot-test-agent
3
+ description: "Generates comprehensive, workable unit tests for any programming language using a multi-agent pipeline. Use when asked to generate tests, write unit tests, improve test coverage, add test coverage, create test files, or test a codebase. Supports C#, TypeScript, JavaScript, Python, Go, Rust, Java, and more. Orchestrates research, planning, and implementation phases to produce tests that compile, pass, and follow project conventions."
4
+ ---
5
+
6
+ # Polyglot Test Generation Skill
7
+
8
+ An AI-powered skill that generates comprehensive, workable unit tests for any programming language using a coordinated multi-agent pipeline.
9
+
10
+ ## When to Use This Skill
11
+
12
+ Use this skill when you need to:
13
+
14
+ - Generate unit tests for an entire project or specific files
15
+ - Improve test coverage for existing codebases
16
+ - Create test files that follow project conventions
17
+ - Write tests that actually compile and pass
18
+ - Add tests for new features or untested code
19
+
20
+ ## How It Works
21
+
22
+ This skill coordinates multiple specialized agents in a **Research → Plan → Implement** pipeline:
23
+
24
+ ### Pipeline Overview
25
+
26
+ ```
27
+ ┌─────────────────────────────────────────────────────────────┐
28
+ │ TEST GENERATOR │
29
+ │ Coordinates the full pipeline and manages state │
30
+ └─────────────────────┬───────────────────────────────────────┘
31
+ │
32
+ ┌─────────────┼─────────────┐
33
+ ▼ ▼ ▼
34
+ ┌───────────┐ ┌───────────┐ ┌───────────────┐
35
+ │ RESEARCHER│ │ PLANNER │ │ IMPLEMENTER │
36
+ │ │ │ │ │ │
37
+ │ Analyzes │ │ Creates │ │ Writes tests │
38
+ │ codebase │→ │ phased │→ │ per phase │
39
+ │ │ │ plan │ │ │
40
+ └───────────┘ └───────────┘ └───────┬───────┘
41
+ │
42
+ ┌─────────┬───────┼───────────┐
43
+ ▼ ▼ ▼ ▼
44
+ ┌─────────┐ ┌───────┐ ┌───────┐ ┌───────┐
45
+ │ BUILDER │ │TESTER │ │ FIXER │ │LINTER │
46
+ │ │ │ │ │ │ │ │
47
+ │ Compiles│ │ Runs │ │ Fixes │ │Formats│
48
+ │ code │ │ tests │ │ errors│ │ code │
49
+ └─────────┘ └───────┘ └───────┘ └───────┘
50
+ ```
51
+
52
+ ## Step-by-Step Instructions
53
+
54
+ ### Step 1: Determine the User Request
55
+
56
+ Make sure you understand what user is asking and for what scope.
57
+ When the user does not express strong requirements for test style, coverage goals, or conventions, source the guidelines from [unit-test-generation.prompt.md](unit-test-generation.prompt.md). This prompt provides best practices for discovering conventions, parameterization strategies, coverage goals (aim for 80%), and language-specific patterns.
58
+
59
+ ### Step 2: Invoke the Test Generator
60
+
61
+ Start by calling the `polyglot-test-generator` agent with your test generation request:
62
+
63
+ ```
64
+ Generate unit tests for [path or description of what to test], following the [unit-test-generation.prompt.md](unit-test-generation.prompt.md) guidelines
65
+ ```
66
+
67
+ The Test Generator will manage the entire pipeline automatically.
68
+
69
+ ### Step 3: Research Phase (Automatic)
70
+
71
+ The `polyglot-test-researcher` agent analyzes your codebase to understand:
72
+
73
+ - **Language & Framework**: Detects C#, TypeScript, Python, Go, Rust, Java, etc.
74
+ - **Testing Framework**: Identifies MSTest, xUnit, Jest, pytest, go test, etc.
75
+ - **Project Structure**: Maps source files, existing tests, and dependencies
76
+ - **Build Commands**: Discovers how to build and test the project
77
+
78
+ Output: `.testagent/research.md`
79
+
80
+ ### Step 4: Planning Phase (Automatic)
81
+
82
+ The `polyglot-test-planner` agent creates a structured implementation plan:
83
+
84
+ - Groups files into logical phases (2-5 phases typical)
85
+ - Prioritizes by complexity and dependencies
86
+ - Specifies test cases for each file
87
+ - Defines success criteria per phase
88
+
89
+ Output: `.testagent/plan.md`
90
+
91
+ ### Step 5: Implementation Phase (Automatic)
92
+
93
+ The `polyglot-test-implementer` agent executes each phase sequentially:
94
+
95
+ 1. **Read** source files to understand the API
96
+ 2. **Write** test files following project patterns
97
+ 3. **Build** using the `polyglot-test-builder` subagent to verify compilation
98
+ 4. **Test** using the `polyglot-test-tester` subagent to verify tests pass
99
+ 5. **Fix** using the `polyglot-test-fixer` subagent if errors occur
100
+ 6. **Lint** using the `polyglot-test-linter` subagent for code formatting
101
+
102
+ Each phase completes before the next begins, ensuring incremental progress.
103
+
104
+ ### Coverage Types
105
+
106
+ - **Happy path**: Valid inputs produce expected outputs
107
+ - **Edge cases**: Empty values, boundaries, special characters
108
+ - **Error cases**: Invalid inputs, null handling, exceptions
109
+
110
+ ## State Management
111
+
112
+ All pipeline state is stored in `.testagent/` folder:
113
+
114
+ | File | Purpose |
115
+ | ------------------------ | ---------------------------- |
116
+ | `.testagent/research.md` | Codebase analysis results |
117
+ | `.testagent/plan.md` | Phased implementation plan |
118
+ | `.testagent/status.md` | Progress tracking (optional) |
119
+
120
+ ## Examples
121
+
122
+ ### Example 1: Full Project Testing
123
+
124
+ ```
125
+ Generate unit tests for my Calculator project at C:\src\Calculator
126
+ ```
127
+
128
+ ### Example 2: Specific File Testing
129
+
130
+ ```
131
+ Generate unit tests for src/services/UserService.ts
132
+ ```
133
+
134
+ ### Example 3: Targeted Coverage
135
+
136
+ ```
137
+ Add tests for the authentication module with focus on edge cases
138
+ ```
139
+
140
+ ## Agent Reference
141
+
142
+ | Agent | Purpose | Tools |
143
+ | --------------------------- | -------------------- | ------------------------------------------------------------ |
144
+ | `polyglot-test-generator` | Coordinates pipeline | runCommands, codebase, editFiles, search, runSubagent |
145
+ | `polyglot-test-researcher` | Analyzes codebase | runCommands, codebase, editFiles, search, fetch, runSubagent |
146
+ | `polyglot-test-planner` | Creates test plan | codebase, editFiles, search, runSubagent |
147
+ | `polyglot-test-implementer` | Writes test files | runCommands, codebase, editFiles, search, runSubagent |
148
+ | `polyglot-test-builder` | Compiles code | runCommands, codebase, search |
149
+ | `polyglot-test-tester` | Runs tests | runCommands, codebase, search |
150
+ | `polyglot-test-fixer` | Fixes errors | runCommands, codebase, editFiles, search |
151
+ | `polyglot-test-linter` | Formats code | runCommands, codebase, search |
152
+
153
+ ## Requirements
154
+
155
+ - Project must have a build/test system configured
156
+ - Testing framework should be installed (or installable)
157
+ - VS Code with GitHub Copilot extension
158
+
159
+ ## Troubleshooting
160
+
161
+ ### Tests don't compile
162
+
163
+ The `polyglot-test-fixer` agent will attempt to resolve compilation errors. Check `.testagent/plan.md` for the expected test structure.
164
+
165
+ ### Tests fail
166
+
167
+ Review the test output and adjust test expectations. Some tests may require mocking dependencies.
168
+
169
+ ### Wrong testing framework detected
170
+
171
+ Specify your preferred framework in the initial request: "Generate Jest tests for..."