@t275005746/gse 0.1.1 → 0.1.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.
Files changed (84) hide show
  1. package/.gse/state.json +147 -26
  2. package/CHANGELOG.md +19 -3
  3. package/README.md +13 -6
  4. package/README.zh-CN.md +13 -6
  5. package/SKILL.md +32 -12
  6. package/assets/templates/dispatch-packet.md +22 -14
  7. package/assets/templates/evidence.md +11 -5
  8. package/assets/templates/role-fallback-packet.md +49 -0
  9. package/package.json +18 -10
  10. package/references/agent-roles.md +41 -20
  11. package/references/commands.md +74 -45
  12. package/references/drift-audit.md +2 -1
  13. package/references/evidence-taxonomy.md +46 -9
  14. package/references/file-ownership.md +17 -13
  15. package/references/final-form-roadmap.md +201 -0
  16. package/references/final-readiness.md +3 -3
  17. package/references/host-adapters.md +38 -10
  18. package/references/learning-system.md +24 -8
  19. package/references/maintenance-cadence.md +51 -0
  20. package/references/project-guards.md +52 -0
  21. package/references/quality-gates.md +18 -11
  22. package/references/role-dispatch-fallback.md +54 -0
  23. package/references/tool-adapters.md +13 -3
  24. package/scripts/audit-close-gate-hardening.mjs +188 -0
  25. package/scripts/audit-close-gate.mjs +219 -33
  26. package/scripts/audit-command-execution.mjs +30 -17
  27. package/scripts/audit-commands.mjs +7 -5
  28. package/scripts/audit-completion-plan-drill.mjs +230 -0
  29. package/scripts/audit-completion-readiness.mjs +9 -6
  30. package/scripts/audit-continue-preflight.mjs +234 -0
  31. package/scripts/audit-evidence-levels.mjs +217 -0
  32. package/scripts/audit-evidence-review-queue.mjs +206 -0
  33. package/scripts/audit-final-acceptance-packet.mjs +9 -9
  34. package/scripts/audit-final-form-progress-report.mjs +19 -18
  35. package/scripts/audit-final-form-roadmap.mjs +157 -0
  36. package/scripts/audit-final-form-stale-copy.mjs +2 -2
  37. package/scripts/audit-final-readiness.mjs +3 -3
  38. package/scripts/audit-fresh-session-readiness.mjs +1 -1
  39. package/scripts/audit-host-capabilities.mjs +237 -0
  40. package/scripts/audit-installed-sync.mjs +203 -0
  41. package/scripts/audit-learning-drift.mjs +292 -0
  42. package/scripts/audit-learning-promotion.mjs +351 -0
  43. package/scripts/audit-learning-system.mjs +24 -14
  44. package/scripts/audit-local-final-form-completion.mjs +11 -10
  45. package/scripts/audit-maintenance-cadence.mjs +139 -0
  46. package/scripts/audit-maintenance-snapshot.mjs +181 -0
  47. package/scripts/audit-npm-package-metadata.mjs +8 -2
  48. package/scripts/audit-npm-publish-dry-run.mjs +10 -4
  49. package/scripts/audit-npm-tarball-install.mjs +9 -3
  50. package/scripts/audit-owner-external-gate-kit.mjs +12 -11
  51. package/scripts/audit-project-guards.mjs +189 -0
  52. package/scripts/audit-project.mjs +14 -11
  53. package/scripts/audit-public-acceptance-handoff.mjs +10 -10
  54. package/scripts/audit-public-acceptance-readiness.mjs +6 -6
  55. package/scripts/audit-public-release-checklist.mjs +17 -15
  56. package/scripts/audit-release-bundle.mjs +13 -11
  57. package/scripts/audit-release-owner-action-plan-drill.mjs +5 -4
  58. package/scripts/audit-release-owner-action-plan.mjs +10 -10
  59. package/scripts/audit-release-status-manifest.mjs +4 -4
  60. package/scripts/audit-roadmap-consistency.mjs +11 -7
  61. package/scripts/audit-role-dispatch-fallback.mjs +212 -0
  62. package/scripts/audit-session-sync.mjs +127 -0
  63. package/scripts/audit-state-freshness.mjs +6 -5
  64. package/scripts/audit-state-repair.mjs +360 -0
  65. package/scripts/audit-target-hardening-drills.mjs +267 -0
  66. package/scripts/audit-tool-fallback-policy.mjs +180 -0
  67. package/scripts/audit-ui-browser-evidence-policy.mjs +191 -0
  68. package/scripts/audit-validation-profiles.mjs +6 -4
  69. package/scripts/backfill-evidence-levels.mjs +98 -0
  70. package/scripts/check-encoding.mjs +72 -0
  71. package/scripts/generate-continue-packet.mjs +1214 -0
  72. package/scripts/generate-final-acceptance-packet.mjs +23 -8
  73. package/scripts/generate-final-form-progress-report.mjs +25 -23
  74. package/scripts/generate-host-runtime-evidence-handoff.mjs +23 -16
  75. package/scripts/generate-maintenance-snapshot.mjs +216 -0
  76. package/scripts/generate-public-acceptance-handoff.mjs +26 -14
  77. package/scripts/generate-release-owner-action-plan.mjs +4 -3
  78. package/scripts/generate-release-status-manifest.mjs +4 -3
  79. package/scripts/init-project.mjs +144 -63
  80. package/scripts/record-learning.mjs +37 -8
  81. package/scripts/record-session-sync.mjs +87 -0
  82. package/scripts/run-gse-command.mjs +79 -47
  83. package/scripts/run-validation-profile.mjs +24 -5
  84. package/scripts/validate-gse.mjs +216 -0
@@ -19,9 +19,10 @@ node <gse-skill>/scripts/run-gse-command.mjs --target <gse-skill> --command "/gs
19
19
  node <gse-skill>/scripts/run-gse-command.mjs --target <gse-skill> --command "/gse probe --public-repo-url __PUBLIC_REPO_URL__" --json
20
20
  node <gse-skill>/scripts/run-gse-command.mjs --target <gse-skill> --command "/gse package" --json
21
21
  node <gse-skill>/scripts/run-gse-command.mjs --target <gse-skill> --command "/gse install --source __PACKAGE_DIR__ --install-target __INSTALL_SKILL_DIR__" --json
