@programinglive/dev-workflow-mcp-server 1.8.1 β†’ 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 -672
  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 -1145
  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 -86
  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 -524
  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,51 +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
- ## πŸ†• What's New in v1.8.0
29
-
30
- - **Modular Handler Architecture** – `tools/handlers.js` now re-exports focused handler modules, improving maintainability and bundler behavior.
31
- - **Organized Test Suite** – The 1k-line `tests/handlers.test.js` has been split into `handlers-*.test.js` files with shared helpers, reducing duplication and clarifying intent.
32
- - **Shared Test Utilities** – New `tests/test-helpers.js` centralizes workflow state setup, request builders, and git mocks.
33
- - **Documentation Refresh** – PRD moved to `docs/PRD.md` root, status bumped to v1.8.0, and release notes updated to reflect the current workflow.
34
- - **Release Hygiene** – Recommended flow now includes `npm run release:<type>` followed by `git push --follow-tags origin main` to keep stages clean.
35
-
36
- ## πŸš€ Installation
37
-
38
- ### Option 1: Install as Dependency in Your Project (Recommended)
39
-
40
- Each project gets its own isolated workflow state file.
41
-
42
- ```bash
43
- 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]
44
17
  ```
45
18
 
46
- 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
+ ---
47
20
 
48
- ### Option 2: Install from Source
21
+ ## Quick Start β€” 3 Menit
22
+
23
+ ### 1. Clone & Install
49
24
 
50
25
  ```bash
51
26
  git clone https://github.com/programinglive/dev-workflow-mcp-server.git
@@ -53,790 +28,400 @@ cd dev-workflow-mcp-server
53
28
  npm install
54
29
  ```
55
30
 
56
- > **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`.
57
32
 
58
- ### Option 3: Install on Plesk Hosting
33
+ ### 2. Test Server Berjalan
59
34
 
60
- 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
+ ```
61
38
 
62
- 1. **Enable Node.js support** – Ensure the Plesk administrator has installed the Node.js extension and enabled SSH access for your subscription.
63
- 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:
64
- ```bash
65
- cd httpdocs
66
- git clone https://github.com/programinglive/dev-workflow-mcp-server.git
67
- cd dev-workflow-mcp-server
68
- ```
69
- 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.
70
- 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.
71
- 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`.
72
- 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:
73
40
 
74
- > **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
+ ```
75
47
 
76
- > **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
77
49
 
78
- ### Option 4: Deploy with Docker on Google Cloud
50
+ Lihat bagian [Konfigurasi MCP Client](#-konfigurasi-mcp-client) di bawah.
79
51
 
80
- Deploy the MCP server to Google Cloud Compute Engine using Docker and PostgreSQL for a production-ready, cloud-hosted setup.
52
+ ---
81
53
 
82
- **Quick Start:**
83
- 1. SSH into your GCP instance
84
- 2. Run the setup script: `bash scripts/setup-gcp-instance.sh`
85
- 3. Clone the repository and configure `.env`
86
- 4. Start containers: `docker-compose up -d`
87
- 5. Update your local MCP client config to connect via SSH
54
+ ## πŸ› οΈ Available Tools
88
55
 
89
- **Benefits:**
90
- - βœ… PostgreSQL database for robust data persistence
91
- - βœ… Containerized deployment for consistency
92
- - βœ… Remote access via SSH tunneling
93
- - βœ… 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
94
76
 
95
- 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
96
80
 
81
+ [kamu ngoding]
97
82
 
98
- #### Two Usage Modes
83
+ "Mark as fixed: login with JWT token"
84
+ β†’ mark_bug_fixed, phase moves to testing
99
85
 
100
- - **Local (source)**: Point your MCP client to `index.js`. This runs directly from source and requires no build step. Recommended for MCP usage.
101
- - **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]
102
87
 
103
- ### 3. Configure in Windsurf/Claude Desktop
88
+ "Create tests done"
89
+ β†’ create_tests
104
90
 
105
- 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
106
93
 
107
- #### macOS
94
+ "Create docs: type=README, summary='Added auth section'"
95
+ β†’ create_documentation, phase moves to ready_to_commit
108
96
 
109
- - **Windsurf** (`~/Library/Application Support/Windsurf/config.json`):
97
+ "Check if ready to commit"
98
+ β†’ check_ready_to_commit β†’ βœ… READY
110
99
 
