@noyrax/documentation-system-plugin 1.0.4-beta.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 (200) hide show
  1. package/.vscodeignore +41 -0
  2. package/LICENSE +21 -0
  3. package/MCP_SERVER_SETUP.md +371 -0
  4. package/README.md +663 -0
  5. package/assets/icon.svg +27 -0
  6. package/docs/LINKEDIN_ANTWORT_SEQUENZDIAGRAMME.md +190 -0
  7. package/docs/SEQUENZDIAGRAMM_BEWEIS.md +469 -0
  8. package/docs/SEQUENZDIAGRAMM_VALIDATE_FLOW.md +282 -0
  9. package/docs/adr/001-signatur-abweichung-fix.md +54 -0
  10. package/docs/adr/002-file-specific-validation-1.0.1.md +45 -0
  11. package/docs/adr/003-documentation-generation-bugs.md +134 -0
  12. package/docs/adr/004-validator-signature-matching-fix.md +121 -0
  13. package/docs/adr/005-validator-generic-simplification-tightening.md +35 -0
  14. package/docs/adr/006-parser-variable-type-extraction.md +33 -0
  15. package/docs/adr/007-ts-parser-load-libs-for-accurate-types.md +31 -0
  16. package/docs/adr/008-dependencies-cache-phase1.md +133 -0
  17. package/docs/adr/009-consolidation-union-logic-phase1-2.md +147 -0
  18. package/docs/adr/010-extension-union-integration-phase1-3-and-phase2.md +179 -0
  19. package/docs/adr/011-module-doc-change-tracking-phase3.md +190 -0
  20. package/docs/adr/012-git-deletions-change-report-phase4.md +235 -0
  21. package/docs/adr/013-system-functionality-fixes.md +279 -0
  22. package/docs/adr/014-rules-migration-und-mcp-integration.md +113 -0
  23. package/docs/adr/015-global-agent-package.md +158 -0
  24. package/docs/adr/016-produktisierung-docguard.md +193 -0
  25. package/docs/adr/017-signature-matching-optional-fields.md +128 -0
  26. package/docs/adr/018-rebranding-docguard-to-noyrax.md +109 -0
  27. package/docs/adr/019-system-schwachstellen-analyse-und-fixes.md +204 -0
  28. package/docs/adr/020-api-doc-tiefe-und-signatureformatter.md +74 -0
  29. package/docs/adr/021-semantic-api-docs-and-symbol-classifier.md +125 -0
  30. package/docs/adr/022-semantic-class-and-constants-rendering.md +82 -0
  31. package/docs/adr/023-adr-verknuepfung-modul-doku.md +54 -0
  32. package/docs/adr/024-cursor-rules-mehrdimensionaler-raum.md +230 -0
  33. package/docs/adr/025-mcp-tools-scan-validate-cli-bridge.md +202 -0
  34. package/docs/adr/026-reality-driven-development-system.md +173 -0
  35. package/docs/adr/027-scanner-excludes-and-union-logic-fix.md +189 -0
  36. package/docs/adr/028-src-coverage-union-resync.md +124 -0
  37. package/docs/adr/029-parser-flow-kopplung-und-sync-drift-modi.md +102 -0
  38. package/docs/adr/030-dependency-import-symbol-names-preservation.md +123 -0
  39. package/docs/adr/031-generate-cli-vollstaendige-dokumentation.md +99 -0
  40. package/docs/adr/032-windows-optimized-verification-scripts.md +165 -0
  41. package/docs/adr/036-enhanced-dependency-metadata.md +190 -0
  42. package/docs/adr/TEMPLATE.md +76 -0
  43. package/docs/index/symbols.jsonl +31 -0
  44. package/docs/modules/action__action.yml.md +50 -0
  45. package/docs/modules/documentation.config.schema.json.md +37 -0
  46. package/docs/modules/mcp__package.json.md +130 -0
  47. package/docs/modules/mcp__src__resources__docs.ts.md +94 -0
  48. package/docs/modules/mcp__src__server.ts.md +15 -0
  49. package/docs/modules/mcp__src__tools__drift.ts.md +110 -0
  50. package/docs/modules/mcp__src__tools__impact.ts.md +127 -0
  51. package/docs/modules/mcp__src__tools__scan.ts.md +75 -0
  52. package/docs/modules/mcp__src__tools__validate.ts.md +116 -0
  53. package/docs/modules/mcp__src__tools__verify-adrs.ts.md +106 -0
  54. package/docs/modules/mcp__tsconfig.json.md +22 -0
  55. package/docs/modules/package.json.md +131 -0
  56. package/docs/modules/packages__doc-system-agent__examples__basic-project__package.json.md +43 -0
  57. package/docs/modules/packages__doc-system-agent__examples__basic-project__src__calculator.ts.md +81 -0
  58. package/docs/modules/packages__doc-system-agent__package.json.md +154 -0
  59. package/docs/modules/packages__doc-system-agent__src__cli__index.ts.md +8 -0
  60. package/docs/modules/packages__doc-system-agent__src__cli__init.ts.md +93 -0
  61. package/docs/modules/packages__doc-system-agent__src__cli__update.ts.md +113 -0
  62. package/docs/modules/packages__doc-system-agent__src__constants.ts.md +29 -0
  63. package/docs/modules/packages__doc-system-agent__src__index.ts.md +234 -0
  64. package/docs/modules/packages__doc-system-agent__src__mcp__resources__docs.ts.md +94 -0
  65. package/docs/modules/packages__doc-system-agent__src__mcp__server.ts.md +17 -0
  66. package/docs/modules/packages__doc-system-agent__src__mcp__tools__drift.ts.md +38 -0
  67. package/docs/modules/packages__doc-system-agent__src__mcp__tools__impact.ts.md +75 -0
  68. package/docs/modules/packages__doc-system-agent__src__mcp__tools__scan.ts.md +23 -0
  69. package/docs/modules/packages__doc-system-agent__src__mcp__tools__validate.ts.md +23 -0
  70. package/docs/modules/packages__doc-system-agent__src__mcp__tools__verify-adrs.ts.md +106 -0
  71. package/docs/modules/packages__doc-system-agent__src__mcp__types.ts.md +355 -0
  72. package/docs/modules/packages__doc-system-agent__tsconfig.json.md +22 -0
  73. package/docs/modules/scripts__verify-adrs.js.md +97 -0
  74. package/docs/modules/scripts__verify-architecture.js.md +93 -0
  75. package/docs/modules/scripts__verify-imports.js.md +114 -0
  76. package/docs/modules/src____tests____setup.ts.md +8 -0
  77. package/docs/modules/src____tests____signature-formatter.test.ts.md +16 -0
  78. package/docs/modules/src____tests____snapshot-doc-generation.test.ts.md +8 -0
  79. package/docs/modules/src____tests____symbol-classifier.test.ts.md +16 -0
  80. package/docs/modules/src__cache__ast-cache.ts.md +91 -0
  81. package/docs/modules/src__cache__dependencies-cache.ts.md +89 -0
  82. package/docs/modules/src__cache__output-cache.ts.md +91 -0
  83. package/docs/modules/src__cache__signature-cache.ts.md +76 -0
  84. package/docs/modules/src__cli__generate-cli.ts.md +130 -0
  85. package/docs/modules/src__cli__scan-cli.ts.md +99 -0
  86. package/docs/modules/src__cli__validate-cli.ts.md +144 -0
  87. package/docs/modules/src__core__async.ts.md +18 -0
  88. package/docs/modules/src__core__consolidation.ts.md +158 -0
  89. package/docs/modules/src__core__git.ts.md +35 -0
  90. package/docs/modules/src__core__language-detection.ts.md +31 -0
  91. package/docs/modules/src__core__scanner.ts.md +101 -0
  92. package/docs/modules/src__core__signature-formatter.ts.md +232 -0
  93. package/docs/modules/src__core__symbol-classifier.ts.md +178 -0
  94. package/docs/modules/src__core__symbols.ts.md +31 -0
  95. package/docs/modules/src__drift__index.ts.md +53 -0
  96. package/docs/modules/src__extension.ts.md +418 -0
  97. package/docs/modules/src__generator__adr-linker.ts.md +154 -0
  98. package/docs/modules/src__generator__change-report.ts.md +85 -0
  99. package/docs/modules/src__generator__dependency-graph.ts.md +63 -0
  100. package/docs/modules/src__generator__index.ts.md +40 -0
  101. package/docs/modules/src__generator__module-doc.ts.md +242 -0
  102. package/docs/modules/src__index__index.ts.md +141 -0
  103. package/docs/modules/src__logging__index.ts.md +87 -0
  104. package/docs/modules/src__parsers__dependencies.ts.md +69 -0
  105. package/docs/modules/src__parsers__json-yaml.ts.md +81 -0
  106. package/docs/modules/src__parsers__python.ts.md +73 -0
  107. package/docs/modules/src__parsers__ts-js.ts.md +48 -0
  108. package/docs/modules/src__parsers__types.ts.md +99 -0
  109. package/docs/modules/src__ui__commands-provider.ts.md +70 -0
  110. package/docs/modules/src__ui__status-bar.ts.md +79 -0
  111. package/docs/modules/src__validator__index.ts.md +211 -0
  112. package/docs/modules/src__validator__signature-matching.ts.md +209 -0
  113. package/docs/modules/src__validator__status.ts.md +72 -0
  114. package/docs/modules/test-mcp-resources.js.md +27 -0
  115. package/docs/modules/tsconfig.json.md +22 -0
  116. package/docs/system/CHANGE_REPORT.md +19 -0
  117. package/docs/system/DEPENDENCIES.md +430 -0
  118. package/docs/system/DEPENDENCY_GRAPH.md +368 -0
  119. package/docs/system/NAVIGATION_SPACE_ANALYSIS.md +244 -0
  120. package/docs/system/NPX_CACHE_FIX.md +85 -0
  121. package/docs/system/NPX_LOCAL_USAGE.md +66 -0
  122. package/docs/system/PLUGIN_ECOSYSTEM_STATUS.md +465 -0
  123. package/docs/system/PLUGIN_UPDATE_GUIDE.md +212 -0
  124. package/docs/system/RULES_UPDATE_GUIDE.md +182 -0
  125. package/docs/system/SYSTEM_ANALYSIS.md +947 -0
  126. package/documentation.config.schema.json +77 -0
  127. package/noyrax-5d-database-plugin-0.1.8.tgz +0 -0
  128. package/out/cache/ast-cache.js +69 -0
  129. package/out/cache/ast-cache.js.map +1 -0
  130. package/out/cache/dependencies-cache.js +73 -0
  131. package/out/cache/dependencies-cache.js.map +1 -0
  132. package/out/cache/output-cache.js +69 -0
  133. package/out/cache/output-cache.js.map +1 -0
  134. package/out/cache/signature-cache.js +60 -0
  135. package/out/cache/signature-cache.js.map +1 -0
  136. package/out/cli/generate-cli.js +330 -0
  137. package/out/cli/generate-cli.js.map +1 -0
  138. package/out/cli/scan-cli.js +151 -0
  139. package/out/cli/scan-cli.js.map +1 -0
  140. package/out/cli/validate-cli.js +258 -0
  141. package/out/cli/validate-cli.js.map +1 -0
  142. package/out/core/async.js +38 -0
  143. package/out/core/async.js.map +1 -0
  144. package/out/core/consolidation.js +230 -0
  145. package/out/core/consolidation.js.map +1 -0
  146. package/out/core/git.js +48 -0
  147. package/out/core/git.js.map +1 -0
  148. package/out/core/language-detection.js +29 -0
  149. package/out/core/language-detection.js.map +1 -0
  150. package/out/core/scanner.js +179 -0
  151. package/out/core/scanner.js.map +1 -0
  152. package/out/core/signature-formatter.js +162 -0
  153. package/out/core/signature-formatter.js.map +1 -0
  154. package/out/core/symbol-classifier.js +96 -0
  155. package/out/core/symbol-classifier.js.map +1 -0
  156. package/out/core/symbols.js +24 -0
  157. package/out/core/symbols.js.map +1 -0
  158. package/out/drift/index.js +28 -0
  159. package/out/drift/index.js.map +1 -0
  160. package/out/extension.js +984 -0
  161. package/out/extension.js.map +1 -0
  162. package/out/generator/adr-linker.js +216 -0
  163. package/out/generator/adr-linker.js.map +1 -0
  164. package/out/generator/change-report.js +124 -0
  165. package/out/generator/change-report.js.map +1 -0
  166. package/out/generator/dependency-graph.js +98 -0
  167. package/out/generator/dependency-graph.js.map +1 -0
  168. package/out/generator/index.js +117 -0
  169. package/out/generator/index.js.map +1 -0
  170. package/out/generator/module-doc.js +438 -0
  171. package/out/generator/module-doc.js.map +1 -0
  172. package/out/index/index.js +147 -0
  173. package/out/index/index.js.map +1 -0
  174. package/out/logging/index.js +24 -0
  175. package/out/logging/index.js.map +1 -0
  176. package/out/parsers/dependencies.js +126 -0
  177. package/out/parsers/dependencies.js.map +1 -0
  178. package/out/parsers/json-yaml.js +90 -0
  179. package/out/parsers/json-yaml.js.map +1 -0
  180. package/out/parsers/python.js +160 -0
  181. package/out/parsers/python.js.map +1 -0
  182. package/out/parsers/ts-js.js +397 -0
  183. package/out/parsers/ts-js.js.map +1 -0
  184. package/out/parsers/types.js +3 -0
  185. package/out/parsers/types.js.map +1 -0
  186. package/out/ui/commands-provider.js +91 -0
  187. package/out/ui/commands-provider.js.map +1 -0
  188. package/out/ui/status-bar.js +85 -0
  189. package/out/ui/status-bar.js.map +1 -0
  190. package/out/validator/index.js +185 -0
  191. package/out/validator/index.js.map +1 -0
  192. package/out/validator/signature-matching.js +261 -0
  193. package/out/validator/signature-matching.js.map +1 -0
  194. package/out/validator/status.js +38 -0
  195. package/out/validator/status.js.map +1 -0
  196. package/package.json +306 -0
  197. package/publish.ps1 +21 -0
  198. package/scripts/verify-adrs.js +312 -0
  199. package/scripts/verify-architecture.js +181 -0
  200. package/scripts/verify-imports.js +274 -0