22
- node <gse-skill>/scripts/run-gse-command.mjs --target <gse-skill> --command "/gse public-release" --json
23
- node <gse-skill>/scripts/run-gse-command.mjs --target <project-root> --command "/gse learn --summary __LESSON__" --execute --json
24
- ```
22
+ node <gse-skill>/scripts/run-gse-command.mjs --target <gse-skill> --command "/gse public-release" --json
23
+ node <gse-skill>/scripts/run-gse-command.mjs --target <project-root> --command "/gse learn --summary __LESSON__" --execute --json
24
+ node <gse-skill>/scripts/run-gse-command.mjs --target <project-root> --command "/gse repair" --json
25
+ ```
25
26
 
26
27
  Validation profile helper:
27
28
 
@@ -44,22 +45,24 @@ The Claude adapter writes `.claude/commands/gse.md`, matching Claude Code's docu
44
45
  | `/gse help` | Show available GSE commands and the current project entry files | Command help | `SKILL.md`, `references/commands.md` | none or file inspection |
45
46
  | `/gse init` | Initialize `.gse/` in a new project | Project bootstrap | project rules, `project-bootstrap.md` | scaffold file check |
46
47
  | `/gse adopt` | Adopt GSE in an existing project without overwriting local rules | Project adoption | project rules, `adoption-recipes.md`, `project-profile.md` | discovery or adoption smoke |
47
- | `/gse continue` | Continue the current project from its goal map or canonical plan | Execute workflow | project rules, `.gse/project-profile.md`, goal map or canonical plan | focused test/smoke for the slice |
48
- | `/gse status` | Show current project state; for the GSE skill, show final-form progress and remaining public/host blockers | Status workflow | `.gse/state.json`; for GSE skill, final readiness audits | state/report inspection |
49
- | `/gse doctor` | Diagnose public/host acceptance blockers for the GSE skill, or target-project GSE readiness for normal projects | Final acceptance or project doctor | final readiness matrix, `.gse/state.json`, project profile | public acceptance doctor or target project doctor |
50
- | `/gse acceptance` | Alias for `/gse doctor` when the user wants final acceptance boundaries | Final acceptance doctor | final readiness matrix and owner/external evidence records | public acceptance doctor |
48
+ | `/gse continue` | Continue the current project through a hard preflight and compact state packet | Execute workflow | project rules, `.gse/state.json`, evidence index, `.gse/project-profile.md`, quality gates, goal map or canonical plan | continue preflight plus focused test/smoke for the slice |
49
+ | `/gse status` | Show current project state; for the GSE skill, show final-form progress and pending public/host claim evidence | Status workflow | `.gse/state.json`; for GSE skill, final readiness audits | state/report inspection |
50
+ | `/gse doctor` | Diagnose public/host claim evidence for the GSE skill, or target-project GSE readiness for normal projects | Final acceptance or project doctor | final readiness matrix, `.gse/state.json`, project profile | public acceptance doctor or target project doctor |
51
+ | `/gse repair` | Diagnose or repair stale state, broken evidence JSONL, and overlong residual risks | State/evidence repair workflow | `.gse/state.json`, `.gse/evidence/index.jsonl`, latest evidence files | state repair audit; optional execute-gated residual risk compaction |
52
+ | `/gse acceptance` | Alias for `/gse doctor` when the user wants final acceptance boundaries | Final acceptance doctor | final readiness matrix and owner/external evidence records | public acceptance doctor |
51
53
  | `/gse owner-actions` | Show the remaining owner/external actions required before the GSE skill can claim public acceptance | Owner/external action packet | final readiness matrix and public acceptance doctor | owner action command smoke |
52
54
  | `/gse probe` | Probe supplied owner/external evidence locations before accepted records are written | Public external gate probe | public repo/security/CI/registry/marketplace/host evidence inputs | public external gate probe audit |
53
55
  | `/gse release` | Dry-run or generate the GSE release bundle for open-source/package handoff | Release bundle workflow | release metadata, package snapshot, acceptance handoff, owner/external kit | release bundle audit |
54
56
  | `/gse package` | Dry-run or generate a local installable GSE package | Package workflow | package label and output directory | package manifest or distribution audit |
55
- | `/gse install` | Dry-run or install GSE from a local package path or URL-shaped package source | Install workflow | package source and install target | install dry-run or installed CLI smoke |
56
- | `/gse public-release` | Dry-run or generate the ordered public release checklist for owner execution | Public release checklist workflow | release status manifest and pending owner/external gates | public release checklist audit |
57
- | `/gse change` | Create or normalize a GSE change spec pack | Spec workflow | change id, task level, goal map | change folder structure check |
57
+ | `/gse install` | Dry-run or install GSE from a local package path or URL-shaped package source | Install workflow | package source and install target | install dry-run or installed CLI smoke |
58
+ | `/gse public-release` | Dry-run or generate the ordered public release checklist for owner execution | Public release checklist workflow | release status manifest and pending owner/external gates | public release checklist audit |
59
+ | `/gse maintenance` | Audit recurring maintenance coverage for benchmark, drift, security, forward-test, target drills, public acceptance, and installed sync | Maintenance workflow | `maintenance-cadence.md`, validation profile, current final-form state | maintenance cadence audit |
60
+ | `/gse change` | Create or normalize a GSE change spec pack | Spec workflow | change id, task level, goal map | change folder structure check |
58
61
  | `/gse slice` | Define or normalize outcome, scope, acceptance, evidence, risk, and next action | Spec workflow | `goal-map.md`, `spec-workflow.md`, `quality-gates.md` | structural check |
59
62
  | `/gse verify` | Run the smallest verification that proves the current slice | Verification gate | `quality-gates.md`, project profile, evidence taxonomy | focused test/API/browser smoke |
60
- | `/gse learn` | Record a reusable lesson in `.gse/learnings.md` | Learning workflow | summary, trigger, source, optional impact | learning command audit |
63
+ | `/gse learn` | Record a reusable lesson in `.gse/learnings.md`; with `--promote`, classify repeated lessons into promotion candidates | Learning workflow | summary, trigger, source, optional impact, optional `--promote` | learning command and promotion audits |
61
64
  | `/gse audit` | Check workflow drift, stale claims, missing evidence, or too-heavy process | Audit workflow | `benchmark-audit.md`, `drift-audit.md`, project profile | audit script or checklist |
