crewkit 1.1.4 → 1.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crewkit",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
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
@@ -51,16 +51,36 @@ If `.claude/` or `CLAUDE.md` or `.ai/memory/` exists:
51
51
  3. Report: "Existing setup backed up to `.crewkit-backup/`"
52
52
 
53
53
  ### Create directory structure
54
+ Create directories based on the **selected IDE targets** from Phase 1:
55
+
56
+ **Always:**
57
+ ```
58
+ .ai/
59
+ memory/
60
+ plans/
61
+ .crewkit/
62
+ ```
63
+
64
+ **If Claude Code is a selected target:**
54
65
  ```
55
66
  .claude/
56
67
  agents/
57
68
  hooks/
58
69
  rules/
59
70
  skills/
60
- .ai/
61
- memory/
62
- plans/
63
- .crewkit/
71
+ ```
72
+
73
+ **If GitHub Copilot is a selected target:**
74
+ ```
75
+ .github/
76
+ agents/
77
+ instructions/
78
+ ```
79
+
80
+ **If Cursor is a selected target:**
81
+ ```
82
+ .cursor/
83
+ rules/
64
84
  ```
65
85
 
66
86
  ### Version tracking
@@ -144,22 +164,38 @@ Read `package.json` scripts, CI configs, or Makefiles to find the actual command
144
164
 
145
165
  ### IDE Target Detection
146
166
 
147
- Detect which IDEs are in use or configured in this project:
167
+ Detect which IDEs are available. Check **two sources**: project-level signals AND global install markers.
148
168
 
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 |
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 |
154
174
 
155
- Save all detected IDE targets to the scan data. Example:
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:
156
192
  ```
157
- IDE targets: Claude Code (always), GitHub Copilot (detected: .github/ exists), Cursor (not detected)
193
+ IDE targets selected: GitHub Copilot
158
194
  ```
159
195
 
160
196
  **Store results as: `ReconProfile`** — write to `.crewkit/scan-phase1-recon.md` for persistence.
161
197
 
162
- Report: "Phase 1 complete. Detected: [stacks], [CI], [DBs], [build/test commands]."
198
+ Report: "Phase 1 complete. Detected: [stacks], [CI], [DBs], [build/test commands]. IDE target: [selected IDEs]."
163
199
 
164
200
  ---
165
201
 
@@ -409,8 +445,8 @@ Compile all profiles into a single summary and present it to the user.
409
445
  - Test: `[command]`
410
446
  - Dev server: `[command]` (if detected)
411
447
 
