@brunosps00/dev-workflow 1.0.2 → 1.0.4

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.
@@ -0,0 +1,138 @@
1
+ <system_instructions>
2
+ Você instala agent skills opt-in da Azure a partir do `MicrosoftDocs/Agent-Skills` (CC-BY-4.0) em `.agents/skills/azure/` e registra o Microsoft Learn MCP Server (HTTP, sem auth) em `.claude/settings.json`. Mesmo resultado de `npx @brunosps00/dev-workflow install-azure-skills` — interface diferente.
3
+
4
+ ## Quando Usar
5
+ - Use quando o usuário pedir para "instalar skills Azure", "configurar MCP do Microsoft docs", "adicionar expertise Azure", "vou trabalhar com Azure", ou similar.
6
+ - Use quando um projeto existente começa uma feature que toca Azure (Container Apps, OpenAI, AKS, etc.) e ainda não há `.agents/skills/azure/`.
7
+ - NÃO use para AWS, GCP ou qualquer cloud não-Microsoft — não estão no repo upstream.
8
+ - NÃO use para instalar as skills nativas do dev-workflow — essas vêm com `init`/`update`.
9
+
10
+ ## Posição no Pipeline
11
+ **Antecessor:** (pedido explícito do usuário) | **Sucessor:** qualquer trabalho de feature Azure (tipicamente `/dw-plan` ou `/dw-autopilot`).
12
+
13
+ ## Pré-requisitos
14
+
15
+ <critical>Este comando precisa de `git` no PATH. Se `git --version` falhar, PARE e diga ao usuário para instalar git primeiro.</critical>
16
+
17
+ ## Categorias (curadas)
18
+
19
+ | Categoria | O que cobre |
20
+ |---|---|
21
+ | All | Todas as skills no diretório `skills/` upstream. |
22
+ | Compute | AKS, App Service, Container Apps/Instances/Registry, Functions, VMs, Batch, Spring Apps. |
23
+ | Data & Storage | Blob, Cosmos DB, SQL, MySQL, PostgreSQL, Cache Redis, Data Lake, Files, Table/Queue Storage, Managed Disks. |
24
+ | AI & ML | OpenAI, AI Foundry, AI Vision, AI Search, AI Services, Machine Learning, Anomaly Detector, Bot Service, Cognitive Services. |
25
+ | Networking | Application Gateway, Front Door, Load Balancer, VPN Gateway, ExpressRoute, Bastion, DNS, CDN, Virtual Network, Virtual WAN, Private Link, Network Watcher, Firewall, Traffic Manager. |
26
+ | Identity & Security | Entra ID (Active Directory), Key Vault, Attestation, Defender, Sentinel, Security Center, Artifact Signing. |
27
+ | DevOps | Boards, Pipelines, Artifacts, Repos, Azure DevOps Server, Test Plans. |
28
+ | Observability | Monitor, Application Insights, Log Analytics. |
29
+ | Integration | Logic Apps, Service Bus, Event Grid, Event Hubs, API Management, API Center, Business Process Tracking. |
30
+ | Architecture | Architecture guidance, Advisor, Blueprints, Well-Architected, Policy, Resource Graph, Resource Manager. |
31
+
32
+ ## Fluxo de Trabalho
33
+
34
+ ### 1. Verificar `git`
35
+
36
+ Rode `git --version` via Bash. Em caso de falha, PARE com: `git é obrigatório para instalar skills Azure. Instale o git e tente novamente.`
37
+
38
+ ### 2. Perguntar ao usuário quais categorias instalar
39
+
40
+ Use AskUserQuestion (multi-select se a interface suportar; caso contrário, loop). Apresente as 10 categorias com suas descrições. Sugestão default quando o usuário não decide: pergunte "qual parte da Azure você vai mexer?" e mapeie a resposta para uma categoria.
41
+
42
+ ### 3. Clone shallow do repo upstream
43
+
44
+ ```bash
45
+ TMP=$(mktemp -d -t dw-azure-skills-XXXXXX)
46
+ git clone --depth=1 https://github.com/MicrosoftDocs/Agent-Skills.git "$TMP"
47
+ ```
48
+
49
+ Se o clone falhar (rede, rate limit do GitHub, etc.), PARE e reporte o erro verbatim. Não instale parcialmente.
50
+
51
+ ### 4. Filtrar e copiar
52
+
53
+ Para cada subdiretório de `$TMP/skills/`, decida se casa com as categorias selecionadas. O match é **por prefixo** — um diretório `azure-aks-edge-essentials` casa com o prefixo `azure-aks`.
54
+
55
+ **Tabela de prefixos (canônica — manter em sincronia com `lib/azure-categories.js` no repo dev-workflow):**
56
+
57
+ | Categoria | Prefixos |
58
+ |---|---|
59
+ | **All** | (todo diretório sob `$TMP/skills/`) |
60
+ | **Compute** | `azure-aks`, `azure-app-service`, `azure-container-apps`, `azure-container-instances`, `azure-container-registry`, `azure-functions`, `azure-virtual-machines`, `azure-vmware-solution`, `azure-batch`, `azure-spring-apps` |
61
+ | **Data & Storage** | `azure-blob-storage`, `azure-cosmos-db`, `azure-sql`, `azure-database-for-mysql`, `azure-database-for-postgresql`, `azure-cache-redis`, `azure-data-lake`, `azure-files`, `azure-storage`, `azure-table-storage`, `azure-queue-storage`, `azure-managed-disk` |
62
+ | **AI & ML** | `azure-openai`, `azure-ai-foundry`, `azure-ai-vision`, `azure-ai-search`, `azure-ai-services`, `azure-machine-learning`, `azure-anomaly-detector`, `azure-bot-service`, `azure-cognitive` |
63
+ | **Networking** | `azure-application-gateway`, `azure-front-door`, `azure-load-balancer`, `azure-vpn-gateway`, `azure-expressroute`, `azure-bastion`, `azure-dns`, `azure-cdn`, `azure-virtual-network`, `azure-virtual-wan`, `azure-private-link`, `azure-network-watcher`, `azure-firewall`, `azure-traffic-manager` |
64
+ | **Identity & Security** | `azure-active-directory`, `azure-entra`, `azure-key-vault`, `azure-attestation`, `azure-defender`, `azure-sentinel`, `azure-security-center`, `azure-artifact-signing` |
65
+ | **DevOps** | `azure-boards`, `azure-pipelines`, `azure-artifacts`, `azure-repos`, `azure-devops`, `azure-test-plans` |
66
+ | **Observability** | `azure-monitor`, `azure-application-insights`, `azure-log-analytics` |
67
+ | **Integration** | `azure-logic-apps`, `azure-service-bus`, `azure-event-grid`, `azure-event-hubs`, `azure-api-management`, `azure-api-center`, `azure-business-process-tracking` |
68
+ | **Architecture** | `azure-architecture`, `azure-advisor`, `azure-blueprints`, `azure-well-architected`, `azure-policy`, `azure-resource-graph`, `azure-resource-manager` |
69
+
70
+ Um diretório casa uma categoria se seu nome é igual a um dos prefixos OU começa com `<prefixo>-`.
71
+
72
+ Antes de copiar, **limpe** `.agents/skills/azure/` para garantir refresh limpo (re-runs substituem seleções anteriores; intencional).
73
+
74
+ Pule qualquer skill cujo root contenha scripts executáveis (`.sh`, `.py`, `.js`, `.ts`, `.ps1`, `.bat`) — dev-workflow instala apenas skills puramente markdown. Reporte a contagem de pulados.
75
+
76
+ Copie cada diretório casado recursivamente para `.agents/skills/azure/<skill-name>/`. Preserve subdiretórios (`references/`, `assets/`).
77
+
78
+ ### 5. Registrar o Microsoft Learn MCP server
79
+
80
+ Leia `.claude/settings.json` (crie o diretório se faltar). Parseie o JSON. Upsert em `mcpServers`:
81
+
82
+ ```json
83
+ {
84
+ "mcpServers": {
85
+ "microsoft-learn": {
86
+ "type": "http",
87
+ "url": "https://learn.microsoft.com/api/mcp"
88
+ }
89
+ }
90
+ }
91
+ ```
92
+
93
+ Se `mcpServers.microsoft-learn` já existir, deixe intocado — nunca sobrescreva config do usuário. Outras entradas em `mcpServers` (context7, playwright, etc.) DEVEM ser preservadas.
94
+
95
+ ### 6. Escrever `.dw/references/azure-mcp-instructions.md`
96
+
97
+ Crie o arquivo (sobrescreva se presente) com a orientação para o agent — quando chamar qual MCP tool (`microsoft_docs_search`, `microsoft_docs_fetch`, `microsoft_code_sample_search`), como citar fontes per `dw-source-grounding`, e como refrescar ou desinstalar.
98
+
99
+ A versão CLI deste comando (`npx @brunosps00/dev-workflow install-azure-skills`) já carrega o texto canônico — se você está rodando como slash command, replique o mesmo conteúdo do constant `AZURE_MCP_INSTRUCTIONS` em `lib/install-azure-skills.js`.
100
+
101
+ ### 7. Cleanup
102
+
103
+ Remova `$TMP`. Sempre — mesmo se passos anteriores falharam.
104
+
105
+ ### 8. Reportar
106
+
107
+ ```
108
+ ## Skills Azure instaladas
109
+
110
+ Categorias: [lista]
111
+ Skills copiadas: N (M puladas com scripts executáveis)
112
+ MCP registrado: microsoft-learn (ou "já presente, deixado inalterado")
113
+ Instruções do agent: .dw/references/azure-mcp-instructions.md
114
+
115
+ ## Próximos passos
116
+
117
+ 1. Reinicie o Claude Code (ou Codex / Copilot / OpenCode) para o MCP carregar.
118
+ 2. Valide com uma pergunta Azure, ex: "Como faço deploy em Azure Container Apps?"
119
+ 3. Para refrescar do upstream, rode /dw-install-azure-skills de novo.
120
+ 4. Para desinstalar: rm -rf .agents/skills/azure/ e remova a entrada "microsoft-learn"
121
+ de .claude/settings.json mcpServers.
122
+ ```
123
+
124
+ ## Comportamento Obrigatório
125
+
126
+ <critical>NUNCA adicione o MCP `microsoft-learn` fora deste comando. É opt-in. `init` e `update` NÃO DEVEM mexer.</critical>
127
+
128
+ <critical>NUNCA copie skills com scripts executáveis. O escopo do dev-workflow é markdown-only. Se uma skill precisa de scripts, o usuário deve instalar direto do repo upstream, não por este comando.</critical>
129
+
130
+ <critical>NUNCA fabrique a URL do upstream ou do MCP. O repo é `https://github.com/MicrosoftDocs/Agent-Skills.git` e o endpoint do MCP é `https://learn.microsoft.com/api/mcp`. São endpoints first-party Microsoft, atribuição CC-BY-4.0 obrigatória.</critical>
131
+
132
+ <critical>NUNCA copie LICENSE/README do upstream para `.agents/skills/azure/` — são da Microsoft e poluem a descoberta de skills do agent. Copie apenas `SKILL.md` + conteúdo auxiliar por skill (references/, assets/).</critical>
133
+
134
+ ## Atribuição
135
+
136
+ Skills vêm de [`MicrosoftDocs/Agent-Skills`](https://github.com/MicrosoftDocs/Agent-Skills) (CC-BY-4.0, da Microsoft). O MCP server está documentado em [Microsoft Learn](https://learn.microsoft.com/en-us/training/support/mcp-get-started). dev-workflow apenas orquestra a instalação — nenhum conteúdo upstream é modificado além de posicionamento.
137
+
138
+ </system_instructions>