@atlashub/smartstack-cli 3.37.0 → 3.38.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 +16 -24
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +201 -256
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/scripts/extract-api-endpoints.ts +5 -5
- package/scripts/generate-doc-with-mock-ui.ts +10 -17
- package/templates/agents/ba-reader.md +9 -9
- package/templates/agents/ba-writer.md +12 -15
- package/templates/agents/code-reviewer.md +1 -1
- package/templates/agents/docs-context-reader.md +1 -1
- package/templates/agents/gitflow/merge.md +0 -4
- package/templates/agents/gitflow/pr.md +0 -4
- package/templates/agents/gitflow/start.md +30 -5
- package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +20 -20
- package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +16 -24
- package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +2 -2
- package/templates/skills/_resources/mcp-validate-documentation-spec.md +3 -3
- package/templates/skills/_shared.md +15 -17
- package/templates/skills/ai-prompt/SKILL.md +1 -1
- package/templates/skills/ai-prompt/steps/step-00-init.md +47 -0
- package/templates/skills/apex/SKILL.md +3 -4
- package/templates/skills/apex/_shared.md +10 -20
- package/templates/skills/apex/references/analysis-methods.md +141 -0
- package/templates/skills/apex/references/challenge-questions.md +1 -21
- package/templates/skills/apex/references/core-seed-data.md +35 -57
- package/templates/skills/apex/references/examine-build-validation.md +87 -0
- package/templates/skills/apex/references/execution-frontend-gates.md +177 -0
- package/templates/skills/apex/references/execution-frontend-patterns.md +105 -0
- package/templates/skills/apex/references/execution-layer1-rules.md +96 -0
- package/templates/skills/apex/references/initialization-challenge-flow.md +110 -0
- package/templates/skills/apex/references/planning-layer-mapping.md +151 -0
- package/templates/skills/apex/references/post-checks.md +145 -40
- package/templates/skills/apex/references/smartstack-api.md +35 -51
- package/templates/skills/apex/references/smartstack-frontend.md +17 -17
- package/templates/skills/apex/references/smartstack-layers.md +38 -62
- package/templates/skills/apex/steps/step-00-init.md +14 -26
- package/templates/skills/apex/steps/step-01-analyze.md +10 -143
- package/templates/skills/apex/steps/step-02-plan.md +10 -92
- package/templates/skills/apex/steps/step-03-execute.md +47 -249
- package/templates/skills/apex/steps/step-04-examine.md +14 -78
- package/templates/skills/apex/steps/step-05-deep-review.md +2 -2
- package/templates/skills/apex/steps/step-08-run-tests.md +2 -0
- package/templates/skills/application/SKILL.md +6 -7
- package/templates/skills/application/references/backend-controller-hierarchy.md +16 -16
- package/templates/skills/application/references/backend-seeding-and-dto-output.md +83 -0
- package/templates/skills/application/references/backend-table-prefix-mapping.md +79 -0
- package/templates/skills/application/references/backend-verification.md +1 -1
- package/templates/skills/application/references/frontend-i18n-and-output.md +67 -0
- package/templates/skills/application/references/frontend-route-naming.md +117 -0
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +107 -0
- package/templates/skills/application/references/frontend-verification.md +12 -12
- package/templates/skills/application/references/init-parameter-detection.md +120 -0
- package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -0
- package/templates/skills/application/references/nav-fallback-procedure.md +5 -6
- package/templates/skills/application/references/provider-template.md +2 -6
- package/templates/skills/application/references/roles-client-project-handling.md +55 -0
- package/templates/skills/application/references/roles-fallback-procedure.md +149 -0
- package/templates/skills/application/references/test-coverage-requirements.md +213 -0
- package/templates/skills/application/references/test-frontend.md +3 -3
- package/templates/skills/application/steps/step-00-init.md +11 -141
- package/templates/skills/application/steps/step-01-navigation.md +3 -3
- package/templates/skills/application/steps/step-02-permissions.md +4 -4
- package/templates/skills/application/steps/step-03-roles.md +18 -175
- package/templates/skills/application/steps/step-03b-provider.md +1 -2
- package/templates/skills/application/steps/step-04-backend.md +19 -110
- package/templates/skills/application/steps/step-05-frontend.md +17 -143
- package/templates/skills/application/steps/step-06-migration.md +12 -60
- package/templates/skills/application/steps/step-07-tests.md +9 -76
- package/templates/skills/application/templates-backend.md +29 -27
- package/templates/skills/application/templates-frontend.md +48 -48
- package/templates/skills/application/templates-seed.md +57 -131
- package/templates/skills/business-analyse/SKILL.md +27 -30
- package/templates/skills/business-analyse/_architecture.md +6 -6
- package/templates/skills/business-analyse/_shared.md +60 -88
- package/templates/skills/business-analyse/questionnaire/04-data.md +3 -3
- package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +1 -1
- package/templates/skills/business-analyse/react/application-viewer.md +12 -12
- package/templates/skills/business-analyse/react/components.md +8 -12
- package/templates/skills/business-analyse/react/schema.md +11 -11
- package/templates/skills/business-analyse/references/agent-module-prompt.md +2 -3
- package/templates/skills/business-analyse/references/analysis-semantic-checks.md +190 -0
- package/templates/skills/business-analyse/references/cache-warming-strategy.md +2 -2
- package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +41 -0
- package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +74 -0
- package/templates/skills/business-analyse/references/cadrage-shared-modules.md +69 -0
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +1 -1
- package/templates/skills/business-analyse/references/compilation-structure-cards.md +297 -0
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
- package/templates/skills/business-analyse/references/deploy-modes.md +5 -5
- package/templates/skills/business-analyse/references/detection-strategies.md +7 -7
- package/templates/skills/business-analyse/references/handoff-file-templates.md +14 -22
- package/templates/skills/business-analyse/references/handoff-mappings.md +4 -4
- package/templates/skills/business-analyse/references/handoff-seeddata-generation.md +312 -0
- package/templates/skills/business-analyse/references/init-schema-deployment.md +3 -3
- package/templates/skills/business-analyse/references/naming-conventions.md +22 -24
- package/templates/skills/business-analyse/references/prd-generation.md +2 -2
- package/templates/skills/business-analyse/references/review-data-mapping.md +2 -2
- package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
- package/templates/skills/business-analyse/references/spec-auto-inference.md +3 -3
- package/templates/skills/business-analyse/references/team-orchestration.md +49 -6
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
- package/templates/skills/business-analyse/references/ui-resource-cards.md +18 -18
- package/templates/skills/business-analyse/references/validate-incremental-html.md +2 -2
- package/templates/skills/business-analyse/references/validation-checklist.md +2 -2
- package/templates/skills/business-analyse/schemas/application-schema.json +4 -5
- package/templates/skills/business-analyse/schemas/project-schema.json +1 -6
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -3
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +4 -4
- package/templates/skills/business-analyse/steps/step-00-init.md +8 -17
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +35 -198
- package/templates/skills/business-analyse/steps/step-01b-applications.md +16 -20
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +1 -1
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +4 -4
- package/templates/skills/business-analyse/steps/step-03a2-analysis.md +1 -1
- package/templates/skills/business-analyse/steps/step-03b-ui.md +4 -4
- package/templates/skills/business-analyse/steps/step-03c-compile.md +66 -140
- package/templates/skills/business-analyse/steps/step-03d-validate.md +2 -2
- package/templates/skills/business-analyse/steps/step-04a-collect.md +2 -2
- package/templates/skills/business-analyse/steps/step-04b-analyze.md +42 -160
- package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +74 -104
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +13 -11
- package/templates/skills/business-analyse/steps/step-06-review.md +3 -3
- package/templates/skills/business-analyse/templates/tpl-frd.md +13 -13
- package/templates/skills/business-analyse/templates/tpl-handoff.md +12 -12
- package/templates/skills/business-analyse/templates-frd.md +25 -25
- package/templates/skills/business-analyse/templates-react.md +15 -21
- package/templates/skills/controller/SKILL.md +1 -1
- package/templates/skills/controller/postman-templates.md +1 -1
- package/templates/skills/controller/references/controller-code-templates.md +2 -2
- package/templates/skills/controller/references/mcp-scaffold-workflow.md +209 -0
- package/templates/skills/controller/references/permission-sync-templates.md +13 -16
- package/templates/skills/controller/steps/step-00-init.md +11 -11
- package/templates/skills/controller/steps/step-03-generate.md +64 -103
- package/templates/skills/controller/templates.md +67 -71
- package/templates/skills/debug/SKILL.md +13 -218
- package/templates/skills/debug/steps/step-00-init.md +57 -0
- package/templates/skills/debug/steps/step-01-analyze.md +219 -0
- package/templates/skills/debug/steps/step-02-resolve.md +85 -0
- package/templates/skills/documentation/SKILL.md +49 -345
- package/templates/skills/documentation/data-schema.md +11 -8
- package/templates/skills/documentation/steps/step-00-init.md +70 -0
- package/templates/skills/documentation/steps/step-01-scan.md +113 -0
- package/templates/skills/documentation/steps/step-02-generate.md +231 -0
- package/templates/skills/documentation/steps/step-03-validate.md +238 -0
- package/templates/skills/documentation/templates.md +480 -322
- package/templates/skills/efcore/references/both-contexts.md +32 -0
- package/templates/skills/efcore/references/database-operations.md +67 -0
- package/templates/skills/efcore/references/destructive-operations.md +38 -0
- package/templates/skills/efcore/references/reset-operations.md +81 -0
- package/templates/skills/efcore/references/seed-methods.md +86 -0
- package/templates/skills/efcore/references/shared-init-functions.md +250 -0
- package/templates/skills/efcore/references/sql-objects-injection.md +61 -0
- package/templates/skills/efcore/references/troubleshooting.md +81 -0
- package/templates/skills/efcore/steps/db/step-deploy.md +1 -32
- package/templates/skills/efcore/steps/db/step-reset.md +7 -103
- package/templates/skills/efcore/steps/db/step-seed.md +10 -132
- package/templates/skills/efcore/steps/db/step-status.md +5 -44
- package/templates/skills/efcore/steps/migration/step-03-validate.md +8 -62
- package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +1 -57
- package/templates/skills/efcore/steps/shared/step-00-init.md +11 -254
- package/templates/skills/efcore/steps/squash/step-03-create.md +1 -58
- package/templates/skills/feature-full/SKILL.md +1 -1
- package/templates/skills/feature-full/steps/step-00-init.md +57 -0
- package/templates/skills/feature-full/steps/step-01-implementation.md +1 -1
- package/templates/skills/gitflow/SKILL.md +1 -1
- package/templates/skills/gitflow/_shared.md +23 -0
- package/templates/skills/gitflow/references/commit-message-generation.md +58 -0
- package/templates/skills/gitflow/references/commit-migration-validation.md +49 -0
- package/templates/skills/gitflow/references/finish-cleanup.md +51 -0
- package/templates/skills/gitflow/references/finish-version-bumping.md +45 -0
- package/templates/skills/gitflow/references/init-environment-detection.md +41 -0
- package/templates/skills/gitflow/references/init-questions.md +185 -0
- package/templates/skills/gitflow/references/init-structure-creation.md +71 -0
- package/templates/skills/gitflow/references/init-version-detection.md +21 -0
- package/templates/skills/gitflow/references/init-workspace-detection.md +43 -0
- package/templates/skills/gitflow/references/merge-ci-status.md +36 -0
- package/templates/skills/gitflow/references/merge-execution.md +62 -0
- package/templates/skills/gitflow/references/merge-pr-context.md +76 -0
- package/templates/skills/gitflow/references/pr-build-checks.md +60 -0
- package/templates/skills/gitflow/references/pr-generation.md +58 -0
- package/templates/skills/gitflow/references/start-branch-normalization.md +28 -0
- package/templates/skills/gitflow/references/start-worktree-creation.md +50 -0
- package/templates/skills/gitflow/references/sync-push-verify.md +44 -0
- package/templates/skills/gitflow/references/sync-rebase-conflicts.md +38 -0
- package/templates/skills/gitflow/steps/step-commit.md +12 -91
- package/templates/skills/gitflow/steps/step-finish.md +15 -159
- package/templates/skills/gitflow/steps/step-init.md +24 -326
- package/templates/skills/gitflow/steps/step-merge.md +17 -176
- package/templates/skills/gitflow/steps/step-pr.md +10 -116
- package/templates/skills/gitflow/steps/step-start.md +16 -109
- package/templates/skills/gitflow/steps/step-sync.md +6 -69
- package/templates/skills/ralph-loop/SKILL.md +6 -0
- package/templates/skills/ralph-loop/references/category-completeness.md +185 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +1 -1
- package/templates/skills/ralph-loop/references/init-resume-recovery.md +127 -0
- package/templates/skills/ralph-loop/references/module-transition.md +151 -0
- package/templates/skills/ralph-loop/references/multi-module-queue.md +171 -0
- package/templates/skills/ralph-loop/references/parallel-execution.md +246 -0
- package/templates/skills/ralph-loop/references/task-transform-legacy.md +6 -9
- package/templates/skills/ralph-loop/references/team-orchestration.md +45 -3
- package/templates/skills/ralph-loop/steps/step-00-init.md +36 -109
- package/templates/skills/ralph-loop/steps/step-01-task.md +15 -163
- package/templates/skills/ralph-loop/steps/step-02-execute.md +8 -154
- package/templates/skills/ralph-loop/steps/step-04-check.md +21 -73
- package/templates/skills/review-code/references/owasp-api-top10.md +5 -5
- package/templates/skills/review-code/references/smartstack-conventions.md +11 -11
- package/templates/skills/validate-feature/references/api-smoke-tests.md +140 -0
- package/templates/skills/validate-feature/references/db-validation-checks.md +180 -0
- package/templates/skills/validate-feature/steps/step-01-compile.md +5 -2
- package/templates/skills/validate-feature/steps/step-04-api-smoke.md +34 -145
- package/templates/skills/validate-feature/steps/step-05-db-validation.md +74 -260
- package/templates/skills/workflow/SKILL.md +1 -1
- package/templates/skills/workflow/steps/step-00-init.md +57 -0
|
@@ -99,101 +99,16 @@ EXISTING_PR=$(gh pr list --head "$CURRENT" --json number --jq '.[0].number' 2>/d
|
|
|
99
99
|
|
|
100
100
|
### 4. Run Pre-PR Checks
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
dotnet build --no-restore 2>&1 || {
|
|
107
|
-
echo "❌ .NET build failed. Fix before creating PR."
|
|
108
|
-
STOP
|
|
109
|
-
}
|
|
110
|
-
# Migration check
|
|
111
|
-
echo "Checking migrations..."
|
|
112
|
-
dotnet ef migrations list 2>&1 || echo "No migrations or EF Core not configured"
|
|
113
|
-
elif [ -f "package.json" ]; then
|
|
114
|
-
npm run build 2>&1 || {
|
|
115
|
-
echo "❌ npm build failed. Fix before creating PR."
|
|
116
|
-
STOP
|
|
117
|
-
}
|
|
118
|
-
elif [ -f "requirements.txt" ] || [ -f "pyproject.toml" ]; then
|
|
119
|
-
echo "Python project detected — skipping build check"
|
|
120
|
-
else
|
|
121
|
-
echo "⚠️ No known build system detected — skipping build check"
|
|
122
|
-
fi
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### 4b. Enforce Migration Squash (Feature Branches)
|
|
126
|
-
|
|
127
|
-
**BLOCKING**: Feature branches must have at most 1 migration before creating a PR.
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
if [ "$BRANCH_TYPE" = "feature" ]; then
|
|
131
|
-
MIGRATION_DIR=$(find . -path "*/Persistence/Migrations" -type d 2>/dev/null | head -1)
|
|
132
|
-
if [ -n "$MIGRATION_DIR" ]; then
|
|
133
|
-
# Count migration .cs files added by this feature (not in target branch)
|
|
134
|
-
NEW_MIGRATIONS=$(git diff --name-only "origin/$TARGET_BRANCH...HEAD" -- "$MIGRATION_DIR" \
|
|
135
|
-
| grep -E '\.cs$' \
|
|
136
|
-
| grep -v 'Designer\|ModelSnapshot' \
|
|
137
|
-
| wc -l)
|
|
138
|
-
|
|
139
|
-
if [ "$NEW_MIGRATIONS" -gt 1 ]; then
|
|
140
|
-
echo ""
|
|
141
|
-
echo "❌ MULTIPLE MIGRATIONS DETECTED ($NEW_MIGRATIONS migrations)"
|
|
142
|
-
echo "→ Feature branches must have exactly 1 migration (squashed) before PR"
|
|
143
|
-
echo "→ Run: /efcore squash"
|
|
144
|
-
echo ""
|
|
145
|
-
echo "Migrations found:"
|
|
146
|
-
git diff --name-only "origin/$TARGET_BRANCH...HEAD" -- "$MIGRATION_DIR" \
|
|
147
|
-
| grep -E '\.cs$' \
|
|
148
|
-
| grep -v 'Designer\|ModelSnapshot'
|
|
149
|
-
STOP
|
|
150
|
-
elif [ "$NEW_MIGRATIONS" -eq 1 ]; then
|
|
151
|
-
echo "✓ Single migration detected (squashed)"
|
|
152
|
-
else
|
|
153
|
-
echo "✓ No migrations in this feature"
|
|
154
|
-
fi
|
|
155
|
-
fi
|
|
156
|
-
fi
|
|
157
|
-
```
|
|
102
|
+
See [references/pr-build-checks.md](../references/pr-build-checks.md) for:
|
|
103
|
+
- Multi-runtime detection (.NET, npm, Python)
|
|
104
|
+
- Build validation per runtime
|
|
105
|
+
- Migration squash enforcement (feature branches: max 1 migration)
|
|
158
106
|
|
|
159
107
|
### 5. Generate PR Content
|
|
160
108
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
BRANCH_TYPE=$(echo $CURRENT | cut -d'/' -f1)
|
|
165
|
-
|
|
166
|
-
case "$BRANCH_TYPE" in
|
|
167
|
-
feature) TITLE="feat: $BRANCH_NAME" ;;
|
|
168
|
-
hotfix) TITLE="fix: $BRANCH_NAME" ;;
|
|
169
|
-
release) TITLE="release: v$GF_VERSION" ;;
|
|
170
|
-
esac
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
**Body:**
|
|
174
|
-
```markdown
|
|
175
|
-
## Summary
|
|
176
|
-
|
|
177
|
-
{Auto-generated from commit messages}
|
|
178
|
-
|
|
179
|
-
## Changes
|
|
180
|
-
|
|
181
|
-
{List of files changed with categories}
|
|
182
|
-
|
|
183
|
-
## Testing
|
|
184
|
-
|
|
185
|
-
- [ ] Build passes
|
|
186
|
-
- [ ] Unit tests pass
|
|
187
|
-
- [ ] Manual testing completed
|
|
188
|
-
|
|
189
|
-
## EF Core Migrations
|
|
190
|
-
|
|
191
|
-
{Migration status: None | Added | Modified}
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
🤖 Generated with [Claude Code](https://claude.ai/code)
|
|
196
|
-
```
|
|
109
|
+
See [references/pr-generation.md](../references/pr-generation.md) for:
|
|
110
|
+
- PR title generation (feat/fix/release format)
|
|
111
|
+
- PR body template with summary, changes, testing, migrations
|
|
197
112
|
|
|
198
113
|
### 6. Create Pull Request
|
|
199
114
|
|
|
@@ -228,33 +143,12 @@ PR_ID=$(az repos pr list --source-branch "$CURRENT" --query "[0].pullRequestId"
|
|
|
228
143
|
|
|
229
144
|
### 7. Add Labels (GitHub)
|
|
230
145
|
|
|
231
|
-
|
|
232
|
-
if [ "$GIT_PROVIDER" = "github" ]; then
|
|
233
|
-
case "$BRANCH_TYPE" in
|
|
234
|
-
feature) gh pr edit $PR_NUMBER --add-label "enhancement" ;;
|
|
235
|
-
hotfix) gh pr edit $PR_NUMBER --add-label "bug,priority" ;;
|
|
236
|
-
release) gh pr edit $PR_NUMBER --add-label "release" ;;
|
|
237
|
-
esac
|
|
238
|
-
fi
|
|
239
|
-
```
|
|
146
|
+
Auto-label PRs (enhancement/bug/priority/release) based on branch type.
|
|
240
147
|
|
|
241
148
|
### 8. Store PR Info
|
|
242
149
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
CONFIG_DIR=$(dirname "$GF_CONFIG_FILE")
|
|
246
|
-
cat > "$CONFIG_DIR/cache/pr-state.json" << EOF
|
|
247
|
-
{
|
|
248
|
-
"pr_number": "$PR_NUMBER",
|
|
249
|
-
"pr_url": "$PR_URL",
|
|
250
|
-
"source_branch": "$CURRENT",
|
|
251
|
-
"target_branch": "$TARGET_BRANCH",
|
|
252
|
-
"git_provider": "$GIT_PROVIDER",
|
|
253
|
-
"created_at": "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
254
|
-
}
|
|
255
|
-
EOF
|
|
256
|
-
echo "✓ PR state saved to $CONFIG_DIR/cache/pr-state.json"
|
|
257
|
-
```
|
|
150
|
+
See [references/pr-generation.md](../references/pr-generation.md) for:
|
|
151
|
+
- PR state persistence to cache for merge step
|
|
258
152
|
|
|
259
153
|
### 9. Summary
|
|
260
154
|
|
|
@@ -33,103 +33,29 @@ Create a new feature/release/hotfix branch with optional worktree setup.
|
|
|
33
33
|
|
|
34
34
|
### 1. Load Config and Analyze Context
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
# Load GitFlow config (sets GF_* variables)
|
|
38
|
-
# See _shared.md → READ_GITFLOW_CONFIG for all variables
|
|
39
|
-
read_gitflow_config || { echo "❌ Run /gitflow init first."; exit 1; }
|
|
40
|
-
|
|
41
|
-
CURRENT_BRANCH=$(git branch --show-current)
|
|
42
|
-
git fetch origin --quiet
|
|
43
|
-
|
|
44
|
-
# Version from config
|
|
45
|
-
VERSION="$GF_VERSION"
|
|
46
|
-
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "none")
|
|
47
|
-
|
|
48
|
-
# Develop ahead of main?
|
|
49
|
-
DEVELOP_AHEAD=$(git rev-list --count origin/$GF_MAIN_BRANCH..origin/$GF_DEVELOP_BRANCH 2>/dev/null || echo "0")
|
|
50
|
-
|
|
51
|
-
# Working directory status
|
|
52
|
-
DIRTY=$(git status --porcelain | wc -l)
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
**Display:**
|
|
56
|
-
```
|
|
57
|
-
Current: {CURRENT_BRANCH} | Version: {VERSION} | Tag: {LAST_TAG}
|
|
58
|
-
Develop → Main: {DEVELOP_AHEAD} commits {DEVELOP_AHEAD > 10 ? "(Release recommended)" : ""}
|
|
59
|
-
```
|
|
36
|
+
Load GitFlow config. Display current branch, version, tag, and dirty status.
|
|
60
37
|
|
|
61
38
|
### 2. Interactive Questions (if no args)
|
|
62
39
|
|
|
63
|
-
|
|
64
|
-
```yaml
|
|
65
|
-
AskUserQuestion:
|
|
66
|
-
header: "Type"
|
|
67
|
-
question: "What type of branch?"
|
|
68
|
-
options:
|
|
69
|
-
- label: "Feature"
|
|
70
|
-
description: "New feature from develop"
|
|
71
|
-
- label: "Release v{X.Y+1.0}"
|
|
72
|
-
description: "Prepare release from develop"
|
|
73
|
-
- label: "Hotfix"
|
|
74
|
-
description: "Urgent fix from main"
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
**If branch_name missing:**
|
|
78
|
-
```yaml
|
|
79
|
-
AskUserQuestion:
|
|
80
|
-
header: "Name"
|
|
81
|
-
question: "Branch name? (will be normalized to kebab-case)"
|
|
82
|
-
# Free text input
|
|
83
|
-
```
|
|
40
|
+
Ask for branch type (feature/release/hotfix) and name if not provided via args. Display suggested next version for releases.
|
|
84
41
|
|
|
85
42
|
### 3. Normalize and Validate
|
|
86
43
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
echo "$1" | tr '[:upper:]' '[:lower:]' | \
|
|
91
|
-
sed 'y/àâäéèêëïîôùûüçœæ/aaaeeeeiioouucoa/' | \
|
|
92
|
-
sed "s/[ _']/-/g" | sed 's/[^a-z0-9-]//g' | \
|
|
93
|
-
sed 's/--*/-/g' | sed 's/^-//;s/-$//' | cut -c1-50
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
BRANCH_NAME=$(normalize_branch_name "$branch_name")
|
|
97
|
-
FULL_BRANCH="${branch_type}/${BRANCH_NAME}"
|
|
98
|
-
|
|
99
|
-
# Check if exists
|
|
100
|
-
LOCAL_EXISTS=$(git branch --list "$FULL_BRANCH")
|
|
101
|
-
REMOTE_EXISTS=$(git branch -r --list "origin/$FULL_BRANCH")
|
|
102
|
-
|
|
103
|
-
[ -n "$LOCAL_EXISTS" ] || [ -n "$REMOTE_EXISTS" ] && {
|
|
104
|
-
echo "ERROR: Branch '$FULL_BRANCH' already exists"
|
|
105
|
-
# Options: Different name | Checkout existing | Delete and recreate
|
|
106
|
-
}
|
|
107
|
-
```
|
|
44
|
+
See [references/start-branch-normalization.md](../references/start-branch-normalization.md) for:
|
|
45
|
+
- Branch name normalization (kebab-case)
|
|
46
|
+
- Branch existence validation
|
|
108
47
|
|
|
109
48
|
### 4. Determine Base Branch
|
|
110
49
|
|
|
111
|
-
| Type | Base
|
|
112
|
-
|
|
50
|
+
| Type | Base | Target |
|
|
51
|
+
|------|------|--------|
|
|
113
52
|
| feature | develop | develop |
|
|
114
|
-
| release | develop | main
|
|
115
|
-
| hotfix | main | main
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
case "$branch_type" in
|
|
119
|
-
feature) BASE_BRANCH="develop"; TARGET="develop" ;;
|
|
120
|
-
release) BASE_BRANCH="develop"; TARGET="main" ;;
|
|
121
|
-
hotfix) BASE_BRANCH="main"; TARGET="main" ;;
|
|
122
|
-
esac
|
|
123
|
-
```
|
|
53
|
+
| release | develop | main |
|
|
54
|
+
| hotfix | main | main |
|
|
124
55
|
|
|
125
56
|
### 5. Handle Dirty Working Directory
|
|
126
57
|
|
|
127
|
-
|
|
128
|
-
[ "$DIRTY" -gt 0 ] && {
|
|
129
|
-
echo "Working directory has uncommitted changes"
|
|
130
|
-
# Options: Stash | Commit | Continue anyway | Cancel
|
|
131
|
-
}
|
|
132
|
-
```
|
|
58
|
+
Offer user to stash, commit, or continue if working directory has changes.
|
|
133
59
|
|
|
134
60
|
### 5b. EF Core Migration Pre-flight (Release/Hotfix only)
|
|
135
61
|
|
|
@@ -143,31 +69,12 @@ Expected format: `{context}_v{version}_{sequence}_{Description}` (e.g., `core_v2
|
|
|
143
69
|
|
|
144
70
|
### 6. Create Branch and Worktree
|
|
145
71
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
case "$branch_type" in
|
|
154
|
-
feature) WORKTREE_PATH="$GF_FEATURES_PATH/$BRANCH_NAME" ;;
|
|
155
|
-
release) WORKTREE_PATH="$GF_RELEASES_PATH/v$VERSION" ;;
|
|
156
|
-
hotfix) WORKTREE_PATH="$GF_HOTFIXES_PATH/$BRANCH_NAME" ;;
|
|
157
|
-
esac
|
|
158
|
-
|
|
159
|
-
mkdir -p "$(dirname $WORKTREE_PATH)"
|
|
160
|
-
git worktree add -b "$FULL_BRANCH" "$WORKTREE_PATH" "origin/$BASE_BRANCH"
|
|
161
|
-
|
|
162
|
-
# Fix cross-platform paths in worktree metadata (if created from different platform)
|
|
163
|
-
repair_worktree_paths "$(git rev-parse --git-common-dir)"
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
**Mode: --no-worktree**
|
|
167
|
-
```bash
|
|
168
|
-
git checkout "$BASE_BRANCH" && git pull origin "$BASE_BRANCH"
|
|
169
|
-
git checkout -b "$FULL_BRANCH"
|
|
170
|
-
```
|
|
72
|
+
See [references/start-worktree-creation.md](../references/start-worktree-creation.md) for:
|
|
73
|
+
- Worktree path selection (organized mode)
|
|
74
|
+
- Numbering rules (only 01-Main/02-Develop, no numbered feature/release/hotfix)
|
|
75
|
+
- Cross-platform path repair
|
|
76
|
+
- Worktree validation
|
|
77
|
+
- No-worktree mode fallback
|
|
171
78
|
|
|
172
79
|
### 6b. Push Branch to Remote (AUTOMATIC)
|
|
173
80
|
|
|
@@ -65,24 +65,7 @@ Sync Status: {CURRENT}
|
|
|
65
65
|
|
|
66
66
|
### 4. Push Local Commits
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
[ "$AHEAD" -gt 0 ] && {
|
|
70
|
-
echo "Pushing $AHEAD commit(s) to origin/$CURRENT..."
|
|
71
|
-
git push origin $CURRENT
|
|
72
|
-
|
|
73
|
-
# CRITICAL: Verify push and update tracking refs
|
|
74
|
-
git fetch origin $CURRENT:refs/remotes/origin/$CURRENT --force --quiet
|
|
75
|
-
LOCAL_SHA=$(git rev-parse HEAD)
|
|
76
|
-
REMOTE_SHA=$(git rev-parse origin/$CURRENT)
|
|
77
|
-
if [ "$LOCAL_SHA" = "$REMOTE_SHA" ]; then
|
|
78
|
-
echo "✅ Push verified - local/remote in sync"
|
|
79
|
-
else
|
|
80
|
-
echo "⚠️ Push verification FAILED - refs may be stale"
|
|
81
|
-
echo " Local: $LOCAL_SHA"
|
|
82
|
-
echo " Remote: $REMOTE_SHA"
|
|
83
|
-
fi
|
|
84
|
-
}
|
|
85
|
-
```
|
|
68
|
+
See [references/sync-push-verify.md](../references/sync-push-verify.md) for push with verification.
|
|
86
69
|
|
|
87
70
|
### 5. Pull Remote Commits
|
|
88
71
|
|
|
@@ -126,59 +109,13 @@ Sync Status: {CURRENT}
|
|
|
126
109
|
}
|
|
127
110
|
```
|
|
128
111
|
|
|
129
|
-
### 7. Handle Rebase Conflicts
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
# If rebase has conflicts
|
|
133
|
-
if [ -d ".git/rebase-merge" ] || [ -d ".git/rebase-apply" ]; then
|
|
134
|
-
echo "⚠️ REBASE CONFLICT DETECTED"
|
|
135
|
-
|
|
136
|
-
CONFLICTS=$(git diff --name-only --diff-filter=U)
|
|
137
|
-
echo "Conflicting files:"
|
|
138
|
-
echo "$CONFLICTS"
|
|
139
|
-
|
|
140
|
-
# Check for migration conflicts
|
|
141
|
-
MIGRATION_CONFLICTS=$(echo "$CONFLICTS" | grep "Migrations/")
|
|
142
|
-
[ -n "$MIGRATION_CONFLICTS" ] && {
|
|
143
|
-
echo "⚠️ Migration conflicts detected!"
|
|
144
|
-
echo "Recommend: /efcore:rebase-snapshot"
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
# Options
|
|
148
|
-
AskUserQuestion:
|
|
149
|
-
header: "Conflict"
|
|
150
|
-
question: "How to handle conflicts?"
|
|
151
|
-
options:
|
|
152
|
-
- label: "Resolve manually"
|
|
153
|
-
description: "I'll fix conflicts and continue"
|
|
154
|
-
- label: "Abort rebase"
|
|
155
|
-
description: "Cancel and return to previous state"
|
|
156
|
-
- label: "Accept theirs (migrations)"
|
|
157
|
-
description: "Use base branch migrations, regenerate ours"
|
|
158
|
-
fi
|
|
159
|
-
```
|
|
112
|
+
### 7-8. Handle Rebase Conflicts and Force Push
|
|
160
113
|
|
|
161
|
-
|
|
114
|
+
See [references/sync-rebase-conflicts.md](../references/sync-rebase-conflicts.md) for:
|
|
115
|
+
- Conflict detection and migration conflict handling
|
|
116
|
+
- User options (resolve, abort, accept theirs)
|
|
162
117
|
|
|
163
|
-
|
|
164
|
-
# After successful rebase
|
|
165
|
-
if [ "$REBASED" = true ]; then
|
|
166
|
-
echo "Rebase complete. Force pushing..."
|
|
167
|
-
git push --force-with-lease origin $CURRENT
|
|
168
|
-
|
|
169
|
-
# CRITICAL: Verify push and update tracking refs
|
|
170
|
-
git fetch origin $CURRENT:refs/remotes/origin/$CURRENT --force --quiet
|
|
171
|
-
LOCAL_SHA=$(git rev-parse HEAD)
|
|
172
|
-
REMOTE_SHA=$(git rev-parse origin/$CURRENT)
|
|
173
|
-
if [ "$LOCAL_SHA" = "$REMOTE_SHA" ]; then
|
|
174
|
-
echo "✅ Force push verified - local/remote in sync"
|
|
175
|
-
else
|
|
176
|
-
echo "⚠️ Force push verification FAILED"
|
|
177
|
-
echo " Local: $LOCAL_SHA"
|
|
178
|
-
echo " Remote: $REMOTE_SHA"
|
|
179
|
-
fi
|
|
180
|
-
fi
|
|
181
|
-
```
|
|
118
|
+
See [references/sync-push-verify.md](../references/sync-push-verify.md) for force push with verification.
|
|
182
119
|
|
|
183
120
|
### 9. Summary
|
|
184
121
|
|
|
@@ -166,8 +166,14 @@ When the user invokes `/ralph-loop`, they are giving you the instruction to:
|
|
|
166
166
|
| File | Loaded when |
|
|
167
167
|
|------|-------------|
|
|
168
168
|
| `references/category-rules.md` | Step-01 and compact loop (category ordering and dependency rules) |
|
|
169
|
+
| `references/category-completeness.md` | Step-01 section 4b and step-04 section 1.7 (guardrail injection) |
|
|
169
170
|
| `references/compact-loop.md` | Step-04 section 5 (module loop with /apex delegation) |
|
|
171
|
+
| `references/init-resume-recovery.md` | Step-00 section 4 (resume mode and auto-recovery) |
|
|
172
|
+
| `references/multi-module-queue.md` | Step-00 and step-01 section 0 (multi-module initialization) |
|
|
173
|
+
| `references/module-transition.md` | Step-04 section 3b (multi-module advancement) |
|
|
174
|
+
| `references/parallel-execution.md` | Step-02 section 3a (Agent Teams for multi-module) |
|
|
170
175
|
| `references/section-splitting.md` | Step-01 section 4c when module has >4 entities + >1 section |
|
|
176
|
+
| `references/task-transform-legacy.md` | Step-01 (legacy FORMAT A PRD transformation) |
|
|
171
177
|
| `references/team-orchestration.md` | Step-00 when multi-module detected (2+ PRDs) |
|
|
172
178
|
</step_files>
|
|
173
179
|
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Category Completeness Check
|
|
2
|
+
|
|
3
|
+
> **Reference for:** step-01-task.md section 4b and step-04-check.md section 1.7
|
|
4
|
+
> **Purpose:** Ensure PRD contains tasks for ALL required categories before/during execution
|
|
5
|
+
> **Frequency:** On load (step-01) and every iteration (step-04)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## The Problem
|
|
10
|
+
|
|
11
|
+
**Test-v4-005 Failure Mode:**
|
|
12
|
+
- PRD generated with only backend categories (domain, infrastructure, application, api, seedData)
|
|
13
|
+
- Frontend and test categories were entirely absent
|
|
14
|
+
- Result: 0 frontend pages, 0 tests generated across 3 modules
|
|
15
|
+
- Root cause: No guardrail detection during load
|
|
16
|
+
|
|
17
|
+
## The Solution: Required Categories
|
|
18
|
+
|
|
19
|
+
**CRITICAL:** Every PRD MUST have tasks for these categories:
|
|
20
|
+
|
|
21
|
+
```javascript
|
|
22
|
+
const REQUIRED_CATEGORIES = ['domain', 'infrastructure', 'application', 'api', 'seedData', 'frontend', 'test'];
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
> **Why seedData is required:**
|
|
26
|
+
> - Without it: Navigation/Permissions are not seeded
|
|
27
|
+
> - Result: Frontend/test tasks execute against empty database
|
|
28
|
+
> - Guardrail must inject NavigationApplicationSeedData, ApplicationRolesSeedData, etc.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Completeness Check Function
|
|
33
|
+
|
|
34
|
+
```javascript
|
|
35
|
+
function checkCategoryCompleteness(prd) {
|
|
36
|
+
const presentCategories = new Set(prd.tasks.map(t => t.category));
|
|
37
|
+
const REQUIRED_CATEGORIES = ['domain', 'infrastructure', 'application', 'api', 'seedData', 'frontend', 'test'];
|
|
38
|
+
const missingCategories = REQUIRED_CATEGORIES.filter(c => !presentCategories.has(c));
|
|
39
|
+
|
|
40
|
+
if (missingCategories.length === 0) {
|
|
41
|
+
return { missing: [], guardrailsNeeded: [] };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
console.warn(`⚠ PRD MISSING CATEGORIES: ${missingCategories.join(', ')}`);
|
|
45
|
+
|
|
46
|
+
// Calculate max ID for new guardrails
|
|
47
|
+
let maxIdNum = Math.max(...prd.tasks.map(t => {
|
|
48
|
+
const num = parseInt(t.id.replace(/[^0-9]/g, ''), 10);
|
|
49
|
+
return isNaN(num) ? 0 : num;
|
|
50
|
+
}), 0);
|
|
51
|
+
|
|
52
|
+
const prefix = prd.tasks[0]?.id?.replace(/[0-9]+$/, '') || 'GUARD-';
|
|
53
|
+
const lastApiTask = prd.tasks.filter(t => t.category === 'api').pop()?.id;
|
|
54
|
+
const lastSeedDataTask = prd.tasks.filter(t => t.category === 'seedData').pop()?.id;
|
|
55
|
+
|
|
56
|
+
// Dependency chain: domain → infrastructure → application → api → seedData → frontend → test
|
|
57
|
+
// Frontend MUST depend on seedData (navigation/permissions must be seeded first)
|
|
58
|
+
const frontendDep = lastSeedDataTask || lastApiTask;
|
|
59
|
+
|
|
60
|
+
const guardrailTasks = [];
|
|
61
|
+
|
|
62
|
+
for (const cat of missingCategories) {
|
|
63
|
+
maxIdNum++;
|
|
64
|
+
const taskId = `${prefix}${String(maxIdNum).padStart(3, '0')}`;
|
|
65
|
+
|
|
66
|
+
// Determine dependencies based on category order
|
|
67
|
+
let deps;
|
|
68
|
+
if (cat === 'seedData') {
|
|
69
|
+
deps = [lastApiTask]; // seedData depends on API infrastructure
|
|
70
|
+
} else if (cat === 'frontend') {
|
|
71
|
+
deps = [frontendDep]; // frontend depends on seedData (navigation must be seeded)
|
|
72
|
+
} else if (cat === 'test') {
|
|
73
|
+
deps = [frontendDep]; // test depends on seedData too
|
|
74
|
+
} else {
|
|
75
|
+
deps = [];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const guardrailTask = {
|
|
79
|
+
id: taskId,
|
|
80
|
+
description: `[GUARDRAIL] Generate ${cat} layer for ${prd.project?.module || 'module'}`,
|
|
81
|
+
status: 'pending',
|
|
82
|
+
category: cat,
|
|
83
|
+
dependencies: deps,
|
|
84
|
+
acceptance_criteria: determineAcceptanceCriteria(cat),
|
|
85
|
+
started_at: null,
|
|
86
|
+
completed_at: null,
|
|
87
|
+
iteration: null,
|
|
88
|
+
commit_hash: null,
|
|
89
|
+
files_changed: [],
|
|
90
|
+
validation: null,
|
|
91
|
+
error: null
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
guardrailTasks.push(guardrailTask);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return { missing: missingCategories, guardrailsNeeded: guardrailTasks };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function determineAcceptanceCriteria(category) {
|
|
101
|
+
const criteria = {
|
|
102
|
+
domain: 'Entity classes created with required properties',
|
|
103
|
+
infrastructure: 'EF Core configs, migrations created, dotnet build passes',
|
|
104
|
+
application: 'Service classes implementing business logic',
|
|
105
|
+
api: 'REST controllers with [RequirePermission] attributes',
|
|
106
|
+
seedData: 'NavigationApplicationSeedData + ApplicationRolesSeedData + PermissionsSeedData created, IClientSeedDataProvider wired, startup test passes',
|
|
107
|
+
frontend: 'React pages created via MCP scaffold_api_client + scaffold_routes, wired to App.tsx, navigation seed data verified in DB',
|
|
108
|
+
test: 'Unit + Integration test projects created, scaffold_tests MCP called, dotnet test passes'
|
|
109
|
+
};
|
|
110
|
+
return criteria[category] || `${category} layer fully implemented per category-rules.md`;
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Application in step-01
|
|
115
|
+
|
|
116
|
+
```javascript
|
|
117
|
+
// After loading prd.json or generating tasks
|
|
118
|
+
const { missing, guardrailsNeeded } = checkCategoryCompleteness(prd);
|
|
119
|
+
|
|
120
|
+
if (guardrailsNeeded.length > 0) {
|
|
121
|
+
console.log(`PRD updated: ${prd.tasks.length} → ${prd.tasks.length + guardrailsNeeded.length} tasks (${guardrailsNeeded.length} guardrails added)`);
|
|
122
|
+
prd.tasks.push(...guardrailsNeeded);
|
|
123
|
+
|
|
124
|
+
// Update frontendDep for any frontend guardrail if seedData was just injected
|
|
125
|
+
if (missing.includes('seedData')) {
|
|
126
|
+
const seedDataGuard = guardrailsNeeded.find(t => t.category === 'seedData');
|
|
127
|
+
const frontendGuard = prd.tasks.find(t => t.category === 'frontend' && t.description.includes('[GUARDRAIL]'));
|
|
128
|
+
if (frontendGuard && seedDataGuard) {
|
|
129
|
+
frontendGuard.dependencies = [seedDataGuard.id];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
writeJSON('.ralph/prd.json', prd);
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Application in step-04 (every iteration)
|
|
138
|
+
|
|
139
|
+
```javascript
|
|
140
|
+
// RUNS EVERY ITERATION — not just once
|
|
141
|
+
const { missing, guardrailsNeeded } = checkCategoryCompleteness(prd);
|
|
142
|
+
|
|
143
|
+
if (guardrailsNeeded.length > 0) {
|
|
144
|
+
prd.tasks.push(...guardrailsNeeded);
|
|
145
|
+
writeJSON('.ralph/prd.json', prd);
|
|
146
|
+
|
|
147
|
+
const newPending = prd.tasks.filter(t => t.status === 'pending').length;
|
|
148
|
+
console.log(`PRD updated: +${guardrailsNeeded.length} guardrails, ${newPending} pending tasks`);
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Artifact Verification
|
|
153
|
+
|
|
154
|
+
After category check, verify artifacts actually exist for completed tasks:
|
|
155
|
+
|
|
156
|
+
```javascript
|
|
157
|
+
const completedCats = new Set(prd.tasks.filter(t => t.status === 'completed').map(t => t.category));
|
|
158
|
+
const artifactChecks = {
|
|
159
|
+
'frontend': () => glob.sync('**/src/pages/**/*.tsx').length > 0,
|
|
160
|
+
'test': () => glob.sync('tests/**/*Tests.cs').length > 0,
|
|
161
|
+
'api': () => glob.sync('src/*/Controllers/**/*Controller.cs').length > 0
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
for (const [cat, check] of Object.entries(artifactChecks)) {
|
|
165
|
+
if (completedCats.has(cat) && !check()) {
|
|
166
|
+
console.warn(`ARTIFACT MISSING: ${cat} tasks marked completed but no files found — resetting to pending`);
|
|
167
|
+
prd.tasks.filter(t => t.category === cat && t.status === 'completed')
|
|
168
|
+
.forEach(t => {
|
|
169
|
+
t.status = 'pending';
|
|
170
|
+
t.error = 'Artifacts missing — re-execute';
|
|
171
|
+
t.completed_at = null;
|
|
172
|
+
});
|
|
173
|
+
writeJSON('.ralph/prd.json', prd);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Key Rules
|
|
181
|
+
|
|
182
|
+
- **Inject EVERY iteration:** Not just once during load
|
|
183
|
+
- **Frontend depends on seedData:** Not just API
|
|
184
|
+
- **Check artifacts:** Mark tasks pending if files don't exist
|
|
185
|
+
- **Never skip:** This is the blocker for "missing frontend/test" failures
|
|
@@ -196,7 +196,7 @@ writeJSON('.ralph/prd.json', prd);
|
|
|
196
196
|
**INVOKE `/apex -d .ralph/prd.json`**
|
|
197
197
|
|
|
198
198
|
Apex handles everything for the current module:
|
|
199
|
-
- Reads PRD, extracts context (
|
|
199
|
+
- Reads PRD, extracts context (app_name, module_code, entities, sections)
|
|
200
200
|
- Executes ALL layers: domain → infrastructure → migration → application → api → seed data → frontend → tests
|
|
201
201
|
- Runs full POST-CHECKs (50 checks from `references/post-checks.md`)
|
|
202
202
|
- Commits per layer (atomic commits)
|