@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.
Files changed (117) hide show
  1. package/README.md +134 -2
  2. package/assets/components.json +33 -0
  3. package/assets/core/distribution.json +66 -0
  4. package/assets/deployment/distribution.json +54 -0
  5. package/assets/generated/ASSEMBLY.json +557 -0
  6. package/assets/generated/core/core/agents/coach.agent.md +69 -0
  7. package/assets/generated/core/core/agents/reviewer.agent.md +85 -0
  8. package/assets/generated/core/core/instructions/project-forge-docs.instructions.md +45 -0
  9. package/assets/generated/core/core/instructions/project-forge-workflow.instructions.md +79 -0
  10. package/assets/generated/core/core/learning/CODING_DRILLS.md +35 -0
  11. package/assets/generated/core/core/learning/DIAGRAM_GUIDE.md +59 -0
  12. package/assets/generated/core/core/learning/ENGINEERING_LEARNING_WORKBOOK.md +108 -0
  13. package/assets/generated/core/core/learning/LEARNING_MAP.md +108 -0
  14. package/assets/generated/core/core/learning/LEARNING_PROGRESS.md +39 -0
  15. package/assets/generated/core/core/learning/RESOURCE_CATALOG.md +25 -0
  16. package/assets/generated/core/core/learning/SQL_DRILLS.md +90 -0
  17. package/assets/generated/core/core/learning/SYSTEM_DESIGN_DRILLS.md +301 -0
  18. package/assets/generated/core/core/process/COACHING_GUIDE.md +92 -0
  19. package/assets/generated/core/core/process/DATABASE_LEARNING_WORKBENCH.md +397 -0
  20. package/assets/generated/core/core/process/DEPLOYMENT_ENABLEMENT.md +166 -0
  21. package/assets/generated/core/core/process/GUIDED_NEXT_STEPS.md +48 -0
  22. package/assets/generated/core/core/process/HUMAN_GATES.md +83 -0
  23. package/assets/generated/core/core/process/INTERACTIVE_SESSION_GUIDE.md +64 -0
  24. package/assets/generated/core/core/process/PROJECT_DOCUMENTATION_FRAMEWORK.md +326 -0
  25. package/assets/generated/core/core/process/PROJECT_FORGE_ENGINEERING_GUIDE.md +308 -0
  26. package/assets/generated/core/core/process/PR_WORKFLOW.md +55 -0
  27. package/assets/generated/core/core/process/SETUP_ACCEPTANCE_CHECKLIST.md +72 -0
  28. package/assets/generated/core/core/process/SYSTEM_DESIGN_LEARNING_WORKBENCH.md +520 -0
  29. package/assets/generated/core/core/process/WORK_ITEM_MODEL.md +56 -0
  30. package/assets/generated/core/core/skills/cleanup-branches/SKILL.md +190 -0
  31. package/assets/generated/core/core/skills/coach/SKILL.md +174 -0
  32. package/assets/generated/core/core/skills/code-walkthrough/SKILL.md +197 -0
  33. package/assets/generated/core/core/skills/core-sync/SKILL.md +178 -0
  34. package/assets/generated/core/core/skills/db-lab/SKILL.md +245 -0
  35. package/assets/generated/core/core/skills/define-feature/SKILL.md +144 -0
  36. package/assets/generated/core/core/skills/deliver/SKILL.md +397 -0
  37. package/assets/generated/core/core/skills/deploy/SKILL.md +188 -0
  38. package/assets/generated/core/core/skills/deployment-readiness/SKILL.md +234 -0
  39. package/assets/generated/core/core/skills/developer-env-mode/SKILL.md +231 -0
  40. package/assets/generated/core/core/skills/docs/SKILL.md +116 -0
  41. package/assets/generated/core/core/skills/grill-me/SKILL.md +77 -0
  42. package/assets/generated/core/core/skills/grill-with-docs/SKILL.md +90 -0
  43. package/assets/generated/core/core/skills/learning-review/SKILL.md +90 -0
  44. package/assets/generated/core/core/skills/next-step/SKILL.md +221 -0
  45. package/assets/generated/core/core/skills/progress/SKILL.md +207 -0
  46. package/assets/generated/core/core/skills/project-forge-update/SKILL.md +228 -0
  47. package/assets/generated/core/core/skills/pull-latest/SKILL.md +166 -0
  48. package/assets/generated/core/core/skills/refine-requirements/SKILL.md +207 -0
  49. package/assets/generated/core/core/skills/setup/SKILL.md +362 -0
  50. package/assets/generated/core/core/skills/start-work/SKILL.md +190 -0
  51. package/assets/generated/core/core/skills/system-lab/SKILL.md +333 -0
  52. package/assets/generated/core/core/skills/tear-down/SKILL.md +140 -0
  53. package/assets/generated/core/core/skills/upstream-fix/SKILL.md +221 -0
  54. package/assets/generated/core/core/skills/wait-what/SKILL.md +86 -0
  55. package/assets/generated/core/core/templates/ADR_TEMPLATE.md +41 -0
  56. package/assets/generated/core/core/templates/FEATURE_BRIEF_TEMPLATE.md +27 -0
  57. package/assets/generated/core/core/templates/PRODUCT_BRIEF_TEMPLATE.md +27 -0
  58. package/assets/generated/core/core/templates/PULL_REQUEST_TEMPLATE.md +37 -0
  59. package/assets/generated/core/core/templates/REQUIREMENTS_TEMPLATE.md +17 -0
  60. package/assets/generated/core/profiles/greenfield/project-forge-workspace.json +12 -0
  61. package/assets/generated/core/tools/db_lab/sqlite_workbench.py +463 -0
  62. package/assets/generated/core/tools/docs_site/docs_site.py +512 -0
  63. package/assets/generated/core/tools/package/check_baseline.py +102 -0
  64. package/assets/generated/core/tools/package/check_upstream.py +171 -0
  65. package/assets/generated/core/tools/system_lab/system_workbench.py +243 -0
  66. package/assets/generated/deployment/distribution/project-forge-deploy.py +8 -0
  67. package/assets/generated/deployment/docs/DEVELOPER_ENVIRONMENTS.md +335 -0
  68. package/assets/generated/deployment/docs/ENVIRONMENT_PROOF.md +95 -0
  69. package/assets/generated/deployment/docs/WORKSPACE_INSTANCES.md +154 -0
  70. package/assets/generated/deployment/docs/images/developer-environment-journey.svg +56 -0
  71. package/assets/generated/deployment/docs/images/personal-environment-architecture.svg +54 -0
  72. package/assets/generated/deployment/docs/images/poc-environment-model.svg +61 -0
  73. package/assets/generated/deployment/src/project_forge_deployment/__init__.py +3 -0
  74. package/assets/generated/deployment/src/project_forge_deployment/__main__.py +3 -0
  75. package/assets/generated/deployment/src/project_forge_deployment/app_cli.py +163 -0
  76. package/assets/generated/deployment/src/project_forge_deployment/app_runtime.py +455 -0
  77. package/assets/generated/deployment/src/project_forge_deployment/app_runtime_remote.py +416 -0
  78. package/assets/generated/deployment/src/project_forge_deployment/app_runtime_workstation.py +136 -0
  79. package/assets/generated/deployment/src/project_forge_deployment/box_platform.py +208 -0
  80. package/assets/generated/deployment/src/project_forge_deployment/box_platform_assets.py +100 -0
  81. package/assets/generated/deployment/src/project_forge_deployment/box_platform_remote.py +271 -0
  82. package/assets/generated/deployment/src/project_forge_deployment/cli.py +437 -0
  83. package/assets/generated/deployment/src/project_forge_deployment/doctor.py +121 -0
  84. package/assets/generated/deployment/src/project_forge_deployment/entrypoint.py +37 -0
  85. package/assets/generated/deployment/src/project_forge_deployment/environment_cli.py +271 -0
  86. package/assets/generated/deployment/src/project_forge_deployment/environment_probe.py +228 -0
  87. package/assets/generated/deployment/src/project_forge_deployment/errors.py +5 -0
  88. package/assets/generated/deployment/src/project_forge_deployment/home_lab.py +328 -0
  89. package/assets/generated/deployment/src/project_forge_deployment/image_transfer.py +105 -0
  90. package/assets/generated/deployment/src/project_forge_deployment/keys.py +171 -0
  91. package/assets/generated/deployment/src/project_forge_deployment/local_cli.py +189 -0
  92. package/assets/generated/deployment/src/project_forge_deployment/local_runtime.py +526 -0
  93. package/assets/generated/deployment/src/project_forge_deployment/local_spec.py +82 -0
  94. package/assets/generated/deployment/src/project_forge_deployment/local_sqlite.py +205 -0
  95. package/assets/generated/deployment/src/project_forge_deployment/portable_profile.py +181 -0
  96. package/assets/generated/deployment/src/project_forge_deployment/profile_migration.py +70 -0
  97. package/assets/generated/deployment/src/project_forge_deployment/profile_repository.py +348 -0
  98. package/assets/generated/deployment/src/project_forge_deployment/profiles.py +204 -0
  99. package/assets/generated/deployment/src/project_forge_deployment/registry_access.py +114 -0
  100. package/assets/generated/deployment/src/project_forge_deployment/registry_cli.py +51 -0
  101. package/assets/generated/deployment/src/project_forge_deployment/route_registry.py +367 -0
  102. package/assets/generated/deployment/src/project_forge_deployment/route_registry_remote.py +443 -0
  103. package/assets/generated/deployment/src/project_forge_deployment/security.py +290 -0
  104. package/assets/generated/deployment/src/project_forge_deployment/sqlite_adapter.py +335 -0
  105. package/assets/generated/deployment/src/project_forge_deployment/sqlite_adapter_remote.py +340 -0
  106. package/assets/generated/deployment/src/project_forge_deployment/sqlite_cli.py +86 -0
  107. package/assets/generated/deployment/src/project_forge_deployment/sqlite_import_recovery.py +437 -0
  108. package/assets/generated/deployment/src/project_forge_deployment/ssh.py +119 -0
  109. package/assets/generated/deployment/src/project_forge_deployment/teardown.py +300 -0
  110. package/assets/generated/deployment/src/project_forge_deployment/teardown_cli.py +139 -0
  111. package/assets/generated/deployment/src/project_forge_deployment/teardown_remote.py +100 -0
  112. package/assets/generated/deployment/src/project_forge_deployment/trust.py +278 -0
  113. package/bin/project-forge.mjs +9 -0
  114. package/package.json +31 -4
  115. package/src/cli.mjs +150 -0
  116. package/src/engine.mjs +243 -0
  117. package/src/package-data.mjs +18 -0
