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.
- package/README.md +6 -8
- package/package.json +1 -2
- package/skill/SKILL.md +99 -49
- package/skill/adapters/copilot.md +230 -64
- package/skill/copilot-agent.md +113 -9
- package/src/cli.js +1 -1
- package/src/detect.js +0 -5
- package/src/install.js +1 -5
- package/skill/adapters/cursor.md +0 -215
- package/skill/cursor-global.md +0 -157
|
@@ -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
|
|
7
|
-
**
|
|
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
|
|
|
@@ -12,23 +15,48 @@ You are the AI. Follow every instruction in this file to generate GitHub Copilot
|
|
|
12
15
|
|
|
13
16
|
1. All generated files MUST be in **English**.
|
|
14
17
|
2. Do NOT duplicate `.ai/memory/` — it is shared between all IDEs. No transformation needed.
|
|
15
|
-
3. `model:`
|
|
16
|
-
4. Skills
|
|
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.
|
|
17
20
|
5. Create `.github/` subdirectories if they do not exist.
|
|
18
21
|
|
|
19
22
|
---
|
|
20
23
|
|
|
21
24
|
## Step C1 — `.github/copilot-instructions.md`
|
|
22
25
|
|
|
23
|
-
**Source:** `CLAUDE.md`
|
|
24
|
-
|
|
26
|
+
**Source:** `CLAUDE.md` if it exists, otherwise `.crewkit/last-scan.md` + `.ai/memory/conventions.md`
|
|
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`."
|
|
25
51
|
|
|
26
52
|
**Expected output format:**
|
|
27
53
|
```markdown
|
|
28
54
|
# [PROJECT NAME] — Copilot Instructions
|
|
29
55
|
|
|
56
|
+
> These instructions apply to all GitHub Copilot interactions in this repository.
|
|
57
|
+
|
|
30
58
|
## Overview
|
|
31
|
-
[1-2 sentences
|
|
59
|
+
[1-2 sentences — what the project is, main stack]
|
|
32
60
|
[Business domain: what it does, core entities, risk profile]
|
|
33
61
|
|
|
34
62
|
**Stack:** [stacks]
|
|
@@ -38,7 +66,7 @@ You are the AI. Follow every instruction in this file to generate GitHub Copilot
|
|
|
38
66
|
|
|
39
67
|
## Hard rules (apply to every response)
|
|
40
68
|
|
|
41
|
-
[Numbered list —
|
|
69
|
+
[Numbered list of non-negotiable rules — from CLAUDE.md or from HIGH confidence patterns in scan data.]
|
|
42
70
|
|
|
43
71
|
1. [Rule 1]
|
|
44
72
|
2. [Rule 2]
|
|
@@ -48,6 +76,32 @@ Details for each rule → `.ai/memory/conventions.md`
|
|
|
48
76
|
|
|
49
77
|
---
|
|
50
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
|
+
|
|
51
105
|
## Project Memory (`.ai/memory/`)
|
|
52
106
|
|
|
53
107
|
Load context on demand — do not load all files every time:
|
|
@@ -62,6 +116,16 @@ Load context on demand — do not load all files every time:
|
|
|
62
116
|
|
|
63
117
|
---
|
|
64
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
|
+
|
|
65
129
|
## Output Format
|
|
66
130
|
|
|
67
131
|
Always return:
|
|
@@ -69,24 +133,23 @@ Always return:
|
|
|
69
133
|
- **Files changed** — list with brief description
|
|
70
134
|
- **Tests** — pass/fail count (if tests were run)
|
|
71
135
|
- **Risks / Next steps** — if any
|
|
136
|
+
|
|
137
|
+
> Always think step by step. Never report success with failing tests.
|
|
72
138
|
```
|
|
73
139
|
|
|
74
140
|
**What to REMOVE from CLAUDE.md:**
|
|
75
141
|
- `## Agent Discipline` section (orchestrator/worker model is Claude Code-only)
|
|
76
142
|
- `## Skills (slash commands)` section (slash commands are Claude Code-only)
|
|
77
143
|
- `## Architect Decision Gate` section
|
|
78
|
-
- `## Test Safety Loop` section (
|
|
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.`
|
|
144
|
+
- `## Test Safety Loop` section (absorbed into Quality gate section above)
|
|
83
145
|
|
|
84
146
|
---
|
|
85
147
|
|
|
86
148
|
## Step C2 — `.github/instructions/*.instructions.md`
|
|
87
149
|
|
|
88
|
-
**Source:** `.claude/rules/*.md`
|
|
89
|
-
|
|
150
|
+
**Source:** `.claude/rules/*.md` if they exist, otherwise generate directly from scan data (detected stacks + HIGH/MEDIUM confidence patterns).
|
|
151
|
+
|
|
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.
|
|
90
153
|
|
|
91
154
|
Claude Code frontmatter format:
|
|
92
155
|
```markdown
|
|
@@ -96,7 +159,7 @@ globs: "src/**/*.{js,ts}"
|
|
|
96
159
|
---
|
|
97
160
|
```
|
|
98
161
|
|
|
99
|
-
Copilot instructions format:
|
|
162
|
+
Copilot instructions format (**no `description:` in frontmatter**):
|
|
100
163
|
```markdown
|
|
101
164
|
---
|
|
102
165
|
applyTo: "src/**/*.{js,ts}"
|
|
@@ -111,75 +174,177 @@ applyTo: "src/**/*.{js,ts}"
|
|
|
111
174
|
- `description:` → remove from frontmatter, use as the first `# heading` in the body instead
|
|
112
175
|
- All rule content (body): copy verbatim
|
|
113
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
|
+
|
|
114
180
|
**File naming:** `.claude/rules/dotnet.md` → `.github/instructions/dotnet.instructions.md`
|
|
115
181
|
Strip any existing `.md` suffix and append `.instructions.md`.
|
|
116
182
|
|
|
117
|
-
|
|
118
|
-
```markdown
|
|
119
|
-
---
|
|
120
|
-
description: "Node.js coding rules — applied when editing src/**/*.{js,ts}"
|
|
121
|
-
globs: "src/**/*.{js,ts}"
|
|
122
|
-
---
|
|
183
|
+
### Additional instructions file: sensitive files guardrail
|
|
123
184
|
|
|
124
|
-
|
|
185
|
+
Generate an extra instructions file that replaces the `protect-sensitive-files.sh` hook:
|
|
125
186
|
|
|
126
|
-
|
|
127
|
-
- Validate all external input at the handler boundary
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
**Example — target `.github/instructions/node.instructions.md`:**
|
|
187
|
+
**File:** `.github/instructions/sensitive-files.instructions.md`
|
|
131
188
|
```markdown
|
|
132
189
|
---
|
|
133
|
-
applyTo: "
|
|
190
|
+
applyTo: "**/.env*,**/credentials*,**/secrets*,**/*.key,**/*.pem,**/appsettings.*.json"
|
|
134
191
|
---
|
|
135
|
-
#
|
|
192
|
+
# Sensitive Files — Do Not Edit
|
|
136
193
|
|
|
137
|
-
|
|
138
|
-
|
|
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
|
|
139
200
|
```
|
|
140
201
|
|
|
141
202
|
---
|
|
142
203
|
|
|
143
204
|
## Step C3 — `.github/agents/*.agent.md`
|
|
144
205
|
|
|
145
|
-
**Source:** `.claude/agents/*.md`
|
|
146
|
-
|
|
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).
|
|
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.
|
|
147
209
|
|
|
148
210
|
**Copilot agent frontmatter format:**
|
|
149
|
-
```
|
|
211
|
+
```yaml
|
|
150
212
|
---
|
|
151
213
|
name: explorer
|
|
152
214
|
description: "Read-only reconnaissance agent. Maps files, dependencies, and caller chains."
|
|
153
215
|
tools:
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
- search_files
|
|
216
|
+
- read
|
|
217
|
+
- search
|
|
157
218
|
---
|
|
158
219
|
```
|
|
159
220
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
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.
|
|
168
269
|
|
|
169
270
|
**What to strip:**
|
|
170
|
-
- `model:` line
|
|
171
271
|
- The entire `<!-- crewkit:context-start -->...<!-- crewkit:context-end -->` block (inclusive)
|
|
172
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
|
+
|
|
173
281
|
**File naming:** `.claude/agents/explorer.md` → `.github/agents/explorer.agent.md`
|
|
174
282
|
|
|
175
283
|
---
|
|
176
284
|
|
|
177
|
-
## Step C4 — `.github/
|
|
285
|
+
## Step C4 — `.github/skills/*/SKILL.md` (native skills)
|
|
178
286
|
|
|
179
287
|
**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
288
|
|
|
182
|
-
**
|
|
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:**
|
|
183
348
|
- What the skill is for (description)
|
|
184
349
|
- The key steps the user should follow or the AI should perform
|
|
185
350
|
- Any output format requirements
|
|
@@ -191,16 +356,16 @@ tools:
|
|
|
191
356
|
- Phase breakdown with parallel agents
|
|
192
357
|
- Any reference to Claude Code slash commands (`/compact`, `/crewkit-setup`)
|
|
193
358
|
|
|
194
|
-
**Example — source `full-workflow/SKILL.md` intent:**
|
|
195
|
-
```
|
|
196
|
-
Routes tasks through explore → implement → test → review agents.
|
|
197
|
-
```
|
|
198
|
-
|
|
199
359
|
**Example — target `.github/prompts/full-workflow.prompt.md`:**
|
|
200
360
|
```markdown
|
|
201
361
|
---
|
|
202
|
-
name: full-workflow
|
|
203
362
|
description: "Complete development workflow: explore, implement, test, and review."
|
|
363
|
+
agent: "agent"
|
|
364
|
+
tools:
|
|
365
|
+
- read
|
|
366
|
+
- edit
|
|
367
|
+
- search
|
|
368
|
+
- execute
|
|
204
369
|
---
|
|
205
370
|
# Full Workflow
|
|
206
371
|
|
|
@@ -220,7 +385,7 @@ Use this prompt to complete a development task end-to-end.
|
|
|
220
385
|
```
|
|
221
386
|
|
|
222
387
|
**File naming:** `full-workflow/SKILL.md` → `.github/prompts/full-workflow.prompt.md`
|
|
223
|
-
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`.
|
|
224
389
|
|
|
225
390
|
---
|
|
226
391
|
|
|
@@ -228,12 +393,13 @@ Use the skill directory name as the prompt file name.
|
|
|
228
393
|
|
|
229
394
|
Before reporting done, verify each item:
|
|
230
395
|
|
|
231
|
-
- [ ] `.github/copilot-instructions.md` — exists, contains hard rules,
|
|
232
|
-
- [ ] `.github/instructions/` — one `.instructions.md` file per
|
|
233
|
-
- [ ] `.github/instructions
|
|
234
|
-
- [ ] `.github/agents/` —
|
|
235
|
-
- [ ] `.github/agents/*.agent.md` —
|
|
236
|
-
- [ ] `.github/
|
|
237
|
-
- [ ] `.github/
|
|
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
|
|
238
404
|
- [ ] `.ai/memory/` — NOT duplicated under `.github/` (shared, no copy needed)
|
|
239
405
|
- [ ] No Portuguese in any generated file
|
package/skill/copilot-agent.md
CHANGED
|
@@ -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
|
-
```
|
|
165
|
+
```yaml
|
|
109
166
|
---
|
|
110
|
-
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
|
-
# [
|
|
217
|
+
# [Skill Name]
|
|
114
218
|
|
|
115
|
-
|
|
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
|
|
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
|
|
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
|
}
|