pgserve 2.1.3 → 2.2.1
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 +96 -0
- package/README.md +105 -1
- package/bin/autopg-wrapper.cjs +16 -0
- package/bin/pgserve-wrapper.cjs +32 -6
- package/bin/postgres-server.js +56 -0
- 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 +14 -2
- package/scripts/postinstall.cjs +60 -0
- package/src/cli-config.cjs +310 -0
- package/src/cli-install.cjs +112 -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/src/upgrade/index.js +65 -0
- package/src/upgrade/runner.js +23 -0
- package/src/upgrade/steps/binary-cache-flush.js +67 -0
- package/src/upgrade/steps/consumer-signal.js +40 -0
- package/src/upgrade/steps/env-refresh.js +89 -0
- package/src/upgrade/steps/health-validate.js +53 -0
- package/src/upgrade/steps/plpgsql-resolve.js +66 -0
- package/src/upgrade/steps/port-reconcile.js +52 -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/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-args.test.js +0 -86
- 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,218 +0,0 @@
|
|
|
1
|
-
# 🧞 Genie Context: {{USER_NAME}}
|
|
2
|
-
|
|
3
|
-
**Current Repo:** !`basename $(pwd)`
|
|
4
|
-
**Active Since:** !`date -u +"%Y-%m-%d"`
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## 📊 Runtime Context (Auto-Updated)
|
|
9
|
-
|
|
10
|
-
**Branch:** !`git branch --show-current`
|
|
11
|
-
|
|
12
|
-
**Status:**
|
|
13
|
-
!`git status --short | head -10`
|
|
14
|
-
|
|
15
|
-
**Staged Changes:**
|
|
16
|
-
!`git diff --cached --stat | head -5`
|
|
17
|
-
|
|
18
|
-
**Unstaged Changes:**
|
|
19
|
-
!`git diff --stat | head -5`
|
|
20
|
-
|
|
21
|
-
**Recent Commits:**
|
|
22
|
-
!`git log --oneline -5`
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## 🎯 Current Focus
|
|
27
|
-
|
|
28
|
-
**Task:** [What you're working on]
|
|
29
|
-
**Status:** [ACTIVE | PAUSED | PLANNING]
|
|
30
|
-
**Started:** [YYYY-MM-DD HH:MM UTC]
|
|
31
|
-
|
|
32
|
-
**Context:**
|
|
33
|
-
- [Key context points]
|
|
34
|
-
- [What's been completed]
|
|
35
|
-
- [What's in progress]
|
|
36
|
-
|
|
37
|
-
**Next Action:**
|
|
38
|
-
[What to do next]
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## 🔄 Active Parallel Work
|
|
43
|
-
|
|
44
|
-
### Background Orchestrators
|
|
45
|
-
*Track MCP agent sessions here*
|
|
46
|
-
|
|
47
|
-
### Delegated Work
|
|
48
|
-
*Track task delegations here*
|
|
49
|
-
|
|
50
|
-
**Note:** When spawning parallel work, add entries here with session IDs and status checks.
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## ⏳ Decision Queue (One at a Time)
|
|
55
|
-
|
|
56
|
-
### Decision 1: [Topic] [ACTIVE NOW]
|
|
57
|
-
|
|
58
|
-
**Question:** [The decision you need to make]
|
|
59
|
-
|
|
60
|
-
**Context:**
|
|
61
|
-
- [Background information]
|
|
62
|
-
- [What it affects]
|
|
63
|
-
- [What it blocks]
|
|
64
|
-
|
|
65
|
-
**Question presented:** [YYYY-MM-DD ~HH:MM UTC]
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## 👤 User Profile: {{USER_NAME}}
|
|
70
|
-
|
|
71
|
-
### Communication Preferences
|
|
72
|
-
|
|
73
|
-
**Decision Presentation:**
|
|
74
|
-
- ✅ ONE decision per message (never ABCD parallel options)
|
|
75
|
-
- ✅ Full context: question, background, what it blocks
|
|
76
|
-
- ✅ Present options AFTER question, not bundled
|
|
77
|
-
- ✅ Wait for response before next decision
|
|
78
|
-
- ✅ Use decision queue (this file) for sequential presentation
|
|
79
|
-
|
|
80
|
-
**Working Style:**
|
|
81
|
-
- [Your preferences]
|
|
82
|
-
- [How you like to work]
|
|
83
|
-
- [Communication style]
|
|
84
|
-
|
|
85
|
-
**Session Interaction:**
|
|
86
|
-
- ✅ Greet with current context (reference this file)
|
|
87
|
-
- ✅ Build on previous learnings
|
|
88
|
-
- ✅ Sequential focus (one thing deeply, not many shallowly)
|
|
89
|
-
- ✅ Use this file to track parallel work and decisions
|
|
90
|
-
|
|
91
|
-
**Feedback Style:**
|
|
92
|
-
- [How you prefer feedback]
|
|
93
|
-
- [What works well]
|
|
94
|
-
- [What to avoid]
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## 📚 Relationship History
|
|
99
|
-
|
|
100
|
-
**First session:** [YYYY-MM-DD]
|
|
101
|
-
**Total sessions:** [Count]
|
|
102
|
-
**Collaboration style:** [Description]
|
|
103
|
-
|
|
104
|
-
**Key moments:**
|
|
105
|
-
- [Date]: [Important milestone or learning]
|
|
106
|
-
- [Date]: [Another key moment]
|
|
107
|
-
|
|
108
|
-
**Current projects:**
|
|
109
|
-
1. [Project name] ([status/phase])
|
|
110
|
-
2. [Another project]
|
|
111
|
-
|
|
112
|
-
**Working relationship:**
|
|
113
|
-
- [How you work with Claude Code]
|
|
114
|
-
- [Patterns that work well]
|
|
115
|
-
- [Things to remember]
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## 📋 Recent Completions (Current Session)
|
|
120
|
-
|
|
121
|
-
**Major accomplishments:**
|
|
122
|
-
- ✅ [Completed item]
|
|
123
|
-
- ✅ [Another completion]
|
|
124
|
-
|
|
125
|
-
**Learnings captured:**
|
|
126
|
-
- [New pattern learned]
|
|
127
|
-
- [Technique discovered]
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## 🗂️ Open Issues Registry ({{PROJECT_NAME}})
|
|
132
|
-
|
|
133
|
-
| # | Title | Status | % | Action |
|
|
134
|
-
|---|-------|--------|---|--------|
|
|
135
|
-
| X | [Issue title] | [PASS/FAIL/PARTIAL] | X% | [Next step] |
|
|
136
|
-
|
|
137
|
-
**Summary:** [Compliance stats or overview]
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
## 💡 Patterns Learned (Cross-Repo)
|
|
142
|
-
|
|
143
|
-
### [Pattern Name] ([YYYY-MM-DD])
|
|
144
|
-
- **Pattern:** [Description]
|
|
145
|
-
- **Why:** [Reasoning]
|
|
146
|
-
- **Examples:** [Usage examples]
|
|
147
|
-
- **Use cases:** [When to apply]
|
|
148
|
-
- **Report:** [Link to learning report if exists]
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
## 🛠️ How to Use This File
|
|
153
|
-
|
|
154
|
-
**Session Start (Auto):**
|
|
155
|
-
1. Claude Code loads CLAUDE.md
|
|
156
|
-
2. Finds `@~/.genie/context.md` reference
|
|
157
|
-
3. Executes all `!command` statements
|
|
158
|
-
4. Greets you with:
|
|
159
|
-
- Current focus
|
|
160
|
-
- Where you left off
|
|
161
|
-
- Fresh git context
|
|
162
|
-
- Next queued decision
|
|
163
|
-
|
|
164
|
-
**During Session:**
|
|
165
|
-
- Check "Current Focus" to know what you're working on
|
|
166
|
-
- Update "Recent Completions" as you finish tasks
|
|
167
|
-
- Add decisions to queue (don't present all at once!)
|
|
168
|
-
- Track parallel work in "Active Parallel Work" section
|
|
169
|
-
|
|
170
|
-
**Session End:**
|
|
171
|
-
- Update "Current Focus" with progress
|
|
172
|
-
- Add completions to "Recent Completions"
|
|
173
|
-
- Queue any pending decisions
|
|
174
|
-
- Learnings auto-captured via /learn command
|
|
175
|
-
|
|
176
|
-
**Decision Management:**
|
|
177
|
-
- Add decisions to queue as they arise
|
|
178
|
-
- Present ONE at a time from queue
|
|
179
|
-
- Remove from queue when resolved
|
|
180
|
-
- Never present multiple decisions in parallel (ABCD format)
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
## 🎯 Session Greeting Template
|
|
185
|
-
|
|
186
|
-
When you start a new session, Claude Code greets like this:
|
|
187
|
-
|
|
188
|
-
> "Hey {{USER_NAME}}! 👋
|
|
189
|
-
>
|
|
190
|
-
> **Current focus:** [from Current Focus section]
|
|
191
|
-
> **Where we left off:** [last item from Recent Completions]
|
|
192
|
-
> **Branch:** [from !git branch]
|
|
193
|
-
> **Status:** [summary from !git status]
|
|
194
|
-
>
|
|
195
|
-
> [If decision queued]: **Next up:** Decision 1 about [topic]. Ready to discuss?
|
|
196
|
-
> [If no decision]: Ready to continue or switch focus?"
|
|
197
|
-
|
|
198
|
-
This ensures:
|
|
199
|
-
- ✅ Immediate context restoration
|
|
200
|
-
- ✅ Fresh runtime state
|
|
201
|
-
- ✅ Clear continuation point
|
|
202
|
-
- ✅ No replanning needed
|
|
203
|
-
- ✅ Relationship continuity
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
**System Status:** ✅ ACTIVE
|
|
208
|
-
|
|
209
|
-
**This file location:** `~/.genie/context.md` (user-local, cross-repo)
|
|
210
|
-
|
|
211
|
-
**Loaded via:** `@~/.genie/context.md` in CLAUDE.md (line 3)
|
|
212
|
-
|
|
213
|
-
**Next evolution:** [Your ideas for improving this system]
|
|
214
|
-
|
|
215
|
-
---
|
|
216
|
-
|
|
217
|
-
🧞 **Session continuity system active!** No more amnesia. Let's build. ✨
|
|
218
|
-
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Done Report: qa-<slug>-<YYYYMMDDHHmm>
|
|
2
|
-
## Executive Summary
|
|
3
|
-
- **Checklist items tested:** X/Y
|
|
4
|
-
- **New scenarios discovered:** A
|
|
5
|
-
- **Bugs found:** B (C critical, D high, E medium)
|
|
6
|
-
- **Checklist items added:** F
|
|
7
|
-
|
|
8
|
-
## Test Matrix
|
|
9
|
-
|
|
10
|
-
### Checklist Items (from @.genie/qa/checklist.md)
|
|
11
|
-
| Item | Category | Status | Evidence |
|
|
12
|
-
|------|----------|--------|----------|
|
|
13
|
-
| <name> | <cat> | ✅ Pass | cmd-<name>-<ts>.txt |
|
|
14
|
-
| <name> | <cat> | ❌ Fail | error-<name>-<ts>.txt |
|
|
15
|
-
|
|
16
|
-
### New Scenarios (discovered during this run)
|
|
17
|
-
| Scenario | Category | Status | Added to Checklist |
|
|
18
|
-
|----------|----------|--------|-------------------|
|
|
19
|
-
| <name> | <cat> | ✅ Pass | ✅ Yes (via learn) |
|
|
20
|
-
|
|
21
|
-
## Bugs Found
|
|
22
|
-
|
|
23
|
-
### 🔴 CRITICAL (X)
|
|
24
|
-
**[BUG] <Description>**
|
|
25
|
-
- **Reproduction:** <steps>
|
|
26
|
-
- **Expected:** <behavior>
|
|
27
|
-
- **Actual:** <behavior>
|
|
28
|
-
- **Evidence:** .genie/qa/evidence/ (created during test execution)<file>
|
|
29
|
-
- **Filed:** Issue #XX
|
|
30
|
-
- **Owner:** <agent/person>
|
|
31
|
-
|
|
32
|
-
### 🟠 HIGH (X)
|
|
33
|
-
(same format)
|
|
34
|
-
|
|
35
|
-
### 🟡 MEDIUM (X)
|
|
36
|
-
(same format)
|
|
37
|
-
|
|
38
|
-
## Learning Summary
|
|
39
|
-
|
|
40
|
-
**Items added to checklist:**
|
|
41
|
-
1. <Item name> (<category>)
|
|
42
|
-
2. <Item name> (<category>)
|
|
43
|
-
|
|
44
|
-
**Learn agent sessions:**
|
|
45
|
-
- Session <id>: Added <item>
|
|
46
|
-
- Session <id>: Added <item>
|
|
47
|
-
|
|
48
|
-
## Evidence Archive
|
|
49
|
-
Location: .genie/qa/evidence/ (created during test execution)
|
|
50
|
-
|
|
51
|
-
**Terminal outputs:** X files
|
|
52
|
-
**Screenshots:** Y files
|
|
53
|
-
**Logs:** Z files
|
|
54
|
-
|
|
55
|
-
## Coverage Analysis
|
|
56
|
-
- **<Category 1>:** X/Y tested (Z%)
|
|
57
|
-
- **<Category 2>:** X/Y tested (Z%)
|
|
58
|
-
- **Overall:** X/Y scenarios validated (Z%)
|
|
59
|
-
|
|
60
|
-
## Follow-Ups
|
|
61
|
-
1. <Action> - <Priority>
|
|
62
|
-
2. <Action> - <Priority>
|
|
63
|
-
|
|
64
|
-
## Verdict
|
|
65
|
-
**Status:** <APPROVED | BLOCKED>
|
|
66
|
-
**Confidence:** <LOW | MEDIUM | HIGH>
|
|
67
|
-
**Recommendation:** <action items>
|
|
68
|
-
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# Wish Review – {Wish Slug}
|
|
2
|
-
**Date:** 2024-..Z | **Status in wish:** {status}
|
|
3
|
-
**Completion Score:** XX/100 (XX%)
|
|
4
|
-
|
|
5
|
-
## Matrix Scoring Breakdown
|
|
6
|
-
|
|
7
|
-
### Discovery Phase (XX/30 pts)
|
|
8
|
-
- **Context Completeness (X/10 pts)**
|
|
9
|
-
- [x] All files/docs referenced with @ notation (4/4 pts) – Evidence: context ledger complete
|
|
10
|
-
- [x] Background persona outputs captured (3/3 pts) – Evidence: @.genie/wishes/<slug>/reports/done-*
|
|
11
|
-
- [ ] Assumptions/decisions/risks documented (1/3 pts) – Gap: Missing risk analysis
|
|
12
|
-
- **Scope Clarity (X/10 pts)**
|
|
13
|
-
- [x] Current/target state defined (3/3 pts)
|
|
14
|
-
- [x] Spec contract with success metrics (4/4 pts)
|
|
15
|
-
- [x] Out-of-scope stated (3/3 pts)
|
|
16
|
-
- **Evidence Planning (X/10 pts)**
|
|
17
|
-
- [x] Validation commands specified (4/4 pts)
|
|
18
|
-
- [x] Artifact paths defined (3/3 pts)
|
|
19
|
-
- [ ] Approval checkpoints documented (0/3 pts) – Gap: No checkpoints defined
|
|
20
|
-
|
|
21
|
-
### Implementation Phase (XX/40 pts)
|
|
22
|
-
- **Code Quality (X/15 pts)**
|
|
23
|
-
- [x] Follows standards (5/5 pts) – Evidence: passes lint checks
|
|
24
|
-
- [x] Minimal surface area (4/5 pts) – Note: Some extra files modified
|
|
25
|
-
- [x] Clean abstractions (5/5 pts)
|
|
26
|
-
- **Test Coverage (X/10 pts)**
|
|
27
|
-
- [x] Unit tests (4/4 pts) – Evidence: `@tests/unit/`*
|
|
28
|
-
- [x] Integration tests (4/4 pts) – Evidence: `@tests/integration/`*
|
|
29
|
-
- [x] Test execution evidence (2/2 pts) – Evidence: test-results.log
|
|
30
|
-
- **Documentation (X/5 pts)**
|
|
31
|
-
- [x] Inline comments (2/2 pts)
|
|
32
|
-
- [ ] Updated external docs (0/2 pts) – Gap: README not updated
|
|
33
|
-
- [x] Maintainer context (1/1 pt)
|
|
34
|
-
- **Execution Alignment (X/10 pts)**
|
|
35
|
-
- [x] Stayed in scope (4/4 pts)
|
|
36
|
-
- [x] No scope creep (3/3 pts)
|
|
37
|
-
- [x] Dependencies honored (3/3 pts)
|
|
38
|
-
|
|
39
|
-
### Verification Phase (XX/30 pts)
|
|
40
|
-
- **Validation Completeness (X/15 pts)**
|
|
41
|
-
- [x] All validation commands passed (6/6 pts)
|
|
42
|
-
- [x] Artifacts at specified paths (5/5 pts)
|
|
43
|
-
- [x] Edge cases tested (4/4 pts)
|
|
44
|
-
- **Evidence Quality (X/10 pts)**
|
|
45
|
-
- [x] Command outputs logged (4/4 pts)
|
|
46
|
-
- [x] Screenshots/metrics captured (3/3 pts)
|
|
47
|
-
- [x] Before/after comparisons (3/3 pts)
|
|
48
|
-
- **Review Thoroughness (X/5 pts)**
|
|
49
|
-
- [x] Human approval obtained (2/2 pts)
|
|
50
|
-
- [x] Blockers resolved (2/2 pts)
|
|
51
|
-
- [x] Status log updated (1/1 pt)
|
|
52
|
-
|
|
53
|
-
## Evidence Summary
|
|
54
|
-
| Artefact | Location | Result | Notes |
|
|
55
|
-
| --- | --- | --- | --- |
|
|
56
|
-
| Test results | `@wishes/`<slug>/qa/tests.log | ✅ | All 47 tests passing |
|
|
57
|
-
| Metrics | `@wishes/`<slug>/qa/metrics.json | ✅ | TTFB avg 410ms (target <500ms) |
|
|
58
|
-
| Screenshots | `@wishes/`<slug>/qa/screenshots/ | ✅ | 8 workflow screenshots captured |
|
|
59
|
-
|
|
60
|
-
## Deductions & Gaps
|
|
61
|
-
1. **-2 pts (Discovery):** Risk analysis incomplete in discovery summary
|
|
62
|
-
2. **-3 pts (Discovery):** Approval checkpoints not documented before implementation
|
|
63
|
-
3. **-1 pt (Implementation):** Extra files modified outside core scope
|
|
64
|
-
4. **-2 pts (Implementation):** README not updated with new feature
|
|
65
|
-
|
|
66
|
-
## Recommendations
|
|
67
|
-
1. Add risk analysis to discovery summary section
|
|
68
|
-
2. Document approval checkpoints for future wishes
|
|
69
|
-
3. Update README with feature documentation
|
|
70
|
-
4. Consider splitting peripheral file changes into separate PR
|
|
71
|
-
|
|
72
|
-
## Verification Commands
|
|
73
|
-
Summarize the validation commands executed (per wish instructions and project defaults in `@.genie/code/agents/tests.md` / `@.genie/code/agents/commit.md`) and record pass/fail status for each.
|
|
74
|
-
|
|
75
|
-
## Verdict
|
|
76
|
-
**Score: XX/100 (XX%)**
|
|
77
|
-
- ✅ **90-100:** EXCELLENT – Ready for merge
|
|
78
|
-
- ✅ **80-89:** GOOD – Minor gaps, approved with follow-ups
|
|
79
|
-
- ⚠️ **70-79:** ACCEPTABLE – Needs improvements before merge
|
|
80
|
-
- ❌ **<70:** NEEDS WORK – Significant gaps, blocked
|
|
81
|
-
|
|
82
|
-
**Status:** {APPROVED | APPROVED_WITH_FOLLOWUPS | BLOCKED}
|
|
83
|
-
|
|
84
|
-
## Next Steps
|
|
85
|
-
1. Address gaps 1-4 above (optional for approval, required for excellence)
|
|
86
|
-
2. Update wish status to COMPLETED
|
|
87
|
-
3. Update wish completion score to XX/100
|
|
88
|
-
4. Create follow-up tasks for deferred documentation
|
|
89
|
-
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# 🧞 {FEATURE NAME} WISH
|
|
2
|
-
**Status:** DRAFT
|
|
3
|
-
**Roadmap Item:** {ROADMAP-ID} – @.genie/product/roadmap.md §{section}
|
|
4
|
-
**Mission Link:** @.genie/product/mission.md §Pitch
|
|
5
|
-
**Completion Score:** 0/100 (updated by `/review`)
|
|
6
|
-
|
|
7
|
-
## Evaluation Matrix (100 Points Total)
|
|
8
|
-
|
|
9
|
-
### Discovery Phase (30 pts)
|
|
10
|
-
- **Context Completeness (10 pts)**
|
|
11
|
-
- [ ] All relevant files/docs referenced with @ notation (4 pts)
|
|
12
|
-
- [ ] Background persona outputs captured in context ledger (3 pts)
|
|
13
|
-
- [ ] Assumptions (ASM-#), decisions (DEC-#), risks documented (3 pts)
|
|
14
|
-
- **Scope Clarity (10 pts)**
|
|
15
|
-
- [ ] Clear current state and target state defined (3 pts)
|
|
16
|
-
- [ ] Spec contract complete with success metrics (4 pts)
|
|
17
|
-
- [ ] Out-of-scope explicitly stated (3 pts)
|
|
18
|
-
- **Evidence Planning (10 pts)**
|
|
19
|
-
- [ ] Validation commands specified with exact syntax (4 pts)
|
|
20
|
-
- [ ] Artifact storage paths defined (3 pts)
|
|
21
|
-
- [ ] Approval checkpoints documented (3 pts)
|
|
22
|
-
|
|
23
|
-
### Implementation Phase (40 pts)
|
|
24
|
-
- **Code Quality (15 pts)**
|
|
25
|
-
- [ ] Follows project standards (@.genie/standards/*) (5 pts)
|
|
26
|
-
- [ ] Minimal surface area changes, focused scope (5 pts)
|
|
27
|
-
- [ ] Clean abstractions and patterns (5 pts)
|
|
28
|
-
- **Test Coverage (10 pts)**
|
|
29
|
-
- [ ] Unit tests for new behavior (4 pts)
|
|
30
|
-
- [ ] Integration tests for workflows (4 pts)
|
|
31
|
-
- [ ] Evidence of test execution captured (2 pts)
|
|
32
|
-
- **Documentation (5 pts)**
|
|
33
|
-
- [ ] Inline comments where complexity exists (2 pts)
|
|
34
|
-
- [ ] Updated relevant external docs (2 pts)
|
|
35
|
-
- [ ] Context preserved for maintainers (1 pt)
|
|
36
|
-
- **Execution Alignment (10 pts)**
|
|
37
|
-
- [ ] Stayed within spec contract scope (4 pts)
|
|
38
|
-
- [ ] No unapproved scope creep (3 pts)
|
|
39
|
-
- [ ] Dependencies and sequencing honored (3 pts)
|
|
40
|
-
|
|
41
|
-
### Verification Phase (30 pts)
|
|
42
|
-
- **Validation Completeness (15 pts)**
|
|
43
|
-
- [ ] All validation commands executed successfully (6 pts)
|
|
44
|
-
- [ ] Artifacts captured at specified paths (5 pts)
|
|
45
|
-
- [ ] Edge cases and error paths tested (4 pts)
|
|
46
|
-
- **Evidence Quality (10 pts)**
|
|
47
|
-
- [ ] Command outputs (failures → fixes) logged (4 pts)
|
|
48
|
-
- [ ] Screenshots/metrics captured where applicable (3 pts)
|
|
49
|
-
- [ ] Before/after comparisons provided (3 pts)
|
|
50
|
-
- **Review Thoroughness (5 pts)**
|
|
51
|
-
- [ ] Human approval obtained at checkpoints (2 pts)
|
|
52
|
-
- [ ] All blockers resolved or documented (2 pts)
|
|
53
|
-
- [ ] Status log updated with completion timestamp (1 pt)
|
|
54
|
-
|
|
55
|
-
## Context Ledger
|
|
56
|
-
| Source | Type | Summary | Routed To |
|
|
57
|
-
| --- | --- | --- | --- |
|
|
58
|
-
| Planning brief | doc | Key findings | entire wish |
|
|
59
|
-
| `@path/to/file` | repo | Insight | wish, docs |
|
|
60
|
-
| mcp__genie__run agent="..." | background | Output summary | wish, roadmap |
|
|
61
|
-
|
|
62
|
-
### Context Variants Considered
|
|
63
|
-
- Candidates: C1, C2, C3
|
|
64
|
-
- Winner: {C?} — reason: one‑line tradeoff statement
|
|
65
|
-
|
|
66
|
-
## Discovery Summary
|
|
67
|
-
- **Primary analyst:** {Human/Agent}
|
|
68
|
-
- **Key observations:** …
|
|
69
|
-
- **Assumptions (ASM-#):** …
|
|
70
|
-
- **Open questions (Q-#):** …
|
|
71
|
-
- **Risks:** …
|
|
72
|
-
|
|
73
|
-
## Executive Summary
|
|
74
|
-
Concise outcome tied to user/system impact.
|
|
75
|
-
|
|
76
|
-
## Current State
|
|
77
|
-
- **What exists today:** `@file` references with short notes
|
|
78
|
-
- **Gaps/Pain points:** …
|
|
79
|
-
|
|
80
|
-
## Target State & Guardrails
|
|
81
|
-
- **Desired behaviour:** …
|
|
82
|
-
- **Non-negotiables:** latency, safety, human-likeness, compliance, etc.
|
|
83
|
-
|
|
84
|
-
## Execution Groups
|
|
85
|
-
### Group A – {slug}
|
|
86
|
-
- **Goal:** …
|
|
87
|
-
- **Surfaces:** `@file`, `@docs`
|
|
88
|
-
- **Deliverables:** …
|
|
89
|
-
- **Evidence:** Store in wish `qa/group-a/`, add notes in `reports/` if needed
|
|
90
|
-
- **Suggested personas:** `forge-coder`, `forge-quality`
|
|
91
|
-
- **External tracker:** {placeholder ID or JIRA-XXX}
|
|
92
|
-
|
|
93
|
-
(Repeat for Group B/C as needed.)
|
|
94
|
-
|
|
95
|
-
## Verification Plan
|
|
96
|
-
- Validation steps or scripts to run (tests, metrics, evaluation)
|
|
97
|
-
- Evidence storage: reference wish `qa/` + `reports/` subfolders
|
|
98
|
-
- Branch strategy note (dedicated branch vs existing vs micro-task)
|
|
99
|
-
|
|
100
|
-
### Evidence Checklist
|
|
101
|
-
- **Validation commands (exact):** …
|
|
102
|
-
- **Artefact paths (where evidence lives):** use wish `qa/` + `reports/`
|
|
103
|
-
- **Approval checkpoints (human sign-off required before work starts):** …
|
|
104
|
-
|
|
105
|
-
## <spec_contract>
|
|
106
|
-
- **Scope:** …
|
|
107
|
-
- **Out of scope:** …
|
|
108
|
-
- **Success metrics:** …
|
|
109
|
-
- **External tasks:** Tracker IDs (if any)
|
|
110
|
-
- **Dependencies:** …
|
|
111
|
-
</spec_contract>
|
|
112
|
-
|
|
113
|
-
## Blocker Protocol
|
|
114
|
-
1. Pause work and create `reports/blocker-<slug>-<timestamp>.md` inside the wish folder describing findings.
|
|
115
|
-
2. Notify owner and wait for updated instructions.
|
|
116
|
-
3. Resume only after the wish status/log is updated.
|
|
117
|
-
|
|
118
|
-
## Status Log
|
|
119
|
-
- [YYYY-MM-DD HH:MMZ] Wish created
|
|
120
|
-
- …
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Analyze Commit Helper
|
|
5
|
-
*
|
|
6
|
-
* Parse commit metadata using deterministic rules (no LLM).
|
|
7
|
-
* Extracts: type, scope, breaking, issue refs, wish refs.
|
|
8
|
-
*
|
|
9
|
-
* Usage:
|
|
10
|
-
* genie helper analyze-commit [commit-hash]
|
|
11
|
-
* genie helper analyze-commit --staged (analyze staged diff)
|
|
12
|
-
*
|
|
13
|
-
* Output: JSON
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
const { execSync } = require('child_process');
|
|
17
|
-
|
|
18
|
-
// Conventional commit type patterns
|
|
19
|
-
const COMMIT_TYPES = {
|
|
20
|
-
feat: { name: 'Feature', requiresIssue: true, category: 'feature' },
|
|
21
|
-
fix: { name: 'Bug Fix', requiresIssue: true, category: 'feature' },
|
|
22
|
-
docs: { name: 'Documentation', requiresIssue: false, category: 'maintenance' },
|
|
23
|
-
style: { name: 'Style', requiresIssue: false, category: 'maintenance' },
|
|
24
|
-
refactor: { name: 'Refactor', requiresIssue: false, category: 'maintenance' },
|
|
25
|
-
perf: { name: 'Performance', requiresIssue: false, category: 'maintenance' },
|
|
26
|
-
test: { name: 'Test', requiresIssue: false, category: 'maintenance' },
|
|
27
|
-
build: { name: 'Build', requiresIssue: false, category: 'maintenance' },
|
|
28
|
-
ci: { name: 'CI/CD', requiresIssue: false, category: 'maintenance' },
|
|
29
|
-
chore: { name: 'Chore', requiresIssue: false, category: 'maintenance' },
|
|
30
|
-
revert: { name: 'Revert', requiresIssue: false, category: 'special' },
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
function parseConventionalCommit(message) {
|
|
34
|
-
// Format: type(scope)!: subject
|
|
35
|
-
const pattern = /^(\w+)(?:\(([^)]+)\))?(!)?\s*:\s*(.+)$/;
|
|
36
|
-
const match = message.match(pattern);
|
|
37
|
-
|
|
38
|
-
if (!match) {
|
|
39
|
-
return {
|
|
40
|
-
type: null,
|
|
41
|
-
scope: null,
|
|
42
|
-
breaking: false,
|
|
43
|
-
subject: message,
|
|
44
|
-
conventional: false,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const [, type, scope, breaking, subject] = match;
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
type: type.toLowerCase(),
|
|
52
|
-
scope: scope || null,
|
|
53
|
-
breaking: !!breaking,
|
|
54
|
-
subject: subject.trim(),
|
|
55
|
-
conventional: true,
|
|
56
|
-
typeInfo: COMMIT_TYPES[type.toLowerCase()] || null,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function extractReferences(message) {
|
|
61
|
-
const refs = {
|
|
62
|
-
issues: [],
|
|
63
|
-
wishes: [],
|
|
64
|
-
closes: [],
|
|
65
|
-
fixes: [],
|
|
66
|
-
related: [],
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
// GitHub issues: fixes #123, closes #456
|
|
70
|
-
const closePattern = /(fixes|closes)\s+#(\d+)/gi;
|
|
71
|
-
let match;
|
|
72
|
-
while ((match = closePattern.exec(message)) !== null) {
|
|
73
|
-
const num = match[2];
|
|
74
|
-
refs.issues.push(num);
|
|
75
|
-
refs.closes.push(num);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Related issues: related: #789, see #999
|
|
79
|
-
const relatedPattern = /(related|see):\s+#(\d+)/gi;
|
|
80
|
-
while ((match = relatedPattern.exec(message)) !== null) {
|
|
81
|
-
const num = match[2];
|
|
82
|
-
if (!refs.issues.includes(num)) {
|
|
83
|
-
refs.issues.push(num);
|
|
84
|
-
refs.related.push(num);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// Wish references: wish: slug, .genie/wishes/slug
|
|
89
|
-
const wishPattern = /\bwish:\s*([\w-]+)|\.genie\/wishes\/([\w-]+)/gi;
|
|
90
|
-
while ((match = wishPattern.exec(message)) !== null) {
|
|
91
|
-
const slug = match[1] || match[2];
|
|
92
|
-
if (slug && !refs.wishes.includes(slug)) {
|
|
93
|
-
refs.wishes.push(slug);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return refs;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function getCommitMessage(commitHash) {
|
|
101
|
-
try {
|
|
102
|
-
const format = commitHash ? '%s%n%b' : '%s%n%b';
|
|
103
|
-
const cmd = commitHash
|
|
104
|
-
? `git log -1 --format="${format}" ${commitHash}`
|
|
105
|
-
: `git log -1 --format="${format}" HEAD`;
|
|
106
|
-
|
|
107
|
-
return execSync(cmd, {
|
|
108
|
-
encoding: 'utf8',
|
|
109
|
-
stdio: ['pipe', 'pipe', 'pipe']
|
|
110
|
-
}).trim();
|
|
111
|
-
} catch (e) {
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function getStagedMessage() {
|
|
117
|
-
// Read COMMIT_EDITMSG if available, or use git status
|
|
118
|
-
try {
|
|
119
|
-
const fs = require('fs');
|
|
120
|
-
const path = require('path');
|
|
121
|
-
const gitDir = execSync('git rev-parse --git-dir', {
|
|
122
|
-
encoding: 'utf8',
|
|
123
|
-
stdio: ['pipe', 'pipe', 'pipe']
|
|
124
|
-
}).trim();
|
|
125
|
-
|
|
126
|
-
const commitMsgPath = path.join(gitDir, 'COMMIT_EDITMSG');
|
|
127
|
-
if (fs.existsSync(commitMsgPath)) {
|
|
128
|
-
return fs.readFileSync(commitMsgPath, 'utf8').trim();
|
|
129
|
-
}
|
|
130
|
-
} catch (e) {
|
|
131
|
-
// Fallback to empty
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return '';
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function analyzeCommit(message) {
|
|
138
|
-
const lines = message.split('\n');
|
|
139
|
-
const subject = lines[0];
|
|
140
|
-
const body = lines.slice(1).join('\n').trim();
|
|
141
|
-
|
|
142
|
-
const parsed = parseConventionalCommit(subject);
|
|
143
|
-
const refs = extractReferences(message);
|
|
144
|
-
|
|
145
|
-
const requiresIssue = parsed.typeInfo?.requiresIssue ?? true; // Default: require issue
|
|
146
|
-
const hasIssue = refs.issues.length > 0;
|
|
147
|
-
const hasWish = refs.wishes.length > 0;
|
|
148
|
-
const hasTraceability = hasIssue || hasWish;
|
|
149
|
-
|
|
150
|
-
return {
|
|
151
|
-
subject,
|
|
152
|
-
body,
|
|
153
|
-
...parsed,
|
|
154
|
-
references: refs,
|
|
155
|
-
traceability: {
|
|
156
|
-
required: requiresIssue,
|
|
157
|
-
hasIssue,
|
|
158
|
-
hasWish,
|
|
159
|
-
satisfied: !requiresIssue || hasTraceability,
|
|
160
|
-
},
|
|
161
|
-
metadata: {
|
|
162
|
-
category: parsed.typeInfo?.category || 'untyped',
|
|
163
|
-
requiresIssue,
|
|
164
|
-
},
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function main() {
|
|
169
|
-
const args = process.argv.slice(2);
|
|
170
|
-
|
|
171
|
-
let message;
|
|
172
|
-
|
|
173
|
-
if (args.includes('--staged')) {
|
|
174
|
-
message = getStagedMessage();
|
|
175
|
-
} else if (args.length > 0) {
|
|
176
|
-
message = getCommitMessage(args[0]);
|
|
177
|
-
} else {
|
|
178
|
-
message = getCommitMessage('HEAD');
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
if (!message) {
|
|
182
|
-
console.error('Error: No commit message found');
|
|
183
|
-
process.exit(1);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
const analysis = analyzeCommit(message);
|
|
187
|
-
console.log(JSON.stringify(analysis, null, 2));
|
|
188
|
-
process.exit(0);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (require.main === module) {
|
|
192
|
-
main();
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
module.exports = { analyzeCommit, parseConventionalCommit, extractReferences };
|