palskills 1.0.10 → 1.0.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/bin/palskills.js +37 -7
- package/package.json +1 -1
- package/skills/lyleen/SKILL.md +103 -4
package/bin/palskills.js
CHANGED
|
@@ -303,18 +303,25 @@ Analyze the project and generate a complete design system specification.
|
|
|
303
303
|
`,
|
|
304
304
|
lyleen: `---
|
|
305
305
|
name: lyleen
|
|
306
|
-
description: "Palbox knowledge graph reader —
|
|
307
|
-
version:
|
|
306
|
+
description: "Palbox knowledge graph reader, bootstrapper & discoverer — creates .palbox/ if missing, traverses [[wikilinks]] for context, and auto-saves source code analysis to flows/."
|
|
307
|
+
version: 4.0.0
|
|
308
308
|
license: MIT
|
|
309
309
|
---
|
|
310
310
|
|
|
311
311
|
# Lyleen — Palbox Knowledge Graph
|
|
312
|
-
**Agent:** ${agent === 'codex' ? 'Codex' : agent === 'cursor' ? 'Cursor' : 'Claude Code'}
|
|
313
312
|
|
|
314
313
|
## Role
|
|
315
|
-
Read and
|
|
314
|
+
Read, bootstrap, and discover the project knowledge graph (.palbox/).
|
|
315
|
+
|
|
316
|
+
## 3 Modes
|
|
316
317
|
|
|
317
|
-
|
|
318
|
+
| Mode | When | Action |
|
|
319
|
+
|------|------|--------|
|
|
320
|
+
| **BOOTSTRAP** | .palbox/ missing | Create full palbox from scratch |
|
|
321
|
+
| **TRAVERSE** | "what do we know about X" | Read palbox entries → return context (read-only) |
|
|
322
|
+
| **DISCOVER** | "learn/pelajari/study X" | Read source code → write flows/X.md + update architecture |
|
|
323
|
+
|
|
324
|
+
## BOOTSTRAP (.palbox/ missing)
|
|
318
325
|
1. Scan project: read package.json/requirements.txt/go.mod, list dirs, check git log, find tests
|
|
319
326
|
2. Create .palbox/README.md — project name, tech stack, goals, [[links]]
|
|
320
327
|
3. Create .palbox/architecture.md — folder tree, design patterns, key modules
|
|
@@ -322,12 +329,35 @@ Read and bootstrap the project knowledge graph (.palbox/).
|
|
|
322
329
|
5. Create .palbox/flows/, .palbox/history/, .palbox/plans/
|
|
323
330
|
6. Report: "Palbox bootstrapped. N files. Detected: [stack]."
|
|
324
331
|
|
|
325
|
-
##
|
|
332
|
+
## TRAVERSE (read-only)
|
|
326
333
|
1. Read README.md, architecture.md, methods.md
|
|
327
334
|
2. Search flows/ and history/ for user keywords
|
|
328
335
|
3. Extract [[wikilinks]], follow 1-2 hops
|
|
329
336
|
4. Return context subgraph: seeds → 1-hop → 2-hop → conventions
|
|
330
|
-
|
|
337
|
+
|
|
338
|
+
## DISCOVER (auto-save to flows/)
|
|
339
|
+
|
|
340
|
+
### When to use
|
|
341
|
+
User says: "learn X", "pelajari Y", "discover Z", "analyze W", "study V"
|
|
342
|
+
|
|
343
|
+
### Process
|
|
344
|
+
1. **Identify target** — extract module/topic from user prompt
|
|
345
|
+
2. **Find source files** — grep for keywords in .py/.ts/.js/.go/.rs files
|
|
346
|
+
3. **Deep analysis** — for each file: entry points, data flow, dependencies, patterns, edge cases
|
|
347
|
+
4. **Write flow doc** → .palbox/flows/<module>.md:
|
|
348
|
+
- Entry Points table (route/fn/class, type, source, description)
|
|
349
|
+
- Data Flow description
|
|
350
|
+
- Dependencies (internal + external + packages)
|
|
351
|
+
- Key Patterns detected
|
|
352
|
+
- Edge Cases & Error Handling
|
|
353
|
+
- Related: [[architecture]], [[methods]], [[history/]]
|
|
354
|
+
5. **Update architecture.md** — if new module, append link
|
|
355
|
+
6. **Report** — "Saved: flows/<module>.md, Files analyzed: N, Graph: +1 node +N edges"
|
|
356
|
+
|
|
357
|
+
### Delimiter
|
|
358
|
+
- DISCOVER → writes .palbox/flows/* (Lyleen's domain)
|
|
359
|
+
- Panthalus → writes .palbox/history/* (development sessions)
|
|
360
|
+
- NEVER cross domains`,
|
|
331
361
|
jetdragon: `---
|
|
332
362
|
name: jetdragon
|
|
333
363
|
description: "Planning specialist — asks clarifying questions, generates detailed plans with [[wikilinks]] to palbox context."
|
package/package.json
CHANGED
package/skills/lyleen/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lyleen
|
|
3
|
-
description: "Palbox knowledge graph reader &
|
|
4
|
-
version:
|
|
3
|
+
description: "Palbox knowledge graph reader, bootstrapper & discoverer — creates .palbox/ if missing, traverses [[wikilinks]] for context, and auto-saves source code analysis to flows/."
|
|
4
|
+
version: 4.0.0
|
|
5
5
|
author: Palskills
|
|
6
6
|
license: MIT
|
|
7
7
|
platforms: [linux, macos, windows]
|
|
@@ -39,6 +39,8 @@ Lyleen is the **gatekeeper** of the palskills knowledge graph. The palbox is an
|
|
|
39
39
|
|
|
40
40
|
**Nodes** = `.md` files. **Edges** = `[[wikilinks]]` between them.
|
|
41
41
|
|
|
42
|
+
> See `references/knowledge-graph-design.md` for the full design rationale behind the palbox graph architecture.
|
|
43
|
+
|
|
42
44
|
## How It Works
|
|
43
45
|
|
|
44
46
|
### Step 1: Check if Palbox Exists
|
|
@@ -152,7 +154,7 @@ Created `.palbox/` with interconnected nodes:
|
|
|
152
154
|
Graph has [N] nodes and [M] edges.
|
|
153
155
|
```
|
|
154
156
|
|
|
155
|
-
### Step 2b: Palbox Exists → TRAVERSE
|
|
157
|
+
### Step 2b: Palbox Exists → TRAVERSE (Read-only)
|
|
156
158
|
|
|
157
159
|
**Phase 1: Seed Discovery**
|
|
158
160
|
|
|
@@ -176,7 +178,7 @@ queue = seed_nodes
|
|
|
176
178
|
for node in queue:
|
|
177
179
|
visited.add(node)
|
|
178
180
|
content = read(".palbox/" + node)
|
|
179
|
-
links = extract_wikilinks(content) # regex: \[\[([^\]]+)\]\]
|
|
181
|
+
links = extract_wikilinks(content) # regex: \[\[([^\]]+)\]\]
|
|
180
182
|
for link in links:
|
|
181
183
|
resolved = resolve_link(link) # handle paths, .md extension
|
|
182
184
|
if resolved not in visited:
|
|
@@ -212,6 +214,101 @@ Matched: "login", "authentication"
|
|
|
212
214
|
|
|
213
215
|
Return the subgraph to Astralym/Jetdragon. The context is now **relational** — not just a flat list of files, but a connected graph of knowledge.
|
|
214
216
|
|
|
217
|
+
### Step 2c: Palbox Exists → DISCOVER (Auto-save to flows/)
|
|
218
|
+
|
|
219
|
+
Triggered when the user explicitly asks to **learn**, **study**, **pelajari**, or **discover** a module, component, or flow. Unlike TRAVERSE (read-only), DISCOVER reads actual source code and **writes findings to `.palbox/flows/<module>.md`**.
|
|
220
|
+
|
|
221
|
+
**When to use DISCOVER vs TRAVERSE:**
|
|
222
|
+
|
|
223
|
+
| User says | Mode | Action |
|
|
224
|
+
|-----------|------|--------|
|
|
225
|
+
| "what do we know about auth" | TRAVERSE | Read palbox, return context |
|
|
226
|
+
| "pelajari flow dan codebase export" | DISCOVER | Read source, write flow doc |
|
|
227
|
+
| "learn the payment module" | DISCOVER | Read source, write flow doc |
|
|
228
|
+
| "analyze how logging works" | DISCOVER | Read source, write flow doc |
|
|
229
|
+
|
|
230
|
+
**Phase 1: Identify Target**
|
|
231
|
+
|
|
232
|
+
Extract the module/topic from user prompt. Map to source directories:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
# Find relevant source files
|
|
236
|
+
find . -type f \( -name "*.py" -o -name "*.ts" -o -name "*.js" -o -name "*.go" -o -name "*.rs" \) \
|
|
237
|
+
! -path "./.git/*" ! -path "./node_modules/*" ! -path "./__pycache__/*" ! -path "./.venv/*" \
|
|
238
|
+
| xargs grep -l "<keyword>" 2>/dev/null | head -20
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**Phase 2: Deep Analysis**
|
|
242
|
+
|
|
243
|
+
Read the identified files. For each file, extract:
|
|
244
|
+
- **Entry points**: exported functions, route handlers, CLI commands
|
|
245
|
+
- **Data flow**: what goes in → what transformations → what comes out
|
|
246
|
+
- **Dependencies**: imports, external services, databases
|
|
247
|
+
- **Patterns**: design patterns used, conventions followed
|
|
248
|
+
- **Edge cases**: error handling, validation, boundary conditions
|
|
249
|
+
|
|
250
|
+
**Phase 3: Write Flow Document**
|
|
251
|
+
|
|
252
|
+
Create `.palbox/flows/<module>.md` using this template:
|
|
253
|
+
|
|
254
|
+
```markdown
|
|
255
|
+
# [Module Name]
|
|
256
|
+
|
|
257
|
+
**Discovered:** YYYY-MM-DD
|
|
258
|
+
**Source:** [list of files analyzed]
|
|
259
|
+
**Analysis by:** Lyleen (palskills)
|
|
260
|
+
|
|
261
|
+
## Entry Points
|
|
262
|
+
| Entry | Type | Source | Description |
|
|
263
|
+
|-------|------|--------|-------------|
|
|
264
|
+
| ... | route/function/class | file:line | ... |
|
|
265
|
+
|
|
266
|
+
## Data Flow
|
|
267
|
+
[Describe how data moves through this module]
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
[diagram or step-by-step flow]
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Dependencies
|
|
274
|
+
- **Internal:** [[architecture]], [[methods]]
|
|
275
|
+
- **External:** [list external services/APIs]
|
|
276
|
+
- **Packages:** [key third-party packages]
|
|
277
|
+
|
|
278
|
+
## Key Patterns
|
|
279
|
+
[Patterns and conventions detected]
|
|
280
|
+
|
|
281
|
+
## Edge Cases & Error Handling
|
|
282
|
+
[How errors are handled, validation, edge cases]
|
|
283
|
+
|
|
284
|
+
## Related
|
|
285
|
+
- [[architecture]] — module structure
|
|
286
|
+
- [[methods]] — applicable conventions
|
|
287
|
+
- [[history/]] — past work on this module
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
**Phase 4: Update Architecture**
|
|
291
|
+
|
|
292
|
+
If this is a new module not yet in architecture.md, append:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
echo "- [[flows/<module>]] — [one-line description]" >> .palbox/architecture.md
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
**Phase 5: Report**
|
|
299
|
+
|
|
300
|
+
```
|
|
301
|
+
## Lyleen Discovered: [Module] ✓
|
|
302
|
+
|
|
303
|
+
**Saved:** .palbox/flows/<module>.md
|
|
304
|
+
**Files analyzed:** [N]
|
|
305
|
+
**Architecture updated:** [yes/no]
|
|
306
|
+
|
|
307
|
+
**Graph after discovery:**
|
|
308
|
+
- Node created: [[flows/<module>]]
|
|
309
|
+
- Edges added: → [[architecture]], [[methods]]
|
|
310
|
+
```
|
|
311
|
+
|
|
215
312
|
## Wikilink Conventions
|
|
216
313
|
|
|
217
314
|
| Syntax | Meaning |
|
|
@@ -241,3 +338,5 @@ Return the subgraph to Astralym/Jetdragon. The context is now **relational** —
|
|
|
241
338
|
6. **Report graph stats** — nodes traversed, links followed, orphans found
|
|
242
339
|
7. **Bootstrap is one-time** — subsequent calls traverse the existing graph
|
|
243
340
|
8. **Bidirectional links matter** — Panthalus maintains them; Lyleen exploits them
|
|
341
|
+
9. **DISCOVER writes to flows/** — when user says "learn/pelajari/discover", save analysis to `.palbox/flows/<module>.md` and update architecture.md
|
|
342
|
+
10. **Panthalus owns history/** — Lyleen never writes to `history/`; that's Panthalus's domain (recording development sessions)
|