@codihaus/claude-skills 1.6.9 → 1.6.11

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@codihaus/claude-skills",
3
- "version": "1.6.9",
3
+ "version": "1.6.11",
4
4
  "description": "Claude Code skills for software development workflow",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -22,9 +22,10 @@ Central registry of all available skills. Reference this to suggest relevant ski
22
22
  | Skill | Purpose | Called By |
23
23
  |-------|---------|-----------|
24
24
  | `/utils/diagram` | Create/validate Mermaid diagrams | `/dev-scout`, `/dev-specs`, `/dev-arch` |
25
- | `/utils/docs-graph` | View documentation relationships | `/debrief`, `/dev-specs`, `/dev-arch` |
26
25
  | `/utils/gemini` | Large context scanning (1M tokens) | `/dev-scout` for large codebases |
27
26
 
27
+ **Note:** Documentation graph (`docs-graph.json`) is automatically updated by Claude Code hook, not a skill.
28
+
28
29
  ## Skill Flow
29
30
 
30
31
  ```
@@ -66,9 +67,6 @@ Need to document what was built?
66
67
 
67
68
  Need to visualize something?
68
69
  → /utils/diagram (usually called by other skills)
69
-
70
- Need to see doc relationships?
71
- → /utils/docs-graph (usually called by other skills)
72
70
  ```
73
71
 
74
72
  ## Trigger Phrases
@@ -86,7 +84,6 @@ When user says... → Suggest skill
86
84
  | "review my code", "check this PR" | `/dev-review` |
87
85
  | "what was built", "summarize changes", "document implementation" | `/dev-changelog` |
88
86
  | "create diagram", "architecture diagram", "flow chart" | `/utils/diagram` |
89
- | "what links to this", "doc relationships" | `/utils/docs-graph` |
90
87
 
91
88
  ## Cross-Skill Suggestions
92
89
 
@@ -147,11 +144,6 @@ During each skill, consider suggesting:
147
144
  - Called by other skills, not typically invoked directly
148
145
  - Used for: architecture diagrams, flow charts, ERD
149
146
 
150
- ### /utils/docs-graph
151
- - Utility skill for documentation relationships
152
- - Called by other skills to understand dependencies
153
- - Auto-updated by Claude Code hooks
154
-
155
147
  ## Quality Attributes
156
148
 
157
149
  All skills reference `skills/_quality-attributes.md` for their respective level:
@@ -10,7 +10,7 @@ version: 3.9.0
10
10
  > - **Before**: Use `/dev-scout` if existing codebase
11
11
  > - **During**: Calls `/dev-arch` to validate architecture feasibility
12
12
  > - **After**: Use `/dev-specs` for implementation plans
13
- > - **Utils**: `/utils/docs-graph` for relationships
13
+ > - **Auto**: `docs-graph.json` updated by hook for relationships
14
14
 
15
15
  Create and maintain the unified BRD for a project. Handles initial requirements and feature additions.
16
16
 
@@ -158,13 +158,15 @@ if [ ! -f ".claude/scripts/graph.py" ]; then
158
158
  exit 0
159
159
  fi
160
160
 
