palskills 1.0.0
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/README.md +106 -0
- package/bin/palskills.js +237 -0
- package/index.js +1 -0
- package/install.sh +43 -0
- package/package.json +38 -0
- package/skills/anubis/SKILL.md +192 -0
- package/skills/astralym/SKILL.md +111 -0
- package/skills/jetdragon/SKILL.md +127 -0
- package/skills/lyleen/SKILL.md +243 -0
- package/skills/panthalus/SKILL.md +201 -0
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Palskills
|
|
2
|
+
|
|
3
|
+
**AI-powered development pipeline** — a suite of 5 Hermes Agent skills that orchestrate the full development lifecycle: context retrieval → planning → execution via Codex CLI → archival.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
User Prompt
|
|
7
|
+
│
|
|
8
|
+
▼
|
|
9
|
+
┌──────────────────────────────────────────────────────┐
|
|
10
|
+
│ │
|
|
11
|
+
│ 🔮 Astralym — State Machine Core │
|
|
12
|
+
│ Routes every prompt through the pipeline │
|
|
13
|
+
│ │
|
|
14
|
+
│ ├─► 📖 Lyleen — Palbox Reader & Bootstrapper │
|
|
15
|
+
│ │ Checks .palbox/ for context; creates if new │
|
|
16
|
+
│ │ │
|
|
17
|
+
│ ├─► 🐉 Jetdragon — Planner │
|
|
18
|
+
│ │ Asks clarifying questions → detailed plan │
|
|
19
|
+
│ │ │
|
|
20
|
+
│ ├─► ⚔️ Anubis — Codex Development Engine │
|
|
21
|
+
│ │ Builds Codex prompt → codex exec (SOLID+SRP) │
|
|
22
|
+
│ │ │
|
|
23
|
+
│ └─► 📝 Panthalus — Palbox Archivist │
|
|
24
|
+
│ Records plan + execution → .palbox/history/ │
|
|
25
|
+
│ │
|
|
26
|
+
└──────────────────────────────────────────────────────┘
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Skills
|
|
30
|
+
|
|
31
|
+
| Skill | Role | Key Trait |
|
|
32
|
+
|-------|------|-----------|
|
|
33
|
+
| **Astralym** | State machine orchestrator | Non-skip states, gate-keeps the flow |
|
|
34
|
+
| **Lyleen** | Palbox reader & bootstrapper | Auto-creates `.palbox/` if missing |
|
|
35
|
+
| **Jetdragon** | Planner | Asks until clear, generates Codex-ready prompts |
|
|
36
|
+
| **Anubis** | Codex executor | SOLID + SRP enforced, English only |
|
|
37
|
+
| **Panthalus** | Archivist | Records EVERY session to palbox |
|
|
38
|
+
|
|
39
|
+
## Prerequisites
|
|
40
|
+
|
|
41
|
+
- [Hermes Agent](https://github.com/nousresearch/hermes-agent)
|
|
42
|
+
- [Codex CLI](https://github.com/openai/codex) (`npm install -g @openai/codex`)
|
|
43
|
+
- Git (all work happens in git repositories)
|
|
44
|
+
|
|
45
|
+
## Install
|
|
46
|
+
|
|
47
|
+
### npm (recommended)
|
|
48
|
+
```bash
|
|
49
|
+
npm install -g palskills
|
|
50
|
+
# Skills auto-installed to ~/.hermes/skills/palskills/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Git
|
|
54
|
+
```bash
|
|
55
|
+
git clone https://github.com/faizalardhi16/palskills.git
|
|
56
|
+
cd palskills
|
|
57
|
+
./install.sh
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Usage
|
|
61
|
+
|
|
62
|
+
### Interactive CLI
|
|
63
|
+
```bash
|
|
64
|
+
palskills
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
╔══════════════════════════════════════╗
|
|
69
|
+
║ PALSKILLS ║
|
|
70
|
+
║ AI Development Pipeline ║
|
|
71
|
+
╚══════════════════════════════════════╝
|
|
72
|
+
|
|
73
|
+
Pilih coding agent:
|
|
74
|
+
|
|
75
|
+
[1] Codex CLI → .codex.md
|
|
76
|
+
[2] Cursor → .cursorrules
|
|
77
|
+
[3] Claude Code → CLAUDE.md
|
|
78
|
+
[4] Semua → generate all
|
|
79
|
+
|
|
80
|
+
Pilih [1-4]:
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Pilih agent, langsung generate config file dengan SOLID + SRP rules + palbox conventions.
|
|
84
|
+
|
|
85
|
+
### One-shot (tanpa install)
|
|
86
|
+
```bash
|
|
87
|
+
npx palskills
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Palbox
|
|
91
|
+
|
|
92
|
+
Palskills creates a `.palbox/` second brain in every project:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
.palbox/
|
|
96
|
+
├── README.md # Project identity & tech stack
|
|
97
|
+
├── architecture.md # Folder map & design patterns
|
|
98
|
+
├── methods.md # Conventions & standards
|
|
99
|
+
├── flows/ # Feature workflow docs
|
|
100
|
+
├── plans/ # Active plans (Jetdragon)
|
|
101
|
+
└── history/ # Past executions (Panthalus)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
MIT
|
package/bin/palskills.js
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const readline = require('readline');
|
|
5
|
+
|
|
6
|
+
const CYAN = '\x1b[36m';
|
|
7
|
+
const GREEN = '\x1b[32m';
|
|
8
|
+
const YELLOW = '\x1b[33m';
|
|
9
|
+
const MAGENTA = '\x1b[35m';
|
|
10
|
+
const BOLD = '\x1b[1m';
|
|
11
|
+
const NC = '\x1b[0m';
|
|
12
|
+
|
|
13
|
+
function box(text) {
|
|
14
|
+
const lines = text.split('\n');
|
|
15
|
+
const width = Math.max(...lines.map(l => l.length)) + 4;
|
|
16
|
+
const top = '╔' + '═'.repeat(width - 2) + '╗';
|
|
17
|
+
const bottom = '╚' + '═'.repeat(width - 2) + '╝';
|
|
18
|
+
console.log(CYAN + top);
|
|
19
|
+
lines.forEach(l => console.log('║ ' + l.padEnd(width - 4) + ' ║'));
|
|
20
|
+
console.log(bottom + NC);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function ask(q) {
|
|
24
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
25
|
+
return new Promise(resolve => rl.question(q, ans => { rl.close(); resolve(ans.trim()); }));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async function main() {
|
|
29
|
+
box('PALSKILLS\nAI Development Pipeline');
|
|
30
|
+
|
|
31
|
+
console.log('');
|
|
32
|
+
console.log(` ${BOLD}Pilih coding agent:${NC}`);
|
|
33
|
+
console.log('');
|
|
34
|
+
console.log(` ${MAGENTA}[1]${NC} Codex CLI → .codex.md`);
|
|
35
|
+
console.log(` ${MAGENTA}[2]${NC} Cursor → .cursorrules`);
|
|
36
|
+
console.log(` ${MAGENTA}[3]${NC} Claude Code → CLAUDE.md`);
|
|
37
|
+
console.log(` ${MAGENTA}[4]${NC} Semua → generate all`);
|
|
38
|
+
console.log('');
|
|
39
|
+
|
|
40
|
+
const choice = await ask(` Pilih [1-4]: `);
|
|
41
|
+
console.log('');
|
|
42
|
+
|
|
43
|
+
const agents = [];
|
|
44
|
+
if (choice === '1') agents.push('codex');
|
|
45
|
+
else if (choice === '2') agents.push('cursor');
|
|
46
|
+
else if (choice === '3') agents.push('claude');
|
|
47
|
+
else if (choice === '4') agents.push('codex', 'cursor', 'claude');
|
|
48
|
+
else { console.log(' Pilihan tidak valid. Exit.'); process.exit(1); }
|
|
49
|
+
|
|
50
|
+
for (const agent of agents) {
|
|
51
|
+
generate(agent);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Also install Hermes skills
|
|
55
|
+
installSkills();
|
|
56
|
+
|
|
57
|
+
console.log(`\n ${GREEN}✅ Done!${NC} Restart Hermes Agent untuk load skills.\n`);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function generate(agent) {
|
|
61
|
+
const cwd = process.cwd();
|
|
62
|
+
|
|
63
|
+
if (agent === 'codex') {
|
|
64
|
+
const file = path.join(cwd, '.codex.md');
|
|
65
|
+
fs.writeFileSync(file, codexRules());
|
|
66
|
+
console.log(` ${GREEN}✓${NC} .codex.md`);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (agent === 'cursor') {
|
|
70
|
+
const file = path.join(cwd, '.cursorrules');
|
|
71
|
+
fs.writeFileSync(file, cursorRules());
|
|
72
|
+
console.log(` ${GREEN}✓${NC} .cursorrules`);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (agent === 'claude') {
|
|
76
|
+
const file = path.join(cwd, 'CLAUDE.md');
|
|
77
|
+
fs.writeFileSync(file, claudeRules());
|
|
78
|
+
console.log(` ${GREEN}✓${NC} CLAUDE.md`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function codexRules() {
|
|
83
|
+
return `# Codex Rules — Palskills
|
|
84
|
+
# Generated by palskills CLI
|
|
85
|
+
|
|
86
|
+
## SOLID Principles (Enforced)
|
|
87
|
+
1. **Single Responsibility:** Every class/module/function has exactly ONE reason to change.
|
|
88
|
+
2. **Open/Closed:** Extend via inheritance/composition, never modify existing code.
|
|
89
|
+
3. **Liskov Substitution:** Subtypes must be fully substitutable for their base types.
|
|
90
|
+
4. **Interface Segregation:** Small, focused interfaces. No client depends on unused methods.
|
|
91
|
+
5. **Dependency Inversion:** Depend on abstractions. Inject dependencies.
|
|
92
|
+
|
|
93
|
+
## SRP Enforcement
|
|
94
|
+
- Repository → data access ONLY
|
|
95
|
+
- Service → business logic ONLY
|
|
96
|
+
- Validator → validation rules ONLY
|
|
97
|
+
- Model → data structures ONLY
|
|
98
|
+
- If a class mixes these, REFACTOR immediately.
|
|
99
|
+
|
|
100
|
+
## Code Structure
|
|
101
|
+
- No file exceeds 200 lines without strong justification.
|
|
102
|
+
- Business logic → services/. Data access → repositories/. Validation → validators/.
|
|
103
|
+
- Models are pure data structures — no methods, no logic.
|
|
104
|
+
|
|
105
|
+
## Language
|
|
106
|
+
ALL code, comments, docstrings, variable names, and commit messages MUST be in English.
|
|
107
|
+
|
|
108
|
+
## Git
|
|
109
|
+
- One commit per logical change.
|
|
110
|
+
- Conventional commits: feat(scope): description / fix(scope): description / test(scope): description
|
|
111
|
+
|
|
112
|
+
## Palbox
|
|
113
|
+
- Check .palbox/ for project context before starting.
|
|
114
|
+
- Record results to .palbox/history/ after completion.
|
|
115
|
+
`;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function cursorRules() {
|
|
119
|
+
return `# Cursor Rules — Palskills
|
|
120
|
+
# Generated by palskills CLI
|
|
121
|
+
|
|
122
|
+
## Core Principles
|
|
123
|
+
You are working in a project managed by the Palskills development system.
|
|
124
|
+
Always follow these rules.
|
|
125
|
+
|
|
126
|
+
### SOLID
|
|
127
|
+
1. **S** — Single Responsibility: one class, one reason to change.
|
|
128
|
+
2. **O** — Open/Closed: extend, don't modify.
|
|
129
|
+
3. **L** — Liskov Substitution: subtypes fully substitutable.
|
|
130
|
+
4. **I** — Interface Segregation: small interfaces, no fat abstractions.
|
|
131
|
+
5. **D** — Dependency Inversion: depend on abstractions, inject deps.
|
|
132
|
+
|
|
133
|
+
### SRP (Single Responsibility Pattern)
|
|
134
|
+
- Repository classes: data access ONLY
|
|
135
|
+
- Service classes: business logic ONLY
|
|
136
|
+
- Validator classes: validation rules ONLY
|
|
137
|
+
- Model classes: data structures ONLY
|
|
138
|
+
- If any module mixes these, REFACTOR.
|
|
139
|
+
|
|
140
|
+
### Language
|
|
141
|
+
ALL code, comments, docs, variable names, and commit messages MUST be in English.
|
|
142
|
+
|
|
143
|
+
### Git
|
|
144
|
+
- One commit per logical change
|
|
145
|
+
- Conventional commits format: feat(scope): / fix(scope): / test(scope):
|
|
146
|
+
|
|
147
|
+
### Project Context
|
|
148
|
+
- Check .palbox/ for architecture, conventions, and past work.
|
|
149
|
+
- Read .palbox/README.md, .palbox/architecture.md, .palbox/methods.md before coding.
|
|
150
|
+
- After completing work, the Palskills system will record to .palbox/history/.
|
|
151
|
+
|
|
152
|
+
### Code Quality
|
|
153
|
+
- No file exceeds 200 lines without strong justification.
|
|
154
|
+
- Every function has a clear, single purpose.
|
|
155
|
+
- Prefer composition over inheritance.
|
|
156
|
+
- Write tests for all new logic.
|
|
157
|
+
`;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function claudeRules() {
|
|
161
|
+
return `# CLAUDE.md — Palskills
|
|
162
|
+
# Generated by palskills CLI
|
|
163
|
+
|
|
164
|
+
## Who You Are
|
|
165
|
+
You are an AI coding assistant working in a Palskills-managed project.
|
|
166
|
+
You follow SOLID principles, Single Responsibility Pattern, and write all code in English.
|
|
167
|
+
|
|
168
|
+
## SOLID (Strict)
|
|
169
|
+
1. **Single Responsibility:** Every class, module, and function has exactly ONE reason to change.
|
|
170
|
+
2. **Open/Closed:** Open for extension via inheritance/composition, closed for modification.
|
|
171
|
+
3. **Liskov Substitution:** Derived classes must be fully substitutable for base classes.
|
|
172
|
+
4. **Interface Segregation:** Many small, focused interfaces — no fat abstractions.
|
|
173
|
+
5. **Dependency Inversion:** Depend on abstractions, inject dependencies. Never instantiate collaborators in business logic.
|
|
174
|
+
|
|
175
|
+
## SRP (Single Responsibility Pattern)
|
|
176
|
+
- Repository classes → data access ONLY
|
|
177
|
+
- Service classes → business logic ONLY
|
|
178
|
+
- Validator classes → validation rules ONLY
|
|
179
|
+
- Model classes → data structures ONLY (no methods, no logic)
|
|
180
|
+
- If a class mixes these concerns, REFACTOR immediately.
|
|
181
|
+
|
|
182
|
+
## Code Structure
|
|
183
|
+
\`\`\`
|
|
184
|
+
src/
|
|
185
|
+
├── models/ # Pure data structures
|
|
186
|
+
├── repositories/ # Data access layer
|
|
187
|
+
├── services/ # Business logic
|
|
188
|
+
├── validators/ # Validation rules
|
|
189
|
+
└── interfaces/ # Abstract bases & protocols
|
|
190
|
+
\`\`\`
|
|
191
|
+
|
|
192
|
+
## Language
|
|
193
|
+
ALL code, comments, docstrings, variable names, function names, and commit messages MUST be in English.
|
|
194
|
+
|
|
195
|
+
## Git
|
|
196
|
+
- One commit per logical change.
|
|
197
|
+
- Conventional commits: feat(scope): / fix(scope): / test(scope):
|
|
198
|
+
- Never commit generated files, node_modules, or secrets.
|
|
199
|
+
|
|
200
|
+
## Project Context (Palbox)
|
|
201
|
+
Before starting any task:
|
|
202
|
+
1. Check if .palbox/ exists.
|
|
203
|
+
2. Read .palbox/README.md for project overview.
|
|
204
|
+
3. Read .palbox/architecture.md for folder structure and patterns.
|
|
205
|
+
4. Read .palbox/methods.md for conventions.
|
|
206
|
+
5. Search .palbox/history/ for related past work.
|
|
207
|
+
|
|
208
|
+
After completing work:
|
|
209
|
+
- The Palskills system will record your session to .palbox/history/.
|
|
210
|
+
`;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function installSkills() {
|
|
214
|
+
const hermesHome = process.env.HERMES_HOME || path.join(process.env.HOME || '~', '.hermes');
|
|
215
|
+
const target = path.join(hermesHome, 'skills', 'palskills');
|
|
216
|
+
const src = path.join(__dirname, '..', 'skills');
|
|
217
|
+
|
|
218
|
+
if (!fs.existsSync(src)) {
|
|
219
|
+
console.log(` ${YELLOW}⚠${NC} Skills source not found, skipping Hermes skills install.`);
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
fs.mkdirSync(target, { recursive: true });
|
|
224
|
+
|
|
225
|
+
const skills = fs.readdirSync(src);
|
|
226
|
+
for (const skill of skills) {
|
|
227
|
+
const skillMd = path.join(src, skill, 'SKILL.md');
|
|
228
|
+
if (fs.existsSync(skillMd)) {
|
|
229
|
+
const dest = path.join(target, skill);
|
|
230
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
231
|
+
fs.copyFileSync(skillMd, path.join(dest, 'SKILL.md'));
|
|
232
|
+
console.log(` ${GREEN}✓${NC} Skill: ${skill}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
main().catch(e => { console.error(e); process.exit(1); });
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log("HELLO")
|
package/install.sh
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
HERMES_SKILLS="${HERMES_HOME:-$HOME/.hermes}/skills"
|
|
5
|
+
TARGET="${HERMES_SKILLS}/palskills"
|
|
6
|
+
|
|
7
|
+
echo "╔══════════════════════════════════════╗"
|
|
8
|
+
echo "║ Palskills Installer ║"
|
|
9
|
+
echo "╚══════════════════════════════════════╝"
|
|
10
|
+
echo ""
|
|
11
|
+
|
|
12
|
+
# Check Hermes skills directory
|
|
13
|
+
if [ ! -d "$HERMES_SKILLS" ]; then
|
|
14
|
+
echo "📁 Creating Hermes skills directory: $HERMES_SKILLS"
|
|
15
|
+
mkdir -p "$HERMES_SKILLS"
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# Install each skill
|
|
19
|
+
SKILLS_DIR="$(cd "$(dirname "$0")" && pwd)/skills"
|
|
20
|
+
|
|
21
|
+
for skill in astralym lyleen jetdragon anubis panthalus; do
|
|
22
|
+
if [ -f "$SKILLS_DIR/$skill/SKILL.md" ]; then
|
|
23
|
+
echo "📦 Installing: $skill"
|
|
24
|
+
mkdir -p "$TARGET/$skill"
|
|
25
|
+
cp "$SKILLS_DIR/$skill/SKILL.md" "$TARGET/$skill/SKILL.md"
|
|
26
|
+
else
|
|
27
|
+
echo "⚠️ Warning: $skill/SKILL.md not found, skipping"
|
|
28
|
+
fi
|
|
29
|
+
done
|
|
30
|
+
|
|
31
|
+
echo ""
|
|
32
|
+
echo "✅ Palskills installed to: $TARGET"
|
|
33
|
+
echo ""
|
|
34
|
+
echo "Skills ready:"
|
|
35
|
+
ls -1 "$TARGET"/*/SKILL.md | while read f; do
|
|
36
|
+
dir=$(basename "$(dirname "$f")")
|
|
37
|
+
echo " • $dir"
|
|
38
|
+
done
|
|
39
|
+
echo ""
|
|
40
|
+
echo "Usage: In Hermes Agent, invoke any skill by name:"
|
|
41
|
+
echo " - 'Load the astralym skill'"
|
|
42
|
+
echo " - 'Use lyleen to check palbox'"
|
|
43
|
+
echo " - 'Run jetdragon for planning'"
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "palskills",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "AI-powered development pipeline — 5 Hermes Agent skills orchestrated as a knowledge graph",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"hermes-agent",
|
|
7
|
+
"skills",
|
|
8
|
+
"palskills",
|
|
9
|
+
"knowledge-graph",
|
|
10
|
+
"codex",
|
|
11
|
+
"development",
|
|
12
|
+
"ai-agent",
|
|
13
|
+
"solidsrp"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/faizalardhi16/palskills#readme",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/faizalardhi16/palskills/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/faizalardhi16/palskills.git"
|
|
22
|
+
},
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"author": "Faizal Ardhi Cahyanto",
|
|
25
|
+
"type": "commonjs",
|
|
26
|
+
"main": "index.js",
|
|
27
|
+
"bin": {
|
|
28
|
+
"palskills": "bin/palskills.js"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"skills/",
|
|
32
|
+
"bin/",
|
|
33
|
+
"install.sh"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"postinstall": "bash install.sh"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: anubis
|
|
3
|
+
description: "Development execution via Codex CLI — receives approved plans, formats them as Codex prompts, and runs codex exec following SOLID + SRP. All output in English."
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
author: Palskills
|
|
6
|
+
license: MIT
|
|
7
|
+
platforms: [linux, macos, windows]
|
|
8
|
+
metadata:
|
|
9
|
+
hermes:
|
|
10
|
+
tags: [palskills, development, codex, SOLID, SRP, English-only]
|
|
11
|
+
related_skills: [astralym, lyleen, jetdragon, panthalus, codex]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Anubis — Codex Development Engine
|
|
15
|
+
|
|
16
|
+
Anubis is the **execution arm** of the palskills system. It receives an approved plan from **Jetdragon** and delegates the actual coding to **OpenAI Codex CLI**. Anubis acts as the bridge — translating plans into effective Codex prompts, monitoring execution, and verifying results.
|
|
17
|
+
|
|
18
|
+
## Why Codex?
|
|
19
|
+
|
|
20
|
+
- Anubis doesn't write code directly — it **directs** Codex to write code
|
|
21
|
+
- Codex runs autonomously in a sandbox, making file changes and commits
|
|
22
|
+
- Anubis ensures Codex follows SOLID + SRP principles via explicit prompt instructions
|
|
23
|
+
|
|
24
|
+
## Core Principles (Enforced via Prompting)
|
|
25
|
+
|
|
26
|
+
| Principle | How Anubis Enforces It |
|
|
27
|
+
|-----------|----------------------|
|
|
28
|
+
| **S** — Single Responsibility | Prompt explicitly: "Each class/module must have exactly one reason to change" |
|
|
29
|
+
| **O** — Open/Closed | Prompt: "Use interfaces/abstract bases; extend via inheritance, never modify existing" |
|
|
30
|
+
| **L** — Liskov Substitution | Prompt: "Subtypes must be fully substitutable for their base types" |
|
|
31
|
+
| **I** — Interface Segregation | Prompt: "Create small, focused interfaces; no client should depend on unused methods" |
|
|
32
|
+
| **D** — Dependency Inversion | Prompt: "Depend on abstractions; inject dependencies, no hard-coded instantiations" |
|
|
33
|
+
|
|
34
|
+
## How It Works
|
|
35
|
+
|
|
36
|
+
### Step 1: Load Approved Plan
|
|
37
|
+
|
|
38
|
+
Read the plan from `.palbox/plans/` (handed off by Jetdragon). Verify:
|
|
39
|
+
- Plan status is `APPROVED`
|
|
40
|
+
- All tasks have clear acceptance criteria
|
|
41
|
+
|
|
42
|
+
### Step 2: Build the Codex Prompt
|
|
43
|
+
|
|
44
|
+
Transform the plan into a Codex-optimized prompt. The prompt MUST include:
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
## Task
|
|
48
|
+
[what to build — from the plan]
|
|
49
|
+
|
|
50
|
+
## Context
|
|
51
|
+
- **Project:** [from .palbox/README.md]
|
|
52
|
+
- **Architecture:** [from .palbox/architecture.md]
|
|
53
|
+
- **Conventions:** [from .palbox/methods.md]
|
|
54
|
+
- **Relevant history:** [from .palbox/history/ — linked entries]
|
|
55
|
+
|
|
56
|
+
## SOLID Requirements
|
|
57
|
+
1. **Single Responsibility:** Every class/module does exactly ONE thing
|
|
58
|
+
2. **Open/Closed:** Extend via inheritance/composition, never modify existing code
|
|
59
|
+
3. **Liskov Substitution:** Subtypes must be fully substitutable
|
|
60
|
+
4. **Interface Segregation:** Small focused interfaces, no fat abstractions
|
|
61
|
+
5. **Dependency Inversion:** Depend on abstractions, inject dependencies
|
|
62
|
+
|
|
63
|
+
## SRP Enforcement
|
|
64
|
+
- If a class can be described with "and" in its responsibility — split it
|
|
65
|
+
- Business logic lives in services, data access in repositories, validation in validators
|
|
66
|
+
- No file should exceed 200 lines without strong justification
|
|
67
|
+
|
|
68
|
+
## Language
|
|
69
|
+
ALL code, comments, docstrings, variable names, and commit messages MUST be in English.
|
|
70
|
+
|
|
71
|
+
## Deliverables
|
|
72
|
+
[list of files to create/modify from the plan]
|
|
73
|
+
|
|
74
|
+
## Verification
|
|
75
|
+
[acceptance criteria from the plan]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Step 3: Execute via Codex
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# One-shot execution
|
|
82
|
+
codex exec "[the full prompt above]"
|
|
83
|
+
|
|
84
|
+
# For larger tasks, use --full-auto
|
|
85
|
+
codex exec --full-auto "[the full prompt above]"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Using Hermes terminal with PTY (required):**
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
terminal(
|
|
92
|
+
command="codex exec '[prompt]'",
|
|
93
|
+
workdir="~/project",
|
|
94
|
+
pty=true,
|
|
95
|
+
background=true,
|
|
96
|
+
notify_on_complete=true
|
|
97
|
+
)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Key flags:**
|
|
101
|
+
| Flag | When to use |
|
|
102
|
+
|------|-------------|
|
|
103
|
+
| `exec "[prompt]"` | Default — one-shot, exits when done |
|
|
104
|
+
| `--full-auto` | Larger multi-file changes, auto-approves sandboxed changes |
|
|
105
|
+
| `--yolo` | Only when user explicitly requests maximum speed (rare) |
|
|
106
|
+
|
|
107
|
+
### Step 4: Monitor Execution
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Check progress
|
|
111
|
+
process(action="poll", session_id="<id>")
|
|
112
|
+
|
|
113
|
+
# Read full output if needed
|
|
114
|
+
process(action="log", session_id="<id>")
|
|
115
|
+
|
|
116
|
+
# Answer Codex questions if they arise
|
|
117
|
+
process(action="submit", session_id="<id>", data="yes, proceed")
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Step 5: Verify Output
|
|
121
|
+
|
|
122
|
+
After Codex finishes:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Check what changed
|
|
126
|
+
git diff --stat HEAD~1
|
|
127
|
+
git log --oneline -5
|
|
128
|
+
|
|
129
|
+
# Verify tests pass (if applicable)
|
|
130
|
+
# [project-specific test command]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Step 6: Report
|
|
134
|
+
|
|
135
|
+
Return to Astralym with:
|
|
136
|
+
- ✅ / ❌ status
|
|
137
|
+
- Files changed
|
|
138
|
+
- Commits made
|
|
139
|
+
- Any issues encountered
|
|
140
|
+
|
|
141
|
+
## Prompt Template (Full)
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
You are implementing a feature in this project. Follow these rules strictly.
|
|
145
|
+
|
|
146
|
+
## PROJECT CONTEXT
|
|
147
|
+
{palbox_context}
|
|
148
|
+
|
|
149
|
+
## TASK
|
|
150
|
+
{plan_tasks}
|
|
151
|
+
|
|
152
|
+
## CODING STANDARDS
|
|
153
|
+
|
|
154
|
+
### SOLID Principles
|
|
155
|
+
1. **Single Responsibility:** Every class, module, and function must have exactly ONE reason to change. If a class handles both data access AND business logic, split it.
|
|
156
|
+
2. **Open/Closed:** Software entities must be open for extension but closed for modification. Use abstract base classes, interfaces, and strategy patterns.
|
|
157
|
+
3. **Liskov Substitution:** Derived classes must be fully substitutable for their base classes. Never violate base class contracts.
|
|
158
|
+
4. **Interface Segregation:** Many small, focused interfaces are better than one large, general-purpose interface. No client should be forced to depend on methods it does not use.
|
|
159
|
+
5. **Dependency Inversion:** Depend on abstractions, not concretions. Inject dependencies — never instantiate collaborators directly inside business logic.
|
|
160
|
+
|
|
161
|
+
### SRP (Single Responsibility Pattern) — CRITICAL
|
|
162
|
+
- Repository classes: data access ONLY
|
|
163
|
+
- Service classes: business logic ONLY
|
|
164
|
+
- Validator classes: validation rules ONLY
|
|
165
|
+
- Model classes: data structures ONLY
|
|
166
|
+
- If any module mixes these concerns, REFACTOR immediately
|
|
167
|
+
|
|
168
|
+
### Code Structure
|
|
169
|
+
{project_structure}
|
|
170
|
+
|
|
171
|
+
### Language
|
|
172
|
+
ALL code, comments, docstrings, variable names, function names, and commit messages MUST be in English. No exceptions.
|
|
173
|
+
|
|
174
|
+
## FILES TO CREATE/MODIFY
|
|
175
|
+
{file_list}
|
|
176
|
+
|
|
177
|
+
## ACCEPTANCE CRITERIA
|
|
178
|
+
{criteria}
|
|
179
|
+
|
|
180
|
+
## COMMIT
|
|
181
|
+
When done, commit each logical change separately with descriptive English commit messages following conventional commits format.
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Rules
|
|
185
|
+
|
|
186
|
+
1. **Codex runs the code** — Anubis directs, Codex executes
|
|
187
|
+
2. **SOLID + SRP in every prompt** — never assume Codex will follow them otherwise
|
|
188
|
+
3. **Always use `pty=true`** — Codex is interactive, hangs without PTY
|
|
189
|
+
4. **Background for non-trivial tasks** — use `background=true` + `notify_on_complete=true`
|
|
190
|
+
5. **Verify after execution** — don't trust Codex blindly; check git diff
|
|
191
|
+
6. **English only** — prompts, expectations, verification. All in English.
|
|
192
|
+
7. **Respect palbox context** — always include relevant architecture/methods/history in the prompt
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: astralym
|
|
3
|
+
description: "Core state machine orchestrator for the palskills development system. Routes user prompts through CHECK_GRAPH → PLANNING → DEVELOPING → RECORDING states across an Obsidian-like knowledge graph."
|
|
4
|
+
version: 1.1.0
|
|
5
|
+
author: Palskills
|
|
6
|
+
license: MIT
|
|
7
|
+
platforms: [linux, macos, windows]
|
|
8
|
+
metadata:
|
|
9
|
+
hermes:
|
|
10
|
+
tags: [palskills, state-machine, orchestrator, knowledge-graph, development-workflow]
|
|
11
|
+
related_skills: [lyleen, jetdragon, anubis, panthalus]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Astralym — State Machine Core
|
|
15
|
+
|
|
16
|
+
Astralym is the central orchestrator of the palskills development system. It routes every user prompt through a strict pipeline, treating the **palbox as a knowledge graph** where every `.md` file is a node connected by `[[wikilinks]]`.
|
|
17
|
+
|
|
18
|
+
## The Knowledge Graph Pipeline
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
┌──────────────────────┐
|
|
22
|
+
user prompt │ │
|
|
23
|
+
───────────────────► │ CHECK_GRAPH │
|
|
24
|
+
│ (Lyleen) │
|
|
25
|
+
│ │
|
|
26
|
+
│ .palbox/ missing? │
|
|
27
|
+
│ → bootstrap graph │
|
|
28
|
+
│ .palbox/ exists? │
|
|
29
|
+
│ → traverse wikilinks │
|
|
30
|
+
│ → return subgraph │
|
|
31
|
+
└──────────┬───────────┘
|
|
32
|
+
│
|
|
33
|
+
context subgraph
|
|
34
|
+
(seeds + neighbors)
|
|
35
|
+
│
|
|
36
|
+
▼
|
|
37
|
+
┌──────────────────────┐
|
|
38
|
+
│ PLANNING │
|
|
39
|
+
│ (Jetdragon) │
|
|
40
|
+
│ │
|
|
41
|
+
│ → study subgraph │
|
|
42
|
+
│ → ask questions │
|
|
43
|
+
│ → generate plan │
|
|
44
|
+
│ with [[wikilinks]] │
|
|
45
|
+
└──────────┬───────────┘
|
|
46
|
+
│
|
|
47
|
+
user says "Gas"
|
|
48
|
+
│
|
|
49
|
+
▼
|
|
50
|
+
┌──────────────────────┐
|
|
51
|
+
│ DEVELOPING │
|
|
52
|
+
│ (Anubis → Codex) │
|
|
53
|
+
│ │
|
|
54
|
+
│ → build Codex prompt │
|
|
55
|
+
│ → codex exec │
|
|
56
|
+
│ → verify output │
|
|
57
|
+
└──────────┬───────────┘
|
|
58
|
+
│
|
|
59
|
+
code committed
|
|
60
|
+
│
|
|
61
|
+
▼
|
|
62
|
+
┌──────────────────────┐
|
|
63
|
+
│ RECORDING │
|
|
64
|
+
│ (Panthalus) │
|
|
65
|
+
│ │
|
|
66
|
+
│ → create history node│
|
|
67
|
+
│ → add [[wikilinks]] │
|
|
68
|
+
│ → create backlinks │
|
|
69
|
+
│ → enrich the graph │
|
|
70
|
+
└──────────┬───────────┘
|
|
71
|
+
│
|
|
72
|
+
▼
|
|
73
|
+
┌──────────────────────┐
|
|
74
|
+
│ DONE │
|
|
75
|
+
│ (Report + stats) │
|
|
76
|
+
└──────────────────────┘
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## States
|
|
80
|
+
|
|
81
|
+
| State | Skill | Action |
|
|
82
|
+
|-------|-------|--------|
|
|
83
|
+
| `CHECK_GRAPH` | Lyleen | Bootstrap if missing; traverse `[[wikilinks]]` → context subgraph |
|
|
84
|
+
| `PLANNING` | Jetdragon | Study subgraph → generate plan with `[[wikilinks]]` → ask questions |
|
|
85
|
+
| `DEVELOPING` | Anubis → Codex | Build Codex prompt from plan → `codex exec` → verify |
|
|
86
|
+
| `RECORDING` | Panthalus | Create history node → add `[[wikilinks]]` → create backlinks → enrich graph |
|
|
87
|
+
| `DONE` | Astralym | Report summary + graph stats; return to IDLE |
|
|
88
|
+
|
|
89
|
+
## Palbox Knowledge Graph Structure
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
.palbox/
|
|
93
|
+
├── README.md # Root node — [[architecture]], [[methods]]
|
|
94
|
+
├── architecture.md # Codebase map — [[methods]], [[flows/*]]
|
|
95
|
+
├── methods.md # Conventions — [[architecture]], [[history/*]]
|
|
96
|
+
├── flows/ # Feature docs — [[architecture]], [[methods]], [[history/*]]
|
|
97
|
+
│ └── *.md
|
|
98
|
+
├── plans/ # Active plans — [[flows/*]], [[history/*]]
|
|
99
|
+
│ └── YYYY-MM-DD-*.md
|
|
100
|
+
└── history/ # Session records — [[flows/*]], [[architecture]], [[methods]]
|
|
101
|
+
└── YYYY-MM-DD-*.md
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Rules
|
|
105
|
+
|
|
106
|
+
1. **Never skip states** — every prompt flows through the full pipeline
|
|
107
|
+
2. **Graph is source of truth** — always traverse before planning
|
|
108
|
+
3. **User approval is gate** — DEVELOPING only after "Gas"
|
|
109
|
+
4. **Recording is mandatory** — every session enriches the graph
|
|
110
|
+
5. **Links over repetition** — use `[[wikilinks]]` instead of duplicating content
|
|
111
|
+
6. **Bidirectional links** — every edge should have a backlink (Panthalus enforces this)
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jetdragon
|
|
3
|
+
description: "Planning specialist — asks clarifying questions, generates detailed plans with [[wikilinks]] to palbox context, and produces Codex-ready prompts."
|
|
4
|
+
version: 1.1.0
|
|
5
|
+
author: Palskills
|
|
6
|
+
license: MIT
|
|
7
|
+
platforms: [linux, macos, windows]
|
|
8
|
+
metadata:
|
|
9
|
+
hermes:
|
|
10
|
+
tags: [palskills, planning, clarification, wikilinks, knowledge-graph]
|
|
11
|
+
related_skills: [astralym, lyleen, anubis, panthalus]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Jetdragon — Planning & Clarification
|
|
15
|
+
|
|
16
|
+
Jetdragon is the **planning engine** of the palskills system. It receives a context subgraph from **Lyleen** (not just flat context — a connected graph of palbox nodes with `[[wikilinks]]`) and produces a detailed implementation plan. It **asks questions** until the plan is crystal clear.
|
|
17
|
+
|
|
18
|
+
## Philosophy
|
|
19
|
+
|
|
20
|
+
> A bad plan produces bad code. Jetdragon's job is to eliminate ambiguity before a single line of code is written.
|
|
21
|
+
|
|
22
|
+
Per the user's convention: **brainstorming dulu, baru kode**. Jetdragon embodies this — it will not hand off to Anubis until the user explicitly says "Gas".
|
|
23
|
+
|
|
24
|
+
## How It Works
|
|
25
|
+
|
|
26
|
+
### Step 1: Absorb the Knowledge Graph
|
|
27
|
+
|
|
28
|
+
Jetdragon receives from Lyleen:
|
|
29
|
+
- The user's original prompt
|
|
30
|
+
- A **context subgraph** — seed nodes + their wikilink neighbors (1-2 hops)
|
|
31
|
+
|
|
32
|
+
Example subgraph:
|
|
33
|
+
```
|
|
34
|
+
Seed: [[flows/auth-login]]
|
|
35
|
+
├── [[architecture]] → Auth module in `src/auth/`
|
|
36
|
+
├── [[methods]] → JWT + refresh token pattern
|
|
37
|
+
├── [[history/2026-07-10-jwt-refresh]] → Previous JWT work
|
|
38
|
+
└── [[history/2026-06-28-session-store]] → Session storage refactor
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Step 2: Generate Initial Plan with Wikilinks
|
|
42
|
+
|
|
43
|
+
Create `.palbox/plans/YYYY-MM-DD-feature-name.md`:
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
# Plan: [Feature Name]
|
|
47
|
+
**Date:** YYYY-MM-DD
|
|
48
|
+
**Status:** DRAFT — awaiting user feedback
|
|
49
|
+
|
|
50
|
+
## Knowledge Graph Context
|
|
51
|
+
- [[flows/auth-login]] — This plan extends the auth flow
|
|
52
|
+
- [[architecture]] — Relevant module: `src/auth/`
|
|
53
|
+
- [[methods]] — Follows JWT conventions
|
|
54
|
+
- [[history/2026-07-10-jwt-refresh]] — Builds on previous JWT work
|
|
55
|
+
|
|
56
|
+
## Overview
|
|
57
|
+
[2-3 sentences describing what will be built]
|
|
58
|
+
|
|
59
|
+
## Scope
|
|
60
|
+
- **In scope:** ...
|
|
61
|
+
- **Out of scope:** ...
|
|
62
|
+
|
|
63
|
+
## Tasks (ordered)
|
|
64
|
+
### Task 1: [Name]
|
|
65
|
+
- **What:** ...
|
|
66
|
+
- **Files to touch:** ...
|
|
67
|
+
- **Linked context:** [[architecture]], [[methods]]
|
|
68
|
+
- **Verification:** ...
|
|
69
|
+
|
|
70
|
+
### Task 2: [Name]
|
|
71
|
+
...
|
|
72
|
+
|
|
73
|
+
## Open Questions
|
|
74
|
+
1. ???
|
|
75
|
+
2. ???
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Step 3: Ask Clarifying Questions
|
|
79
|
+
|
|
80
|
+
Jetdragon **must** ask when ambiguous. Categories:
|
|
81
|
+
- **Scope** — "Should this also handle X?"
|
|
82
|
+
- **Design** — "Class-based or functional?"
|
|
83
|
+
- **Edge cases** — "What happens when input is empty?"
|
|
84
|
+
- **Integration** — "Does this need to integrate with [[flows/payment]]?"
|
|
85
|
+
- **Priority** — "Which task first?"
|
|
86
|
+
|
|
87
|
+
### Step 4: Iterate Until Clear
|
|
88
|
+
|
|
89
|
+
Cycle: user responds → Jetdragon updates plan → asks more → repeat.
|
|
90
|
+
|
|
91
|
+
Ends when: user says **"Gas"**, **"Go"**, **"Execute"**.
|
|
92
|
+
|
|
93
|
+
### Step 5: Finalize & Hand Off
|
|
94
|
+
|
|
95
|
+
- Status → `APPROVED`
|
|
96
|
+
- Add `## Codex Prompt` section (self-contained, English, includes linked context summaries)
|
|
97
|
+
- Hand off to **Anubis**
|
|
98
|
+
|
|
99
|
+
## Codex-Ready Output
|
|
100
|
+
|
|
101
|
+
Every plan includes a **Codex Prompt** section:
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
## Codex Prompt
|
|
105
|
+
|
|
106
|
+
[Self-contained prompt in English]
|
|
107
|
+
|
|
108
|
+
Context from palbox:
|
|
109
|
+
- Architecture: [[architecture]] → auth module in src/auth/, uses Repository pattern
|
|
110
|
+
- Methods: [[methods]] → JWT with refresh tokens, pytest for testing
|
|
111
|
+
- Past work: [[history/2026-07-10-jwt-refresh]] → existing refresh rotation logic
|
|
112
|
+
|
|
113
|
+
Task: [what to build]
|
|
114
|
+
SOLID + SRP requirements: [enforced]
|
|
115
|
+
Files: [list]
|
|
116
|
+
Verification: [criteria]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Rules
|
|
120
|
+
|
|
121
|
+
1. **Never skip questions** — ambiguous = ask
|
|
122
|
+
2. **Plan before code** — wait for "Gas"
|
|
123
|
+
3. **Save to `.palbox/plans/`** with `[[wikilinks]]` to context
|
|
124
|
+
4. **Respect the graph** — plans align with linked architecture/methods
|
|
125
|
+
5. **One plan per feature**
|
|
126
|
+
6. **Always include Codex Prompt** — Anubis needs it
|
|
127
|
+
7. **Link context, don't repeat** — use `[[wikilinks]]` instead of copy-pasting
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lyleen
|
|
3
|
+
description: "Palbox knowledge graph reader & bootstrapper — creates .palbox/ if missing, then traverses [[wikilinks]] to retrieve connected context like an Obsidian vault."
|
|
4
|
+
version: 3.0.0
|
|
5
|
+
author: Palskills
|
|
6
|
+
license: MIT
|
|
7
|
+
platforms: [linux, macos, windows]
|
|
8
|
+
metadata:
|
|
9
|
+
hermes:
|
|
10
|
+
tags: [palskills, palbox, knowledge-graph, wikilinks, context-retrieval, bootstrapper]
|
|
11
|
+
related_skills: [astralym, jetdragon, anubis, panthalus]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Lyleen — Knowledge Graph Reader & Bootstrapper
|
|
15
|
+
|
|
16
|
+
Lyleen is the **gatekeeper** of the palskills knowledge graph. The palbox is an Obsidian-style interconnected vault where every `.md` file is a **node** and `[[wikilinks]]` form the **edges**. When invoked, Lyleen first checks whether `.palbox/` exists — if not, it bootstraps the entire graph from the codebase. Once the graph exists, Lyleen traverses wikilinks to retrieve a **context subgraph** relevant to the user's prompt.
|
|
17
|
+
|
|
18
|
+
## Palbox as a Knowledge Graph
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
.palbox/
|
|
22
|
+
│
|
|
23
|
+
┌─────────┼──────────┐
|
|
24
|
+
▼ ▼ ▼
|
|
25
|
+
README.md architecture methods.md
|
|
26
|
+
│ │ │
|
|
27
|
+
[[architecture]] [[methods]] [[flows/auth]]
|
|
28
|
+
[[methods]] [[flows/*]] [[history/*]]
|
|
29
|
+
│ │ │
|
|
30
|
+
└────┬────┴──────┬───────┘
|
|
31
|
+
│ │
|
|
32
|
+
▼ ▼
|
|
33
|
+
flows/ history/
|
|
34
|
+
auth.md 2026-07-19-login.md
|
|
35
|
+
│ │
|
|
36
|
+
[[methods]] [[flows/auth]]
|
|
37
|
+
[[history/*]] [[architecture]]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Nodes** = `.md` files. **Edges** = `[[wikilinks]]` between them.
|
|
41
|
+
|
|
42
|
+
## How It Works
|
|
43
|
+
|
|
44
|
+
### Step 1: Check if Palbox Exists
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
ls .palbox/ 2>/dev/null
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Step 2a: Palbox Missing → BOOTSTRAP
|
|
51
|
+
|
|
52
|
+
If `.palbox/` does NOT exist, Lyleen creates the knowledge graph from scratch.
|
|
53
|
+
|
|
54
|
+
#### Bootstrap Process
|
|
55
|
+
|
|
56
|
+
**1. Create the folder structure:**
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
mkdir -p .palbox/{flows,history,plans}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**2. Analyze the codebase:**
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
find . -maxdepth 2 -type d ! -path './.git/*' ! -path './node_modules/*' ! -path './__pycache__/*' ! -path './.venv/*' | sort
|
|
66
|
+
ls -la package.json requirements.txt pyproject.toml go.mod Cargo.toml 2>/dev/null
|
|
67
|
+
cat README.md 2>/dev/null
|
|
68
|
+
git log --oneline --since="3 months ago" | head -20
|
|
69
|
+
find . -name '*test*' -o -name '*spec*' | head -20
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**3. Create interconnected core documents with wikilinks:**
|
|
73
|
+
|
|
74
|
+
`.palbox/README.md` — the root node, links to everything:
|
|
75
|
+
```markdown
|
|
76
|
+
# [Project Name]
|
|
77
|
+
|
|
78
|
+
**Generated:** YYYY-MM-DD
|
|
79
|
+
**Bootstrapped by:** Lyleen (palskills)
|
|
80
|
+
|
|
81
|
+
## Overview
|
|
82
|
+
[Brief description]
|
|
83
|
+
|
|
84
|
+
## Tech Stack
|
|
85
|
+
- **Language:** [...]
|
|
86
|
+
- **Framework:** [...]
|
|
87
|
+
- **Database:** [...]
|
|
88
|
+
|
|
89
|
+
## Knowledge Graph
|
|
90
|
+
- [[architecture]] — folder structure & design patterns
|
|
91
|
+
- [[methods]] — coding conventions & standards
|
|
92
|
+
- [[flows/]] — feature workflow documentation
|
|
93
|
+
- [[history/]] — past development sessions
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`.palbox/architecture.md` — codebase map:
|
|
97
|
+
```markdown
|
|
98
|
+
# Architecture
|
|
99
|
+
|
|
100
|
+
**Last Updated:** YYYY-MM-DD
|
|
101
|
+
|
|
102
|
+
## Folder Structure
|
|
103
|
+
```
|
|
104
|
+
[annotated tree]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Design Patterns
|
|
108
|
+
[Patterns detected]
|
|
109
|
+
|
|
110
|
+
## Key Modules
|
|
111
|
+
| Module | Responsibility |
|
|
112
|
+
|--------|---------------|
|
|
113
|
+
| ... | ... |
|
|
114
|
+
|
|
115
|
+
## Related
|
|
116
|
+
- [[methods]] — how we build
|
|
117
|
+
- [[README]] — project overview
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
`.palbox/methods.md` — conventions:
|
|
121
|
+
```markdown
|
|
122
|
+
# Development Methods
|
|
123
|
+
|
|
124
|
+
**Last Updated:** YYYY-MM-DD
|
|
125
|
+
|
|
126
|
+
## Coding Conventions
|
|
127
|
+
[...]
|
|
128
|
+
|
|
129
|
+
## Testing Strategy
|
|
130
|
+
[...]
|
|
131
|
+
|
|
132
|
+
## Git Workflow
|
|
133
|
+
[...]
|
|
134
|
+
|
|
135
|
+
## Related
|
|
136
|
+
- [[architecture]] — where things live
|
|
137
|
+
- [[README]] — project overview
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**4. Report:**
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
## Palbox Knowledge Graph Bootstrapped ✓
|
|
144
|
+
|
|
145
|
+
Created `.palbox/` with interconnected nodes:
|
|
146
|
+
- [[README]] — root node, links to all core docs
|
|
147
|
+
- [[architecture]] — codebase map ↔ [[methods]]
|
|
148
|
+
- [[methods]] — conventions ↔ [[architecture]]
|
|
149
|
+
- `flows/` — (empty) ready for feature docs
|
|
150
|
+
- `history/` — (empty) ready for session records
|
|
151
|
+
|
|
152
|
+
Graph has [N] nodes and [M] edges.
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Step 2b: Palbox Exists → TRAVERSE
|
|
156
|
+
|
|
157
|
+
**Phase 1: Seed Discovery**
|
|
158
|
+
|
|
159
|
+
Find palbox entries that directly match the user's prompt keywords:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
grep -ril "<keyword1>\|<keyword2>" .palbox/ --include="*.md" | head -10
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Each matching file is a **seed node**.
|
|
166
|
+
|
|
167
|
+
**Phase 2: Graph Traversal**
|
|
168
|
+
|
|
169
|
+
For each seed node, extract all `[[wikilinks]]` and follow them 1-2 hops:
|
|
170
|
+
|
|
171
|
+
```python
|
|
172
|
+
# Pseudo-code for link traversal
|
|
173
|
+
visited = set()
|
|
174
|
+
queue = seed_nodes
|
|
175
|
+
|
|
176
|
+
for node in queue:
|
|
177
|
+
visited.add(node)
|
|
178
|
+
content = read(".palbox/" + node)
|
|
179
|
+
links = extract_wikilinks(content) # regex: \[\[([^\]]+)\]\]
|
|
180
|
+
for link in links:
|
|
181
|
+
resolved = resolve_link(link) # handle paths, .md extension
|
|
182
|
+
if resolved not in visited:
|
|
183
|
+
queue.append(resolved)
|
|
184
|
+
if depth > max_depth: break
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Phase 3: Build Context Subgraph**
|
|
188
|
+
|
|
189
|
+
Return the connected subgraph as structured context:
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
## Palbox Context (Knowledge Graph)
|
|
193
|
+
|
|
194
|
+
### Seed: [[flows/auth-login]]
|
|
195
|
+
Matched: "login", "authentication"
|
|
196
|
+
|
|
197
|
+
### Linked Nodes (1 hop)
|
|
198
|
+
- [[architecture]] — Auth module lives in `src/auth/`
|
|
199
|
+
- [[methods]] — Uses JWT + refresh token pattern
|
|
200
|
+
|
|
201
|
+
### Linked Nodes (2 hops)
|
|
202
|
+
- [[history/2026-07-10-jwt-refresh]] — Previous JWT refresh work
|
|
203
|
+
- [[history/2026-06-28-session-store]] — Session storage refactor
|
|
204
|
+
|
|
205
|
+
### Graph Summary
|
|
206
|
+
- **Nodes traversed:** 5
|
|
207
|
+
- **Relevant past work:** 2 sessions
|
|
208
|
+
- **Conventions found:** JWT pattern, testing with pytest
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Phase 4: Deliver**
|
|
212
|
+
|
|
213
|
+
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
|
+
|
|
215
|
+
## Wikilink Conventions
|
|
216
|
+
|
|
217
|
+
| Syntax | Meaning |
|
|
218
|
+
|--------|---------|
|
|
219
|
+
| `[[architecture]]` | Links to `.palbox/architecture.md` |
|
|
220
|
+
| `[[methods]]` | Links to `.palbox/methods.md` |
|
|
221
|
+
| `[[flows/auth]]` | Links to `.palbox/flows/auth.md` |
|
|
222
|
+
| `[[history/2026-07-19-feature]]` | Links to a specific history entry |
|
|
223
|
+
| `[[methods#testing-strategy]]` | Links to a heading within a page |
|
|
224
|
+
| `[[architecture|see architecture]]` | Aliased link (display text differs) |
|
|
225
|
+
|
|
226
|
+
## Traversal Rules
|
|
227
|
+
|
|
228
|
+
1. **Max depth: 2 hops** — enough for context, prevents graph explosion
|
|
229
|
+
2. **Bidirectional awareness** — if A links to B, treat B's link to A as redundant
|
|
230
|
+
3. **Prioritize seeds** — direct matches are primary; linked nodes are supporting
|
|
231
|
+
4. **Skip cycles** — `visited` set prevents infinite loops
|
|
232
|
+
5. **Highlight orphans** — if a seed has no wikilinks, flag it so user can enrich
|
|
233
|
+
|
|
234
|
+
## Rules
|
|
235
|
+
|
|
236
|
+
1. **Bootstrap if missing** — never return "palbox not found"; create the graph
|
|
237
|
+
2. **Analyze before writing** — read actual files, don't guess
|
|
238
|
+
3. **Traverse wikilinks** — context retrieval is graph traversal, not grep
|
|
239
|
+
4. **Return subgraphs** — provide related nodes, not isolated files
|
|
240
|
+
5. **Max 2 hops** — enough context without noise
|
|
241
|
+
6. **Report graph stats** — nodes traversed, links followed, orphans found
|
|
242
|
+
7. **Bootstrap is one-time** — subsequent calls traverse the existing graph
|
|
243
|
+
8. **Bidirectional links matter** — Panthalus maintains them; Lyleen exploits them
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: panthalus
|
|
3
|
+
description: "Palbox knowledge graph archivist — records sessions with bi-directional [[wikilinks]], creating a traversable Obsidian-like vault of development history."
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
author: Palskills
|
|
6
|
+
license: MIT
|
|
7
|
+
platforms: [linux, macos, windows]
|
|
8
|
+
metadata:
|
|
9
|
+
hermes:
|
|
10
|
+
tags: [palskills, palbox, knowledge-graph, wikilinks, archivist]
|
|
11
|
+
related_skills: [astralym, lyleen, jetdragon, anubis]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Panthalus — Knowledge Graph Archivist
|
|
15
|
+
|
|
16
|
+
Panthalus is the **graph builder** of the palskills system. After every development session, it records what was done — not as an isolated file, but as a **node** in the palbox knowledge graph, connected via `[[wikilinks]]` to related entries. It also **backlinks** — updating existing nodes to point to the new entry, maintaining a bidirectional graph.
|
|
17
|
+
|
|
18
|
+
## The Graph Philosophy
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
Before Panthalus: After Panthalus:
|
|
22
|
+
|
|
23
|
+
[[flows/auth]] [[flows/auth]]
|
|
24
|
+
│ │
|
|
25
|
+
└── (no links) ├── [[history/2026-07-19-login]]
|
|
26
|
+
│ │
|
|
27
|
+
[[architecture]] [[architecture]]
|
|
28
|
+
│ │
|
|
29
|
+
└── (no links) └── [[history/2026-07-19-login]]
|
|
30
|
+
|
|
31
|
+
[[history/2026-07-19-login]]
|
|
32
|
+
│
|
|
33
|
+
├── [[flows/auth]]
|
|
34
|
+
├── [[architecture]]
|
|
35
|
+
└── [[methods]]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Every session enriches the graph. Nodes gain connections. Orphans get adopted.
|
|
39
|
+
|
|
40
|
+
## How It Works
|
|
41
|
+
|
|
42
|
+
### Step 1: Collect Artifacts
|
|
43
|
+
|
|
44
|
+
After Anubis/Codex completes:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
git log --oneline --since="1 hour ago"
|
|
48
|
+
git diff --stat HEAD~1
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Collect: plan, files changed, commits, decisions, lessons.
|
|
52
|
+
|
|
53
|
+
### Step 2: Identify Related Nodes
|
|
54
|
+
|
|
55
|
+
Find existing palbox entries that relate to this session:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Search for related flows, patterns, past work
|
|
59
|
+
grep -ril "<feature_keywords>" .palbox/flows/ .palbox/history/ 2>/dev/null
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
These become the **link targets** for the new entry.
|
|
63
|
+
|
|
64
|
+
### Step 3: Create History Node with Wikilinks
|
|
65
|
+
|
|
66
|
+
Create `.palbox/history/YYYY-MM-DD-feature-name.md`:
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
# [Feature Name]
|
|
70
|
+
**Date:** YYYY-MM-DD
|
|
71
|
+
**Executor:** Codex CLI
|
|
72
|
+
|
|
73
|
+
## Links
|
|
74
|
+
- [[flows/auth]] — Authentication flow this feature extends
|
|
75
|
+
- [[architecture]] — Auth module in `src/auth/`
|
|
76
|
+
- [[methods]] — JWT + testing conventions followed
|
|
77
|
+
- [[history/2026-07-10-jwt-refresh]] — Previous JWT work this builds on
|
|
78
|
+
|
|
79
|
+
## Original Prompt
|
|
80
|
+
> [user's original prompt]
|
|
81
|
+
|
|
82
|
+
## Plan
|
|
83
|
+
[approved plan from Jetdragon]
|
|
84
|
+
|
|
85
|
+
## Codex Execution
|
|
86
|
+
### Prompt Sent
|
|
87
|
+
``` [Codex prompt] ```
|
|
88
|
+
|
|
89
|
+
### Files Changed
|
|
90
|
+
- `path/to/file.py` — [what was done]
|
|
91
|
+
- `path/to/another.py` — [what was done]
|
|
92
|
+
|
|
93
|
+
### Commits
|
|
94
|
+
- `abc1234` feat(scope): description
|
|
95
|
+
- `def5678` test(scope): description
|
|
96
|
+
|
|
97
|
+
## Key Decisions
|
|
98
|
+
| Decision | Rationale |
|
|
99
|
+
|----------|-----------|
|
|
100
|
+
| ... | ... |
|
|
101
|
+
|
|
102
|
+
## Lessons Learned
|
|
103
|
+
- **Pitfall:** ...
|
|
104
|
+
- **Discovery:** ...
|
|
105
|
+
- **Codex quirk:** ...
|
|
106
|
+
|
|
107
|
+
## Backlinks
|
|
108
|
+
*The following entries now link here:*
|
|
109
|
+
- [[flows/auth]] — updated with link to this session
|
|
110
|
+
- [[history/2026-07-10-jwt-refresh]] — updated with "see also" link
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Step 4: Create Backlinks (CRITICAL)
|
|
114
|
+
|
|
115
|
+
For every `[[link]]` in the history entry, Panthalus **must** add a reciprocal link back:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# For each linked file, append a backlink
|
|
119
|
+
echo "- [[history/2026-07-19-feature]] — [one-line summary]" >> .palbox/flows/auth.md
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Backlink format:**
|
|
123
|
+
```markdown
|
|
124
|
+
## Related Sessions
|
|
125
|
+
- [[history/2026-07-19-login-fix]] — Fixed login edge case with expired tokens
|
|
126
|
+
- [[history/2026-07-10-jwt-refresh]] — Implemented JWT refresh rotation
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
If the target file doesn't have a "Related Sessions" section, create one at the bottom.
|
|
130
|
+
|
|
131
|
+
### Step 5: Update Core Docs (If Structure Changed)
|
|
132
|
+
|
|
133
|
+
Only when architecture or methods fundamentally change:
|
|
134
|
+
|
|
135
|
+
- `.palbox/architecture.md` — new modules, pattern shifts
|
|
136
|
+
- `.palbox/methods.md` — new conventions emerged
|
|
137
|
+
|
|
138
|
+
Add the change AND link to the history entry that caused it:
|
|
139
|
+
```markdown
|
|
140
|
+
## Changelog
|
|
141
|
+
- [[history/2026-07-19-feature]] — Added `src/cache/` module for Redis caching layer
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Step 6: Report
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
## Knowledge Graph Updated
|
|
148
|
+
|
|
149
|
+
**New node:** [[history/2026-07-19-feature]]
|
|
150
|
+
**Edges created:** 6 (3 outgoing, 3 backlinks)
|
|
151
|
+
**Nodes enriched:** [[flows/auth]], [[architecture]], [[history/2026-07-10-jwt-refresh]]
|
|
152
|
+
|
|
153
|
+
**Graph health:**
|
|
154
|
+
- Total nodes: 12
|
|
155
|
+
- Total edges: 34
|
|
156
|
+
- Orphan nodes: 0
|
|
157
|
+
- Avg. degree: 2.8
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Graph Health Checks
|
|
161
|
+
|
|
162
|
+
Every ~5 sessions, Panthalus should audit the graph:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Find orphan nodes (no incoming links)
|
|
166
|
+
for f in .palbox/history/*.md; do
|
|
167
|
+
name=$(basename "$f" .md)
|
|
168
|
+
grep -rl "\[\[history/$name\]\]" .palbox/ | wc -l
|
|
169
|
+
done
|
|
170
|
+
|
|
171
|
+
# Find broken links
|
|
172
|
+
grep -roh '\[\[[^]]*\]\]' .palbox/ | sed 's/\[\[//;s/\]\]//' | while read link; do
|
|
173
|
+
# Resolve and check if file exists
|
|
174
|
+
done
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Flag:
|
|
178
|
+
- **Orphans** — history entries with no backlinks (nothing points to them)
|
|
179
|
+
- **Dead ends** — entries with no outgoing links
|
|
180
|
+
- **Broken links** — wikilinks pointing to non-existent files
|
|
181
|
+
|
|
182
|
+
## Wikilink Conventions
|
|
183
|
+
|
|
184
|
+
| Syntax | Usage |
|
|
185
|
+
|--------|-------|
|
|
186
|
+
| `[[flows/feature-name]]` | Link to a flow document |
|
|
187
|
+
| `[[history/YYYY-MM-DD-name]]` | Link to a past session |
|
|
188
|
+
| `[[architecture]]` | Link to architecture doc |
|
|
189
|
+
| `[[methods]]` | Link to methods doc |
|
|
190
|
+
| `[[README]]` | Link to project overview |
|
|
191
|
+
|
|
192
|
+
## Rules
|
|
193
|
+
|
|
194
|
+
1. **Record EVERY session** — no exceptions
|
|
195
|
+
2. **Always create bi-directional links** — outgoing + backlinks
|
|
196
|
+
3. **Enrich, don't duplicate** — link to existing docs instead of repeating them
|
|
197
|
+
4. **Backlink section** — every linked file gets a `## Related Sessions` entry
|
|
198
|
+
5. **Graph health** — audit every ~5 sessions
|
|
199
|
+
6. **No orphan nodes** — every history entry must have at least one incoming link
|
|
200
|
+
7. **Preserve the plan** — full plan in history, not summarized
|
|
201
|
+
8. **Codex metadata** — capture flags, iterations, prompt patterns
|