Expand description
System prompt and resource assembly, ported from packages/coding-agent/src/core/{system-prompt,skills, resource-loader}.ts and src/ultron/rlm/prompt.ts.
Modules§
- context_
files - AGENTS.md / CLAUDE.md discovery (
loadProjectContextFilesin core/resource-loader.ts). - frontmatter
- YAML frontmatter, as utils/frontmatter.ts parses it.
- ignore
- The
ignorepackage (7.x) as the package manager uses it:.gitignore-style rules, matched case-insensitively (its default), the last matching rule winning, and a path ignored when any of its parent directories is. Each rule becomes a regular expression the wayignorebuilds one: a leading/or an inner slash anchors it,**/,/**/and a trailing/**match directory runs,*and?stay inside one segment, a trailing/matches directories only, and a pattern without one also matches a directory of that name. - keep_
going - The per-session persona toggle and keep-going mode (Rust-only, no TypeScript reference).
- model_
notes - Notes for the model a prompt is rendered for: short rules a model family needs said outright, which the others follow unasked (or are hurt by). One table, matched by the start of the model id.
- paths
- Path helpers for resource discovery:
resolvePathagainst a home directory,canonicalizePath, BOM stripping. Node’spathitself isjsrt::path. - persona
- The Ultron persona (
"persona": "ultron"in settings.json):<agent dir>/personality.mdas a section of the system prompt, and the auto-nudge that continues a root turn which ended by announcing its next step instead of taking it. Rust-only (no TypeScript reference); the nudge rule and text are those of the user’s Claude Code hook (ultron-persona.py), recorded in fixtures/persona-nudge.json. - prompt_
files - SYSTEM.md / APPEND_SYSTEM.md discovery and prompt inputs (DefaultResourceLoader in core/resource-loader.ts).
- prompt_
templates - Prompt templates:
/name argsexpansion from markdown files (core/prompt-templates.ts). - runtime_
guide - The runtime guide: the system prompt section that tells the model how to work in the RLM REPL.
Port of packages/coding-agent/src/ultron/rlm/prompt.ts (
rlmRuntimePrompt,extensionToolsPrompt,rlmToolGuidelines) and the prompt texts it imports. - skills
- Skills: discovery (with the
.gitignore/.ignore/.fdignorerules of the directories walked), frontmatter validation, always-on skills and their system prompt listing (core/skills.ts). - system_
prompt - The structured system prompt (core/system-prompt.ts) and its rendered text (
getSystemMessageText).
Structs§
- Diagnostic
- A non-fatal problem found while loading resources (
ResourceDiagnostic).