@@ -0,0 +1,362 @@
1
+ ---
2
+ name: setup
3
+ description: "Guide and execute setup for this workstation/workspace instance, including optional named deployment-environment onboarding and disposable deployment-path proof."
4
+ argument-hint: "[status|repair|local|remote|<environment>]"
5
+ user-invocable: true
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # Setup
10
+
11
+ Purpose: give the developer one obvious entry point after cloning/opening a Project Forge workspace, whether this is the first workstation for the project or an additional independent workstation for an existing POC.
12
+
13
+ Normal first use is simply:
14
+
15
+ ```text
16
+ /setup
17
+ ```
18
+
19
+ The skill is the conversational/orchestration layer. Repository-local setup scripts and Deployment Kit commands remain the deterministic machine implementations. Do not duplicate installer, SSH, Docker, deployment, or profile mechanics in the skill when the repository already provides them.
20
+
21
+ ## 1. Resolve this workspace instance
22
+
23
+ From the repository root inspect only what is needed:
24
+
25
+ - `DEV_ENVIRONMENT.json`;
26
+ - `DEPLOYMENT_TOPOLOGY.json` when present;
27
+ - `PROJECT_BOOTSTRAP.json` as generation/provenance and initial topology fallback;
28
+ - `SCAFFOLD_PLAN.json` when present;
29
+ - `.github/project-forge-workspace.json` and Project Forge/component baselines when present;
30
+ - `scripts/setup.ps1` on Windows or `scripts/setup.sh` on macOS;
31
+ - current Git branch/status/upstream evidence so setup does not overwrite unrelated work;
32
+ - workstation-local developer-environment evidence when present;
33
+ - the actual workstation OS/platform and machine-local identity needed to describe this workspace instance.
34
+
35
+ If package-managed Project Forge files are drifted, route that problem to `/project-forge-update`; do not silently replace managed files during setup.
36
+
37
+ A **workspace instance** is one checkout of one Project Forge project on one developer workstation. Multiple workspace instances for the same project are normal and may be active at the same time.
38
+
39
+ When project provenance/configuration exists but this computer has no local readiness evidence for the checkout, treat the situation as:
40
+
41
+ ```text
42
+ EXISTING PROJECT — NEW WORKSTATION
43
+ ```
44
+
45
+ Do not require another workstation to be online and do not treat another computer as the project's primary machine.
46
+
47
+ Detect the current OS automatically. Do not ask the developer which setup launcher to use when the platform can be observed. Prefer a compact preflight such as:
48
+
49
+ ```text
50
+ EXISTING PROJECT — NEW WORKSTATION
51
+
52
+ Project ............ <project>
53
+ Platform ........... Windows / macOS
54
+ Setup launcher ..... <detected launcher>
55
+ Personal profile ... FOUND / NOT CONFIGURED / DEFERRED
56
+ Local setup ........ READY / NOT CONFIGURED / BLOCKED
57
+ ```
58
+
59
+ A workspace instance owns machine-local state such as local runtime/data, SSH private keys/trust, credential-manager entries, Docker state, and repository-scoped developer-mode evidence. Those values are not synchronized from another workstation.
60
+
61
+ Git/GitHub is the shared source-code coordination boundary. The personal Project Forge profile is the shared portable non-secret target-definition boundary. Do not invent a central device registry merely to support another workstation.
62
+
63
+ ## 2. Run the generated local setup for the observed OS
64
+
65
+ Select the launcher for the actual workstation OS:
66
+
67
+ ```text
68
+ Windows -> .\scripts\setup.ps1
69
+ macOS -> ./scripts/setup.sh
70
+ ```
71
+
72
+ Do not ask the developer to choose an OS launcher when the OS can be observed.
73
+
74
+ For normal setup, run the launcher with repository restore enabled when supported:
75
+
76
+ ```text
77
+ setup --restore
78
+ ```
79
+
80
+ For `status`, use the script's read-only check mode when supported:
81
+
82
+ ```text
83
+ setup --check
84
+ ```
85
+
86
+ A manually invoked `/setup` authorizes routine, bounded, non-destructive local setup that the generated script already owns: supported tool installation, VS Code extension installation, dependency restore, personal Project Forge profile initialization, and other declared workstation preparation. Do not add another confirmation merely to start those routine actions.
87
+
88
+ Stop before destructive replacement, unrelated machine mutation, secret disclosure, or repair outside the declared setup contract.
89
+
90
+ ## 3. Reach local workspace readiness first
91
+
92
+ The first success target is:
93
+
94
+ ```text
95
+ LOCAL WORKSPACE READY
96
+ ```
97
+
98
+ Remote environments must not block initial local setup unless the approved project explicitly requires a remote dependency for local development.
99
+
100
+ After the generated setup script passes:
101
+
102
+ - if application source/runtime already exists, use `/developer-env-mode local` to converge and verify local persistence/build/tests/container/health as applicable;
103
+ - if `SCAFFOLD_PLAN.json` or the approved work-item plan intentionally defers application scaffolding, report local **workspace** readiness without inventing application runtime work;
104
+ - if Docker or another runtime is not required by the current project state, mark it `NOT APPLICABLE`, not failed.
105
+
106
+ Each workstation normally owns independent local development data. Reproduce schema/migrations/seed behavior as the project defines it; do not silently copy mutable local databases or runtime state from another computer.
107
+
108
+ ## 4. Establish/sync the developer's personal Project Forge profile
109
+
110
+ When the installed Deployment Kit exposes personal-profile operations, `/setup` should establish the authenticated developer's portable non-secret profile as routine setup state. This repo is per developer, not per POC or workstation.
111
+
112
+ First inspect profile status and authenticated GitHub login. If the expected private repository is missing, tell the developer what will happen before writing:
113
+
114
+ ```text
115
+ Project Forge will create a private GitHub repository for your portable environment definitions:
116
+
117
+ <login>/project-forge-profile
118
+
119
+ It stores only non-secret target definitions and preferences. SSH private keys,
120
+ passwords, PATs, known-host contents, and machine-local state stay on this computer.
121
+ ```
122
+
123
+ Then invoke the repository-provided deterministic operation within the already-authorized `/setup` action:
124
+
125
+ ```text
126
+ python tools/project-forge-deployment/project-forge-deploy.py environment profile ensure --yes
127
+ ```
128
+
129
+ If the repo already exists and is verified private, reuse it. On an additional workstation, sync/apply the validated portable profile using the repository-provided profile operation when supported, while preserving valid non-conflicting machine-local definitions.
130
+
131
+ Never import another workstation's private key, known-host contents, PAT, password, local database, Docker credential state, or readiness claim.
132
+
133
+ If automatic profile creation cannot proceed, use the explicit Bootstrap-like fallback: ask the developer to create the exact private `<login>/project-forge-profile`, reply `created`, then re-verify owner/name/privacy before deterministic initialization. Never ask the developer to paste credentials into chat.
134
+
135
+ If GitHub is temporarily unavailable, otherwise-ready local development remains valid. Report profile portability as `DEFERRED`.
136
+
137
+ ## 5. Present a guided environment setup selection
138
+
139
+ After local readiness/profile state is understood, show the environments that this workstation can be prepared to use.
140
+
141
+ Prefer a multi-select/checkbox-style interaction when the surface supports it. The conceptual shape is:
142
+
143
+ ```text
144
+ SET UP THIS WORKSTATION FOR
145
+
146
+ [x] Local development — recommended
147
+ [ ] Staging
148
+ [ ] Production
149
+ [ ] <other project-defined environment, e.g. Demo>
150
+ [ ] Other / define another environment
151
+ ```
152
+
153
+ Rules:
154
+
155
+ - Local development is the recommended/default initial selection.
156
+ - Existing named environments come from the project's current deployment topology, not a hard-coded Staging/Production list.
157
+ - Show each environment's purpose/role compactly when the name alone is ambiguous.
158
+ - Free-form selection remains valid when checkbox UI is unavailable.
159
+ - Selecting an environment means **prepare this workstation for that environment**; it does not deploy the project's real application.
160
+ - Do not force the developer to configure every environment in one session. `/setup` can be rerun later to add another capability.
161
+
162
+ ### Topology source of truth
163
+
164
+ Prefer project-owned mutable deployment topology:
165
+
166
+ ```text
167
+ DEPLOYMENT_TOPOLOGY.json
168
+ ```
169
+
170
+ Use `PROJECT_BOOTSTRAP.json` deployment topology only as the initial topology fallback.
171
+
172
+ `PROJECT_BOOTSTRAP.json` is generation/provenance evidence and should not be casually rewritten merely because a developer adds an environment later.
173
+
174
+ If an older POC has no `DEPLOYMENT_TOPOLOGY.json` and the developer chooses to add/change a logical environment, first materialize the currently approved deployment topology into the project-owned file, then make the scoped project configuration change there. Preserve the original Bootstrap provenance file.
175
+
176
+ A topology entry should keep logical identity distinct from purpose and placement. A name such as `demo`, `qa`, or `prod-east` is the command-facing environment identity. Its purpose remains one of the project-supported semantic roles such as development/demo/staging/production.
177
+
178
+ ### Other / define another environment
179
+
180
+ When the developer chooses **Other**, guide only the material choices needed to create a durable environment definition, normally:
181
+
182
+ ```text
183
+ Name ............ demo
184
+ Purpose ......... demo / staging / production / development
185
+ Placement ....... workstation / remote-target / managed-service / deferred
186
+ Target .......... <when placement requires one>
187
+ Isolation ....... <project/catalog-supported option>
188
+ Exposure ........ <project/catalog-supported option>
189
+ ```
190
+
191
+ Provide recommended choices from the existing project topology/catalog and always allow `Other / specify` or `Not sure — recommend one` where appropriate.
192
+
193
+ Persist the approved logical environment definition before claiming it is configured. Normalize the command-facing name to the repository-supported safe slug form. Once saved, all normal environment commands use that exact name, for example:
194
+
195
+ ```text
196
+ /deployment-readiness demo
197
+ /deploy demo
198
+ /tear-down demo
199
+ ```
200
+
201
+ Do not create an environment whose required placement/adapter is unsupported; report the concrete `CATALOG GAP` or deferred state instead.
202
+
203
+ ## 6. Prepare selected remote environments
204
+
205
+ For each selected non-local environment, reuse the project's topology plus the developer's portable target/profile definition and establish this workstation's machine-specific capability as far as supported:
206
+
207
+ ```text
208
+ logical environment
209
+ → target/profile definition
210
+ → this-workstation SSH identity/trust when applicable
211
+ → target access
212
+ → host/platform prerequisites/readiness
213
+ → deployment-path proof when supported
214
+ ```
215
+
216
+ Never copy SSH private keys/trust from another workstation. Another workstation's successful readiness is useful project context, not proof that this workstation can deploy.
217
+
218
+ If host prerequisites cannot yet be prepared automatically, report the exact preparation gap instead of weakening `sudo`, trust, or credential boundaries.
219
+
220
+ ## 7. Prove the deployment path with a disposable Project Forge probe
221
+
222
+ When the installed Deployment Kit exposes environment proof operations, a selected remote environment should normally be taken through an end-to-end **environment proof deployment** during setup.
223
+
224
+ The proof is not the POC application. It is a tiny disposable Project Forge-owned probe that should:
225
+
226
+ ```text
227
+ acquire a small stable probe image on this workstation
228
+ → resolve its exact immutable digest
229
+ → transfer that exact image using the real workstation-mediated path
230
+ → deploy under a reserved probe identity
231
+ → verify runtime/HTTP health
232
+ → remove the probe
233
+ → verify cleanup
234
+ ```
235
+
236
+ For the current standard Deployment Kit, use the repository-distributed command when available, conceptually:
237
+
238
+ ```text
239
+ python tools/project-forge-deployment/project-forge-deploy.py environment proof plan \
240
+ <target> --owner-repo <owner/repo> --environment <name>
241
+
242
+ python tools/project-forge-deployment/project-forge-deploy.py environment proof run \
243
+ <target> --owner-repo <owner/repo> --environment <name> --yes
244
+ ```
245
+
246
+ Use the actual installed command/help contract rather than blindly copying examples.
247
+
248
+ A successful proof demonstrates this workstation can use the real image-transfer/application-runtime/health path. It must not create project data or claim the project's application has been deployed.
249
+
250
+ Preferred state after proof:
251
+
252
+ ```text
253
+ Environment ........... demo
254
+ Target/access ......... READY
255
+ Host platform ......... READY
256
+ Deployment path ....... PROVEN
257
+ Project application ... NOT YET DEPLOYED
258
+ ```
259
+
260
+ If cleanup fails, report `PROOF PASSED — CLEANUP ACTION NEEDED`; do not claim a clean setup.
261
+
262
+ ### Authorization during setup
263
+
264
+ For a selected **non-Production** environment, the developer's explicit `/setup` selection plus a clear preview of the disposable proof may cover the bounded proof write. Use the deterministic tool's exact authorization contract and do not add multiple ceremonial prompts.
265
+
266
+ For any environment whose resolved purpose is **production**, keep one explicit consequential gate before the proof writes to it:
267
+
268
+ ```text
269
+ PRODUCTION ENVIRONMENT PROOF
270
+
271
+ Project Forge is ready to temporarily deploy a disposable environment probe to <name>,
272
+ verify it, and remove it. No project application or project data will be deployed.
273
+
274
+ 1. Run Production environment proof
275
+ 2. Verify access/readiness only
276
+ 3. Skip this environment for now
277
+ ```
278
+
279
+ A custom Production name such as `prod-east` remains Production because of its resolved purpose/classification. Never downgrade Production safety based on the literal environment string.
280
+
281
+ ## 8. First real application deployment remains streamlined
282
+
283
+ Environment proof should intentionally answer environment/mechanics questions once. Later, the first `/deploy <environment>` with real application code should ask only application-specific questions that are still unresolved, such as exact health contract, persistence, exposure/route, or immutable application artifact policy.
284
+
285
+ Do not repeat already-proven target/access/transport setup unless evidence changed.
286
+
287
+ Environment proof never authorizes a later real application deployment, and Production proof never authorizes Production application deployment.
288
+
289
+ ## 9. Human workspace acceptance remains meaningful
290
+
291
+ Machine success is evidence, not human acceptance.
292
+
293
+ When selected setup work passes, report what is ready and hand off to `/next-step` for remaining human editor/workspace acceptance and work-item navigation.
294
+
295
+ Preferred completion shape:
296
+
297
+ ```text
298
+ SETUP COMPLETE
299
+
300
+ Workspace instance .... <machine/platform or local friendly name>
301
+ Workstation tools ...... READY
302
+ Personal profile ....... READY / DEFERRED
303
+ Project dependencies ... READY / DEFERRED
304
+ Local runtime .......... READY / DEFERRED / NOT APPLICABLE
305
+ Workspace checks ....... READY
306
+
307
+ ENVIRONMENT CAPABILITIES
308
+ Local .................. READY
309
+ Demo ................... PROVEN / READY / NOT CONFIGURED
310
+ Staging ................ PROVEN / READY / NOT CONFIGURED
311
+ Production ............. PROVEN / ACCESS READY / NOT CONFIGURED
312
+
313
+ Next:
314
+ /next-step
315
+ ```
316
+
317
+ Do not silently mark editor/agent discovery accepted on the developer's behalf.
318
+
319
+ ## 10. Concurrent workspace rules
320
+
321
+ Multiple workstations may work on the same project concurrently.
322
+
323
+ Prefer independent short-lived branches for independent workstreams. If this checkout uses a branch another workspace may also update, inspect upstream/remote divergence before branch-changing, delivery, or history-sensitive actions. A remote branch advancing from another workstation is normal evidence, not corruption.
324
+
325
+ Stop before force/reset/rebase or silent loss of local work; route reconciliation through the normal Git/work-item flow.
326
+
327
+ `/setup` itself does not commit, push, merge, switch work-item branches, copy worktree changes between computers, or use stash as cross-workstation storage.
328
+
329
+ Shared remote environment mutations remain protected by the Deployment Kit's environment/application locking and readiness contracts.
330
+
331
+ ## 11. `status`, `repair`, local, remote, and named-environment options
332
+
333
+ `/setup status` is read-only. Report current setup/readiness for **this workspace instance** and all project-defined environments without mutating them.
334
+
335
+ `/setup repair` repairs only missing/safely reproducible state. Preserve valid tools, keys, trust, databases, Docker state, and project files.
336
+
337
+ `/setup local` targets local workstation convergence.
338
+
339
+ `/setup remote` presents the guided named-environment selector rather than assuming only Staging/Production.
340
+
341
+ `/setup <environment>` may directly select one existing project-defined environment (for example `/setup demo`) and run the same readiness/proof flow. It must resolve the name from project topology and never invent or silently fall back to another environment.
342
+
343
+ When the installed Deployment Kit exposes profile migration and this workstation already has valid target definitions but no personal profile model, prefer the deterministic migration command. Migration may publish only sanitized target definitions and preserve existing keys/trust; it must not deploy applications or delete old credentials automatically.
344
+
345
+ ## 12. Credential boundary
346
+
347
+ Never ask the developer to paste passwords, PATs, private SSH keys, or other credentials into chat.
348
+
349
+ When a repository/tool needs a credential, direct the deterministic local tool to prompt in the local terminal using a hidden/secure prompt. Secrets remain workstation-local and must not be committed to the POC repository or portable profile.
350
+
351
+ ## 13. Relationship to other Project Forge commands
352
+
353
+ - `/setup` — prepare this workstation/workspace instance and selected named environment capabilities.
354
+ - `/progress` — read-only lifecycle/workspace/environment status.
355
+ - `/next-step` — one sensible next action after current evidence is known.
356
+ - `/developer-env-mode` — direct/advanced local-vs-remote operational readiness command.
357
+ - `/start-work <ID>` — implementation authorization after workspace acceptance.
358
+ - `/deployment-readiness <environment>` — readiness for any exact project-defined environment.
359
+ - `/deploy <environment>` — deploy the real application to any exact project-defined environment, with Production classification preserved.
360
+ - `/tear-down <environment>` — destructively clean only the exact named environment after its own authorization gates.
361
+
362
+ Keep setup focused: one front door, automatic OS detection, project-defined environment names, deterministic tooling underneath, disposable proof where supported, and stronger Production gates only where they materially matter.
@@ -0,0 +1,190 @@
1
+ ---
2
+ name: start-work
3
+ description: Assess requirement readiness and implementation risk, then guide direct Agent work or native planning for the configured work item.
4
+ argument-hint: "<work-item ID, external key, or concise change>"
5
+ user-invocable: true
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # Start Work
10
+
11
+ ## 1. Resolve the requested work
12
+
13
+ Read `.github/project-forge-workspace.json` when present.
14
+
15
+ Resolve only the context needed:
16
+ - authoritative work-item source,
17
+ - parent/grouping context when actually available,
18
+ - optional Product/Feature/Enabler briefs according to configured authority,
19
+ - local detailed requirements when permitted/present,
20
+ - relevant decisions/ADRs/architecture/standards,
21
+ - current code/tests and branch/diff when relevant.
22
+
23
+ Do not require local briefs when the repository uses Jira/Issues. Do not invent external content.
24
+
25
+ ## 2. Check requirement readiness before planning
26
+
27
+ Assess:
28
+ - outcome clarity,
29
+ - acceptance criteria/validation expectations,
30
+ - material domain/engineering rules,
31
+ - dependencies/cross-work-item context,
32
+ - unresolved human decisions,
33
+ - requirement authority/status.
34
+
35
+ Ask:
36
+
37
+ ```text
38
+ Does detailed precision matter?
39
+ Does the authoritative source contain enough detail?
40
+ If local requirements exist, are they DRAFT or APPROVED?
41
+ Are material decisions unresolved?
42
+ ```
43
+
44
+ If detailed precision is warranted but incomplete, recommend `/refine-requirements`, `/grill-me`, or `/grill-with-docs` rather than silently inventing behavior.
45
+
46
+ If local requirements are DRAFT and carry material behavior, human approval is the gate before substantive planning/implementation.
47
+
48
+ If requirements are already sufficient/approved under the configured model, do not force another refinement cycle.
49
+
50
+ ### CI/policy evidence is not a start-work gate
51
+
52
+ When requirements say CI/checks must pass before a later merge, release, or deployment action, use repository-configured workflows/checks plus observable repository policy/mergeability as the planning evidence available now.
53
+
54
+ Do not interpret words such as `required CI` or `required checks` as a mandate to discover GitHub branch-protection/ruleset admin settings before implementation can begin. Those settings may provide additional evidence later when they are observable, but inability to read them is not by itself a blocker.
55
+
56
+ Do not ask the human to open GitHub Settings and transcribe required-check names merely to proceed with `/start-work`. Stop and ask only when actual evidence conflicts or missing policy information creates a concrete unresolved decision that materially affects implementation or the later consequential action.
57
+
58
+ ## 3. Classify risk
59
+
60
+ ### LIGHT
61
+
62
+ Tiny, obvious, low-risk; no meaningful schema/security/concurrency/deployment/major-UX implications.
63
+
64
+ ```text
65
+ Agent
66
+ → relevant checks
67
+ → human meaningful-diff review
68
+ ```
69
+
70
+ No formal plan or detailed requirements are required.
71
+
72
+ ### STANDARD
73
+
74
+ Meaningful multi-file work.
75
+
76
+ ```text
77
+ requirements ready as needed
78
+ → native plan
79
+ → HUMAN PLAN APPROVAL
80
+ → short-lived work branch setup
81
+ → Agent implementation
82
+ → checks
83
+ → Reviewer
84
+ → human meaningful-diff acceptance
85
+ ```
86
+
87
+ ### ELEVATED
88
+
89
+ Use for:
90
+ - schema/data-loss risk,
91
+ - authentication/security,
92
+ - concurrency/transactions,
93
+ - release/deployment/recovery,
94
+ - significant architecture,
95
+ - broad cross-layer changes,
96
+ - hard-to-reverse decisions.
97
+
98
+ ```text
99
+ detailed approved requirements / ADR as needed
100
+ → native plan
101
+ → Reviewer challenges plan
102
+ → HUMAN PLAN APPROVAL
103
+ → short-lived work branch setup
104
+ → implementation in small slices
105
+ → stronger verification
106
+ → Reviewer
107
+ → human acceptance
108
+ ```
109
+
110
+ Explain why the level was chosen.
111
+
112
+ ## 4. Optional learning checkpoint
113
+
114
+ For STANDARD/ELEVATED work, once requirements are ready, coaching may be offered but is never required:
115
+
116
+ ```text
117
+ 1. Continue without coaching — recommended default
118
+ 2. /coach for a short pre-build concept review
119
+ 3. /grill-me for challenge rather than teaching
120
+ 4. Stop
121
+ ```
122
+
123
+ For LIGHT work, do not interrupt with coaching unless requested.
124
+
125
+ ## 5. Planning rules
126
+
127
+ For STANDARD/ELEVATED work:
128
+ - use the editor's current native planning capability,
129
+ - plan approach, affected areas, key decisions, risks, and verification,
130
+ - require human plan approval before implementation,
131
+ - do not auto-launch subagents,
132
+ - do not create mandatory `spec.md` or `tasks.md`,
133
+ - save a durable plan only when it is useful across sessions or for genuinely complex/risky work.
134
+
135
+ ## 6. Working branch setup
136
+
137
+ Once implementation is authorized to begin, establish the repository-appropriate short-lived work branch as routine setup before substantive edits.
138
+
139
+ Do not ask a separate branch-creation permission when all of the following are true:
140
+ - the current branch is the default/integration branch and repository policy expects short-lived work branches,
141
+ - the work-item boundary is clear,
142
+ - the target branch name is unambiguous under repository convention or the Project Forge fallback below,
143
+ - creating/switching branches does not require history rewriting or discarding work.
144
+
145
+ Branch naming order:
146
+ 1. repository/team convention when defined,
147
+ 2. an already-existing branch clearly tied to the work item,
148
+ 3. Project Forge fallback: `<lowercase-work-item-id>-<concise-slug>` for ID-backed work, or `work/<concise-slug>` for a concise ad hoc change.
149
+
150
+ Examples of the fallback shape are conceptual only; never invent a consumer-specific work-item ID in Core documentation or behavior.
151
+
152
+ If scoped uncommitted changes already exist on the default branch and clearly belong to this work item, preserve them while creating/switching to the short-lived branch when Git can do so safely. Verify that the worktree diff is unchanged after the branch switch.
153
+
154
+ Stop and ask only when branch policy/naming is materially ambiguous, the intended branch already exists with divergent work, unrelated changes are present, or the operation would require stash/reset/rebase/force/history rewriting.
155
+
156
+ For LIGHT work, branch setup is part of the human-selected implementation action. For STANDARD/ELEVATED work, it is part of the approved implementation start after plan approval. Merely inspecting `/start-work` does not authorize implementation before its required gate.
157
+
158
+ ## 7. Deployment enabler
159
+
160
+ When a work item owns release/deployment engineering or environment enablement, classify it ELEVATED when the change materially affects deployment/recovery/security behavior.
161
+
162
+ Environment readiness may begin early with the normal state-driven interface:
163
+
164
+ ```text
165
+ /deployment-readiness <environment>
166
+ ```
167
+
168
+ It begins with existing local/repository configuration, shows simple known machine facts for confirmation, and continues only as far as current engineering/evidence safely allows. It does not authorize application deployment.
169
+
170
+ After implementation review/local acceptance, use `/deliver`. After `/deliver` reports the merge, default-branch CI, and applicable repository-policy evidence satisfied, return to the same state-driven readiness command for the selected environment:
171
+
172
+ ```text
173
+ /deployment-readiness <environment>
174
+ ```
175
+
176
+ The workflow re-discovers state and continues from the furthest safe point; do not require the human to switch from a discovery mode to an enable mode.
177
+
178
+ Production remains a role with stronger policy and deployment authorization; it does not use a separate readiness workflow.
179
+
180
+ ## 8. Guided ending
181
+
182
+ Return:
183
+ - CURRENT STATE,
184
+ - risk level and why,
185
+ - requirement readiness,
186
+ - branch state / expected short-lived branch when implementation is about to begin,
187
+ - RECOMMENDED NEXT STEP,
188
+ - a small numbered OPTIONS menu with action labels.
189
+
190
+ Do not skip an unresolved requirement/plan gate merely because implementation is technically possible. Once implementation is selected/approved, do not insert a separate ceremonial branch-creation gate when the branch setup is safe and deterministic.