1
2
3
4
5
6
7
8
9
10
11
12
13
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
74
75
76
77
78
79
80
# Documentation Drift Detection and Correction Workflow
# Analyzes and fixes inconsistencies between code and documentation
# Phase 1: Analysis
- claude: "/prodigy-docs-drift-analyze"
# Phase 2: Review drift report
- shell: |
if [ -f .prodigy/documentation-drift.json ]; then
echo "Documentation drift report generated:"
jq '.summary' .prodigy/documentation-drift.json
else
echo "No drift report found"
exit 1
fi
# Phase 3: Fix critical issues first
- claude: "/prodigy-docs-drift-update critical only"
commit_required: true
# Phase 4: Fix major issues
- claude: "/prodigy-docs-drift-update major"
commit_required: true
# Phase 5: Update remaining documentation
- claude: "/prodigy-docs-drift-update incremental"
commit_required: true
# Phase 6: Re-analyze to verify fixes
- claude: "/prodigy-docs-drift-analyze"
# Phase 7: Generate final report
- shell: |
if [ -f .prodigy/documentation-drift.json ]; then
echo "=== Final Documentation Status ==="
jq '.summary' .prodigy/documentation-drift.json
remaining=$(jq '.summary.total_issues' .prodigy/documentation-drift.json)
if [ "$remaining" -eq 0 ]; then
echo "✅ All documentation drift has been resolved!"
else
echo "⚠️ $remaining documentation issues remain"
echo "These may require manual intervention"
fi
fi
# Step 8: Run documentation tests to verify implementation
- shell: "cargo test --doc"
timeout: 300 # 5 minutes
on_failure:
claude: "/prodigy-debug-test-failure --output ${shell.output}"
commit_required: true
max_attempts: 3
fail_workflow: false # Continue workflow even if tests can't be fixed
# Step 9: Run linting and formatting after implementation
- shell: "just fmt-check && just lint"
on_failure:
claude: "/prodigy-lint ${shell.output}"
commit_required: true
max_attempts: 3
fail_workflow: false
# This workflow:
# 1. Analyzes all documentation for drift
# 2. Reviews the drift report
# 3. Fixes critical issues first (wrong information)
# 4. Fixes major issues (significant discrepancies)
# 5. Updates remaining documentation incrementally
# 6. Re-analyzes to verify all fixes
# 7. Generates final status report
# 8. Ensures proper formatting
# 9. Tests documentation examples
# Usage:
# prodigy cook workflows/documentation-drift.yml
#
# Options:
# - Use --verbose for detailed output
# - Use --dry-run to preview without making changes
# - Results saved in .prodigy/documentation-drift.json (session-specific, not committed)