111
- ```json
112
- {
113
- "mcpServers": {
114
- "dev-workflow": {
115
- "command": "node",
116
- "cwd": "<PROJECT_ROOT>",
117
- "args": ["index.js"],
118
- "env": {
119
- "DEV_WORKFLOW_DB_TYPE": "postgres",
120
- "DEV_WORKFLOW_DB_URL": "postgres://USER:PASS@HOST:5432/devworkflow"
121
- }
122
- }
123
- }
124
- }
125
- ```
100
+ "Commit and push: message='feat(auth): add JWT authentication'"
101
+ β†’ commit_and_push (auto git add/commit/push), phase moves to release
126
102
 
127
- - **Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
103
+ "Perform release: command='npm run release:minor'"
104
+ β†’ perform_release, phase moves to ready_to_complete
128
105
 
129
- ```json
130
- {
131
- "mcpServers": {
132
- "dev-workflow": {
133
- "command": "node",
134
- "args": ["<PROJECT_ROOT>/index.js"]
135
- }
136
- }
137
- }
106
+ "Complete task: commitMessage='feat(auth): add JWT authentication'"
107
+ β†’ complete_task, workflow reset to idle
138
108
  ```
139
109
 
140
- #### Windows
110
+ ---
141
111
 
142
- - **Windsurf** (`%APPDATA%\Windsurf\config.json`):
112
+ ## βš™οΈ Konfigurasi MCP Client
143
113
 
144
- ```json
145
- {
146
- "mcpServers": {
147
- "dev-workflow": {
148
- "command": "node",
149
- "args": ["<PROJECT_ROOT>\\index.js"]
150
- }
151
- }
152
- }
153
- ```
114
+ ### OpenCode
154
115
 
155
- - **Claude Desktop** (`%APPDATA%\Claude\claude_desktop_config.json`):
116
+ Tambahkan ke `~/.config/opencode/opencode.json`:
156
117
 
157
118
  ```json
158
119
  {
159
- "mcpServers": {
120
+ "mcp": {
160
121
  "dev-workflow": {
161
- "command": "node",
162
- "args": ["<PROJECT_ROOT>\\index.js"]
122
+ "type": "local",
123
+ "command": ["node", "C:\\path\\to\\dev-workflow-mcp-server\\index.js"],
124
+ "enabled": true
163
125
  }
164
126
  }
165
127
  }
166
128
  ```
167
129
 
168
- #### Linux
130
+ ### Claude Desktop
169
131
 
170
- - **Windsurf** (`~/.config/windsurf/config.json`):
132
+ File: `%APPDATA%\Claude\claude_desktop_config.json` (Windows) atau `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
171
133
 
172
134
  ```json
173
135
  {
174
136
  "mcpServers": {
175
137
  "dev-workflow": {
176
138
  "command": "node",
177
- "args": ["<PROJECT_ROOT>/index.js"]
139
+ "args": ["C:\\path\\to\\dev-workflow-mcp-server\\index.js"]
178
140
  }
179
141
  }
180
142
  }
181
143
  ```
182
144
 
183
- - **Claude Desktop** (`~/.config/claude/claude_desktop_config.json`):
145
+ ### Windsurf
184
146
 
185
- ```json
186
- {
187
- "mcpServers": {
188
- "dev-workflow": {
189
- "command": "node",
190
- "args": ["<PROJECT_ROOT>/index.js"]
191
- }
192
- }
193
- }
194
- ```
195
-
196
- > **Note:** On Windows paths in JSON require escaped backslashes (e.g., `"C:\\path\\to\\project"`).
197
-
198
- #### Full Windsurf MCP Config Example (macOS)
199
-
200
- 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`:
147
+ File: `%APPDATA%\Windsurf\config.json` (Windows) atau `~/Library/Application Support/Windsurf/config.json` (macOS)
201
148
 
202
149
  ```json
203
150
  {
204
151
  "mcpServers": {
205
152
  "dev-workflow": {
206
153
  "command": "node",
207
- "cwd": "/Users/alex/code/dev-workflow-mcp-server",
208
- "args": ["index.js"],
209
- "env": {
210
- "DEV_WORKFLOW_DB_TYPE": "postgres",
211
- "DEV_WORKFLOW_DB_URL": "postgres://devworkflow:devworkflow_secure_password@34.50.121.142:5432/devworkflow"
212
- }
154
+ "cwd": "C:\\path\\to\\dev-workflow-mcp-server",
155
+ "args": ["index.js"]
213
156
  }
214
157
  }
215
158
  }
216
159
  ```
217
160
 
218
- This mirrors the Windows configuration shared in previous releases, but avoids `npx` lookup issues on macOS by launching the local `index.js` directly.
219
-
220
- ### 4. Restart Windsurf/Claude Desktop
221
-
222
- After adding the configuration, restart the application to load the MCP server.
223
-
161
+ ### Antigravity
224
162
 
