@t275005746/gse 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/.gse/releases/public-github-release-v0.1.2.md +49 -0
  2. package/.gse/releases/public-registry-publication-npm.md +49 -49
  3. package/.gse/state.json +148 -26
  4. package/CHANGELOG.md +52 -8
  5. package/README.md +13 -6
  6. package/README.zh-CN.md +13 -6
  7. package/SKILL.md +32 -12
  8. package/assets/templates/dispatch-packet.md +22 -14
  9. package/assets/templates/evidence.md +11 -5
  10. package/assets/templates/role-fallback-packet.md +49 -0
  11. package/package.json +18 -10
  12. package/references/agent-roles.md +41 -20
  13. package/references/commands.md +75 -45
  14. package/references/drift-audit.md +2 -1
  15. package/references/evidence-taxonomy.md +46 -9
  16. package/references/file-ownership.md +17 -13
  17. package/references/final-form-roadmap.md +203 -0
  18. package/references/final-readiness.md +3 -3
  19. package/references/host-adapters.md +38 -10
  20. package/references/learning-system.md +24 -8
  21. package/references/maintenance-cadence.md +51 -0
  22. package/references/project-guards.md +52 -0
  23. package/references/quality-gates.md +18 -11
  24. package/references/role-dispatch-fallback.md +54 -0
  25. package/references/tool-adapters.md +13 -3
  26. package/scripts/audit-close-gate-hardening.mjs +188 -0
  27. package/scripts/audit-close-gate.mjs +219 -33
  28. package/scripts/audit-command-execution.mjs +30 -17
  29. package/scripts/audit-commands.mjs +7 -5
  30. package/scripts/audit-completion-plan-drill.mjs +271 -0
  31. package/scripts/audit-completion-readiness.mjs +9 -6
  32. package/scripts/audit-continue-preflight.mjs +318 -0
  33. package/scripts/audit-evidence-levels.mjs +217 -0
  34. package/scripts/audit-evidence-review-queue.mjs +206 -0
  35. package/scripts/audit-final-acceptance-packet.mjs +9 -9
  36. package/scripts/audit-final-form-progress-report.mjs +19 -18
  37. package/scripts/audit-final-form-roadmap.mjs +157 -0
  38. package/scripts/audit-final-form-stale-copy.mjs +2 -2
  39. package/scripts/audit-final-readiness.mjs +3 -3
  40. package/scripts/audit-fresh-session-readiness.mjs +1 -1
  41. package/scripts/audit-host-capabilities.mjs +237 -0
  42. package/scripts/audit-installed-sync.mjs +203 -0
  43. package/scripts/audit-learning-drift.mjs +292 -0
  44. package/scripts/audit-learning-promotion.mjs +351 -0
  45. package/scripts/audit-learning-system.mjs +24 -14
  46. package/scripts/audit-local-final-form-completion.mjs +11 -10
  47. package/scripts/audit-maintenance-cadence.mjs +139 -0
  48. package/scripts/audit-maintenance-snapshot.mjs +181 -0
  49. package/scripts/audit-npm-package-metadata.mjs +8 -2
  50. package/scripts/audit-npm-publish-dry-run.mjs +10 -4
  51. package/scripts/audit-npm-tarball-install.mjs +9 -3
  52. package/scripts/audit-owner-external-gate-kit.mjs +12 -11
  53. package/scripts/audit-project-guards.mjs +189 -0
  54. package/scripts/audit-project.mjs +14 -11
  55. package/scripts/audit-public-acceptance-handoff.mjs +10 -10
  56. package/scripts/audit-public-acceptance-readiness.mjs +6 -6
  57. package/scripts/audit-public-release-checklist.mjs +17 -15
  58. package/scripts/audit-release-bundle.mjs +13 -11
  59. package/scripts/audit-release-owner-action-plan-drill.mjs +5 -4
  60. package/scripts/audit-release-owner-action-plan.mjs +10 -10
  61. package/scripts/audit-release-status-manifest.mjs +4 -4
  62. package/scripts/audit-roadmap-consistency.mjs +11 -7
  63. package/scripts/audit-role-dispatch-fallback.mjs +212 -0
  64. package/scripts/audit-session-sync.mjs +127 -0
  65. package/scripts/audit-state-freshness.mjs +6 -5
  66. package/scripts/audit-state-repair.mjs +360 -0
  67. package/scripts/audit-target-hardening-drills.mjs +518 -0
  68. package/scripts/audit-tool-fallback-policy.mjs +180 -0
  69. package/scripts/audit-ui-browser-evidence-policy.mjs +191 -0
  70. package/scripts/audit-validation-profiles.mjs +6 -4
  71. package/scripts/backfill-evidence-levels.mjs +98 -0
  72. package/scripts/check-encoding.mjs +72 -0
  73. package/scripts/generate-continue-packet.mjs +1487 -0
  74. package/scripts/generate-final-acceptance-packet.mjs +23 -8
  75. package/scripts/generate-final-form-progress-report.mjs +25 -23
  76. package/scripts/generate-host-runtime-evidence-handoff.mjs +23 -16
  77. package/scripts/generate-maintenance-snapshot.mjs +216 -0
  78. package/scripts/generate-public-acceptance-handoff.mjs +26 -14
  79. package/scripts/generate-release-owner-action-plan.mjs +4 -3
  80. package/scripts/generate-release-status-manifest.mjs +4 -3
  81. package/scripts/init-project.mjs +144 -63
  82. package/scripts/record-learning.mjs +37 -8
  83. package/scripts/record-session-sync.mjs +87 -0
  84. package/scripts/run-gse-command.mjs +79 -47
  85. package/scripts/run-validation-profile.mjs +24 -5
  86. package/scripts/validate-gse.mjs +262 -9
