@voodocs/cli 2.2.1 → 2.2.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 +38 -215
- package/LICENSE +1 -1
- package/PRIVACY.md +10 -10
- package/README.md +35 -39
- package/USAGE.md +27 -50
- package/examples/.cursorrules +9 -9
- package/examples/instructions/.claude/instructions.md +65 -77
- package/examples/instructions/.cursorrules +9 -9
- package/examples/instructions/.windsurfrules +9 -9
- package/examples/instructions/VOODOCS_INSTRUCTIONS.md +62 -74
- package/examples/math_example.py +1 -1
- package/examples/phase2_test.py +1 -1
- package/examples/test_function_invariants.py +1 -1
- package/lib/cli/__init__.py +3 -3
- package/lib/cli/benchmark.py +3 -3
- package/lib/cli/context.py +1 -1
- package/lib/cli/fix.py +1 -1
- package/lib/cli/generate.py +1 -1
- package/lib/cli/init.py +10 -10
- package/lib/cli/instruct.py +1 -1
- package/lib/cli/validate.py +3 -3
- package/lib/darkarts/annotations/DARKARTS_SYMBOLS.md +95 -110
- package/lib/darkarts/annotations/TRANSFORMATION_EXAMPLES.md +27 -29
- package/lib/darkarts/annotations/parser.py +215 -36
- package/lib/darkarts/cli_darkarts.py +5 -5
- package/lib/darkarts/context/ai_instructions.py +12 -12
- package/lib/darkarts/context/ai_integrations.py +16 -16
- package/lib/darkarts/context/commands.py +4 -4
- package/lib/darkarts/context/errors.py +1 -1
- package/lib/darkarts/context/models.py +1 -1
- package/lib/darkarts/context/ui.py +4 -4
- package/lib/darkarts/context/yaml_utils.py +3 -3
- package/lib/darkarts/core/loader.py +1 -1
- package/lib/darkarts/exceptions.py +3 -3
- package/lib/darkarts/parsers/typescript/dist/parser.d.ts +16 -0
- package/lib/darkarts/parsers/typescript/dist/parser.d.ts.map +1 -1
- package/lib/darkarts/parsers/typescript/dist/parser.js +64 -0
- package/lib/darkarts/parsers/typescript/dist/parser.js.map +1 -1
- package/lib/darkarts/parsers/typescript/src/parser.ts +68 -0
- package/lib/darkarts/plugins/voodocs/ai_native_plugin.py +1 -1
- package/lib/darkarts/plugins/voodocs/annotation_validator.py +2 -2
- package/lib/darkarts/plugins/voodocs/documentation_generator.py +3 -3
- package/lib/darkarts/plugins/voodocs/html_exporter.py +4 -4
- package/lib/darkarts/plugins/voodocs/instruction_generator.py +10 -10
- package/lib/darkarts/plugins/voodocs/pdf_exporter.py +1 -1
- package/lib/darkarts/plugins/voodocs/test_generator.py +1 -1
- package/lib/darkarts/telemetry.py +5 -5
- package/lib/darkarts/validation/README.md +3 -6
- package/package.json +1 -1
- package/requirements.txt +2 -2
- package/templates/ci/github-actions.yml +64 -64
- package/templates/ci/pre-commit-hook.sh +4 -4
- package/voodocs_cli.py +1 -1
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: VooDocs Validation
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
branches: [main, develop]
|
|
5
|
+
branches: [ main, develop ]
|
|
6
6
|
pull_request:
|
|
7
|
-
branches: [main, develop]
|
|
7
|
+
branches: [ main, develop ]
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
validate:
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
steps:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
14
|
+
- uses: actions/checkout@v3
|
|
15
|
+
|
|
16
|
+
- name: Set up Python
|
|
17
|
+
uses: actions/setup-python@v4
|
|
18
|
+
with:
|
|
19
|
+
python-version: '3.11'
|
|
20
|
+
|
|
21
|
+
- name: Set up Node.js
|
|
22
|
+
uses: actions/setup-node@v3
|
|
23
|
+
with:
|
|
24
|
+
node-version: '18'
|
|
25
|
+
|
|
26
|
+
- name: Install VooDocs
|
|
27
|
+
run: |
|
|
28
|
+
pip install pyyaml
|
|
29
|
+
# TODO: Replace with: pip install voodocs
|
|
30
|
+
# For now, clone and install locally
|
|
31
|
+
|
|
32
|
+
- name: Validate Annotations
|
|
33
|
+
run: |
|
|
34
|
+
voodocs validate . --strict --format json > validation-report.json
|
|
35
|
+
|
|
36
|
+
- name: Check Coverage
|
|
37
|
+
run: |
|
|
38
|
+
voodocs check --min-coverage 80 --min-quality 70
|
|
39
|
+
|
|
40
|
+
- name: Upload Validation Report
|
|
41
|
+
if: always()
|
|
42
|
+
uses: actions/upload-artifact@v3
|
|
43
|
+
with:
|
|
44
|
+
name: voodocs-validation-report
|
|
45
|
+
path: validation-report.json
|
|
46
|
+
|
|
47
|
+
- name: Comment PR with Results
|
|
48
|
+
if: github.event_name == 'pull_request'
|
|
49
|
+
uses: actions/github-script@v6
|
|
50
|
+
with:
|
|
51
|
+
script: |
|
|
52
|
+
const fs = require('fs');
|
|
53
|
+
const report = JSON.parse(fs.readFileSync('validation-report.json', 'utf8'));
|
|
54
|
+
|
|
55
|
+
const comment = `## VooDocs Validation Report
|
|
56
|
+
|
|
57
|
+
📊 **Summary**
|
|
58
|
+
- Files validated: ${report.files_validated}
|
|
59
|
+
- Files with issues: ${report.files_with_issues}
|
|
60
|
+
- Total issues: ${report.summary.total}
|
|
61
|
+
- Errors: ${report.summary.errors}
|
|
62
|
+
- Warnings: ${report.summary.warnings}
|
|
63
|
+
- Info: ${report.summary.info}
|
|
64
|
+
|
|
65
|
+
${report.summary.errors > 0 ? '❌ Validation failed' : report.summary.warnings > 0 ? '⚠️ Validation passed with warnings' : '✅ Validation passed'}
|
|
66
|
+
`;
|
|
67
|
+
|
|
68
|
+
github.rest.issues.createComment({
|
|
69
|
+
issue_number: context.issue.number,
|
|
70
|
+
owner: context.repo.owner,
|
|
71
|
+
repo: context.repo.repo,
|
|
72
|
+
body: comment
|
|
73
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
2
|
+
# VooDocs Pre-Commit Hook
|
|
3
3
|
# Validates annotations before allowing commit
|
|
4
4
|
|
|
5
|
-
echo "🔍
|
|
5
|
+
echo "🔍 VooDocs: Validating annotations..."
|
|
6
6
|
|
|
7
7
|
# Get list of staged Python/TypeScript files
|
|
8
8
|
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(py|ts|js)$')
|
|
@@ -17,10 +17,10 @@ voodocs validate $STAGED_FILES --strict
|
|
|
17
17
|
|
|
18
18
|
if [ $? -ne 0 ]; then
|
|
19
19
|
echo ""
|
|
20
|
-
echo "❌
|
|
20
|
+
echo "❌ VooDocs validation failed!"
|
|
21
21
|
echo " Fix the annotation issues above or use 'git commit --no-verify' to skip validation."
|
|
22
22
|
exit 1
|
|
23
23
|
fi
|
|
24
24
|
|
|
25
|
-
echo "✅
|
|
25
|
+
echo "✅ VooDocs validation passed!"
|
|
26
26
|
exit 0
|