412
- ## IDE Targets
413
- - [list each detected IDE — e.g., "Claude Code (always), GitHub Copilot (detected: .github/ exists)"]
448
+ ## IDE Targets (selected)
449
+ - [list selected IDE targets — e.g., "GitHub Copilot" or "Claude Code, Cursor"]
414
450
  ```
415
451
 
416
452
  ### Save profile
@@ -437,9 +473,16 @@ This step is critical for large projects where context compaction may have evict
437
473
 
438
474
  ---
439
475
 
440
- Generate all files in order. This order is designed for **graceful failure** — if the process is interrupted, the user has the most valuable files first.
476
+ Generate files based on the **selected IDE targets** from Phase 1. The generation order is designed for **graceful failure** — if the process is interrupted, the user has the most valuable files first.
441
477
 
442
- **If the user chose [M] (memory only):** generate steps 1-2 (memory + CLAUDE.md), then update the `<!-- crewkit:context-start -->` headers in existing agents (Step 3, header-only — do not overwrite agent body). Stop after that.
478
+ **IDE-conditional generation:**
479
+ - **Step 1** (`.ai/memory/`): ALWAYS — shared across all IDEs.
480
+ - **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
+ - **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
+
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.
484
+
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.
443
486
 
444
487
  ### Templates directory
445
488
  Templates are located at `~/.claude/skills/crewkit-setup/templates/`. Read them from disk.
@@ -591,6 +634,8 @@ Create empty `lessons-{stack}.md` files for each detected stack.
591
634
 
592
635
  ### Step 2 — `CLAUDE.md` (AI-generated from scan)
593
636
 
637
+ > **Conditional:** Skip this step if Claude Code is NOT a selected IDE target. Jump to Step 10.
638
+
594
639
  Generate the project's root `CLAUDE.md`. This is the most important generated file — it defines the AI's behavior for this project.
595
640
 
596
641
  **Structure:**
@@ -1001,15 +1046,20 @@ For any placeholder tokens, add a comment in the profile or tell the user to fil
1001
1046
 
1002
1047
  ### Step 10 — IDE Adapters
1003
1048
 
1004
- If IDE targets beyond Claude Code were detected in Phase 1 (e.g., GitHub Copilot, Cursor):
1049
+ For each **non-Claude IDE** in the selected targets (GitHub Copilot, Cursor):
1005
1050
 
1006
- 1. For each additional IDE target detected:
1051
+ 1. For each selected non-Claude IDE target:
1007
1052
  a. Determine the adapter file path: `~/.claude/skills/crewkit-setup/adapters/{ide}.md`
1008
1053
  - GitHub Copilot → `adapters/copilot.md`
1009
1054
  - Cursor → `adapters/cursor.md`
1010
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.
1011
- c. If the adapter file exists: read it completely, then MANDATORY: follow ALL instructions in it. The adapter reads scan data from `.crewkit/last-scan.md` and uses the already-generated Claude Code files (Steps 1-9) as its source.
1012
- 2. If no additional IDE targets were detected, skip this step entirely.
1056
+ c. If the adapter file exists: read it completely, then MANDATORY: follow ALL instructions in it.
1057
+
1058
+ **Source of truth for adapters (in priority order):**
1059
+ 1. If Claude Code files exist (Steps 2-9 were generated): use them as the primary source, converting content to the target IDE format.
1060
+ 2. If Claude Code files do NOT exist (Claude was not a selected target): generate IDE-native files directly from `.crewkit/last-scan.md` + `.ai/memory/` (Step 1). The adapter instructions describe the expected output format — use scan data to fill in the content instead of reformatting Claude files.
1061
+
1062
+ If no non-Claude IDE targets were selected, skip this step entirely.
1013
1063
 
1014
1064
  **Note:** The adapters do NOT duplicate `.ai/memory/` — that directory is shared across all IDEs without transformation.
1015
1065
 
@@ -1022,8 +1072,12 @@ After all generation steps, run the **Completion Checklist** (at the bottom of t
1022
1072
  ```markdown
1023
1073
  # crewkit setup complete
1024
1074
 
1025
- ## Generated files
1075
+ ## IDE target: [selected IDE(s)]
1076
+
1077
+ ## Generated files (shared)
1026
1078
  - `.ai/memory/` — [N] files (architecture, conventions, commands, testing, lessons, state)
1079
+
1080
+ ## Generated files (Claude Code) — only if selected
1027
1081
  - `CLAUDE.md` — project rules ([N] hard rules)
1028
1082
  - `.claude/agents/` — 5 agents (explorer, architect, coder, tester, reviewer)
1029
1083
  - `.claude/rules/` — [N] rule files ([list stacks])
