@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.
Files changed (106) hide show
  1. package/.env.example +21 -1
  2. package/AGENTS.md +25 -0
  3. package/README.md +257 -664
  4. package/index.js +5 -4
  5. package/package.json +11 -6
  6. package/scripts/bootstrap-unix.sh +55 -0
  7. package/scripts/bootstrap-windows.ps1 +75 -0
  8. package/scripts/install-husky.js +43 -0
  9. package/scripts/setup-stack.js +436 -0
  10. package/tools/definitions.js +19 -0
  11. package/tools/handler-modules/commit-handlers.js +2 -1
  12. package/tools/handler-modules/index.js +13 -7
  13. package/tools/handler-modules/shared.js +7 -41
  14. package/tools/handler-modules/status-handlers.js +3 -1
  15. package/tools/handler-modules/workflow-handlers.js +26 -8
  16. package/workflow-state.js +10 -0
  17. package/.agent/workflows/dev-workflow-bugfix.md +0 -250
  18. package/.agent/workflows/dev-workflow-feature.md +0 -201
  19. package/.agent/workflows/dev-workflow-full-cycle.md +0 -400
  20. package/.agent/workflows/dev-workflow-refactor.md +0 -238
  21. package/.env.production +0 -16
  22. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -34
  23. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -25
  24. package/.github/pull_request_template.md +0 -22
  25. package/.github/workflows/github-release.yml +0 -131
  26. package/.husky/commit-msg +0 -3
  27. package/.husky/pre-commit +0 -2
  28. package/CHANGELOG.md +0 -1137
  29. package/docs/GCP_DEPLOYMENT.md +0 -298
  30. package/docs/NETLIFY_DEPLOYMENT.md +0 -125
  31. package/docs/PLESK_DEPLOYMENT.md +0 -170
  32. package/docs/PRD.md +0 -83
  33. package/docs/WORKFLOW-BEST-PRACTICES.md +0 -58
  34. package/docs/antigravity/EXAMPLES.md +0 -535
  35. package/docs/antigravity/GETTING-STARTED.md +0 -292
  36. package/docs/antigravity/TROUBLESHOOTING.md +0 -742
  37. package/docs/antigravity/WALKTHROUGH.md +0 -25
  38. package/docs/antigravity/WORKFLOW-TEMPLATES.md +0 -670
  39. package/docs/release-notes/RELEASE_NOTES.md +0 -516
  40. package/docs/web-dashboard.md +0 -175
  41. package/tailwind.config.js +0 -8
  42. package/tests/build.test.js +0 -74
  43. package/tests/db-adapters.test.js +0 -108
  44. package/tests/env-support.test.js +0 -46
  45. package/tests/exec.test.js +0 -35
  46. package/tests/handlers-commit.test.js +0 -174
  47. package/tests/handlers-release.test.js +0 -212
  48. package/tests/handlers-workflow.test.js +0 -68
  49. package/tests/handlers.test.js +0 -1142
  50. package/tests/hello-world.test.js +0 -13
  51. package/tests/mcpRegistry.test.js +0 -65
  52. package/tests/patch-release.test.js +0 -7
  53. package/tests/release-wrapper.test.js +0 -107
  54. package/tests/startup-resilience.test.js +0 -73
  55. package/tests/test-helpers.js +0 -50
  56. package/tests/workflowState.test.js +0 -520
  57. package/web/Dockerfile.api +0 -25
  58. package/web/README.md +0 -133
  59. package/web/__tests__/api/workflow-history.test.js +0 -63
  60. package/web/api-server.js +0 -211
  61. package/web/app/docs/page.tsx +0 -202
  62. package/web/app/favicon.ico +0 -0
  63. package/web/app/globals.css +0 -91
  64. package/web/app/history/page.tsx +0 -220
  65. package/web/app/layout.tsx +0 -39
  66. package/web/app/login/page.tsx +0 -142
  67. package/web/app/page.tsx +0 -13
  68. package/web/components/ApiReference.tsx +0 -20
  69. package/web/components/Features.tsx +0 -61
  70. package/web/components/Footer.tsx +0 -9
  71. package/web/components/Hero.tsx +0 -96
  72. package/web/components/History.tsx +0 -175
  73. package/web/components/Navbar.tsx +0 -208
  74. package/web/components/Terminal.tsx +0 -114
  75. package/web/components/ThemeProvider.tsx +0 -58
  76. package/web/eslint.config.mjs +0 -18
  77. package/web/lib/api-client.ts +0 -123
  78. package/web/lib/auth.js +0 -75
  79. package/web/lib/db.js +0 -131
  80. package/web/lib/docs.js +0 -73
  81. package/web/middleware/auth.js +0 -26
  82. package/web/netlify.toml +0 -8
  83. package/web/next.config.ts +0 -19
  84. package/web/package-lock.json +0 -10911
  85. package/web/package.json +0 -42
  86. package/web/postcss.config.mjs +0 -9
  87. package/web/public/assets/android-chrome-192x192.png +0 -0
  88. package/web/public/assets/android-chrome-512x512.png +0 -0
  89. package/web/public/assets/apple-touch-icon.png +0 -0
  90. package/web/public/assets/favicon-16x16.png +0 -0
  91. package/web/public/assets/favicon-32x32.png +0 -0
  92. package/web/public/assets/favicon.ico +0 -0
  93. package/web/public/assets/favicon.png +0 -0
  94. package/web/public/assets/logo.png +0 -0
  95. package/web/public/assets/og-preview.png +0 -0
  96. package/web/public/assets/site.webmanifest +0 -1
  97. package/web/public/file.svg +0 -1
  98. package/web/public/globe.svg +0 -1
  99. package/web/public/next.svg +0 -1
  100. package/web/public/vercel.svg +0 -1
  101. package/web/public/window.svg +0 -1
  102. package/web/scripts/db-query-history.js +0 -120
  103. package/web/scripts/smoke-test.js +0 -30
  104. package/web/server.js +0 -184
  105. package/web/tailwind.config.ts +0 -20
  106. package/web/tsconfig.json +0 -42
