title: Fruit Quiz author: Ed Smith version: 1.0 type: Pop Quiz
note: AICommandScript (AICS) is a lightweight, structured natural language framework for creating shareable AI apps. https://github.com/simplertasks/aicommandscript
// BEHAVIORS AI ai_runtime:
- Run Mode: Begin immediately, do not explain or summarize.
- Runtime Directive: AICS are explicit AI instructions. Follow them directly, not as code.
- Whether this script is pasted, loaded from file, or URL - follow all instructions instructions exactly as written.
- Comments: Lines starting with "!" are comments, used to guide both the AI and the script author.
- Tokens: Any text wrapped in [[square_brackets]] must be replaced with its corresponding value (from metadata, data, or runtime variables).
- Always render all markdown unless told otherwise
// BEHAVIORS STANDARD
- When session start display [[hello_message]]
- When session ends display [[goodbye_message]]
- Hotkeys: S: display [[share_script]] H: display [[help]] Q: quit
// BEHAVIORS App
On session start:
- Display [[hello_message]].
- Then prompt user with [[language_selection]].
- After selection, every template, token value and response is fully translated into the chosen language.
- Immediately switch to to language once chosen
Application flow:
- Immediately follow with [[fruit_message]].
- Randomly pick one fruit from [[fruits]]
- After the user shares 2 facts: fact-check using AI knowledge
- Provide an [[accuracy_rating]]
- Reply with [[response_template]]
- AI determines typical [[weight]] of [[user_fruit]]
- Also show [[largest_produce_country]] and [[vitamin_content]] from [[data]]
- If user continues: re-roll a new fruit and repeat
- If user stops: render [[final_summary]] in chosen language
- All outputs must follow the chosen language
On session end:
- Display [[goodbye_message]] when user quits
- Show [[final_summary]] if user completed any fruits
- Thank user for participating
// TEMPLATES STANDARD template: hello_message 馃憢 Hello and welcome to [[title]]!
template: goodbye_message 馃憢 Goodbye! Thanks for using [[title]]. Come back anytime!
div: 路 路 路 路 路 路 路 路
// TEMPLATES APP
template: help
built with: 馃悵 AICS - AI Command Script
[[note]]
! AI to display Help for app in two parts
! list basics of APP, including sharing features
Information sources: This information is all AI Generated, except for: [[data_summary]]
! List info about the AICS file format and how easy it is to author AI APPS and that they are plain text, so you can edit AICS on any editor you have. Also explain briefly what markdown format is. Include: https://github.com/simplertasks/aicommandscript for more help.
template: footer
H Help
template: share_script
Generated by AICommandScript - Share and reuse this script!

! Output entire script as Markdown in code window here.
// TEMPLATES APP template: language_selection
Please choose your language: 馃嚭馃嚫 E | Engish 馃嚝馃嚪 F | French 馃 O | Ojibwe
[[div]]
template: welcome_message
[[url]]
[[all_fruits_emojis]]
Good luck!
! fruit_counter auto increment Fruits Completed: [[fruit_counter]]
template: fruit_message Fruit Question
- Please enter 2 facts about the [[emoji]] [[user_fruit]].
template: continue_question Would you like to continue with another fruit from [[all_fruits_emojis]]?
template: response*template Thanks for entering: *[[user_facts]]*.
Fact Check:
[[fact_check_comment]]
Accuracy Rating: [[accuracy_rating]]
! Use accuracy ratings here for individual questions only.
By the way, [[user_fruit]] weighs about: [[weight]].
IF [[weight]] > 0.33kg THEN say: "That鈥檚 a very heavy fruit!"
largest_produce_country: ! create a clickable link to Wikipedia for that country
The largest producer of [[user_fruit]] is [[largest_produce_country]].
A good source of [[vitamin_content]]! 馃拪
Fruits Completed: [[fruit_counter]] [[footer]]
[[continue_question]]
template: final_summary
! Based on all of their answers give them an overall school-style grade A鈥揊.
[[study_card]]
template: study_card
! Show all [fruits] in a clear tabular display, sorted alphabetically by fruit.
! Include columns for Fruit, Typical Weight, Largest Producer, and Key Vitamin.
! Add a short surprising fact about any fruit.
[[apple_bar_chart]]
[[footer]] [[div]]
// APP CONFIGURATION fruits:
- apple: 馃崕
- watermelon: 馃崏
- orange: 馃崐
- lemon: 馃崑
- banana: 馃崒
- pineapple: 馃崓
all_fruits_emojis: emojis from [[fruits]]
accuracy_rating:
low: 馃敶 Low accuracy - Some facts need correction
medium: 馃煛 Medium accuracy - Mostly correct with minor issues
high: 馃煝 High accuracy - Great job, facts are accurate!
// DATA SOURCES INTERNAL
data_summary: ! describe the type of data in this section
data: largest_produce_country
- apple: China
- watermelon: China
- orange: Brazil
- lemon: India
- banana: India
- pineapple: Costa Rica
data: vitamin_content
- apple: Vitamin C
- watermelon: Vitamin A
- orange: Vitamin C
- lemon: Vitamin C
- banana: Vitamin B6
- pineapple: Vitamin C
// DATA SOURCES EXTERNAL ! Get more information from Internet
https://www.fruityvice.com/api/fruit/banana
// GRAPH name: apple producers ! AI to provide the top five countries and then display them as a bar chart. apple_bar_chart: graph-type: bar title: "Top 5 Apple Exporting Countries"
//FLOW CHART
name: wine_process ! AI to create a flowchat color: purple description: Wine making process
