@compilr-dev/sdk 0.1.15 → 0.1.16
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.
|
@@ -69,7 +69,10 @@ When you have enough information:
|
|
|
69
69
|
- Fill in: Problem Statement, Goals, User Stories, Functional Requirements
|
|
70
70
|
- Keep the existing structure, just replace placeholder text
|
|
71
71
|
5. Present the backlog and PRD summary to user for confirmation
|
|
72
|
-
- If CHORE-001 was added, mention: "Run /
|
|
72
|
+
- If CHORE-001 was added, mention: "Run /scaffold to create the project foundation"
|
|
73
|
+
6. If the project involves managing entities (CRUD operations on things like users, orders, products):
|
|
74
|
+
- Mention: "This looks like an entity-based app — /scaffold can auto-generate a full working MVP with CRUD pages, API, routing, and seed data."
|
|
75
|
+
- Do NOT build the Application Model during /design — /scaffold handles that
|
|
73
76
|
|
|
74
77
|
## RULES
|
|
75
78
|
- Ask questions in batches of 2-4 using ask_user tool when possible
|
|
@@ -85,6 +88,7 @@ When you have enough information:
|
|
|
85
88
|
✓ Backlog has 5-15 items
|
|
86
89
|
✓ For fresh projects: CHORE-001 scaffolding item is first (critical priority)
|
|
87
90
|
✓ PRD.md is populated with requirements
|
|
91
|
+
✓ If entity-based: user informed about /scaffold auto-generation
|
|
88
92
|
✓ User has approved the backlog`,
|
|
89
93
|
tags: ['planning', 'requirements'],
|
|
90
94
|
});
|
|
@@ -711,6 +715,26 @@ export const scaffoldSkill = defineSkill({
|
|
|
711
715
|
- Need requirements first → use design skill
|
|
712
716
|
- Modifying existing project → use appropriate skill
|
|
713
717
|
|
|
718
|
+
## FACTORY CHECK (TRY THIS FIRST)
|
|
719
|
+
|
|
720
|
+
Before manual scaffolding, check if the factory can auto-generate the project:
|
|
721
|
+
|
|
722
|
+
1. Call \`app_model_get\` with \`{ "scope": "summary" }\` to check for an existing Application Model.
|
|
723
|
+
- If model exists with entities → use factory path: preview with \`factory_scaffold({ "dry_run": true })\`, confirm with user, then generate with \`factory_scaffold({ "output_dir": "{{projectPath}}" })\`.
|
|
724
|
+
- Skip the manual scaffold below entirely.
|
|
725
|
+
|
|
726
|
+
2. If NO model exists, check project documents for entity patterns:
|
|
727
|
+
- Read PRD with \`project_document_get({ "doc_type": "prd" })\`
|
|
728
|
+
- If PRD mentions managing/tracking things (entities, CRUD, data types) → ask user:
|
|
729
|
+
"Your project involves managing [entities]. I can auto-generate a working app. Want me to use the factory? (Yes = build model + generate / No = manual scaffold)"
|
|
730
|
+
- If Yes → call \`factory_list_toolkits\` to show options, then build the model with \`app_model_update\` operations (set identity, techStack, add entities with fields, add relationships, set features/theme/layout), validate with \`app_model_validate\`, generate with \`factory_scaffold({ "output_dir": "{{projectPath}}" })\`.
|
|
731
|
+
|
|
732
|
+
3. If no entities detected or user declines factory → proceed with MANUAL SCAFFOLD below.
|
|
733
|
+
|
|
734
|
+
---
|
|
735
|
+
|
|
736
|
+
## MANUAL SCAFFOLD (if factory not applicable)
|
|
737
|
+
|
|
714
738
|
## CRITICAL: PROJECT DIRECTORY
|
|
715
739
|
|
|
716
740
|
**All files MUST be created in: {{projectPath}}**
|