@t275005746/gse 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.yml +42 -0
- package/.github/ISSUE_TEMPLATE/change_request.yml +50 -0
- package/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +38 -0
- package/.github/workflows/validate-gse.yml +33 -0
- package/.gse/README.md +18 -0
- package/.gse/gse-development-protocol.md +50 -0
- package/.gse/project-profile.md +29 -0
- package/.gse/quality-gates.md +25 -0
- package/.gse/releases/public-channel-publication-pending.md +49 -0
- package/.gse/releases/public-ci-run-pending.md +53 -0
- package/.gse/releases/public-release-owner-required.md +65 -0
- package/.gse/releases/public-repository-settings-owner-required.md +59 -0
- package/.gse/releases/public-security-contact-owner-required.md +45 -0
- package/.gse/state.json +27 -0
- package/CHANGELOG.md +24 -0
- package/CONTRIBUTING.md +64 -0
- package/LICENSE +21 -0
- package/README.md +236 -0
- package/README.zh-CN.md +236 -0
- package/SECURITY.md +41 -0
- package/SKILL.md +148 -0
- package/SUPPORT.md +38 -0
- package/agents/openai.yaml +4 -0
- package/assets/marketplace/README.md +7 -0
- package/assets/marketplace/gse-listing.json +75 -0
- package/assets/templates/acceptance-execution-packet.md +73 -0
- package/assets/templates/adr.md +14 -0
- package/assets/templates/change-brief.md +16 -0
- package/assets/templates/design.md +18 -0
- package/assets/templates/dispatch-packet.md +104 -0
- package/assets/templates/evidence.md +14 -0
- package/assets/templates/execution-quality-pack.md +65 -0
- package/assets/templates/goal-map.md +21 -0
- package/assets/templates/host-adapter.md +48 -0
- package/assets/templates/host-ui-invocation-record.md +42 -0
- package/assets/templates/incident-review.md +60 -0
- package/assets/templates/public-channel-publication-record.md +49 -0
- package/assets/templates/public-ci-run-record.md +53 -0
- package/assets/templates/public-release-record.md +65 -0
- package/assets/templates/public-repository-settings-record.md +59 -0
- package/assets/templates/public-security-contact-record.md +45 -0
- package/assets/templates/release-trust-record.md +32 -0
- package/assets/templates/review.md +18 -0
- package/assets/templates/spec.md +16 -0
- package/assets/templates/target-adoption-evidence.md +29 -0
- package/assets/templates/tasks.md +17 -0
- package/assets/templates/update-release-acceptance-record.md +58 -0
- package/examples/README.md +22 -0
- package/examples/agent-runtime-host/.claude/gse-adapter.md +6 -0
- package/examples/agent-runtime-host/.codex/gse-adapter.md +7 -0
- package/examples/agent-runtime-host/.gse/goal-map.md +7 -0
- package/examples/agent-runtime-host/.gse/project-profile.md +27 -0
- package/examples/agent-runtime-host/.gse/tooling.md +5 -0
- package/examples/agent-runtime-host/.mcp.json +9 -0
- package/examples/agent-runtime-host/AGENTS.md +5 -0
- package/examples/agent-runtime-host/README.md +10 -0
- package/examples/agent-runtime-host/docs/model-routing.md +5 -0
- package/examples/cli-tool/.gse/project-profile.md +21 -0
- package/examples/cli-tool/AGENTS.md +5 -0
- package/examples/cli-tool/README.md +12 -0
- package/examples/cli-tool/package.json +21 -0
- package/examples/small-app/.env.example +2 -0
- package/examples/small-app/.github/workflows/ci.yml +8 -0
- package/examples/small-app/AGENTS.md +5 -0
- package/examples/small-app/README.md +12 -0
- package/examples/small-app/package.json +26 -0
- package/examples/small-app/playwright.config.ts +4 -0
- package/package.json +53 -0
- package/references/adoption-recipes.md +171 -0
- package/references/agent-roles.md +49 -0
- package/references/architecture-health.md +101 -0
- package/references/benchmark-audit.md +73 -0
- package/references/commands.md +295 -0
- package/references/community-channels.md +46 -0
- package/references/compatibility.md +70 -0
- package/references/design-basis.md +38 -0
- package/references/domain-model.md +129 -0
- package/references/domain-quality-gates.md +75 -0
- package/references/drift-audit.md +81 -0
- package/references/evidence-taxonomy.md +123 -0
- package/references/file-ownership.md +107 -0
- package/references/final-readiness.md +84 -0
- package/references/forward-test.md +133 -0
- package/references/goal-map.md +36 -0
- package/references/host-adapters.md +119 -0
- package/references/learning-system.md +35 -0
- package/references/marketplace-discovery.md +46 -0
- package/references/model-routing.md +103 -0
- package/references/open-source-defaults.md +39 -0
- package/references/operating-model.md +52 -0
- package/references/packaging.md +277 -0
- package/references/project-agent-workspace.md +89 -0
- package/references/project-bootstrap.md +122 -0
- package/references/project-profile.md +57 -0
- package/references/public-release.md +174 -0
- package/references/quality-gates.md +100 -0
- package/references/recovery.md +176 -0
- package/references/release-trust.md +43 -0
- package/references/release.md +126 -0
- package/references/review.md +141 -0
- package/references/router.md +90 -0
- package/references/spec-workflow.md +66 -0
- package/references/task-levels.md +81 -0
- package/references/tool-adapters.md +73 -0
- package/scripts/audit-acceptance-execution-packet.mjs +133 -0
- package/scripts/audit-adoption-recipes.mjs +99 -0
- package/scripts/audit-adoption.mjs +154 -0
- package/scripts/audit-change-lifecycle.mjs +77 -0
- package/scripts/audit-change-system.mjs +134 -0
- package/scripts/audit-ci-readiness.mjs +107 -0
- package/scripts/audit-close-gate.mjs +323 -0
- package/scripts/audit-command-adapters.mjs +91 -0
- package/scripts/audit-command-execution.mjs +210 -0
- package/scripts/audit-commands.mjs +117 -0
- package/scripts/audit-compatibility.mjs +149 -0
- package/scripts/audit-completion-readiness.mjs +292 -0
- package/scripts/audit-distribution.mjs +251 -0
- package/scripts/audit-domain-quality-gates.mjs +108 -0
- package/scripts/audit-evidence-placeholders.mjs +126 -0
- package/scripts/audit-final-acceptance-packet.mjs +148 -0
- package/scripts/audit-final-form-progress-report.mjs +161 -0
- package/scripts/audit-final-form-stale-copy.mjs +221 -0
- package/scripts/audit-final-readiness-promotion.mjs +255 -0
- package/scripts/audit-final-readiness.mjs +226 -0
- package/scripts/audit-fixtures.mjs +154 -0
- package/scripts/audit-fresh-session-readiness.mjs +177 -0
- package/scripts/audit-gse.mjs +275 -0
- package/scripts/audit-host-adapters.mjs +119 -0
- package/scripts/audit-host-runtime-evidence-handoff.mjs +159 -0
- package/scripts/audit-host-runtime-invocation-drill.mjs +240 -0
- package/scripts/audit-host-runtime-invocations.mjs +254 -0
- package/scripts/audit-host-ui-invocation.mjs +132 -0
- package/scripts/audit-learning-system.mjs +103 -0
- package/scripts/audit-local-final-form-completion.mjs +131 -0
- package/scripts/audit-marketplace-discovery.mjs +122 -0
- package/scripts/audit-npm-package-metadata.mjs +155 -0
- package/scripts/audit-npm-publish-dry-run.mjs +169 -0
- package/scripts/audit-npm-tarball-install.mjs +191 -0
- package/scripts/audit-open-source-defaults.mjs +92 -0
- package/scripts/audit-open-source-readiness.mjs +97 -0
- package/scripts/audit-owner-external-gate-kit.mjs +218 -0
- package/scripts/audit-project.mjs +323 -0
- package/scripts/audit-public-acceptance-command-dry-run-drill.mjs +203 -0
- package/scripts/audit-public-acceptance-handoff.mjs +142 -0
- package/scripts/audit-public-acceptance-readiness.mjs +224 -0
- package/scripts/audit-public-channel-publication.mjs +248 -0
- package/scripts/audit-public-ci-run.mjs +184 -0
- package/scripts/audit-public-collaboration-templates.mjs +98 -0
- package/scripts/audit-public-external-gate-probe.mjs +206 -0
- package/scripts/audit-public-release-checklist.mjs +133 -0
- package/scripts/audit-public-release-decision.mjs +201 -0
- package/scripts/audit-public-release-metadata.mjs +176 -0
- package/scripts/audit-public-repository-settings.mjs +237 -0
- package/scripts/audit-public-security-contact.mjs +171 -0
- package/scripts/audit-readme-docs.mjs +185 -0
- package/scripts/audit-recovery-readiness.mjs +98 -0
- package/scripts/audit-release-bundle.mjs +251 -0
- package/scripts/audit-release-owner-action-plan-drill.mjs +277 -0
- package/scripts/audit-release-owner-action-plan.mjs +164 -0
- package/scripts/audit-release-readiness.mjs +106 -0
- package/scripts/audit-release-status-manifest.mjs +165 -0
- package/scripts/audit-release-trust.mjs +62 -0
- package/scripts/audit-remote-distribution.mjs +266 -0
- package/scripts/audit-roadmap-consistency.mjs +235 -0
- package/scripts/audit-signing.mjs +147 -0
- package/scripts/audit-state-freshness.mjs +113 -0
- package/scripts/audit-target-adoption-evidence.mjs +117 -0
- package/scripts/audit-target-project.mjs +507 -0
- package/scripts/audit-update-release-acceptance.mjs +136 -0
- package/scripts/audit-v1-target-validation.mjs +269 -0
- package/scripts/audit-validation-profiles.mjs +125 -0
- package/scripts/close-change.mjs +116 -0
- package/scripts/discover-project-profile.mjs +307 -0
- package/scripts/forward-test-gse.mjs +146 -0
- package/scripts/generate-command-adapter.mjs +231 -0
- package/scripts/generate-final-acceptance-packet.mjs +181 -0
- package/scripts/generate-final-form-progress-report.mjs +205 -0
- package/scripts/generate-host-adapter.mjs +73 -0
- package/scripts/generate-host-runtime-evidence-handoff.mjs +206 -0
- package/scripts/generate-owner-external-gate-kit.mjs +295 -0
- package/scripts/generate-public-acceptance-handoff.mjs +168 -0
- package/scripts/generate-public-release-checklist.mjs +207 -0
- package/scripts/generate-release-bundle.mjs +505 -0
- package/scripts/generate-release-owner-action-plan.mjs +172 -0
- package/scripts/generate-release-status-manifest.mjs +200 -0
- package/scripts/generate-session-prompt.mjs +188 -0
- package/scripts/gse.mjs +67 -0
- package/scripts/init-change.mjs +265 -0
- package/scripts/init-project.mjs +785 -0
- package/scripts/install-gse.mjs +234 -0
- package/scripts/lib/evidence-placeholders.mjs +28 -0
- package/scripts/package-gse.mjs +174 -0
- package/scripts/probe-public-external-gates.mjs +167 -0
- package/scripts/record-host-invocation.mjs +151 -0
- package/scripts/record-learning.mjs +137 -0
- package/scripts/record-public-channel-publication.mjs +178 -0
- package/scripts/record-public-ci-run.mjs +180 -0
- package/scripts/record-public-release.mjs +175 -0
- package/scripts/record-public-repository-settings.mjs +209 -0
- package/scripts/record-public-security-contact.mjs +157 -0
- package/scripts/run-gse-command.mjs +538 -0
- package/scripts/run-validation-profile.mjs +146 -0
- package/scripts/sign-gse-package.mjs +83 -0
- package/scripts/update-project-state.mjs +223 -0
- package/scripts/validate-gse.mjs +1168 -0
- package/scripts/verify-gse-package.mjs +85 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import { mkdtempSync, rmSync } from 'node:fs'
|
|
5
|
+
import { tmpdir } from 'node:os'
|
|
6
|
+
import { spawnSync } from 'node:child_process'
|
|
7
|
+
|
|
8
|
+
const args = process.argv.slice(2)
|
|
9
|
+
|
|
10
|
+
function readArg(name, fallback = null) {
|
|
11
|
+
const index = args.indexOf(name)
|
|
12
|
+
if (index === -1) return fallback
|
|
13
|
+
return args[index + 1] ?? fallback
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function hasArg(name) {
|
|
17
|
+
return args.includes(name)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const root = path.resolve(readArg('--root', path.join(import.meta.dirname, '..')))
|
|
21
|
+
const out = path.resolve(readArg('--out', path.join(root, '.gse', 'acceptance', 'owner-external-gate-kit')))
|
|
22
|
+
const displayRoot = readArg('--display-root', '<gse-root>')
|
|
23
|
+
const jsonOnly = hasArg('--json')
|
|
24
|
+
const dryRun = hasArg('--dry-run')
|
|
25
|
+
const force = hasArg('--force')
|
|
26
|
+
|
|
27
|
+
function run(command, commandArgs) {
|
|
28
|
+
const result = spawnSync(command, commandArgs, {
|
|
29
|
+
cwd: root,
|
|
30
|
+
encoding: 'utf8',
|
|
31
|
+
windowsHide: true,
|
|
32
|
+
})
|
|
33
|
+
return {
|
|
34
|
+
command: [command, ...commandArgs].join(' '),
|
|
35
|
+
status: result.status ?? 1,
|
|
36
|
+
stdout: (result.stdout ?? '').trim(),
|
|
37
|
+
stderr: (result.stderr ?? '').trim(),
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function parseJson(stdout) {
|
|
42
|
+
try {
|
|
43
|
+
return JSON.parse(stdout)
|
|
44
|
+
} catch {
|
|
45
|
+
return null
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function stageFor(gate) {
|
|
50
|
+
if (gate.area === 'License decision') return '01-owner-license'
|
|
51
|
+
if (gate.area === 'Public security contact') return '02-owner-security-contact'
|
|
52
|
+
if (gate.area === 'Public repository settings') return '03-public-repository-settings'
|
|
53
|
+
if (gate.area === 'Public CI run') return '04-public-ci-run'
|
|
54
|
+
if (gate.area === 'Public registry publication') return '05-public-registry-publication'
|
|
55
|
+
if (gate.area === 'Marketplace approval') return '06-marketplace-approval'
|
|
56
|
+
if (gate.area === 'Native slash command') return '07-native-slash-command'
|
|
57
|
+
if (gate.area === 'Other host runtime invocation') return '08-other-host-runtime-invocation'
|
|
58
|
+
return '99-other'
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function runJsonScript(scriptName, scriptArgs = []) {
|
|
62
|
+
const result = run(process.execPath, [path.join(root, 'scripts', scriptName), '--root', root, '--display-root', displayRoot, ...scriptArgs, '--json'])
|
|
63
|
+
return { result, data: parseJson(result.stdout) }
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const tempRoot = mkdtempSync(path.join(tmpdir(), 'gse-owner-external-gate-kit-src-'))
|
|
67
|
+
const generatedPaths = {
|
|
68
|
+
finalAcceptancePacket: path.join(tempRoot, 'final-acceptance-packet.md'),
|
|
69
|
+
publicAcceptanceHandoff: path.join(tempRoot, 'public-acceptance-handoff.md'),
|
|
70
|
+
hostRuntimeEvidenceHandoff: path.join(tempRoot, 'host-runtime-evidence-handoff.md'),
|
|
71
|
+
releaseStatusManifest: path.join(tempRoot, 'release-status-manifest.json'),
|
|
72
|
+
releaseOwnerActionPlan: path.join(tempRoot, 'release-owner-action-plan.md'),
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const errors = []
|
|
76
|
+
const doctor = runJsonScript('audit-public-acceptance-readiness.mjs')
|
|
77
|
+
if (doctor.result.status !== 0 || !doctor.data) errors.push('public acceptance doctor failed')
|
|
78
|
+
|
|
79
|
+
const finalPacket = runJsonScript('generate-final-acceptance-packet.mjs', ['--out', generatedPaths.finalAcceptancePacket, '--force'])
|
|
80
|
+
if (finalPacket.result.status !== 0) errors.push('final acceptance packet generation failed')
|
|
81
|
+
|
|
82
|
+
const publicHandoff = runJsonScript('generate-public-acceptance-handoff.mjs', ['--out', generatedPaths.publicAcceptanceHandoff, '--force'])
|
|
83
|
+
if (publicHandoff.result.status !== 0) errors.push('public acceptance handoff generation failed')
|
|
84
|
+
|
|
85
|
+
const hostHandoff = runJsonScript('generate-host-runtime-evidence-handoff.mjs', ['--out', generatedPaths.hostRuntimeEvidenceHandoff, '--force'])
|
|
86
|
+
if (hostHandoff.result.status !== 0) errors.push('host runtime evidence handoff generation failed')
|
|
87
|
+
|
|
88
|
+
const manifest = runJsonScript('generate-release-status-manifest.mjs', ['--out', generatedPaths.releaseStatusManifest, '--force'])
|
|
89
|
+
if (manifest.result.status !== 0) errors.push('release status manifest generation failed')
|
|
90
|
+
|
|
91
|
+
const actionPlan = runJsonScript('generate-release-owner-action-plan.mjs', ['--manifest', generatedPaths.releaseStatusManifest, '--out', generatedPaths.releaseOwnerActionPlan, '--force'])
|
|
92
|
+
if (actionPlan.result.status !== 0) errors.push('release owner action plan generation failed')
|
|
93
|
+
|
|
94
|
+
const gates = [...(doctor.data?.pendingGates ?? [])].sort((a, b) => stageFor(a).localeCompare(stageFor(b)))
|
|
95
|
+
|
|
96
|
+
function renderReadme() {
|
|
97
|
+
const lines = []
|
|
98
|
+
lines.push('# GSE Owner / External Gate Kit')
|
|
99
|
+
lines.push('')
|
|
100
|
+
lines.push('Generated: ' + new Date().toISOString())
|
|
101
|
+
lines.push('Root: ' + displayRoot)
|
|
102
|
+
lines.push('')
|
|
103
|
+
lines.push('## Purpose')
|
|
104
|
+
lines.push('')
|
|
105
|
+
lines.push('This kit is the one-directory execution packet for the remaining owner-required and external-required final-form gates. It does not choose a license, publish a package, configure a public repository, run public CI, approve a marketplace listing, or prove host-native slash-command support.')
|
|
106
|
+
lines.push('')
|
|
107
|
+
lines.push('## Current Boundary')
|
|
108
|
+
lines.push('')
|
|
109
|
+
lines.push('- Public accepted: ' + (doctor.data?.summary?.publicAccepted ?? doctor.data?.workflows?.publicAccepted ?? 'unknown'))
|
|
110
|
+
lines.push('- Pending gates: ' + gates.length)
|
|
111
|
+
lines.push('- Source of truth: `scripts/audit-public-acceptance-readiness.mjs` and `references/final-readiness.md`')
|
|
112
|
+
lines.push('')
|
|
113
|
+
lines.push('## Execution Order')
|
|
114
|
+
lines.push('')
|
|
115
|
+
for (const gate of gates) {
|
|
116
|
+
lines.push('- `' + stageFor(gate) + '`: ' + gate.area + ' (' + gate.owner + ')')
|
|
117
|
+
}
|
|
118
|
+
lines.push('')
|
|
119
|
+
lines.push('## Files')
|
|
120
|
+
lines.push('')
|
|
121
|
+
lines.push('- `action-packet.md`: concise human-facing execution packet.')
|
|
122
|
+
lines.push('- `final-acceptance-packet.md`: final readiness acceptance checklist generated fresh.')
|
|
123
|
+
lines.push('- `public-acceptance-handoff.md`: public acceptance handoff generated fresh.')
|
|
124
|
+
lines.push('- `host-runtime-evidence-handoff.md`: host runtime evidence handoff generated fresh.')
|
|
125
|
+
lines.push('- `release-status-manifest.json`: machine-readable release status generated fresh.')
|
|
126
|
+
lines.push('- `release-owner-action-plan.md`: owner-facing action plan generated fresh from the manifest.')
|
|
127
|
+
lines.push('- `record-commands.md`: copy-ready record commands grouped by execution order.')
|
|
128
|
+
lines.push('- `verification-commands.md`: audits to run after attaching real evidence.')
|
|
129
|
+
lines.push('- `kit-manifest.json`: machine-readable inventory for the kit itself.')
|
|
130
|
+
lines.push('')
|
|
131
|
+
lines.push('## Anti-Overclaim')
|
|
132
|
+
lines.push('')
|
|
133
|
+
lines.push('- Do not claim public release acceptance until `publicAccepted` is verified by final readiness audits.')
|
|
134
|
+
lines.push('- Do not claim registry publication, marketplace approval, public CI, or repository settings without real external records.')
|
|
135
|
+
lines.push('- Do not claim native slash-command support from fixture drills, generated pointers, or portable text-command records.')
|
|
136
|
+
lines.push('- Keep owner-required and external-required gates visible until accepted evidence promotes them.')
|
|
137
|
+
return lines.join('\n') + '\n'
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function renderRecordCommands() {
|
|
141
|
+
const lines = []
|
|
142
|
+
lines.push('# GSE Owner / External Gate Record Commands')
|
|
143
|
+
lines.push('')
|
|
144
|
+
for (const gate of gates) {
|
|
145
|
+
lines.push('## ' + stageFor(gate) + ' - ' + gate.area)
|
|
146
|
+
lines.push('')
|
|
147
|
+
lines.push('- Responsible party: ' + gate.owner)
|
|
148
|
+
lines.push('- Current status: ' + gate.status)
|
|
149
|
+
lines.push('- Required evidence: ' + gate.requiredEvidence)
|
|
150
|
+
lines.push('')
|
|
151
|
+
lines.push('```bash')
|
|
152
|
+
lines.push(gate.recordCommand)
|
|
153
|
+
lines.push('```')
|
|
154
|
+
lines.push('')
|
|
155
|
+
lines.push('Preflight command:')
|
|
156
|
+
lines.push('')
|
|
157
|
+
lines.push('```bash')
|
|
158
|
+
lines.push(gate.preflightCommand ?? `${gate.recordCommand} --dry-run --json`)
|
|
159
|
+
lines.push('```')
|
|
160
|
+
lines.push('')
|
|
161
|
+
}
|
|
162
|
+
return lines.join('\n') + '\n'
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function renderVerificationCommands() {
|
|
166
|
+
return [
|
|
167
|
+
'# GSE Owner / External Gate Verification Commands',
|
|
168
|
+
'',
|
|
169
|
+
'Run these commands after attaching real owner/external records:',
|
|
170
|
+
'',
|
|
171
|
+
'```bash',
|
|
172
|
+
'node scripts/run-gse-command.mjs --root __GSE__ --target __GSE__ --command "/gse probe --public-repo-url __PUBLIC_REPO_URL__ --security-contact-url __SECURITY_CONTACT_URL__ --public-ci-run-url __PUBLIC_CI_RUN_URL__ --registry-package-url __REGISTRY_PACKAGE_URL__ --marketplace-url __MARKETPLACE_LISTING_URL__ --native-host-evidence __NATIVE_HOST_EVIDENCE__ --other-host-evidence __OTHER_HOST_EVIDENCE__" --json',
|
|
173
|
+
'node scripts/audit-public-acceptance-readiness.mjs --root __GSE__ --json',
|
|
174
|
+
'node scripts/audit-public-acceptance-command-dry-run-drill.mjs --root __GSE__ --json',
|
|
175
|
+
'node scripts/audit-final-readiness.mjs --root __GSE__ --json',
|
|
176
|
+
'node scripts/audit-final-acceptance-packet.mjs --root __GSE__ --json',
|
|
177
|
+
'node scripts/audit-release-owner-action-plan.mjs --root __GSE__ --json',
|
|
178
|
+
'node scripts/audit-host-runtime-invocations.mjs --root __GSE__ --json',
|
|
179
|
+
'node scripts/audit-owner-external-gate-kit.mjs --root __GSE__ --json',
|
|
180
|
+
'node scripts/validate-gse.mjs --root __GSE__ --json',
|
|
181
|
+
'node scripts/audit-close-gate.mjs --target __GSE__ --json',
|
|
182
|
+
'```',
|
|
183
|
+
'',
|
|
184
|
+
'Acceptance rule: every pending gate must have accepted real evidence and final readiness must report `publicAccepted: verified`. Local fixture drills, pointer adapters, and generated handoff files do not count as external acceptance.',
|
|
185
|
+
'',
|
|
186
|
+
].join('\n')
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function renderActionPacket() {
|
|
190
|
+
const lines = []
|
|
191
|
+
const pendingAreas = new Set(gates.map((gate) => gate.area))
|
|
192
|
+
const firstAction = pendingAreas.has('License decision')
|
|
193
|
+
? 'Start with owner-required decisions: license decision and public security contact. Then attach public repository, CI, publication, marketplace, and host runtime evidence as those external systems become available.'
|
|
194
|
+
: pendingAreas.has('Public security contact')
|
|
195
|
+
? 'Start with the public security contact. Then attach public repository, CI, publication, marketplace, and host runtime evidence as those external systems become available.'
|
|
196
|
+
: 'Start with the first available public repository, CI, publication, marketplace, or host runtime evidence record.'
|
|
197
|
+
lines.push('# GSE Owner / External Action Packet')
|
|
198
|
+
lines.push('')
|
|
199
|
+
lines.push('Public accepted: ' + (doctor.data?.summary?.publicAccepted ?? 'unknown'))
|
|
200
|
+
lines.push('')
|
|
201
|
+
lines.push('## Pending Gates')
|
|
202
|
+
lines.push('')
|
|
203
|
+
for (const gate of gates) {
|
|
204
|
+
lines.push('- ' + stageFor(gate) + ': ' + gate.area + ' -> ' + gate.owner)
|
|
205
|
+
}
|
|
206
|
+
lines.push('')
|
|
207
|
+
lines.push('## First Action')
|
|
208
|
+
lines.push('')
|
|
209
|
+
lines.push(firstAction)
|
|
210
|
+
lines.push('')
|
|
211
|
+
lines.push('## Boundary')
|
|
212
|
+
lines.push('')
|
|
213
|
+
lines.push('This packet is not public acceptance. It is the execution kit for collecting the evidence that can later promote final readiness.')
|
|
214
|
+
return lines.join('\n') + '\n'
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function readGenerated(filePath) {
|
|
218
|
+
return fs.existsSync(filePath) ? fs.readFileSync(filePath, 'utf8') : ''
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const kitManifest = JSON.stringify({
|
|
222
|
+
schemaVersion: 1,
|
|
223
|
+
generatedAt: new Date().toISOString(),
|
|
224
|
+
root: displayRoot,
|
|
225
|
+
publicAccepted: doctor.data?.summary?.publicAccepted ?? doctor.data?.workflows?.publicAccepted ?? 'unknown',
|
|
226
|
+
pendingGateCount: gates.length,
|
|
227
|
+
generatedFresh: {
|
|
228
|
+
finalAcceptancePacket: true,
|
|
229
|
+
publicAcceptanceHandoff: true,
|
|
230
|
+
hostRuntimeEvidenceHandoff: true,
|
|
231
|
+
releaseStatusManifest: true,
|
|
232
|
+
releaseOwnerActionPlan: true,
|
|
233
|
+
},
|
|
234
|
+
gates: gates.map((gate) => ({
|
|
235
|
+
stage: stageFor(gate),
|
|
236
|
+
area: gate.area,
|
|
237
|
+
status: gate.status,
|
|
238
|
+
owner: gate.owner,
|
|
239
|
+
currentEvidence: gate.currentEvidence,
|
|
240
|
+
requiredEvidence: gate.requiredEvidence,
|
|
241
|
+
recordCommand: gate.recordCommand,
|
|
242
|
+
preflightCommand: gate.preflightCommand,
|
|
243
|
+
willPromoteWhenAccepted: gate.willPromoteWhenAccepted,
|
|
244
|
+
})),
|
|
245
|
+
limits: [
|
|
246
|
+
'Kit generation does not choose a license.',
|
|
247
|
+
'Kit generation does not publish a package or approve a marketplace listing.',
|
|
248
|
+
'Kit generation does not prove host-native slash-command support.',
|
|
249
|
+
],
|
|
250
|
+
}, null, 2) + '\n'
|
|
251
|
+
|
|
252
|
+
const files = {
|
|
253
|
+
'README.md': renderReadme(),
|
|
254
|
+
'action-packet.md': renderActionPacket(),
|
|
255
|
+
'final-acceptance-packet.md': readGenerated(generatedPaths.finalAcceptancePacket),
|
|
256
|
+
'public-acceptance-handoff.md': readGenerated(generatedPaths.publicAcceptanceHandoff),
|
|
257
|
+
'host-runtime-evidence-handoff.md': readGenerated(generatedPaths.hostRuntimeEvidenceHandoff),
|
|
258
|
+
'release-status-manifest.json': readGenerated(generatedPaths.releaseStatusManifest),
|
|
259
|
+
'release-owner-action-plan.md': readGenerated(generatedPaths.releaseOwnerActionPlan),
|
|
260
|
+
'record-commands.md': renderRecordCommands(),
|
|
261
|
+
'verification-commands.md': renderVerificationCommands(),
|
|
262
|
+
'kit-manifest.json': kitManifest,
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (errors.length === 0 && !dryRun) {
|
|
266
|
+
if (fs.existsSync(out) && !force) {
|
|
267
|
+
errors.push('output exists; pass --force to overwrite')
|
|
268
|
+
} else {
|
|
269
|
+
if (fs.existsSync(out)) fs.rmSync(out, { recursive: true, force: true })
|
|
270
|
+
fs.mkdirSync(out, { recursive: true })
|
|
271
|
+
for (const [fileName, content] of Object.entries(files)) {
|
|
272
|
+
fs.writeFileSync(path.join(out, fileName), content, 'utf8')
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
const report = {
|
|
278
|
+
status: errors.length ? 'failed' : dryRun ? 'ready' : 'written',
|
|
279
|
+
root,
|
|
280
|
+
out,
|
|
281
|
+
dryRun,
|
|
282
|
+
errors,
|
|
283
|
+
summary: {
|
|
284
|
+
publicAccepted: doctor.data?.summary?.publicAccepted ?? doctor.data?.workflows?.publicAccepted ?? 'unknown',
|
|
285
|
+
pendingGates: gates.length,
|
|
286
|
+
files: Object.keys(files),
|
|
287
|
+
},
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
rmSync(tempRoot, { recursive: true, force: true })
|
|
291
|
+
|
|
292
|
+
if (jsonOnly) console.log(JSON.stringify(report, null, 2))
|
|
293
|
+
else console.log(files['README.md'])
|
|
294
|
+
|
|
295
|
+
if (report.status === 'failed') process.exit(1)
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import { spawnSync } from 'node:child_process'
|
|
5
|
+
|
|
6
|
+
const args = process.argv.slice(2)
|
|
7
|
+
|
|
8
|
+
function readArg(name, fallback = null) {
|
|
9
|
+
const index = args.indexOf(name)
|
|
10
|
+
if (index === -1) return fallback
|
|
11
|
+
return args[index + 1] ?? fallback
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function hasArg(name) {
|
|
15
|
+
return args.includes(name)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const root = path.resolve(readArg('--root', path.join(import.meta.dirname, '..')))
|
|
19
|
+
const out = path.resolve(readArg('--out', path.join(root, '.gse', 'acceptance', 'public-acceptance-handoff.md')))
|
|
20
|
+
const displayRoot = readArg('--display-root', '<gse-root>')
|
|
21
|
+
const releaseLabel = readArg('--release-label', 'unreleased')
|
|
22
|
+
const jsonOnly = hasArg('--json')
|
|
23
|
+
const dryRun = hasArg('--dry-run')
|
|
24
|
+
const force = hasArg('--force')
|
|
25
|
+
|
|
26
|
+
function run(command, commandArgs) {
|
|
27
|
+
const result = spawnSync(command, commandArgs, {
|
|
28
|
+
cwd: root,
|
|
29
|
+
encoding: 'utf8',
|
|
30
|
+
windowsHide: true,
|
|
31
|
+
})
|
|
32
|
+
return {
|
|
33
|
+
status: result.status ?? 1,
|
|
34
|
+
stdout: (result.stdout ?? '').trim(),
|
|
35
|
+
stderr: (result.stderr ?? '').trim(),
|
|
36
|
+
command: [command, ...commandArgs].join(' '),
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function runDoctor() {
|
|
41
|
+
const result = run(process.execPath, [path.join(root, 'scripts', 'audit-public-acceptance-readiness.mjs'), '--root', root, '--json'])
|
|
42
|
+
if (result.status !== 0) {
|
|
43
|
+
return { ok: false, error: 'public acceptance doctor failed', result }
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
return { ok: true, data: JSON.parse(result.stdout), command: result.command }
|
|
47
|
+
} catch (error) {
|
|
48
|
+
return { ok: false, error: 'public acceptance doctor returned invalid JSON', detail: error.message, result }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function stageFor(gate) {
|
|
53
|
+
if (gate.area === 'License decision') return '1. Owner decision'
|
|
54
|
+
if (gate.area === 'Public security contact') return '2. Owner policy'
|
|
55
|
+
if (gate.area === 'Public repository settings') return '3. Repository setup'
|
|
56
|
+
if (gate.area === 'Public CI run') return '4. Public CI'
|
|
57
|
+
if (gate.area === 'Public registry publication') return '5. Public channel'
|
|
58
|
+
if (gate.area === 'Marketplace approval') return '6. Marketplace or catalog'
|
|
59
|
+
if (gate.area === 'Native slash command') return '7. Host runtime'
|
|
60
|
+
if (gate.area === 'Other host runtime invocation') return '8. Cross-host evidence'
|
|
61
|
+
return 'Other'
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function renderHandoff(doctor) {
|
|
65
|
+
const gates = doctor.pendingGates ?? []
|
|
66
|
+
const gateNames = new Set(gates.map((gate) => gate.area))
|
|
67
|
+
const lines = []
|
|
68
|
+
lines.push('# GSE Public Acceptance Handoff')
|
|
69
|
+
lines.push('')
|
|
70
|
+
lines.push('Generated: ' + new Date().toISOString())
|
|
71
|
+
lines.push('Root: ' + displayRoot)
|
|
72
|
+
lines.push('Release label: ' + releaseLabel)
|
|
73
|
+
lines.push('')
|
|
74
|
+
lines.push('## Purpose')
|
|
75
|
+
lines.push('')
|
|
76
|
+
lines.push('Give the owner and future agents one executable checklist for public acceptance. This handoff does not choose a license, publish a package, configure a repository, approve a marketplace listing, or prove host-native slash-command support.')
|
|
77
|
+
lines.push('')
|
|
78
|
+
lines.push('## Current Boundary')
|
|
79
|
+
lines.push('')
|
|
80
|
+
lines.push('- Public accepted: ' + (doctor.summary?.publicAccepted ?? doctor.workflows?.publicAccepted ?? 'unknown'))
|
|
81
|
+
lines.push('- Pending owner/external gates: ' + gates.length)
|
|
82
|
+
lines.push('- Source of truth: `scripts/audit-public-acceptance-readiness.mjs` and `references/final-readiness.md`')
|
|
83
|
+
lines.push('')
|
|
84
|
+
lines.push('## Execution Order')
|
|
85
|
+
lines.push('')
|
|
86
|
+
for (const gate of gates) {
|
|
87
|
+
lines.push('### ' + stageFor(gate) + ' - ' + gate.area)
|
|
88
|
+
lines.push('')
|
|
89
|
+
lines.push('- Current status: ' + gate.status)
|
|
90
|
+
lines.push('- Responsible party: ' + gate.owner)
|
|
91
|
+
lines.push('- Current evidence: ' + gate.currentEvidence)
|
|
92
|
+
lines.push('- Required evidence: ' + gate.requiredEvidence)
|
|
93
|
+
lines.push('- Record command:')
|
|
94
|
+
lines.push('')
|
|
95
|
+
lines.push('```bash')
|
|
96
|
+
lines.push(gate.recordCommand)
|
|
97
|
+
lines.push('```')
|
|
98
|
+
lines.push('')
|
|
99
|
+
lines.push('- Preflight command:')
|
|
100
|
+
lines.push('')
|
|
101
|
+
lines.push('```bash')
|
|
102
|
+
lines.push(gate.preflightCommand ?? `${gate.recordCommand} --dry-run --json`)
|
|
103
|
+
lines.push('```')
|
|
104
|
+
lines.push('')
|
|
105
|
+
lines.push('- Promotion rule: create a real accepted record, then re-run `node scripts/audit-final-readiness.mjs --root __GSE__ --json` and `node scripts/audit-public-acceptance-readiness.mjs --root __GSE__ --json`.')
|
|
106
|
+
lines.push('')
|
|
107
|
+
}
|
|
108
|
+
lines.push('## Final Verification')
|
|
109
|
+
lines.push('')
|
|
110
|
+
lines.push('Run these commands after owner/external records are attached:')
|
|
111
|
+
lines.push('')
|
|
112
|
+
lines.push('```bash')
|
|
113
|
+
lines.push('node scripts/audit-public-acceptance-readiness.mjs --root __GSE__ --json')
|
|
114
|
+
lines.push('node scripts/audit-final-readiness.mjs --root __GSE__ --json')
|
|
115
|
+
lines.push('node scripts/audit-final-acceptance-packet.mjs --root __GSE__ --json')
|
|
116
|
+
lines.push('node scripts/validate-gse.mjs --root __GSE__ --json')
|
|
117
|
+
lines.push('node scripts/audit-close-gate.mjs --target __GSE__ --json')
|
|
118
|
+
lines.push('```')
|
|
119
|
+
lines.push('')
|
|
120
|
+
lines.push('## Anti-Overclaim')
|
|
121
|
+
lines.push('')
|
|
122
|
+
lines.push('- Do not claim public release acceptance until the final readiness matrix returns `publicAccepted: verified`.')
|
|
123
|
+
lines.push('- Do not claim marketplace availability without a real marketplace or catalog record.')
|
|
124
|
+
lines.push('- Do not claim native slash-command support from portable text-command routing.')
|
|
125
|
+
lines.push('- Do not claim support for a host without a host runtime invocation record for that host.')
|
|
126
|
+
lines.push('- Keep this handoff updated when final-readiness gates change.')
|
|
127
|
+
lines.push('')
|
|
128
|
+
lines.push('## Next Action')
|
|
129
|
+
lines.push('')
|
|
130
|
+
if (gateNames.has('License decision')) {
|
|
131
|
+
lines.push('Start with the owner-required license decision and public security contact, then attach public repository, CI, publication, and host runtime evidence as those systems become available.')
|
|
132
|
+
} else {
|
|
133
|
+
lines.push('Start with the public security contact, then attach public repository, CI, publication, and host runtime evidence as those systems become available.')
|
|
134
|
+
}
|
|
135
|
+
return lines.join('\n') + '\n'
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const doctor = runDoctor()
|
|
139
|
+
if (!doctor.ok) {
|
|
140
|
+
console.error(JSON.stringify({ status: 'failed', root, out, error: doctor.error, detail: doctor.detail, doctorResult: doctor.result }, null, 2))
|
|
141
|
+
process.exit(1)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const handoff = renderHandoff(doctor.data)
|
|
145
|
+
if (!dryRun) {
|
|
146
|
+
if (fs.existsSync(out) && !force) {
|
|
147
|
+
console.error(JSON.stringify({ status: 'exists', root, out, error: 'output exists; pass --force to overwrite' }, null, 2))
|
|
148
|
+
process.exit(1)
|
|
149
|
+
}
|
|
150
|
+
fs.mkdirSync(path.dirname(out), { recursive: true })
|
|
151
|
+
fs.writeFileSync(out, handoff, 'utf8')
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const report = {
|
|
155
|
+
status: dryRun ? 'ready' : 'written',
|
|
156
|
+
root,
|
|
157
|
+
out,
|
|
158
|
+
dryRun,
|
|
159
|
+
doctorCommand: doctor.command,
|
|
160
|
+
summary: {
|
|
161
|
+
publicAccepted: doctor.data.summary?.publicAccepted ?? doctor.data.workflows?.publicAccepted ?? 'unknown',
|
|
162
|
+
pendingGates: doctor.data.pendingGates?.length ?? 0,
|
|
163
|
+
stages: [...new Set((doctor.data.pendingGates ?? []).map(stageFor))],
|
|
164
|
+
},
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (jsonOnly) console.log(JSON.stringify(report, null, 2))
|
|
168
|
+
else console.log(handoff)
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import { spawnSync } from 'node:child_process'
|
|
5
|
+
|
|
6
|
+
const args = process.argv.slice(2)
|
|
7
|
+
|
|
8
|
+
function readArg(name, fallback = null) {
|
|
9
|
+
const index = args.indexOf(name)
|
|
10
|
+
if (index === -1) return fallback
|
|
11
|
+
return args[index + 1] ?? fallback
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function hasArg(name) {
|
|
15
|
+
return args.includes(name)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const root = path.resolve(readArg('--root', path.join(import.meta.dirname, '..')))
|
|
19
|
+
const out = path.resolve(readArg('--out', path.join(root, '.gse', 'acceptance', 'public-release-checklist.md')))
|
|
20
|
+
const manifestPath = path.resolve(readArg('--manifest', path.join(root, '.gse', 'acceptance', 'release-status-manifest.json')))
|
|
21
|
+
const displayRoot = readArg('--display-root', '<gse-root>')
|
|
22
|
+
const jsonOnly = hasArg('--json')
|
|
23
|
+
const dryRun = hasArg('--dry-run')
|
|
24
|
+
const force = hasArg('--force')
|
|
25
|
+
|
|
26
|
+
function run(command, commandArgs) {
|
|
27
|
+
const result = spawnSync(command, commandArgs, {
|
|
28
|
+
cwd: root,
|
|
29
|
+
encoding: 'utf8',
|
|
30
|
+
windowsHide: true,
|
|
31
|
+
})
|
|
32
|
+
return {
|
|
33
|
+
status: result.status ?? 1,
|
|
34
|
+
stdout: (result.stdout ?? '').trim(),
|
|
35
|
+
stderr: (result.stderr ?? '').trim(),
|
|
36
|
+
command: [command, ...commandArgs].join(' '),
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function parseJson(text, label) {
|
|
41
|
+
try {
|
|
42
|
+
return JSON.parse(text)
|
|
43
|
+
} catch (error) {
|
|
44
|
+
throw new Error(`${label} is not valid JSON: ${error.message}`)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function readManifest() {
|
|
49
|
+
if (!fs.existsSync(manifestPath)) {
|
|
50
|
+
const generated = run(process.execPath, [
|
|
51
|
+
path.join(root, 'scripts', 'generate-release-status-manifest.mjs'),
|
|
52
|
+
'--root', root,
|
|
53
|
+
'--out', manifestPath,
|
|
54
|
+
'--force',
|
|
55
|
+
'--json',
|
|
56
|
+
])
|
|
57
|
+
if (generated.status !== 0) {
|
|
58
|
+
throw new Error(`release status manifest generation failed: ${generated.stderr || generated.stdout}`)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return parseJson(fs.readFileSync(manifestPath, 'utf8').replace(/^\uFEFF/, ''), 'release status manifest')
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function gateByArea(gates, area) {
|
|
65
|
+
return gates.find((gate) => gate.area === area)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function safeCommand(command) {
|
|
69
|
+
return (command ?? '').replaceAll('__GSE__', displayRoot)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function renderCommandBlock(command) {
|
|
73
|
+
return ['```text', safeCommand(command), '```']
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function renderPhase(lines, number, title, gate, actions) {
|
|
77
|
+
lines.push(`### ${number}. ${title}`)
|
|
78
|
+
lines.push('')
|
|
79
|
+
if (gate) {
|
|
80
|
+
lines.push(`- Gate: ${gate.area}`)
|
|
81
|
+
lines.push(`- Status: ${gate.status}`)
|
|
82
|
+
lines.push(`- Required evidence: ${gate.requiredEvidence}`)
|
|
83
|
+
} else {
|
|
84
|
+
lines.push('- Gate: local preparation')
|
|
85
|
+
lines.push('- Status: verified locally before public handoff')
|
|
86
|
+
}
|
|
87
|
+
for (const action of actions) lines.push(`- ${action}`)
|
|
88
|
+
if (gate?.preflightCommand) {
|
|
89
|
+
lines.push('')
|
|
90
|
+
lines.push('Preflight:')
|
|
91
|
+
lines.push('')
|
|
92
|
+
lines.push(...renderCommandBlock(gate.preflightCommand))
|
|
93
|
+
}
|
|
94
|
+
if (gate?.recordCommand) {
|
|
95
|
+
lines.push('')
|
|
96
|
+
lines.push('Record accepted evidence:')
|
|
97
|
+
lines.push('')
|
|
98
|
+
lines.push(...renderCommandBlock(gate.recordCommand))
|
|
99
|
+
}
|
|
100
|
+
lines.push('')
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function render(manifest) {
|
|
104
|
+
const gates = manifest.publicAcceptance?.pendingGates ?? []
|
|
105
|
+
const lines = []
|
|
106
|
+
lines.push('# GSE Public Release Checklist')
|
|
107
|
+
lines.push('')
|
|
108
|
+
lines.push(`Generated: ${new Date().toISOString()}`)
|
|
109
|
+
lines.push('Source manifest: `.gse/acceptance/release-status-manifest.json`')
|
|
110
|
+
lines.push('')
|
|
111
|
+
lines.push('## Boundary')
|
|
112
|
+
lines.push('')
|
|
113
|
+
lines.push(`- Public accepted: ${manifest.publicAcceptance?.publicAccepted ?? manifest.claimBoundary?.publicAccepted ?? 'unknown'}`)
|
|
114
|
+
lines.push(`- Pending owner/external gates: ${gates.length}`)
|
|
115
|
+
lines.push('- This checklist is an execution runway. It does not publish, approve, or accept a release by itself.')
|
|
116
|
+
lines.push('- A gate is complete only after real accepted evidence is recorded and final readiness is re-audited.')
|
|
117
|
+
lines.push('')
|
|
118
|
+
lines.push('## Runway')
|
|
119
|
+
lines.push('')
|
|
120
|
+
renderPhase(lines, '01', 'Prepare the release bundle', null, [
|
|
121
|
+
'Run `/gse release` as a dry-run before writing a bundle.',
|
|
122
|
+
'Run `/gse release --execute --out <bundle>` only for the bundle that will be handed off.',
|
|
123
|
+
'Keep `npm publish --dry-run`, tarball install, checksum, provenance, and signing evidence attached to the bundle.',
|
|
124
|
+
])
|
|
125
|
+
renderPhase(lines, '02', 'Publish and configure the public repository', gateByArea(gates, 'Public repository settings'), [
|
|
126
|
+
'Create or update the public repository.',
|
|
127
|
+
'Enable issues, pull requests, visible security policy, branch protection, required checks, review before merge, conversation resolution, force-push restriction, and deletion restriction.',
|
|
128
|
+
])
|
|
129
|
+
renderPhase(lines, '03', 'Approve the public security contact', gateByArea(gates, 'Public security contact'), [
|
|
130
|
+
'Choose the owner-approved vulnerability disclosure path.',
|
|
131
|
+
'Make the contact public and ensure the security policy points to it.',
|
|
132
|
+
])
|
|
133
|
+
renderPhase(lines, '04', 'Run public CI on the release commit', gateByArea(gates, 'Public CI run'), [
|
|
134
|
+
'Run the public workflow on the release commit.',
|
|
135
|
+
'Record the public run URL, commit SHA, branch, required checks, and successful conclusion.',
|
|
136
|
+
])
|
|
137
|
+
renderPhase(lines, '05', 'Publish the registry package', gateByArea(gates, 'Public registry publication'), [
|
|
138
|
+
'Publish only after the public repository and CI evidence are available.',
|
|
139
|
+
'Record package URL, version, artifact digest, publication date, and installability proof.',
|
|
140
|
+
])
|
|
141
|
+
renderPhase(lines, '06', 'Publish or submit marketplace listing', gateByArea(gates, 'Marketplace approval'), [
|
|
142
|
+
'Submit the marketplace/catalog listing after registry or package installability is proven.',
|
|
143
|
+
'Record listing URL, approval/publication status, review date, version, and installability proof.',
|
|
144
|
+
])
|
|
145
|
+
renderPhase(lines, '07', 'Record native slash-command evidence', gateByArea(gates, 'Native slash command'), [
|
|
146
|
+
'Use a real host runtime that supports native slash commands.',
|
|
147
|
+
'Record transcript, screenshot, host log, or equivalent proof that does not rely on portable text routing.',
|
|
148
|
+
])
|
|
149
|
+
renderPhase(lines, '08', 'Record other host runtime invocation evidence', gateByArea(gates, 'Other host runtime invocation'), [
|
|
150
|
+
'Use each claimed non-native host runtime directly.',
|
|
151
|
+
'Record accepted evidence without generated-pointer-only proof.',
|
|
152
|
+
])
|
|
153
|
+
lines.push('## Final Verification')
|
|
154
|
+
lines.push('')
|
|
155
|
+
lines.push('- `node scripts/run-gse-command.mjs --root ' + displayRoot + ' --target ' + displayRoot + ' --command "/gse probe --public-repo-url __PUBLIC_REPO_URL__ --security-contact-url __SECURITY_CONTACT_URL__ --public-ci-run-url __PUBLIC_CI_RUN_URL__ --registry-package-url __REGISTRY_PACKAGE_URL__ --marketplace-url __MARKETPLACE_LISTING_URL__ --native-host-evidence __NATIVE_HOST_EVIDENCE__ --other-host-evidence __OTHER_HOST_EVIDENCE__" --json`')
|
|
156
|
+
for (const command of manifest.verificationCommands ?? []) {
|
|
157
|
+
lines.push('- `' + safeCommand(command) + '`')
|
|
158
|
+
}
|
|
159
|
+
lines.push('- `node scripts/audit-public-acceptance-readiness.mjs --root ' + displayRoot + ' --json`')
|
|
160
|
+
lines.push('- `node scripts/audit-final-readiness.mjs --root ' + displayRoot + ' --json`')
|
|
161
|
+
lines.push('- `node scripts/audit-release-bundle.mjs --root ' + displayRoot + ' --json`')
|
|
162
|
+
lines.push('')
|
|
163
|
+
lines.push('## Stop Conditions')
|
|
164
|
+
lines.push('')
|
|
165
|
+
lines.push('- Stop if any evidence value is a placeholder, local path, example URL, or private-only URL.')
|
|
166
|
+
lines.push('- Stop if public CI did not run against the release commit.')
|
|
167
|
+
lines.push('- Stop if a host invocation only proves generated pointer files or portable text routing while claiming native slash-command support.')
|
|
168
|
+
lines.push('- Stop if public acceptance is still `not-accepted` after recording evidence; rerun the readiness doctor and fix the named gate.')
|
|
169
|
+
lines.push('')
|
|
170
|
+
return lines.join('\n')
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
let status = 'written'
|
|
174
|
+
let errors = []
|
|
175
|
+
let checklist = ''
|
|
176
|
+
try {
|
|
177
|
+
const manifest = readManifest()
|
|
178
|
+
checklist = render(manifest)
|
|
179
|
+
if (!dryRun) {
|
|
180
|
+
if (fs.existsSync(out) && !force) throw new Error(`output already exists, use --force: ${out}`)
|
|
181
|
+
fs.mkdirSync(path.dirname(out), { recursive: true })
|
|
182
|
+
fs.writeFileSync(out, checklist, 'utf8')
|
|
183
|
+
} else {
|
|
184
|
+
status = 'ready'
|
|
185
|
+
}
|
|
186
|
+
} catch (error) {
|
|
187
|
+
status = 'failed'
|
|
188
|
+
errors = [error.message]
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const report = {
|
|
192
|
+
root,
|
|
193
|
+
out,
|
|
194
|
+
manifest: manifestPath,
|
|
195
|
+
dryRun,
|
|
196
|
+
status,
|
|
197
|
+
errors,
|
|
198
|
+
publicReleaseChecklist: status === 'failed' ? 'failed' : dryRun ? 'ready' : 'written',
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
if (jsonOnly) {
|
|
202
|
+
console.log(JSON.stringify(report, null, 2))
|
|
203
|
+
} else if (status === 'failed') {
|
|
204
|
+
console.error(errors.join('\n'))
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
process.exit(status === 'failed' ? 1 : 0)
|