62
- | `/gse close` | Check whether the current slice is ready to close | Close readiness check | `.gse/state.json`, evidence index, quality gates | close gate audit |
65
+ | `/gse close` | Check whether the current slice is ready to close | Close readiness check | `.gse/state.json`, evidence index, quality gates, role fallback packets, git status | close gate audit |
63
66
 
64
67
  ## Aliases
65
68
 
@@ -68,17 +71,19 @@ The Claude adapter writes `.claude/commands/gse.md`, matching Claude Code's docu
68
71
  - `gse adopt` -> `/gse adopt`
69
72
  - `gse continue` -> `/gse continue`
70
73
  - `gse next` -> `/gse continue`
71
- - `gse status` -> `/gse status`
72
- - `gse doctor` -> `/gse doctor`
73
- - `gse acceptance` -> `/gse acceptance`
74
+ - `gse status` -> `/gse status`
75
+ - `gse doctor` -> `/gse doctor`
76
+ - `gse repair` -> `/gse repair`
77
+ - `gse acceptance` -> `/gse acceptance`
74
78
  - `gse owner-actions` -> `/gse owner-actions`
75
79
  - `gse owner` -> `/gse owner-actions`
76
80
  - `gse probe` -> `/gse probe`
77
81
  - `gse release` -> `/gse release`
78
82
  - `gse package` -> `/gse package`
79
- - `gse install` -> `/gse install`
80
- - `gse public-release` -> `/gse public-release`
81
- - `gse change` -> `/gse change`
83
+ - `gse install` -> `/gse install`
84
+ - `gse public-release` -> `/gse public-release`
85
+ - `gse maintenance` -> `/gse maintenance`
86
+ - `gse change` -> `/gse change`
82
87
  - `gse spec` -> `/gse change`
83
88
  - `gse slice` -> `/gse slice`
84
89
  - `gse verify` -> `/gse verify`
@@ -92,19 +97,28 @@ The Claude adapter writes `.claude/commands/gse.md`, matching Claude Code's docu
92
97
  /gse continue AION
93
98
  ```
94
99
 
95
- Expected behavior:
96
-
97
- 1. Enter the project root.
98
- 2. Read project rules, `.gse/state.json`, and `.gse/project-profile.md`.
99
- 3. Read the project's canonical plan when one is declared.
100
- 4. Pick the next verifiable slice from the machine-readable state plus goal map.
101
- 5. Execute, verify, record evidence, update `.gse/state.json` and `.gse/evidence/index.jsonl`, and close only when accepted by the applicable gate.
102
-
103
- Portable helper:
104
-
105
- ```text
106
- node <gse-skill>/scripts/generate-session-prompt.mjs --target <project-root>
107
- ```
100
+ Expected behavior:
101
+
102
+ 1. Enter the project root.
103
+ 2. Run the hard preflight: `.gse/state.json`, `.gse/evidence/index.jsonl`, `.gse/project-profile.md`, `.gse/goal-map.md`, `.gse/quality-gates.md`, canonical plan, current slice, residual risks, and owner/external gates when the target exposes them.
104
+ 3. Return a compact state packet with project identity, phase, current slice, next action, top risks, blocked gates, gate taxonomy, tool statuses, latest evidence, active project guards, next checks, and `completionPlan`.
105
+ 4. Fail before implementation when local state or evidence index is broken.
106
+ 5. Keep owner/external evidence visible as public/release/host-specific claim requirements without converting it into GSE core workflow debt.
107
+ 6. Use `completionPlan.requiredSteps`, `completionPlan.requiredCloseCommands`, and active `completionPlan.conditionalCloseCommands` as the exact close checklist before claiming a slice is done.
108
+ 7. Use `gateTaxonomy` to distinguish default core blockers from release gates and host-adapter claim gates. Release and host-adapter gates block only the specific claim unless project policy promotes them.
109
+ 8. Execute, verify, record evidence, update `.gse/state.json` and `.gse/evidence/index.jsonl`, and close only when accepted by the applicable gate.
110
+
111
+ Portable helper:
112
+
113
+ ```text
114
+ node <gse-skill>/scripts/generate-continue-packet.mjs --target <project-root>
115
+ ```
116
+
117
+ Project guard helper:
118
+
119
+ ```text
120
+ node <gse-skill>/scripts/audit-project-guards.mjs --target <project-root> --json
121
+ ```
108
122
 
109
123
  For existing projects that have `.gse/` but do not yet have machine-readable continuation files:
110
124
 
@@ -163,7 +177,8 @@ Expected behavior:
163
177
  3. Do not fix unrelated project code unless explicitly asked.
164
178
 
165
179
  ```text
166
- /gse learn --summary "Prefer UTF-8 safe readers for Chinese docs before judging mojibake" --trigger "encoding review" --source "project slice"
180
+ /gse learn --summary "Prefer UTF-8 safe readers for Chinese docs before judging mojibake" --trigger "encoding review" --source "project slice"
181
+ /gse learn --promote
167
182
  ```
168
183
 
169
184
  Expected behavior:
@@ -172,7 +187,8 @@ Expected behavior:
172
187
  2. Require `--summary`; accept optional `--trigger`, `--source`, `--impact`, and `--promotion`.
173
188
  3. Append the entry only when `--execute` is supplied.
174
189
  4. Skip duplicate summaries instead of appending repeated lessons.
175
- 5. Keep raw chain-of-thought, long logs, and temporary attempts out of learnings.
190
+ 5. Keep raw chain-of-thought, long logs, and temporary attempts out of learnings.
191
+ 6. With `--promote`, run learning promotion analysis. Add `--execute` only to write candidate-only `.gse/learning-promotions.md`; do not mutate guards, gates, templates, scripts, or skill files automatically.
176
192
 
177
193
  ```text
178
194
  /gse status
@@ -181,22 +197,34 @@ Expected behavior:
181
197
  Expected behavior:
182
198
 
183
199
  1. For normal projects, read `.gse/state.json` and show phase, current slice, next action, and declared project files.
