crewkit 1.1.5 → 1.1.6

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 CHANGED
@@ -94,10 +94,9 @@ npx crewkit add impact # analise de blast radius
94
94
  ## IDEs suportadas
95
95
 
96
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`
97
+ - **GitHub Copilot** — gera `copilot-instructions.md`, agents, skills nativas, prompts, instructions por stack e guardrails de seguranca
99
98
 
100
- A IDE e detectada automaticamente durante o setup. `.ai/memory/` e compartilhado entre todas as IDEs.
99
+ A IDE e selecionada pelo usuario durante o setup. `.ai/memory/` e compartilhado entre as IDEs.
101
100
 
102
101
  ## O que e commitado vs ignorado
103
102
 
@@ -111,7 +110,7 @@ A IDE e detectada automaticamente durante o setup. `.ai/memory/` e compartilhado
111
110
  ## Requisitos
112
111
 
113
112
  - Node.js >= 20
114
- - Claude Code, GitHub Copilot ou Cursor
113
+ - Claude Code ou GitHub Copilot
115
114
  - Opus ou Sonnet recomendado (Haiku funciona mas gera scans mais rasos)
116
115
 
117
116
  ## Licenca
@@ -216,10 +215,9 @@ npx crewkit add impact # blast radius analysis
216
215
  ## Supported IDEs
217
216
 
218
217
  - **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`
218
+ - **GitHub Copilot** — generates `copilot-instructions.md`, agents, native skills, prompts, per-stack instructions and security guardrails
221
219
 
222
- IDE is auto-detected during setup. `.ai/memory/` is shared across all IDEs.
220
+ IDE is selected by the user during setup. `.ai/memory/` is shared across IDEs.
223
221
 
224
222
  ## What gets committed vs ignored
225
223
 
@@ -233,7 +231,7 @@ IDE is auto-detected during setup. `.ai/memory/` is shared across all IDEs.
233
231
  ## Requirements
234
232
 
235
233
  - Node.js >= 20
236
- - Claude Code, GitHub Copilot, or Cursor
234
+ - Claude Code or GitHub Copilot
237
235
  - Opus or Sonnet recommended (Haiku works but produces shallower scans)
238
236
 
239
237
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crewkit",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Context engineering framework for AI-assisted development. One command to set up agents, skills, hooks, rules, and memory for your project.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,7 +20,6 @@
20
20
  "ai",
21
21
  "claude-code",
22
22
  "copilot",
23
- "cursor",
24
23
  "agents",
25
24
  "skills",
26
25
  "mcp",
package/skill/SKILL.md CHANGED
@@ -15,7 +15,7 @@ This skill scans the current project's codebase and generates a complete, calibr
15
15
 
16
16
  ### Critical rules (read before starting)
17
17
  1. **Language:** All generated files MUST be in **English**. User-facing output (reports during execution) matches the user's language.
18
- 2. **Zero questions:** Do not pause for user input except for re-run detection ([R]/[M]/[C]).
18
+ 2. **Zero questions:** Do not pause for user input except for re-run detection ([R]/[M]/[C]) and IDE target selection.
19
19
  3. **Validate everything:** After all files are generated, run the completion checklist at the bottom of this document before reporting done.
20
20
  4. **Persist to disk:** Write scan results to `.crewkit/` files at each phase. Read them back before generating. This survives context compaction.
21
21
 
@@ -40,6 +40,21 @@ Check if `.crewkit/version` exists.
40
40
 
41
41
  Wait for user choice. On [R] or [M]: existing `lessons-*.md` files with content are **preserved and merged**, not overwritten — these contain accumulated institutional knowledge.
42
42
 
43
+ ### 3. IDE target selection
44
+
45
+ **Always ask the user which IDEs to generate context for.**
46
+
47
+ Check if a previous selection exists in `.crewkit/scan-phase1-recon.md`. If it does, show it as the default.
48
+
49
+ > "Which IDEs should I generate context for?"
50
+ > - **[1] Claude Code**
51
+ > - **[2] GitHub Copilot**
52
+ > - **[A] All of the above**
53
+ >
54
+ > You can select multiple (e.g., "1,2"). Default: [previous selection if re-run, or "1" if first run].
55
+
56
+ Accept the user's choice. If the user presses Enter without typing, use the default.
57
+
43
58
  ---
44
59
 
45
60
  ## Phase 0 — Preparation
@@ -51,7 +66,7 @@ If `.claude/` or `CLAUDE.md` or `.ai/memory/` exists:
51
66
  3. Report: "Existing setup backed up to `.crewkit-backup/`"
52
67
 
53
68
  ### Create directory structure
54
- Create directories based on the **selected IDE targets** from Phase 1:
69
+ Create directories based on the **selected IDE targets** from Pre-flight:
55
70
 
56
71
  **Always:**
57
72
  ```
@@ -75,12 +90,8 @@ Create directories based on the **selected IDE targets** from Phase 1:
75
90
  .github/
76
91
  agents/
77
92
  instructions/
78
- ```
79
-
80
- **If Cursor is a selected target:**
81
- ```
82
- .cursor/
83
- rules/
93
+ skills/
94
+ prompts/
84
95
  ```
85
96
 
86
97
  ### Version tracking
@@ -162,35 +173,11 @@ For each stack, detect the build and test commands:
162
173
 
163
174
  Read `package.json` scripts, CI configs, or Makefiles to find the actual commands used in this project. Prefer project-specific over generic.
164
175
 
165
- ### IDE Target Detection
166
-
167
- Detect which IDEs are available. Check **two sources**: project-level signals AND global install markers.
176
+ ### IDE targets
168
177
 
169
- | IDE | Project signals | Global install marker |
170
- |-----|----------------|----------------------|
171
- | Claude Code | `.claude/` directory exists | `~/.claude/skills/crewkit-setup/` exists |
172
- | GitHub Copilot | `.github/` directory exists OR `.github/copilot-instructions.md` found | `~/.copilot/agents/crewkit-setup.md` exists |
173
- | Cursor | `.cursor/` directory exists OR `.cursorrules` file found | `~/.cursor/crewkit-setup.md` exists |
174
-
175
- An IDE is **available** if ANY of its signals match (project OR global).
176
-
177
- **IDE target selection (exception to zero-questions rule):**
178
-
179
- If more than one IDE is available, present the user with a choice:
180
-
181
- > "Multiple IDEs detected. Generate context for which?"
182
- > - **[1] Claude Code**
183
- > - **[2] GitHub Copilot**
184
- > - **[3] Cursor**
185
- > - **[4] All detected**
186
- >
187
- > (Only show IDEs that were detected. Default: all detected.)
188
-
189
- If only one IDE is available, use it without asking.
190
-
191
- Save the **selected** IDE targets to scan data. Example:
178
+ Use the IDE targets selected during Pre-flight (step 3). Include them in the scan data:
192
179
  ```
193
- IDE targets selected: GitHub Copilot
180
+ IDE targets selected: [selected IDEs from pre-flight]
194
181
  ```
195
182
 
196
183
  **Store results as: `ReconProfile`** — write to `.crewkit/scan-phase1-recon.md` for persistence.