225
- ### 5. Configure in Antigravity
226
-
227
- Antigravity users should configure the MCP server in their `mcp_config.json`.
228
-
229
- **Windows:** `%APPDATA%\Antigravity\mcp_config.json` or `C:\Users\<USERNAME>\.gemini\antigravity\mcp_config.json`
163
+ File: `%APPDATA%\Antigravity\mcp_config.json`
230
164
 
231
165
  ```json
232
166
  {
233
167
  "mcpServers": {
234
168
  "dev-workflow": {
235
169
  "command": "node",
236
- "args": ["<PROJECT_ROOT>\\index.js"]
170
+ "args": ["C:\\path\\to\\dev-workflow-mcp-server\\index.js"]
237
171
  }
238
172
  }
239
173
  }
240
174
  ```
241
175
 
242
- See [Antigravity Getting Started](./docs/antigravity/GETTING-STARTED.md) for detailed instructions and troubleshooting.
243
-
244
- ### ⚑ Performance Optimization (Recommended)
176
+ > **Performance tip**: Gunakan `node index.js` langsung, jangan `npx`, agar startup lebih cepat.
245
177
 
246
- 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.
178
+ ---
247
179
 
248
- **Optimized Configuration:**
180
+ ## πŸ”§ Configuration
249
181
 
250
- ```json
251
- {
252
- "mcpServers": {
253
- "dev-workflow": {
254
- "command": "node",
255
- "args": ["<PROJECT_ROOT>\\index.js"],
256
- "env": {
257
- "DEV_WORKFLOW_USER_ID": "your_user_id"
258
- }
259
- }
260
- }
261
- }
262
- ```
182
+ ### Database
263
183
 
264
- The server automatically times its own startup and logs it to stderr:
265
- `Dev Workflow MCP Server running on stdio (startup took 15ms)`
184
+ Default pakai **SQLite** (file-based, zero config). Bisa ganti ke PostgreSQL/MySQL:
266
185
 
267
- ## βš™οΈ Configuration
268
-
269
- ### Database Setup
270
-
271
- The server supports **SQLite** (default), **MySQL**, and **PostgreSQL**.
272
-
273
- #### Configuration via `.env`
274
- 1. Copy `.env.example` to `.env`:
275
- ```bash
276
- cp .env.example .env
277
- ```
278
- 2. Edit `.env` with your settings:
279
- ```ini
280
- DEV_WORKFLOW_DB_TYPE=mysql
281
- DEV_WORKFLOW_DB_URL=mysql://user:pass@localhost:3306/db
282
- ```
283
-
284
- #### Configuration via Environment Variables
285
- Alternatively, export variables directly:.
286
-
287
- | Variable | Description | Default |
288
- |----------|-------------|---------|
289
- | `DEV_WORKFLOW_DB_TYPE` | Database driver (`sqlite`, `mysql`, `postgres`) | `sqlite` |
290
- | `DEV_WORKFLOW_DB_URL` | Connection string for MySQL/Postgres | `null` |
291
- | `DEV_WORKFLOW_DB_PATH` | Override path for the SQLite database file | `<project>/.state/dev-workflow.db` |
292
-
293
- #### Examples
294
-
295
- **MySQL:**
296
- ```bash
297
- export DEV_WORKFLOW_DB_TYPE=mysql
298
- export DEV_WORKFLOW_DB_URL="mysql://user:password@localhost:3306/dev_workflow"
299
- ```
300
-
301
- **PostgreSQL:**
302
186
  ```bash
303
- export DEV_WORKFLOW_DB_TYPE=postgres
304
- export DEV_WORKFLOW_DB_URL="postgresql://user:password@localhost:5432/dev_workflow"
187
+ # .env atau environment variable
188
+ DEV_WORKFLOW_DB_TYPE=postgres
189
+ DEV_WORKFLOW_DB_URL=postgresql://user:pass@localhost:5432/devworkflow
305
190
  ```
306
191
 
307
- #### πŸ› οΈ Database Schema Normalization (Postgres/MySQL)
308
- To ensure compatibility with existing reporting dashboards, the `PostgresAdapter` and `MysqlAdapter` automatically normalize column names:
309
- - `task_description` β†’ DB column: `description`
310
- - `timestamp` β†’ DB column: `completed_at`
311
-
312
- The adapters use aliases in queries so the MCP tools still receive the expected `task_description` and `timestamp` fields.
313
-
314
- #### πŸ‘€ User ID Handling (Postgres/MySQL)
315
- These databases use an `INTEGER` column for `user_id`.
316
- - **Numeric strings** (e.g., `"1"`) are parsed directly into integers.
317
- - **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.
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 |
318
199
 