184
- 2. For the GSE skill package itself, run the final-form progress report in dry-run mode and show local engineering readiness, full final-form readiness, pending owner/external gates, and `publicAccepted`.
200
+ 2. For the GSE skill package itself, run the final-form progress report in dry-run mode and show local engineering readiness, full final-form readiness, pending owner/external release evidence, and `publicAccepted`.
185
201
  3. Do not treat status output as completion evidence unless the relevant gate audit is also recorded.
186
202
 
187
- ```text
188
- /gse doctor
189
- ```
203
+ ```text
204
+ /gse doctor
205
+ ```
190
206
 
191
207
  Expected behavior:
192
208
 
193
- 1. For the GSE skill package, run the public acceptance doctor and list remaining owner/external blockers with concrete record commands.
209
+ 1. For the GSE skill package, run the public acceptance doctor and list pending owner/external claim evidence with concrete record commands.
194
210
  2. For normal target projects, run the target project doctor and report `.gse/` readiness, canonical plan visibility, evidence state, and host adapter drift.
195
- 3. Keep owner-required and external-required gates explicit. Do not convert local mechanics into public acceptance.
196
-
197
- ```text
198
- /gse owner-actions
199
- ```
211
+ 3. Keep owner-required and external-required gates explicit. Do not convert local mechanics into public acceptance.
212
+
213
+ ```text
214
+ /gse repair
215
+ ```
216
+
217
+ Expected behavior:
218
+
219
+ 1. Read `.gse/state.json` and `.gse/evidence/index.jsonl`.
220
+ 2. Return concrete repair actions for invalid state JSON, invalid evidence JSONL, missing latest evidence files, stale state/evidence next actions, and overlong residual risks.
221
+ 3. Stay read-only by default.
222
+ 4. Automatic writes are limited to reversible residual-risk compaction with a backup, and require `--execute`.
223
+ 5. Do not guess or overwrite broken JSON/JSONL; report the file and line/error so the owner or agent can repair deliberately.
224
+
225
+ ```text
226
+ /gse owner-actions
227
+ ```
200
228
 
201
229
  Expected behavior:
202
230
 
@@ -278,7 +306,7 @@ Expected behavior:
278
306
  ## Completion Rules
279
307
 
280
308
  - `/gse continue`, `/gse verify`, and `/gse close` must preserve the result -> verified -> accepted distinction.
281
- - `/gse close` is read-only in the portable command runner. It cannot mark a slice complete, archive a change, or write evidence by itself.
309
+ - `/gse close` is read-only in the portable command runner. It checks state, evidence, role dispatch honesty, worktree ownership, staged generated artifacts, and `.gse` git state. It cannot mark a slice complete, archive a change, or write evidence by itself.
282
310
  - Portable close check:
283
311
 
284
312
  ```text
@@ -291,5 +319,6 @@ node <gse-skill>/scripts/audit-close-gate.mjs --target <project-root>
291
319
  node <gse-skill>/scripts/close-change.mjs --target <project-root> --change-id <change-id> --status result|verified|accepted --json
292
320
  ```
293
321
 
294
- - `/gse audit` cannot certify arbitrary repositories unless project-specific checks ran.
322
+ - `/gse maintenance` verifies recurring upkeep coverage and command wiring; it does not replace real external host, CI, marketplace, or owner evidence.
323
+ - `/gse audit` cannot certify arbitrary repositories unless project-specific checks ran.
295
324
  - `/gse init` and `/gse adopt` cannot overwrite existing project workflow files without explicit owner approval or `--force` with a recorded reason.
@@ -67,7 +67,8 @@ Choose the smallest durable remediation:
67
67
  - Refresh host adapter notes when host-specific folders duplicate policy or claim unavailable capabilities.
68
68
  - Refresh tool/model routing notes when provider, model, MCP, LSP, browser, CI, or deployment assumptions changed.
69
69
  - Add a learning entry only when the drift pattern is reusable beyond the current slice.
70
- - Add or update a script/template/gate when the same drift appears repeatedly.
70
+ - Add or update a script/template/gate when the same drift appears repeatedly.
71
+ - Run `scripts/audit-learning-drift.mjs --root <gse-skill> --target <project-root> --json` when `.gse/learning-promotions.md` or `/gse continue` shows promoted learning candidates. The audit surfaces candidates that are documented but not yet covered by a guard, quality gate, continue/close check, or focused script.
71
72
 
72
73
  Never update stale docs by inventing support. Prefer `unknown` plus a focused verification action.
73
74
 
@@ -2,13 +2,48 @@
2
2
 
3
3
  Use this to decide whether work is only produced, actually verified, or accepted.
4
4
 
5
- GSE uses three evidence gates:
5
+ GSE uses three evidence gates:
6
6
 
7
7
  ```text
8
8
  result -> verified -> accepted
9
9
  ```
10
10
 
11
- Do not skip gates. Do not claim a higher gate when the evidence only proves a lower gate.
11
+ Do not skip gates. Do not claim a higher gate when the evidence only proves a lower gate.
12
+
13
+ ## Evidence Status vs Evidence Level
14
+
15
+ Evidence status answers whether the work is result, verified, or accepted.
16
+
17
+ Evidence level answers what kind of proof produced that status.
18
+
19
+ Keep both dimensions visible for non-trivial work:
20
+
21
+ ```text
22
+ status: result | verified | accepted | blocked | not ready
23
+ evidenceLevel: result | verified-unit | verified-component | verified-api | verified-browser | verified-ci | accepted-owner | accepted-release | external-required
24
+ requiredEvidenceLevel: optional expected level for the claim
25
+ ```
26
+
27
+ Use the narrowest honest level:
28
+
29
+ | Evidence level | Meaning | Typical proof |
30
+ |---|---|---|
31
+ | `result` | Artifact exists or command produced an output, but behavior is not verified. | file exists, generated report, dry-run output |
32
+ | `verified-unit` | Unit or script-level behavior is verified. | focused unit test, parser test, structure audit |
33
+ | `verified-component` | Component-level or local integration behavior is verified without a real browser/runtime path. | component test, fixture integration, store/API mock |
34
+ | `verified-api` | API/state contract is verified through an API, route, database, or state-machine check. | API smoke, state contract test, persistence fixture |
35
+ | `verified-browser` | User-visible browser behavior is verified in a real browser automation or equivalent rendered UI smoke. | Playwright/browser smoke, screenshot-backed UI check |
36
+ | `verified-ci` | CI or release pipeline executed and passed in the target environment. | public CI run, release workflow run, build pipeline evidence |
37
+ | `accepted-owner` | Owner/reviewer accepts a verified result. | explicit owner acceptance, review approval, accepted project record |
38
+ | `accepted-release` | Release/publication gate accepts the verified result. | release record, package publication record, marketplace approval |
39
+ | `external-required` | Required evidence depends on an external owner, host, marketplace, registry, or runtime not available in the current local run. | native slash-command host proof, marketplace approval, public release gate |
40
+
41
+ Examples:
42
+
43
+ - A UI component test can be `status: verified` with `evidenceLevel: verified-component`, but it must not be described as browser proof.
44
+ - A Playwright smoke can be `status: verified` with `evidenceLevel: verified-browser`.
45
+ - A public CI record can be `status: verified` or `accepted` with `evidenceLevel: verified-ci`, depending on the project acceptance policy.
46
+ - A pending native slash-command claim should stay `evidenceLevel: external-required` until a real host invocation record exists.
12
47
 