@@ -1033,20 +1087,29 @@ After all generation steps, run the **Completion Checklist** (at the bottom of t
1033
1087
  - `.claude/napkin.md` — priorities board
1034
1088
  - `.claude/QUICKSTART.md` — onboarding guide
1035
1089
  - `.mcp.json` — [N] MCP servers
1036
- - Validation: [N]/17 checks passed
1090
+
1091
+ ## 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
1100
+
1101
+ ## Validation: [X]/[Y] checks passed
1037
1102
 
1038
1103
  ## Commands detected
1039
1104
  - Build: `[command]`
1040
1105
  - Test: `[command]`
1041
1106
 
1042
- ## Recommended MCPs to configure
1043
- [List MCPs with placeholder tokens that need user input]
1044
-
1045
1107
  ## Next steps
1046
- 1. Review `CLAUDE.md` and adjust rules as needed
1047
- 2. Fill in MCP tokens in `.mcp.json` (if applicable)
1048
- 3. Commit the setup: `git add .claude/ .ai/ CLAUDE.md .mcp.json && git commit -m "chore: add crewkit context engineering setup"`
1049
- 4. Run `/full-workflow <your-first-task>` to test the setup
1108
+ [Adapt next steps to the selected IDE:]
1109
+ - Claude Code: "Review CLAUDE.md run /full-workflow"
1110
+ - Copilot: "Review .github/copilot-instructions.md open Copilot Chat"
1111
+ - Cursor: "Review .cursor/rules/project.md start coding"
1112
+ - All: "Commit the setup"
1050
1113
  ```
1051
1114
 
1052
1115
  ---
@@ -1065,27 +1128,37 @@ After all generation steps, run the **Completion Checklist** (at the bottom of t
1065
1128
 
1066
1129
  Before presenting the Final Report, go through EVERY item. Fix failures before reporting.
1067
1130
 
1068
- ### Content checks
1131
+ ### Content checks (shared — always verify)
1069
1132
  - [ ] `.ai/memory/architecture.md` — has constructor/DI signatures table (if project uses DI)
1070
1133
  - [ ] `.ai/memory/conventions.md` — has Design System section (if frontend detected)
1071
1134
  - [ ] `.ai/memory/testing.md` — has Fakes/Stubs inventory table (if test doubles detected)
1072
1135
  - [ ] `.ai/memory/commands.md` — has build + test + dev commands for ALL detected stacks
1136
+
1137
+ ### Content checks (Claude Code — only if Claude is a selected target)
1073
1138
  - [ ] `CLAUDE.md` — hard rules present, all in English
1074
1139
  - [ ] `.claude/agents/` — all 5 have `crewkit:context-start` header with real project data
1075
1140
  - [ ] `.claude/QUICKSTART.md` — exists with workflow guide
1076
1141
 
1077
- ### Validation checks (run these, don't just assume)
1142
+ ### Validation checks (Claude Code only if Claude is a selected target)
1078
1143
  - [ ] `.claude/settings.json` — read back, verify valid JSON, has Write(.ai/memory/*), has stack permissions, has MCP permissions (Layer 4)
1079
1144
  - [ ] `.mcp.json` — read back, verify valid JSON, has context7
1080
1145
  - [ ] `.claude/hooks/*.sh` — run `bash -n` on each, all 4 pass syntax check
1081
1146
  - [ ] `.claude/rules/` — at least 1 per detected stack, glob patterns match real files in project
1082
1147
  - [ ] `.claude/skills/` — all 4 core skills have SKILL.md
1083
1148
 
1084
- ### Integrity checks
1149
+ ### Content checks (Copilot — only if Copilot is a selected target)
1150
+ - [ ] `.github/copilot-instructions.md` — exists, contains project hard rules, no Claude-specific sections
1151
+ - [ ] `.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
1158
+
1159
+ ### Integrity checks (always)
1085
1160
  - [ ] `.crewkit/last-scan.md` — exists with full profile including Domain section
1086
1161
  - [ ] `.crewkit/scan-phase*.md` — all 4 phase files exist with content
1087
1162
  - [ ] No Portuguese in any generated file (only in user-facing output)
1088
- - [ ] If Copilot target detected: `.github/copilot-instructions.md` exists and contains the project hard rules
1089
- - [ ] If Cursor target detected: `.cursor/rules/project.md` exists and has `alwaysApply: true` frontmatter
1090
1163
 
1091
- Report checklist results as: "Validation: X/17 checks passed." If any failed, list which ones and why.
1164
+ Count only the checks applicable to the selected IDE targets. Report as: "Validation: X/Y checks passed." If any failed, list which ones and why.
@@ -3,8 +3,11 @@
3
3
  This adapter is executed during Phase 7, Step 10 of `/crewkit-setup`.
4
4
  You are the AI. Follow every instruction in this file to generate GitHub Copilot-compatible context files.
5
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.
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 Copilot.
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 `.github/` — GitHub Copilot-native context files.
8
11
 
9
12
  ---
10
13
 
@@ -20,15 +23,15 @@ You are the AI. Follow every instruction in this file to generate GitHub Copilot
20
23
 
21
24
  ## Step C1 — `.github/copilot-instructions.md`
22
25
 
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.
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.
25
28
 
26
29
  **Expected output format:**
27
30
  ```markdown
28
31
  # [PROJECT NAME] — Copilot Instructions
29
32
 
30
33
  ## Overview
31
- [1-2 sentences from CLAUDE.md overview — what the project is, main stack]
34
+ [1-2 sentences — what the project is, main stack]
32
35
  [Business domain: what it does, core entities, risk profile]
33
36
 
34
37
  **Stack:** [stacks]
@@ -38,7 +41,7 @@ You are the AI. Follow every instruction in this file to generate GitHub Copilot
38
41
 
39
42
  ## Hard rules (apply to every response)
40
43
 
41
- [Numbered list — copy from CLAUDE.md hard rules verbatim. These are non-negotiable.]
44
+ [Numbered list of non-negotiable rules — from CLAUDE.md or from HIGH confidence patterns in scan data.]
42
45
 
43
46
  1. [Rule 1]
44
47
  2. [Rule 2]
@@ -85,8 +88,8 @@ Always return:
85
88
 
86
89
  ## Step C2 — `.github/instructions/*.instructions.md`
87
90
 
88
- **Source:** `.claude/rules/*.md`
89
- **Transformation:** Convert frontmatter to Copilot format. Keep glob patterns and all rule content unchanged.
91
+ **Source:** `.claude/rules/*.md` if they exist, otherwise generate directly from scan data (detected stacks + HIGH/MEDIUM confidence patterns).
92
+ **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.
90
93
 
91
94
  Claude Code frontmatter format:
92
95
  ```markdown
@@ -142,8 +145,8 @@ applyTo: "src/**/*.{js,ts}"
142
145
 
143
146
  ## Step C3 — `.github/agents/*.agent.md`
144
147
 
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.
148
+ **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.
147
150
 
148
151
  **Copilot agent frontmatter format:**
149
152
  ```markdown
@@ -3,7 +3,10 @@
3
3
  This adapter is executed during Phase 7, Step 10 of `/crewkit-setup`.
4
4
  You are the AI. Follow every instruction in this file to generate Cursor-compatible context files.
5
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.
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
+
7
10
  **Output:** Files under `.cursor/rules/` and `AGENTS.md` at the project root.
8
11
 
9
12
  ---
@@ -20,8 +23,8 @@ You are the AI. Follow every instruction in this file to generate Cursor-compati
20
23
 
21
24
  ## Step U1 — `.cursor/rules/project.md`
22
25
 
23
- **Source:** `CLAUDE.md`
24
- **Transformation:** Reformat for Cursor. Add required frontmatter. Remove agent/skill/hook sections that are Claude Code-specific.
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.
25
28
 
26
29
  **Required Cursor frontmatter:**
27
30
  ```markdown
@@ -93,8 +96,8 @@ Always return:
93
96
 
94
97
  ## Step U2 — `.cursor/rules/*.md`
95
98
 
96
- **Source:** `.claude/rules/*.md`
97
- **Transformation:** Convert frontmatter to Cursor format. Keep glob patterns and all rule content unchanged.
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.
98
101
 
99
102
  Claude Code frontmatter format:
100
103
  ```markdown
@@ -150,8 +153,8 @@ globs: "**/*.py"
150
153
 
151
154
  ## Step U3 — `AGENTS.md` (project root)
152
155
 
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.
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.
155
158
 
156
159
  **Output format:**
157
160
  ```markdown