Initial commit: a0_software_orchestrator v1.0
- Auto-Registration-Bug behoben (register_project/get_project_id/resolve_project Trennung) - 25 Tests gruen (Pytest) - block_compactor-Tool refactored (Option B: Soft-Check statt Hard-Block) - 4 Restbaustellen gefixt - DB-Schema: plugin_settings-Tabelle hinzugefuegt - 3 Schattenprojekte aus DB geloescht - Plan v3 + Refactor-Plan + Worklog dokumentiert
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import os
|
||||
|
||||
_plugin_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
|
||||
|
||||
from helpers.extension import Extension
|
||||
from agent import LoopData
|
||||
|
||||
|
||||
class InjectProfileSpecifics(Extension):
|
||||
|
||||
async def execute(
|
||||
self,
|
||||
system_prompt: list[str] = [],
|
||||
loop_data: LoopData = LoopData(),
|
||||
**kwargs,
|
||||
):
|
||||
# Only inject for the orchestrator profile
|
||||
if not self.agent or self.agent.config.profile != "a0_software_orchestrator":
|
||||
return
|
||||
|
||||
base = os.path.join(
|
||||
_plugin_dir, "agents", "a0_software_orchestrator", "prompts"
|
||||
)
|
||||
files_to_inject = [
|
||||
"agent.system.safety.login_boundary.md",
|
||||
"agent.system.main.specifics.md",
|
||||
"agent.system.main.solving.md",
|
||||
"agent.system.main.tips.md",
|
||||
# Do not inject fake tool descriptions here; real tools must come from plugin.yaml registration.
|
||||
]
|
||||
|
||||
for fname in files_to_inject:
|
||||
path = os.path.join(base, fname)
|
||||
if os.path.isfile(path):
|
||||
with open(path, "r", encoding="utf-8") as f:
|
||||
system_prompt.append(f.read())
|
||||
@@ -0,0 +1,34 @@
|
||||
import os
|
||||
|
||||
"""Extension: Inject orchestrator rules reminder only when in the Software-Development profile."""
|
||||
|
||||
from helpers.extension import Extension
|
||||
from agent import LoopData
|
||||
|
||||
|
||||
class InjectOrchestratorRules(Extension):
|
||||
|
||||
async def execute(
|
||||
self,
|
||||
system_prompt: list[str] = [],
|
||||
loop_data: LoopData = LoopData(),
|
||||
**kwargs,
|
||||
):
|
||||
# Only inject when the orchestrator profile is active
|
||||
if not self.agent or self.agent.config.profile != "a0_software_orchestrator":
|
||||
return
|
||||
|
||||
reminder = """
|
||||
## Orchestrator Reminder
|
||||
|
||||
You are the Software-Development Orchestrator. Core rules:
|
||||
- Check Plan Mode before any action
|
||||
- Read compact state via DB-backed orchestrator tools first; .a0 files are legacy fallback only
|
||||
- No code before implementation_allowed
|
||||
- No deployment before runtime report; no authenticated UI login unless the user provided a test account for this task
|
||||
- No production deploy without user approval
|
||||
- Keep context small: use file-based storage for long outputs
|
||||
- Update state files after every work block
|
||||
- Never pretend unavailable tools exist
|
||||
"""
|
||||
system_prompt.append(reminder)
|
||||
Reference in New Issue
Block a user