crewkit 1.1.4 → 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.
@@ -1,215 +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:** 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
@@ -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
- ```