@static-var/keystone 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.
@@ -0,0 +1,130 @@
1
+ # Keystone Ship Module
2
+
3
+ ## Core principle
4
+ Ship is deterministic finalization for already-completed work. It proves, reviews, packages, and hands off a release or PR; it never sneaks in new implementation or last-mile fixes.
5
+
6
+ A ship decision requires three gates:
7
+ 1. **Proof gate:** required checks, artifacts, previews, or manual QA are observed and recorded.
8
+ 2. **Review gate:** appropriate human/automated review is complete or explicitly pending.
9
+ 3. **Ship gate:** release/merge/deploy mechanics, rollback, and handoff are ready.
10
+
11
+ If any final check fails, abort ship and route to an existing Keystone module: `build` for contained fixes, `debug` for unexplained failures, `review` for unresolved review risk, or `health` for broad release/tooling readiness concerns.
12
+
13
+ ## Load when
14
+ Load when the user asks to finish a branch, prepare PR or merge notes, package a release, write changelog/release notes, confirm readiness, hand off completed work, tag/version, prepare deploy notes, validate release candidates, or decide whether work is shippable.
15
+
16
+ ## Not for
17
+ - Starting new implementation or sneaking in last-minute fixes.
18
+ - Root-cause debugging; use `debug`.
19
+ - Fixing test/build/package failures; use `build` for contained repairs or `debug` when the cause is unclear.
20
+ - General project risk audits; use `health`.
21
+ - Reviewing code quality of a specific change; use `review`.
22
+ - Shaping unfinished requirements; use `shape`.
23
+ - Bypassing proof, review, package, deploy, or human release approvals.
24
+
25
+ ## Outcome contract
26
+ Deliver a strict shipping packet that includes:
27
+ - current branch/worktree status and cleanliness;
28
+ - scope of completed work and explicit non-scope;
29
+ - proof gate evidence with commands/artifacts/results;
30
+ - review gate evidence or exact pending review status;
31
+ - ship gate evidence including CI/CD status, deploy preview/staging status when applicable, package/release readiness, rollback plan, and handoff actions;
32
+ - multi-target package/release notes where applicable;
33
+ - changelog/release-note text or summary;
34
+ - unresolved risks and go/no-go verdict;
35
+ - exact human actions needed next.
36
+
37
+ ## Modes
38
+ - **PR handoff:** summarize diff, proof, risks, review status, CI status, and reviewer instructions.
39
+ - **Release prep:** verify versioning, changelog, build/package artifacts, environment, approvals, rollback, and release command readiness.
40
+ - **Deploy handoff:** verify CI/CD pipeline state, deploy preview or staging evidence, environment/feature flag notes, monitoring, and rollback path.
41
+ - **Multi-target package/release:** verify each target separately, such as npm/PyPI/GitHub release/Docker/Homebrew/browser extension/mobile artifact, with versions, artifacts, and dry-run evidence.
42
+ - **Integration finish:** prepare merge guidance, branch cleanup, post-merge checks, and follow-up owner actions.
43
+ - **Delivery packet:** produce final stakeholder notes without changing code.
44
+ - **Readiness verdict:** say Ship / Do not ship / Ship with risk, backed by gate evidence.
45
+
46
+ ## Process
47
+ 1. Confirm implementation is complete. If new behavior, fixes, migrations, or cleanup are still needed, stop and route to `build` or `debug` before shipping.
48
+ 2. Inspect branch/worktree state: branch name, base branch, dirty files, untracked files, commits/diff summary, and whether unrelated changes are present.
49
+ 3. Define the required gates for this change:
50
+ - **Proof gate:** focused tests, full tests, build, lint, typecheck, manual QA, screenshots, smoke tests, package dry run, deploy preview, or staging validation.
51
+ - **Review gate:** self-review, code review, product/design/security review, release approval, or documented pending review.
52
+ - **Ship gate:** CI/CD state, artifacts, version/changelog, release notes, deploy target, package target, rollback plan, monitoring, and PR/release handoff.
53
+ 4. Run or cite verification evidence. Do not claim passing checks you did not observe. Include command, context, result, and timestamp/context when useful.
54
+ 5. Check CI/CD awareness: list relevant workflows/pipelines, required checks, latest known status, deploy preview URL or staging environment if available, and any checks not observable locally.
55
+ 6. Check package/release readiness when applicable: version, changelog, artifact names, package contents, checksums/digests, dry-run output, target registries/platforms, compatibility notes, migration steps, and signing/notarization needs.
56
+ 7. For multi-target releases, create one evidence row per target. A green web build does not prove a CLI package, Docker image, mobile binary, or plugin package is ready.
57
+ 8. Confirm rollback and recovery: revert plan, previous version, feature flag/kill switch, database rollback/migration constraints, artifact rollback, owner, and monitoring signals.
58
+ 9. Prepare PR handoff or release packet: concise summary, scope/non-scope, proof/review/ship gates, risks, rollout, rollback, and next human actions.
59
+ 10. If a gate fails or evidence is missing, abort finalization. Report “Do not ship,” include the failed gate evidence, and route to the correct module. Do not make stealth fixes under Ship.
60
+ 11. End with a clear verdict: Ship, Do not ship, or Ship with risk.
61
+
62
+ ## Subagents and reasoning
63
+ Default reasoning: `medium`. Use subagents for bounded release-note drafting, checklist verification, artifact inspection, CI/CD status inspection, package manifest review, or independent review of the shipping packet. Use `high` for multi-platform packaging, production releases, security-sensitive changes, migrations, deploys with customer impact, or unresolved release risk. Subagents must not introduce new implementation.
64
+
65
+ ## Hard rules
66
+ - No new implementation in ship mode. Gate failures create a handoff, not stealth fixes.
67
+ - Enforce proof, review, and ship gates. Do not collapse them into one vague readiness statement.
68
+ - Evidence before assertions: every readiness claim needs command output, artifact proof, CI/CD status, deploy preview/staging proof, or documented review.
69
+ - No stealth fixes: if final checks fail, abort and route to `build`, `debug`, `review`, or `health`.
70
+ - Do not bypass review or package gates because the change “looks small.”
71
+ - Keep changelog/release notes user- or operator-relevant; avoid dumping raw commit noise.
72
+ - State branch name and working tree cleanliness when available.
73
+ - If readiness is uncertain, say “Do not ship” or “Ship with risk,” not “done.”
74
+ - Never publish, deploy, tag, merge, or push unless the user explicitly requested that action and the gates support it.
75
+
76
+ ## Failure modes
77
+ - **Victory lap without proof:** announcing completion before tests/build/review evidence.
78
+ - **Last-mile coding:** making new fixes under the cover of release prep.
79
+ - **Stealth release:** tagging, publishing, deploying, or merging without explicit approval.
80
+ - **CI blindness:** relying only on local checks while required CI/CD, preview, or staging is red or unknown.
81
+ - **Single-target tunnel vision:** treating one package/build target as proof for all targets.
82
+ - **Rollback omission:** shipping without a practical revert, rollback, or recovery path.
83
+ - **Release-note mush:** vague notes that omit impact, migration, rollout, or risk.
84
+ - **Dirty handoff:** leaving untracked files, unclear branch state, or hidden manual steps.
85
+ - **Gate theater:** listing checks without results or timestamps/context.
86
+
87
+ ## Output format
88
+ ```markdown
89
+ ## Ship packet
90
+ Verdict: Ship / Do not ship / Ship with risk
91
+ Branch/status: ...
92
+ Gate summary: Proof ... / Review ... / Ship ...
93
+
94
+ ### Scope
95
+ - Completed: ...
96
+ - Not included: ...
97
+
98
+ ### Proof gate
99
+ | Evidence | Good/Bad | Result | Notes |
100
+ |---|---|---|---|
101
+ | Good: `npm test` observed exit 0 on this branch | Good | Pass | Include command/output summary |
102
+ | Bad: “tests should pass” without running or CI link | Bad | Missing | Not acceptable evidence |
103
+
104
+ ### Review gate
105
+ - Good evidence: approved PR review, completed self-review checklist, security/design approval when required.
106
+ - Bad evidence: “looks fine,” assumed approval, or stale review from before major changes.
107
+ - Status: ...
108
+
109
+ ### Ship gate
110
+ - CI/CD: workflow/status/link or not observable and why.
111
+ - Deploy preview/staging: URL/environment/check result or not applicable.
112
+ - Package/release targets: versions, artifacts, checksums/digests, dry runs, compatibility notes.
113
+ - Rollback plan: exact revert/redeploy/unpublish/feature-flag path and owner.
114
+
115
+ ### Release notes / changelog
116
+ - ...
117
+
118
+ ### Risks and aborts
119
+ - Failed/missing gates:
120
+ - Risks accepted:
121
+ - Route if not shippable: build / debug / review / health
122
+
123
+ ### PR handoff / release packet
124
+ - Summary:
125
+ - Proof:
126
+ - Review:
127
+ - Rollout:
128
+ - Rollback:
129
+ - Next human actions:
130
+ ```