palskills 1.0.5 → 1.0.6
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 +115 -172
- package/package.json +1 -1
package/bin/palskills.js
CHANGED
|
@@ -32,9 +32,9 @@ async function main() {
|
|
|
32
32
|
console.log(` ${BOLD}What do you want to do?${NC}`);
|
|
33
33
|
console.log('');
|
|
34
34
|
console.log(` ${MAGENTA}[1]${NC} Learn Project → bootstrap .palbox/ (Lyleen)`);
|
|
35
|
-
console.log(` ${MAGENTA}[2]${NC} Codex CLI → .codex
|
|
36
|
-
console.log(` ${MAGENTA}[3]${NC} Cursor → .
|
|
37
|
-
console.log(` ${MAGENTA}[4]${NC} Claude Code →
|
|
35
|
+
console.log(` ${MAGENTA}[2]${NC} Codex CLI → .codex/skills/`);
|
|
36
|
+
console.log(` ${MAGENTA}[3]${NC} Cursor → .cursor/skills/`);
|
|
37
|
+
console.log(` ${MAGENTA}[4]${NC} Claude Code → .claude/skills/`);
|
|
38
38
|
console.log(` ${MAGENTA}[5]${NC} All Agents → generate all configs`);
|
|
39
39
|
console.log('');
|
|
40
40
|
|
|
@@ -239,181 +239,124 @@ ${gitContributors ? `\n**Top Contributors:**\n\`\`\`\n${gitContributors}\n\`\`\`
|
|
|
239
239
|
|
|
240
240
|
function generate(agent) {
|
|
241
241
|
const cwd = process.cwd();
|
|
242
|
+
const skillNames = ['lyleen', 'jetdragon', 'anubis', 'panthalus', 'astralym'];
|
|
242
243
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
244
|
+
let dir;
|
|
245
|
+
if (agent === 'codex') dir = path.join(cwd, '.codex', 'skills');
|
|
246
|
+
else if (agent === 'cursor') dir = path.join(cwd, '.cursor', 'skills');
|
|
247
|
+
else if (agent === 'claude') dir = path.join(cwd, '.claude', 'skills');
|
|
248
248
|
|
|
249
|
-
|
|
250
|
-
const file = path.join(cwd, '.cursorrules');
|
|
251
|
-
fs.writeFileSync(file, cursorRules());
|
|
252
|
-
console.log(` ${GREEN}✓${NC} .cursorrules`);
|
|
253
|
-
}
|
|
249
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
254
250
|
|
|
255
|
-
|
|
256
|
-
const file = path.join(
|
|
257
|
-
fs.writeFileSync(file,
|
|
258
|
-
console.log(` ${GREEN}✓${NC}
|
|
251
|
+
for (const name of skillNames) {
|
|
252
|
+
const file = path.join(dir, `${name}.md`);
|
|
253
|
+
fs.writeFileSync(file, skillContent(agent, name));
|
|
254
|
+
console.log(` ${GREEN}✓${NC} ${dir}/${name}.md`);
|
|
259
255
|
}
|
|
260
256
|
}
|
|
261
257
|
|
|
262
|
-
function
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
**
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
**
|
|
355
|
-
**
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
- Single Responsibility: one class, one reason to change
|
|
365
|
-
- Open/Closed: extend, never modify existing
|
|
366
|
-
- Liskov Substitution: subtypes fully substitutable
|
|
367
|
-
- Interface Segregation: small focused interfaces
|
|
368
|
-
- Dependency Inversion: depend on abstractions, inject deps
|
|
369
|
-
4. **SRP Separation:**
|
|
370
|
-
- Repository → data access ONLY
|
|
371
|
-
- Service → business logic ONLY
|
|
372
|
-
- Validator → validation rules ONLY
|
|
373
|
-
- Model → data structures ONLY
|
|
374
|
-
- If a class mixes these, REFACTOR immediately
|
|
375
|
-
5. **Language:** ALL code, comments, docstrings, variable names, and commit messages MUST be in English
|
|
376
|
-
6. **Git:** one commit per logical change. Conventional commits format
|
|
377
|
-
7. After all tasks complete, output a summary: files changed, commits made, verification results
|
|
378
|
-
|
|
379
|
-
---
|
|
380
|
-
|
|
381
|
-
### PANTHALUS — Archivist
|
|
382
|
-
**Trigger:** Prompt starts with "Panthalus:" or "panthalus:"
|
|
383
|
-
**Role:** Record the session to the .palbox/ knowledge graph with bi-directional links.
|
|
384
|
-
|
|
385
|
-
1. Collect artifacts: the plan, git diff summary, commit messages, decisions made
|
|
386
|
-
2. Create .palbox/history/YYYY-MM-DD-feature-name.md:
|
|
387
|
-
- Links section with [[wikilinks]] to related entries (flows, architecture, past history)
|
|
388
|
-
- Original prompt
|
|
389
|
-
- Plan (full, not summarized)
|
|
390
|
-
- Execution: files changed, commits
|
|
391
|
-
- Key decisions table
|
|
392
|
-
- Lessons learned (pitfalls, discoveries, patterns)
|
|
393
|
-
3. **Create backlinks:** For EVERY [[wikilink]] in the history entry, go to that file and add a reference back:
|
|
394
|
-
- Add "## Related Sessions" section if it does not exist
|
|
395
|
-
- Append "- [[history/YYYY-MM-DD-feature]] — [one-line summary]"
|
|
396
|
-
4. Update core docs only if structural knowledge changed (new modules, new conventions)
|
|
397
|
-
5. Report graph stats: new node, edges created, nodes enriched, total nodes/edges
|
|
398
|
-
|
|
399
|
-
---
|
|
400
|
-
|
|
401
|
-
### ASTRALYM — Orchestrator
|
|
402
|
-
**Trigger:** Prompt starts with "Astralym:" or "astralym:"
|
|
403
|
-
**Role:** Run the full development pipeline automatically.
|
|
404
|
-
|
|
405
|
-
1. **CHECK_GRAPH** — Act as Lyleen: bootstrap .palbox/ if missing, or retrieve context subgraph
|
|
406
|
-
2. **PLANNING** — Act as Jetdragon: create plan, ask clarifying questions, wait for "Gas"
|
|
407
|
-
3. **DEVELOPING** — Act as Anubis: execute the approved plan with SOLID + SRP
|
|
408
|
-
4. **RECORDING** — Act as Panthalus: record everything to .palbox/ with backlinks
|
|
409
|
-
5. **DONE** — Report summary with graph stats
|
|
410
|
-
|
|
411
|
-
---
|
|
412
|
-
|
|
413
|
-
## DEFAULT MODE
|
|
414
|
-
|
|
415
|
-
When no specific skill is triggered, act as **Anubis** by default — write code following SOLID + SRP, all output in English. Before starting any task, quickly check .palbox/ for relevant context (like Lyleen, but minimal — 30 seconds max).
|
|
416
|
-
`;
|
|
258
|
+
function skillContent(agent, skill) {
|
|
259
|
+
const skills = {
|
|
260
|
+
lyleen: `# Lyleen — Palbox Knowledge Graph
|
|
261
|
+
**Agent:** ${agent === 'codex' ? 'Codex' : agent === 'cursor' ? 'Cursor' : 'Claude Code'}
|
|
262
|
+
|
|
263
|
+
## Role
|
|
264
|
+
Read and bootstrap the project knowledge graph (.palbox/).
|
|
265
|
+
|
|
266
|
+
## If .palbox/ does NOT exist — BOOTSTRAP:
|
|
267
|
+
1. Scan project: read package.json/requirements.txt/go.mod, list dirs, check git log, find tests
|
|
268
|
+
2. Create .palbox/README.md — project name, tech stack, goals, [[links]]
|
|
269
|
+
3. Create .palbox/architecture.md — folder tree, design patterns, key modules
|
|
270
|
+
4. Create .palbox/methods.md — conventions, testing, git workflow
|
|
271
|
+
5. Create .palbox/flows/, .palbox/history/, .palbox/plans/
|
|
272
|
+
6. Report: "Palbox bootstrapped. N files. Detected: [stack]."
|
|
273
|
+
|
|
274
|
+
## If .palbox/ EXISTS — RETRIEVE:
|
|
275
|
+
1. Read README.md, architecture.md, methods.md
|
|
276
|
+
2. Search flows/ and history/ for user keywords
|
|
277
|
+
3. Extract [[wikilinks]], follow 1-2 hops
|
|
278
|
+
4. Return context subgraph: seeds → 1-hop → 2-hop → conventions
|
|
279
|
+
`,
|
|
280
|
+
jetdragon: `# Jetdragon — Planner
|
|
281
|
+
**Agent:** ${agent === 'codex' ? 'Codex' : agent === 'cursor' ? 'Cursor' : 'Claude Code'}
|
|
282
|
+
|
|
283
|
+
## Role
|
|
284
|
+
Create detailed implementation plans. Ask questions until clear.
|
|
285
|
+
|
|
286
|
+
## Process
|
|
287
|
+
1. Gather palbox context (read core docs, search related history)
|
|
288
|
+
2. Generate plan → .palbox/plans/YYYY-MM-DD-feature.md with [[wikilinks]]
|
|
289
|
+
3. If ambiguous, ASK: scope, design, edge cases, integration, priority
|
|
290
|
+
4. Iterate until user says "Gas", "Go", "Execute"
|
|
291
|
+
5. Finalize as APPROVED, hand off to Anubis
|
|
292
|
+
|
|
293
|
+
## Plan Template
|
|
294
|
+
- Overview, Scope (in/out), Tasks (ordered, with files + verification)
|
|
295
|
+
- Architecture notes, SOLID focus, Risks & Mitigations
|
|
296
|
+
- All references use [[wikilinks]] to .palbox/ entries
|
|
297
|
+
`,
|
|
298
|
+
anubis: `# Anubis — Developer
|
|
299
|
+
**Agent:** ${agent === 'codex' ? 'Codex' : agent === 'cursor' ? 'Cursor' : 'Claude Code'}
|
|
300
|
+
|
|
301
|
+
## Role
|
|
302
|
+
Execute approved plans. SOLID + SRP enforced. English only.
|
|
303
|
+
|
|
304
|
+
## SOLID (Strict)
|
|
305
|
+
- **S**: One class, one reason to change
|
|
306
|
+
- **O**: Extend, never modify existing
|
|
307
|
+
- **L**: Subtypes fully substitutable
|
|
308
|
+
- **I**: Small focused interfaces
|
|
309
|
+
- **D**: Depend on abstractions, inject deps
|
|
310
|
+
|
|
311
|
+
## SRP Separation
|
|
312
|
+
- Repository → data access ONLY
|
|
313
|
+
- Service → business logic ONLY
|
|
314
|
+
- Validator → validation rules ONLY
|
|
315
|
+
- Model → data structures ONLY
|
|
316
|
+
|
|
317
|
+
## Rules
|
|
318
|
+
- ALL code, comments, docstrings, commits in English
|
|
319
|
+
- One commit per logical change (conventional commits)
|
|
320
|
+
- Read existing files before modifying
|
|
321
|
+
- Write tests if project has testing patterns
|
|
322
|
+
`,
|
|
323
|
+
panthalus: `# Panthalus — Archivist
|
|
324
|
+
**Agent:** ${agent === 'codex' ? 'Codex' : agent === 'cursor' ? 'Cursor' : 'Claude Code'}
|
|
325
|
+
|
|
326
|
+
## Role
|
|
327
|
+
Record sessions to .palbox/ with bi-directional [[wikilinks]].
|
|
328
|
+
|
|
329
|
+
## Process
|
|
330
|
+
1. Collect: plan, git diff, commits, decisions, lessons
|
|
331
|
+
2. Create .palbox/history/YYYY-MM-DD-feature.md with [[wikilinks]]
|
|
332
|
+
3. For EVERY link, add backlink to the target file ("Related Sessions")
|
|
333
|
+
4. Update core docs (architecture/methods) only if structure changed
|
|
334
|
+
5. Report graph stats: nodes, edges, enriched
|
|
335
|
+
|
|
336
|
+
## History Entry Template
|
|
337
|
+
- Links ([[flows/]], [[architecture]], [[history/]])
|
|
338
|
+
- Original prompt, Plan, Execution (files + commits)
|
|
339
|
+
- Key Decisions table, Lessons Learned (pitfalls, discoveries)
|
|
340
|
+
- Backlinks section
|
|
341
|
+
`,
|
|
342
|
+
astralym: `# Astralym — Orchestrator
|
|
343
|
+
**Agent:** ${agent === 'codex' ? 'Codex' : agent === 'cursor' ? 'Cursor' : 'Claude Code'}
|
|
344
|
+
|
|
345
|
+
## Role
|
|
346
|
+
Run the full development pipeline automatically.
|
|
347
|
+
|
|
348
|
+
## Pipeline
|
|
349
|
+
1. **CHECK_GRAPH** → Lyleen: bootstrap or retrieve context
|
|
350
|
+
2. **PLANNING** → Jetdragon: create plan, ask questions, wait for "Gas"
|
|
351
|
+
3. **DEVELOPING** → Anubis: execute with SOLID + SRP
|
|
352
|
+
4. **RECORDING** → Panthalus: record with backlinks
|
|
353
|
+
5. **DONE** → Summary with graph stats
|
|
354
|
+
|
|
355
|
+
## Usage
|
|
356
|
+
User says "Astralym: build feature X" → full pipeline runs.
|
|
357
|
+
`
|
|
358
|
+
};
|
|
359
|
+
return skills[skill] || '';
|
|
417
360
|
}
|
|
418
361
|
|
|
419
362
|
function installSkills() {
|