200
+ ### Project-Specific State
319
201
 
320
- ### User & State Management
202
+ Setiap project punya workflow state sendiri di `.state/users/<user-id>/workflow-state.json`. File ini otomatis di-gitignore.
321
203
 
322
- | Variable | Description |
323
- |----------|-------------|
324
- | `DEV_WORKFLOW_USER_ID` | Override the auto-generated user ID (e.g., set to your name/email) |
325
- | `DEV_WORKFLOW_STATE_FILE` | Override the location of the `workflow-state.json` file |
326
-
327
- ### Using Multiple Clients (Antigravity & Windsurf)
328
-
329
- 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.
330
-
331
- To maintain **separate, distinct sessions** for each tool, configure a unique `DEV_WORKFLOW_USER_ID` for each.
332
-
333
- **Antigravity Config (`mcp_config.json`):**
334
- ```json
335
- {
336
- "mcpServers": {
337
- "dev-workflow": {
338
- "command": "node",
339
- "args": ["path/to/server/index.js"],
340
- "env": {
341
- "DEV_WORKFLOW_USER_ID": "antigravity_user"
342
- }
343
- }
344
- }
345
- }
346
- ```
204
+ Untuk isolasi multi-client (misal Windsurf + Antigravity pakai state terpisah):
347
205
 
348
- **Windsurf Config:**
349
- Add the environment variable in your Windsurf MCP settings:
350
206
  ```json
351
207
  {
352
208
  "mcpServers": {
353
209
  "dev-workflow": {
354
210
  "command": "node",
355
- "args": ["path/to/server/index.js"],
356
- "env": {
357
- "DEV_WORKFLOW_USER_ID": "windsurf_user"
358
- }
211
+ "args": ["path/to/index.js"],
212
+ "env": { "DEV_WORKFLOW_USER_ID": "windsurf" }
359
213
  }
360
214
  }
361
215
  }
362
216
  ```
363
217
 
218
+ ---
364
219
 
220
+ ## 🧰 One-Command Stack Setup (OpenCode V2)
365
221
 
366
- ### βœ… Testing
367
-
368
- 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.
369
225
 
370
226
  ```bash
371
- npm test
227
+ node scripts/setup-stack.js # any platform
372
228
  ```
373
229
 
374
- This runs:
375
- - Unit tests for workflow logic
376
- - Integration tests for `.env` configuration
377
- - DB Adapter tests (SQLite always; MySQL/Postgres if configured)
230
+ Platform wrappers (they only install RTK, run `npm install`, then delegate):
378
231
 
379
- #### Testing Database Adapters
380
- To verify MySQL or PostgreSQL adapters, run tests with the environment variable set:
232
+ ```powershell
233
+ pwsh scripts/bootstrap-windows.ps1
234
+ ```
381
235
 
382
236
  ```bash
383
- # Test MySQL
384
- export DEV_WORKFLOW_DB_URL="mysql://root:pass@localhost:3306/test_db"
385
- node --test tests/db-adapters.test.js
386
-
387
- # Test PostgreSQL
388
- export DEV_WORKFLOW_DB_URL="postgres://postgres:pass@localhost:5432/test_db"
389
- node --test tests/db-adapters.test.js
237
+ bash scripts/bootstrap-unix.sh
390
238
  ```
391
239
 
392
- ### Scripts
393
-
394
- - `npm run build` - Bundle the source into `dist/index.mjs` for distribution
395
- - `npm run dev` - Run in development mode with file watching
396
- - `npm run local` - Alias for running from source (same as `npm start`)
397
- - `npm run web` - Launch the lightweight workflow dashboard for browsing task history (see [Web Dashboard docs](./docs/web-dashboard.md))
398
-
399
- #### `npm run web`
400
-
401
- 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
402
259
 
403
260
  ```bash
404
- npm run web
405
- # 🌐 Dev Workflow Dashboard running at http://localhost:3111
261
+ npm test # full suite
262
+ node --test tests/setup-stack.test.js
406
263
  ```
407
264
 
