crewkit 0.1.0 → 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.
- package/README.md +142 -1
- package/package.json +1 -1
- package/skill/SKILL.md +47 -6
- package/skill/adapters/copilot.md +239 -0
- package/skill/adapters/cursor.md +215 -0
- package/skill/templates/agents/coder.md +1 -0
- package/skill/templates/skills/dev-metrics/SKILL.md +126 -0
- package/skill/templates/skills/full-workflow/SKILL.md +2 -72
- package/skill/templates/skills/full-workflow/references/operational-policies.md +85 -0
- package/skill/templates/skills/impact/SKILL.md +157 -0
- package/skill/templates/skills/retro/SKILL.md +134 -0
- package/skill/templates/skills/review-pr/SKILL.md +39 -5
- package/skill/templates/skills/security-scan/SKILL.md +157 -0
- package/src/add.js +45 -0
- package/src/cli.js +15 -6
- package/src/install.js +4 -1
- package/src/update.js +28 -0
package/README.md
CHANGED
|
@@ -1,5 +1,127 @@
|
|
|
1
1
|
# crewkit
|
|
2
2
|
|
|
3
|
+
Framework de context engineering para desenvolvimento assistido por IA. Um comando para configurar agents, skills, hooks, rules e memory no seu projeto.
|
|
4
|
+
|
|
5
|
+
## O que faz
|
|
6
|
+
|
|
7
|
+
O `crewkit` escaneia sua codebase e gera um setup completo e calibrado de context engineering:
|
|
8
|
+
|
|
9
|
+
- **Agents** (5) — explorer, architect, coder, tester, reviewer com roles definidos e tiers de modelo
|
|
10
|
+
- **Skills** (4) — full-workflow, hotfix, explore-and-plan, review-pr
|
|
11
|
+
- **Hooks** (4) — session-start, protect-sensitive-files, post-compact-recovery, stop-quality-gate
|
|
12
|
+
- **Rules** — regras de codigo por stack geradas a partir de padroes detectados
|
|
13
|
+
- **Memory** (`.ai/memory/`) — architecture, conventions, commands, testing, lessons
|
|
14
|
+
- **CLAUDE.md** — hard rules do projeto derivadas de padroes reais do codigo
|
|
15
|
+
- **settings.json** — permissoes conservadoras + registro de hooks
|
|
16
|
+
- **.mcp.json** — MCP servers detectados da sua infraestrutura (PostgreSQL, Redis, Sentry, etc.)
|
|
17
|
+
|
|
18
|
+
Tudo calibrado pro seu codigo real — nao e boilerplate generico.
|
|
19
|
+
|
|
20
|
+
## Instalacao
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx crewkit install
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Copia a skill para `~/.claude/skills/crewkit-setup/` (setup unico).
|
|
27
|
+
|
|
28
|
+
## Uso
|
|
29
|
+
|
|
30
|
+
Abra qualquer projeto no Claude Code e rode:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
/crewkit-setup
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
A IA escaneia sua codebase (~8-15 min) e gera o setup completo. Zero perguntas durante o scan — detecta tudo a partir do codigo, historico git e docs.
|
|
37
|
+
|
|
38
|
+
### O que acontece
|
|
39
|
+
|
|
40
|
+
1. **Pre-flight** — verifica modelo, detecta re-runs, oferece backup
|
|
41
|
+
2. **Phase 0** — cria estrutura de diretorios, atualiza .gitignore
|
|
42
|
+
3. **Phase 1-3** — detecta stacks, le docs, mapeia estrutura do projeto
|
|
43
|
+
4. **Phase 4** — leitura profunda de arquivos representativos, detecta padroes com score de confianca
|
|
44
|
+
5. **Phase 5** — health check (opcional, com `--check-health`)
|
|
45
|
+
6. **Phase 6** — apresenta perfil pra sua revisao antes de gerar
|
|
46
|
+
7. **Phase 7** — gera todos os arquivos em ordem de falha graceful
|
|
47
|
+
|
|
48
|
+
### Re-runs
|
|
49
|
+
|
|
50
|
+
Se voce rodar `/crewkit-setup` de novo num projeto que ja tem setup:
|
|
51
|
+
|
|
52
|
+
- **[R] Regenerate** — backup do existente, regenera tudo
|
|
53
|
+
- **[M] Memory only** — re-scan e atualiza memory + CLAUDE.md, preserva agents/hooks/skills
|
|
54
|
+
- **[C] Cancel**
|
|
55
|
+
|
|
56
|
+
## Stacks suportadas
|
|
57
|
+
|
|
58
|
+
Detectadas automaticamente a partir de arquivos de manifesto:
|
|
59
|
+
|
|
60
|
+
| Stack | Detectado por |
|
|
61
|
+
|-------|--------------|
|
|
62
|
+
| .NET | `*.csproj`, `*.sln` |
|
|
63
|
+
| Node.js | `package.json` (Express, Next.js, Nest, etc.) |
|
|
64
|
+
| Python | `pyproject.toml`, `requirements.txt` |
|
|
65
|
+
| Go | `go.mod` |
|
|
66
|
+
| Rust | `Cargo.toml` |
|
|
67
|
+
| Java/Kotlin | `pom.xml`, `build.gradle` |
|
|
68
|
+
| Ruby | `Gemfile` |
|
|
69
|
+
| Elixir | `mix.exs` |
|
|
70
|
+
| PHP | `composer.json` |
|
|
71
|
+
| Dart/Flutter | `pubspec.yaml` |
|
|
72
|
+
|
|
73
|
+
## Agents gerados
|
|
74
|
+
|
|
75
|
+
| Agent | Modelo | Funcao |
|
|
76
|
+
|-------|--------|--------|
|
|
77
|
+
| explorer | Sonnet | Exploracao read-only da codebase |
|
|
78
|
+
| architect | Opus | Review de arquitetura + gate de aprovacao |
|
|
79
|
+
| coder | Sonnet | Diffs minimos, padroes existentes |
|
|
80
|
+
| tester | Sonnet | Workflow completo de testes + accountability de cobertura |
|
|
81
|
+
| reviewer | Opus | Code review de alto sinal, sem ruido |
|
|
82
|
+
|
|
83
|
+
## Skills opcionais
|
|
84
|
+
|
|
85
|
+
Alem das 4 skills core (instaladas automaticamente), voce pode adicionar skills opcionais:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npx crewkit add retro # post-mortem de tarefas
|
|
89
|
+
npx crewkit add dev-metrics # metricas de desenvolvimento via git
|
|
90
|
+
npx crewkit add security-scan # scan OWASP top 10
|
|
91
|
+
npx crewkit add impact # analise de blast radius
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## IDEs suportadas
|
|
95
|
+
|
|
96
|
+
- **Claude Code** — suporte completo (agents, skills, hooks, rules, memory)
|
|
97
|
+
- **GitHub Copilot** — auto-detectado, gera `copilot-instructions.md`, agents e prompts
|
|
98
|
+
- **Cursor** — auto-detectado, gera rules com globs e `AGENTS.md`
|
|
99
|
+
|
|
100
|
+
A IDE e detectada automaticamente durante o setup. `.ai/memory/` e compartilhado entre todas as IDEs.
|
|
101
|
+
|
|
102
|
+
## O que e commitado vs ignorado
|
|
103
|
+
|
|
104
|
+
**Commitado** (compartilhado com o time):
|
|
105
|
+
- `CLAUDE.md`, `.claude/agents/`, `.claude/rules/`, `.claude/skills/`, `.claude/hooks/`
|
|
106
|
+
- `.claude/settings.json`, `.ai/memory/`
|
|
107
|
+
|
|
108
|
+
**Ignorado** (pessoal/metadata):
|
|
109
|
+
- `.claude/settings.local.json`, `.crewkit/`, `.crewkit-backup/`
|
|
110
|
+
|
|
111
|
+
## Requisitos
|
|
112
|
+
|
|
113
|
+
- Node.js >= 20
|
|
114
|
+
- Claude Code, GitHub Copilot ou Cursor
|
|
115
|
+
- Opus ou Sonnet recomendado (Haiku funciona mas gera scans mais rasos)
|
|
116
|
+
|
|
117
|
+
## Licenca
|
|
118
|
+
|
|
119
|
+
MIT
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
# English
|
|
124
|
+
|
|
3
125
|
Context engineering framework for AI-assisted development. One command to set up agents, skills, hooks, rules, and memory for your project.
|
|
4
126
|
|
|
5
127
|
## What it does
|
|
@@ -80,6 +202,25 @@ Detected automatically from manifest files:
|
|
|
80
202
|
| tester | Sonnet | Full test workflow + coverage accountability |
|
|
81
203
|
| reviewer | Opus | High signal code review, no noise |
|
|
82
204
|
|
|
205
|
+
## Optional skills
|
|
206
|
+
|
|
207
|
+
In addition to the 4 core skills (auto-installed), you can add optional skills:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
npx crewkit add retro # task post-mortem
|
|
211
|
+
npx crewkit add dev-metrics # development metrics from git
|
|
212
|
+
npx crewkit add security-scan # OWASP top 10 scan
|
|
213
|
+
npx crewkit add impact # blast radius analysis
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Supported IDEs
|
|
217
|
+
|
|
218
|
+
- **Claude Code** — full support (agents, skills, hooks, rules, memory)
|
|
219
|
+
- **GitHub Copilot** — auto-detected, generates `copilot-instructions.md`, agents and prompts
|
|
220
|
+
- **Cursor** — auto-detected, generates rules with globs and `AGENTS.md`
|
|
221
|
+
|
|
222
|
+
IDE is auto-detected during setup. `.ai/memory/` is shared across all IDEs.
|
|
223
|
+
|
|
83
224
|
## What gets committed vs ignored
|
|
84
225
|
|
|
85
226
|
**Committed** (shared with team):
|
|
@@ -92,7 +233,7 @@ Detected automatically from manifest files:
|
|
|
92
233
|
## Requirements
|
|
93
234
|
|
|
94
235
|
- Node.js >= 20
|
|
95
|
-
- Claude Code
|
|
236
|
+
- Claude Code, GitHub Copilot, or Cursor
|
|
96
237
|
- Opus or Sonnet recommended (Haiku works but produces shallower scans)
|
|
97
238
|
|
|
98
239
|
## License
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -142,6 +142,21 @@ For each stack, detect the build and test commands:
|
|
|
142
142
|
|
|
143
143
|
Read `package.json` scripts, CI configs, or Makefiles to find the actual commands used in this project. Prefer project-specific over generic.
|
|
144
144
|
|
|
145
|
+
### IDE Target Detection
|
|
146
|
+
|
|
147
|
+
Detect which IDEs are in use or configured in this project:
|
|
148
|
+
|
|
149
|
+
| IDE | Detection signals |
|
|
150
|
+
|-----|------------------|
|
|
151
|
+
| Claude Code | **Always** — this skill runs inside Claude Code |
|
|
152
|
+
| GitHub Copilot | `.github/` directory exists OR `.github/copilot-instructions.md` found |
|
|
153
|
+
| Cursor | `.cursor/` directory exists OR `.cursorrules` file found |
|
|
154
|
+
|
|
155
|
+
Save all detected IDE targets to the scan data. Example:
|
|
156
|
+
```
|
|
157
|
+
IDE targets: Claude Code (always), GitHub Copilot (detected: .github/ exists), Cursor (not detected)
|
|
158
|
+
```
|
|
159
|
+
|
|
145
160
|
**Store results as: `ReconProfile`** — write to `.crewkit/scan-phase1-recon.md` for persistence.
|
|
146
161
|
|
|
147
162
|
Report: "Phase 1 complete. Detected: [stacks], [CI], [DBs], [build/test commands]."
|
|
@@ -393,6 +408,9 @@ Compile all profiles into a single summary and present it to the user.
|
|
|
393
408
|
- Build: `[command]`
|
|
394
409
|
- Test: `[command]`
|
|
395
410
|
- Dev server: `[command]` (if detected)
|
|
411
|
+
|
|
412
|
+
## IDE Targets
|
|
413
|
+
- [list each detected IDE — e.g., "Claude Code (always), GitHub Copilot (detected: .github/ exists)"]
|
|
396
414
|
```
|
|
397
415
|
|
|
398
416
|
### Save profile
|
|
@@ -883,18 +901,23 @@ Write calibrated hooks to `.claude/hooks/`.
|
|
|
883
901
|
|
|
884
902
|
---
|
|
885
903
|
|
|
886
|
-
### Step 7 — `.claude/skills/` (templates
|
|
904
|
+
### Step 7 — `.claude/skills/` (templates + references)
|
|
887
905
|
|
|
888
|
-
Read all
|
|
889
|
-
- `full-workflow/SKILL.md`
|
|
906
|
+
Read all core skill templates from `~/.claude/skills/crewkit-setup/templates/skills/`:
|
|
907
|
+
- `full-workflow/SKILL.md` + `full-workflow/references/`
|
|
890
908
|
- `hotfix/SKILL.md`
|
|
891
909
|
- `explore-and-plan/SKILL.md`
|
|
892
910
|
- `review-pr/SKILL.md`
|
|
893
911
|
|
|
894
|
-
Copy each skill template to `.claude/skills/[name]/SKILL.md`.
|
|
912
|
+
Copy each skill template to `.claude/skills/[name]/SKILL.md`. **If the template has a `references/` subdirectory, copy it too.**
|
|
895
913
|
|
|
896
914
|
These skill templates are **stack-agnostic** by design — they reference `.ai/memory/commands.md` for build/test commands and `.ai/memory/` for project context. No variable substitution needed.
|
|
897
915
|
|
|
916
|
+
**Skill design principle — inline vs. references:**
|
|
917
|
+
- **Inline** in SKILL.md: content needed on every invocation (commands, classification tables, return format)
|
|
918
|
+
- **`references/`**: content needed only on certain branches (fix loop policies, stack-specific adapters, error catalogs). The SKILL.md tells the agent WHEN to load each reference.
|
|
919
|
+
- Never extract always-needed content to references — it adds tool calls without benefit.
|
|
920
|
+
|
|
898
921
|
---
|
|
899
922
|
|
|
900
923
|
### Step 8 — `.claude/QUICKSTART.md` (onboarding guide)
|
|
@@ -976,6 +999,22 @@ For any placeholder tokens, add a comment in the profile or tell the user to fil
|
|
|
976
999
|
|
|
977
1000
|
---
|
|
978
1001
|
|
|
1002
|
+
### Step 10 — IDE Adapters
|
|
1003
|
+
|
|
1004
|
+
If IDE targets beyond Claude Code were detected in Phase 1 (e.g., GitHub Copilot, Cursor):
|
|
1005
|
+
|
|
1006
|
+
1. For each additional IDE target detected:
|
|
1007
|
+
a. Determine the adapter file path: `~/.claude/skills/crewkit-setup/adapters/{ide}.md`
|
|
1008
|
+
- GitHub Copilot → `adapters/copilot.md`
|
|
1009
|
+
- Cursor → `adapters/cursor.md`
|
|
1010
|
+
b. If the adapter file does not exist: WARN the user ("Adapter file not found for [IDE] — skipping") and continue to the next IDE. Do not fail.
|
|
1011
|
+
c. If the adapter file exists: read it completely, then MANDATORY: follow ALL instructions in it. The adapter reads scan data from `.crewkit/last-scan.md` and uses the already-generated Claude Code files (Steps 1-9) as its source.
|
|
1012
|
+
2. If no additional IDE targets were detected, skip this step entirely.
|
|
1013
|
+
|
|
1014
|
+
**Note:** The adapters do NOT duplicate `.ai/memory/` — that directory is shared across all IDEs without transformation.
|
|
1015
|
+
|
|
1016
|
+
---
|
|
1017
|
+
|
|
979
1018
|
## Final Report
|
|
980
1019
|
|
|
981
1020
|
After all generation steps, run the **Completion Checklist** (at the bottom of this document). Then present the summary:
|
|
@@ -994,7 +1033,7 @@ After all generation steps, run the **Completion Checklist** (at the bottom of t
|
|
|
994
1033
|
- `.claude/napkin.md` — priorities board
|
|
995
1034
|
- `.claude/QUICKSTART.md` — onboarding guide
|
|
996
1035
|
- `.mcp.json` — [N] MCP servers
|
|
997
|
-
- Validation: [N]/
|
|
1036
|
+
- Validation: [N]/17 checks passed
|
|
998
1037
|
|
|
999
1038
|
## Commands detected
|
|
1000
1039
|
- Build: `[command]`
|
|
@@ -1046,5 +1085,7 @@ Before presenting the Final Report, go through EVERY item. Fix failures before r
|
|
|
1046
1085
|
- [ ] `.crewkit/last-scan.md` — exists with full profile including Domain section
|
|
1047
1086
|
- [ ] `.crewkit/scan-phase*.md` — all 4 phase files exist with content
|
|
1048
1087
|
- [ ] No Portuguese in any generated file (only in user-facing output)
|
|
1088
|
+
- [ ] If Copilot target detected: `.github/copilot-instructions.md` exists and contains the project hard rules
|
|
1089
|
+
- [ ] If Cursor target detected: `.cursor/rules/project.md` exists and has `alwaysApply: true` frontmatter
|
|
1049
1090
|
|
|
1050
|
-
Report checklist results as: "Validation: X/
|
|
1091
|
+
Report checklist results as: "Validation: X/17 checks passed." If any failed, list which ones and why.
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Adapter: GitHub Copilot
|
|
2
|
+
|
|
3
|
+
This adapter is executed during Phase 7, Step 10 of `/crewkit-setup`.
|
|
4
|
+
You are the AI. Follow every instruction in this file to generate GitHub Copilot-compatible context files.
|
|
5
|
+
|
|
6
|
+
**Input:** Read `.crewkit/last-scan.md` for the project profile. The Claude Code files generated in Steps 1-9 are your source of truth.
|
|
7
|
+
**Output:** Files under `.github/` that mirror the Claude Code setup for GitHub Copilot.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Rules for this adapter
|
|
12
|
+
|
|
13
|
+
1. All generated files MUST be in **English**.
|
|
14
|
+
2. Do NOT duplicate `.ai/memory/` — it is shared between all IDEs. No transformation needed.
|
|
15
|
+
3. `model:` frontmatter from `.claude/agents/*.md` is Claude Code-only — strip it.
|
|
16
|
+
4. Skills are lossy when converted to Copilot prompts — extract workflow intent only, drop multi-agent orchestration mechanics.
|
|
17
|
+
5. Create `.github/` subdirectories if they do not exist.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Step C1 — `.github/copilot-instructions.md`
|
|
22
|
+
|
|
23
|
+
**Source:** `CLAUDE.md`
|
|
24
|
+
**Transformation:** Reformat for Copilot. Remove the Agent Discipline, Skills (slash commands), Architect Decision Gate, and Test Safety Loop sections — these are Claude Code-specific orchestration mechanics that do not apply to Copilot. Keep the hard rules, overview, memory loading instructions, and output format.
|
|
25
|
+
|
|
26
|
+
**Expected output format:**
|
|
27
|
+
```markdown
|
|
28
|
+
# [PROJECT NAME] — Copilot Instructions
|
|
29
|
+
|
|
30
|
+
## Overview
|
|
31
|
+
[1-2 sentences from CLAUDE.md overview — what the project is, main stack]
|
|
32
|
+
[Business domain: what it does, core entities, risk profile]
|
|
33
|
+
|
|
34
|
+
**Stack:** [stacks]
|
|
35
|
+
**Architecture:** [key patterns]
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Hard rules (apply to every response)
|
|
40
|
+
|
|
41
|
+
[Numbered list — copy from CLAUDE.md hard rules verbatim. These are non-negotiable.]
|
|
42
|
+
|
|
43
|
+
1. [Rule 1]
|
|
44
|
+
2. [Rule 2]
|
|
45
|
+
...
|
|
46
|
+
|
|
47
|
+
Details for each rule → `.ai/memory/conventions.md`
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Project Memory (`.ai/memory/`)
|
|
52
|
+
|
|
53
|
+
Load context on demand — do not load all files every time:
|
|
54
|
+
|
|
55
|
+
| File | When to load |
|
|
56
|
+
|------|-------------|
|
|
57
|
+
| `architecture.md` | Always — modules, layers, dependencies |
|
|
58
|
+
| `conventions.md` | Always — naming, patterns, anti-patterns |
|
|
59
|
+
| `commands.md` | When running build/test/deploy |
|
|
60
|
+
| `testing.md` | When creating or running tests |
|
|
61
|
+
| `lessons-{domain}.md` | When working on that domain |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Output Format
|
|
66
|
+
|
|
67
|
+
Always return:
|
|
68
|
+
- **Summary** — what was done
|
|
69
|
+
- **Files changed** — list with brief description
|
|
70
|
+
- **Tests** — pass/fail count (if tests were run)
|
|
71
|
+
- **Risks / Next steps** — if any
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**What to REMOVE from CLAUDE.md:**
|
|
75
|
+
- `## Agent Discipline` section (orchestrator/worker model is Claude Code-only)
|
|
76
|
+
- `## Skills (slash commands)` section (slash commands are Claude Code-only)
|
|
77
|
+
- `## Architect Decision Gate` section
|
|
78
|
+
- `## Test Safety Loop` section (keep the intent as a single sentence in the output format instead)
|
|
79
|
+
|
|
80
|
+
**What to ADD:**
|
|
81
|
+
- At the top, after the title: `> These instructions apply to all GitHub Copilot interactions in this repository.`
|
|
82
|
+
- In the output format section: `> Always think step by step. Never report success with failing tests.`
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Step C2 — `.github/instructions/*.instructions.md`
|
|
87
|
+
|
|
88
|
+
**Source:** `.claude/rules/*.md`
|
|
89
|
+
**Transformation:** Convert frontmatter to Copilot format. Keep glob patterns and all rule content unchanged.
|
|
90
|
+
|
|
91
|
+
Claude Code frontmatter format:
|
|
92
|
+
```markdown
|
|
93
|
+
---
|
|
94
|
+
description: "Node.js coding rules — applied when editing src/**/*.{js,ts}"
|
|
95
|
+
globs: "src/**/*.{js,ts}"
|
|
96
|
+
---
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Copilot instructions format:
|
|
100
|
+
```markdown
|
|
101
|
+
---
|
|
102
|
+
applyTo: "src/**/*.{js,ts}"
|
|
103
|
+
---
|
|
104
|
+
# Node.js Rules
|
|
105
|
+
|
|
106
|
+
[rule content unchanged]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Mapping:**
|
|
110
|
+
- `globs:` → `applyTo:`
|
|
111
|
+
- `description:` → remove from frontmatter, use as the first `# heading` in the body instead
|
|
112
|
+
- All rule content (body): copy verbatim
|
|
113
|
+
|
|
114
|
+
**File naming:** `.claude/rules/dotnet.md` → `.github/instructions/dotnet.instructions.md`
|
|
115
|
+
Strip any existing `.md` suffix and append `.instructions.md`.
|
|
116
|
+
|
|
117
|
+
**Example — source `.claude/rules/node.md`:**
|
|
118
|
+
```markdown
|
|
119
|
+
---
|
|
120
|
+
description: "Node.js coding rules — applied when editing src/**/*.{js,ts}"
|
|
121
|
+
globs: "src/**/*.{js,ts}"
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
# Node.js Rules
|
|
125
|
+
|
|
126
|
+
- Use async/await, not .then() chains
|
|
127
|
+
- Validate all external input at the handler boundary
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Example — target `.github/instructions/node.instructions.md`:**
|
|
131
|
+
```markdown
|
|
132
|
+
---
|
|
133
|
+
applyTo: "src/**/*.{js,ts}"
|
|
134
|
+
---
|
|
135
|
+
# Node.js Rules
|
|
136
|
+
|
|
137
|
+
- Use async/await, not .then() chains
|
|
138
|
+
- Validate all external input at the handler boundary
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Step C3 — `.github/agents/*.agent.md`
|
|
144
|
+
|
|
145
|
+
**Source:** `.claude/agents/*.md`
|
|
146
|
+
**Transformation:** Strip `model:` frontmatter line. Keep `name:` and `description:`. Remove the `<!-- crewkit:context-start -->...<!-- crewkit:context-end -->` block — Copilot agents do not use this inline context injection. Keep the full agent role description and instructions.
|
|
147
|
+
|
|
148
|
+
**Copilot agent frontmatter format:**
|
|
149
|
+
```markdown
|
|
150
|
+
---
|
|
151
|
+
name: explorer
|
|
152
|
+
description: "Read-only reconnaissance agent. Maps files, dependencies, and caller chains."
|
|
153
|
+
tools:
|
|
154
|
+
- read_file
|
|
155
|
+
- list_directory
|
|
156
|
+
- search_files
|
|
157
|
+
---
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**`tools:` mapping — add if applicable:**
|
|
161
|
+
| Agent | Suggested Copilot tools |
|
|
162
|
+
|-------|------------------------|
|
|
163
|
+
| explorer | `read_file`, `list_directory`, `search_files` |
|
|
164
|
+
| architect | `read_file`, `search_files` |
|
|
165
|
+
| coder | `read_file`, `create_file`, `replace_string_in_file` |
|
|
166
|
+
| tester | `read_file`, `create_file`, `run_in_terminal` |
|
|
167
|
+
| reviewer | `read_file`, `search_files` |
|
|
168
|
+
|
|
169
|
+
**What to strip:**
|
|
170
|
+
- `model:` line
|
|
171
|
+
- The entire `<!-- crewkit:context-start -->...<!-- crewkit:context-end -->` block (inclusive)
|
|
172
|
+
|
|
173
|
+
**File naming:** `.claude/agents/explorer.md` → `.github/agents/explorer.agent.md`
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Step C4 — `.github/prompts/*.prompt.md`
|
|
178
|
+
|
|
179
|
+
**Source:** `.claude/skills/*/SKILL.md`
|
|
180
|
+
**Transformation:** LOSSY. Extract the workflow intent as single-shot guidance. Drop multi-agent orchestration, agent routing, fix loops, and exit gates — Copilot prompts are single-turn, not multi-agent pipelines.
|
|
181
|
+
|
|
182
|
+
**Extract:**
|
|
183
|
+
- What the skill is for (description)
|
|
184
|
+
- The key steps the user should follow or the AI should perform
|
|
185
|
+
- Any output format requirements
|
|
186
|
+
|
|
187
|
+
**Drop:**
|
|
188
|
+
- `→ explorer → architect → coder → tester → reviewer` routing
|
|
189
|
+
- Fix loop mechanics (`FAIL → fix → re-run`)
|
|
190
|
+
- Exit gate conditions
|
|
191
|
+
- Phase breakdown with parallel agents
|
|
192
|
+
- Any reference to Claude Code slash commands (`/compact`, `/crewkit-setup`)
|
|
193
|
+
|
|
194
|
+
**Example — source `full-workflow/SKILL.md` intent:**
|
|
195
|
+
```
|
|
196
|
+
Routes tasks through explore → implement → test → review agents.
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Example — target `.github/prompts/full-workflow.prompt.md`:**
|
|
200
|
+
```markdown
|
|
201
|
+
---
|
|
202
|
+
name: full-workflow
|
|
203
|
+
description: "Complete development workflow: explore, implement, test, and review."
|
|
204
|
+
---
|
|
205
|
+
# Full Workflow
|
|
206
|
+
|
|
207
|
+
Use this prompt to complete a development task end-to-end.
|
|
208
|
+
|
|
209
|
+
## Steps
|
|
210
|
+
1. **Explore** — Read relevant files. Map dependencies and callers. Do not modify anything.
|
|
211
|
+
2. **Implement** — Write the smallest correct diff. Follow all rules in `.ai/memory/conventions.md`.
|
|
212
|
+
3. **Test** — Verify tests pass. Add tests if missing. Never report success with failing tests.
|
|
213
|
+
4. **Review** — Check for bugs, security issues, and rule violations before finalizing.
|
|
214
|
+
|
|
215
|
+
## Output
|
|
216
|
+
- Summary of changes
|
|
217
|
+
- Files changed with brief description
|
|
218
|
+
- Test results (pass/fail count)
|
|
219
|
+
- Any risks or follow-up needed
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**File naming:** `full-workflow/SKILL.md` → `.github/prompts/full-workflow.prompt.md`
|
|
223
|
+
Use the skill directory name as the prompt file name.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Completion Checklist — Copilot Adapter
|
|
228
|
+
|
|
229
|
+
Before reporting done, verify each item:
|
|
230
|
+
|
|
231
|
+
- [ ] `.github/copilot-instructions.md` — exists, contains hard rules, does NOT contain Agent Discipline or slash command sections
|
|
232
|
+
- [ ] `.github/instructions/` — one `.instructions.md` file per `.claude/rules/*.md` source file
|
|
233
|
+
- [ ] `.github/instructions/*.instructions.md` — each has `applyTo:` frontmatter (not `globs:`)
|
|
234
|
+
- [ ] `.github/agents/` — one `.agent.md` per `.claude/agents/*.md` source file
|
|
235
|
+
- [ ] `.github/agents/*.agent.md` — no `model:` line, no `crewkit:context-start` block, has `tools:` frontmatter
|
|
236
|
+
- [ ] `.github/prompts/` — one `.prompt.md` per `.claude/skills/*/SKILL.md` source file
|
|
237
|
+
- [ ] `.github/prompts/*.prompt.md` — each has `name:` and `description:` frontmatter, no multi-agent routing language
|
|
238
|
+
- [ ] `.ai/memory/` — NOT duplicated under `.github/` (shared, no copy needed)
|
|
239
|
+
- [ ] No Portuguese in any generated file
|