Repository navigation
arch(ws-15): add prompt context assembly - #3649
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a framework for managing identity context within the agent loop, allowing system-level instructions from files like AGENTS.md or SOUL.md to be injected into model prompts. It includes the core logic in ironclaw_loop_support, integration into the loop driver host, and a workspace-specific implementation. Feedback from the review highlights a critical mismatch in protected paths that will cause runtime failures, an underestimation of token costs in the budget logic for trusted files, and potential caching issues when switching prompt modes. Additionally, an optimization was suggested to replace the inefficient linear search used during identity message resolution with an indexed approach.
Review notes — WS15 prompt context assemblyCompliant with the files-not-Rust prompt rule: identity content lives in workspace files read via Per-lookup O(N files × IO) on identity resolution
(1) is the smaller change. Dead
|
SummaryReviewed WS15 PR #3649 only. Prompt context assembly currently upgrades user/profile-derived workspace files into trusted raw system prompt content and ignores run context policy for personal files. Validation:
Findings
Security/data-flow notes
Missing tests
|
109d2a3 to
0615a4e
Compare
d724c25 to
55e9a41
Compare
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…ges, document group-run policy deferral - Remove IdentityApplicability::OnTextOnly (no producer; no planned emitter) - Distinguish the two 'identity message ref is unavailable' error messages - Add TODO on _run_context documenting group-run personal-file gating deferral to WS17 - Add §8 Deferred in brief documenting serrrfirat Finding #2 - Update FNV-1a comment: explicitly non-cryptographic, content-addressing only Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d-limit mode Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Rebased onto current Addressed the valid WS-15 review feedback:
Local verification passed:
Final review pass found no remaining verified security/privacy findings. GitHub currently reports the branch as mergeable; CI is still running. |
* arch: ws-15-prompt-context-assembly (iter 0, approved) * fix(ws-15): remove OnTextOnly dead variant, fix duplicate error messages, document group-run policy deferral - Remove IdentityApplicability::OnTextOnly (no producer; no planned emitter) - Distinguish the two 'identity message ref is unavailable' error messages - Add TODO on _run_context documenting group-run personal-file gating deferral to WS17 - Add §8 Deferred in brief documenting serrrfirat Finding #2 - Update FNV-1a comment: explicitly non-cryptographic, content-addressing only Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(ws-15): document ContextBudgetExceeded as reserved for future hard-limit mode Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(ws-15): address identity context review feedback * fix(ci): ignore private workspace crate licenses * docs(ws-15): align identity context contract --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Context
Prompt/identity context assembly branch. It adds the host-side identity-context source needed by planned loops while preserving prompt authority in the host.
Master spec:
docs/reborn/agent-loop-skeleton.mdWorkstream brief:
docs/reborn/agent-loop-briefs/prompt-context-assembly.mdStack base:
arch/ws-8Latest stack maintenance on 2026-05-14:
origin/reborn-integrationthrough WS17 before publishing the PR descriptions.What landed
LoopContextBundlerather than strategy-owned file loading.Reviewer focus
Non-goals / deferred work
Validation
git diff --checkarch/ws-14-parentvalidation: multi-cratecargo checkwithironclaw_agent_loop/test-support.Stack position