Recipes: building with an AI helper¶
Step-by-step plans for common jobs. Officers can paste the Ask line into their helper; helpers can follow the Steps.
Set up a new group¶
Ask: "Set up our group for a cozy farming-games crowd: welcome, rules, a look, and a few fun bots."
Steps (the officer first makes the community in the app and picks a starter kit: channels and roles come from it):
get_community: its name, channels and what its design may use.reference("design", "welcome"), thenset_designwithwelcome { show, title, words, rules }andaccent,font.effect(snow, petals, fireflies, leaves, stars, bubbles, confetti) and a wallpaper (upload_link, then its hash in the design).rankswith the group's own names, colours and badges.- Scripts: write a greeter or a
!command,try_scriptonjoinorcommand, thensave_script.
Open a community store¶
Ask: "Make us a store for horror games: shelves, labels, a page."
Steps (the officer first makes it a store: Start selling…, or picks Store when making it):
get_community,get_store.search_games("horror"), and more words, to find games.set_designwithlabels(for example Jump scares, Slow burn, Co-op) andrating(paws, stars, hearts, stamps, numbers).save_shelffor each shelf (up to 20, 40 games each), with a style.mark_gamewith labels and a score for the best ones.- Write the page (below).
Note
A community store never picks its own officers' games.
Write the store's page¶
reference("page")for the seal and theGCbridge.list_files: what's there, the limits.write_file("index.html", …)(the Home channel's front) andwrite_file("store.html", …)(the Store channel), and their CSS and JavaScript files. Read the store withGC.store()andGC.games(); open games withGC.open(ident).- Pictures and fonts:
upload_link(page: "img/hero.webp"), thencurl -T. - Change files with
edit_file. publish_pageonce the officer is happy.
A ready-made site (React, Vue, Svelte, anything): build it, zip the built folder, upload_link(page: "/"), curl -T
the zip, then publish_page.
Style the channels¶
Ask: "Make our chat look like a neon arcade."
reference("channels"): the classes and rules.set_design({ channelsCss: "…" }), orchannelsCssAppendfor small additions.- Later changes with
edit_text("channelsCss", old, new).
A season or a sale takeover¶
reference("design", "seasons").set_design({ seasons: [...] }): from and to asMM-DD, with the season's accent, effect or scene. A one-off takeover for a sale lasts up to 60 days.
A points game with a scoreboard¶
Ask: "Give members a point for each message and show the top ten on our page."
- Script:
on('message', …)withmemberData.add(e.member.id, 'points', 1), andcommand('top', …)withmemberData.top('points', 10). - Keep the top ten in
data.set('public.top', …)so the page can read it, andlive('top', …)to update open pages. try_scriptonmessageandcommand, thensave_script.- On the page:
GC.data("public.top")to draw it,GC.on("top", …)to update it.
A widget activity for voice¶
reference("widgets").- Write the widget's HTML; use
GC.room(name)to share the game's state andGC.showfor GC's own pieces. - Mark it an Activity in Design, with how many players.
A live card¶
- A script with
cards.set('board', { type: 'AdaptiveCard', version: '1.6', body: [...], actions: [...] }). post('general', 'Tonight', { card: 'board' })once;cards.setagain later changes every message showing it.widget(verb)handles itsAction.Executebuttons.
Check before you finish¶
get_script(name, runs): the last runs, their errors.list_files: does the draft differ from what shows? Publish it.get_design: is what the cleaner left out what you meant?