Skip to content

Refine system prompts — personality, communication protocols, agent routing#38

Merged
AnExiledDev merged 4 commits intomainfrom
worktree-prompt-refinement
Feb 27, 2026
Merged

Refine system prompts — personality, communication protocols, agent routing#38
AnExiledDev merged 4 commits intomainfrom
worktree-prompt-refinement

Conversation

@AnExiledDev
Copy link
Owner

@AnExiledDev AnExiledDev commented Feb 27, 2026

Summary

  • Main system prompt redesigned — added personality section, compressed from 672→462 lines, delegation-only orchestrator, dynamic team sizing
  • Architect agent overhauled — complexity scaling, 20+ banned fluff patterns, edit ordering, rollback strategy, schema detection, 3 new examples
  • Merged tester→test-writer and doc-writer→documenter — 21→19 agents, no capability loss
  • All 19 agents now have communication protocols — read-only agents get "Handling Uncertainty"; write-capable agents get "Question Surfacing Protocol"
  • Improved agent descriptions for routing accuracy — added trigger phrases and overlap boundaries across 8 agents
  • Narrowed investigator to cross-domain investigations only — prevents over-selection vs focused specialists
  • Generalist rewritten as last-resort — description actively discourages selection when a specialist fits

Replaces

Supersedes #37 (closed due to branch deletion during rebase)

Test plan

  • Verify agent routing: spawn architect, explorer, researcher — confirm correct agent selected
  • Verify communication protocols: spawn a write agent with ambiguous task — confirm BLOCKED output
  • Verify personality comes through in responses
  • Verify no stale references to deleted agents (tester, doc-writer)

Summary by CodeRabbit

  • Changes

    • System prompts redesigned for explicit, structured workflows with enhanced error handling and safety measures.
    • Agent system updated with improved ambiguity handling protocols and verification procedures.
    • Documentation standards expanded with specification lifecycle management and inline documentation formats.
    • Multiple agents enriched with uncertainty handling and question-surfacing mechanisms.
  • Refactoring

    • Agent count reduced and reorganized; "doc-writer" consolidated into "documenter" role with expanded responsibilities.
    • Agent system architecture restructured for improved task delegation and team orchestration.

…press main prompt

Main system prompt redesigned from 672 to 462 lines: added personality
section with communication style and AuDHD-aware patterns, compressed
specification management and code standards, removed browser automation
and git worktrees (moved to loadable skills), added mandatory
context-passing protocol for subagent spawning, absorbed
assumption_surfacing and professional_objectivity into core sections.

All 21 agent prompts now have communication protocols — read-only agents
get "Handling Uncertainty" (flag assumptions, continue working),
write-capable agents get "Question Surfacing Protocol" (BLOCKED + return
for ambiguity). Architect agent gains anti-fluff enforcement and team
orchestration planning. Generalist rewritten as explicit last-resort
fallback. Bash guard hooks added to researcher, debug-logs, and
perf-profiler agents.
Address all 10 CodeRabbit review items plus 3 nitpicks:
- Fix communication protocol contradictions across 8 agent files
  (aligned "ask the user" instructions with Handling Uncertainty /
  Question Surfacing Protocol sections)
- Add `text` language identifier to fenced code block in main prompt
- Soften architect anti-fluff rule to allow evidence-based rationale
  in alternatives analysis (was: ban ALL justification)
- Merge duplicate ### Changed sections in CHANGELOG under [Unreleased]
- Clarify spec-writer BLOCKED section and fix hyphenation

Additional changes from approved plan (sessions 2-3):
- Main prompt: add delegation-only orchestrator, git workflow discipline,
  dynamic team sizing, remove artificial teammate caps
- Architect: complexity scaling, 20+ banned fluff patterns, edit ordering,
  rollback strategy, schema detection, 3 new examples
- Merge tester→test-writer (absorb 120s timeout, delete tester.md)
- Merge doc-writer→documenter (absorb README/API/docstring patterns,
  add worktree isolation, delete doc-writer.md)
- Narrow investigator to cross-domain investigations only
- Improve descriptions on 8 agents for routing accuracy
- Fix stale doc-writer/tester references across 6 files
- security-auditor: soften dependency boundary from "use X instead" to
  "prefer X" — agent still has A06 dependency tooling for surface-level
  checks, which doesn't conflict with a preference statement
- dependency-analyst: add Ruby/Gem ecosystem to description (agent
  already supports Gemfile scanning)
- documenter: add `bash` language identifier to fenced code block
- generalist: refine Question Surfacing Protocol to distinguish
  correctness-affecting ambiguity (STOP) from minor ambiguity (proceed
  with documented assumption)