@@ -214,10 +201,8 @@ Read existing human-written documentation to understand project context, convent
214
201
  **Existing AI context (from any IDE — preserve, don't discard):**
215
202
  - Existing `CLAUDE.md` (if backed up from a previous setup)
216
203
  - Existing `.ai/memory/` files (if backed up)
217
- - `.cursorrules` or `.cursor/rules/*.md` (Cursor)
218
204
  - `.github/copilot-instructions.md` or `.github/instructions/*.md` (GitHub Copilot)
219
205
  - `.github/agents/*.agent.md` (Copilot agents)
220
- - `AGENTS.md` (Cursor agents)
221
206
 
222
207
  If any of these exist, read them and extract rules, conventions, and patterns to incorporate into the generated setup. This preserves context engineering work done in other IDEs.
223
208
 
@@ -446,7 +431,7 @@ Compile all profiles into a single summary and present it to the user.
446
431
  - Dev server: `[command]` (if detected)
447
432
 
448
433
  ## IDE Targets (selected)
449
- - [list selected IDE targets — e.g., "GitHub Copilot" or "Claude Code, Cursor"]
434
+ - [list selected IDE targets — e.g., "Claude Code" or "Claude Code, GitHub Copilot"]
450
435
  ```
451
436
 
452
437
  ### Save profile
@@ -480,9 +465,9 @@ Generate files based on the **selected IDE targets** from Phase 1. The generatio
480
465
  - **Steps 2-9** (CLAUDE.md, `.claude/agents/`, `.claude/rules/`, `.claude/settings.json`, `.claude/hooks/`, `.claude/skills/`, `.claude/QUICKSTART.md`, `.mcp.json`): ONLY if **Claude Code** is a selected target.
481
466
  - **Step 10** (IDE Adapters): Runs for each non-Claude IDE in the selected targets. Adapters generate directly from scan data + `.ai/memory/` — they do NOT depend on Claude files existing.
482
467
 
483
- If the only selected target is GitHub Copilot or Cursor, Steps 2-9 are **skipped entirely**. The adapter generates the IDE-native files directly.
468
+ If the only selected target is GitHub Copilot, Steps 2-9 are **skipped entirely**. The adapter generates the IDE-native files directly.
484
469
 
485
- **If the user chose [M] (memory only):** generate Step 1 (memory) + the project rules file for the selected IDE (CLAUDE.md / copilot-instructions.md / .cursor/rules/project.md), then update context headers in existing agents. Stop after that.
470
+ **If the user chose [M] (memory only):** generate Step 1 (memory) + the project rules file for the selected IDE (CLAUDE.md / copilot-instructions.md), then update context headers in existing agents. Stop after that.
486
471
 
487
472
  ### Templates directory
488
473
  Templates are located at `~/.claude/skills/crewkit-setup/templates/`. Read them from disk.
@@ -953,7 +938,6 @@ Read all core skill templates from `~/.claude/skills/crewkit-setup/templates/ski
953
938
  - `hotfix/SKILL.md`
954
939
  - `explore-and-plan/SKILL.md`
955
940
  - `review-pr/SKILL.md`
956
-
957
941
  Copy each skill template to `.claude/skills/[name]/SKILL.md`. **If the template has a `references/` subdirectory, copy it too.**
958
942
 
959
943
  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.
@@ -980,6 +964,7 @@ This project uses crewkit for AI-assisted development. Here's how to use it.
980
964
  - `/explore-and-plan <feature>` — map a module and plan before coding (recommended for LARGE tasks)
981
965
  - `/review-pr [number]` — review a pull request
982
966
 
967
+
983
968
  ## How agents work together
984
969
  The orchestrator routes work to specialized agents:
985
970
  - **explorer** (Sonnet) — finds files, maps dependencies — read-only
@@ -1046,14 +1031,11 @@ For any placeholder tokens, add a comment in the profile or tell the user to fil
1046
1031
 
1047
1032
  ### Step 10 — IDE Adapters
1048
1033
 
1049
- For each **non-Claude IDE** in the selected targets (GitHub Copilot, Cursor):
1034
+ If **GitHub Copilot** is a selected target:
1050
1035
 
1051
- 1. For each selected non-Claude IDE target:
1052
- a. Determine the adapter file path: `~/.claude/skills/crewkit-setup/adapters/{ide}.md`
1053
- - GitHub Copilot `adapters/copilot.md`
1054
- - Cursor → `adapters/cursor.md`
1055
- 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.
1056
- c. If the adapter file exists: read it completely, then MANDATORY: follow ALL instructions in it.
1036
+ 1. Determine the adapter file path: `~/.claude/skills/crewkit-setup/adapters/copilot.md`
1037
+ 2. If the adapter file does not exist: WARN the user ("Adapter file not found for Copilot — skipping"). Do not fail.
1038
+ 3. If the adapter file exists: read it completely, then MANDATORY: follow ALL instructions in it.
1057
1039
 
1058
1040
  **Source of truth for adapters (in priority order):**
1059
1041
  1. If Claude Code files exist (Steps 2-9 were generated): use them as the primary source, converting content to the target IDE format.
@@ -1089,14 +1071,11 @@ After all generation steps, run the **Completion Checklist** (at the bottom of t
1089
1071
  - `.mcp.json` — [N] MCP servers
1090
1072
 
1091
1073
  ## Generated files (GitHub Copilot) — only if selected
1092
- - `.github/copilot-instructions.md` — project rules
1093
- - `.github/instructions/` — [N] per-stack instruction files
1094
- - `.github/agents/` — 5 agent files
1095
-
1096
- ## Generated files (Cursor) only if selected
1097
- - `.cursor/rules/project.md` — project rules
1098
- - `.cursor/rules/` — [N] per-stack rule files
1099
- - `AGENTS.md` — all agents
1074
+ - `.github/copilot-instructions.md` — project rules (no frontmatter, includes session start + quality gate + safety rules)
1075
+ - `.github/instructions/` — [N] per-stack instruction files + sensitive-files guardrail
1076
+ - `.github/agents/` — 5 agent files (with model, tools, mcp-servers)
1077
+ - `.github/skills/` — 4 native skills
1078
+ - `.github/prompts/` 4 IDE fallback prompts
1100
1079
 
1101
1080
  ## Validation: [X]/[Y] checks passed
1102
1081
 
@@ -1108,7 +1087,6 @@ After all generation steps, run the **Completion Checklist** (at the bottom of t
1108
1087
  [Adapt next steps to the selected IDE:]
1109
1088
  - Claude Code: "Review CLAUDE.md → run /full-workflow"
1110
1089
  - Copilot: "Review .github/copilot-instructions.md → open Copilot Chat"
1111
- - Cursor: "Review .cursor/rules/project.md → start coding"
1112
1090
  - All: "Commit the setup"
1113
1091
  ```
1114
1092
 
@@ -1144,17 +1122,16 @@ Before presenting the Final Report, go through EVERY item. Fix failures before r
1144
1122
  - [ ] `.mcp.json` — read back, verify valid JSON, has context7
1145
1123
  - [ ] `.claude/hooks/*.sh` — run `bash -n` on each, all 4 pass syntax check
1146
1124
  - [ ] `.claude/rules/` — at least 1 per detected stack, glob patterns match real files in project
1147
- - [ ] `.claude/skills/` — all 4 core skills have SKILL.md
1125
+ - [ ] `.claude/skills/` — all 4 core skills have SKILL.md (full-workflow, hotfix, explore-and-plan, review-pr)
1148
1126
 
1149
1127
  ### Content checks (Copilot — only if Copilot is a selected target)
1150
- - [ ] `.github/copilot-instructions.md` — exists, contains project hard rules, no Claude-specific sections
1128
+ - [ ] `.github/copilot-instructions.md` — exists, **NO frontmatter**, contains hard rules + session start + quality gate + safety rules, no Claude-specific sections
1151
1129
  - [ ] `.github/instructions/` — at least 1 per detected stack with `applyTo:` frontmatter
1152
- - [ ] `.github/agents/`5 agent files with `.agent.md` extension, no `model:` lines
1153
-
1154
- ### Content checks (Cursor only if Cursor is a selected target)
1155
- - [ ] `.cursor/rules/project.md`exists, has `alwaysApply: true` frontmatter, no Claude-specific sections
1156
- - [ ] `.cursor/rules/` — at least 1 per detected stack with `globs:` frontmatter
1157
- - [ ] `AGENTS.md` — exists at project root with all 5 agents as `##` sections
1130
+ - [ ] `.github/instructions/sensitive-files.instructions.md`exists with glob for `.env*`, `credentials*`, `secrets*`, `*.key`, `*.pem`
1131
+ - [ ] `.github/agents/` — 5 agent files with `.agent.md` extension, each has `tools:` with canonical aliases (`read`, `edit`, `search`, `execute`), has `model:` converted to Copilot names, body under 30,000 chars
1132
+ - [ ] `.github/agents/coder.agent.md` + `tester.agent.md` have `mcp-servers:` if `.mcp.json` exists
1133
+ - [ ] `.github/skills/`4 native skill files with `name:` + `description:` frontmatter
1134
+ - [ ] `.github/prompts/` — 4 IDE fallback prompts with `description:` + `agent: "agent"` frontmatter
1158
1135
 
1159
1136
  ### Integrity checks (always)
1160
1137
  - [ ] `.crewkit/last-scan.md` — exists with full profile including Domain section
@@ -15,8 +15,8 @@ You are the AI. Follow every instruction in this file to generate GitHub Copilot
15
15
 
16
16
  1. All generated files MUST be in **English**.
17
17
  2. Do NOT duplicate `.ai/memory/` — it is shared between all IDEs. No transformation needed.
18
- 3. `model:` frontmatter from `.claude/agents/*.md` is Claude Code-only strip it.
19
- 4. Skills are lossy when converted to Copilot prompts extract workflow intent only, drop multi-agent orchestration mechanics.
18
+ 3. Agent `model:` from `.claude/agents/*.md` MUST be preserved and converted to Copilot model names (see Step C3).
19
+ 4. Skills can be converted **natively** to `.github/skills/` (not lossy). Prompt files (`.prompt.md`) are generated as an additional IDE-only fallback.
20
20
  5. Create `.github/` subdirectories if they do not exist.
21
21
 
22
22
  ---
@@ -24,12 +24,37 @@ You are the AI. Follow every instruction in this file to generate GitHub Copilot
24
24
  ## Step C1 — `.github/copilot-instructions.md`
25
25
 
26
26
  **Source:** `CLAUDE.md` if it exists, otherwise `.crewkit/last-scan.md` + `.ai/memory/conventions.md`
27
- **Transformation:** If using CLAUDE.md, reformat for Copilot — remove Agent Discipline, Skills (slash commands), Architect Decision Gate, and Test Safety Loop sections (Claude Code-specific). Keep hard rules, overview, memory loading instructions, and output format. If generating from scan data, create the content directly using the project profile and conventions.
27
+
28
+ **IMPORTANT:** This file has **NO frontmatter**. It is plain Markdown only.
29
+
30
+ **Transformation:** If using CLAUDE.md, reformat for Copilot — remove Agent Discipline, Skills (slash commands), Architect Decision Gate, and Test Safety Loop sections (Claude Code-specific). If generating from scan data, create the content directly using the project profile and conventions.
31
+
32
+ **What to INCLUDE (absorb from files that have no Copilot equivalent):**
33
+
34
+ From `CLAUDE.md`:
35
+ - Overview, hard rules, memory loading instructions, output format
36
+
37
+ From `.claude/QUICKSTART.md` (onboarding — no Copilot equivalent):
38
+ - Day-to-day workflow section (which agents to use for what)
39
+
40
+ From `.claude/hooks/session-start.sh` (no Copilot equivalent):
41
+ - "At the start of every conversation, read `.ai/memory/architecture.md` and `.ai/memory/conventions.md`. Check `git log --oneline -5` for recent work."
42
+
43
+ From `.claude/hooks/stop-quality-gate.sh` (no Copilot equivalent):
44
+ - "Before completing any task, run build and test commands from `.ai/memory/commands.md`. Never report success with failing tests or broken builds."
45
+
46
+ From `.claude/napkin.md` (no Copilot equivalent):
47
+ - "Read `.claude/napkin.md` at the start of every session for current priorities and blockers."
48
+
49
+ From `.claude/settings.json` deny list (no Copilot equivalent):
50
+ - "Never execute destructive commands: `rm -rf`, `sudo`, `DROP DATABASE`, `git push --force`."
28
51
 
29
52
  **Expected output format:**
30
53
  ```markdown
31
54
  # [PROJECT NAME] — Copilot Instructions
32
55
 
56
+ > These instructions apply to all GitHub Copilot interactions in this repository.
57
+
33
58
  ## Overview
34
59
  [1-2 sentences — what the project is, main stack]
35
60
  [Business domain: what it does, core entities, risk profile]
@@ -51,6 +76,32 @@ Details for each rule → `.ai/memory/conventions.md`
51
76
 
52
77
  ---
53
78
 
79
+ ## Session start
80
+
81
+ At the start of every conversation:
82
+ 1. Read `.ai/memory/architecture.md` and `.ai/memory/conventions.md`
83
+ 2. Read `.claude/napkin.md` for current priorities and blockers
84
+ 3. Check `git log --oneline -5` and `git status` for recent work context
85
+
86
+ ---
87
+
88
+ ## Quality gate
89
+
90
+ Before completing any task:
91
+ 1. Run the build command: `[detected build command]`
92
+ 2. Run the test command: `[detected test command]`
93
+ 3. Never report success with failing tests or broken builds
94
+
95
+ ---
96
+
97
+ ## Safety rules
98
+
99
+ - Never edit sensitive files: `.env`, `.env.*`, `credentials.*`, `secrets.*`, `*.key`, `*.pem`
100
+ - Never execute destructive commands: `rm -rf`, `sudo`, `DROP DATABASE`, `git push --force`
101
+ - Move secrets to environment variables, never hardcode them
102
+
103
+ ---
104
+
54
105
  ## Project Memory (`.ai/memory/`)
55
106
 
56
107
  Load context on demand — do not load all files every time:
@@ -65,6 +116,16 @@ Load context on demand — do not load all files every time:
65
116
 
66
117
  ---
67
118
 
119
+ ## Workflow
120
+
121
+ - Use `@explorer` to find files, map dependencies — read-only
122
+ - Use `@architect` to evaluate design options — read-only
123
+ - Use `@coder` to implement the smallest correct diff
124
+ - Use `@tester` to create tests, run full suite
125
+ - Use `@reviewer` to review code — find real bugs, no noise
126
+
127
+ ---
128
+
68
129
  ## Output Format
69
130
 
70
131
  Always return:
@@ -72,23 +133,22 @@ Always return:
72
133
  - **Files changed** — list with brief description
73
134
  - **Tests** — pass/fail count (if tests were run)
74
135
  - **Risks / Next steps** — if any
136
+
137
+ > Always think step by step. Never report success with failing tests.
75
138
  ```
76
139
 
77
140
  **What to REMOVE from CLAUDE.md:**
78
141
  - `## Agent Discipline` section (orchestrator/worker model is Claude Code-only)
79
142
  - `## Skills (slash commands)` section (slash commands are Claude Code-only)
80
143
  - `## Architect Decision Gate` section
81
- - `## Test Safety Loop` section (keep the intent as a single sentence in the output format instead)
82
-
83
- **What to ADD:**
84
- - At the top, after the title: `> These instructions apply to all GitHub Copilot interactions in this repository.`
85
- - In the output format section: `> Always think step by step. Never report success with failing tests.`
144
+ - `## Test Safety Loop` section (absorbed into Quality gate section above)
86
145
 
87
146
  ---
88
147
 
89
148
  ## Step C2 — `.github/instructions/*.instructions.md`
90
149
 
91
150
  **Source:** `.claude/rules/*.md` if they exist, otherwise generate directly from scan data (detected stacks + HIGH/MEDIUM confidence patterns).
151
+
92
152
  **Transformation:** If using Claude rules, convert frontmatter to Copilot format — keep glob patterns and rule content unchanged. If generating from scan data, create one instructions file per detected stack with appropriate glob patterns and rules.
93
153
 
94
154
  Claude Code frontmatter format:
@@ -99,7 +159,7 @@ globs: "src/**/*.{js,ts}"
99
159
  ---
100
160
  ```
101
161
 
102
- Copilot instructions format:
162
+ Copilot instructions format (**no `description:` in frontmatter**):
103
163
  ```markdown
104
164
  ---
105
165
  applyTo: "src/**/*.{js,ts}"
@@ -114,31 +174,29 @@ applyTo: "src/**/*.{js,ts}"
114
174
  - `description:` → remove from frontmatter, use as the first `# heading` in the body instead
115
175
  - All rule content (body): copy verbatim
116
176
 
177
+ **Optional frontmatter field:**
178
+ - `excludeAgent:` — set to `"code-review"` or `"coding-agent"` to hide instructions from a specific Copilot agent. Omit to apply to all agents. Only add if a rule is clearly irrelevant to one agent type.
179
+
117
180
  **File naming:** `.claude/rules/dotnet.md` → `.github/instructions/dotnet.instructions.md`
118
181
  Strip any existing `.md` suffix and append `.instructions.md`.
119
182
 
120
- **Example source `.claude/rules/node.md`:**
121
- ```markdown
122
- ---
123
- description: "Node.js coding rules — applied when editing src/**/*.{js,ts}"
124
- globs: "src/**/*.{js,ts}"
125
- ---
126
-
127
- # Node.js Rules
183
+ ### Additional instructions file: sensitive files guardrail
128
184
 
129
- - Use async/await, not .then() chains
130
- - Validate all external input at the handler boundary
131
- ```
185
+ Generate an extra instructions file that replaces the `protect-sensitive-files.sh` hook:
132
186
 
133
- **Example — target `.github/instructions/node.instructions.md`:**
187
+ **File:** `.github/instructions/sensitive-files.instructions.md`
134
188
  ```markdown
135
189
  ---
136
- applyTo: "src/**/*.{js,ts}"
190
+ applyTo: "**/.env*,**/credentials*,**/secrets*,**/*.key,**/*.pem,**/appsettings.*.json"
137
191
  ---
138
- # Node.js Rules
192
+ # Sensitive Files — Do Not Edit
139
193
 
140
- - Use async/await, not .then() chains
141
- - Validate all external input at the handler boundary
194
+ These files contain secrets or environment-specific configuration.
195
+
196
+ - NEVER modify these files directly
197
+ - NEVER write secrets, API keys, or passwords into any file
198
+ - Move all secrets to environment variables
199
+ - If a secret is needed, reference it via `process.env.VAR_NAME` or the equivalent for the stack
142
200
  ```
143
201
 
144
202
  ---
@@ -146,43 +204,147 @@ applyTo: "src/**/*.{js,ts}"
146
204
  ## Step C3 — `.github/agents/*.agent.md`
147
205
 
148
206
  **Source:** `.claude/agents/*.md` if they exist, otherwise generate directly from the agent templates at `~/.claude/skills/crewkit-setup/templates/agents/` (or from scan data if templates are unavailable).
149
- **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. When generating from templates, inject project context from `.crewkit/last-scan.md` into each agent.
207
+
208
+ **Transformation:** Convert `model:` to Copilot model names. Remove the `<!-- crewkit:context-start -->...<!-- crewkit:context-end -->` block. Add `tools:` and optionally `mcp-servers:` to frontmatter. Keep the full agent role description and instructions. When generating from templates, inject project context from `.crewkit/last-scan.md` into each agent.
150
209
 
151
210
  **Copilot agent frontmatter format:**
152
- ```markdown
211
+ ```yaml
153
212
  ---
154
213
  name: explorer
155
214
  description: "Read-only reconnaissance agent. Maps files, dependencies, and caller chains."
156
215
  tools:
157
- - read_file
158
- - list_directory
159
- - search_files
216
+ - read
217
+ - search
160
218
  ---
161
219
  ```
162
220
 
163
- **`tools:` mapping add if applicable:**
164
- | Agent | Suggested Copilot tools |
165
- |-------|------------------------|
166
- | explorer | `read_file`, `list_directory`, `search_files` |
167
- | architect | `read_file`, `search_files` |
168
- | coder | `read_file`, `create_file`, `replace_string_in_file` |
169
- | tester | `read_file`, `create_file`, `run_in_terminal` |
170
- | reviewer | `read_file`, `search_files` |
221
+ **Model conversion (preserve, don't remove):**
222
+
223
+ | Claude Code `model:` | Copilot `model:` |
224
+ |----------------------|-----------------|
225
+ | `opus` | `"Claude Opus 4"` |
226
+ | `sonnet` | `"Claude Sonnet 4"` |
227
+ | (omitted) | (omit uses default) |
228
+
229
+ If the project uses multiple AI providers, use an array for fallback: `model: ["Claude Sonnet 4", "GPT-4o"]`
230
+
231
+ **`tools:` mapping — use canonical Copilot tool aliases:**
232
+
233
+ | Agent | tools | Rationale |
234
+ |-------|-------|-----------|
235
+ | explorer | `["read", "search"]` | Read-only reconnaissance |
236
+ | architect | `["read", "search"]` | Read-only design review |
237
+ | coder | `["read", "edit", "search", "execute"]` | Full implementation access |
238
+ | tester | `["read", "edit", "search", "execute"]` | Test creation + execution |
239
+ | reviewer | `["read", "search"]` | Read-only code review |
240
+
241
+ **Available canonical tool aliases:** `read`, `edit`, `search`, `execute` (shell), `web` (search/fetch), `agent` (subagents), `todo` (task management). Use `["*"]` for all tools.
242
+
243
+ **Optional: `mcp-servers:` field.** If the project uses MCP servers (detected from `.mcp.json`), add them to relevant agents (coder, tester):
244
+ ```yaml
245
+ mcp-servers:
246
+ context7:
247
+ type: "local"
248
+ command: "npx"
249
+ args: ["-y", "@context7/mcp-server"]
250
+ tools: ["*"]
251
+ postgres:
252
+ type: "local"
253
+ command: "npx"
254
+ args: ["-y", "@modelcontextprotocol/server-postgres"]
255
+ tools: ["*"]
256
+ env:
257
+ DATABASE_URL: ${{ secrets.COPILOT_MCP_DATABASE_URL }}
258
+ ```
259
+
260
+ Only add MCP servers to agents that need them (coder + tester for DB servers, all agents for context7).
261
+
262
+ **Optional: `agents:` field.** To allow an agent to invoke other agents as subagents:
263
+ ```yaml
264
+ agents: ["*"] # allow invoking any other agent
265
+ ```
266
+ Add this to `coder` (can call `explorer` for context) and `tester` (can call `coder` for fixes).
267
+
268
+ **Body limit:** Maximum **30,000 characters** for Markdown content below frontmatter. If an agent body exceeds this, trim low-priority sections.
171
269
 
172
270
  **What to strip:**
173
- - `model:` line
174
271
  - The entire `<!-- crewkit:context-start -->...<!-- crewkit:context-end -->` block (inclusive)
175
272
 
273
+ **What to ADD to the body (absorb from deny list — no Copilot equivalent):**
274
+ - For `coder` and `tester` agents, add at the end of the body:
275
+ ```
276
+ ## Safety
277
+ - Never execute: `rm -rf`, `sudo`, `DROP DATABASE`, `git push --force`
278
+ - Never edit: `.env`, `credentials.*`, `secrets.*`, `*.key`, `*.pem`
279
+ ```
280
+
176
281
  **File naming:** `.claude/agents/explorer.md` → `.github/agents/explorer.agent.md`
177
282
 
178
283
  ---
179
284
 
180
- ## Step C4 — `.github/prompts/*.prompt.md`
285
+ ## Step C4 — `.github/skills/*/SKILL.md` (native skills)
181
286
 
182
287
  **Source:** `.claude/skills/*/SKILL.md`
183
- **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.
184
288
 
185
- **Extract:**
289
+ **Transformation:** Copilot supports skills natively with a compatible format. Copy the skill content and adapt the frontmatter.
290
+
291
+ **Copilot skill frontmatter format:**
292
+ ```yaml
293
+ ---
294
+ name: "full-workflow"
295
+ description: "Execute the complete development workflow: explore, implement, test, review."
296
+ user-invocable: true
297
+ ---
298
+ ```
299
+
300
+ **Frontmatter fields:**
301
+ - `name:` (required) — lowercase with hyphens, max 64 characters
302
+ - `description:` (required) — what the skill does and when to use it, max 1024 characters
303
+ - `user-invocable:` (optional) — default `true`, set to `false` for internal-only skills
304
+ - `allowed-tools:` (optional) — list of tools to pre-approve (e.g., `["execute"]`)
305
+
306
+ **Body adaptation:**
307
+ - Keep the workflow steps, classification tables, and output format
308
+ - Replace Claude Code-specific references:
309
+ - `/compact` → remove (Copilot has no context compaction)
310
+ - `→ explorer` agent routing → `@explorer` mention syntax
311
+ - References to `.claude/settings.json` → remove
312
+ - Keep references to `.ai/memory/` (Copilot reads these)
313
+ - Keep build/test command references to `.ai/memory/commands.md`
314
+
315
+ **File naming:** `.claude/skills/full-workflow/SKILL.md` → `.github/skills/full-workflow/SKILL.md`
316
+ If the skill has a `references/` subdirectory, copy it too.
317
+
318
+ ---
319
+
320
+ ## Step C5 — `.github/prompts/*.prompt.md` (IDE fallback)
321
+
322
+ **Source:** `.claude/skills/*/SKILL.md`
323
+
324
+ **Transformation:** LOSSY. These are a simplified fallback for IDEs that don't support `.github/skills/`. Extract the workflow intent as single-shot guidance.
325
+
326
+ **Copilot prompt frontmatter format:**
327
+ ```yaml
328
+ ---
329
+ description: "Complete development workflow: explore, implement, test, and review."
330
+ agent: "agent"
331
+ tools:
332
+ - read
333
+ - edit
334
+ - search
335
+ - execute
336
+ ---
337
+ ```
338
+
339
+ **Frontmatter fields:**
340
+ - `description:` (optional) — what the prompt does, shown in UI
341
+ - `agent:` (optional) — `"agent"` (full tool use), `"ask"` (no tools), `"plan"`, or a custom agent name
342
+ - `tools:` (optional) — available tools during execution
343
+ - `model:` (optional) — specific model to use
344
+ - `argument-hint:` (optional) — hint text shown in chat input
345
+ - Do NOT use `name:` — the prompt name is derived from the filename
346
+
347
+ **Extract from skill:**
186
348
  - What the skill is for (description)
187
349
  - The key steps the user should follow or the AI should perform
188
350
  - Any output format requirements
@@ -194,16 +356,16 @@ tools:
194
356
  - Phase breakdown with parallel agents
195
357
  - Any reference to Claude Code slash commands (`/compact`, `/crewkit-setup`)
196
358
 
197
- **Example — source `full-workflow/SKILL.md` intent:**
198
- ```
199
- Routes tasks through explore → implement → test → review agents.
200
- ```
201
-
202
359
  **Example — target `.github/prompts/full-workflow.prompt.md`:**
203
360
  ```markdown
204
361
  ---
205
- name: full-workflow
206
362
  description: "Complete development workflow: explore, implement, test, and review."
363
+ agent: "agent"
364
+ tools:
365
+ - read
366
+ - edit
367
+ - search
368
+ - execute
207
369
  ---
208
370
  # Full Workflow
209
371
 
@@ -223,7 +385,7 @@ Use this prompt to complete a development task end-to-end.
223
385
  ```
224
386
 
225
387
  **File naming:** `full-workflow/SKILL.md` → `.github/prompts/full-workflow.prompt.md`
226
- Use the skill directory name as the prompt file name.
388
+ Use the skill directory name as the prompt file name. The user invokes it in Copilot Chat as `/full-workflow`.
227
389
 
228
390
  ---
229
391
 
@@ -231,12 +393,13 @@ Use the skill directory name as the prompt file name.
231
393
 
232
394
  Before reporting done, verify each item:
233
395
 
234
- - [ ] `.github/copilot-instructions.md` — exists, contains hard rules, does NOT contain Agent Discipline or slash command sections
235
- - [ ] `.github/instructions/` — one `.instructions.md` file per `.claude/rules/*.md` source file
236
- - [ ] `.github/instructions/*.instructions.md` — each has `applyTo:` frontmatter (not `globs:`)
237
- - [ ] `.github/agents/` — one `.agent.md` per `.claude/agents/*.md` source file
238
- - [ ] `.github/agents/*.agent.md` — no `model:` line, no `crewkit:context-start` block, has `tools:` frontmatter
239
- - [ ] `.github/prompts/` one `.prompt.md` per `.claude/skills/*/SKILL.md` source file
240
- - [ ] `.github/prompts/*.prompt.md` each has `name:` and `description:` frontmatter, no multi-agent routing language
396
+ - [ ] `.github/copilot-instructions.md` — exists, **NO frontmatter**, contains hard rules, session start, quality gate, safety rules. Does NOT contain Agent Discipline or slash command sections
397
+ - [ ] `.github/instructions/` — one `.instructions.md` file per detected stack with `applyTo:` frontmatter
398
+ - [ ] `.github/instructions/sensitive-files.instructions.md` — exists with glob for `.env*`, `credentials*`, `secrets*`, `*.key`, `*.pem`
399
+ - [ ] `.github/agents/` — 5 agent files with `.agent.md` extension
400
+ - [ ] `.github/agents/*.agent.md` — each has `tools:` with canonical aliases (`read`, `edit`, `search`, `execute`), has `model:` converted to Copilot names, no `crewkit:context-start` block, body under 30,000 chars
401
+ - [ ] `.github/agents/coder.agent.md` + `tester.agent.md` have `mcp-servers:` if `.mcp.json` exists
402
+ - [ ] `.github/skills/` — one `SKILL.md` per `.claude/skills/*/SKILL.md` source, with `name:` + `description:` frontmatter
403
+ - [ ] `.github/prompts/` — one `.prompt.md` per skill as IDE fallback, with `description:` + `agent: "agent"` frontmatter
241
404
  - [ ] `.ai/memory/` — NOT duplicated under `.github/` (shared, no copy needed)
242
405
  - [ ] No Portuguese in any generated file
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: crewkit-setup
3
- description: "Scan your codebase and generate a complete context engineering setup: agents, instructions, memory files, and copilot-instructions.md."
3
+ description: "Scan your codebase and generate a complete context engineering setup: agents, skills, instructions, prompts, memory files, and copilot-instructions.md."
4
4
  ---
5
5
 
6
6
  # crewkit-setup
@@ -63,9 +63,13 @@ Create these files (all in English):
63
63
 
64
64
  ### Step 2 — `.github/copilot-instructions.md`
65
65
 
66
+ **IMPORTANT: No frontmatter. Plain Markdown only.**
67
+
66
68
  ```markdown
67
69
  # [PROJECT NAME] — Copilot Instructions
68
70
 
71
+ > These instructions apply to all GitHub Copilot interactions in this repository.
72
+
69
73
  ## Overview
70
74
  [1-2 sentences: what the project is, main stack]
71
75
 
@@ -82,12 +86,49 @@ Details → `.ai/memory/conventions.md`
82
86
 
83
87
  ---
84
88
 
89
+ ## Session start
90
+
91
+ At the start of every conversation:
92
+ 1. Read `.ai/memory/architecture.md` and `.ai/memory/conventions.md`
93
+ 2. Check `git log --oneline -5` for recent work context
94
+
95
+ ---
96
+
97
+ ## Quality gate
98
+
99
+ Before completing any task:
100
+ 1. Run the build command: `[detected build command]`
101
+ 2. Run the test command: `[detected test command]`
102
+ 3. Never report success with failing tests or broken builds
103
+
104
+ ---
105
+
106
+ ## Safety rules
107
+
108
+ - Never edit sensitive files: `.env`, `.env.*`, `credentials.*`, `secrets.*`, `*.key`, `*.pem`
109
+ - Never execute destructive commands: `rm -rf`, `sudo`, `DROP DATABASE`, `git push --force`
110
+
111
+ ---
112
+
85
113
  ## Memory
86
114
 
87
115
  - `.ai/memory/architecture.md` — system design
88
116
  - `.ai/memory/conventions.md` — coding conventions
89
117
  - `.ai/memory/commands.md` — build/test commands
118
+ - `.ai/memory/testing.md` — test strategy
90
119
  - `.ai/memory/lessons.md` — known gotchas
120
+
121
+ ---
122
+
123
+ ## Output Format
124
+
125
+ Always return:
126
+ - **Summary** — what was done
127
+ - **Files changed** — list with brief description
128
+ - **Tests** — pass/fail count (if tests were run)
129
+ - **Risks / Next steps** — if any
130
+
131
+ > Always think step by step. Never report success with failing tests.
91
132
  ```
92
133
 
93
134
  ### Step 3 — `.github/instructions/` (per-stack rules)
@@ -97,25 +138,85 @@ For each detected stack, create `[stack].instructions.md`:
97
138
  ---
98
139
  applyTo: "**/*.ts"
99
140
  ---
141
+ # [Stack] Rules
142
+
100
143
  [Stack-specific rules: error handling, imports, typing, testing patterns]
101
144
  ```
102
145
 
146
+ Also generate a sensitive files guardrail:
147
+
148
+ **File:** `.github/instructions/sensitive-files.instructions.md`
149
+ ```markdown
150
+ ---
151
+ applyTo: "**/.env*,**/credentials*,**/secrets*,**/*.key,**/*.pem,**/appsettings.*.json"
152
+ ---
153
+ # Sensitive Files — Do Not Edit
154
+
155
+ - NEVER modify these files directly
156
+ - NEVER write secrets, API keys, or passwords into any file
157
+ - Move all secrets to environment variables
158
+ ```
159
+
103
160
  ### Step 4 — `.github/agents/` (agent definitions)
104
161
 
105
162
  Create one file per agent: `explorer.agent.md`, `architect.agent.md`, `coder.agent.md`, `tester.agent.md`, `reviewer.agent.md`.
106
163
 
107
164
  Each file:
108
- ```markdown
165
+ ```yaml
109
166
  ---
110
- name: [Agent Name]
167
+ name: [agent-name]
111
168
  description: "[One-line role description]"
169
+ model: "Claude Sonnet 4"
170
+ tools:
171
+ - read
172
+ - search
173
+ ---
174
+ ```
175
+
176
+ Tool aliases per agent:
177
+ - explorer/architect/reviewer → `["read", "search"]`
178
+ - coder/tester → `["read", "edit", "search", "execute"]`
179
+
180
+ Model per agent:
181
+ - explorer/coder/tester → `"Claude Sonnet 4"`
182
+ - architect/reviewer → `"Claude Opus 4"`
183
+
184
+ Body includes: Role, Responsibilities, Approach, Output format.
185
+ Body max: 30,000 characters.
186
+
187
+ ### Step 5 — `.github/skills/` (native skills)
188
+
189
+ Copy and adapt each core skill:
190
+ - `full-workflow/SKILL.md`
191
+ - `hotfix/SKILL.md`
192
+ - `explore-and-plan/SKILL.md`
193
+ - `review-pr/SKILL.md`
194
+
195
+ Frontmatter format:
196
+ ```yaml
197
+ ---
198
+ name: "full-workflow"
199
+ description: "Execute the complete development workflow: explore, implement, test, review."
200
+ user-invocable: true
201
+ ---
202
+ ```
203
+
204
+ ### Step 6 — `.github/prompts/` (IDE fallback)
205
+
206
+ For each skill, create a simplified prompt file as fallback:
207
+ ```yaml
208
+ ---
209
+ description: "Complete development workflow: explore, implement, test, and review."
210
+ agent: "agent"
211
+ tools:
212
+ - read
213
+ - edit
214
+ - search
215
+ - execute
112
216
  ---
113
- # [Agent Name]
217
+ # [Skill Name]
114
218
 
115
- **Role:** [role]
116
- **Responsibilities:** [responsibilities]
117
- **Approach:** [how it works]
118
- **Output:** [what it produces]
219
+ [Simplified single-turn workflow steps]
119
220
  ```
120
221
 
121
222
  ---
@@ -130,8 +231,10 @@ crewkit-setup complete
130
231
  Generated:
131
232
  .ai/memory/ (6 files)
132
233
  .github/copilot-instructions.md
133
- .github/instructions/ (per-stack rules)
234
+ .github/instructions/ (per-stack rules + sensitive-files guardrail)
134
235
  .github/agents/ (5 agents)
236
+ .github/skills/ (4 native skills)
237
+ .github/prompts/ (4 IDE fallback prompts)
135
238
 
136
239
  Stack detected: [stack]
137
240
  Architecture: [pattern]
@@ -139,4 +242,5 @@ Architecture: [pattern]
139
242
  Next steps:
140
243
  1. Review .github/copilot-instructions.md — adjust hard rules if needed
141
244
  2. Open Copilot Chat — context is now active
245
+ 3. Try: @coder implement [task] or /full-workflow [task]
142
246
  ```
package/src/cli.js CHANGED
@@ -7,7 +7,7 @@ const HELP = `
7
7
  crewkit — Context engineering for AI-assisted development
8
8
 
9
9
  Commands:
10
- install Install crewkit globally (Claude Code, Copilot, Cursor)
10
+ install Install crewkit globally (Claude Code, Copilot)
11
11
  update Update to latest version (re-run install)
12
12
  add <name> Add an optional skill or pack to the current project
13
13
  list List all available skills and packs (core + add-ons)
package/src/detect.js CHANGED
@@ -16,10 +16,5 @@ export function detectTools() {
16
16
  tools.push({ id: 'copilot', name: 'GitHub Copilot', dest, versionFile: join(dest, 'crewkit-setup.version') });
17
17
  }
18
18
 
19
- if (existsSync(join(home, '.cursor'))) {
20
- const dest = join(home, '.cursor');
21
- tools.push({ id: 'cursor', name: 'Cursor', dest, versionFile: join(dest, 'crewkit-setup.version') });
22
- }
23
-
24
19
  return tools;
25
20
  }
package/src/install.js CHANGED
@@ -37,7 +37,7 @@ export async function install() {
37
37
  console.log(`
38
38
  No supported AI tools detected.
39
39
 
40
- crewkit looks for: ~/.claude, ~/.copilot, ~/.cursor
40
+ crewkit looks for: ~/.claude, ~/.copilot
41
41
  Install one of these tools and re-run.
42
42
  `);
43
43
  process.exit(1);
@@ -56,10 +56,6 @@ export async function install() {
56
56
  installSingleFile(target, 'copilot-agent.md', 'crewkit-setup.md',
57
57
  'GitHub Copilot ', 'Use @crewkit-setup in Copilot CLI or Chat', version);
58
58
  break;
59
- case 'cursor':
60
- installSingleFile(target, 'cursor-global.md', 'crewkit-setup.md',
61
- 'Cursor ', 'Copy to .cursor/rules/ in your projects', version);
62
- break;
63
59
  }
64
60
  }
65
61
  }
@@ -1,218 +0,0 @@
1
- # Adapter: Cursor
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 Cursor-compatible context files.
5
-
6
- **Input (two modes):**
7
- - **With Claude files:** If `CLAUDE.md` and `.claude/` exist (Claude Code was also a target), use them as primary source and reformat for Cursor.
8
- - **Standalone:** If Claude files do NOT exist, generate directly from `.crewkit/last-scan.md` (project profile) + `.ai/memory/` (architecture, conventions, commands). This is the primary source of truth.
9
-
10
- **Output:** Files under `.cursor/rules/` and `AGENTS.md` at the project root.
11
-
12
- ---
13
-
14
- ## Rules for this adapter
15
-
16
- 1. All generated files MUST be in **English**.
17
- 2. Do NOT duplicate `.ai/memory/` — it is shared between all IDEs. No transformation needed.
18
- 3. `model:` frontmatter from `.claude/agents/*.md` is Claude Code-only — strip it.
19
- 4. Cursor has no equivalent for skills/prompts — skip `.claude/skills/` entirely.
20
- 5. Create `.cursor/rules/` directory if it does not exist.
21
-
22
- ---
23
-
24
- ## Step U1 — `.cursor/rules/project.md`
25
-
26
- **Source:** `CLAUDE.md` if it exists, otherwise `.crewkit/last-scan.md` + `.ai/memory/conventions.md`
27
- **Transformation:** If using CLAUDE.md, reformat for Cursor — add required frontmatter, remove agent/skill/hook sections. If generating from scan data, create the content directly using the project profile and conventions.
28
-
29
- **Required Cursor frontmatter:**
30
- ```markdown
31
- ---
32
- description: "Project rules"
33
- alwaysApply: true
34
- ---
35
- ```
36
-
37
- **Expected output format:**
38
- ```markdown
39
- ---
40
- description: "Project rules"
41
- alwaysApply: true
42
- ---
43
- # [PROJECT NAME] — Project Rules
44
-
45
- ## Overview
46
- [1-2 sentences from CLAUDE.md overview — what the project is, main stack]
47
- [Business domain: what it does, core entities, risk profile]
48
-
49
- **Stack:** [stacks]
50
- **Architecture:** [key patterns]
51
-
52
- ---
53
-
54
- ## Hard rules (apply to every response)
55
-
56
- [Numbered list — copy from CLAUDE.md hard rules verbatim.]
57
-
58
- 1. [Rule 1]
59
- 2. [Rule 2]
60
- ...
61
-
62
- Details for each rule → `.ai/memory/conventions.md`
63
-
64
- ---
65
-
66
- ## Project Memory (`.ai/memory/`)
67
-
68
- Load context on demand:
69
-
70
- | File | When to load |
71
- |------|-------------|
72
- | `architecture.md` | Always — modules, layers, dependencies |
73
- | `conventions.md` | Always — naming, patterns, anti-patterns |
74
- | `commands.md` | When running build/test/deploy |
75
- | `testing.md` | When creating or running tests |
76
- | `lessons-{domain}.md` | When working on that domain |
77
-
78
- ---
79
-
80
- ## Output Format
81
-
82
- Always return:
83
- - **Summary** — what was done
84
- - **Files changed** — list with brief description
85
- - **Tests** — pass/fail count (if tests were run)
86
- - **Risks / Next steps** — if any
87
- ```
88
-
89
- **What to REMOVE from CLAUDE.md:**
90
- - `## Agent Discipline` section
91
- - `## Skills (slash commands)` section
92
- - `## Architect Decision Gate` section
93
- - `## Test Safety Loop` section
94
-
95
- ---
96
-
97
- ## Step U2 — `.cursor/rules/*.md`
98
-
99
- **Source:** `.claude/rules/*.md` if they exist, otherwise generate directly from scan data (detected stacks + HIGH/MEDIUM confidence patterns).
100
- **Transformation:** If using Claude rules, convert frontmatter to Cursor format — keep glob patterns and rule content unchanged. If generating from scan data, create one rules file per detected stack with appropriate glob patterns and rules.
101
-
102
- Claude Code frontmatter format:
103
- ```markdown
104
- ---
105
- description: "Node.js coding rules — applied when editing src/**/*.{js,ts}"
106
- globs: "src/**/*.{js,ts}"
107
- ---
108
- ```
109
-
110
- Cursor frontmatter format:
111
- ```markdown
112
- ---
113
- description: "Node.js coding rules"
114
- globs: "src/**/*.{js,ts}"
115
- ---
116
- ```
117
-
118
- **Mapping:**
119
- - `globs:` → `globs:` (keep as-is — Cursor uses the same key)
120
- - `description:` → keep as-is, but shorten to the rule name without the "applied when editing..." suffix if present
121
- - Body: copy verbatim
122
-
123
- **File naming:** `.claude/rules/dotnet.md` → `.cursor/rules/dotnet.md`
124
- Keep the same filename — just place it under `.cursor/rules/`.
125
-
126
- **Example — source `.claude/rules/python.md`:**
127
- ```markdown
128
- ---
129
- description: "Python coding rules — applied when editing **/*.py"
130
- globs: "**/*.py"
131
- ---
132
-
133
- # Python Rules
134
-
135
- - Use type hints on all function signatures
136
- - Validate input with Pydantic models at API boundaries
137
- ```
138
-
139
- **Example — target `.cursor/rules/python.md`:**
140
- ```markdown
141
- ---
142
- description: "Python coding rules"
143
- globs: "**/*.py"
144
- ---
145
-
146
- # Python Rules
147
-
148
- - Use type hints on all function signatures
149
- - Validate input with Pydantic models at API boundaries
150
- ```
151
-
152
- ---
153
-
154
- ## Step U3 — `AGENTS.md` (project root)
155
-
156
- **Source:** `.claude/agents/*.md` if they exist, otherwise generate directly from the agent templates at `~/.claude/skills/crewkit-setup/templates/agents/` (or from scan data if templates are unavailable).
157
- **Transformation:** Concatenate all agents into a single markdown file with `##` sections. Strip `model:` frontmatter from each. Remove the `<!-- crewkit:context-start -->...<!-- crewkit:context-end -->` block from each agent. Keep the `name:` and `description:` from frontmatter and all agent instructions. When generating from templates, inject project context from `.crewkit/last-scan.md` into each agent.
158
-
159
- **Output format:**
160
- ```markdown
161
- # Agents
162
-
163
- This file describes the AI agents available in this project.
164
- Each agent has a specific role and scope. Invoke the appropriate agent for each task type.
165
-
166
- ---
167
-
168
- ## [Agent Name]
169
-
170
- > [description from frontmatter]
171
-
172
- [agent body — full instructions, stripped of model: and crewkit context block]
173
-
174
- ---
175
-
176
- ## [Agent Name 2]
177
-
178
- > [description from frontmatter]
179
-
180
- [agent body]
181
-
182
- ---
183
- ```
184
-
185
- **Agent order:** explorer, architect, coder, tester, reviewer (same order as in `.claude/agents/`).
186
-
187
- **What to strip from each agent:**
188
- - `model:` frontmatter line
189
- - `name:` frontmatter line (becomes the `## heading` instead)
190
- - `description:` frontmatter line (becomes the `> blockquote` instead)
191
- - The entire `<!-- crewkit:context-start -->...<!-- crewkit:context-end -->` block (inclusive)
192
- - The YAML frontmatter delimiters (`---`) — the content moves to the `##` section body
193
-
194
- **File location:** `AGENTS.md` at the project root (not under `.cursor/`).
195
-
196
- ---
197
-
198
- ## Step U4 — Skills
199
-
200
- **Source:** `.claude/skills/`
201
- **Action:** Skip entirely. Cursor has no equivalent concept for skills or prompts.
202
-
203
- Do NOT generate any file for this step. Log: "Cursor adapter: skills skipped (no Cursor equivalent)."
204
-
205
- ---
206
-
207
- ## Completion Checklist — Cursor Adapter
208
-
209
- Before reporting done, verify each item:
210
-
211
- - [ ] `.cursor/rules/project.md` — exists, has `alwaysApply: true` frontmatter, contains hard rules, does NOT contain Agent Discipline or slash command sections
212
- - [ ] `.cursor/rules/` — one `.md` file per `.claude/rules/*.md` source file (plus `project.md`)
213
- - [ ] `.cursor/rules/*.md` — each has `globs:` frontmatter matching the source rule file
214
- - [ ] `AGENTS.md` — exists at project root, has `##` section for each of the 5 agents
215
- - [ ] `AGENTS.md` — no `model:` lines, no `crewkit:context-start` blocks, no YAML frontmatter delimiters
216
- - [ ] `.ai/memory/` — NOT duplicated under `.cursor/` (shared, no copy needed)
217
- - [ ] `.claude/skills/` — NOT copied (no Cursor equivalent, intentionally skipped)
218
- - [ ] No Portuguese in any generated file
@@ -1,157 +0,0 @@
1
- ---
2
- description: "Context engineering setup — scan codebase and generate AI context files (.cursor/rules, AGENTS.md, .ai/memory)"
3
- alwaysApply: false
4
- ---
5
-
6
- # crewkit-setup
7
-
8
- Scan the current project and generate a complete context engineering setup tailored to this codebase.
9
-
10
- **You are the AI executing this.** Follow each phase in order. Do not ask the user questions. Scan, generate, report.
11
-
12
- ---
13
-
14
- ## Phase 1 — Reconnaissance
15
-
16
- Scan the project to identify:
17
- - **Stack & frameworks**: languages, build tools, test frameworks, package managers
18
- - **Architecture**: monolith/microservices, key directories, entry points
19
- - **Existing AI context**: any `.cursor/`, `.github/`, `.ai/`, `CLAUDE.md`, `AGENTS.md` files
20
-
21
- Write findings to `.crewkit/scan-phase1-recon.md`.
22
-
23
- ---
24
-
25
- ## Phase 2 — Codebase Mapping
26
-
27
- Read representative source files (3-5 per layer: models, services, controllers, tests). Identify:
28
- - Naming conventions, code style
29
- - Core domain concepts and entities
30
- - Test patterns and coverage approach
31
- - CI/CD and build commands
32
-
33
- Write findings to `.crewkit/scan-phase2-map.md`.
34
-
35
- ---
36
-
37
- ## Phase 3 — Profile Compilation
38
-
39
- Synthesize phases 1-2 into a project profile:
40
- - Stack summary
41
- - Architecture summary
42
- - Key commands (build, test, lint)
43
- - Domain concepts
44
- - Hard rules to enforce
45
-
46
- Write profile to `.crewkit/last-scan.md`.
47
-
48
- ---
49
-
50
- ## Phase 4 — File Generation
51
-
52
- Generate all files using the profile from `.crewkit/last-scan.md`.
53
-
54
- ### Step 1 — `.ai/memory/`
55
-
56
- Create these files (all in English):
57
- - `architecture.md` — system design, key components, data flow
58
- - `conventions.md` — naming rules, patterns, anti-patterns
59
- - `commands.md` — build, test, lint, run commands with flags
60
- - `testing.md` — test strategy, frameworks, coverage approach
61
- - `lessons.md` — known gotchas, non-obvious behaviors
62
- - `state.md` — current sprint goal, recent changes, open issues
63
-
64
- ### Step 2 — `.cursor/rules/project.md`
65
-
66
- ```
67
- ---
68
- description: "Project rules"
69
- alwaysApply: true
70
- ---
71
- # [PROJECT NAME] — Project Rules
72
-
73
- ## Overview
74
- [1-2 sentences: what the project is, main stack]
75
-
76
- **Stack:** [stacks]
77
- **Architecture:** [key patterns]
78
-
79
- ---
80
-
81
- ## Hard rules
82
-
83
- [Numbered list of non-negotiable rules from the profile]
84
-
85
- ---
86
-
87
- ## Memory
88
-
89
- Reference files in `.ai/memory/` for detailed context:
90
- - `.ai/memory/architecture.md` — system design
91
- - `.ai/memory/conventions.md` — coding conventions
92
- - `.ai/memory/commands.md` — build/test commands
93
- ```
94
-
95
- ### Step 3 — `.cursor/rules/` (per-stack rules)
96
-
97
- For each detected stack (e.g., `typescript.md`, `python.md`), generate a rules file with:
98
- ```
99
- ---
100
- description: "[Stack] coding rules"
101
- globs: ["**/*.ts"] (or appropriate glob)
102
- alwaysApply: false
103
- ---
104
- [Stack-specific rules: error handling, imports, typing, testing patterns]
105
- ```
106
-
107
- ### Step 4 — `AGENTS.md`
108
-
109
- Create a single `AGENTS.md` at the project root with all agents as `##` sections:
110
-
111
- ```markdown
112
- # Agents
113
-
114
- ## Explorer
115
- Role: Codebase reconnaissance and research.
116
- [...]
117
-
118
- ## Architect
119
- Role: System design and planning.
120
- [...]
121
-
122
- ## Coder
123
- Role: Implementation.
124
- [...]
125
-
126
- ## Tester
127
- Role: Test writing and validation.
128
- [...]
129
-
130
- ## Reviewer
131
- Role: Code review and quality.
132
- [...]
133
- ```
134
-
135
- Each agent section should include: Role, Responsibilities, Approach, Output format.
136
-
137
- ---
138
-
139
- ## Phase 5 — Completion Report
140
-
141
- After all files are generated, report to the user:
142
-
143
- ```
144
- crewkit-setup complete
145
-
146
- Generated:
147
- .ai/memory/ (6 files)
148
- .cursor/rules/ (project.md + per-stack rules)
149
- AGENTS.md (5 agents)
150
-
151
- Stack detected: [stack]
152
- Architecture: [pattern]
153
-
154
- Next steps:
155
- 1. Review .cursor/rules/project.md — adjust hard rules if needed
156
- 2. Open Cursor and start coding — context is active
157
- ```