package/package.json ADDED
@@ -0,0 +1,306 @@
1
+ {
2
+ "name": "@noyrax/documentation-system-plugin",
3
+ "displayName": "Noyrax",
4
+ "description": "Documentation that never drifts. Automatic documentation generation with validation and drift detection. Generates 5-dimensional documentation structure (modules, symbols, dependencies, ADRs, changes) for codebases.",
5
+ "version": "1.0.4-beta.1",
6
+ "publisher": "noyrax",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/noyrax/noyrax.git",
10
+ "directory": "documentation-system-plugin"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "homepage": "https://noyrax.dev",
16
+ "bugs": {
17
+ "url": "https://github.com/noyrax/noyrax/issues"
18
+ },
19
+ "engines": {
20
+ "vscode": "^1.75.0"
21
+ },
22
+ "categories": [
23
+ "Documentation",
24
+ "Linters",
25
+ "Other"
26
+ ],
27
+ "keywords": [
28
+ "noyrax",
29
+ "documentation",
30
+ "docs-as-code",
31
+ "drift-detection",
32
+ "validation",
33
+ "typescript",
34
+ "python",
35
+ "code-analysis",
36
+ "ai-agent",
37
+ "mcp"
38
+ ],
39
+ "main": "./out/extension.js",
40
+ "activationEvents": [
41
+ "onStartupFinished"
42
+ ],
43
+ "contributes": {
44
+ "commands": [
45
+ {
46
+ "command": "noyrax.generate",
47
+ "title": "Noyrax: Generate Documentation",
48
+ "category": "Noyrax",
49
+ "icon": "$(file-text)"
50
+ },
51
+ {
52
+ "command": "noyrax.scan",
53
+ "title": "Noyrax: Scan Project",
54
+ "category": "Noyrax",
55
+ "icon": "$(search)"
56
+ },
57
+ {
58
+ "command": "noyrax.search",
59
+ "title": "Noyrax: Search in Documentation",
60
+ "category": "Noyrax",
61
+ "icon": "$(search)"
62
+ },
63
+ {
64
+ "command": "noyrax.validate",
65
+ "title": "Noyrax: Validate Documentation",
66
+ "category": "Noyrax",
67
+ "icon": "$(check)"
68
+ },
69
+ {
70
+ "command": "noyrax.drift",
71
+ "title": "Noyrax: Check for Drift",
72
+ "category": "Noyrax",
73
+ "icon": "$(warning)"
74
+ },
75
+ {
76
+ "command": "noyrax.open",
77
+ "title": "Noyrax: Open Documentation File",
78
+ "category": "Noyrax",
79
+ "icon": "$(file)"
80
+ },
81
+ {
82
+ "command": "noyrax.overview",
83
+ "title": "Noyrax: Show System Overview",
84
+ "category": "Noyrax",
85
+ "icon": "$(graph)"
86
+ },
87
+ {
88
+ "command": "noyrax.sync",
89
+ "title": "Noyrax: Sync Documentation",
90
+ "category": "Noyrax",
91
+ "icon": "$(sync)"
92
+ },
93
+ {
94
+ "command": "noyrax.fullCycle",
95
+ "title": "Noyrax: Full Cycle (Scan → Generate → Validate)",
96
+ "category": "Noyrax",
97
+ "icon": "$(sync)"
98
+ }
99
+ ],
100
+ "views": {
101
+ "explorer": [
102
+ {
103
+ "id": "noyraxExplorer",
104
+ "name": "Noyrax",
105
+ "when": "workspaceFolderCount > 0",
106
+ "icon": "$(book)"
107
+ }
108
+ ],
109
+ "noyraxPanel": [
110
+ {
111
+ "id": "noyraxCommands",
112
+ "name": "Noyrax Commands",
113
+ "when": "workspaceFolderCount > 0"
114
+ }
115
+ ]
116
+ },
117
+ "viewsContainers": {
118
+ "activitybar": [
119
+ {
120
+ "id": "noyraxPanel",
121
+ "title": "Noyrax",
122
+ "icon": "$(book)"
123
+ }
124
+ ]
125
+ },
126
+ "configuration": {
127
+ "title": "Noyrax",
128
+ "properties": {
129
+ "noyrax.workspaceRoot": {
130
+ "type": "string",
131
+ "default": "${workspaceFolder}",
132
+ "description": "Root directory of the workspace"
133
+ },
134
+ "noyrax.outputPath": {
135
+ "type": "string",
136
+ "default": "docs",
137
+ "description": "Output directory for generated documentation"
138
+ },
139
+ "noyrax.coverageThresholds.classes": {
140
+ "type": "number",
141
+ "default": 0.9,
142
+ "description": "Coverage threshold for public classes (0..1)"
143
+ },
144
+ "noyrax.coverageThresholds.interfaces": {
145
+ "type": "number",
146
+ "default": 0.9,
147
+ "description": "Coverage threshold for public interfaces (0..1)"
148
+ },
149
+ "noyrax.coverageThresholds.methods": {
150
+ "type": "number",
151
+ "default": 0.9,
152
+ "description": "Coverage threshold for public methods (0..1)"
153
+ },
154
+ "noyrax.coverageThresholds.functions": {
155
+ "type": "number",
156
+ "default": 0.8,
157
+ "description": "Coverage threshold for public functions (0..1)"
158
+ },
159
+ "noyrax.concurrency": {
160
+ "type": "number",
161
+ "default": 4,
162
+ "description": "Maximum parallelism for parsing/generating"
163
+ },
164
+ "noyrax.useGitDiff": {
165
+ "type": "boolean",
166
+ "default": true,
167
+ "description": "Only parse changed files (git diff)"
168
+ },
169
+ "noyrax.includeBackups": {
170
+ "type": "boolean",
171
+ "default": false,
172
+ "description": "Include backup/archive directories in scan"
173
+ },
174
+ "noyrax.includePrivate": {
175
+ "type": "boolean",
176
+ "default": false,
177
+ "description": "Include private/protected symbols in documentation"
178
+ },
179
+ "noyrax.blockOnDrift": {
180
+ "type": "boolean",
181
+ "default": false,
182
+ "description": "Show error instead of warning when drift is detected"
183
+ },
184
+ "noyrax.apiDoc.depth": {
185
+ "type": "string",
186
+ "enum": [
187
+ "full",
188
+ "standard",
189
+ "minimal"
190
+ ],
191
+ "default": "full",
192
+ "description": "Depth of generated API documentation for symbols (full | standard | minimal)."
193
+ },
194
+ "noyrax.apiDoc.includeInternal": {
195
+ "type": "boolean",
196
+ "default": false,
197
+ "description": "Also generate deep API documentation for internal (non-public) symbols."
198
+ }
199
+ }
200
+ },
201
+ "menus": {
202
+ "commandPalette": [
203
+ {
204
+ "command": "noyrax.generate",
205
+ "when": "workspaceFolderCount > 0"
206
+ },
207
+ {
208
+ "command": "noyrax.scan",
209
+ "when": "workspaceFolderCount > 0"
210
+ },
211
+ {
212
+ "command": "noyrax.validate",
213
+ "when": "workspaceFolderCount > 0"
214
+ }
215
+ ],
216
+ "view/title": [
217
+ {
218
+ "command": "noyrax.refresh",
219
+ "when": "view == noyraxExplorer",
220
+ "group": "navigation"
221
+ },
222
+ {
223
+ "command": "noyrax.generate",
224
+ "when": "view == noyraxCommands",
225
+ "group": "navigation@1"
226
+ },
227
+ {
228
+ "command": "noyrax.scan",
229
+ "when": "view == noyraxCommands",
230
+ "group": "navigation@2"
231
+ },
232
+ {
233
+ "command": "noyrax.validate",
234
+ "when": "view == noyraxCommands",
235
+ "group": "navigation@3"
236
+ }
237
+ ]
238
+ },
239
+ "keybindings": [
240
+ {
241
+ "command": "noyrax.scan",
242
+ "key": "ctrl+shift+n s",
243
+ "mac": "cmd+shift+n s",
244
+ "when": "workspaceFolderCount > 0"
245
+ },
246
+ {
247
+ "command": "noyrax.generate",
248
+ "key": "ctrl+shift+n g",
249
+ "mac": "cmd+shift+n g",
250
+ "when": "workspaceFolderCount > 0"
251
+ },
252
+ {
253
+ "command": "noyrax.validate",
254
+ "key": "ctrl+shift+n v",
255
+ "mac": "cmd+shift+n v",
256
+ "when": "workspaceFolderCount > 0"
257
+ },
258
+ {
259
+ "command": "noyrax.fullCycle",
260
+ "key": "ctrl+shift+n f",
261
+ "mac": "cmd+shift+n f",
262
+ "when": "workspaceFolderCount > 0"
263
+ }
264
+ ]
265
+ },
266
+ "scripts": {
267
+ "vscode:prepublish": "npm run compile",
268
+ "prepublishOnly": "npm run compile",
269
+ "compile": "tsc -p ./",
270
+ "watch": "tsc -watch -p ./",
271
+ "test": "jest",
272
+ "test:watch": "jest --watch",
273
+ "sonar": "sonar-scanner",
274
+ "sonar:local": "sonar-scanner -Dsonar.host.url=http://localhost:9000",
275
+ "sonar:cloud": "sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${SONAR_TOKEN}",
276
+ "quality": "npm run test && npm run sonar:cloud",
277
+ "package": "vsce package",
278
+ "publish": "vsce publish",
279
+ "publish:npm": "npm publish --access public",
280
+ "scan:cli": "node out/cli/scan-cli.js",
281
+ "validate:cli": "node out/cli/validate-cli.js",
282
+ "generate:cli": "node out/cli/generate-cli.js",
283
+ "verify:all": "node scripts/verify-architecture.js && node scripts/verify-adrs.js && node scripts/verify-imports.js",
284
+ "verify:architecture": "node scripts/verify-architecture.js",
285
+ "verify:adrs": "node scripts/verify-adrs.js",
286
+ "verify:imports": "node scripts/verify-imports.js"
287
+ },
288
+ "devDependencies": {
289
+ "@types/jest": "^29.5.12",
290
+ "@types/node": "16.x",
291
+ "@types/vscode": "^1.74.0",
292
+ "@vscode/vsce": "^2.22.0",
293
+ "jest": "^29.7.0",
294
+ "ts-jest": "^29.1.2",
295
+ "typescript": "^4.9.4"
296
+ },
297
+ "dependencies": {
298
+ "@noyrax/5d-database-plugin": "file:../database-plugin",
299
+ "@types/yaml": "^1.9.6",
300
+ "ignore": "^5.3.2",
301
+ "tree-sitter": "^0.21.1",
302
+ "tree-sitter-python": "^0.21.0",
303
+ "ts-morph": "^22.0.0",
304
+ "yaml": "^2.8.1"
305
+ }
306
+ }
package/publish.ps1 ADDED
@@ -0,0 +1,21 @@
1
+ # Publish Script für noyrax
2
+ # Führt npm login und publish direkt nacheinander aus
3
+
4
+ Write-Host "Schritt 1: npm login..." -ForegroundColor Yellow
5
+ npm login
6
+
7
+ if ($LASTEXITCODE -ne 0) {
8
+ Write-Host "Login fehlgeschlagen!" -ForegroundColor Red
9
+ exit 1
10
+ }
11
+
12
+ Write-Host "`nSchritt 2: npm publish..." -ForegroundColor Yellow
13
+ npm publish --access public
14
+
15
+ if ($LASTEXITCODE -eq 0) {
16
+ Write-Host "`n✅ Erfolgreich veröffentlicht!" -ForegroundColor Green
17
+ } else {
18
+ Write-Host "`n❌ Publish fehlgeschlagen!" -ForegroundColor Red
19
+ exit 1
20
+ }
21
+
@@ -0,0 +1,312 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Verification Script: ADR Claims
5
+ *
6
+ * Prüft ADR-Claims gegen Code:
7
+ * - Dateien existieren (Pattern: `Erstelle \`src/path/file.ts\``)
8
+ * - Funktionen existieren (Pattern: `functionName()`)
9
+ * - Imports funktionieren
10
+ */
11
+
12
+ const fs = require('fs');
13
+ const path = require('path');
14
+
15
+ const errors = [];
16
+ const warnings = [];
17
+
18
+ /**
19
+ * Rekursive Suche nach einem Pattern in einem Verzeichnis
20
+ */
21
+ function searchInDirectory(dir, pattern) {
22
+ const regex = new RegExp(`\\b${pattern}\\b`);
23
+ const files = fs.readdirSync(dir);
24
+
25
+ for (const file of files) {
26
+ const filePath = path.join(dir, file);
27
+ const stat = fs.statSync(filePath);
28
+
29
+ if (stat.isDirectory()) {
30
+ if (searchInDirectory(filePath, pattern)) {
31
+ return true;
32
+ }
33
+ } else if (file.endsWith('.ts') || file.endsWith('.js')) {
34
+ const content = fs.readFileSync(filePath, 'utf-8');
35
+ if (regex.test(content)) {
36
+ return true;
37
+ }
38
+ }
39
+ }
40
+ return false;
41
+ }
42
+
43
+ /**
44
+ * Extrahiert Claims aus einem ADR
45
+ */
46
+ function extractClaimsFromAdr(adrPath) {
47
+ const content = fs.readFileSync(adrPath, 'utf-8');
48
+ const claims = [];
49
+
50
+ // Pattern: "Erstelle `src/path/file.ts`"
51
+ // Pattern: "Erstelle: `src/path/file.ts`"
52
+ // Pattern: "- `src/path/file.ts`"
53
+ const createPattern = /(?:Erstelle|Erstellt|Erstellen|Create|Created|Creates)\s*:?\s*`([^`]+)`/gi;
54
+ let match;
55
+ while ((match = createPattern.exec(content)) !== null) {
56
+ const filePath = match[1].trim();
57
+ // Ignoriere Markdown-Links und andere nicht-Datei-Pfade
58
+ if (filePath.match(/\.(ts|js|json|md|yml|yaml)$/)) {
59
+ claims.push({
60
+ type: 'file-exists',
61
+ file: filePath,
62
+ adr: path.basename(adrPath),
63
+ line: content.substring(0, match.index).split('\n').length
64
+ });
65
+ }
66
+ }
67
+
68
+ // Pattern: "function foo()" oder "function foo("
69
+ // Pattern: "export function foo()"
70
+ // Pattern: "class Foo"
71
+ // Pattern: "export class Foo"
72
+ const funcPattern = /(?:export\s+)?(?:function|class|const|let|var)\s+(\w+)/g;
73
+ const funcMatches = [];
74
+ while ((match = funcPattern.exec(content)) !== null) {
75
+ const funcName = match[1];
76
+ // Nur wenn es in einem Code-Block oder als Claim erwähnt wird
77
+ const context = content.substring(Math.max(0, match.index - 50), match.index + 50);
78
+ if (context.includes('```') || context.includes('`') || context.includes('implementiert')) {
79
+ funcMatches.push({
80
+ name: funcName,
81
+ adr: path.basename(adrPath),
82
+ line: content.substring(0, match.index).split('\n').length
83
+ });
84
+ }
85
+ }
86
+
87
+ // Vereinfachte Funktion-Claims: Nur wenn explizit erwähnt
88
+ const explicitFuncPattern = /(?:implementiert|implemented|erstellt|created)\s+(?:die\s+)?(?:Funktion|function|Klasse|class)\s+`?(\w+)`?/gi;
89
+ while ((match = explicitFuncPattern.exec(content)) !== null) {
90
+ const funcName = match[1];
91
+ if (!funcMatches.find(f => f.name === funcName)) {
92
+ funcMatches.push({
93
+ name: funcName,
94
+ adr: path.basename(adrPath),
95
+ line: content.substring(0, match.index).split('\n').length,
96
+ explicit: true
97
+ });
98
+ }
99
+ }
100
+
101
+ // Pattern für automatisch generierte ADRs: Funktionen/Klassen in Backticks unter "Hauptfunktionen" oder "Hauptklassen"
102
+ // Pattern: "- `FunctionName()`" oder "- `ClassName`" oder "`FunctionName.`"
103
+ const autoGenPattern = /(?:Hauptfunktionen|Hauptklassen|Functions|Classes)[\s\S]*?`([A-Za-z_][A-Za-z0-9_]*)(?:\(|\.|`)/g;
104
+ while ((match = autoGenPattern.exec(content)) !== null) {
105
+ const funcName = match[1];
106
+ // Ignoriere generische Namen und Methoden-Namen (nur Klassen/Funktionen auf oberster Ebene)
107
+ const ignoreList = ['other', 'unknown', 'getChildren', 'getTreeItem', 'refresh', 'getDocumentationFiles', 'Thenable', 'TreeItem', 'ExtensionContext'];
108
+ if (!ignoreList.includes(funcName) && funcName.length > 2) {
109
+ if (!funcMatches.find(f => f.name === funcName)) {
110
+ funcMatches.push({
111
+ name: funcName,
112
+ adr: path.basename(adrPath),
113
+ line: content.substring(0, match.index).split('\n').length,
114
+ explicit: false, // Nicht explizit, aber sollte existieren
115
+ autoGenerated: true
116
+ });
117
+ }
118
+ }
119
+ }
120
+
121
+ // Zusätzliches Pattern: Funktionen/Klassen die direkt in Backticks erwähnt werden (z.B. "`activate()`")
122
+ const backtickPattern = /`([A-Za-z_][A-Za-z0-9_]*)\(\)`/g;
123
+ while ((match = backtickPattern.exec(content)) !== null) {
124
+ const funcName = match[1];
125
+ // Nur wenn es in einem relevanten Kontext ist (nicht in Code-Blöcken)
126
+ const contextBefore = content.substring(Math.max(0, match.index - 100), match.index);
127
+ const contextAfter = content.substring(match.index, Math.min(content.length, match.index + 100));
128
+ // Ignoriere Code-Blöcke (```)
129
+ if (!contextBefore.includes('```') && !contextAfter.includes('```')) {
130
+ // Nur wenn es in einem relevanten Abschnitt ist
131
+ if (contextBefore.includes('Hauptfunktionen') || contextBefore.includes('Functions') ||
132
+ contextBefore.includes('activate') || contextBefore.includes('deactivate')) {
133
+ if (!funcMatches.find(f => f.name === funcName)) {
134
+ funcMatches.push({
135
+ name: funcName,
136
+ adr: path.basename(adrPath),
137
+ line: content.substring(0, match.index).split('\n').length,
138
+ explicit: false,
139
+ autoGenerated: true
140
+ });
141
+ }
142
+ }
143
+ }
144
+ }
145
+
146
+ claims.push(...funcMatches.map(f => ({
147
+ type: 'function-exists',
148
+ name: f.name,
149
+ adr: f.adr,
150
+ line: f.line,
151
+ explicit: f.explicit
152
+ })));
153
+
154
+ return claims;
155
+ }
156
+
157
+ /**
158
+ * Verifiziert einen Claim
159
+ */
160
+ function verifyClaim(claim, workspaceRoot) {
161
+ if (claim.type === 'file-exists') {
162
+ const fullPath = path.join(workspaceRoot, claim.file);
163
+ const exists = fs.existsSync(fullPath);
164
+
165
+ if (!exists) {
166
+ // Prüfe ob es als .js in out/ existiert (kompilierte Version)
167
+ const jsPath = fullPath.replace(/^src\//, 'out/').replace(/\.ts$/, '.js');
168
+ const jsExists = fs.existsSync(path.join(workspaceRoot, jsPath));
169
+
170
+ if (jsExists) {
171
+ warnings.push({
172
+ adr: claim.adr,
173
+ line: claim.line,
174
+ claim: `File ${claim.file} exists as compiled ${jsPath}, but source not found`,
175
+ type: 'file-exists'
176
+ });
177
+ return true; // Akzeptabel
178
+ }
179
+
180
+ errors.push({
181
+ adr: claim.adr,
182
+ line: claim.line,
183
+ claim: `File ${claim.file} does not exist`,
184
+ type: 'file-exists'
185
+ });
186
+ return false;
187
+ }
188
+ return true;
189
+ }
190
+
191
+ if (claim.type === 'function-exists') {
192
+ try {
193
+ // Windows-optimierte Suche mit PowerShell
194
+ const srcDir = path.join(workspaceRoot, 'src');
195
+ if (!fs.existsSync(srcDir)) {
196
+ warnings.push({
197
+ adr: claim.adr,
198
+ line: claim.line,
199
+ claim: `Could not verify function ${claim.name} (src/ directory not found)`,
200
+ type: 'function-exists'
201
+ });
202
+ return true;
203
+ }
204
+
205
+ // Rekursive Suche in TypeScript-Dateien
206
+ const found = searchInDirectory(srcDir, claim.name);
207
+
208
+ if (!found) {
209
+ if (claim.explicit || claim.autoGenerated) {
210
+ // Explizite Claims und auto-generierte Claims sollten existieren
211
+ errors.push({
212
+ adr: claim.adr,
213
+ line: claim.line,
214
+ claim: `Function/class ${claim.name} not found in codebase${claim.autoGenerated ? ' (auto-generated ADR)' : ''}`,
215
+ type: 'function-exists'
216
+ });
217
+ return false;
218
+ } else {
219
+ // Nicht-explizite Claims sind nur Warnungen
220
+ warnings.push({
221
+ adr: claim.adr,
222
+ line: claim.line,
223
+ claim: `Function/class ${claim.name} mentioned but not found (may be non-critical)`,
224
+ type: 'function-exists'
225
+ });
226
+ return true;
227
+ }
228
+ }
229
+ return true;
230
+ } catch (error) {
231
+ warnings.push({
232
+ adr: claim.adr,
233
+ line: claim.line,
234
+ claim: `Could not verify function ${claim.name}: ${error.message}`,
235
+ type: 'function-exists'
236
+ });
237
+ return true; // Nicht kritisch wenn Verification fehlschlägt
238
+ }
239
+ }
240
+
241
+ return true;
242
+ }
243
+
244
+ /**
245
+ * Hauptfunktion
246
+ */
247
+ function main() {
248
+ const workspaceRoot = path.join(__dirname, '..');
249
+ const adrDir = path.join(workspaceRoot, 'docs', 'adr');
250
+
251
+ if (!fs.existsSync(adrDir)) {
252
+ console.log('⚠️ ADR directory not found, skipping verification');
253
+ process.exit(0);
254
+ }
255
+
256
+ console.log('🚀 Starting ADR claims verification...\n');
257
+
258
+ const adrFiles = fs.readdirSync(adrDir).filter(f => f.endsWith('.md') && f !== 'TEMPLATE.md');
259
+
260
+ let totalClaims = 0;
261
+ let verifiedClaims = 0;
262
+
263
+ for (const adrFile of adrFiles) {
264
+ const adrPath = path.join(adrDir, adrFile);
265
+ const claims = extractClaimsFromAdr(adrPath);
266
+
267
+ totalClaims += claims.length;
268
+
269
+ for (const claim of claims) {
270
+ const verified = verifyClaim(claim, workspaceRoot);
271
+ if (verified) {
272
+ verifiedClaims++;
273
+ }
274
+ }
275
+ }
276
+
277
+ console.log(`📊 Verification Summary:`);
278
+ console.log(` Total claims: ${totalClaims}`);
279
+ console.log(` Verified: ${verifiedClaims}`);
280
+ console.log(` Errors: ${errors.length}`);
281
+ console.log(` Warnings: ${warnings.length}`);
282
+
283
+ if (errors.length > 0) {
284
+ console.log('\n❌ ERRORS:');
285
+ errors.forEach((err, index) => {
286
+ console.log(` ${index + 1}. ${err.adr}:${err.line}`);
287
+ console.log(` ${err.claim}`);
288
+ });
289
+ }
290
+
291
+ if (warnings.length > 0 && process.argv.includes('--verbose')) {
292
+ console.log('\n⚠️ WARNINGS:');
293
+ warnings.forEach((warn, index) => {
294
+ console.log(` ${index + 1}. ${warn.adr}:${warn.line}`);
295
+ console.log(` ${warn.claim}`);
296
+ });
297
+ }
298
+
299
+ if (errors.length > 0) {
300
+ console.log('\n❌ ADR verification FAILED');
301
+ console.log(' Run with --verbose to see warnings');
302
+ process.exit(1);
303
+ } else {
304
+ console.log('\n✅ ADR verification PASSED');
305
+ if (warnings.length > 0) {
306
+ console.log(` (${warnings.length} warnings, run with --verbose to see details)`);
307
+ }
308
+ process.exit(0);
309
+ }
310
+ }
311
+
312
+ main();