Skip to content

Add program.md to system context and clean up docs/ - #3498

Open
morganmcg1 wants to merge 31 commits into
mainfrom
codex/program-md-system-prompt
Open

Add program.md to system context and clean up docs/#3498
morganmcg1 wants to merge 31 commits into
mainfrom
codex/program-md-system-prompt

Conversation

@morganmcg1

@morganmcg1 morganmcg1 commented Aug 14, 2026

Copy link
Copy Markdown
Member

Summary

program.md system context

  • add the optional program_path launch setting for advisor and student roles
  • when blank, search the repository root and one directory below it, proceeding only when exactly one program.md exists
  • fail before constructing a controller or model worker when discovery has no match or is ambiguous, listing every match and explaining how to set program_path
  • append the selected file to every main and child system prompt under # program.md - <path>
  • keep the resolved path and formatted section together as ProgramSystemPrompt, nested inside one immutable SenpaiSystemInstructions value with the loaded harness, selected role, and authoritative launch context
  • load all four instruction sources once when each agent process starts; remove system-context digests, refresh prompts, rereads, and reinjection, and use GitHub Issues for live human direction
  • retain only a small StartedConversationLedger so the initial controller context is not replayed after a successful first turn

Launch configuration

  • rename the ambiguous runner settings to senpai_repo_url and senpai_repo_revision, with matching SENPAI_REPO_* pod variables and no legacy aliases
  • keep the public Senpai source as a read-only default while making clear that target_repo_url is the required write and PR destination
  • combine runtime and isolation rules in one rendered SENPAI-LAUNCH-CONTEXT.md and append it after program.md in the system instructions
  • transport optional operator instructions separately as initial user context, never as trusted launch policy
  • fail loudly on missing, malformed, or empty launch context and explicitly propagate the exact resolved context to delegated children

Prompting and onboarding

  • remove target prompt-advisor.md / prompt-student.md loading, templating, bootstrap guidance, and compatibility; program.md is the sole repository-specific research contract
  • define Python-assembled model instructions directly as importable string constants in senpai_agent/PROMPTS.py, retain strict one-pass interpolation, and remove the Markdown parser and runtime prompt-file loading
  • keep the checked-in harness and Advisor/Student role charters as source documents while composing their loaded text, program.md, and authoritative launch context through the single aggregate
  • keep program.md guidance in role prompts and live skills, derive metrics and research context from it rather than physical-AI assumptions, and keep the shared harness free of program.md references
  • add the live delegate-subagents skill for agent/model selection and the spawn/await/status/cancel workflow; remove duplicated mechanics from Advisor/Student prompts and keep hard tree limits in the shared harness
  • align Advisor assignment guidance with the typed create_assignment contract by putting the complete experiment brief in body
  • document the student-only post_assignment_comment question/progress channel conditionally until its implementation in draft PR Restore student PR comments #3494 lands; keep terminal publication on submit_experiment_result
  • stop loading repository AGENTS.md, AGENT.md, or CLAUDE.md instruction files as OpenHands project context; explicit target skills remain available through a filtered skill path
  • trim the shared harness to Senpai-specific control-plane rules by removing project-instruction discovery, generic skill-catalog, launch-context/time, and completion reminders
  • remove controller-only “target” vocabulary, move event-handling guidance into the shared Senpai harness, and keep active prompt prose unwrapped
  • add concise program.md authoring guidance and four examples to AGENTS.md, exposed to human Claude users through the root CLAUDE.md symlink; add a five-section Mission/Data/Evaluation/Files/Research outline to the README
  • remove the retired docs/ source tree and deployment workflow while retaining the README link to the published project site; paper/ stays unchanged because every needed figure already exists there

Three independent follow-ups stack directly on this PR: #3500 separates live runtime skills from human/developer guides, #3501 adds the grilling-autoresearch onboarding skill, and #3502 exposes project skills to Claude.

Verification

  • quick_validate.py plugins/senpai/skills/delegate-subagents — valid
  • focused student-prompt, harness, and agent-boundary suite — 65 passed
  • focused prompt, package, program, OpenHands, controller, delegation, and launch suite — 226 passed
  • full test suite — 938 passed, 6 skipped
  • built a clean wheel and verified it contains senpai_agent/PROMPTS.py without the removed Markdown catalog or lowercase loader module
  • git diff --check
  • git diff --exit-code origin/main -- paper

@morganmcg1 morganmcg1 changed the title Add pinned program.md system context Pin program.md to system context Aug 14, 2026
@morganmcg1 morganmcg1 changed the title Pin program.md to system context Add program.md to system context Aug 14, 2026
@morganmcg1 morganmcg1 changed the title Add program.md to system context Add program.md to system context and clean up docs/ Aug 15, 2026
@morganmcg1
morganmcg1 marked this pull request as ready for review August 15, 2026 08:00
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