@doquflow/server 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @doquflow/server
2
+
3
+ MCP server that lets AI agents read any codebase and write persistent specs. Zero AI inside — the agent does all the thinking.
4
+
5
+ ```
6
+ AI Agent (Claude Code)
7
+ │ calls MCP tools
8
+ @doquflow/server ← reads files, extracts, writes markdown
9
+ │ filesystem only
10
+ Any project on disk ← any language, any structure
11
+ ```
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ npx @doquflow/cli init
17
+ ```
18
+
19
+ The CLI registers this server automatically in your Claude Desktop config. You do not need to install `@doquflow/server` directly.
20
+
21
+ ## Tools
22
+
23
+ | Tool | Input | Output |
24
+ |------|-------|--------|
25
+ | `read_module` | `{ path }` | Classes, functions, deps, endpoints, tables, config refs, raw content |
26
+ | `list_modules` | `{ path, extensions? }` | All modules in a directory tree |
27
+ | `write_spec` | `{ project_path, filename, content }` | Writes a markdown spec to `.docuflow/specs/` |
28
+ | `read_specs` | `{ project_path, module_name? }` | Reads existing specs from `.docuflow/specs/` |
29
+
30
+ ## Extraction engine
31
+
32
+ Universal regex patterns applied to any file:
33
+
34
+ | Field | Detected from |
35
+ |-------|--------------|
36
+ | `classes` | `class`, `interface`, `struct`, `enum`, `record` |
37
+ | `functions` | Keyword-prefixed declarations + arrow functions |
38
+ | `dependencies` | `import`, `require()`, decorators, `new ClassName()` |
39
+ | `db_tables` | SQL `FROM/JOIN/INTO`, EF `DbSet<T>`, `[Table("…")]`, `_db.TableName` |
40
+ | `endpoints` | .NET attributes, `app.MapGet()`, Express router, NestJS, Angular routes |
41
+ | `config_refs` | `IConfiguration`, `appsettings`, `ConnectionStrings:*`, `process.env.*` |
42
+
43
+ ## Requirements
44
+
45
+ - Node.js 18+
46
+ - No API keys, no network calls, no AI dependencies
47
+
48
+ ## License
49
+
50
+ MIT — [github.com/doquflows/docuflow](https://github.com/doquflows/docuflow)
package/dist/extractor.js CHANGED
@@ -37,6 +37,12 @@ const RE_MIN_API = /\bapp\.Map(?:Get|Post|Put|Delete|Patch)\s*\(\s*["']([^"']+)[
37
37
  const RE_EXPRESS = /\b(?:router|app)\.(?:get|post|put|delete|patch|use)\s*\(\s*['"]([^'"]+)['"]/g;
38
38
  const RE_NEST = /@(?:Get|Post|Put|Delete|Patch)\s*\(\s*['"]([^'"]+)['"]/g;
39
39
  const RE_NG_PATH = /\bpath\s*:\s*['"]([^'"]+)['"]/g;
40
+ // Flask: @app.route('/path') @bp.route('/path')
41
+ const RE_FLASK = /@\w+\.route\s*\(\s*['"]([^'"]+)['"]/g;
42
+ // FastAPI / Flask-style: @app.get('/x') @router.post('/x')
43
+ const RE_FASTAPI = /@(?:app|router|bp)\s*\.\s*(?:get|post|put|delete|patch)\s*\(\s*['"]([^'"]+)['"]/g;
44
+ // Django: path('url/', view) url('pattern/', view)
45
+ const RE_DJANGO = /\bpath\s*\(\s*['"]([^'"]+)['"]/g;
40
46
  const RE_CFG_CONNSTR = /\bConnectionStrings:([\w.]+)/g;
41
47
  const RE_PROCESS_ENV = /\bprocess\.env\.([A-Z_][A-Z0-9_]*)/g;
42
48
  const RE_DOTNET_ENV = /\bEnvironment\.GetEnvironmentVariable\(\s*["']([^"']+)["']/g;
@@ -97,6 +103,9 @@ function extract(content) {
97
103
  ...collect(new RegExp(RE_EXPRESS.source, "g"), content),
98
104
  ...collect(new RegExp(RE_NEST.source, "g"), content),
99
105
  ...collect(new RegExp(RE_NG_PATH.source, "g"), content),
106
+ ...collect(new RegExp(RE_FLASK.source, "g"), content),
107
+ ...collect(new RegExp(RE_FASTAPI.source, "g"), content),
108
+ ...collect(new RegExp(RE_DJANGO.source, "g"), content),
100
109
  ]);
101
110
  const config_refs = [];
102
111
  config_refs.push(...collect(new RegExp(RE_CFG_CONNSTR.source, "g"), content).map((s) => `ConnectionStrings:${s}`));
package/package.json CHANGED
@@ -1,16 +1,40 @@
1
1
  {
2
2
  "name": "@doquflow/server",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Docuflow MCP server — lets AI agents read codebases and persist living specs",
5
5
  "author": "Docuflow <hello@doquflows.dev>",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/doquflows/docuflow",
8
- "repository": { "type": "git", "url": "https://github.com/doquflows/docuflow.git" },
9
- "bugs": { "url": "https://github.com/doquflows/docuflow/issues" },
10
- "keywords": ["mcp", "ai-agents", "claude-code", "documentation", "codebase", "developer-tools"],
11
- "bin": { "docuflow-server": "./dist/index.js" },
12
- "files": ["dist/**"],
13
- "scripts": { "build": "tsc" },
14
- "dependencies": { "@modelcontextprotocol/sdk": "^1.0.4" },
15
- "devDependencies": { "@types/node": "^22.0.0", "typescript": "^5.6.0" }
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/doquflows/docuflow.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/doquflows/docuflow/issues"
14
+ },
15
+ "keywords": [
16
+ "mcp",
17
+ "ai-agents",
18
+ "claude-code",
19
+ "documentation",
20
+ "codebase",
21
+ "developer-tools"
22
+ ],
23
+ "bin": {
24
+ "docuflow-server": "./dist/index.js"
25
+ },
26
+ "files": [
27
+ "dist/**",
28
+ "README.md"
29
+ ],
30
+ "scripts": {
31
+ "build": "tsc"
32
+ },
33
+ "dependencies": {
34
+ "@modelcontextprotocol/sdk": "^1.0.4"
35
+ },
36
+ "devDependencies": {
37
+ "@types/node": "^22.0.0",
38
+ "typescript": "^5.6.0"
39
+ }
16
40
  }