Skip to content

refactor(session): modular system prompts and runner wiring#254

Merged
duguwanglong merged 15 commits into
devfrom
refactor/session-prompt-runner-system-blocks
May 18, 2026
Merged

refactor(session): modular system prompts and runner wiring#254
duguwanglong merged 15 commits into
devfrom
refactor/session-prompt-runner-system-blocks

Conversation

@xiami762
Copy link
Copy Markdown
Contributor

@xiami762 xiami762 commented May 11, 2026

Summary

  • Refactor session prompt.py: composed provider/system blocks, guidance hooks, caching; consolidate defaults and slim static templates under flocks/session/prompt/.
  • Wire prompt_strings, Rex/Hephaestus prompt builders, prompt_utils, and memory bootstrap to the new pipeline.
  • Update session/runner.py for provider system blocks and related message handling.
  • Tests: refresh session/agent/memory/integration coverage; add tests/provider/test_anthropic_system_blocks.py.

xiami762 and others added 13 commits May 11, 2026 17:11
- Extend prompt composition (provider blocks, guidance, caching) and
  consolidate defaults; trim redundant static template bodies.
- Update prompt_strings, Rex/Hephaestus builders, prompt_utils, and memory
  bootstrap for the new prompt pipeline.
- Adjust session runner for Anthropic-style system blocks and related
  message handling.
- Refresh session/agent/memory/integration tests; add Anthropic system
  blocks unit coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
…sion-prompt-runner-system-blocks

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	flocks/session/runner.py
- Relocate flocks_mcp from ~/.flocks plugin path to flocks/tool/system.
- Rex prompt_builder and agent.yaml/toolset updates; agent_factory hooks.
- Session prompt/runner and prompt_strings tweaks; registry and skill wiring.
- Refresh AGENTS.md; extend tests for factory, runner, toolset, builtins.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Move agent_identity and tool_catalog layers for clearer guidance order.
- Exclude lsp from bulk native=True classification in ToolRegistry.
- Minor lsp_tool tweak; extend runner and builtin management tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Remove redundant prompt.py / prompt_strings content where duplicated.
- Refine bash tool description (dedicated-tool bullets and usage notes).
- Align prompt_tokens, runner_step, and bash registry tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Remove Python/TUI tool implementations and registry/catalog wiring
- Update agent YAMLs, skills docs, and validator for tool-builder
- Adjust session runner, prompts, and OpenAI responses tool prep
- Add TUI question-state module with tests; update DelegateTaskCard

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add general.txt prompt and get_prompt_general; drop Python qwen.txt
- Remove batch tool from Python/TUI registries and delegate_task paths
- Update Rex/hephaestus prompt builders, prompt_utils, and session assembly
- Refresh anthropic prompts; add TUI prompt-source and system tests

Co-authored-by: Cursor <cursoragent@cursor.com>
- Drop bundled plan agent definition; keep plan_enter/plan_exit tools
- Exit plan mode without confirmation; pass call_id for question context
- Align TUI plan tool copy; extend test_tools coverage

Co-authored-by: Cursor <cursoragent@cursor.com>
Rework runner/hooks pipeline for LLM hook payloads, replace legacy task_center
with schedule_task_center, remove multiedit end-to-end, add path_utils and a
minimax prompt fragment, and align file tools, TUI, and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend assistant message handling, rework todo tool/session/TUI wiring with
runner and session_loop, adjust compaction policy and provider SDK hooks, and
add regression tests (including DeepSeek provider).

Co-authored-by: Cursor <cursoragent@cursor.com>
…dows

Unix and Windows now get tailored bash-tool copy; Windows drops cmd
fallback, surfaces missing PowerShell clearly, and documents PS 5.1
quirks only when using powershell.exe.

Co-authored-by: Cursor <cursoragent@cursor.com>
@xiami762 xiami762 requested a review from duguwanglong May 18, 2026 02:04
xiami762 and others added 2 commits May 18, 2026 10:34
Use doubled backslashes in the PowerShell description so the rendered
guidance shows valid Windows-style paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add a consistent language-matching rule to Rex prompt XML and the
general, Anthropic, and MiniMax session prompt templates.

Co-authored-by: Cursor <cursoragent@cursor.com>
@duguwanglong duguwanglong merged commit 2ef16c7 into dev May 18, 2026
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.

2 participants