408
- - **Default port:** 3111 (or the next free port if occupied).
409
- - **Environment overrides:** Honors `PORT` (common on hosts like Plesk/Render) or `DEV_WORKFLOW_WEB_PORT` before falling back to auto-selection.
410
- - **Query parameter:** `?user=<id>` lets you inspect another user’s history (defaults to `default`).
411
- - **API endpoints:**
412
- - `GET /api/version` β†’ current package version from `package.json` (used by dashboard to display version dynamically).
413
- - `GET /api/summary?user=<id>` β†’ overall stats for the user.
414
- - `GET /api/history?user=<id>&page=1&pageSize=20&startDate=YYYY-MM-DD&endDate=YYYY-MM-DD` β†’ paginated task history.
415
- - `GET /api/history-summary?user=<id>&frequency=daily|monthly|yearly` β†’ aggregated counts over time.
416
-
417
- Open `http://localhost:3111` in a browser to view the dashboard UI (`web/index.html`).
418
-
419
- ### Build Output
420
-
421
- Running `npm run build` generates:
422
- - `dist/index.mjs` - Optimized ES module bundle
423
- - Source maps and other build artifacts
424
- - `dist/docs/` - Pre-rendered HTML documentation generated from Markdown via `scripts/build-docs.js`
425
-
426
- The build bundles all source files while externalizing Node.js built-in modules and dependencies, resulting in a single file distribution.
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.
427
270
 
428
- ### Usage
271
+ ### CI
429
272
 
430
- 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:
431
- - npm package distribution
432
- - Performance optimization
433
- - Embedding in other projects
273
+ `.github/workflows/ci.yml` runs on the **self-hosted runner on MMCH**, not on
274
+ GitHub-hosted minutes:
434
275
 
