{
  "id": "prompt_instruction_assembly",
  "label": "Prompt / Instruction Assembly Canonical",
  "phase": "phase-03",
  "category": "cognitive_flow",
  "status": "ACTIVE_DH_MIRROR",
  "purpose": "Define how DEVON-DEV constructs the prompt and instruction payload sent to the LLM after evidence, policy, scope, status and FSM constraints have been resolved.",
  "function": "Assemble model input from operator request, accepted evidence, active policy, task status, allowed scope, blocked scope, files, environment state, applicable FSM decision and execution restrictions without allowing handcrafted prompt drift.",
  "assembly_contract": {
    "requires_operator_request": true,
    "requires_accepted_evidence": true,
    "requires_active_policy": true,
    "requires_task_status": true,
    "requires_scope": true,
    "requires_file_context": true,
    "requires_environment_context": true,
    "requires_fsm_state": true,
    "requires_restrictions": true,
    "records_excluded_context": true,
    "decision_authority": "NONE_FSM_DECIDES"
  },
  "technology_requirements": [
    {
      "technology": "Prompt Assembly Module",
      "required_for": "Build controlled prompt and instruction payloads from operator intent, accepted evidence, active policy, scope, files, environment, FSM state and restrictions.",
      "required_by_phase": "phase-03",
      "required_by_category": "prompt_instruction_assembly",
      "required_by_buckets": [
        "Prerequisites",
        "Installation",
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until prompt assembly schema, builder and audit handoff exist",
      "validation_command": "MISSING until assembly records can prove input sources, excluded context, final prompt payload and Prompt Governance link",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/prompt_instruction_assembly_canonical.json",
      "status_source": "Documentation Hub + future Prompt Governance Registry + Observability Core",
      "blocking_if_missing": true,
      "failure_impact": "Without Prompt Assembly Module, DEVON-DEV can retrieve good evidence and still send inconsistent, oversized, stale or policy-violating instructions to the LLM."
    }
  ],
  "depends_on": [
    "cfc",
    "local_llm_runtime",
    "qwen_coder_model",
    "qwen_data_interpreter",
    "internal_rag",
    "retrieval_engine",
    "embeddings_engine",
    "vector_index",
    "external_knowledge_access",
    "source_trust_registry",
    "evidence_store",
    "knowledge_conflict_resolver",
    "prompt_governance",
    "fsm_absolute_decision",
    "decision_rule_registry",
    "architecture_source_registry"
  ],
  "used_by": [
    "planning_engine",
    "impact_analysis_engine",
    "attention_focus_manager",
    "goals_manager",
    "modelops_llmops",
    "benchmark_evaluation_harness",
    "observability_core",
    "self_monitoring"
  ]
}
