@programinglive/dev-workflow-mcp-server 1.8.0 β 1.9.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/.env.example +21 -1
- package/AGENTS.md +25 -0
- package/README.md +257 -664
- package/index.js +5 -4
- package/package.json +11 -6
- package/scripts/bootstrap-unix.sh +55 -0
- package/scripts/bootstrap-windows.ps1 +75 -0
- package/scripts/install-husky.js +43 -0
- package/scripts/setup-stack.js +436 -0
- package/tools/definitions.js +19 -0
- package/tools/handler-modules/commit-handlers.js +2 -1
- package/tools/handler-modules/index.js +13 -7
- package/tools/handler-modules/shared.js +7 -41
- package/tools/handler-modules/status-handlers.js +3 -1
- package/tools/handler-modules/workflow-handlers.js +26 -8
- package/workflow-state.js +10 -0
- package/.agent/workflows/dev-workflow-bugfix.md +0 -250
- package/.agent/workflows/dev-workflow-feature.md +0 -201
- package/.agent/workflows/dev-workflow-full-cycle.md +0 -400
- package/.agent/workflows/dev-workflow-refactor.md +0 -238
- package/.env.production +0 -16
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -34
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -25
- package/.github/pull_request_template.md +0 -22
- package/.github/workflows/github-release.yml +0 -131
- package/.husky/commit-msg +0 -3
- package/.husky/pre-commit +0 -2
- package/CHANGELOG.md +0 -1137
- package/docs/GCP_DEPLOYMENT.md +0 -298
- package/docs/NETLIFY_DEPLOYMENT.md +0 -125
- package/docs/PLESK_DEPLOYMENT.md +0 -170
- package/docs/PRD.md +0 -83
- package/docs/WORKFLOW-BEST-PRACTICES.md +0 -58
- package/docs/antigravity/EXAMPLES.md +0 -535
- package/docs/antigravity/GETTING-STARTED.md +0 -292
- package/docs/antigravity/TROUBLESHOOTING.md +0 -742
- package/docs/antigravity/WALKTHROUGH.md +0 -25
- package/docs/antigravity/WORKFLOW-TEMPLATES.md +0 -670
- package/docs/release-notes/RELEASE_NOTES.md +0 -516
- package/docs/web-dashboard.md +0 -175
- package/tailwind.config.js +0 -8
- package/tests/build.test.js +0 -74
- package/tests/db-adapters.test.js +0 -108
- package/tests/env-support.test.js +0 -46
- package/tests/exec.test.js +0 -35
- package/tests/handlers-commit.test.js +0 -174
- package/tests/handlers-release.test.js +0 -212
- package/tests/handlers-workflow.test.js +0 -68
- package/tests/handlers.test.js +0 -1142
- package/tests/hello-world.test.js +0 -13
- package/tests/mcpRegistry.test.js +0 -65
- package/tests/patch-release.test.js +0 -7
- package/tests/release-wrapper.test.js +0 -107
- package/tests/startup-resilience.test.js +0 -73
- package/tests/test-helpers.js +0 -50
- package/tests/workflowState.test.js +0 -520
- package/web/Dockerfile.api +0 -25
- package/web/README.md +0 -133
- package/web/__tests__/api/workflow-history.test.js +0 -63
- package/web/api-server.js +0 -211
- package/web/app/docs/page.tsx +0 -202
- package/web/app/favicon.ico +0 -0
- package/web/app/globals.css +0 -91
- package/web/app/history/page.tsx +0 -220
- package/web/app/layout.tsx +0 -39
- package/web/app/login/page.tsx +0 -142
- package/web/app/page.tsx +0 -13
- package/web/components/ApiReference.tsx +0 -20
- package/web/components/Features.tsx +0 -61
- package/web/components/Footer.tsx +0 -9
- package/web/components/Hero.tsx +0 -96
- package/web/components/History.tsx +0 -175
- package/web/components/Navbar.tsx +0 -208
- package/web/components/Terminal.tsx +0 -114
- package/web/components/ThemeProvider.tsx +0 -58
- package/web/eslint.config.mjs +0 -18
- package/web/lib/api-client.ts +0 -123
- package/web/lib/auth.js +0 -75
- package/web/lib/db.js +0 -131
- package/web/lib/docs.js +0 -73
- package/web/middleware/auth.js +0 -26
- package/web/netlify.toml +0 -8
- package/web/next.config.ts +0 -19
- package/web/package-lock.json +0 -10911
- package/web/package.json +0 -42
- package/web/postcss.config.mjs +0 -9
- package/web/public/assets/android-chrome-192x192.png +0 -0
- package/web/public/assets/android-chrome-512x512.png +0 -0
- package/web/public/assets/apple-touch-icon.png +0 -0
- package/web/public/assets/favicon-16x16.png +0 -0
- package/web/public/assets/favicon-32x32.png +0 -0
- package/web/public/assets/favicon.ico +0 -0
- package/web/public/assets/favicon.png +0 -0
- package/web/public/assets/logo.png +0 -0
- package/web/public/assets/og-preview.png +0 -0
- package/web/public/assets/site.webmanifest +0 -1
- package/web/public/file.svg +0 -1
- package/web/public/globe.svg +0 -1
- package/web/public/next.svg +0 -1
- package/web/public/vercel.svg +0 -1
- package/web/public/window.svg +0 -1
- package/web/scripts/db-query-history.js +0 -120
- package/web/scripts/smoke-test.js +0 -30
- package/web/server.js +0 -184
- package/web/tailwind.config.ts +0 -20
- package/web/tsconfig.json +0 -42
package/README.md
CHANGED
|
@@ -1,43 +1,26 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
This MCP server guides you through a disciplined development workflow:
|
|
19
|
-
|
|
20
|
-
1. **Start Conscious** - Be clear about what you're coding
|
|
21
|
-
2. **Fix/Implement** - Write your code
|
|
22
|
-
3. **Create Tests** - Always test your changes
|
|
23
|
-
4. **Run Tests** - Tests must pass (GREEN)
|
|
24
|
-
5. **Document** - Update documentation
|
|
25
|
-
6. **Commit & Push** - Let the server stage, commit, **and push** your changes once verification passes (if you make new edits afterward, the workflow moves back to this step automatically)
|
|
26
|
-
7. **Release** - After the push succeeds, record the release details before closing out the task
|
|
27
|
-
|
|
28
|
-
## π Installation
|
|
29
|
-
|
|
30
|
-
### Option 1: Install as Dependency in Your Project (Recommended)
|
|
31
|
-
|
|
32
|
-
Each project gets its own isolated workflow state file.
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npm install @programinglive/dev-workflow-mcp-server
|
|
1
|
+
# Dev Workflow MCP Server
|
|
2
|
+
|
|
3
|
+
MCP server yang memaksa kamu mengikuti disiplin development workflow: **test β dokumentasi β commit β release**, tanpa bisa dilewatkan.
|
|
4
|
+
|
|
5
|
+
```mermaid
|
|
6
|
+
graph LR
|
|
7
|
+
A[start_task] --> B[Implement]
|
|
8
|
+
B --> C[mark_bug_fixed]
|
|
9
|
+
C --> D[create_tests]
|
|
10
|
+
D --> E[run_tests]
|
|
11
|
+
E -- FAIL --> B
|
|
12
|
+
E -- PASS --> F[create_documentation]
|
|
13
|
+
F --> G[check_ready_to_commit]
|
|
14
|
+
G --> H[commit_and_push]
|
|
15
|
+
H --> I[perform_release / skip_release]
|
|
16
|
+
I --> J[complete_task]
|
|
36
17
|
```
|
|
37
18
|
|
|
38
|
-
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Quick Start β 3 Menit
|
|
39
22
|
|
|
40
|
-
###
|
|
23
|
+
### 1. Clone & Install
|
|
41
24
|
|
|
42
25
|
```bash
|
|
43
26
|
git clone https://github.com/programinglive/dev-workflow-mcp-server.git
|
|
@@ -45,790 +28,400 @@ cd dev-workflow-mcp-server
|
|
|
45
28
|
npm install
|
|
46
29
|
```
|
|
47
30
|
|
|
48
|
-
> **Windows
|
|
31
|
+
> **Windows**: `better-sqlite3` butuh native build. Install [Python 3](https://python.org) + [Visual Studio Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) dulu sebelum `npm install`.
|
|
49
32
|
|
|
50
|
-
###
|
|
33
|
+
### 2. Test Server Berjalan
|
|
51
34
|
|
|
52
|
-
|
|
35
|
+
```bash
|
|
36
|
+
node index.js call get_workflow_status
|
|
37
|
+
```
|
|
53
38
|
|
|
54
|
-
|
|
55
|
-
2. **Upload the project** β Either clone the repository or upload an archive into the directory you will run it from (e.g., `httpdocs/dev-workflow-mcp-server`). From SSH you can run:
|
|
56
|
-
```bash
|
|
57
|
-
cd httpdocs
|
|
58
|
-
git clone https://github.com/programinglive/dev-workflow-mcp-server.git
|
|
59
|
-
cd dev-workflow-mcp-server
|
|
60
|
-
```
|
|
61
|
-
3. **Install dependencies** β In Pleskβs **Node.js** panel use βNPM installβ (or run `npm install --production` over SSH). Linux hosts already ship the Python/build toolchain required for `better-sqlite3`; if your plan uses a Windows host, install Python 3 and the Visual Studio Build Tools beforehand or ask your provider to enable them.
|
|
62
|
-
4. **Define environment variables** β In the Node.js panel add any environment variables you need (for example `DEV_WORKFLOW_USER_ID` or `DEV_WORKFLOW_STATE_FILE`). This keeps state files outside the web root if desired.
|
|
63
|
-
5. **Configure the application** β Set **Application startup file** to `index.js` and **Application mode** to `production`. Plesk will run the server with `node index.js`.
|
|
64
|
-
6. **Start/Restart the app** β Click βRestart Appβ so Plesk launches the MCP server with the new configuration. When you update the code, rerun βNPM installβ and restart.
|
|
39
|
+
Output:
|
|
65
40
|
|
|
66
|
-
|
|
41
|
+
```
|
|
42
|
+
π Current Workflow Status:
|
|
43
|
+
Phase: idle
|
|
44
|
+
Task: (none)
|
|
45
|
+
Next step: idle
|
|
46
|
+
```
|
|
67
47
|
|
|
68
|
-
|
|
48
|
+
### 3. Hubungkan ke MCP Client
|
|
69
49
|
|
|
70
|
-
|
|
50
|
+
Lihat bagian [Konfigurasi MCP Client](#-konfigurasi-mcp-client) di bawah.
|
|
71
51
|
|
|
72
|
-
|
|
52
|
+
---
|
|
73
53
|
|
|
74
|
-
|
|
75
|
-
1. SSH into your GCP instance
|
|
76
|
-
2. Run the setup script: `bash scripts/setup-gcp-instance.sh`
|
|
77
|
-
3. Clone the repository and configure `.env`
|
|
78
|
-
4. Start containers: `docker-compose up -d`
|
|
79
|
-
5. Update your local MCP client config to connect via SSH
|
|
54
|
+
## π οΈ Available Tools
|
|
80
55
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
56
|
+
| Tool | Fungsi |
|
|
57
|
+
|---|---|
|
|
58
|
+
| `start_task` | Mulai task baru (wajib pertama) |
|
|
59
|
+
| `create_feature_flow` | Catat alur fitur dengan Mermaid |
|
|
60
|
+
| `mark_bug_fixed` | Tandai implementasi selesai |
|
|
61
|
+
| `create_tests` | Tandai tests sudah dibuat |
|
|
62
|
+
| `skip_tests` | Lewati tests dengan alasan |
|
|
63
|
+
| `run_tests` | Catat hasil test (blokir commit jika fail) |
|
|
64
|
+
| `create_documentation` | Tandai docs sudah dibuat |
|
|
65
|
+
| `check_ready_to_commit` | Verifikasi semua step selesai |
|
|
66
|
+
| `commit_and_push` | `git add` β `commit` β `push` otomatis |
|
|
67
|
+
| `perform_release` | Catat release version |
|
|
68
|
+
| `skip_release` | Lewati release (docs-only task) |
|
|
69
|
+
| `complete_task` | Selesai & reset workflow |
|
|
70
|
+
| `get_workflow_status` | Cek fase saat ini |
|
|
71
|
+
| `view_history` | Lihat riwayat task selesai |
|
|
72
|
+
| `run_full_workflow` | Jalankan semua step sekaligus (1 command) |
|
|
73
|
+
| `project_summary` | Ringkasan aktivitas project |
|
|
74
|
+
|
|
75
|
+
### Contoh Percakapan
|
|
86
76
|
|
|
87
|
-
|
|
77
|
+
```
|
|
78
|
+
"Start a new task: add user authentication, type: feature"
|
|
79
|
+
β start_task called, phase moves to coding
|
|
88
80
|
|
|
81
|
+
[kamu ngoding]
|
|
89
82
|
|
|
90
|
-
|
|
83
|
+
"Mark as fixed: login with JWT token"
|
|
84
|
+
β mark_bug_fixed, phase moves to testing
|
|
91
85
|
|
|
92
|
-
|
|
93
|
-
- **Production (built)**: Run `npm run build` once to generate `dist/`. This creates an optimized bundle but isnβt needed for MCP usage.
|
|
86
|
+
[tulis test]
|
|
94
87
|
|
|
95
|
-
|
|
88
|
+
"Create tests done"
|
|
89
|
+
β create_tests
|
|
96
90
|
|
|
97
|
-
|
|
91
|
+
"Run tests: passed=true, command='npm test', details='12 tests passed'"
|
|
92
|
+
β run_tests, phase moves to documentation
|
|
98
93
|
|
|
99
|
-
|
|
94
|
+
"Create docs: type=README, summary='Added auth section'"
|
|
95
|
+
β create_documentation, phase moves to ready_to_commit
|
|
100
96
|
|
|
101
|
-
|
|
97
|
+
"Check if ready to commit"
|
|
98
|
+
β check_ready_to_commit β β
READY
|
|
102
99
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"mcpServers": {
|
|
106
|
-
"dev-workflow": {
|
|
107
|
-
"command": "node",
|
|
108
|
-
"cwd": "<PROJECT_ROOT>",
|
|
109
|
-
"args": ["index.js"],
|
|
110
|
-
"env": {
|
|
111
|
-
"DEV_WORKFLOW_DB_TYPE": "postgres",
|
|
112
|
-
"DEV_WORKFLOW_DB_URL": "postgres://USER:PASS@HOST:5432/devworkflow"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
- **Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
120
|
-
|
|
121
|
-
```json
|
|
122
|
-
{
|
|
123
|
-
"mcpServers": {
|
|
124
|
-
"dev-workflow": {
|
|
125
|
-
"command": "node",
|
|
126
|
-
"args": ["<PROJECT_ROOT>/index.js"]
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
#### Windows
|
|
133
|
-
|
|
134
|
-
- **Windsurf** (`%APPDATA%\Windsurf\config.json`):
|
|
135
|
-
|
|
136
|
-
```json
|
|
137
|
-
{
|
|
138
|
-
"mcpServers": {
|
|
139
|
-
"dev-workflow": {
|
|
140
|
-
"command": "node",
|
|
141
|
-
"args": ["<PROJECT_ROOT>\\index.js"]
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
```
|
|
100
|
+
"Commit and push: message='feat(auth): add JWT authentication'"
|
|
101
|
+
β commit_and_push (auto git add/commit/push), phase moves to release
|
|
146
102
|
|
|
147
|
-
|
|
103
|
+
"Perform release: command='npm run release:minor'"
|
|
104
|
+
β perform_release, phase moves to ready_to_complete
|
|
148
105
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"mcpServers": {
|
|
152
|
-
"dev-workflow": {
|
|
153
|
-
"command": "node",
|
|
154
|
-
"args": ["<PROJECT_ROOT>\\index.js"]
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
106
|
+
"Complete task: commitMessage='feat(auth): add JWT authentication'"
|
|
107
|
+
β complete_task, workflow reset to idle
|
|
158
108
|
```
|
|
159
109
|
|
|
160
|
-
|
|
110
|
+
---
|
|
161
111
|
|
|
162
|
-
|
|
112
|
+
## βοΈ Konfigurasi MCP Client
|
|
163
113
|
|
|
164
|
-
|
|
165
|
-
{
|
|
166
|
-
"mcpServers": {
|
|
167
|
-
"dev-workflow": {
|
|
168
|
-
"command": "node",
|
|
169
|
-
"args": ["<PROJECT_ROOT>/index.js"]
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
```
|
|
114
|
+
### OpenCode
|
|
174
115
|
|
|
175
|
-
|
|
116
|
+
Tambahkan ke `~/.config/opencode/opencode.json`:
|
|
176
117
|
|
|
177
118
|
```json
|
|
178
119
|
{
|
|
179
|
-
"
|
|
120
|
+
"mcp": {
|
|
180
121
|
"dev-workflow": {
|
|
181
|
-
"
|
|
182
|
-
"
|
|
122
|
+
"type": "local",
|
|
123
|
+
"command": ["node", "C:\\path\\to\\dev-workflow-mcp-server\\index.js"],
|
|
124
|
+
"enabled": true
|
|
183
125
|
}
|
|
184
126
|
}
|
|
185
127
|
}
|
|
186
128
|
```
|
|
187
129
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
#### Full Windsurf MCP Config Example (macOS)
|
|
130
|
+
### Claude Desktop
|
|
191
131
|
|
|
192
|
-
|
|
132
|
+
File: `%APPDATA%\Claude\claude_desktop_config.json` (Windows) atau `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
|
|
193
133
|
|
|
194
134
|
```json
|
|
195
135
|
{
|
|
196
136
|
"mcpServers": {
|
|
197
137
|
"dev-workflow": {
|
|
198
138
|
"command": "node",
|
|
199
|
-
"
|
|
200
|
-
"args": ["index.js"],
|
|
201
|
-
"env": {
|
|
202
|
-
"DEV_WORKFLOW_DB_TYPE": "postgres",
|
|
203
|
-
"DEV_WORKFLOW_DB_URL": "postgres://devworkflow:devworkflow_secure_password@34.50.121.142:5432/devworkflow"
|
|
204
|
-
}
|
|
139
|
+
"args": ["C:\\path\\to\\dev-workflow-mcp-server\\index.js"]
|
|
205
140
|
}
|
|
206
141
|
}
|
|
207
142
|
}
|
|
208
143
|
```
|
|
209
144
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
### 4. Restart Windsurf/Claude Desktop
|
|
213
|
-
|
|
214
|
-
After adding the configuration, restart the application to load the MCP server.
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
### 5. Configure in Antigravity
|
|
145
|
+
### Windsurf
|
|
218
146
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
**Windows:** `%APPDATA%\Antigravity\mcp_config.json` or `C:\Users\<USERNAME>\.gemini\antigravity\mcp_config.json`
|
|
147
|
+
File: `%APPDATA%\Windsurf\config.json` (Windows) atau `~/Library/Application Support/Windsurf/config.json` (macOS)
|
|
222
148
|
|
|
223
149
|
```json
|
|
224
150
|
{
|
|
225
151
|
"mcpServers": {
|
|
226
152
|
"dev-workflow": {
|
|
227
153
|
"command": "node",
|
|
228
|
-
"
|
|
154
|
+
"cwd": "C:\\path\\to\\dev-workflow-mcp-server",
|
|
155
|
+
"args": ["index.js"]
|
|
229
156
|
}
|
|
230
157
|
}
|
|
231
158
|
}
|
|
232
159
|
```
|
|
233
160
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
### β‘ Performance Optimization (Recommended)
|
|
237
|
-
|
|
238
|
-
To ensure the fastest possible startup (critical for IDE-integrated clients like Claude Desktop), we recommend pointing directly to `index.js` using `node` rather than `npx`. This avoids the overhead of checking for package updates.
|
|
161
|
+
### Antigravity
|
|
239
162
|
|
|
240
|
-
|
|
163
|
+
File: `%APPDATA%\Antigravity\mcp_config.json`
|
|
241
164
|
|
|
242
165
|
```json
|
|
243
166
|
{
|
|
244
167
|
"mcpServers": {
|
|
245
168
|
"dev-workflow": {
|
|
246
169
|
"command": "node",
|
|
247
|
-
"args": ["
|
|
248
|
-
"env": {
|
|
249
|
-
"DEV_WORKFLOW_USER_ID": "your_user_id"
|
|
250
|
-
}
|
|
170
|
+
"args": ["C:\\path\\to\\dev-workflow-mcp-server\\index.js"]
|
|
251
171
|
}
|
|
252
172
|
}
|
|
253
173
|
}
|
|
254
174
|
```
|
|
255
175
|
|
|
256
|
-
|
|
257
|
-
`Dev Workflow MCP Server running on stdio (startup took 15ms)`
|
|
258
|
-
|
|
259
|
-
## βοΈ Configuration
|
|
260
|
-
|
|
261
|
-
### Database Setup
|
|
262
|
-
|
|
263
|
-
The server supports **SQLite** (default), **MySQL**, and **PostgreSQL**.
|
|
176
|
+
> **Performance tip**: Gunakan `node index.js` langsung, jangan `npx`, agar startup lebih cepat.
|
|
264
177
|
|
|
265
|
-
|
|
266
|
-
1. Copy `.env.example` to `.env`:
|
|
267
|
-
```bash
|
|
268
|
-
cp .env.example .env
|
|
269
|
-
```
|
|
270
|
-
2. Edit `.env` with your settings:
|
|
271
|
-
```ini
|
|
272
|
-
DEV_WORKFLOW_DB_TYPE=mysql
|
|
273
|
-
DEV_WORKFLOW_DB_URL=mysql://user:pass@localhost:3306/db
|
|
274
|
-
```
|
|
178
|
+
---
|
|
275
179
|
|
|
276
|
-
|
|
277
|
-
Alternatively, export variables directly:.
|
|
180
|
+
## π§ Configuration
|
|
278
181
|
|
|
279
|
-
|
|
280
|
-
|----------|-------------|---------|
|
|
281
|
-
| `DEV_WORKFLOW_DB_TYPE` | Database driver (`sqlite`, `mysql`, `postgres`) | `sqlite` |
|
|
282
|
-
| `DEV_WORKFLOW_DB_URL` | Connection string for MySQL/Postgres | `null` |
|
|
283
|
-
| `DEV_WORKFLOW_DB_PATH` | Override path for the SQLite database file | `<project>/.state/dev-workflow.db` |
|
|
182
|
+
### Database
|
|
284
183
|
|
|
285
|
-
|
|
184
|
+
Default pakai **SQLite** (file-based, zero config). Bisa ganti ke PostgreSQL/MySQL:
|
|
286
185
|
|
|
287
|
-
**MySQL:**
|
|
288
186
|
```bash
|
|
289
|
-
|
|
290
|
-
|
|
187
|
+
# .env atau environment variable
|
|
188
|
+
DEV_WORKFLOW_DB_TYPE=postgres
|
|
189
|
+
DEV_WORKFLOW_DB_URL=postgresql://user:pass@localhost:5432/devworkflow
|
|
291
190
|
```
|
|
292
191
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
To ensure compatibility with existing reporting dashboards, the `PostgresAdapter` and `MysqlAdapter` automatically normalize column names:
|
|
301
|
-
- `task_description` β DB column: `description`
|
|
302
|
-
- `timestamp` β DB column: `completed_at`
|
|
303
|
-
|
|
304
|
-
The adapters use aliases in queries so the MCP tools still receive the expected `task_description` and `timestamp` fields.
|
|
305
|
-
|
|
306
|
-
#### π€ User ID Handling (Postgres/MySQL)
|
|
307
|
-
These databases use an `INTEGER` column for `user_id`.
|
|
308
|
-
- **Numeric strings** (e.g., `"1"`) are parsed directly into integers.
|
|
309
|
-
- **Non-numeric strings** (e.g., `"programinglive"`) are automatically hashed into a consistent, positive integer to ensure compatibility with the schema while maintaining unique user isolation.
|
|
310
|
-
|
|
192
|
+
| Var | Default | Deskripsi |
|
|
193
|
+
|---|---|---|
|
|
194
|
+
| `DEV_WORKFLOW_DB_TYPE` | `sqlite` | `sqlite`, `mysql`, atau `postgres` |
|
|
195
|
+
| `DEV_WORKFLOW_DB_URL` | β | Connection string (untuk MySQL/Postgres) |
|
|
196
|
+
| `DEV_WORKFLOW_DB_PATH` | `.state/dev-workflow.db` | Path SQLite (opsional) |
|
|
197
|
+
| `DEV_WORKFLOW_USER_ID` | auto-generated | ID user untuk isolasi multi-user |
|
|
198
|
+
| `DEV_WORKFLOW_STATE_FILE` | auto-resolve | Path override workflow-state.json |
|
|
311
199
|
|
|
312
|
-
###
|
|
200
|
+
### Project-Specific State
|
|
313
201
|
|
|
314
|
-
|
|
315
|
-
|----------|-------------|
|
|
316
|
-
| `DEV_WORKFLOW_USER_ID` | Override the auto-generated user ID (e.g., set to your name/email) |
|
|
317
|
-
| `DEV_WORKFLOW_STATE_FILE` | Override the location of the `workflow-state.json` file |
|
|
202
|
+
Setiap project punya workflow state sendiri di `.state/users/<user-id>/workflow-state.json`. File ini otomatis di-gitignore.
|
|
318
203
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
If you use multiple AI coding tools simultaneously (e.g., Antigravity and Windsurf) on the same project, they will share the same workflow state by default.
|
|
322
|
-
|
|
323
|
-
To maintain **separate, distinct sessions** for each tool, configure a unique `DEV_WORKFLOW_USER_ID` for each.
|
|
324
|
-
|
|
325
|
-
**Antigravity Config (`mcp_config.json`):**
|
|
326
|
-
```json
|
|
327
|
-
{
|
|
328
|
-
"mcpServers": {
|
|
329
|
-
"dev-workflow": {
|
|
330
|
-
"command": "node",
|
|
331
|
-
"args": ["path/to/server/index.js"],
|
|
332
|
-
"env": {
|
|
333
|
-
"DEV_WORKFLOW_USER_ID": "antigravity_user"
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
```
|
|
204
|
+
Untuk isolasi multi-client (misal Windsurf + Antigravity pakai state terpisah):
|
|
339
205
|
|
|
340
|
-
**Windsurf Config:**
|
|
341
|
-
Add the environment variable in your Windsurf MCP settings:
|
|
342
206
|
```json
|
|
343
207
|
{
|
|
344
208
|
"mcpServers": {
|
|
345
209
|
"dev-workflow": {
|
|
346
210
|
"command": "node",
|
|
347
|
-
"args": ["path/to/
|
|
348
|
-
"env": {
|
|
349
|
-
"DEV_WORKFLOW_USER_ID": "windsurf_user"
|
|
350
|
-
}
|
|
211
|
+
"args": ["path/to/index.js"],
|
|
212
|
+
"env": { "DEV_WORKFLOW_USER_ID": "windsurf" }
|
|
351
213
|
}
|
|
352
214
|
}
|
|
353
215
|
}
|
|
354
216
|
```
|
|
355
217
|
|
|
218
|
+
---
|
|
356
219
|
|
|
220
|
+
## π§° One-Command Stack Setup (OpenCode V2)
|
|
357
221
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
222
|
+
`scripts/setup-stack.js` installs the whole AI agent stack: the dev-workflow MCP
|
|
223
|
+
server, [obra/superpowers](https://github.com/obra/superpowers) skills, and
|
|
224
|
+
[RTK](https://github.com/rtk-ai/rtk) token compression.
|
|
361
225
|
|
|
362
226
|
```bash
|
|
363
|
-
|
|
227
|
+
node scripts/setup-stack.js # any platform
|
|
364
228
|
```
|
|
365
229
|
|
|
366
|
-
|
|
367
|
-
- Unit tests for workflow logic
|
|
368
|
-
- Integration tests for `.env` configuration
|
|
369
|
-
- DB Adapter tests (SQLite always; MySQL/Postgres if configured)
|
|
230
|
+
Platform wrappers (they only install RTK, run `npm install`, then delegate):
|
|
370
231
|
|
|
371
|
-
|
|
372
|
-
|
|
232
|
+
```powershell
|
|
233
|
+
pwsh scripts/bootstrap-windows.ps1
|
|
234
|
+
```
|
|
373
235
|
|
|
374
236
|
```bash
|
|
375
|
-
|
|
376
|
-
export DEV_WORKFLOW_DB_URL="mysql://root:pass@localhost:3306/test_db"
|
|
377
|
-
node --test tests/db-adapters.test.js
|
|
378
|
-
|
|
379
|
-
# Test PostgreSQL
|
|
380
|
-
export DEV_WORKFLOW_DB_URL="postgres://postgres:pass@localhost:5432/test_db"
|
|
381
|
-
node --test tests/db-adapters.test.js
|
|
237
|
+
bash scripts/bootstrap-unix.sh
|
|
382
238
|
```
|
|
383
239
|
|
|
384
|
-
###
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
240
|
+
### What it does
|
|
241
|
+
|
|
242
|
+
1. **Finds the real config directory.** Runs `opencode debug paths` and uses the
|
|
243
|
+
reported `config` path. OpenCode V2 resolves this to `~/.config/opencode` on
|
|
244
|
+
**every** platform, including Windows - `%APPDATA%\opencode` is not read.
|
|
245
|
+
2. **Backs up `opencode.json`** to `secrets/opencode-backup-<timestamp>.json`
|
|
246
|
+
before touching it.
|
|
247
|
+
3. **Registers Superpowers** under the V2 `plugins` key (the V1 `plugin` key is
|
|
248
|
+
deprecated and ignored by V2).
|
|
249
|
+
4. **Registers the MCP server** under `mcp.servers` via `opencode mcp add`, which
|
|
250
|
+
writes a schema-valid `Mcp.LocalConfigEncoded` entry.
|
|
251
|
+
5. **Installs dependencies.** Without `npm install` the server dies at startup
|
|
252
|
+
with `ERR_MODULE_NOT_FOUND: Cannot find package 'dotenv'`.
|
|
253
|
+
6. **Smoke tests the server**, then verifies with `opencode mcp list` and
|
|
254
|
+
`opencode plugin list`. Exits non-zero when any check fails, so a broken
|
|
255
|
+
install can no longer report success.
|
|
256
|
+
7. **Creates `AGENTS.md`** in the current project if missing.
|
|
257
|
+
|
|
258
|
+
### Tests
|
|
394
259
|
|
|
395
260
|
```bash
|
|
396
|
-
npm
|
|
397
|
-
|
|
261
|
+
npm test # full suite
|
|
262
|
+
node --test tests/setup-stack.test.js
|
|
398
263
|
```
|
|
399
264
|
|
|
400
|
-
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
-
|
|
404
|
-
|
|
405
|
-
- `GET /api/summary?user=<id>` β overall stats for the user.
|
|
406
|
-
- `GET /api/history?user=<id>&page=1&pageSize=20&startDate=YYYY-MM-DD&endDate=YYYY-MM-DD` β paginated task history.
|
|
407
|
-
- `GET /api/history-summary?user=<id>&frequency=daily|monthly|yearly` β aggregated counts over time.
|
|
408
|
-
|
|
409
|
-
Open `http://localhost:3111` in a browser to view the dashboard UI (`web/index.html`).
|
|
410
|
-
|
|
411
|
-
### Build Output
|
|
412
|
-
|
|
413
|
-
Running `npm run build` generates:
|
|
414
|
-
- `dist/index.mjs` - Optimized ES module bundle
|
|
415
|
-
- Source maps and other build artifacts
|
|
416
|
-
- `dist/docs/` - Pre-rendered HTML documentation generated from Markdown via `scripts/build-docs.js`
|
|
417
|
-
|
|
418
|
-
The build bundles all source files while externalizing Node.js built-in modules and dependencies, resulting in a single file distribution.
|
|
419
|
-
|
|
420
|
-
### Usage
|
|
265
|
+
`tests/test-helpers.js` exports `stripNpmNotices()`, which removes npm's own
|
|
266
|
+
`npm warn`/`npm notice` chatter and Rollup's third-party annotation warnings from
|
|
267
|
+
captured stderr before the build test asserts on it. Without it, a clean build
|
|
268
|
+
could look broken on machines with a user-level `.npmrc` or with dependency
|
|
269
|
+
versions that emit annotation warnings.
|
|
421
270
|
|
|
422
|
-
|
|
423
|
-
- npm package distribution
|
|
424
|
-
- Performance optimization
|
|
425
|
-
- Embedding in other projects
|
|
271
|
+
### CI
|
|
426
272
|
|
|
427
|
-
|
|
273
|
+
`.github/workflows/ci.yml` runs on the **self-hosted runner on MMCH**, not on
|
|
274
|
+
GitHub-hosted minutes:
|
|
428
275
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
- `package.json` declares `mcpName: "io.github.programinglive/dev-workflow-mcp-server"`.
|
|
432
|
-
- `server.json` describes the server and links it to the npm package `@programinglive/dev-workflow-mcp-server`.
|
|
433
|
-
|
|
434
|
-
To publish a new server version to the registry:
|
|
435
|
-
|
|
436
|
-
1. Release a new npm version (for example):
|
|
437
|
-
- `npm test`
|
|
438
|
-
- `npm run release:patch` (runs your existing release pipeline and publishes to npm)
|
|
439
|
-
2. Verify the new version exists on npm:
|
|
440
|
-
- `npm view @programinglive/dev-workflow-mcp-server version`
|
|
441
|
-
3. Install the MCP publisher CLI (once per machine):
|
|
442
|
-
- `brew install mcp-publisher` (or follow the docs at https://modelcontextprotocol.info/tools/registry/publishing/)
|
|
443
|
-
4. From this repo root, authenticate and publish:
|
|
444
|
-
- `mcp-publisher login github`
|
|
445
|
-
- `mcp-publisher publish`
|
|
446
|
-
5. Optionally verify in the registry:
|
|
447
|
-
- `curl "https://registry.modelcontextprotocol.io/v0/servers?search=io.github.programinglive/dev-workflow-mcp-server"`
|
|
448
|
-
|
|
449
|
-
#### PowerShell CLI tip
|
|
450
|
-
|
|
451
|
-
When invoking the lightweight CLI from PowerShell, use `--%` to prevent PowerShell from rewriting JSON arguments, for example:
|
|
452
|
-
|
|
453
|
-
```powershell
|
|
454
|
-
node --% index.js call start_task --args "{\"description\":\"Convert docs to HTML during build\",\"type\":\"feature\"}"
|
|
276
|
+
```yaml
|
|
277
|
+
runs-on: [self-hosted, windows, mmch]
|
|
455
278
|
```
|
|
456
279
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
## π Project-Specific Workflow State
|
|
460
|
-
|
|
461
|
-
When you install this package in a project, a `.state/workflow-state.json` file is automatically created in your project root. This file:
|
|
462
|
-
|
|
463
|
-
- **Stores workflow history** specific to that project
|
|
464
|
-
- **Tracks task progress** independently per project
|
|
465
|
-
- **Should be gitignored** (already in `.gitignore` by default)
|
|
466
|
-
- **Persists across sessions** so your workflow state is preserved
|
|
467
|
-
- **Stays centralized** even if you run the server from nested build outputs like `dist/`. The MCP server walks back to the project root (looking for `.git` or `package.json`) before reading or writing workflow state, so you never need duplicate copies under build directories.
|
|
468
|
-
|
|
469
|
-
Each project maintains its own isolated workflow history, so you can work on multiple projects without mixing their histories. Within that `.state` directory, the MCP server automatically creates a unique per-user subdirectory (e.g., `.state/users/user-abc123/`). The generated identifier persists locally so multiple developers sharing the same repository never clobber each otherβs workflow files. If you prefer a specific name, set `DEV_WORKFLOW_USER_ID` before launching the server and that value will be used instead of the auto-generated ID.
|
|
470
|
-
|
|
471
|
-
#### Choosing a User ID
|
|
280
|
+
Two jobs:
|
|
472
281
|
|
|
473
|
-
|
|
282
|
+
| Job | Steps |
|
|
283
|
+
|---|---|
|
|
284
|
+
| `test` | `npm ci` β `npm test` β `build:server` β `npm audit --omit=dev --audit-level=high` β setup-stack suite |
|
|
285
|
+
| `web` | `npm ci` in `web/` β static export build β verify `out/index.html` and CSS size β `npm audit --audit-level=high` |
|
|
474
286
|
|
|
475
|
-
|
|
476
|
-
|
|
287
|
+
The `web` job exists because the dashboard is deployed to Netlify from `web/`
|
|
288
|
+
and previously had no CI coverage at all. The CSS size check catches a Tailwind
|
|
289
|
+
regression that a green build would otherwise hide.
|
|
477
290
|
|
|
478
|
-
|
|
479
|
-
# macOS/Linux
|
|
480
|
-
export DEV_WORKFLOW_USER_ID=alice
|
|
481
|
-
node index.js
|
|
291
|
+
A pull request cannot merge green if either job fails.
|
|
482
292
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
node index.js
|
|
486
|
-
```
|
|
293
|
+
Runner provisioning and troubleshooting are documented in
|
|
294
|
+
[docs/homelab/ci-runner.md](./docs/homelab/ci-runner.md).
|
|
487
295
|
|
|
488
|
-
|
|
489
|
-
3. **Multiple users on one host** β Run separate processes (or MCP clients) with different `DEV_WORKFLOW_USER_ID` values. Each userβs workflow state remains isolated.
|
|
296
|
+
### Dependency hygiene
|
|
490
297
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
If you're using this package, add this to your project's `.gitignore`:
|
|
496
|
-
|
|
497
|
-
```
|
|
498
|
-
.state/
|
|
298
|
+
```bash
|
|
299
|
+
npm audit # full tree (production + dev)
|
|
300
|
+
npm audit --omit=dev # production only
|
|
499
301
|
```
|
|
500
302
|
|
|
501
|
-
|
|
303
|
+
Both report `0 vulnerabilities`. `tar` is pinned via `overrides` in
|
|
304
|
+
`package.json`; bump that pin when a new advisory lands rather than relying on
|
|
305
|
+
the transitive range.
|
|
502
306
|
|
|
503
|
-
|
|
307
|
+
The root `tailwindcss` devDependency was removed: it was added when the web
|
|
308
|
+
dashboard still shipped a static HTML page, but that build step no longer
|
|
309
|
+
exists. The dashboard under `web/` has its own Tailwind setup
|
|
310
|
+
(`web/tailwind.config.ts`). The root `tailwind.config.js` pointed `content` at
|
|
311
|
+
`web/public/**/*.{html,js}`, a directory that holds only SVG icons, so it
|
|
312
|
+
generated nothing and was referenced by no script.
|
|
504
313
|
|
|
505
|
-
|
|
314
|
+
---
|
|
506
315
|
|
|
507
|
-
|
|
508
|
-
- `mark_bug_fixed` - Mark the feature/bug as fixed (requires tests next)
|
|
509
|
-
- `create_tests` - Mark that tests have been created
|
|
510
|
-
- `skip_tests` - Skip tests with justification
|
|
511
|
-
- `run_tests` - Record test results (must pass to proceed)
|
|
512
|
-
- `create_documentation` - Mark documentation as created
|
|
513
|
-
- `check_ready_to_commit` - Verify all steps are complete
|
|
514
|
-
- `commit_and_push` - Commit and push changes
|
|
515
|
-
- `perform_release` - Record release details (or use `skip_release` when the project has no release automation)
|
|
516
|
-
- `complete_task` - Mark task as complete and reset
|
|
517
|
-
- `force_complete_task` - Force completion with reason
|
|
518
|
-
- `drop_task` - Abandon current task
|
|
519
|
-
- `get_workflow_status` - Show current status
|
|
520
|
-
- `view_history` - View completed tasks
|
|
521
|
-
- `continue_workflow` - Get next-step guidance
|
|
522
|
-
- `rerun_workflow` - Reset and restart the current task from the beginning
|
|
523
|
-
- `run_full_workflow` - Execute every workflow step in sequence with a single command (requires supplying the details for each phase)
|
|
524
|
-
|
|
525
|
-
### `run_full_workflow`
|
|
526
|
-
|
|
527
|
-
Use this when you already have all the information needed for each workflow phase and want to execute them in one go.
|
|
316
|
+
## Release Workflow
|
|
528
317
|
|
|
529
|
-
|
|
530
|
-
{
|
|
531
|
-
"summary": "Add payment webhooks",
|
|
532
|
-
"testCommand": "npm test",
|
|
533
|
-
"documentationType": "README",
|
|
534
|
-
"documentationSummary": "Document webhook configuration",
|
|
535
|
-
"commitMessage": "feat: add payment webhooks",
|
|
536
|
-
"releaseCommand": "npm run release:minor",
|
|
537
|
-
"releaseNotes": "Release webhook support",
|
|
538
|
-
"branch": "feature/payments",
|
|
539
|
-
"testsPassed": true,
|
|
540
|
-
"testDetails": "node --test; 42 tests",
|
|
541
|
-
"releaseType": "minor",
|
|
542
|
-
"preset": "minor"
|
|
543
|
-
}
|
|
544
|
-
```
|
|
318
|
+
`.github/workflows/github-release.yml` runs on a `v*` tag and is split in two:
|
|
545
319
|
|
|
546
|
-
|
|
320
|
+
| Job | Runner | What it does |
|
|
321
|
+
|---|---|---|
|
|
322
|
+
| `build` | self-hosted MMCH | `npm ci` -> `npm test` -> `build:server` -> verify the built bundle starts -> `npm pack` -> upload tarball + metadata |
|
|
323
|
+
| `publish` | `ubuntu-latest` | download tarball -> `npm publish --provenance` -> create/update the GitHub release |
|
|
547
324
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
6. `commit_and_push` with `commitMessage` and optional `branch`
|
|
555
|
-
7. `perform_release` with `releaseCommand`, plus optional `releaseNotes`, `releaseType`, and `preset`
|
|
556
|
-
- Alternatively call `skip_release` with a justification when the repository has no Node-based release step (e.g., Python-only or docs-only tasks)
|
|
557
|
-
8. `complete_task` reusing `commitMessage`
|
|
325
|
+
**Why publish is not on MMCH:** npm provenance requires a supported cloud CI/CD
|
|
326
|
+
provider with a **cloud-hosted** runner
|
|
327
|
+
([docs](https://docs.npmjs.com/generating-provenance-statements)). A self-hosted
|
|
328
|
+
runner cannot produce an attestation, so `--provenance` would have to be dropped
|
|
329
|
+
and consumers would lose the ability to verify which commit the package was
|
|
330
|
+
built from.
|
|
558
331
|
|
|
559
|
-
|
|
332
|
+
The split keeps the expensive part - install, test, build, pack - on our own
|
|
333
|
+
hardware, and spends hosted minutes only on a single publish step that runs when
|
|
334
|
+
a release tag is pushed. Pull requests never touch the hosted runner.
|
|
560
335
|
|
|
561
|
-
|
|
336
|
+
Publishing authenticates through **npm Trusted Publishing (OIDC)** - no
|
|
337
|
+
`NPM_TOKEN` secret is required, and `id-token: write` plus `registry-url` on
|
|
338
|
+
`setup-node` is the whole configuration.
|
|
562
339
|
|
|
563
|
-
|
|
340
|
+
### What goes into the package
|
|
564
341
|
|
|
565
|
-
|
|
342
|
+
`.npmignore` keeps the published tarball to the runtime server: roughly 60 files
|
|
343
|
+
and 65 kB. It excludes `.env*` (only `.env.example` ships), `.state/`, tests,
|
|
344
|
+
CI config, `web/`, and docs. Without it npm falls back to `.gitignore`, which
|
|
345
|
+
still allows tracked files such as `.env.production` into the tarball.
|
|
566
346
|
|
|
567
|
-
|
|
347
|
+
`scripts/install-husky.js` runs from `prepare`. It installs git hooks only when
|
|
348
|
+
a `.git` directory is present, so installing the package from the registry as a
|
|
349
|
+
dependency does not fail on husky. The `husky || true` idiom is not portable to
|
|
350
|
+
Windows, where npm runs scripts through `cmd.exe`.
|
|
568
351
|
|
|
569
|
-
|
|
570
|
-
- `check_ready_to_commit` and `commit_and_push` have been completed
|
|
571
|
-
- A release has not already been recorded for the active task
|
|
352
|
+
---
|
|
572
353
|
|
|
573
|
-
|
|
354
|
+
## π Homelab Development Guide
|
|
574
355
|
|
|
575
|
-
|
|
576
|
-
2. The guard runs automatically, verifies the workflow state, and records the release before letting you finish with `complete_task`.
|
|
356
|
+
Repo ini juga berisi panduan konfigurasi homelab internal **programinglive** β Tailscale + SSH antar 3 mesin (MMCH, HELLOWORLD, Mac).
|
|
577
357
|
|
|
578
|
-
|
|
358
|
+
| Dokumen | Isi |
|
|
359
|
+
|---|---|
|
|
360
|
+
| [docs/homelab/README.md](./docs/homelab/README.md) | Overview & quick reference |
|
|
361
|
+
| [docs/homelab/infra-tailnet-ssh.md](./docs/homelab/infra-tailnet-ssh.md) | Tailnet + SSH setup lengkap |
|
|
362
|
+
| [docs/homelab/cli-tools.md](./docs/homelab/cli-tools.md) | CLI tools per machine |
|
|
363
|
+
| [docs/homelab/ci-runner.md](./docs/homelab/ci-runner.md) | Self-hosted CI runner di MMCH |
|
|
364
|
+
| [docs/homelab/security-rules.md](./docs/homelab/security-rules.md) | Aturan keamanan |
|
|
365
|
+
| [.agent/workflows/homelab-setup.md](./.agent/workflows/homelab-setup.md) | Workflow MCP untuk onboarding mesin baru |
|
|
579
366
|
|
|
580
|
-
|
|
367
|
+
> β οΈ Repo ini **private**. Jangan bagikan ke publik.
|
|
581
368
|
|
|
582
|
-
|
|
583
|
-
2. In the repository settings, add a secret named **`NPM_TOKEN`** containing that token.
|
|
584
|
-
3. Ensure your release process pushes tags after running `npm run release:<type>` so the workflow triggers.
|
|
585
|
-
4. Confirm `npm run build` succeeds locally; the workflow runs the build before publishing so broken bundles block the release.
|
|
586
|
-
5. GitHub provenance is enabled via `npm publish --provenance`. Leave GitHub Actions' default OIDC permissions enabled so the job can request an ID token.
|
|
587
|
-
6. Keep the `repository.url` field in `package.json` pointing at this GitHub repo. Provenance validation fails if it does not match the repository that built the package.
|
|
369
|
+
---
|
|
588
370
|
|
|
589
|
-
|
|
371
|
+
## π« What This Server Prevents
|
|
590
372
|
|
|
591
|
-
|
|
373
|
+
- β Commit tanpa tests
|
|
374
|
+
- β Commit dengan tests yang fail
|
|
375
|
+
- β Commit tanpa dokumentasi
|
|
376
|
+
- β Lupa langkah workflow
|
|
377
|
+
- β Release tanpa commit & push
|
|
592
378
|
|
|
593
|
-
|
|
379
|
+
---
|
|
594
380
|
|
|
595
|
-
|
|
596
|
-
- Strings are parsed as JSON and must resolve to an object (key/value pairs).
|
|
597
|
-
- Passing non-object data (numbers, arrays, plain text) triggers a guidance error.
|
|
598
|
-
- Missing or malformed arguments safely default to empty input so the tool can respond with actionable reminders.
|
|
381
|
+
## π‘ Tips
|
|
599
382
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
}
|
|
606
|
-
```
|
|
383
|
+
1. Selalu mulai dengan `start_task` β ini yang set intention kamu
|
|
384
|
+
2. Jangan skip tests kecuali darurat β pakai `skip_tests` dengan alasan jelas
|
|
385
|
+
3. Pakai `get_workflow_status` kapanpun untuk cek progress
|
|
386
|
+
4. `run_full_workflow` = shortcut untuk task sederhana yang semua datanya sudah siap
|
|
387
|
+
5. Untuk docs-only task, gunakan `skip_release` daripada memaksakan release
|
|
607
388
|
|
|
608
|
-
|
|
609
|
-
Start a new coding task. This is your first step - be conscious about what you're coding.
|
|
389
|
+
---
|
|
610
390
|
|
|
611
|
-
|
|
612
|
-
- `description` (string, required): Clear description of what you're going to code
|
|
613
|
-
- `type` (enum, required): Type of task - "feature", "bugfix", "refactor", or "other"
|
|
391
|
+
## π§ͺ Run Tests
|
|
614
392
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
Use the start_task tool with:
|
|
618
|
-
- description: "Add user authentication to the login page"
|
|
619
|
-
- type: "feature"
|
|
393
|
+
```bash
|
|
394
|
+
npm test
|
|
620
395
|
```
|
|
621
396
|
|
|
622
|
-
### `mark_bug_fixed`
|
|
623
|
-
Mark that the bug/feature is fixed. **Reminder: Now you MUST create tests!**
|
|
624
|
-
|
|
625
|
-
**Parameters:**
|
|
626
|
-
- `summary` (string, required): Brief summary of what was fixed/implemented
|
|
627
|
-
|
|
628
|
-
### `create_tests`
|
|
629
|
-
Confirm that you've created the necessary tests covering your change. Required before recording test results.
|
|
630
|
-
|
|
631
|
-
**Parameters:** _none_
|
|
632
|
-
|
|
633
|
-
### `skip_tests`
|
|
634
|
-
Record an explicit justification when automated tests aren't feasible. Marks testing as satisfied so you can proceed with documentation and verification, while flagging the task for manual QA.
|
|
635
|
-
|
|
636
|
-
**Parameters:**
|
|
637
|
-
- `reason` (string, required): Why automated tests were skipped
|
|
638
|
-
|
|
639
|
-
### `run_tests`
|
|
640
|
-
Record test results. **NEVER commit if tests fail!** Only proceed if all tests are green.
|
|
641
|
-
|
|
642
|
-
**Parameters:**
|
|
643
|
-
- `passed` (boolean, required): Did all tests pass?
|
|
644
|
-
- `testCommand` (string, required): The test command that was run
|
|
645
|
-
- `details` (string, optional): Test results details
|
|
646
|
-
|
|
647
|
-
**Example:**
|
|
648
397
|
```
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
398
|
+
βΉ tests 112
|
|
399
|
+
βΉ pass 110
|
|
400
|
+
βΉ fail 0
|
|
401
|
+
βΉ skipped 2
|
|
653
402
|
```
|
|
654
403
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
**Parameters:**
|
|
659
|
-
- `documentationType` (enum, required): "PRD", "README", "RELEASE_NOTES", "inline-comments", "API-docs", "changelog", or "other"
|
|
660
|
-
- `summary` (string, required): What was documented
|
|
661
|
-
|
|
662
|
-
### `check_ready_to_commit`
|
|
663
|
-
Check if all workflow steps are completed and you're ready to commit & push.
|
|
664
|
-
|
|
665
|
-
### `commit_and_push`
|
|
666
|
-
Automatically run `git add`, `git commit`, and `git push` after the ready check passes.
|
|
667
|
-
|
|
668
|
-
**Auto-detection of primary branch:** If no `branch` is specified, the tool automatically detects your project's primary branch by checking for `origin/main` first, then falling back to `origin/master`. This eliminates the need to specify the branch parameter for most projects.
|
|
669
|
-
|
|
670
|
-
**Parameters:**
|
|
671
|
-
- `commitMessage` (string, required): Conventional commit message to use
|
|
672
|
-
- `branch` (string, optional): Target branch to push. If omitted, auto-detects primary branch (main or master)
|
|
673
|
-
|
|
674
|
-
### `perform_release`
|
|
675
|
-
Record the release after you've committed and pushed. Required before you can complete the task.
|
|
676
|
-
|
|
677
|
-
**Parameters:**
|
|
678
|
-
- `command` (string, required): Release command that was executed (e.g., `npm run release`)
|
|
679
|
-
- `notes` (string, optional): Additional release notes
|
|
680
|
-
|
|
681
|
-
### `complete_task`
|
|
682
|
-
Mark the task as complete after successful commit & push. Resets workflow for next task.
|
|
683
|
-
|
|
684
|
-
**Parameters:**
|
|
685
|
-
- `commitMessage` (string, required): The commit message used
|
|
686
|
-
|
|
687
|
-
### `drop_task`
|
|
688
|
-
Abandon the current task without completing the workflow. Preserves an audit entry with context, then resets the state so you can start fresh.
|
|
689
|
-
|
|
690
|
-
**Parameters:**
|
|
691
|
-
- `reason` (string, optional): Additional detail about why the task was dropped
|
|
692
|
-
|
|
693
|
-
### `get_workflow_status`
|
|
694
|
-
Get current workflow status and what needs to be done next.
|
|
695
|
-
|
|
696
|
-
### `view_history`
|
|
697
|
-
View workflow history of completed tasks.
|
|
698
|
-
|
|
699
|
-
**Parameters:**
|
|
700
|
-
- `limit` (number, optional): Number of recent tasks to show (default: 10)
|
|
701
|
-
|
|
702
|
-
## π Available Prompts
|
|
703
|
-
|
|
704
|
-
### `workflow_reminder`
|
|
705
|
-
Get a complete reminder of the development workflow discipline.
|
|
706
|
-
|
|
707
|
-
### `pre_commit_checklist`
|
|
708
|
-
Get a pre-commit checklist to ensure nothing is missed before committing.
|
|
709
|
-
|
|
710
|
-
## π Typical Workflow
|
|
711
|
-
|
|
712
|
-
Here's how you'd use this MCP server in a typical coding session:
|
|
713
|
-
|
|
714
|
-
1. **Start your task:**
|
|
715
|
-
```
|
|
716
|
-
Ask Cascade to use start_task:
|
|
717
|
-
"Start a new task: implementing user profile page, type: feature"
|
|
718
|
-
```
|
|
719
|
-
|
|
720
|
-
2. **Code your feature/fix**
|
|
721
|
-
- Write your code as usual
|
|
404
|
+
The two skipped tests are the MySQL and PostgreSQL adapters, which need a real
|
|
405
|
+
database connection (`MYSQL_URL` / `PG_URL`). Everything else, including the
|
|
406
|
+
SQLite adapter, runs.
|
|
722
407
|
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
```
|
|
408
|
+
If a Windows install fails on a native module, it is almost always a missing
|
|
409
|
+
prebuild for your Node ABI rather than a broken test - see
|
|
410
|
+
[docs/homelab/ci-runner.md](./docs/homelab/ci-runner.md#troubleshooting).
|
|
727
411
|
|
|
728
|
-
|
|
729
|
-
- Write your tests
|
|
730
|
-
- The server will remind you this is mandatory!
|
|
412
|
+
---
|
|
731
413
|
|
|
732
|
-
|
|
733
|
-
```
|
|
734
|
-
"Record test results: passed=true, command='npm test'"
|
|
735
|
-
```
|
|
736
|
-
- If tests fail, the server will **block** you from proceeding!
|
|
414
|
+
## π¦ Build
|
|
737
415
|
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
8. **Check readiness:**
|
|
744
|
-
```
|
|
745
|
-
"Check if I'm ready to commit"
|
|
746
|
-
```
|
|
747
|
-
|
|
748
|
-
9. **Commit & Push:**
|
|
749
|
-
```
|
|
750
|
-
"Commit and push: commitMessage='feat: add user profile page with tests and docs'"
|
|
751
|
-
```
|
|
752
|
-
|
|
753
|
-
10. **Record release:**
|
|
754
|
-
```
|
|
755
|
-
"Record release: command='npm run release', notes='v1.2.3'"
|
|
756
|
-
```
|
|
757
|
-
|
|
758
|
-
11. **Complete:**
|
|
759
|
-
```
|
|
760
|
-
"Complete the task with commit message: 'feat: add user profile page'"
|
|
761
|
-
```
|
|
762
|
-
|
|
763
|
-
12. **Drop task (optional):**
|
|
764
|
-
```
|
|
765
|
-
"Drop task: reason='Switching to a different feature'"
|
|
766
|
-
```
|
|
767
|
-
|
|
768
|
-
## π― Key Features
|
|
769
|
-
|
|
770
|
-
- **Enforces discipline**: Won't let you skip steps
|
|
771
|
-
- **Test-driven**: Blocks commits if tests fail
|
|
772
|
-
- **Documentation reminder**: Ensures you document your work
|
|
773
|
-
- **State tracking**: Remembers where you are in the workflow
|
|
774
|
-
- **History**: Keeps track of completed tasks
|
|
775
|
-
- **Prompts**: Quick reminders of best practices
|
|
776
|
-
|
|
777
|
-
## π« What This Server Prevents
|
|
778
|
-
|
|
779
|
-
- β Committing without tests
|
|
780
|
-
- β Committing with failing tests
|
|
781
|
-
- β Committing without documentation
|
|
782
|
-
- β Losing track of what you're working on
|
|
783
|
-
- β Skipping important workflow steps
|
|
784
|
-
|
|
785
|
-
## π‘ Tips
|
|
786
|
-
|
|
787
|
-
1. **Always start with `start_task`** - This sets your intention
|
|
788
|
-
2. **Never skip tests without justification** - Use `skip_tests` only when absolutely necessary and document the reason for manual QA
|
|
789
|
-
3. **Use `get_workflow_status`** - Check where you are anytime
|
|
790
|
-
4. **Review history** - Learn from your past tasks
|
|
791
|
-
5. **Follow the prompts** - They contain best practices
|
|
792
|
-
|
|
793
|
-
## π§ Customization
|
|
794
|
-
|
|
795
|
-
You can modify the workflow in `index.js`:
|
|
796
|
-
- Add more workflow phases
|
|
797
|
-
- Customize reminders
|
|
798
|
-
- Add integration with your test runner
|
|
799
|
-
- Add custom validation rules
|
|
800
|
-
|
|
801
|
-
## π State Management
|
|
802
|
-
|
|
803
|
-
The server maintains state in `.state/workflow-state.json`:
|
|
804
|
-
- Current phase
|
|
805
|
-
- Task description
|
|
806
|
-
- Completion status of each step
|
|
807
|
-
- History of completed tasks
|
|
808
|
-
|
|
809
|
-
This file is automatically created and managed by the server.
|
|
810
|
-
It contains local, machine-specific progress and is ignored by git so each environment can manage its own workflow history without cross-contamination.
|
|
416
|
+
```bash
|
|
417
|
+
npm run build # β dist/index.mjs (optimized bundle)
|
|
418
|
+
npm run web # β dashboard di http://localhost:3111
|
|
419
|
+
```
|
|
811
420
|
|
|
812
|
-
|
|
421
|
+
Build outputδΈ»θ¦η¨δΊ npm distribution. Untuk MCP usage, gunakan source `index.js` langsung (lebih cepat startup).
|
|
813
422
|
|
|
814
|
-
|
|
815
|
-
- β
Enforces test-first discipline
|
|
816
|
-
- β
Prevents commits with failing tests
|
|
817
|
-
- β
Reminds about documentation
|
|
818
|
-
- β
Tracks workflow state
|
|
819
|
-
- β
Maintains history
|
|
423
|
+
---
|
|
820
424
|
|
|
821
425
|
## π License
|
|
822
426
|
|
|
823
427
|
MIT
|
|
824
|
-
|
|
825
|
-
## π Contributing
|
|
826
|
-
|
|
827
|
-
Feel free to customize this server to match your specific workflow needs!
|
|
828
|
-
|
|
829
|
-
## π Project Governance
|
|
830
|
-
|
|
831
|
-
- [Code of Conduct](./CODE_OF_CONDUCT.md)
|
|
832
|
-
- [Contributing Guide](./CONTRIBUTING.md)
|
|
833
|
-
- [Security Policy](./SECURITY.md)
|
|
834
|
-
- [License](./LICENSE)
|