@programinglive/dev-workflow-mcp-server 1.5.2 → 1.5.4

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 (78) hide show
  1. package/.agent/workflows/dev-workflow-bugfix.md +250 -250
  2. package/.agent/workflows/dev-workflow-feature.md +201 -201
  3. package/.agent/workflows/dev-workflow-full-cycle.md +400 -400
  4. package/.agent/workflows/dev-workflow-refactor.md +238 -238
  5. package/.github/ISSUE_TEMPLATE/bug_report.md +34 -34
  6. package/.github/ISSUE_TEMPLATE/feature_request.md +25 -25
  7. package/.github/pull_request_template.md +22 -22
  8. package/.github/workflows/github-release.yml +56 -0
  9. package/.github/workflows/npm-publish.yml +50 -50
  10. package/.husky/commit-msg +0 -0
  11. package/CHANGELOG.md +759 -741
  12. package/CODE_OF_CONDUCT.md +79 -79
  13. package/CONTRIBUTING.md +60 -60
  14. package/LICENSE +21 -21
  15. package/README.md +632 -632
  16. package/SECURITY.md +20 -20
  17. package/db/index.js +204 -204
  18. package/docs/NETLIFY_DEPLOYMENT.md +125 -125
  19. package/docs/PLESK_DEPLOYMENT.md +170 -170
  20. package/docs/WORKFLOW-BEST-PRACTICES.md +58 -58
  21. package/docs/antigravity/EXAMPLES.md +535 -535
  22. package/docs/antigravity/GETTING-STARTED.md +292 -292
  23. package/docs/antigravity/TROUBLESHOOTING.md +742 -742
  24. package/docs/antigravity/WALKTHROUGH.md +25 -25
  25. package/docs/antigravity/WORKFLOW-TEMPLATES.md +670 -670
  26. package/docs/product/PRD.md +67 -67
  27. package/docs/release-notes/RELEASE_NOTES.md +233 -226
  28. package/docs/web-dashboard.md +175 -175
  29. package/exec.js +49 -49
  30. package/index.js +279 -279
  31. package/install.js +73 -73
  32. package/package.json +4 -4
  33. package/release-wrapper.js +192 -192
  34. package/scripts/build-docs.js +63 -63
  35. package/scripts/extract-release-notes.cjs +78 -0
  36. package/scripts/hello-world.js +1 -1
  37. package/scripts/release.cjs +252 -252
  38. package/scripts/release.js +252 -0
  39. package/scripts/update-release-notes.cjs +178 -178
  40. package/scripts/update-release-notes.js +182 -0
  41. package/server.json +23 -23
  42. package/tailwind.config.js +8 -8
  43. package/tests/build.test.js +83 -83
  44. package/tests/exec.test.js +35 -35
  45. package/tests/handlers.test.js +1058 -1058
  46. package/tests/hello-world.test.js +13 -13
  47. package/tests/mcpRegistry.test.js +65 -65
  48. package/tests/patch-release.test.js +7 -0
  49. package/tests/release-wrapper.test.js +107 -107
  50. package/tests/workflowState.test.js +505 -505
  51. package/tools/definitions.js +332 -332
  52. package/tools/handlers.js +1019 -1019
  53. package/vite.config.js +43 -43
  54. package/vite.web.config.js +23 -23
  55. package/web/README.md +36 -36
  56. package/web/app/docs/page.tsx +202 -202
  57. package/web/app/globals.css +90 -90
  58. package/web/app/layout.tsx +36 -36
  59. package/web/app/page.tsx +15 -15
  60. package/web/components/ApiReference.tsx +20 -20
  61. package/web/components/Features.tsx +61 -61
  62. package/web/components/Footer.tsx +9 -9
  63. package/web/components/Hero.tsx +96 -96
  64. package/web/components/History.tsx +143 -143
  65. package/web/components/Navbar.tsx +64 -64
  66. package/web/components/Terminal.tsx +114 -114
  67. package/web/eslint.config.mjs +18 -18
  68. package/web/lib/db.js +131 -131
  69. package/web/lib/docs.js +73 -73
  70. package/web/netlify.toml +3 -3
  71. package/web/next.config.ts +12 -12
  72. package/web/package-lock.json +6560 -6560
  73. package/web/package.json +28 -28
  74. package/web/postcss.config.mjs +9 -9
  75. package/web/server.js +31 -31
  76. package/web/tailwind.config.ts +19 -19
  77. package/web/tsconfig.json +42 -42
  78. package/workflow-state.js +612 -612