435
- ### MCP Tools Registry (Publishing)
436
-
437
- This package is configured for the official MCP Tools Registry using **npm package deployment**:
438
-
439
- - `package.json` declares `mcpName: "io.github.programinglive/dev-workflow-mcp-server"`.
440
- - `server.json` describes the server and links it to the npm package `@programinglive/dev-workflow-mcp-server`.
441
-
442
- To publish a new server version to the registry:
443
-
444
- 1. Release a new npm version (for example):
445
- - `npm test`
446
- - `npm run release:patch` (runs your existing release pipeline and publishes to npm)
447
- 2. Verify the new version exists on npm:
448
- - `npm view @programinglive/dev-workflow-mcp-server version`
449
- 3. Install the MCP publisher CLI (once per machine):
450
- - `brew install mcp-publisher` (or follow the docs at https://modelcontextprotocol.info/tools/registry/publishing/)
451
- 4. From this repo root, authenticate and publish:
452
- - `mcp-publisher login github`
453
- - `mcp-publisher publish`
454
- 5. Optionally verify in the registry:
455
- - `curl "https://registry.modelcontextprotocol.io/v0/servers?search=io.github.programinglive/dev-workflow-mcp-server"`
456
-
457
- #### PowerShell CLI tip
458
-
459
- When invoking the lightweight CLI from PowerShell, use `--%` to prevent PowerShell from rewriting JSON arguments, for example:
460
-
461
- ```powershell
462
- 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]
463
278
  ```
464
279
 
465
- The `--%` prefix and escaped double quotes ensure the JSON reaches the MCP server unchanged.
466
-
467
- ## πŸ“ Project-Specific Workflow State
468
-
469
- When you install this package in a project, a `.state/workflow-state.json` file is automatically created in your project root. This file:
470
-
471
- - **Stores workflow history** specific to that project
472
- - **Tracks task progress** independently per project
473
- - **Should be gitignored** (already in `.gitignore` by default)
474
- - **Persists across sessions** so your workflow state is preserved
475
- - **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.
476
-
477
- 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.
280
+ Two jobs:
478
281
 
479
- #### Choosing a User ID
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` |
480
286
 
481
- Use cases:
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.
482
290
 
483
- 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).
484
- 2. **Set an explicit ID** – Before starting the server, export `DEV_WORKFLOW_USER_ID`:
291
+ A pull request cannot merge green if either job fails.
485
292
 
486
- ```bash
487
- # macOS/Linux
488
- export DEV_WORKFLOW_USER_ID=alice
489
- node index.js
293
+ Runner provisioning and troubleshooting are documented in
294
+ [docs/homelab/ci-runner.md](./docs/homelab/ci-runner.md).
490
295
 
491
- # Windows PowerShell
492
- $env:DEV_WORKFLOW_USER_ID = "alice"
493
- node index.js
494
- ```
296
+ ### Dependency hygiene
495
297
 
496
- Now all history for that session lands in `.state/users/alice/` and the dashboard can be filtered with `alice`.
497
- 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.
498
-
499
- > **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>/`.
500
-
501
- ### Adding to .gitignore
502
-
503
- If you're using this package, add this to your project's `.gitignore`:
504
-
505
- ```
506
- .state/
298
+ ```bash
299
+ npm audit # full tree (production + dev)
300
+ npm audit --omit=dev # production only
507
301
  ```
508
302
 
509
- 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.
510
306
 
511
- > **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.
512
313
 
513
- ## πŸ› οΈ Available Tools
314
+ ---
514
315
 
515
- - `start_task` - Begin a new coding task
516
- - `mark_bug_fixed` - Mark the feature/bug as fixed (requires tests next)
517
- - `create_tests` - Mark that tests have been created
518
- - `skip_tests` - Skip tests with justification
519
- - `run_tests` - Record test results (must pass to proceed)
520
- - `create_documentation` - Mark documentation as created
521
- - `check_ready_to_commit` - Verify all steps are complete
522
- - `commit_and_push` - Commit and push changes
523
- - `perform_release` - Record release details (or use `skip_release` when the project has no release automation)
524
- - `complete_task` - Mark task as complete and reset
525
- - `force_complete_task` - Force completion with reason
526
- - `drop_task` - Abandon current task
527
- - `get_workflow_status` - Show current status
528
- - `view_history` - View completed tasks
529
- - `continue_workflow` - Get next-step guidance
530
- - `rerun_workflow` - Reset and restart the current task from the beginning
531
- - `run_full_workflow` - Execute every workflow step in sequence with a single command (requires supplying the details for each phase)
532
-
533
- ### `run_full_workflow`
534
-
535
- 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
536
317
 
537
- ```json
538
- {
539
- "summary": "Add payment webhooks",
540
- "testCommand": "npm test",
541
- "documentationType": "README",
542
- "documentationSummary": "Document webhook configuration",
543
- "commitMessage": "feat: add payment webhooks",
544
- "releaseCommand": "npm run release:minor",
545
- "releaseNotes": "Release webhook support",
546
- "branch": "feature/payments",
547
- "testsPassed": true,
548
- "testDetails": "node --test; 42 tests",
549
- "releaseType": "minor",
550
- "preset": "minor"
551
- }
552
- ```
318
+ `.github/workflows/github-release.yml` runs on a `v*` tag and is split in two:
553
319
 
554
- 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 |
555
324
 
556
- 1. `mark_bug_fixed` using `summary`
557
- 2. `create_tests`
558
- 3. `run_tests` with `testsPassed`, `testCommand`, and optional `testDetails`
559
- 4. `create_documentation` with `documentationType` and `documentationSummary`
560
- - **Requires**: `docs/product/PRD.md` must exist before documentation can be marked complete
561
- 5. `check_ready_to_commit`
562
- 6. `commit_and_push` with `commitMessage` and optional `branch`
563
- 7. `perform_release` with `releaseCommand`, plus optional `releaseNotes`, `releaseType`, and `preset`
564
- - Alternatively call `skip_release` with a justification when the repository has no Node-based release step (e.g., Python-only or docs-only tasks)
565
- 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.
566
331
 
567
- 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.
568
335
 
569
- ### 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.
570
339
 
571
- 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
572
341
 
573
- ## 🚫 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.
574
346
 
575
- 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`.
576
351
 
577
- - The current workflow phase is **release**
578
- - `check_ready_to_commit` and `commit_and_push` have been completed
579
- - A release has not already been recorded for the active task
352
+ ---
580
353
 
581
- 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
582
355
 
583
- 1. Use `perform_release {"command":"patch"}` (or `minor`/`major`) via the MCP client, or `skip_release {"reason":"<explanation>"}` if no release applies.
584
- 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).
585
357
 
586
- ### 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 |
587
366
 
588
- 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.
589
368
 
590
- 1. Create an npm automation token with publish rights (`npm token create --read-only false`).
591
- 2. In the repository settings, add a secret named **`NPM_TOKEN`** containing that token.
592
- 3. Ensure your release process pushes tags after running `npm run release:<type>` so the workflow triggers.
593
- 4. Confirm `npm run build` succeeds locally; the workflow runs the build before publishing so broken bundles block the release.
594
- 5. GitHub provenance is enabled via `npm publish --provenance`. Leave GitHub Actions' default OIDC permissions enabled so the job can request an ID token.
595
- 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
+ ---
596
370
 
597
- The workflow verifies that the tag version matches `package.json` before publishing and fails fast if they diverge.
371
+ ## 🚫 What This Server Prevents
598
372
 
599
- ## πŸ› οΈ 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
600
378
 
601
- ### Tool Argument Requirements
379
+ ---
602
380
 
