feat(core): enrich hardcoded system prompts in container templates#190
feat(core): enrich hardcoded system prompts in container templates#190konard wants to merge 6 commits intoProverCoderAI:mainfrom
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: ProverCoderAI#189
Analyzed all prompt-related issues (ProverCoderAI#96, ProverCoderAI#101, ProverCoderAI#78, ProverCoderAI#41, ProverCoderAI#54, ProverCoderAI#92, ProverCoderAI#90, ProverCoderAI#109, ProverCoderAI#110, ProverCoderAI#111, ProverCoderAI#122, ProverCoderAI#4, ProverCoderAI#143, ProverCoderAI#108) and synthesized a comprehensive system prompt that incorporates: - Reasoning model from AGENTS.md (role simulation, not personal opinions) - Deep Research process rule (internal, not response format) - Instrumental behavior requirements (use tools, don't offer guides) - Mandatory subagent usage for task delegation (ProverCoderAI#101, ProverCoderAI#4) - Plan mode on clone (ProverCoderAI#54) - Mandatory response contract addressing trust gap (ProverCoderAI#96): status, root cause, what changed, verification, where to check - Proof of execution requirements in PRs (ProverCoderAI#92): screenshots, logs, artifacts in .knowledge/evidence/ - Research loop for uncertainty/failures - Stricter type safety rules (unknown/as boundaries) - Monadic composition bans (async/await, Promise chains in prod code) - Effect-TS resource management (acquireRelease + scoped) - Boundary data decoding requirement Both CLAUDE.md and AGENTS.md are now aligned with each other and with the more comprehensive version that was already in AGENTS.md, plus the new requirements from the issues listed above. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit c808bb5.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (1678KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
|
Ты не понял. Я хотел обновить системный прмот для docker-git контейнерах. ОН зашит в коде |
|
🤖 AI Work Session Started Starting automated work session at 2026-03-24T11:17:02.908Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
Update the code-embedded system prompts that are injected into CLAUDE.md, AGENTS.md, and GEMINI.md when docker-git containers start. Extracts shared behavioral instructions into a new system-prompt-content.ts module and injects them into all three agent templates (claude, codex, gemini). New prompt sections based on issues ProverCoderAI#96, ProverCoderAI#101, ProverCoderAI#78, ProverCoderAI#41, ProverCoderAI#54, ProverCoderAI#92, ProverCoderAI#90: - Isolated environment awareness - Instrumental behavior (execute, don't guide) - Deep Research process rule - Mandatory subagent delegation with plan mode - Mandatory response contract (status, root cause, changes, verification) - Proof of execution requirements in PRs - Public API usage (no localhost URLs) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (1754KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart 1/3Detected uncommitted changes from previous run. Starting new session to review and commit or discard them. Uncommitted files: Auto-restart will stop after changes are committed or discarded, or after 2 more iterations. Please wait until working session will end and give your feedback. |
…equirements Add missing behavioral sections from issues ProverCoderAI#96, ProverCoderAI#41, ProverCoderAI#92, ProverCoderAI#4, ProverCoderAI#54: - Role/goal definition (mathematician-programmer, ProverCoderAI#41) - Research loop on failures (ProverCoderAI#41, AGENTS.md) - Claim safety rule - no "fixed" without proof (ProverCoderAI#96) - Visibility rule - check why user may not see result (ProverCoderAI#96) - CI/CD rule - always return failing step + reproduce command (ProverCoderAI#96) - Rational comments format (CHANGE/WHY/REF, ProverCoderAI#41) - Micro-agent creation capability (ProverCoderAI#4) - Detailed proof-of-execution requirements (ProverCoderAI#92) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🔄 Auto-restart 1/3 LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (2978KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
Summary
Fixes #189
The system prompts injected into docker-git containers (CLAUDE.md, AGENTS.md, GEMINI.md at startup) were minimal — just agent identity and workspace context. The user requested enriching them based on all prompt-related issues.
What changed
New file:
packages/lib/src/core/templates-entrypoint/system-prompt-content.tsModified template files (import and inject
systemPromptBehavior):packages/lib/src/core/templates-entrypoint/claude-extra-config.ts— Claude promptpackages/lib/src/core/templates-entrypoint/codex.ts— Codex/AGENTS promptpackages/lib/src/core/templates-entrypoint/gemini.ts— Gemini promptModified test:
packages/app/tests/docker-git/entrypoint-auth.test.ts— updated assertions for new prompt structureDocs (from previous commit):
CLAUDE.mdandAGENTS.md— project-level instructions aligned with container promptsNew prompt sections (from issues)
Architecture
The prompt has three layers:
system-prompt-content.ts→ templates) — behavioral instructions injected at container startuptemplates-entrypoint/*.ts) — workspace context, permissions, tool accessCLAUDE.md,AGENTS.mdin repo root) — coding standards for this repoThis PR updates layer 1 (the code-embedded prompts) as requested.
Verification
npm run lint— 0 errors, 0 warningsnpm test— 192 tests pass (73 app + 119 lib)Математические гарантии
Инварианты:
∀ agent ∈ {claude, codex, gemini}: prompt(agent) ⊇ systemPromptBehaviorsystem-prompt-content.ts→ all templatesДоказательства выполнения:
🤖 Generated with Claude Code