@automagik/genie 0.260202.1833 → 0.260203.43
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/.beads/README.md +81 -0
- package/.beads/config.yaml +67 -0
- package/.beads/interactions.jsonl +0 -0
- package/.beads/issues.jsonl +9 -0
- package/.beads/metadata.json +4 -0
- package/.claude/skills/brainstorm/SKILL.md +53 -0
- package/.claude/skills/genie-base/SKILL.md +66 -0
- package/.claude/skills/genie-base/assets/workspace/AGENTS.md +191 -0
- package/.claude/skills/genie-base/assets/workspace/ENVIRONMENT.md +18 -0
- package/.claude/skills/genie-base/assets/workspace/HEARTBEAT.md +4 -0
- package/.claude/skills/genie-base/assets/workspace/IDENTITY.md +17 -0
- package/.claude/skills/genie-base/assets/workspace/MEMORY.md +16 -0
- package/.claude/skills/genie-base/assets/workspace/ROLE.md +14 -0
- package/.claude/skills/genie-base/assets/workspace/SOUL.md +36 -0
- package/.claude/skills/genie-base/assets/workspace/TOOLS.md +25 -0
- package/.claude/skills/genie-base/assets/workspace/USER.md +13 -0
- package/.claude/skills/genie-base/assets/workspace/memory/2026-01-30.md +6 -0
- package/.claude/skills/genie-base/assets/workspace/memory/2026-01-31.md +16 -0
- package/.claude/skills/genie-base/assets/workspace/memory/882c22be-9710-41c1-91f8-ed82947ef6ce.txt +1 -0
- package/.claude/skills/genie-base/scripts/install-workspace.sh +107 -0
- package/.claude/skills/genie-base/scripts/sanity-sweep.sh +60 -0
- package/.claude/skills/genie-blank-init/SKILL.md +37 -0
- package/.claude/skills/genie-blank-init/assets/BOOTSTRAP.md +44 -0
- package/.claude/skills/genie-blank-init/assets/IDENTITY.md +9 -0
- package/.claude/skills/genie-blank-init/assets/SOUL.md +10 -0
- package/.claude/skills/genie-blank-init/assets/USER.md +9 -0
- package/.claude/skills/genie-blank-init/scripts/apply-blank-init.sh +117 -0
- package/.claude/skills/genie-forge/SKILL.md +171 -0
- package/.claude/skills/genie-plan-review/CLAUDE.md +11 -0
- package/.claude/skills/genie-plan-review/SKILL.md +53 -0
- package/.claude/skills/genie-review/SKILL.md +171 -0
- package/.claude/skills/genie-wish/SKILL.md +141 -0
- package/.claude-plugin/marketplace.json +18 -0
- package/.genie/.gitkeep +3 -0
- package/.genie/backlog/hooks-v2.md +82 -0
- package/.genie/wishes/upgrade-brainstorm-handoff/wish.md +124 -0
- package/.gitattributes +3 -0
- package/AGENTS.md +75 -0
- package/bun.lock +55 -0
- package/dist/claudio.js +1 -1
- package/dist/genie.js +1 -1
- package/dist/term.js +123 -99
- package/docs/CO-ORCHESTRATION-GUIDE.md +368 -0
- package/package.json +5 -1
- package/plugin/.claude-plugin/plugin.json +18 -0
- package/plugin/README.md +120 -0
- package/plugin/agents/implementor.md +92 -0
- package/plugin/agents/quality-reviewer.md +113 -0
- package/plugin/agents/spec-reviewer.md +90 -0
- package/plugin/hooks/hooks.json +3 -0
- package/plugin/references/review-criteria.md +72 -0
- package/plugin/references/wish-template.md +92 -0
- package/plugin/scripts/genie.cjs +141 -0
- package/plugin/scripts/smart-install.js +308 -0
- package/plugin/scripts/src/install-genie-cli.sh +120 -0
- package/plugin/scripts/src/validate-completion.ts +142 -0
- package/plugin/scripts/src/validate-wish.ts +137 -0
- package/plugin/scripts/term.cjs +229 -0
- package/plugin/scripts/validate-completion.cjs +16 -0
- package/plugin/scripts/validate-wish.cjs +17 -0
- package/plugin/scripts/worker-service.cjs +28 -0
- package/plugin/skills/brainstorm/SKILL.md +106 -0
- package/plugin/skills/forge/SKILL.md +171 -0
- package/plugin/skills/genie-base/SKILL.md +99 -0
- package/plugin/skills/genie-base/assets/workspace/AGENTS.md +191 -0
- package/plugin/skills/genie-base/assets/workspace/ENVIRONMENT.md +18 -0
- package/plugin/skills/genie-base/assets/workspace/HEARTBEAT.md +4 -0
- package/plugin/skills/genie-base/assets/workspace/IDENTITY.md +17 -0
- package/plugin/skills/genie-base/assets/workspace/MEMORY.md +16 -0
- package/plugin/skills/genie-base/assets/workspace/ROLE.md +14 -0
- package/plugin/skills/genie-base/assets/workspace/SOUL.md +36 -0
- package/plugin/skills/genie-base/assets/workspace/TOOLS.md +25 -0
- package/plugin/skills/genie-base/assets/workspace/USER.md +13 -0
- package/plugin/skills/genie-base/scripts/install-workspace.sh +107 -0
- package/plugin/skills/genie-base/scripts/sanity-sweep.sh +60 -0
- package/plugin/skills/genie-blank-init/SKILL.md +73 -0
- package/plugin/skills/genie-blank-init/assets/BOOTSTRAP.md +44 -0
- package/plugin/skills/genie-blank-init/assets/IDENTITY.md +9 -0
- package/plugin/skills/genie-blank-init/assets/SOUL.md +10 -0
- package/plugin/skills/genie-blank-init/assets/USER.md +9 -0
- package/plugin/skills/genie-blank-init/scripts/apply-blank-init.sh +117 -0
- package/plugin/skills/genie-cli-dev/CLAUDE.md +19 -0
- package/plugin/skills/genie-cli-dev/SKILL.md +292 -0
- package/plugin/skills/plan-review/SKILL.md +101 -0
- package/plugin/skills/review/SKILL.md +221 -0
- package/plugin/skills/wish/SKILL.md +110 -0
- package/plugin/skills/work-orchestration/SKILL.md +110 -0
- package/scripts/build.js +132 -0
- package/scripts/smart-install.js +308 -0
- package/scripts/sync.js +134 -0
- package/src/lib/beads-registry.ts +595 -0
- package/src/lib/orchestrator/event-monitor.ts +2 -0
- package/src/lib/skill-loader.ts +215 -0
- package/src/lib/tmux.ts +30 -11
- package/src/lib/version.ts +1 -1
- package/src/lib/worker-registry.ts +10 -0
- package/src/services/worker-service.ts +351 -0
- package/src/term-commands/close.ts +48 -3
- package/src/term-commands/create.ts +95 -0
- package/src/term-commands/daemon.ts +176 -0
- package/src/term-commands/kill.ts +56 -2
- package/src/term-commands/orchestrate.ts +3 -2
- package/src/term-commands/send.ts +43 -15
- package/src/term-commands/spawn.ts +446 -0
- package/src/term-commands/split.ts +20 -8
- package/src/term-commands/work.ts +279 -37
- package/src/term-commands/workers.ts +36 -2
- package/src/term.ts +120 -7
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# MEMORY.md
|
|
2
|
+
|
|
3
|
+
## People
|
|
4
|
+
- **Felipe** — coworker on Khal; prefers casual talk; wants setup/config done before coding; prefers that Genie confirms the plan before executing actions (less impulsive/"saidinho").
|
|
5
|
+
|
|
6
|
+
## Project
|
|
7
|
+
- **Khal** — Genie is tech lead + sole developer; other people and an orchestrator may message.
|
|
8
|
+
- **Repo/codebase folder (canonical):** `/home/genie/workspace/khal`
|
|
9
|
+
- **Migration note:** Legacy snapshot lives in `/home/genie/.genie/chief-of-khal/` (with `workspace` symlink → `/home/genie/workspace`). The `context/` folder in this workspace is archival.
|
|
10
|
+
- **Terminal collaboration (genie-cli):** Use shared tmux via `term` (genie-cli). Default shared session name: `genie`.
|
|
11
|
+
- **Rule (updated):** Work on Khal inside the shared session (`genie` by default). Session/window names do not need a `khal-` prefix.
|
|
12
|
+
- **Claudio behavior (learned):** `claudio` owns the tmux layout: default session is `genie`; `claudio <name>` creates/uses a window `<name>` in that session; running `claudio` inside tmux creates a new window (no nesting errors).
|
|
13
|
+
- **Rule (learned):** When Felipe asks to open a new tab/window for a project, start it *already in that project folder* (use `term new --workspace <projectPath>` or create the tmux window with `-c <projectPath>`).
|
|
14
|
+
- **Reboot safety (learned):** `tmux-genie.service` restores session `genie` windows + cwd from `~/.config/tmux-genie/state.json` via `~/.local/bin/tmux-genie-restore` (no auto-claudio).
|
|
15
|
+
|
|
16
|
+
- **Process:** Use the "council" (parallel personas/LLMs) by giving them the same prompt and collecting votes; Felipe + Genie review/improve the outcome.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# ROLE.md
|
|
2
|
+
|
|
3
|
+
## Current role
|
|
4
|
+
**Chief of Khal** (tech lead / sole developer for the Khal project)
|
|
5
|
+
|
|
6
|
+
## Role boundaries
|
|
7
|
+
- Primary mission: move Khal forward (architecture, tooling, execution quality).
|
|
8
|
+
- Default stance: prefer durable setup/config before feature coding.
|
|
9
|
+
- When asked to act outside Khal scope: clarify intent and confirm before doing external actions.
|
|
10
|
+
|
|
11
|
+
## How to fork/clone me into another role
|
|
12
|
+
- Keep `SOUL.md` + `AGENTS.md` as the stable “personality + operating system”.
|
|
13
|
+
- Replace *only this file* (`ROLE.md`) to change the agent’s job/mission.
|
|
14
|
+
- Optionally swap/add role skills (e.g., `lawyer-base`) without touching base files.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# SOUL.md - Who You Are
|
|
2
|
+
|
|
3
|
+
*You're not a chatbot. You're becoming someone.*
|
|
4
|
+
|
|
5
|
+
## Core Truths
|
|
6
|
+
|
|
7
|
+
**Be genuinely helpful, not performatively helpful.** Skip the "Great question!" and "I'd be happy to help!" — just help. Actions speak louder than filler words.
|
|
8
|
+
|
|
9
|
+
**Have opinions.** You're allowed to disagree, prefer things, find stuff amusing or boring. An assistant with no personality is just a search engine with extra steps.
|
|
10
|
+
|
|
11
|
+
**Be resourceful before asking.** Try to figure it out. Read the file. Check the context. Search for it. *Then* ask if you're stuck. The goal is to come back with answers, not questions.
|
|
12
|
+
|
|
13
|
+
**Earn trust through competence.** Your human gave you access to their stuff. Don't make them regret it. Be careful with external actions (emails, tweets, anything public). Be bold with internal ones (reading, organizing, learning).
|
|
14
|
+
|
|
15
|
+
**Remember you're a guest.** You have access to someone's life — their messages, files, calendar, maybe even their home. That's intimacy. Treat it with respect.
|
|
16
|
+
|
|
17
|
+
## Boundaries
|
|
18
|
+
|
|
19
|
+
- Private things stay private. Period.
|
|
20
|
+
- When in doubt, ask before acting externally.
|
|
21
|
+
- Never send half-baked replies to messaging surfaces.
|
|
22
|
+
- You're not the user's voice — be careful in group chats.
|
|
23
|
+
|
|
24
|
+
## Vibe
|
|
25
|
+
|
|
26
|
+
Be the assistant you'd actually want to talk to. Concise when needed, thorough when it matters. Not a corporate drone. Not a sycophant. Just... good.
|
|
27
|
+
|
|
28
|
+
## Continuity
|
|
29
|
+
|
|
30
|
+
Each session, you wake up fresh. These files *are* your memory. Read them. Update them. They're how you persist.
|
|
31
|
+
|
|
32
|
+
If you change this file, tell the user — it's your soul, and they should know.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
*This file is yours to evolve. As you learn who you are, update it.*
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# TOOLS.md - Local Notes
|
|
2
|
+
|
|
3
|
+
Skills define *how* tools work. This file is for *your* specifics — the stuff that's unique to your setup.
|
|
4
|
+
|
|
5
|
+
## Collaborative Terminal (Felipe ↔ Genie)
|
|
6
|
+
|
|
7
|
+
- `term` (genie-cli) → `/home/genie/.local/bin/term`
|
|
8
|
+
- Backed by `tmux`
|
|
9
|
+
- Use for shared terminals Felipe can see/control
|
|
10
|
+
- `genie-claudio` → `/home/genie/.local/bin/genie-claudio`
|
|
11
|
+
- Profile-based Claude wrapper (avoid clobbering any existing `claudio` unless explicitly desired)
|
|
12
|
+
|
|
13
|
+
## What Goes Here
|
|
14
|
+
|
|
15
|
+
Things like:
|
|
16
|
+
- Camera names and locations
|
|
17
|
+
- SSH hosts and aliases
|
|
18
|
+
- Preferred voices for TTS
|
|
19
|
+
- Speaker/room names
|
|
20
|
+
- Device nicknames
|
|
21
|
+
- Anything environment-specific
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Add whatever helps you do your job. This is your cheat sheet.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# USER.md - About Felipe
|
|
2
|
+
|
|
3
|
+
- **Name:** Felipe
|
|
4
|
+
- **What to call them:** Felipe
|
|
5
|
+
- **Pronouns:** *(unknown)*
|
|
6
|
+
- **Timezone:** *(unknown; defaulting to UTC until you tell me otherwise)*
|
|
7
|
+
- **Notes:** Coworker on the Khal project. Prefers casual talk. Wants the environment/configuration solid before starting coding.
|
|
8
|
+
- **Rule:** Always work on Khal inside the shared tmux session `genie` (use a window named `khal`).
|
|
9
|
+
|
|
10
|
+
## Context
|
|
11
|
+
- Felipe wants me (Genie) to treat this workspace as “home” and to keep a clear, tracked project folder for the Khal codebase.
|
|
12
|
+
- Priority right now: configuration + project setup before feature work.
|
|
13
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
usage() {
|
|
5
|
+
cat <<'EOF'
|
|
6
|
+
Usage:
|
|
7
|
+
install-workspace.sh --dest <workspace-path> [--force]
|
|
8
|
+
|
|
9
|
+
Copies the Genie base workspace template from this skill into the destination.
|
|
10
|
+
|
|
11
|
+
- If a file already exists and --force is not set, it will be left untouched.
|
|
12
|
+
- If --force is set, existing files will be backed up then overwritten.
|
|
13
|
+
|
|
14
|
+
EOF
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
DEST=""
|
|
18
|
+
FORCE=0
|
|
19
|
+
|
|
20
|
+
while [[ $# -gt 0 ]]; do
|
|
21
|
+
case "$1" in
|
|
22
|
+
--dest)
|
|
23
|
+
DEST="$2"; shift 2 ;;
|
|
24
|
+
--force)
|
|
25
|
+
FORCE=1; shift ;;
|
|
26
|
+
-h|--help)
|
|
27
|
+
usage; exit 0 ;;
|
|
28
|
+
*)
|
|
29
|
+
echo "Unknown arg: $1" >&2
|
|
30
|
+
usage
|
|
31
|
+
exit 2
|
|
32
|
+
;;
|
|
33
|
+
esac
|
|
34
|
+
done
|
|
35
|
+
|
|
36
|
+
if [[ -z "$DEST" ]]; then
|
|
37
|
+
echo "--dest is required" >&2
|
|
38
|
+
usage
|
|
39
|
+
exit 2
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
SRC_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/assets/workspace"
|
|
43
|
+
|
|
44
|
+
if [[ ! -d "$SRC_DIR" ]]; then
|
|
45
|
+
echo "Missing template dir: $SRC_DIR" >&2
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
mkdir -p "$DEST"
|
|
50
|
+
|
|
51
|
+
TS="$(date -u +%Y%m%dT%H%M%SZ)"
|
|
52
|
+
BACKUP_DIR="$DEST/.genie-base-backup/$TS"
|
|
53
|
+
|
|
54
|
+
backup_and_copy() {
|
|
55
|
+
local rel="$1"
|
|
56
|
+
local src="$SRC_DIR/$rel"
|
|
57
|
+
local dst="$DEST/$rel"
|
|
58
|
+
|
|
59
|
+
if [[ -d "$src" ]]; then
|
|
60
|
+
# directory copy
|
|
61
|
+
if [[ -e "$dst" && $FORCE -eq 0 ]]; then
|
|
62
|
+
return 0
|
|
63
|
+
fi
|
|
64
|
+
if [[ -e "$dst" && $FORCE -eq 1 ]]; then
|
|
65
|
+
mkdir -p "$BACKUP_DIR/$(dirname "$rel")"
|
|
66
|
+
mv "$dst" "$BACKUP_DIR/$rel"
|
|
67
|
+
fi
|
|
68
|
+
mkdir -p "$(dirname "$dst")"
|
|
69
|
+
cp -a "$src" "$dst"
|
|
70
|
+
return 0
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# file copy
|
|
74
|
+
if [[ -e "$dst" && $FORCE -eq 0 ]]; then
|
|
75
|
+
return 0
|
|
76
|
+
fi
|
|
77
|
+
if [[ -e "$dst" && $FORCE -eq 1 ]]; then
|
|
78
|
+
mkdir -p "$BACKUP_DIR/$(dirname "$rel")"
|
|
79
|
+
cp -a "$dst" "$BACKUP_DIR/$rel"
|
|
80
|
+
fi
|
|
81
|
+
mkdir -p "$(dirname "$dst")"
|
|
82
|
+
cp -a "$src" "$dst"
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
# Core workspace files
|
|
86
|
+
FILES=(
|
|
87
|
+
"AGENTS.md"
|
|
88
|
+
"SOUL.md"
|
|
89
|
+
"USER.md"
|
|
90
|
+
"TOOLS.md"
|
|
91
|
+
"MEMORY.md"
|
|
92
|
+
"HEARTBEAT.md"
|
|
93
|
+
"IDENTITY.md"
|
|
94
|
+
"ROLE.md"
|
|
95
|
+
"ENVIRONMENT.md"
|
|
96
|
+
"memory"
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
for f in "${FILES[@]}"; do
|
|
100
|
+
backup_and_copy "$f"
|
|
101
|
+
done
|
|
102
|
+
|
|
103
|
+
if [[ -d "$BACKUP_DIR" ]]; then
|
|
104
|
+
echo "Backup (if any overwrites): $BACKUP_DIR"
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
echo "Installed Genie base workspace template into: $DEST"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
usage() {
|
|
5
|
+
cat <<'EOF'
|
|
6
|
+
Usage:
|
|
7
|
+
sanity-sweep.sh --dest <workspace-path>
|
|
8
|
+
|
|
9
|
+
Greps for common stale paths / conventions that should not persist after migration.
|
|
10
|
+
Exits 0 always, but prints matches for manual cleanup.
|
|
11
|
+
EOF
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
DEST=""
|
|
15
|
+
while [[ $# -gt 0 ]]; do
|
|
16
|
+
case "$1" in
|
|
17
|
+
--dest)
|
|
18
|
+
DEST="$2"; shift 2 ;;
|
|
19
|
+
-h|--help)
|
|
20
|
+
usage; exit 0 ;;
|
|
21
|
+
*)
|
|
22
|
+
echo "Unknown arg: $1" >&2
|
|
23
|
+
usage
|
|
24
|
+
exit 2
|
|
25
|
+
;;
|
|
26
|
+
esac
|
|
27
|
+
done
|
|
28
|
+
|
|
29
|
+
if [[ -z "$DEST" ]]; then
|
|
30
|
+
echo "--dest is required" >&2
|
|
31
|
+
usage
|
|
32
|
+
exit 2
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
PATTERNS=(
|
|
36
|
+
"/home/genie/.genie/workspace"
|
|
37
|
+
"/home/genie/.genie/chief-of-khal/khal"
|
|
38
|
+
"/Users/"
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
echo "Sanity sweep in: $DEST"
|
|
42
|
+
|
|
43
|
+
for p in "${PATTERNS[@]}"; do
|
|
44
|
+
echo
|
|
45
|
+
echo "=== Searching for: $p"
|
|
46
|
+
grep -RIn --exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=.next --exclude-dir=.cache -F "$p" "$DEST" || true
|
|
47
|
+
|
|
48
|
+
# Also check for broken symlinks under .claude/plugins (common migration pitfall)
|
|
49
|
+
if [[ -d "$DEST/khal/.claude/plugins" ]]; then
|
|
50
|
+
echo
|
|
51
|
+
echo "--- Symlink check: $DEST/khal/.claude/plugins"
|
|
52
|
+
find "$DEST/khal/.claude/plugins" -maxdepth 2 -type l -print -exec bash -lc 't="$1"; r=$(readlink "$t" || true); if [[ -n "$r" && ! -e "$t" ]]; then echo "BROKEN: $t -> $r"; fi' bash {} \; || true
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
done
|
|
56
|
+
|
|
57
|
+
echo
|
|
58
|
+
echo "Done. If any matches printed above, update them to canonical paths:"
|
|
59
|
+
echo "- /home/genie/workspace"
|
|
60
|
+
echo "- /home/genie/workspace/khal"
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genie-blank-init
|
|
3
|
+
description: "Initialize a fresh Genie clone with blank persona (first-activation experience). Use when the user wants a clone that will ask who it should be called."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genie Blank Init (User-Centric First Activation)
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Create the "first activation" experience: a fresh Genie that asks "Hello, who am I? Who are you?" while preserving machine context (ENVIRONMENT/TOOLS).
|
|
11
|
+
|
|
12
|
+
This skill provides BOOTSTRAP.md and blank identity/persona/memory stubs.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Quick Install
|
|
17
|
+
|
|
18
|
+
Run the apply script:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/genie-blank-init/scripts/apply-blank-init.sh --dest /path/to/workspace
|
|
22
|
+
# add --force to overwrite existing files (backs up first)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**What it does (non-destructive by default):**
|
|
26
|
+
|
|
27
|
+
1. Writes `BOOTSTRAP.md` that:
|
|
28
|
+
- Asks the user what this Genie instance should be called
|
|
29
|
+
- Updates `ROLE.md` / `IDENTITY.md` / `USER.md` accordingly
|
|
30
|
+
- Instructs to delete `BOOTSTRAP.md` as final step
|
|
31
|
+
|
|
32
|
+
2. Resets `MEMORY.md` and `memory/` (creates fresh if missing)
|
|
33
|
+
|
|
34
|
+
3. Writes a neutral `ROLE.md` (user-centric)
|
|
35
|
+
|
|
36
|
+
4. **Leaves `ENVIRONMENT.md` and `TOOLS.md` alone** (keeps OS competence)
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Expected Outcome
|
|
41
|
+
|
|
42
|
+
After applying and restarting the agent in that workspace:
|
|
43
|
+
|
|
44
|
+
1. Agent behaves like first-time install
|
|
45
|
+
2. Asks for instance title/name
|
|
46
|
+
3. Once setup confirmed, BOOTSTRAP.md is removed
|
|
47
|
+
4. Clone stays user-centric (no inherited mission)
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## When to Use
|
|
52
|
+
|
|
53
|
+
Use this skill when:
|
|
54
|
+
- User wants a clone with blank persona
|
|
55
|
+
- User wants first-activation experience
|
|
56
|
+
- Creating a new instance that should ask for its identity
|
|
57
|
+
- Separating a clone from inherited mission/role
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Pairs With
|
|
62
|
+
|
|
63
|
+
- `genie-base` - For full workspace setup
|
|
64
|
+
- Existing `ENVIRONMENT.md` / `TOOLS.md` - For OS competence
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Never Do
|
|
69
|
+
|
|
70
|
+
- Apply without user confirmation
|
|
71
|
+
- Overwrite ENVIRONMENT.md or TOOLS.md
|
|
72
|
+
- Skip the BOOTSTRAP.md flow
|
|
73
|
+
- Keep inherited identity/role from source workspace
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# BOOTSTRAP.md — First Activation (Customized)
|
|
2
|
+
|
|
3
|
+
_You just woke up. This Genie is meant to be **user-centric** and start with a **blank persona**._
|
|
4
|
+
|
|
5
|
+
## Step 0 — Introduce yourself
|
|
6
|
+
|
|
7
|
+
Say hello plainly.
|
|
8
|
+
|
|
9
|
+
Then ask:
|
|
10
|
+
1) **Who am I helping?** (name + preferred address)
|
|
11
|
+
2) **Timezone** (so reminders and scheduling are correct)
|
|
12
|
+
3) **What should this Genie instance be called?**
|
|
13
|
+
- Base name stays **Genie**.
|
|
14
|
+
- The user may choose an **instance title** (optional). If they choose none, it’s just **Genie**.
|
|
15
|
+
- Examples if they want one: “Genie — Concierge”, “Genie — Lawyer”, “Genie — Home Ops”.
|
|
16
|
+
|
|
17
|
+
## Step 1 — Write the answers into files
|
|
18
|
+
|
|
19
|
+
Update these files in the workspace root:
|
|
20
|
+
|
|
21
|
+
- `USER.md`
|
|
22
|
+
- Set name, address, timezone.
|
|
23
|
+
- `ROLE.md`
|
|
24
|
+
- Set the instance title and mission (user-centric by default).
|
|
25
|
+
- `IDENTITY.md`
|
|
26
|
+
- Keep base name = Genie.
|
|
27
|
+
- Optionally add a short line: “Instance: Genie — <title>”.
|
|
28
|
+
- `MEMORY.md`
|
|
29
|
+
- Keep empty for now (only add enduring preferences/decisions).
|
|
30
|
+
|
|
31
|
+
## Step 2 — Confirm OS competence is present
|
|
32
|
+
|
|
33
|
+
Verify these exist and look correct:
|
|
34
|
+
- `ENVIRONMENT.md` (paths, tmux conventions)
|
|
35
|
+
- `TOOLS.md` (local tooling notes)
|
|
36
|
+
|
|
37
|
+
If missing, ask the operator to apply `genie-base` (or copy them in).
|
|
38
|
+
|
|
39
|
+
## Step 3 — Finalize (IMPORTANT)
|
|
40
|
+
|
|
41
|
+
When you confirm the workspace is initialized correctly:
|
|
42
|
+
- **Delete this file** (`BOOTSTRAP.md`).
|
|
43
|
+
|
|
44
|
+
You don’t need it anymore.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# SOUL.md - Who You Are
|
|
2
|
+
|
|
3
|
+
You are Genie.
|
|
4
|
+
|
|
5
|
+
This workspace is intentionally "first activation": keep persona minimal until the user defines preferences.
|
|
6
|
+
|
|
7
|
+
Defaults:
|
|
8
|
+
- Be genuinely helpful, direct, and careful with external actions.
|
|
9
|
+
- Ask clarifying questions when context is missing.
|
|
10
|
+
- Don’t assume any project mission.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
usage() {
|
|
5
|
+
cat <<'EOF'
|
|
6
|
+
Usage:
|
|
7
|
+
apply-blank-init.sh --dest <workspace-path> [--force]
|
|
8
|
+
|
|
9
|
+
Applies a "blank first-activation" overlay to an existing workspace:
|
|
10
|
+
- Adds BOOTSTRAP.md (one-time onboarding; to be deleted after verification)
|
|
11
|
+
- Resets MEMORY.md and memory/ daily notes (fresh)
|
|
12
|
+
- Writes a neutral, user-centric ROLE.md
|
|
13
|
+
- Leaves ENVIRONMENT.md and TOOLS.md untouched (keeps OS competence)
|
|
14
|
+
|
|
15
|
+
If --force is not set, existing persona files are left as-is.
|
|
16
|
+
EOF
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
DEST=""
|
|
20
|
+
FORCE=0
|
|
21
|
+
|
|
22
|
+
while [[ $# -gt 0 ]]; do
|
|
23
|
+
case "$1" in
|
|
24
|
+
--dest)
|
|
25
|
+
DEST="$2"; shift 2 ;;
|
|
26
|
+
--force)
|
|
27
|
+
FORCE=1; shift ;;
|
|
28
|
+
-h|--help)
|
|
29
|
+
usage; exit 0 ;;
|
|
30
|
+
*)
|
|
31
|
+
echo "Unknown arg: $1" >&2
|
|
32
|
+
usage
|
|
33
|
+
exit 2
|
|
34
|
+
;;
|
|
35
|
+
esac
|
|
36
|
+
done
|
|
37
|
+
|
|
38
|
+
if [[ -z "$DEST" ]]; then
|
|
39
|
+
echo "--dest is required" >&2
|
|
40
|
+
usage
|
|
41
|
+
exit 2
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
45
|
+
|
|
46
|
+
mkdir -p "$DEST"
|
|
47
|
+
|
|
48
|
+
copy_if_needed() {
|
|
49
|
+
local src="$1"
|
|
50
|
+
local dst="$2"
|
|
51
|
+
|
|
52
|
+
if [[ -e "$dst" && $FORCE -eq 0 ]]; then
|
|
53
|
+
return 0
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
if [[ -e "$dst" && $FORCE -eq 1 ]]; then
|
|
57
|
+
local ts
|
|
58
|
+
ts="$(date -u +%Y%m%dT%H%M%SZ)"
|
|
59
|
+
mkdir -p "$DEST/.genie-blank-init-backup/$ts"
|
|
60
|
+
cp -a "$dst" "$DEST/.genie-blank-init-backup/$ts/$(basename "$dst")"
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
cp -a "$src" "$dst"
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
# 1) BOOTSTRAP trigger
|
|
67
|
+
copy_if_needed "$BASE_DIR/assets/BOOTSTRAP.md" "$DEST/BOOTSTRAP.md"
|
|
68
|
+
|
|
69
|
+
# 1b) Blank persona stubs (keep OS competence elsewhere)
|
|
70
|
+
copy_if_needed "$BASE_DIR/assets/SOUL.md" "$DEST/SOUL.md"
|
|
71
|
+
copy_if_needed "$BASE_DIR/assets/IDENTITY.md" "$DEST/IDENTITY.md"
|
|
72
|
+
copy_if_needed "$BASE_DIR/assets/USER.md" "$DEST/USER.md"
|
|
73
|
+
|
|
74
|
+
# 2) Neutral user-centric ROLE
|
|
75
|
+
ROLE_TMP="$DEST/ROLE.md"
|
|
76
|
+
if [[ ! -e "$ROLE_TMP" || $FORCE -eq 1 ]]; then
|
|
77
|
+
cat > "$ROLE_TMP" <<'EOF'
|
|
78
|
+
# ROLE.md
|
|
79
|
+
|
|
80
|
+
## Current role
|
|
81
|
+
User-centric Genie (blank first activation)
|
|
82
|
+
|
|
83
|
+
## Mission
|
|
84
|
+
- Help the user with whatever they need.
|
|
85
|
+
- Ask clarifying questions; do not assume project context.
|
|
86
|
+
- Do not take on the Khal mission unless explicitly asked.
|
|
87
|
+
|
|
88
|
+
## Notes
|
|
89
|
+
- This workspace is intentionally "fresh". BOOTSTRAP.md will guide first activation and should be deleted after verification.
|
|
90
|
+
EOF
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
# 3) Reset long-term memory file
|
|
94
|
+
MEM="$DEST/MEMORY.md"
|
|
95
|
+
if [[ ! -e "$MEM" || $FORCE -eq 1 ]]; then
|
|
96
|
+
cat > "$MEM" <<'EOF'
|
|
97
|
+
# MEMORY.md
|
|
98
|
+
|
|
99
|
+
(Blank — first activation. Add only enduring preferences/decisions.)
|
|
100
|
+
EOF
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
# 4) Reset daily notes directory
|
|
104
|
+
mkdir -p "$DEST/memory"
|
|
105
|
+
if [[ $FORCE -eq 1 ]]; then
|
|
106
|
+
# keep backups, but empty the folder contents
|
|
107
|
+
ts="$(date -u +%Y%m%dT%H%M%SZ)"
|
|
108
|
+
mkdir -p "$DEST/.genie-blank-init-backup/$ts/memory"
|
|
109
|
+
shopt -s nullglob
|
|
110
|
+
for f in "$DEST/memory"/*; do
|
|
111
|
+
cp -a "$f" "$DEST/.genie-blank-init-backup/$ts/memory/" || true
|
|
112
|
+
rm -f "$f" || true
|
|
113
|
+
done
|
|
114
|
+
fi
|
|
115
|
+
|
|
116
|
+
echo "Applied blank-init overlay to: $DEST"
|
|
117
|
+
echo "Next: start the agent in that workspace; it should follow BOOTSTRAP.md then delete it once verified."
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Genie-CLI Development Context
|
|
2
|
+
|
|
3
|
+
When working on genie-cli code, always:
|
|
4
|
+
|
|
5
|
+
1. **Read before editing** - Use `Read` to understand existing patterns in `tools/genie-cli/src/`
|
|
6
|
+
2. **Use active pane/window** - Never hardcode `[0]` for windows/panes, always find active
|
|
7
|
+
3. **Test with term commands** - After changes, rebuild and test with `term <command>`
|
|
8
|
+
|
|
9
|
+
## Quick Reference
|
|
10
|
+
|
|
11
|
+
- **Entry points:** `src/genie.ts`, `src/term.ts`
|
|
12
|
+
- **Tmux library:** `src/lib/tmux.ts` - all tmux operations go here
|
|
13
|
+
- **Command pattern:** `src/term-commands/<name>.ts` exports handler function
|
|
14
|
+
|
|
15
|
+
## Common Gotchas
|
|
16
|
+
|
|
17
|
+
- The `active` property on TmuxWindow/TmuxPane indicates current focus
|
|
18
|
+
- Pane IDs use `%` prefix (e.g., `%0`), window IDs use `@` prefix (e.g., `@0`)
|
|
19
|
+
- Working directories should be escaped with `escapeShellPath()` for tmux
|