Adopt artifact-first context for judgment-independent agents#50
Merged
Conversation
added 2 commits
July 6, 2026 22:57
- Judgment-independent roles (Reviewer/Auditor/Verifier-equivalents) in the audit, brownfield, devops, devteam, and research init templates now assemble from artifacts (Context:) instead of filtered shared history (ContextWindow), so they can't mistake an earlier agent's unverified claim for fact. - ContextAssembler now reports which declared sources resolved to no content (EmptySources), surfaced as context_strategy/declared_sources/ empty_sources on the context_assembly event and in the context window visualization, so a Context: spec pointing at a never-produced artifact is visible instead of silently empty. - EnableMemory has been a no-op since memory became always runtime- injected via ContextAssemblyPipeline; removed the field, its backward-compat merge logic, and all doc/example mentions in favor of KnowledgeWeight.
- ReplNextCommand/ReplNextTurn duplicated ReplCommand's setup and turn loop behind a hidden repl-next command and the FUSERAFT_REPL_NEXT env var, with no callers or docs depending on it; dropped both files and their wiring in Program.cs (DI registration, default-entrypoint switch, command registration). - Dropped stray "and cost" / "estimated cost" mentions from the VS Code sessions panel description (README.md) and the AgentMessage.Usage doc comment — the per-turn cost estimate they referred to is not surfaced there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the
Context:spec (artifact-first assembly) to the remaining judgment-independentroles across the
fuseraft inittemplates, adds anempty_sources/context_strategysignalso a declared source that resolves to nothing is visible instead of silently empty, and removes
two pieces of dead weight: the long-deprecated
EnableMemoryagent field (a no-op since memorybecame always runtime-injected) and the experimental, unused
repl-nextcommand.Type of change
Related issues
No related issue.
Changes
Context:specs to the Reviewer/Auditor/Verifier-equivalent agents in theaudit,brownfield,devops,devteam, andresearchinit templates (previouslyContextWindowfiltering or full shared history), so these roles assemble from durable artifacts rather than
replayed chat.
ContextAssembler.AssembleForAgentAsyncnow returns anAgentContextAssemblythat reportswhich declared sources resolved to no content (
EmptySources), instead of just the message list.AgentOrchestrator,GraphOrchestrator, andMagenticOrchestratorall emit the newcontext_strategy,declared_sources, andempty_sourcesfields on thecontext_assemblyevent; the context window visualization surfaces
empty_sourcesas a warning line.EnableMemoryfield fromAgentConfig(superseded byKnowledgeWeight;had no effect once
ContextAssemblyPipelinewent always-on), its backward-compat merge logicin
OrchestratorBuilder, and all mentions indocs/configuration.md,docs/context-management.md,and
config/examples/fuseraft-designer.yaml.repl-nextcommand (ReplNextCommand,ReplNextTurn) and itsFUSERAFT_REPL_NEXTdefault-entrypoint switch fromProgram.cs— it duplicatedReplCommand'ssetup/turn-loop behind a hidden command with no callers or docs depending on it.
AgentMessage.Usagedoc comment) that referred to an estimate not actually surfaced there.Testing
./build.sh --target=Test)config/examples/updated if config schema changedManual verification:
fuseraft init --template audit --no-interactivegenerates agent fileswith working
Context:blocks and noEnableMemoryremnants;fuseraft --helpno longer listsrepl-next, andfuseraft repl --helpis unaffected.Invariants
ChangeTrackerNotes for reviewers
EnableMemoryandrepl-nextremoval are pure deletions of dead code — neither had any effector caller left, so there's no behavior change to review there beyond "does it still compile and
pass tests." The substantive review surface is the
Context:spec adoption in the init templatesand the new
empty_sourcessignal on thecontext_assemblyevent.