603
- All tool invocations validate their `arguments` payload before running:
604
- - Strings are parsed as JSON and must resolve to an object (key/value pairs).
605
- - Passing non-object data (numbers, arrays, plain text) triggers a guidance error.
606
- - Missing or malformed arguments safely default to empty input so the tool can respond with actionable reminders.
381
+ ## πŸ’‘ Tips
607
382
 
608
- Example (stringified JSON object):
609
- ```
610
- {
611
- "name": "start_task",
612
- "arguments": "{\"description\":\"Add reporting endpoint\",\"type\":\"feature\"}"
613
- }
614
- ```
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
615
388
 
616
- ### `start_task`
617
- Start a new coding task. This is your first step - be conscious about what you're coding.
389
+ ---
618
390
 
619
- **Parameters:**
620
- - `description` (string, required): Clear description of what you're going to code
621
- - `type` (enum, required): Type of task - "feature", "bugfix", "refactor", or "other"
391
+ ## πŸ§ͺ Run Tests
622
392
 
623
- **Example:**
624
- ```
625
- Use the start_task tool with:
626
- - description: "Add user authentication to the login page"
627
- - type: "feature"
393
+ ```bash
394
+ npm test
628
395
  ```
629
396
 
630
- ### `mark_bug_fixed`
631
- Mark that the bug/feature is fixed. **Reminder: Now you MUST create tests!**
632
-
633
- **Parameters:**
634
- - `summary` (string, required): Brief summary of what was fixed/implemented
635
-
636
- ### `create_tests`
637
- Confirm that you've created the necessary tests covering your change. Required before recording test results.
638
-
639
- **Parameters:** _none_
640
-
641
- ### `skip_tests`
642
- 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.
643
-
644
- **Parameters:**
645
- - `reason` (string, required): Why automated tests were skipped
646
-
647
- ### `run_tests`
648
- Record test results. **NEVER commit if tests fail!** Only proceed if all tests are green.
649
-
650
- **Parameters:**
651
- - `passed` (boolean, required): Did all tests pass?
652
- - `testCommand` (string, required): The test command that was run
653
- - `details` (string, optional): Test results details
654
-
655
- **Example:**
656
397
  ```
