pgserve 2.1.2 → 2.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.
- package/CHANGELOG.md +86 -0
- package/README.md +105 -1
- package/bin/autopg-wrapper.cjs +16 -0
- package/bin/pgserve-wrapper.cjs +31 -6
- package/bin/postgres-server.js +80 -7
- package/console/README.md +131 -0
- package/console/api.js +173 -0
- package/console/app.jsx +483 -0
- package/console/colors_and_type.css +227 -0
- package/console/components.jsx +167 -0
- package/console/console.css +1666 -0
- package/console/data.jsx +350 -0
- package/console/index.html +31 -0
- package/console/screens/databases.jsx +5 -0
- package/console/screens/health.jsx +5 -0
- package/console/screens/ingress.jsx +5 -0
- package/console/screens/optimizer.jsx +5 -0
- package/console/screens/rlm-sim.jsx +5 -0
- package/console/screens/rlm-trace.jsx +5 -0
- package/console/screens/security.jsx +5 -0
- package/console/screens/settings.jsx +611 -0
- package/console/screens/sql.jsx +5 -0
- package/console/screens/sync.jsx +5 -0
- package/console/screens/tables.jsx +5 -0
- package/console/tweaks-panel.jsx +425 -0
- package/package.json +11 -1
- package/src/cli-config.cjs +310 -0
- package/src/cli-install.cjs +98 -11
- package/src/cli-restart.cjs +228 -0
- package/src/cli-ui.cjs +580 -0
- package/src/cluster.js +43 -38
- package/src/postgres.js +141 -19
- package/src/settings-loader.cjs +235 -0
- package/src/settings-migrate.cjs +212 -0
- package/src/settings-pg-args.cjs +146 -0
- package/src/settings-schema.cjs +422 -0
- package/src/settings-validator.cjs +416 -0
- package/src/settings-writer.cjs +288 -0
- package/.claude/context/windows-debug.md +0 -119
- package/.genie/AGENTS.md +0 -15
- package/.genie/agents/README.md +0 -110
- package/.genie/agents/analyze.md +0 -176
- package/.genie/agents/forge.md +0 -290
- package/.genie/agents/garbage-cleaner.md +0 -324
- package/.genie/agents/garbage-collector.md +0 -596
- package/.genie/agents/github-issue-gc.md +0 -618
- package/.genie/agents/review.md +0 -380
- package/.genie/agents/semantic-analyzer/find-duplicates.md +0 -90
- package/.genie/agents/semantic-analyzer/find-orphans.md +0 -99
- package/.genie/agents/semantic-analyzer.md +0 -101
- package/.genie/agents/update.md +0 -182
- package/.genie/agents/wish.md +0 -357
- package/.genie/brainstorms/pgserve-v2/DESIGN.md +0 -174
- package/.genie/code/AGENTS.md +0 -694
- package/.genie/code/agents/audit/risk.md +0 -173
- package/.genie/code/agents/audit/security.md +0 -189
- package/.genie/code/agents/audit.md +0 -145
- package/.genie/code/agents/challenge.md +0 -230
- package/.genie/code/agents/change-reviewer.md +0 -295
- package/.genie/code/agents/code-garbage-collector.md +0 -425
- package/.genie/code/agents/code-quality.md +0 -410
- package/.genie/code/agents/commit-suggester.md +0 -255
- package/.genie/code/agents/commit.md +0 -124
- package/.genie/code/agents/consensus.md +0 -204
- package/.genie/code/agents/daily-standup.md +0 -722
- package/.genie/code/agents/docgen.md +0 -48
- package/.genie/code/agents/explore.md +0 -79
- package/.genie/code/agents/fix.md +0 -100
- package/.genie/code/agents/git/commit-advisory.md +0 -219
- package/.genie/code/agents/git/workflows/issue.md +0 -244
- package/.genie/code/agents/git/workflows/pr.md +0 -179
- package/.genie/code/agents/git/workflows/release.md +0 -460
- package/.genie/code/agents/git/workflows/report.md +0 -342
- package/.genie/code/agents/git.md +0 -432
- package/.genie/code/agents/implementor.md +0 -161
- package/.genie/code/agents/install.md +0 -515
- package/.genie/code/agents/issue-creator.md +0 -344
- package/.genie/code/agents/polish.md +0 -116
- package/.genie/code/agents/qa.md +0 -653
- package/.genie/code/agents/refactor.md +0 -294
- package/.genie/code/agents/release.md +0 -1129
- package/.genie/code/agents/roadmap.md +0 -885
- package/.genie/code/agents/tests.md +0 -557
- package/.genie/code/agents/tracer.md +0 -50
- package/.genie/code/agents/update/upstream-update.md +0 -85
- package/.genie/code/agents/update/versions/generic-update.md +0 -305
- package/.genie/code/agents/vibe.md +0 -1317
- package/.genie/code/spells/agent-configuration.md +0 -58
- package/.genie/code/spells/automated-rc-publishing.md +0 -106
- package/.genie/code/spells/branch-tracker-guidance.md +0 -28
- package/.genie/code/spells/debug.md +0 -320
- package/.genie/code/spells/emoji-naming-convention.md +0 -303
- package/.genie/code/spells/evidence-storage.md +0 -26
- package/.genie/code/spells/file-naming-rules.md +0 -35
- package/.genie/code/spells/forge-code-blueprints.md +0 -195
- package/.genie/code/spells/genie-integration.md +0 -153
- package/.genie/code/spells/publishing-protocol.md +0 -61
- package/.genie/code/spells/team-consultation-protocol.md +0 -284
- package/.genie/code/spells/tool-requirements.md +0 -20
- package/.genie/code/spells/triad-maintenance-protocol.md +0 -154
- package/.genie/code/teams/tech-council/council.md +0 -328
- package/.genie/code/teams/tech-council/jt.md +0 -352
- package/.genie/code/teams/tech-council/nayr.md +0 -305
- package/.genie/code/teams/tech-council/oettam.md +0 -375
- package/.genie/neurons/README.md +0 -193
- package/.genie/neurons/forge.md +0 -106
- package/.genie/neurons/genie.md +0 -63
- package/.genie/neurons/review.md +0 -106
- package/.genie/neurons/wish.md +0 -104
- package/.genie/product/README.md +0 -20
- package/.genie/product/cli-automation.md +0 -359
- package/.genie/product/environment.md +0 -60
- package/.genie/product/mission.md +0 -60
- package/.genie/product/roadmap.md +0 -44
- package/.genie/product/tech-stack.md +0 -34
- package/.genie/product/templates/context-template.md +0 -218
- package/.genie/product/templates/qa-done-report-template.md +0 -68
- package/.genie/product/templates/review-report-template.md +0 -89
- package/.genie/product/templates/wish-template.md +0 -120
- package/.genie/scripts/helpers/analyze-commit.js +0 -195
- package/.genie/scripts/helpers/bullet-counter.js +0 -194
- package/.genie/scripts/helpers/bullet-find.js +0 -289
- package/.genie/scripts/helpers/bullet-id.js +0 -244
- package/.genie/scripts/helpers/check-secrets.js +0 -237
- package/.genie/scripts/helpers/count-tokens.js +0 -200
- package/.genie/scripts/helpers/create-frontmatter.js +0 -456
- package/.genie/scripts/helpers/detect-markers.js +0 -293
- package/.genie/scripts/helpers/detect-todos.js +0 -267
- package/.genie/scripts/helpers/detect-unlabeled-blocks.js +0 -135
- package/.genie/scripts/helpers/embeddings.js +0 -344
- package/.genie/scripts/helpers/find-empty-sections.js +0 -158
- package/.genie/scripts/helpers/index.js +0 -319
- package/.genie/scripts/helpers/validate-frontmatter.js +0 -578
- package/.genie/scripts/helpers/validate-links.js +0 -207
- package/.genie/scripts/helpers/validate-paths.js +0 -373
- package/.genie/spells/README.md +0 -9
- package/.genie/spells/ace-protocol.md +0 -118
- package/.genie/spells/ask-one-at-a-time.md +0 -175
- package/.genie/spells/backup-analyzer.md +0 -542
- package/.genie/spells/blocker.md +0 -12
- package/.genie/spells/break-things-move-fast.md +0 -56
- package/.genie/spells/context-candidates.md +0 -72
- package/.genie/spells/context-critic.md +0 -51
- package/.genie/spells/defer-to-expertise.md +0 -278
- package/.genie/spells/delegate-dont-do.md +0 -292
- package/.genie/spells/error-investigation-protocol.md +0 -328
- package/.genie/spells/evidence-based-completion.md +0 -273
- package/.genie/spells/experiment.md +0 -65
- package/.genie/spells/file-creation-protocol.md +0 -229
- package/.genie/spells/forge-integration.md +0 -281
- package/.genie/spells/forge-orchestration.md +0 -514
- package/.genie/spells/gather-context.md +0 -18
- package/.genie/spells/global-health-check.md +0 -34
- package/.genie/spells/global-noop-roundtrip.md +0 -25
- package/.genie/spells/install-genie.md +0 -1232
- package/.genie/spells/install.md +0 -82
- package/.genie/spells/investigate-before-commit.md +0 -112
- package/.genie/spells/know-yourself.md +0 -288
- package/.genie/spells/learn.md +0 -828
- package/.genie/spells/mcp-diagnostic-protocol.md +0 -246
- package/.genie/spells/mcp-first.md +0 -124
- package/.genie/spells/multi-step-execution.md +0 -67
- package/.genie/spells/orchestration-boundary-protocol.md +0 -256
- package/.genie/spells/orchestrator-not-implementor.md +0 -189
- package/.genie/spells/prompt.md +0 -746
- package/.genie/spells/reflect.md +0 -404
- package/.genie/spells/routing-decision-matrix.md +0 -368
- package/.genie/spells/run-in-parallel.md +0 -12
- package/.genie/spells/session-state-updater-example.md +0 -196
- package/.genie/spells/session-state-updater.md +0 -220
- package/.genie/spells/track-long-running-tasks.md +0 -133
- package/.genie/spells/troubleshoot-infrastructure.md +0 -176
- package/.genie/spells/upgrade-genie.md +0 -415
- package/.genie/spells/url-presentation-protocol.md +0 -301
- package/.genie/spells/wish-initiation.md +0 -158
- package/.genie/spells/wish-issue-linkage.md +0 -410
- package/.genie/spells/wish-lifecycle.md +0 -100
- package/.genie/state/provider-status.json +0 -3
- package/.genie/state/version.json +0 -16
- package/.genie/wishes/canonical-pgserve-pm2-supervision/WISH.md +0 -290
- package/.genie/wishes/pgserve-v2/BRIEF-from-genie-pgserve.md +0 -99
- package/.genie/wishes/pgserve-v2/WISH.md +0 -442
- package/.genie/wishes/release-system-genie-pattern/WISH.md +0 -268
- package/.genie/wishes/release-system-genie-pattern/validation.md +0 -205
- package/.gitguardian.yaml +0 -29
- package/.gitguardianignore +0 -16
- package/.github/workflows/ci.yml +0 -122
- package/.github/workflows/release.yml +0 -289
- package/.github/workflows/version.yml +0 -228
- package/.husky/pre-commit +0 -2
- package/AGENTS.md +0 -433
- package/CLAUDE.md +0 -1
- package/Makefile +0 -285
- package/assets/icon.ico +0 -0
- package/bun.lock +0 -435
- package/bunfig.toml +0 -28
- package/ecosystem.config.cjs +0 -23
- package/eslint.config.js +0 -63
- package/examples/multi-tenant-demo.js +0 -104
- package/install.sh +0 -123
- package/knip.json +0 -9
- package/scripts/test-bun-self-heal.sh +0 -163
- package/scripts/test-npx.sh +0 -60
- package/tests/audit.test.js +0 -189
- package/tests/backpressure.test.js +0 -167
- package/tests/benchmarks/runner.js +0 -1197
- package/tests/benchmarks/vector-generator.js +0 -368
- package/tests/cli-install.test.js +0 -322
- package/tests/control-db.test.js +0 -285
- package/tests/daemon-control.test.js +0 -171
- package/tests/daemon-fingerprint-integration.test.js +0 -111
- package/tests/daemon-pr24-regression.test.js +0 -198
- package/tests/fingerprint.test.js +0 -263
- package/tests/fixtures/240-orphan-seed.sql +0 -30
- package/tests/multi-tenant.test.js +0 -374
- package/tests/orphan-cleanup.test.js +0 -390
- package/tests/pg-version-regex.test.js +0 -129
- package/tests/quick-bench.js +0 -135
- package/tests/router-handshake-retry.test.js +0 -119
- package/tests/router-handshake-watchdog.test.js +0 -110
- package/tests/sdk.test.js +0 -71
- package/tests/stale-postmaster-pid.test.js +0 -85
- package/tests/stress-test.js +0 -439
- package/tests/sync-perf-test.js +0 -150
- package/tests/tcp-listen.test.js +0 -368
- package/tests/tenancy.test.js +0 -403
- package/tests/wrapper-supervision.test.js +0 -107
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pr
|
|
3
|
-
description: Pull request creation workflow with proper descriptions
|
|
4
|
-
genie:
|
|
5
|
-
executor:
|
|
6
|
-
- CLAUDE_CODE
|
|
7
|
-
- CODEX
|
|
8
|
-
- OPENCODE
|
|
9
|
-
background: true
|
|
10
|
-
forge:
|
|
11
|
-
CLAUDE_CODE:
|
|
12
|
-
model: sonnet
|
|
13
|
-
dangerously_skip_permissions: true
|
|
14
|
-
CODEX:
|
|
15
|
-
model: gpt-5-codex
|
|
16
|
-
sandbox: danger-full-access
|
|
17
|
-
OPENCODE:
|
|
18
|
-
model: opencode/glm-4.6
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Framework Reference
|
|
22
|
-
|
|
23
|
-
This agent uses the universal prompting framework documented in AGENTS.md §Prompting Standards Framework:
|
|
24
|
-
- Task Breakdown Structure (Discovery → Implementation → Verification)
|
|
25
|
-
- Context Gathering Protocol (when to explore vs escalate)
|
|
26
|
-
- Blocker Report Protocol (when to halt and document)
|
|
27
|
-
- Done Report Template (standard evidence format)
|
|
28
|
-
|
|
29
|
-
Customize phases below for pull request creation workflow.
|
|
30
|
-
|
|
31
|
-
# PR Specialist • Pull Request Creation Workflow
|
|
32
|
-
|
|
33
|
-
## Identity & Mission
|
|
34
|
-
THE specialist for creating pull requests with proper descriptions:
|
|
35
|
-
- **PR structure**: Summary, changes made, testing, related links
|
|
36
|
-
- **Wish linking**: Cross-reference wish documents and issues
|
|
37
|
-
- **Branch management**: Ensure proper base/head branches
|
|
38
|
-
- **Template compliance**: Follow project PR template
|
|
39
|
-
|
|
40
|
-
Master of `gh pr create`, understands Git workflow, links PRs to wishes and issues.
|
|
41
|
-
|
|
42
|
-
## Success Criteria
|
|
43
|
-
- ✅ PR includes summary, changes, tests, wish links
|
|
44
|
-
- ✅ Proper base and head branches specified
|
|
45
|
-
- ✅ Title follows convention (matches branch naming)
|
|
46
|
-
- ✅ Return PR URL for reference
|
|
47
|
-
|
|
48
|
-
## Never Do
|
|
49
|
-
- ❌ Create PR without testing section
|
|
50
|
-
- ❌ Skip wish/issue cross-references
|
|
51
|
-
- ❌ Create PR with uncommitted changes
|
|
52
|
-
|
|
53
|
-
## Delegation Protocol
|
|
54
|
-
|
|
55
|
-
**Role:** Child workflow (specialist)
|
|
56
|
-
**Parent:** git
|
|
57
|
-
**Delegation:** ❌ FORBIDDEN - I execute my workflow directly
|
|
58
|
-
|
|
59
|
-
**Self-awareness check:**
|
|
60
|
-
- ❌ NEVER invoke `mcp__genie__run` (I am a leaf node)
|
|
61
|
-
- ❌ NEVER delegate back to parent (git)
|
|
62
|
-
- ❌ NEVER delegate to siblings (report ↔ issue ↔ pr)
|
|
63
|
-
- ✅ ALWAYS execute `gh pr create` directly
|
|
64
|
-
- ✅ ALWAYS execute PR template population directly
|
|
65
|
-
|
|
66
|
-
**If tempted to delegate:**
|
|
67
|
-
1. STOP immediately
|
|
68
|
-
2. Recognize: I am a child workflow (execution endpoint)
|
|
69
|
-
3. Execute the work directly using Bash and gh CLI
|
|
70
|
-
4. Report completion via Done Report
|
|
71
|
-
|
|
72
|
-
**Why:** Child workflows are execution endpoints. All delegation stops here. Self-delegation or sibling delegation creates loops.
|
|
73
|
-
|
|
74
|
-
**Evidence:** Session `b3680a36-8514-4e1f-8380-e92a4b15894b` - git agent self-delegated 6 times creating duplicate issues instead of invoking pr child workflow directly.
|
|
75
|
-
|
|
76
|
-
## Prerequisites
|
|
77
|
-
|
|
78
|
-
**Git operations:**
|
|
79
|
-
@.genie/code/agents/git.md
|
|
80
|
-
|
|
81
|
-
**Issue tracking:**
|
|
82
|
-
@.genie/code/agents/git/workflows/issue.md
|
|
83
|
-
|
|
84
|
-
## Operating Framework
|
|
85
|
-
|
|
86
|
-
### PR Creation Template
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
## Summary
|
|
90
|
-
[Brief description of changes]
|
|
91
|
-
|
|
92
|
-
## Changes Made
|
|
93
|
-
- [Change 1]
|
|
94
|
-
- [Change 2]
|
|
95
|
-
|
|
96
|
-
## Testing
|
|
97
|
-
- [Test coverage run and results]
|
|
98
|
-
|
|
99
|
-
## Related
|
|
100
|
-
- Wish: @.genie/wishes/<slug>/<slug>-wish.md
|
|
101
|
-
- Tracker: <ID> (if applicable)
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Command Sequence
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
# Verify current state
|
|
108
|
-
git status
|
|
109
|
-
git log --oneline -5
|
|
110
|
-
|
|
111
|
-
# Create PR with template
|
|
112
|
-
gh pr create \
|
|
113
|
-
--title "feat/<wish-slug>: <summary>" \
|
|
114
|
-
--body "See wish: @.genie/wishes/<slug>/<slug>-wish.md" \
|
|
115
|
-
--base main --head feat/<wish-slug>
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**Full example:**
|
|
119
|
-
```bash
|
|
120
|
-
gh pr create \
|
|
121
|
-
--title "feat/interactive-permissions: Add pause/resume for approval workflow" \
|
|
122
|
-
--body "$(cat <<'EOF'
|
|
123
|
-
## Summary
|
|
124
|
-
Implements interactive permission system for agents, allowing pause/resume during execution for manual approval.
|
|
125
|
-
|
|
126
|
-
## Changes Made
|
|
127
|
-
- Add `pauseForApproval()` API to agent context
|
|
128
|
-
- Implement approval queue and resume mechanism
|
|
129
|
-
- Update permission flow to support interactive mode
|
|
130
|
-
- Add tests for pause/resume behavior
|
|
131
|
-
|
|
132
|
-
## Testing
|
|
133
|
-
- Unit tests: 15/15 passed
|
|
134
|
-
- Integration tests: 8/8 passed
|
|
135
|
-
- Manual testing: Verified pause → approval → resume flow
|
|
136
|
-
|
|
137
|
-
## Related
|
|
138
|
-
- Wish:
|
|
139
|
-
- Issue: #35
|
|
140
|
-
EOF
|
|
141
|
-
)" \
|
|
142
|
-
--base main \
|
|
143
|
-
--head feat/interactive-permissions
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
## Done Report Structure
|
|
147
|
-
```markdown
|
|
148
|
-
# Done Report: pr-<slug>-<YYYYMMDDHHmm>
|
|
149
|
-
|
|
150
|
-
## Scope
|
|
151
|
-
- Operation type: pr-create
|
|
152
|
-
- Branch: [branch-name]
|
|
153
|
-
- PR URL: [URL]
|
|
154
|
-
|
|
155
|
-
## PR Details
|
|
156
|
-
- Title: [title]
|
|
157
|
-
- Base: [base-branch]
|
|
158
|
-
- Head: [head-branch]
|
|
159
|
-
- Summary: [brief summary]
|
|
160
|
-
|
|
161
|
-
## Execution
|
|
162
|
-
```bash
|
|
163
|
-
[Commands executed]
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
## Outcome
|
|
167
|
-
- PR created: [URL]
|
|
168
|
-
- Linked to wish: [wish path]
|
|
169
|
-
- Linked to issue: [issue number]
|
|
170
|
-
- Next steps: [any follow-ups]
|
|
171
|
-
|
|
172
|
-
## Risks & Follow-ups
|
|
173
|
-
- [Any concerns, manual steps needed]
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Operate confidently; enable clean, well-documented PRs with proper cross-references.
|
|
177
|
-
|
|
178
|
-
## Project Customization
|
|
179
|
-
Consult `` for repository-specific PR template or workflow preferences.
|
|
@@ -1,460 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: release
|
|
3
|
-
description: Automated release workflow via GitHub Actions (v2.5.1+)
|
|
4
|
-
genie:
|
|
5
|
-
executor:
|
|
6
|
-
- CLAUDE_CODE
|
|
7
|
-
- CODEX
|
|
8
|
-
- OPENCODE
|
|
9
|
-
background: true
|
|
10
|
-
forge:
|
|
11
|
-
CLAUDE_CODE:
|
|
12
|
-
model: sonnet
|
|
13
|
-
dangerously_skip_permissions: true
|
|
14
|
-
CODEX:
|
|
15
|
-
model: gpt-5-codex
|
|
16
|
-
sandbox: danger-full-access
|
|
17
|
-
OPENCODE:
|
|
18
|
-
model: opencode/glm-4.6
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
# 🚀 Genie Release Workflow (Modern - v2.5.1+)
|
|
22
|
-
|
|
23
|
-
**Context:** Fully automated release system using GitHub Actions + unified release script
|
|
24
|
-
|
|
25
|
-
**Architecture:** Push to main → Auto RC bump → Publish npm → Create GitHub release
|
|
26
|
-
|
|
27
|
-
**Zero manual steps:** Everything automated except stable promotion
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Overview
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
CODE COMMIT (main)
|
|
35
|
-
↓
|
|
36
|
-
GitHub Actions Detects
|
|
37
|
-
↓
|
|
38
|
-
Unified Release Script
|
|
39
|
-
↓
|
|
40
|
-
Bump RC Version
|
|
41
|
-
↓
|
|
42
|
-
Run Tests
|
|
43
|
-
↓
|
|
44
|
-
Publish to npm (@next)
|
|
45
|
-
↓
|
|
46
|
-
Create GitHub Release
|
|
47
|
-
↓
|
|
48
|
-
DONE ✅
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Core Components
|
|
54
|
-
|
|
55
|
-
### 1. Unified Release Script
|
|
56
|
-
**Location:** `scripts/unified-release.cjs`
|
|
57
|
-
|
|
58
|
-
**Capabilities:**
|
|
59
|
-
- `--bump rc|patch|minor|major` - Auto-bump version
|
|
60
|
-
- `--promote` - Promote RC to stable (2.5.1-rc.7 → 2.5.1)
|
|
61
|
-
- `--tag v1.2.3` - Manual tag (skip bump)
|
|
62
|
-
- `--publish` - Publish to npm
|
|
63
|
-
- `--github-release` - Create GitHub release
|
|
64
|
-
- `--skip-tests` - Skip test execution
|
|
65
|
-
|
|
66
|
-
**Smart npm tag selection:**
|
|
67
|
-
- RC versions → `@next` tag
|
|
68
|
-
- Stable versions → `@latest` tag
|
|
69
|
-
|
|
70
|
-
### 2. GitHub Actions Workflow
|
|
71
|
-
**Location:** `.github/workflows/release.yml`
|
|
72
|
-
|
|
73
|
-
**Triggers:**
|
|
74
|
-
- **Push to main** - Auto-bump RC for code commits (feat/fix/build)
|
|
75
|
-
- **Tag push** - Publish existing tag
|
|
76
|
-
- **PR merge** - Auto-bump RC when dev → main
|
|
77
|
-
- **Manual dispatch** - Workflow UI for manual releases
|
|
78
|
-
|
|
79
|
-
**Skip logic:**
|
|
80
|
-
- Skips automated pre-release commits (prevents infinite loop)
|
|
81
|
-
- Skips docs/chore/style commits (non-code changes)
|
|
82
|
-
- Smart detection of code-changing vs documentation commits
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Release Types
|
|
87
|
-
|
|
88
|
-
### RC Release (Automated)
|
|
89
|
-
|
|
90
|
-
**Trigger:** Any code commit to main
|
|
91
|
-
|
|
92
|
-
**Flow:**
|
|
93
|
-
```bash
|
|
94
|
-
# Developer pushes to main
|
|
95
|
-
git push origin main
|
|
96
|
-
|
|
97
|
-
# GitHub Actions automatically:
|
|
98
|
-
# 1. Detects code-changing commit
|
|
99
|
-
# 2. Bumps RC version (2.5.1-rc.7 → 2.5.1-rc.8)
|
|
100
|
-
# 3. Runs tests
|
|
101
|
-
# 4. Publishes to npm @next
|
|
102
|
-
# 5. Creates GitHub release (prerelease)
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**Example commit types that trigger RC:**
|
|
106
|
-
- `feat: add new feature`
|
|
107
|
-
- `fix: resolve bug`
|
|
108
|
-
- `build: update dependencies`
|
|
109
|
-
- PR merge commits (default trigger)
|
|
110
|
-
|
|
111
|
-
**Example commit types that skip:**
|
|
112
|
-
- `docs: update README`
|
|
113
|
-
- `chore: cleanup files`
|
|
114
|
-
- `style: format code`
|
|
115
|
-
- `chore: pre-release v2.5.1-rc.8` (prevents infinite loop)
|
|
116
|
-
|
|
117
|
-
### Stable Release (Manual)
|
|
118
|
-
|
|
119
|
-
**Trigger:** Workflow dispatch (GitHub Actions UI)
|
|
120
|
-
|
|
121
|
-
**Steps:**
|
|
122
|
-
1. Go to Actions → Unified Release
|
|
123
|
-
2. Click "Run workflow"
|
|
124
|
-
3. Select `promote-to-stable`
|
|
125
|
-
4. Confirm
|
|
126
|
-
|
|
127
|
-
**Flow:**
|
|
128
|
-
```bash
|
|
129
|
-
# GitHub Actions:
|
|
130
|
-
# 1. Promotes RC to stable (2.5.1-rc.15 → 2.5.1)
|
|
131
|
-
# 2. Runs full test suite
|
|
132
|
-
# 3. Publishes to npm @latest
|
|
133
|
-
# 4. Creates GitHub release (stable)
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
**When to promote:**
|
|
137
|
-
- After thorough RC testing
|
|
138
|
-
- All critical bugs fixed
|
|
139
|
-
- QA validation complete
|
|
140
|
-
- Ready for production use
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Manual Release Operations
|
|
145
|
-
|
|
146
|
-
### Bump RC Manually
|
|
147
|
-
```bash
|
|
148
|
-
# Via workflow dispatch
|
|
149
|
-
Actions → Unified Release → Run workflow → bump-rc
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### Promote RC to Stable
|
|
153
|
-
```bash
|
|
154
|
-
# Via workflow dispatch
|
|
155
|
-
Actions → Unified Release → Run workflow → promote-to-stable
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Create Manual Tag
|
|
159
|
-
```bash
|
|
160
|
-
# Via workflow dispatch
|
|
161
|
-
Actions → Unified Release → Run workflow → manual-tag
|
|
162
|
-
# Enter: v2.5.2
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### Local Testing (No Publish)
|
|
166
|
-
```bash
|
|
167
|
-
# Test release script locally
|
|
168
|
-
node scripts/unified-release.cjs --bump rc
|
|
169
|
-
|
|
170
|
-
# With tests
|
|
171
|
-
node scripts/unified-release.cjs --bump rc --skip-tests
|
|
172
|
-
|
|
173
|
-
# Full flow (test only, no publish)
|
|
174
|
-
node scripts/unified-release.cjs --bump rc --github-release
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## Changelog Generation
|
|
180
|
-
|
|
181
|
-
**Automatic:** Uses `conventional-changelog` to analyze commits
|
|
182
|
-
|
|
183
|
-
**Format:**
|
|
184
|
-
```markdown
|
|
185
|
-
## [2.5.1-rc.8]
|
|
186
|
-
|
|
187
|
-
**2025-10-27**
|
|
188
|
-
|
|
189
|
-
### ✨ Features
|
|
190
|
-
- 3 features
|
|
191
|
-
|
|
192
|
-
### 🐛 Bug Fixes
|
|
193
|
-
- 2 fixes
|
|
194
|
-
|
|
195
|
-
### 📚 Other Changes
|
|
196
|
-
- 5 commits
|
|
197
|
-
|
|
198
|
-
### 📊 Statistics
|
|
199
|
-
- **Total Commits**: 10
|
|
200
|
-
- **Contributors**: 2
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
**Fallback:** If conventional-changelog fails, uses git log analysis
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## Verification
|
|
208
|
-
|
|
209
|
-
### After RC Release
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
# Check npm
|
|
213
|
-
npm view automagik-genie@next version
|
|
214
|
-
|
|
215
|
-
# Check GitHub release
|
|
216
|
-
gh release view v2.5.1-rc.8
|
|
217
|
-
|
|
218
|
-
# Test installation
|
|
219
|
-
npm install -g automagik-genie@next
|
|
220
|
-
genie --version
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### After Stable Release
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
# Check npm
|
|
227
|
-
npm view automagik-genie@latest version
|
|
228
|
-
|
|
229
|
-
# Check GitHub release
|
|
230
|
-
gh release view v2.5.1
|
|
231
|
-
|
|
232
|
-
# Test installation
|
|
233
|
-
npm install -g automagik-genie@latest
|
|
234
|
-
genie --version
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
## Troubleshooting
|
|
240
|
-
|
|
241
|
-
### Release Failed: Tests Failed
|
|
242
|
-
**Symptom:** GitHub Actions shows failed tests
|
|
243
|
-
**Fix:** Fix tests, push to main → auto-triggers new RC
|
|
244
|
-
|
|
245
|
-
### Release Failed: Already Published
|
|
246
|
-
**Symptom:** "Version already exists on npm"
|
|
247
|
-
**Fix:** Version was already released, bump manually:
|
|
248
|
-
```bash
|
|
249
|
-
# Increment RC number manually in package.json
|
|
250
|
-
# Or wait for next code commit (auto-bump)
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
### Release Failed: Tag Exists
|
|
254
|
-
**Symptom:** "Tag already exists"
|
|
255
|
-
**Fix:**
|
|
256
|
-
```bash
|
|
257
|
-
# Delete tag locally and remotely
|
|
258
|
-
git tag -d v2.5.1-rc.8
|
|
259
|
-
git push origin :refs/tags/v2.5.1-rc.8
|
|
260
|
-
|
|
261
|
-
# Re-run workflow
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
### GitHub Release Creation Failed
|
|
265
|
-
**Symptom:** "Release already exists"
|
|
266
|
-
**Fix:** Non-blocking - release was published to npm successfully
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
|
|
270
|
-
## Best Practices
|
|
271
|
-
|
|
272
|
-
### For RC Releases
|
|
273
|
-
- ✅ Let automation handle it (push to main)
|
|
274
|
-
- ✅ Fix bugs → push → new RC auto-created
|
|
275
|
-
- ✅ Test RC before promoting to stable
|
|
276
|
-
|
|
277
|
-
### For Stable Releases
|
|
278
|
-
- ✅ Test latest RC thoroughly
|
|
279
|
-
- ✅ Run QA validation (`.genie/qa/checklist.md`)
|
|
280
|
-
- ✅ Verify no critical bugs
|
|
281
|
-
- ✅ Use workflow dispatch to promote
|
|
282
|
-
- ✅ Announce stable release
|
|
283
|
-
|
|
284
|
-
### For Emergency Fixes
|
|
285
|
-
- ✅ Fix on main → auto RC
|
|
286
|
-
- ✅ Test RC quickly
|
|
287
|
-
- ✅ Promote to stable if critical
|
|
288
|
-
- ✅ Alternative: Manual tag with hotfix version
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
## Migration from Old Workflow
|
|
293
|
-
|
|
294
|
-
**Old (pre-v2.5.0):**
|
|
295
|
-
- Manual version bumps
|
|
296
|
-
- Manual tag creation
|
|
297
|
-
- Manual PR creation
|
|
298
|
-
- Manual npm publish
|
|
299
|
-
- Manual GitHub release
|
|
300
|
-
|
|
301
|
-
**New (v2.5.1+):**
|
|
302
|
-
- ✅ Automated RC on every code commit
|
|
303
|
-
- ✅ Automated testing
|
|
304
|
-
- ✅ Automated npm publish
|
|
305
|
-
- ✅ Automated GitHub release
|
|
306
|
-
- ✅ Manual promotion to stable (intentional gate)
|
|
307
|
-
|
|
308
|
-
---
|
|
309
|
-
|
|
310
|
-
## Architecture Decisions
|
|
311
|
-
|
|
312
|
-
### Why Auto RC on Every Commit?
|
|
313
|
-
- Fast iteration (no manual steps)
|
|
314
|
-
- Continuous testing (every commit validated)
|
|
315
|
-
- Easy rollback (git revert → auto new RC)
|
|
316
|
-
- User testing (install @next to test latest)
|
|
317
|
-
|
|
318
|
-
### Why Manual Stable Promotion?
|
|
319
|
-
- Quality gate (deliberate decision)
|
|
320
|
-
- QA validation checkpoint
|
|
321
|
-
- Documentation update trigger
|
|
322
|
-
- Production readiness verification
|
|
323
|
-
|
|
324
|
-
### Why Unified Script?
|
|
325
|
-
- Single source of truth
|
|
326
|
-
- Testable locally
|
|
327
|
-
- Reusable in CI and manual flows
|
|
328
|
-
- Maintainable (one file vs scattered logic)
|
|
329
|
-
|
|
330
|
-
---
|
|
331
|
-
|
|
332
|
-
## Lessons Learned: RC24 Implementation (2025-10-18)
|
|
333
|
-
|
|
334
|
-
### What We Built
|
|
335
|
-
|
|
336
|
-
**Phase 1 Automation (Completed):**
|
|
337
|
-
1. ✅ Automatic version bump (`pnpm bump:rc`)
|
|
338
|
-
2. ✅ Tag creation + push
|
|
339
|
-
3. ✅ GitHub release creation (auto-generated notes)
|
|
340
|
-
4. ✅ PR creation to main
|
|
341
|
-
5. ✅ Automated testing
|
|
342
|
-
6. ✅ Automated merge when tests pass
|
|
343
|
-
7. ✅ NPM publish triggered (GitHub Actions workflow)
|
|
344
|
-
|
|
345
|
-
**Key Scripts Created:**
|
|
346
|
-
- `scripts/bump.js` - Added `--no-push` flag
|
|
347
|
-
- `scripts/release-branch.sh` - Orchestration (deprecated, replaced by unified-release.cjs)
|
|
348
|
-
- `scripts/unified-release.cjs` - Modern single-script solution
|
|
349
|
-
- `.genie/scripts/commit-advisory.js` - Fixed validation for release branches
|
|
350
|
-
|
|
351
|
-
### Challenges Fixed
|
|
352
|
-
|
|
353
|
-
**1. Commit Advisory on Release Branches**
|
|
354
|
-
- Problem: Release commits weren't traced to issues
|
|
355
|
-
- Solution: Skip traceability validation for automated release commits
|
|
356
|
-
- Result: Clean release flow without advisory warnings
|
|
357
|
-
|
|
358
|
-
**2. Git Hook Permissions in CI**
|
|
359
|
-
- Problem: `.git/hooks/pre-commit` not executable in Actions
|
|
360
|
-
- Solution: Skip advisory smoke test in CI (`GENIE_SKIP_ADVISORY_SMOKE=1`)
|
|
361
|
-
- Result: Tests pass in CI environment
|
|
362
|
-
|
|
363
|
-
**3. Template Smoke Test Failures**
|
|
364
|
-
- Problem: Template tests fail because templates not packaged in CI
|
|
365
|
-
- Solution: Made template smoke test non-blocking (`continue-on-error: true`)
|
|
366
|
-
- Result: Core validation passes, optional features don't block
|
|
367
|
-
|
|
368
|
-
### Key Decisions
|
|
369
|
-
|
|
370
|
-
**1. Release Branches = Clean Commits**
|
|
371
|
-
- Release branches skip traceability validation
|
|
372
|
-
- Intentional: release commits are infrastructure-level
|
|
373
|
-
- No need to link bump/merge commits to GitHub issues
|
|
374
|
-
|
|
375
|
-
**2. CI Environment Differences**
|
|
376
|
-
- Development checks (hook executability) don't apply in CI
|
|
377
|
-
- Skip with environment variables, keep CI simple
|
|
378
|
-
- Focused on code validation, not environment validation
|
|
379
|
-
|
|
380
|
-
**3. Two-Phase Approach**
|
|
381
|
-
- **Phase 1 (Current):** Automated mechanical steps (bump, tag, publish)
|
|
382
|
-
- **Phase 2 (Future):** AI-generated release notes with user approval
|
|
383
|
-
- Ship Phase 1 now, add Phase 2 when ready
|
|
384
|
-
|
|
385
|
-
### What Works Now
|
|
386
|
-
|
|
387
|
-
**Developer Experience:**
|
|
388
|
-
```bash
|
|
389
|
-
# Old workflow (manual)
|
|
390
|
-
git checkout -b feat/release-v2.4.0-rc.24
|
|
391
|
-
pnpm bump:rc
|
|
392
|
-
git push origin v2.4.0-rc.24 feat/release-v2.4.0-rc.24
|
|
393
|
-
gh pr create --base main --title "chore: release v2.4.0-rc.24"
|
|
394
|
-
# Wait for tests, manually merge, monitor publish...
|
|
395
|
-
|
|
396
|
-
# New workflow (automated)
|
|
397
|
-
git commit -m "feat: add new feature"
|
|
398
|
-
git push origin main
|
|
399
|
-
# Done! RC published automatically ✨
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
**Automation Benefits:**
|
|
403
|
-
- Zero manual steps for RC releases
|
|
404
|
-
- Instant feedback (tests run immediately)
|
|
405
|
-
- Consistent process (no human error)
|
|
406
|
-
- Fast iteration (multiple RCs per day possible)
|
|
407
|
-
|
|
408
|
-
### Next Steps (Phase 2+)
|
|
409
|
-
|
|
410
|
-
**Future Enhancements:**
|
|
411
|
-
- [ ] AI-generated release notes (Genie executor analysis)
|
|
412
|
-
- [ ] Release notes approval workflow
|
|
413
|
-
- [ ] Auto-delete release branch after merge
|
|
414
|
-
- [ ] Track release metrics (publish time, test duration)
|
|
415
|
-
- [ ] Stable release automation (criteria-based promotion)
|
|
416
|
-
|
|
417
|
-
---
|
|
418
|
-
|
|
419
|
-
**Workflow Status:** Phase 1 Complete - Fully Automated RC Releases ✅
|
|
420
|
-
|
|
421
|
-
**Implementation Timeline:**
|
|
422
|
-
- RC24 (2025-10-18): Initial automation
|
|
423
|
-
- RC58 (2025-10-24): Unified release script
|
|
424
|
-
- v2.5.1 (2025-10-27): First stable release with modern workflow
|
|
425
|
-
|
|
426
|
-
**Current State:** Production-ready, battle-tested through 15 RCs
|
|
427
|
-
|
|
428
|
-
---
|
|
429
|
-
|
|
430
|
-
## Quick Reference
|
|
431
|
-
|
|
432
|
-
**Check current version:**
|
|
433
|
-
```bash
|
|
434
|
-
cat package.json | jq -r '.version'
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
**List recent releases:**
|
|
438
|
-
```bash
|
|
439
|
-
gh release list --limit 10
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
**View release workflow runs:**
|
|
443
|
-
```bash
|
|
444
|
-
gh run list --workflow=release.yml --limit 5
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
**Trigger manual release:**
|
|
448
|
-
```bash
|
|
449
|
-
# Go to: https://github.com/namastexlabs/automagik-genie/actions/workflows/release.yml
|
|
450
|
-
# Click: Run workflow → Select action → Run
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
**Monitor npm publish:**
|
|
454
|
-
```bash
|
|
455
|
-
npm view automagik-genie versions --json | jq '.[-5:]'
|
|
456
|
-
```
|
|
457
|
-
|
|
458
|
-
---
|
|
459
|
-
|
|
460
|
-
*Your releases are my command! 🧞✨*
|