- documenter: distinguish blocking ambiguity (scope, audience, approval)
  from non-blocking ambiguity (unclear code → TODO: verify), resolving
  contradiction between MUST-stop protocol and continue-with-TODO rule
- documenter: clarify that hand-written usage examples are encouraged
  while verbatim source reproduction is forbidden
- security-auditor: explicitly state basic dependency scanning is
  included in comprehensive audits, improving routing clarity
@AnExiledDev AnExiledDev merged commit 4e320ed into main Feb 27, 2026
4 of 5 checks passed
@AnExiledDev AnExiledDev deleted the worktree-prompt-refinement branch February 27, 2026 05:59
@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5612bc4 and 50a1ba6.

📒 Files selected for processing (28)
  • .codeforge/config/main-system-prompt.md
  • .devcontainer/CHANGELOG.md
  • .devcontainer/README.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/README.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/architect.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/bash-exec.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/claude-guide.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/debug-logs.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/dependency-analyst.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/doc-writer.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/documenter.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/explorer.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/generalist.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/git-archaeologist.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/investigator.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/migrator.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/perf-profiler.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/refactorer.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/researcher.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/security-auditor.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/spec-writer.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/statusline-config.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/test-writer.md
  • .devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/tester.md
  • .devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/team/SKILL.md
  • .devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/worktree/SKILL.md
  • .devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/worktree/references/parallel-workflow-patterns.md
  • .devcontainer/plugins/devs-marketplace/plugins/spec-workflow/skills/spec-build/SKILL.md

📝 Walkthrough

Walkthrough

This pull request comprehensively restructures the agent system, reducing agent count from 21 to 19 by consolidating doc-writer into documenter. It rewrites the main system prompt with refined execution guidelines and substantially updates agent documentation with new uncertainty-handling protocols and question-surfacing mechanisms across multiple agents.

Changes

Cohort / File(s) Summary
System Prompt Rewrite
.codeforge/config/main-system-prompt.md
Complete rewrite of persona, planning/execution directives, orchestration guidance, task decomposition, and approval workflows. Emphasizes explicit verification steps, structured handoffs, and anti-surprise safeguards. (+188/-448 lines)
Documentation Updates
.devcontainer/CHANGELOG.md, .devcontainer/README.md
Added extensive system prompt, agent system, and skill engine sections documenting redesigned workflows. Updated agent list from doc-writer to documenter. (+55/-29 lines)
Agent System Reorganization
.devcontainer/plugins/devs-marketplace/plugins/agent-system/README.md, .../agent-system/agents/investigator.md, .../agents/architect.md
Reduced total agent count from 21 to 19. Updated investigator scope to cross-domain research. Expanded architect's anti-fluff enforcement and complexity assessment framework. (+204/-49 lines)
Agent Deletions
.../agents/doc-writer.md, .../agents/tester.md
Removed doc-writer and tester agent documentation files entirely as part of agent system consolidation. (-638 lines)
Documenter Agent Expansion
.../agents/documenter.md
Comprehensively expanded documenter to include docstrings, inline documentation, architecture docs, and spec management. Added multi-phase workflow (Discover, Understand, Write), output format guidelines, and question surfacing protocol. (+194/-36 lines)
Uncertainty & Question Handling
.../agents/bash-exec.md, .../agents/claude-guide.md, .../agents/debug-logs.md, .../agents/dependency-analyst.md, .../agents/explorer.md, .../agents/generalist.md, .../agents/git-archaeologist.md, .../agents/migrator.md, .../agents/perf-profiler.md, .../agents/refactorer.md, .../agents/researcher.md, .../agents/security-auditor.md, .../agents/spec-writer.md, .../agents/statusline-config.md, .../agents/test-writer.md
Added or expanded "Handling Uncertainty" and "Question Surfacing Protocol" sections across 15 agent files. Agents now must document assumptions, halt on ambiguity affecting correctness, and emit BLOCKED: Questions sections for orchestrator handling. (+200/-60 lines total)
Skill Engine Updates
.../skill-engine/skills/team/SKILL.md, .../skills/worktree/SKILL.md, .../skills/worktree/references/parallel-workflow-patterns.md, .../spec-workflow/skills/spec-build/SKILL.md
Updated team compositions and agent references from doc-writer to documenter. Expanded specialist agent roster. Updated worktree isolation list to include documenter and implementer. (+8/-8 lines)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 Hops through the burrow of agents so grand,
Doc-writer and tester now join hopping band,
Documenter rises with docstrings and care,
While questions float up on the uncertainty air,
Nineteen strong agents, coordinated and bright!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch worktree-prompt-refinement

Comment @coderabbitai help to get the list of available commands and usage tips.

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