@codihaus/claude-skills 1.6.9 → 1.6.10
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: utils/docs-graph
|
|
3
3
|
description: View and query the documentation knowledge graph
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /utils/docs-graph - Documentation Graph Viewer
|
|
@@ -18,74 +18,47 @@ View and query relationships between planning documents.
|
|
|
18
18
|
- See overview of all plans and their relationships
|
|
19
19
|
- Find related documents before making changes
|
|
20
20
|
- Check impact of changes (what links to this?)
|
|
21
|
-
- Verify
|
|
21
|
+
- Verify links are valid
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
25
25
|
```
|
|
26
26
|
/utils/docs-graph # Show graph summary
|
|
27
27
|
/utils/docs-graph auth # Show nodes related to "auth"
|
|
28
|
-
/utils/docs-graph --regenerate # Force regenerate graph
|
|
29
28
|
/utils/docs-graph --check # Verify all links resolve
|
|
30
29
|
```
|
|
31
30
|
|
|
32
31
|
## How It Works
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
1. Hook detects file path contains `plans/`
|
|
40
|
-
2. Runs `python3 scripts/graph.py --check-path <path>`
|
|
41
|
-
3. Graph files updated before next Claude action
|
|
42
|
-
|
|
43
|
-
### Graph Files
|
|
33
|
+
**Automatic Updates:**
|
|
34
|
+
- PostToolUse hook triggers on Write/Edit to `plans/`
|
|
35
|
+
- Regenerates entire graph from all files in `plans/`
|
|
36
|
+
- Updates `plans/docs-graph.json` and `plans/docs-graph.md`
|
|
37
|
+
- Timeout: 3 minutes
|
|
44
38
|
|
|
39
|
+
**Graph Files:**
|
|
45
40
|
```
|
|
46
41
|
plans/
|
|
47
42
|
├── docs-graph.json # Machine-readable graph data
|
|
48
43
|
└── docs-graph.md # Mermaid visualization
|
|
49
44
|
```
|
|
50
45
|
|
|
51
|
-
##
|
|
52
|
-
|
|
53
|
-
### Phase 1: Load Graph
|
|
54
|
-
|
|
55
|
-
1. Check if `plans/docs-graph.json` exists
|
|
56
|
-
2. If not, run `python3 scripts/graph.py` to generate
|
|
57
|
-
3. Read graph data
|
|
58
|
-
|
|
59
|
-
### Phase 2: Display or Query
|
|
46
|
+
## Expected Outcome
|
|
60
47
|
|
|
61
48
|
**Summary mode (default):**
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
- List any errors
|
|
66
|
-
|
|
67
|
-
**Query mode (with argument):**
|
|
68
|
-
- Filter nodes matching query
|
|
69
|
-
- Show incoming links (what references this)
|
|
70
|
-
- Show outgoing links (what this references)
|
|
49
|
+
- Node count by type
|
|
50
|
+
- Edge count
|
|
51
|
+
- Mermaid diagram from docs-graph.md
|
|
71
52
|
|
|
72
|
-
**
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
53
|
+
**Query mode (with argument like "auth"):**
|
|
54
|
+
- Matching nodes
|
|
55
|
+
- Incoming links (what references this)
|
|
56
|
+
- Outgoing links (what this references)
|
|
76
57
|
|
|
77
58
|
**Check mode (--check):**
|
|
78
|
-
- Verify all wikilinks resolve to existing nodes
|
|
79
59
|
- Report broken links
|
|
80
60
|
- Suggest fixes
|
|
81
61
|
|
|
82
|
-
### Phase 3: Output
|
|
83
|
-
|
|
84
|
-
Display results with:
|
|
85
|
-
- Mermaid diagram (if summary)
|
|
86
|
-
- Table of matching nodes (if query)
|
|
87
|
-
- Broken link report (if check)
|
|
88
|
-
|
|
89
62
|
## Wikilink Convention
|
|
90
63
|
|
|
91
64
|
Documents use `[[wikilinks]]` to reference each other:
|
package/templates/hooks-guide.md
CHANGED
|
@@ -158,13 +158,15 @@ if [ ! -f ".claude/scripts/graph.py" ]; then
|
|
|
158
158
|
exit 0
|
|
159
159
|
fi
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
# Full regeneration (scans all files in plans/)
|
|
162
|
+
timeout 180s python3 .claude/scripts/graph.py || true
|
|
162
163
|
```
|
|
163
164
|
|
|
164
165
|
Then in settings.json:
|
|
165
166
|
```json
|
|
166
167
|
{
|
|
167
|
-
"command": "bash .claude/scripts/safe-graph-update.sh $PATH"
|
|
168
|
+
"command": "bash .claude/scripts/safe-graph-update.sh $PATH",
|
|
169
|
+
"timeout": 180000
|
|
168
170
|
}
|
|
169
171
|
```
|
|
170
172
|
|
|
@@ -182,7 +184,8 @@ Choose the right `failureAction` based on hook criticality:
|
|
|
182
184
|
**Example - Non-critical hook:**
|
|
183
185
|
```json
|
|
184
186
|
{
|
|
185
|
-
"command": "python3 .claude/scripts/graph.py
|
|
187
|
+
"command": "timeout 180 python3 .claude/scripts/graph.py || true",
|
|
188
|
+
"timeout": 180000,
|
|
186
189
|
"retries": {
|
|
187
190
|
"maxAttempts": 3,
|
|
188
191
|
"failureAction": "warn"
|
|
@@ -5,18 +5,17 @@
|
|
|
5
5
|
# This script provides resilient execution of graph.py with:
|
|
6
6
|
# - Dependency checking
|
|
7
7
|
# - Graceful failure handling
|
|
8
|
-
# - Timeout protection
|
|
9
|
-
# -
|
|
8
|
+
# - Timeout protection (3 minutes)
|
|
9
|
+
# - Full regeneration of graph from all files in plans/
|
|
10
10
|
#
|
|
11
11
|
|
|
12
12
|
set -e
|
|
13
13
|
|
|
14
14
|
# Configuration
|
|
15
|
-
TIMEOUT_SECONDS=
|
|
15
|
+
TIMEOUT_SECONDS=180 # 3 minutes
|
|
16
16
|
# Get the directory where this script is located
|
|
17
17
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
18
18
|
GRAPH_SCRIPT="$SCRIPT_DIR/graph.py"
|
|
19
|
-
MAX_RETRIES=0 # Let Claude Code handle retries
|
|
20
19
|
|
|
21
20
|
# Colors for output (optional)
|
|
22
21
|
RED='\033[0;31m'
|
|
@@ -49,8 +48,8 @@ if [[ ! "$FILE_PATH" =~ ^plans/.*\.md$ ]]; then
|
|
|
49
48
|
exit 0
|
|
50
49
|
fi
|
|
51
50
|
|
|
52
|
-
# Run graph
|
|
53
|
-
if timeout "$TIMEOUT_SECONDS" python3 "$GRAPH_SCRIPT"
|
|
51
|
+
# Run full graph regeneration (no --check-path, scans all files)
|
|
52
|
+
if timeout "$TIMEOUT_SECONDS" python3 "$GRAPH_SCRIPT" 2>/dev/null; then
|
|
54
53
|
# Success - silent
|
|
55
54
|
exit 0
|
|
56
55
|
else
|