@mriekki/project-forge 4.13.0 → 4.13.2

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@mriekki/project-forge",
4
- "version": "4.13.0",
4
+ "version": "4.13.2",
5
5
  "defaultProfile": "greenfield-project",
6
6
  "profiles": {
7
7
  "greenfield-project": {
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "components": {
15
15
  "core": {
16
- "revision": "27f6824d1a53daa7e0c51bf286cce6767ddca3f7",
16
+ "revision": "51fc0332a7908cf8e3ebe5594e864feb5025e853",
17
17
  "version": "4.0.0",
18
18
  "distribution": "greenfield-workspace",
19
19
  "descriptor": "assets/core/distribution.json",
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@mriekki/project-forge",
4
- "version": "4.13.0",
4
+ "version": "4.13.2",
5
5
  "components": {
6
6
  "core": {
7
- "revision": "27f6824d1a53daa7e0c51bf286cce6767ddca3f7",
7
+ "revision": "51fc0332a7908cf8e3ebe5594e864feb5025e853",
8
8
  "version": "4.0.0",
9
9
  "distribution": "greenfield-workspace",
10
10
  "files": [
@@ -21,7 +21,7 @@
21
21
  {
22
22
  "source": "core/instructions/project-forge-workflow.instructions.md",
23
23
  "destination": ".github/instructions/project-forge-workflow.instructions.md",
24
- "sha256": "dd440f677c9ed476bb8b7486500d8acbe2f796272582baadd4d6a60c3d1e662c"
24
+ "sha256": "3bb0abb63dd2e7a151c432d08eca85fe604cb043a865bfa337024ebd1c372301"
25
25
  },
26
26
  {
27
27
  "source": "core/instructions/project-forge-local-development.instructions.md",
@@ -51,7 +51,7 @@
51
51
  {
52
52
  "source": "core/skills/start-work/SKILL.md",
53
53
  "destination": ".github/skills/start-work/SKILL.md",
54
- "sha256": "d7a592e64a4e64da5a9e03ee34bc4be4b1862c0d56ed5c71a657e268b4b8e9e5"
54
+ "sha256": "8a1213e59c5452feb5c8820530f6131115f88419299e42462ee5d32361d62fb6"
55
55
  },
56
56
  {
57
57
  "source": "core/skills/setup/SKILL.md",
@@ -71,12 +71,12 @@
71
71
  {
72
72
  "source": "core/skills/export-requirements/SKILL.md",
73
73
  "destination": ".github/skills/export-requirements/SKILL.md",
74
- "sha256": "dd82f05b6e2ec7ecf8e7a8592066fd8c6d623c1f184f49838b1e95eb5b53320a"
74
+ "sha256": "0206e6c754158e46aaacb9f83a7bf2af85827fe6d60fc90a4874d5633946192a"
75
75
  },
76
76
  {
77
77
  "source": "core/skills/replatform/SKILL.md",
78
78
  "destination": ".github/skills/replatform/SKILL.md",
79
- "sha256": "561796a829b9c12f8bd2e526f8fe86cbd33d258a5c6b04ca581721e07d984ca7"
79
+ "sha256": "b663ec40bb9b48f5737d8d2141a60c131196d4c496605d0a8c65285a0e7deb8f"
80
80
  },
81
81
  {
82
82
  "source": "core/skills/progress/SKILL.md",
@@ -186,7 +186,7 @@
186
186
  {
187
187
  "source": "core/process/HUMAN_GATES.md",
188
188
  "destination": "docs/process/HUMAN_IN_LOOP_GATES.md",
189
- "sha256": "edad6bd5c659a1cbc6960ce76c269547ec616505b320409b6d3152326d4beaae"
189
+ "sha256": "d884eccd7e9e04d7c81868792adebcdc7f376206786ced37d467f81fca6dbd7f"
190
190
  },
191
191
  {
192
192
  "source": "core/process/GUIDED_NEXT_STEPS.md",
@@ -196,7 +196,7 @@
196
196
  {
197
197
  "source": "core/process/INTERACTIVE_SESSION_GUIDE.md",
198
198
  "destination": "docs/process/INTERACTIVE_SESSION_GUIDE.md",
199
- "sha256": "9c4d2ef7eb974faea83dcd1c07c0684aaf351bfebe09186ef7e03cdf1c075c51"
199
+ "sha256": "f7573b9926878da3db4353db7297b66c9d907844142ae6486c7fd7580f187e3b"
200
200
  },
201
201
  {
202
202
  "source": "core/process/COACHING_GUIDE.md",
@@ -236,7 +236,7 @@
236
236
  {
237
237
  "source": "core/process/PROJECT_REQUIREMENTS_EXPORT.md",
238
238
  "destination": "docs/process/PROJECT_REQUIREMENTS_EXPORT.md",
239
- "sha256": "6ef9ecf1bb7c86b5f445554f5e630db36beee34bead2db8ff2597c148fba9c30"
239
+ "sha256": "f3e171cf466db69f46798859d9c174c177f5a1cb02bf19a3f02a66a16f5c43df"
240
240
  },
241
241
  {
242
242
  "source": "core/process/APPLICATION_VERSIONING.md",
@@ -336,17 +336,17 @@
336
336
  {
337
337
  "source": "tools/vscode_work_item_status/extension/package.json",
338
338
  "destination": "tools/project-forge-vscode/work-item-status/extension/package.json",
339
- "sha256": "09225a1d9a8a7ceebbba82aafb93a26342da10f1322949cf22061e40196e29df"
339
+ "sha256": "1dd1f7bba7f6e519ad73f1ee8ad67900cabec2ef475b1b6bc5db931ab9cd615b"
340
340
  },
341
341
  {
342
342
  "source": "tools/vscode_work_item_status/extension/extension.js",
343
343
  "destination": "tools/project-forge-vscode/work-item-status/extension/extension.js",
344
- "sha256": "b4e70183bb101d879cc0d7834c51ee4cc48683339fca2c390eb3e49a3a3acdac"
344
+ "sha256": "2688291de42fab15edd3487cc17410bf57d8358e9f606e292dc44c9cb0439009"
345
345
  },
346
346
  {
347
347
  "source": "tools/vscode_work_item_status/extension/README.md",
348
348
  "destination": "tools/project-forge-vscode/work-item-status/extension/README.md",
349
- "sha256": "b8fc17974024a84ee12f0fe43c38d379916e9e378f7c1efbf9a14da610af60e8"
349
+ "sha256": "54963b69bef2d9f763a6c92ad2c2b3105d3f10dd69542f72167de7e57db18982"
350
350
  },
351
351
  {
352
352
  "source": "tools/package/check_baseline.py",
@@ -14,13 +14,15 @@ Use proportional rigor: `LIGHT`, `STANDARD`, `ELEVATED`.
14
14
 
15
15
  Keep explicit human gates for material requirements, substantive plans, meaningful implementation acceptance, the final merge/delivery decision, and production deployment.
16
16
 
17
- Before any substantive approval gate, identify the exact PRIMARY review subject and put the best available review surface in front of the human when the host supports it. Treat supporting documents as CONTEXT or TRACEABILITY instead of opening everything. For Markdown prefer rendered preview, for structured approval artifacts prefer formatted source plus a concise summary, for implementation acceptance prefer the meaningful diff/Source Control surface, and for plans prefer the native plan surface or durable plan document. Opening or foregrounding a review surface is read-only presentation and never implies approval.
17
+ Before any substantive approval gate, identify the exact PRIMARY review subject for the current work item/scope and put the best available review surface in front of the human when the host supports it. Treat supporting documents as CONTEXT or TRACEABILITY instead of opening everything. For Markdown prefer rendered preview, for structured approval artifacts prefer formatted source plus a concise summary, for implementation acceptance prefer the meaningful diff/Source Control surface, and for plans prefer the native plan surface or durable plan document. Opening or foregrounding a review surface is read-only presentation and never implies approval.
18
18
 
19
- In VS Code, when the Project Forge companion extension is installed and the host can invoke VS Code commands, `projectForge.openReviewArtifact` may be used to foreground an exact workspace-relative repository artifact. Use a stronger native host review/diff surface when available.
19
+ Every artifact-backed approval question must carry its own work-item/scope identity, approval purpose, exact PRIMARY artifact link/path, truthful presentation status, and consequence labels. Do not rely on links in earlier commentary, editor focus, a global plan, or another work item's artifact. The artifact named in the gate must be the same artifact requested/opened for review. If automatic opening is unavailable or fails, say so inside the gate and provide the exact link/path plus a deterministic manual fallback rather than fabricating success.
20
20
 
21
- For STANDARD/ELEVATED work, invoking `/start-work` authorizes context resolution, risk assessment, and planning only. It does **not** authorize substantive implementation or implementation branch setup by itself. Produce the final proposed plan, foreground its review surface, state that implementation has not started, and require an explicit `Approve plan and begin implementation [PLAN APPROVAL + CODE WRITE]` action before code writes or routine implementation branch setup. For ELEVATED work, Reviewer challenges the plan and material findings are reconciled before the human reviews the final proposed plan.
21
+ In VS Code, when the Project Forge companion extension is installed, use the exact-path `projectForge.openReviewArtifact` command or Project Forge language-model review tool when the current host can invoke it. The helper is read-only, workspace-confined, must fail on ambiguous multi-root matches instead of guessing from editor focus, and should report actual presentation mode when available. Use a stronger native host review/diff surface when available.
22
22
 
23
- If implementation later requires a material change to the approved architecture, scope, schema/data handling, security model, externally visible behavior, major dependencies, or verification strategy, reopen the implementation-plan gate with the revised plan before continuing.
23
+ For STANDARD/ELEVATED work, invoking `/start-work` authorizes context resolution, risk assessment, and planning only. It does **not** authorize substantive implementation or implementation branch setup by itself. Produce the final proposed plan, resolve the exact work-item-specific PRIMARY artifact when one exists, foreground that exact review surface, state that implementation has not started, include the same exact artifact link/path and presentation status inside the approval question, and require an explicit `Approve plan and begin implementation [PLAN APPROVAL + CODE WRITE]` action before code writes or routine implementation branch setup. For ELEVATED work, Reviewer challenges the plan and material findings are reconciled before the human reviews the final proposed plan.
24
+
25
+ If implementation later requires a material change to the approved architecture, scope, schema/data handling, security model, externally visible behavior, major dependencies, or verification strategy, reopen the implementation-plan gate with the revised PRIMARY plan presented and linked before continuing. Stale approval does not authorize a materially changed plan.
24
26
 
25
27
  Once a bounded action is authorized, routine mechanics inside that scope should proceed without repeated ceremonial confirmation.
26
28
 
@@ -32,7 +34,7 @@ During interactive questioning, prefer concise choice-first options for genuinel
32
34
 
33
35
  When an authorized action requires a developer-owned interactive terminal prompt, follow the interactive-terminal handoff in `INTERACTIVE_SESSION_GUIDE.md`: collect any distinct bounded authorization first through the host-native structured control, then immediately provide the exact command in a standalone fenced code block, state the working directory when relevant, explain the local prompt briefly, keep passphrases/passwords/tokens/private keys local to the terminal, and say what result to report back for deterministic verification. Do not make the inability to inject terminal keystrokes the main response when a copyable command is sufficient. If the host can insert terminal text, insert only the non-secret command for human review/execution rather than silently executing the interactive step.
34
36
 
35
- Make a recommendation only when current evidence, repository policy, or a clear engineering tradeoff supports one. Mark exactly one supported choice with the host's `recommended` indicator when available and give a brief rationale. When the host does not expose recommendation metadata, append `[RECOMMENDED]` to exactly one option label and keep the rationale visible. A default/preselected option may match the recommendation, but a default alone must never communicate advice or human approval. If no option is clearly better, do not mark any option recommended and do not use a default that implies a preference. A recommendation is advice, not approval: record only the human's selected/confirmed answer. If the human asks for no recommendation on one decision, honor that for that decision only; later questions may still include evidence-backed recommendations.
37
+ Make a recommendation only when current evidence, repository policy, or a clear engineering tradeoff supports one. Mark exactly one supported choice with the host's `recommended` indicator when available and give a brief rationale. When the host does not expose recommendation metadata, append `[RECOMMENDED]` to exactly one option label and keep the rationale visible. A default/preselected option may match the recommendation, but a default alone must never communicate advice or human approval. If no option is clearly better, do not mark any option recommended and do not use a default that implies preference. A recommendation is advice, not approval: record only the human's selected/confirmed answer. If the human asks for no recommendation on one decision, honor that for that decision only; later questions may still include evidence-backed recommendations.
36
38
 
37
39
  Keep factual/environment-specific values and questions intended to elicit the human's own framing, reasoning, debugging approach, design rationale, or understanding open-ended unless options are later useful as scaffolding.
38
40
 
@@ -41,10 +41,22 @@ When the current host supports opening or foregrounding the PRIMARY review surfa
41
41
 
42
42
  Do not open every supporting document and steal focus. Open the PRIMARY surface; name CONTEXT and TRACEABILITY material explicitly and make it easy to open when needed.
43
43
 
44
- If the host cannot open the review surface automatically, provide an explicit path/link and enough concise review context that the human knows exactly what to inspect. Never imply that a path reference alone is equivalent to review.
44
+ Every artifact-backed approval question must be self-contained. The gate itself must identify:
45
+
46
+ - the specific work item or approval scope;
47
+ - the exact approval purpose/subject;
48
+ - the exact PRIMARY artifact path or clickable link that is being approved;
49
+ - presentation status when an automatic open was attempted (`rendered Markdown opened`, `editor fallback opened`, `automatic opening unavailable/failed`, or equivalent truthful evidence);
50
+ - the consequence labels for each action.
51
+
52
+ Do not rely on an artifact link in earlier commentary, the active editor, a global plan, or another work item's document. The PRIMARY artifact named in the gate must be the same artifact that was requested/opened for presentation.
53
+
54
+ If the host cannot open the review surface automatically, provide the exact path/link inside the approval question and a deterministic manual fallback. For Markdown in VS Code on Windows, the fallback may say to open that exact file and press `Ctrl+Shift+V`. Never imply that a path reference alone is equivalent to review.
45
55
 
46
56
  Opening, previewing, foregrounding, or navigating to a review surface is **read-only presentation**. It never communicates approval, authorization, or acceptance. Only the explicit gate choice does that.
47
57
 
58
+ If the PRIMARY artifact changes materially after approval, present and link the revised PRIMARY artifact before asking again. Navigation, preview, cancellation, or a `where is it?` question never preserves or creates approval for a materially changed subject.
59
+
48
60
  Do not gate routine mechanics individually after a bounded action is already authorized.
49
61
 
50
62
  Missing access to GitHub admin policy metadata is not itself a human gate. Use configured workflow/check results, PR mergeability, repository documentation, and any observable enforced policy as evidence. Do not ask the human to open GitHub Settings and transcribe branch-protection/ruleset check names merely to continue; ask only when unavailable policy information creates a material unresolved decision at merge, release, or another consequential action.
@@ -64,13 +76,18 @@ requirements/context ready
64
76
  → substantive implementation
65
77
  ```
66
78
 
67
- Before the approval choice, state unambiguously that implementation has **not** started. The gate should identify the work item, risk level, review subject, key plan coverage, and any unresolved material decisions.
79
+ Before the approval choice, state unambiguously that implementation has **not** started. The gate should identify the work item, risk level, exact review subject/artifact, presentation status, key plan coverage, and any unresolved material decisions.
68
80
 
69
81
  Use an explicit action set equivalent to:
70
82
 
71
83
  ```text
72
84
  IMPLEMENTATION PLAN REVIEW REQUIRED
73
85
 
86
+ Work item: <ID / key / concise change>
87
+ Approval subject: final proposed implementation plan
88
+ Primary artifact: <exact clickable plan link/path | native plan surface>
89
+ Presentation: <rendered Markdown opened | editor fallback opened | automatic opening unavailable/failed | native plan foregrounded>
90
+
74
91
  Implementation has NOT started.
75
92
 
76
93
  1. Approve plan and begin implementation [PLAN APPROVAL + CODE WRITE]
@@ -79,11 +96,11 @@ Implementation has NOT started.
79
96
  4. Stop [NO ACTION]
80
97
  ```
81
98
 
82
- When the host exposes structured choice UI, render these as a single-select decision instead of a numbered menu while preserving the consequence labels.
99
+ When the host exposes structured choice UI, render these as a single-select decision instead of a numbered menu while preserving the consequence labels and the same work-item/artifact context in the question itself.
83
100
 
84
101
  For ELEVATED work, Reviewer challenges the proposed plan before the human gate. Reconcile material Reviewer findings into the final proposed plan, then put that final plan in front of the human. Do not ask the human to approve an initial plan while separate Reviewer objections remain unresolved.
85
102
 
86
- After approval, routine implementation details may evolve without ceremonial re-approval. Reopen the plan gate when evidence requires a **material** change to approved architecture, scope, schema/data handling, security model, externally visible behavior, major dependencies, or verification strategy. Show what changed, why it changed, and the revised plan before implementation continues.
103
+ After approval, routine implementation details may evolve without ceremonial re-approval. Reopen the plan gate when evidence requires a **material** change to approved architecture, scope, schema/data handling, security model, externally visible behavior, major dependencies, or verification strategy. Show what changed, why it changed, and the revised plan before implementation continues. The renewed gate must link/present the revised PRIMARY artifact rather than relying on the stale approved plan.
87
104
 
88
105
  ## Implementation branch setup
89
106
 
@@ -49,10 +49,11 @@ Presentation rules:
49
49
 
50
50
  Before a substantive approval gate, follow the review-surface contract in `HUMAN_GATES.md`.
51
51
 
52
- 1. Identify the exact PRIMARY review subject.
52
+ 1. Identify the exact PRIMARY review subject for the current work item/gate.
53
53
  2. Separate supporting CONTEXT and TRACEABILITY material when useful.
54
54
  3. Put the best available PRIMARY review surface in front of the human before asking for approval.
55
- 4. Only then render the explicit approval/action choice.
55
+ 4. Capture the actual presentation result when the host reports one.
56
+ 5. Render the explicit approval/action choice with the same exact work-item/artifact identity inside the question itself.
56
57
 
57
58
  Use the host's native surface when it is stronger than prose:
58
59
 
@@ -62,16 +63,24 @@ Use the host's native surface when it is stronger than prose:
62
63
  - implementation acceptance → Source Control / meaningful diff review;
63
64
  - PR acceptance → exact PR/diff surface at the observed head.
64
65
 
65
- In VS Code, when the Project Forge companion extension is installed and the host can invoke VS Code commands, `projectForge.openReviewArtifact` is the preferred Project Forge-owned action for repository artifacts. Pass the exact workspace-relative artifact path. The command is presentation-only and must reject targets outside the open workspace. For Markdown it opens rendered preview when available; other supported artifacts open in editor preview.
66
+ In VS Code, when the Project Forge companion extension is installed and the host can invoke VS Code commands, `projectForge.openReviewArtifact` is the preferred Project Forge-owned action for repository artifacts. Pass the exact workspace-relative artifact path. The command is presentation-only and must reject targets outside the open workspace and ambiguous multi-root matches rather than guessing from editor focus.
66
67
 
67
- If the host exposes its own safe resource-opening or diff-opening capability, it may use that directly instead. Do not require the Project Forge command when the host already provides a stronger native review surface.
68
+ On hosts that expose the Project Forge language-model review tool, use it only with the exact already-resolved PRIMARY artifact path. Its result is presentation evidence, not approval. The result should distinguish resolved artifact URI, requested presentation mode, actual opened mode, cancellation, and failure/unavailable state. For Markdown, distinguish rendered Markdown from ordinary editor-preview fallback.
68
69
 
69
- Do not automatically open every supporting document. Foreground only the PRIMARY review subject and list supporting context explicitly. If automatic opening is unavailable, provide a direct path/link and state that the human must open/review it before approving.
70
+ If the host exposes its own safe resource-opening or diff-opening capability, it may use that directly instead. Do not require the Project Forge command/tool when the host already provides a stronger native review surface.
70
71
 
71
- Opening a review surface is never approval. A preview event, editor focus, file read, diff display, or navigation action is read-only presentation and must not advance a gate.
72
+ Do not automatically open every supporting document. Foreground only the PRIMARY review subject and list supporting context explicitly.
73
+
74
+ For every artifact-backed gate, put the exact artifact path/link inside the approval question itself. Do not make the human hunt through earlier commentary for the link. The question should also identify the work item, approval purpose, and truthful presentation status.
75
+
76
+ If automatic opening is unavailable or fails, say so briefly in the gate and provide a deterministic fallback. For Markdown in VS Code on Windows, tell the human to open the exact linked file and press `Ctrl+Shift+V`. Do not block planning merely because automatic opening is unavailable, and never fabricate a successful open.
77
+
78
+ Opening a review surface is never approval. A preview event, editor focus, file read, diff display, navigation action, cancellation, or `where is it?` question is read-only presentation and must not advance a gate.
72
79
 
73
80
  For an implementation-plan gate, explicitly state that implementation has **not** started before offering approval. The approval action must be distinct from plan revision/read-only review actions.
74
81
 
82
+ When the approval subject changes materially, present and link the revised PRIMARY artifact before asking again. Do not reuse stale presentation evidence or stale approval for the revised subject.
83
+
75
84
  ### Recommendations inside choices
76
85
 
77
86
  A recommendation is optional advice, not a required field and not an accepted decision.
@@ -20,6 +20,33 @@ Additional product/domain authorities may include roadmap, system-design/domain
20
20
 
21
21
  The export must retain source paths/authority/provenance so a consumer can trace normalized facts back to their repository authorities.
22
22
 
23
+ ## Canonical contract authority
24
+
25
+ Core owns the `/export-requirements` workflow and Human-in-the-Loop gate. Bootstrap owns the accepted portable-requirements schema and validator.
26
+
27
+ At the start of an export session, resolve the current stable Project Forge descriptor:
28
+
29
+ ```text
30
+ https://raw.githubusercontent.com/mriekki/project-forge-platform/main/chatgpt/current.json
31
+ ```
32
+
33
+ Use the exact immutable `generation.bootstrap.revision` selected there. Through authorized Project Forge/GitHub access, inspect that revision's canonical:
34
+
35
+ ```text
36
+ schemas/project-requirements.schema.json
37
+ tools/project_requirements.py
38
+ ```
39
+
40
+ Do not maintain a competing schema in Core and do not use remembered field shapes, generated examples, or a legacy export as structural authority.
41
+
42
+ If the stable descriptor, exact Bootstrap revision, schema, or validator cannot be resolved, stop before portable-requirements approval with:
43
+
44
+ ```text
45
+ PORTABLE REQUIREMENTS VALIDATION REQUIRED
46
+ ```
47
+
48
+ Unavailability of canonical validation is not permission to infer a compatible shape.
49
+
23
50
  ## Canonical filename and state
24
51
 
25
52
  Only this filename is canonical:
@@ -42,7 +69,7 @@ Only `approved` may be consumed as replatform input.
42
69
 
43
70
  ## Portable content model
44
71
 
45
- The export should represent, when present:
72
+ The exact JSON structure comes from the current Bootstrap schema. Within that structure, the export should represent, when present:
46
73
 
47
74
  - project/product identity;
48
75
  - problem, users/stakeholders, desired outcomes, scope/non-scope;
@@ -107,7 +134,7 @@ Examples:
107
134
 
108
135
  - a Project Blueprint may contain product/domain facts plus current technology baseline;
109
136
  - a System Design may contain portable domain invariants plus React/.NET/SQLite topology;
110
- - a UX pattern may contain portable interaction behavior plus component-library details;
137
+ - a UX pattern may contain portable interaction behavior plus component-library detail;
111
138
  - an ADR may establish both a product/security consequence and a stack-specific mechanism.
112
139
 
113
140
  Extract the portable fact, retain source traceability, and exclude/reconcile the mechanism.
@@ -128,6 +155,23 @@ Do not export as portable requirements unless the repository explicitly makes th
128
155
  - Git/PR/CI evidence;
129
156
  - Project Forge/Core/Bootstrap baseline state.
130
157
 
158
+ ## Validation and approval boundary
159
+
160
+ Create or refresh the derived artifact in `state: "review"`, then validate the exact file with the canonical Bootstrap validator from the exact revision resolved for the session.
161
+
162
+ Equivalent validation commands are:
163
+
164
+ ```text
165
+ python tools/project_requirements.py PROJECT_REQUIREMENTS.json
166
+ python tools/project_requirements.py PROJECT_REQUIREMENTS.json --require-approved
167
+ ```
168
+
169
+ The first is required before the human review/approval gate. The second is required after the bounded approval-state transition.
170
+
171
+ If review-state validation fails, repair only the derived export from existing authorities and the canonical schema, then rerun validation. Do not ask for approval until it passes.
172
+
173
+ If an older or malformed export was previously approved but does not validate now, that earlier approval does not automatically authorize a normalized replacement. Preserve the underlying source authority/maturity/provenance, produce a valid `state: "review"` artifact, and obtain a fresh human approval of that exact artifact.
174
+
131
175
  ## Replatform relationship
132
176
 
133
177
  The canonical flow is:
@@ -135,9 +179,12 @@ The canonical flow is:
135
179
  ```text
136
180
  project authorities
137
181
  → /export-requirements
182
+ → current stable Bootstrap contract resolution
138
183
  → PROJECT_REQUIREMENTS.json state=review
184
+ → canonical Bootstrap validation PASS
139
185
  → human approval
140
186
  → PROJECT_REQUIREMENTS.json state=approved
187
+ → canonical Bootstrap validation --require-approved PASS
141
188
  → /replatform <target-stack>
142
189
  → current Bootstrap catalog reconciliation
143
190
  → PROJECT_BOOTSTRAP.json state=review
@@ -28,6 +28,33 @@ It must not answer:
28
28
 
29
29
  > Which framework, language, ORM, build tool, folder layout, or CI implementation should the next repository use?
30
30
 
31
+ ## Canonical Bootstrap contract preflight
32
+
33
+ Before constructing or refreshing `PROJECT_REQUIREMENTS.json`, resolve the current stable Project Forge descriptor from:
34
+
35
+ ```text
36
+ https://raw.githubusercontent.com/mriekki/project-forge-platform/main/chatgpt/current.json
37
+ ```
38
+
39
+ Use the exact `generation.bootstrap.revision` from that descriptor as the Bootstrap contract authority for this export session. Do not use a remembered schema, an older generated example, or this skill's prose as a substitute for the current Bootstrap-owned portable-requirements contract.
40
+
41
+ Through the authorized Project Forge/GitHub access available in the current host, inspect the canonical Bootstrap portable-requirements schema and validator from that exact immutable revision, including:
42
+
43
+ ```text
44
+ schemas/project-requirements.schema.json
45
+ tools/project_requirements.py
46
+ ```
47
+
48
+ Bootstrap owns the schema/validator. Core owns this orchestration. Do not copy the Bootstrap schema into Core, invent a parallel validator, or infer a compatibility transform for a shape that the canonical validator rejects.
49
+
50
+ If the stable descriptor, exact Bootstrap revision, canonical schema, or canonical validator cannot be resolved and inspected, stop with:
51
+
52
+ ```text
53
+ PORTABLE REQUIREMENTS VALIDATION REQUIRED
54
+ ```
55
+
56
+ Do not create an approval-ready export and do not ask for portable-requirements approval while canonical validation is unavailable.
57
+
31
58
  ## Source model
32
59
 
33
60
  Start from the workspace's declared authority model. In a normal generated Project Forge workspace, inspect as applicable:
@@ -100,15 +127,35 @@ Do not export as portable requirements:
100
127
  - implementation plans, code, review history, branch/PR/CI evidence;
101
128
  - generated Project Forge/Core provenance.
102
129
 
103
- ## Artifact state and human gate
130
+ ## Canonical validation before human review
131
+
132
+ Default `/export-requirements` writes or refreshes `PROJECT_REQUIREMENTS.json` with `state: "review"` and exact source repository/commit provenance, using the current Bootstrap schema as the structural contract.
133
+
134
+ Before presenting any approval question, validate that exact file with the canonical Bootstrap validator from the exact revision resolved during preflight. The equivalent canonical invocation is:
135
+
136
+ ```text
137
+ python tools/project_requirements.py <path-to-PROJECT_REQUIREMENTS.json>
138
+ ```
139
+
140
+ The actual invocation path may differ by host, but the validator implementation and Bootstrap revision must be the same canonical ones resolved during preflight.
141
+
142
+ If validation fails:
104
143
 
105
- Default `/export-requirements` writes or refreshes `PROJECT_REQUIREMENTS.json` with `state: "review"` and exact source repository/commit provenance.
144
+ 1. report the validator errors;
145
+ 2. repair only the derived export using existing source authorities and the canonical schema;
146
+ 3. preserve source authority, maturity, provenance, open decisions, and non-authorizing roadmap intent;
147
+ 4. rerun canonical validation;
148
+ 5. do not ask for approval until validation passes.
106
149
 
107
- Before calling it approved, present a compact reconciliation summary:
150
+ Do not silently reinterpret a rejected legacy/export shape, rename fields from memory, promote unresolved decisions, or treat prior human approval of structurally different JSON as approval of a normalized replacement.
151
+
152
+ Before calling a valid export approved, present a compact reconciliation summary:
108
153
 
109
154
  ```text
110
155
  PROJECT REQUIREMENTS EXPORT
111
156
 
157
+ Bootstrap revision: <exact revision>
158
+ Canonical validation: PASS
112
159
  Preserved product/features: ...
113
160
  Preserved domain rules: ...
114
161
  Preserved UX/cross-cutting constraints: ...
@@ -120,7 +167,7 @@ Items requiring reconciliation: ...
120
167
  Then make the artifact itself the PRIMARY review subject. Before asking for approval:
121
168
  1. identify `PROJECT_REQUIREMENTS.json` explicitly;
122
169
  2. foreground/open the formatted JSON in the best available editor/preview surface when the host supports it;
123
- 3. keep source authorities as CONTEXT/TRACEABILITY rather than opening them all;
170
+ 3. keep source authorities and Bootstrap validation evidence as CONTEXT/TRACEABILITY rather than opening them all;
124
171
  4. only then ask the approval question.
125
172
 
126
173
  In VS Code, when available, use `projectForge.openReviewArtifact` with `PROJECT_REQUIREMENTS.json`. Opening the file is read-only presentation and never changes its state.
@@ -133,6 +180,7 @@ HUMAN REVIEW REQUIRED
133
180
  Gate: PORTABLE REQUIREMENTS APPROVAL
134
181
  Primary artifact: PROJECT_REQUIREMENTS.json
135
182
  Opened: formatted editor preview / <fallback surface>
183
+ Canonical Bootstrap validation: PASS @ <exact revision>
136
184
  Items requiring reconciliation: NONE / list
137
185
 
138
186
  Approve PROJECT_REQUIREMENTS.json as the portable requirements baseline?
@@ -140,7 +188,13 @@ Approve PROJECT_REQUIREMENTS.json as the portable requirements baseline?
140
188
 
141
189
  Only explicit human approval may set `state: "approved"`.
142
190
 
143
- `/export-requirements approve` may perform only that bounded finalization after confirming the reviewed content/evidence has not materially changed. If the artifact changed materially since review, reopen the review surface and require approval again.
191
+ `/export-requirements approve` may perform only that bounded finalization after confirming the reviewed content/evidence has not materially changed. After changing `state` to `approved`, rerun the same canonical Bootstrap validator with the equivalent of:
192
+
193
+ ```text
194
+ python tools/project_requirements.py <path-to-PROJECT_REQUIREMENTS.json> --require-approved
195
+ ```
196
+
197
+ If final validation fails, restore/report review state as applicable and do not claim the portable baseline is approved. If the artifact changed materially since review for any reason beyond the bounded approval-state transition, reopen the review surface and require approval again.
144
198
 
145
199
  ## Safety and scope
146
200
 
@@ -22,6 +22,10 @@ PROJECT_REQUIREMENTS.json
22
22
 
23
23
  The file must be `state: "approved"`. Do not accept alternate/legacy requirements-export filenames or infer approval from file existence.
24
24
 
25
+ Before consuming the export, validate it with the canonical Bootstrap portable-requirements validator from the exact current stable Bootstrap revision. If it fails canonical validation, stop and route back through `/export-requirements`; do not normalize, translate, alias, or repair the input inside `/replatform`.
26
+
27
+ A previously human-approved file that does not validate against the canonical portable contract is not valid replatform input until a canonical `state: "review"` export is produced and explicitly approved again.
28
+
25
29
  If the export is missing or stale relative to material source-requirement changes, use `/export-requirements` first.
26
30
 
27
31
  ## Target
@@ -88,7 +92,7 @@ Never:
88
92
  Use the current canonical Bootstrap replatform tooling when available. The expected deterministic boundary is:
89
93
 
90
94
  ```text
91
- approved PROJECT_REQUIREMENTS.json
95
+ approved + canonically valid PROJECT_REQUIREMENTS.json
92
96
  + requested current catalog recipe/stack
93
97
  + target repository identity
94
98
  → PROJECT_BOOTSTRAP.json state=review
@@ -104,6 +108,7 @@ Before generation, summarize at minimum:
104
108
  SOURCE REQUIREMENTS
105
109
  source repository/commit
106
110
  portable requirements export provenance
111
+ canonical Bootstrap validation evidence
107
112
 
108
113
  PRESERVED
109
114
  product/features/domain/UX/cross-cutting intent
@@ -165,7 +165,11 @@ PRIMARY review subject is the final proposed implementation plan. Prefer:
165
165
  2. a durable plan document when one exists and is useful;
166
166
  3. otherwise the full substantive plan in the conversation.
167
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.
168
+ If a durable plan is a repository artifact, resolve its exact work-item-specific path from the current work-item authority/gate state before opening it. Do not select a global plan, another work item's artifact, or a focus-derived file.
169
+
170
+ In VS Code, when the Project Forge companion review command/tool is available, request presentation of that exact artifact. Record the actual presentation outcome when the host reports one, including rendered Markdown vs editor fallback vs unavailable/failed. If the host exposes a stronger native plan/review surface, use that instead.
171
+
172
+ If automatic opening is unavailable or fails, keep the gate usable: include the exact plan link/path inside the question and provide a deterministic manual fallback. For Markdown in VS Code on Windows, tell the human to open the exact linked file and press `Ctrl+Shift+V`.
169
173
 
170
174
  Before rendering the gate, state explicitly:
171
175
 
@@ -180,7 +184,9 @@ IMPLEMENTATION PLAN REVIEW REQUIRED
180
184
 
181
185
  Work item: <ID / key / concise change>
182
186
  Risk: <STANDARD | ELEVATED>
183
- Review subject: <native plan / exact plan path>
187
+ Approval subject: final proposed implementation plan
188
+ Primary artifact: <exact clickable work-item plan link/path | native plan surface>
189
+ Presentation: <rendered Markdown opened | editor fallback opened | automatic opening unavailable/failed | native plan foregrounded>
184
190
 
185
191
  Plan covers:
186
192
  - approach
@@ -200,9 +206,11 @@ Implementation has NOT started.
200
206
  4. Stop [NO ACTION]
201
207
  ```
202
208
 
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`.
209
+ The exact PRIMARY artifact link/path must be present in the approval question itself; do not rely on a link in earlier commentary. The artifact named in the gate must be the same artifact requested/opened for presentation.
210
+
211
+ 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 and the same work-item/artifact context in the question. Do not preselect or infer `Approve plan and begin implementation` merely because the plan exists, was opened, or the human invoked `/start-work`.
204
212
 
205
- Only option 1 (or equivalent explicit free-text authorization) authorizes substantive implementation. Options 2-4 do not.
213
+ Only option 1 (or equivalent explicit free-text authorization) authorizes substantive implementation. Options 2-4 do not. Preview, navigation, cancellation, or a question asking where the plan is never counts as approval.
206
214
 
207
215
  ### Material plan changes after approval
208
216
 
@@ -222,10 +230,11 @@ APPROVED PLAN CHANGED
222
230
 
223
231
  Material change: ...
224
232
  Reason: ...
225
- Revised plan: ...
233
+ Revised PRIMARY artifact: <exact revised plan link/path | native plan surface>
234
+ Presentation: <actual presentation evidence>
226
235
  ```
227
236
 
228
- Foreground the revised PRIMARY plan review surface when supported, then require renewed plan approval. Do not silently continue implementation under stale authorization.
237
+ Foreground the revised PRIMARY plan review surface when supported, then require renewed plan approval using the revised exact link/path inside the question. Do not silently continue implementation under stale authorization or reuse stale presentation evidence.
229
238
 
230
239
  ## 6. Working branch setup
231
240
 
@@ -1,6 +1,6 @@
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 and provides a read-only helper for Project Forge human-review surfaces.
3
+ This optional local VS Code extension decorates Project Forge work-item folders in the Explorer from repository evidence and provides read-only helpers for Project Forge human-review surfaces.
4
4
 
5
5
  ## Work-item status
6
6
 
@@ -18,12 +18,16 @@ Project Forge workflows may use **Project Forge: Open Review Artifact** immediat
18
18
 
19
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
20
 
21
+ On VS Code hosts that support the Language Model Tool API, the extension also contributes the read-only `projectForge_openReviewArtifact` tool so an agent can request the same exact presentation operation without arbitrary command execution. Older supported VS Code hosts keep the command/manual fallback.
22
+
21
23
  Behavior:
22
24
 
23
- - Markdown files open in rendered Markdown Preview when available;
25
+ - Markdown files request rendered Markdown Preview first;
26
+ - when Markdown Preview is unavailable, the helper reports that fact and falls back to normal editor preview;
24
27
  - other repository artifacts open in the normal VS Code editor preview;
25
28
  - targets outside the currently open workspace are rejected;
26
- - missing or ambiguous multi-root targets are reported rather than guessed;
29
+ - missing or ambiguous multi-root targets are reported rather than guessed from active editor focus;
30
+ - the presentation result distinguishes the resolved URI, requested mode, actual opened mode, cancellation, and failure;
27
31
  - opening/previewing an artifact is read-only presentation and never records approval.
28
32
 
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.
33
+ Project Forge should foreground only the exact PRIMARY review subject automatically. Supporting CONTEXT and TRACEABILITY documents remain available without stealing focus unless the human chooses to open them. The approval question itself must still identify and link the same artifact; a successful open is presentation evidence only.
@@ -13,6 +13,7 @@ const ID_FROM_NAME = /^([A-Za-z][A-Za-z0-9]*-\d+)(?:-|$)/;
13
13
  const ID_FROM_BRANCH = /(?:^|\/)([A-Za-z][A-Za-z0-9]*-\d+)(?:-|\/|$)/i;
14
14
  const MARKER = /<!--\s*project-forge-work-item:\s*([A-Za-z][A-Za-z0-9]*-\d+)\s*-->/gi;
15
15
  const REFRESH_INTERVAL_MS = 120000;
16
+ const REVIEW_TOOL_NAME = 'projectForge_openReviewArtifact';
16
17
 
17
18
  function normalizeId(value) {
18
19
  return value ? value.toUpperCase() : undefined;
@@ -242,32 +243,42 @@ async function resolveReviewUri(target) {
242
243
  throw new Error(`Review artifact was not found in the open workspace: ${requested}`);
243
244
  }
244
245
 
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
246
  throw new Error(`Review artifact path is ambiguous across workspace folders: ${requested}`);
257
247
  }
258
248
 
259
- async function openReviewArtifact(target) {
249
+ function requestedReviewMode(uri) {
250
+ const extension = path.extname(uri.fsPath).toLowerCase();
251
+ return extension === '.md' || extension === '.markdown'
252
+ ? 'markdown-preview'
253
+ : 'editor-preview';
254
+ }
255
+
256
+ async function presentReviewArtifact(target, options = {}) {
257
+ const notify = options.notify !== false;
258
+ let uri;
260
259
  try {
261
- const uri = await resolveReviewUri(target);
260
+ uri = await resolveReviewUri(target);
262
261
  if (!uri) {
263
- return undefined;
262
+ return {
263
+ status: 'cancelled',
264
+ uri: null,
265
+ requestedMode: null,
266
+ openedMode: null,
267
+ message: 'No review artifact was selected.',
268
+ };
264
269
  }
265
270
 
266
- const extension = path.extname(uri.fsPath).toLowerCase();
267
- if (extension === '.md' || extension === '.markdown') {
271
+ const requestedMode = requestedReviewMode(uri);
272
+ if (requestedMode === 'markdown-preview') {
268
273
  try {
269
274
  await vscode.commands.executeCommand('markdown.showPreview', uri);
270
- return uri.toString();
275
+ return {
276
+ status: 'opened',
277
+ uri: uri.toString(),
278
+ requestedMode,
279
+ openedMode: 'rendered-markdown',
280
+ message: 'Rendered Markdown preview opened.',
281
+ };
271
282
  } catch {
272
283
  // Fall back to the normal editor preview surface when Markdown preview is unavailable.
273
284
  }
@@ -277,11 +288,40 @@ async function openReviewArtifact(target) {
277
288
  preview: true,
278
289
  preserveFocus: false,
279
290
  });
280
- return uri.toString();
291
+ return {
292
+ status: 'opened',
293
+ uri: uri.toString(),
294
+ requestedMode,
295
+ openedMode: 'editor-preview',
296
+ message: requestedMode === 'markdown-preview'
297
+ ? 'Rendered Markdown preview was unavailable; editor preview opened instead.'
298
+ : 'Editor preview opened.',
299
+ };
281
300
  } catch (error) {
282
301
  const message = error && error.message ? error.message : String(error);
283
- await vscode.window.showWarningMessage(`Project Forge review artifact: ${message}`);
284
- return undefined;
302
+ if (notify) {
303
+ await vscode.window.showWarningMessage(`Project Forge review artifact: ${message}`);
304
+ }
305
+ return {
306
+ status: 'failed',
307
+ uri: uri ? uri.toString() : null,
308
+ requestedMode: uri ? requestedReviewMode(uri) : null,
309
+ openedMode: null,
310
+ message,
311
+ };
312
+ }
313
+ }
314
+
315
+ async function openReviewArtifact(target) {
316
+ return presentReviewArtifact(target, { notify: true });
317
+ }
318
+
319
+ class OpenReviewArtifactTool {
320
+ async invoke(options) {
321
+ const result = await presentReviewArtifact(options && options.input, { notify: false });
322
+ return new vscode.LanguageModelToolResult([
323
+ new vscode.LanguageModelTextPart(JSON.stringify(result)),
324
+ ]);
285
325
  }
286
326
  }
287
327
 
@@ -373,6 +413,18 @@ function activate(context) {
373
413
  context.subscriptions.push(
374
414
  vscode.commands.registerCommand('projectForge.openReviewArtifact', openReviewArtifact),
375
415
  );
416
+
417
+ if (
418
+ vscode.lm &&
419
+ typeof vscode.lm.registerTool === 'function' &&
420
+ typeof vscode.LanguageModelToolResult === 'function' &&
421
+ typeof vscode.LanguageModelTextPart === 'function'
422
+ ) {
423
+ context.subscriptions.push(
424
+ vscode.lm.registerTool(REVIEW_TOOL_NAME, new OpenReviewArtifactTool()),
425
+ );
426
+ }
427
+
376
428
  context.subscriptions.push(
377
429
  vscode.window.onDidChangeWindowState((event) => {
378
430
  if (event.focused) {
@@ -406,4 +458,10 @@ function activate(context) {
406
458
 
407
459
  function deactivate() {}
408
460
 
409
- module.exports = { activate, deactivate, openReviewArtifact, resolveReviewUri };
461
+ module.exports = {
462
+ activate,
463
+ deactivate,
464
+ openReviewArtifact,
465
+ presentReviewArtifact,
466
+ resolveReviewUri,
467
+ };
@@ -2,7 +2,7 @@
2
2
  "name": "project-forge-work-item-status",
3
3
  "displayName": "Project Forge Work Item Status",
4
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",
5
+ "version": "0.3.0",
6
6
  "publisher": "project-forge",
7
7
  "license": "UNLICENSED",
8
8
  "engines": {
@@ -19,7 +19,8 @@
19
19
  ],
20
20
  "activationEvents": [
21
21
  "workspaceContains:docs/work-items/*",
22
- "onCommand:projectForge.openReviewArtifact"
22
+ "onCommand:projectForge.openReviewArtifact",
23
+ "onLanguageModelTool:projectForge_openReviewArtifact"
23
24
  ],
24
25
  "main": "./extension.js",
25
26
  "extensionKind": [
@@ -41,6 +42,29 @@
41
42
  "command": "projectForge.openReviewArtifact",
42
43
  "title": "Project Forge: Open Review Artifact"
43
44
  }
45
+ ],
46
+ "languageModelTools": [
47
+ {
48
+ "name": "projectForge_openReviewArtifact",
49
+ "displayName": "Open Project Forge Review Artifact",
50
+ "canBeReferencedInPrompt": true,
51
+ "toolReferenceName": "projectForgeReviewArtifact",
52
+ "userDescription": "Open an exact workspace review artifact using the safest read-only review surface available.",
53
+ "modelDescription": "Use immediately before a Project Forge artifact-based human approval gate when the exact review artifact path is already known. Opens only that exact workspace-contained file and returns structured presentation evidence. It never approves, edits, commits, or guesses an ambiguous target.",
54
+ "inputSchema": {
55
+ "type": "object",
56
+ "properties": {
57
+ "path": {
58
+ "type": "string",
59
+ "description": "Exact workspace-relative or absolute workspace-contained path of the PRIMARY review artifact. Do not infer it from editor focus."
60
+ }
61
+ },
62
+ "required": [
63
+ "path"
64
+ ],
65
+ "additionalProperties": false
66
+ }
67
+ }
44
68
  ]
45
69
  }
46
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mriekki/project-forge",
3
- "version": "4.13.0",
3
+ "version": "4.13.2",
4
4
  "description": "Public consumer distribution and updater for Project Forge engineering assets.",
5
5
  "type": "module",
6
6
  "bin": {