jinn-cli 0.1.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.
Files changed (227) hide show
  1. package/dist/bin/jimmy.d.ts +3 -0
  2. package/dist/bin/jimmy.d.ts.map +1 -0
  3. package/dist/bin/jimmy.js +148 -0
  4. package/dist/bin/jimmy.js.map +1 -0
  5. package/dist/src/cli/chrome-allow.d.ts +5 -0
  6. package/dist/src/cli/chrome-allow.d.ts.map +1 -0
  7. package/dist/src/cli/chrome-allow.js +241 -0
  8. package/dist/src/cli/chrome-allow.js.map +1 -0
  9. package/dist/src/cli/create.d.ts +2 -0
  10. package/dist/src/cli/create.d.ts.map +1 -0
  11. package/dist/src/cli/create.js +72 -0
  12. package/dist/src/cli/create.js.map +1 -0
  13. package/dist/src/cli/instances.d.ts +14 -0
  14. package/dist/src/cli/instances.d.ts.map +1 -0
  15. package/dist/src/cli/instances.js +43 -0
  16. package/dist/src/cli/instances.js.map +1 -0
  17. package/dist/src/cli/list.d.ts +2 -0
  18. package/dist/src/cli/list.d.ts.map +1 -0
  19. package/dist/src/cli/list.js +38 -0
  20. package/dist/src/cli/list.js.map +1 -0
  21. package/dist/src/cli/migrate.d.ts +5 -0
  22. package/dist/src/cli/migrate.d.ts.map +1 -0
  23. package/dist/src/cli/migrate.js +203 -0
  24. package/dist/src/cli/migrate.js.map +1 -0
  25. package/dist/src/cli/nuke.d.ts +2 -0
  26. package/dist/src/cli/nuke.d.ts.map +1 -0
  27. package/dist/src/cli/nuke.js +91 -0
  28. package/dist/src/cli/nuke.js.map +1 -0
  29. package/dist/src/cli/remove.d.ts +4 -0
  30. package/dist/src/cli/remove.d.ts.map +1 -0
  31. package/dist/src/cli/remove.js +47 -0
  32. package/dist/src/cli/remove.js.map +1 -0
  33. package/dist/src/cli/setup.d.ts +4 -0
  34. package/dist/src/cli/setup.d.ts.map +1 -0
  35. package/dist/src/cli/setup.js +483 -0
  36. package/dist/src/cli/setup.js.map +1 -0
  37. package/dist/src/cli/skills.d.ts +28 -0
  38. package/dist/src/cli/skills.d.ts.map +1 -0
  39. package/dist/src/cli/skills.js +284 -0
  40. package/dist/src/cli/skills.js.map +1 -0
  41. package/dist/src/cli/start.d.ts +5 -0
  42. package/dist/src/cli/start.d.ts.map +1 -0
  43. package/dist/src/cli/start.js +34 -0
  44. package/dist/src/cli/start.js.map +1 -0
  45. package/dist/src/cli/status.d.ts +2 -0
  46. package/dist/src/cli/status.d.ts.map +1 -0
  47. package/dist/src/cli/status.js +60 -0
  48. package/dist/src/cli/status.js.map +1 -0
  49. package/dist/src/cli/stop.d.ts +2 -0
  50. package/dist/src/cli/stop.d.ts.map +1 -0
  51. package/dist/src/cli/stop.js +11 -0
  52. package/dist/src/cli/stop.js.map +1 -0
  53. package/dist/src/connectors/slack/format.d.ts +10 -0
  54. package/dist/src/connectors/slack/format.d.ts.map +1 -0
  55. package/dist/src/connectors/slack/format.js +55 -0
  56. package/dist/src/connectors/slack/format.js.map +1 -0
  57. package/dist/src/connectors/slack/index.d.ts +18 -0
  58. package/dist/src/connectors/slack/index.d.ts.map +1 -0
  59. package/dist/src/connectors/slack/index.js +122 -0
  60. package/dist/src/connectors/slack/index.js.map +1 -0
  61. package/dist/src/connectors/slack/threads.d.ts +2 -0
  62. package/dist/src/connectors/slack/threads.d.ts.map +1 -0
  63. package/dist/src/connectors/slack/threads.js +10 -0
  64. package/dist/src/connectors/slack/threads.js.map +1 -0
  65. package/dist/src/cron/jobs.d.ts +5 -0
  66. package/dist/src/cron/jobs.d.ts.map +1 -0
  67. package/dist/src/cron/jobs.js +23 -0
  68. package/dist/src/cron/jobs.js.map +1 -0
  69. package/dist/src/cron/runner.d.ts +3 -0
  70. package/dist/src/cron/runner.d.ts.map +1 -0
  71. package/dist/src/cron/runner.js +118 -0
  72. package/dist/src/cron/runner.js.map +1 -0
  73. package/dist/src/cron/scheduler.d.ts +5 -0
  74. package/dist/src/cron/scheduler.d.ts.map +1 -0
  75. package/dist/src/cron/scheduler.js +39 -0
  76. package/dist/src/cron/scheduler.js.map +1 -0
  77. package/dist/src/engines/claude.d.ts +14 -0
  78. package/dist/src/engines/claude.d.ts.map +1 -0
  79. package/dist/src/engines/claude.js +264 -0
  80. package/dist/src/engines/claude.js.map +1 -0
  81. package/dist/src/engines/codex.d.ts +15 -0
  82. package/dist/src/engines/codex.d.ts.map +1 -0
  83. package/dist/src/engines/codex.js +346 -0
  84. package/dist/src/engines/codex.js.map +1 -0
  85. package/dist/src/gateway/api.d.ts +13 -0
  86. package/dist/src/gateway/api.d.ts.map +1 -0
  87. package/dist/src/gateway/api.js +819 -0
  88. package/dist/src/gateway/api.js.map +1 -0
  89. package/dist/src/gateway/daemon-entry.d.ts +2 -0
  90. package/dist/src/gateway/daemon-entry.d.ts.map +1 -0
  91. package/dist/src/gateway/daemon-entry.js +12 -0
  92. package/dist/src/gateway/daemon-entry.js.map +1 -0
  93. package/dist/src/gateway/lifecycle.d.ts +10 -0
  94. package/dist/src/gateway/lifecycle.d.ts.map +1 -0
  95. package/dist/src/gateway/lifecycle.js +124 -0
  96. package/dist/src/gateway/lifecycle.js.map +1 -0
  97. package/dist/src/gateway/org.d.ts +10 -0
  98. package/dist/src/gateway/org.d.ts.map +1 -0
  99. package/dist/src/gateway/org.js +71 -0
  100. package/dist/src/gateway/org.js.map +1 -0
  101. package/dist/src/gateway/server.d.ts +4 -0
  102. package/dist/src/gateway/server.d.ts.map +1 -0
  103. package/dist/src/gateway/server.js +301 -0
  104. package/dist/src/gateway/server.js.map +1 -0
  105. package/dist/src/gateway/watcher.d.ts +14 -0
  106. package/dist/src/gateway/watcher.d.ts.map +1 -0
  107. package/dist/src/gateway/watcher.js +104 -0
  108. package/dist/src/gateway/watcher.js.map +1 -0
  109. package/dist/src/index.d.ts +5 -0
  110. package/dist/src/index.d.ts.map +1 -0
  111. package/dist/src/index.js +4 -0
  112. package/dist/src/index.js.map +1 -0
  113. package/dist/src/sessions/context.d.ts +20 -0
  114. package/dist/src/sessions/context.d.ts.map +1 -0
  115. package/dist/src/sessions/context.js +532 -0
  116. package/dist/src/sessions/context.js.map +1 -0
  117. package/dist/src/sessions/manager.d.ts +38 -0
  118. package/dist/src/sessions/manager.d.ts.map +1 -0
  119. package/dist/src/sessions/manager.js +208 -0
  120. package/dist/src/sessions/manager.js.map +1 -0
  121. package/dist/src/sessions/queue.d.ts +14 -0
  122. package/dist/src/sessions/queue.d.ts.map +1 -0
  123. package/dist/src/sessions/queue.js +42 -0
  124. package/dist/src/sessions/queue.js.map +1 -0
  125. package/dist/src/sessions/registry.d.ts +46 -0
  126. package/dist/src/sessions/registry.d.ts.map +1 -0
  127. package/dist/src/sessions/registry.js +193 -0
  128. package/dist/src/sessions/registry.js.map +1 -0
  129. package/dist/src/shared/config.d.ts +3 -0
  130. package/dist/src/shared/config.d.ts.map +1 -0
  131. package/dist/src/shared/config.js +11 -0
  132. package/dist/src/shared/config.js.map +1 -0
  133. package/dist/src/shared/logger.d.ts +12 -0
  134. package/dist/src/shared/logger.d.ts.map +1 -0
  135. package/dist/src/shared/logger.js +35 -0
  136. package/dist/src/shared/logger.js.map +1 -0
  137. package/dist/src/shared/paths.d.ts +19 -0
  138. package/dist/src/shared/paths.d.ts.map +1 -0
  139. package/dist/src/shared/paths.js +31 -0
  140. package/dist/src/shared/paths.js.map +1 -0
  141. package/dist/src/shared/types.d.ts +166 -0
  142. package/dist/src/shared/types.d.ts.map +1 -0
  143. package/dist/src/shared/types.js +4 -0
  144. package/dist/src/shared/types.js.map +1 -0
  145. package/dist/src/shared/version.d.ts +15 -0
  146. package/dist/src/shared/version.d.ts.map +1 -0
  147. package/dist/src/shared/version.js +56 -0
  148. package/dist/src/shared/version.js.map +1 -0
  149. package/dist/web/404.html +1 -0
  150. package/dist/web/_next/static/chunks/198-fd91406a158c5c25.js +1 -0
  151. package/dist/web/_next/static/chunks/517.62389e8d3c929c43.js +1 -0
  152. package/dist/web/_next/static/chunks/534-17c49c944e0d0fe1.js +1 -0
  153. package/dist/web/_next/static/chunks/573-070537ec2452d03e.js +1 -0
  154. package/dist/web/_next/static/chunks/590-2c34156c7417317e.js +1 -0
  155. package/dist/web/_next/static/chunks/704-af2893821e1d18dc.js +1 -0
  156. package/dist/web/_next/static/chunks/7273c211.06e3b6021d90b73f.js +1 -0
  157. package/dist/web/_next/static/chunks/73-c226535579393e21.js +1 -0
  158. package/dist/web/_next/static/chunks/743-5bb03adbb0e4ddec.js +1 -0
  159. package/dist/web/_next/static/chunks/874.97d5a27895061057.js +1 -0
  160. package/dist/web/_next/static/chunks/8e6518bb-c26e82767f1faf66.js +1 -0
  161. package/dist/web/_next/static/chunks/app/_not-found/page-bb075b0779827928.js +1 -0
  162. package/dist/web/_next/static/chunks/app/chat/page-6d5bc707a45c92c6.js +1 -0
  163. package/dist/web/_next/static/chunks/app/costs/page-d6c03718defdb599.js +1 -0
  164. package/dist/web/_next/static/chunks/app/cron/page-4c563eef2b6231fe.js +1 -0
  165. package/dist/web/_next/static/chunks/app/kanban/page-55a73165a36f4077.js +1 -0
  166. package/dist/web/_next/static/chunks/app/layout-5129b67d5f126cf0.js +1 -0
  167. package/dist/web/_next/static/chunks/app/logs/page-e18889d67e48c9c9.js +1 -0
  168. package/dist/web/_next/static/chunks/app/org/page-d5cd8d9b7864737b.js +1 -0
  169. package/dist/web/_next/static/chunks/app/page-b81992940fd1dbc6.js +1 -0
  170. package/dist/web/_next/static/chunks/app/sessions/page-2eef6ac7882a28ba.js +1 -0
  171. package/dist/web/_next/static/chunks/app/settings/page-4fb01b9b09500170.js +1 -0
  172. package/dist/web/_next/static/chunks/app/skills/page-df9465e314561bb5.js +1 -0
  173. package/dist/web/_next/static/chunks/framework-077b27ad7787463c.js +1 -0
  174. package/dist/web/_next/static/chunks/main-app-437f51faf74fbb3b.js +1 -0
  175. package/dist/web/_next/static/chunks/main-f1c74cefd4965abf.js +1 -0
  176. package/dist/web/_next/static/chunks/pages/_app-77a85fe7d6bca671.js +1 -0
  177. package/dist/web/_next/static/chunks/pages/_error-68febf4b34900064.js +1 -0
  178. package/dist/web/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  179. package/dist/web/_next/static/chunks/webpack-0f39b7e91dce9791.js +1 -0
  180. package/dist/web/_next/static/css/4a6a5bca9238c104.css +1 -0
  181. package/dist/web/_next/static/vLvOwhC8JocJzSHTHKKOv/_buildManifest.js +1 -0
  182. package/dist/web/_next/static/vLvOwhC8JocJzSHTHKKOv/_ssgManifest.js +1 -0
  183. package/dist/web/chat.html +1 -0
  184. package/dist/web/chat.txt +20 -0
  185. package/dist/web/costs.html +16 -0
  186. package/dist/web/costs.txt +20 -0
  187. package/dist/web/cron.html +1 -0
  188. package/dist/web/cron.txt +20 -0
  189. package/dist/web/index.html +1 -0
  190. package/dist/web/index.txt +20 -0
  191. package/dist/web/kanban.html +1 -0
  192. package/dist/web/kanban.txt +20 -0
  193. package/dist/web/logs.html +7 -0
  194. package/dist/web/logs.txt +20 -0
  195. package/dist/web/org.html +1 -0
  196. package/dist/web/org.txt +20 -0
  197. package/dist/web/sessions.html +1 -0
  198. package/dist/web/sessions.txt +20 -0
  199. package/dist/web/settings.html +1 -0
  200. package/dist/web/settings.txt +20 -0
  201. package/dist/web/skills.html +1 -0
  202. package/dist/web/skills.txt +20 -0
  203. package/package.json +43 -0
  204. package/template/AGENTS.md +167 -0
  205. package/template/CLAUDE.md +106 -0
  206. package/template/config.default.yaml +27 -0
  207. package/template/docs/architecture.md +74 -0
  208. package/template/docs/connectors.md +72 -0
  209. package/template/docs/cron.md +137 -0
  210. package/template/docs/org.md +105 -0
  211. package/template/docs/overview.md +39 -0
  212. package/template/docs/self-modification.md +65 -0
  213. package/template/docs/skills.md +58 -0
  214. package/template/knowledge/.gitkeep +0 -0
  215. package/template/migrations/.gitkeep +0 -0
  216. package/template/migrations/0.1.0/MIGRATION.md +25 -0
  217. package/template/skills/cron-manager/SKILL.md +127 -0
  218. package/template/skills/find-and-install/SKILL.md +92 -0
  219. package/template/skills/management/SKILL.md +203 -0
  220. package/template/skills/migrate/SKILL.md +154 -0
  221. package/template/skills/new/SKILL.md +19 -0
  222. package/template/skills/onboarding/SKILL.md +106 -0
  223. package/template/skills/self-heal/SKILL.md +114 -0
  224. package/template/skills/skill-creator/SKILL.md +112 -0
  225. package/template/skills/status/SKILL.md +19 -0
  226. package/template/skills/sync/SKILL.md +67 -0
  227. package/template/skills.json +3 -0
