{"slug":"academy/computer_science/en/lesson/programming-constructs-control-flow","route":"/library/academy/computer_science/en/lesson/programming-constructs-control-flow","title":"From Plan to Program: Variables, Conditionals, and Loops","surface":"/library/academy/computer_science","audience":"academy","subject":"computer_science","locale":"en","source_repo":"koydo-app","source_path":"scripts/curriculum-authoring","route_source":"library_fallback","candidate_canonical_target_web":"/library/academy/computer_science/en/lesson/programming-constructs-control-flow","license":"ai-generated-koydo","attribution":null,"ai_provenance":{"model":"claude-opus-4-8","reviewed_at":"2026-06-24T19:15:45.452Z","reviewer_persona":"koydo-curriculum-expert-loop"},"provenance_blockers":["attribution_missing"],"content_types":["lesson","lesson_objectives","media_scene","drill","practice_set","quiz","feedback","character","citation","concept_map","progress","resume","review","remediation","next_step_path"],"normalized_content_types":["character","citation","concept_map","drill","feedback","lesson","media","next_step","practice_set","progress","quiz","remediation","resume","review"],"lesson_roles":["concept","guided_practice","knowledge_check","progress_summary","remediation","review"],"primary_lesson_role":"concept","objectives":["Identify the four core programming constructs — variables, sequencing, selection, and iteration — and distinguish variables as a data building block from the three control-flow constructs.","Translate a plain-language algorithm into ordered pseudocode steps.","Apply an if/else conditional to choose between two outcomes based on a condition.","Construct a loop that repeats a step a controlled number of times without running forever.","Trace control flow through a short program to predict its output."],"activity_prompt":"Put these pseudocode steps in the correct order to count up and announce the result","assessment_count":4,"assessment_shape":{"objective_count":5,"activity_present":true,"activity_prompt_present":true,"quiz_item_count":4,"quiz_items_with_answer_key":4,"quiz_items_with_explanation":4,"reward_present":true},"completion_criteria":["Review objectives and instruction","Complete the activity with manual learner confirmation","Answer every understanding-check item","Show completion feedback and reward only after the learner finishes the check"],"route_health":{"route":"/library/academy/computer_science/en/lesson/programming-constructs-control-flow","route_source":"library_fallback","candidate_canonical_target_web":"/library/academy/computer_science/en/lesson/programming-constructs-control-flow","local_route_resolvable":true,"sequence_links_resolvable":true,"owner_canonical_review_required":true,"canonical_route_write_allowed":false,"production_discoverability_evidence_present":false,"production_discoverability_claim_allowed":false,"evidence_scope":"Local route syntax and previous/next link check only; owner canonical-route review and production crawl/index evidence are still required before discoverability claims."},"context_route":"/api/library/ai-help-context?slug=academy%2Fcomputer_science%2Fen%2Flesson%2Fprogramming-constructs-control-flow","grounding":["registry:academy/computer_science/en/lesson/programming-constructs-control-flow","source:koydo-app/scripts/curriculum-authoring","sha1:77112c7484b6a42e291abd55e288f15e22f8c315","title:From Plan to Program: Variables, Conditionals, and Loops","concept:Translating algorithms into working code using variables, sequencing, selection (conditionals), and iteration (loops) — four core programming constructs where variables are a data building block and sequencing/selection/iteration are control-flow building blocks.","concept:CSTA 3A-AP-14"],"privacy":["Do not send raw child free text without consent","Use source excerpts and non-identifying progress state only","Asset is not registry-gated"],"age_guardrails":["Adapt tone and examples for the academy audience.","Do not request sensitive personal data; use non-identifying learner progress only.","Keep help available only for this active, ungated asset context."],"measurement":["Log AI help usage by surface and asset slug","Evaluate answer quality against source-grounded rubric before production-readiness claims","Tie remediation prompts to completion, retry, or review outcomes"],"enabled":true,"blocked_reason":null,"tutor_prompt":"You are the KOYDO lesson tutor for this asset. Answer only from the source-grounded context listed in grounding, objectives, activity_prompt, and completion_criteria. When the source context is missing or ambiguous, say what evidence is missing instead of guessing. Do not request personal data, raw child free text, payment details, or consent decisions. Adapt explanations to the audience age tier and preserve KOYDO curriculum intent, citations, accessibility, and safety guardrails. Tie help to the learning loop: prerequisite review, current step, retry, completion feedback, remediation, review, or next route. Use assessment_shape, route_health, progress_policy, production_gate_policy, ai_eval_partnership, and real_ai_eval_evidence only as local deterministic constraints; do not treat them as production telemetry, mastery, discoverability, launch, release, or model-eval evidence. Do not claim production readiness from fixture-only, synthetic, or unevaluated evidence.","previous_route":"/library/academy/computer_science/en/lesson/data-representation-binary-and-encoding","next_route":"/library/academy/computer_science/en/lesson/abstraction-layers","progress_policy":{"resume_route":"/library/academy/computer_science/en/lesson/programming-constructs-control-flow","review_route":"/library/academy/computer_science/en/lesson/data-representation-binary-and-encoding","remediation_route":"/library/academy/computer_science/en/lesson/data-representation-binary-and-encoding","next_step_route":"/library/academy/computer_science/en/lesson/abstraction-layers","advance_policy":"manual","auto_advance_allowed":false,"completion_feedback":"Review objectives and instruction","evidence_scope":"Content-map contract only; persistence and production learner-progress writes require route/API evidence.","production_progress_telemetry_evidence_present":false,"production_assessment_telemetry_evidence_present":false,"readiness_claim_allowed":false},"production_gate_policy":{"manual_advance_required":true,"auto_advance_allowed":false,"owner_canonical_review_required":true,"owner_rights_review_required":true,"child_guardian_review_required":false,"real_ai_eval_evidence_present":false,"production_telemetry_evidence_present":false,"release_or_deploy_allowed":false,"payment_or_domain_change_allowed":false,"production_readiness_claim_allowed":false,"blocked_claims":["production_readiness_claim","release_or_deploy","payment_or_domain_change","production_telemetry_claim","real_ai_eval_claim","canonical_route_write","publication_or_ai_rights_readiness"],"evidence_scope":"AI-help production gates only; local source context, route checks, progress policy, and assessment shape do not authorize production readiness, release, deploy, payment, domain, telemetry, canonical-route, rights, child-AI, or model-quality claims."},"remediation_policy":["If the learner is stuck, explain the next smallest step from the cited source context.","If the learner misses an assessment item, route the response to retry, review, or prerequisite remediation.","Manual learner action is required before completion, next-route movement, payment, consent, media, or assessment outcomes."],"ai_eval_partnership":{"source_grounded_context_ready":true,"learning_loop_context_ready":true,"local_evidence_ready":true,"local_contract_evidence_ready":true,"supporting_contract_keys":["ai_context_payload_readiness_summary","child_privacy_guardian_evidence_contract_readiness_summary","real_ai_eval_evidence_contract_readiness_summary","source_safety_readiness_summary"],"evaluation_dataset_required":true,"human_review_required":true,"privacy_review_required":true,"age_safety_review_required":false,"partner_or_owner_eval_required_before_production":true,"production_readiness_claim_allowed":false,"blockers":["owner_canonical_review_required","publication_or_ai_rights_review_required","real_ai_eval_required_before_production_readiness_claim"],"evidence_scope":"Local AI-help payload readiness only; partner or owner evaluation, privacy review, age-safety review, and real model-quality evidence are still required before production tutor claims."},"real_ai_eval_evidence":{"real_eval_evidence_present":false,"local_or_fixture_evidence_only":true,"required_before_claims":true,"required_evidence":["Named eval dataset covering source-grounding, refusal, remediation, age-safety, and assessment-help cases","Human-reviewed model outputs tied to KOYDO lesson sources and learning-loop outcomes","Privacy and child-safety review evidence for any child-audience AI handoff","Production telemetry evidence before any claim about live tutor quality or learner impact"],"measured_outcomes":[],"blocked_claims":["production_readiness_claim","real_ai_eval_claim","model_quality_claim","learner_mastery_impact_claim"],"claims_allowed":{"production_readiness":false,"real_ai_eval":false,"model_quality":false,"learner_mastery_impact":false},"supporting_contract_keys":["learning_telemetry_evidence_contract_readiness_summary","production_evidence_contract_readiness_summary","real_ai_eval_evidence_contract_readiness_summary"],"production_readiness_claim_allowed":false,"evidence_scope":"No real AI eval evidence is present in this local registry context; fixture, source-map, and deterministic contract checks cannot prove model quality or production readiness."},"production_readiness_claim":"This is a source-grounded AI help context handoff, not evidence that production AI tutoring is ready without real eval results."}