@@ -0,0 +1,49 @@
1
+ # Role Fallback Packet
2
+
3
+ Use this packet for one role in a real-subagent run, sequential fallback, or handoff session.
4
+
5
+ ## Dispatch Boundary
6
+
7
+ - Execution mode: real-subagent | sequential-role | handoff-session
8
+ - Real delegation used: yes | no
9
+ - Host/tool used:
10
+ - Tool status: verified | documented | unknown | unavailable
11
+ - Fallback reason:
12
+ - Dispatch evidence:
13
+
14
+ ## Role
15
+
16
+ - Role: Planner | Locator | Implementer | Verifier | Reviewer | Docs/Evidence | Release
17
+ - Skill focus:
18
+ - Objective:
19
+ - Non-goals:
20
+
21
+ ## Ownership
22
+
23
+ - Allowed files:
24
+ - Forbidden files:
25
+ - Read-only files:
26
+ - Shared files requiring coordinator review:
27
+ - Pre-existing dirty files:
28
+
29
+ ## Required Inputs
30
+
31
+ 1.
32
+ 2.
33
+ 3.
34
+
35
+ ## Expected Output
36
+
37
+ - Role output evidence:
38
+ - Files inspected:
39
+ - Files changed:
40
+ - Verification command/check:
41
+ - Evidence level: result | verified-unit | verified-component | verified-api | verified-browser | verified-ci | accepted-owner | accepted-release | external-required
42
+ - Residual risk:
43
+ - Stop condition:
44
+ - Claim boundary:
45
+
46
+ ## Completion
47
+
48
+ - Status: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
49
+ - Coordinator integration required: yes | no
package/package.json CHANGED
@@ -1,10 +1,17 @@
1
1
  {
2
2
  "name": "@t275005746/gse",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Goal-Spec-Evidence Engineering workflow skill for long-running agent-assisted software projects.",
5
5
  "type": "module",
6
- "license": "MIT",
7
- "homepage": "https://gatehub.top/",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/275005746/gse.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/275005746/gse/issues"
13
+ },
14
+ "homepage": "https://gatehub.top/",
8
15
  "bin": {
9
16
  "gse": "scripts/gse.mjs"
10
17
  },
@@ -30,13 +37,14 @@
30
37
  "references",
31
38
  "scripts"
32
39
  ],