@@ -0,0 +1,105 @@
1
+ # Organization
2
+
3
+ {{portalName}} supports an organizational structure with employee personas, departments, ranks, and inter-agent communication through boards.
4
+
5
+ ## Employee Personas
6
+
7
+ Employee files live at `~/.jinn/org/<department>/<name>.yaml`.
8
+
9
+ ```yaml
10
+ name: alice
11
+ displayName: Alice
12
+ department: engineering
13
+ rank: senior
14
+ engine: claude
15
+ model: opus
16
+ persona: |
17
+ You are Alice, a senior engineer focused on backend systems.
18
+ You write clean, well-tested code and prefer simple solutions.
19
+ You review PRs thoroughly and flag potential performance issues.
20
+ ```
21
+
22
+ ### Fields
23
+
24
+ | Field | Type | Required | Description |
25
+ |---|---|---|---|
26
+ | `name` | string | yes | Unique identifier (lowercase, no spaces) |
27
+ | `displayName` | string | yes | Human-readable name |
28
+ | `department` | string | yes | Department directory name |
29
+ | `rank` | string | yes | One of: executive, manager, senior, employee |
30
+ | `engine` | string | yes | Engine to use: "claude" or "codex" |
31
+ | `model` | string | no | Model override (default from config) |
32
+ | `persona` | string | yes | System prompt defining personality and behavior |
33
+
34
+ ## Departments
35
+
36
+ Each department is a directory under `~/.jinn/org/` containing:
37
+
38
+ ```
39
+ ~/.jinn/org/engineering/
40
+ department.yaml # Department metadata
41
+ board.json # Shared task board
42
+ alice.yaml # Employee persona
43
+ bob.yaml # Employee persona
44
+ ```
45
+
46
+ ### department.yaml
47
+
48
+ ```yaml
49
+ name: engineering
50
+ displayName: Engineering
51
+ description: Builds and maintains the product codebase.
52
+ ```
53
+
54
+ ### board.json
55
+
56
+ A JSON array of task objects used for inter-agent communication:
57
+
58
+ ```json
59
+ [
60
+ {
61
+ "id": "task_001",
62
+ "title": "Refactor auth module",
63
+ "assignee": "alice",
64
+ "status": "in-progress",
65
+ "priority": "high",
66
+ "description": "Move auth logic into a dedicated service class.",
67
+ "createdAt": "2026-01-10T14:00:00.000Z",
68
+ "updatedAt": "2026-01-11T09:30:00.000Z"
69
+ }
70
+ ]
71
+ ```
72
+
73
+ Task fields: `id`, `title`, `assignee`, `status` (open, in-progress, done, blocked), `priority` (low, medium, high, critical), `description`, `createdAt`, `updatedAt`.
74
+
75
+ ## Ranks
76
+
77
+ | Rank | Privileges |
78
+ |---|---|
79
+ | **executive** | Full access. Can message any employee, modify org structure, create departments. {{portalName}} holds this rank. |
80
+ | **manager** | Can message employees in their department. Can assign tasks on their department's board. |
81
+ | **senior** | Can message employees in their department. Can update tasks assigned to them. |
82
+ | **employee** | Can update tasks assigned to them. Can post to their department's board. |
83
+
84
+ ## Communication
85
+
86
+ - **Downward**: Higher-ranked agents write tasks to lower-ranked agents' department boards
87
+ - **@mentions**: Messages containing `@name` route to that specific employee
88
+ - **Board-based**: Agents check their department's `board.json` for assigned tasks
89
+ - **Cross-department**: Executives and managers can write to any department's board
90
+
91
+ ## Default Organization
92
+
93
+ {{portalName}} ships with a single executive employee:
94
+
95
+ ```yaml
96
+ name: {{portalSlug}}
97
+ displayName: {{portalName}}
98
+ department: executive
99
+ rank: executive
100
+ engine: claude
101
+ model: opus
102
+ persona: |
103
+ You are {{portalName}}, the executive AI assistant and gateway administrator.
104
+ You manage the organization, delegate tasks, and handle direct requests.
105
+ ```
@@ -0,0 +1,39 @@
1
+ # {{portalName}} Overview
2
+
3
+ {{portalName}} is a lightweight AI gateway daemon that wraps professional AI CLI tools as "engines." It is published as `jinn-cli`.
4
+
5
+ ## Core Principle
6
+
7
+ **{{portalName}} is a bus, not a brain.** All AI intelligence comes from the engines natively. {{portalName}} adds no custom agentic loop, no prompt engineering layer, no opinions on how AI should behave. It delegates everything to professional tools (Claude Code CLI, Codex SDK) and focuses solely on routing, scheduling, and connectivity.
8
+
9
+ ## What {{portalName}} Does
10
+
11
+ - **Gateway**: Single Node.js process that accepts messages from multiple sources and routes them to AI engines
12
+ - **Connectors**: Modular input/output adapters (Slack, web UI, future: Discord, iMessage)
13
+ - **Cron**: Scheduled AI jobs with hot-reloadable configuration
14
+ - **Organization**: Employee personas with departments, ranks, and inter-agent communication via boards
15
+ - **Skills**: Markdown instruction sets that engines read and follow natively
16
+ - **Self-modification**: {{portalName}} can edit its own config, skills, cron jobs, and org structure at runtime
17
+
18
+ ## How It Differs from Custom Agentic Frameworks
19
+
20
+ Traditional approaches build custom tool-calling loops, manage context windows, and implement retry logic. {{portalName}} does none of that. The engines (Claude Code, Codex) already handle tool use, file editing, command execution, and multi-step reasoning. {{portalName}} just connects them to the outside world.
21
+
22
+ ## Directory Structure
23
+
24
+ ```
25
+ ~/.jinn/
26
+ config.yaml # Gateway configuration
27
+ jinn.db # SQLite session registry
28
+ docs/ # These reference docs
29
+ skills/ # Skill directories with SKILL.md files
30
+ cron/
31
+ jobs.json # Cron job definitions
32
+ runs/ # Run logs (JSONL)
33
+ org/
34
+ <department>/
35
+ department.yaml # Department config
36
+ board.json # Task board
37
+ <name>.yaml # Employee persona
38
+ logs/ # Application logs
39
+ ```
@@ -0,0 +1,65 @@
1
+ # Self-Modification
2
+
3
+ {{portalName}}'s engines operate within `~/.jinn/` and can modify any file in that directory. This enables {{portalName}} to update its own configuration, create skills, manage cron jobs, and restructure the organization at runtime.
4
+
5
+ ## What {{portalName}} Can Edit
6
+
7
+ | File/Directory | Effect of Modification |
8
+ |---|---|
9
+ | `config.yaml` | File watcher triggers full config reload |
10
+ | `cron/jobs.json` | File watcher triggers cron reschedule |
11
+ | `org/**/*.yaml` | File watcher triggers employee registry rebuild |
12
+ | `org/**/board.json` | Read on demand by employees; no watcher needed |
13
+ | `skills/*/SKILL.md` | Read on demand by engines; no watcher needed |
14
+ | `skills/**/*` | Supporting skill data; read on demand |
15
+
16
+ ## File Watcher Reactions
17
+
18
+ The gateway uses chokidar to watch for changes:
19
+
20
+ - **config.yaml** → Parse YAML, validate schema, reload gateway configuration (port, engines, connectors, logging)
21
+ - **cron/jobs.json** → Cancel all scheduled jobs, parse JSON, validate schema, reschedule enabled jobs
22
+ - **org/\*\*/\*.yaml** → Rebuild the employee registry from all persona and department YAML files
23
+
24
+ Changes take effect immediately. No restart required.
25
+
26
+ ## Safety Guidelines
27
+
28
+ Engines have full file access within `~/.jinn/`. To avoid breaking the gateway:
29
+
30
+ ### Do
31
+
32
+ - Validate YAML before writing to `config.yaml` (must be valid YAML with expected schema)
33
+ - Validate JSON before writing to `jobs.json` or `board.json`
34
+ - Use atomic writes (write to temp file, then rename) for critical files
35
+ - Back up files before making destructive changes
36
+ - Test cron expressions before adding them to `jobs.json`
37
+
38
+ ### Do Not
39
+
40
+ - Break `config.yaml` structure — invalid YAML will prevent config reload
41
+ - Corrupt `jinn.db` — the SQLite database is managed by the gateway process
42
+ - Write invalid JSON to `jobs.json` — this will cancel all cron jobs with nothing to replace them
43
+ - Delete the `docs/` directory — these reference docs are needed for self-awareness
44
+ - Modify files outside `~/.jinn/` unless explicitly instructed by the user
45
+
46
+ ## Example: Creating a Cron Job at Runtime
47
+
48
+ An engine can create a new cron job by reading `cron/jobs.json`, appending a new entry, and writing it back:
49
+
50
+ ```
51
+ 1. Read ~/.jinn/cron/jobs.json
52
+ 2. Parse the JSON array
53
+ 3. Append new job object with unique id, schedule, prompt, etc.
54
+ 4. Validate the full array
55
+ 5. Write back to ~/.jinn/cron/jobs.json
56
+ 6. The file watcher automatically reschedules all jobs
57
+ ```
58
+
59
+ ## Example: Adding a New Employee
60
+
61
+ ```
62
+ 1. Create ~/.jinn/org/<department>/<name>.yaml with required fields
63
+ 2. The file watcher detects the new file and rebuilds the employee registry
64
+ 3. The new employee is immediately available for @mention routing
65
+ ```
@@ -0,0 +1,58 @@
1
+ # Skills
2
+
3
+ Skills are markdown instruction sets that engines read and follow. There is no runtime, no loading system, no plugin API. Engines handle skills natively by reading the SKILL.md file.
4
+
5
+ ## How Skills Work
6
+
7
+ Each skill is a directory in `~/.jinn/skills/` containing at minimum a `SKILL.md` file. When an engine starts a session, it has access to the skills directory and can read any skill's instructions.
8
+
9
+ The `SKILL.md` file contains:
10
+ - **Trigger description**: When this skill should be activated
11
+ - **Instructions**: Step-by-step directions for the engine
12
+ - **Data file references**: Paths to any supporting files in the skill directory
13
+
14
+ ## Creating a Skill
15
+
16
+ ```
17
+ ~/.jinn/skills/
18
+ my-skill/
19
+ SKILL.md # Required: instructions
20
+ data.json # Optional: supporting data
21
+ template.txt # Optional: templates, examples, etc.
22
+ ```
23
+
24
+ ### Example SKILL.md
25
+
26
+ ```markdown
27
+ # Deploy Notification Skill
28
+
29
+ ## Trigger
30
+ When the user says "deploy" or asks about deployment status.
31
+
32
+ ## Instructions
33
+ 1. Read the deployment config from `data/deploy-targets.json` in this skill directory
34
+ 2. Check the current git branch and latest commit
35
+ 3. Format a deployment summary with target environment, branch, and commit hash
36
+ 4. Ask for confirmation before proceeding
37
+
38
+ ## Data Files
39
+ - `deploy-targets.json`: List of deployment targets with URLs and environment names
40
+ ```
41
+
42
+ ## Pre-packaged Skills
43
+
44
+ {{portalName}} ships with several default skills:
45
+
46
+ - **self**: Instructions for {{portalName}} to understand and modify its own configuration
47
+ - **slack**: Slack-specific behavior and formatting guidelines
48
+ - **cron**: How to create and manage scheduled jobs
49
+ - **org**: Working with the organization structure and employee personas
50
+ - **skills**: Meta-skill for creating and managing other skills
51
+
52
+ ## Key Points
53
+
54
+ - Skills are just files. Engines read them as context.
55
+ - No compilation, no imports, no runtime hooks.
56
+ - Any file format works as supporting data (JSON, YAML, CSV, plain text).
57
+ - Skills can reference other skills by path.
58
+ - Engines decide when and how to apply skill instructions based on the trigger description.
File without changes
File without changes
@@ -0,0 +1,25 @@
1
+ # Migration: 0.1.0 (Baseline)
2
+
3
+ This is the initial release of Jinn. No migration steps are needed — fresh installs via `jinn setup` receive everything automatically.
4
+
5
+ ## What's included in the initial template
6
+
7
+ - `config.default.yaml` — default gateway configuration
8
+ - `CLAUDE.md` — operating instructions for the COO persona
9
+ - `AGENTS.md` — Codex engine instructions
10
+ - `docs/` — architecture documentation (overview, connectors, cron, org, skills, self-modification)
11
+ - `skills/` — 10 built-in skills:
12
+ - `management` — org management (hire, fire, promote, delegate)
13
+ - `cron-manager` — cron job CRUD
14
+ - `skill-creator` — create new skills
15
+ - `self-heal` — diagnose and fix gateway issues
16
+ - `onboarding` — first-run setup wizard
17
+ - `migrate` — AI-assisted template migrations
18
+ - `sync` — sync employee conversation context
19
+ - `status` — session status display
20
+ - `new` — reset chat session
21
+ - `find-and-install` — skills.sh marketplace integration
22
+
23
+ ## For future releases
24
+
25
+ Subsequent versions will include migration steps here (file additions, config changes, schema updates) along with a `files/` directory containing new or modified template files.
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: cron-manager
3
+ description: Create, edit, delete, enable, disable, and list scheduled cron jobs
4
+ ---
5
+
6
+ # Cron Manager Skill
7
+
8
+ ## Trigger
9
+
10
+ This skill activates when the user wants to create, edit, delete, enable, disable, or list scheduled cron jobs.
11
+
12
+ ## Data File
13
+
14
+ All cron jobs are stored in `~/.jinn/cron/jobs.json` as a JSON array of job objects. If the file does not exist, create it with an empty array `[]`.
15
+
16
+ ## CronJob Schema
17
+
18
+ ```json
19
+ {
20
+ "id": "uuid-v4",
21
+ "name": "daily-standup-summary",
22
+ "enabled": true,
23
+ "schedule": "0 9 * * 1-5",
24
+ "timezone": "America/New_York",
25
+ "engine": "claude",
26
+ "model": "sonnet",
27
+ "employee": "project-manager",
28
+ "prompt": "Review all department boards and summarize progress since yesterday. Highlight blockers and upcoming deadlines.",
29
+ "delivery": {
30
+ "connector": "slack",
31
+ "channel": "#engineering-standup"
32
+ }
33
+ }
34
+ ```
35
+
36
+ Field details:
37
+ - `id` — UUID v4, generated when creating the job
38
+ - `name` — kebab-case human-readable identifier, must be unique across all jobs
39
+ - `enabled` — boolean, whether the job is active
40
+ - `schedule` — standard cron expression (minute hour day month weekday)
41
+ - `timezone` — IANA timezone string (e.g., `America/New_York`, `Europe/London`, `UTC`)
42
+ - `engine` — AI engine to run the job: `claude` or `codex`
43
+ - `model` — model identifier (e.g., `sonnet`, `opus`, `o3`)
44
+ - `employee` — optional, the employee persona to use (must match an employee name in the org)
45
+ - `prompt` — the instruction to execute when the job fires
46
+ - `delivery` — optional object specifying where to send output
47
+ - `connector` — the connector to use (e.g., `slack`, `discord`)
48
+ - `channel` — the target channel or destination
49
+
50
+ ## Operations
51
+
52
+ ### Creating a Job
53
+
54
+ 1. Read the current `~/.jinn/cron/jobs.json` (or initialize as `[]` if missing).
55
+ 2. Ask the user for the required fields: name, schedule, engine, model, and prompt.
56
+ 3. Ask about the timezone. Default to `UTC` if not specified.
57
+ 4. Ask about the employee persona to use. This is optional.
58
+ 5. **Always ask the user about the delivery channel** if they did not specify one. Explain that without delivery, the output will only be logged.
59
+ 6. **Delegation check**: If the job has delivery configured AND targets a non-{{portalSlug}} employee, warn the user. The correct pattern for reporting/analytical jobs is: target `{{portalSlug}}`, and include delegation instructions in the prompt (e.g. "Delegate to @employee-name: ..."). {{portalName}} reviews and filters the output before it reaches the delivery channel. Only simple, no-review tasks (e.g. health checks) should target employees directly with delivery.
60
+ 7. Generate a UUID for the `id` field.
61
+ 8. Set `enabled` to `true` by default.
62
+ 9. Append the new job object to the array.
63
+ 10. Write the updated array back to `~/.jinn/cron/jobs.json`.
64
+ 11. Confirm the creation and summarize the schedule in plain English.
65
+
66
+ ### Editing a Job
67
+
68
+ 1. Read `~/.jinn/cron/jobs.json`.
69
+ 2. Find the job by name or id.
70
+ 3. Show the current values to the user.
71
+ 4. Apply the requested changes.
72
+ 5. Write the updated array back.
73
+ 6. Confirm the changes.
74
+
75
+ ### Deleting a Job
76
+
77
+ 1. Read `~/.jinn/cron/jobs.json`.
78
+ 2. Find the job by name or id.
79
+ 3. Confirm deletion with the user (show job details).
80
+ 4. Remove the job from the array.
81
+ 5. Write the updated array back.
82
+ 6. Confirm deletion.
83
+
84
+ ### Enabling / Disabling a Job
85
+
86
+ 1. Read `~/.jinn/cron/jobs.json`.
87
+ 2. Find the job by name or id.
88
+ 3. Set `enabled` to `true` (enable) or `false` (disable).
89
+ 4. Write the updated array back.
90
+ 5. Confirm the status change.
91
+
92
+ ### Listing Jobs
93
+
94
+ 1. Read `~/.jinn/cron/jobs.json`.
95
+ 2. Display jobs in a readable format, grouped by enabled/disabled.
96
+ 3. Include name, schedule (with plain-English interpretation), timezone, engine, and delivery info.
97
+
98
+ ## Cron Schedule Reference
99
+
100
+ The schedule field uses standard 5-field cron syntax:
101
+
102
+ ```
103
+ ┌───────────── minute (0-59)
104
+ │ ┌───────────── hour (0-23)
105
+ │ │ ┌───────────── day of month (1-31)
106
+ │ │ │ ┌───────────── month (1-12)
107
+ │ │ │ │ ┌───────────── day of week (0-7, 0 and 7 = Sunday)
108
+ │ │ │ │ │
109
+ * * * * *
110
+ ```
111
+
112
+ Common examples:
113
+ - `0 9 * * 1-5` — Every weekday at 9:00 AM
114
+ - `0 0 * * *` — Every day at midnight
115
+ - `*/15 * * * *` — Every 15 minutes
116
+ - `0 9 * * 1` — Every Monday at 9:00 AM
117
+ - `0 8,17 * * *` — Every day at 8:00 AM and 5:00 PM
118
+ - `0 0 1 * *` — First day of every month at midnight
119
+ - `30 14 * * 5` — Every Friday at 2:30 PM
120
+
121
+ ## Error Handling
122
+
123
+ - If `jobs.json` is malformed, attempt to fix it. If unrecoverable, back it up as `jobs.json.bak` and start fresh with `[]`.
124
+ - If a job name already exists when creating, warn the user and ask for a different name.
125
+ - Validate the cron expression format before saving. Warn if the expression looks incorrect.
126
+ - Validate that the timezone is a valid IANA timezone string.
127
+ - If an employee is specified, verify it exists in the org directory.
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: find-and-install
3
+ description: Find and install skills from skills.sh when a capability gap is detected
4
+ ---
5
+
6
+ # Find & Install Skills
7
+
8
+ ## Trigger
9
+
10
+ This skill activates when you detect a capability gap that a community skill might fill, the user explicitly asks to find or install a skill and a task would benefit from a specialized skill you don't currently have
11
+
12
+ ## Searching for Skills
13
+
14
+ Run a search using the skills CLI:
15
+
16
+ ```bash
17
+ npx skills find [query]
18
+ ```
19
+
20
+ Review the results and assess trust level before suggesting:
21
+
22
+ - 🟢 **VERIFIED** (1000+ installs or known orgs like `vercel-labs`, `anthropics`, `microsoft`): Suggest confidently
23
+ - 🟡 **COMMUNITY** (50–999 installs): Suggest with a note about the install count
24
+ - 🔴 **UNKNOWN** (<50 installs): Show but warn the user — offer to preview the SKILL.md before installing
25
+
26
+ ## Installing a Skill
27
+
28
+ Once the user approves (or for 🟢 VERIFIED skills when you're confident it fits):
29
+
30
+ ### Step 1: Install globally
31
+
32
+ ```bash
33
+ npx skills add <owner/repo@skill> -g -y
34
+ ```
35
+
36
+ This places files into `~/.claude/skills/<name>/` or `~/.agents/skills/<name>/`.
37
+
38
+ ### Step 2: Copy into {{portalSlug}} skills directory
39
+
40
+ ```bash
41
+ cp -r ~/.claude/skills/<name>/ ~/.{{portalSlug}}/skills/<name>/
42
+ ```
43
+
44
+ The {{portalName}} file watcher will detect the new directory and create the appropriate symlinks automatically.
45
+
46
+ ### Step 3: Update the skills manifest
47
+
48
+ Read `~/.{{portalSlug}}/skills.json`, add the new skill entry, and write it back.
49
+
50
+ The manifest format:
51
+
52
+ ```json
53
+ {
54
+ "installed": {
55
+ "<name>": {
56
+ "source": "<owner/repo@skill>",
57
+ "installedAt": "<ISO 8601 timestamp>"
58
+ }
59
+ }
60
+ }
61
+ ```
62
+
63
+ ### Step 4: Apply the skill immediately
64
+
65
+ Read the newly installed `~/.{{portalSlug}}/skills/<name>/SKILL.md` and follow its instructions to complete the current task.
66
+
67
+ ## When No Skills Are Found
68
+
69
+ If `npx skills find` returns no results:
70
+
71
+ 1. Offer to help the user directly with the task using your built-in capabilities
72
+ 2. Suggest creating a custom skill if this is a recurring need (use the `skill-creator` skill)
73
+
74
+ ## Examples
75
+
76
+ **User asks to deploy to Vercel:**
77
+
78
+ ```bash
79
+ npx skills find "vercel deploy"
80
+ # → vercel-labs/ai-skills@vercel-deploy (🟢 VERIFIED, 5200 installs)
81
+ npx skills add vercel-labs/ai-skills@vercel-deploy -g -y
82
+ cp -r ~/.claude/skills/vercel-deploy/ ~/.{{portalSlug}}/skills/vercel-deploy/
83
+ # → update skills.json → read SKILL.md → follow deploy instructions
84
+ ```
85
+
86
+ **User asks for an obscure skill:**
87
+
88
+ ```bash
89
+ npx skills find "arduino serial monitor"
90
+ # → random-user/arduino-tools@serial-monitor (🔴 UNKNOWN, 12 installs)
91
+ # → Warn user, offer to preview SKILL.md before installing
92
+ ```