Skip to content

Adopt artifact-first context for judgment-independent agents#50

Merged
fuseraft merged 2 commits into
mainfrom
feature/context-adoption
Jul 7, 2026
Merged

Adopt artifact-first context for judgment-independent agents#50
fuseraft merged 2 commits into
mainfrom
feature/context-adoption

Conversation

@fuseraft

@fuseraft fuseraft commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Extends the Context: spec (artifact-first assembly) to the remaining judgment-independent
roles across the fuseraft init templates, adds an empty_sources/context_strategy signal
so a declared source that resolves to nothing is visible instead of silently empty, and removes
two pieces of dead weight: the long-deprecated EnableMemory agent field (a no-op since memory
became always runtime-injected) and the experimental, unused repl-next command.

Type of change

  • Bug fix
  • New feature
  • Plugin
  • Config example
  • Documentation
  • Refactor / cleanup
  • Other:

Related issues

No related issue.

Changes

  • Applied Context: specs to the Reviewer/Auditor/Verifier-equivalent agents in the audit,
    brownfield, devops, devteam, and research init templates (previously ContextWindow
    filtering or full shared history), so these roles assemble from durable artifacts rather than
    replayed chat.
  • ContextAssembler.AssembleForAgentAsync now returns an AgentContextAssembly that reports
    which declared sources resolved to no content (EmptySources), instead of just the message list.
  • AgentOrchestrator, GraphOrchestrator, and MagenticOrchestrator all emit the new
    context_strategy, declared_sources, and empty_sources fields on the context_assembly
    event; the context window visualization surfaces empty_sources as a warning line.
  • Removed the obsolete EnableMemory field from AgentConfig (superseded by KnowledgeWeight;
    had no effect once ContextAssemblyPipeline went always-on), its backward-compat merge logic
    in OrchestratorBuilder, and all mentions in docs/configuration.md, docs/context-management.md,
    and config/examples/fuseraft-designer.yaml.
  • Removed the experimental repl-next command (ReplNextCommand, ReplNextTurn) and its
    FUSERAFT_REPL_NEXT default-entrypoint switch from Program.cs — it duplicated ReplCommand's
    setup/turn-loop behind a hidden command with no callers or docs depending on it.
  • Dropped a couple of stray "cost" mentions (README.md's VS Code sessions panel description,
    AgentMessage.Usage doc comment) that referred to an estimate not actually surfaced there.

Testing

  • Added or updated unit tests
  • All tests pass locally (./build.sh --target=Test)
  • Tested manually end-to-end
  • Documentation updated where relevant
  • config/examples/ updated if config schema changed

Manual verification: fuseraft init --template audit --no-interactive generates agent files
with working Context: blocks and no EnableMemory remnants; fuseraft --help no longer lists
repl-next, and fuseraft repl --help is unaffected.

Invariants

  • Execution order unchanged (Selection → Validation → Failure handling → Termination → Iteration cap)
  • Any new file/shell/git tool is wrapped by ChangeTracker
  • Any new validator is deterministic, side-effect free, and idempotent
  • Physical history is not stripped or reordered outside of compaction

Notes for reviewers

EnableMemory and repl-next removal are pure deletions of dead code — neither had any effect
or 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 templates
and the new empty_sources signal on the context_assembly event.

Scott Stauffer 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.
@fuseraft fuseraft merged commit f0d14a1 into main Jul 7, 2026
3 checks passed
@fuseraft fuseraft deleted the feature/context-adoption branch July 7, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant