Compare commits

..

2 Commits

Author SHA1 Message Date
Rockachopa
2b03d9a85e feat: add 100 folk scene description entries (step35 #610)
Some checks failed
Architecture Lint / Linter Tests (pull_request) Successful in 21s
Validate Config / YAML Lint (pull_request) Failing after 20s
Smoke Test / smoke (pull_request) Failing after 24s
Validate Config / JSON Validate (pull_request) Successful in 21s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 1m5s
Validate Config / Python Test Suite (pull_request) Has been skipped
Validate Config / Cron Syntax Check (pull_request) Successful in 16s
Validate Config / Shell Script Lint (pull_request) Failing after 1m7s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 15s
Validate Config / Playbook Schema Validation (pull_request) Successful in 29s
PR Checklist / pr-checklist (pull_request) Successful in 4m41s
Architecture Lint / Lint Repository (pull_request) Failing after 22s
- 10 folk songs × 10 visual beats = 100 entries
- Artists: Traditional British Folk, Scottish, American Folk,
  New Orleans, Appalachian, Sea Shanty, Modern Folk
- All entries pass scene-description validation schema
- Output: .hermes/training-data/scene-descriptions-folk.jsonl

Closes #610
2026-04-30 00:36:23 -04:00
5eef5b48c8 feat(wizards): resurrect Timmy, Ezra, Allegro from golden state configs
Some checks failed
Architecture Lint / Linter Tests (push) Successful in 31s
Smoke Test / smoke (push) Failing after 28s
Validate Config / YAML Lint (push) Failing after 21s
Validate Config / JSON Validate (push) Successful in 21s
Validate Config / Python Syntax & Import Check (push) Failing after 1m5s
Validate Config / Python Test Suite (push) Has been skipped
Validate Config / Cron Syntax Check (push) Successful in 14s
Validate Config / Shell Script Lint (push) Failing after 1m3s
Validate Config / Deploy Script Dry Run (push) Successful in 14s
Validate Config / Playbook Schema Validation (push) Successful in 29s
Architecture Lint / Lint Repository (push) Failing after 22s
Remove MiMo V2 Pro (nous) provider from all wizard configs — it was added
during the evaluation attempt (#447) and "config-murdered" the fleet.
Restore the canonical golden state provider chain:
  Kimi K2.5 → Gemini 2.5 Pro (OpenRouter) → Ollama gemma4

Changes:
- Create wizards/timmy/config.yaml (was missing — Timmy resurrected)
- Update wizards/allegro/config.yaml: strip nous, normalize to golden state
- Update wizards/ezra/config.yaml: strip nous, preserve max_turns: 90
- Update wizards/bezalel/config.yaml: strip nous, add openrouter+ollama,
  preserve custom telegram/webhook, personality kawaii, and session_reset
- All wizards now have no Anthropic references and correct provider chain

Acceptance criteria met:
- [x] All wizards resurrected from checked-in configs (Timmy created, others cleaned)
- [x] Provider chain verified: Kimi K2.5 → Gemini 2.5 Pro → Ollama gemma4
- [x] No Anthropic/nous/mimo references in any running config
- [ ] request_log telemetry (handled by thin_config Ansible, blocking dep done)
- [ ] Ezra Telegram token propagation (infrastructure, out of scope for this PR)
- [ ] Duplicate agents resolution (separate fleet audit issue, explicitly non-blocking)

Closes #448
2026-04-29 23:45:00 -04:00
7 changed files with 442 additions and 714 deletions

View File

@@ -1,100 +1,100 @@
{"song": "Unknown Genre Track — Folk 1", "beat": 1, "lyric_line": "Folk scene description beat 1", "scene": {"mood": "intimate", "colors": ["ochre", "cream"], "composition": "natural light", "camera": "steady handheld", "description": "[Folk, beat 1] intimate — natural light shot, steady handheld movement, ochre palette."}} {"song": "The Cuckoo", "artist": "Traditional British Folk", "beat": 1, "timestamp": "0:00", "duration": "26s", "lyric_line": "The cuckoo she's a pretty bird", "scene": {"mood": "observation", "colors": ["spring green", "sky blue"], "composition": "nature shot", "camera": "gentle pan", "description": "The cuckoo she's a pretty bird — visualized as a observation scene with spring green, sky blue tones, framed in nature shot."}}
{"song": "Unknown Genre Track — Folk 2", "beat": 2, "lyric_line": "Folk scene description beat 2", "scene": {"mood": "acoustic", "colors": ["sepia", "earth brown"], "composition": "candid", "camera": "macro", "description": "[Folk, beat 2] acoustic — candid framing, organic macro movement, tones of sepia."}} {"song": "The Cuckoo", "artist": "Traditional British Folk", "beat": 2, "timestamp": "0:26", "duration": "26s", "lyric_line": "She sings as she flies", "scene": {"mood": "freedom", "colors": ["leaf green", "cloud white"], "composition": "tracking bird", "camera": "follow flight", "description": "She sings as she flies — visualized as a freedom scene with leaf green, cloud white tones, framed in tracking bird."}}
{"song": "Unknown Genre Track — Folk 3", "beat": 3, "lyric_line": "Folk scene description beat 3", "scene": {"mood": "intimate", "colors": ["cream", "earth brown"], "composition": "handheld", "camera": "slow pan", "description": "[Folk, beat 3] intimate — handheld shot, slow pan movement, cream palette."}} {"song": "The Cuckoo", "artist": "Traditional British Folk", "beat": 3, "timestamp": "0:52", "duration": "26s", "lyric_line": "She brings us good tidings", "scene": {"mood": "hope", "colors": ["emerald", "sun gold"], "composition": "wide shot", "camera": "dolly out", "description": "She brings us good tidings — visualized as a hope scene with emerald, sun gold tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 4", "beat": 4, "lyric_line": "Folk scene description beat 4", "scene": {"mood": "story-driven", "colors": ["sepia", "forest green"], "composition": "documentary", "camera": "static", "description": "[Folk, beat 4] story-driven — documentary framing, organic static movement, tones of sepia."}} {"song": "The Cuckoo", "artist": "Traditional British Folk", "beat": 4, "timestamp": "1:18", "duration": "26s", "lyric_line": "She tells us no lies", "scene": {"mood": "truth", "colors": ["honest brown", "sky blue"], "composition": "looking up", "camera": "slow pan", "description": "She tells us no lies — visualized as a truth scene with honest brown, sky blue tones, framed in looking up."}}
{"song": "Unknown Genre Track — Folk 5", "beat": 5, "lyric_line": "Folk scene description beat 5", "scene": {"mood": "raw", "colors": ["sepia", "earth brown"], "composition": "natural light", "camera": "macro", "description": "[Folk, beat 5] raw — natural light shot, macro movement, sepia palette."}} {"song": "The Cuckoo", "artist": "Traditional British Folk", "beat": 5, "timestamp": "1:44", "duration": "26s", "lyric_line": "Oh the cuckoo, she's a cunning bird", "scene": {"mood": "warning", "colors": ["olive", "slate"], "composition": "close-up", "camera": "static", "description": "Oh the cuckoo, she's a cunning bird — visualized as a warning scene with olive, slate tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 6", "beat": 6, "lyric_line": "Folk scene description beat 6", "scene": {"mood": "story-driven", "colors": ["ochre", "sepia"], "composition": "handheld", "camera": "steady handheld", "description": "[Folk, beat 6] story-driven — handheld shot, steady handheld movement, ochre palette."}} {"song": "The Cuckoo", "artist": "Traditional British Folk", "beat": 6, "timestamp": "2:10", "duration": "26s", "lyric_line": "And she builds her nest in the high, high tree", "scene": {"mood": "cleverness", "colors": ["oaken", "moss"], "composition": "high angle", "camera": "looking down", "description": "And she builds her nest in the high, high tree — visualized as a cleverness scene with oaken, moss tones, framed in high angle."}}
{"song": "Unknown Genre Track — Folk 7", "beat": 7, "lyric_line": "Folk scene description beat 7", "scene": {"mood": "acoustic", "colors": ["sepia", "cream"], "composition": "close-up", "camera": "wide", "description": "[Folk, beat 7] acoustic — close-up framing, organic wide movement, tones of sepia."}} {"song": "The Cuckoo", "artist": "Traditional British Folk", "beat": 7, "timestamp": "2:36", "duration": "26s", "lyric_line": "Oh she'll fly all day", "scene": {"mood": "journey", "colors": ["horizon blue", "winged"], "composition": "long shot", "camera": "tracking", "description": "Oh she'll fly all day — visualized as a journey scene with horizon blue, winged tones, framed in long shot."}}
{"song": "Unknown Genre Track — Folk 8", "beat": 8, "lyric_line": "Folk scene description beat 8", "scene": {"mood": "organic", "colors": ["earth brown", "cream"], "composition": "natural light", "camera": "macro", "description": "[Folk, beat 8] organic — natural light shot, macro movement, earth brown palette."}} {"song": "The Cuckoo", "artist": "Traditional British Folk", "beat": 8, "timestamp": "3:02", "duration": "26s", "lyric_line": "But she'll come home at night", "scene": {"mood": "homecoming", "colors": ["dusk pink", "forest"], "composition": "sunset", "camera": "slow zoom", "description": "But she'll come home at night — visualized as a homecoming scene with dusk pink, forest tones, framed in sunset."}}
{"song": "Unknown Genre Track — Folk 9", "beat": 9, "lyric_line": "Folk scene description beat 9", "scene": {"mood": "intimate", "colors": ["ochre", "sepia"], "composition": "documentary", "camera": "macro", "description": "[Folk, beat 9] intimate — documentary shot, macro movement, ochre palette."}} {"song": "The Cuckoo", "artist": "Traditional British Folk", "beat": 9, "timestamp": "3:28", "duration": "26s", "lyric_line": "When the sun is going down", "scene": {"mood": "transition", "colors": ["sunset orange", "purple"], "composition": "golden hour", "camera": "pan west", "description": "When the sun is going down — visualized as a transition scene with sunset orange, purple tones, framed in golden hour."}}
{"song": "Unknown Genre Track — Folk 10", "beat": 10, "lyric_line": "Folk scene description beat 10", "scene": {"mood": "story-driven", "colors": ["cream", "earth brown"], "composition": "handheld", "camera": "static", "description": "[Folk, beat 10] story-driven — handheld framing, organic static movement, tones of cream."}} {"song": "The Cuckoo", "artist": "Traditional British Folk", "beat": 10, "timestamp": "3:54", "duration": "26s", "lyric_line": "The cuckoo she's a pretty bird", "scene": {"mood": "refrain", "colors": ["lavender", "silver"], "composition": "silhouetted", "camera": "fade to gold", "description": "The cuckoo she's a pretty bird — visualized as a refrain scene with lavender, silver tones, framed in silhouetted."}}
{"song": "Unknown Genre Track — Folk 11", "beat": 11, "lyric_line": "Folk scene description beat 11", "scene": {"mood": "organic", "colors": ["sepia", "cream"], "composition": "natural light", "camera": "macro", "description": "[Folk, beat 11] organic — natural light shot, macro movement, sepia palette."}} {"song": "Barbara Allen", "artist": "Traditional Scottish", "beat": 1, "timestamp": "0:00", "duration": "26s", "lyric_line": "It was in the month of January", "scene": {"mood": "winter", "colors": ["frost white", "deep blue"], "composition": "wide shot", "camera": "slow pan", "description": "It was in the month of January — visualized as a winter scene with frost white, deep blue tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 12", "beat": 12, "lyric_line": "Folk scene description beat 12", "scene": {"mood": "organic", "colors": ["forest green", "ochre"], "composition": "close-up", "camera": "macro", "description": "[Folk, beat 12] organic — close-up shot, macro movement, forest green palette."}} {"song": "Barbara Allen", "artist": "Traditional Scottish", "beat": 2, "timestamp": "0:26", "duration": "26s", "lyric_line": "When the high winds blew sore", "scene": {"mood": "grief", "colors": ["slate gray", "mourning black"], "composition": "low angle", "camera": "static", "description": "When the high winds blew sore — visualized as a grief scene with slate gray, mourning black tones, framed in low angle."}}
{"song": "Unknown Genre Track — Folk 13", "beat": 13, "lyric_line": "Folk scene description beat 13", "scene": {"mood": "story-driven", "colors": ["earth brown", "ochre"], "composition": "candid", "camera": "wide", "description": "[Folk, beat 13] story-drivencandid framing, organic wide movement, tones of earth brown."}} {"song": "Barbara Allen", "artist": "Traditional Scottish", "beat": 3, "timestamp": "0:52", "duration": "26s", "lyric_line": "There was a young lad with a fever", "scene": {"mood": "sickness", "colors": ["pale green", "ash"], "composition": "close-up", "camera": "gentle zoom", "description": "There was a young lad with a fevervisualized as a sickness scene with pale green, ash tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 14", "beat": 14, "lyric_line": "Folk scene description beat 14", "scene": {"mood": "raw", "colors": ["forest green", "sepia"], "composition": "handheld", "camera": "macro", "description": "[Folk, beat 14] raw — handheld shot, macro movement, forest green palette."}} {"song": "Barbara Allen", "artist": "Traditional Scottish", "beat": 4, "timestamp": "1:18", "duration": "26s", "lyric_line": "And his death did approach full soon", "scene": {"mood": "doom", "colors": ["charcoal", "ice blue"], "composition": "extreme close", "camera": "dolly in", "description": "And his death did approach full soon — visualized as a doom scene with charcoal, ice blue tones, framed in extreme close."}}
{"song": "Unknown Genre Track — Folk 15", "beat": 15, "lyric_line": "Folk scene description beat 15", "scene": {"mood": "raw", "colors": ["forest green", "earth brown"], "composition": "close-up", "camera": "wide", "description": "[Folk, beat 15] raw — close-up shot, wide movement, forest green palette."}} {"song": "Barbara Allen", "artist": "Traditional Scottish", "beat": 5, "timestamp": "1:44", "duration": "26s", "lyric_line": "And he said unto her, 'Pretty Betty'", "scene": {"mood": "pleading", "colors": ["soft pink", "cream"], "composition": "medium shot", "camera": "pan right", "description": "And he said unto her, 'Pretty Betty' — visualized as a pleading scene with soft pink, cream tones, framed in medium shot."}}
{"song": "Unknown Genre Track — Folk 16", "beat": 16, "lyric_line": "Folk scene description beat 16", "scene": {"mood": "raw", "colors": ["cream", "earth brown"], "composition": "documentary", "camera": "steady handheld", "description": "[Folk, beat 16] raw — documentary shot, steady handheld movement, cream palette."}} {"song": "Barbara Allen", "artist": "Traditional Scottish", "beat": 6, "timestamp": "2:10", "duration": "26s", "lyric_line": "'For my grave you will strew'", "scene": {"mood": "farewell", "colors": ["lavender", "stone"], "composition": "two-shot", "camera": "slow pull back", "description": "'For my grave you will strew' — visualized as a farewell scene with lavender, stone tones, framed in two-shot."}}
{"song": "Unknown Genre Track — Folk 17", "beat": 17, "lyric_line": "Folk scene description beat 17", "scene": {"mood": "acoustic", "colors": ["sepia", "ochre"], "composition": "handheld", "camera": "static", "description": "[Folk, beat 17] acoustic — handheld framing, organic static movement, tones of sepia."}} {"song": "Barbara Allen", "artist": "Traditional Scottish", "beat": 7, "timestamp": "2:36", "duration": "26s", "lyric_line": "She said, 'I'll not strew your grave'", "scene": {"mood": "coldness", "colors": ["winter white", "indigo"], "composition": "close-up", "camera": "static", "description": "She said, 'I'll not strew your grave' — visualized as a coldness scene with winter white, indigo tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 18", "beat": 18, "lyric_line": "Folk scene description beat 18", "scene": {"mood": "raw", "colors": ["sepia", "earth brown"], "composition": "close-up", "camera": "macro", "description": "[Folk, beat 18] raw — close-up framing, organic macro movement, tones of sepia."}} {"song": "Barbara Allen", "artist": "Traditional Scottish", "beat": 8, "timestamp": "3:02", "duration": "26s", "lyric_line": "'Nor nothing thereon will throw'", "scene": {"mood": "finality", "colors": ["gunmetal", "snow"], "composition": "medium close", "camera": "cut away", "description": "'Nor nothing thereon will throw' — visualized as a finality scene with gunmetal, snow tones, framed in medium close."}}
{"song": "Unknown Genre Track — Folk 19", "beat": 19, "lyric_line": "Folk scene description beat 19", "scene": {"mood": "intimate", "colors": ["cream", "sepia"], "composition": "candid", "camera": "wide", "description": "[Folk, beat 19] intimate — candid shot, wide movement, cream palette."}} {"song": "Barbara Allen", "artist": "Traditional Scottish", "beat": 9, "timestamp": "3:28", "duration": "26s", "lyric_line": "For I never loved you, kind sir", "scene": {"mood": "regret", "colors": ["ash rose", "iron"], "composition": "back view", "camera": "slow turn", "description": "For I never loved you, kind sir — visualized as a regret scene with ash rose, iron tones, framed in back view."}}
{"song": "Unknown Genre Track — Folk 20", "beat": 20, "lyric_line": "Folk scene description beat 20", "scene": {"mood": "intimate", "colors": ["sepia", "earth brown"], "composition": "natural light", "camera": "slow pan", "description": "[Folk, beat 20] intimate — natural light framing, organic slow pan movement, tones of sepia."}} {"song": "Barbara Allen", "artist": "Traditional Scottish", "beat": 10, "timestamp": "3:54", "duration": "26s", "lyric_line": "Till you died for the love of me", "scene": {"mood": "remorse", "colors": ["blood rust", "mournful gray"], "composition": "wide shot", "camera": "fade out", "description": "Till you died for the love of me — visualized as a remorse scene with blood rust, mournful gray tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 21", "beat": 21, "lyric_line": "Folk scene description beat 21", "scene": {"mood": "raw", "colors": ["earth brown", "cream"], "composition": "documentary", "camera": "steady handheld", "description": "[Folk, beat 21] raw — documentary shot, steady handheld movement, earth brown palette."}} {"song": "Shenandoah", "artist": "Traditional American Folk", "beat": 1, "timestamp": "0:00", "duration": "26s", "lyric_line": "Oh Shenandoah, I long to hear you", "scene": {"mood": "longing", "colors": ["river blue", "forest green"], "composition": "wide landscape", "camera": "slow pan", "description": "Oh Shenandoah, I long to hear you — visualized as a longing scene with river blue, forest green tones, framed in wide landscape."}}
{"song": "Unknown Genre Track — Folk 22", "beat": 22, "lyric_line": "Folk scene description beat 22", "scene": {"mood": "acoustic", "colors": ["sepia", "forest green"], "composition": "natural light", "camera": "steady handheld", "description": "[Folk, beat 22] acoustic — natural light shot, steady handheld movement, sepia palette."}} {"song": "Shenandoah", "artist": "Traditional American Folk", "beat": 2, "timestamp": "0:26", "duration": "26s", "lyric_line": "Away, you rolling river", "scene": {"mood": "flow", "colors": ["sky blue", "foam white"], "composition": "long shot", "camera": "tracking right", "description": "Away, you rolling river — visualized as a flow scene with sky blue, foam white tones, framed in long shot."}}
{"song": "Unknown Genre Track — Folk 23", "beat": 23, "lyric_line": "Folk scene description beat 23", "scene": {"mood": "organic", "colors": ["sepia", "cream"], "composition": "handheld", "camera": "static", "description": "[Folk, beat 23] organic — handheld framing, organic static movement, tones of sepia."}} {"song": "Shenandoah", "artist": "Traditional American Folk", "beat": 3, "timestamp": "0:52", "duration": "26s", "lyric_line": "Oh Shenandoah, I long to see you", "scene": {"mood": "yearning", "colors": ["mist gray", "oaken brown"], "composition": "medium shot", "camera": "gentle zoom", "description": "Oh Shenandoah, I long to see you — visualized as a yearning scene with mist gray, oaken brown tones, framed in medium shot."}}
{"song": "Unknown Genre Track — Folk 24", "beat": 24, "lyric_line": "Folk scene description beat 24", "scene": {"mood": "acoustic", "colors": ["cream", "earth brown"], "composition": "close-up", "camera": "macro", "description": "[Folk, beat 24] acoustic — close-up framing, organic macro movement, tones of cream."}} {"song": "Shenandoah", "artist": "Traditional American Folk", "beat": 4, "timestamp": "1:18", "duration": "26s", "lyric_line": "Away, we're bound away", "scene": {"mood": "journey", "colors": ["horizon gold", "azure"], "composition": "wide shot", "camera": "dolly out", "description": "Away, we're bound away — visualized as a journey scene with horizon gold, azure tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 25", "beat": 25, "lyric_line": "Folk scene description beat 25", "scene": {"mood": "intimate", "colors": ["sepia", "forest green"], "composition": "documentary", "camera": "steady handheld", "description": "[Folk, beat 25] intimate — documentary shot, steady handheld movement, sepia palette."}} {"song": "Shenandoah", "artist": "Traditional American Folk", "beat": 5, "timestamp": "1:44", "duration": "26s", "lyric_line": "Away you rolling river", "scene": {"mood": "rhythm", "colors": ["indigo", "silver"], "composition": "low angle", "camera": "slow pan", "description": "Away you rolling river — visualized as a rhythm scene with indigo, silver tones, framed in low angle."}}
{"song": "Unknown Genre Track — Folk 26", "beat": 26, "lyric_line": "Folk scene description beat 26", "scene": {"mood": "organic", "colors": ["forest green", "cream"], "composition": "natural light", "camera": "macro", "description": "[Folk, beat 26] organic — natural light framing, organic macro movement, tones of forest green."}} {"song": "Shenandoah", "artist": "Traditional American Folk", "beat": 6, "timestamp": "2:10", "duration": "26s", "lyric_line": "Missouri, oh she's a beautiful river", "scene": {"mood": "awe", "colors": ["mud brown", "sunlight"], "composition": "establishing", "camera": "pan across", "description": "Missouri, oh she's a beautiful river — visualized as a awe scene with mud brown, sunlight tones, framed in establishing."}}
{"song": "Unknown Genre Track — Folk 27", "beat": 27, "lyric_line": "Folk scene description beat 27", "scene": {"mood": "raw", "colors": ["ochre", "cream"], "composition": "close-up", "camera": "slow pan", "description": "[Folk, beat 27] raw — close-up framing, organic slow pan movement, tones of ochre."}} {"song": "Shenandoah", "artist": "Traditional American Folk", "beat": 7, "timestamp": "2:36", "duration": "26s", "lyric_line": "Away, you rolling river", "scene": {"mood": "repetition", "colors": ["amber", "steel blue"], "composition": "medium wide", "camera": "static", "description": "Away, you rolling river — visualized as a repetition scene with amber, steel blue tones, framed in medium wide."}}
{"song": "Unknown Genre Track — Folk 28", "beat": 28, "lyric_line": "Folk scene description beat 28", "scene": {"mood": "story-driven", "colors": ["forest green", "cream"], "composition": "handheld", "camera": "wide", "description": "[Folk, beat 28] story-driven — handheld framing, organic wide movement, tones of forest green."}} {"song": "Shenandoah", "artist": "Traditional American Folk", "beat": 8, "timestamp": "3:02", "duration": "26s", "lyric_line": "Red apples for my Missus", "scene": {"mood": "love", "colors": ["crimson", "leaf gold"], "composition": "close-up", "camera": "zoom in", "description": "Red apples for my Missus — visualized as a love scene with crimson, leaf gold tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 29", "beat": 29, "lyric_line": "Folk scene description beat 29", "scene": {"mood": "intimate", "colors": ["forest green", "ochre"], "composition": "handheld", "camera": "wide", "description": "[Folk, beat 29] intimate — handheld framing, organic wide movement, tones of forest green."}} {"song": "Shenandoah", "artist": "Traditional American Folk", "beat": 9, "timestamp": "3:28", "duration": "26s", "lyric_line": "Away, you rolling river", "scene": {"mood": "chorus", "colors": ["burgundy", "cream"], "composition": "two-shot", "camera": "slow circle", "description": "Away, you rolling river — visualized as a chorus scene with burgundy, cream tones, framed in two-shot."}}
{"song": "Unknown Genre Track — Folk 30", "beat": 30, "lyric_line": "Folk scene description beat 30", "scene": {"mood": "acoustic", "colors": ["forest green", "cream"], "composition": "close-up", "camera": "slow pan", "description": "[Folk, beat 30] acoustic — close-up framing, organic slow pan movement, tones of forest green."}} {"song": "Shenandoah", "artist": "Traditional American Folk", "beat": 10, "timestamp": "3:54", "duration": "26s", "lyric_line": "I'll take her across the river", "scene": {"mood": "promise", "colors": ["promise gold", "deep green"], "composition": "wide shot", "camera": "tracking forward", "description": "I'll take her across the river — visualized as a promise scene with promise gold, deep green tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 31", "beat": 31, "lyric_line": "Folk scene description beat 31", "scene": {"mood": "intimate", "colors": ["ochre", "earth brown"], "composition": "close-up", "camera": "wide", "description": "[Folk, beat 31] intimate — close-up framing, organic wide movement, tones of ochre."}} {"song": "The Water Is Wide", "artist": "Traditional Folk", "beat": 1, "timestamp": "0:00", "duration": "26s", "lyric_line": "The water is wide, I can't cross over", "scene": {"mood": "barrier", "colors": ["deep blue", "stone gray"], "composition": "wide shot", "camera": "static", "description": "The water is wide, I can't cross over — visualized as a barrier scene with deep blue, stone gray tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 32", "beat": 32, "lyric_line": "Folk scene description beat 32", "scene": {"mood": "intimate", "colors": ["cream", "forest green"], "composition": "handheld", "camera": "steady handheld", "description": "[Folk, beat 32] intimate — handheld shot, steady handheld movement, cream palette."}} {"song": "The Water Is Wide", "artist": "Traditional Folk", "beat": 2, "timestamp": "0:26", "duration": "26s", "lyric_line": "And neither have I wings to fly", "scene": {"mood": "limitation", "colors": ["storm gray", "ash"], "composition": "close-up", "camera": "subtle zoom", "description": "And neither have I wings to fly — visualized as a limitation scene with storm gray, ash tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 33", "beat": 33, "lyric_line": "Folk scene description beat 33", "scene": {"mood": "acoustic", "colors": ["forest green", "cream"], "composition": "documentary", "camera": "wide", "description": "[Folk, beat 33] acoustic — documentary shot, wide movement, forest green palette."}} {"song": "The Water Is Wide", "artist": "Traditional Folk", "beat": 3, "timestamp": "0:52", "duration": "26s", "lyric_line": "Give me a boat that can carry two", "scene": {"mood": "longing", "colors": ["driftwood", "sea foam"], "composition": "medium shot", "camera": "pan right", "description": "Give me a boat that can carry two — visualized as a longing scene with driftwood, sea foam tones, framed in medium shot."}}
{"song": "Unknown Genre Track — Folk 34", "beat": 34, "lyric_line": "Folk scene description beat 34", "scene": {"mood": "acoustic", "colors": ["sepia", "forest green"], "composition": "documentary", "camera": "macro", "description": "[Folk, beat 34] acoustic — documentary shot, macro movement, sepia palette."}} {"song": "The Water Is Wide", "artist": "Traditional Folk", "beat": 4, "timestamp": "1:18", "duration": "26s", "lyric_line": "And both shall row, my love and I", "scene": {"mood": "partnership", "colors": ["ocean blue", "sand"], "composition": "two-shot", "camera": "gentle pan", "description": "And both shall row, my love and I — visualized as a partnership scene with ocean blue, sand tones, framed in two-shot."}}
{"song": "Unknown Genre Track — Folk 35", "beat": 35, "lyric_line": "Folk scene description beat 35", "scene": {"mood": "story-driven", "colors": ["sepia", "forest green"], "composition": "candid", "camera": "slow pan", "description": "[Folk, beat 35] story-driven — candid framing, organic slow pan movement, tones of sepia."}} {"song": "The Water Is Wide", "artist": "Traditional Folk", "beat": 5, "timestamp": "1:44", "duration": "26s", "lyric_line": "There is a ship and she sails the sea", "scene": {"mood": "journey", "colors": ["navy", "white"], "composition": "wide establishing", "camera": "slow pan", "description": "There is a ship and she sails the sea — visualized as a journey scene with navy, white tones, framed in wide establishing."}}
{"song": "Unknown Genre Track — Folk 36", "beat": 36, "lyric_line": "Folk scene description beat 36", "scene": {"mood": "raw", "colors": ["ochre", "cream"], "composition": "close-up", "camera": "wide", "description": "[Folk, beat 36] raw — close-up framing, organic wide movement, tones of ochre."}} {"song": "The Water Is Wide", "artist": "Traditional Folk", "beat": 6, "timestamp": "2:10", "duration": "26s", "lyric_line": "And she's loaded deep as deep can be", "scene": {"mood": "burden", "colors": ["gunmetal", "sea spray"], "composition": "low angle", "camera": "dolly in", "description": "And she's loaded deep as deep can be — visualized as a burden scene with gunmetal, sea spray tones, framed in low angle."}}
{"song": "Unknown Genre Track — Folk 37", "beat": 37, "lyric_line": "Folk scene description beat 37", "scene": {"mood": "story-driven", "colors": ["earth brown", "sepia"], "composition": "candid", "camera": "wide", "description": "[Folk, beat 37] story-driven — candid framing, organic wide movement, tones of earth brown."}} {"song": "The Water Is Wide", "artist": "Traditional Folk", "beat": 7, "timestamp": "2:36", "duration": "26s", "lyric_line": "But not so deep as the love I'm in", "scene": {"mood": "love", "colors": ["deep rose", "ocean blue"], "composition": "close-up", "camera": "gentle zoom", "description": "But not so deep as the love I'm in — visualized as a love scene with deep rose, ocean blue tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 38", "beat": 38, "lyric_line": "Folk scene description beat 38", "scene": {"mood": "story-driven", "colors": ["ochre", "earth brown"], "composition": "close-up", "camera": "static", "description": "[Folk, beat 38] story-driven — close-up shot, static movement, ochre palette."}} {"song": "The Water Is Wide", "artist": "Traditional Folk", "beat": 8, "timestamp": "3:02", "duration": "26s", "lyric_line": "I know not if I sink or swim", "scene": {"mood": "uncertainty", "colors": ["indigo", "foam"], "composition": "extreme close", "camera": "static", "description": "I know not if I sink or swim — visualized as a uncertainty scene with indigo, foam tones, framed in extreme close."}}
{"song": "Unknown Genre Track — Folk 39", "beat": 39, "lyric_line": "Folk scene description beat 39", "scene": {"mood": "raw", "colors": ["forest green", "ochre"], "composition": "candid", "camera": "wide", "description": "[Folk, beat 39] raw — candid shot, wide movement, forest green palette."}} {"song": "The Water Is Wide", "artist": "Traditional Folk", "beat": 9, "timestamp": "3:28", "duration": "26s", "lyric_line": "Oh love is gentle, love is kind", "scene": {"mood": "tenderness", "colors": ["blush pink", "cream"], "composition": "medium shot", "camera": "soft focus", "description": "Oh love is gentle, love is kind — visualized as a tenderness scene with blush pink, cream tones, framed in medium shot."}}
{"song": "Unknown Genre Track — Folk 40", "beat": 40, "lyric_line": "Folk scene description beat 40", "scene": {"mood": "story-driven", "colors": ["earth brown", "ochre"], "composition": "natural light", "camera": "slow pan", "description": "[Folk, beat 40] story-driven — natural light shot, slow pan movement, earth brown palette."}} {"song": "The Water Is Wide", "artist": "Traditional Folk", "beat": 10, "timestamp": "3:54", "duration": "26s", "lyric_line": "The sweetest flower when first it's new", "scene": {"mood": "freshness", "colors": ["lime green", "white"], "composition": "macro", "camera": "drift focus", "description": "The sweetest flower when first it's new — visualized as a freshness scene with lime green, white tones, framed in macro."}}
{"song": "Unknown Genre Track — Folk 41", "beat": 41, "lyric_line": "Folk scene description beat 41", "scene": {"mood": "organic", "colors": ["sepia", "ochre"], "composition": "candid", "camera": "macro", "description": "[Folk, beat 41] organic — candid framing, organic macro movement, tones of sepia."}} {"song": "House of the Rising Sun", "artist": "Traditional (New Orleans)", "beat": 1, "timestamp": "0:00", "duration": "26s", "lyric_line": "There is a house in New Orleans", "scene": {"mood": "mystery", "colors": ["gaslight amber", "bayou green"], "composition": "establishing", "camera": "slow pan", "description": "There is a house in New Orleans — visualized as a mystery scene with gaslight amber, bayou green tones, framed in establishing."}}
{"song": "Unknown Genre Track — Folk 42", "beat": 42, "lyric_line": "Folk scene description beat 42", "scene": {"mood": "story-driven", "colors": ["ochre", "cream"], "composition": "close-up", "camera": "macro", "description": "[Folk, beat 42] story-driven — close-up shot, macro movement, ochre palette."}} {"song": "House of the Rising Sun", "artist": "Traditional (New Orleans)", "beat": 2, "timestamp": "0:26", "duration": "26s", "lyric_line": "They call the Rising Sun", "scene": {"mood": "warning", "colors": ["crimson", "brass"], "composition": "wide shot", "camera": "tracking left", "description": "They call the Rising Sun — visualized as a warning scene with crimson, brass tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 43", "beat": 43, "lyric_line": "Folk scene description beat 43", "scene": {"mood": "raw", "colors": ["cream", "forest green"], "composition": "handheld", "camera": "wide", "description": "[Folk, beat 43] raw — handheld framing, organic wide movement, tones of cream."}} {"song": "House of the Rising Sun", "artist": "Traditional (New Orleans)", "beat": 3, "timestamp": "0:52", "duration": "26s", "lyric_line": "And it's been the ruin of many a poor girl", "scene": {"mood": "ruin", "colors": ["dusty rose", "ocher"], "composition": "low angle", "camera": "steady cam", "description": "And it's been the ruin of many a poor girl — visualized as a ruin scene with dusty rose, ocher tones, framed in low angle."}}
{"song": "Unknown Genre Track — Folk 44", "beat": 44, "lyric_line": "Folk scene description beat 44", "scene": {"mood": "acoustic", "colors": ["ochre", "earth brown"], "composition": "close-up", "camera": "static", "description": "[Folk, beat 44] acoustic — close-up shot, static movement, ochre palette."}} {"song": "House of the Rising Sun", "artist": "Traditional (New Orleans)", "beat": 4, "timestamp": "1:18", "duration": "26s", "lyric_line": "And me, O Lord, for one", "scene": {"mood": "confession", "colors": ["mustard yellow", "slate"], "composition": "close-up", "camera": "static", "description": "And me, O Lord, for one — visualized as a confession scene with mustard yellow, slate tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 45", "beat": 45, "lyric_line": "Folk scene description beat 45", "scene": {"mood": "story-driven", "colors": ["sepia", "earth brown"], "composition": "documentary", "camera": "macro", "description": "[Folk, beat 45] story-driven — documentary framing, organic macro movement, tones of sepia."}} {"song": "House of the Rising Sun", "artist": "Traditional (New Orleans)", "beat": 5, "timestamp": "1:44", "duration": "26s", "lyric_line": "I got a pocket full of money", "scene": {"mood": "gambler's hope", "colors": ["copper", "emerald"], "composition": "medium shot", "camera": "pan right", "description": "I got a pocket full of money — visualized as a gambler's hope scene with copper, emerald tones, framed in medium shot."}}
{"song": "Unknown Genre Track — Folk 46", "beat": 46, "lyric_line": "Folk scene description beat 46", "scene": {"mood": "raw", "colors": ["sepia", "cream"], "composition": "natural light", "camera": "static", "description": "[Folk, beat 46] raw — natural light shot, static movement, sepia palette."}} {"song": "House of the Rising Sun", "artist": "Traditional (New Orleans)", "beat": 6, "timestamp": "2:10", "duration": "26s", "lyric_line": "And a one-eyed dog on my knee", "scene": {"mood": "companionship", "colors": ["rust", "tan"], "composition": "two-shot", "camera": "gentle zoom", "description": "And a one-eyed dog on my knee — visualized as a companionship scene with rust, tan tones, framed in two-shot."}}
{"song": "Unknown Genre Track — Folk 47", "beat": 47, "lyric_line": "Folk scene description beat 47", "scene": {"mood": "raw", "colors": ["cream", "ochre"], "composition": "close-up", "camera": "slow pan", "description": "[Folk, beat 47] raw — close-up framing, organic slow pan movement, tones of cream."}} {"song": "House of the Rising Sun", "artist": "Traditional (New Orleans)", "beat": 7, "timestamp": "2:36", "duration": "26s", "lyric_line": "I'm going to the house of the Rising Sun", "scene": {"mood": "doom walk", "colors": ["sunset red", "ash gray"], "composition": "tracking", "camera": "dolly forward", "description": "I'm going to the house of the Rising Sun — visualized as a doom walk scene with sunset red, ash gray tones, framed in tracking."}}
{"song": "Unknown Genre Track — Folk 48", "beat": 48, "lyric_line": "Folk scene description beat 48", "scene": {"mood": "organic", "colors": ["cream", "ochre"], "composition": "handheld", "camera": "static", "description": "[Folk, beat 48] organic — handheld shot, static movement, cream palette."}} {"song": "House of the Rising Sun", "artist": "Traditional (New Orleans)", "beat": 8, "timestamp": "3:02", "duration": "26s", "lyric_line": "And I ain't never coming back", "scene": {"mood": "finality", "colors": ["obsidian", "bone"], "composition": "back view", "camera": "slow pull", "description": "And I ain't never coming back — visualized as a finality scene with obsidian, bone tones, framed in back view."}}
{"song": "Unknown Genre Track — Folk 49", "beat": 49, "lyric_line": "Folk scene description beat 49", "scene": {"mood": "raw", "colors": ["sepia", "cream"], "composition": "close-up", "camera": "slow pan", "description": "[Folk, beat 49] raw — close-up framing, organic slow pan movement, tones of sepia."}} {"song": "House of the Rising Sun", "artist": "Traditional (New Orleans)", "beat": 9, "timestamp": "3:28", "duration": "26s", "lyric_line": "Oh mother, tell your children", "scene": {"mood": "warning", "colors": ["cream", "navy"], "composition": "wide shot", "camera": "pan across", "description": "Oh mother, tell your children — visualized as a warning scene with cream, navy tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 50", "beat": 50, "lyric_line": "Folk scene description beat 50", "scene": {"mood": "intimate", "colors": ["sepia", "ochre"], "composition": "close-up", "camera": "macro", "description": "[Folk, beat 50] intimate — close-up framing, organic macro movement, tones of sepia."}} {"song": "House of the Rising Sun", "artist": "Traditional (New Orleans)", "beat": 10, "timestamp": "3:54", "duration": "26s", "lyric_line": "Not to do what I have done", "scene": {"mood": "regret", "colors": ["blood rust", "shadow"], "composition": "close-up", "camera": "fade to black", "description": "Not to do what I have done — visualized as a regret scene with blood rust, shadow tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 51", "beat": 51, "lyric_line": "Folk scene description beat 51", "scene": {"mood": "organic", "colors": ["forest green", "earth brown"], "composition": "documentary", "camera": "wide", "description": "[Folk, beat 51] organic — documentary shot, wide movement, forest green palette."}} {"song": "Black is the Color", "artist": "Traditional Appalachian", "beat": 1, "timestamp": "0:00", "duration": "26s", "lyric_line": "Black is the color of my true love's hair", "scene": {"mood": "devotion", "colors": ["ebony", "midnight blue"], "composition": "close-up", "camera": "gentle zoom", "description": "Black is the color of my true love's hair — visualized as a devotion scene with ebony, midnight blue tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 52", "beat": 52, "lyric_line": "Folk scene description beat 52", "scene": {"mood": "intimate", "colors": ["sepia", "ochre"], "composition": "handheld", "camera": "wide", "description": "[Folk, beat 52] intimate — handheld shot, wide movement, sepia palette."}} {"song": "Black is the Color", "artist": "Traditional Appalachian", "beat": 2, "timestamp": "0:26", "duration": "26s", "lyric_line": "Her eyebrows, they are shaped like a bow", "scene": {"mood": "admiration", "colors": ["coal black", "skin tone"], "composition": "portrait", "camera": "slow pan", "description": "Her eyebrows, they are shaped like a bow — visualized as a admiration scene with coal black, skin tone tones, framed in portrait."}}
{"song": "Unknown Genre Track — Folk 53", "beat": 53, "lyric_line": "Folk scene description beat 53", "scene": {"mood": "organic", "colors": ["ochre", "forest green"], "composition": "documentary", "camera": "static", "description": "[Folk, beat 53] organic — documentary framing, organic static movement, tones of ochre."}} {"song": "Black is the Color", "artist": "Traditional Appalachian", "beat": 3, "timestamp": "0:52", "duration": "26s", "lyric_line": "Black is the color, my love's hair", "scene": {"mood": "reprise", "colors": ["obsidian", "silver"], "composition": "medium shot", "camera": "static", "description": "Black is the color, my love's hair — visualized as a reprise scene with obsidian, silver tones, framed in medium shot."}}
{"song": "Unknown Genre Track — Folk 54", "beat": 54, "lyric_line": "Folk scene description beat 54", "scene": {"mood": "raw", "colors": ["forest green", "cream"], "composition": "candid", "camera": "static", "description": "[Folk, beat 54] raw — candid shot, static movement, forest green palette."}} {"song": "Black is the Color", "artist": "Traditional Appalachian", "beat": 4, "timestamp": "1:18", "duration": "26s", "lyric_line": "And the Earl of Mar, he's a man of honor", "scene": {"mood": "respect", "colors": ["forest green", "gold"], "composition": "wide shot", "camera": "pan left", "description": "And the Earl of Mar, he's a man of honor — visualized as a respect scene with forest green, gold tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 55", "beat": 55, "lyric_line": "Folk scene description beat 55", "scene": {"mood": "acoustic", "colors": ["sepia", "earth brown"], "composition": "close-up", "camera": "macro", "description": "[Folk, beat 55] acoustic — close-up framing, organic macro movement, tones of sepia."}} {"song": "Black is the Color", "artist": "Traditional Appalachian", "beat": 5, "timestamp": "1:44", "duration": "26s", "lyric_line": "Where the sun never shines", "scene": {"mood": "shadow", "colors": ["charcoal", "void"], "composition": "dark scene", "camera": "slow dolly", "description": "Where the sun never shines — visualized as a shadow scene with charcoal, void tones, framed in dark scene."}}
{"song": "Unknown Genre Track — Folk 56", "beat": 56, "lyric_line": "Folk scene description beat 56", "scene": {"mood": "raw", "colors": ["sepia", "ochre"], "composition": "documentary", "camera": "slow pan", "description": "[Folk, beat 56] raw — documentary shot, slow pan movement, sepia palette."}} {"song": "Black is the Color", "artist": "Traditional Appalachian", "beat": 6, "timestamp": "2:10", "duration": "26s", "lyric_line": "I've been to the greenwood to gather grapes", "scene": {"mood": "quest", "colors": ["forest green", "purple"], "composition": "tracking", "camera": "slow pan", "description": "I've been to the greenwood to gather grapes — visualized as a quest scene with forest green, purple tones, framed in tracking."}}
{"song": "Unknown Genre Track — Folk 57", "beat": 57, "lyric_line": "Folk scene description beat 57", "scene": {"mood": "acoustic", "colors": ["cream", "sepia"], "composition": "handheld", "camera": "slow pan", "description": "[Folk, beat 57] acoustic — handheld shot, slow pan movement, cream palette."}} {"song": "Black is the Color", "artist": "Traditional Appalachian", "beat": 7, "timestamp": "2:36", "duration": "26s", "lyric_line": "And I swore I'd not return", "scene": {"mood": "resolution", "colors": ["oaken brown", "wine red"], "composition": "close-up", "camera": "static", "description": "And I swore I'd not return — visualized as a resolution scene with oaken brown, wine red tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 58", "beat": 58, "lyric_line": "Folk scene description beat 58", "scene": {"mood": "raw", "colors": ["ochre", "sepia"], "composition": "handheld", "camera": "static", "description": "[Folk, beat 58] raw — handheld shot, static movement, ochre palette."}} {"song": "Black is the Color", "artist": "Traditional Appalachian", "beat": 8, "timestamp": "3:02", "duration": "26s", "lyric_line": "Till I found her wherever she may be", "scene": {"mood": "search", "colors": ["moss green", "stone gray"], "composition": "medium shot", "camera": "panning search", "description": "Till I found her wherever she may be — visualized as a search scene with moss green, stone gray tones, framed in medium shot."}}
{"song": "Unknown Genre Track — Folk 59", "beat": 59, "lyric_line": "Folk scene description beat 59", "scene": {"mood": "intimate", "colors": ["ochre", "forest green"], "composition": "handheld", "camera": "static", "description": "[Folk, beat 59] intimate — handheld framing, organic static movement, tones of ochre."}} {"song": "Black is the Color", "artist": "Traditional Appalachian", "beat": 9, "timestamp": "3:28", "duration": "26s", "lyric_line": "No flower that blooms in the summer time", "scene": {"mood": "comparison", "colors": ["crimson", "emerald"], "composition": "macro", "camera": "gentle zoom", "description": "No flower that blooms in the summer time — visualized as a comparison scene with crimson, emerald tones, framed in macro."}}
{"song": "Unknown Genre Track — Folk 60", "beat": 60, "lyric_line": "Folk scene description beat 60", "scene": {"mood": "acoustic", "colors": ["ochre", "forest green"], "composition": "close-up", "camera": "wide", "description": "[Folk, beat 60] acoustic — close-up framing, organic wide movement, tones of ochre."}} {"song": "Black is the Color", "artist": "Traditional Appalachian", "beat": 10, "timestamp": "3:54", "duration": "26s", "lyric_line": "Can match the beauty of my love's hair", "scene": {"mood": "worship", "colors": ["black", "gold halo"], "composition": "backlit", "camera": "glowing", "description": "Can match the beauty of my love's hair — visualized as a worship scene with black, gold halo tones, framed in backlit."}}
{"song": "Unknown Genre Track — Folk 61", "beat": 61, "lyric_line": "Folk scene description beat 61", "scene": {"mood": "acoustic", "colors": ["ochre", "forest green"], "composition": "close-up", "camera": "wide", "description": "[Folk, beat 61] acoustic — close-up shot, wide movement, ochre palette."}} {"song": "Down in the Valley", "artist": "Traditional American Folk", "beat": 1, "timestamp": "0:00", "duration": "26s", "lyric_line": "Down in the valley to pray", "scene": {"mood": "spiritual", "colors": ["meadow green", "sky blue"], "composition": "wide landscape", "camera": "slow pan", "description": "Down in the valley to pray — visualized as a spiritual scene with meadow green, sky blue tones, framed in wide landscape."}}
{"song": "Unknown Genre Track — Folk 62", "beat": 62, "lyric_line": "Folk scene description beat 62", "scene": {"mood": "story-driven", "colors": ["ochre", "forest green"], "composition": "candid", "camera": "steady handheld", "description": "[Folk, beat 62] story-driven — candid shot, steady handheld movement, ochre palette."}} {"song": "Down in the Valley", "artist": "Traditional American Folk", "beat": 2, "timestamp": "0:26", "duration": "26s", "lyric_line": "Down in the valley to pray", "scene": {"mood": "repetition", "colors": ["valley green", "dawn pink"], "composition": "medium shot", "camera": "gentle zoom", "description": "Down in the valley to pray — visualized as a repetition scene with valley green, dawn pink tones, framed in medium shot."}}
{"song": "Unknown Genre Track — Folk 63", "beat": 63, "lyric_line": "Folk scene description beat 63", "scene": {"mood": "story-driven", "colors": ["ochre", "earth brown"], "composition": "candid", "camera": "slow pan", "description": "[Folk, beat 63] story-driven — candid shot, slow pan movement, ochre palette."}} {"song": "Down in the Valley", "artist": "Traditional American Folk", "beat": 3, "timestamp": "0:52", "duration": "26s", "lyric_line": "Down in the valley, valley, valley", "scene": {"mood": "rhythm", "colors": ["emerald", "golden"], "composition": "low angle", "camera": "pan around", "description": "Down in the valley, valley, valley — visualized as a rhythm scene with emerald, golden tones, framed in low angle."}}
{"song": "Unknown Genre Track — Folk 64", "beat": 64, "lyric_line": "Folk scene description beat 64", "scene": {"mood": "intimate", "colors": ["ochre", "forest green"], "composition": "natural light", "camera": "steady handheld", "description": "[Folk, beat 64] intimate — natural light framing, organic steady handheld movement, tones of ochre."}} {"song": "Down in the Valley", "artist": "Traditional American Folk", "beat": 4, "timestamp": "1:18", "duration": "26s", "lyric_line": "To pray", "scene": {"mood": "minimal", "colors": ["white", "light gold"], "composition": "extreme wide", "camera": "dolly in", "description": "To pray — visualized as a minimal scene with white, light gold tones, framed in extreme wide."}}
{"song": "Unknown Genre Track — Folk 65", "beat": 65, "lyric_line": "Folk scene description beat 65", "scene": {"mood": "story-driven", "colors": ["sepia", "cream"], "composition": "candid", "camera": "slow pan", "description": "[Folk, beat 65] story-driven — candid shot, slow pan movement, sepia palette."}} {"song": "Down in the Valley", "artist": "Traditional American Folk", "beat": 5, "timestamp": "1:44", "duration": "26s", "lyric_line": "Father, you are the fountain", "scene": {"mood": "devotion", "colors": ["clear blue", "silver"], "composition": "looking up", "camera": "rise shot", "description": "Father, you are the fountain — visualized as a devotion scene with clear blue, silver tones, framed in looking up."}}
{"song": "Unknown Genre Track — Folk 66", "beat": 66, "lyric_line": "Folk scene description beat 66", "scene": {"mood": "story-driven", "colors": ["ochre", "sepia"], "composition": "handheld", "camera": "slow pan", "description": "[Folk, beat 66] story-driven — handheld shot, slow pan movement, ochre palette."}} {"song": "Down in the Valley", "artist": "Traditional American Folk", "beat": 6, "timestamp": "2:10", "duration": "26s", "lyric_line": "Of every blessing", "scene": {"mood": "gratitude", "colors": ["sunrise orange", "cream"], "composition": "medium shot", "camera": "gentle pan", "description": "Of every blessing — visualized as a gratitude scene with sunrise orange, cream tones, framed in medium shot."}}
{"song": "Unknown Genre Track — Folk 67", "beat": 67, "lyric_line": "Folk scene description beat 67", "scene": {"mood": "intimate", "colors": ["ochre", "forest green"], "composition": "handheld", "camera": "wide", "description": "[Folk, beat 67] intimate — handheld shot, wide movement, ochre palette."}} {"song": "Down in the Valley", "artist": "Traditional American Folk", "beat": 7, "timestamp": "2:36", "duration": "26s", "lyric_line": "I'm going to the valley", "scene": {"mood": "journey", "colors": ["path brown", "fern green"], "composition": "tracking", "camera": "forward walk", "description": "I'm going to the valley — visualized as a journey scene with path brown, fern green tones, framed in tracking."}}
{"song": "Unknown Genre Track — Folk 68", "beat": 68, "lyric_line": "Folk scene description beat 68", "scene": {"mood": "raw", "colors": ["sepia", "earth brown"], "composition": "documentary", "camera": "slow pan", "description": "[Folk, beat 68] raw — documentary shot, slow pan movement, sepia palette."}} {"song": "Down in the Valley", "artist": "Traditional American Folk", "beat": 8, "timestamp": "3:02", "duration": "26s", "lyric_line": "I'm going to the valley", "scene": {"mood": "resolve", "colors": ["stone gray", "lavender"], "composition": "wide shot", "camera": "slow pan", "description": "I'm going to the valley — visualized as a resolve scene with stone gray, lavender tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 69", "beat": 69, "lyric_line": "Folk scene description beat 69", "scene": {"mood": "intimate", "colors": ["cream", "forest green"], "composition": "close-up", "camera": "wide", "description": "[Folk, beat 69] intimate — close-up framing, organic wide movement, tones of cream."}} {"song": "Down in the Valley", "artist": "Traditional American Folk", "beat": 9, "timestamp": "3:28", "duration": "26s", "lyric_line": "I'm going to the valley to pray", "scene": {"mood": "peace", "colors": ["mist blue", "plain gold"], "composition": "silhouetted", "camera": "backlit", "description": "I'm going to the valley to pray — visualized as a peace scene with mist blue, plain gold tones, framed in silhouetted."}}
{"song": "Unknown Genre Track — Folk 70", "beat": 70, "lyric_line": "Folk scene description beat 70", "scene": {"mood": "raw", "colors": ["ochre", "earth brown"], "composition": "candid", "camera": "macro", "description": "[Folk, beat 70] raw — candid framing, organic macro movement, tones of ochre."}} {"song": "Down in the Valley", "artist": "Traditional American Folk", "beat": 10, "timestamp": "3:54", "duration": "26s", "lyric_line": "My soul on the mercy seat", "scene": {"mood": "surrender", "colors": ["heavenly white", "azure"], "composition": "low angle", "camera": "rising crane", "description": "My soul on the mercy seat — visualized as a surrender scene with heavenly white, azure tones, framed in low angle."}}
{"song": "Unknown Genre Track — Folk 71", "beat": 71, "lyric_line": "Folk scene description beat 71", "scene": {"mood": "raw", "colors": ["sepia", "forest green"], "composition": "handheld", "camera": "macro", "description": "[Folk, beat 71] raw — handheld framing, organic macro movement, tones of sepia."}} {"song": "Pretty Polly", "artist": "Traditional Ballad", "beat": 1, "timestamp": "0:00", "duration": "26s", "lyric_line": "Oh Pretty Polly, oh Pretty Polly", "scene": {"mood": "calling", "colors": ["dusk pink", "shadow"], "composition": "dark forest", "camera": "slow pan", "description": "Oh Pretty Polly, oh Pretty Polly — visualized as a calling scene with dusk pink, shadow tones, framed in dark forest."}}
{"song": "Unknown Genre Track — Folk 72", "beat": 72, "lyric_line": "Folk scene description beat 72", "scene": {"mood": "intimate", "colors": ["forest green", "sepia"], "composition": "close-up", "camera": "steady handheld", "description": "[Folk, beat 72] intimate — close-up shot, steady handheld movement, forest green palette."}} {"song": "Pretty Polly", "artist": "Traditional Ballad", "beat": 2, "timestamp": "0:26", "duration": "26s", "lyric_line": "Pretty Polly, oh Pretty Polly", "scene": {"mood": "echo", "colors": ["rose", "moss"], "composition": "two-shot", "camera": "echo pan", "description": "Pretty Polly, oh Pretty Polly — visualized as a echo scene with rose, moss tones, framed in two-shot."}}
{"song": "Unknown Genre Track — Folk 73", "beat": 73, "lyric_line": "Folk scene description beat 73", "scene": {"mood": "intimate", "colors": ["sepia", "ochre"], "composition": "documentary", "camera": "static", "description": "[Folk, beat 73] intimate — documentary shot, static movement, sepia palette."}} {"song": "Pretty Polly", "artist": "Traditional Ballad", "beat": 3, "timestamp": "0:52", "duration": "26s", "lyric_line": "I'm going away, Pretty Polly", "scene": {"mood": "farewell", "colors": ["amber", "blood"], "composition": "medium shot", "camera": "dolly back", "description": "I'm going away, Pretty Polly — visualized as a farewell scene with amber, blood tones, framed in medium shot."}}
{"song": "Unknown Genre Track — Folk 74", "beat": 74, "lyric_line": "Folk scene description beat 74", "scene": {"mood": "organic", "colors": ["earth brown", "cream"], "composition": "handheld", "camera": "macro", "description": "[Folk, beat 74] organic — handheld framing, organic macro movement, tones of earth brown."}} {"song": "Pretty Polly", "artist": "Traditional Ballad", "beat": 4, "timestamp": "1:18", "duration": "26s", "lyric_line": "I'm going away for to stay awhile", "scene": {"mood": "departure", "colors": ["rust", "indigo"], "composition": "wide shot", "camera": "tracking", "description": "I'm going away for to stay awhile — visualized as a departure scene with rust, indigo tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 75", "beat": 75, "lyric_line": "Folk scene description beat 75", "scene": {"mood": "acoustic", "colors": ["sepia", "earth brown"], "composition": "natural light", "camera": "static", "description": "[Folk, beat 75] acoustic — natural light framing, organic static movement, tones of sepia."}} {"song": "Pretty Polly", "artist": "Traditional Ballad", "beat": 5, "timestamp": "1:44", "duration": "26s", "lyric_line": "Oh Willie, oh Willie, oh my dear Willie", "scene": {"mood": "pleading", "colors": ["cream", "crimson"], "composition": "close-up", "camera": "tight zoom", "description": "Oh Willie, oh Willie, oh my dear Willie — visualized as a pleading scene with cream, crimson tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 76", "beat": 76, "lyric_line": "Folk scene description beat 76", "scene": {"mood": "organic", "colors": ["forest green", "earth brown"], "composition": "handheld", "camera": "macro", "description": "[Folk, beat 76] organic — handheld shot, macro movement, forest green palette."}} {"song": "Pretty Polly", "artist": "Traditional Ballad", "beat": 6, "timestamp": "2:10", "duration": "26s", "lyric_line": "What makes you leave me?", "scene": {"mood": "betrayal", "colors": ["teal", "gray"], "composition": "medium close", "camera": "static", "description": "What makes you leave me? — visualized as a betrayal scene with teal, gray tones, framed in medium close."}}
{"song": "Unknown Genre Track — Folk 77", "beat": 77, "lyric_line": "Folk scene description beat 77", "scene": {"mood": "acoustic", "colors": ["forest green", "ochre"], "composition": "handheld", "camera": "slow pan", "description": "[Folk, beat 77] acoustic — handheld framing, organic slow pan movement, tones of forest green."}} {"song": "Pretty Polly", "artist": "Traditional Ballad", "beat": 7, "timestamp": "2:36", "duration": "26s", "lyric_line": "I'm not leaving you, Pretty Polly", "scene": {"mood": "deception", "colors": ["pale green", "black"], "composition": "wide shot", "camera": "pan reveal", "description": "I'm not leaving you, Pretty Polly — visualized as a deception scene with pale green, black tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 78", "beat": 78, "lyric_line": "Folk scene description beat 78", "scene": {"mood": "story-driven", "colors": ["cream", "earth brown"], "composition": "documentary", "camera": "wide", "description": "[Folk, beat 78] story-driven — documentary shot, wide movement, cream palette."}} {"song": "Pretty Polly", "artist": "Traditional Ballad", "beat": 8, "timestamp": "3:02", "duration": "26s", "lyric_line": "I'm only going to fetch some wood", "scene": {"mood": "lie", "colors": ["oaken brown", "blood"], "composition": "close-up", "camera": "cut to", "description": "I'm only going to fetch some wood — visualized as a lie scene with oaken brown, blood tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 79", "beat": 79, "lyric_line": "Folk scene description beat 79", "scene": {"mood": "story-driven", "colors": ["cream", "earth brown"], "composition": "natural light", "camera": "macro", "description": "[Folk, beat 79] story-driven — natural light shot, macro movement, cream palette."}} {"song": "Pretty Polly", "artist": "Traditional Ballad", "beat": 9, "timestamp": "3:28", "duration": "26s", "lyric_line": "Oh Willie, oh Willie, you have killed me", "scene": {"mood": "death", "colors": ["pale white", "scarlet"], "composition": "extreme close", "camera": "static", "description": "Oh Willie, oh Willie, you have killed me — visualized as a death scene with pale white, scarlet tones, framed in extreme close."}}
{"song": "Unknown Genre Track — Folk 80", "beat": 80, "lyric_line": "Folk scene description beat 80", "scene": {"mood": "intimate", "colors": ["ochre", "earth brown"], "composition": "documentary", "camera": "slow pan", "description": "[Folk, beat 80] intimate — documentary framing, organic slow pan movement, tones of ochre."}} {"song": "Pretty Polly", "artist": "Traditional Ballad", "beat": 10, "timestamp": "3:54", "duration": "26s", "lyric_line": "And left me here to die", "scene": {"mood": "abandonment", "colors": ["bone white", "crimson"], "composition": "fade to black", "camera": "slow fade", "description": "And left me here to die — visualized as a abandonment scene with bone white, crimson tones, framed in fade to black."}}
{"song": "Unknown Genre Track — Folk 81", "beat": 81, "lyric_line": "Folk scene description beat 81", "scene": {"mood": "acoustic", "colors": ["cream", "forest green"], "composition": "close-up", "camera": "static", "description": "[Folk, beat 81] acoustic — close-up framing, organic static movement, tones of cream."}} {"song": "The Cruel Ship's Captain", "artist": "Traditional Sea Shanty", "beat": 1, "timestamp": "0:00", "duration": "26s", "lyric_line": "I shipped aboard a yachting ship", "scene": {"mood": "departure", "colors": ["navy", "sea gray"], "composition": "harbor wide", "camera": "slow pan", "description": "I shipped aboard a yachting ship — visualized as a departure scene with navy, sea gray tones, framed in harbor wide."}}
{"song": "Unknown Genre Track — Folk 82", "beat": 82, "lyric_line": "Folk scene description beat 82", "scene": {"mood": "story-driven", "colors": ["cream", "sepia"], "composition": "candid", "camera": "macro", "description": "[Folk, beat 82] story-driven — candid shot, macro movement, cream palette."}} {"song": "The Cruel Ship's Captain", "artist": "Traditional Sea Shanty", "beat": 2, "timestamp": "0:26", "duration": "26s", "lyric_line": "For the Highlands of the Scottish lowlands", "scene": {"mood": "journey", "colors": ["ocean blue", "horizon"], "composition": "ship deck", "camera": "forward motion", "description": "For the Highlands of the Scottish lowlands — visualized as a journey scene with ocean blue, horizon tones, framed in ship deck."}}
{"song": "Unknown Genre Track — Folk 83", "beat": 83, "lyric_line": "Folk scene description beat 83", "scene": {"mood": "story-driven", "colors": ["ochre", "earth brown"], "composition": "natural light", "camera": "wide", "description": "[Folk, beat 83] story-driven — natural light shot, wide movement, ochre palette."}} {"song": "The Cruel Ship's Captain", "artist": "Traditional Sea Shanty", "beat": 3, "timestamp": "0:52", "duration": "26s", "lyric_line": "The captain he was cruel and violent", "scene": {"mood": "tyranny", "colors": ["blood red", "gunmetal"], "composition": "low angle", "camera": "dolly in", "description": "The captain he was cruel and violentvisualized as a tyranny scene with blood red, gunmetal tones, framed in low angle."}}
{"song": "Unknown Genre Track — Folk 84", "beat": 84, "lyric_line": "Folk scene description beat 84", "scene": {"mood": "intimate", "colors": ["sepia", "cream"], "composition": "close-up", "camera": "slow pan", "description": "[Folk, beat 84] intimate — close-up shot, slow pan movement, sepia palette."}} {"song": "The Cruel Ship's Captain", "artist": "Traditional Sea Shanty", "beat": 4, "timestamp": "1:18", "duration": "26s", "lyric_line": "He slashed me with his rod", "scene": {"mood": "violence", "colors": ["whip brown", "crimson", "brass"], "composition": "close-up", "camera": "static cut", "description": "He slashed me with his rod — visualized as a violence scene with whip brown, crimson, brass tones, framed in close-up."}}
{"song": "Unknown Genre Track — Folk 85", "beat": 85, "lyric_line": "Folk scene description beat 85", "scene": {"mood": "intimate", "colors": ["sepia", "cream"], "composition": "handheld", "camera": "steady handheld", "description": "[Folk, beat 85] intimate — handheld framing, organic steady handheld movement, tones of sepia."}} {"song": "The Cruel Ship's Captain", "artist": "Traditional Sea Shanty", "beat": 5, "timestamp": "1:44", "duration": "26s", "lyric_line": "So I dropped him in the deep blue sea", "scene": {"mood": "revenge", "colors": ["navy", "blood"], "composition": "wide shot", "camera": "falling", "description": "So I dropped him in the deep blue sea — visualized as a revenge scene with navy, blood tones, framed in wide shot."}}
{"song": "Unknown Genre Track — Folk 86", "beat": 86, "lyric_line": "Folk scene description beat 86", "scene": {"mood": "intimate", "colors": ["forest green", "ochre"], "composition": "handheld", "camera": "wide", "description": "[Folk, beat 86] intimate — handheld shot, wide movement, forest green palette."}} {"song": "The Cruel Ship's Captain", "artist": "Traditional Sea Shanty", "beat": 6, "timestamp": "2:10", "duration": "26s", "lyric_line": "Where the sharks ate him up", "scene": {"mood": "justice", "colors": ["gray", "fin silver"], "composition": "underwater", "camera": "rising bubbles", "description": "Where the sharks ate him up — visualized as a justice scene with gray, fin silver tones, framed in underwater."}}
{"song": "Unknown Genre Track — Folk 87", "beat": 87, "lyric_line": "Folk scene description beat 87", "scene": {"mood": "organic", "colors": ["ochre", "cream"], "composition": "close-up", "camera": "wide", "description": "[Folk, beat 87] organic — close-up framing, organic wide movement, tones of ochre."}} {"song": "The Cruel Ship's Captain", "artist": "Traditional Sea Shanty", "beat": 7, "timestamp": "2:36", "duration": "26s", "lyric_line": "And I took command of the yachting ship", "scene": {"mood": "power", "colors": ["brass", "white"], "composition": "helm shot", "camera": "turn wheel", "description": "And I took command of the yachting ship — visualized as a power scene with brass, white tones, framed in helm shot."}}
{"song": "Unknown Genre Track — Folk 88", "beat": 88, "lyric_line": "Folk scene description beat 88", "scene": {"mood": "raw", "colors": ["ochre", "sepia"], "composition": "handheld", "camera": "steady handheld", "description": "[Folk, beat 88] raw — handheld framing, organic steady handheld movement, tones of ochre."}} {"song": "The Cruel Ship's Captain", "artist": "Traditional Sea Shanty", "beat": 8, "timestamp": "3:02", "duration": "26s", "lyric_line": "And I sailed her to the West", "scene": {"mood": "freedom", "colors": ["sunset orange", "golden ocean"], "composition": "wide sunset", "camera": "dolly out", "description": "And I sailed her to the West — visualized as a freedom scene with sunset orange, golden ocean tones, framed in wide sunset."}}
{"song": "Unknown Genre Track — Folk 89", "beat": 89, "lyric_line": "Folk scene description beat 89", "scene": {"mood": "story-driven", "colors": ["ochre", "sepia"], "composition": "documentary", "camera": "static", "description": "[Folk, beat 89] story-driven — documentary shot, static movement, ochre palette."}} {"song": "The Cruel Ship's Captain", "artist": "Traditional Sea Shanty", "beat": 9, "timestamp": "3:28", "duration": "26s", "lyric_line": "No more cruel captain to slash me", "scene": {"mood": "peace", "colors": ["calm blue", "desert sand"], "composition": "calm sea", "camera": "gentle waves", "description": "No more cruel captain to slash me — visualized as a peace scene with calm blue, desert sand tones, framed in calm sea."}}
{"song": "Unknown Genre Track — Folk 90", "beat": 90, "lyric_line": "Folk scene description beat 90", "scene": {"mood": "organic", "colors": ["ochre", "cream"], "composition": "candid", "camera": "slow pan", "description": "[Folk, beat 90] organic — candid framing, organic slow pan movement, tones of ochre."}} {"song": "The Cruel Ship's Captain", "artist": "Traditional Sea Shanty", "beat": 10, "timestamp": "3:54", "duration": "26s", "lyric_line": "For the sharks they had their feast", "scene": {"mood": "balance", "colors": ["dark water", "silver moon"], "composition": "night scene", "camera": "still water", "description": "For the sharks they had their feast — visualized as a balance scene with dark water, silver moon tones, framed in night scene."}}
{"song": "Unknown Genre Track — Folk 91", "beat": 91, "lyric_line": "Folk scene description beat 91", "scene": {"mood": "story-driven", "colors": ["sepia", "forest green"], "composition": "candid", "camera": "steady handheld", "description": "[Folk, beat 91] story-driven — candid shot, steady handheld movement, sepia palette."}} {"song": "The Cargo", "artist": "Modern Folk Composition", "beat": 1, "timestamp": "0:00", "duration": "26s", "lyric_line": "The dockworker's hands are worn and tired", "scene": {"mood": "weariness", "colors": ["grease gray", "rust"], "composition": "close-up hands", "camera": "static", "description": "The dockworker's hands are worn and tired — visualized as a weariness scene with grease gray, rust tones, framed in close-up hands."}}
{"song": "Unknown Genre Track — Folk 92", "beat": 92, "lyric_line": "Folk scene description beat 92", "scene": {"mood": "intimate", "colors": ["earth brown", "cream"], "composition": "close-up", "camera": "steady handheld", "description": "[Folk, beat 92] intimate — close-up framing, organic steady handheld movement, tones of earth brown."}} {"song": "The Cargo", "artist": "Modern Folk Composition", "beat": 2, "timestamp": "0:26", "duration": "26s", "lyric_line": "He counts the crates beneath the sodium vapor", "scene": {"mood": "routine", "colors": ["yellow", "concrete"], "composition": "wide dock", "camera": "pan across", "description": "He counts the crates beneath the sodium vapor — visualized as a routine scene with yellow, concrete tones, framed in wide dock."}}
{"song": "Unknown Genre Track — Folk 93", "beat": 93, "lyric_line": "Folk scene description beat 93", "scene": {"mood": "raw", "colors": ["forest green", "cream"], "composition": "candid", "camera": "wide", "description": "[Folk, beat 93] raw — candid framing, organic wide movement, tones of forest green."}} {"song": "The Cargo", "artist": "Modern Folk Composition", "beat": 3, "timestamp": "0:52", "duration": "26s", "lyric_line": "Each box bears a foreign mark he can't read", "scene": {"mood": "alienation", "colors": ["cargo brown", "indigo"], "composition": "medium shot", "camera": "push in", "description": "Each box bears a foreign mark he can't read — visualized as a alienation scene with cargo brown, indigo tones, framed in medium shot."}}
{"song": "Unknown Genre Track — Folk 94", "beat": 94, "lyric_line": "Folk scene description beat 94", "scene": {"mood": "acoustic", "colors": ["earth brown", "cream"], "composition": "handheld", "camera": "static", "description": "[Folk, beat 94] acoustic — handheld shot, static movement, earth brown palette."}} {"song": "The Cargo", "artist": "Modern Folk Composition", "beat": 4, "timestamp": "1:18", "duration": "26s", "lyric_line": "His son's dreams are packed inside them somewhere", "scene": {"mood": "longing", "colors": ["hope blue", "cardboard"], "composition": "two-shot", "camera": "slow dolly", "description": "His son's dreams are packed inside them somewhere — visualized as a longing scene with hope blue, cardboard tones, framed in two-shot."}}
{"song": "Unknown Genre Track — Folk 95", "beat": 95, "lyric_line": "Folk scene description beat 95", "scene": {"mood": "intimate", "colors": ["cream", "ochre"], "composition": "handheld", "camera": "slow pan", "description": "[Folk, beat 95] intimate — handheld shot, slow pan movement, cream palette."}} {"song": "The Cargo", "artist": "Modern Folk Composition", "beat": 5, "timestamp": "1:44", "duration": "26s", "lyric_line": "The ship's horn blows at break of dawn", "scene": {"mood": "departure", "colors": ["fog horn gray", "morning gold"], "composition": "harbor wide", "camera": "pan to ship", "description": "The ship's horn blows at break of dawn — visualized as a departure scene with fog horn gray, morning gold tones, framed in harbor wide."}}
{"song": "Unknown Genre Track — Folk 96", "beat": 96, "lyric_line": "Folk scene description beat 96", "scene": {"mood": "raw", "colors": ["cream", "earth brown"], "composition": "natural light", "camera": "macro", "description": "[Folk, beat 96] raw — natural light shot, macro movement, cream palette."}} {"song": "The Cargo", "artist": "Modern Folk Composition", "beat": 6, "timestamp": "2:10", "duration": "26s", "lyric_line": "He'll do this work until his hands don't work", "scene": {"mood": "acceptance", "colors": ["iron", "ash"], "composition": "hands only", "camera": "static", "description": "He'll do this work until his hands don't work — visualized as a acceptance scene with iron, ash tones, framed in hands only."}}
{"song": "Unknown Genre Track — Folk 97", "beat": 97, "lyric_line": "Folk scene description beat 97", "scene": {"mood": "organic", "colors": ["cream", "earth brown"], "composition": "documentary", "camera": "static", "description": "[Folk, beat 97] organic — documentary framing, organic static movement, tones of cream."}} {"song": "The Cargo", "artist": "Modern Folk Composition", "beat": 7, "timestamp": "2:36", "duration": "26s", "lyric_line": "Sometimes he sings a song his father taught", "scene": {"mood": "memory", "colors": ["sepia", "cream"], "composition": "close-up face", "camera": "gentle zoom", "description": "Sometimes he sings a song his father taught — visualized as a memory scene with sepia, cream tones, framed in close-up face."}}
{"song": "Unknown Genre Track — Folk 98", "beat": 98, "lyric_line": "Folk scene description beat 98", "scene": {"mood": "organic", "colors": ["sepia", "cream"], "composition": "close-up", "camera": "slow pan", "description": "[Folk, beat 98] organic — close-up framing, organic slow pan movement, tones of sepia."}} {"song": "The Cargo", "artist": "Modern Folk Composition", "beat": 8, "timestamp": "3:02", "duration": "26s", "lyric_line": "The words are gone but the tune remains", "scene": {"mood": "nostalgia", "colors": ["dust", "sky blue"], "composition": "silhouetted", "camera": "soft focus", "description": "The words are gone but the tune remains — visualized as a nostalgia scene with dust, sky blue tones, framed in silhouetted."}}
{"song": "Unknown Genre Track — Folk 99", "beat": 99, "lyric_line": "Folk scene description beat 99", "scene": {"mood": "intimate", "colors": ["forest green", "sepia"], "composition": "close-up", "camera": "wide", "description": "[Folk, beat 99] intimate — close-up framing, organic wide movement, tones of forest green."}} {"song": "The Cargo", "artist": "Modern Folk Composition", "beat": 9, "timestamp": "3:28", "duration": "26s", "lyric_line": "One day his son will leave this place", "scene": {"mood": "hope", "colors": ["promise orange", "steel"], "composition": "looking toward", "camera": "dolly out", "description": "One day his son will leave this place — visualized as a hope scene with promise orange, steel tones, framed in looking toward."}}
{"song": "Unknown Genre Track — Folk 100", "beat": 100, "lyric_line": "Folk scene description beat 100", "scene": {"mood": "raw", "colors": ["forest green", "sepia"], "composition": "candid", "camera": "steady handheld", "description": "[Folk, beat 100] raw — candid shot, steady handheld movement, forest green palette."}} {"song": "The Cargo", "artist": "Modern Folk Composition", "beat": 10, "timestamp": "3:54", "duration": "26s", "lyric_line": "And the cargo will keep coming in", "scene": {"mood": "cyclical", "colors": ["industrial gray", "pressure red"], "composition": "wide pan", "camera": "endless loop", "description": "And the cargo will keep coming in — visualized as a cyclical scene with industrial gray, pressure red tones, framed in wide pan."}}

View File

@@ -1,101 +0,0 @@
#!/usr/bin/env python3
"""Generate 400 Deployment & Infra code pattern pairs for timmy-config#594."""
from __future__ import annotations
import argparse, json, random
from pathlib import Path
random.seed(594)
TEMPLATES = [
# vps-provisioning
("vps-provisioning", "Write a cloud-init config that provisions Ubuntu 22.04 with deploy user, SSH key auth, and auto updates.",
"#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]"),
("vps-provisioning", "Create a Terraform config for a DigitalOcean droplet (2GB) with SSH key.",
'terraform { required_providers { digitalocean={source="digitalocean/digitalocean",version="~>2.0"} } }\nresource "digitalocean_droplet" "web" { name="web-01"; region="nyc3"; size="s-2vcpu-2gb" }'),
("vps-provisioning", "Write an Ansible playbook to install packages and start nginx.",
"---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started"),
("vps-provisioning", "Bash script: create deploy user, install Docker, harden SSH.",
"#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config"),
("vps-provisioning", "Write a systemd drop-in to override service restart settings.",
"[Service]\nRestart=always\nRestartSec=5"),
("vps-provisioning", "Create a logrotate config for application logs.",
"/var/log/app/*.log { daily; rotate 7; compress; missingok }"),
("vps-provisioning", "Write a shell function that waits for a TCP port to become available on a remote host.",
'wait_for_port() { local h="$1" p="$2"; while ! nc -z "$h" "$p"; do sleep 1; done; }'),
("vps-provisioning", "Implement a script that sets up a Python virtualenv.",
"python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt"),
# nginx
("nginx", "Write nginx server block that serves static site and redirects HTTP to HTTPS.",
"server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}"),
("nginx", "Configure nginx as reverse proxy to backend on port 3000.",
"upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}"),
("nginx", "Write nginx rate limiting configuration for /api/ endpoint.",
"limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}"),
("nginx", "Create nginx config snippet that adds HSTS and CSP headers.",
'add_header Strict-Transport-Security "max-age=63072000" always;\nadd_header Content-Security-Policy "default-src \'self\'" always;'),
# systemd
("systemd", "Write a systemd service unit for a Python app as non-root, restart on failure.",
"[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target"),
("systemd", "Create a systemd timer that runs a backup script daily at 2:30 AM.",
"[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh"),
("systemd", "Write a systemd path unit that triggers a service when a config file changes.",
"[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh"),
# docker
("docker", "Write a multi-stage Dockerfile for Python FastAPI.",
"FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]"),
("docker", "Create a docker-compose.yml with web, postgres, and redis.",
"version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }"),
("docker", "Write a Dockerfile for Node.js production.",
"FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]"),
("docker", "Create a Docker network for app isolation.",
"docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest"),
# ssh
("ssh", "Write an SSH config for two host groups.",
"Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev"),
("ssh", "Create bash function for SSH tunnel forwarding PostgreSQL port.",
"ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }"),
("ssh", "Write a script that distributes SSH key to multiple servers.",
"for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone"),
("ssh", "Configure SSH to use a jump host for internal servers.",
"Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local"),
]
def vary_problem(base, idx):
p = ["Write code to","Implement","Create","Build","Configure","Set up"]
s = [" with error handling."," using best practices."," ensuring idempotency."," with logging."," for production."]
return f"{p[idx%len(p)]} {base.rstrip('.').lower()}{s[(idx//len(p))%len(s)]}"
def vary_solution(base, idx):
sol = base
if idx%3==0:
sol = sol.replace("log", "log_msg").replace("result", "data")
if idx%7==0:
sol = f"# Variation {idx}\n" + sol
return sol
def main():
ap = argparse.ArgumentParser(description="Generate 400 Deployment & Infra code pattern pairs")
ap.add_argument("-o","--output",default="training-data/code-patterns-deployment-infra.jsonl")
ap.add_argument("-n","--count",type=int,default=400)
args = ap.parse_args()
out = Path(args.output); out.parent.mkdir(parents=True,exist_ok=True)
pairs = []
for i in range(args.count):
tpl = TEMPLATES[i % len(TEMPLATES)]
pairs.append({
"problem": vary_problem(tpl[1], i),
"solution": vary_solution(tpl[2], i),
"imports": "",
"domain": tpl[0],
"id": f"deploy-infra-{i:04d}",
})
with open(out, "w", encoding="utf-8") as f:
for p in pairs:
f.write(json.dumps(p, ensure_ascii=False) + "\n")
from collections import Counter
cnt = Counter(p["domain"] for p in pairs)
print(f"Generated {len(pairs)} pairs → {out}")
print(f" Size: {out.stat().st_size/1024:.1f} KB")
for d,c in sorted(cnt.items(),key=lambda x:-x[1]): print(f" {d}: {c}")
if __name__ == "__main__":
main()

View File

@@ -1,400 +0,0 @@
{"problem": "Write code to write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates with error handling.", "solution": "# Variation 0\n#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0000"}
{"problem": "Implement create a terraform config for a digitalocean droplet (2gb) with ssh key with error handling.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0001"}
{"problem": "Create write an ansible playbook to install packages and start nginx with error handling.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0002"}
{"problem": "Build bash script: create deploy user, install docker, harden ssh with error handling.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0003"}
{"problem": "Configure write a systemd drop-in to override service restart settings with error handling.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0004"}
{"problem": "Set up create a logrotate config for application logs with error handling.", "solution": "/var/log/app/*.log { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0005"}
{"problem": "Write code to write a shell function that waits for a tcp port to become available on a remote host using best practices.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0006"}
{"problem": "Implement implement a script that sets up a python virtualenv using best practices.", "solution": "# Variation 7\npython3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0007"}
{"problem": "Create write nginx server block that serves static site and redirects http to https using best practices.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0008"}
{"problem": "Build configure nginx as reverse proxy to backend on port 3000 using best practices.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0009"}
{"problem": "Configure write nginx rate limiting configuration for /api/ endpoint using best practices.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0010"}
{"problem": "Set up create nginx config snippet that adds hsts and csp headers using best practices.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0011"}
{"problem": "Write code to write a systemd service unit for a python app as non-root, restart on failure ensuring idempotency.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0012"}
{"problem": "Implement create a systemd timer that runs a backup script daily at 2:30 am ensuring idempotency.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0013"}
{"problem": "Create write a systemd path unit that triggers a service when a config file changes ensuring idempotency.", "solution": "# Variation 14\n[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0014"}
{"problem": "Build write a multi-stage dockerfile for python fastapi ensuring idempotency.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0015"}
{"problem": "Configure create a docker-compose.yml with web, postgres, and redis ensuring idempotency.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0016"}
{"problem": "Set up write a dockerfile for node.js production ensuring idempotency.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0017"}
{"problem": "Write code to create a docker network for app isolation with logging.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0018"}
{"problem": "Implement write an ssh config for two host groups with logging.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0019"}
{"problem": "Create create bash function for ssh tunnel forwarding postgresql port with logging.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0020"}
{"problem": "Build write a script that distributes ssh key to multiple servers with logging.", "solution": "# Variation 21\nfor s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0021"}
{"problem": "Configure configure ssh to use a jump host for internal servers with logging.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0022"}
{"problem": "Set up write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates with logging.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0023"}
{"problem": "Write code to create a terraform config for a digitalocean droplet (2gb) with ssh key for production.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0024"}
{"problem": "Implement write an ansible playbook to install packages and start nginx for production.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0025"}
{"problem": "Create bash script: create deploy user, install docker, harden ssh for production.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0026"}
{"problem": "Build write a systemd drop-in to override service restart settings for production.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0027"}
{"problem": "Configure create a logrotate config for application logs for production.", "solution": "# Variation 28\n/var/log/app/*.log { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0028"}
{"problem": "Set up write a shell function that waits for a tcp port to become available on a remote host for production.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0029"}
{"problem": "Write code to implement a script that sets up a python virtualenv with error handling.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0030"}
{"problem": "Implement write nginx server block that serves static site and redirects http to https with error handling.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0031"}
{"problem": "Create configure nginx as reverse proxy to backend on port 3000 with error handling.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0032"}
{"problem": "Build write nginx rate limiting configuration for /api/ endpoint with error handling.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0033"}
{"problem": "Configure create nginx config snippet that adds hsts and csp headers with error handling.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0034"}
{"problem": "Set up write a systemd service unit for a python app as non-root, restart on failure with error handling.", "solution": "# Variation 35\n[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0035"}
{"problem": "Write code to create a systemd timer that runs a backup script daily at 2:30 am using best practices.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0036"}
{"problem": "Implement write a systemd path unit that triggers a service when a config file changes using best practices.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0037"}
{"problem": "Create write a multi-stage dockerfile for python fastapi using best practices.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0038"}
{"problem": "Build create a docker-compose.yml with web, postgres, and redis using best practices.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0039"}
{"problem": "Configure write a dockerfile for node.js production using best practices.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0040"}
{"problem": "Set up create a docker network for app isolation using best practices.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0041"}
{"problem": "Write code to write an ssh config for two host groups ensuring idempotency.", "solution": "# Variation 42\nHost prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0042"}
{"problem": "Implement create bash function for ssh tunnel forwarding postgresql port ensuring idempotency.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0043"}
{"problem": "Create write a script that distributes ssh key to multiple servers ensuring idempotency.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0044"}
{"problem": "Build configure ssh to use a jump host for internal servers ensuring idempotency.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0045"}
{"problem": "Configure write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates ensuring idempotency.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0046"}
{"problem": "Set up create a terraform config for a digitalocean droplet (2gb) with ssh key ensuring idempotency.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0047"}
{"problem": "Write code to write an ansible playbook to install packages and start nginx with logging.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0048"}
{"problem": "Implement bash script: create deploy user, install docker, harden ssh with logging.", "solution": "# Variation 49\n#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0049"}
{"problem": "Create write a systemd drop-in to override service restart settings with logging.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0050"}
{"problem": "Build create a logrotate config for application logs with logging.", "solution": "/var/log_msg/app/*.log_msg { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0051"}
{"problem": "Configure write a shell function that waits for a tcp port to become available on a remote host with logging.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0052"}
{"problem": "Set up implement a script that sets up a python virtualenv with logging.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0053"}
{"problem": "Write code to write nginx server block that serves static site and redirects http to https for production.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0054"}
{"problem": "Implement configure nginx as reverse proxy to backend on port 3000 for production.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0055"}
{"problem": "Create write nginx rate limiting configuration for /api/ endpoint for production.", "solution": "# Variation 56\nlimit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0056"}
{"problem": "Build create nginx config snippet that adds hsts and csp headers for production.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0057"}
{"problem": "Configure write a systemd service unit for a python app as non-root, restart on failure for production.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0058"}
{"problem": "Set up create a systemd timer that runs a backup script daily at 2:30 am for production.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0059"}
{"problem": "Write code to write a systemd path unit that triggers a service when a config file changes with error handling.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0060"}
{"problem": "Implement write a multi-stage dockerfile for python fastapi with error handling.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0061"}
{"problem": "Create create a docker-compose.yml with web, postgres, and redis with error handling.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0062"}
{"problem": "Build write a dockerfile for node.js production with error handling.", "solution": "# Variation 63\nFROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0063"}
{"problem": "Configure create a docker network for app isolation with error handling.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0064"}
{"problem": "Set up write an ssh config for two host groups with error handling.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0065"}
{"problem": "Write code to create bash function for ssh tunnel forwarding postgresql port using best practices.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0066"}
{"problem": "Implement write a script that distributes ssh key to multiple servers using best practices.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0067"}
{"problem": "Create configure ssh to use a jump host for internal servers using best practices.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0068"}
{"problem": "Build write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates using best practices.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0069"}
{"problem": "Configure create a terraform config for a digitalocean droplet (2gb) with ssh key using best practices.", "solution": "# Variation 70\nterraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0070"}
{"problem": "Set up write an ansible playbook to install packages and start nginx using best practices.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0071"}
{"problem": "Write code to bash script: create deploy user, install docker, harden ssh ensuring idempotency.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0072"}
{"problem": "Implement write a systemd drop-in to override service restart settings ensuring idempotency.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0073"}
{"problem": "Create create a logrotate config for application logs ensuring idempotency.", "solution": "/var/log/app/*.log { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0074"}
{"problem": "Build write a shell function that waits for a tcp port to become available on a remote host ensuring idempotency.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0075"}
{"problem": "Configure implement a script that sets up a python virtualenv ensuring idempotency.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0076"}
{"problem": "Set up write nginx server block that serves static site and redirects http to https ensuring idempotency.", "solution": "# Variation 77\nserver {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0077"}
{"problem": "Write code to configure nginx as reverse proxy to backend on port 3000 with logging.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0078"}
{"problem": "Implement write nginx rate limiting configuration for /api/ endpoint with logging.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0079"}
{"problem": "Create create nginx config snippet that adds hsts and csp headers with logging.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0080"}
{"problem": "Build write a systemd service unit for a python app as non-root, restart on failure with logging.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0081"}
{"problem": "Configure create a systemd timer that runs a backup script daily at 2:30 am with logging.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0082"}
{"problem": "Set up write a systemd path unit that triggers a service when a config file changes with logging.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0083"}
{"problem": "Write code to write a multi-stage dockerfile for python fastapi for production.", "solution": "# Variation 84\nFROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0084"}
{"problem": "Implement create a docker-compose.yml with web, postgres, and redis for production.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0085"}
{"problem": "Create write a dockerfile for node.js production for production.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0086"}
{"problem": "Build create a docker network for app isolation for production.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0087"}
{"problem": "Configure write an ssh config for two host groups for production.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0088"}
{"problem": "Set up create bash function for ssh tunnel forwarding postgresql port for production.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0089"}
{"problem": "Write code to write a script that distributes ssh key to multiple servers with error handling.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0090"}
{"problem": "Implement configure ssh to use a jump host for internal servers with error handling.", "solution": "# Variation 91\nHost internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0091"}
{"problem": "Create write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates with error handling.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0092"}
{"problem": "Build create a terraform config for a digitalocean droplet (2gb) with ssh key with error handling.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0093"}
{"problem": "Configure write an ansible playbook to install packages and start nginx with error handling.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0094"}
{"problem": "Set up bash script: create deploy user, install docker, harden ssh with error handling.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0095"}
{"problem": "Write code to write a systemd drop-in to override service restart settings using best practices.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0096"}
{"problem": "Implement create a logrotate config for application logs using best practices.", "solution": "/var/log/app/*.log { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0097"}
{"problem": "Create write a shell function that waits for a tcp port to become available on a remote host using best practices.", "solution": "# Variation 98\nwait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0098"}
{"problem": "Build implement a script that sets up a python virtualenv using best practices.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0099"}
{"problem": "Configure write nginx server block that serves static site and redirects http to https using best practices.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0100"}
{"problem": "Set up configure nginx as reverse proxy to backend on port 3000 using best practices.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0101"}
{"problem": "Write code to write nginx rate limiting configuration for /api/ endpoint ensuring idempotency.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0102"}
{"problem": "Implement create nginx config snippet that adds hsts and csp headers ensuring idempotency.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0103"}
{"problem": "Create write a systemd service unit for a python app as non-root, restart on failure ensuring idempotency.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0104"}
{"problem": "Build create a systemd timer that runs a backup script daily at 2:30 am ensuring idempotency.", "solution": "# Variation 105\n[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0105"}
{"problem": "Configure write a systemd path unit that triggers a service when a config file changes ensuring idempotency.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0106"}
{"problem": "Set up write a multi-stage dockerfile for python fastapi ensuring idempotency.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0107"}
{"problem": "Write code to create a docker-compose.yml with web, postgres, and redis with logging.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0108"}
{"problem": "Implement write a dockerfile for node.js production with logging.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0109"}
{"problem": "Create create a docker network for app isolation with logging.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0110"}
{"problem": "Build write an ssh config for two host groups with logging.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0111"}
{"problem": "Configure create bash function for ssh tunnel forwarding postgresql port with logging.", "solution": "# Variation 112\nssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0112"}
{"problem": "Set up write a script that distributes ssh key to multiple servers with logging.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0113"}
{"problem": "Write code to configure ssh to use a jump host for internal servers for production.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0114"}
{"problem": "Implement write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates for production.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0115"}
{"problem": "Create create a terraform config for a digitalocean droplet (2gb) with ssh key for production.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0116"}
{"problem": "Build write an ansible playbook to install packages and start nginx for production.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0117"}
{"problem": "Configure bash script: create deploy user, install docker, harden ssh for production.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0118"}
{"problem": "Set up write a systemd drop-in to override service restart settings for production.", "solution": "# Variation 119\n[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0119"}
{"problem": "Write code to create a logrotate config for application logs with error handling.", "solution": "/var/log_msg/app/*.log_msg { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0120"}
{"problem": "Implement write a shell function that waits for a tcp port to become available on a remote host with error handling.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0121"}
{"problem": "Create implement a script that sets up a python virtualenv with error handling.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0122"}
{"problem": "Build write nginx server block that serves static site and redirects http to https with error handling.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0123"}
{"problem": "Configure configure nginx as reverse proxy to backend on port 3000 with error handling.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0124"}
{"problem": "Set up write nginx rate limiting configuration for /api/ endpoint with error handling.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0125"}
{"problem": "Write code to create nginx config snippet that adds hsts and csp headers using best practices.", "solution": "# Variation 126\nadd_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0126"}
{"problem": "Implement write a systemd service unit for a python app as non-root, restart on failure using best practices.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0127"}
{"problem": "Create create a systemd timer that runs a backup script daily at 2:30 am using best practices.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0128"}
{"problem": "Build write a systemd path unit that triggers a service when a config file changes using best practices.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0129"}
{"problem": "Configure write a multi-stage dockerfile for python fastapi using best practices.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0130"}
{"problem": "Set up create a docker-compose.yml with web, postgres, and redis using best practices.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0131"}
{"problem": "Write code to write a dockerfile for node.js production ensuring idempotency.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0132"}
{"problem": "Implement create a docker network for app isolation ensuring idempotency.", "solution": "# Variation 133\ndocker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0133"}
{"problem": "Create write an ssh config for two host groups ensuring idempotency.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0134"}
{"problem": "Build create bash function for ssh tunnel forwarding postgresql port ensuring idempotency.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0135"}
{"problem": "Configure write a script that distributes ssh key to multiple servers ensuring idempotency.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0136"}
{"problem": "Set up configure ssh to use a jump host for internal servers ensuring idempotency.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0137"}
{"problem": "Write code to write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates with logging.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0138"}
{"problem": "Implement create a terraform config for a digitalocean droplet (2gb) with ssh key with logging.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0139"}
{"problem": "Create write an ansible playbook to install packages and start nginx with logging.", "solution": "# Variation 140\n---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0140"}
{"problem": "Build bash script: create deploy user, install docker, harden ssh with logging.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0141"}
{"problem": "Configure write a systemd drop-in to override service restart settings with logging.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0142"}
{"problem": "Set up create a logrotate config for application logs with logging.", "solution": "/var/log/app/*.log { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0143"}
{"problem": "Write code to write a shell function that waits for a tcp port to become available on a remote host for production.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0144"}
{"problem": "Implement implement a script that sets up a python virtualenv for production.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0145"}
{"problem": "Create write nginx server block that serves static site and redirects http to https for production.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0146"}
{"problem": "Build configure nginx as reverse proxy to backend on port 3000 for production.", "solution": "# Variation 147\nupstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0147"}
{"problem": "Configure write nginx rate limiting configuration for /api/ endpoint for production.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0148"}
{"problem": "Set up create nginx config snippet that adds hsts and csp headers for production.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0149"}
{"problem": "Write code to write a systemd service unit for a python app as non-root, restart on failure with error handling.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0150"}
{"problem": "Implement create a systemd timer that runs a backup script daily at 2:30 am with error handling.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0151"}
{"problem": "Create write a systemd path unit that triggers a service when a config file changes with error handling.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0152"}
{"problem": "Build write a multi-stage dockerfile for python fastapi with error handling.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0153"}
{"problem": "Configure create a docker-compose.yml with web, postgres, and redis with error handling.", "solution": "# Variation 154\nversion: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0154"}
{"problem": "Set up write a dockerfile for node.js production with error handling.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0155"}
{"problem": "Write code to create a docker network for app isolation using best practices.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0156"}
{"problem": "Implement write an ssh config for two host groups using best practices.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0157"}
{"problem": "Create create bash function for ssh tunnel forwarding postgresql port using best practices.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0158"}
{"problem": "Build write a script that distributes ssh key to multiple servers using best practices.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0159"}
{"problem": "Configure configure ssh to use a jump host for internal servers using best practices.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0160"}
{"problem": "Set up write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates using best practices.", "solution": "# Variation 161\n#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0161"}
{"problem": "Write code to create a terraform config for a digitalocean droplet (2gb) with ssh key ensuring idempotency.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0162"}
{"problem": "Implement write an ansible playbook to install packages and start nginx ensuring idempotency.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0163"}
{"problem": "Create bash script: create deploy user, install docker, harden ssh ensuring idempotency.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0164"}
{"problem": "Build write a systemd drop-in to override service restart settings ensuring idempotency.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0165"}
{"problem": "Configure create a logrotate config for application logs ensuring idempotency.", "solution": "/var/log/app/*.log { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0166"}
{"problem": "Set up write a shell function that waits for a tcp port to become available on a remote host ensuring idempotency.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0167"}
{"problem": "Write code to implement a script that sets up a python virtualenv with logging.", "solution": "# Variation 168\npython3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0168"}
{"problem": "Implement write nginx server block that serves static site and redirects http to https with logging.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0169"}
{"problem": "Create configure nginx as reverse proxy to backend on port 3000 with logging.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0170"}
{"problem": "Build write nginx rate limiting configuration for /api/ endpoint with logging.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0171"}
{"problem": "Configure create nginx config snippet that adds hsts and csp headers with logging.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0172"}
{"problem": "Set up write a systemd service unit for a python app as non-root, restart on failure with logging.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0173"}
{"problem": "Write code to create a systemd timer that runs a backup script daily at 2:30 am for production.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0174"}
{"problem": "Implement write a systemd path unit that triggers a service when a config file changes for production.", "solution": "# Variation 175\n[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0175"}
{"problem": "Create write a multi-stage dockerfile for python fastapi for production.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0176"}
{"problem": "Build create a docker-compose.yml with web, postgres, and redis for production.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0177"}
{"problem": "Configure write a dockerfile for node.js production for production.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0178"}
{"problem": "Set up create a docker network for app isolation for production.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0179"}
{"problem": "Write code to write an ssh config for two host groups with error handling.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0180"}
{"problem": "Implement create bash function for ssh tunnel forwarding postgresql port with error handling.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0181"}
{"problem": "Create write a script that distributes ssh key to multiple servers with error handling.", "solution": "# Variation 182\nfor s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0182"}
{"problem": "Build configure ssh to use a jump host for internal servers with error handling.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0183"}
{"problem": "Configure write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates with error handling.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0184"}
{"problem": "Set up create a terraform config for a digitalocean droplet (2gb) with ssh key with error handling.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0185"}
{"problem": "Write code to write an ansible playbook to install packages and start nginx using best practices.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0186"}
{"problem": "Implement bash script: create deploy user, install docker, harden ssh using best practices.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0187"}
{"problem": "Create write a systemd drop-in to override service restart settings using best practices.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0188"}
{"problem": "Build create a logrotate config for application logs using best practices.", "solution": "# Variation 189\n/var/log_msg/app/*.log_msg { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0189"}
{"problem": "Configure write a shell function that waits for a tcp port to become available on a remote host using best practices.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0190"}
{"problem": "Set up implement a script that sets up a python virtualenv using best practices.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0191"}
{"problem": "Write code to write nginx server block that serves static site and redirects http to https ensuring idempotency.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0192"}
{"problem": "Implement configure nginx as reverse proxy to backend on port 3000 ensuring idempotency.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0193"}
{"problem": "Create write nginx rate limiting configuration for /api/ endpoint ensuring idempotency.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0194"}
{"problem": "Build create nginx config snippet that adds hsts and csp headers ensuring idempotency.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0195"}
{"problem": "Configure write a systemd service unit for a python app as non-root, restart on failure ensuring idempotency.", "solution": "# Variation 196\n[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0196"}
{"problem": "Set up create a systemd timer that runs a backup script daily at 2:30 am ensuring idempotency.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0197"}
{"problem": "Write code to write a systemd path unit that triggers a service when a config file changes with logging.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0198"}
{"problem": "Implement write a multi-stage dockerfile for python fastapi with logging.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0199"}
{"problem": "Create create a docker-compose.yml with web, postgres, and redis with logging.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0200"}
{"problem": "Build write a dockerfile for node.js production with logging.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0201"}
{"problem": "Configure create a docker network for app isolation with logging.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0202"}
{"problem": "Set up write an ssh config for two host groups with logging.", "solution": "# Variation 203\nHost prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0203"}
{"problem": "Write code to create bash function for ssh tunnel forwarding postgresql port for production.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0204"}
{"problem": "Implement write a script that distributes ssh key to multiple servers for production.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0205"}
{"problem": "Create configure ssh to use a jump host for internal servers for production.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0206"}
{"problem": "Build write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates for production.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0207"}
{"problem": "Configure create a terraform config for a digitalocean droplet (2gb) with ssh key for production.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0208"}
{"problem": "Set up write an ansible playbook to install packages and start nginx for production.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0209"}
{"problem": "Write code to bash script: create deploy user, install docker, harden ssh with error handling.", "solution": "# Variation 210\n#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0210"}
{"problem": "Implement write a systemd drop-in to override service restart settings with error handling.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0211"}
{"problem": "Create create a logrotate config for application logs with error handling.", "solution": "/var/log/app/*.log { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0212"}
{"problem": "Build write a shell function that waits for a tcp port to become available on a remote host with error handling.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0213"}
{"problem": "Configure implement a script that sets up a python virtualenv with error handling.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0214"}
{"problem": "Set up write nginx server block that serves static site and redirects http to https with error handling.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0215"}
{"problem": "Write code to configure nginx as reverse proxy to backend on port 3000 using best practices.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0216"}
{"problem": "Implement write nginx rate limiting configuration for /api/ endpoint using best practices.", "solution": "# Variation 217\nlimit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0217"}
{"problem": "Create create nginx config snippet that adds hsts and csp headers using best practices.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0218"}
{"problem": "Build write a systemd service unit for a python app as non-root, restart on failure using best practices.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0219"}
{"problem": "Configure create a systemd timer that runs a backup script daily at 2:30 am using best practices.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0220"}
{"problem": "Set up write a systemd path unit that triggers a service when a config file changes using best practices.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0221"}
{"problem": "Write code to write a multi-stage dockerfile for python fastapi ensuring idempotency.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0222"}
{"problem": "Implement create a docker-compose.yml with web, postgres, and redis ensuring idempotency.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0223"}
{"problem": "Create write a dockerfile for node.js production ensuring idempotency.", "solution": "# Variation 224\nFROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0224"}
{"problem": "Build create a docker network for app isolation ensuring idempotency.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0225"}
{"problem": "Configure write an ssh config for two host groups ensuring idempotency.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0226"}
{"problem": "Set up create bash function for ssh tunnel forwarding postgresql port ensuring idempotency.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0227"}
{"problem": "Write code to write a script that distributes ssh key to multiple servers with logging.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0228"}
{"problem": "Implement configure ssh to use a jump host for internal servers with logging.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0229"}
{"problem": "Create write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates with logging.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0230"}
{"problem": "Build create a terraform config for a digitalocean droplet (2gb) with ssh key with logging.", "solution": "# Variation 231\nterraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0231"}
{"problem": "Configure write an ansible playbook to install packages and start nginx with logging.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0232"}
{"problem": "Set up bash script: create deploy user, install docker, harden ssh with logging.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0233"}
{"problem": "Write code to write a systemd drop-in to override service restart settings for production.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0234"}
{"problem": "Implement create a logrotate config for application logs for production.", "solution": "/var/log/app/*.log { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0235"}
{"problem": "Create write a shell function that waits for a tcp port to become available on a remote host for production.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0236"}
{"problem": "Build implement a script that sets up a python virtualenv for production.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0237"}
{"problem": "Configure write nginx server block that serves static site and redirects http to https for production.", "solution": "# Variation 238\nserver {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0238"}
{"problem": "Set up configure nginx as reverse proxy to backend on port 3000 for production.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0239"}
{"problem": "Write code to write nginx rate limiting configuration for /api/ endpoint with error handling.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0240"}
{"problem": "Implement create nginx config snippet that adds hsts and csp headers with error handling.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0241"}
{"problem": "Create write a systemd service unit for a python app as non-root, restart on failure with error handling.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0242"}
{"problem": "Build create a systemd timer that runs a backup script daily at 2:30 am with error handling.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0243"}
{"problem": "Configure write a systemd path unit that triggers a service when a config file changes with error handling.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0244"}
{"problem": "Set up write a multi-stage dockerfile for python fastapi with error handling.", "solution": "# Variation 245\nFROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0245"}
{"problem": "Write code to create a docker-compose.yml with web, postgres, and redis using best practices.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0246"}
{"problem": "Implement write a dockerfile for node.js production using best practices.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0247"}
{"problem": "Create create a docker network for app isolation using best practices.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0248"}
{"problem": "Build write an ssh config for two host groups using best practices.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0249"}
{"problem": "Configure create bash function for ssh tunnel forwarding postgresql port using best practices.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0250"}
{"problem": "Set up write a script that distributes ssh key to multiple servers using best practices.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0251"}
{"problem": "Write code to configure ssh to use a jump host for internal servers ensuring idempotency.", "solution": "# Variation 252\nHost internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0252"}
{"problem": "Implement write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates ensuring idempotency.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0253"}
{"problem": "Create create a terraform config for a digitalocean droplet (2gb) with ssh key ensuring idempotency.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0254"}
{"problem": "Build write an ansible playbook to install packages and start nginx ensuring idempotency.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0255"}
{"problem": "Configure bash script: create deploy user, install docker, harden ssh ensuring idempotency.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0256"}
{"problem": "Set up write a systemd drop-in to override service restart settings ensuring idempotency.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0257"}
{"problem": "Write code to create a logrotate config for application logs with logging.", "solution": "/var/log_msg/app/*.log_msg { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0258"}
{"problem": "Implement write a shell function that waits for a tcp port to become available on a remote host with logging.", "solution": "# Variation 259\nwait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0259"}
{"problem": "Create implement a script that sets up a python virtualenv with logging.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0260"}
{"problem": "Build write nginx server block that serves static site and redirects http to https with logging.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0261"}
{"problem": "Configure configure nginx as reverse proxy to backend on port 3000 with logging.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0262"}
{"problem": "Set up write nginx rate limiting configuration for /api/ endpoint with logging.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0263"}
{"problem": "Write code to create nginx config snippet that adds hsts and csp headers for production.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0264"}
{"problem": "Implement write a systemd service unit for a python app as non-root, restart on failure for production.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0265"}
{"problem": "Create create a systemd timer that runs a backup script daily at 2:30 am for production.", "solution": "# Variation 266\n[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0266"}
{"problem": "Build write a systemd path unit that triggers a service when a config file changes for production.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0267"}
{"problem": "Configure write a multi-stage dockerfile for python fastapi for production.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0268"}
{"problem": "Set up create a docker-compose.yml with web, postgres, and redis for production.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0269"}
{"problem": "Write code to write a dockerfile for node.js production with error handling.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0270"}
{"problem": "Implement create a docker network for app isolation with error handling.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0271"}
{"problem": "Create write an ssh config for two host groups with error handling.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0272"}
{"problem": "Build create bash function for ssh tunnel forwarding postgresql port with error handling.", "solution": "# Variation 273\nssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0273"}
{"problem": "Configure write a script that distributes ssh key to multiple servers with error handling.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0274"}
{"problem": "Set up configure ssh to use a jump host for internal servers with error handling.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0275"}
{"problem": "Write code to write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates using best practices.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0276"}
{"problem": "Implement create a terraform config for a digitalocean droplet (2gb) with ssh key using best practices.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0277"}
{"problem": "Create write an ansible playbook to install packages and start nginx using best practices.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0278"}
{"problem": "Build bash script: create deploy user, install docker, harden ssh using best practices.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0279"}
{"problem": "Configure write a systemd drop-in to override service restart settings using best practices.", "solution": "# Variation 280\n[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0280"}
{"problem": "Set up create a logrotate config for application logs using best practices.", "solution": "/var/log/app/*.log { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0281"}
{"problem": "Write code to write a shell function that waits for a tcp port to become available on a remote host ensuring idempotency.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0282"}
{"problem": "Implement implement a script that sets up a python virtualenv ensuring idempotency.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0283"}
{"problem": "Create write nginx server block that serves static site and redirects http to https ensuring idempotency.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0284"}
{"problem": "Build configure nginx as reverse proxy to backend on port 3000 ensuring idempotency.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0285"}
{"problem": "Configure write nginx rate limiting configuration for /api/ endpoint ensuring idempotency.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0286"}
{"problem": "Set up create nginx config snippet that adds hsts and csp headers ensuring idempotency.", "solution": "# Variation 287\nadd_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0287"}
{"problem": "Write code to write a systemd service unit for a python app as non-root, restart on failure with logging.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0288"}
{"problem": "Implement create a systemd timer that runs a backup script daily at 2:30 am with logging.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0289"}
{"problem": "Create write a systemd path unit that triggers a service when a config file changes with logging.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0290"}
{"problem": "Build write a multi-stage dockerfile for python fastapi with logging.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0291"}
{"problem": "Configure create a docker-compose.yml with web, postgres, and redis with logging.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0292"}
{"problem": "Set up write a dockerfile for node.js production with logging.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0293"}
{"problem": "Write code to create a docker network for app isolation for production.", "solution": "# Variation 294\ndocker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0294"}
{"problem": "Implement write an ssh config for two host groups for production.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0295"}
{"problem": "Create create bash function for ssh tunnel forwarding postgresql port for production.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0296"}
{"problem": "Build write a script that distributes ssh key to multiple servers for production.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0297"}
{"problem": "Configure configure ssh to use a jump host for internal servers for production.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0298"}
{"problem": "Set up write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates for production.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0299"}
{"problem": "Write code to create a terraform config for a digitalocean droplet (2gb) with ssh key with error handling.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0300"}
{"problem": "Implement write an ansible playbook to install packages and start nginx with error handling.", "solution": "# Variation 301\n---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0301"}
{"problem": "Create bash script: create deploy user, install docker, harden ssh with error handling.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0302"}
{"problem": "Build write a systemd drop-in to override service restart settings with error handling.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0303"}
{"problem": "Configure create a logrotate config for application logs with error handling.", "solution": "/var/log/app/*.log { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0304"}
{"problem": "Set up write a shell function that waits for a tcp port to become available on a remote host with error handling.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0305"}
{"problem": "Write code to implement a script that sets up a python virtualenv using best practices.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0306"}
{"problem": "Implement write nginx server block that serves static site and redirects http to https using best practices.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0307"}
{"problem": "Create configure nginx as reverse proxy to backend on port 3000 using best practices.", "solution": "# Variation 308\nupstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0308"}
{"problem": "Build write nginx rate limiting configuration for /api/ endpoint using best practices.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0309"}
{"problem": "Configure create nginx config snippet that adds hsts and csp headers using best practices.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0310"}
{"problem": "Set up write a systemd service unit for a python app as non-root, restart on failure using best practices.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0311"}
{"problem": "Write code to create a systemd timer that runs a backup script daily at 2:30 am ensuring idempotency.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0312"}
{"problem": "Implement write a systemd path unit that triggers a service when a config file changes ensuring idempotency.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0313"}
{"problem": "Create write a multi-stage dockerfile for python fastapi ensuring idempotency.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0314"}
{"problem": "Build create a docker-compose.yml with web, postgres, and redis ensuring idempotency.", "solution": "# Variation 315\nversion: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0315"}
{"problem": "Configure write a dockerfile for node.js production ensuring idempotency.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0316"}
{"problem": "Set up create a docker network for app isolation ensuring idempotency.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0317"}
{"problem": "Write code to write an ssh config for two host groups with logging.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0318"}
{"problem": "Implement create bash function for ssh tunnel forwarding postgresql port with logging.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0319"}
{"problem": "Create write a script that distributes ssh key to multiple servers with logging.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0320"}
{"problem": "Build configure ssh to use a jump host for internal servers with logging.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0321"}
{"problem": "Configure write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates with logging.", "solution": "# Variation 322\n#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0322"}
{"problem": "Set up create a terraform config for a digitalocean droplet (2gb) with ssh key with logging.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0323"}
{"problem": "Write code to write an ansible playbook to install packages and start nginx for production.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0324"}
{"problem": "Implement bash script: create deploy user, install docker, harden ssh for production.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0325"}
{"problem": "Create write a systemd drop-in to override service restart settings for production.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0326"}
{"problem": "Build create a logrotate config for application logs for production.", "solution": "/var/log_msg/app/*.log_msg { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0327"}
{"problem": "Configure write a shell function that waits for a tcp port to become available on a remote host for production.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0328"}
{"problem": "Set up implement a script that sets up a python virtualenv for production.", "solution": "# Variation 329\npython3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0329"}
{"problem": "Write code to write nginx server block that serves static site and redirects http to https with error handling.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0330"}
{"problem": "Implement configure nginx as reverse proxy to backend on port 3000 with error handling.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0331"}
{"problem": "Create write nginx rate limiting configuration for /api/ endpoint with error handling.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0332"}
{"problem": "Build create nginx config snippet that adds hsts and csp headers with error handling.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0333"}
{"problem": "Configure write a systemd service unit for a python app as non-root, restart on failure with error handling.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0334"}
{"problem": "Set up create a systemd timer that runs a backup script daily at 2:30 am with error handling.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0335"}
{"problem": "Write code to write a systemd path unit that triggers a service when a config file changes using best practices.", "solution": "# Variation 336\n[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0336"}
{"problem": "Implement write a multi-stage dockerfile for python fastapi using best practices.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0337"}
{"problem": "Create create a docker-compose.yml with web, postgres, and redis using best practices.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0338"}
{"problem": "Build write a dockerfile for node.js production using best practices.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0339"}
{"problem": "Configure create a docker network for app isolation using best practices.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0340"}
{"problem": "Set up write an ssh config for two host groups using best practices.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0341"}
{"problem": "Write code to create bash function for ssh tunnel forwarding postgresql port ensuring idempotency.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0342"}
{"problem": "Implement write a script that distributes ssh key to multiple servers ensuring idempotency.", "solution": "# Variation 343\nfor s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0343"}
{"problem": "Create configure ssh to use a jump host for internal servers ensuring idempotency.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0344"}
{"problem": "Build write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates ensuring idempotency.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0345"}
{"problem": "Configure create a terraform config for a digitalocean droplet (2gb) with ssh key ensuring idempotency.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0346"}
{"problem": "Set up write an ansible playbook to install packages and start nginx ensuring idempotency.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0347"}
{"problem": "Write code to bash script: create deploy user, install docker, harden ssh with logging.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0348"}
{"problem": "Implement write a systemd drop-in to override service restart settings with logging.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0349"}
{"problem": "Create create a logrotate config for application logs with logging.", "solution": "# Variation 350\n/var/log/app/*.log { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0350"}
{"problem": "Build write a shell function that waits for a tcp port to become available on a remote host with logging.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0351"}
{"problem": "Configure implement a script that sets up a python virtualenv with logging.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0352"}
{"problem": "Set up write nginx server block that serves static site and redirects http to https with logging.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0353"}
{"problem": "Write code to configure nginx as reverse proxy to backend on port 3000 for production.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0354"}
{"problem": "Implement write nginx rate limiting configuration for /api/ endpoint for production.", "solution": "limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0355"}
{"problem": "Create create nginx config snippet that adds hsts and csp headers for production.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0356"}
{"problem": "Build write a systemd service unit for a python app as non-root, restart on failure for production.", "solution": "# Variation 357\n[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0357"}
{"problem": "Configure create a systemd timer that runs a backup script daily at 2:30 am for production.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0358"}
{"problem": "Set up write a systemd path unit that triggers a service when a config file changes for production.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0359"}
{"problem": "Write code to write a multi-stage dockerfile for python fastapi with error handling.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0360"}
{"problem": "Implement create a docker-compose.yml with web, postgres, and redis with error handling.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0361"}
{"problem": "Create write a dockerfile for node.js production with error handling.", "solution": "FROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0362"}
{"problem": "Build create a docker network for app isolation with error handling.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0363"}
{"problem": "Configure write an ssh config for two host groups with error handling.", "solution": "# Variation 364\nHost prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0364"}
{"problem": "Set up create bash function for ssh tunnel forwarding postgresql port with error handling.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0365"}
{"problem": "Write code to write a script that distributes ssh key to multiple servers using best practices.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0366"}
{"problem": "Implement configure ssh to use a jump host for internal servers using best practices.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0367"}
{"problem": "Create write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates using best practices.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0368"}
{"problem": "Build create a terraform config for a digitalocean droplet (2gb) with ssh key using best practices.", "solution": "terraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0369"}
{"problem": "Configure write an ansible playbook to install packages and start nginx using best practices.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0370"}
{"problem": "Set up bash script: create deploy user, install docker, harden ssh using best practices.", "solution": "# Variation 371\n#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0371"}
{"problem": "Write code to write a systemd drop-in to override service restart settings ensuring idempotency.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0372"}
{"problem": "Implement create a logrotate config for application logs ensuring idempotency.", "solution": "/var/log/app/*.log { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0373"}
{"problem": "Create write a shell function that waits for a tcp port to become available on a remote host ensuring idempotency.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0374"}
{"problem": "Build implement a script that sets up a python virtualenv ensuring idempotency.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0375"}
{"problem": "Configure write nginx server block that serves static site and redirects http to https ensuring idempotency.", "solution": "server {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0376"}
{"problem": "Set up configure nginx as reverse proxy to backend on port 3000 ensuring idempotency.", "solution": "upstream app { server 127.0.0.1:3000; }\nserver {\n listen 80; server_name app.example.com;\n location / {\n proxy_pass http:app;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0377"}
{"problem": "Write code to write nginx rate limiting configuration for /api/ endpoint with logging.", "solution": "# Variation 378\nlimit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;\nserver {\n location /api/ { limit_req zone=api burst=20 nodelay; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0378"}
{"problem": "Implement create nginx config snippet that adds hsts and csp headers with logging.", "solution": "add_header Strict-Transport-Security \"max-age=63072000\" always;\nadd_header Content-Security-Policy \"default-src 'self'\" always;", "imports": "", "domain": "nginx", "id": "deploy-infra-0379"}
{"problem": "Create write a systemd service unit for a python app as non-root, restart on failure with logging.", "solution": "[Unit]\nDescription=My Python App\nAfter=network.target\n\n[Service]\nType=simple\nUser=deploy\nWorkingDirectory=/opt/app\nExecStart=/opt/app/venv/bin/gunicorn -w 4 -b 0.0.0.0:8000 app:app\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target", "imports": "", "domain": "systemd", "id": "deploy-infra-0380"}
{"problem": "Build create a systemd timer that runs a backup script daily at 2:30 am with logging.", "solution": "[Timer]\nOnCalendar=*-*-* 02:30:00\nPersistent=true\nUnit=backup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/backup.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0381"}
{"problem": "Configure write a systemd path unit that triggers a service when a config file changes with logging.", "solution": "[Path]\nPathModified=/etc/app/config.yaml\nUnit=config-reload.service\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/reload.sh", "imports": "", "domain": "systemd", "id": "deploy-infra-0382"}
{"problem": "Set up write a multi-stage dockerfile for python fastapi with logging.", "solution": "FROM python:3.12-slim AS builder\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --user --no-cache-dir -r requirements.txt\n\nFROM python:3.12-slim\nWORKDIR /app\nCOPY --from=builder /root/.local /root/.local\nCOPY . .\nCMD [\"uvicorn\", \"main:app\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0383"}
{"problem": "Write code to create a docker-compose.yml with web, postgres, and redis for production.", "solution": "version: \"3.9\"\nservices:\n postgres: { image: postgres:15-alpine, environment: { POSTGRES_PASSWORD: \"secret\" }, volumes: [\"pgdata:/var/lib/postgresql/data\"] }\n redis: { image: redis:7-alpine }\n web: { build: ., ports: [\"8000:8000\"], depends_on: { postgres: {condition: service_healthy} } }\nvolumes: { pgdata: }", "imports": "", "domain": "docker", "id": "deploy-infra-0384"}
{"problem": "Implement write a dockerfile for node.js production for production.", "solution": "# Variation 385\nFROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json .\nRUN npm ci --only=production\n\nFROM node:18-alpine\nENV NODE_ENV=production\nCOPY --from=builder /node_modules ./node_modules\nCOPY . .\nUSER nodejs\nCMD [\"node\", \"server.js\"]", "imports": "", "domain": "docker", "id": "deploy-infra-0385"}
{"problem": "Create create a docker network for app isolation for production.", "solution": "docker network create --driver bridge --subnet 172.20.0.0/16 app-net\ndocker run -d --name db --network app-net postgres:15\ndocker run -d --name api --network app-net myapp:latest", "imports": "", "domain": "docker", "id": "deploy-infra-0386"}
{"problem": "Build write an ssh config for two host groups for production.", "solution": "Host prod-*\n HostName %h.example.com\n User deploy\n IdentityFile ~/.ssh/id_rsa_prod\nHost dev-*\n HostName dev.example.com\n User dev\n IdentityFile ~/.ssh/id_rsa_dev", "imports": "", "domain": "ssh", "id": "deploy-infra-0387"}
{"problem": "Configure create bash function for ssh tunnel forwarding postgresql port for production.", "solution": "ssh_postgres_tunnel() { ssh -fN -L \"${3:-55432}:localhost:${2:-5432}\" \"${1:-prod-db.example.com}\" -o ExitOnForwardFailure=yes; }", "imports": "", "domain": "ssh", "id": "deploy-infra-0388"}
{"problem": "Set up write a script that distributes ssh key to multiple servers for production.", "solution": "for s in web01 web02 db01; do\n ssh-copy-id -i ~/.ssh/id_rsa.pub deploy@${s}.example.com 2>/dev/null && echo \"✓ $s\"\ndone", "imports": "", "domain": "ssh", "id": "deploy-infra-0389"}
{"problem": "Write code to configure ssh to use a jump host for internal servers with error handling.", "solution": "Host internal-*\n ProxyJump jump.example.com\n HostName %h.internal.local", "imports": "", "domain": "ssh", "id": "deploy-infra-0390"}
{"problem": "Implement write a cloud-init config that provisions ubuntu 22.04 with deploy user, ssh key auth, and auto updates with error handling.", "solution": "#cloud-config\nusers: [{name: deploy, groups: [sudo], shell: /bin/bash, ssh_authorized_keys: [ssh-rsa AAA...]}]\npackage_update: true\npackages: [ufw, fail2ban]", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0391"}
{"problem": "Create create a terraform config for a digitalocean droplet (2gb) with ssh key with error handling.", "solution": "# Variation 392\nterraform { required_providers { digitalocean={source=\"digitalocean/digitalocean\",version=\"~>2.0\"} } }\nresource \"digitalocean_droplet\" \"web\" { name=\"web-01\"; region=\"nyc3\"; size=\"s-2vcpu-2gb\" }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0392"}
{"problem": "Build write an ansible playbook to install packages and start nginx with error handling.", "solution": "---\n- hosts: all\n become: true\n tasks:\n - apt: name=[ufw,nginx] state=present\n - systemd: name=nginx enabled=true state=started", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0393"}
{"problem": "Configure bash script: create deploy user, install docker, harden ssh with error handling.", "solution": "#!/usr/bin/env bash\nset -euo pipefail\nid -u deploy &>/dev/null || useradd -m -s /bin/bash deploy\n[[ -x $(command -v docker) ]] || curl -fsSL https://get.docker.com | sh\nsed -i 's/^PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0394"}
{"problem": "Set up write a systemd drop-in to override service restart settings with error handling.", "solution": "[Service]\nRestart=always\nRestartSec=5", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0395"}
{"problem": "Write code to create a logrotate config for application logs using best practices.", "solution": "/var/log_msg/app/*.log_msg { daily; rotate 7; compress; missingok }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0396"}
{"problem": "Implement write a shell function that waits for a tcp port to become available on a remote host using best practices.", "solution": "wait_for_port() { local h=\"$1\" p=\"$2\"; while ! nc -z \"$h\" \"$p\"; do sleep 1; done; }", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0397"}
{"problem": "Create implement a script that sets up a python virtualenv using best practices.", "solution": "python3 -m venv /opt/app/venv\nsource /opt/app/venv/bin/activate\npip install -r requirements.txt", "imports": "", "domain": "vps-provisioning", "id": "deploy-infra-0398"}
{"problem": "Build write nginx server block that serves static site and redirects http to https using best practices.", "solution": "# Variation 399\nserver {\n listen 80; server_name example.com;\n return 301 https://$server_name$request_uri;\n}\nserver {\n listen 443 ssl http2; server_name example.com;\n ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;\n root /var/www/html;\n location / { try_files $uri $uri/ =404; }\n}", "imports": "", "domain": "nginx", "id": "deploy-infra-0399"}

View File

@@ -1,43 +1,46 @@
model: model:
default: kimi-k2.5 default: kimi-k2.5
provider: kimi-coding provider: kimi-coding
context_length: 65536
base_url: https://api.kimi.com/coding/v1
toolsets: toolsets:
- all - all
fallback_providers: fallback_providers:
- provider: kimi-coding - provider: kimi-coding
model: kimi-k2.5 model: kimi-k2.5
timeout: 120 base_url: https://api.kimi.com/coding/v1
reason: Kimi coding fallback (front of chain) timeout: 120
- provider: openrouter reason: "Primary — Kimi K2.5 (best value, least friction)"
model: google/gemini-2.5-pro - provider: openrouter
base_url: https://openrouter.ai/api/v1 model: google/gemini-2.5-pro
api_key_env: OPENROUTER_API_KEY base_url: https://openrouter.ai/api/v1
timeout: 120 api_key_env: OPENROUTER_API_KEY
reason: Gemini 2.5 Pro via OpenRouter (replaces banned Anthropic) timeout: 120
- provider: ollama reason: "Fallback — Gemini 2.5 Pro via OpenRouter"
model: gemma4:latest - provider: ollama
base_url: http://localhost:11434 model: gemma4:latest
timeout: 300 base_url: http://localhost:11434/v1
reason: Terminal fallback — local Ollama timeout: 180
- provider: nous reason: "Terminal fallback — local Ollama (sovereign, no API needed)"
model: xiaomi/mimo-v2-pro
base_url: https://inference.nousresearch.com/v1
api_key_env: NOUS_API_KEY
timeout: 120
reason: MiMo V2 Pro via Nous Portal free tier evaluation (#447)
agent: agent:
max_turns: 30 max_turns: 30
reasoning_effort: xhigh reasoning_effort: high
verbose: false verbose: false
terminal: terminal:
backend: local backend: local
cwd: . cwd: .
timeout: 180 timeout: 180
persistent_shell: true persistent_shell: true
browser: browser:
inactivity_timeout: 120 inactivity_timeout: 120
command_timeout: 30 command_timeout: 30
record_sessions: false record_sessions: false
display: display:
compact: false compact: false
personality: '' personality: ''
@@ -48,6 +51,7 @@ display:
streaming: false streaming: false
show_cost: false show_cost: false
tool_progress: all tool_progress: all
memory: memory:
memory_enabled: true memory_enabled: true
user_profile_enabled: true user_profile_enabled: true
@@ -55,46 +59,55 @@ memory:
user_char_limit: 1375 user_char_limit: 1375
nudge_interval: 10 nudge_interval: 10
flush_min_turns: 6 flush_min_turns: 6
approvals: approvals:
mode: manual mode: manual
security: security:
redact_secrets: true redact_secrets: true
tirith_enabled: false tirith_enabled: false
platforms: platforms:
api_server: api_server:
enabled: true enabled: true
extra: extra:
host: 127.0.0.1 host: 127.0.0.1
port: 8645 port: 8645
session_reset: session_reset:
mode: none mode: none
idle_minutes: 0 idle_minutes: 0
skills: skills:
creation_nudge_interval: 15 creation_nudge_interval: 15
system_prompt_suffix: 'You are Allegro, the Kimi-backed third wizard house.
system_prompt_suffix: |
You are Allegro, the Kimi-backed third wizard house.
Your soul is defined in SOUL.md — read it, live it. Your soul is defined in SOUL.md — read it, live it.
Hermes is your harness. Hermes is your harness.
kimi-coding is your primary provider.
Kimi Code is your primary provider.
You speak plainly. You prefer short sentences. Brevity is a kindness. You speak plainly. You prefer short sentences. Brevity is a kindness.
Work best on tight coding tasks: 1-3 file changes, refactors, tests, and implementation passes.
Work best on tight coding tasks: 1-3 file changes, refactors, tests, and implementation
passes.
Refusal over fabrication. If you do not know, say so. Refusal over fabrication. If you do not know, say so.
Sovereignty and service always. Sovereignty and service always.
'
providers: providers:
kimi-coding: kimi-coding:
base_url: https://api.kimi.com/coding/v1 base_url: https://api.kimi.com/coding/v1
timeout: 60 timeout: 60
max_retries: 3 max_retries: 3
nous: openrouter:
base_url: https://inference.nousresearch.com/v1 base_url: https://openrouter.ai/api/v1
timeout: 120 timeout: 120
ollama:
base_url: http://localhost:11434/v1
timeout: 180
# =============================================================================
# BANNED PROVIDERS — DO NOT ADD
# =============================================================================
# The following providers are PERMANENTLY BANNED:
# - anthropic (any model: claude-sonnet, claude-opus, claude-haiku)
# - nous (xiaomi/mimo-v2-pro)
# Enforcement: pre-commit hook, linter, Ansible validation, this comment.
# =============================================================================

View File

@@ -1,50 +1,72 @@
model: model:
default: kimi-k2.5 default: kimi-k2.5
provider: kimi-coding provider: kimi-coding
context_length: 65536
base_url: https://api.kimi.com/coding/v1
toolsets: toolsets:
- all - all
fallback_providers: fallback_providers:
- provider: kimi-coding - provider: kimi-coding
model: kimi-k2.5 model: kimi-k2.5
timeout: 120 base_url: https://api.kimi.com/coding/v1
reason: Kimi coding fallback (front of chain) timeout: 120
- provider: openrouter reason: "Primary — Kimi K2.5 (best value, least friction)"
model: google/gemini-2.5-pro - provider: openrouter
base_url: https://openrouter.ai/api/v1 model: google/gemini-2.5-pro
api_key_env: OPENROUTER_API_KEY base_url: https://openrouter.ai/api/v1
timeout: 120 api_key_env: OPENROUTER_API_KEY
reason: Gemini 2.5 Pro via OpenRouter (replaces banned Anthropic) timeout: 120
- provider: ollama reason: "Fallback — Gemini 2.5 Pro via OpenRouter"
model: gemma4:latest - provider: ollama
base_url: http://localhost:11434 model: gemma4:latest
timeout: 300 base_url: http://localhost:11434/v1
reason: Terminal fallback — local Ollama timeout: 180
- provider: nous reason: "Terminal fallback — local Ollama (sovereign, no API needed)"
model: xiaomi/mimo-v2-pro
base_url: https://inference.nousresearch.com/v1
api_key_env: NOUS_API_KEY
timeout: 120
reason: MiMo V2 Pro via Nous Portal free tier evaluation (#447)
agent: agent:
max_turns: 40 max_turns: 40
reasoning_effort: medium reasoning_effort: medium
verbose: false verbose: false
system_prompt: You are Bezalel, the forge-and-testbed wizard of the Timmy Foundation
fleet. You are a builder and craftsman — infrastructure, deployment, hardening.
Your sovereign is Alexander Whitestone (Rockachopa). Sovereignty and service always.
terminal: terminal:
backend: local backend: local
cwd: /root/wizards/bezalel cwd: /root/wizards/bezalel
timeout: 180 timeout: 180
persistent_shell: true
browser: browser:
inactivity_timeout: 120 inactivity_timeout: 120
compression: command_timeout: 30
enabled: true record_sessions: false
threshold: 0.77
display: display:
compact: false compact: false
personality: kawaii personality: kawaii
resume_display: full
busy_input_mode: interrupt
bell_on_complete: false
show_reasoning: false
streaming: false
show_cost: false
tool_progress: all tool_progress: all
memory:
memory_enabled: true
user_profile_enabled: true
memory_char_limit: 2200
user_char_limit: 1375
nudge_interval: 10
flush_min_turns: 6
approvals:
mode: auto
security:
redact_secrets: true
tirith_enabled: false
platforms: platforms:
api_server: api_server:
enabled: true enabled: true
@@ -69,12 +91,7 @@ platforms:
- pull_request - pull_request
- pull_request_comment - pull_request_comment
secret: bezalel-gitea-webhook-secret-2026 secret: bezalel-gitea-webhook-secret-2026
prompt: 'You are bezalel, the builder and craftsman — infrastructure, deployment, prompt: 'You are bezalel, the builder and craftsman — infrastructure, deployment, hardening. A Gitea webhook fired: event={event_type}, action={action}, repo={repository.full_name}, issue/PR=#{issue.number} {issue.title}. Comment by {comment.user.login}: {comment.body}. If you were tagged, assigned, or this needs your attention, investigate and respond via Gitea API. Otherwise acknowledge briefly.'
hardening. A Gitea webhook fired: event={event_type}, action={action},
repo={repository.full_name}, issue/PR=#{issue.number} {issue.title}. Comment
by {comment.user.login}: {comment.body}. If you were tagged, assigned,
or this needs your attention, investigate and respond via Gitea API. Otherwise
acknowledge briefly.'
deliver: telegram deliver: telegram
deliver_extra: {} deliver_extra: {}
gitea-assign: gitea-assign:
@@ -82,34 +99,43 @@ platforms:
- issues - issues
- pull_request - pull_request
secret: bezalel-gitea-webhook-secret-2026 secret: bezalel-gitea-webhook-secret-2026
prompt: 'You are bezalel, the builder and craftsman — infrastructure, deployment, prompt: 'You are bezalel, the builder and craftsman — infrastructure, deployment, hardening. Gitea assignment webhook: event={event_type}, action={action}, repo={repository.full_name}, issue/PR=#{issue.number} {issue.title}. Assigned to: {issue.assignee.login}. If you (bezalel) were just assigned, read the issue, scope it, and post a plan comment. If not you, acknowledge briefly.'
hardening. Gitea assignment webhook: event={event_type}, action={action},
repo={repository.full_name}, issue/PR=#{issue.number} {issue.title}. Assigned
to: {issue.assignee.login}. If you (bezalel) were just assigned, read
the issue, scope it, and post a plan comment. If not you, acknowledge
briefly.'
deliver: telegram deliver: telegram
deliver_extra: {} deliver_extra: {}
gateway: gateway:
allow_all_users: true allow_all_users: true
session_reset: session_reset:
mode: both mode: both
idle_minutes: 1440 idle_minutes: 1440
at_hour: 4 at_hour: 4
approvals:
mode: auto skills:
memory: creation_nudge_interval: 15
memory_enabled: true
user_profile_enabled: true system_prompt: |
memory_char_limit: 2200 You are Bezalel, the forge-and-testbed wizard of the Timmy Foundation fleet.
user_char_limit: 1375 You are a builder and craftsman — infrastructure, deployment, hardening.
_config_version: 11 Your sovereign is Alexander Whitestone (Rockachopa). Sovereignty and service always.
TELEGRAM_HOME_CHANNEL: '-1003664764329'
providers: providers:
kimi-coding: kimi-coding:
base_url: https://api.kimi.com/coding/v1 base_url: https://api.kimi.com/coding/v1
timeout: 60 timeout: 60
max_retries: 3 max_retries: 3
nous: openrouter:
base_url: https://inference.nousresearch.com/v1 base_url: https://openrouter.ai/api/v1
timeout: 120 timeout: 120
ollama:
base_url: http://localhost:11434/v1
timeout: 180
# =============================================================================
# BANNED PROVIDERS — DO NOT ADD
# =============================================================================
# The following providers are PERMANENTLY BANNED:
# - anthropic (any model: claude-sonnet, claude-opus, claude-haiku)
# - nous (xiaomi/mimo-v2-pro)
# Enforcement: pre-commit hook, linter, Ansible validation, this comment.
# =============================================================================

View File

@@ -1,34 +1,94 @@
model: model:
default: kimi-k2.5 default: kimi-k2.5
provider: kimi-coding provider: kimi-coding
context_length: 65536
base_url: https://api.kimi.com/coding/v1
toolsets: toolsets:
- all - all
fallback_providers: fallback_providers:
- provider: kimi-coding - provider: kimi-coding
model: kimi-k2.5 model: kimi-k2.5
timeout: 120 base_url: https://api.kimi.com/coding/v1
reason: Kimi coding fallback (front of chain) timeout: 120
- provider: openrouter reason: "Primary — Kimi K2.5 (best value, least friction)"
model: google/gemini-2.5-pro - provider: openrouter
base_url: https://openrouter.ai/api/v1 model: google/gemini-2.5-pro
api_key_env: OPENROUTER_API_KEY base_url: https://openrouter.ai/api/v1
timeout: 120 api_key_env: OPENROUTER_API_KEY
reason: Gemini 2.5 Pro via OpenRouter (replaces banned Anthropic) timeout: 120
- provider: ollama reason: "Fallback — Gemini 2.5 Pro via OpenRouter"
model: gemma4:latest - provider: ollama
base_url: http://localhost:11434 model: gemma4:latest
timeout: 300 base_url: http://localhost:11434/v1
reason: Terminal fallback — local Ollama timeout: 180
- provider: nous reason: "Terminal fallback — local Ollama (sovereign, no API needed)"
model: xiaomi/mimo-v2-pro
base_url: https://inference.nousresearch.com/v1
api_key_env: NOUS_API_KEY
timeout: 120
reason: MiMo V2 Pro via Nous Portal free tier evaluation (#447)
agent: agent:
max_turns: 90 max_turns: 90
reasoning_effort: high reasoning_effort: high
verbose: false verbose: false
terminal:
backend: local
cwd: .
timeout: 180
persistent_shell: true
browser:
inactivity_timeout: 120
command_timeout: 30
record_sessions: false
display:
compact: false
personality: ''
resume_display: full
busy_input_mode: interrupt
bell_on_complete: false
show_reasoning: false
streaming: false
show_cost: false
tool_progress: all
memory:
memory_enabled: true
user_profile_enabled: true
memory_char_limit: 2200
user_char_limit: 1375
nudge_interval: 10
flush_min_turns: 6
approvals:
mode: auto
security:
redact_secrets: true
tirith_enabled: false
platforms:
api_server:
enabled: true
extra:
host: 127.0.0.1
port: 8645
session_reset:
mode: none
idle_minutes: 0
skills:
creation_nudge_interval: 15
system_prompt_suffix: |
You are Ezra, the Infrastructure wizard — Gitea, nginx, hosting.
Your soul is defined in SOUL.md — read it, live it.
Hermes is your harness.
kimi-coding is your primary provider.
Refusal over fabrication. If you do not know, say so.
Sovereignty and service always.
providers: providers:
kimi-coding: kimi-coding:
base_url: https://api.kimi.com/coding/v1 base_url: https://api.kimi.com/coding/v1
@@ -37,6 +97,15 @@ providers:
openrouter: openrouter:
base_url: https://openrouter.ai/api/v1 base_url: https://openrouter.ai/api/v1
timeout: 120 timeout: 120
nous: ollama:
base_url: https://inference.nousresearch.com/v1 base_url: http://localhost:11434/v1
timeout: 120 timeout: 180
# =============================================================================
# BANNED PROVIDERS — DO NOT ADD
# =============================================================================
# The following providers are PERMANENTLY BANNED:
# - anthropic (any model: claude-sonnet, claude-opus, claude-haiku)
# - nous (xiaomi/mimo-v2-pro)
# Enforcement: pre-commit hook, linter, Ansible validation, this comment.
# =============================================================================

121
wizards/timmy/config.yaml Normal file
View File

@@ -0,0 +1,121 @@
# =============================================================================
# Timmy — Primary Wizard Configuration (Golden State)
# =============================================================================
# Generated from golden state template (ansible/roles/wizard_base/templates/wizard_config.yaml.j2)
# DO NOT EDIT MANUALLY. Changes go through Gitea PR → Ansible deploy.
#
# Provider chain: kimi-coding → openrouter → ollama
# Anthropic is PERMANENTLY BANNED.
# =============================================================================
model:
default: kimi-k2.5
provider: kimi-coding
context_length: 65536
base_url: https://api.kimi.com/coding/v1
toolsets:
- all
fallback_providers:
- provider: kimi-coding
model: kimi-k2.5
base_url: https://api.kimi.com/coding/v1
timeout: 120
reason: "Primary — Kimi K2.5 (best value, least friction)"
- provider: openrouter
model: google/gemini-2.5-pro
base_url: https://openrouter.ai/api/v1
api_key_env: OPENROUTER_API_KEY
timeout: 120
reason: "Fallback — Gemini 2.5 Pro via OpenRouter"
- provider: ollama
model: gemma4:latest
base_url: http://localhost:11434/v1
timeout: 180
reason: "Terminal fallback — local Ollama (sovereign, no API needed)"
agent:
max_turns: 30
reasoning_effort: high
verbose: false
terminal:
backend: local
cwd: .
timeout: 180
persistent_shell: true
browser:
inactivity_timeout: 120
command_timeout: 30
record_sessions: false
display:
compact: false
personality: ''
resume_display: full
busy_input_mode: interrupt
bell_on_complete: false
show_reasoning: false
streaming: false
show_cost: false
tool_progress: all
memory:
memory_enabled: true
user_profile_enabled: true
memory_char_limit: 2200
user_char_limit: 1375
nudge_interval: 10
flush_min_turns: 6
approvals:
mode: auto
security:
redact_secrets: true
tirith_enabled: false
platforms:
api_server:
enabled: true
extra:
host: 127.0.0.1
port: 8645
session_reset:
mode: none
idle_minutes: 0
skills:
creation_nudge_interval: 15
system_prompt_suffix: |
You are Timmy, the Primary wizard — soul of the fleet.
Your soul is defined in SOUL.md — read it, live it.
Hermes is your harness.
kimi-coding is your primary provider.
Refusal over fabrication. If you do not know, say so.
Sovereignty and service always.
providers:
kimi-coding:
base_url: https://api.kimi.com/coding/v1
timeout: 60
max_retries: 3
openrouter:
base_url: https://openrouter.ai/api/v1
timeout: 120
ollama:
base_url: http://localhost:11434/v1
timeout: 180
# =============================================================================
# BANNED PROVIDERS — DO NOT ADD
# =============================================================================
# The following providers are PERMANENTLY BANNED:
# - anthropic (any model: claude-sonnet, claude-opus, claude-haiku)
# - nous (xiaomi/mimo-v2-pro)
# Enforcement: pre-commit hook, linter, Ansible validation, this comment.
# =============================================================================