@atlashub/smartstack-cli 3.38.0 → 3.39.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/mcp-entry.mjs +62 -37
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/agents/efcore/scan.md +3 -1
- package/templates/agents/gitflow/commit.md +74 -0
- package/templates/agents/gitflow/finish.md +5 -2
- package/templates/agents/gitflow/init-clone.md +3 -3
- package/templates/agents/gitflow/init-validate.md +3 -2
- package/templates/agents/gitflow/merge.md +5 -0
- package/templates/agents/gitflow/pr.md +5 -0
- package/templates/agents/gitflow/start.md +8 -1
- package/templates/hooks/hooks.json +11 -0
- package/templates/hooks/wsl-dotnet-cleanup.sh +24 -0
- package/templates/skills/apex/references/core-seed-data.md +0 -1
- package/templates/skills/apex/references/examine-build-validation.md +1 -6
- package/templates/skills/apex/references/smartstack-frontend.md +1 -1
- package/templates/skills/apex/steps/step-03-execute.md +4 -9
- package/templates/skills/apex/steps/step-08-run-tests.md +1 -2
- package/templates/skills/application/SKILL.md +241 -241
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +5 -5
- package/templates/skills/application/references/frontend-verification.md +1 -1
- package/templates/skills/application/references/init-parameter-detection.md +121 -120
- package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -100
- package/templates/skills/application/references/nav-fallback-procedure.md +199 -199
- package/templates/skills/application/steps/step-00-init.md +130 -130
- package/templates/skills/application/steps/step-01-navigation.md +170 -170
- package/templates/skills/application/steps/step-02-permissions.md +196 -196
- package/templates/skills/application/steps/step-03-roles.md +182 -182
- package/templates/skills/application/steps/step-03b-provider.md +133 -133
- package/templates/skills/application/steps/step-04-backend.md +174 -174
- package/templates/skills/application/steps/step-05-frontend.md +1 -1
- package/templates/skills/application/templates-frontend.md +7 -7
- package/templates/skills/business-analyse/react/schema.md +836 -836
- package/templates/skills/business-analyse/templates/tpl-progress.md +1 -1
- package/templates/skills/business-analyse/templates-frd.md +1 -1
- package/templates/skills/efcore/SKILL.md +1 -1
- package/templates/skills/efcore/steps/migration/step-02-create.md +1 -14
- package/templates/skills/gitflow/SKILL.md +27 -4
- package/templates/skills/gitflow/_shared.md +86 -12
- package/templates/skills/gitflow/phases/abort.md +4 -0
- package/templates/skills/gitflow/phases/cleanup.md +4 -0
- package/templates/skills/gitflow/references/finish-cleanup.md +4 -0
- package/templates/skills/gitflow/references/init-structure-creation.md +4 -0
- package/templates/skills/gitflow/references/start-worktree-creation.md +1 -1
- package/templates/skills/ralph-loop/steps/step-04-check.md +1 -2
- package/templates/skills/review-code/references/smartstack-conventions.md +568 -568
- package/templates/skills/validate-feature/steps/step-01-compile.md +1 -6
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
□ Create custom hook use{ModuleName}
|
|
73
73
|
□ Implement pagination, filtering, sorting
|
|
74
74
|
□ Validate all pages match their wireframe layout
|
|
75
|
-
□ ⚠️ Routes MUST be INSIDE
|
|
75
|
+
□ ⚠️ Routes MUST be INSIDE the AppLayout wrapper
|
|
76
76
|
Total: C tasks
|
|
77
77
|
|
|
78
78
|
[I18N] Internationalization Keys
|
|
@@ -7,7 +7,7 @@ disable-model-invocation: true
|
|
|
7
7
|
|
|
8
8
|
## Current state (auto-injected)
|
|
9
9
|
- Branch: !`git branch --show-current`
|
|
10
|
-
- Recent migrations:
|
|
10
|
+
- Recent migrations: _(detected in step-00-init)_
|
|
11
11
|
|
|
12
12
|
<objective>
|
|
13
13
|
Manage EF Core migrations and database operations with progressive step loading, MCP validation, and DbContext auto-detection.
|
|
@@ -107,20 +107,7 @@ dotnet ef migrations add "$MIGRATION_NAME" \
|
|
|
107
107
|
--verbose
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
### 6.
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
# EF Core's Roslyn BuildHost creates corrupted bin folders on Windows (U+F05C instead of backslash)
|
|
114
|
-
# Clean up any bin*Debug folders that are NOT the normal bin/Debug path
|
|
115
|
-
for d in src/*/bin?Debug; do
|
|
116
|
-
if [ -d "$d" ]; then
|
|
117
|
-
echo "Removing corrupted EF Core artifact: $d"
|
|
118
|
-
rm -rf "$d"
|
|
119
|
-
fi
|
|
120
|
-
done
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### 7. Verify Creation
|
|
110
|
+
### 6. Verify Creation
|
|
124
111
|
|
|
125
112
|
```bash
|
|
126
113
|
# Check files were created
|
|
@@ -6,10 +6,11 @@ disable-model-invocation: true
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
## Current state (auto-injected)
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
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
|
+
- Status: !`git status --short 2>/dev/null || echo "UNAVAILABLE"`
|
|
12
|
+
- Recent commits: !`git log --oneline -5 2>/dev/null || echo "UNAVAILABLE"`
|
|
13
|
+
- Worktrees: !`git worktree list 2>/dev/null || echo "UNAVAILABLE (run preflight_git_check from _shared.md)"`
|
|
13
14
|
- Config: !`cat .claude/gitflow/config.json 2>/dev/null || echo "no config found"`
|
|
14
15
|
|
|
15
16
|
<objective>
|
|
@@ -316,6 +317,28 @@ Auto mode: {auto_mode}
|
|
|
316
317
|
|
|
317
318
|
</task_agents>
|
|
318
319
|
|
|
320
|
+
<worktree_repair>
|
|
321
|
+
|
|
322
|
+
**MANDATORY PRE-FLIGHT:** Before routing to any step or agent, run `preflight_git_check` (from `_shared.md` PREFLIGHT_GIT_CHECK section). This ensures git is accessible and repairs cross-platform worktree paths (Windows ↔ WSL).
|
|
323
|
+
|
|
324
|
+
**When to trigger:** If any auto-injected state shows "UNAVAILABLE", or if the Preflight line shows "repaired".
|
|
325
|
+
|
|
326
|
+
**Execution:**
|
|
327
|
+
```bash
|
|
328
|
+
# 1. Detect platform
|
|
329
|
+
detect_platform
|
|
330
|
+
|
|
331
|
+
# 2. Run preflight (repairs .git file + .bare/worktrees/*/gitdir)
|
|
332
|
+
preflight_git_check
|
|
333
|
+
|
|
334
|
+
# 3. Verify
|
|
335
|
+
git status --short
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**This converts all paths to relative format (cross-platform safe).**
|
|
339
|
+
|
|
340
|
+
</worktree_repair>
|
|
341
|
+
|
|
319
342
|
<execution_rules>
|
|
320
343
|
|
|
321
344
|
- **Single step mode**: Read the step file and execute inline
|
|
@@ -143,6 +143,9 @@ Searches in: pwd, develop worktree, then git root.
|
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
145
|
resolve_gitflow_config_path() {
|
|
146
|
+
# Ensure git is accessible (cross-platform worktree repair)
|
|
147
|
+
preflight_git_check 2>/dev/null
|
|
148
|
+
|
|
146
149
|
# 1. Try current directory
|
|
147
150
|
[ -f ".claude/gitflow/config.json" ] && { echo ".claude/gitflow/config.json"; return 0; }
|
|
148
151
|
|
|
@@ -341,7 +344,11 @@ validate_worktree_path() {
|
|
|
341
344
|
|
|
342
345
|
## REPAIR_WORKTREE_PATHS
|
|
343
346
|
|
|
344
|
-
|
|
347
|
+
Converts worktree metadata paths to **relative paths** for cross-platform compatibility (Windows + WSL).
|
|
348
|
+
Absolute paths (Windows `D:/...` or POSIX `/mnt/d/...`) break when switching environments.
|
|
349
|
+
Relative paths work everywhere without repair.
|
|
350
|
+
|
|
351
|
+
Scans `.bare/worktrees/*/gitdir` and the corresponding `{worktree}/.git` files.
|
|
345
352
|
|
|
346
353
|
```bash
|
|
347
354
|
repair_worktree_paths() {
|
|
@@ -356,24 +363,48 @@ repair_worktree_paths() {
|
|
|
356
363
|
local gitdir_file="$wt_dir/gitdir"
|
|
357
364
|
[ ! -f "$gitdir_file" ] && continue
|
|
358
365
|
|
|
359
|
-
#
|
|
366
|
+
# Read stored path (may be Windows absolute, POSIX absolute, or already relative)
|
|
360
367
|
local stored_path=$(cat "$gitdir_file" | tr -d '\n\r')
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
368
|
+
|
|
369
|
+
# Resolve to current platform absolute path for realpath computation
|
|
370
|
+
local resolved_path="$stored_path"
|
|
371
|
+
local is_abs=false
|
|
372
|
+
if [[ "$stored_path" =~ ^[A-Za-z]:[\\/] ]]; then
|
|
373
|
+
is_abs=true
|
|
374
|
+
resolved_path=$(normalize_path_for_platform "$stored_path")
|
|
375
|
+
elif [[ "$stored_path" =~ ^/ ]]; then
|
|
376
|
+
is_abs=true
|
|
377
|
+
resolved_path=$(normalize_path_for_platform "$stored_path")
|
|
378
|
+
fi
|
|
379
|
+
if [ "$is_abs" = "false" ]; then
|
|
380
|
+
# Already relative - resolve from gitdir_file location to get absolute
|
|
381
|
+
resolved_path=$(realpath -m "$wt_dir/$stored_path")
|
|
382
|
+
fi
|
|
383
|
+
|
|
384
|
+
# Get worktree real directory (parent of .git file)
|
|
385
|
+
local wt_real_dir=$(dirname "$resolved_path")
|
|
386
|
+
[ ! -d "$wt_real_dir" ] && continue
|
|
387
|
+
|
|
388
|
+
# Compute relative path: .bare/worktrees/{name}/ → worktree/.git
|
|
389
|
+
local bare_wt_abs=$(realpath -m "$wt_dir")
|
|
390
|
+
local wt_abs=$(realpath -m "$wt_real_dir")
|
|
391
|
+
local rel_gitdir=$(realpath -m --relative-to="$bare_wt_abs" "$wt_abs/.git")
|
|
392
|
+
|
|
393
|
+
if [ "$stored_path" != "$rel_gitdir" ]; then
|
|
394
|
+
printf '%s\n' "$rel_gitdir" > "$gitdir_file"
|
|
395
|
+
echo "REPAIRED: $wt_name/gitdir → $rel_gitdir"
|
|
365
396
|
REPAIRED=$((REPAIRED + 1))
|
|
366
397
|
fi
|
|
367
398
|
|
|
368
|
-
# Fix the worktree's .git file
|
|
369
|
-
local wt_real_dir=$(dirname "$fixed_path")
|
|
399
|
+
# Fix the worktree's .git pseudo-file → relative path to .bare/worktrees/{name}
|
|
370
400
|
if [ -f "$wt_real_dir/.git" ]; then
|
|
371
401
|
local git_content=$(cat "$wt_real_dir/.git" | tr -d '\n\r')
|
|
372
402
|
local git_path="${git_content#gitdir: }"
|
|
373
|
-
local
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
403
|
+
local rel_bare=$(realpath -m --relative-to="$wt_abs" "$bare_wt_abs")
|
|
404
|
+
|
|
405
|
+
if [ "$git_path" != "$rel_bare" ]; then
|
|
406
|
+
printf 'gitdir: %s\n' "$rel_bare" > "$wt_real_dir/.git"
|
|
407
|
+
echo "REPAIRED: $wt_name/.git → $rel_bare"
|
|
377
408
|
REPAIRED=$((REPAIRED + 1))
|
|
378
409
|
fi
|
|
379
410
|
fi
|
|
@@ -385,6 +416,49 @@ repair_worktree_paths() {
|
|
|
385
416
|
|
|
386
417
|
---
|
|
387
418
|
|
|
419
|
+
## PREFLIGHT_GIT_CHECK
|
|
420
|
+
|
|
421
|
+
Lightweight check to ensure git is accessible in the current worktree. If git fails (cross-platform path issue), locates `.bare` and calls `repair_worktree_paths`. Must be called before any git operation in agents that may run in worktrees created from a different environment (Windows vs WSL).
|
|
422
|
+
|
|
423
|
+
```bash
|
|
424
|
+
preflight_git_check() {
|
|
425
|
+
# Quick test: if git works, nothing to do
|
|
426
|
+
git rev-parse --git-dir >/dev/null 2>&1 && return 0
|
|
427
|
+
|
|
428
|
+
echo "Git inaccessible — attempting worktree path repair..."
|
|
429
|
+
|
|
430
|
+
# Find .bare directory by walking up
|
|
431
|
+
local BARE_DIR=""
|
|
432
|
+
local DIR="$(pwd)"
|
|
433
|
+
while [ "$DIR" != "/" ]; do
|
|
434
|
+
[ -d "$DIR/.bare" ] && { BARE_DIR="$DIR/.bare"; break; }
|
|
435
|
+
DIR=$(dirname "$DIR")
|
|
436
|
+
done
|
|
437
|
+
|
|
438
|
+
if [ -z "$BARE_DIR" ]; then
|
|
439
|
+
echo "ERROR: No .bare directory found. Not a GitFlow worktree."
|
|
440
|
+
return 1
|
|
441
|
+
fi
|
|
442
|
+
|
|
443
|
+
# Ensure platform is detected
|
|
444
|
+
[ -z "$GF_PLATFORM" ] && detect_platform
|
|
445
|
+
|
|
446
|
+
# Repair all worktree paths to relative format
|
|
447
|
+
repair_worktree_paths "$BARE_DIR"
|
|
448
|
+
|
|
449
|
+
# Verify repair
|
|
450
|
+
if git rev-parse --git-dir >/dev/null 2>&1; then
|
|
451
|
+
echo "Worktree paths repaired successfully."
|
|
452
|
+
return 0
|
|
453
|
+
else
|
|
454
|
+
echo "ERROR: Worktree repair failed. Run /gitflow init to reconfigure."
|
|
455
|
+
return 1
|
|
456
|
+
fi
|
|
457
|
+
}
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
---
|
|
461
|
+
|
|
388
462
|
## RESOLVE_WORKSPACE
|
|
389
463
|
|
|
390
464
|
Resolves the workspace JSON file by walking up the directory tree.
|
|
@@ -67,6 +67,10 @@ BRANCH_TYPE=$(echo $CURRENT | cut -d'/' -f1)
|
|
|
67
67
|
echo "⚠️ This will delete branch $CURRENT and its worktree"
|
|
68
68
|
echo "All uncommitted changes will be LOST"
|
|
69
69
|
|
|
70
|
+
# Repair cross-platform worktree paths (WSL ↔ Windows)
|
|
71
|
+
detect_platform
|
|
72
|
+
repair_worktree_paths "$(git rev-parse --git-common-dir 2>/dev/null || echo '.bare')"
|
|
73
|
+
|
|
70
74
|
# Find worktree
|
|
71
75
|
WORKTREE=$(git worktree list | grep "$CURRENT" | awk '{print $1}')
|
|
72
76
|
|
|
@@ -38,6 +38,10 @@ CURRENT=$(git rev-parse --abbrev-ref HEAD)
|
|
|
38
38
|
```bash
|
|
39
39
|
echo "Scanning worktrees..."
|
|
40
40
|
|
|
41
|
+
# Repair cross-platform worktree paths (WSL ↔ Windows)
|
|
42
|
+
detect_platform
|
|
43
|
+
repair_worktree_paths "$(git rev-parse --git-common-dir 2>/dev/null || echo '.bare')"
|
|
44
|
+
|
|
41
45
|
mkdir -p .claude/gitflow/cache
|
|
42
46
|
git worktree list > .claude/gitflow/cache/worktrees.txt
|
|
43
47
|
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
## Clean Up Worktree
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
+
# Repair cross-platform worktree paths before cleanup (WSL ↔ Windows)
|
|
7
|
+
detect_platform
|
|
8
|
+
repair_worktree_paths "$(git rev-parse --git-common-dir 2>/dev/null || echo '.bare')"
|
|
9
|
+
|
|
6
10
|
# Find worktree for this branch (use --porcelain for reliable parsing)
|
|
7
11
|
WORKTREE_PATH=$(git worktree list --porcelain | grep -B2 "branch refs/heads/$BRANCH" | grep "^worktree " | sed 's/^worktree //')
|
|
8
12
|
|
|
@@ -50,6 +50,10 @@ if [ "$WORKTREE_MODE" = "simple" ]; then
|
|
|
50
50
|
GIT_DIR="$PROJECT_BASE/.bare" git worktree add "$PROJECT_BASE/develop" develop
|
|
51
51
|
fi
|
|
52
52
|
|
|
53
|
+
# Convert worktree paths to relative format (cross-platform: Windows + WSL)
|
|
54
|
+
detect_platform
|
|
55
|
+
repair_worktree_paths "$PROJECT_BASE/.bare"
|
|
56
|
+
|
|
53
57
|
# Create gitflow config directory (absolute paths)
|
|
54
58
|
DEVELOP_DIR=$([ "$WORKTREE_MODE" = "organized" ] && echo "02-Develop" || echo "develop")
|
|
55
59
|
mkdir -p "$PROJECT_BASE/$DEVELOP_DIR/.claude/gitflow/plans"
|
|
@@ -27,7 +27,7 @@ esac
|
|
|
27
27
|
mkdir -p "$(dirname "$WORKTREE_PATH")"
|
|
28
28
|
git worktree add -b "$FULL_BRANCH" "$WORKTREE_PATH" "origin/$BASE_BRANCH"
|
|
29
29
|
|
|
30
|
-
#
|
|
30
|
+
# Convert worktree paths to relative format (cross-platform: Windows + WSL)
|
|
31
31
|
repair_worktree_paths "$(git rev-parse --git-common-dir)"
|
|
32
32
|
|
|
33
33
|
# POST-CREATION VALIDATION (BLOCKING)
|
|
@@ -34,8 +34,7 @@ const allDone = (tasksCompleted + tasksSkipped) === tasksTotal;
|
|
|
34
34
|
# Quick build check (quiet mode)
|
|
35
35
|
dotnet build --no-restore --verbosity quiet
|
|
36
36
|
BUILD_RC=$?
|
|
37
|
-
#
|
|
38
|
-
for d in src/*/bin?Debug bin?Debug; do [ -d "$d" ] && rm -rf "$d"; done
|
|
37
|
+
# Note: WSL bin\Debug cleanup handled by PostToolUse hook (wsl-dotnet-cleanup.sh)
|
|
39
38
|
if [ $BUILD_RC -ne 0 ]; then
|
|
40
39
|
echo "BUILD REGRESSION detected between apex invocations"
|
|
41
40
|
# Inject fix task — apex will handle the actual fix
|