rairo commited on
Commit
ebf3a85
·
verified ·
1 Parent(s): b2b867c

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +27 -23
main.py CHANGED
@@ -477,29 +477,33 @@ def generate_trial():
477
  context = layer_data.get('text', '')
478
 
479
  trial_prompt = f"""
480
- You are 'Athena's Master Instrumentalist'.
481
- Subject: {subject}. Layer: {layer_key}. Context: {context}
482
-
483
- TASK: Design a bespoke, interactive React component named 'Instrument'.
484
- This is NOT a simulation to watch. It is a TACTILE EXPERIMENT.
485
-
486
- RULES FOR THE CODE:
487
- 1. THE VERB: Identify the core action (e.g. 'Pivoting the Valve', 'Saturating the Membrane').
488
- 2. ENTROPY: The system must fail/decay if the user does nothing (e.g. pressure leaks, energy fades).
489
- 3. INTERACTION: The user MUST use their mouse/touch to directly manipulate the physics.
490
- 4. PHYSICS: Use Matter.js for 'Physical Weight' or direct SVG manipulation.
491
- 5. STYLE: Cosmic Academic. Dark #0B1120 background, Gold #D4AF37 strokes. High contrast.
492
- 6. WIN: When a 'Scientific Equilibrium' is held for 3 seconds, show a 'Revelation Confirmed' button.
493
-
494
- JSON SCHEMA:
495
- {{
496
- "engine": {{"name": "odysseus", "version": "v10"}},
497
- "instrument_name": "Name of the experiment",
498
- "mission_brief": "Active Socratic command (e.g. 'Counteract the torque to find the lift threshold.')",
499
- "component_code": "FULL_REACT_CODE_STRING",
500
- "feynman_truth": "The profound law discovered through play."
501
- }}
502
- """
 
 
 
 
503
 
504
  res = client.models.generate_content(
505
  model=ATHENA_FLASH,
 
477
  context = layer_data.get('text', '')
478
 
479
  trial_prompt = f"""
480
+ You are 'Athena's Master Instrumentalist'.
481
+ Subject: {subject}. Layer: {layer_key}. Context: {context}
482
+
483
+ TASK: Forge a bespoke, interactive React component named 'Instrument'.
484
+ This is a TACTILE EXPERIMENT that communicates with the Odysseus Workbench.
485
+
486
+ MANDATORY PROPS INTERFACE:
487
+ - The component receives: `{{ onAction, onWin }}`.
488
+ - `onAction()`: You MUST call this the instant the user interacts (clicks/drags/keys).
489
+ - `onWin()`: You MUST call this when the seeker achieves the scientific goal.
490
+
491
+ RULES FOR THE CODE:
492
+ 1. DESIGN: Create a high-contrast lab environment (Dark #0B1120, Gold #D4AF37).
493
+ 2. PHYSICS: Use Matter.js for weight and tension.
494
+ 3. INTERACTION: Design a specific interaction (e.g. 'Stitching the DNA', 'Managing the Fuel flow').
495
+ 4. ENTROPY: The system must have a decay factor. If the user doesn't call `onAction()`, show visual failure.
496
+ 5. NO WRAPPERS: Return only the component code. Use React hooks.
497
+
498
+ JSON SCHEMA:
499
+ {{
500
+ "engine": "odysseus_v10",
501
+ "instrument_name": "Unique Title",
502
+ "mission_brief": "Feynman-style objective.",
503
+ "component_code": "const Instrument = ({{ onAction, onWin }}) => {{ ... }}; export default Instrument;",
504
+ "feynman_truth": "The law proven by this instrument."
505
+ }}
506
+ """
507
 
508
  res = client.models.generate_content(
509
  model=ATHENA_FLASH,