crewkit 0.1.0 → 1.0.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 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 (v0.1 Copilot and Cursor support planned for v0.2)
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crewkit",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
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": {
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
@@ -976,6 +994,22 @@ For any placeholder tokens, add a comment in the profile or tell the user to fil
976
994
 
977
995
  ---
978
996
 
997
+ ### Step 10 — IDE Adapters
998
+
999
+ If IDE targets beyond Claude Code were detected in Phase 1 (e.g., GitHub Copilot, Cursor):
1000
+
1001
+ 1. For each additional IDE target detected:
1002
+ a. Determine the adapter file path: `~/.claude/skills/crewkit-setup/adapters/{ide}.md`
1003
+ - GitHub Copilot → `adapters/copilot.md`
1004
+ - Cursor → `adapters/cursor.md`
1005
+ 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.
1006
+ 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.
1007
+ 2. If no additional IDE targets were detected, skip this step entirely.
1008
+
1009
+ **Note:** The adapters do NOT duplicate `.ai/memory/` — that directory is shared across all IDEs without transformation.
1010
+
1011
+ ---
1012
+
979
1013
  ## Final Report
980
1014
 
981
1015
  After all generation steps, run the **Completion Checklist** (at the bottom of this document). Then present the summary:
@@ -994,7 +1028,7 @@ After all generation steps, run the **Completion Checklist** (at the bottom of t
994
1028
  - `.claude/napkin.md` — priorities board
995
1029
  - `.claude/QUICKSTART.md` — onboarding guide
996
1030
  - `.mcp.json` — [N] MCP servers
997
- - Validation: [N]/15 checks passed
1031
+ - Validation: [N]/17 checks passed
998
1032
 
999
1033
  ## Commands detected
1000
1034
  - Build: `[command]`
@@ -1046,5 +1080,7 @@ Before presenting the Final Report, go through EVERY item. Fix failures before r
1046
1080
  - [ ] `.crewkit/last-scan.md` — exists with full profile including Domain section
1047
1081
  - [ ] `.crewkit/scan-phase*.md` — all 4 phase files exist with content
1048
1082
  - [ ] No Portuguese in any generated file (only in user-facing output)
1083
+ - [ ] If Copilot target detected: `.github/copilot-instructions.md` exists and contains the project hard rules
1084
+ - [ ] If Cursor target detected: `.cursor/rules/project.md` exists and has `alwaysApply: true` frontmatter
1049
1085
 
1050
- Report checklist results as: "Validation: X/15 checks passed." If any failed, list which ones and why.
1086
+ 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
@@ -0,0 +1,215 @@
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:** 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 `.cursor/rules/` and `AGENTS.md` at the project root.
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. Cursor has no equivalent for skills/prompts — skip `.claude/skills/` entirely.
17
+ 5. Create `.cursor/rules/` directory if it does not exist.
18
+
19
+ ---
20
+
21
+ ## Step U1 — `.cursor/rules/project.md`
22
+
23
+ **Source:** `CLAUDE.md`
24
+ **Transformation:** Reformat for Cursor. Add required frontmatter. Remove agent/skill/hook sections that are Claude Code-specific.
25
+
26
+ **Required Cursor frontmatter:**
27
+ ```markdown
28
+ ---
29
+ description: "Project rules"
30
+ alwaysApply: true
31
+ ---
32
+ ```
33
+
34
+ **Expected output format:**
35
+ ```markdown
36
+ ---
37
+ description: "Project rules"
38
+ alwaysApply: true
39
+ ---
40
+ # [PROJECT NAME] — Project Rules
41
+
42
+ ## Overview
43
+ [1-2 sentences from CLAUDE.md overview — what the project is, main stack]
44
+ [Business domain: what it does, core entities, risk profile]
45
+
46
+ **Stack:** [stacks]
47
+ **Architecture:** [key patterns]
48
+
49
+ ---
50
+
51
+ ## Hard rules (apply to every response)
52
+
53
+ [Numbered list — copy from CLAUDE.md hard rules verbatim.]
54
+
55
+ 1. [Rule 1]
56
+ 2. [Rule 2]
57
+ ...
58
+
59
+ Details for each rule → `.ai/memory/conventions.md`
60
+
61
+ ---
62
+
63
+ ## Project Memory (`.ai/memory/`)
64
+
65
+ Load context on demand:
66
+
67
+ | File | When to load |
68
+ |------|-------------|
69
+ | `architecture.md` | Always — modules, layers, dependencies |
70
+ | `conventions.md` | Always — naming, patterns, anti-patterns |
71
+ | `commands.md` | When running build/test/deploy |
72
+ | `testing.md` | When creating or running tests |
73
+ | `lessons-{domain}.md` | When working on that domain |
74
+
75
+ ---
76
+
77
+ ## Output Format
78
+
79
+ Always return:
80
+ - **Summary** — what was done
81
+ - **Files changed** — list with brief description
82
+ - **Tests** — pass/fail count (if tests were run)
83
+ - **Risks / Next steps** — if any
84
+ ```
85
+
86
+ **What to REMOVE from CLAUDE.md:**
87
+ - `## Agent Discipline` section
88
+ - `## Skills (slash commands)` section
89
+ - `## Architect Decision Gate` section
90
+ - `## Test Safety Loop` section
91
+
92
+ ---
93
+
94
+ ## Step U2 — `.cursor/rules/*.md`
95
+
96
+ **Source:** `.claude/rules/*.md`
97
+ **Transformation:** Convert frontmatter to Cursor format. Keep glob patterns and all rule content unchanged.
98
+
99
+ Claude Code frontmatter format:
100
+ ```markdown
101
+ ---
102
+ description: "Node.js coding rules — applied when editing src/**/*.{js,ts}"
103
+ globs: "src/**/*.{js,ts}"
104
+ ---
105
+ ```
106
+
107
+ Cursor frontmatter format:
108
+ ```markdown
109
+ ---
110
+ description: "Node.js coding rules"
111
+ globs: "src/**/*.{js,ts}"
112
+ ---
113
+ ```
114
+
115
+ **Mapping:**
116
+ - `globs:` → `globs:` (keep as-is — Cursor uses the same key)
117
+ - `description:` → keep as-is, but shorten to the rule name without the "applied when editing..." suffix if present
118
+ - Body: copy verbatim
119
+
120
+ **File naming:** `.claude/rules/dotnet.md` → `.cursor/rules/dotnet.md`
121
+ Keep the same filename — just place it under `.cursor/rules/`.
122
+
123
+ **Example — source `.claude/rules/python.md`:**
124
+ ```markdown
125
+ ---
126
+ description: "Python coding rules — applied when editing **/*.py"
127
+ globs: "**/*.py"
128
+ ---
129
+
130
+ # Python Rules
131
+
132
+ - Use type hints on all function signatures
133
+ - Validate input with Pydantic models at API boundaries
134
+ ```
135
+
136
+ **Example — target `.cursor/rules/python.md`:**
137
+ ```markdown
138
+ ---
139
+ description: "Python coding rules"
140
+ globs: "**/*.py"
141
+ ---
142
+
143
+ # Python Rules
144
+
145
+ - Use type hints on all function signatures
146
+ - Validate input with Pydantic models at API boundaries
147
+ ```
148
+
149
+ ---
150
+
151
+ ## Step U3 — `AGENTS.md` (project root)
152
+
153
+ **Source:** All `.claude/agents/*.md` files
154
+ **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.
155
+
156
+ **Output format:**
157
+ ```markdown
158
+ # Agents
159
+
160
+ This file describes the AI agents available in this project.
161
+ Each agent has a specific role and scope. Invoke the appropriate agent for each task type.
162
+
163
+ ---
164
+
165
+ ## [Agent Name]
166
+
167
+ > [description from frontmatter]
168
+
169
+ [agent body — full instructions, stripped of model: and crewkit context block]
170
+
171
+ ---
172
+
173
+ ## [Agent Name 2]
174
+
175
+ > [description from frontmatter]
176
+
177
+ [agent body]
178
+
179
+ ---
180
+ ```
181
+
182
+ **Agent order:** explorer, architect, coder, tester, reviewer (same order as in `.claude/agents/`).
183
+
184
+ **What to strip from each agent:**
185
+ - `model:` frontmatter line
186
+ - `name:` frontmatter line (becomes the `## heading` instead)
187
+ - `description:` frontmatter line (becomes the `> blockquote` instead)
188
+ - The entire `<!-- crewkit:context-start -->...<!-- crewkit:context-end -->` block (inclusive)
189
+ - The YAML frontmatter delimiters (`---`) — the content moves to the `##` section body
190
+
191
+ **File location:** `AGENTS.md` at the project root (not under `.cursor/`).
192
+
193
+ ---
194
+
195
+ ## Step U4 — Skills
196
+
197
+ **Source:** `.claude/skills/`
198
+ **Action:** Skip entirely. Cursor has no equivalent concept for skills or prompts.
199
+
200
+ Do NOT generate any file for this step. Log: "Cursor adapter: skills skipped (no Cursor equivalent)."
201
+
202
+ ---
203
+
204
+ ## Completion Checklist — Cursor Adapter
205
+
206
+ Before reporting done, verify each item:
207
+
208
+ - [ ] `.cursor/rules/project.md` — exists, has `alwaysApply: true` frontmatter, contains hard rules, does NOT contain Agent Discipline or slash command sections
209
+ - [ ] `.cursor/rules/` — one `.md` file per `.claude/rules/*.md` source file (plus `project.md`)
210
+ - [ ] `.cursor/rules/*.md` — each has `globs:` frontmatter matching the source rule file
211
+ - [ ] `AGENTS.md` — exists at project root, has `##` section for each of the 5 agents
212
+ - [ ] `AGENTS.md` — no `model:` lines, no `crewkit:context-start` blocks, no YAML frontmatter delimiters
213
+ - [ ] `.ai/memory/` — NOT duplicated under `.cursor/` (shared, no copy needed)
214
+ - [ ] `.claude/skills/` — NOT copied (no Cursor equivalent, intentionally skipped)
215
+ - [ ] No Portuguese in any generated file