@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.
package/lib/prompts.js CHANGED
@@ -33,4 +33,41 @@ async function selectLanguage(flagLang) {
33
33
  return lang;
34
34
  }
35
35
 
36
- module.exports = { selectLanguage, question };
36
+ // Multi-select prompt. Accepts comma-separated indexes ("1,3,5"), "all" for every
37
+ // option, or a single index. Returns an array of selected option strings.
38
+ // Invalid or empty input falls back to the first option.
39
+ function multiSelect(prompt, options) {
40
+ const rl = readline.createInterface({
41
+ input: process.stdin,
42
+ output: process.stdout,
43
+ });
44
+
45
+ return new Promise((resolve) => {
46
+ const optionsStr = options.map((o, i) => ` ${i + 1}) ${o}`).join('\n');
47
+ const help = `\n Enter numbers separated by commas (e.g. 1,3,5) or "all" for everything.`;
48
+ rl.question(`\n${prompt}\n${optionsStr}${help}\n\n Choose: `, (answer) => {
49
+ rl.close();
50
+ const trimmed = (answer || '').trim().toLowerCase();
51
+ if (!trimmed) {
52
+ resolve([options[0]]);
53
+ return;
54
+ }
55
+ if (trimmed === 'all') {
56
+ resolve(options.slice());
57
+ return;
58
+ }
59
+ const seen = new Set();
60
+ const selected = [];
61
+ for (const part of trimmed.split(',')) {
62
+ const idx = parseInt(part.trim(), 10) - 1;
63
+ if (idx >= 0 && idx < options.length && !seen.has(idx)) {
64
+ seen.add(idx);
65
+ selected.push(options[idx]);
66
+ }
67
+ }
68
+ resolve(selected.length > 0 ? selected : [options[0]]);
69
+ });
70
+ });
71
+ }
72
+
73
+ module.exports = { selectLanguage, question, multiSelect };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunosps00/dev-workflow",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "AI-driven development workflow commands for any project. Scaffolds a complete PRD-to-PR pipeline with multi-platform AI assistant support.",
5
5
  "bin": {
6
6
  "dev-workflow": "./bin/dev-workflow.js"
@@ -57,6 +57,8 @@ Before picking a command from the Trigger Map, gauge the change's actual scope.
57
57
  | "Open a new project" / "Bootstrap a stack" | `/dw-new-project` |
58
58
  | "Dockerize this" / "Add docker-compose" | `/dw-dockerize` |
59
59
  | "Functional doc" / "Map screens and flows" | `/dw-functional-doc` |
60
+ | "Install Azure skills" / "Setup Microsoft docs MCP" / "Add Azure expertise" / "I'm going to work on Azure" | `/dw-install-azure-skills` |
61
+ | "Install AWS skills" / "Setup AWS MCP" / "Add AWS expertise" / "I'm going to work on AWS" | `/dw-install-aws-skills` |
60
62
 
61
63
  **Priority:** when in doubt between two commands, `/dw-autopilot` is the safest default for any non-trivial feature request — it composes the rest.
62
64
 
@@ -0,0 +1,166 @@
1
+ <system_instructions>
2
+ You install opt-in AWS agent skills from `aws/agent-toolkit-for-aws` (Apache 2.0) into `.agents/skills/aws/` and register the unified AWS MCP Server (stdio via `uvx mcp-proxy-for-aws`, requires AWS credentials) in `.claude/settings.json`. Same outcome as `npx @brunosps00/dev-workflow install-aws-skills` — different interface.
3
+
4
+ ## When to Use
5
+ - Use when the user asks to "install AWS skills", "setup AWS MCP", "add AWS expertise", "I'm going to work on AWS", or similar.
6
+ - Use when an existing project starts a new feature that touches AWS (Lambda, S3, Bedrock, EC2, etc.) and there is no `.agents/skills/aws/` yet.
7
+ - Do NOT use for Azure, GCP, or non-AWS clouds — those have their own commands or aren't supported.
8
+ - Do NOT use to install dev-workflow's own skills — those ship with `init`/`update`.
9
+
10
+ ## Pipeline Position
11
+ **Predecessor:** (user explicit request) | **Successor:** any AWS-shaped feature work (typically `/dw-plan` or `/dw-autopilot`).
12
+
13
+ ## Prerequisites
14
+
15
+ <critical>This command needs:
16
+ 1. `git` available on PATH.
17
+ 2. `uv` (Python tool runner) — provides `uvx` which invokes `mcp-proxy-for-aws`.
18
+ 3. `aws cli` ≥ 2.32.0.
19
+ 4. Valid AWS credentials — verify with `aws sts get-caller-identity`.
20
+
21
+ If ANY of these is missing or invalid, STOP and tell the user how to install/configure it. Do NOT clone or copy anything if prerequisites are not met — partial install is worse than no install.</critical>
22
+
23
+ ## Categories (upstream-native)
24
+
25
+ | Category | Upstream paths |
26
+ |---|---|
27
+ | **All** | `skills/core-skills/*` + `skills/specialized-skills/*/*` |
28
+ | **Core** | `skills/core-skills/*` — 13 horizontal skills: amazon-bedrock, aws-amplify, aws-billing-and-cost-management, aws-cdk, aws-cloudformation, aws-containers, aws-iam, aws-messaging-and-streaming, aws-observability, aws-sdk-js-v3-usage, aws-sdk-python-usage, aws-sdk-swift-usage, aws-serverless |
29
+ | **Analytics** | `skills/specialized-skills/analytics-skills/*` |
30
+ | **Database** | `skills/specialized-skills/database-skills/*` |
31
+ | **EC2 / Compute** | `skills/specialized-skills/ec2-skills/*` |
32
+ | **Migration & Modernization** | `skills/specialized-skills/migration-and-modernization-skills/*` |
33
+ | **Networking & Content Delivery** | `skills/specialized-skills/networking-and-content-delivery-skills/*` |
34
+ | **Operations** | `skills/specialized-skills/operations-skills/*` |
35
+ | **Security & Identity** | `skills/specialized-skills/security-and-identity-skills/*` |
36
+ | **Serverless** | `skills/specialized-skills/serverless-skills/*` |
37
+ | **Storage** | `skills/specialized-skills/storage-skills/*` |
38
+
39
+ ## Workflow
40
+
41
+ ### 1. Verify prerequisites
42
+
43
+ Run each in turn via Bash. On any failure, STOP and print the matching instruction block:
44
+
45
+ | Check | If missing |
46
+ |---|---|
47
+ | `git --version` | `git is required. Install via brew/apt/git-scm.com.` |
48
+ | `uv --version` | `uv is required. Install: curl -LsSf https://astral.sh/uv/install.sh \| sh` (macOS/Linux) or PowerShell equivalent on Windows. |
49
+ | `aws --version` | `aws cli ≥ 2.32.0 is required. Install via brew install awscli, winget install Amazon.AWSCLI, or follow AWS docs.` |
50
+ | `aws sts get-caller-identity` | `AWS credentials are missing/expired. Easiest: aws login (rotates every 15 min, valid 12h). SSO: aws configure sso. Keys: aws configure.` |
51
+
52
+ Do NOT proceed to step 2 if any check fails.
53
+
54
+ ### 2. Pick region
55
+
56
+ Ask the user which AWS region to use. The MCP server is regional — currently supported endpoints:
57
+
58
+ - `us-east-1` → `https://aws-mcp.us-east-1.api.aws/mcp`
59
+ - `eu-central-1` → `https://aws-mcp.eu-central-1.api.aws/mcp`
60
+
61
+ Default to `us-east-1` if the user has no preference. The agent can override per-query (e.g., "list EC2 instances in eu-west-1") — the endpoint region is just the default operating region.
62
+
63
+ ### 3. Ask which categories to install
64
+
65
+ Use AskUserQuestion (multi-select if supported; otherwise loop). Present the 11 categories above. Default suggestion when undecided: ask "what part of AWS are you about to work on?" and map to a category.
66
+
67
+ ### 4. Shallow clone the upstream repo
68
+
69
+ ```bash
70
+ TMP=$(mktemp -d -t dw-aws-skills-XXXXXX)
71
+ git clone --depth=1 https://github.com/aws/agent-toolkit-for-aws.git "$TMP"
72
+ ```
73
+
74
+ If the clone fails, STOP and report the error verbatim.
75
+
76
+ ### 5. Filter and copy
77
+
78
+ For each selected category, glob the corresponding upstream path and collect all skill directories. Examples:
79
+
80
+ - "Core" → every subdirectory of `$TMP/skills/core-skills/`
81
+ - "Database" → every subdirectory of `$TMP/skills/specialized-skills/database-skills/`
82
+ - "All" → every subdirectory of `$TMP/skills/core-skills/` AND every subdirectory of `$TMP/skills/specialized-skills/*/`
83
+
84
+ Before copying, **clear** `.agents/skills/aws/` for a clean refresh (re-runs replace previous selections).
85
+
86
+ Skip any skill whose root contains executable scripts (`.sh`, `.py`, `.js`, `.ts`, `.ps1`, `.bat`) — dev-workflow only installs pure-markdown skills. Report the skipped count.
87
+
88
+ Copy each matched directory recursively to `.agents/skills/aws/<skill-name>/`. **Flatten** the upstream hierarchy — the destination has no `core-skills/` vs `specialized-skills/` split. Just the skill slug as the directory name.
89
+
90
+ ### 6. Register the AWS MCP Server
91
+
92
+ Read `.claude/settings.json`. Parse the JSON. Upsert into `mcpServers`:
93
+
94
+ ```json
95
+ {
96
+ "mcpServers": {
97
+ "aws-mcp": {
98
+ "command": "uvx",
99
+ "args": [
100
+ "mcp-proxy-for-aws@latest",
101
+ "https://aws-mcp.us-east-1.api.aws/mcp",
102
+ "--metadata",
103
+ "AWS_REGION=us-east-1"
104
+ ],
105
+ "transport": "stdio",
106
+ "timeout": 100000
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ Substitute the endpoint and `AWS_REGION` value with the region picked in step 2.
113
+
114
+ If `mcpServers.aws-mcp` already exists, leave it untouched — never overwrite. Tell the user to edit `.claude/settings.json` directly (or remove the entry and re-run) to change the region. Other entries in `mcpServers` (context7, playwright, microsoft-learn, etc.) MUST be preserved.
115
+
116
+ ### 7. Write `.dw/references/aws-mcp-instructions.md`
117
+
118
+ Create (overwrite if present) with the canonical agent-facing guidance — the 5 MCP tools (`aws___search_documentation`, `aws___read_documentation`, `aws___retrieve_skill`, `aws___call_aws`, `aws___run_script`), the destructive-operations protocol (confirm before any `create*`/`update*`/`delete*`/`modify*`/IAM/billing call), region behavior, source-grounding discipline, refresh/uninstall.
119
+
120
+ The CLI version of this command (`npx @brunosps00/dev-workflow install-aws-skills`) ships the canonical text. If running as a slash command, replicate the same content from `lib/install-aws-skills.js` `AWS_MCP_INSTRUCTIONS` constant.
121
+
122
+ ### 8. Cleanup
123
+
124
+ Remove `$TMP`. Always — even if earlier steps failed.
125
+
126
+ ### 9. Report
127
+
128
+ ```
129
+ ## AWS skills installed
130
+
131
+ Categories: [list]
132
+ Region: us-east-1 (or chosen)
133
+ Skills copied: N (skipped M with executable scripts)
134
+ MCP registered: aws-mcp (or "already present, left unchanged")
135
+ Agent instructions: .dw/references/aws-mcp-instructions.md
136
+
137
+ ## Next steps
138
+
139
+ 1. Restart Claude Code (or Codex / Copilot / OpenCode) so the MCP loads.
140
+ 2. Validate with an AWS question, e.g. "What's the Lambda concurrent execution limit?"
141
+ 3. The agent can now call AWS APIs via aws___call_aws — review
142
+ .dw/references/aws-mcp-instructions.md for destructive-op protocol.
143
+ 4. To refresh from upstream, re-run /dw-install-aws-skills.
144
+ 5. To uninstall: rm -rf .agents/skills/aws/ and remove the "aws-mcp"
145
+ entry from .claude/settings.json mcpServers.
146
+ ```
147
+
148
+ ## Required Behavior
149
+
150
+ <critical>NEVER add `aws-mcp` MCP outside of this command. It is opt-in. `init` and `update` MUST NOT touch it.</critical>
151
+
152
+ <critical>NEVER register the deprecated AWS Knowledge MCP (`https://knowledge-mcp.global.api.aws`). AWS officially superseded it with the unified AWS MCP Server; registering both causes tool conflicts that confuse agents.</critical>
153
+
154
+ <critical>NEVER auto-install `uv` or `aws cli`. Print the instruction block and let the user choose their install path. This avoids breaking the user's environment with package managers we don't own.</critical>
155
+
156
+ <critical>NEVER skip the credentials check. A clean install with no working `aws sts get-caller-identity` produces a broken MCP that fails on every tool call. Better to stop and instruct.</critical>
157
+
158
+ <critical>NEVER copy upstream LICENSE/README/CONTRIBUTING into `.agents/skills/aws/` — those belong to AWS and pollute skill discovery. Copy only per-skill `SKILL.md` + auxiliary content (references/, assets/).</critical>
159
+
160
+ <critical>NEVER copy skills with executable scripts. The dev-workflow scope is markdown-only. If a skill needs scripts, the user should install it directly from the upstream repo, not through this command.</critical>
161
+
162
+ ## Attribution
163
+
164
+ Skills come from [`aws/agent-toolkit-for-aws`](https://github.com/aws/agent-toolkit-for-aws) (Apache 2.0, by AWS). The MCP server is documented at [docs.aws.amazon.com/aws-mcp/](https://docs.aws.amazon.com/aws-mcp/). The proxy is [`aws/mcp-proxy-for-aws`](https://github.com/aws/mcp-proxy-for-aws). dev-workflow only orchestrates the install.
165
+
166
+ </system_instructions>
@@ -0,0 +1,138 @@
1
+ <system_instructions>
2
+ You install opt-in Azure agent skills from `MicrosoftDocs/Agent-Skills` (CC-BY-4.0) into `.agents/skills/azure/` and register the Microsoft Learn MCP Server (HTTP, no-auth) in `.claude/settings.json`. Same outcome as `npx @brunosps00/dev-workflow install-azure-skills` — different interface.
3
+
4
+ ## When to Use
5
+ - Use when the user asks to "install Azure skills", "setup Microsoft docs MCP", "add Azure expertise", "I'm going to work on Azure", or similar.
6
+ - Use when an existing project starts a new feature that touches Azure (Container Apps, OpenAI, AKS, etc.) and there is no `.agents/skills/azure/` yet.
7
+ - Do NOT use for AWS, GCP, or any non-Microsoft cloud — those are not in the upstream repo.
8
+ - Do NOT use to install dev-workflow's own skills — those ship with `init`/`update`.
9
+
10
+ ## Pipeline Position
11
+ **Predecessor:** (user explicit request) | **Successor:** any Azure-shaped feature work (typically `/dw-plan` or `/dw-autopilot`).
12
+
13
+ ## Prerequisites
14
+
15
+ <critical>This command needs `git` available on PATH. If `git --version` fails, STOP and tell the user to install git first.</critical>
16
+
17
+ ## Categories (curated)
18
+
19
+ | Category | What it covers |
20
+ |---|---|
21
+ | All | Every skill in the upstream `skills/` directory. |
22
+ | Compute | AKS, App Service, Container Apps/Instances/Registry, Functions, VMs, Batch, Spring Apps. |
23
+ | Data & Storage | Blob, Cosmos DB, SQL, MySQL, PostgreSQL, Cache for 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
+ ## Workflow
33
+
34
+ ### 1. Verify `git`
35
+
36
+ Run `git --version` via Bash. On failure, STOP with: `git is required to install Azure skills. Install git and re-run.`
37
+
38
+ ### 2. Ask the user which categories to install
39
+
40
+ Use AskUserQuestion (multi-select if your interface supports it; otherwise loop). Present the 10 categories with their one-line descriptions. Default suggestion when the user is undecided: ask "what part of Azure are you about to work on?" and map their answer to a category.
41
+
42
+ ### 3. Shallow clone the upstream repo
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
+ If the clone fails (network, GitHub rate limit, etc.), STOP and report the error verbatim. Do not partially install.
50
+
51
+ ### 4. Filter and copy
52
+
53
+ For each subdirectory of `$TMP/skills/`, decide whether it matches the selected categories. The match is **prefix-based** — a directory name like `azure-aks-edge-essentials` matches the prefix `azure-aks`.
54
+
55
+ **Prefix table (canonical — keep in sync with `lib/azure-categories.js` in the dev-workflow repo):**
56
+
57
+ | Category | Prefixes |
58
+ |---|---|
59
+ | **All** | (every directory under `$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
+ A directory matches a category if its name equals one of the prefixes OR starts with `<prefix>-`.
71
+
72
+ Before copying, **clear** `.agents/skills/azure/` to ensure a clean refresh (re-runs replace previous selections; this is intentional).
73
+
74
+ Skip any skill whose root contains executable scripts (`.sh`, `.py`, `.js`, `.ts`, `.ps1`, `.bat`) — dev-workflow only installs pure markdown skills. Report the skipped count.
75
+
76
+ Copy each matched directory recursively to `.agents/skills/azure/<skill-name>/`. Preserve subdirectories (`references/`, `assets/`).
77
+
78
+ ### 5. Register the Microsoft Learn MCP server
79
+
80
+ Read `.claude/settings.json` (create the directory if missing). Parse the JSON. Upsert into `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
+ If `mcpServers.microsoft-learn` already exists, leave it untouched — never overwrite user config. Other entries in `mcpServers` (context7, playwright, etc.) MUST be preserved.
94
+
95
+ ### 6. Write `.dw/references/azure-mcp-instructions.md`
96
+
97
+ Create this file (overwrite if present) with the agent-facing guidance — when to call which MCP tool (`microsoft_docs_search`, `microsoft_docs_fetch`, `microsoft_code_sample_search`), how to cite sources per `dw-source-grounding`, and how to refresh or uninstall.
98
+
99
+ The CLI version of this command (`npx @brunosps00/dev-workflow install-azure-skills`) ships the canonical text of this file — if you are running as a slash command, replicate the same content from `lib/install-azure-skills.js` `AZURE_MCP_INSTRUCTIONS` constant.
100
+
101
+ ### 7. Cleanup
102
+
103
+ Remove `$TMP`. Always — even if earlier steps failed.
104
+
105
+ ### 8. Report
106
+
107
+ ```
108
+ ## Azure skills installed
109
+
110
+ Categories: [list]
111
+ Skills copied: N (skipped M with executable scripts)
112
+ MCP registered: microsoft-learn (or "already present, left unchanged")
113
+ Agent instructions: .dw/references/azure-mcp-instructions.md
114
+
115
+ ## Next steps
116
+
117
+ 1. Restart Claude Code (or Codex / Copilot / OpenCode) so the MCP loads.
118
+ 2. Validate with an Azure question, e.g. "How do I deploy to Azure Container Apps?"
119
+ 3. To refresh from upstream, re-run /dw-install-azure-skills.
120
+ 4. To uninstall: rm -rf .agents/skills/azure/ and remove the "microsoft-learn"
121
+ entry from .claude/settings.json mcpServers.
122
+ ```
123
+
124
+ ## Required Behavior
125
+
126
+ <critical>NEVER add `microsoft-learn` MCP outside of this command. It is opt-in. `init` and `update` MUST NOT touch it.</critical>
127
+
128
+ <critical>NEVER copy skills with executable scripts. The dev-workflow scope is markdown-only. If a skill needs scripts, the user should install it directly from the upstream repo, not through this command.</critical>
129
+
130
+ <critical>NEVER fabricate the upstream URL or the MCP URL. The repo is `https://github.com/MicrosoftDocs/Agent-Skills.git` and the MCP endpoint is `https://learn.microsoft.com/api/mcp`. These are first-party Microsoft endpoints with CC-BY-4.0 attribution required.</critical>
131
+
132
+ <critical>NEVER copy upstream LICENSE/README files into `.agents/skills/azure/` — those belong to Microsoft and pollute the agent's skill discovery. Copy only `SKILL.md` + per-skill auxiliary content (references/, assets/).</critical>
133
+
134
+ ## Attribution
135
+
136
+ Skills come from [`MicrosoftDocs/Agent-Skills`](https://github.com/MicrosoftDocs/Agent-Skills) (CC-BY-4.0, by Microsoft). The MCP server is documented at [Microsoft Learn](https://learn.microsoft.com/en-us/training/support/mcp-get-started). dev-workflow only orchestrates the install — no upstream content is modified beyond directory placement.
137
+
138
+ </system_instructions>
@@ -57,6 +57,8 @@ Antes de escolher um comando da Trigger Map, dimensione o escopo real da mudanç
57
57
  | "Abre um novo projeto" / "Bootstrap de stack" | `/dw-new-project` |
58
58
  | "Dockeriza isso" / "Adiciona docker-compose" | `/dw-dockerize` |
59
59
  | "Functional doc" / "Mapeia screens e flows" | `/dw-functional-doc` |
60
+ | "Instala skills Azure" / "Configura MCP do Microsoft docs" / "Adiciona expertise Azure" / "Vou trabalhar com Azure" | `/dw-install-azure-skills` |
61
+ | "Instala skills AWS" / "Configura MCP da AWS" / "Adiciona expertise AWS" / "Vou trabalhar com AWS" | `/dw-install-aws-skills` |
60
62
 
61
63
  **Prioridade:** na dúvida entre dois comandos, `/dw-autopilot` é o default mais seguro pra qualquer pedido de feature não-trivial — ele compõe os demais.
62
64
 
@@ -0,0 +1,166 @@
1
+ <system_instructions>
2
+ Você instala agent skills opt-in da AWS a partir do `aws/agent-toolkit-for-aws` (Apache 2.0) em `.agents/skills/aws/` e registra o AWS MCP Server unificado (stdio via `uvx mcp-proxy-for-aws`, requer credenciais AWS) em `.claude/settings.json`. Mesmo resultado de `npx @brunosps00/dev-workflow install-aws-skills` — interface diferente.
3
+
4
+ ## Quando Usar
5
+ - Use quando o usuário pedir para "instalar skills AWS", "configurar MCP da AWS", "adicionar expertise AWS", "vou trabalhar com AWS", ou similar.
6
+ - Use quando um projeto existente começa uma feature que toca AWS (Lambda, S3, Bedrock, EC2, etc.) e ainda não há `.agents/skills/aws/`.
7
+ - NÃO use para Azure, GCP ou clouds não-AWS — têm comandos próprios ou não são suportados.
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 AWS (tipicamente `/dw-plan` ou `/dw-autopilot`).
12
+
13
+ ## Pré-requisitos
14
+
15
+ <critical>Este comando precisa de:
16
+ 1. `git` no PATH.
17
+ 2. `uv` (Python tool runner) — provê `uvx` que invoca o `mcp-proxy-for-aws`.
18
+ 3. `aws cli` ≥ 2.32.0.
19
+ 4. Credenciais AWS válidas — verifique com `aws sts get-caller-identity`.
20
+
21
+ Se QUALQUER um faltar ou estiver inválido, PARE e diga ao usuário como instalar/configurar. NÃO clone ou copie nada se os pré-requisitos não estão prontos — install parcial é pior que nenhum.</critical>
22
+
23
+ ## Categorias (nativas do upstream)
24
+
25
+ | Categoria | Caminhos upstream |
26
+ |---|---|
27
+ | **All** | `skills/core-skills/*` + `skills/specialized-skills/*/*` |
28
+ | **Core** | `skills/core-skills/*` — 13 skills horizontais: amazon-bedrock, aws-amplify, aws-billing-and-cost-management, aws-cdk, aws-cloudformation, aws-containers, aws-iam, aws-messaging-and-streaming, aws-observability, aws-sdk-js-v3-usage, aws-sdk-python-usage, aws-sdk-swift-usage, aws-serverless |
29
+ | **Analytics** | `skills/specialized-skills/analytics-skills/*` |
30
+ | **Database** | `skills/specialized-skills/database-skills/*` |
31
+ | **EC2 / Compute** | `skills/specialized-skills/ec2-skills/*` |
32
+ | **Migration & Modernization** | `skills/specialized-skills/migration-and-modernization-skills/*` |
33
+ | **Networking & Content Delivery** | `skills/specialized-skills/networking-and-content-delivery-skills/*` |
34
+ | **Operations** | `skills/specialized-skills/operations-skills/*` |
35
+ | **Security & Identity** | `skills/specialized-skills/security-and-identity-skills/*` |
36
+ | **Serverless** | `skills/specialized-skills/serverless-skills/*` |
37
+ | **Storage** | `skills/specialized-skills/storage-skills/*` |
38
+
39
+ ## Fluxo de Trabalho
40
+
41
+ ### 1. Verificar pré-requisitos
42
+
43
+ Rode cada um via Bash. Em qualquer falha, PARE e imprima o bloco de instrução correspondente:
44
+
45
+ | Check | Se faltar |
46
+ |---|---|
47
+ | `git --version` | `git é obrigatório. Instale via brew/apt/git-scm.com.` |
48
+ | `uv --version` | `uv é obrigatório. Instale: curl -LsSf https://astral.sh/uv/install.sh \| sh` (macOS/Linux) ou PowerShell equivalente no Windows. |
49
+ | `aws --version` | `aws cli ≥ 2.32.0 é obrigatório. Instale via brew install awscli, winget install Amazon.AWSCLI, ou siga a doc AWS.` |
50
+ | `aws sts get-caller-identity` | `Credenciais AWS faltando/expiradas. Mais fácil: aws login (rotaciona a cada 15 min, valid 12h). SSO: aws configure sso. Keys: aws configure.` |
51
+
52
+ NÃO prossiga para o passo 2 se algum check falhar.
53
+
54
+ ### 2. Escolher região
55
+
56
+ Pergunte ao usuário qual região AWS usar. O MCP server é regional — endpoints suportados:
57
+
58
+ - `us-east-1` → `https://aws-mcp.us-east-1.api.aws/mcp`
59
+ - `eu-central-1` → `https://aws-mcp.eu-central-1.api.aws/mcp`
60
+
61
+ Default `us-east-1` se o usuário não tiver preferência. O agent pode sobrescrever por query (ex: "list EC2 instances in eu-west-1") — a região do endpoint é só a região de operação default.
62
+
63
+ ### 3. Perguntar quais categorias instalar
64
+
65
+ Use AskUserQuestion (multi-select se suportar; caso contrário, loop). Apresente as 11 categorias acima. Sugestão default quando indeciso: pergunte "qual parte da AWS você vai mexer?" e mapeie para uma categoria.
66
+
67
+ ### 4. Clone shallow do repo upstream
68
+
69
+ ```bash
70
+ TMP=$(mktemp -d -t dw-aws-skills-XXXXXX)
71
+ git clone --depth=1 https://github.com/aws/agent-toolkit-for-aws.git "$TMP"
72
+ ```
73
+
74
+ Se o clone falhar, PARE e reporte o erro verbatim.
75
+
76
+ ### 5. Filtrar e copiar
77
+
78
+ Para cada categoria selecionada, glob o caminho upstream correspondente e colete todos os diretórios de skill. Exemplos:
79
+
80
+ - "Core" → cada subdir de `$TMP/skills/core-skills/`
81
+ - "Database" → cada subdir de `$TMP/skills/specialized-skills/database-skills/`
82
+ - "All" → cada subdir de `$TMP/skills/core-skills/` E cada subdir de `$TMP/skills/specialized-skills/*/`
83
+
84
+ Antes de copiar, **limpe** `.agents/skills/aws/` para refresh limpo (re-runs substituem seleções anteriores).
85
+
86
+ 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.
87
+
88
+ Copie cada diretório casado recursivamente para `.agents/skills/aws/<skill-name>/`. **Achatar** a hierarquia upstream — o destino não tem split `core-skills/` vs `specialized-skills/`. Só o slug da skill como nome de diretório.
89
+
90
+ ### 6. Registrar o AWS MCP Server
91
+
92
+ Leia `.claude/settings.json`. Parseie o JSON. Upsert em `mcpServers`:
93
+
94
+ ```json
95
+ {
96
+ "mcpServers": {
97
+ "aws-mcp": {
98
+ "command": "uvx",
99
+ "args": [
100
+ "mcp-proxy-for-aws@latest",
101
+ "https://aws-mcp.us-east-1.api.aws/mcp",
102
+ "--metadata",
103
+ "AWS_REGION=us-east-1"
104
+ ],
105
+ "transport": "stdio",
106
+ "timeout": 100000
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ Substitua o endpoint e o valor de `AWS_REGION` pela região escolhida no passo 2.
113
+
114
+ Se `mcpServers.aws-mcp` já existir, deixe intocado — nunca sobrescreva. Diga ao usuário para editar `.claude/settings.json` direto (ou remover a entry e re-rodar) para mudar a região. Outras entradas em `mcpServers` (context7, playwright, microsoft-learn, etc.) DEVEM ser preservadas.
115
+
116
+ ### 7. Escrever `.dw/references/aws-mcp-instructions.md`
117
+
118
+ Crie (sobrescreva se presente) com a orientação canônica para o agent — as 5 MCP tools (`aws___search_documentation`, `aws___read_documentation`, `aws___retrieve_skill`, `aws___call_aws`, `aws___run_script`), o protocolo de operações destrutivas (confirmar antes de qualquer `create*`/`update*`/`delete*`/`modify*`/IAM/billing), comportamento de região, source-grounding, refresh/uninstall.
119
+
120
+ A versão CLI deste comando (`npx @brunosps00/dev-workflow install-aws-skills`) já carrega o texto canônico. Se rodando como slash command, replique o mesmo conteúdo do constant `AWS_MCP_INSTRUCTIONS` em `lib/install-aws-skills.js`.
121
+
122
+ ### 8. Cleanup
123
+
124
+ Remova `$TMP`. Sempre — mesmo se passos anteriores falharam.
125
+
126
+ ### 9. Reportar
127
+
128
+ ```
129
+ ## Skills AWS instaladas
130
+
131
+ Categorias: [lista]
132
+ Região: us-east-1 (ou escolhida)
133
+ Skills copiadas: N (M puladas com scripts executáveis)
134
+ MCP registrado: aws-mcp (ou "já presente, deixado inalterado")
135
+ Instruções do agent: .dw/references/aws-mcp-instructions.md
136
+
137
+ ## Próximos passos
138
+
139
+ 1. Reinicie o Claude Code (ou Codex / Copilot / OpenCode) para o MCP carregar.
140
+ 2. Valide com uma pergunta AWS, ex: "Qual o limite de execuções concorrentes do Lambda?"
141
+ 3. O agent agora pode chamar APIs AWS via aws___call_aws — revise
142
+ .dw/references/aws-mcp-instructions.md para o protocolo de operações destrutivas.
143
+ 4. Para refrescar do upstream, rode /dw-install-aws-skills de novo.
144
+ 5. Para desinstalar: rm -rf .agents/skills/aws/ e remova a entrada "aws-mcp"
145
+ de .claude/settings.json mcpServers.
146
+ ```
147
+
148
+ ## Comportamento Obrigatório
149
+
150
+ <critical>NUNCA adicione o MCP `aws-mcp` fora deste comando. É opt-in. `init` e `update` NÃO DEVEM mexer.</critical>
151
+
152
+ <critical>NUNCA registre o AWS Knowledge MCP deprecated (`https://knowledge-mcp.global.api.aws`). A AWS oficialmente substituiu pelo AWS MCP Server unificado; registrar ambos causa tool conflicts que confundem agents.</critical>
153
+
154
+ <critical>NUNCA auto-instale `uv` ou `aws cli`. Imprima o bloco de instruções e deixe o usuário escolher o caminho de instalação. Evita quebrar o ambiente do usuário com gerenciadores que não controlamos.</critical>
155
+
156
+ <critical>NUNCA pule a checagem de credenciais. Um install limpo sem `aws sts get-caller-identity` funcionando produz um MCP quebrado que falha em toda tool call. Melhor parar e instruir.</critical>
157
+
158
+ <critical>NUNCA copie LICENSE/README/CONTRIBUTING do upstream para `.agents/skills/aws/` — pertencem à AWS e poluem a descoberta de skills. Copie apenas `SKILL.md` por skill + conteúdo auxiliar (references/, assets/).</critical>
159
+
160
+ <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>
161
+
162
+ ## Atribuição
163
+
164
+ Skills vêm de [`aws/agent-toolkit-for-aws`](https://github.com/aws/agent-toolkit-for-aws) (Apache 2.0, da AWS). O MCP server está documentado em [docs.aws.amazon.com/aws-mcp/](https://docs.aws.amazon.com/aws-mcp/). O proxy é [`aws/mcp-proxy-for-aws`](https://github.com/aws/mcp-proxy-for-aws). dev-workflow apenas orquestra a instalação.
165
+
166
+ </system_instructions>