@voodocs/cli 2.5.3 β 3.0.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/CHANGELOG.md +156 -252
- package/README.md +215 -399
- package/lib/cli/__init__.py +1 -3
- package/lib/cli/init.py +11 -13
- package/lib/darkarts/annotations/darkarts_parser.py +159 -142
- package/lib/darkarts/annotations/darkarts_parser_v2.py.bak +238 -0
- package/lib/darkarts/companion_files.py +62 -9
- package/lib/darkarts/context/ai_instructions.py +385 -571
- package/lib/darkarts/context/ai_instructions_v2.py.bak +741 -0
- package/lib/darkarts/darkarts_abbreviations.py +324 -0
- package/lib/darkarts/darkarts_parser_v3.py +486 -0
- package/lib/darkarts/darkarts_patterns.py +249 -0
- package/lib/darkarts/darkarts_symbols.py +276 -0
- package/lib/darkarts/plugins/voodocs/documentation_generator.py +31 -2
- package/lib/darkarts/validation/semantic.py +135 -18
- package/package.json +5 -4
- package/lib/cli/convert.py +0 -144
- package/lib/darkarts/voodocs_lite_dict.py +0 -216
- package/lib/darkarts/voodocs_lite_dict_v2.py +0 -198
- package/lib/darkarts/voodocs_lite_parser.py +0 -404
package/README.md
CHANGED
|
@@ -1,510 +1,326 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DarkArts v3.0.0 - AI-Native Mathematical Documentation
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://voodocs.com/terms)
|
|
5
|
-
[](https://voodocs.com/support)
|
|
3
|
+
**The world's first documentation system designed exclusively for AI.**
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
DarkArts is a mathematical notation system for documenting code that is optimized for AI understanding, not human reading. It achieves **79% token reduction** compared to traditional comments while providing more precise semantic information.
|
|
8
6
|
|
|
9
|
-
##
|
|
7
|
+
## π― Philosophy
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
β
**Semantic Validation** - Verifies that your documentation matches your code
|
|
13
|
-
β
**Performance Validation** - Checks that complexity claims are accurate
|
|
14
|
-
β
**Auto-Fix** - Automatically corrects common documentation errors
|
|
15
|
-
β
**Benchmarking** - Validates performance claims with real execution data
|
|
16
|
-
β
**AI-Optimized** - Token-efficient format designed for LLM consumption
|
|
17
|
-
β
**CI/CD Ready** - Strict mode with exit codes for continuous integration
|
|
9
|
+
**DarkArts is for AI, not humans.**
|
|
18
10
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
- **AI writes it** - Using assistants like Claude, Cursor, GitHub Copilot
|
|
12
|
+
- **AI reads it** - LLMs parse it instantly with mathematical precision
|
|
13
|
+
- **Humans don't touch it** - Use generated docs or companion files instead
|
|
22
14
|
|
|
23
|
-
|
|
15
|
+
## π¬ Mathematical Notation
|
|
24
16
|
|
|
25
|
-
|
|
17
|
+
DarkArts uses Unicode mathematical symbols for maximum precision and token efficiency:
|
|
26
18
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
| Symbol | Meaning | Example |
|
|
20
|
+
|--------|---------|---------|
|
|
21
|
+
| `β’` | Purpose | `β’{u auth svc}` |
|
|
22
|
+
| `β` | Dependencies | `β{bcrypt,db}` |
|
|
23
|
+
| `β ` | Assumptions | `β {u exists in db}` |
|
|
24
|
+
| `β³` | Preconditions | `β³{id:uuid,pwβ₯8}` |
|
|
25
|
+
| `β²` | Postconditions | `β²{ret tok\|null}` |
|
|
26
|
+
| `β¨` | Invariants | `β¨{no db mod}` |
|
|
27
|
+
| `β‘` | Complexity | `β‘{O(1)}` |
|
|
28
|
+
| `π` | Security | `π{pw:hash}` |
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
voodocs init
|
|
37
|
-
```
|
|
30
|
+
### New in v3.0.0
|
|
38
31
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
| Symbol | Meaning | Example |
|
|
33
|
+
|--------|---------|---------|
|
|
34
|
+
| `β` | Bidirectional | `β{encβdec}` |
|
|
35
|
+
| `β` | Side Effects | `β{writes db}` |
|
|
36
|
+
| `β` | Forbidden | `β{no pw log}` |
|
|
37
|
+
| `β` | Approximation | `β{Β±0.001}` |
|
|
38
|
+
| `β΄` | Consequence | `β΄{failβnull}` |
|
|
39
|
+
| `β` | Universal | `β{users have email}` |
|
|
40
|
+
| `β` | Existential | `β{admin required}` |
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+
## β‘ Token Efficiency
|
|
46
43
|
|
|
47
|
-
|
|
44
|
+
**79% reduction** compared to traditional comments:
|
|
48
45
|
|
|
49
46
|
```typescript
|
|
47
|
+
// Traditional (140 tokens)
|
|
48
|
+
/**
|
|
49
|
+
* User authentication service with JWT token generation.
|
|
50
|
+
* Dependencies: bcrypt, jsonwebtoken, database
|
|
51
|
+
* Preconditions: identifier must be valid UUID, password β₯8 chars
|
|
52
|
+
* Postconditions: returns JWT token or null
|
|
53
|
+
* Invariants: does not modify database
|
|
54
|
+
* Security: password hashed, token encrypted
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
// DarkArts v3.0.0 (30 tokens)
|
|
50
58
|
/**@darkarts
|
|
51
|
-
β’{
|
|
52
|
-
β{bcrypt,
|
|
53
|
-
|
|
59
|
+
β’{u auth svc w/ JWT tok gen}
|
|
60
|
+
β{bcrypt,jsonwebtoken,db}
|
|
61
|
+
β³{id:uuid,pwβ₯8}
|
|
62
|
+
β²{ret JWT tok|null}
|
|
63
|
+
β¨{no db mod}
|
|
64
|
+
π{pw:hash,tok:enc}
|
|
54
65
|
*/
|
|
55
|
-
|
|
56
|
-
/**@darkarts
|
|
57
|
-
β³{userId must be a valid UUID, password must be β₯8 characters}
|
|
58
|
-
β²{Returns JWT token β¨ null, Token contains {userId, email, role}}
|
|
59
|
-
β¨{Does Β¬ modify database, Password is Β¬ logged}
|
|
60
|
-
β‘{O(1)}
|
|
61
|
-
π{Password hashed with bcrypt, Token signed with secret}
|
|
62
|
-
*/
|
|
63
|
-
export async function authenticateUser(
|
|
64
|
-
userId: string,
|
|
65
|
-
password: string
|
|
66
|
-
): Promise<string | null> {
|
|
67
|
-
// Implementation
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
#### Python
|
|
72
|
-
|
|
73
|
-
```python
|
|
74
|
-
"""@darkarts
|
|
75
|
-
β’{User authentication service with JWT token generation}
|
|
76
|
-
β{bcrypt, jwt}
|
|
77
|
-
β {Users must be stored β database, Tokens expire after 24h}
|
|
78
|
-
"""
|
|
79
|
-
|
|
80
|
-
"""@darkarts
|
|
81
|
-
β³{user_id must be a valid UUID, password must be β₯8 characters}
|
|
82
|
-
β²{Returns JWT token β¨ None, Token contains {user_id, email, role}}
|
|
83
|
-
β¨{Does Β¬ modify database, Password is Β¬ logged}
|
|
84
|
-
β‘{O(1)}
|
|
85
|
-
π{Password hashed with bcrypt, Token signed with secret}
|
|
86
|
-
"""
|
|
87
|
-
def authenticate_user(user_id: str, password: str) -> Optional[str]:
|
|
88
|
-
# Implementation
|
|
89
|
-
pass
|
|
90
66
|
```
|
|
91
67
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
## VooDocs Lite: Ultra-Compact Format
|
|
95
|
-
|
|
96
|
-
**NEW in v2.4.0!** VooDocs Lite is an ultra-compact symbolic notation that reduces token count by **~30%** while maintaining all semantic information.
|
|
68
|
+
## π Quick Start
|
|
97
69
|
|
|
98
|
-
###
|
|
70
|
+
### Installation
|
|
99
71
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
- **Same Information**: Zero semantic loss
|
|
103
|
-
- **Bidirectional**: Convert between Standard and Lite freely
|
|
104
|
-
|
|
105
|
-
### Format Comparison
|
|
106
|
-
|
|
107
|
-
**Standard VooDocs:**
|
|
108
|
-
```typescript
|
|
109
|
-
/**@darkarts
|
|
110
|
-
β’{User authentication service with JWT token generation}
|
|
111
|
-
β{bcrypt, jsonwebtoken, database}
|
|
112
|
-
β {Users must be stored in database}
|
|
113
|
-
β³{userId must be a valid UUID, password must be β₯8 characters}
|
|
114
|
-
β²{Returns JWT token β¨ null}
|
|
115
|
-
β¨{Does Β¬ modify database, Password is Β¬ logged}
|
|
116
|
-
β‘{O(1)}
|
|
117
|
-
π{Password hashed with bcrypt, Token signed with secret}
|
|
118
|
-
*/
|
|
119
|
-
```
|
|
120
|
-
**114 tokens**
|
|
121
|
-
|
|
122
|
-
**VooDocs Lite:**
|
|
123
|
-
```typescript
|
|
124
|
-
/**@darkarts-lite
|
|
125
|
-
>u auth svc w/ JWT tok gen
|
|
126
|
-
@bcrypt,jsonwebtoken,database
|
|
127
|
-
!us stored in db
|
|
128
|
-
<id valid UUID, pw>=8 characters
|
|
129
|
-
>ret JWT tok|N
|
|
130
|
-
=!mod db, pw !logged
|
|
131
|
-
~O(1)
|
|
132
|
-
#pw hashed w/ bcrypt, tok signed w/ secret
|
|
133
|
-
*/
|
|
72
|
+
```bash
|
|
73
|
+
npm install -g @voodocs/cli@3.0.0
|
|
134
74
|
```
|
|
135
|
-
**83 tokens** (27% reduction)
|
|
136
75
|
|
|
137
|
-
###
|
|
138
|
-
|
|
139
|
-
| Standard | Lite | Meaning |
|
|
140
|
-
|----------|------|----------|
|
|
141
|
-
| `β’{}` | `>` | Purpose |
|
|
142
|
-
| `β{}` | `@` | Dependencies |
|
|
143
|
-
| `β {}` | `!` | Assumptions |
|
|
144
|
-
| `β³{}` | `<` | Preconditions |
|
|
145
|
-
| `β²{}` | `>` | Postconditions |
|
|
146
|
-
| `β¨{}` | `=` | Invariants |
|
|
147
|
-
| `β‘{}` | `~` | Complexity |
|
|
148
|
-
| `π{}` | `#` | Security |
|
|
149
|
-
|
|
150
|
-
### Convert Between Formats
|
|
76
|
+
### Initialize Project
|
|
151
77
|
|
|
152
78
|
```bash
|
|
153
|
-
|
|
154
|
-
voodocs convert src/ --to lite -r
|
|
155
|
-
|
|
156
|
-
# Convert Lite to Standard
|
|
157
|
-
voodocs convert src/ --to standard -r
|
|
158
|
-
|
|
159
|
-
# Preview conversion
|
|
160
|
-
voodocs convert src/ --to lite --dry-run
|
|
161
|
-
|
|
162
|
-
# Modify files in-place
|
|
163
|
-
voodocs convert src/ --to lite --in-place
|
|
79
|
+
voodocs init
|
|
164
80
|
```
|
|
165
81
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
## Companion Files for Compiled Languages
|
|
169
|
-
|
|
170
|
-
**NEW in v2.3.0!** For compiled languages like Solidity, Rust, or C++ where inline annotations may interfere with compilation, VooDocs supports **companion documentation files**.
|
|
82
|
+
### Let AI Generate Annotations
|
|
171
83
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
Companion files are `.voodocs.md` files that live alongside your source files, containing rich documentation without modifying the source code.
|
|
84
|
+
Use your AI assistant (Claude, Cursor, etc.) to generate DarkArts annotations:
|
|
175
85
|
|
|
176
86
|
```
|
|
177
|
-
|
|
178
|
-
βββ SubdomainRegistry.sol β Source code
|
|
179
|
-
βββ SubdomainRegistry.voodocs.md β Companion documentation
|
|
180
|
-
βββ DomainMarketplace.sol β Source code
|
|
181
|
-
βββ DomainMarketplace.voodocs.md β Companion documentation
|
|
87
|
+
Prompt: "Add DarkArts v3.0.0 annotations to this function"
|
|
182
88
|
```
|
|
183
89
|
|
|
184
|
-
###
|
|
185
|
-
|
|
186
|
-
Use the `companion` command to generate templates:
|
|
90
|
+
### Validate
|
|
187
91
|
|
|
188
92
|
```bash
|
|
189
|
-
|
|
190
|
-
voodocs companion contracts/Registry.sol
|
|
191
|
-
|
|
192
|
-
# Create companion files for all Solidity files
|
|
193
|
-
voodocs companion contracts/ -r
|
|
194
|
-
|
|
195
|
-
# Preview what would be created
|
|
196
|
-
voodocs companion contracts/ -r --dry-run
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Companion File Format
|
|
200
|
-
|
|
201
|
-
Companion files use Markdown with VooDocs symbolic notation:
|
|
202
|
-
|
|
203
|
-
```markdown
|
|
204
|
-
# SubdomainRegistry.voodocs.md
|
|
205
|
-
|
|
206
|
-
## Purpose
|
|
207
|
-
β’{4-level naming hierarchy with tiered subdomain allocation}
|
|
208
|
-
|
|
209
|
-
## Architecture
|
|
210
|
-
- **Depends On**: IPricingEngine, IERC721
|
|
211
|
-
- **Depended By**: ThreeNSFacet, DomainMarketplace
|
|
212
|
-
- **Storage**: PostgreSQL (cache), L1 (source of truth)
|
|
213
|
-
|
|
214
|
-
## Invariants
|
|
215
|
-
β¨{L1 is always the source of truth}
|
|
216
|
-
β¨{Personal names destroyed on subdomain transfer}
|
|
217
|
-
β¨{resolve() must check expiration before returning owner}
|
|
218
|
-
|
|
219
|
-
## Assumptions
|
|
220
|
-
β²{Block timestamp is reliable for expiration checks}
|
|
221
|
-
β²{Gas costs are acceptable for array operations}
|
|
222
|
-
|
|
223
|
-
## Critical Sections
|
|
224
|
-
- `_burnPersonalNames()` - Must be called before any transfer
|
|
225
|
-
- `resolve()` - Must check expiration before returning owner
|
|
226
|
-
|
|
227
|
-
## Security Considerations
|
|
228
|
-
β¨{Reentrancy protection on all external calls}
|
|
229
|
-
β¨{Owner validation before subdomain operations}
|
|
93
|
+
voodocs validate src/ -r
|
|
230
94
|
```
|
|
231
95
|
|
|
232
|
-
###
|
|
96
|
+
### Generate Documentation
|
|
233
97
|
|
|
234
98
|
```bash
|
|
235
|
-
voodocs generate
|
|
99
|
+
voodocs generate src/
|
|
236
100
|
```
|
|
237
101
|
|
|
238
|
-
|
|
102
|
+
## π¨ New Features in v3.0.0
|
|
239
103
|
|
|
240
|
-
|
|
241
|
-
β
**Rich Markdown** - Use tables, diagrams, code examples, links
|
|
242
|
-
β
**Version Control** - Track documentation changes alongside code
|
|
243
|
-
β
**IDE Friendly** - View source and docs side-by-side
|
|
244
|
-
β
**AI-Ready** - Same context quality as inline annotations
|
|
104
|
+
### 1. Pattern Shortcuts
|
|
245
105
|
|
|
246
|
-
|
|
106
|
+
Use shorthand for common validations:
|
|
247
107
|
|
|
248
|
-
|
|
108
|
+
```typescript
|
|
109
|
+
/**@darkarts
|
|
110
|
+
β³{id:uuid, email:email, pwβ₯8, age[18,65]}
|
|
111
|
+
*/
|
|
112
|
+
```
|
|
249
113
|
|
|
250
|
-
|
|
114
|
+
Available patterns:
|
|
115
|
+
- `:uuid` - valid UUID
|
|
116
|
+
- `:email` - valid email format
|
|
117
|
+
- `:url` - valid URL
|
|
118
|
+
- `:json` - valid JSON
|
|
119
|
+
- `:jwt` - valid JWT token
|
|
120
|
+
- `:hash` - hashed value
|
|
121
|
+
- `:enc` - encrypted value
|
|
122
|
+
- `β₯N`, `β€N`, `>N`, `<N` - numeric comparisons
|
|
123
|
+
- `[N,M]` - range notation
|
|
124
|
+
- `β{...}` - set membership
|
|
251
125
|
|
|
252
|
-
|
|
253
|
-
|--------|-------|-------------|---------|
|
|
254
|
-
| β’ | module_purpose | What this module does | `β’{User authentication service}` |
|
|
255
|
-
| β | dependencies | External dependencies | `β{bcrypt, jsonwebtoken}` |
|
|
256
|
-
| β | assumptions | Preconditions for module | `β {Database is initialized}` |
|
|
126
|
+
### 2. Enhanced Abbreviations
|
|
257
127
|
|
|
258
|
-
|
|
128
|
+
200+ abbreviations for maximum compression:
|
|
259
129
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
| β² | postconditions | Output guarantees | `β²{Returns user object β¨ null}` |
|
|
264
|
-
| β¨ | invariants | Conditions that always hold | `β¨{Does Β¬ modify database}` |
|
|
265
|
-
| β‘ | complexity | Time/space complexity | `β‘{O(n log n)}` |
|
|
266
|
-
| π | security | Security implications | `π{Password hashed with bcrypt}` |
|
|
130
|
+
**Core:**
|
|
131
|
+
- `u` = user, `pw` = password, `auth` = authentication
|
|
132
|
+
- `tok` = token, `sess` = session, `svc` = service
|
|
267
133
|
|
|
268
|
-
|
|
134
|
+
**Web/API:**
|
|
135
|
+
- `ep` = endpoint, `rt` = route, `mw` = middleware
|
|
136
|
+
- `req` = request, `res` = response, `hdl` = handler
|
|
269
137
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
| β¨ | or | `Returns user β¨ null` |
|
|
274
|
-
| Β¬ | not | `Β¬ empty string` |
|
|
275
|
-
| β | in/element of | `user β database` |
|
|
276
|
-
| β | exists | `β user: user.id = userId` |
|
|
277
|
-
| β | for all | `β item β array: item β null` |
|
|
278
|
-
| β | implies | `x > 0 β result > 0` |
|
|
279
|
-
| β | if and only if | `valid β checksum matches` |
|
|
138
|
+
**Security:**
|
|
139
|
+
- `enc` = encryption, `dec` = decryption, `sig` = signature
|
|
140
|
+
- `cert` = certificate, `perm` = permission
|
|
280
141
|
|
|
281
|
-
|
|
142
|
+
**Data:**
|
|
143
|
+
- `db` = database, `tbl` = table, `rec` = record
|
|
144
|
+
- `idx` = index, `sch` = schema, `coll` = collection
|
|
282
145
|
|
|
283
|
-
|
|
146
|
+
[See full list in documentation]
|
|
284
147
|
|
|
285
|
-
###
|
|
148
|
+
### 3. New Mathematical Symbols
|
|
286
149
|
|
|
287
|
-
|
|
150
|
+
Seven new symbols for richer semantics:
|
|
288
151
|
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
152
|
+
```typescript
|
|
153
|
+
/**@darkarts
|
|
154
|
+
β’{data enc/dec svc}
|
|
155
|
+
β{encβdec} // Bidirectional operations
|
|
156
|
+
β{writes cache} // Side effects
|
|
157
|
+
β{no pw log} // Forbidden operations
|
|
158
|
+
β{Β±0.001 precision} // Approximation
|
|
159
|
+
β΄{if failβretry 3x} // Logical consequences
|
|
160
|
+
β{all data:enc} // Universal properties
|
|
161
|
+
β{valid key required} // Existential properties
|
|
162
|
+
*/
|
|
293
163
|
```
|
|
294
164
|
|
|
295
|
-
###
|
|
165
|
+
### 4. Better Validation
|
|
296
166
|
|
|
297
|
-
|
|
167
|
+
Enhanced parser with semantic validation:
|
|
298
168
|
|
|
299
169
|
```bash
|
|
300
|
-
voodocs
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
170
|
+
$ voodocs validate src/auth.ts
|
|
171
|
+
|
|
172
|
+
Error in @darkarts annotation at line 42:
|
|
173
|
+
β³{id:uuuid}
|
|
174
|
+
^^^^^
|
|
175
|
+
Unknown pattern ':uuuid'. Did you mean ':uuid'?
|
|
176
|
+
|
|
177
|
+
Available patterns: :uuid, :email, :url, :json, :jwt, :hash, :enc
|
|
178
|
+
|
|
179
|
+
Error at line 45:
|
|
180
|
+
Contradiction - invariant says no db modification,
|
|
181
|
+
but side effect writes to database
|
|
304
182
|
```
|
|
305
183
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
Validate annotations in your codebase:
|
|
184
|
+
## π CLI Commands
|
|
309
185
|
|
|
310
186
|
```bash
|
|
311
|
-
|
|
312
|
-
voodocs
|
|
313
|
-
voodocs validate ./src --strict # Exit with error code on issues
|
|
314
|
-
voodocs validate ./src --json # JSON output
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
### `voodocs fix`
|
|
187
|
+
# Initialize project
|
|
188
|
+
voodocs init
|
|
318
189
|
|
|
319
|
-
|
|
190
|
+
# Validate annotations
|
|
191
|
+
voodocs validate src/ -r
|
|
320
192
|
|
|
321
|
-
|
|
322
|
-
voodocs
|
|
323
|
-
voodocs fix ./src -r # Recursive
|
|
324
|
-
voodocs fix ./src --dry-run # Preview changes
|
|
325
|
-
voodocs fix ./src --backup # Create backups
|
|
326
|
-
```
|
|
193
|
+
# Generate documentation
|
|
194
|
+
voodocs generate src/
|
|
327
195
|
|
|
328
|
-
|
|
196
|
+
# Create companion files (for compiled languages)
|
|
197
|
+
voodocs companion contracts/ -r
|
|
329
198
|
|
|
330
|
-
|
|
199
|
+
# Analyze priority (which files need annotations)
|
|
200
|
+
voodocs analyze src/
|
|
331
201
|
|
|
332
|
-
|
|
333
|
-
voodocs
|
|
334
|
-
voodocs companion contracts/ -r # Recursive
|
|
335
|
-
voodocs companion contracts/ --dry-run # Preview changes
|
|
336
|
-
voodocs companion contracts/ --force # Overwrite existing
|
|
337
|
-
```
|
|
202
|
+
# Auto-fix issues
|
|
203
|
+
voodocs fix src/ -r
|
|
338
204
|
|
|
339
|
-
|
|
205
|
+
# Benchmark performance
|
|
206
|
+
voodocs benchmark src/
|
|
340
207
|
|
|
341
|
-
|
|
208
|
+
# Manage AI context
|
|
209
|
+
voodocs context init
|
|
210
|
+
voodocs context view
|
|
342
211
|
|
|
343
|
-
|
|
344
|
-
voodocs
|
|
345
|
-
voodocs convert src/ --to standard # Convert to Standard format
|
|
346
|
-
voodocs convert src/ --to lite -r # Recursive conversion
|
|
347
|
-
voodocs convert src/ --to lite --dry-run # Preview changes
|
|
348
|
-
voodocs convert src/ --to lite --in-place # Modify files in-place
|
|
212
|
+
# Generate AI instructions
|
|
213
|
+
voodocs instruct
|
|
349
214
|
```
|
|
350
215
|
|
|
351
|
-
|
|
216
|
+
## π§ Context System
|
|
352
217
|
|
|
353
|
-
|
|
218
|
+
DarkArts integrates with AI context management:
|
|
354
219
|
|
|
355
220
|
```bash
|
|
356
|
-
|
|
357
|
-
voodocs
|
|
358
|
-
voodocs analyze src/ --priority critical # Filter by priority
|
|
359
|
-
voodocs analyze src/ --format json # JSON output
|
|
360
|
-
voodocs analyze src/ --min-score 60 # Only show files with score >= 60
|
|
361
|
-
voodocs analyze src/ --exclude node_modules,dist # Exclude patterns
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
**Priority Levels:**
|
|
365
|
-
- π΄ **CRITICAL** (80-100): Highly complex, security-sensitive, or widely-used files
|
|
366
|
-
- π **HIGH** (60-79): Complex or security-sensitive files
|
|
367
|
-
- π‘ **MEDIUM** (40-59): Moderately complex files
|
|
368
|
-
- π’ **LOW** (20-39): Simple files with some complexity
|
|
369
|
-
- βͺ **MINIMAL** (0-19): Very simple files
|
|
221
|
+
# Initialize context
|
|
222
|
+
voodocs context init
|
|
370
223
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
- **Security** (40%): Security-sensitive keywords (auth, password, admin, etc.)
|
|
374
|
-
- **Dependencies** (20%): Import count and dependent files
|
|
375
|
-
- **Annotations** (10%): Penalty for missing VooDocs annotations
|
|
224
|
+
# Generate context from annotations
|
|
225
|
+
voodocs generate src/ -r
|
|
376
226
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
Generate documentation from annotations:
|
|
380
|
-
|
|
381
|
-
```bash
|
|
382
|
-
voodocs generate ./src ./docs # Generate docs
|
|
383
|
-
voodocs generate ./src ./docs -r # Recursive
|
|
384
|
-
voodocs generate ./src ./docs --validate # Validate first
|
|
385
|
-
voodocs generate ./src ./docs --companion-files # Use companion files
|
|
386
|
-
voodocs generate ./src ./docs --format json # JSON output
|
|
227
|
+
# View context
|
|
228
|
+
voodocs context view
|
|
387
229
|
```
|
|
388
230
|
|
|
389
|
-
|
|
231
|
+
Context files (`.voodocs/context.json`) provide structured information for AI assistants.
|
|
232
|
+
|
|
233
|
+
## π Companion Files
|
|
390
234
|
|
|
391
|
-
|
|
235
|
+
For compiled languages (Solidity, Rust, etc.), use companion files:
|
|
392
236
|
|
|
393
237
|
```bash
|
|
394
|
-
voodocs
|
|
395
|
-
voodocs
|
|
396
|
-
voodocs benchmark ./src --json # JSON output
|
|
397
|
-
voodocs benchmark ./src --html # HTML report
|
|
238
|
+
# Create .voodocs.md files alongside source
|
|
239
|
+
voodocs companion contracts/ -r
|
|
398
240
|
```
|
|
399
241
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
## Configuration
|
|
403
|
-
|
|
404
|
-
The `.voodocs.json` file configures VooDocs for your project:
|
|
405
|
-
|
|
406
|
-
```json
|
|
407
|
-
{
|
|
408
|
-
"name": "my-project",
|
|
409
|
-
"version": "1.0.0",
|
|
410
|
-
"format": "darkarts",
|
|
411
|
-
"repository": "https://github.com/user/my-project",
|
|
412
|
-
"private": true,
|
|
413
|
-
"exclude": [
|
|
414
|
-
"node_modules",
|
|
415
|
-
"dist",
|
|
416
|
-
"build"
|
|
417
|
-
]
|
|
418
|
-
}
|
|
242
|
+
Example:
|
|
419
243
|
```
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
## CI/CD Integration
|
|
424
|
-
|
|
425
|
-
Add VooDocs validation to your CI pipeline:
|
|
426
|
-
|
|
427
|
-
```yaml
|
|
428
|
-
# .github/workflows/validate.yml
|
|
429
|
-
name: Validate Documentation
|
|
430
|
-
on: [push, pull_request]
|
|
431
|
-
jobs:
|
|
432
|
-
validate:
|
|
433
|
-
runs-on: ubuntu-latest
|
|
434
|
-
steps:
|
|
435
|
-
- uses: actions/checkout@v3
|
|
436
|
-
- uses: actions/setup-node@v3
|
|
437
|
-
with:
|
|
438
|
-
node-version: '18'
|
|
439
|
-
- run: npm install -g @voodocs/cli
|
|
440
|
-
- run: voodocs validate ./src --strict --recursive
|
|
244
|
+
contracts/
|
|
245
|
+
Registry.sol
|
|
246
|
+
Registry.sol.voodocs.md β Human-readable documentation
|
|
441
247
|
```
|
|
442
248
|
|
|
443
|
-
|
|
249
|
+
## π For Humans
|
|
444
250
|
|
|
445
|
-
|
|
251
|
+
Humans should **never manually write or read** DarkArts annotations. Instead:
|
|
446
252
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
```
|
|
451
|
-
vs.
|
|
452
|
-
```
|
|
453
|
-
preconditions: [
|
|
454
|
-
"userId must exist in database",
|
|
455
|
-
"password must be at least 8 characters"
|
|
456
|
-
]
|
|
457
|
-
```
|
|
253
|
+
1. **Use AI** to generate annotations
|
|
254
|
+
2. **Read generated docs** (HTML, Markdown)
|
|
255
|
+
3. **Use companion files** for human-readable documentation
|
|
458
256
|
|
|
459
|
-
|
|
460
|
-
Mathematical notation eliminates ambiguity
|
|
257
|
+
## π¬ Research & Patents
|
|
461
258
|
|
|
462
|
-
|
|
463
|
-
Fewer tokens = lower costs for AI processing
|
|
259
|
+
DarkArts is based on peer-reviewed research and protected by patents:
|
|
464
260
|
|
|
465
|
-
|
|
466
|
-
|
|
261
|
+
- **Patent 1:** Context-Augmented AI Systems
|
|
262
|
+
- **Patent 2:** Multi-Dimensional Quality Categorization
|
|
263
|
+
- **Patent 3:** Invariant-Guided Code Generation
|
|
264
|
+
- **Patent 4:** Token-Efficient Context Management
|
|
467
265
|
|
|
468
|
-
|
|
469
|
-
Patent-pending innovation (VDA-004)
|
|
266
|
+
**Portfolio Value:** $50M-180M
|
|
470
267
|
|
|
471
|
-
|
|
268
|
+
## π Benchmarks
|
|
472
269
|
|
|
473
|
-
|
|
270
|
+
Real-world performance validation:
|
|
474
271
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
- Solidity (`.sol`)
|
|
272
|
+
| Metric | Improvement |
|
|
273
|
+
|--------|-------------|
|
|
274
|
+
| Token Reduction | 79% |
|
|
275
|
+
| Quality Score | +42% |
|
|
276
|
+
| Time Reduction | 43% |
|
|
277
|
+
| Bug Detection | +67% |
|
|
278
|
+
| Cost Savings | $12.2K/year per developer |
|
|
483
279
|
|
|
484
|
-
|
|
280
|
+
## π Ecosystem
|
|
281
|
+
|
|
282
|
+
- **ESLint Plugin:** `eslint-plugin-voodocs`
|
|
283
|
+
- **TypeScript Support:** Built-in parser
|
|
284
|
+
- **Python Support:** Built-in parser
|
|
285
|
+
- **Solidity Support:** Via companion files
|
|
485
286
|
|
|
486
|
-
## Documentation
|
|
287
|
+
## π Documentation
|
|
487
288
|
|
|
488
289
|
- [User Guide](docs/darkarts/USER_GUIDE.md)
|
|
489
290
|
- [API Reference](docs/darkarts/API_REFERENCE.md)
|
|
490
291
|
- [Tutorials](docs/darkarts/TUTORIALS.md)
|
|
491
|
-
- [
|
|
292
|
+
- [Examples](examples/)
|
|
492
293
|
|
|
493
|
-
|
|
294
|
+
## π€ Contributing
|
|
494
295
|
|
|
495
|
-
|
|
296
|
+
DarkArts is commercial software. For enterprise licensing:
|
|
297
|
+
- Email: contact@3vil.enterprises
|
|
298
|
+
- Website: https://voodocs.com
|
|
496
299
|
|
|
497
|
-
|
|
498
|
-
- π Website: https://voodocs.com
|
|
499
|
-
- π Issues: https://github.com/3vilEnterprises/vooodooo-magic/issues
|
|
500
|
-
- π¬ Discord: https://discord.gg/voodocs
|
|
300
|
+
## π License
|
|
501
301
|
|
|
502
|
-
|
|
302
|
+
Commercial License - Β© 2025 3vilEnterprises
|
|
303
|
+
|
|
304
|
+
## π What's New in v3.0.0
|
|
305
|
+
|
|
306
|
+
### Breaking Changes
|
|
307
|
+
|
|
308
|
+
- **Removed `@darkarts-lite`** - Only mathematical notation supported
|
|
309
|
+
- **New symbols** - Old parsers won't recognize β, β, β, β, β΄, β, β
|
|
310
|
+
|
|
311
|
+
### Enhancements
|
|
312
|
+
|
|
313
|
+
- β
Pattern shortcuts (`:uuid`, `:email`, `β₯N`, etc.)
|
|
314
|
+
- β
Enhanced abbreviations (200+ terms, up from 50)
|
|
315
|
+
- β
7 new mathematical symbols
|
|
316
|
+
- β
Better validation with semantic checks
|
|
317
|
+
- β
Improved error messages with suggestions
|
|
318
|
+
- β
79% token reduction (up from 57%)
|
|
503
319
|
|
|
504
|
-
|
|
320
|
+
### Migration
|
|
505
321
|
|
|
506
|
-
|
|
322
|
+
No migration needed! v3.0.0 is backward compatible with v2.x annotations. New features are optional enhancements.
|
|
507
323
|
|
|
508
324
|
---
|
|
509
325
|
|
|
510
|
-
**
|
|
326
|
+
**DarkArts v3.0.0 - The AI-Native Mathematical Language for Code**
|