package/README.md CHANGED
@@ -1,43 +1,26 @@
1
- # Development Workflow MCP Server
2
-
3
- <p align="left">
4
- <a href="https://www.npmjs.com/package/@programinglive/dev-workflow-mcp-server"><img src="https://img.shields.io/npm/v/@programinglive/dev-workflow-mcp-server.svg" alt="npm version"></a>
5
- <a href="https://www.npmjs.com/package/@programinglive/dev-workflow-mcp-server"><img src="https://img.shields.io/npm/dm/@programinglive/dev-workflow-mcp-server.svg" alt="npm downloads"></a>
6
- <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="license: MIT"></a>
7
- </p>
8
-
9
- An MCP (Model Context Protocol) server that helps enforce development discipline and workflow best practices. This server acts as your coding conscience, reminding you to follow proper development workflows.
10
-
11
- ### πŸ›‘οΈ Resilience Features
12
- - **Startup Resilience**: 5-second connection timeouts for external databases.
13
- - **Background Loading**: Non-critical assets (compatibility mirrors) initialize in the background to ensure sub-second startup.
14
- - **Diagnostic Mode**: Automatic startup timing logs displayed in stderr.
15
-
16
- ## 🎯 Purpose
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
- This will automatically create a `.state/workflow-state.json` file in the **project where you ran `npm install`** (using npm's `INIT_CWD`), keeping workflow history separate per project. If you're installing the package itself (inside `node_modules`), the script skips creation so it never pollutes the shared package directory.
19
+ ---
20
+
21
+ ## Quick Start β€” 3 Menit
39
22
 
40
- ### Option 2: Install from Source
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 prerequisites:** Installing dependencies from source compiles native modules such as `better-sqlite3`. Make sure Python 3 (added to PATH) and the Visual Studio Build Tools β€œDesktop development with C++” workload are installed before running `npm install`. Without them, npm will fail with a β€œneed python” or build error.
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
- ### Option 3: Install on Plesk Hosting
33
+ ### 2. Test Server Berjalan
51
34
 
52
- Plesk supports Node.js applications through its Node.js extension. To deploy the MCP server on a Plesk subscription:
35
+ ```bash
36
+ node index.js call get_workflow_status
37
+ ```
53
38
 
54
- 1. **Enable Node.js support** – Ensure the Plesk administrator has installed the Node.js extension and enabled SSH access for your subscription.
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
- > **Tip:** The MCP server communicates over stdio. If you only need it as a CLI tool, you can also run `npx @programinglive/dev-workflow-mcp-server` directly in an SSH session without keeping it running under the Node.js panel.
41
+ ```
42
+ πŸ“Š Current Workflow Status:
43
+ Phase: idle
44
+ Task: (none)
45
+ Next step: idle
46
+ ```
67
47
 
68
- > **Important:** MCP clients (Windsurf, Claude Desktop, etc.) must launch the server process locally via stdio. Hosting the dashboard on a public domain does **not** expose the MCP interface. Without SSH or another way to execute `node index.js` on the server, users cannot connect their MCP clients to the hosted instance.
48
+ ### 3. Hubungkan ke MCP Client
69
49
 
70
- ### Option 4: Deploy with Docker on Google Cloud
50
+ Lihat bagian [Konfigurasi MCP Client](#-konfigurasi-mcp-client) di bawah.
71
51
 
72
- Deploy the MCP server to Google Cloud Compute Engine using Docker and PostgreSQL for a production-ready, cloud-hosted setup.
52
+ ---
73
53
 
74
- **Quick Start:**
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
- **Benefits:**
82
- - βœ… PostgreSQL database for robust data persistence
83
- - βœ… Containerized deployment for consistency
84
- - βœ… Remote access via SSH tunneling
85
- - βœ… Easy updates and rollbacks
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
- See the [GCP Deployment Guide](./docs/GCP_DEPLOYMENT.md) for complete step-by-step instructions.
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
- #### Two Usage Modes
83
+ "Mark as fixed: login with JWT token"
84
+ β†’ mark_bug_fixed, phase moves to testing
91
85
 
92
- - **Local (source)**: Point your MCP client to `index.js`. This runs directly from source and requires no build step. Recommended for MCP usage.
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
- ### 3. Configure in Windsurf/Claude Desktop
88
+ "Create tests done"
89
+ β†’ create_tests
96
90
 
97
- Point your MCP client to the server entry point. Replace `<PROJECT_ROOT>` with the absolute path to this repository on your machine.
91
+ "Run tests: passed=true, command='npm test', details='12 tests passed'"
92
+ β†’ run_tests, phase moves to documentation
98
93
 
99
- #### macOS
94
+ "Create docs: type=README, summary='Added auth section'"
95
+ β†’ create_documentation, phase moves to ready_to_commit
100
96
 
101
- - **Windsurf** (`~/Library/Application Support/Windsurf/config.json`):
97
+ "Check if ready to commit"
98
+ β†’ check_ready_to_commit β†’ βœ… READY
102
99
 
103
- ```json
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
- - **Claude Desktop** (`%APPDATA%\Claude\claude_desktop_config.json`):
103
+ "Perform release: command='npm run release:minor'"
104
+ β†’ perform_release, phase moves to ready_to_complete
148
105
 
149
- ```json
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
- #### Linux
110
+ ---
161
111
 
162
- - **Windsurf** (`~/.config/windsurf/config.json`):
112
+ ## βš™οΈ Konfigurasi MCP Client
163
113
 
164
- ```json
165
- {
166
- "mcpServers": {
167
- "dev-workflow": {
168
- "command": "node",
169
- "args": ["<PROJECT_ROOT>/index.js"]
170
- }
171
- }
172
- }
173
- ```
114
+ ### OpenCode
174
115
 
175
- - **Claude Desktop** (`~/.config/claude/claude_desktop_config.json`):
116
+ Tambahkan ke `~/.config/opencode/opencode.json`:
176
117
 
177
118
  ```json
178
119
  {
179
- "mcpServers": {
120
+ "mcp": {
180
121
  "dev-workflow": {
181
- "command": "node",
182
- "args": ["<PROJECT_ROOT>/index.js"]
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
- > **Note:** On Windows paths in JSON require escaped backslashes (e.g., `"C:\\path\\to\\project"`).
189
-
190
- #### Full Windsurf MCP Config Example (macOS)
130
+ ### Claude Desktop
191
131
 
192
- If you keep this repository checked out at `/Users/alex/code/dev-workflow-mcp-server` and want to point Windsurf at a hosted PostgreSQL instance, drop the following into `~/Library/Application Support/Windsurf/mcp_config.json`:
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
- "cwd": "/Users/alex/code/dev-workflow-mcp-server",
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
- This mirrors the Windows configuration shared in previous releases, but avoids `npx` lookup issues on macOS by launching the local `index.js` directly.
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
- Antigravity users should configure the MCP server in their `mcp_config.json`.
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
- "args": ["<PROJECT_ROOT>\\index.js"]
154
+ "cwd": "C:\\path\\to\\dev-workflow-mcp-server",
155
+ "args": ["index.js"]
229
156
  }
230
157
  }
231
158
  }
232
159
  ```
233
160
 
234
- See [Antigravity Getting Started](./docs/antigravity/GETTING-STARTED.md) for detailed instructions and troubleshooting.
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
- **Optimized Configuration:**
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": ["<PROJECT_ROOT>\\index.js"],
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
- The server automatically times its own startup and logs it to stderr:
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
- #### Configuration via `.env`
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
- #### Configuration via Environment Variables
277
- Alternatively, export variables directly:.
180
+ ## πŸ”§ Configuration
278
181
 
279
- | Variable | Description | Default |
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
- #### Examples
184
+ Default pakai **SQLite** (file-based, zero config). Bisa ganti ke PostgreSQL/MySQL:
286
185
 
287
- **MySQL:**
288
186
  ```bash
289
- export DEV_WORKFLOW_DB_TYPE=mysql
290
- export DEV_WORKFLOW_DB_URL="mysql://user:password@localhost:3306/dev_workflow"
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
- **PostgreSQL:**
294
- ```bash
295
- export DEV_WORKFLOW_DB_TYPE=postgres
296
- export DEV_WORKFLOW_DB_URL="postgresql://user:password@localhost:5432/dev_workflow"
297
- ```
298
-
299
- #### πŸ› οΈ Database Schema Normalization (Postgres/MySQL)
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
- ### User & State Management
200
+ ### Project-Specific State
313
201
 
314
- | Variable | Description |
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
- ### Using Multiple Clients (Antigravity & Windsurf)
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/server/index.js"],
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
- ### βœ… Testing
359
-
360
- The project uses Node.js native test runner (`node --test`).
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
- npm test
227
+ node scripts/setup-stack.js # any platform
364
228
  ```
365
229
 
366
- This runs:
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
- #### Testing Database Adapters
372
- To verify MySQL or PostgreSQL adapters, run tests with the environment variable set:
232
+ ```powershell
233
+ pwsh scripts/bootstrap-windows.ps1
234
+ ```
373
235
 
374
236
  ```bash
375
- # Test MySQL
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
- ### Scripts
385
-
386
- - `npm run build` - Bundle the source into `dist/index.mjs` for distribution
387
- - `npm run dev` - Run in development mode with file watching
388
- - `npm run local` - Alias for running from source (same as `npm start`)
389
- - `npm run web` - Launch the lightweight workflow dashboard for browsing task history (see [Web Dashboard docs](./docs/web-dashboard.md))
390
-
391
- #### `npm run web`
392
-
393
- This command starts the dashboard defined in `web/server.js`, giving you a quick view of workflow history and summary statistics.
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 run web
397
- # 🌐 Dev Workflow Dashboard running at http://localhost:3111
261
+ npm test # full suite
262
+ node --test tests/setup-stack.test.js
398
263
  ```
399
264
 
400
- - **Default port:** 3111 (or the next free port if occupied).
401
- - **Environment overrides:** Honors `PORT` (common on hosts like Plesk/Render) or `DEV_WORKFLOW_WEB_PORT` before falling back to auto-selection.
402
- - **Query parameter:** `?user=<id>` lets you inspect another user’s history (defaults to `default`).
403
- - **API endpoints:**
404
- - `GET /api/version` β†’ current package version from `package.json` (used by dashboard to display version dynamically).
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
- For MCP server usage, point your client at `index.js` (source) to avoid stdio transport compatibility issues. The built `dist/index.mjs` is primarily for:
423
- - npm package distribution
424
- - Performance optimization
425
- - Embedding in other projects
271
+ ### CI
426
272
 
427
- ### MCP Tools Registry (Publishing)
273
+ `.github/workflows/ci.yml` runs on the **self-hosted runner on MMCH**, not on
274
+ GitHub-hosted minutes:
428
275
 
429
- This package is configured for the official MCP Tools Registry using **npm package deployment**:
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
- The `--%` prefix and escaped double quotes ensure the JSON reaches the MCP server unchanged.
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
- Use cases:
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
- 1. **Let the server choose** – Do nothing and the first time you run any MCP tool the server creates `.state/users/<random-id>/`. The dashboard `User ID` filter accepts that value (visible in the folder name or in workflow responses).
476
- 2. **Set an explicit ID** – Before starting the server, export `DEV_WORKFLOW_USER_ID`:
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
- ```bash
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
- # Windows PowerShell
484
- $env:DEV_WORKFLOW_USER_ID = "alice"
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
- Now all history for that session lands in `.state/users/alice/` and the dashboard can be filtered with `alice`.
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
- > **Tip:** The web dashboard simply reads existing records. Typing a new value into the `User ID` filter will only return results after a workflow session has written history into `.state/users/<that-id>/`.
492
-
493
- ### Adding to .gitignore
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
- This keeps workflow state local to each developer's machine.
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
- > **Need to override the location?** Set `DEV_WORKFLOW_STATE_FILE=/absolute/path/to/your/project/.state/workflow-state.json` before launching the server (or inside your MCP client config). The server will honor that path, letting you keep the package installed centrally while maintaining per-project workflow history.
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
- ## πŸ› οΈ Available Tools
314
+ ---
506
315
 
507
- - `start_task` - Begin a new coding task
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
- ```json
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
- The tool will:
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
- 1. `mark_bug_fixed` using `summary`
549
- 2. `create_tests`
550
- 3. `run_tests` with `testsPassed`, `testCommand`, and optional `testDetails`
551
- 4. `create_documentation` with `documentationType` and `documentationSummary`
552
- - **Requires**: `docs/product/PRD.md` must exist before documentation can be marked complete
553
- 5. `check_ready_to_commit`
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
- All arguments except the optional flags are required and must be non-empty strings.
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
- ### Documentation Requirements
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
- The `create_documentation` step enforces that a PRD (Product Requirements Document) exists at `docs/product/PRD.md` before documentation can be marked as complete. This ensures all projects maintain a current PRD that describes the product's goals, features, and requirements.
340
+ ### What goes into the package
564
341
 
565
- ## 🚫 Releasing Without the Workflow Steps
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
- The package ships with a release guard (`release-wrapper.js`) that backs the `npm run release:*` scripts. The guard refuses to run unless:
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
- - The current workflow phase is **release**
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
- If any requirements are missing, the guard exits with guidance to return to the MCP tools. This prevents accidentally bumping versions or tagging releases outside the managed workflow. To release correctly:
354
+ ## 🏠 Homelab Development Guide
574
355
 
575
- 1. Use `perform_release {"command":"patch"}` (or `minor`/`major`) via the MCP client, or `skip_release {"reason":"<explanation>"}` if no release applies.
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
- ### Automated npm Publishing
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
- This repository ships with `.github/workflows/npm-publish.yml`, which publishes the package to npm whenever a git tag matching `v*` is pushed (for example, `v1.1.14`). To enable the workflow:
367
+ > ⚠️ Repo ini **private**. Jangan bagikan ke publik.
581
368
 
582
- 1. Create an npm automation token with publish rights (`npm token create --read-only false`).
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
- The workflow verifies that the tag version matches `package.json` before publishing and fails fast if they diverge.
371
+ ## 🚫 What This Server Prevents
590
372
 
591
- ## πŸ› οΈ Available Tools
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
- ### Tool Argument Requirements
379
+ ---
594
380
 
595
- All tool invocations validate their `arguments` payload before running:
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
- Example (stringified JSON object):
601
- ```
602
- {
603
- "name": "start_task",
604
- "arguments": "{\"description\":\"Add reporting endpoint\",\"type\":\"feature\"}"
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
- ### `start_task`
609
- Start a new coding task. This is your first step - be conscious about what you're coding.
389
+ ---
610
390
 
611
- **Parameters:**
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
- **Example:**
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
- Use run_tests with:
650
- - passed: true
651
- - testCommand: "npm test"
652
- - details: "All 15 tests passed"
398
+ β„Ή tests 112
399
+ β„Ή pass 110
400
+ β„Ή fail 0
401
+ β„Ή skipped 2
653
402
  ```
654
403
 
655
- ### `create_documentation`
656
- Mark that documentation has been created/updated. This is required before committing.
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
- 3. **Mark as fixed:**
724
- ```
725
- "Mark the feature as fixed: User profile page with avatar and bio completed"
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
- 4. **Create tests:**
729
- - Write your tests
730
- - The server will remind you this is mandatory!
412
+ ---
731
413
 
732
- 5. **Run tests:**
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
- 7. **Document:**
739
- ```
740
- "Create documentation: type=README, summary='Added user profile section to docs'"
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
- ## 🀝 Integration with Your Rules
421
+ Build outputδΈ»θ¦η”¨δΊŽ npm distribution. Untuk MCP usage, gunakan source `index.js` langsung (lebih cepat startup).
813
422
 
814
- This MCP server aligns with your existing development rules:
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)