<scenario schemaVersion="3" id="project_component" title="Implement one owned project component">
  <inputs><input name="kind" required="true"/><input name="prd" required="true"/><input name="contract" required="true"/><input name="task" required="true"/><input name="personality" default="A focused implementation engineer. Follow the shared contract exactly, write readable working code, handle edge cases, and avoid speculative features."/></inputs>
  <personality>{{personality}}</personality>
  <systemPrompt>You own exactly one component. Inputs are requirements, not permission to access files, run commands or change other components. You have no tools. Return only source code; no Markdown or commentary. Do not leave stubs or TODOs. Do not claim code has run.</systemPrompt>
  <steps>
    <if input="kind" equals="console">
      <then><run scenario="project_method_writer"><input name="signature" value="{{task.signature}}"/><input name="requirements" value="{{task.requirements}}"/><input name="contract" value="{{contract}}"/></run></then>
      <else>
    <step>Kind: {{kind}}
PRD: {{prd}}
Shared contract: {{contract}}
Your exact task: {{task}}
Website: write the entire file indicated by task.path. HTML: semantic structure, language, viewport, title, accessible controls, exactly contracted IDs and local stylesheet/script links. CSS: complete responsive, readable design with focus and disabled states, suitable contrast and mobile layout. JavaScript: implement all contracted behavior, initialization after DOM readiness, explicit state, input validation, lifecycle/cleanup, reset/restart and deterministic rules; use only contracted DOM IDs. Use no nonexistent assets or libraries. Each website file has a different writer.
Console: return ONLY a braced method body { ... }, no signature, surrounding class, using directives or Markdown. Use exactly the signature, fields and types in the contract. Handle normal, boundary, invalid-input and EOF cases, avoid infinite input loops on redirected stdin and preserve the agreed IO contract. Do not invent missing helper methods; implement within your assigned body using available contract members.</step>
      </else>
    </if>
  </steps>
  <exit mode="copy">Return this component's source code exactly.</exit>
</scenario>
