@programinglive/dev-workflow-mcp-server 1.4.0 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/.github/workflows/npm-publish.yml +3 -0
  2. package/CHANGELOG.md +132 -2
  3. package/README.md +2 -1
  4. package/docs/PLESK_DEPLOYMENT.md +170 -0
  5. package/docs/WORKFLOW-BEST-PRACTICES.md +58 -0
  6. package/docs/product/PRD.md +1 -0
  7. package/docs/release-notes/RELEASE_NOTES.md +59 -0
  8. package/package.json +7 -6
  9. package/release-wrapper.js +68 -33
  10. package/scripts/update-release-notes.cjs +14 -18
  11. package/tailwind.config.js +2 -4
  12. package/tests/build.test.js +16 -3
  13. package/tests/handlers.test.js +78 -0
  14. package/tests/release-wrapper.test.js +2 -0
  15. package/tests/workflowState.test.js +7 -4
  16. package/tools/definitions.js +2 -2
  17. package/tools/handlers.js +2 -2
  18. package/vite.web.config.js +23 -0
  19. package/web/README.md +36 -0
  20. package/web/app/api/docs/route.ts +32 -0
  21. package/web/app/api/history/route.ts +19 -0
  22. package/web/app/api/npm-downloads/route.ts +21 -0
  23. package/web/app/api/summary/route.ts +15 -0
  24. package/web/app/api/version/route.ts +15 -0
  25. package/web/app/docs/page.tsx +202 -0
  26. package/web/app/favicon.ico +0 -0
  27. package/web/app/globals.css +91 -0
  28. package/web/app/layout.tsx +36 -0
  29. package/web/app/page.tsx +15 -0
  30. package/web/components/ApiReference.tsx +20 -0
  31. package/web/components/Features.tsx +61 -0
  32. package/web/components/Footer.tsx +9 -0
  33. package/web/components/Hero.tsx +97 -0
  34. package/web/components/History.tsx +143 -0
  35. package/web/components/Navbar.tsx +64 -0
  36. package/web/components/Terminal.tsx +114 -0
  37. package/web/eslint.config.mjs +18 -0
  38. package/web/lib/db.js +131 -0
  39. package/web/lib/docs.js +73 -0
  40. package/web/next.config.ts +8 -0
  41. package/web/package-lock.json +6971 -0
  42. package/web/package.json +29 -0
  43. package/web/postcss.config.mjs +9 -0
  44. package/web/public/assets/android-chrome-192x192.png +0 -0
  45. package/web/public/assets/android-chrome-512x512.png +0 -0
  46. package/web/public/assets/apple-touch-icon.png +0 -0
  47. package/web/public/assets/favicon-16x16.png +0 -0
  48. package/web/public/assets/favicon-32x32.png +0 -0
  49. package/web/public/assets/favicon.ico +0 -0
  50. package/web/public/assets/favicon.png +0 -0
  51. package/web/public/assets/logo.png +0 -0
  52. package/web/public/assets/og-preview.png +0 -0
  53. package/web/public/assets/site.webmanifest +1 -0
  54. package/web/public/file.svg +1 -0
  55. package/web/public/globe.svg +1 -0
  56. package/web/public/next.svg +1 -0
  57. package/web/public/vercel.svg +1 -0
  58. package/web/public/window.svg +1 -0
  59. package/web/server.js +30 -158
  60. package/web/tailwind.config.ts +19 -0
  61. package/web/tsconfig.json +42 -0
  62. package/web-legacy/public/assets/android-chrome-192x192.png +0 -0
  63. package/web-legacy/public/assets/android-chrome-512x512.png +0 -0
  64. package/web-legacy/public/assets/apple-touch-icon.png +0 -0
  65. package/web-legacy/public/assets/favicon-16x16.png +0 -0
  66. package/web-legacy/public/assets/favicon-32x32.png +0 -0
  67. package/web-legacy/public/assets/favicon.ico +0 -0
  68. package/web-legacy/public/assets/favicon.png +0 -0
  69. package/web-legacy/public/assets/logo.png +0 -0
  70. package/web-legacy/public/assets/og-preview.png +0 -0
  71. package/web-legacy/public/assets/site.webmanifest +1 -0
  72. package/{dist → web-legacy/public}/docs/EXAMPLES.html +87 -2
  73. package/{dist → web-legacy/public}/docs/GETTING-STARTED.html +87 -2
  74. package/{dist → web-legacy/public}/docs/README.html +87 -2
  75. package/web-legacy/public/docs/RELEASE_NOTES.html +275 -0
  76. package/{dist → web-legacy/public}/docs/TROUBLESHOOTING.html +87 -2
  77. package/{dist → web-legacy/public}/docs/WORKFLOW-TEMPLATES.html +87 -2
  78. package/{dist → web-legacy/public}/docs/web-dashboard.html +87 -2
  79. package/web-legacy/public/index.html +223 -0
  80. package/web-legacy/public/input.css +80 -0
  81. package/web-legacy/public/main.js +167 -0
  82. package/web-legacy/public/output.css +1559 -0
  83. package/web-legacy/server.js +207 -0
  84. package/workflow-state.js +11 -25
  85. package/dist/docs/RELEASE_NOTES.html +0 -167
  86. package/web/public/index.html +0 -1046
  87. package/web/public/input.css +0 -3
  88. package/web/public/output.css +0 -1