161
- timeout 10s python3 .claude/scripts/graph.py --check-path "$1" || true
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 --check-path $PATH || true",
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
- # - Clear error messages
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=10
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.py with timeout
53
- if timeout "$TIMEOUT_SECONDS" python3 "$GRAPH_SCRIPT" --check-path "$FILE_PATH" 2>/dev/null; then
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
@@ -1,204 +0,0 @@
1
- ---
2
- name: utils/docs-graph
3
- description: View and query the documentation knowledge graph
4
- version: 1.2.0
5
- ---
6
-
7
- # /utils/docs-graph - Documentation Graph Viewer
8
-
9
- > **Skill Awareness**: See `skills/_registry.md` for all available skills.
10
- > - **Auto-updated**: By Claude Code hook on Write/Edit to plans/
11
- > - **Called by**: `/dev-specs`, `/debrief`, `/dev-arch` for relationships
12
- > - **Note**: Utility skill, typically called by other skills
13
-
14
- View and query relationships between planning documents.
15
-
16
- ## When to Use
17
-
18
- - See overview of all plans and their relationships
19
- - Find related documents before making changes
20
- - Check impact of changes (what links to this?)
21
- - Verify graph is up-to-date
22
-
23
- ## Usage
24
-
25
- ```
26
- /utils/docs-graph # Show graph summary
27
- /utils/docs-graph auth # Show nodes related to "auth"
28
- /utils/docs-graph --regenerate # Force regenerate graph
29
- /utils/docs-graph --check # Verify all links resolve
30
- ```
31
-
32
- ## How It Works
33
-
34
- The graph is automatically updated via Claude Code hooks whenever files in `plans/` are created or modified. This skill provides on-demand viewing and querying.
35
-
36
- ### Automatic Updates
37
-
38
- PostToolUse hook triggers on Write/Edit to plans/:
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
44
-
45
- ```
46
- plans/
47
- ├── docs-graph.json # Machine-readable graph data
48
- └── docs-graph.md # Mermaid visualization
49
- ```
50
-
51
- ## Workflow
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
60
-
61
- **Summary mode (default):**
62
- - Show node count by type
63
- - Show edge count
64
- - Display mermaid diagram from docs-graph.md
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)
71
-
72
- **Regenerate mode (--regenerate):**
73
- - Force full rescan of plans/
74
- - Update docs-graph.json and docs-graph.md
75
- - Show diff if changes detected
76
-
77
- **Check mode (--check):**
78
- - Verify all wikilinks resolve to existing nodes
79
- - Report broken links
80
- - Suggest fixes
81
-
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
- ## Wikilink Convention
90
-
91
- Documents use `[[wikilinks]]` to reference each other:
92
-
93
- ```markdown
94
- # UC-AUTH-001: Login
95
-
96
- > **Feature**: [[feature-auth]]
97
- > **Related**: [[uc-auth-002]], [[uc-auth-003]]
98
- > **Spec**: [[spec-auth-001]]
99
- ```
100
-
101
- **Link ID format:**
102
- - Use cases: `[[uc-auth-001]]` (lowercase, no slug)
103
- - Features: `[[feature-auth]]`
104
- - Specs: `[[spec-auth-001]]`
105
- - Change requests: `[[cr-001]]`
106
-
107
- ## Node Types
108
-
109
- | Type | Source | Shape (Mermaid) |
110
- |------|--------|-----------------|
111
- | brd | `brd/README.md` | Stadium `[[]]` |
112
- | use-case | `brd/use-cases/**/*.md` | Rectangle `[]` |
113
- | change-request | `brd/changes/*.md` | Hexagon `{{}}` |
114
- | feature | `features/*/README.md` | Pill `([])` |
115
- | spec | `features/*/specs/**/*.md` | Parallelogram `[//]` |
116
- | scout | `**/scout.md` | Cylinder `[()]` |
117
-
118
- ## Example Output
119
-
120
- ### Summary
121
-
122
- ```
123
- Documentation Graph Summary
124
- ===========================
125
- Nodes: 12 | Edges: 18
126
-
127
- By Type:
128
- use-case: 5
129
- feature: 2
130
- spec: 4
131
- brd: 1
132
-
133
- View full graph: plans/docs-graph.md
134
- ```
135
-
136
- ### Query: `/utils/docs-graph auth`
137
-
138
- ```
139
- Nodes matching "auth": 4
140
-
141
- uc-auth-001 (use-case) - Login
142
- ← feature-auth, spec-auth-001
143
- → feature-auth
144
-
145
- uc-auth-002 (use-case) - Signup
146
- ← feature-auth
147
- → uc-auth-001, feature-auth
148
-
149
- feature-auth (feature) - Authentication
150
- ← uc-auth-001, uc-auth-002, uc-auth-003
151
- → (none)
152
-
153
- spec-auth-001 (spec) - Login Spec
154
- ← (none)
155
- → uc-auth-001
156
- ```
157
-
158
- ### Check: `/utils/docs-graph --check`
159
-
160
- ```
161
- Link Check Results
162
- ==================
163
- ✓ 16 valid links
164
- ✗ 2 broken links
165
-
166
- Broken:
167
- plans/brd/use-cases/auth/UC-AUTH-001-login.md:5
168
- [[uc-auth-004]] - node not found
169
-
170
- plans/features/auth/specs/UC-AUTH-001/README.md:12
171
- [[feature-billing]] - node not found
172
-
173
- Suggestions:
174
- - uc-auth-004: Did you mean uc-auth-003?
175
- - feature-billing: Create plans/features/billing/README.md
176
- ```
177
-
178
- ## Tools Used
179
-
180
- | Tool | Purpose |
181
- |------|---------|
182
- | `Bash` | Run graph.py script |
183
- | `Read` | Read docs-graph.json, docs-graph.md |
184
- | `Glob` | Find plan files |
185
-
186
- ## Integration
187
-
188
- | Skill | Relationship |
189
- |-------|--------------|
190
- | `/debrief` | Creates use cases with wikilinks |
191
- | `/dev-specs` | Creates specs linking to use cases |
192
- | `/dev-scout` | Creates scout.md for features |
193
-
194
- ## Troubleshooting
195
-
196
- **Graph not updating:**
197
- - Check hook is in `.claude/settings.local.json`
198
- - Verify `jq` is installed
199
- - Run `/utils/docs-graph --regenerate` to force update
200
-
201
- **Broken links:**
202
- - Run `/utils/docs-graph --check` to find issues
203
- - Update wikilinks to match node IDs
204
- - Node IDs are lowercase, no slug (e.g., `uc-auth-001` not `UC-AUTH-001-login`)