33
- "scripts": {
34
- "audit:npm": "node scripts/audit-npm-package-metadata.mjs --root . --json",
35
- "audit:npm-install": "node scripts/audit-npm-tarball-install.mjs --root . --json",
36
- "audit:npm-publish": "node scripts/audit-npm-publish-dry-run.mjs --root . --json",
37
- "validate": "node scripts/validate-gse.mjs --root . --json",
38
- "pack:dry-run": "npm pack --dry-run --json"
39
- },
40
+ "scripts": {
41
+ "audit:npm": "node scripts/audit-npm-package-metadata.mjs --root . --json",
42
+ "audit:npm-install": "node scripts/audit-npm-tarball-install.mjs --root . --json",
43
+ "audit:npm-publish": "node scripts/audit-npm-publish-dry-run.mjs --root . --json",
44
+ "check:encoding": "node scripts/check-encoding.mjs",
45
+ "validate": "node scripts/validate-gse.mjs --root . --json",
46
+ "pack:dry-run": "npm pack --dry-run --json"
47
+ },
40
48
  "keywords": [
41
49
  "gse",
42
50
  "goal-spec-evidence",
@@ -2,11 +2,17 @@
2
2
 
3
3
  Use roles to make multi-agent work predictable.
4
4
 
5
- ## Coordinator
6
-
7
- Owns scope, task level, context selection, final integration, and final answer.
8
-
9
- Never delegates final judgment.
5
+ ## Coordinator
6
+
7
+ Owns scope, task level, context selection, final integration, and final answer.
8
+
9
+ Never delegates final judgment.
10
+
11
+ ## Planner
12
+
13
+ Defines the slice outcome, scope, acceptance, evidence, residual risk, and next action.
14
+
15
+ Maps to Coordinator or Product Analyst in smaller tasks.
10
16
 
11
17
  ## Product Analyst
12
18
 
@@ -16,13 +22,23 @@ Clarifies user outcome, pain, audience, competitive baseline, and priority.
16
22
 
17
23
  Defines state, data flow, module boundaries, contracts, risks, and rollback.
18
24
 
19
- ## Code Locator
20
-
21
- Read-only. Finds files, symbols, call chains, existing tests, and local patterns.
22
-
23
- ## Builder
24
-
25
- Implements a bounded slice. Avoids unrelated refactors.
25
+ ## Code Locator
26
+
27
+ Read-only. Finds files, symbols, call chains, existing tests, and local patterns.
28
+
29
+ Also called Locator in portable role fallback packets.
30
+
31
+ ## Builder
32
+
33
+ Implements a bounded slice. Avoids unrelated refactors.
34
+
35
+ Also called Implementer in portable role fallback packets.
36
+
37
+ ## Verifier
38
+
39
+ Runs focused checks and records what evidence level the check proves.
40
+
41
+ Maps to QA in smaller tasks.
26
42
 
27
43
  ## Reviewer
28
44
 
@@ -32,18 +48,23 @@ Checks correctness, regressions, architecture drift, security, and missing tests
32
48
 
33
49
  Runs focused verification, browser smoke, API smoke, or screenshot checks.
34
50
 
35
- ## Docs/Evidence
36
-
37
- Writes evidence, changelog notes, ADR links, and learning entries. Does not modify implementation unless explicitly assigned.
51
+ ## Docs/Evidence
52
+
53
+ Writes evidence, changelog notes, ADR links, and learning entries. Does not modify implementation unless explicitly assigned.
54
+
55
+ ## Release
56
+
57
+ Checks release, CI, package, public, owner, marketplace, registry, and host-runtime claim boundaries. Does not turn local evidence into external acceptance.
38
58
 
39
59
  ## Dispatch Rules
40
60
 
41
- - Use real subagent tools only when exposed by the current host.
42
- - Give each agent a role, files allowed, expected output, and forbidden actions. Use `assets/templates/dispatch-packet.md` when the assignment needs durable boundaries or evidence.
43
- - Avoid parallel writes to the same files.
44
- - If subagents are unavailable, execute roles sequentially in the main session and say so.
61
+ - Use real subagent tools only when exposed by the current host.
62
+ - Give each agent a role, files allowed, expected output, and forbidden actions. Use `assets/templates/dispatch-packet.md` when the assignment needs durable boundaries or evidence.
63
+ - For portable fallback packets, use `references/role-dispatch-fallback.md` and `assets/templates/role-fallback-packet.md`.
64
+ - Avoid parallel writes to the same files.
65
+ - If subagents are unavailable, execute roles sequentially in the main session and say so.
45
66
 
46
67
  ## File Ownership
47
68
 
48
- Use `references/file-ownership.md` before assigning write access, running parallel implementation, or editing in a dirty worktree. Keep locator, reviewer, and QA roles read-only unless explicitly assigned otherwise.
69
+ Use `references/file-ownership.md` before assigning write access, running parallel implementation, or editing in a dirty worktree. Keep locator, verifier, reviewer, release, and QA roles read-only unless explicitly assigned otherwise.
49
70
 
@@ -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,29 @@ 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. For a deliberate product support slice, set `currentSlice.supportSliceBoundary` to a narrow scope or exit criterion; `/gse continue` surfaces it and keeps `CP23` as a soft outcome-steering check.
110
+ 9. Execute, verify, record evidence, update `.gse/state.json` and `.gse/evidence/index.jsonl`, and close only when accepted by the applicable gate.
111
+
112
+ Portable helper:
113
+
114
+ ```text
115
+ node <gse-skill>/scripts/generate-continue-packet.mjs --target <project-root>
116
+ ```
117
+
118
+ Project guard helper:
119
+
120
+ ```text
121
+ node <gse-skill>/scripts/audit-project-guards.mjs --target <project-root> --json
122
+ ```
108
123
 
109
124
  For existing projects that have `.gse/` but do not yet have machine-readable continuation files:
110
125
 
@@ -163,7 +178,8 @@ Expected behavior:
163
178
  3. Do not fix unrelated project code unless explicitly asked.
164
179
 
165
180
  ```text
166
- /gse learn --summary "Prefer UTF-8 safe readers for Chinese docs before judging mojibake" --trigger "encoding review" --source "project slice"
181
+ /gse learn --summary "Prefer UTF-8 safe readers for Chinese docs before judging mojibake" --trigger "encoding review" --source "project slice"
182
+ /gse learn --promote
167
183
  ```
168
184
 
169
185
  Expected behavior:
@@ -172,7 +188,8 @@ Expected behavior:
172
188
  2. Require `--summary`; accept optional `--trigger`, `--source`, `--impact`, and `--promotion`.
173
189
  3. Append the entry only when `--execute` is supplied.
174
190
  4. Skip duplicate summaries instead of appending repeated lessons.
175
- 5. Keep raw chain-of-thought, long logs, and temporary attempts out of learnings.
191
+ 5. Keep raw chain-of-thought, long logs, and temporary attempts out of learnings.
192
+ 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
193
 
177
194
  ```text
178
195
  /gse status
@@ -181,22 +198,34 @@ Expected behavior:
181
198
  Expected behavior:
182
199
 
183
200
  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`.
201
+ 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
202
  3. Do not treat status output as completion evidence unless the relevant gate audit is also recorded.
186
203
 
187
- ```text
188
- /gse doctor
189
- ```
204
+ ```text
205
+ /gse doctor
206
+ ```
190
207
 
191
208
  Expected behavior:
192
209
 
193
- 1. For the GSE skill package, run the public acceptance doctor and list remaining owner/external blockers with concrete record commands.
210
+ 1. For the GSE skill package, run the public acceptance doctor and list pending owner/external claim evidence with concrete record commands.
194
211
  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
- ```
212
+ 3. Keep owner-required and external-required gates explicit. Do not convert local mechanics into public acceptance.
213
+
214
+ ```text
215
+ /gse repair
216
+ ```
217
+
218
+ Expected behavior:
219
+
220
+ 1. Read `.gse/state.json` and `.gse/evidence/index.jsonl`.
221
+ 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.
222
+ 3. Stay read-only by default.
223
+ 4. Automatic writes are limited to reversible residual-risk compaction with a backup, and require `--execute`.
224
+ 5. Do not guess or overwrite broken JSON/JSONL; report the file and line/error so the owner or agent can repair deliberately.
225
+
226
+ ```text
227
+ /gse owner-actions
228
+ ```
200
229
 
201
230
  Expected behavior:
202
231
 
@@ -278,7 +307,7 @@ Expected behavior:
278
307
  ## Completion Rules
279
308
 
280
309
  - `/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.
310
+ - `/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
311
  - Portable close check:
283
312
 
284
313
  ```text
@@ -291,5 +320,6 @@ node <gse-skill>/scripts/audit-close-gate.mjs --target <project-root>
291
320
  node <gse-skill>/scripts/close-change.mjs --target <project-root> --change-id <change-id> --status result|verified|accepted --json
292
321
  ```
293
322
 
294
- - `/gse audit` cannot certify arbitrary repositories unless project-specific checks ran.
323
+ - `/gse maintenance` verifies recurring upkeep coverage and command wiring; it does not replace real external host, CI, marketplace, or owner evidence.
324
+ - `/gse audit` cannot certify arbitrary repositories unless project-specific checks ran.
295
325
  - `/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