@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
|
+
---
|
|
2
|
+
name: deliver
|
|
3
|
+
description: "Streamlined delivery after implementation review/approval: short-lived branch recovery/setup, selective commit/push/PR/CI mechanics, one explicit merge/finalize gate, post-merge CI, safe delivered-branch cleanup, and optional non-blocking learning handoff."
|
|
4
|
+
argument-hint: "[optional work-item ID or external key]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Deliver
|
|
10
|
+
|
|
11
|
+
`/deliver` is the clear handoff after:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
implementation complete
|
|
15
|
+
→ relevant local checks satisfactory
|
|
16
|
+
→ Reviewer READY
|
|
17
|
+
→ human meaningful-diff approval
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Existing repository conventions outrank Project Forge defaults. Preserve branch rules, PR template, CI, merge strategy, required reviews, long-lived branch policy, and other repository policy.
|
|
21
|
+
|
|
22
|
+
## 1. Authorization model
|
|
23
|
+
|
|
24
|
+
Because `/deliver` is manually invoked, invoking it is one bounded authorization for the routine delivery mechanics of the already-reviewed/accepted work item:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
establish/recover the short-lived work branch when needed
|
|
28
|
+
→ selective stage
|
|
29
|
+
→ verify staged diff
|
|
30
|
+
→ generate repository-appropriate commit message
|
|
31
|
+
→ commit
|
|
32
|
+
→ normal push
|
|
33
|
+
→ create/update PR
|
|
34
|
+
→ populate PR body from observed evidence
|
|
35
|
+
→ inspect/recheck PR CI
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Do **not** ask separate `Create branch?`, `Stage?`, `Commit?`, `Push?`, `Create PR?`, `Mark ready?`, or `Check CI?` questions when those actions are safe, deterministic, and within the current delivery scope.
|
|
39
|
+
|
|
40
|
+
Invocation does **not** authorize merge, production deployment, force push, unrelated branch deletion, scope expansion, code fixes, or destructive/history-rewriting Git operations.
|
|
41
|
+
|
|
42
|
+
## 2. Phases
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
A. RESUME / PREFLIGHT
|
|
46
|
+
B. ROUTINE PR PREPARATION — automatic within /deliver authorization
|
|
47
|
+
C. PR CI — automatic read/recheck within practical limits
|
|
48
|
+
D. MERGE + FINALIZE DECISION — one human gate
|
|
49
|
+
E. POST-MERGE DEFAULT-BRANCH CI — automatic observation
|
|
50
|
+
F. DELIVERED-BRANCH FINALIZATION — automatic when authorized and safe
|
|
51
|
+
G. DELIVERY COMPLETE
|
|
52
|
+
H. OPTIONAL LEARNING HANDOFF — visible, read-only/non-blocking
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Phase H never changes whether engineering delivery is complete.
|
|
56
|
+
|
|
57
|
+
## 3. Resume-aware initial inspection
|
|
58
|
+
|
|
59
|
+
Inspect only what is needed to determine the furthest safe delivery state, such as:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
git branch --show-current
|
|
63
|
+
git status --short --branch
|
|
64
|
+
git diff --stat
|
|
65
|
+
git diff
|
|
66
|
+
git diff --cached --stat
|
|
67
|
+
git log -1 --oneline
|
|
68
|
+
git remote -v
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
When available:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
gh auth status
|
|
75
|
+
gh pr status
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Resolve current work-item/review evidence and detect already-completed delivery steps.
|
|
79
|
+
|
|
80
|
+
If implementation, required local checks, Reviewer, or human meaningful-diff approval are not ready, route back to the missing gate. Do not perform delivery writes merely because `/deliver` was invoked too early.
|
|
81
|
+
|
|
82
|
+
If `/deliver` is rerun after interruption/tool unavailability, continue from the observed safe state. Do not repeat already-completed branch/commit/push/PR operations and do not ask the human to re-authorize the same routine mechanics.
|
|
83
|
+
|
|
84
|
+
Examples:
|
|
85
|
+
- branch exists + changes uncommitted → continue with selective staging/commit/push/PR;
|
|
86
|
+
- commit exists + branch not pushed → push and continue;
|
|
87
|
+
- branch pushed + no PR → create PR and continue;
|
|
88
|
+
- PR exists + CI pending → inspect/recheck CI;
|
|
89
|
+
- PR merged + post-merge CI pending → resume observation/finalization rather than starting over.
|
|
90
|
+
|
|
91
|
+
## 4. Short-lived branch handling
|
|
92
|
+
|
|
93
|
+
Normal implementation should already be on a short-lived work branch because `/start-work` establishes it when implementation begins.
|
|
94
|
+
|
|
95
|
+
If reviewed, scoped, uncommitted work is still on the default/integration branch, `/deliver` may recover automatically by creating/switching to the repository-appropriate short-lived work branch while preserving the current worktree.
|
|
96
|
+
|
|
97
|
+
Branch naming order:
|
|
98
|
+
1. repository/team convention when defined,
|
|
99
|
+
2. an already-existing branch clearly tied to the work item,
|
|
100
|
+
3. Project Forge fallback: `<lowercase-work-item-id>-<concise-slug>` for ID-backed work, or `work/<concise-slug>` for an ad hoc change.
|
|
101
|
+
|
|
102
|
+
Before creating/switching, capture enough worktree evidence to confirm the scoped diff. After switching, verify the same files/content remain changed and no work was lost or broadened.
|
|
103
|
+
|
|
104
|
+
Do not ask a separate branch-creation question when the branch operation is safe and deterministic under this rule.
|
|
105
|
+
|
|
106
|
+
Stop instead when:
|
|
107
|
+
- branch policy/naming is materially ambiguous,
|
|
108
|
+
- an intended branch already exists with divergent/unrelated work,
|
|
109
|
+
- unrelated/unexpected files are present,
|
|
110
|
+
- switching would require stash/reset/rebase/force/history rewriting,
|
|
111
|
+
- repository policy forbids the planned branch operation.
|
|
112
|
+
|
|
113
|
+
## 5. Routine PR preparation
|
|
114
|
+
|
|
115
|
+
Proceed automatically within `/deliver` authorization:
|
|
116
|
+
|
|
117
|
+
1. Selectively stage only the accepted delivery scope. Do not use blind `git add .` when unrelated changes exist.
|
|
118
|
+
2. Inspect staged diff/stat and verify it still matches the human-accepted implementation scope.
|
|
119
|
+
3. Generate a concise repository-appropriate commit message; do not create a separate commit-message approval ceremony unless ambiguity is material.
|
|
120
|
+
4. Commit.
|
|
121
|
+
5. Push normally without force.
|
|
122
|
+
6. Create a normal PR when none exists, or update/use the existing branch PR when appropriate.
|
|
123
|
+
7. Use Draft PR only when repository policy/convention requires it or meaningful work is still intentionally incomplete. Because `/deliver` begins after implementation/review acceptance, a normal ready PR is the default Project Forge behavior.
|
|
124
|
+
8. Populate the PR body from actual evidence only.
|
|
125
|
+
9. Inspect PR CI.
|
|
126
|
+
|
|
127
|
+
The repository PR template is internal scaffolding. Do not ask the human to validate the template itself.
|
|
128
|
+
|
|
129
|
+
PR evidence may include:
|
|
130
|
+
- work item,
|
|
131
|
+
- change summary,
|
|
132
|
+
- approved requirements/acceptance criteria,
|
|
133
|
+
- local checks actually observed,
|
|
134
|
+
- Reviewer verdict,
|
|
135
|
+
- known limitations/follow-up,
|
|
136
|
+
- CI status when observed.
|
|
137
|
+
|
|
138
|
+
Do not claim evidence that was not observed.
|
|
139
|
+
|
|
140
|
+
## 6. Stop conditions during routine delivery
|
|
141
|
+
|
|
142
|
+
Stop before/during routine writes for:
|
|
143
|
+
- unrelated/unexpected files,
|
|
144
|
+
- possible secrets,
|
|
145
|
+
- unclear work-item boundary,
|
|
146
|
+
- known failing required local checks,
|
|
147
|
+
- Reviewer `CHANGES REQUIRED`,
|
|
148
|
+
- conflicts,
|
|
149
|
+
- Git/GitHub authentication/permission failure,
|
|
150
|
+
- unexpected generated/tracked files,
|
|
151
|
+
- repository policy that blocks the planned action,
|
|
152
|
+
- a branch/remote state that requires rebase/reset/force or other history rewriting.
|
|
153
|
+
|
|
154
|
+
Never force-push unless separately and explicitly authorized.
|
|
155
|
+
|
|
156
|
+
## 7. PR CI and policy evidence
|
|
157
|
+
|
|
158
|
+
Throughout this skill, CI/policy satisfaction means:
|
|
159
|
+
- the repository-configured workflows/checks that apply to the exact PR or default-branch commit have completed successfully; and
|
|
160
|
+
- any additional repository-enforced policy that is observable through available repository/GitHub tooling is also satisfied.
|
|
161
|
+
|
|
162
|
+
Do not interpret `required` as a mandate to read branch-protection or ruleset admin settings. When those settings are unavailable, use observable workflow/check results, PR mergeability, repository documentation, and any other visible policy evidence.
|
|
163
|
+
|
|
164
|
+
Do not ask the human to open GitHub Settings and transcribe required-check names merely to continue delivery. Stop only when unavailable policy data creates a concrete ambiguity that actually blocks merge, release, or another consequential action.
|
|
165
|
+
|
|
166
|
+
Inspect the configured/observable PR CI and checks without asking permission for each recheck.
|
|
167
|
+
|
|
168
|
+
### Pending
|
|
169
|
+
|
|
170
|
+
Use bounded read-only polling/rechecks when practical. If CI is still running beyond the practical interaction/tool window, report:
|
|
171
|
+
|
|
172
|
+
```text
|
|
173
|
+
PR CI: RUNNING
|
|
174
|
+
Delivery state preserved. Re-run /deliver to resume.
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Do not insert a new write-authorization prompt merely because CI is pending.
|
|
178
|
+
|
|
179
|
+
### Failed
|
|
180
|
+
|
|
181
|
+
Inspect failing evidence when available. Report the failure and offer inspect/diagnose/targeted-fix/stop. Do not automatically change code because CI failed.
|
|
182
|
+
|
|
183
|
+
Any code fix returns through the review/meaningful-diff gate as warranted before delivery resumes.
|
|
184
|
+
|
|
185
|
+
### Green
|
|
186
|
+
|
|
187
|
+
Before the merge gate, verify:
|
|
188
|
+
- PR head branch/head SHA are the expected delivered branch/commit,
|
|
189
|
+
- no unexpected commits appeared,
|
|
190
|
+
- PR diff still represents the locally reviewed/accepted implementation,
|
|
191
|
+
- Reviewer/policy/check state is still satisfactory,
|
|
192
|
+
- PR is mergeable under observed repository rules.
|
|
193
|
+
|
|
194
|
+
If the final PR differs materially from the accepted local implementation, require final diff review before merge. Do not silently treat changed evidence as accepted.
|
|
195
|
+
|
|
196
|
+
If a Draft PR was required earlier and all readiness conditions are now satisfied, mark it ready as routine delivery mechanics unless repository policy requires a different human/reviewer action.
|
|
197
|
+
|
|
198
|
+
## 8. Single merge + finalize gate
|
|
199
|
+
|
|
200
|
+
When PR evidence still matches the accepted implementation and CI/policy are satisfactory, combine final PR acceptance and merge authorization into one meaningful gate:
|
|
201
|
+
|
|
202
|
+
```text
|
|
203
|
+
MERGE READY
|
|
204
|
+
|
|
205
|
+
PR CI: GREEN
|
|
206
|
+
Reviewer: READY
|
|
207
|
+
PR diff: matches accepted delivery scope
|
|
208
|
+
Mergeable/policy: <observed state>
|
|
209
|
+
|
|
210
|
+
1. Merge and finalize delivery [HUMAN ACCEPTANCE + GITHUB/GIT WRITE] — recommended
|
|
211
|
+
2. Review final PR diff first [READ ONLY]
|
|
212
|
+
3. Leave PR open [NO ACTION]
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Selecting option 1 means:
|
|
216
|
+
- the human accepts the final PR as observed,
|
|
217
|
+
- merge is authorized using the repository-approved strategy,
|
|
218
|
+
- applicable post-merge default-branch CI/policy may be observed/rechecked automatically,
|
|
219
|
+
- after that CI/policy evidence is satisfied, the delivered normal short-lived branch may be finalized automatically locally/remotely under the safety rules below.
|
|
220
|
+
|
|
221
|
+
Do not present a second `Accept PR?` prompt immediately followed by `Merge?` when the evidence has not changed.
|
|
222
|
+
|
|
223
|
+
If the human chooses to review the final PR diff, return to this same merge gate after the review if no new issues appear.
|
|
224
|
+
|
|
225
|
+
If merge strategy is materially ambiguous and repository convention does not resolve it, stop and ask rather than inventing one.
|
|
226
|
+
|
|
227
|
+
Before merge, record the PR head branch and head SHA so finalization can distinguish the approved delivered state from later work.
|
|
228
|
+
|
|
229
|
+
Stop before merge if checks regress, new commits appear, conflicts arise, or policy changes the state.
|
|
230
|
+
|
|
231
|
+
## 9. Post-merge default-branch CI
|
|
232
|
+
|
|
233
|
+
After authorized merge, inspect the actual configured default branch/workflows and any observable enforced checks automatically.
|
|
234
|
+
|
|
235
|
+
If configured post-merge default-branch CI is pending, use bounded read-only rechecks when practical. If still pending beyond the practical interaction/tool window, report:
|
|
236
|
+
|
|
237
|
+
```text
|
|
238
|
+
MERGED — DEFAULT-BRANCH CI PENDING
|
|
239
|
+
Delivery state preserved. Re-run /deliver to resume finalization.
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Do not ask the human to authorize observation again.
|
|
243
|
+
|
|
244
|
+
If post-merge CI fails, report it clearly and inspect/diagnose; do not silently revert, modify production, or delete the delivered branch.
|
|
245
|
+
|
|
246
|
+
Only after configured post-merge default-branch CI and any additional observable repository-required checks are satisfied may delivered-branch finalization proceed. If the repository has no post-merge CI workflow/policy, state that explicitly and proceed using the observed merged/default-branch state.
|
|
247
|
+
|
|
248
|
+
## 10. Delivered-branch finalization
|
|
249
|
+
|
|
250
|
+
For a normal short-lived delivered branch, option 1 at the merge gate already authorizes finalization. Do not ask a separate `Delete branch?` question.
|
|
251
|
+
|
|
252
|
+
Preserve by default:
|
|
253
|
+
- the configured default branch,
|
|
254
|
+
- protected branches,
|
|
255
|
+
- release/integration/environment branches intended to be long-lived,
|
|
256
|
+
- branches repository policy says to retain,
|
|
257
|
+
- a branch the human explicitly asked to retain before/during the merge gate,
|
|
258
|
+
- any branch whose state changed or became ambiguous after merge.
|
|
259
|
+
|
|
260
|
+
Before deletion, revalidate:
|
|
261
|
+
- the PR is still merged,
|
|
262
|
+
- the recorded PR head branch/head SHA are unchanged as delivery evidence,
|
|
263
|
+
- the remote branch, when present, still points to the recorded PR head SHA,
|
|
264
|
+
- no open PR now depends on the branch,
|
|
265
|
+
- the local branch has no commits beyond the recorded approved PR head,
|
|
266
|
+
- the working tree is safe to switch to the default branch.
|
|
267
|
+
|
|
268
|
+
Then:
|
|
269
|
+
1. switch to the default branch,
|
|
270
|
+
2. update it using the repository's normal non-rewriting method, usually `git pull --ff-only`,
|
|
271
|
+
3. delete the remote delivered branch when it still exists and policy allows,
|
|
272
|
+
4. delete the local delivered branch,
|
|
273
|
+
5. prune stale remote-tracking refs,
|
|
274
|
+
6. confirm final default-branch/working-tree state.
|
|
275
|
+
|
|
276
|
+
For the local branch:
|
|
277
|
+
- prefer `git branch -d <branch>` when Git recognizes it as merged,
|
|
278
|
+
- squash/rebase merges may make `-d` reject even when the PR is merged,
|
|
279
|
+
- only when merged-PR evidence is exact and the local head has no commits beyond the recorded PR head may `git branch -D <branch>` be used under the merge-and-finalize authorization.
|
|
280
|
+
|
|
281
|
+
An already-auto-deleted remote branch is `already clean`, not a failure.
|
|
282
|
+
|
|
283
|
+
Never use force deletion merely to bypass uncertainty.
|
|
284
|
+
|
|
285
|
+
If any safety condition fails, preserve the branch and report `BRANCH CLEANUP PENDING` with the exact reason instead of asking repetitive yes/no questions.
|
|
286
|
+
|
|
287
|
+
## 11. Delivery completion and optional learning handoff
|
|
288
|
+
|
|
289
|
+
First report the observed engineering outcome:
|
|
290
|
+
|
|
291
|
+
```text
|
|
292
|
+
DELIVERY COMPLETE
|
|
293
|
+
|
|
294
|
+
PR: MERGED
|
|
295
|
+
Default branch: UPDATED
|
|
296
|
+
Post-merge CI: GREEN / NOT CONFIGURED
|
|
297
|
+
Branch finalization: DELETED / RETAINED BY POLICY OR CHOICE / ALREADY CLEAN
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
If merge/default-branch delivery is complete but requested/authorized cleanup could not be performed safely, report:
|
|
301
|
+
|
|
302
|
+
```text
|
|
303
|
+
DELIVERY COMPLETE — BRANCH CLEANUP PENDING
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
and preserve the branch.
|
|
307
|
+
|
|
308
|
+
After engineering delivery is complete, use the accepted PR/work-item diff to classify optional learning relevance. This classification is read-only and does not create another delivery state.
|
|
309
|
+
|
|
310
|
+
Database relevance can include observed changes to entities/models, migrations, DDL/schema, SQL/query/repository/persistence code, indexes/constraints, ORM mappings, or transaction/concurrency behavior.
|
|
311
|
+
|
|
312
|
+
System-design relevance can include observed changes to APIs/contracts, service/module boundaries, cross-component dependencies, external integrations, messaging/events, caches, security/auth boundaries, observability, deployment/runtime topology, infrastructure, scaling/performance behavior, or failure handling.
|
|
313
|
+
|
|
314
|
+
A changed file proves that evidence was touched; it does not by itself prove a physical-schema or runtime-behavior change. Use `changed`/`affected` wording conservatively and verify deeper claims through the corresponding lab.
|
|
315
|
+
|
|
316
|
+
### Best-effort disposable workbench preparation
|
|
317
|
+
|
|
318
|
+
After merge, satisfactory post-merge/default-branch evidence, and update to the delivered default-branch checkout, `/deliver` may prepare current disposable learning artifacts automatically when all prerequisites are already safe and unambiguous.
|
|
319
|
+
|
|
320
|
+
System Lab:
|
|
321
|
+
- when system-design relevance is present and `tools/project-forge-system-lab/system-workbench.py` exists, it may run the exporter against the current repository;
|
|
322
|
+
- use a stable per-repository temp/cache output directory so an older disposable `workbench.json` can be compared before replacement;
|
|
323
|
+
- pass the accepted changed-file list via `--changed-file` when practical;
|
|
324
|
+
- never write generated workbench output into tracked project paths by default.
|
|
325
|
+
|
|
326
|
+
Database Lab:
|
|
327
|
+
- when database relevance is present, `tools/project-forge-db-lab/sqlite-workbench.py` exists, and a safe local development/test SQLite database path is already known from project setup/configuration/evidence, it may generate the current DB workbench;
|
|
328
|
+
- do not guess a database path;
|
|
329
|
+
- do not create a database, apply migrations, mutate data, inspect Production, or change code merely to prepare a learning artifact.
|
|
330
|
+
|
|
331
|
+
For either lab:
|
|
332
|
+
- artifact generation is read-only/best-effort;
|
|
333
|
+
- failure/unavailability is reported briefly and never changes `DELIVERY COMPLETE`;
|
|
334
|
+
- generation does not mean the human performed the learning activity or demonstrated understanding;
|
|
335
|
+
- do not open browser/UI automatically unless normal repository/local-workflow conventions make that expected and non-disruptive.
|
|
336
|
+
|
|
337
|
+
### Visible optional learning reminder
|
|
338
|
+
|
|
339
|
+
Keep learning visible while the change is fresh. Prefer this order:
|
|
340
|
+
|
|
341
|
+
```text
|
|
342
|
+
OPTIONAL LEARNING — recommended while this change is fresh
|
|
343
|
+
|
|
344
|
+
★ /db-lab changes <work-item>
|
|
345
|
+
This work changed database structure or behavior.
|
|
346
|
+
Explore affected relationships, queries, indexes, constraints, and ORM behavior.
|
|
347
|
+
|
|
348
|
+
★ /system-lab changes <work-item>
|
|
349
|
+
This work changed system structure or runtime behavior.
|
|
350
|
+
Explore affected components, flows, dependencies, tradeoffs, and failure modes.
|
|
351
|
+
|
|
352
|
+
○ /code-walkthrough <work-item>
|
|
353
|
+
Walk through the implementation and changed-file flow.
|
|
354
|
+
|
|
355
|
+
○ /learning-review <work-item>
|
|
356
|
+
Test your understanding.
|
|
357
|
+
|
|
358
|
+
Learning is optional and does not affect delivery state.
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Only use `★` for a lab supported by the accepted change evidence. If a lab is not especially relevant, keep it visible as an available option when useful, for example:
|
|
362
|
+
|
|
363
|
+
```text
|
|
364
|
+
○ /db-lab
|
|
365
|
+
Explore the current database schema, relationships, queries, indexes, and ORM behavior.
|
|
366
|
+
|
|
367
|
+
○ /system-lab
|
|
368
|
+
Explore the current architecture, runtime flows, dependencies, scaling, and failure behavior.
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
Do not tell the human to "rebuild", "refresh", or maintain a generated diagram. Invoking a lab means inspect current evidence and generate/show the current view.
|
|
372
|
+
|
|
373
|
+
Do not turn these reminders into approval prompts. The human may invoke one, continue to deployment work, start another work item, or do nothing.
|
|
374
|
+
|
|
375
|
+
## 12. Deployment handoff
|
|
376
|
+
|
|
377
|
+
If the delivered work item owns release/deployment engineering, successful engineering delivery may hand off to the selected environment's state-driven readiness workflow:
|
|
378
|
+
|
|
379
|
+
```text
|
|
380
|
+
/deployment-readiness <environment>
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
Readiness re-discovers current state and continues from the furthest safe point; do not ask the human to choose `discovery`, `enable`, or `resume` merely because engineering delivery just completed.
|
|
384
|
+
|
|
385
|
+
The readiness workflow is environment-generic. Production remains an environment role with stronger policy; merge approval never implies remote or production-deployment authorization.
|
|
386
|
+
|
|
387
|
+
The optional learning handoff does not block or replace deployment readiness when deployment is the sensible next engineering action.
|
|
388
|
+
|
|
389
|
+
## 13. Relationship to /start-work, /next-step, and /cleanup-branches
|
|
390
|
+
|
|
391
|
+
`/start-work` establishes the short-lived work branch as routine implementation setup once implementation is actually authorized.
|
|
392
|
+
|
|
393
|
+
`/next-step` answers `Where am I?` and may surface optional learning choices without creating learning-only workflow states.
|
|
394
|
+
|
|
395
|
+
`/deliver` takes reviewed/accepted work through routine branch/commit/push/PR/CI mechanics automatically, then stops once for the merge-and-finalize decision. After successful engineering completion it may prepare disposable learning workbenches and shows an optional learning handoff without creating another gate.
|
|
396
|
+
|
|
397
|
+
`/cleanup-branches` is the standalone preview-first path for accumulated, previously retained, unrelated, or otherwise out-of-band branch housekeeping.
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy
|
|
3
|
+
description: "Guided deployment orchestration for any exact project-defined logical environment. Reuses setup-time proof, preserves Production classification, and validates live application evidence."
|
|
4
|
+
argument-hint: "<environment> [release-or-artifact]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Deploy
|
|
10
|
+
|
|
11
|
+
`/deploy <environment>` deploys the real project application to one exact configured logical environment.
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
/deploy demo
|
|
15
|
+
/deploy staging
|
|
16
|
+
/deploy qa
|
|
17
|
+
/deploy prod-east
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Core owns topology/policy resolution, Human-in-the-Loop authorization, and evidence-oriented orchestration. Repository-provided deterministic tooling owns deployment mechanics.
|
|
21
|
+
|
|
22
|
+
## 1. Resolve exact named topology
|
|
23
|
+
|
|
24
|
+
Prefer:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
DEPLOYMENT_TOPOLOGY.json
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Use `PROJECT_BOOTSTRAP.json` deployment topology only as the initial topology fallback.
|
|
31
|
+
|
|
32
|
+
Resolve exact configured name, purpose/Production classification, placement, isolation, exposure, binding, adapter, target/provider, and failure domain.
|
|
33
|
+
|
|
34
|
+
If `demo` exists, `/deploy demo` targets exactly `demo`. If `prod-east` has purpose `production`, `/deploy prod-east` remains a Production deployment even though the literal name differs.
|
|
35
|
+
|
|
36
|
+
If no environment is named, enumerate configured environments and ask the human to choose; never silently default to Production. The deployment workflow must never fall back to another environment/placement/host/provider because deployment fails.
|
|
37
|
+
|
|
38
|
+
If the requested environment is missing or ambiguous, route to `/setup` rather than guessing.
|
|
39
|
+
|
|
40
|
+
## 2. Resolve baseline/readiness/proof evidence
|
|
41
|
+
|
|
42
|
+
Read only what is needed, including when present:
|
|
43
|
+
|
|
44
|
+
- `PROJECT_FORGE_BASELINE.json`;
|
|
45
|
+
- `DEPLOYMENT_BASELINE.json`;
|
|
46
|
+
- project topology and approved deployment/release requirements;
|
|
47
|
+
- `/deployment-readiness` evidence;
|
|
48
|
+
- fresh setup-time environment-proof evidence for this workstation;
|
|
49
|
+
- established application deployment facts.
|
|
50
|
+
|
|
51
|
+
For package-managed generated POCs, prefer the repository-distributed launcher:
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
tools/project-forge-deployment/project-forge-deploy.py
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Do not require a separate Deployment Kit checkout.
|
|
58
|
+
|
|
59
|
+
When a fresh setup-time proof already demonstrated target access, platform readiness, workstation-mediated image transfer, remote managed runtime, health, and cleanup from this workstation, do not repeat those environment-mechanics questions unless material evidence changed.
|
|
60
|
+
|
|
61
|
+
Proof does not establish the real application's image/release, persistence/migration contract, route/exposure, secrets, health contract, or release policy.
|
|
62
|
+
|
|
63
|
+
## 3. First real deployment asks only unresolved application questions
|
|
64
|
+
|
|
65
|
+
The first real `/deploy <environment>` after environment proof may need a small application-specific completion step. Ask only material unknowns not already answered by project evidence, such as:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
health endpoint/runtime port
|
|
69
|
+
persistence path/migration behavior
|
|
70
|
+
route/exposure
|
|
71
|
+
secret/non-secret runtime-value boundary
|
|
72
|
+
immutable application image/release policy
|
|
73
|
+
smoke validation
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
When a bounded choice is useful, provide a small recommended menu plus `Other / specify` and `Not sure — recommend one`.
|
|
77
|
+
|
|
78
|
+
Once these facts are durably established, later deployments should be routine rather than repeating onboarding.
|
|
79
|
+
|
|
80
|
+
## 4. Placement determines launcher
|
|
81
|
+
|
|
82
|
+
### Workstation container
|
|
83
|
+
|
|
84
|
+
For supported `workstation-container` placement, use the repository-distributed local adapter. Verify local Docker/runtime, exact immutable image, ports/health, ownership/collision plan, persistence, and resolved Production policy.
|
|
85
|
+
|
|
86
|
+
Current reusable workstation-container support is loopback-only. Do not widen it to LAN/public exposure as an implicit convenience.
|
|
87
|
+
|
|
88
|
+
### Remote target
|
|
89
|
+
|
|
90
|
+
Resolve the exact logical target established by topology/readiness, preserve verified host trust, and stop on unknown/changed identity.
|
|
91
|
+
|
|
92
|
+
Prefer workstation-mediated exact-image delivery when installed/supported unless the project explicitly requires target-side registry pulls:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
exact image acquired/built locally
|
|
96
|
+
→ exact immutable digest verified
|
|
97
|
+
→ image streamed over verified SSH
|
|
98
|
+
→ remote docker load
|
|
99
|
+
→ exact image verified remotely
|
|
100
|
+
→ managed application runtime deploys preloaded image
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Do not copy a developer GitHub PAT/GHCR credential to the target as normal deployment behavior.
|
|
104
|
+
|
|
105
|
+
### Managed service
|
|
106
|
+
|
|
107
|
+
Use only an installed repository/catalog provider adapter. If none exists, stop with `CATALOG GAP / PLANNED` rather than constructing provider commands from general knowledge.
|
|
108
|
+
|
|
109
|
+
### Deferred
|
|
110
|
+
|
|
111
|
+
Report `DEPLOYMENT NOT BOUND YET` and route to `/setup <environment>` or `/deployment-readiness <environment>`.
|
|
112
|
+
|
|
113
|
+
## 5. Preserve custom Production classification
|
|
114
|
+
|
|
115
|
+
Pass the exact configured environment name to the deterministic launcher.
|
|
116
|
+
|
|
117
|
+
When resolved purpose/classification is Production, use the installed tool's explicit Production classification mechanism even for a custom name. Current Deployment Kit versions may expose:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
--production
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Inspect installed help/version evidence. If the installed tool cannot preserve Production classification for a custom name, stop rather than downgrading safety.
|
|
124
|
+
|
|
125
|
+
## 6. Build the deterministic plan
|
|
126
|
+
|
|
127
|
+
Use repository-provided tooling to construct/inspect the exact application deployment plan. Supported operations may include:
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
optional backup/safety check
|
|
131
|
+
→ exact image transfer/acquisition
|
|
132
|
+
→ release-specific migration
|
|
133
|
+
→ application/container deployment
|
|
134
|
+
→ route/loopback publication
|
|
135
|
+
→ health/readiness verification
|
|
136
|
+
→ smoke validation
|
|
137
|
+
→ deployment evidence capture
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Do not smuggle infrastructure provisioning, target/provider rebinding, destructive restore, or environment tear-down into the application plan.
|
|
141
|
+
|
|
142
|
+
## 7. Preserve exact authorization contracts
|
|
143
|
+
|
|
144
|
+
Core consequence labels do not replace stricter installed-tool phrases.
|
|
145
|
+
|
|
146
|
+
The standard Deployment Kit may use exact phrases such as:
|
|
147
|
+
|
|
148
|
+
```text
|
|
149
|
+
[APP DEPLOY WRITE]
|
|
150
|
+
[PRODUCTION APP DEPLOY]
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
For Production-class environments also show `[PRODUCTION WRITE]` consequence visibility where Core policy calls for it.
|
|
154
|
+
|
|
155
|
+
Resolve the exact phrase from the installed tool/version. Do not assume an example phrase when the installed contract differs.
|
|
156
|
+
|
|
157
|
+
Authorization applies only to the exact environment, resolved classification, placement/target/provider, artifact, reviewed plan, and evidence shown. Material changes require renewed review/authorization.
|
|
158
|
+
|
|
159
|
+
## 8. Preview and execute only the approved contract
|
|
160
|
+
|
|
161
|
+
Before mutation, show concise non-secret evidence such as exact environment, purpose, placement, target/provider when applicable, proof freshness, immutable application artifact, persistence/migration, exposure/route, planned operations, and exact required authorization phrase.
|
|
162
|
+
|
|
163
|
+
After authorization, invoke only the repository-provided deterministic launcher. Never redirect to another environment/host/provider, weaken trust/exposure, force through lock contention, or invent recovery writes.
|
|
164
|
+
|
|
165
|
+
Existing per-app/per-environment locks are normal concurrency protection when another workstation is deploying the same environment.
|
|
166
|
+
|
|
167
|
+
## 9. Validate live evidence
|
|
168
|
+
|
|
169
|
+
After execution, use repository-provided inventory/health/route/smoke/evidence commands when available.
|
|
170
|
+
|
|
171
|
+
A successful result may be summarized as:
|
|
172
|
+
|
|
173
|
+
```text
|
|
174
|
+
DEPLOYMENT VALIDATED
|
|
175
|
+
|
|
176
|
+
Environment: <exact name>
|
|
177
|
+
Purpose: <...>
|
|
178
|
+
Artifact: <exact immutable identity>
|
|
179
|
+
Artifact delivery: <workstation-transfer|remote-registry|local-runtime|provider>
|
|
180
|
+
Endpoint/Route: READY / LOOPBACK / NOT APPLICABLE
|
|
181
|
+
Application health: READY
|
|
182
|
+
Smoke: PASSED / NOT REQUIRED
|
|
183
|
+
Deployment evidence: RECORDED / VERIFIED
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Do not report success merely because a container/process started when stronger health evidence is required.
|
|
187
|
+
|
|
188
|
+
A setup-time disposable environment proof is not real application deployment evidence. A successful application deployment never authorizes a later Production write or destructive `/tear-down`.
|