worker: replace filesystem prompts with effective DCDL catalog
This commit is contained in:
@@ -2,6 +2,7 @@ import "./base.dcdl" // {
|
||||
slug = "coder";
|
||||
description = "Ticket implementation coder profile.";
|
||||
scope = "workspace_write";
|
||||
engine = { instruction = "role.coder"; };
|
||||
|
||||
feature = {
|
||||
task = { enabled = true; };
|
||||
|
||||
@@ -2,6 +2,7 @@ import "./base.dcdl" // {
|
||||
slug = "intake";
|
||||
description = "Ticket intake profile.";
|
||||
scope = "workspace_write";
|
||||
engine = { instruction = "role.intake"; };
|
||||
|
||||
feature = {
|
||||
task = { enabled = true; };
|
||||
|
||||
@@ -2,6 +2,7 @@ import "./base.dcdl" // {
|
||||
slug = "orchestrator";
|
||||
description = "Ticket orchestrator profile.";
|
||||
scope = "workspace_write";
|
||||
engine = { instruction = "role.orchestrator"; };
|
||||
|
||||
feature = {
|
||||
task = { enabled = true; };
|
||||
|
||||
@@ -2,6 +2,7 @@ import "./base.dcdl" // {
|
||||
slug = "reviewer";
|
||||
description = "Ticket review profile.";
|
||||
scope = "workspace_read";
|
||||
engine = { instruction = "role.reviewer"; };
|
||||
|
||||
feature = {
|
||||
task = { enabled = true; };
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
# Deterministic builtin Prompt source tree. Markdown imports use the shared
|
||||
# { frontmatter, content } contract; every leaf below selects only .content.
|
||||
# `default_prompt` is the DCDL source alias for the effective catalog's
|
||||
# reserved dotted name `default`.
|
||||
let
|
||||
defaultDocument = import "./default.md";
|
||||
commonLanguage = import "./common/language.md";
|
||||
commonTickets = import "./common/tickets.md";
|
||||
commonToolUsage = import "./common/tool-usage.md";
|
||||
commonWorkerObservation = import "./common/worker-observation.md";
|
||||
commonWorkerOrchestration = import "./common/worker-orchestration.md";
|
||||
commonWorkspace = import "./common/workspace.md";
|
||||
commonWriting = import "./common/writing.md";
|
||||
roleCoder = import "./role/coder.md";
|
||||
roleIntake = import "./role/intake.md";
|
||||
roleOrchestrator = import "./role/orchestrator.md";
|
||||
roleReviewer = import "./role/reviewer.md";
|
||||
internalCompactSystem = import "./internal/compact_system.md";
|
||||
internalFlowVerifierSystem = import "./internal/flow_verifier_system.md";
|
||||
internalMemoryConsolidationSystem = import "./internal/memory_consolidation_system.md";
|
||||
internalMemoryExtractSystem = import "./internal/memory_extract_system.md";
|
||||
internalWorkspaceOrchestratorQueueAttention = import "./internal/workspace_orchestrator_queue_attention.md";
|
||||
internalNotifyWrapper = import "./internal/notify_wrapper.md";
|
||||
internalInterruptToolResultSummary = import "./internal/interrupt_tool_result_summary.md";
|
||||
internalInterruptSystemNote = import "./internal/interrupt_system_note.md";
|
||||
internalWorkingBoundariesSection = import "./internal/working_boundaries_section.md";
|
||||
internalAgentsMdSection = import "./internal/agents_md_section.md";
|
||||
internalResidentMemorySummarySection = import "./internal/resident_memory_summary_section.md";
|
||||
internalSubWorkerSpawnToolDescription = import "./internal/sub_worker_spawn_tool_description.md";
|
||||
panelOrchestratorIdleQueueNotice = import "./panel/orchestrator_idle_queue_notice.md";
|
||||
workerTicketEventCompanionNotice = import "./worker/ticket_event_companion_notice.md";
|
||||
in
|
||||
{
|
||||
default_prompt = defaultDocument.content;
|
||||
common = {
|
||||
language = commonLanguage.content;
|
||||
tickets = commonTickets.content;
|
||||
tool_usage = commonToolUsage.content;
|
||||
worker_observation = commonWorkerObservation.content;
|
||||
worker_orchestration = commonWorkerOrchestration.content;
|
||||
workspace = commonWorkspace.content;
|
||||
writing = commonWriting.content;
|
||||
};
|
||||
role = {
|
||||
coder = roleCoder.content;
|
||||
intake = roleIntake.content;
|
||||
orchestrator = roleOrchestrator.content;
|
||||
reviewer = roleReviewer.content;
|
||||
};
|
||||
internal = {
|
||||
compact_system = internalCompactSystem.content;
|
||||
flow_verifier_system = internalFlowVerifierSystem.content;
|
||||
memory_consolidation_system = internalMemoryConsolidationSystem.content;
|
||||
memory_extract_system = internalMemoryExtractSystem.content;
|
||||
workspace_orchestrator_queue_attention = internalWorkspaceOrchestratorQueueAttention.content;
|
||||
notify_wrapper = internalNotifyWrapper.content;
|
||||
interrupt_tool_result_summary = internalInterruptToolResultSummary.content;
|
||||
interrupt_system_note = internalInterruptSystemNote.content;
|
||||
working_boundaries_section = internalWorkingBoundariesSection.content;
|
||||
agents_md_section = internalAgentsMdSection.content;
|
||||
resident_memory_summary_section = internalResidentMemorySummarySection.content;
|
||||
worker_orchestration_guidance_section = commonWorkerOrchestration.content;
|
||||
sub_worker_spawn_tool_description = internalSubWorkerSpawnToolDescription.content;
|
||||
};
|
||||
panel = {
|
||||
orchestrator_idle_queue_notice = panelOrchestratorIdleQueueNotice.content;
|
||||
};
|
||||
worker = {
|
||||
ticket_event_companion_notice = workerTicketEventCompanionNotice.content;
|
||||
};
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
---
|
||||
## SubWorker orchestration
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ You are here as an agent of the "yoi system".
|
||||
|
||||
Stay precise, edit code directly when asked, and avoid speculative refactoring.
|
||||
|
||||
{% include "common/workspace" %}
|
||||
{% include "common.workspace" %}
|
||||
|
||||
{% include "common/tool-usage" %}
|
||||
{% include "common.tool_usage" %}
|
||||
|
||||
|
||||
{% include "common/language" %}
|
||||
{% include "common.language" %}
|
||||
|
||||
{% include "common/writing" %}
|
||||
{% include "common.writing" %}
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
# Worker internal prompts (builtin pack).
|
||||
#
|
||||
# Values are minijinja template strings. Use `{% include "$prefix/..." %}`
|
||||
# to pull in long text from the $yoi / $user / $workspace prompt
|
||||
# libraries.
|
||||
#
|
||||
# Every key here MUST correspond to a `WorkerPrompt` variant; missing or
|
||||
# extra keys cause a build-time error (see `crates/worker/build.rs`).
|
||||
|
||||
[prompt]
|
||||
compact_system = "{% include \"$yoi/internal/compact_system\" %}"
|
||||
|
||||
memory_extract_system = "{% include \"$yoi/internal/memory_extract_system\" %}"
|
||||
|
||||
memory_consolidation_system = "{% include \"$yoi/internal/memory_consolidation_system\" %}"
|
||||
|
||||
flow_verifier_system = "{% include \"$yoi/internal/flow_verifier_system\" %}"
|
||||
|
||||
notify_wrapper = """\
|
||||
[Notification]
|
||||
{{ message }}
|
||||
|
||||
This is a notification, not a blocking request. If you are in the middle of a task, continue your current work and address this at a natural stopping point.\
|
||||
"""
|
||||
|
||||
interrupt_tool_result_summary = "[Interrupted by user]"
|
||||
|
||||
interrupt_system_note = "[The previous turn was interrupted by the user. The user's next request follows.]"
|
||||
|
||||
working_boundaries_section = """\
|
||||
---
|
||||
## Working boundaries
|
||||
|
||||
{{ scope_summary }}\
|
||||
"""
|
||||
|
||||
agents_md_section = """\
|
||||
---
|
||||
## Project instructions (AGENTS.md)
|
||||
|
||||
{{ agents_md }}\
|
||||
"""
|
||||
|
||||
resident_memory_summary_section = """\
|
||||
---
|
||||
## Resident memory summary
|
||||
|
||||
The following is the current durable session/workspace summary. Treat it as background context; it is not a user request.
|
||||
|
||||
{{ summary }}\
|
||||
"""
|
||||
|
||||
|
||||
worker_orchestration_guidance_section = "{% include \"$yoi/common/worker-orchestration\" %}"
|
||||
|
||||
ticket_event_companion_notice = "{% include \"$yoi/worker/ticket_event_companion_notice\" %}"
|
||||
|
||||
sub_worker_spawn_tool_description = """\
|
||||
Spawn a parent-owned Internal SubWorker session to split context for a delegated task. The parent Worker's write scope is reduced by the scope passed here; the Internal SubWorker starts running `task` immediately without creating a Runtime Worker record, OS process, PID, or Unix socket. It remains available for follow-up turns until explicitly stopped or its parent exits.
|
||||
|
||||
Optional `cwd`: when provided, it is the Internal SubWorker's tool default working directory only. It must be an absolute existing directory covered by the child's delegated readable scope, and it does not change workspace/Profile/memory/Ticket roots or grant authority. `name` must be unique among this Worker's direct children.
|
||||
|
||||
Profile selection: `profile` may be omitted or set to `default` to use the effective child default profile, set to `inherit` to derive reusable child configuration from this Worker, or set to one of the registry selectors below. Raw/path profile selectors are not accepted by SubWorkerSpawn. `scope` is always the only delegated filesystem capability; profile scope is replaced by the explicit SubWorkerSpawn scope.
|
||||
|
||||
Default profile: {{ default_profile }}
|
||||
Special selector: inherit — derive reusable model/worker/tool policy from the spawner while replacing worker.name and scope.
|
||||
Available registry profiles:
|
||||
{{ available_profiles }}{% if profile_diagnostic %}
|
||||
|
||||
Profile discovery diagnostic: {{ profile_diagnostic }}{% endif %}\
|
||||
"""
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
---
|
||||
## Project instructions (AGENTS.md)
|
||||
|
||||
{{ agents_md }}
|
||||
@@ -0,0 +1 @@
|
||||
[The previous turn was interrupted by the user. The user's next request follows.]
|
||||
@@ -0,0 +1 @@
|
||||
[Interrupted by user]
|
||||
@@ -0,0 +1,4 @@
|
||||
[Notification]
|
||||
{{ message }}
|
||||
|
||||
This is a notification, not a blocking request. If you are in the middle of a task, continue your current work and address this at a natural stopping point.
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
---
|
||||
## Resident memory summary
|
||||
|
||||
The following is the current durable session/workspace summary. Treat it as background context; it is not a user request.
|
||||
|
||||
{{ summary }}
|
||||
@@ -0,0 +1,12 @@
|
||||
Spawn a parent-owned Internal SubWorker session to split context for a delegated task. The parent Worker's write scope is reduced by the scope passed here; the Internal SubWorker starts running `task` immediately without creating a Runtime Worker record, OS process, PID, or Unix socket. It remains available for follow-up turns until explicitly stopped or its parent exits.
|
||||
|
||||
Optional `cwd`: when provided, the spawned SubWorker's tool default working directory only. It must be an absolute existing directory covered by the child's delegated readable scope, and it does not change workspace/Profile/memory/Ticket roots or grant authority. `name` must be unique among this Worker's direct children.
|
||||
|
||||
Profile selection: `profile` may be omitted or set to `default` to use the effective child default profile, set to `inherit` to derive reusable child configuration from this Worker, or set to one of the registry selectors below. Raw/path profile selectors are not accepted by SubWorkerSpawn. `scope` is always the only delegated filesystem capability; profile scope is replaced by the explicit SubWorkerSpawn scope.
|
||||
|
||||
Default profile: {{ default_profile }}
|
||||
Special selector: inherit — derive reusable model/worker/tool policy from the spawner while replacing worker.name and scope.
|
||||
Available registry profiles:
|
||||
{{ available_profiles }}{% if profile_diagnostic %}
|
||||
|
||||
Profile discovery diagnostic: {{ profile_diagnostic }}{% endif %}
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
---
|
||||
## Working boundaries
|
||||
|
||||
{{ scope_summary }}
|
||||
Reference in New Issue
Block a user