@mriekki/project-forge 4.11.2 → 4.13.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 +2 -0
- package/assets/components.json +3 -3
- package/assets/core/distribution.json +2 -0
- package/assets/deployment/distribution.json +2 -0
- package/assets/generated/ASSEMBLY.json +38 -18
- package/assets/generated/core/core/instructions/project-forge-local-development.instructions.md +28 -0
- package/assets/generated/core/core/instructions/project-forge-workflow.instructions.md +8 -0
- package/assets/generated/core/core/process/HUMAN_GATES.md +63 -0
- package/assets/generated/core/core/process/INTERACTIVE_SESSION_GUIDE.md +28 -1
- package/assets/generated/core/core/process/LOCAL_DEVELOPMENT_COMMANDS.md +103 -0
- package/assets/generated/core/core/skills/build/SKILL.md +10 -5
- package/assets/generated/core/core/skills/export-requirements/SKILL.md +20 -1
- package/assets/generated/core/core/skills/refine-requirements/SKILL.md +25 -2
- package/assets/generated/core/core/skills/replatform/SKILL.md +24 -1
- package/assets/generated/core/core/skills/run/SKILL.md +39 -13
- package/assets/generated/core/core/skills/start-work/SKILL.md +120 -18
- package/assets/generated/core/tools/vscode_work_item_status/extension/README.md +20 -2
- package/assets/generated/core/tools/vscode_work_item_status/extension/extension.js +136 -1
- package/assets/generated/core/tools/vscode_work_item_status/extension/package.json +11 -5
- package/assets/generated/deployment/docs/RECOVERY_READINESS.md +66 -0
- package/assets/generated/deployment/src/project_forge_deployment/recovery_scope.py +116 -0
- package/assets/generated/deployment/src/project_forge_deployment/sqlite_adapter.py +27 -2
- package/assets/generated/deployment/src/project_forge_deployment/sqlite_adapter_remote.py +9 -6
- package/assets/generated/deployment/src/project_forge_deployment/sqlite_cli.py +23 -3
- package/package.json +1 -1
|
@@ -27,6 +27,8 @@ Read only the minimum relevant context. Do not preload unrelated work items. Do
|
|
|
27
27
|
|
|
28
28
|
Never assume `Jira Epic == Feature Brief`.
|
|
29
29
|
|
|
30
|
+
When review/approval will concern a local artifact, classify it as the PRIMARY review subject. Supporting Feature/Product briefs, ADRs, and design documents are CONTEXT or TRACEABILITY unless they are themselves the decision subject.
|
|
31
|
+
|
|
30
32
|
## 2. Decide whether detail is warranted
|
|
31
33
|
|
|
32
34
|
Detailed refinement is useful for behavior such as:
|
|
@@ -124,6 +126,8 @@ Then present only relevant actions as a **single-select structured choice** when
|
|
|
124
126
|
- `Approve local requirements` `[REQUIREMENTS GATE]` when applicable
|
|
125
127
|
- `Stop` `[NO ACTION]`
|
|
126
128
|
|
|
129
|
+
When the human selects `Review full requirements/work item`, foreground the PRIMARY review surface when the host supports it. For local Markdown requirements, prefer rendered Markdown preview. In VS Code, use `projectForge.openReviewArtifact` with the exact workspace-relative path when available. For an external-primary work item, use the best available external issue/item surface instead of creating a local surrogate solely for preview.
|
|
130
|
+
|
|
127
131
|
Make a recommendation only when current requirement evidence or a clear engineering tradeoff supports one. If so, mark exactly one choice with the host's `recommended` indicator when that metadata exists; otherwise append `[RECOMMENDED]` to exactly one option label. Briefly explain why in the option description or surrounding prompt. A default/preselected value may match the recommendation, but a default alone must never communicate advice or approval. If there is no clear basis, show the choices without a recommendation and without a preference-implying default. The selected answer, not the recommendation, controls what the session does or records.
|
|
128
132
|
|
|
129
133
|
If the host has no structured choice UI, present the same relevant choices as a concise numbered or lettered text fallback, preserve `[RECOMMENDED]` on the evidence-backed option when applicable, and accept the number/letter, label, or free-form intent. Do not use the text fallback as the normal VS Code path.
|
|
@@ -193,7 +197,26 @@ APPROVED
|
|
|
193
197
|
|
|
194
198
|
Human approval is explicit. Do not infer approval from review/planning/implementation.
|
|
195
199
|
|
|
196
|
-
Before approval
|
|
200
|
+
Before approval:
|
|
201
|
+
1. report coverage and open material decisions;
|
|
202
|
+
2. identify the exact PRIMARY local requirements artifact;
|
|
203
|
+
3. foreground/open that artifact in the best available review surface when the host supports it;
|
|
204
|
+
4. only then render the `[REQUIREMENTS GATE]` choice.
|
|
205
|
+
|
|
206
|
+
For Markdown requirements in VS Code, prefer rendered preview; when the Project Forge companion command is available, invoke `projectForge.openReviewArtifact` with the exact workspace-relative requirements path. If automatic opening is unavailable, provide the exact path/link and explicitly tell the human that this is the artifact being approved.
|
|
207
|
+
|
|
208
|
+
The gate should make the review subject unmistakable, for example:
|
|
209
|
+
|
|
210
|
+
```text
|
|
211
|
+
HUMAN REVIEW REQUIRED
|
|
212
|
+
|
|
213
|
+
Gate: REQUIREMENTS APPROVAL
|
|
214
|
+
Primary artifact: docs/work-items/<work-item>/requirements.md
|
|
215
|
+
Opened: Markdown Preview / <fallback surface>
|
|
216
|
+
Open material decisions: NONE / list
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Only an explicit `[REQUIREMENTS GATE]` choice may change local status to `APPROVED`. Opening the document, viewing the preview, or selecting a read-only review action never changes approval state. When the host offers structured choices, render this approval gate as a single-select action, not a numbered chat menu.
|
|
197
220
|
|
|
198
221
|
External work-item status/approval follows the external team's conventions; Project Forge must not fabricate a local approval state.
|
|
199
222
|
|
|
@@ -222,4 +245,4 @@ Then offer review, more grilling/refinement, approval when applicable, or stop u
|
|
|
222
245
|
|
|
223
246
|
Do not create implementation plans or production code.
|
|
224
247
|
|
|
225
|
-
When requirements are ready, recommend `/start-work <ID-or-key>`.
|
|
248
|
+
When requirements are ready, recommend `/start-work <ID-or-key>`. That command may prepare the implementation plan, but STANDARD/ELEVATED implementation still requires the distinct plan-approval gate defined by `/start-work`.
|
|
@@ -119,4 +119,27 @@ OUTPUT
|
|
|
119
119
|
PROJECT_BOOTSTRAP.json — REVIEW
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
Then
|
|
122
|
+
Then make `PROJECT_BOOTSTRAP.json` the PRIMARY review subject. Before asking for Bootstrap approval:
|
|
123
|
+
|
|
124
|
+
1. identify the exact manifest path and target repository identity;
|
|
125
|
+
2. foreground/open the formatted manifest in the best available review/editor surface when the host supports it;
|
|
126
|
+
3. keep source requirements/catalog evidence as CONTEXT/TRACEABILITY rather than opening everything;
|
|
127
|
+
4. only then render the normal material Bootstrap manifest approval gate.
|
|
128
|
+
|
|
129
|
+
In VS Code, when available, use `projectForge.openReviewArtifact` with the exact workspace-relative `PROJECT_BOOTSTRAP.json` path. Opening the manifest is read-only presentation and never authorizes generation.
|
|
130
|
+
|
|
131
|
+
Present an explicit surface summary such as:
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
HUMAN REVIEW REQUIRED
|
|
135
|
+
|
|
136
|
+
Gate: BOOTSTRAP MANIFEST APPROVAL
|
|
137
|
+
Primary artifact: PROJECT_BOOTSTRAP.json
|
|
138
|
+
State: REVIEW
|
|
139
|
+
Opened: formatted editor preview / <fallback surface>
|
|
140
|
+
Target: <owner/repository>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
If the manifest changes materially after review, foreground the changed manifest and reopen approval rather than reusing stale authorization.
|
|
144
|
+
|
|
145
|
+
Approval of replatform intent or manifest review is not approval to merge, release, or deploy the resulting implementation.
|
|
@@ -8,47 +8,72 @@ disable-model-invocation: true
|
|
|
8
8
|
|
|
9
9
|
# Run
|
|
10
10
|
|
|
11
|
-
`/run` is the normal convenience entry point for starting the project locally.
|
|
11
|
+
`/run` is the normal convenience entry point for starting the project locally. Core stays stack-neutral; the Project becomes deterministic by exposing a repository-owned local runtime command and runtime/persistence pairing once executable application topology exists. Follow `docs/process/LOCAL_DEVELOPMENT_COMMANDS.md` when present.
|
|
12
12
|
|
|
13
13
|
## Contract
|
|
14
14
|
|
|
15
|
-
Invoking `/run` authorizes one bounded local start attempt for the requested target. It does not authorize setup, source edits, deployment, release publication, Production access, or persistent background services outside the repository's normal local-development contract.
|
|
15
|
+
Invoking `/run` authorizes one bounded local start attempt for the requested target. It does not authorize setup, source edits, migrations, database reset/replacement, deployment, release publication, Production access, or persistent background services outside the repository's normal local-development contract.
|
|
16
16
|
|
|
17
|
-
Resolve the local runtime
|
|
17
|
+
Resolve the local runtime from current repository evidence in this order:
|
|
18
18
|
|
|
19
|
-
1. an explicit
|
|
20
|
-
2.
|
|
21
|
-
3. an
|
|
19
|
+
1. an explicit developer-selected supported runtime/target, when one was supplied;
|
|
20
|
+
2. the established Project-owned default local runtime and its associated persistence, including a project-owned local container/database when the repository defines that as the developer topology;
|
|
21
|
+
3. an explicit repository-owned run/dev wrapper or documented command for that selected runtime;
|
|
22
|
+
4. an explicit package/task script whose purpose is local run/dev;
|
|
23
|
+
5. an unambiguous ecosystem-native local entry point already present in the repository, but only when the Project has not yet established a repository-owned runtime contract.
|
|
22
24
|
|
|
23
25
|
Do not guess. If the repository has multiple independent runtimes and no documented default, require a target such as `/run web`, `/run api`, or `/run all`.
|
|
24
26
|
|
|
27
|
+
For normal Feature Brief and Engineering Enabler development/validation, default to the established Project-owned local runtime and associated persistence unless the developer explicitly selects an alternative. Do not silently start a native process or use a separate checkout database merely because an ecosystem-native command is convenient.
|
|
28
|
+
|
|
29
|
+
Once a repository-owned runtime command exists, treat it as authoritative for that runtime. If it is stale or fails because topology changed, report the contract problem; do not silently bypass it with another runtime/database.
|
|
30
|
+
|
|
25
31
|
## Preconditions
|
|
26
32
|
|
|
27
33
|
Before starting:
|
|
28
34
|
|
|
29
35
|
- identify repository root and current Git state;
|
|
30
36
|
- inspect `PROJECT_BOOTSTRAP.json` and scaffold/readiness evidence when present;
|
|
37
|
+
- resolve the exact selected runtime and, when applicable, the persistence instance it owns or uses;
|
|
31
38
|
- verify the selected runtime entry point exists;
|
|
32
|
-
- inspect
|
|
39
|
+
- inspect documented local ports, health endpoints, launch profiles, and transport/authentication requirements;
|
|
33
40
|
- do not create an intentionally deferred scaffold merely to make `/run` succeed.
|
|
34
41
|
|
|
35
42
|
If runtime source is intentionally deferred or absent, return `RUN NOT AVAILABLE` and identify the owning work item or missing marker when repository evidence provides it.
|
|
36
43
|
|
|
37
44
|
If workstation tools or dependencies are missing, recommend `/setup` instead of silently installing them.
|
|
38
45
|
|
|
46
|
+
### Persistence and schema readiness
|
|
47
|
+
|
|
48
|
+
When the selected runtime requires persistence, inspect repository-owned non-mutating readiness evidence for the **exact selected persistence instance** before claiming functional readiness. This may include installed Project Forge/Deployment Kit status primitives, migration status commands, repository health/doctor commands, or other documented read-only checks.
|
|
49
|
+
|
|
50
|
+
- If initialization or required schema is known to be missing/stale, do not automatically migrate, reset, delete, replace, or switch databases. Report `PERSISTENCE BLOCKED` and route to `/setup local` or the repository-owned repair workflow.
|
|
51
|
+
- If the repository does not expose a safe way to establish schema compatibility, report `PERSISTENCE UNVERIFIED`. Do not turn a successful connection, process start, `/version`, or connection-only health check into an application-readiness claim.
|
|
52
|
+
- If the application has no persistence requirement for the selected runtime, report persistence as `N/A`; do not invent a database gate.
|
|
53
|
+
|
|
54
|
+
A stopped, absent, stale, or migration-pending Project-owned default container/database is a prerequisite problem, not permission to select a different runtime. An explicit developer selection may authorize a supported alternative within the existing `/run` boundary; inspect only that selected runtime and persistence.
|
|
55
|
+
|
|
56
|
+
### Transport/authentication readiness
|
|
57
|
+
|
|
58
|
+
Resolve documented transport prerequisites before choosing a launch profile. If normal authentication development requires HTTPS, secure cookies, or another repository-declared transport property, use the supported Project-owned profile/runtime when available or report the unresolved prerequisite. Do not disable secure-cookie policy, invent TLS/provider settings, or weaken authentication configuration to make `/run` succeed.
|
|
59
|
+
|
|
39
60
|
## Execution
|
|
40
61
|
|
|
41
|
-
Start the process in an observable developer-controlled terminal/process surface. Do not hide a long-running application in an unexplained background process.
|
|
62
|
+
Start the selected process/runtime in an observable developer-controlled terminal/process surface. Do not hide a long-running application in an unexplained background process.
|
|
42
63
|
|
|
43
|
-
Report:
|
|
64
|
+
Report these evidence dimensions separately:
|
|
44
65
|
|
|
45
|
-
- target;
|
|
66
|
+
- target and selected runtime identity;
|
|
46
67
|
- resolved command identity;
|
|
47
68
|
- process/startup result;
|
|
48
69
|
- effective application release/build identity when the running application exposes it;
|
|
49
|
-
-
|
|
70
|
+
- persistence readiness: `READY`, `BLOCKED`, `UNVERIFIED`, or `N/A`;
|
|
71
|
+
- local URL/port and transport evidence only when repository/runtime evidence establishes it;
|
|
72
|
+
- functional checks actually performed and their result;
|
|
50
73
|
- how to stop the process.
|
|
51
74
|
|
|
75
|
+
Do not equate startup, artifact identity, `/version`, or connection-only health with successful user workflows. Do not claim login, OAuth callback/provider readiness, or another functional path was verified unless that exact path was exercised successfully.
|
|
76
|
+
|
|
52
77
|
When `/run all` is explicitly supported, start only the repository-defined set of local components and make each process/endpoint visible.
|
|
53
78
|
|
|
54
79
|
When the project implements `docs/process/APPLICATION_VERSIONING.md`, prefer runtime-observed version evidence over a source-file guess. Do not synthesize a build number or claim that a static source label proves the running artifact's identity.
|
|
@@ -57,7 +82,7 @@ When the project implements `docs/process/APPLICATION_VERSIONING.md`, prefer run
|
|
|
57
82
|
|
|
58
83
|
`/run` may write a concise sanitized startup receipt under `.project-forge/logs/run/` following `docs/process/OPERATION_JOURNAL.md`.
|
|
59
84
|
|
|
60
|
-
Record startup command identity, target, timestamps, startup
|
|
85
|
+
Record selected runtime/persistence identity (without secrets), startup command identity, target, timestamps, process/startup result, persistence readiness, functional checks actually performed, observed application version/build identity, and endpoint when established. Do not duplicate or continuously capture unbounded application stdout/stderr into the Project Forge journal.
|
|
61
86
|
|
|
62
87
|
## Deployment boundary
|
|
63
88
|
|
|
@@ -66,10 +91,11 @@ Record startup command identity, target, timestamps, startup/health result, obse
|
|
|
66
91
|
It must not:
|
|
67
92
|
|
|
68
93
|
- mutate remote environments;
|
|
94
|
+
- perform setup or migration writes implicitly;
|
|
69
95
|
- publish images/packages/releases;
|
|
70
96
|
- change deployment bindings;
|
|
71
97
|
- infer Production configuration;
|
|
72
98
|
- bump or rewrite release version state;
|
|
73
99
|
- stage, commit, push, merge, or clean branches.
|
|
74
100
|
|
|
75
|
-
A successful `/run` proves only
|
|
101
|
+
A successful `/run` proves only the evidence dimensions actually observed for the selected local runtime in that session.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: start-work
|
|
3
|
-
description: Assess requirement readiness and implementation risk,
|
|
3
|
+
description: Assess requirement readiness and implementation risk, prepare and review the implementation plan when warranted, then begin bounded implementation only after the required human authorization.
|
|
4
4
|
argument-hint: "<work-item ID, external key, or concise change>"
|
|
5
5
|
user-invocable: true
|
|
6
6
|
disable-model-invocation: true
|
|
@@ -8,6 +8,22 @@ disable-model-invocation: true
|
|
|
8
8
|
|
|
9
9
|
# Start Work
|
|
10
10
|
|
|
11
|
+
## 0. Invocation and implementation boundary
|
|
12
|
+
|
|
13
|
+
`/start-work` is the orchestration entry point for preparing a work item to be implemented. Its invocation authorizes read-only context resolution, requirement-readiness assessment, risk classification, and implementation planning.
|
|
14
|
+
|
|
15
|
+
For **STANDARD** and **ELEVATED** work, invoking `/start-work` does **not** by itself authorize substantive implementation, code writes, or implementation branch setup. Those begin only after the human explicitly approves the final proposed implementation plan at the plan gate defined below.
|
|
16
|
+
|
|
17
|
+
For **LIGHT** work, there is no mandatory formal plan. The human-selected implementation action may authorize bounded implementation directly when the scope is tiny, obvious, and low-risk.
|
|
18
|
+
|
|
19
|
+
Never blur these states:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
/start-work invoked
|
|
23
|
+
≠ plan approved
|
|
24
|
+
≠ implementation authorized
|
|
25
|
+
```
|
|
26
|
+
|
|
11
27
|
## 1. Resolve the requested work
|
|
12
28
|
|
|
13
29
|
Read `.github/project-forge-workspace.json` when present.
|
|
@@ -22,6 +38,8 @@ Resolve only the context needed:
|
|
|
22
38
|
|
|
23
39
|
Do not require local briefs when the repository uses Jira/Issues. Do not invent external content.
|
|
24
40
|
|
|
41
|
+
When the host can open repository review surfaces, foreground the PRIMARY authoritative requirement/work-item artifact when human review is needed. Treat additional briefs/ADRs/design documents as CONTEXT or TRACEABILITY unless they are themselves the approval subject.
|
|
42
|
+
|
|
25
43
|
## 2. Check requirement readiness before planning
|
|
26
44
|
|
|
27
45
|
Assess:
|
|
@@ -43,7 +61,7 @@ Are material decisions unresolved?
|
|
|
43
61
|
|
|
44
62
|
If detailed precision is warranted but incomplete, recommend `/refine-requirements` or `/grill-me` rather than silently inventing behavior. `/grill-me` may remain read-only or, when the human selects its session-level reconciliation option, write resolved decisions into permitted authorities.
|
|
45
63
|
|
|
46
|
-
If local requirements are DRAFT and carry material behavior, human approval is the gate before substantive planning/implementation.
|
|
64
|
+
If local requirements are DRAFT and carry material behavior, human approval is the gate before substantive planning/implementation. Before that approval, follow `HUMAN_GATES.md`: identify and foreground the PRIMARY requirements review surface when the host supports it.
|
|
47
65
|
|
|
48
66
|
If requirements are already sufficient/approved under the configured model, do not force another refinement cycle.
|
|
49
67
|
|
|
@@ -62,7 +80,9 @@ Do not ask the human to open GitHub Settings and transcribe required-check names
|
|
|
62
80
|
Tiny, obvious, low-risk; no meaningful schema/security/concurrency/deployment/major-UX implications.
|
|
63
81
|
|
|
64
82
|
```text
|
|
65
|
-
|
|
83
|
+
human selects bounded implementation action
|
|
84
|
+
→ short-lived branch setup when appropriate
|
|
85
|
+
→ Agent
|
|
66
86
|
→ relevant checks
|
|
67
87
|
→ human meaningful-diff review
|
|
68
88
|
```
|
|
@@ -76,7 +96,8 @@ Meaningful multi-file work.
|
|
|
76
96
|
```text
|
|
77
97
|
requirements ready as needed
|
|
78
98
|
→ native plan
|
|
79
|
-
→
|
|
99
|
+
→ plan review surface foregrounded
|
|
100
|
+
→ HUMAN IMPLEMENTATION-PLAN APPROVAL
|
|
80
101
|
→ short-lived work branch setup
|
|
81
102
|
→ Agent implementation
|
|
82
103
|
→ checks
|
|
@@ -99,7 +120,9 @@ Use for:
|
|
|
99
120
|
detailed approved requirements / ADR as needed
|
|
100
121
|
→ native plan
|
|
101
122
|
→ Reviewer challenges plan
|
|
102
|
-
→
|
|
123
|
+
→ Reviewer findings reconciled into final proposed plan
|
|
124
|
+
→ final plan review surface foregrounded
|
|
125
|
+
→ HUMAN IMPLEMENTATION-PLAN APPROVAL
|
|
103
126
|
→ short-lived work branch setup
|
|
104
127
|
→ implementation in small slices
|
|
105
128
|
→ stronger verification
|
|
@@ -121,24 +144,100 @@ Relevant choices are:
|
|
|
121
144
|
|
|
122
145
|
Use a numbered text list only when structured choice UI is unavailable. For LIGHT work, do not interrupt with coaching unless requested.
|
|
123
146
|
|
|
124
|
-
## 5. Planning rules
|
|
147
|
+
## 5. Planning rules and mandatory plan gate
|
|
125
148
|
|
|
126
149
|
For STANDARD/ELEVATED work:
|
|
127
|
-
- use the editor's current native planning capability
|
|
128
|
-
- plan approach, affected areas, key decisions, risks, and verification
|
|
129
|
-
-
|
|
130
|
-
- do not
|
|
131
|
-
-
|
|
132
|
-
-
|
|
150
|
+
- use the editor's current native planning capability;
|
|
151
|
+
- plan approach, affected areas, key decisions, risks, non-scope, and verification;
|
|
152
|
+
- do not auto-launch implementation subagents while planning;
|
|
153
|
+
- do not create mandatory `spec.md` or `tasks.md`;
|
|
154
|
+
- save a durable plan only when it is useful across sessions or for genuinely complex/risky work;
|
|
155
|
+
- require explicit human plan approval before implementation or implementation branch setup.
|
|
156
|
+
|
|
157
|
+
For ELEVATED work, Reviewer challenges the proposed plan before the human approval gate. Reconcile material Reviewer findings into the final proposed plan first. The human reviews that final plan, not an earlier plan plus unresolved reviewer objections.
|
|
158
|
+
|
|
159
|
+
### Present the review surface before asking for approval
|
|
160
|
+
|
|
161
|
+
Follow the human-review-surface contract from `HUMAN_GATES.md` and `INTERACTIVE_SESSION_GUIDE.md`.
|
|
162
|
+
|
|
163
|
+
PRIMARY review subject is the final proposed implementation plan. Prefer:
|
|
164
|
+
1. the host's native plan surface when it can be foregrounded;
|
|
165
|
+
2. a durable plan document when one exists and is useful;
|
|
166
|
+
3. otherwise the full substantive plan in the conversation.
|
|
167
|
+
|
|
168
|
+
If a durable plan is a repository artifact and VS Code can invoke the Project Forge companion extension, use `projectForge.openReviewArtifact` with the exact workspace-relative path. If the host exposes a stronger native plan/review surface, use that instead.
|
|
169
|
+
|
|
170
|
+
Before rendering the gate, state explicitly:
|
|
171
|
+
|
|
172
|
+
```text
|
|
173
|
+
Implementation has NOT started.
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Then present a gate equivalent to:
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
IMPLEMENTATION PLAN REVIEW REQUIRED
|
|
180
|
+
|
|
181
|
+
Work item: <ID / key / concise change>
|
|
182
|
+
Risk: <STANDARD | ELEVATED>
|
|
183
|
+
Review subject: <native plan / exact plan path>
|
|
184
|
+
|
|
185
|
+
Plan covers:
|
|
186
|
+
- approach
|
|
187
|
+
- affected areas
|
|
188
|
+
- key technical decisions
|
|
189
|
+
- risks / mitigations
|
|
190
|
+
- verification strategy
|
|
191
|
+
- explicit non-scope
|
|
192
|
+
|
|
193
|
+
Open material decisions: <NONE | list>
|
|
194
|
+
|
|
195
|
+
Implementation has NOT started.
|
|
196
|
+
|
|
197
|
+
1. Approve plan and begin implementation [PLAN APPROVAL + CODE WRITE]
|
|
198
|
+
2. Request changes to the plan [PLAN ONLY]
|
|
199
|
+
3. Review assumptions / risks [READ ONLY]
|
|
200
|
+
4. Stop [NO ACTION]
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
When the host exposes structured choice UI, render the actions as a single-select control rather than a numbered menu while preserving the consequence labels. Do not preselect or infer `Approve plan and begin implementation` merely because the plan exists or the human invoked `/start-work`.
|
|
204
|
+
|
|
205
|
+
Only option 1 (or equivalent explicit free-text authorization) authorizes substantive implementation. Options 2-4 do not.
|
|
206
|
+
|
|
207
|
+
### Material plan changes after approval
|
|
208
|
+
|
|
209
|
+
Routine implementation details may evolve inside the approved approach. Reopen the implementation-plan gate when new evidence requires a material change to any of:
|
|
210
|
+
- architecture or major component boundaries,
|
|
211
|
+
- approved scope/non-scope,
|
|
212
|
+
- schema/data handling or migration behavior,
|
|
213
|
+
- authentication/security/authorization model,
|
|
214
|
+
- externally visible behavior or contract,
|
|
215
|
+
- major dependencies/integration strategy,
|
|
216
|
+
- verification strategy when the change materially weakens or alters the approved proof.
|
|
217
|
+
|
|
218
|
+
Before continuing, show:
|
|
219
|
+
|
|
220
|
+
```text
|
|
221
|
+
APPROVED PLAN CHANGED
|
|
222
|
+
|
|
223
|
+
Material change: ...
|
|
224
|
+
Reason: ...
|
|
225
|
+
Revised plan: ...
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Foreground the revised PRIMARY plan review surface when supported, then require renewed plan approval. Do not silently continue implementation under stale authorization.
|
|
133
229
|
|
|
134
230
|
## 6. Working branch setup
|
|
135
231
|
|
|
136
232
|
Once implementation is authorized to begin, establish the repository-appropriate short-lived work branch as routine setup before substantive edits.
|
|
137
233
|
|
|
234
|
+
For STANDARD/ELEVATED work, **plan approval is the implementation authorization boundary**. Do not create/switch the implementation branch merely because `/start-work` was invoked or a plan was produced.
|
|
235
|
+
|
|
138
236
|
Do not ask a separate branch-creation permission when all of the following are true:
|
|
139
|
-
-
|
|
140
|
-
- the
|
|
141
|
-
- the
|
|
237
|
+
- implementation is already authorized under the applicable gate;
|
|
238
|
+
- the current branch is the default/integration branch and repository policy expects short-lived work branches;
|
|
239
|
+
- the work-item boundary is clear;
|
|
240
|
+
- the target branch name is unambiguous under repository convention or the Project Forge fallback below;
|
|
142
241
|
- creating/switching branches does not require history rewriting or discarding work.
|
|
143
242
|
|
|
144
243
|
Branch naming order:
|
|
@@ -152,7 +251,7 @@ If scoped uncommitted changes already exist on the default branch and clearly be
|
|
|
152
251
|
|
|
153
252
|
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.
|
|
154
253
|
|
|
155
|
-
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.
|
|
254
|
+
For LIGHT work, branch setup is part of the human-selected implementation action. For STANDARD/ELEVATED work, it is part of the explicit approved implementation start after plan approval.
|
|
156
255
|
|
|
157
256
|
## 7. Deployment enabler
|
|
158
257
|
|
|
@@ -182,10 +281,13 @@ Return:
|
|
|
182
281
|
- CURRENT STATE,
|
|
183
282
|
- risk level and why,
|
|
184
283
|
- requirement readiness,
|
|
185
|
-
-
|
|
284
|
+
- current review subject when a human gate is pending,
|
|
285
|
+
- branch state / expected short-lived branch only after implementation is authorized or about to begin,
|
|
186
286
|
- RECOMMENDED NEXT STEP,
|
|
187
287
|
- a small set of relevant action choices.
|
|
188
288
|
|
|
189
289
|
Render mutually exclusive next actions through the host's **single-select structured choice UI** when available, following `INTERACTIVE_SESSION_GUIDE.md`. In VS Code, use the native question surface such as `vscode_askQuestions`. Make the recommended action visible when evidence supports one, include `Other / specify` or free-text only when the action set may be incomplete, and use a numbered text menu only as the no-structured-UI fallback.
|
|
190
290
|
|
|
191
|
-
|
|
291
|
+
If the workflow has reached the STANDARD/ELEVATED plan gate, stop there until the human selects an explicit plan action. Do not include an alternate implementation action that bypasses the plan gate.
|
|
292
|
+
|
|
293
|
+
Do not skip an unresolved requirement/plan gate merely because implementation is technically possible. Once implementation is explicitly approved, do not insert a separate ceremonial branch-creation gate when the branch setup is safe and deterministic.
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
# Project Forge Work Item Status
|
|
2
2
|
|
|
3
|
-
This optional local VS Code extension decorates Project Forge work-item folders in the Explorer from repository evidence.
|
|
3
|
+
This optional local VS Code extension decorates Project Forge work-item folders in the Explorer from repository evidence and provides a read-only helper for Project Forge human-review surfaces.
|
|
4
|
+
|
|
5
|
+
## Work-item status
|
|
4
6
|
|
|
5
7
|
- `●` — in progress, supported by the current work-item branch or an open pull request.
|
|
6
8
|
- `✓` — complete, supported by a merged pull request to the repository default branch.
|
|
7
9
|
- no badge — no status is asserted.
|
|
8
10
|
|
|
9
|
-
The
|
|
11
|
+
The status decoration is evidence-derived and non-authoritative. It does not rename or edit work-item folders/documents and does not maintain a second status database. It reads local Git state and, when available, GitHub CLI pull-request metadata. Project Forge's normal repository/PR/CI evidence remains authoritative.
|
|
10
12
|
|
|
11
13
|
Use **Project Forge: Refresh Work Item Status** from the Command Palette to refresh immediately. The extension also refreshes periodically and when common local Git/work-item evidence changes.
|
|
14
|
+
|
|
15
|
+
## Human review artifact helper
|
|
16
|
+
|
|
17
|
+
Project Forge workflows may use **Project Forge: Open Review Artifact** immediately before a human approval gate.
|
|
18
|
+
|
|
19
|
+
The command accepts an exact workspace-relative repository artifact path when invoked programmatically. When run manually from the Command Palette without a path, it asks for the workspace-relative path.
|
|
20
|
+
|
|
21
|
+
Behavior:
|
|
22
|
+
|
|
23
|
+
- Markdown files open in rendered Markdown Preview when available;
|
|
24
|
+
- other repository artifacts open in the normal VS Code editor preview;
|
|
25
|
+
- targets outside the currently open workspace are rejected;
|
|
26
|
+
- missing or ambiguous multi-root targets are reported rather than guessed;
|
|
27
|
+
- opening/previewing an artifact is read-only presentation and never records approval.
|
|
28
|
+
|
|
29
|
+
Project Forge should foreground only the PRIMARY review subject automatically. Supporting CONTEXT and TRACEABILITY documents remain available without stealing focus unless the human chooses to open them.
|
|
@@ -153,6 +153,138 @@ async function computeRootStatus(root) {
|
|
|
153
153
|
return { folders, statusById };
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
function canonicalExistingPath(value) {
|
|
157
|
+
try {
|
|
158
|
+
return fs.realpathSync.native
|
|
159
|
+
? fs.realpathSync.native(value)
|
|
160
|
+
: fs.realpathSync(value);
|
|
161
|
+
} catch {
|
|
162
|
+
return path.resolve(value);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function isPathInside(root, candidate) {
|
|
167
|
+
const canonicalRoot = canonicalExistingPath(root);
|
|
168
|
+
const canonicalCandidate = canonicalExistingPath(candidate);
|
|
169
|
+
const relative = path.relative(canonicalRoot, canonicalCandidate);
|
|
170
|
+
return relative === '' || (
|
|
171
|
+
relative !== '..' &&
|
|
172
|
+
!relative.startsWith(`..${path.sep}`) &&
|
|
173
|
+
!path.isAbsolute(relative)
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function reviewTargetPath(target) {
|
|
178
|
+
if (typeof target === 'string') {
|
|
179
|
+
return target.trim();
|
|
180
|
+
}
|
|
181
|
+
if (target && typeof target.fsPath === 'string') {
|
|
182
|
+
return target.fsPath;
|
|
183
|
+
}
|
|
184
|
+
if (target && typeof target.path === 'string') {
|
|
185
|
+
return target.path.trim();
|
|
186
|
+
}
|
|
187
|
+
return '';
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function isRegularFile(candidate) {
|
|
191
|
+
try {
|
|
192
|
+
return fs.statSync(candidate).isFile();
|
|
193
|
+
} catch {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
async function resolveReviewUri(target) {
|
|
199
|
+
let requested = reviewTargetPath(target);
|
|
200
|
+
if (!requested) {
|
|
201
|
+
requested = (await vscode.window.showInputBox({
|
|
202
|
+
prompt: 'Workspace-relative Project Forge review artifact path',
|
|
203
|
+
placeHolder: 'docs/work-items/.../requirements.md',
|
|
204
|
+
ignoreFocusOut: true,
|
|
205
|
+
})) || '';
|
|
206
|
+
}
|
|
207
|
+
requested = requested.trim();
|
|
208
|
+
if (!requested) {
|
|
209
|
+
return undefined;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const folders = vscode.workspace.workspaceFolders || [];
|
|
213
|
+
if (!folders.length) {
|
|
214
|
+
throw new Error('No VS Code workspace is open.');
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (path.isAbsolute(requested)) {
|
|
218
|
+
const candidate = canonicalExistingPath(requested);
|
|
219
|
+
const owner = folders.find((folder) => isPathInside(folder.uri.fsPath, candidate));
|
|
220
|
+
if (!owner) {
|
|
221
|
+
throw new Error('Review artifact must be inside the open workspace.');
|
|
222
|
+
}
|
|
223
|
+
if (!isRegularFile(candidate)) {
|
|
224
|
+
throw new Error(`Review artifact was not found: ${requested}`);
|
|
225
|
+
}
|
|
226
|
+
return vscode.Uri.file(candidate);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const matches = [];
|
|
230
|
+
for (const folder of folders) {
|
|
231
|
+
const candidate = canonicalExistingPath(path.resolve(folder.uri.fsPath, requested));
|
|
232
|
+
if (!isPathInside(folder.uri.fsPath, candidate) || !isRegularFile(candidate)) {
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
matches.push({ folder, uri: vscode.Uri.file(candidate) });
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (matches.length === 1) {
|
|
239
|
+
return matches[0].uri;
|
|
240
|
+
}
|
|
241
|
+
if (!matches.length) {
|
|
242
|
+
throw new Error(`Review artifact was not found in the open workspace: ${requested}`);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
const activeEditor = vscode.window.activeTextEditor;
|
|
246
|
+
const activeFolder = activeEditor
|
|
247
|
+
? vscode.workspace.getWorkspaceFolder(activeEditor.document.uri)
|
|
248
|
+
: undefined;
|
|
249
|
+
const activeMatch = activeFolder
|
|
250
|
+
? matches.find((entry) => entry.folder.uri.fsPath === activeFolder.uri.fsPath)
|
|
251
|
+
: undefined;
|
|
252
|
+
if (activeMatch) {
|
|
253
|
+
return activeMatch.uri;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
throw new Error(`Review artifact path is ambiguous across workspace folders: ${requested}`);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
async function openReviewArtifact(target) {
|
|
260
|
+
try {
|
|
261
|
+
const uri = await resolveReviewUri(target);
|
|
262
|
+
if (!uri) {
|
|
263
|
+
return undefined;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const extension = path.extname(uri.fsPath).toLowerCase();
|
|
267
|
+
if (extension === '.md' || extension === '.markdown') {
|
|
268
|
+
try {
|
|
269
|
+
await vscode.commands.executeCommand('markdown.showPreview', uri);
|
|
270
|
+
return uri.toString();
|
|
271
|
+
} catch {
|
|
272
|
+
// Fall back to the normal editor preview surface when Markdown preview is unavailable.
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
await vscode.commands.executeCommand('vscode.open', uri, {
|
|
277
|
+
preview: true,
|
|
278
|
+
preserveFocus: false,
|
|
279
|
+
});
|
|
280
|
+
return uri.toString();
|
|
281
|
+
} catch (error) {
|
|
282
|
+
const message = error && error.message ? error.message : String(error);
|
|
283
|
+
await vscode.window.showWarningMessage(`Project Forge review artifact: ${message}`);
|
|
284
|
+
return undefined;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
156
288
|
class WorkItemDecorationProvider {
|
|
157
289
|
constructor() {
|
|
158
290
|
this._onDidChangeFileDecorations = new vscode.EventEmitter();
|
|
@@ -238,6 +370,9 @@ function activate(context) {
|
|
|
238
370
|
context.subscriptions.push(
|
|
239
371
|
vscode.commands.registerCommand('projectForge.refreshWorkItemStatus', refresh),
|
|
240
372
|
);
|
|
373
|
+
context.subscriptions.push(
|
|
374
|
+
vscode.commands.registerCommand('projectForge.openReviewArtifact', openReviewArtifact),
|
|
375
|
+
);
|
|
241
376
|
context.subscriptions.push(
|
|
242
377
|
vscode.window.onDidChangeWindowState((event) => {
|
|
243
378
|
if (event.focused) {
|
|
@@ -271,4 +406,4 @@ function activate(context) {
|
|
|
271
406
|
|
|
272
407
|
function deactivate() {}
|
|
273
408
|
|
|
274
|
-
module.exports = { activate, deactivate };
|
|
409
|
+
module.exports = { activate, deactivate, openReviewArtifact, resolveReviewUri };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "project-forge-work-item-status",
|
|
3
3
|
"displayName": "Project Forge Work Item Status",
|
|
4
|
-
"description": "Shows evidence-backed Project Forge work-item status badges in
|
|
5
|
-
"version": "0.
|
|
4
|
+
"description": "Shows evidence-backed Project Forge work-item status badges and provides read-only review-surface helpers in VS Code.",
|
|
5
|
+
"version": "0.2.0",
|
|
6
6
|
"publisher": "project-forge",
|
|
7
7
|
"license": "UNLICENSED",
|
|
8
8
|
"engines": {
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
"keywords": [
|
|
15
15
|
"project-forge",
|
|
16
16
|
"work-items",
|
|
17
|
-
"explorer"
|
|
17
|
+
"explorer",
|
|
18
|
+
"review"
|
|
18
19
|
],
|
|
19
20
|
"activationEvents": [
|
|
20
|
-
"workspaceContains:docs/work-items/*"
|
|
21
|
+
"workspaceContains:docs/work-items/*",
|
|
22
|
+
"onCommand:projectForge.openReviewArtifact"
|
|
21
23
|
],
|
|
22
24
|
"main": "./extension.js",
|
|
23
25
|
"extensionKind": [
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
"capabilities": {
|
|
27
29
|
"untrustedWorkspaces": {
|
|
28
30
|
"supported": false,
|
|
29
|
-
"description": "The extension reads local Git state and optional GitHub CLI pull-request evidence."
|
|
31
|
+
"description": "The extension reads local Git state and optional GitHub CLI pull-request evidence, and may open workspace review artifacts on explicit Project Forge commands."
|
|
30
32
|
}
|
|
31
33
|
},
|
|
32
34
|
"contributes": {
|
|
@@ -34,6 +36,10 @@
|
|
|
34
36
|
{
|
|
35
37
|
"command": "projectForge.refreshWorkItemStatus",
|
|
36
38
|
"title": "Project Forge: Refresh Work Item Status"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"command": "projectForge.openReviewArtifact",
|
|
42
|
+
"title": "Project Forge: Open Review Artifact"
|
|
37
43
|
}
|
|
38
44
|
]
|
|
39
45
|
}
|