657
- Use run_tests with:
658
- - passed: true
659
- - testCommand: "npm test"
660
- - details: "All 15 tests passed"
398
+ β„Ή tests 112
399
+ β„Ή pass 110
400
+ β„Ή fail 0
401
+ β„Ή skipped 2
661
402
  ```
662
403
 
663
- ### `create_documentation`
664
- Mark that documentation has been created/updated. This is required before committing.
665
-
666
- **Parameters:**
667
- - `documentationType` (enum, required): "PRD", "README", "RELEASE_NOTES", "inline-comments", "API-docs", "changelog", or "other"
668
- - `summary` (string, required): What was documented
669
-
670
- ### `check_ready_to_commit`
671
- Check if all workflow steps are completed and you're ready to commit & push.
672
-
673
- ### `commit_and_push`
674
- Automatically run `git add`, `git commit`, and `git push` after the ready check passes.
675
-
676
- **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.
677
-
678
- **Parameters:**
679
- - `commitMessage` (string, required): Conventional commit message to use
680
- - `branch` (string, optional): Target branch to push. If omitted, auto-detects primary branch (main or master)
681
-
682
- ### `perform_release`
683
- Record the release after you've committed and pushed. Required before you can complete the task.
684
-
685
- **Parameters:**
686
- - `command` (string, required): Release command that was executed (e.g., `npm run release`)
687
- - `notes` (string, optional): Additional release notes
688
-
689
- ### `complete_task`
690
- Mark the task as complete after successful commit & push. Resets workflow for next task.
691
-
692
- **Parameters:**
693
- - `commitMessage` (string, required): The commit message used
694
-
695
- ### `drop_task`
696
- Abandon the current task without completing the workflow. Preserves an audit entry with context, then resets the state so you can start fresh.
697
-
698
- **Parameters:**
699
- - `reason` (string, optional): Additional detail about why the task was dropped
700
-
701
- ### `get_workflow_status`
702
- Get current workflow status and what needs to be done next.
703
-
704
- ### `view_history`
705
- View workflow history of completed tasks.
706
-
707
- **Parameters:**
708
- - `limit` (number, optional): Number of recent tasks to show (default: 10)
709
-
710
- ## πŸ“‹ Available Prompts
711
-
712
- ### `workflow_reminder`
713
- Get a complete reminder of the development workflow discipline.
714
-
715
- ### `pre_commit_checklist`
716
- Get a pre-commit checklist to ensure nothing is missed before committing.
717
-
718
- ## πŸ”„ Typical Workflow
719
-
720
- Here's how you'd use this MCP server in a typical coding session:
721
-
722
- 1. **Start your task:**
723
- ```
724
- Ask Cascade to use start_task:
725
- "Start a new task: implementing user profile page, type: feature"
726
- ```
727
-
728
- 2. **Code your feature/fix**
729
- - 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.
730
407
 
731
- 3. **Mark as fixed:**
732
- ```
733
- "Mark the feature as fixed: User profile page with avatar and bio completed"
734
- ```
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).
735
411
 
736
- 4. **Create tests:**
737
- - Write your tests
738
- - The server will remind you this is mandatory!
412
+ ---
739
413
 
740
- 5. **Run tests:**
741
- ```
742
- "Record test results: passed=true, command='npm test'"
743
- ```
744
- - If tests fail, the server will **block** you from proceeding!
414
+ ## πŸ“¦ Build
745
415
 
746
- 7. **Document:**
747
- ```
748
- "Create documentation: type=README, summary='Added user profile section to docs'"
749
- ```
750
-
751
- 8. **Check readiness:**
752
- ```
753
- "Check if I'm ready to commit"
754
- ```
755
-
756
- 9. **Commit & Push:**
757
- ```
758
- "Commit and push: commitMessage='feat: add user profile page with tests and docs'"
759
- ```
760
-
761
- 10. **Record release:**
762
- ```
763
- "Record release: command='npm run release', notes='v1.2.3'"
764
- ```
765
-
766
- 11. **Complete:**
767
- ```
768
- "Complete the task with commit message: 'feat: add user profile page'"
769
- ```
770
-
771
- 12. **Drop task (optional):**
772
- ```
773
- "Drop task: reason='Switching to a different feature'"
774
- ```
775
-
776
- ## 🎯 Key Features
777
-
778
- - **Enforces discipline**: Won't let you skip steps
779
- - **Test-driven**: Blocks commits if tests fail
780
- - **Documentation reminder**: Ensures you document your work
781
- - **State tracking**: Remembers where you are in the workflow
782
- - **History**: Keeps track of completed tasks
783
- - **Prompts**: Quick reminders of best practices
784
-
785
- ## 🚫 What This Server Prevents
786
-
787
- - ❌ Committing without tests
788
- - ❌ Committing with failing tests
789
- - ❌ Committing without documentation
790
- - ❌ Losing track of what you're working on
791
- - ❌ Skipping important workflow steps
792
-
793
- ## πŸ’‘ Tips
794
-
795
- 1. **Always start with `start_task`** - This sets your intention
796
- 2. **Never skip tests without justification** - Use `skip_tests` only when absolutely necessary and document the reason for manual QA
797
- 3. **Use `get_workflow_status`** - Check where you are anytime
798
- 4. **Review history** - Learn from your past tasks
799
- 5. **Follow the prompts** - They contain best practices
800
-
801
- ## πŸ”§ Customization
802
-
803
- You can modify the workflow in `index.js`:
804
- - Add more workflow phases
805
- - Customize reminders
806
- - Add integration with your test runner
807
- - Add custom validation rules
808
-
809
- ## πŸ“ State Management
810
-
811
- The server maintains state in `.state/workflow-state.json`:
812
- - Current phase
813
- - Task description
814
- - Completion status of each step
815
- - History of completed tasks
816
-
817
- This file is automatically created and managed by the server.
818
- 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
+ ```
819
420
 
820
- ## 🀝 Integration with Your Rules
421
+ Build outputδΈ»θ¦η”¨δΊŽ npm distribution. Untuk MCP usage, gunakan source `index.js` langsung (lebih cepat startup).
821
422
 
822
- This MCP server aligns with your existing development rules:
823
- - βœ… Enforces test-first discipline
824
- - βœ… Prevents commits with failing tests
825
- - βœ… Reminds about documentation
826
- - βœ… Tracks workflow state
827
- - βœ… Maintains history
423
+ ---
828
424
 
829
425
  ## πŸ“„ License
830
426
 
831
427
  MIT
832
-
833
- ## πŸ™ Contributing
834
-
835
- Feel free to customize this server to match your specific workflow needs!
836
-
837
- ## πŸ“œ Project Governance
838
-
839
- - [Code of Conduct](./CODE_OF_CONDUCT.md)
840
- - [Contributing Guide](./CONTRIBUTING.md)
841
- - [Security Policy](./SECURITY.md)
842
- - [License](./LICENSE)