Tommy Carlsson
5b35cd626b
feat: add autoloadSkills frontmatter field for agent definitions
...
Adds optional autoloadSkills field to agent frontmatter that automatically loads listed skills when a sub-agent is spawned. Uses the same buildSkillPromptMessage + sendCustomMessage mechanism as interactive skill loading, queued via sendCustomMessage({ triggerTurn: false }) before the first session.prompt(task). No extra agent turns, no new injection path. Skills stay in listing for sub-resource access. Compaction behavior matches manual loading. Unknown skill names silently skipped.
Lore-id: f85fdbdc
Constraint: autoload must use buildSkillPromptMessage + sendCustomMessage, never modify systemPrompt or use contextFiles
Constraint: triggerTurn must be false to avoid extra agent turns
Rejected: append to systemPrompt | agent cannot distinguish skill content from own instructions
Rejected: contextFiles injection | agent sees opaque file blob, cannot discover sub-resources
Rejected: promptCustomMessage per skill | N extra agent turns with model inference
Directive: autoload skill names are resolved against parent session skill list at spawn time in task/index.ts
Tested: TypeScript compiles clean with tsc --noEmit
Tested: parseAgentFields parses array and CSV string frontmatter
Tested: parseAgentFields returns undefined for absent and empty fields
Not-tested: bun test cannot run locally due to missing pi_natives native addon (requires Rust toolchain)
Confidence: high
Scope-risk: moderate
Reversibility: clean
2026-05-24 19:35:40 +04:00
..
2026-05-22 17:46:53 +09:00
2026-05-19 07:18:33 +00:00
2026-05-24 19:35:40 +04:00
2026-05-19 04:36:30 +02:00
2026-05-12 11:15:38 +02:00
2026-05-19 10:16:40 +09:00
2026-04-30 18:08:37 +02:00
2026-05-21 05:39:06 +00:00
2026-05-13 06:00:45 +02:00
2026-05-13 05:22:41 +02:00
2026-05-12 04:09:33 +02:00
2026-03-14 10:46:26 +01:00
2026-05-22 15:40:58 +09:00
2026-05-19 04:06:04 +00:00
2026-05-22 13:08:51 +09:00
2026-05-14 06:12:41 +02:00
2026-05-20 22:28:04 +00:00
2026-05-16 00:20:00 +02:00
2026-05-24 19:35:40 +04:00
2026-05-12 04:09:33 +02:00
2026-05-22 17:46:53 +09:00
2026-05-21 17:35:04 +09:00
2026-05-22 09:47:52 +00:00
2026-05-20 11:03:48 +00:00
2026-05-17 13:15:07 +02:00
2026-05-17 15:30:09 +08:00
2026-05-19 16:41:05 +08:00
2026-05-17 13:15:07 +02:00
2026-05-17 07:37:25 +08:00
2026-05-17 07:37:25 +08:00
2026-05-20 21:40:43 +00:00
2026-05-17 04:02:09 +02:00
2026-05-19 16:41:05 +08:00
2026-05-04 15:20:26 +02:00
2026-03-14 11:25:40 +01:00
2026-05-15 14:46:54 +02:00
2026-05-15 14:46:54 +02:00
2026-05-04 15:20:26 +02:00
2026-05-04 15:20:26 +02:00
2026-05-17 13:15:07 +02:00
2026-05-04 15:20:26 +02:00
2026-05-15 14:46:54 +02:00
2026-05-15 14:46:54 +02:00
2026-05-15 18:49:53 +02:00
2026-05-15 14:46:54 +02:00
2026-05-15 14:46:54 +02:00
2026-05-10 04:53:41 +02:00
2026-05-04 15:20:26 +02:00
2026-04-01 14:53:28 +07:00
2026-05-17 04:02:09 +02:00
2026-05-15 14:46:54 +02:00
2026-05-21 09:38:43 +00:00
2026-05-04 15:20:26 +02:00
2026-05-14 05:35:16 +02:00
2026-05-16 00:20:00 +02:00
2026-05-15 14:46:54 +02:00
2026-05-04 15:20:26 +02:00
2026-05-12 04:09:33 +02:00
2026-04-23 21:02:14 +02:00
2026-05-17 13:15:07 +02:00
2026-05-22 13:08:51 +09:00
2026-05-16 20:44:07 +02:00
2026-03-14 11:25:40 +01:00
2026-04-30 15:14:07 +02:00
2026-05-14 04:36:19 +02:00
2026-05-02 07:01:57 +02:00
2026-05-02 03:31:27 +02:00
2026-05-17 04:02:09 +02:00
2026-04-10 14:51:27 -05:00
2026-05-16 20:12:26 +02:00
2026-05-17 04:02:09 +02:00
2026-05-12 04:09:33 +02:00
2026-03-01 09:55:02 +01:00
2026-05-14 05:35:16 +02:00
2026-03-03 06:07:22 +01:00
2026-03-03 06:07:22 +01:00
2026-04-02 07:35:44 +02:00
2026-05-15 02:25:07 +00:00
2026-03-11 00:03:48 +01:00
2026-05-15 15:16:50 +02:00
2026-05-04 15:20:26 +02:00
2026-05-21 16:37:44 +09:00
2026-05-15 18:31:12 +02:00
2026-05-04 15:20:26 +02:00
2026-05-15 18:31:12 +02:00
2026-05-14 04:36:19 +02:00
2026-05-14 04:36:19 +02:00
2026-03-03 14:45:06 +01:00
2026-04-08 18:52:42 +02:00
2026-05-06 17:13:11 +02:00
2026-05-15 14:46:54 +02:00
2026-05-22 17:46:53 +09:00
2026-05-14 04:36:19 +02:00
2026-05-22 17:46:53 +09:00
2026-05-17 02:32:12 +02:00
2026-05-13 08:18:07 +00:00
2026-05-06 19:01:21 +02:00
2026-05-17 03:47:45 +02:00
2026-05-21 17:35:04 +09:00
2026-02-13 14:07:38 +01:00
2026-05-14 04:36:19 +02:00
2026-04-11 08:54:27 +02:00
2026-02-16 10:08:53 +01:00
2026-05-14 04:36:19 +02:00
2026-05-03 09:48:11 +02:00
2026-05-03 09:48:11 +02:00
2026-05-03 09:48:11 +02:00
2026-05-14 04:36:19 +02:00
2026-05-17 04:02:09 +02:00
2026-04-23 21:02:14 +02:00
2026-04-27 18:21:45 +01:00
2026-03-03 15:09:46 +01:00
2026-03-03 15:12:50 +01:00
2026-05-12 04:09:33 +02:00
2026-05-13 13:21:59 +02:00
2026-04-08 14:42:51 +02:00
2026-03-22 18:28:40 +01:00
2026-04-30 18:08:37 +02:00
2026-05-04 00:19:06 +02:00
2026-05-14 05:35:16 +02:00
2026-05-14 04:36:19 +02:00
2026-05-20 13:34:09 +09:00
2026-05-14 04:36:19 +02:00
2026-05-16 17:29:23 +02:00
2026-04-28 05:23:26 +02:00
2026-05-04 15:20:26 +02:00
2026-05-14 04:36:19 +02:00
2026-05-04 00:19:06 +02:00
2026-05-14 04:36:19 +02:00
2026-04-30 04:51:23 +02:00
2026-04-30 04:51:23 +02:00
2026-04-30 04:51:23 +02:00
2026-05-02 07:55:30 +02:00
2026-05-02 07:48:30 +02:00
2026-05-14 04:36:19 +02:00
2026-05-14 06:23:55 +02:00
2026-05-09 03:11:19 +02:00
2026-05-09 03:11:18 +02:00
2026-05-09 04:02:20 +02:00
2026-05-10 03:21:02 +08:00
2026-05-10 05:09:29 +02:00
2026-05-10 04:55:43 +02:00
2026-05-12 06:56:39 +02:00
2026-05-15 18:31:12 +02:00
2026-05-13 01:56:18 +02:00
2026-05-17 11:52:01 +00:00
2026-04-02 07:35:44 +02:00
2026-03-22 18:28:40 +01:00
2026-04-26 06:59:47 +02:00
2026-03-26 15:33:26 +01:00
2026-05-12 04:09:33 +02:00
2026-05-07 15:40:45 +02:00
2026-05-14 06:40:41 +02:00
2026-03-03 04:00:30 +01:00
2026-03-20 23:48:38 +01:00
2026-05-12 04:09:33 +02:00
2026-03-03 06:07:22 +01:00
2026-04-30 15:04:33 +02:00
2026-05-03 07:39:52 +02:00
2026-03-14 11:00:07 +01:00
2026-05-14 04:36:19 +02:00
2026-04-13 00:58:32 +02:00
2026-05-12 04:09:33 +02:00
2026-05-20 20:16:19 +00:00
2026-04-13 15:46:06 +02:00
2026-05-12 04:09:33 +02:00
2026-03-08 16:16:54 +01:00
2026-05-13 15:39:04 -07:00
2026-02-23 06:21:32 +00:00
2026-05-15 00:03:57 +02:00
2026-05-04 15:20:26 +02:00
2026-05-12 04:09:33 +02:00
2026-05-11 00:05:00 +00:00
2026-05-07 15:06:39 -03:00
2026-05-14 06:40:50 +02:00
2026-05-12 04:09:33 +02:00
2026-05-13 06:00:45 +02:00
2026-05-14 05:58:25 +02:00
2026-05-14 23:22:27 +02:00
2026-05-16 18:52:04 +02:00
2026-05-13 05:24:33 +02:00
2026-05-14 04:36:19 +02:00
2026-03-26 19:12:51 +01:00
2026-05-22 15:51:32 +09:00
2026-02-20 12:28:25 +01:00
2026-01-28 21:12:28 +01:00
2026-04-08 06:23:27 +02:00
2026-05-15 01:00:06 +02:00
2026-03-06 12:35:01 +01:00
2026-05-17 04:02:09 +02:00
2026-05-17 04:02:09 +02:00
2026-04-08 08:47:32 +02:00
2026-05-18 13:33:25 +00:00
2026-05-04 18:06:12 +02:00
2026-04-23 21:02:14 +02:00
2026-05-15 14:46:54 +02:00
2026-05-12 04:09:33 +02:00
2026-05-15 17:00:18 +02:00
2026-05-14 05:03:04 +02:00
2026-03-02 17:01:44 +01:00
2026-03-26 16:17:27 +01:00
2026-05-21 16:46:46 +09:00
2026-05-14 05:12:07 +02:00
2026-05-13 23:58:13 +00:00
2026-03-13 15:14:05 +01:00
2026-05-22 13:03:03 +09:00
2026-05-12 04:09:33 +02:00
2026-05-14 06:23:55 +02:00
2026-05-15 17:49:14 +02:00
2026-03-03 14:32:02 +01:00
2026-04-18 23:24:00 +02:00
2026-05-15 14:46:54 +02:00
2026-05-15 14:46:54 +02:00
2026-02-15 10:20:11 +01:00
2026-05-04 15:20:26 +02:00
2026-05-15 14:46:54 +02:00
2026-02-15 10:20:11 +01:00
2026-04-07 02:00:59 +02:00
2026-05-22 15:51:32 +09:00
2026-05-12 04:09:33 +02:00
2026-05-22 18:06:50 +09:00
2026-02-01 10:23:41 +01:00
2026-02-18 01:53:02 +01:00
2026-03-26 19:12:50 +01:00
2026-05-21 00:09:43 +00:00
2026-05-14 04:36:19 +02:00
2026-01-29 10:47:55 +01:00
2026-05-10 07:59:53 +02:00
2026-05-13 06:00:45 +02:00