13
48
  ## Gate 1: Result
14
49
 
@@ -78,18 +113,20 @@ Example:
78
113
 
79
114
  ## Required Evidence Record
80
115
 
81
- Every non-trivial GSE slice should record:
116
+ Every non-trivial GSE slice should record:
82
117
 
83
118
  ```text
84
119
  Outcome:
85
120
  Scope:
86
121
  Acceptance:
87
- Result evidence:
88
- Verification evidence:
89
- Accepted by:
90
- Residual risk:
91
- Next action:
92
- ```
122
+ Result evidence:
123
+ Verification evidence:
124
+ Evidence level:
125
+ Required evidence level:
126
+ Accepted by:
127
+ Residual risk:
128
+ Next action:
129
+ ```
93
130
 
94
131
  Use `accepted by: policy` only when the applicable policy is named, such as `Lite focused smoke policy`.
95
132
 
@@ -53,8 +53,9 @@ Claims should be short and local to the task. Do not create permanent process ar
53
53
 
54
54
  When real subagent tools exist:
55
55
 
56
- - Give each subagent a role, objective, allowed files, forbidden files, and expected output.
57
- - Prefer read-only locator/reviewer/QA roles for broad exploration.
56
+ - Give each subagent a role, objective, allowed files, forbidden files, and expected output.
57
+ - Prefer read-only locator/reviewer/QA roles for broad exploration.
58
+ - Keep release roles focused on release/public/owner/external claim boundaries unless they are explicitly assigned release-file edits.
58
59
  - Do not dispatch parallel builders to the same files or tightly coupled modules.
59
60
  - Require implementers to report files changed and verification run.
60
61
  - Run spec review before code-quality review when both exist.
@@ -62,10 +63,11 @@ When real subagent tools exist:
62
63
 
63
64
  When no real subagent tool exists:
64
65
 
65
- - Execute roles sequentially in the main session.
66
- - Say that no real subagent dispatch occurred if the distinction matters.
67
- - Keep the same ownership boundaries: locator is read-only, builder writes assigned files, reviewer is read-only, QA writes evidence only.
68
- - Do not fake parallelism, independent review, or subagent status.
66
+ - Execute roles sequentially in the main session.
67
+ - Say that no real subagent dispatch occurred if the distinction matters.
68
+ - Keep the same ownership boundaries: locator is read-only, builder writes assigned files, reviewer is read-only, QA writes evidence only.
69
+ - Verifier records commands and evidence level; release records claim boundaries and external gates.
70
+ - Do not fake parallelism, independent review, or subagent status.
69
71
 
70
72
  ## Shared File Rules
71
73
 
@@ -91,13 +93,15 @@ If two tasks need the same file:
91
93
 
92
94
  ## Verification Checklist
93
95
 
94
- Before claiming completion:
95
-
96
- - Intended files are the only files changed, or every extra file is explained.
97
- - Pre-existing dirty files were not reverted or overwritten.
98
- - Generated/test/output artifacts are excluded unless the project requires them.
99
- - Subagent work, if any, has role, allowed files, and verification evidence.
100
- - The evidence record names focused validation and residual risk.
96
+ Before claiming completion:
97
+
98
+ - Intended files are the only files changed, or every extra file is explained.
99
+ - Pre-existing dirty files were not reverted or overwritten.
100
+ - Generated/test/output artifacts are excluded unless the project requires them.
101
+ - Subagent work, if any, has role, allowed files, and verification evidence.
102
+ - The evidence record names focused validation and residual risk.
103
+
104
+ `scripts/audit-close-gate.mjs` reports staged, unstaged, untracked, mixed, conflict, and common generated/test artifact paths so close reviews do not have to infer ownership from prose.
101
105
 
102
106
  ## Project Integration
103
107
 
@@ -0,0 +1,201 @@
1
+ # GSE Final Form Roadmap
2
+
3
+ This roadmap defines the final product shape for GSE itself. It is the canonical continuation plan for GSE development after local v1 capability has been proven.
4
+
5
+ The goal is not another patch cycle. Final form means a capable agent can enter a new or existing project, run a short GSE entry command, understand the project, select the next slice, execute with the right level of rigor, prove the result, and carry lessons forward without a long hand-written prompt.
6
+
7
+ ## Completion Definition
8
+
9
+ GSE reaches final form when a new agent can enter any supported project and use `/gse continue` to obtain:
10
+
11
+ - the project identity, current goal, active slice, and next action,
12
+ - the required spec, quality gates, and evidence level,
13
+ - the available tools, missing tools, role boundaries, and fallback path,
14
+ - pending owner/external release evidence, plus any optional adapter claims that are not being made,
15
+ - the learning rules that should affect the current run,
16
+ - the exact checks needed before completion can be claimed.
17
+
18
+ Broken state, stale evidence, unsupported tool claims, noisy risk lists, and missing host/runtime evidence must be surfaced before implementation begins.
19
+
20
+ ## Final Form Priorities
21
+
22
+ | Priority | Area | Outcome | Acceptance |
23
+ |---|---|---|---|
24
+ | P0 | Short entry takeover | `/gse continue` replaces long goal prompts for mature projects | A project with `.gse/` returns current slice, next action, claim-boundary evidence, and required checks through the portable runner; host-native command evidence is recorded only when a specific host adapter claims it |
25
+ | P1 | State system | Project state is readable, compact, repairable, and not a risk dump | State separates current summary, active slice, top risks, blocked gates, next checks, and archived risk history |
26
+ | P2 | Evidence gate | Claims cannot outrun evidence | Evidence index validity is a preflight gate; bad JSONL, stale records, and downgraded UI/browser proof are labeled before close |
27
+ | P3 | Spec and change lifecycle | GSE provides OpenSpec-style change control without requiring OpenSpec | Change packs move through proposed, active, implemented, verified, accepted, and archived states with goal-map links |
28
+ | P4 | Roles and subagents | GSE provides Superpowers-style execution discipline without requiring a specific subagent host | Planner, locator, implementer, verifier, reviewer, doc/evidence, and release roles have dispatch packets and fallback checklists; process skills do not prove real host dispatch |
29
+ | P5 | Tool and quality gates | Tool use is fast, explicit, and project-aware | LSP/index, browser, Playwright, MCP, CI, package manager, Windows shell, sparse checkout, UTF-8, and project custom gates are preflighted when relevant |
30
+ | P6 | Learning automation | Repeated failures become guards | Lessons dedupe, classify severity, and promote into project quality gates, templates, scripts, or skill updates |
31
+ | P7 | Project init and adapters | New projects get the right scaffold without heavy prerequisites | Lite, Standard, and Enterprise scaffolds create `.gse/` plus optional host pointers for `.codex`, `.claude`, `.mcp`, and similar folders |
32
+ | P8 | Release and distribution | GSE is installable, auditable, and maintainable as an open-source skill product | npm/package install, GitHub release, public CI, security contact, repository settings, registry/marketplace records, bilingual docs, checksums/signing, and update paths are verified or honestly gated |
33
+ | P9 | Benchmark and drills | GSE remains competitive with mature engineering skills | Regular audits compare against OpenSpec, Superpowers/BMAD-style roles, Comet-style phase discipline, and real projects such as AION and MuseFlow |
34
+ | P10 | Final acceptance | Final claims are backed by real evidence at the right claim level | AION doctor, MuseFlow doctor, new-project bootstrap, `/gse continue`, evidence repair, state compaction, role dispatch, learning promotion, package publication, public CI, and portable command execution pass; host-native invocation is optional per host adapter and must be recorded before that adapter claims it |
35
+
36
+ ## First Execution Wave
37
+
38
+ 1. Done: make `/gse continue` run a hard preflight: state JSON, evidence index, project profile, quality gates, canonical plan, stale risks, and pending owner/external release evidence when the target exposes it.
39
+ 2. Done: split `.gse/state.json` into a compact default view and an archived risk/decision history so active sessions do not inherit unreadable residual risk blocks.
40
+ 3. Done for continuation: promote evidence index validity from target-project doctor finding to blocking preflight for `/gse continue`; close-gate evidence index validation already remains in place.
41
+ 4. Done: add explicit evidence levels for UI/browser/API/CI/owner/release/external proof: `verified-unit`, `verified-component`, `verified-api`, `verified-browser`, `verified-ci`, `accepted-owner`, `accepted-release`, and `external-required`.
42
+ 5. Done: convert reusable lessons from AION and MuseFlow into guards: Windows shell syntax, sparse checkout staging, UTF-8-safe Chinese docs, stale evidence, browser-smoke downgrade labeling, no fake subagent dispatch, and non-interrupting cross-thread sync.
43
+
44
+ ## Final Form Execution Plan
45
+
46
+ This plan turns the completion definition into ordered implementation waves. It is the working plan for GSE itself, not a project roadmap for projects that use GSE.
47
+
48
+ ### Wave 1 - Short Entry And State Control
49
+
50
+ Outcome: mature projects can resume from a short `/gse continue` entry instead of a long hand-written prompt.
51
+
52
+ Status: verified; the hard preflight, compact state packet, completion plan, project guards, explicit evidence levels, role fallback readiness, and state/evidence repair path are verified. Native host slash-command evidence is an optional adapter claim, not a GSE core completion gate.
53
+
54
+ Completed slices:
55
+
56
+ - Done: `completionPlan` gives future agents exact required close steps, required close commands, and active conditional commands for encoding, installed-sync, maintenance snapshot, release bundle, and session sync.
57
+ - Done: completionPlan drill audit verifies clean worktrees have no false active conditionals and dirty docs/scripts/references/acceptance/evidence changes activate the expected close checks.
58
+ - Done: state repair path provides `/gse repair`, `CP14`, and concrete repair actions for stale state, bad JSONL, missing evidence files, next-action drift, and overlong residual risks.
59
+ - Done: `gateTaxonomy` separates core workflow blockers from release gates and host-adapter claim gates in `/gse continue` compact state.
60
+ - Done: generated/noisy artifacts stay visible in `/gse continue` as ignored paths but no longer count as actionable changes or trigger conditional close commands by themselves.
61
+ - Done: active residual risks and archived risk history are counted separately so `/gse continue` does not make historical risk archive entries look like current blockers.
62
+ - Done: the human-facing `/gse continue` prompt is a short action packet with project, root, slice, next action, close summary, risk summary, gate boundary, and do-step instead of long explanatory prose.
63
+
64
+ Acceptance:
65
+
66
+ - `/gse continue` shows current slice, next action, top risks, claim-boundary evidence, required checks, relevant guard rules, evidence status, and completion plan.
67
+ - Bad evidence and stale state fail before implementation or return a repair action.
68
+ - Default output stays compact; historical risk detail stays archived.
69
+
70
+ ### Wave 2 - Spec, Role, And Execution Discipline
71
+
72
+ Outcome: GSE provides OpenSpec-style change control and Superpowers-style execution discipline without requiring either tool.
73
+
74
+ Status: locally verified for portable execution discipline; role fallback packet outputs, no-fake-dispatch close checks, file-ownership/staged-artifact close checks, and host capability record audits are verified. Real-host dispatch evidence remains host-specific future evidence.
75
+
76
+ Boundary: OpenSpec-style and Superpowers-style workflows define requirements, change control, execution discipline, and review quality. They do not provide native slash commands, subagent dispatch, browser tooling, MCP, LSP, CI, or host UI integration by themselves. GSE follows the same boundary: those capabilities are optional host adapters and must be recorded as host evidence before they are claimed.
77
+
78
+ Required slices:
79
+
80
+ - Change lifecycle hardening: every active change can be opened, verified, closed, archived, and linked back to the goal map.
81
+ - Done: role packet execution fallback: planner, locator, implementer, verifier, reviewer, doc/evidence, and release roles have auditable packet outputs for sequential fallback.
82
+ - Done: no-fake-dispatch guard: close gate blocks real-subagent claims unless the current host/tool status is verified.
83
+ - Done: file ownership and dirty-worktree guard: close gate reports staged, unstaged, untracked, mixed, conflict, and generated/test artifact paths before close.
84
+
85
+ Acceptance:
86
+
87
+ - A real target project can run a change pack from open to archive.
88
+ - Role packets work both with real subagents and sequential fallback.
89
+ - Close gate rejects missing evidence, missing review, fake dispatch, and unrelated staged files when the project can expose that data.
90
+
91
+ ### Wave 3 - Learning To Guard Promotion
92
+
93
+ Outcome: repeated user corrections and project failures become reusable engineering controls.
94
+
95
+ Status: locally verified; learning capture, duplicate occurrence counting, deterministic promotion analysis, candidate-only promotion reports, `/gse continue` CP15 visibility, and learning drift detection for promoted-but-unenforced candidates are verified.
96
+
97
+ Completed slices:
98
+
99
+ - Done: learning classifier categorizes lessons by shell, encoding, evidence, browser, git, host-tool, project-rule, and release.
100
+ - Done: duplicate learning capture increments `Occurrences` without appending noisy duplicate entries.
101
+ - Done: promotion paths follow note -> checklist/template -> guard/quality gate -> script/skill.
102
+ - Done: `/gse learn --promote` is read-only by default, `/gse learn --promote --execute` writes candidate-only `.gse/learning-promotions.md`, and `/gse continue` surfaces CP15 learning promotion status.
103
+
104
+ Completed slices:
105
+
106
+ - Done: drift audit detects when promoted learning candidates are not covered by project guards, quality gates, `/gse continue`, `/gse close`, or focused audit scripts.
107
+
108
+ Acceptance:
109
+
110
+ - A lesson can be recorded once, deduped, and promoted into a project guard with evidence.
111
+ - `/gse continue` and `/gse close` both surface promoted high-severity guards.
112
+ - AION/MuseFlow lessons are used as examples but no AION/MuseFlow-specific behavior is hardcoded.
113
+
114
+ ### Wave 4 - Tool And Host Runtime Adapters
115
+
116
+ Outcome: GSE stays portable while using available tools aggressively.
117
+
118
+ Completed slices:
119
+
120
+ - Done: host capability audit records track native slash-command, browser, MCP, LSP, subagent, and CI status as `verified`, `documented`, `unknown`, `unavailable`, or `external-required`, with `/gse continue` `CP16` visibility and overclaim checks.
121
+ - Done: target-project hardening drills run GSE doctor, `/gse continue`, close gate, host capability, and learning drift checks against configured real projects without mutating target worktrees.
122
+ - Done: optional tool fallback policy audit verifies markdown fallback and claim boundaries across tool adapters, router, model routing, host adapters, project profile, generated command adapters, continue packet wiring, and validation profiles.
123
+
124
+ Required slices:
125
+
126
+ - Native slash-command evidence: record real host-native `/gse continue` invocation only when a host adapter claims native support.
127
+ - Done: Browser/UI evidence policy: `scripts/audit-ui-browser-evidence-policy.mjs` verifies that `verified-component`, `verified-api`, `verified-browser`, screenshot/visual inspection rules, continue/close downgrade surfacing, and validation wiring stay aligned.
128
+
129
+ Acceptance:
130
+
131
+ - GSE never claims native host support from portable command evidence alone.
132
+ - Browser/UI verification downgrade is labeled before close.
133
+ - Host adapter docs point back to `.gse/` and do not duplicate canonical rules.
134
+
135
+ ### Wave 5 - Distribution, Public Trust, And Maintenance
136
+
137
+ Outcome: GSE can be installed, audited, updated, and maintained as an open-source skill product.
138
+
139
+ Required slices:
140
+
141
+ - Public release evidence: repository settings, CI, security contact, registry/package channel, marketplace/catalog, release bundle, checksum/signing, and update path records.
142
+ - Done: Installed skill sync: `scripts/audit-installed-sync.mjs` verifies fresh package output, package metadata/version preservation, source-root privacy, installed-copy hash parity, and installed-copy `/gse maintenance` smoke when `--installed-root` is supplied.
143
+ - Done: Session sync records: `scripts/record-session-sync.mjs` and `scripts/audit-session-sync.mjs` make installed-copy refresh and active-session sync attempts auditable without treating notification as adoption.
144
+ - Public docs hardening: keep README and bilingual docs concise, search-friendly, and free of defensive caveat bloat.
145
+ - Done: Maintenance cadence: `references/maintenance-cadence.md`, `/gse maintenance`, and `scripts/audit-maintenance-cadence.mjs` verify benchmark audit, drift audit, dependency/security review, forward-test, target drill, public acceptance, and installed-skill sync coverage.
146
+ - Done: Maintenance snapshot failure isolation: failed canonical `latest-maintenance-snapshot.json` writes are redirected to `latest-maintenance-snapshot.failed.json` so release-bundle and maintenance freshness loops keep the last passing canonical snapshot.
147
+
148
+ Acceptance:
149
+
150
+ - `validate-gse` passes the appropriate profile for the release stage.
151
+ - Public acceptance rows are accepted only with real owner/external evidence.
152
+ - A clean consumer project can install GSE, run `gse status`, initialize `.gse/`, and execute `/gse continue` through the portable runner.
153
+
154
+ ## Current Final-Form Gap List
155
+
156
+ These items should drive future slices only when the claim is being made:
157
+
158
+ - Short entry takeover is verified through the portable runner; `/gse continue` now exposes a compact action prompt, `completionPlan`, `gateTaxonomy`, generated/noisy ignored paths, and active-versus-archived risk counts. Real host-native slash-command evidence is optional per host adapter.
159
+ - Project guards, learning promotion candidates, learning drift status, no-fake-dispatch/file-ownership close checks, host capability records, and target-project hardening drills now surface or execute through portable audits; AION/MuseFlow drill warnings remain project-local readiness signals, not GSE hard failures.
160
+ - Evidence index validity is a hard preflight; evidence level granularity, state/evidence repair actions, and conservative historical evidence-level backfill are implemented.
161
+ - Role fallback packets and host capability records are auditable through scaffold, `/gse continue`, and focused audits; real subagent dispatch still needs current host evidence.
162
+ - Process skills such as OpenSpec, Superpowers, Comet, and GSE provide workflow discipline and portable artifacts; they do not satisfy host-native slash-command, subagent, browser, MCP, LSP, CI, or host UI evidence rows.
163
+ - Learning capture, occurrence counting, classification, candidate promotion, candidate drift detection, and read-only target-project hardening drills are locally verified; remaining gaps are project-specific product evidence and external host evidence.
164
+ - Public/package release mechanics, browser/UI evidence policy, maintenance cadence, installed/package sync freshness checks, active-session sync records, and portable command execution are verified; optional host-native slash-command evidence is recorded only for hosts that actually expose native support.
165
+ - Failed canonical maintenance snapshot writes are isolated from the last passing snapshot; `.failed.json` is the diagnostic surface for failed runs.
166
+
167
+ ## Goal Mode Operating Contract
168
+
169
+ Use this when continuing GSE itself in a goal-mode session:
170
+
171
+ ```text
172
+ Goal: implement GSE final form as a portable, installable, evidence-driven engineering skill for long-running agent-assisted software projects.
173
+
174
+ Workspace:
175
+ <path-to-gse-repo>
176
+
177
+ Start:
178
+ 1. Read the installed GSE `SKILL.md`.
179
+ 2. Read .gse/gse-design-master-plan.md, .gse/goal-map.md, .gse/current-slice.md, .gse/state.json, and references/final-form-roadmap.md.
180
+ 3. Continue from the current slice and the highest-priority unfinished Final Form roadmap item.
181
+ 4. Keep GSE generic. Do not add AION-only or MuseFlow-only behavior; use them as drills and evidence targets.
182
+
183
+ Loop:
184
+ Goal -> Spec -> Execute -> Evidence -> Learn.
185
+
186
+ Slice rule:
187
+ Do one verifiable slice at a time. Each slice must state outcome, scope, acceptance, evidence, risk, and next action. Prefer executable scripts, templates, and gates over prose-only rules.
188
+
189
+ Verification:
190
+ Run the smallest focused audit that proves the slice. For docs-only final-form routing changes, run audit-final-form-roadmap, roadmap consistency, JSON/UTF-8 sanity, and a smoke validation profile. For release or package claims, run the matching release/package audit.
191
+
192
+ Evidence:
193
+ Append evidence to .gse/evidence/YYYY-MM-DD.md and .gse/evidence/index.jsonl. Do not claim public, native host, marketplace, registry, CI, or owner acceptance without matching accepted records.
194
+
195
+ Completion:
196
+ A slice is complete only after focused validation passes, evidence is recorded, state/current-slice/goal-map are updated, and the changes are committed.
197
+ ```
198
+
199
+ ## Claim Boundary
200
+
201
+ This roadmap is a contract for final-form development, not proof for every optional adapter claim. The live claim boundary remains `references/final-readiness.md` plus `scripts/audit-final-readiness.mjs`.
@@ -39,7 +39,7 @@ The table below describes the baseline/status source for each row. The current t
39
39
  | Marketplace approval | real marketplace/catalog approval or publication evidence | record-driven external gate |
40
40
  | Portable command execution | `run-gse-command.mjs` command semantics audit | verified |
41
41
  | Host adapters | generated adapter files and compatibility matrix audit | verified |
42
- | Native slash command | verified host invocation record with native slash support | record-driven external gate |
42
+ | Native slash command | optional per-host adapter claim; verified only if a host invocation record proves native slash support | not claimed by GSE core |
43
43
  | Other host runtime invocation | verified invocation records per host | record-driven external gate |
44
44
 
45
45
  Do not read the baseline column as live status. For example, once the owner-selected license record is accepted, the audit reports `License decision` as `verified` even though the row remains an owner-gated claim type.
@@ -52,7 +52,7 @@ node <gse-skill>/scripts/audit-final-readiness.mjs --root <gse-skill>
52
52
 
53
53
  The audit must report external and owner gates as incomplete unless corresponding records exist. It is valid for the audit to pass while still reporting `owner-required` or `external-required`; passing means the matrix is honest and complete, not that every external gate is satisfied.
54
54
 
55
- Accepted owner/external records promote final rows only when the record contains accepted evidence and the relevant boundary proof. For example, a public CI row requires an accepted public CI run record with a successful conclusion and required-check proof; a registry row requires accepted publication evidence with registry proof; native slash command support requires a host invocation record that proves native slash-command support.
55
+ Accepted owner/external records promote final rows only when the record contains accepted evidence and the relevant boundary proof. For example, a public CI row requires an accepted public CI run record with a successful conclusion and required-check proof; a registry row requires accepted publication evidence with registry proof. Native slash command support is a per-host optional adapter claim, not a GSE core completion gate; claim it only after a host invocation record proves native slash-command support.
56
56
 
57
57
  Use the promotion audit to verify that this path still works:
58
58
 
@@ -81,4 +81,4 @@ GSE can be described as publicly accepted only after:
81
81
  - public repository settings evidence exists when a public source repository is claimed,
82
82
  - public CI run evidence exists when public CI is claimed,
83
83
  - registry or marketplace publication evidence exists when those channels are claimed,
84
- - native slash-command support is recorded per host before it is claimed.
84
+ - native slash-command support is recorded per host before it is claimed by that host adapter.