@atlashub/smartstack-cli 3.40.0 → 3.42.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/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/efcore/conflicts.md +12 -2
- package/templates/agents/efcore/db-deploy.md +12 -4
- package/templates/agents/efcore/db-reset.md +12 -4
- package/templates/agents/efcore/db-seed.md +11 -3
- package/templates/agents/efcore/db-status.md +11 -4
- package/templates/agents/efcore/migration.md +11 -6
- package/templates/agents/efcore/rebase-snapshot.md +11 -7
- package/templates/agents/efcore/scan.md +12 -2
- package/templates/agents/efcore/squash.md +11 -7
- package/templates/skills/efcore/SKILL.md +33 -100
- package/templates/skills/review-code/SKILL.md +1 -0
package/package.json
CHANGED
|
@@ -2,15 +2,25 @@
|
|
|
2
2
|
name: efcore-conflicts
|
|
3
3
|
description: EF Core conflict analyzer - BLOCKING if conflict detected
|
|
4
4
|
color: red
|
|
5
|
-
model:
|
|
5
|
+
model: haiku
|
|
6
6
|
tools: Bash, Glob, Read
|
|
7
|
-
mcp: mcp__smartstack__check_migrations
|
|
8
7
|
---
|
|
9
8
|
|
|
10
9
|
# EF Core Conflicts Agent
|
|
11
10
|
|
|
12
11
|
Analyzes migration conflicts between branches using **SmartStack MCP**. **BLOCKING** if conflict detected.
|
|
13
12
|
|
|
13
|
+
## WSL Preflight (MANDATORY - run BEFORE any git command)
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Repair worktree .git file if Windows path detected under WSL
|
|
17
|
+
if [ -f .git ] && grep -q '^gitdir: [A-Za-z]:' .git 2>/dev/null && grep -qi microsoft /proc/version 2>/dev/null; then
|
|
18
|
+
p=$(sed 's/^gitdir: //' .git | tr -d '\r\n'); d=$(echo "${p:0:1}" | tr A-Z a-z); r="${p:2}"; r="${r//\\//}"
|
|
19
|
+
printf 'gitdir: %s\n' "$(realpath -m --relative-to="$(pwd)" "/mnt/$d$r")" > .git
|
|
20
|
+
echo "Worktree .git path repaired for WSL"
|
|
21
|
+
fi
|
|
22
|
+
```
|
|
23
|
+
|
|
14
24
|
## Mission
|
|
15
25
|
|
|
16
26
|
1. **Invoke MCP** `check_migrations` for structured analysis
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
name: efcore-db-deploy
|
|
3
3
|
description: EF Core database deploy - apply pending migrations
|
|
4
4
|
color: green
|
|
5
|
-
model:
|
|
5
|
+
model: haiku
|
|
6
6
|
tools: Bash, Glob
|
|
7
|
-
steps:
|
|
8
|
-
- steps/shared/step-00-init.md
|
|
9
|
-
- steps/db/step-deploy.md
|
|
10
7
|
---
|
|
11
8
|
|
|
12
9
|
# EF Core Database Deploy Agent
|
|
@@ -15,6 +12,17 @@ Applies pending migrations to the local database.
|
|
|
15
12
|
|
|
16
13
|
**Progressive Steps:** Load `steps/db/step-deploy.md` for detailed instructions.
|
|
17
14
|
|
|
15
|
+
## WSL Preflight (MANDATORY - run BEFORE any git command)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Repair worktree .git file if Windows path detected under WSL
|
|
19
|
+
if [ -f .git ] && grep -q '^gitdir: [A-Za-z]:' .git 2>/dev/null && grep -qi microsoft /proc/version 2>/dev/null; then
|
|
20
|
+
p=$(sed 's/^gitdir: //' .git | tr -d '\r\n'); d=$(echo "${p:0:1}" | tr A-Z a-z); r="${p:2}"; r="${r//\\//}"
|
|
21
|
+
printf 'gitdir: %s\n' "$(realpath -m --relative-to="$(pwd)" "/mnt/$d$r")" > .git
|
|
22
|
+
echo "Worktree .git path repaired for WSL"
|
|
23
|
+
fi
|
|
24
|
+
```
|
|
25
|
+
|
|
18
26
|
## Workflow
|
|
19
27
|
|
|
20
28
|
1. **Verify** appsettings.Local.json exists
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
name: efcore-db-reset
|
|
3
3
|
description: EF Core database reset - drop and recreate (DESTRUCTIVE)
|
|
4
4
|
color: red
|
|
5
|
-
model:
|
|
5
|
+
model: haiku
|
|
6
6
|
tools: Bash, Glob, Read
|
|
7
|
-
steps:
|
|
8
|
-
- steps/shared/step-00-init.md
|
|
9
|
-
- steps/db/step-reset.md
|
|
10
7
|
---
|
|
11
8
|
|
|
12
9
|
# EF Core Database Reset Agent
|
|
@@ -15,6 +12,17 @@ steps:
|
|
|
15
12
|
|
|
16
13
|
**Progressive Steps:** Load `steps/db/step-reset.md` for detailed instructions.
|
|
17
14
|
|
|
15
|
+
## WSL Preflight (MANDATORY - run BEFORE any git command)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Repair worktree .git file if Windows path detected under WSL
|
|
19
|
+
if [ -f .git ] && grep -q '^gitdir: [A-Za-z]:' .git 2>/dev/null && grep -qi microsoft /proc/version 2>/dev/null; then
|
|
20
|
+
p=$(sed 's/^gitdir: //' .git | tr -d '\r\n'); d=$(echo "${p:0:1}" | tr A-Z a-z); r="${p:2}"; r="${r//\\//}"
|
|
21
|
+
printf 'gitdir: %s\n' "$(realpath -m --relative-to="$(pwd)" "/mnt/$d$r")" > .git
|
|
22
|
+
echo "Worktree .git path repaired for WSL"
|
|
23
|
+
fi
|
|
24
|
+
```
|
|
25
|
+
|
|
18
26
|
> **CLAUDE INSTRUCTION:** The `AskUserQuestion({...})` blocks are instructions to use the `AskUserQuestion` tool **interactively**. You MUST execute the tool with these parameters to get the user's response BEFORE continuing.
|
|
19
27
|
|
|
20
28
|
## Workflow
|
|
@@ -4,9 +4,6 @@ description: EF Core database seed - populate test data
|
|
|
4
4
|
color: yellow
|
|
5
5
|
model: haiku
|
|
6
6
|
tools: Bash, Glob, Read
|
|
7
|
-
steps:
|
|
8
|
-
- steps/shared/step-00-init.md
|
|
9
|
-
- steps/db/step-seed.md
|
|
10
7
|
---
|
|
11
8
|
|
|
12
9
|
# EF Core Database Seed Agent
|
|
@@ -15,6 +12,17 @@ Populates the database with test data.
|
|
|
15
12
|
|
|
16
13
|
**Progressive Steps:** Load `steps/db/step-seed.md` for detailed instructions.
|
|
17
14
|
|
|
15
|
+
## WSL Preflight (MANDATORY - run BEFORE any git command)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Repair worktree .git file if Windows path detected under WSL
|
|
19
|
+
if [ -f .git ] && grep -q '^gitdir: [A-Za-z]:' .git 2>/dev/null && grep -qi microsoft /proc/version 2>/dev/null; then
|
|
20
|
+
p=$(sed 's/^gitdir: //' .git | tr -d '\r\n'); d=$(echo "${p:0:1}" | tr A-Z a-z); r="${p:2}"; r="${r//\\//}"
|
|
21
|
+
printf 'gitdir: %s\n' "$(realpath -m --relative-to="$(pwd)" "/mnt/$d$r")" > .git
|
|
22
|
+
echo "Worktree .git path repaired for WSL"
|
|
23
|
+
fi
|
|
24
|
+
```
|
|
25
|
+
|
|
18
26
|
## Workflow
|
|
19
27
|
|
|
20
28
|
1. **Detect** available seeding method:
|
|
@@ -4,10 +4,6 @@ description: EF Core database status - fast migration state check
|
|
|
4
4
|
color: blue
|
|
5
5
|
model: haiku
|
|
6
6
|
tools: Bash, Glob
|
|
7
|
-
mcp: mcp__smartstack__check_migrations
|
|
8
|
-
steps:
|
|
9
|
-
- steps/shared/step-00-init.md
|
|
10
|
-
- steps/db/step-status.md
|
|
11
7
|
---
|
|
12
8
|
|
|
13
9
|
# EF Core Database Status Agent
|
|
@@ -16,6 +12,17 @@ Fast check of EF Core migration state using **SmartStack MCP**.
|
|
|
16
12
|
|
|
17
13
|
**Progressive Steps:** Load `steps/db/step-status.md` for detailed instructions.
|
|
18
14
|
|
|
15
|
+
## WSL Preflight (MANDATORY - run BEFORE any git command)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Repair worktree .git file if Windows path detected under WSL
|
|
19
|
+
if [ -f .git ] && grep -q '^gitdir: [A-Za-z]:' .git 2>/dev/null && grep -qi microsoft /proc/version 2>/dev/null; then
|
|
20
|
+
p=$(sed 's/^gitdir: //' .git | tr -d '\r\n'); d=$(echo "${p:0:1}" | tr A-Z a-z); r="${p:2}"; r="${r//\\//}"
|
|
21
|
+
printf 'gitdir: %s\n' "$(realpath -m --relative-to="$(pwd)" "/mnt/$d$r")" > .git
|
|
22
|
+
echo "Worktree .git path repaired for WSL"
|
|
23
|
+
fi
|
|
24
|
+
```
|
|
25
|
+
|
|
19
26
|
## Workflow
|
|
20
27
|
|
|
21
28
|
1. **Invoke MCP** for migration list and naming validation
|
|
@@ -4,12 +4,6 @@ description: EF Core migration manager - orchestrates MCP for naming (1 per feat
|
|
|
4
4
|
color: magenta
|
|
5
5
|
model: sonnet
|
|
6
6
|
tools: Bash, Glob, Read, Edit
|
|
7
|
-
steps:
|
|
8
|
-
- steps/shared/step-00-init.md
|
|
9
|
-
- steps/migration/step-00-init.md
|
|
10
|
-
- steps/migration/step-01-check.md
|
|
11
|
-
- steps/migration/step-02-create.md
|
|
12
|
-
- steps/migration/step-03-validate.md
|
|
13
7
|
---
|
|
14
8
|
|
|
15
9
|
# EF Core Migration Agent
|
|
@@ -18,6 +12,17 @@ Orchestrates migration creation with the "1 migration per feature" rule.
|
|
|
18
12
|
|
|
19
13
|
**Progressive Steps:** Load `steps/migration/` for detailed instructions.
|
|
20
14
|
|
|
15
|
+
## WSL Preflight (MANDATORY - run BEFORE any git command)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Repair worktree .git file if Windows path detected under WSL
|
|
19
|
+
if [ -f .git ] && grep -q '^gitdir: [A-Za-z]:' .git 2>/dev/null && grep -qi microsoft /proc/version 2>/dev/null; then
|
|
20
|
+
p=$(sed 's/^gitdir: //' .git | tr -d '\r\n'); d=$(echo "${p:0:1}" | tr A-Z a-z); r="${p:2}"; r="${r//\\//}"
|
|
21
|
+
printf 'gitdir: %s\n' "$(realpath -m --relative-to="$(pwd)" "/mnt/$d$r")" > .git
|
|
22
|
+
echo "Worktree .git path repaired for WSL"
|
|
23
|
+
fi
|
|
24
|
+
```
|
|
25
|
+
|
|
21
26
|
> **IMPORTANT:** This agent **ORCHESTRATES** only. Naming is **DELEGATED TO MCP**.
|
|
22
27
|
|
|
23
28
|
> **CLAUDE INSTRUCTION:** The `AskUserQuestion({...})` blocks are instructions to use the `AskUserQuestion` tool **interactively**. You MUST execute the tool with these parameters to get the user's response BEFORE continuing.
|
|
@@ -4,13 +4,6 @@ description: EF Core snapshot rebaser - resync ModelSnapshot with develop
|
|
|
4
4
|
color: yellow
|
|
5
5
|
model: sonnet
|
|
6
6
|
tools: Bash, Glob, Read, Edit
|
|
7
|
-
steps:
|
|
8
|
-
- steps/shared/step-00-init.md
|
|
9
|
-
- steps/rebase-snapshot/step-00-init.md
|
|
10
|
-
- steps/rebase-snapshot/step-01-backup.md
|
|
11
|
-
- steps/rebase-snapshot/step-02-fetch.md
|
|
12
|
-
- steps/rebase-snapshot/step-03-create.md
|
|
13
|
-
- steps/rebase-snapshot/step-04-validate.md
|
|
14
7
|
---
|
|
15
8
|
|
|
16
9
|
# EF Core Rebase-Snapshot Agent
|
|
@@ -19,6 +12,17 @@ Rebases ModelSnapshot on develop to resolve conflicts.
|
|
|
19
12
|
|
|
20
13
|
**Progressive Steps:** Load `steps/rebase-snapshot/` for detailed instructions.
|
|
21
14
|
|
|
15
|
+
## WSL Preflight (MANDATORY - run BEFORE any git command)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Repair worktree .git file if Windows path detected under WSL
|
|
19
|
+
if [ -f .git ] && grep -q '^gitdir: [A-Za-z]:' .git 2>/dev/null && grep -qi microsoft /proc/version 2>/dev/null; then
|
|
20
|
+
p=$(sed 's/^gitdir: //' .git | tr -d '\r\n'); d=$(echo "${p:0:1}" | tr A-Z a-z); r="${p:2}"; r="${r//\\//}"
|
|
21
|
+
printf 'gitdir: %s\n' "$(realpath -m --relative-to="$(pwd)" "/mnt/$d$r")" > .git
|
|
22
|
+
echo "Worktree .git path repaired for WSL"
|
|
23
|
+
fi
|
|
24
|
+
```
|
|
25
|
+
|
|
22
26
|
## Workflow
|
|
23
27
|
|
|
24
28
|
1. **Backup** all migrations
|
|
@@ -2,15 +2,25 @@
|
|
|
2
2
|
name: efcore-scan
|
|
3
3
|
description: EF Core cross-branch migration scanner - detect conflicts before they happen
|
|
4
4
|
color: cyan
|
|
5
|
-
model:
|
|
5
|
+
model: haiku
|
|
6
6
|
tools: Bash, Glob, Read
|
|
7
|
-
mcp: mcp__smartstack__check_migrations
|
|
8
7
|
---
|
|
9
8
|
|
|
10
9
|
# EF Core Scan Agent
|
|
11
10
|
|
|
12
11
|
Cross-branch scanner using **SmartStack MCP** to detect migrations across all active branches.
|
|
13
12
|
|
|
13
|
+
## WSL Preflight (MANDATORY - run BEFORE any git command)
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Repair worktree .git file if Windows path detected under WSL
|
|
17
|
+
if [ -f .git ] && grep -q '^gitdir: [A-Za-z]:' .git 2>/dev/null && grep -qi microsoft /proc/version 2>/dev/null; then
|
|
18
|
+
p=$(sed 's/^gitdir: //' .git | tr -d '\r\n'); d=$(echo "${p:0:1}" | tr A-Z a-z); r="${p:2}"; r="${r//\\//}"
|
|
19
|
+
printf 'gitdir: %s\n' "$(realpath -m --relative-to="$(pwd)" "/mnt/$d$r")" > .git
|
|
20
|
+
echo "Worktree .git path repaired for WSL"
|
|
21
|
+
fi
|
|
22
|
+
```
|
|
23
|
+
|
|
14
24
|
## Mission
|
|
15
25
|
|
|
16
26
|
1. **List** all active worktrees
|
|
@@ -4,13 +4,6 @@ description: EF Core migration squasher - combine multiple migrations into one
|
|
|
4
4
|
color: magenta
|
|
5
5
|
model: sonnet
|
|
6
6
|
tools: Bash, Glob, Read
|
|
7
|
-
steps:
|
|
8
|
-
- steps/shared/step-00-init.md
|
|
9
|
-
- steps/squash/step-00-init.md
|
|
10
|
-
- steps/squash/step-01-backup.md
|
|
11
|
-
- steps/squash/step-02-fetch.md
|
|
12
|
-
- steps/squash/step-03-create.md
|
|
13
|
-
- steps/squash/step-04-validate.md
|
|
14
7
|
---
|
|
15
8
|
|
|
16
9
|
# EF Core Squash Agent
|
|
@@ -19,6 +12,17 @@ Consolidates multiple migrations into a single one, retrieving both the ModelSna
|
|
|
19
12
|
|
|
20
13
|
**Progressive Steps:** Load `steps/squash/` for detailed instructions.
|
|
21
14
|
|
|
15
|
+
## WSL Preflight (MANDATORY - run BEFORE any git command)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Repair worktree .git file if Windows path detected under WSL
|
|
19
|
+
if [ -f .git ] && grep -q '^gitdir: [A-Za-z]:' .git 2>/dev/null && grep -qi microsoft /proc/version 2>/dev/null; then
|
|
20
|
+
p=$(sed 's/^gitdir: //' .git | tr -d '\r\n'); d=$(echo "${p:0:1}" | tr A-Z a-z); r="${p:2}"; r="${r//\\//}"
|
|
21
|
+
printf 'gitdir: %s\n' "$(realpath -m --relative-to="$(pwd)" "/mnt/$d$r")" > .git
|
|
22
|
+
echo "Worktree .git path repaired for WSL"
|
|
23
|
+
fi
|
|
24
|
+
```
|
|
25
|
+
|
|
22
26
|
## Core Principle
|
|
23
27
|
|
|
24
28
|
```
|
|
@@ -6,11 +6,11 @@ disable-model-invocation: true
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
## Current state (auto-injected)
|
|
9
|
-
-
|
|
10
|
-
-
|
|
9
|
+
- Preflight: !`if [ -f .git ] && grep -q '^gitdir: [A-Za-z]:' .git 2>/dev/null && grep -qi microsoft /proc/version 2>/dev/null; then p=$(sed 's/^gitdir: //' .git | tr -d '\r\n'); d=$(echo "${p:0:1}" | tr A-Z a-z); r="${p:2}"; r="${r//\\//}"; printf 'gitdir: %s\n' "$(realpath -m --relative-to="$(pwd)" "/mnt/$d$r")" > .git && echo "repaired"; else echo "ok"; fi`
|
|
10
|
+
- Branch: !`git branch --show-current 2>/dev/null || echo "UNAVAILABLE"`
|
|
11
11
|
|
|
12
12
|
<objective>
|
|
13
|
-
Manage EF Core migrations and database operations
|
|
13
|
+
Manage EF Core migrations and database operations. **ALWAYS delegate to Task agents** for fast execution.
|
|
14
14
|
</objective>
|
|
15
15
|
|
|
16
16
|
<quick_start>
|
|
@@ -32,88 +32,48 @@ Manage EF Core migrations and database operations with progressive step loading,
|
|
|
32
32
|
```
|
|
33
33
|
</quick_start>
|
|
34
34
|
|
|
35
|
-
<parameters>
|
|
36
|
-
|
|
37
|
-
<subcommands>
|
|
38
|
-
| Command | Description | Steps |
|
|
39
|
-
|---------|-------------|-------|
|
|
40
|
-
| `db-status` | Display migrations and database status | steps/db/status/ |
|
|
41
|
-
| `db-deploy` | Apply pending migrations | steps/db/deploy/ |
|
|
42
|
-
| `db-reset` | Drop + recreate database | steps/db/reset/ |
|
|
43
|
-
| `db-seed` | Populate with test data | steps/db/seed/ |
|
|
44
|
-
| `migration` | Create/recreate migration | steps/migration/ |
|
|
45
|
-
| `squash` | Consolidate migrations | steps/squash/ |
|
|
46
|
-
| `rebase-snapshot` | Sync snapshot with parent | steps/rebase-snapshot/ |
|
|
47
|
-
| `scan` | Scan for conflicts | (MCP-centric) |
|
|
48
|
-
| `conflicts` | Analyze conflicts | (MCP-centric) |
|
|
49
|
-
</subcommands>
|
|
50
|
-
|
|
51
35
|
<flags>
|
|
52
36
|
| Flag | Description |
|
|
53
37
|
|------|-------------|
|
|
54
38
|
| `--context <name>` | Specify DbContext (CoreDbContext/ExtensionsDbContext) |
|
|
55
|
-
| `--env <name>` | Use appsettings.{name}.json |
|
|
56
|
-
| `--verbose` | Show detailed output |
|
|
57
39
|
| `--force` | Skip confirmations |
|
|
58
|
-
| `--dry-run` | Preview without executing |
|
|
59
40
|
</flags>
|
|
60
41
|
|
|
61
|
-
</parameters>
|
|
62
|
-
|
|
63
|
-
<state_variables>
|
|
64
|
-
**Shared state across all steps:**
|
|
65
|
-
|
|
66
|
-
| Variable | Type | Description |
|
|
67
|
-
|----------|------|-------------|
|
|
68
|
-
| `{command}` | string | Current subcommand |
|
|
69
|
-
| `{dbcontext}` | string | CoreDbContext or ExtensionsDbContext |
|
|
70
|
-
| `{dbcontext_type}` | string | "core" or "extensions" |
|
|
71
|
-
| `{schema}` | string | Database schema |
|
|
72
|
-
| `{infra_project}` | string | Path to Infrastructure project |
|
|
73
|
-
| `{startup_project}` | string | Path to API/Web project |
|
|
74
|
-
| `{migrations_dir}` | string | Path to Migrations folder |
|
|
75
|
-
| `{base_branch}` | string | Parent branch (develop/main) |
|
|
76
|
-
| `{branch_type}` | string | feature/release/hotfix |
|
|
77
|
-
| `{auto_mode}` | boolean | Skip confirmations |
|
|
78
|
-
</state_variables>
|
|
79
|
-
|
|
80
42
|
<entry_point>
|
|
81
43
|
|
|
82
|
-
**ROUTING
|
|
44
|
+
**ROUTING: ALWAYS delegate to Task agent. Never execute inline.**
|
|
83
45
|
|
|
84
|
-
|
|
85
|
-
2. Load shared init step: `steps/shared/step-00-init.md`
|
|
86
|
-
3. Route to command-specific steps:
|
|
46
|
+
Parse the command from `$ARGUMENTS` and delegate to the matching agent:
|
|
87
47
|
|
|
88
|
-
| Command |
|
|
89
|
-
|
|
90
|
-
| `db-status` | `
|
|
91
|
-
| `db-deploy` | `
|
|
92
|
-
| `db-reset` | `
|
|
93
|
-
| `db-seed` | `
|
|
94
|
-
| `migration` | `
|
|
95
|
-
| `squash` | `
|
|
96
|
-
| `rebase-snapshot` | `
|
|
97
|
-
| `scan` |
|
|
98
|
-
| `conflicts` |
|
|
48
|
+
| Command | Task Agent (`subagent_type`) | Model | Description |
|
|
49
|
+
|---------|----------------------------|-------|-------------|
|
|
50
|
+
| `db-status` | `efcore-db-status` | haiku | Fast migration state check |
|
|
51
|
+
| `db-deploy` | `efcore-db-deploy` | haiku | Apply pending migrations |
|
|
52
|
+
| `db-reset` | `efcore-db-reset` | haiku | Drop + recreate database |
|
|
53
|
+
| `db-seed` | `efcore-db-seed` | haiku | Populate with test data |
|
|
54
|
+
| `migration` | `efcore-migration` | sonnet | Create/recreate migration (MCP) |
|
|
55
|
+
| `squash` | `efcore-squash` | sonnet | Consolidate migrations (MCP) |
|
|
56
|
+
| `rebase-snapshot` | `efcore-rebase-snapshot` | sonnet | Sync snapshot with parent (MCP) |
|
|
57
|
+
| `scan` | `efcore-scan` | haiku | Cross-branch conflict scan |
|
|
58
|
+
| `conflicts` | `efcore-conflicts` | haiku | Conflict analysis |
|
|
99
59
|
|
|
100
|
-
|
|
60
|
+
**Delegation template:**
|
|
101
61
|
|
|
102
|
-
|
|
103
|
-
|
|
62
|
+
```
|
|
63
|
+
Task(
|
|
64
|
+
subagent_type: "{agent_name}",
|
|
65
|
+
prompt: "Execute /efcore {command} in {cwd}. Branch: {branch}. Flags: {flags}",
|
|
66
|
+
mode: "bypassPermissions"
|
|
67
|
+
)
|
|
68
|
+
```
|
|
104
69
|
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
- `block_production()` - Safety check
|
|
70
|
+
**Pass to agent prompt:**
|
|
71
|
+
- Current working directory (absolute path)
|
|
72
|
+
- Current branch name
|
|
73
|
+
- Any flags (--context, --force)
|
|
74
|
+
- User's description (for migration command)
|
|
111
75
|
|
|
112
|
-
|
|
113
|
-
- `mcp__smartstack__suggest_migration` - Generate compliant names
|
|
114
|
-
- `mcp__smartstack__check_migrations` - Analyze conflicts
|
|
115
|
-
- `mcp__smartstack__validate_conventions` - Validate structure
|
|
116
|
-
</shared_functions>
|
|
76
|
+
</entry_point>
|
|
117
77
|
|
|
118
78
|
<dual_dbcontext>
|
|
119
79
|
SmartStack uses **two separate DbContexts**:
|
|
@@ -122,12 +82,6 @@ SmartStack uses **two separate DbContexts**:
|
|
|
122
82
|
|---------|-----------|--------|---------------|
|
|
123
83
|
| `core` | `CoreDbContext` | `core` | `core.__EFMigrationsHistory` |
|
|
124
84
|
| `extensions` | `ExtensionsDbContext` | `extensions` | `extensions.__EFMigrationsHistory` |
|
|
125
|
-
|
|
126
|
-
**Auto-detection priority:**
|
|
127
|
-
1. SmartStack.Domain exists → CoreDbContext
|
|
128
|
-
2. Client with SmartStack NuGet → ExtensionsDbContext
|
|
129
|
-
3. Code scan for DbContext classes
|
|
130
|
-
4. Ask user if ambiguous
|
|
131
85
|
</dual_dbcontext>
|
|
132
86
|
|
|
133
87
|
<naming_convention>
|
|
@@ -135,33 +89,12 @@ SmartStack uses **two separate DbContexts**:
|
|
|
135
89
|
|
|
136
90
|
Pattern: `{context}_v{version}_{sequence}_{Description}`
|
|
137
91
|
|
|
138
|
-
|
|
139
|
-
- `core_v1.9.0_001_AddUserRoles`
|
|
140
|
-
- `extensions_v1.2.0_001_AddCustomFields`
|
|
141
|
-
|
|
142
|
-
**FORBIDDEN:** Manual name calculation. Always use MCP.
|
|
92
|
+
**FORBIDDEN:** Manual name calculation. Always use `mcp__smartstack__suggest_migration`.
|
|
143
93
|
</naming_convention>
|
|
144
94
|
|
|
145
95
|
<safety_rules>
|
|
146
|
-
1. **Backup MANDATORY** for destructive operations
|
|
96
|
+
1. **Backup MANDATORY** for destructive operations (db-reset, squash)
|
|
147
97
|
2. **Production BLOCKED** - Never run on production
|
|
148
98
|
3. **1 migration per feature** - Recreate, don't accumulate
|
|
149
|
-
4. **
|
|
150
|
-
5. **MCP for naming** - Never hardcode migration names
|
|
99
|
+
4. **MCP for naming** - Never hardcode migration names
|
|
151
100
|
</safety_rules>
|
|
152
|
-
|
|
153
|
-
<execution_rules>
|
|
154
|
-
- **Load one step at a time** - Progressive loading
|
|
155
|
-
- **State persists** - Variables carry across steps
|
|
156
|
-
- **Follow next_step** - Each step defines next
|
|
157
|
-
- **MCP validation** - Use SmartStack tools
|
|
158
|
-
- **Safety > Correctness > Speed**
|
|
159
|
-
</execution_rules>
|
|
160
|
-
|
|
161
|
-
<success_criteria>
|
|
162
|
-
- DbContext correctly detected
|
|
163
|
-
- Migrations created with MCP naming
|
|
164
|
-
- Database operations succeed
|
|
165
|
-
- Parent migrations preserved (for squash/rebase)
|
|
166
|
-
- Build passes after changes
|
|
167
|
-
</success_criteria>
|
|
@@ -5,6 +5,7 @@ model: sonnet
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Files to review (auto-injected)
|
|
8
|
+
- Preflight: !`if [ -f .git ] && grep -q '^gitdir: [A-Za-z]:' .git 2>/dev/null && grep -qi microsoft /proc/version 2>/dev/null; then p=$(sed 's/^gitdir: //' .git | tr -d '\r\n'); d=$(echo "${p:0:1}" | tr A-Z a-z); r="${p:2}"; r="${r//\\//}"; printf 'gitdir: %s\n' "$(realpath -m --relative-to="$(pwd)" "/mnt/$d$r")" > .git && echo "repaired"; else echo "ok"; fi`
|
|
8
9
|
- Changed files: !`git diff --name-only HEAD~1 2>/dev/null || git diff --name-only --staged 2>/dev/null || echo "no changes detected"`
|
|
9
10
|
- Diff stats: !`git diff --stat HEAD~1 2>/dev/null || git diff --stat --staged 2>/dev/null || echo "no stats"`
|
|
10
11
|
- SmartStack detected: !`test -f "*.sln" && grep -l "SmartStack" *.sln 2>/dev/null && echo "YES" || echo "NO"`
|