@voodocs/cli 0.3.1 → 0.3.2

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 CHANGED
@@ -1,3 +1,16 @@
1
+ ## [0.3.2] - 2025-12-20
2
+
3
+ ### Fixed
4
+ - Fixed architecture decisions and modules parsing in yaml_utils.py
5
+ - Now properly converts dict objects to ArchitectureDecision and Module objects
6
+ - Fixes "'dict' object has no attribute 'decision'" error in context view
7
+ - Discovered during dogfooding (setting up VooDocs in vooodooo-magic repo)
8
+
9
+ ### Added
10
+ - Comprehensive @voodocs annotations to 4 core modules (commands, ai_integrations, checker, diagram)
11
+ - Self-documentation: VooDocs now documents itself using its own annotation system
12
+ - 93 lines of detailed annotations with dependencies, assumptions, invariants, security and performance models
13
+
1
14
  ## [0.3.1] - 2025-12-20
2
15
 
3
16
  ### Fixed
package/cli.py CHANGED
@@ -137,7 +137,7 @@ Documentation: https://github.com/3vilEnterprises/vooodooo-magic/tree/main/packa
137
137
  parser.add_argument(
138
138
  "--version",
139
139
  action="version",
140
- version="VooDocs 0.3.1"
140
+ version="VooDocs 0.3.2"
141
141
  )
142
142
 
143
143
  subparsers = parser.add_subparsers(dest="command", help="Available commands")
@@ -1,4 +1,25 @@
1
- """
1
+ """@voodocs
2
+ module_purpose: "Native AI assistant integrations (Claude, Cursor, Copilot, Windsurf, Cline)"
3
+ dependencies: [
4
+ "pathlib: File path handling",
5
+ "typing: Type hints"
6
+ ]
7
+ assumptions: [
8
+ "AI config directories follow standard conventions (.claude/skills/, .cursor/rules/, etc.)",
9
+ "Project root is current working directory",
10
+ "File system allows directory creation",
11
+ "UTF-8 encoding is supported"
12
+ ]
13
+ invariants: [
14
+ "All generated configs must be valid for their respective AIs",
15
+ "Detection must not modify any files",
16
+ "Generated content must be UTF-8 encoded",
17
+ "File paths must use forward slashes for cross-platform compatibility",
18
+ "Each AI integration must return Dict[str, str] mapping paths to content"
19
+ ]
20
+ security_model: "Read-only detection, write only when explicitly called by user commands"
21
+ performance_model: "O(1) for detection, O(k) for generation where k=number of AI assistants"
22
+
2
23
  AI-specific integration templates for VooDocs Context System.
3
24
 
4
25
  This module provides native integration with different AI assistants:
@@ -1,4 +1,27 @@
1
- """
1
+ """@voodocs
2
+ module_purpose: "Invariant checking system - validates code against documented invariants"
3
+ dependencies: [
4
+ "re: Pattern matching for code analysis",
5
+ "ast: Python AST parsing",
6
+ "pathlib: File traversal",
7
+ "dataclasses: Data structures for violations"
8
+ ]
9
+ assumptions: [
10
+ "Source files are text-based and UTF-8 encoded",
11
+ "Invariants are written in natural language",
12
+ "File system is readable",
13
+ "Code is syntactically valid (for AST parsing)"
14
+ ]
15
+ invariants: [
16
+ "Checker must never modify source files",
17
+ "All file reads must handle encoding errors gracefully",
18
+ "Pattern matching must be case-insensitive for security checks",
19
+ "Each invariant check must return a list of violations",
20
+ "Violation severity must be one of: error, warning, info"
21
+ ]
22
+ security_model: "Read-only access to source files, no execution of code"
23
+ performance_model: "O(n*m*l) where n=files, m=invariants, l=average lines per file"
24
+
2
25
  Invariant Checker
3
26
 
4
27
  Validates that code respects documented invariants.
