@mriekki/project-forge 0.0.0-stage → 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/README.md +134 -2
- package/assets/components.json +33 -0
- package/assets/core/distribution.json +66 -0
- package/assets/deployment/distribution.json +54 -0
- package/assets/generated/ASSEMBLY.json +557 -0
- package/assets/generated/core/core/agents/coach.agent.md +69 -0
- package/assets/generated/core/core/agents/reviewer.agent.md +85 -0
- package/assets/generated/core/core/instructions/project-forge-docs.instructions.md +45 -0
- package/assets/generated/core/core/instructions/project-forge-workflow.instructions.md +79 -0
- package/assets/generated/core/core/learning/CODING_DRILLS.md +35 -0
- package/assets/generated/core/core/learning/DIAGRAM_GUIDE.md +59 -0
- package/assets/generated/core/core/learning/ENGINEERING_LEARNING_WORKBOOK.md +108 -0
- package/assets/generated/core/core/learning/LEARNING_MAP.md +108 -0
- package/assets/generated/core/core/learning/LEARNING_PROGRESS.md +39 -0
- package/assets/generated/core/core/learning/RESOURCE_CATALOG.md +25 -0
- package/assets/generated/core/core/learning/SQL_DRILLS.md +90 -0
- package/assets/generated/core/core/learning/SYSTEM_DESIGN_DRILLS.md +301 -0
- package/assets/generated/core/core/process/COACHING_GUIDE.md +92 -0
- package/assets/generated/core/core/process/DATABASE_LEARNING_WORKBENCH.md +397 -0
- package/assets/generated/core/core/process/DEPLOYMENT_ENABLEMENT.md +166 -0
- package/assets/generated/core/core/process/GUIDED_NEXT_STEPS.md +48 -0
- package/assets/generated/core/core/process/HUMAN_GATES.md +83 -0
- package/assets/generated/core/core/process/INTERACTIVE_SESSION_GUIDE.md +64 -0
- package/assets/generated/core/core/process/PROJECT_DOCUMENTATION_FRAMEWORK.md +326 -0
- package/assets/generated/core/core/process/PROJECT_FORGE_ENGINEERING_GUIDE.md +308 -0
- package/assets/generated/core/core/process/PR_WORKFLOW.md +55 -0
- package/assets/generated/core/core/process/SETUP_ACCEPTANCE_CHECKLIST.md +72 -0
- package/assets/generated/core/core/process/SYSTEM_DESIGN_LEARNING_WORKBENCH.md +520 -0
- package/assets/generated/core/core/process/WORK_ITEM_MODEL.md +56 -0
- package/assets/generated/core/core/skills/cleanup-branches/SKILL.md +190 -0
- package/assets/generated/core/core/skills/coach/SKILL.md +174 -0
- package/assets/generated/core/core/skills/code-walkthrough/SKILL.md +197 -0
- package/assets/generated/core/core/skills/core-sync/SKILL.md +178 -0
- package/assets/generated/core/core/skills/db-lab/SKILL.md +245 -0
- package/assets/generated/core/core/skills/define-feature/SKILL.md +144 -0
- package/assets/generated/core/core/skills/deliver/SKILL.md +397 -0
- package/assets/generated/core/core/skills/deploy/SKILL.md +188 -0
- package/assets/generated/core/core/skills/deployment-readiness/SKILL.md +234 -0
- package/assets/generated/core/core/skills/developer-env-mode/SKILL.md +231 -0
- package/assets/generated/core/core/skills/docs/SKILL.md +116 -0
- package/assets/generated/core/core/skills/grill-me/SKILL.md +77 -0
- package/assets/generated/core/core/skills/grill-with-docs/SKILL.md +90 -0
- package/assets/generated/core/core/skills/learning-review/SKILL.md +90 -0
- package/assets/generated/core/core/skills/next-step/SKILL.md +221 -0
- package/assets/generated/core/core/skills/progress/SKILL.md +207 -0
- package/assets/generated/core/core/skills/project-forge-update/SKILL.md +228 -0
- package/assets/generated/core/core/skills/pull-latest/SKILL.md +166 -0
- package/assets/generated/core/core/skills/refine-requirements/SKILL.md +207 -0
- package/assets/generated/core/core/skills/setup/SKILL.md +362 -0
- package/assets/generated/core/core/skills/start-work/SKILL.md +190 -0
- package/assets/generated/core/core/skills/system-lab/SKILL.md +333 -0
- package/assets/generated/core/core/skills/tear-down/SKILL.md +140 -0
- package/assets/generated/core/core/skills/upstream-fix/SKILL.md +221 -0
- package/assets/generated/core/core/skills/wait-what/SKILL.md +86 -0
- package/assets/generated/core/core/templates/ADR_TEMPLATE.md +41 -0
- package/assets/generated/core/core/templates/FEATURE_BRIEF_TEMPLATE.md +27 -0
- package/assets/generated/core/core/templates/PRODUCT_BRIEF_TEMPLATE.md +27 -0
- package/assets/generated/core/core/templates/PULL_REQUEST_TEMPLATE.md +37 -0
- package/assets/generated/core/core/templates/REQUIREMENTS_TEMPLATE.md +17 -0
- package/assets/generated/core/profiles/greenfield/project-forge-workspace.json +12 -0
- package/assets/generated/core/tools/db_lab/sqlite_workbench.py +463 -0
- package/assets/generated/core/tools/docs_site/docs_site.py +512 -0
- package/assets/generated/core/tools/package/check_baseline.py +102 -0
- package/assets/generated/core/tools/package/check_upstream.py +171 -0
- package/assets/generated/core/tools/system_lab/system_workbench.py +243 -0
- package/assets/generated/deployment/distribution/project-forge-deploy.py +8 -0
- package/assets/generated/deployment/docs/DEVELOPER_ENVIRONMENTS.md +335 -0
- package/assets/generated/deployment/docs/ENVIRONMENT_PROOF.md +95 -0
- package/assets/generated/deployment/docs/WORKSPACE_INSTANCES.md +154 -0
- package/assets/generated/deployment/docs/images/developer-environment-journey.svg +56 -0
- package/assets/generated/deployment/docs/images/personal-environment-architecture.svg +54 -0
- package/assets/generated/deployment/docs/images/poc-environment-model.svg +61 -0
- package/assets/generated/deployment/src/project_forge_deployment/__init__.py +3 -0
- package/assets/generated/deployment/src/project_forge_deployment/__main__.py +3 -0
- package/assets/generated/deployment/src/project_forge_deployment/app_cli.py +163 -0
- package/assets/generated/deployment/src/project_forge_deployment/app_runtime.py +455 -0
- package/assets/generated/deployment/src/project_forge_deployment/app_runtime_remote.py +416 -0
- package/assets/generated/deployment/src/project_forge_deployment/app_runtime_workstation.py +136 -0
- package/assets/generated/deployment/src/project_forge_deployment/box_platform.py +208 -0
- package/assets/generated/deployment/src/project_forge_deployment/box_platform_assets.py +100 -0
- package/assets/generated/deployment/src/project_forge_deployment/box_platform_remote.py +271 -0
- package/assets/generated/deployment/src/project_forge_deployment/cli.py +437 -0
- package/assets/generated/deployment/src/project_forge_deployment/doctor.py +121 -0
- package/assets/generated/deployment/src/project_forge_deployment/entrypoint.py +37 -0
- package/assets/generated/deployment/src/project_forge_deployment/environment_cli.py +271 -0
- package/assets/generated/deployment/src/project_forge_deployment/environment_probe.py +228 -0
- package/assets/generated/deployment/src/project_forge_deployment/errors.py +5 -0
- package/assets/generated/deployment/src/project_forge_deployment/home_lab.py +328 -0
- package/assets/generated/deployment/src/project_forge_deployment/image_transfer.py +105 -0
- package/assets/generated/deployment/src/project_forge_deployment/keys.py +171 -0
- package/assets/generated/deployment/src/project_forge_deployment/local_cli.py +189 -0
- package/assets/generated/deployment/src/project_forge_deployment/local_runtime.py +526 -0
- package/assets/generated/deployment/src/project_forge_deployment/local_spec.py +82 -0
- package/assets/generated/deployment/src/project_forge_deployment/local_sqlite.py +205 -0
- package/assets/generated/deployment/src/project_forge_deployment/portable_profile.py +181 -0
- package/assets/generated/deployment/src/project_forge_deployment/profile_migration.py +70 -0
- package/assets/generated/deployment/src/project_forge_deployment/profile_repository.py +348 -0
- package/assets/generated/deployment/src/project_forge_deployment/profiles.py +204 -0
- package/assets/generated/deployment/src/project_forge_deployment/registry_access.py +114 -0
- package/assets/generated/deployment/src/project_forge_deployment/registry_cli.py +51 -0
- package/assets/generated/deployment/src/project_forge_deployment/route_registry.py +367 -0
- package/assets/generated/deployment/src/project_forge_deployment/route_registry_remote.py +443 -0
- package/assets/generated/deployment/src/project_forge_deployment/security.py +290 -0
- package/assets/generated/deployment/src/project_forge_deployment/sqlite_adapter.py +335 -0
- package/assets/generated/deployment/src/project_forge_deployment/sqlite_adapter_remote.py +340 -0
- package/assets/generated/deployment/src/project_forge_deployment/sqlite_cli.py +86 -0
- package/assets/generated/deployment/src/project_forge_deployment/sqlite_import_recovery.py +437 -0
- package/assets/generated/deployment/src/project_forge_deployment/ssh.py +119 -0
- package/assets/generated/deployment/src/project_forge_deployment/teardown.py +300 -0
- package/assets/generated/deployment/src/project_forge_deployment/teardown_cli.py +139 -0
- package/assets/generated/deployment/src/project_forge_deployment/teardown_remote.py +100 -0
- package/assets/generated/deployment/src/project_forge_deployment/trust.py +278 -0
- package/bin/project-forge.mjs +9 -0
- package/package.json +31 -4
- package/src/cli.mjs +150 -0
- package/src/engine.mjs +243 -0
- package/src/package-data.mjs +18 -0
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
# Database Learning Workbench
|
|
2
|
+
|
|
3
|
+
The Database Learning Workbench is the reusable Project Forge learning contract behind `/db-lab`. It makes database behavior that frameworks and ORMs often hide visible enough to inspect, explain, debug, and defend.
|
|
4
|
+
|
|
5
|
+
It is project-aware rather than a generic SQL course: use the **current** repository's domain, schema, migrations, ORM mappings, queries, and safe development/test database evidence as the curriculum.
|
|
6
|
+
|
|
7
|
+
Learning remains optional and never changes engineering delivery state.
|
|
8
|
+
|
|
9
|
+
## Quick start
|
|
10
|
+
|
|
11
|
+
Use `/coach` for explanation, adaptive questioning, and gap assessment. Use `/db-lab` when the learning needs concrete database evidence.
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
/coach database design
|
|
15
|
+
/db-lab
|
|
16
|
+
/db-lab schema
|
|
17
|
+
/db-lab changes <work-item>
|
|
18
|
+
/db-lab trace <query/file/symbol>
|
|
19
|
+
/db-lab plan <query>
|
|
20
|
+
/db-lab debug <symptom/query>
|
|
21
|
+
/db-lab migration <migration>
|
|
22
|
+
/db-lab interview database
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Invoking `/db-lab` means **inspect current evidence and show the current view**. The learner should not need to remember to refresh, rebuild, or manually maintain an ER diagram.
|
|
26
|
+
|
|
27
|
+
Natural-language arguments are preferred over rigid syntax. Examples:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
/db-lab show me how Recipes and Ingredients are related
|
|
31
|
+
/db-lab changes WI-24
|
|
32
|
+
/db-lab trace the EF query used by GetWeeklyMealPlan
|
|
33
|
+
/db-lab why is this query scanning MealPlanItems
|
|
34
|
+
/db-lab show which indexes this query actually uses
|
|
35
|
+
/db-lab walk me through the latest migration without applying it
|
|
36
|
+
/db-lab give me a database-design interview based on this domain
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Current-by-default artifact lifecycle
|
|
40
|
+
|
|
41
|
+
Generated workbench HTML/JSON is a disposable projection:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
current safe database/repository evidence
|
|
45
|
+
→ inspect schema / ORM / migrations / queries
|
|
46
|
+
→ build current learning model
|
|
47
|
+
→ generate current interactive view
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The database/repository evidence remains authoritative. An older browser tab is not authoritative. Run the lab again and it produces the current view.
|
|
51
|
+
|
|
52
|
+
When a previous disposable snapshot is available it may help explain what changed, but never outranks current physical/ORM/migration evidence.
|
|
53
|
+
|
|
54
|
+
## SQLite interactive workbench
|
|
55
|
+
|
|
56
|
+
Greenfield consumers that include the Core learning payload receive:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
tools/project-forge-db-lab/sqlite-workbench.py
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The tool is dependency-free Python and opens SQLite databases read-only. It generates a self-contained interactive `index.html` and machine-readable `workbench.json`.
|
|
63
|
+
|
|
64
|
+
### PowerShell
|
|
65
|
+
|
|
66
|
+
From the repository root, using a **known safe development/test** SQLite file:
|
|
67
|
+
|
|
68
|
+
```powershell
|
|
69
|
+
Set-Location D:\Projects\<repo>
|
|
70
|
+
$out = Join-Path $env:TEMP "project-forge-db-lab"
|
|
71
|
+
python .\tools\project-forge-db-lab\sqlite-workbench.py export `
|
|
72
|
+
--db .\.data\app.db `
|
|
73
|
+
--out $out
|
|
74
|
+
Start-Process (Join-Path $out "index.html")
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`.data/app.db` is only an example. Use the actual project development/test database path. Never point the learning tool at Production.
|
|
78
|
+
|
|
79
|
+
### macOS/Linux
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
cd /path/to/repo
|
|
83
|
+
out="${TMPDIR:-/tmp}/project-forge-db-lab"
|
|
84
|
+
python3 tools/project-forge-db-lab/sqlite-workbench.py export \
|
|
85
|
+
--db .data/app.db \
|
|
86
|
+
--out "$out"
|
|
87
|
+
open "$out/index.html" 2>/dev/null || xdg-open "$out/index.html"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Query-to-ERD evidence
|
|
91
|
+
|
|
92
|
+
Create a disposable query-evidence JSON file from captured or otherwise verified SQL:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
[
|
|
96
|
+
{
|
|
97
|
+
"name": "Get weekly meal plan",
|
|
98
|
+
"sql": "SELECT r.Id, r.Name FROM MealPlanItems mpi JOIN Recipes r ON r.Id = mpi.RecipeId WHERE mpi.MealPlanId = :mealPlanId",
|
|
99
|
+
"parameters": {
|
|
100
|
+
"mealPlanId": 42
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Run the workbench with that evidence:
|
|
107
|
+
|
|
108
|
+
```powershell
|
|
109
|
+
$out = Join-Path $env:TEMP "project-forge-db-lab"
|
|
110
|
+
python .\tools\project-forge-db-lab\sqlite-workbench.py export `
|
|
111
|
+
--db .\.data\app.db `
|
|
112
|
+
--queries .\tmp\db-lab-queries.json `
|
|
113
|
+
--out $out
|
|
114
|
+
Start-Process (Join-Path $out "index.html")
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Each invocation produces the current view. The query-evidence file and generated workbench stay disposable/local unless the project explicitly chooses a sanitized durable artifact.
|
|
118
|
+
|
|
119
|
+
## What the interactive viewer shows
|
|
120
|
+
|
|
121
|
+
The SQLite workbench supports:
|
|
122
|
+
|
|
123
|
+
- tables and views;
|
|
124
|
+
- columns, types, nullability, and primary-key participation;
|
|
125
|
+
- foreign-key relationships and delete/update actions;
|
|
126
|
+
- indexes, uniqueness, origin, partial-index status, key columns, and stored DDL when available;
|
|
127
|
+
- junction-table candidates, clearly labeled as a heuristic rather than domain truth;
|
|
128
|
+
- clickable tables, columns, and indexes with a learning/details panel;
|
|
129
|
+
- query selection and highlighting of referenced tables;
|
|
130
|
+
- relationship-edge highlighting when both related tables participate;
|
|
131
|
+
- qualified query-column highlighting when resolvable;
|
|
132
|
+
- `EXPLAIN QUERY PLAN` evidence for parameterized `SELECT`/`WITH` queries;
|
|
133
|
+
- a distinction between indexes selected by the planner and indexes that are merely plausible candidates/relevant to highlighted columns.
|
|
134
|
+
|
|
135
|
+
The viewer does not claim to understand arbitrary SQL perfectly. SQL-to-table/column mapping includes heuristic parsing, while planner-selected indexes come from SQLite's own query-plan evidence.
|
|
136
|
+
|
|
137
|
+
## What to expect from `/db-lab`
|
|
138
|
+
|
|
139
|
+
A useful session follows evidence rather than guesses:
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
repository intent
|
|
143
|
+
→ ORM model
|
|
144
|
+
→ physical schema
|
|
145
|
+
→ query / executed SQL
|
|
146
|
+
→ query plan
|
|
147
|
+
→ indexes / constraints / transaction behavior
|
|
148
|
+
→ explanation or exercise
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Explicitly state which layers were verified and which were inferred.
|
|
152
|
+
|
|
153
|
+
Where useful, distinguish:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
DOMAIN MODEL
|
|
157
|
+
ORM MODEL
|
|
158
|
+
PHYSICAL MODEL
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Change-focused learning
|
|
162
|
+
|
|
163
|
+
Prompt:
|
|
164
|
+
|
|
165
|
+
```text
|
|
166
|
+
/db-lab changes WI-24
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Use the accepted/delivered change set plus current database evidence. Explain relevant changes to:
|
|
170
|
+
|
|
171
|
+
- entities/tables and columns;
|
|
172
|
+
- primary/foreign/unique/check constraints;
|
|
173
|
+
- nullability and cascade behavior;
|
|
174
|
+
- indexes and access paths;
|
|
175
|
+
- ORM mappings and translation behavior;
|
|
176
|
+
- migrations/DDL and data-safety implications;
|
|
177
|
+
- query paths;
|
|
178
|
+
- transactions/concurrency.
|
|
179
|
+
|
|
180
|
+
A changed entity/migration/query file proves that database-related code was touched. It does **not** by itself prove that the physical database changed. Verify the physical layer when safe evidence is available.
|
|
181
|
+
|
|
182
|
+
A good learning summary connects the change to its consequence:
|
|
183
|
+
|
|
184
|
+
```text
|
|
185
|
+
added relationship
|
|
186
|
+
→ new FK/invariant
|
|
187
|
+
→ new join/access path
|
|
188
|
+
→ possible index consideration
|
|
189
|
+
→ migration/data compatibility question
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Entity Framework to raw SQL
|
|
193
|
+
|
|
194
|
+
For EF Core, connect:
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
LINQ / EF expression
|
|
198
|
+
→ translation preview such as ToQueryString() when appropriate
|
|
199
|
+
→ captured actual DbCommand when available
|
|
200
|
+
→ parameters
|
|
201
|
+
→ tables and relationships
|
|
202
|
+
→ provider query plan
|
|
203
|
+
→ indexes selected by the planner
|
|
204
|
+
→ result materialization/tracking
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Translation preview and an actually executed command are different evidence. Label them separately. Use supported logging/interception for executed-command evidence; the SQLite workbench consumes captured SQL and does not replace EF command capture.
|
|
208
|
+
|
|
209
|
+
Apply the same principle to other ORMs using framework-supported mechanisms.
|
|
210
|
+
|
|
211
|
+
## Query-to-ERD highlighting
|
|
212
|
+
|
|
213
|
+
For a query touching `MealPlans`, `MealPlanItems`, and `Recipes`, highlight those tables. If both ends of an FK relationship participate, emphasize the edge. Highlight resolvable qualified columns.
|
|
214
|
+
|
|
215
|
+
If `EXPLAIN QUERY PLAN` says an index was used, mark it **planner selected**. An index whose leading column appears relevant but was not selected can be shown as **candidate/relevant**, never as used.
|
|
216
|
+
|
|
217
|
+
If the interactive viewer is unavailable, use a temporary Mermaid/text diagram and clearly label the fallback.
|
|
218
|
+
|
|
219
|
+
## Query-plan debugging
|
|
220
|
+
|
|
221
|
+
Preferred learning sequence:
|
|
222
|
+
|
|
223
|
+
```text
|
|
224
|
+
show query/access pattern
|
|
225
|
+
→ developer predicts plan/index behavior
|
|
226
|
+
→ inspect provider-native plan
|
|
227
|
+
→ identify scan/search/join evidence
|
|
228
|
+
→ developer proposes a change
|
|
229
|
+
→ predict changed plan
|
|
230
|
+
→ compare safely when a sandbox is available
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Do not teach "add an index" without connecting it to a concrete access pattern, selectivity/order needs, write cost and plan evidence.
|
|
234
|
+
|
|
235
|
+
## Migration review
|
|
236
|
+
|
|
237
|
+
Prompt:
|
|
238
|
+
|
|
239
|
+
```text
|
|
240
|
+
/db-lab migration AddRecipeRatings
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Connect:
|
|
244
|
+
|
|
245
|
+
```text
|
|
246
|
+
migration intent
|
|
247
|
+
↔ migration/ORM operations
|
|
248
|
+
↔ generated SQL/DDL when available
|
|
249
|
+
↔ schema before
|
|
250
|
+
↔ schema after
|
|
251
|
+
↔ data-safety concerns
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Useful questions:
|
|
255
|
+
|
|
256
|
+
- Is existing data compatible with a new non-null column?
|
|
257
|
+
- Is a backfill required?
|
|
258
|
+
- Does a uniqueness constraint match the invariant?
|
|
259
|
+
- Is a table rebuild/destructive operation involved?
|
|
260
|
+
- What rollback limitations exist?
|
|
261
|
+
|
|
262
|
+
Do not apply the migration in Database Lab mode.
|
|
263
|
+
|
|
264
|
+
## Database-design interview
|
|
265
|
+
|
|
266
|
+
Prompt:
|
|
267
|
+
|
|
268
|
+
```text
|
|
269
|
+
/db-lab interview database
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Use the project domain for familiarity but perturb requirements so memorizing the schema does not solve the exercise.
|
|
273
|
+
|
|
274
|
+
Drive:
|
|
275
|
+
|
|
276
|
+
```text
|
|
277
|
+
requirements
|
|
278
|
+
→ entities
|
|
279
|
+
→ relationships/cardinality
|
|
280
|
+
→ keys/constraints
|
|
281
|
+
→ normalization
|
|
282
|
+
→ access patterns
|
|
283
|
+
→ indexes/plans
|
|
284
|
+
→ transactions/concurrency
|
|
285
|
+
→ evolution/scaling
|
|
286
|
+
→ design defense
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Ask why a junction table exists, why a key was chosen, what deletion means historically, which query justifies an index, which invariant belongs in a database constraint, and what changes under concurrent edits.
|
|
290
|
+
|
|
291
|
+
## Database competency model
|
|
292
|
+
|
|
293
|
+
```text
|
|
294
|
+
relational modeling
|
|
295
|
+
keys + integrity constraints
|
|
296
|
+
normalization + data anomalies
|
|
297
|
+
SQL query construction
|
|
298
|
+
indexes + access patterns
|
|
299
|
+
query plans + performance reasoning
|
|
300
|
+
transactions + concurrency
|
|
301
|
+
ORM translation + abstraction leaks
|
|
302
|
+
schema evolution + migrations
|
|
303
|
+
database debugging
|
|
304
|
+
design defense + interview communication
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
Use L1-L6 per competency rather than one undifferentiated SQL score.
|
|
308
|
+
|
|
309
|
+
## Cross-lab learning
|
|
310
|
+
|
|
311
|
+
System Lab owns system context; Database Lab owns database depth.
|
|
312
|
+
|
|
313
|
+
```text
|
|
314
|
+
/system-lab runtime checkout
|
|
315
|
+
→ identify Orders DB
|
|
316
|
+
→ /db-lab trace <order query>
|
|
317
|
+
|
|
318
|
+
/db-lab plan <query>
|
|
319
|
+
→ database evidence looks healthy but end-to-end latency is high
|
|
320
|
+
→ /system-lab performance checkout
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Delivery-completion visibility
|
|
324
|
+
|
|
325
|
+
Successful delivery may visibly recommend:
|
|
326
|
+
|
|
327
|
+
```text
|
|
328
|
+
★ /db-lab changes WI-24
|
|
329
|
+
This work changed database structure or behavior.
|
|
330
|
+
Explore affected relationships, queries, indexes, constraints, and ORM behavior.
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
When database-specific evidence was not materially touched, `/db-lab` may still appear as an available option:
|
|
334
|
+
|
|
335
|
+
```text
|
|
336
|
+
○ /db-lab
|
|
337
|
+
Explore the current database schema, relationships, queries, indexes, and ORM behavior.
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Do not tell the learner to rebuild or refresh a diagram. Current evidence is part of invoking the lab.
|
|
341
|
+
|
|
342
|
+
After successful merge/default-branch CI, `/deliver` may prepare a disposable SQLite workbench automatically only when the accepted change is DB-relevant, the tool exists, and a safe local development/test SQLite database path is already known. Never guess the path, create/apply migrations, mutate data, or touch Production just to prepare learning output. Failure remains non-blocking.
|
|
343
|
+
|
|
344
|
+
## Provider / ORM architecture
|
|
345
|
+
|
|
346
|
+
The workbench stays provider/ORM-adapter oriented rather than application-specific.
|
|
347
|
+
|
|
348
|
+
```text
|
|
349
|
+
Database adapter
|
|
350
|
+
SQLite concrete path
|
|
351
|
+
PostgreSQL / SQL Server / ... future
|
|
352
|
+
|
|
353
|
+
ORM evidence
|
|
354
|
+
EF Core first concrete path
|
|
355
|
+
Hibernate / SQLAlchemy / ... future
|
|
356
|
+
|
|
357
|
+
Canonical learning model
|
|
358
|
+
tables
|
|
359
|
+
columns
|
|
360
|
+
constraints
|
|
361
|
+
relationships
|
|
362
|
+
indexes
|
|
363
|
+
queries
|
|
364
|
+
query-plan steps
|
|
365
|
+
migrations
|
|
366
|
+
|
|
367
|
+
Interactive viewer
|
|
368
|
+
schema navigation
|
|
369
|
+
learning panels
|
|
370
|
+
query-to-ERD highlighting
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
SQLite + EF Core is a first concrete learning path, not a permanent architectural restriction.
|
|
374
|
+
|
|
375
|
+
## IDE tooling
|
|
376
|
+
|
|
377
|
+
Database extensions can improve the human exploration loop, but `/db-lab` must not depend on manipulating their UI.
|
|
378
|
+
|
|
379
|
+
For SQLite projects, Bootstrap may recommend SQLTools plus its SQLite driver so the developer can independently browse/query the same local database. The reusable lab obtains authoritative evidence from repository/framework/provider-supported mechanisms.
|
|
380
|
+
|
|
381
|
+
## Safety and fallbacks
|
|
382
|
+
|
|
383
|
+
Database Lab is read-only learning by default.
|
|
384
|
+
|
|
385
|
+
Do not:
|
|
386
|
+
|
|
387
|
+
- connect to Production for learning exercises;
|
|
388
|
+
- mutate application data;
|
|
389
|
+
- apply/revert migrations;
|
|
390
|
+
- create/drop indexes;
|
|
391
|
+
- change code to prove a point;
|
|
392
|
+
- claim an index was used without plan evidence;
|
|
393
|
+
- manufacture executed SQL when only ORM source is available.
|
|
394
|
+
|
|
395
|
+
The SQLite workbench opens the database with SQLite `mode=ro`. Generated HTML/JSON are disposable learning artifacts and should normally go to temp/cache rather than tracked project paths.
|
|
396
|
+
|
|
397
|
+
If evidence is missing, say so and continue with the strongest safe layer available. A missing database runtime, ORM trace, interactive viewer, or post-delivery artifact should degrade the experience; it should never block learning or engineering delivery.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Deployment Enablement
|
|
2
|
+
|
|
3
|
+
Deployment enablement is the guided operational lane between delivered deployment engineering and `/deploy`.
|
|
4
|
+
|
|
5
|
+
A **logical environment is not a physical computer**. A repository may define `demo`, `staging`, `production`, or other named environments; one developer may use only a workstation, several environments may share one VPS, or a desired deployment may remain explicitly deferred.
|
|
6
|
+
|
|
7
|
+
The normal human-facing entry point is state-driven:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
/deployment-readiness <environment>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Read-only overview:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
/deployment-readiness status [environment]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The workflow discovers current topology/state and continues from the furthest safe point. The human does not choose separate `discovery`, `enable`, or `resume` modes.
|
|
20
|
+
|
|
21
|
+
## Topology before machine questions
|
|
22
|
+
|
|
23
|
+
Resolve these independently when repository evidence provides them:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
environment name / role / purpose
|
|
27
|
+
placement
|
|
28
|
+
isolation
|
|
29
|
+
exposure
|
|
30
|
+
binding state
|
|
31
|
+
adapter
|
|
32
|
+
target/provider binding
|
|
33
|
+
failure domain
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Current placement classes include:
|
|
37
|
+
|
|
38
|
+
- `workstation` — local execution; current reusable container adapter is loopback-only;
|
|
39
|
+
- `remote-target` — an explicitly bound remote machine/target;
|
|
40
|
+
- `managed-service` — only when a provider-specific adapter actually exists;
|
|
41
|
+
- `deferred` — desired deployment exists but no current target/provider binding is selected.
|
|
42
|
+
|
|
43
|
+
Do not ask remote-machine questions until `remote-target` is actually the selected placement.
|
|
44
|
+
|
|
45
|
+
## Workstation readiness
|
|
46
|
+
|
|
47
|
+
A one-machine local/demo topology is normal.
|
|
48
|
+
|
|
49
|
+
For current `workstation-container` support, readiness focuses on:
|
|
50
|
+
|
|
51
|
+
- local Docker/runtime availability;
|
|
52
|
+
- repository-distributed local deployment tooling;
|
|
53
|
+
- exact immutable artifact/image identity;
|
|
54
|
+
- local port/container ownership and health configuration;
|
|
55
|
+
- persistence prerequisites where relevant;
|
|
56
|
+
- Production policy if the logical environment is Production.
|
|
57
|
+
|
|
58
|
+
It does not require SSH, a hostname, target profile, host trust, Caddy, Avahi, or a second computer.
|
|
59
|
+
|
|
60
|
+
The adapter's current exposure is loopback. Do not silently widen it to LAN/public sharing.
|
|
61
|
+
|
|
62
|
+
## Remote-target readiness
|
|
63
|
+
|
|
64
|
+
For remote placement, retain the strict target/access model:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
named environment
|
|
68
|
+
→ explicit target binding
|
|
69
|
+
→ current address/discovery
|
|
70
|
+
→ independently verified host identity
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Human-facing facts normally include hostname/IP, deployment user, non-default port, and target OS when relevant.
|
|
74
|
+
|
|
75
|
+
Internal target/profile/SSH/trust paths should be discovered, reused, or derived whenever possible rather than pushed onto the human as first questions.
|
|
76
|
+
|
|
77
|
+
If existing configuration is present, show known facts for confirmation. If partial, ask only for the smallest missing fact. If absent, start with the actual machine/address rather than an internal target identifier.
|
|
78
|
+
|
|
79
|
+
Remote probing requires explicit read-only authorization. Address discovery never substitutes for cryptographic host identity. Unknown/changed SSH identity fails closed.
|
|
80
|
+
|
|
81
|
+
## Deferred readiness
|
|
82
|
+
|
|
83
|
+
A deferred placement is intentional configuration state:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
DEPLOYMENT INTENTIONALLY DEFERRED
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
It must not block repository generation, local development, CI, documentation, or learning. Readiness should explain the next material decision—choose/configure a supported target/provider adapter—without guessing infrastructure or asking for secrets.
|
|
90
|
+
|
|
91
|
+
## Managed-service boundary
|
|
92
|
+
|
|
93
|
+
Managed hosting is adapter-specific. General model knowledge may recommend a provider, but absent a live catalog/implementation contract it remains `CATALOG GAP`/planned.
|
|
94
|
+
|
|
95
|
+
No provider credentials or provisioning should occur merely because a deployment outcome is public/shareable.
|
|
96
|
+
|
|
97
|
+
## Colocated environments
|
|
98
|
+
|
|
99
|
+
Two logical environments may intentionally share one physical failure domain.
|
|
100
|
+
|
|
101
|
+
Keep their targetable scope, runtime/container, route, data, readiness evidence, and authorization independent. When Staging and Production share one target, surface:
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
TOPOLOGY NOTE
|
|
105
|
+
|
|
106
|
+
Staging and Production are logically isolated but share one physical
|
|
107
|
+
failure domain. This may fit POC cost/learning goals, but it does not
|
|
108
|
+
demonstrate host-level Production isolation.
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Production backup/recovery/security/deploy/destructive gates remain stronger regardless of colocation.
|
|
112
|
+
|
|
113
|
+
## Readiness cadence
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
select environment
|
|
117
|
+
→ resolve topology
|
|
118
|
+
→ inspect placement-relevant local state
|
|
119
|
+
→ show/confirm known facts
|
|
120
|
+
→ authorize relevant read-only verification
|
|
121
|
+
→ repair only missing prerequisites under explicit write gates
|
|
122
|
+
→ ENVIRONMENT READY TO DEPLOY
|
|
123
|
+
→ /deploy <environment>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
For workstation placement there is no remote-access stage. For deferred placement the workflow intentionally stops before verification/provisioning.
|
|
127
|
+
|
|
128
|
+
## Readiness writes versus deployment writes
|
|
129
|
+
|
|
130
|
+
Readiness may perform bounded setup writes when separately authorized and supported by installed tooling, such as local configuration, SSH key/agent/trust setup, target-side access setup, runtime/platform preparation, data/backup directories, firewall preparation, or registry/provider credential configuration.
|
|
131
|
+
|
|
132
|
+
Readiness does **not** hide application deployment inside setup.
|
|
133
|
+
|
|
134
|
+
Application runtime deployment, release-specific migration, route/port publication, live health/readiness, smoke validation, and release-specific evidence belong to `/deploy` when the installed adapter defines them.
|
|
135
|
+
|
|
136
|
+
## Pre-deploy versus post-deploy evidence
|
|
137
|
+
|
|
138
|
+
Readiness proves only facts that can exist before deployment, such as:
|
|
139
|
+
|
|
140
|
+
- logical environment/topology selection;
|
|
141
|
+
- supported adapter availability;
|
|
142
|
+
- local Docker readiness or verified remote target/identity depending on placement;
|
|
143
|
+
- target OS/runtime when applicable;
|
|
144
|
+
- artifact identity/access;
|
|
145
|
+
- route/port ownership availability;
|
|
146
|
+
- persistence/backup/migration prerequisites;
|
|
147
|
+
- deployment lock/recovery capability;
|
|
148
|
+
- stronger Production prerequisites.
|
|
149
|
+
|
|
150
|
+
First-deploy live route, health, smoke, deployed-release identity, and release-specific rollback evidence are post-deploy facts owned by `/deploy`.
|
|
151
|
+
|
|
152
|
+
## Environment independence
|
|
153
|
+
|
|
154
|
+
Readiness of one logical environment never proves another environment ready—even if both share one physical target.
|
|
155
|
+
|
|
156
|
+
Failure of one environment never redirects to another environment, machine, provider, or wider exposure.
|
|
157
|
+
|
|
158
|
+
Production remains a logical role/policy with stronger gates, not a separate readiness command or a requirement for a dedicated physical computer.
|
|
159
|
+
|
|
160
|
+
Once ready:
|
|
161
|
+
|
|
162
|
+
```text
|
|
163
|
+
/deploy <environment>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
`/deploy` verifies current topology/target/artifact evidence, presents the exact installed-tool authorization gate, delegates deterministic mechanics, and verifies placement-relevant live evidence.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Guided Next Steps
|
|
2
|
+
|
|
3
|
+
Substantial Project Forge interactions should not end with a vague `Next:` sentence.
|
|
4
|
+
|
|
5
|
+
Use evidence-backed guidance:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
CURRENT STATE
|
|
9
|
+
<what is actually known>
|
|
10
|
+
|
|
11
|
+
RECOMMENDED NEXT STEP
|
|
12
|
+
<one action and why>
|
|
13
|
+
|
|
14
|
+
OPTIONS
|
|
15
|
+
1. ... [READ ONLY]
|
|
16
|
+
2. ... [MODIFIES DOCS]
|
|
17
|
+
3. ... [MODIFIES FILES]
|
|
18
|
+
4. ... [GIT + GITHUB WRITE]
|
|
19
|
+
5. Stop [NO ACTION]
|
|
20
|
+
|
|
21
|
+
RECOMMENDED PATH
|
|
22
|
+
<only when multiple future steps are useful>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Show only relevant options.
|
|
26
|
+
|
|
27
|
+
Standard action labels include:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
[READ ONLY]
|
|
31
|
+
[MODIFIES DOCS]
|
|
32
|
+
[MODIFIES FILES]
|
|
33
|
+
[REQUIREMENTS GATE]
|
|
34
|
+
[HUMAN ACCEPTANCE]
|
|
35
|
+
[GIT WRITE]
|
|
36
|
+
[GITHUB WRITE]
|
|
37
|
+
[GIT + GITHUB WRITE]
|
|
38
|
+
[REMOTE READ ONLY]
|
|
39
|
+
[REMOTE WRITE]
|
|
40
|
+
[PRODUCTION WRITE]
|
|
41
|
+
[NO ACTION]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
A selected option authorizes only the bounded action described, except where a skill explicitly defines a continuous session or compound mechanical action.
|
|
45
|
+
|
|
46
|
+
A manually invoked compound action skill may itself be the bounded authorization for its routine mechanics. `/deliver`, for example, may proceed through safe short-lived-branch setup/recovery, staging, commit, push, PR creation/update, and CI inspection without inserting separate options for each mechanical step. It still stops at its explicit merge/finalize gate and whenever evidence becomes ambiguous or unsafe.
|
|
47
|
+
|
|
48
|
+
Conversation may continue automatically; consequential decisions remain explicitly gated.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Human Gates
|
|
2
|
+
|
|
3
|
+
Use explicit human gates where consequences warrant them.
|
|
4
|
+
|
|
5
|
+
Typical gates:
|
|
6
|
+
- workspace/setup acceptance before the first substantive work item,
|
|
7
|
+
- material requirements/scope approval when detailed requirements matter,
|
|
8
|
+
- substantive implementation-plan approval for STANDARD/ELEVATED work,
|
|
9
|
+
- meaningful local implementation/diff acceptance,
|
|
10
|
+
- merge/final-delivery decision after PR CI when the PR still matches the accepted implementation,
|
|
11
|
+
- unrelated/out-of-band branch deletion when not already covered by a bounded delivery/cleanup choice,
|
|
12
|
+
- external/remote/system writes not already covered by an explicitly invoked bounded workflow,
|
|
13
|
+
- first production deployment,
|
|
14
|
+
- destructive recovery/restore,
|
|
15
|
+
- publishing a release/tag.
|
|
16
|
+
|
|
17
|
+
Workspace/setup acceptance is distinct from generation or installation. Generated files, installed tools, operational dependencies, editor/agent discovery, and human usability are separate facts. A setup script or static diagnostic may provide evidence, but only the human accepts the checkout as ready for the next intended work item.
|
|
18
|
+
|
|
19
|
+
A human gate is meaningful only when the human understands what is being approved. If the explanation immediately before a gate did not land, re-explain it before asking for approval again. `/wait-what` is the standard read-only communication-repair path when available; invoking it never implies approval of the pending action.
|
|
20
|
+
|
|
21
|
+
Do not gate routine mechanics individually after a bounded action is already authorized.
|
|
22
|
+
|
|
23
|
+
Missing access to GitHub admin policy metadata is not itself a human gate. Use configured workflow/check results, PR mergeability, repository documentation, and any observable enforced policy as evidence. Do not ask the human to open GitHub Settings and transcribe branch-protection/ruleset check names merely to continue; ask only when unavailable policy information creates a material unresolved decision at merge, release, or another consequential action.
|
|
24
|
+
|
|
25
|
+
## Implementation branch setup
|
|
26
|
+
|
|
27
|
+
Once implementation itself is authorized, creating/switching to the repository-appropriate short-lived work branch is routine setup, not a separate decision gate, when branch policy/naming and work-item scope are clear and the operation preserves the worktree without history rewriting.
|
|
28
|
+
|
|
29
|
+
For STANDARD/ELEVATED work, this branch setup follows plan approval. For LIGHT work, it is part of the human-selected implementation action.
|
|
30
|
+
|
|
31
|
+
Stop only when branch choice/state is ambiguous, unrelated work is present, or the operation would require stash/reset/rebase/force/history rewriting.
|
|
32
|
+
|
|
33
|
+
## Streamlined /deliver authorization
|
|
34
|
+
|
|
35
|
+
Because `/deliver` is manually invoked after implementation review and meaningful local acceptance, invoking it is one bounded authorization for routine delivery mechanics within that accepted scope:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
recover/create the short-lived branch when needed
|
|
39
|
+
→ selective stage
|
|
40
|
+
→ staged-diff verification
|
|
41
|
+
→ commit-message generation
|
|
42
|
+
→ commit
|
|
43
|
+
→ normal push
|
|
44
|
+
→ create/update PR
|
|
45
|
+
→ PR-body population
|
|
46
|
+
→ PR-CI inspection/rechecks
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Do not separately ask `Create branch?`, `Commit?`, `Push?`, `Create PR?`, or `Check CI?` when those actions remain safe and within scope.
|
|
50
|
+
|
|
51
|
+
`/deliver` invocation does **not** authorize merge, production deployment, force push, code fixes after CI failure, unrelated branch deletion, scope expansion, or destructive/history-rewriting Git operations.
|
|
52
|
+
|
|
53
|
+
## Combined final acceptance + merge gate
|
|
54
|
+
|
|
55
|
+
When the PR head/diff still exactly represents the implementation the human already accepted locally, Reviewer is READY, configured PR CI is green, any additional observable repository-required checks are satisfied, and repository policy/mergeability are satisfactory, final PR acceptance and merge authorization may be combined into one meaningful choice:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
Merge and finalize delivery [HUMAN ACCEPTANCE + GITHUB/GIT WRITE]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
That explicit choice covers only the observed PR and its normal short-lived delivered branch. It authorizes:
|
|
62
|
+
- final acceptance of the PR as observed,
|
|
63
|
+
- merge using the approved repository strategy,
|
|
64
|
+
- observation/recheck of applicable post-merge default-branch CI/policy,
|
|
65
|
+
- safe finalization of that delivered short-lived branch after that CI/policy evidence is satisfied.
|
|
66
|
+
|
|
67
|
+
It does not authorize deleting any other branch, bypassing changed evidence, or deploying to production.
|
|
68
|
+
|
|
69
|
+
If new commits, material diff changes, conflicts, or regressed checks appear after local acceptance, final PR review becomes a real gate again before merge.
|
|
70
|
+
|
|
71
|
+
If the repository/human explicitly requires branch retention, preserve the delivered branch. If safe cleanup cannot be proven, preserve it and report the exact reason rather than inserting another ceremonial prompt.
|
|
72
|
+
|
|
73
|
+
A later production deployment, unrelated branch cleanup, release publication, destructive recovery action, or newly changed implementation remains a separate explicit gate.
|
|
74
|
+
|
|
75
|
+
The principle is:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
conversation continues automatically
|
|
79
|
+
routine mechanics are grouped when safe
|
|
80
|
+
branch setup/finalization are automatic inside explicit bounded workflows
|
|
81
|
+
changed evidence re-opens the relevant review gate
|
|
82
|
+
consequential decisions remain human-controlled
|
|
83
|
+
```
|