@@ -31,6 +31,9 @@ jobs:
31
31
  - name: Install dependencies
32
32
  run: npm ci
33
33
 
34
+ - name: Install web dependencies
35
+ run: npm ci --prefix web
36
+
34
37
  - name: Build package
35
38
  run: npm run build
36
39
 
package/CHANGELOG.md CHANGED
@@ -2,12 +2,142 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ## [1.4.0](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.3.9...v1.4.0) (2025-11-22)
5
+ ### [1.4.5](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.4.4...v1.4.5) (2025-11-27)
6
+
7
+
8
+ ### 🐛 Bug Fixes
9
+
10
+ * display dynamic version in web dashboard from /api/version ([69f561d](https://github.com/programinglive/dev-workflow-mcp-server/commit/69f561d369fa8347399fafe5dcdb3a2dbb485064))
11
+
12
+ ### [1.4.4](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.4.1...v1.4.4) (2025-11-27)
13
+
14
+
15
+ ### ♻️ Refactors
16
+
17
+ * consolidate workflow state to root .state folder only ([3d69a14](https://github.com/programinglive/dev-workflow-mcp-server/commit/3d69a14e2abd7897bc91ede5e3c484b90eefc726))
18
+
19
+
20
+ ### 🐛 Bug Fixes
21
+
22
+ * ensure release guard uses freshest workflow state ([e07eb42](https://github.com/programinglive/dev-workflow-mcp-server/commit/e07eb42179f17f2da282bff70392ce1b4652346a))
23
+ * remove invalid turbopack experimental config from next.config.ts ([af0a7ea](https://github.com/programinglive/dev-workflow-mcp-server/commit/af0a7ea7906654755a2520693fd81d7fb6633c13))
24
+ * **web:** configure next.js root to silence warnings ([22ed002](https://github.com/programinglive/dev-workflow-mcp-server/commit/22ed00256a4c6d7dbca13d2733baf0f4392b6650))
25
+ * **web:** improve mobile layout for hero section ([53b26bf](https://github.com/programinglive/dev-workflow-mcp-server/commit/53b26bf3271cab3ac029be8ddb72a8d5312b150e))
26
+
27
+
28
+ ### 📝 Documentation
29
+
30
+ * add Plesk deployment guide ([de35675](https://github.com/programinglive/dev-workflow-mcp-server/commit/de356753231d1bb29fd3c87fdd9d095932fae4b0))
31
+
32
+
33
+ ### 🧹 Chores
34
+
35
+ * add 1.4.3 release notes ([8b165f7](https://github.com/programinglive/dev-workflow-mcp-server/commit/8b165f7a8201f6b8484dce60f3f907cb195abb83))
36
+ * fix release state detection ([ed5dfd1](https://github.com/programinglive/dev-workflow-mcp-server/commit/ed5dfd15d296c555bd5c2731267a87ad4a371af9))
37
+ * prepare for release ([a6ea2d0](https://github.com/programinglive/dev-workflow-mcp-server/commit/a6ea2d0c44f35f2a1e06c4e01bbe026177e9cff2))
38
+ * **release:** 1.4.2 ([fac8999](https://github.com/programinglive/dev-workflow-mcp-server/commit/fac899992d370c0198954a6f7c97ab7645514e25))
39
+ * **release:** 1.4.2 🚀 ([01b0b3c](https://github.com/programinglive/dev-workflow-mcp-server/commit/01b0b3c791c10b76c05bae01e4e8c5ce7435ce14))
40
+ * **release:** 1.4.3 🚀 ([04d8c3b](https://github.com/programinglive/dev-workflow-mcp-server/commit/04d8c3b2873ce819633c95a12f6c48e73fe671ea))
41
+ * update task list ([35663dd](https://github.com/programinglive/dev-workflow-mcp-server/commit/35663dd661d3b97a5fedb5013fbbca36e75605d8))
42
+ * **web:** fix next.js lockfile warning ([05ffce0](https://github.com/programinglive/dev-workflow-mcp-server/commit/05ffce0b171cb804c6a14223521cd1fa876b80ae))
43
+
44
+
45
+ ### ✨ Features
46
+
47
+ * add core doc types (PRD/README/RELEASE_NOTES) and fix CI build ([8ed0567](https://github.com/programinglive/dev-workflow-mcp-server/commit/8ed0567e8de772b95de6fb744a936b07ed3e1c32))
48
+ * update hero text and meta description to emphasize Indonesian programmer community ([681547b](https://github.com/programinglive/dev-workflow-mcp-server/commit/681547b764b2fcf3a874cc637d9653c12bf62640))
49
+ * update program tracks and fix fast refresh warning ([aa5bc9c](https://github.com/programinglive/dev-workflow-mcp-server/commit/aa5bc9cbc8a9bf9c9552e00e89b0b97ddeac0592))
50
+
51
+ ### [1.4.3](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.4.2...v1.4.3) (2025-11-27)
52
+
53
+
54
+ ### 🧹 Chores
55
+
56
+ * **release:** 1.4.2 ([fac8999](https://github.com/programinglive/dev-workflow-mcp-server/commit/fac899992d370c0198954a6f7c97ab7645514e25))
57
+
58
+
59
+ ### 🐛 Bug Fixes
60
+
61
+ * remove invalid turbopack experimental config from next.config.ts ([af0a7ea](https://github.com/programinglive/dev-workflow-mcp-server/commit/af0a7ea7906654755a2520693fd81d7fb6633c13))
62
+
63
+
64
+ ### 📝 Documentation
65
+
66
+ * add Plesk deployment guide ([de35675](https://github.com/programinglive/dev-workflow-mcp-server/commit/de356753231d1bb29fd3c87fdd9d095932fae4b0))
67
+
68
+
69
+ ### ✨ Features
70
+
71
+ * update program tracks and fix fast refresh warning ([aa5bc9c](https://github.com/programinglive/dev-workflow-mcp-server/commit/aa5bc9cbc8a9bf9c9552e00e89b0b97ddeac0592))
72
+
73
+ ### [1.4.2](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.4.1...v1.4.2) (2025-11-27)
74
+
75
+
76
+ ### 🧹 Chores
77
+
78
+ * fix release state detection ([ed5dfd1](https://github.com/programinglive/dev-workflow-mcp-server/commit/ed5dfd15d296c555bd5c2731267a87ad4a371af9))
79
+ * prepare for release ([a6ea2d0](https://github.com/programinglive/dev-workflow-mcp-server/commit/a6ea2d0c44f35f2a1e06c4e01bbe026177e9cff2))
80
+ * update task list ([35663dd](https://github.com/programinglive/dev-workflow-mcp-server/commit/35663dd661d3b97a5fedb5013fbbca36e75605d8))
81
+ * **web:** fix next.js lockfile warning ([05ffce0](https://github.com/programinglive/dev-workflow-mcp-server/commit/05ffce0b171cb804c6a14223521cd1fa876b80ae))
82
+
83
+
84
+ ### 🐛 Bug Fixes
85
+
86
+ * ensure release guard uses freshest workflow state ([e07eb42](https://github.com/programinglive/dev-workflow-mcp-server/commit/e07eb42179f17f2da282bff70392ce1b4652346a))
87
+ * **web:** configure next.js root to silence warnings ([22ed002](https://github.com/programinglive/dev-workflow-mcp-server/commit/22ed00256a4c6d7dbca13d2733baf0f4392b6650))
88
+ * **web:** improve mobile layout for hero section ([53b26bf](https://github.com/programinglive/dev-workflow-mcp-server/commit/53b26bf3271cab3ac029be8ddb72a8d5312b150e))
89
+
90
+
91
+ ### ♻️ Refactors
92
+
93
+ * consolidate workflow state to root .state folder only ([3d69a14](https://github.com/programinglive/dev-workflow-mcp-server/commit/3d69a14e2abd7897bc91ede5e3c484b90eefc726))
94
+
95
+ ### [1.4.1](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.4.0...v1.4.1) (2025-11-27)
96
+
97
+
98
+ ### 🐛 Bug Fixes
99
+
100
+ * update build test to include postbuild ([b1e2f48](https://github.com/programinglive/dev-workflow-mcp-server/commit/b1e2f481334df825109e3f2934c88b8f14c1b4d0))
101
+
102
+
103
+ ### ✨ Features
104
+
105
+ * add custom server.js for Plesk ([b3912cd](https://github.com/programinglive/dev-workflow-mcp-server/commit/b3912cdaf50085ae30cab553a9ebac2b7281ee28))
106
+
107
+ ## [1.4.0](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.3.12...v1.4.0) (2025-11-26)
108
+
109
+
110
+ ### ✨ Features
111
+
112
+ * migrate dashboard to Next.js with TypeScript and Tailwind CSS ([bce1fec](https://github.com/programinglive/dev-workflow-mcp-server/commit/bce1fec98a7b5e5542644271a77ccaf1019dd83c))
113
+
114
+
115
+ ### 🧹 Chores
116
+
117
+ * fix package.json scripts ([fb25e98](https://github.com/programinglive/dev-workflow-mcp-server/commit/fb25e98c763d4b5cac5c321f56a2e533577fc38b))
118
+ * fix tsconfig and remove dist artifact ([282759f](https://github.com/programinglive/dev-workflow-mcp-server/commit/282759f14de6231ad6374dc891b551ca0d70ac28))
119
+
120
+ ### [1.3.12](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.3.11...v1.3.12) (2025-11-22)
121
+
122
+
123
+ ### 🐛 Bug Fixes
124
+
125
+ * **scripts:** update release notes script and backfill versions ([808791e](https://github.com/programinglive/dev-workflow-mcp-server/commit/808791ec4a988fe557fa82be21fb92f6a34d792c))
126
+ * **scripts:** update release notes script to support header format and backfill versions ([e4a5055](https://github.com/programinglive/dev-workflow-mcp-server/commit/e4a5055633ba4d83d43c85ee8b475cd761685519))
127
+
128
+ ### [1.3.11](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.3.10...v1.3.11) (2025-11-22)
6
129
 
7
130
 
8
131
  ### ♻️ Refactors
9
132
 
10
- * **web:** move static files to public/ subdirectory for Plesk security ([f68c6b6](https://github.com/programinglive/dev-workflow-mcp-server/commit/f68c6b6321fa85e9537f8592dfcbc8fb718f77c4))
133
+ * **web:** move static files to public/ subdirectory for Plesk security ([3e5c321](https://github.com/programinglive/dev-workflow-mcp-server/commit/3e5c321d569e3594d9f29c8762513b95df8dbd84))
134
+
135
+ ### [1.3.10](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.3.9...v1.3.10) (2025-11-22)
136
+
137
+
138
+ ### 📝 Documentation
139
+
140
+ * add workflow best practices to eliminate forced releases ([6bcac42](https://github.com/programinglive/dev-workflow-mcp-server/commit/6bcac42bc9f30cbfa0a27e36a90af303d244d863))
11
141
 
12
142
  ### [1.3.9](https://github.com/programinglive/dev-workflow-mcp-server/compare/v1.3.8...v1.3.9) (2025-11-22)
13
143
 
package/README.md CHANGED
@@ -205,6 +205,7 @@ npm run web
205
205
  - **Environment overrides:** Honors `PORT` (common on hosts like Plesk/Render) or `DEV_WORKFLOW_WEB_PORT` before falling back to auto-selection.
206
206
  - **Query parameter:** `?user=<id>` lets you inspect another user’s history (defaults to `default`).
207
207
  - **API endpoints:**
208
+ - `GET /api/version` → current package version from `package.json` (used by dashboard to display version dynamically).
208
209
  - `GET /api/summary?user=<id>` → overall stats for the user.
209
210
  - `GET /api/history?user=<id>&page=1&pageSize=20&startDate=YYYY-MM-DD&endDate=YYYY-MM-DD` → paginated task history.
210
211
  - `GET /api/history-summary?user=<id>&frequency=daily|monthly|yearly` → aggregated counts over time.
@@ -431,7 +432,7 @@ Use run_tests with:
431
432
  Mark that documentation has been created/updated. This is required before committing.
432
433
 
433
434
  **Parameters:**
434
- - `documentationType` (enum, required): "README", "inline-comments", "API-docs", "changelog", or "other"
435
+ - `documentationType` (enum, required): "PRD", "README", "RELEASE_NOTES", "inline-comments", "API-docs", "changelog", or "other"
435
436
  - `summary` (string, required): What was documented
436
437
 
437
438
  ### `check_ready_to_commit`
@@ -0,0 +1,170 @@
1
+ # Deploying dev-workflow-mcp-server to Plesk
2
+
3
+ This guide covers deploying the dev-workflow MCP server (Node.js backend + Next.js frontend) to Plesk hosting.
4
+
5
+ ## Prerequisites
6
+
7
+ - Plesk control panel access
8
+ - Node.js 18+ installed on the server
9
+ - Git installed on the server
10
+ - Domain/subdomain configured in Plesk
11
+
12
+ ## Deployment Steps
13
+
14
+ ### 1. Set Up Node.js Application in Plesk
15
+
16
+ 1. Log in to Plesk control panel
17
+ 2. Go to **Domains** → Select your domain
18
+ 3. Click **Node.js** (or **Applications** if using newer Plesk)
19
+ 4. Click **Add Application**
20
+ 5. Configure:
21
+ - **Application root**: `/var/www/vhosts/yourdomain.com/dev-workflow-mcp-server` (or your path)
22
+ - **Startup file**: `index.js`
23
+ - **Node.js version**: 18.x or higher
24
+ - **Port**: Leave as auto (Plesk assigns a port)
25
+
26
+ ### 2. Clone Repository
27
+
28
+ SSH into your Plesk server:
29
+
30
+ ```bash
31
+ cd /var/www/vhosts/yourdomain.com
32
+ git clone https://github.com/programinglive/dev-workflow-mcp-server.git
33
+ cd dev-workflow-mcp-server
34
+ ```
35
+
36
+ ### 3. Install Dependencies
37
+
38
+ ```bash
39
+ npm install
40
+ ```
41
+
42
+ ### 4. Build the Application
43
+
44
+ ```bash
45
+ npm run build
46
+ ```
47
+
48
+ This builds:
49
+ - **Backend**: Vite bundle → `dist/index.mjs`
50
+ - **Frontend**: Next.js static + server → `web/.next/`
51
+ - **Docs**: HTML files → `dist/docs/`
52
+
53
+ ### 5. Configure Environment (if needed)
54
+
55
+ Create `.env` file in the project root if you need custom settings:
56
+
57
+ ```bash
58
+ # Example (adjust as needed)
59
+ NODE_ENV=production
60
+ PORT=3000
61
+ ```
62
+
63
+ ### 6. Start the Application
64
+
65
+ In Plesk:
66
+ 1. Go back to **Node.js Applications**
67
+ 2. Find your application
68
+ 3. Click **Start** (or it may auto-start)
69
+
70
+ Alternatively, via SSH:
71
+
72
+ ```bash
73
+ npm start
74
+ ```
75
+
76
+ ### 7. Configure Reverse Proxy (Plesk)
77
+
78
+ Plesk automatically sets up a reverse proxy. Verify:
79
+ 1. Go to **Domains** → Your domain → **Web Server Settings**
80
+ 2. Ensure **Proxy** is enabled
81
+ 3. Verify the proxy points to the Node.js app port
82
+
83
+ ### 8. Verify Deployment
84
+
85
+ - Visit `https://yourdomain.com` → Should see the Next.js frontend
86
+ - Visit `https://yourdomain.com/docs` → Should see documentation
87
+ - Check browser console for any `_next/static` 500 errors
88
+
89
+ If you see 500 errors on `_next/static` requests:
90
+ - SSH to server and check logs: `tail -f /var/log/plesk/nodejs/yourdomain.com.log`
91
+ - Ensure `.next` directory exists: `ls -la web/.next/`
92
+ - Verify Node.js is running: `ps aux | grep node`
93
+
94
+ ### 9. Set Up Auto-Restart (Optional)
95
+
96
+ In Plesk, the Node.js app should auto-restart on failure. To verify:
97
+ 1. Go to **Node.js Applications**
98
+ 2. Check **Restart policy** is set to auto-restart
99
+
100
+ ### 10. Enable HTTPS (Recommended)
101
+
102
+ 1. Go to **Domains** → Your domain → **SSL/TLS Certificates**
103
+ 2. Click **Install** (use Let's Encrypt free certificate)
104
+ 3. Plesk auto-redirects HTTP → HTTPS
105
+
106
+ ## Troubleshooting
107
+
108
+ ### `_next/static` returns 500
109
+
110
+ **Cause**: Next.js build output not deployed or server crashed.
111
+
112
+ **Fix**:
113
+ ```bash
114
+ # SSH to server
115
+ npm run build --prefix web
116
+ npm start
117
+ # Check logs
118
+ tail -f /var/log/plesk/nodejs/yourdomain.com.log
119
+ ```
120
+
121
+ ### Application won't start
122
+
123
+ **Check**:
124
+ 1. Node.js version: `node --version` (must be 18+)
125
+ 2. Dependencies: `npm install`
126
+ 3. Build output: `ls -la dist/` and `ls -la web/.next/`
127
+ 4. Logs: Check Plesk control panel logs
128
+
129
+ ### Port conflicts
130
+
131
+ Plesk assigns ports automatically. If you get a port conflict:
132
+ 1. Go to **Node.js Applications** → Edit
133
+ 2. Let Plesk auto-assign a new port
134
+ 3. Restart the app
135
+
136
+ ## Updating the Application
137
+
138
+ To deploy a new version:
139
+
140
+ ```bash
141
+ cd /var/www/vhosts/yourdomain.com/dev-workflow-mcp-server
142
+ git pull origin main
143
+ npm install
144
+ npm run build
145
+ # Plesk will auto-restart the app
146
+ ```
147
+
148
+ Or manually restart in Plesk control panel:
149
+ 1. **Node.js Applications** → Select app → **Restart**
150
+
151
+ ## Production Checklist
152
+
153
+ - [ ] Node.js 18+ installed
154
+ - [ ] `npm install` completed
155
+ - [ ] `npm run build` succeeded (no errors)
156
+ - [ ] `.next` directory exists with static files
157
+ - [ ] HTTPS/SSL certificate installed
158
+ - [ ] Reverse proxy configured
159
+ - [ ] Application started and running
160
+ - [ ] `https://yourdomain.com` loads without 500 errors
161
+ - [ ] `_next/static` assets load correctly
162
+ - [ ] Logs show no errors
163
+
164
+ ## Support
165
+
166
+ For issues:
167
+ 1. Check Plesk logs: `/var/log/plesk/nodejs/`
168
+ 2. SSH and run `npm start` manually to see real-time errors
169
+ 3. Verify Node.js and npm versions
170
+ 4. Ensure all dependencies installed: `npm install`
@@ -0,0 +1,58 @@
1
+ # Workflow Best Practices
2
+
3
+ ## Correct Release Workflow Order
4
+
5
+ To avoid needing `--force` flag for releases, follow this exact order:
6
+
7
+ 1. **Start Task**: `mcp0_start_task`
8
+ 2. **Fix/Implement**: Make your code changes
9
+ 3. **Mark Fixed**: `mcp0_mark_bug_fixed`
10
+ 4. **Tests**: `mcp0_create_tests` + `mcp0_run_tests` (or `mcp0_skip_tests` with reason)
11
+ 5. **Documentation**: `mcp0_create_documentation`
12
+ 6. **Ready Check**: `mcp0_check_ready_to_commit`
13
+ 7. **Commit & Push**: `mcp0_commit_and_push`
14
+ 8. **Release**: `mcp0_perform_release` ⚠️ **MUST come BEFORE complete_task**
15
+ 9. **Complete**: `mcp0_complete_task`
16
+
17
+ ## Common Mistakes
18
+
19
+ ### ❌ Wrong Order (causes forced releases)
20
+ ```
21
+ check_ready → commit → complete → release // WRONG!
22
+ ```
23
+
24
+ ### ✅ Correct Order
25
+ ```
26
+ check_ready → commit → release → complete // CORRECT!
27
+ ```
28
+
29
+ ## Why This Matters
30
+
31
+ - `complete_task` **resets the workflow state**
32
+ - `perform_release` **checks the workflow state** before running
33
+ - If you complete before releasing, the state is cleared and release guards fail
34
+ - Using `--force` bypasses guards but doesn't fix the root cause
35
+
36
+ ## State Transitions
37
+
38
+ 1. After `commit_and_push`: `currentPhase = "release"`
39
+ 2. After `perform_release`: `currentPhase = "ready_to_complete"`, `released = true`
40
+ 3. After `complete_task`: State is reset to idle
41
+
42
+ ## Solution
43
+
44
+ Always call `perform_release` BEFORE `complete_task`. Never use `--force` unless absolutely necessary.
45
+
46
+ ## Documentation Phase Expectations
47
+
48
+ During the documentation step (`mcp0_create_documentation`), make sure the core project docs are created or updated as needed:
49
+
50
+ 1. `docs/product/PRD.md` – Product Requirements Document
51
+ 2. `README.md` – Project overview and usage
52
+ 3. `docs/release-notes/RELEASE_NOTES.md` – Release notes for changes in this task/version
53
+
54
+ If one or more of these files already exist, **update them** instead of creating new variants. Use the `documentationType` argument to reflect what you touched:
55
+
56
+ - `"PRD"` when you added/updated the PRD
57
+ - `"README"` when you updated the main README
58
+ - `"RELEASE_NOTES"` when you updated the release notes
@@ -35,6 +35,7 @@ Developers need structured guidance to maintain disciplined workflows across pro
35
35
  - Offer aggregated project summaries (JSON artifacts, SQLite sync, optional web dashboard).
36
36
  - Guard release commands to ensure prerequisites are satisfied.
37
37
  - Support `run_full_workflow` for scripted execution of all steps with validation.
38
+ - Web dashboard displays version dynamically from `package.json` via `/api/version` endpoint to stay in sync after releases.
38
39
 
39
40
  ## 8. Technical Considerations
40
41
  - Node.js (ESM) codebase leveraging `@modelcontextprotocol/sdk`.
@@ -4,6 +4,65 @@ Authoritative history of user-visible changes for the Development Workflow MCP S
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 1.4.4 — 2025-11-27 — ♻️ Refactors
8
+ - consolidate workflow state to root .state folder only (3d69a14)
9
+ - ensure release guard uses freshest workflow state (e07eb42)
10
+ - remove invalid turbopack experimental config from next.config.ts (af0a7ea)
11
+ - **web:** configure next.js root to silence warnings (22ed002)
12
+ - **web:** improve mobile layout for hero section (53b26bf)
13
+ - add Plesk deployment guide (de35675)
14
+ - add 1.4.3 release notes (8b165f7)
15
+ - fix release state detection (ed5dfd1)
16
+ - prepare for release (a6ea2d0)
17
+ - **release:** 1.4.2 (fac8999)
18
+ - **release:** 1.4.2 🚀 (01b0b3c)
19
+ - **release:** 1.4.3 🚀 (04d8c3b)
20
+ - update task list (35663dd)
21
+ - **web:** fix next.js lockfile warning (05ffce0)
22
+ - add core doc types (PRD/README/RELEASE_NOTES) and fix CI build (8ed0567)
23
+ - update hero text and meta description to emphasize Indonesian programmer community (681547b)
24
+ - update program tracks and fix fast refresh warning (aa5bc9c)
25
+
26
+ ## 1.4.3 — 2025-11-27 — 🧹 Chores
27
+ - **release:** 1.4.2 (fac8999)
28
+ - remove invalid turbopack experimental config from next.config.ts (af0a7ea)
29
+ - add Plesk deployment guide (de35675)
30
+ - update program tracks and fix fast refresh warning (aa5bc9c)
31
+
32
+ ## 1.4.2 — 2025-11-27 — 🧹 Chores
33
+ - fix release state detection (ed5dfd1)
34
+ - prepare for release (a6ea2d0)
35
+ - update task list (35663dd)
36
+ - **web:** fix next.js lockfile warning (05ffce0)
37
+ - ensure release guard uses freshest workflow state (e07eb42)
38
+ - **web:** configure next.js root to silence warnings (22ed002)
39
+ - **web:** improve mobile layout for hero section (53b26bf)
40
+ - consolidate workflow state to root .state folder only (3d69a14)
41
+
42
+ ## 1.4.1 — 2025-11-27 — 🐛 Bug Fixes
43
+ - update build test to include postbuild (b1e2f48)
44
+ - add custom server.js for Plesk (b3912cd)
45
+ - migrate dashboard to Next.js with TypeScript and Tailwind CSS (bce1fec)
46
+ - fix package.json scripts (fb25e98)
47
+ - fix tsconfig and remove dist artifact (282759f)
48
+
49
+ ## 1.4.0 — 2025-11-26
50
+ - See CHANGELOG for details.
51
+
52
+ ## 1.3.11 — 2025-11-23
53
+ - Re-applied Plesk security fix (moved static files to `web/public/`).
54
+ - Updated build configuration and server paths.
55
+
56
+ ## 1.3.10 — 2025-11-23
57
+ - Fixed workflow state synchronization issue that caused forced releases.
58
+ - Added `docs/WORKFLOW-BEST-PRACTICES.md`.
59
+
60
+ ## 1.3.9 — 2025-11-23
61
+ - Improved documentation modal layout and readability.
62
+
63
+ ## 1.3.8 — 2025-11-23
64
+ - Fixed documentation loading in production by tracking `dist/docs` in git.
65
+
7
66
  ## 1.3.0 — 2025-11-22
8
67
  - Added comprehensive Antigravity integration documentation and examples.
9
68
  - Fixed Windows shell escaping for commit messages.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@programinglive/dev-workflow-mcp-server",
3
- "version": "1.4.0",
3
+ "version": "1.4.5",
4
4
  "description": "MCP server to enforce development workflow discipline",
5
5
  "homepage": "https://devworkflow.programinglive.com/",
6
6
  "type": "module",
@@ -9,10 +9,11 @@
9
9
  "dev-workflow-mcp": "index.js"
10
10
  },
11
11
  "scripts": {
12
- "build": "vite build",
13
- "build:web": "npx tailwindcss -i ./web/public/input.css -o ./web/public/output.css --minify",
14
- "watch:web": "npx tailwindcss -i ./web/public/input.css -o ./web/public/output.css --watch",
15
- "postbuild": "npm run build:web && node scripts/build-docs.js",
12
+ "build": "npm run build:server && npm run build:web",
13
+ "build:server": "vite build",
14
+ "build:web": "npm run build --prefix web",
15
+ "watch:web": "npm run dev --prefix web",
16
+ "postbuild": "node scripts/build-docs.js",
16
17
  "dev": "node --watch index.js",
17
18
  "start": "node index.js",
18
19
  "local": "node index.js",
@@ -24,7 +25,7 @@
24
25
  "release:major": "node release-wrapper.js major",
25
26
  "release:minor": "node release-wrapper.js minor",
26
27
  "release:patch": "node release-wrapper.js patch",
27
- "web": "node web/server.js"
28
+ "web": "npm start --prefix web"
28
29
  },
29
30
  "keywords": [
30
31
  "mcp",
@@ -3,9 +3,71 @@
3
3
  import { spawn } from 'node:child_process';
4
4
  import fs from 'node:fs/promises';
5
5
  import path from 'node:path';
6
+ import { resolveStateFile } from './workflow-state.js';
6
7
 
7
8
  const RELEASE_TYPES = new Set(['major', 'minor', 'patch']);
8
9
 
10
+ async function readStateCandidate(filePath) {
11
+ if (!filePath) {
12
+ return null;
13
+ }
14
+
15
+ try {
16
+ const [raw, stats] = await Promise.all([fs.readFile(filePath, 'utf8'), fs.stat(filePath)]);
17
+ return {
18
+ state: JSON.parse(raw),
19
+ path: filePath,
20
+ mtimeMs: stats.mtimeMs,
21
+ };
22
+ } catch {
23
+ return null;
24
+ }
25
+ }
26
+
27
+ async function loadWorkflowStateCandidates(projectRoot) {
28
+ const candidates = [];
29
+
30
+ try {
31
+ candidates.push(resolveStateFile());
32
+ } catch {
33
+ // resolver may throw before state exists; fall through to other candidates
34
+ }
35
+
36
+ const legacyStatePath = path.join(projectRoot, '.state', 'workflow-state.json');
37
+ candidates.push(legacyStatePath);
38
+
39
+ // Add explicit DEV_WORKFLOW_STATE_FILE if provided (resolver would have used it, but keep explicit just in case)
40
+ if (process.env.DEV_WORKFLOW_STATE_FILE) {
41
+ candidates.push(path.resolve(process.env.DEV_WORKFLOW_STATE_FILE));
42
+ }
43
+
44
+ const seen = new Set();
45
+ let freshest = null;
46
+
47
+ for (const candidate of candidates) {
48
+ if (!candidate) {
49
+ continue;
50
+ }
51
+
52
+ const resolved = path.resolve(candidate);
53
+ if (seen.has(resolved)) {
54
+ continue;
55
+ }
56
+ seen.add(resolved);
57
+
58
+ const result = await readStateCandidate(resolved);
59
+ if (!result) {
60
+ continue;
61
+ }
62
+
63
+ if (!freshest || result.mtimeMs > freshest.mtimeMs) {
64
+ freshest = result;
65
+ }
66
+ }
67
+
68
+ return freshest;
69
+ }
70
+
9
71
  async function main() {
10
72
  const releaseTypeArg = (process.argv[2] || '').toLowerCase();
11
73
  const forceFlag = process.argv.includes('--force') || process.env.DEV_WORKFLOW_FORCE_RELEASE === '1';
@@ -26,44 +88,17 @@ async function main() {
26
88
  }
27
89
  const projectRoot = projectRootCandidate;
28
90
 
29
- // Prefer state under INIT_CWD to support per-project runs and tests.
30
- // If DEV_WORKFLOW_USER_ID is set and a user-scoped file exists, use it; otherwise fall back to legacy path.
31
- const baseStateDir = path.join(projectRoot, '.state');
32
- const legacyStatePath = path.join(baseStateDir, 'workflow-state.json');
33
- let resolvedUserId = (process.env.DEV_WORKFLOW_USER_ID || '').trim();
34
- if (!resolvedUserId) {
35
- try {
36
- const fileUserId = (await fs.readFile(path.join(baseStateDir, 'user-id'), 'utf8')).trim();
37
- if (fileUserId) {
38
- resolvedUserId = fileUserId;
39
- }
40
- } catch {
41
- // no user-id file; legacy layout likely
42
- }
43
- }
44
- const userStatePath = resolvedUserId ? path.join(baseStateDir, 'users', resolvedUserId, 'workflow-state.json') : null;
45
-
46
- let statePath = legacyStatePath;
47
- if (userStatePath) {
48
- try {
49
- await fs.access(userStatePath);
50
- statePath = userStatePath;
51
- } catch {
52
- // fall back to legacy path
53
- }
54
- }
55
- let state;
56
-
57
- try {
58
- const raw = await fs.readFile(statePath, 'utf8');
59
- state = JSON.parse(raw);
60
- } catch (error) {
91
+ const result = await loadWorkflowStateCandidates(projectRoot);
92
+ if (!result) {
61
93
  console.error(
62
- `❌ Release guard: cannot locate workflow state at ${statePath}. Make sure the dev-workflow MCP is installed and you have started a task.`
94
+ `❌ Release guard: cannot locate workflow state under ${path.join(projectRoot, '.state')}.
95
+ Make sure the dev-workflow MCP is installed and you have started a task.`
63
96
  );
64
97
  process.exit(1);
65
98
  }
66
99
 
100
+ const { state, path: statePath } = result;
101
+
67
102
  const errors = [];
68
103
  if (state.currentPhase !== 'release') {
69
104
  errors.push(