@@ -1,4 +1,28 @@
1
- """
1
+ """@voodocs
2
+ module_purpose: "Core context system commands (init, generate, check, diagram, validate, etc.)"
3
+ dependencies: [
4
+ "yaml_utils: YAML parsing and serialization",
5
+ "models: Data structures for context",
6
+ "ai_integrations: AI assistant integration",
7
+ "checker: Invariant checking system",
8
+ "diagram: Architecture diagram generation"
9
+ ]
10
+ assumptions: [
11
+ "Context file (.voodocs.context) is in project root",
12
+ "Git is available for commit/author detection",
13
+ "Python 3.11+ is installed",
14
+ "Project root is current working directory"
15
+ ]
16
+ invariants: [
17
+ "Context file must be valid YAML",
18
+ "Version numbers must follow semver (major.minor)",
19
+ "All commands must return 0 (success) or 1 (error) exit code",
20
+ "Context updates must increment version number",
21
+ "Generated files must be UTF-8 encoded"
22
+ ]
23
+ security_model: "Read context from disk, write only with user confirmation for init"
24
+ performance_model: "O(1) for most commands, O(n) for generate where n=number of source files"
25
+
2
26
  Context System Commands
3
27
 
4
28
  Implements the command-line interface for the context system.
@@ -1,4 +1,25 @@
1
- """
1
+ """@voodocs
2
+ module_purpose: "Architecture diagram generation from context (Mermaid and D2 formats)"
3
+ dependencies: [
4
+ "subprocess: External diagram rendering (manus-render-diagram)",
5
+ "pathlib: File path handling",
6
+ "typing: Type hints"
7
+ ]
8
+ assumptions: [
9
+ "Context file contains architecture.modules section",
10
+ "manus-render-diagram utility is available for PNG rendering",
11
+ "Output directory is writable",
12
+ "Mermaid/D2 syntax is valid"
13
+ ]
14
+ invariants: [
15
+ "Generated diagrams must be valid Mermaid or D2 syntax",
16
+ "Module names must be sanitized for diagram syntax",
17
+ "Diagram generation must not modify context file",
18
+ "PNG rendering is optional and fails gracefully if utility unavailable"
19
+ ]
20
+ security_model: "Read context file, write diagram files to user-specified paths"
21
+ performance_model: "O(n) where n=number of modules, O(n^2) for dependency graphs"
22
+
2
23
  Architecture Diagram Generator
3
24
 
4
25
  Generates visual diagrams from context files.
@@ -121,9 +121,39 @@ def parse_context_file(data: Dict[str, Any]) -> ContextFile:
121
121
 
122
122
  # Parse architecture
123
123
  arch_data = data.get('architecture', {})
124
+
125
+ # Parse decisions
126
+ decisions_data = arch_data.get('decisions', [])
127
+ decisions = []
128
+ for dec in decisions_data:
129
+ if isinstance(dec, dict):
130
+ from .models import ArchitectureDecision
131
+ decisions.append(ArchitectureDecision(
132
+ decision=dec.get('decision', ''),
133
+ rationale=dec.get('rationale', ''),
134
+ alternatives_considered=dec.get('alternatives_considered', []),
135
+ tradeoffs=dec.get('tradeoffs'),
136
+ date=dec.get('date'),
137
+ author=dec.get('author')
138
+ ))
139
+
140
+ # Parse modules
141
+ modules_data = arch_data.get('modules', {})
142
+ modules = {}
143
+ for name, mod in modules_data.items():
144
+ if isinstance(mod, dict):
145
+ from .models import Module
146
+ modules[name] = Module(
147
+ description=mod.get('description', mod.get('purpose', '')),
148
+ path=mod.get('path'),
149
+ language=mod.get('language'),
150
+ dependencies=mod.get('dependencies', []),
151
+ public_api=mod.get('public_api', [])
152
+ )
153
+
124
154
  architecture = Architecture(
125
- decisions=arch_data.get('decisions', []),
126
- modules=arch_data.get('modules', {}),
155
+ decisions=decisions,
156
+ modules=modules,
127
157
  tech_stack=arch_data.get('tech_stack', {})
128
158
  )
129
159
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voodocs/cli",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "AI-Native Documentation System - Generate docs, tests, and API specs from @voodocs annotations using the DarkArts language",
5
5
  "main": "cli.py",
6
6
  "bin": {