get-shit-done-cc 1.9.1 → 1.9.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.
@@ -1,128 +0,0 @@
1
- ---
2
- name: gsd:query-intel
3
- description: Query codebase intelligence graph for dependencies and hotspots
4
- argument-hint: "<dependents|hotspots> [file-path]"
5
- allowed-tools:
6
- - Bash
7
- ---
8
-
9
- <objective>
10
- Query the codebase intelligence graph database for relationship information.
11
-
12
- **Query types:**
13
- - `dependents <file>` — What files depend on this file? (blast radius)
14
- - `hotspots` — Which files have the most dependents? (change carefully)
15
-
16
- Output: Formatted query results from graph.db
17
- </objective>
18
-
19
- <context>
20
- This command exposes the graph query capabilities built by Phase 4 (Semantic Intelligence).
21
-
22
- **Use for:**
23
- - Checking blast radius before refactoring a core file
24
- - Identifying high-impact files that need careful changes
25
- - Understanding dependency relationships in the codebase
26
-
27
- **Requires:** `.planning/intel/graph.db` (created by `/gsd:analyze-codebase` with entity generation)
28
-
29
- If graph.db doesn't exist, the command will return an error suggesting to run analyze-codebase first.
30
- </context>
31
-
32
- <process>
33
-
34
- ## Step 1: Parse arguments
35
-
36
- Extract query type and optional file path from arguments.
37
-
38
- **Arguments:** $ARGUMENTS
39
-
40
- **Expected formats:**
41
- - `dependents src/lib/db.ts` — query what depends on this file
42
- - `hotspots` — query most-depended-on files
43
- - `hotspots 10` — query top 10 hotspots (default: 5)
44
-
45
- ## Step 2: Convert file path to entity ID
46
-
47
- For `dependents` queries, convert the file path to entity ID format:
48
- - `src/lib/db.ts` → `src-lib-db`
49
- - Replace `/` with `-`, remove extension
50
-
51
- ```bash
52
- # Example conversion
53
- FILE_PATH="src/lib/db.ts"
54
- ENTITY_ID=$(echo "$FILE_PATH" | sed 's/\.[^.]*$//' | tr '/' '-')
55
- ```
56
-
57
- ## Step 3: Execute query
58
-
59
- Run the appropriate query against the graph database:
60
-
61
- **For dependents:**
62
- ```bash
63
- echo '{"action":"query","type":"dependents","target":"'$ENTITY_ID'","limit":20}' | node hooks/gsd-intel-index.js
64
- ```
65
-
66
- **For hotspots:**
67
- ```bash
68
- echo '{"action":"query","type":"hotspots","limit":5}' | node hooks/gsd-intel-index.js
69
- ```
70
-
71
- ## Step 4: Format and present results
72
-
73
- Parse the JSON response and present in readable format.
74
-
75
- **For dependents:**
76
- ```
77
- ## Files that depend on {file-path}
78
-
79
- Found {count} dependents:
80
-
81
- 1. src/api/users.ts
82
- 2. src/api/auth.ts
83
- 3. src/services/payment.ts
84
- ...
85
-
86
- **Blast radius:** {count} files would be affected by changes.
87
- ```
88
-
89
- **For hotspots:**
90
- ```
91
- ## Dependency Hotspots
92
-
93
- These files have the most dependents — change carefully:
94
-
95
- | Rank | File | Dependents |
96
- |------|------|------------|
97
- | 1 | src/lib/db.ts | 42 |
98
- | 2 | src/types/user.ts | 35 |
99
- | 3 | src/utils/format.ts | 28 |
100
- ```
101
-
102
- ## Step 5: Handle errors
103
-
104
- **If graph.db doesn't exist:**
105
- ```
106
- No graph database found at .planning/intel/graph.db
107
-
108
- Run /gsd:analyze-codebase first to build the dependency graph.
109
- ```
110
-
111
- **If entity not found:**
112
- ```
113
- No entity found for: {file-path}
114
-
115
- The file may not be indexed yet. Try:
116
- - /gsd:analyze-codebase to rebuild the index
117
- - Check the file path is correct
118
- ```
119
-
120
- </process>
121
-
122
- <success_criteria>
123
- - [ ] Query type parsed from arguments
124
- - [ ] File path converted to entity ID (for dependents)
125
- - [ ] Query executed against graph.db
126
- - [ ] Results formatted in readable markdown
127
- - [ ] Errors handled gracefully with helpful messages
128
- </success_criteria>
@@ -1,173 +0,0 @@
1
- # Entity Template
2
-
3
- Template for `.planning/codebase/{entity-slug}.md` - file-level intelligence documentation.
4
-
5
- ---
6
-
7
- ## File Template
8
-
9
- ```markdown
10
- ---
11
- path: {path}
12
- type: {type}
13
- updated: {updated}
14
- status: {status}
15
- ---
16
-
17
- # {filename}
18
-
19
- ## Purpose
20
-
21
- {purpose}
22
-
23
- ## Exports
24
-
25
- {exports}
26
-
27
- ## Dependencies
28
-
29
- {dependencies}
30
-
31
- ## Used By
32
-
33
- {used_by}
34
-
35
- ## Notes
36
-
37
- {notes}
38
- ```
39
-
40
- ---
41
-
42
- ## Field Reference
43
-
44
- ### Frontmatter
45
-
46
- | Field | Values | Description |
47
- |-------|--------|-------------|
48
- | `path` | Absolute path | Full path to the file |
49
- | `type` | module, component, util, config, test, api, hook | Primary classification |
50
- | `updated` | YYYY-MM-DD | Last time this entity was updated |
51
- | `status` | active, deprecated, stub | Current state |
52
-
53
- ### Sections
54
-
55
- **Purpose** (required)
56
- 1-3 sentences covering:
57
- - What this file does
58
- - Why it exists
59
- - Who/what uses it (high-level)
60
-
61
- **Exports** (required for modules with exports)
62
- List each export with signature and description:
63
- ```markdown
64
- - `functionName(arg: Type): ReturnType` - What it does
65
- - `ClassName` - What it represents
66
- - `CONSTANT_NAME` - What value it holds
67
- ```
68
-
69
- For files without exports (config, tests), write "None" or describe what the file defines.
70
-
71
- **Dependencies** (required)
72
- Internal dependencies use wiki-links (slugified paths):
73
- ```markdown
74
- - [[src-lib-db]] - Database client
75
- - [[src-types-user]] - User type definitions
76
- ```
77
-
78
- External dependencies use plain text:
79
- ```markdown
80
- - react - Component framework
81
- - jose - JWT handling
82
- ```
83
-
84
- **Used By** (grows over time)
85
- Files that import this one, using wiki-links:
86
- ```markdown
87
- - [[src-app-api-auth-route]]
88
- - [[src-components-dashboard]]
89
- ```
90
-
91
- Initially may be empty or incomplete. Updated as Claude encounters imports.
92
-
93
- **Notes** (optional)
94
- Patterns, gotchas, or context:
95
- ```markdown
96
- - Uses singleton pattern for connection pooling
97
- - WARNING: Must call `init()` before any other method
98
- - Related: See [[src-lib-cache]] for caching layer
99
- ```
100
-
101
- ---
102
-
103
- ## Slug Convention
104
-
105
- Entity slugs are derived from file paths:
106
- - `src/lib/db.ts` becomes `src-lib-db`
107
- - `src/app/api/auth/route.ts` becomes `src-app-api-auth-route`
108
-
109
- Rule: Replace `/` and `.` with `-`, drop file extension.
110
-
111
- ---
112
-
113
- ## Example
114
-
115
- ```markdown
116
- ---
117
- path: /project/src/lib/auth.ts
118
- type: util
119
- updated: 2025-01-15
120
- status: active
121
- ---
122
-
123
- # auth.ts
124
-
125
- ## Purpose
126
-
127
- JWT token management using jose library. Handles token creation, verification, and refresh rotation. Used by all protected API routes via middleware.
128
-
129
- ## Exports
130
-
131
- - `createAccessToken(userId: string): Promise<string>` - Creates 15-min access token
132
- - `createRefreshToken(userId: string): Promise<string>` - Creates 7-day refresh token
133
- - `verifyToken(token: string): Promise<TokenPayload>` - Validates and decodes token
134
- - `rotateRefresh(oldToken: string): Promise<TokenPair>` - Issues new token pair
135
-
136
- ## Dependencies
137
-
138
- - [[src-lib-db]] - Stores refresh tokens for revocation
139
- - [[src-types-auth]] - TokenPayload, TokenPair types
140
- - jose - JWT signing and verification
141
- - bcrypt - Password hashing
142
-
143
- ## Used By
144
-
145
- - [[src-middleware]]
146
- - [[src-app-api-auth-login-route]]
147
- - [[src-app-api-auth-logout-route]]
148
- - [[src-app-api-auth-refresh-route]]
149
-
150
- ## Notes
151
-
152
- - Access tokens are stateless; refresh tokens stored in DB for revocation
153
- - Uses RS256 algorithm with keys from environment
154
- - WARNING: Never log token values, even in debug mode
155
- ```
156
-
157
- ---
158
-
159
- ## Guidelines
160
-
161
- **When to create/update:**
162
- - After modifying a file during plan execution
163
- - When encountering a file that lacks documentation
164
- - When relationships change (new imports, exports)
165
-
166
- **Minimal viable entity:**
167
- At minimum, an entity needs frontmatter + Purpose. Other sections can be "TBD" if unknown.
168
-
169
- **Accuracy over completeness:**
170
- Better to have partial accurate info than complete guesses. Mark unknowns explicitly.
171
-
172
- **Link discovery:**
173
- The hook that processes entities extracts all `[[wiki-links]]` to build the relationship graph. Ensure links use correct slug format.