@atlashub/smartstack-cli 1.36.0 → 2.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/config/mcp-defaults.json +62 -0
- package/dist/index.js +57 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +16984 -0
- package/dist/mcp-entry.mjs.map +1 -0
- package/package.json +14 -5
- package/templates/agents/gitflow/start.md +5 -4
- package/templates/agents/mcp-healthcheck.md +15 -13
- package/templates/mcp-scaffolding/component.tsx.hbs +298 -0
- package/templates/mcp-scaffolding/controller.cs.hbs +184 -0
- package/templates/mcp-scaffolding/entity-extension.cs.hbs +231 -0
- package/templates/mcp-scaffolding/frontend/api-client.ts.hbs +116 -0
- package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +133 -0
- package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +134 -0
- package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +261 -0
- package/templates/mcp-scaffolding/service-extension.cs.hbs +53 -0
- package/templates/mcp-scaffolding/tests/controller.test.cs.hbs +413 -0
- package/templates/mcp-scaffolding/tests/entity.test.cs.hbs +239 -0
- package/templates/mcp-scaffolding/tests/repository.test.cs.hbs +441 -0
- package/templates/mcp-scaffolding/tests/security.test.cs.hbs +442 -0
- package/templates/mcp-scaffolding/tests/service.test.cs.hbs +390 -0
- package/templates/mcp-scaffolding/tests/validator.test.cs.hbs +428 -0
- package/templates/ralph/README.md +3 -3
- package/templates/ralph/ralph.config.yaml +2 -2
- package/templates/skills/admin/SKILL.md +42 -0
- package/templates/skills/application/steps/step-01-navigation.md +226 -43
- package/templates/skills/application/steps/step-03-roles.md +160 -38
- package/templates/skills/application/steps/step-04-backend.md +109 -2
- package/templates/skills/application/templates-seed.md +200 -1
- package/templates/skills/business-analyse/_shared.md +24 -1
- package/templates/skills/business-analyse/questionnaire/01-context.md +4 -4
- package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +3 -3
- package/templates/skills/business-analyse/questionnaire/03-scope.md +4 -4
- package/templates/skills/business-analyse/questionnaire/04-data.md +7 -7
- package/templates/skills/business-analyse/questionnaire/05-integrations.md +1 -1
- package/templates/skills/business-analyse/questionnaire/06-security.md +3 -3
- package/templates/skills/business-analyse/questionnaire/07-ui.md +1 -1
- package/templates/skills/business-analyse/questionnaire/08-performance.md +3 -3
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +4 -4
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +2 -2
- package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +2 -2
- package/templates/skills/business-analyse/questionnaire/12-migration.md +1 -1
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +2 -2
- package/templates/skills/business-analyse/steps/step-01-discover.md +50 -25
- package/templates/skills/business-analyse/steps/step-05-handoff.md +133 -34
- package/templates/skills/cc-agent/SKILL.md +129 -0
- package/templates/skills/cc-agent/references/agent-frontmatter.md +213 -0
- package/templates/skills/cc-agent/references/permission-modes.md +102 -0
- package/templates/skills/cc-agent/references/tools-reference.md +144 -0
- package/templates/skills/cc-agent/steps/step-00-init.md +134 -0
- package/templates/skills/cc-agent/steps/step-01-design.md +186 -0
- package/templates/skills/cc-agent/steps/step-02-generate.md +204 -0
- package/templates/skills/cc-agent/steps/step-03-validate.md +130 -0
- package/templates/skills/cc-agent/templates/agent-categorized.md +67 -0
- package/templates/skills/cc-agent/templates/agent-standalone.md +56 -0
- package/templates/skills/cc-agent/templates/agent-with-skills.md +94 -0
- package/templates/skills/cc-audit/SKILL.md +108 -0
- package/templates/skills/cc-audit/references/agent-checklist.md +91 -0
- package/templates/skills/cc-audit/references/hook-checklist.md +110 -0
- package/templates/skills/cc-audit/references/skill-checklist.md +70 -0
- package/templates/skills/cc-audit/steps/step-00-init.md +98 -0
- package/templates/skills/cc-audit/steps/step-01-scan.md +142 -0
- package/templates/skills/cc-audit/steps/step-02-analyze.md +158 -0
- package/templates/skills/cc-audit/steps/step-03-report.md +142 -0
- package/templates/skills/cc-skill/SKILL.md +134 -0
- package/templates/skills/cc-skill/references/best-practices.md +167 -0
- package/templates/skills/cc-skill/references/frontmatter-reference.md +182 -0
- package/templates/skills/cc-skill/references/skill-patterns.md +199 -0
- package/templates/skills/cc-skill/steps/step-00-init.md +119 -0
- package/templates/skills/cc-skill/steps/step-01-design.md +199 -0
- package/templates/skills/cc-skill/steps/step-02-generate.md +145 -0
- package/templates/skills/cc-skill/steps/step-03-steps.md +151 -0
- package/templates/skills/cc-skill/steps/step-04-validate.md +124 -0
- package/templates/skills/cc-skill/templates/skill-forked.md +85 -0
- package/templates/skills/cc-skill/templates/skill-progressive.md +102 -0
- package/templates/skills/cc-skill/templates/skill-simple.md +75 -0
- package/templates/skills/cc-skill/templates/step-template.md +82 -0
- package/templates/skills/check-version/SKILL.md +6 -0
- package/templates/skills/debug/SKILL.md +4 -0
- package/templates/skills/documentation/SKILL.md +1 -0
- package/templates/skills/efcore/SKILL.md +5 -0
- package/templates/skills/efcore/steps/db/step-deploy.md +26 -5
- package/templates/skills/efcore/steps/shared/step-00-init.md +21 -7
- package/templates/skills/explore/SKILL.md +28 -32
- package/templates/skills/feature-full/SKILL.md +1 -0
- package/templates/skills/gitflow/SKILL.md +8 -0
- package/templates/skills/gitflow/steps/step-start.md +45 -10
- package/templates/skills/mcp/SKILL.md +38 -18
- package/templates/skills/quick-search/SKILL.md +8 -1
- package/templates/skills/ralph-loop/SKILL.md +1 -1
- package/templates/skills/ralph-loop/steps/step-00-init.md +8 -68
- package/templates/skills/ralph-loop/steps/step-04-check.md +1 -1
- package/templates/skills/refactor/SKILL.md +1 -0
- package/templates/skills/review-code/SKILL.md +7 -1
- package/templates/skills/ui-components/SKILL.md +31 -438
- package/templates/skills/ui-components/accessibility.md +170 -0
- package/templates/skills/ui-components/patterns/data-table.md +39 -0
- package/templates/skills/ui-components/patterns/entity-card.md +77 -0
- package/templates/skills/ui-components/patterns/grid-layout.md +91 -0
- package/templates/skills/ui-components/patterns/kanban.md +43 -0
- package/templates/skills/ui-components/style-guide.md +86 -0
- package/templates/skills/utils/SKILL.md +1 -0
- package/templates/skills/validate/SKILL.md +1 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Template: Progressive Step Loading Skill
|
|
2
|
+
|
|
3
|
+
Use this template when creating a complex skill with multiple phases that benefit from progressive step loading.
|
|
4
|
+
|
|
5
|
+
## Generated SKILL.md format:
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
---
|
|
9
|
+
name: {{SKILL_NAME}}
|
|
10
|
+
description: |
|
|
11
|
+
{{DESCRIPTION}}
|
|
12
|
+
{{#if ARGUMENT_HINT}}
|
|
13
|
+
argument-hint: "{{ARGUMENT_HINT}}"
|
|
14
|
+
{{/if}}
|
|
15
|
+
{{#if DISABLE_MODEL_INVOCATION}}
|
|
16
|
+
disable-model-invocation: true
|
|
17
|
+
{{/if}}
|
|
18
|
+
{{#if MODEL}}
|
|
19
|
+
model: {{MODEL}}
|
|
20
|
+
{{/if}}
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<objective>
|
|
24
|
+
{{OBJECTIVE}}
|
|
25
|
+
</objective>
|
|
26
|
+
|
|
27
|
+
<quick_start>
|
|
28
|
+
|
|
29
|
+
` ` `bash
|
|
30
|
+
/{{SKILL_NAME}} {{EXAMPLE_ARGS_1}}
|
|
31
|
+
/{{SKILL_NAME}} {{EXAMPLE_ARGS_2}}
|
|
32
|
+
` ` `
|
|
33
|
+
|
|
34
|
+
</quick_start>
|
|
35
|
+
|
|
36
|
+
<parameters>
|
|
37
|
+
|
|
38
|
+
<flags>
|
|
39
|
+
| Flag | Description |
|
|
40
|
+
|------|-------------|
|
|
41
|
+
| {{FLAG_SHORT}} | {{FLAG_DESCRIPTION}} |
|
|
42
|
+
</flags>
|
|
43
|
+
|
|
44
|
+
<examples>
|
|
45
|
+
` ` `bash
|
|
46
|
+
/{{SKILL_NAME}} {{EXAMPLE_1}}
|
|
47
|
+
/{{SKILL_NAME}} {{EXAMPLE_2}}
|
|
48
|
+
` ` `
|
|
49
|
+
</examples>
|
|
50
|
+
|
|
51
|
+
</parameters>
|
|
52
|
+
|
|
53
|
+
<workflow>
|
|
54
|
+
{{#each STEPS}}
|
|
55
|
+
{{@index_plus_one}}. {{this.title}}
|
|
56
|
+
{{/each}}
|
|
57
|
+
</workflow>
|
|
58
|
+
|
|
59
|
+
<state_variables>
|
|
60
|
+
| Variable | Type | Description |
|
|
61
|
+
|----------|------|-------------|
|
|
62
|
+
{{#each STATE_VARS}}
|
|
63
|
+
| `{ {{this.name}} }` | {{this.type}} | {{this.description}} |
|
|
64
|
+
{{/each}}
|
|
65
|
+
</state_variables>
|
|
66
|
+
|
|
67
|
+
<entry_point>
|
|
68
|
+
|
|
69
|
+
**FIRST ACTION:** Load `steps/step-00-init.md`
|
|
70
|
+
|
|
71
|
+
</entry_point>
|
|
72
|
+
|
|
73
|
+
<step_files>
|
|
74
|
+
| Step | File | Purpose |
|
|
75
|
+
|------|------|---------|
|
|
76
|
+
{{#each STEPS}}
|
|
77
|
+
| {{this.number}} | `steps/step-{{this.number}}-{{this.name}}.md` | {{this.description}} |
|
|
78
|
+
{{/each}}
|
|
79
|
+
</step_files>
|
|
80
|
+
|
|
81
|
+
<execution_rules>
|
|
82
|
+
- **Load one step at a time** - Progressive loading to minimize context
|
|
83
|
+
- **Persist state variables** across all steps
|
|
84
|
+
- **Follow next_step directive** at end of each step
|
|
85
|
+
- {{RULE_1}}
|
|
86
|
+
- {{RULE_2}}
|
|
87
|
+
</execution_rules>
|
|
88
|
+
|
|
89
|
+
<success_criteria>
|
|
90
|
+
- {{CRITERIA_1}}
|
|
91
|
+
- {{CRITERIA_2}}
|
|
92
|
+
- {{CRITERIA_3}}
|
|
93
|
+
</success_criteria>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Notes:
|
|
97
|
+
- Keep SKILL.md under 500 lines (detailed content goes in steps)
|
|
98
|
+
- Each step should be self-contained
|
|
99
|
+
- State variables persist across all steps
|
|
100
|
+
- Always start with step-00-init for argument parsing
|
|
101
|
+
- Always end with a validation/summary step
|
|
102
|
+
- Best for: workflows, generators, multi-phase operations
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Template: Simple Skill
|
|
2
|
+
|
|
3
|
+
Use this template when creating a skill that fits in a single SKILL.md file without progressive step loading.
|
|
4
|
+
|
|
5
|
+
## Generated SKILL.md format:
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
---
|
|
9
|
+
name: {{SKILL_NAME}}
|
|
10
|
+
description: |
|
|
11
|
+
{{DESCRIPTION}}
|
|
12
|
+
{{#if ARGUMENT_HINT}}
|
|
13
|
+
argument-hint: "{{ARGUMENT_HINT}}"
|
|
14
|
+
{{/if}}
|
|
15
|
+
{{#if DISABLE_MODEL_INVOCATION}}
|
|
16
|
+
disable-model-invocation: true
|
|
17
|
+
{{/if}}
|
|
18
|
+
{{#if USER_INVOCABLE_FALSE}}
|
|
19
|
+
user-invocable: false
|
|
20
|
+
{{/if}}
|
|
21
|
+
{{#if MODEL}}
|
|
22
|
+
model: {{MODEL}}
|
|
23
|
+
{{/if}}
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
<objective>
|
|
27
|
+
{{OBJECTIVE}}
|
|
28
|
+
</objective>
|
|
29
|
+
|
|
30
|
+
<quick_start>
|
|
31
|
+
|
|
32
|
+
` ` `bash
|
|
33
|
+
/{{SKILL_NAME}} {{EXAMPLE_ARGS_1}}
|
|
34
|
+
/{{SKILL_NAME}} {{EXAMPLE_ARGS_2}}
|
|
35
|
+
` ` `
|
|
36
|
+
|
|
37
|
+
</quick_start>
|
|
38
|
+
|
|
39
|
+
## Task
|
|
40
|
+
{{TASK_DESCRIPTION}}
|
|
41
|
+
|
|
42
|
+
$ARGUMENTS
|
|
43
|
+
|
|
44
|
+
<workflow>
|
|
45
|
+
|
|
46
|
+
## 1. {{FIRST_PHASE}}
|
|
47
|
+
{{FIRST_PHASE_INSTRUCTIONS}}
|
|
48
|
+
|
|
49
|
+
## 2. {{SECOND_PHASE}}
|
|
50
|
+
{{SECOND_PHASE_INSTRUCTIONS}}
|
|
51
|
+
|
|
52
|
+
## 3. {{THIRD_PHASE}}
|
|
53
|
+
{{THIRD_PHASE_INSTRUCTIONS}}
|
|
54
|
+
|
|
55
|
+
</workflow>
|
|
56
|
+
|
|
57
|
+
<execution_rules>
|
|
58
|
+
- {{RULE_1}}
|
|
59
|
+
- {{RULE_2}}
|
|
60
|
+
- {{RULE_3}}
|
|
61
|
+
</execution_rules>
|
|
62
|
+
|
|
63
|
+
<success_criteria>
|
|
64
|
+
- {{CRITERIA_1}}
|
|
65
|
+
- {{CRITERIA_2}}
|
|
66
|
+
- {{CRITERIA_3}}
|
|
67
|
+
</success_criteria>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Notes:
|
|
71
|
+
- Keep total lines under 500
|
|
72
|
+
- Description should include trigger keywords for auto-detection
|
|
73
|
+
- Use $ARGUMENTS to reference user input
|
|
74
|
+
- Workflow steps are inline (no external step files)
|
|
75
|
+
- Best for: linting, simple generation, knowledge injection, quick commands
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Template: Step File
|
|
2
|
+
|
|
3
|
+
Standard template for a progressive step loading step file.
|
|
4
|
+
|
|
5
|
+
## Generated step file format:
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
---
|
|
9
|
+
name: step-{{NUMBER}}-{{NAME}}
|
|
10
|
+
description: {{DESCRIPTION}}
|
|
11
|
+
{{#if NEXT_STEP}}
|
|
12
|
+
next_step: steps/step-{{NEXT_NUMBER}}-{{NEXT_NAME}}.md
|
|
13
|
+
{{/if}}
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Step {{N}}: {{TITLE}}
|
|
17
|
+
|
|
18
|
+
## MANDATORY EXECUTION RULES:
|
|
19
|
+
- {{RULE_1}}
|
|
20
|
+
- {{RULE_2}}
|
|
21
|
+
- FORBIDDEN to proceed to next step until this step is complete
|
|
22
|
+
|
|
23
|
+
## YOUR TASK:
|
|
24
|
+
{{TASK_DESCRIPTION}}
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## EXECUTION SEQUENCE:
|
|
29
|
+
|
|
30
|
+
### 1. {{SUBTASK_1_TITLE}}
|
|
31
|
+
{{SUBTASK_1_INSTRUCTIONS}}
|
|
32
|
+
|
|
33
|
+
### 2. {{SUBTASK_2_TITLE}}
|
|
34
|
+
{{SUBTASK_2_INSTRUCTIONS}}
|
|
35
|
+
|
|
36
|
+
### 3. Show Summary
|
|
37
|
+
Display step results in compact format (table preferred).
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## SUCCESS METRICS:
|
|
42
|
+
- {{METRIC_1}}
|
|
43
|
+
- {{METRIC_2}}
|
|
44
|
+
- Output is compact and scannable
|
|
45
|
+
|
|
46
|
+
## NEXT STEP:
|
|
47
|
+
{{#if NEXT_STEP}}
|
|
48
|
+
After showing summary, proceed directly to `./step-{{NEXT_NUMBER}}-{{NEXT_NAME}}.md`
|
|
49
|
+
{{else}}
|
|
50
|
+
This is the final step. Skill execution is complete.
|
|
51
|
+
{{/if}}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Step Types:
|
|
55
|
+
|
|
56
|
+
### Init Step (step-00)
|
|
57
|
+
- Parse arguments and flags
|
|
58
|
+
- Validate required inputs
|
|
59
|
+
- Initialize state variables
|
|
60
|
+
- Show configuration summary
|
|
61
|
+
|
|
62
|
+
### Analysis Step
|
|
63
|
+
- Read files, search codebase
|
|
64
|
+
- Extract patterns and information
|
|
65
|
+
- Show findings summary
|
|
66
|
+
|
|
67
|
+
### Generation Step
|
|
68
|
+
- Use templates or references
|
|
69
|
+
- Create/modify files
|
|
70
|
+
- Show what was generated
|
|
71
|
+
|
|
72
|
+
### Validation Step (usually last)
|
|
73
|
+
- Check generated output
|
|
74
|
+
- Verify conventions
|
|
75
|
+
- Display final summary and next steps
|
|
76
|
+
|
|
77
|
+
## Rules:
|
|
78
|
+
- Each step MUST be self-contained (loadable independently)
|
|
79
|
+
- State variables persist via conversation context
|
|
80
|
+
- Always show compact summary before proceeding
|
|
81
|
+
- Always reference next step at the end
|
|
82
|
+
- Last step must NOT have next_step in frontmatter
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: check-version
|
|
3
3
|
description: Verify version alignment between package.json and documentation
|
|
4
|
+
context: fork
|
|
5
|
+
agent: Explore
|
|
4
6
|
model: haiku
|
|
7
|
+
allowed-tools: Read, Glob, Grep, Bash
|
|
5
8
|
---
|
|
6
9
|
|
|
10
|
+
## Current state (auto-injected)
|
|
11
|
+
- Package version: !`node -p "require('./package.json').version" 2>/dev/null || echo "no package.json"`
|
|
12
|
+
|
|
7
13
|
<objective>
|
|
8
14
|
Verify that the version in `package.json` is aligned with all documentation files in `.documentation/`.
|
|
9
15
|
Use before releases or as part of release process to ensure documentation is up-to-date.
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
name: debug
|
|
3
3
|
description: Systematic bug debugging with deep analysis and resolution
|
|
4
4
|
argument-hint: <log|error|problem-description>
|
|
5
|
+
model: opus
|
|
5
6
|
---
|
|
6
7
|
|
|
8
|
+
## Bug to investigate
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
|
|
7
11
|
<objective>
|
|
8
12
|
Follow an ultra-deep analysis workflow to identify, understand, and resolve bugs.
|
|
9
13
|
**ULTRA THINK** at each phase transition.
|
|
@@ -9,6 +9,7 @@ description: |
|
|
|
9
9
|
- After implementing a feature to generate its documentation
|
|
10
10
|
Types: user module, developer tools, database ERD, testing tools
|
|
11
11
|
argument-hint: "<module-name> [--type user|developer|database|testing|update]"
|
|
12
|
+
model: sonnet
|
|
12
13
|
---
|
|
13
14
|
|
|
14
15
|
<objective>
|
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
name: efcore
|
|
3
3
|
description: EF Core Commands - Migration and database management
|
|
4
4
|
argument-hint: "<command> [options]"
|
|
5
|
+
disable-model-invocation: true
|
|
5
6
|
---
|
|
6
7
|
|
|
8
|
+
## Current state (auto-injected)
|
|
9
|
+
- Branch: !`git branch --show-current`
|
|
10
|
+
- Recent migrations: !`find . -path "*/Migrations/*.cs" -not -name "*Designer*" -not -name "*Snapshot*" 2>/dev/null | sort | tail -5 || echo "none found"`
|
|
11
|
+
|
|
7
12
|
<objective>
|
|
8
13
|
Manage EF Core migrations and database operations with progressive step loading, MCP validation, and DbContext auto-detection.
|
|
9
14
|
</objective>
|
|
@@ -189,18 +189,39 @@ Next: /efcore db-status, /efcore db-seed
|
|
|
189
189
|
|
|
190
190
|
## BOTH CONTEXTS:
|
|
191
191
|
|
|
192
|
-
If
|
|
192
|
+
**If `RUN_BOTH=true` (auto-detected for client projects with SmartStack NuGet):**
|
|
193
|
+
|
|
194
|
+
Run the full deploy sequence (steps 2-6) TWICE, in order:
|
|
193
195
|
|
|
194
196
|
```bash
|
|
195
|
-
# Deploy CoreDbContext first
|
|
197
|
+
# 1. Deploy CoreDbContext first (system tables: Users, Roles, Tenants...)
|
|
198
|
+
echo "=== Deploying CoreDbContext (core schema) ==="
|
|
196
199
|
DBCONTEXT="CoreDbContext"
|
|
197
|
-
|
|
200
|
+
SCHEMA="core"
|
|
201
|
+
# Run steps 2-6 with CoreDbContext...
|
|
198
202
|
|
|
199
|
-
|
|
203
|
+
dotnet ef database update \
|
|
204
|
+
--context "CoreDbContext" \
|
|
205
|
+
--project "$INFRA_PROJECT" \
|
|
206
|
+
--startup-project "$STARTUP_PROJECT" \
|
|
207
|
+
--verbose
|
|
208
|
+
|
|
209
|
+
# 2. Then ExtensionsDbContext (client tables)
|
|
210
|
+
echo ""
|
|
211
|
+
echo "=== Deploying ExtensionsDbContext (extensions schema) ==="
|
|
200
212
|
DBCONTEXT="ExtensionsDbContext"
|
|
201
|
-
|
|
213
|
+
SCHEMA="extensions"
|
|
214
|
+
# Run steps 2-6 with ExtensionsDbContext...
|
|
215
|
+
|
|
216
|
+
dotnet ef database update \
|
|
217
|
+
--context "ExtensionsDbContext" \
|
|
218
|
+
--project "$INFRA_PROJECT" \
|
|
219
|
+
--startup-project "$STARTUP_PROJECT" \
|
|
220
|
+
--verbose
|
|
202
221
|
```
|
|
203
222
|
|
|
223
|
+
**Order matters:** Core MUST be deployed first (Extensions may have foreign keys to Core tables).
|
|
224
|
+
|
|
204
225
|
---
|
|
205
226
|
|
|
206
227
|
## COMPLETION:
|
|
@@ -46,21 +46,24 @@ detect_efcore_project() {
|
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
detect_dbcontext() {
|
|
49
|
-
# Priority 1: SmartStack.Domain exists →
|
|
49
|
+
# Priority 1: SmartStack.Domain exists → SmartStack source project (Core only)
|
|
50
50
|
if find . -type d -name "SmartStack.Domain" | grep -q .; then
|
|
51
51
|
DBCONTEXT="CoreDbContext"
|
|
52
52
|
DBCONTEXT_TYPE="core"
|
|
53
53
|
SCHEMA="core"
|
|
54
|
+
RUN_BOTH=false
|
|
54
55
|
echo "DbContext: CoreDbContext (SmartStack.Domain found)"
|
|
55
56
|
return
|
|
56
57
|
fi
|
|
57
58
|
|
|
58
|
-
# Priority 2: Client with SmartStack NuGet →
|
|
59
|
+
# Priority 2: Client with SmartStack NuGet → BOTH contexts (Core from NuGet + Extensions local)
|
|
59
60
|
if find . -name "*.csproj" -exec grep -l "SmartStack\." {} \; | grep -qv "SmartStack\."; then
|
|
60
|
-
DBCONTEXT="
|
|
61
|
-
DBCONTEXT_TYPE="
|
|
62
|
-
SCHEMA="
|
|
63
|
-
|
|
61
|
+
DBCONTEXT="CoreDbContext"
|
|
62
|
+
DBCONTEXT_TYPE="both"
|
|
63
|
+
SCHEMA="core"
|
|
64
|
+
RUN_BOTH=true
|
|
65
|
+
echo "DbContext: Both (Core from SmartStack NuGet + Extensions local)"
|
|
66
|
+
echo " Deploy order: CoreDbContext → ExtensionsDbContext"
|
|
64
67
|
return
|
|
65
68
|
fi
|
|
66
69
|
|
|
@@ -68,19 +71,28 @@ detect_dbcontext() {
|
|
|
68
71
|
CORE_CTX=$(find . -name "*.cs" -exec grep -l "CoreDbContext" {} \; 2>/dev/null | head -1)
|
|
69
72
|
EXT_CTX=$(find . -name "*.cs" -exec grep -l "ExtensionsDbContext" {} \; 2>/dev/null | head -1)
|
|
70
73
|
|
|
71
|
-
if [ -n "$CORE_CTX" ] && [ -
|
|
74
|
+
if [ -n "$CORE_CTX" ] && [ -n "$EXT_CTX" ]; then
|
|
75
|
+
DBCONTEXT="CoreDbContext"
|
|
76
|
+
DBCONTEXT_TYPE="both"
|
|
77
|
+
SCHEMA="core"
|
|
78
|
+
RUN_BOTH=true
|
|
79
|
+
echo "DbContext: Both (CoreDbContext + ExtensionsDbContext found)"
|
|
80
|
+
elif [ -n "$CORE_CTX" ] && [ -z "$EXT_CTX" ]; then
|
|
72
81
|
DBCONTEXT="CoreDbContext"
|
|
73
82
|
DBCONTEXT_TYPE="core"
|
|
74
83
|
SCHEMA="core"
|
|
84
|
+
RUN_BOTH=false
|
|
75
85
|
elif [ -z "$CORE_CTX" ] && [ -n "$EXT_CTX" ]; then
|
|
76
86
|
DBCONTEXT="ExtensionsDbContext"
|
|
77
87
|
DBCONTEXT_TYPE="extensions"
|
|
78
88
|
SCHEMA="extensions"
|
|
89
|
+
RUN_BOTH=false
|
|
79
90
|
else
|
|
80
91
|
# Priority 4: Ask user
|
|
81
92
|
DBCONTEXT=""
|
|
82
93
|
DBCONTEXT_TYPE=""
|
|
83
94
|
SCHEMA=""
|
|
95
|
+
RUN_BOTH=false
|
|
84
96
|
fi
|
|
85
97
|
}
|
|
86
98
|
```
|
|
@@ -204,6 +216,7 @@ block_production() {
|
|
|
204
216
|
EF CORE CONTEXT
|
|
205
217
|
├── Project: {PROJECT_NAME}
|
|
206
218
|
├── DbContext: {DBCONTEXT} ({DBCONTEXT_TYPE})
|
|
219
|
+
├── Run Both: {RUN_BOTH} (Core → Extensions)
|
|
207
220
|
├── Schema: {SCHEMA}
|
|
208
221
|
├── Migrations: {MIGRATIONS_DIR}
|
|
209
222
|
├── Environment:{SELECTED_ENV}
|
|
@@ -229,6 +242,7 @@ After this step, these variables are available:
|
|
|
229
242
|
| `{branch_type}` | feature |
|
|
230
243
|
| `{current_branch}` | feature/multitenant |
|
|
231
244
|
| `{selected_env}` | Local |
|
|
245
|
+
| `{run_both}` | true |
|
|
232
246
|
|
|
233
247
|
---
|
|
234
248
|
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
name: explore
|
|
3
3
|
description: Deep codebase exploration to answer specific questions
|
|
4
4
|
argument-hint: <question>
|
|
5
|
+
context: fork
|
|
6
|
+
agent: Explore
|
|
7
|
+
allowed-tools: Read, Grep, Glob, WebSearch, WebFetch
|
|
5
8
|
---
|
|
6
9
|
|
|
7
10
|
<objective>
|
|
8
|
-
Answer questions about the codebase through systematic investigation using
|
|
11
|
+
Answer questions about the codebase through systematic investigation using direct search tools.
|
|
12
|
+
|
|
13
|
+
**Note:** This skill runs in an isolated context. Use Grep, Glob, and Read directly - do NOT launch Task agents.
|
|
9
14
|
</objective>
|
|
10
15
|
|
|
11
16
|
<quick_start>
|
|
@@ -16,57 +21,48 @@ Answer questions about the codebase through systematic investigation using paral
|
|
|
16
21
|
```
|
|
17
22
|
</quick_start>
|
|
18
23
|
|
|
24
|
+
## Task
|
|
25
|
+
Research the following question: $ARGUMENTS
|
|
26
|
+
|
|
19
27
|
<workflow>
|
|
20
28
|
|
|
21
29
|
## 1. Parse Question
|
|
22
30
|
|
|
23
|
-
- Extract key terms and concepts from question
|
|
31
|
+
- Extract key terms and concepts from the question
|
|
24
32
|
- Identify file types, patterns, or areas to search
|
|
25
33
|
- Determine if web research is needed
|
|
26
34
|
|
|
27
|
-
## 2. Search Codebase (
|
|
35
|
+
## 2. Search Codebase (Direct Tools)
|
|
28
36
|
|
|
29
|
-
|
|
37
|
+
Use direct search tools **in parallel** where possible:
|
|
30
38
|
|
|
31
|
-
**
|
|
39
|
+
**File discovery:**
|
|
32
40
|
```
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Report ONLY what exists:
|
|
36
|
-
1. Files that contain related code (with paths and line numbers)
|
|
37
|
-
2. Existing patterns used for similar features
|
|
38
|
-
3. Utility functions that might be relevant
|
|
39
|
-
4. How similar features are currently structured
|
|
40
|
-
5. Test file locations and patterns
|
|
41
|
-
|
|
42
|
-
DO NOT suggest what to build. Just report what's there.
|
|
41
|
+
Glob: pattern="**/*{keyword}*" to find related files
|
|
43
42
|
```
|
|
44
43
|
|
|
45
|
-
**
|
|
44
|
+
**Code search:**
|
|
46
45
|
```
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Find:
|
|
50
|
-
1. How the relevant libraries/frameworks work
|
|
51
|
-
2. API documentation for tools being used
|
|
52
|
-
3. Best practices from official docs
|
|
46
|
+
Grep: pattern="{keyword}" to find content matches
|
|
47
|
+
Grep: pattern="class {Name}" or "function {name}" for implementations
|
|
53
48
|
```
|
|
54
49
|
|
|
55
|
-
**
|
|
50
|
+
**Targeted reading:**
|
|
51
|
+
```
|
|
52
|
+
Read: the most relevant 3-5 files discovered
|
|
56
53
|
```
|
|
57
|
-
Search for context about: {question}
|
|
58
54
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
**Web research** (if external context needed):
|
|
56
|
+
```
|
|
57
|
+
WebSearch: "{question} best practices"
|
|
58
|
+
WebFetch: documentation URLs found in the codebase
|
|
63
59
|
```
|
|
64
60
|
|
|
65
|
-
**CRITICAL**:
|
|
61
|
+
**CRITICAL**: Run independent searches in parallel for speed.
|
|
66
62
|
|
|
67
63
|
## 3. Analyze Findings
|
|
68
64
|
|
|
69
|
-
- Read relevant files found by
|
|
65
|
+
- Read relevant files found by searches
|
|
70
66
|
- Trace relationships between files
|
|
71
67
|
- Identify patterns and conventions
|
|
72
68
|
- Note file paths with line numbers (e.g., `src/app.ts:42`)
|
|
@@ -83,11 +79,11 @@ Provide comprehensive response:
|
|
|
83
79
|
|
|
84
80
|
<execution_rules>
|
|
85
81
|
|
|
86
|
-
- **PARALLEL SEARCH**:
|
|
82
|
+
- **PARALLEL SEARCH**: Run independent Grep/Glob searches simultaneously
|
|
87
83
|
- **CITE SOURCES**: Always reference file paths and line numbers
|
|
88
84
|
- **STAY FOCUSED**: Only explore what's needed to answer the question
|
|
89
85
|
- **BE THOROUGH**: Don't stop at first match - gather complete context
|
|
90
|
-
- **
|
|
86
|
+
- **NO TASK AGENTS**: Use Grep, Glob, Read, WebSearch, WebFetch directly
|
|
91
87
|
|
|
92
88
|
</execution_rules>
|
|
93
89
|
|
|
@@ -8,6 +8,7 @@ description: |
|
|
|
8
8
|
- Creating a module with notifications, workflows and/or AI
|
|
9
9
|
- Need for complete user experience
|
|
10
10
|
Scope: Domain → Application → Infrastructure → API → Web + Notifications + Workflows + AI
|
|
11
|
+
disable-model-invocation: true
|
|
11
12
|
---
|
|
12
13
|
|
|
13
14
|
# Skill Feature Full SmartStack
|
|
@@ -2,8 +2,16 @@
|
|
|
2
2
|
name: gitflow
|
|
3
3
|
description: GitFlow workflow with versioning, worktrees, and EF Core migration management. Progressive step loading for minimal context usage.
|
|
4
4
|
argument-hint: "[-a] [-f|-r|-h] <action> [name]"
|
|
5
|
+
disable-model-invocation: true
|
|
5
6
|
---
|
|
6
7
|
|
|
8
|
+
## Current state (auto-injected)
|
|
9
|
+
- Branch: !`git branch --show-current`
|
|
10
|
+
- Status: !`git status --short`
|
|
11
|
+
- Recent commits: !`git log --oneline -5`
|
|
12
|
+
- Worktrees: !`git worktree list 2>/dev/null`
|
|
13
|
+
- Config: !`cat .gitflow/config.json 2>/dev/null || echo "no config found"`
|
|
14
|
+
|
|
7
15
|
<objective>
|
|
8
16
|
Execute GitFlow workflows with automatic versioning, worktree management, and EF Core migration validation. Uses progressive step loading to minimize context and maintain fresh state at each phase.
|
|
9
17
|
</objective>
|
|
@@ -207,6 +207,11 @@ DB_NAME=$(echo "${PROJECT_NAME}_${branch_type}_${BRANCH_NAME}" | cut -c1-63)
|
|
|
207
207
|
"ConnectionStrings": {
|
|
208
208
|
"DefaultConnection": "Server=localhost;Database=${DB_NAME};Trusted_Connection=true;TrustServerCertificate=true"
|
|
209
209
|
},
|
|
210
|
+
"SmartStack": {
|
|
211
|
+
"AutoMigrate": true,
|
|
212
|
+
"FailOnMigrationError": true,
|
|
213
|
+
"EnableDevSeeding": true
|
|
214
|
+
},
|
|
210
215
|
"Authentication": {
|
|
211
216
|
"FrontendUrl": "http://localhost:${WEB_PORT}"
|
|
212
217
|
},
|
|
@@ -261,14 +266,40 @@ EOF
|
|
|
261
266
|
}
|
|
262
267
|
```
|
|
263
268
|
|
|
264
|
-
#### 7c.
|
|
269
|
+
#### 7c. Backend: launchSettings.json Local Profile
|
|
270
|
+
|
|
271
|
+
**If API project detected and Properties/launchSettings.json exists:**
|
|
272
|
+
```bash
|
|
273
|
+
LAUNCH_SETTINGS="$API_DIR/Properties/launchSettings.json"
|
|
274
|
+
[ -n "$API_DIR" ] && [ -f "$LAUNCH_SETTINGS" ] && {
|
|
275
|
+
# Use Node.js to safely add/update Local profile in launchSettings.json
|
|
276
|
+
node -e "
|
|
277
|
+
const fs = require('fs');
|
|
278
|
+
const ls = JSON.parse(fs.readFileSync('$LAUNCH_SETTINGS', 'utf8'));
|
|
279
|
+
ls.profiles = ls.profiles || {};
|
|
280
|
+
ls.profiles.Local = {
|
|
281
|
+
commandName: 'Project',
|
|
282
|
+
dotnetRunMessages: true,
|
|
283
|
+
launchBrowser: false,
|
|
284
|
+
applicationUrl: 'http://localhost:${API_PORT}',
|
|
285
|
+
environmentVariables: {
|
|
286
|
+
ASPNETCORE_ENVIRONMENT: 'Local'
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
fs.writeFileSync('$LAUNCH_SETTINGS', JSON.stringify(ls, null, 2) + '\n');
|
|
290
|
+
console.log('Updated: launchSettings.json Local profile (Port: ${API_PORT})');
|
|
291
|
+
"
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
#### 7d. Summary of local config
|
|
265
296
|
|
|
266
297
|
```
|
|
267
298
|
┌─────────────────────────────────────────────────────────────┐
|
|
268
299
|
│ LOCAL ENVIRONMENT CONFIGURED │
|
|
269
300
|
├─────────────────────────────────────────────────────────────┤
|
|
270
301
|
│ Database: ${DB_NAME} │
|
|
271
|
-
│ API Port: ${API_PORT} → dotnet run --
|
|
302
|
+
│ API Port: ${API_PORT} → dotnet run --launch-profile Local│
|
|
272
303
|
│ Web Port: ${WEB_PORT} → npm run local │
|
|
273
304
|
└─────────────────────────────────────────────────────────────┘
|
|
274
305
|
```
|
|
@@ -315,19 +346,22 @@ EOF
|
|
|
315
346
|
║ 1. Go to worktree: ║
|
|
316
347
|
║ cd {WORKTREE_PATH} ║
|
|
317
348
|
║ ║
|
|
318
|
-
║ 2. Start
|
|
319
|
-
║
|
|
320
|
-
║
|
|
321
|
-
║
|
|
322
|
-
║
|
|
349
|
+
║ 2. Start backend (auto-migrates Core + Extensions DB): ║
|
|
350
|
+
║ dotnet run --project src/{Project}.Api --launch-profile Local ║
|
|
351
|
+
║ ║
|
|
352
|
+
║ 3. Reset admin password: ║
|
|
353
|
+
║ ss admin reset ║
|
|
354
|
+
║ ║
|
|
355
|
+
║ 4. Start frontend (other terminal): ║
|
|
356
|
+
║ cd web/{project}-web && npm run local ║
|
|
323
357
|
║ ║
|
|
324
|
-
║
|
|
358
|
+
║ 5. Make changes and commit: ║
|
|
325
359
|
║ /gitflow commit ║
|
|
326
360
|
║ ║
|
|
327
|
-
║
|
|
361
|
+
║ 6. Create pull request: ║
|
|
328
362
|
║ /gitflow pr ║
|
|
329
363
|
║ ║
|
|
330
|
-
║
|
|
364
|
+
║ 7. After PR merged, finalize: ║
|
|
331
365
|
║ /gitflow finish ║
|
|
332
366
|
╚══════════════════════════════════════════════════════════════════╝
|
|
333
367
|
```
|
|
@@ -351,6 +385,7 @@ EOF
|
|
|
351
385
|
- **Branch pushed to remote (AUTOMATIC)**
|
|
352
386
|
- Worktree set up (if enabled)
|
|
353
387
|
- Backend local config created: `appsettings.Local.json` (if .NET API detected)
|
|
388
|
+
- Backend launch profile created: `launchSettings.json` Local profile with unique port (if .NET API detected)
|
|
354
389
|
- Frontend local config created: `.env.local` + `npm run local` script (if web project detected)
|
|
355
390
|
- Ports synchronized between backend and frontend (unique per branch)
|
|
356
391
|
- State stored for subsequent steps
|