@@ -1,175 +1,175 @@
1
- # Dev Workflow Web Dashboard
2
-
3
- Learn how to start and use the Dev Workflow dashboard included with the MCP server. The dashboard exposes project history, summaries, and aggregates through a small Node.js service.
4
-
5
- ## Prerequisites
6
-
7
- Before launching the dashboard, confirm the following:
8
-
9
- - Node.js 18+ installed (same requirement as the MCP server)
10
- - Project dependencies installed with `npm install`
11
- - Workflow history stored under `.state/` (created automatically when using the MCP server)
12
-
13
- > **Plesk users:** follow the [Plesk installation guide](../README.md#option-3-install-on-plesk-hosting) first and ensure SSH access is enabled.
14
-
15
- ## Features
16
-
17
- - **Task history browser** – Paginated list of completed workflow entries.
18
- - **Summary stats** – Counts of tasks by type and recent activity timeline.
19
- - **Aggregated trends** – Daily, monthly, or yearly breakdowns of workflow activity.
20
- - **Multi-user support** – Switch between user identifiers recorded in the `.state` directory.
21
-
22
- ## Getting Started
23
-
24
- Launch the dashboard from your project directory:
25
-
26
- ```bash
27
- npm run web
28
- ```
29
-
30
- When the server is ready you will see:
31
-
32
- ```
33
- 🌐 Dev Workflow Dashboard running at http://localhost:3111
34
- ```
35
-
36
- Open the URL in your browser. If port 3111 is in use, the script automatically selects a nearby free port.
37
-
38
- ### Choosing a Port
39
-
40
- Set `DEV_WORKFLOW_WEB_PORT` to force a specific port:
41
-
42
- ```bash
43
- DEV_WORKFLOW_WEB_PORT=5000 npm run web
44
- ```
45
-
46
- ### Selecting a User
47
-
48
- The dashboard defaults to the `default` user. Append `?user=<USER_ID>` to view another user’s data. User IDs map to the subdirectories under `.state/users/`.
49
-
50
- ```
51
- http://localhost:3111/?user=my-teammate
52
- ```
53
-
54
- ## Navigation
55
-
56
- The HTML frontend lives in `web/index.html`. The default UI includes:
57
-
58
- - **Summary cards** – Total tasks completed and last active date.
59
- - **Recent tasks table** – Paginated entries with task descriptions and timestamps.
60
- - **Charts** (if script extensions are enabled) – Visual trends per frequency selection.
61
-
62
- ## API Reference
63
-
64
- Interact with the dashboard programmatically using the JSON endpoints served by `web/server.js`.
65
-
66
- ### `GET /api/summary`
67
-
68
- Returns aggregate statistics for a user.
69
-
70
- **Query parameters**
71
-
72
- - `user` *(optional, string)* – User identifier (default `default`).
73
-
74
- **Response**
75
-
76
- ```json
77
- {
78
- "summary": {
79
- "totalTasks": 12,
80
- "taskTypes": { "feature": 8, "bugfix": 3, "refactor": 1 },
81
- "lastActive": "2025-10-01T09:25:41.123Z",
82
- "recentTasks": [
83
- { "description": "feat: add billing webhooks", "type": "feature", "timestamp": "2025-10-01T09:25:41.123Z" }
84
- ],
85
- "updatedAt": "2025-10-01T09:30:00.000Z"
86
- }
87
- }
88
- ```
89
-
90
- ### `GET /api/history`
91
-
92
- Returns paginated task history.
93
-
94
- **Query parameters**
95
-
96
- - `user` *(optional, string)* – User identifier (default `default`).
97
- - `page` *(optional, number)* – Page number (default `1`).
98
- - `pageSize` *(optional, number)* – Items per page (default `20`, max `100`).
99
- - `startDate` *(optional, string)* – Filter by ISO date (inclusive).
100
- - `endDate` *(optional, string)* – Filter by ISO date (inclusive).
101
-
102
- **Response**
103
-
104
- ```json
105
- {
106
- "entries": [
107
- {
108
- "id": 42,
109
- "user_id": "default",
110
- "task_description": "feat: add reporting endpoint",
111
- "task_type": "feature",
112
- "commit_message": "feat: add reporting endpoint",
113
- "timestamp": "2025-09-30T09:18:00.000Z"
114
- }
115
- ],
116
- "total": 42,
117
- "page": 1,
118
- "pageSize": 20
119
- }
120
- ```
121
-
122
- ### `GET /api/history-summary`
123
-
124
- Returns an array of task counts grouped by period.
125
-
126
- **Query parameters**
127
-
128
- - `user` *(optional, string)* – User identifier (default `default`).
129
- - `frequency` *(optional, string)* – `daily`, `monthly`, or `yearly` (default `daily`).
130
- - `startDate`, `endDate` *(optional, string)* – Limit range by ISO dates.
131
-
132
- **Response**
133
-
134
- ```json
135
- {
136
- "summary": [
137
- { "period": "2025-09-30", "count": 3 },
138
- { "period": "2025-09-29", "count": 1 }
139
- ]
140
- }
141
- ```
142
-
143
- ## Configuration
144
-
145
- | Variable | Description | Default |
146
- | --- | --- | --- |
147
- | `DEV_WORKFLOW_WEB_PORT` | Port for the dashboard | `3111` or next available |
148
- | `DEV_WORKFLOW_USER_ID` | User identifier when launching via MCP | auto-generated |
149
- | `DEV_WORKFLOW_STATE_FILE` | Overrides path to workflow state JSON | auto-detected |
150
-
151
- ## Troubleshooting
152
-
153
- | Symptom | Fix |
154
- | --- | --- |
155
- | Server fails with `better-sqlite3` build error | Install Python 3 and build tools (Windows) or ensure SQLite build dependencies exist (Linux/macOS). |
156
- | Dashboard shows empty data | Confirm the MCP server has generated `.state/users/<user>/workflow-state.json` and that the chosen `user` matches. |
157
- | Port already in use | Set `DEV_WORKFLOW_WEB_PORT` to a free port before running `npm run web`. |
158
-
159
- ## Deployment Options
160
-
161
- The web dashboard can be deployed in multiple ways:
162
-
163
- | Platform | Database Support | Best For |
164
- | --- | --- | --- |
165
- | Local (`npm run web`) | Full SQLite | Development and personal use |
166
- | [Netlify](./NETLIFY_DEPLOYMENT.md) | Static only | Public documentation site |
167
- | [Plesk](./PLESK_DEPLOYMENT.md) | Full SQLite | Self-hosted production |
168
-
169
- ## Related Topics
170
-
171
- - [Main README](../README.md)
172
- - [Netlify Deployment](./NETLIFY_DEPLOYMENT.md)
173
- - [Plesk Deployment](./PLESK_DEPLOYMENT.md)
174
- - [Workflow State Internals](./state.md) *(coming soon)*
175
- - [CLI Tools](../README.md#🛠️-available-tools)
1
+ # Dev Workflow Web Dashboard
2
+
3
+ Learn how to start and use the Dev Workflow dashboard included with the MCP server. The dashboard exposes project history, summaries, and aggregates through a small Node.js service.
4
+
5
+ ## Prerequisites
6
+
7
+ Before launching the dashboard, confirm the following:
8
+
9
+ - Node.js 18+ installed (same requirement as the MCP server)
10
+ - Project dependencies installed with `npm install`
11
+ - Workflow history stored under `.state/` (created automatically when using the MCP server)
12
+
13
+ > **Plesk users:** follow the [Plesk installation guide](../README.md#option-3-install-on-plesk-hosting) first and ensure SSH access is enabled.
14
+
15
+ ## Features
16
+
17
+ - **Task history browser** – Paginated list of completed workflow entries.
18
+ - **Summary stats** – Counts of tasks by type and recent activity timeline.
19
+ - **Aggregated trends** – Daily, monthly, or yearly breakdowns of workflow activity.
20
+ - **Multi-user support** – Switch between user identifiers recorded in the `.state` directory.
21
+
22
+ ## Getting Started
23
+
24
+ Launch the dashboard from your project directory:
25
+
26
+ ```bash
27
+ npm run web
28
+ ```
29
+
30
+ When the server is ready you will see:
31
+
32
+ ```
33
+ 🌐 Dev Workflow Dashboard running at http://localhost:3111
34
+ ```
35
+
36
+ Open the URL in your browser. If port 3111 is in use, the script automatically selects a nearby free port.
37
+
38
+ ### Choosing a Port
39
+
40
+ Set `DEV_WORKFLOW_WEB_PORT` to force a specific port:
41
+
42
+ ```bash
43
+ DEV_WORKFLOW_WEB_PORT=5000 npm run web
44
+ ```
45
+
46
+ ### Selecting a User
47
+
48
+ The dashboard defaults to the `default` user. Append `?user=<USER_ID>` to view another user’s data. User IDs map to the subdirectories under `.state/users/`.
49
+
50
+ ```
51
+ http://localhost:3111/?user=my-teammate
52
+ ```
53
+
54
+ ## Navigation
55
+
56
+ The HTML frontend lives in `web/index.html`. The default UI includes:
57
+
58
+ - **Summary cards** – Total tasks completed and last active date.
59
+ - **Recent tasks table** – Paginated entries with task descriptions and timestamps.
60
+ - **Charts** (if script extensions are enabled) – Visual trends per frequency selection.
61
+
62
+ ## API Reference
63
+
64
+ Interact with the dashboard programmatically using the JSON endpoints served by `web/server.js`.
65
+
66
+ ### `GET /api/summary`
67
+
68
+ Returns aggregate statistics for a user.
69
+
70
+ **Query parameters**
71
+
72
+ - `user` *(optional, string)* – User identifier (default `default`).
73
+
74
+ **Response**
75
+
76
+ ```json
77
+ {
78
+ "summary": {
79
+ "totalTasks": 12,
80
+ "taskTypes": { "feature": 8, "bugfix": 3, "refactor": 1 },
81
+ "lastActive": "2025-10-01T09:25:41.123Z",
82
+ "recentTasks": [
83
+ { "description": "feat: add billing webhooks", "type": "feature", "timestamp": "2025-10-01T09:25:41.123Z" }
84
+ ],
85
+ "updatedAt": "2025-10-01T09:30:00.000Z"
86
+ }
87
+ }
88
+ ```
89
+
90
+ ### `GET /api/history`
91
+
92
+ Returns paginated task history.
93
+
94
+ **Query parameters**
95
+
96
+ - `user` *(optional, string)* – User identifier (default `default`).
97
+ - `page` *(optional, number)* – Page number (default `1`).
98
+ - `pageSize` *(optional, number)* – Items per page (default `20`, max `100`).
99
+ - `startDate` *(optional, string)* – Filter by ISO date (inclusive).
100
+ - `endDate` *(optional, string)* – Filter by ISO date (inclusive).
101
+
102
+ **Response**
103
+
104
+ ```json
105
+ {
106
+ "entries": [
107
+ {
108
+ "id": 42,
109
+ "user_id": "default",
110
+ "task_description": "feat: add reporting endpoint",
111
+ "task_type": "feature",
112
+ "commit_message": "feat: add reporting endpoint",
113
+ "timestamp": "2025-09-30T09:18:00.000Z"
114
+ }
115
+ ],
116
+ "total": 42,
117
+ "page": 1,
118
+ "pageSize": 20
119
+ }
120
+ ```
121
+
122
+ ### `GET /api/history-summary`
123
+
124
+ Returns an array of task counts grouped by period.
125
+
126
+ **Query parameters**
127
+
128
+ - `user` *(optional, string)* – User identifier (default `default`).
129
+ - `frequency` *(optional, string)* – `daily`, `monthly`, or `yearly` (default `daily`).
130
+ - `startDate`, `endDate` *(optional, string)* – Limit range by ISO dates.
131
+
132
+ **Response**
133
+
134
+ ```json
135
+ {
136
+ "summary": [
137
+ { "period": "2025-09-30", "count": 3 },
138
+ { "period": "2025-09-29", "count": 1 }
139
+ ]
140
+ }
141
+ ```
142
+
143
+ ## Configuration
144
+
145
+ | Variable | Description | Default |
146
+ | --- | --- | --- |
147
+ | `DEV_WORKFLOW_WEB_PORT` | Port for the dashboard | `3111` or next available |
148
+ | `DEV_WORKFLOW_USER_ID` | User identifier when launching via MCP | auto-generated |
149
+ | `DEV_WORKFLOW_STATE_FILE` | Overrides path to workflow state JSON | auto-detected |
150
+
151
+ ## Troubleshooting
152
+
153
+ | Symptom | Fix |
154
+ | --- | --- |
155
+ | Server fails with `better-sqlite3` build error | Install Python 3 and build tools (Windows) or ensure SQLite build dependencies exist (Linux/macOS). |
156
+ | Dashboard shows empty data | Confirm the MCP server has generated `.state/users/<user>/workflow-state.json` and that the chosen `user` matches. |
157
+ | Port already in use | Set `DEV_WORKFLOW_WEB_PORT` to a free port before running `npm run web`. |
158
+
159
+ ## Deployment Options
160
+
161
+ The web dashboard can be deployed in multiple ways:
162
+
163
+ | Platform | Database Support | Best For |
164
+ | --- | --- | --- |
165
+ | Local (`npm run web`) | Full SQLite | Development and personal use |
166
+ | [Netlify](./NETLIFY_DEPLOYMENT.md) | Static only | Public documentation site |
167
+ | [Plesk](./PLESK_DEPLOYMENT.md) | Full SQLite | Self-hosted production |
168
+
169
+ ## Related Topics
170
+
171
+ - [Main README](../README.md)
172
+ - [Netlify Deployment](./NETLIFY_DEPLOYMENT.md)
173
+ - [Plesk Deployment](./PLESK_DEPLOYMENT.md)
174
+ - [Workflow State Internals](./state.md) *(coming soon)*
175
+ - [CLI Tools](../README.md#🛠️-available-tools)
package/exec.js CHANGED
@@ -1,49 +1,49 @@
1
- import { exec as execCallback } from "child_process";
2
- import { existsSync } from "fs";
3
- import path from "path";
4
- import { fileURLToPath } from "url";
5
- import { promisify } from "util";
6
-
7
- const execPromise = promisify(execCallback);
8
-
9
- function findRepoRoot(startDir) {
10
- if (!startDir) {
11
- return null;
12
- }
13
-
14
- let current = path.resolve(startDir);
15
- const { root } = path.parse(current);
16
-
17
- while (true) {
18
- if (existsSync(path.join(current, ".git"))) {
19
- return current;
20
- }
21
-
22
- if (current === root) {
23
- return null;
24
- }
25
-
26
- const parent = path.dirname(current);
27
- if (parent === current) {
28
- return null;
29
- }
30
-
31
- current = parent;
32
- }
33
- }
34
-
35
- function getDefaultCwd() {
36
- const moduleDir = path.dirname(fileURLToPath(import.meta.url));
37
- const candidateDirs = [process.cwd(), process.env.INIT_CWD, moduleDir];
38
- return candidateDirs.reduce((resolved, candidate) => {
39
- if (resolved) {
40
- return resolved;
41
- }
42
- return findRepoRoot(candidate) || null;
43
- }, null) || process.cwd();
44
- }
45
-
46
- export function exec(command, options = {}) {
47
- const execOptions = options.cwd ? options : { ...options, cwd: getDefaultCwd() };
48
- return execPromise(command, execOptions);
49
- }
1
+ import { exec as execCallback } from "child_process";
2
+ import { existsSync } from "fs";
3
+ import path from "path";
4
+ import { fileURLToPath } from "url";
5
+ import { promisify } from "util";
6
+
7
+ const execPromise = promisify(execCallback);
8
+
9
+ function findRepoRoot(startDir) {
10
+ if (!startDir) {
11
+ return null;
12
+ }
13
+
14
+ let current = path.resolve(startDir);
15
+ const { root } = path.parse(current);
16
+
17
+ while (true) {
18
+ if (existsSync(path.join(current, ".git"))) {
19
+ return current;
20
+ }
21
+
22
+ if (current === root) {
23
+ return null;
24
+ }
25
+
26
+ const parent = path.dirname(current);
27
+ if (parent === current) {
28
+ return null;
29
+ }
30
+
31
+ current = parent;
32
+ }
33
+ }
34
+
35
+ function getDefaultCwd() {
36
+ const moduleDir = path.dirname(fileURLToPath(import.meta.url));
37
+ const candidateDirs = [process.cwd(), process.env.INIT_CWD, moduleDir];
38
+ return candidateDirs.reduce((resolved, candidate) => {
39
+ if (resolved) {
40
+ return resolved;
41
+ }
42
+ return findRepoRoot(candidate) || null;
43
+ }, null) || process.cwd();
44
+ }
45
+
46
+ export function exec(command, options = {}) {
47
+ const execOptions = options.cwd ? options : { ...options, cwd: getDefaultCwd() };
48
+ return execPromise(command, execOptions);
49
+ }