{"slug": "from-prompts-to-production-building-civic-tech-ai-workflows-with-rice-craft", "title": "From Prompts to Production: Building Civic-Tech AI Workflows with RICE + CRAFT", "summary": "A developer completed a civic-tech AI workshop, building four municipal workflows including a complaint classifier, HR leave-policy summarizer, budget analysis tool, and policy Q&A system. The project emphasized structured, testable AI workflows using RICE and CRAFT, with explicit enforcement rules and validation to ensure reliability. Key lessons included defining correctness, preserving policy details, and maintaining source boundaries in document Q&A.", "body_md": "I recently completed the **Vibe Coding Workshop — Civic Tech Edition**, working through four practical use cases designed around real municipal workflows.\n\nThe goal wasn't simply to “make an AI app.” The workshop focused on turning vague prompts into **structured, testable, reliable workflows** using RICE, CRAFT, explicit enforcement rules, and Git-based iteration.\n\nThe first challenge was a **municipal complaint classifier**.\n\nThe input contained citizen complaints that needed to be classified into an exact municipal taxonomy such as:\n\nEach complaint also needed a priority:\n\n**Urgent / Standard / Low**\n\nThe initial naive prompt was simply:\n\n“Classify this citizen complaint by category and priority.”\n\nThe problem became obvious quickly: a simple prompt can classify the topic, but it doesn't necessarily enforce **severity detection, evidence, or consistent taxonomy**.\n\nFor example, a complaint mentioning an **injury, child, school, hospital, ambulance, hazard, fall, or collapse** needed to be treated as urgent.\n\nI converted the requirements into explicit agent instructions and skills:\n\n`NEEDS_REVIEW`\n\nfor ambiguous casesThe final classifier was tested against the supplied Pune dataset and produced the expected `results_pune.csv`\n\n.\n\n**Key lesson:**\n\nA good prompt doesn't just tell an AI *what* to do. It defines **what counts as correct**.\n\nThe second use case was an **HR leave-policy summarizer**.\n\nAt first glance, this sounds straightforward:\n\n“Summarize the policy document.”\n\nBut policy documents contain details that cannot safely be summarized away.\n\nThe document included requirements such as:\n\nThe major failure modes were:\n\n**Clause omission · Scope bleed · Obligation softening**\n\nThe workflow was redesigned to explicitly preserve:\n\nI also added validation so the generated summary could be checked for required policy details rather than simply trusting the output.\n\nThe final workflow generated `summary_hr_leave.txt`\n\nand passed the policy-summary validation.\n\n**Key lesson:**\n\nFor policy workflows, “approximately correct” is often **incorrect**. Important conditions and exceptions have to survive the transformation.\n\nThe third challenge involved **municipal budget analysis**.\n\nThe dataset contained:\n\nThe task was to calculate growth for a **specific ward and category**, for example:\n\nWard 1 – Kasba → Roads & Pothole Repair\n\nThe main failure modes were:\n\n**Wrong aggregation level · Silent null handling · Formula assumption**\n\nThis was important because an apparently reasonable calculation can become completely misleading if data from different wards or categories is accidentally combined.\n\nThe implementation enforced:\n\nThe output correctly produced values such as:\n\n**Scope is part of correctness.**\n\nA mathematically correct formula applied to the wrong aggregation level is still a wrong answer.\n\nThe final use case brought everything together.\n\nThe task was to build an interactive policy Q&A system using three separate documents:\n\nThe challenge wasn't just answering questions. It was preventing the model from **combining information from different documents to create a permission that no document actually grants**.\n\nFor example:\n\n“Can I use my personal phone to access work files when working from home?”\n\nThe HR document may discuss remote work, while the IT policy specifically limits personal-device access.\n\nThe agent therefore needed to maintain **source boundaries**.\n\nThe final workflow required:\n\nFor unsupported questions, the required response was:\n\n“This question is not covered in the available policy documents…”\n\nThe test cases successfully demonstrated:\n\nThe most important part of a document Q&A system isn't just retrieval.\n\nIt's **knowing when not to answer**.\n\nAcross all four use cases, the biggest shift was moving from:\n\n**“Give the AI a prompt and see what happens.”**\n\nto:\n\n**“Define the task, failure modes, enforcement rules, skills, validation, and test cases before trusting the output.”**\n\nThe workflow I followed was essentially:\n\n**Naive Prompt → Identify Failure → RICE Prompt → agents.md → skills.md → Code → Test → Analyze → Fix → Commit**\n\nGit also became part of the development process rather than just version control. Each UC was developed and committed separately, creating a traceable history of **what failed, why it failed, and what changed**.\n\nThe four use cases reinforced a simple principle:\n\nReliable AI isn't just about generating better answers. It's about designing systems that make incorrect answers harder to produce.", "url": "https://wpnews.pro/news/from-prompts-to-production-building-civic-tech-ai-workflows-with-rice-craft", "canonical_source": "https://dev.to/pavithranp12/from-prompts-to-production-building-civic-tech-ai-workflows-with-rice-craft-385f", "published_at": "2026-09-03 20:11:53+00:00", "updated_at": "2026-09-03 20:54:29.630600+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-tools", "developer-tools", "ai-agents"], "entities": ["RICE", "CRAFT", "Pune"], "alternates": {"html": "https://wpnews.pro/news/from-prompts-to-production-building-civic-tech-ai-workflows-with-rice-craft", "markdown": "https://wpnews.pro/news/from-prompts-to-production-building-civic-tech-ai-workflows-with-rice-craft.md", "text": "https://wpnews.pro/news/from-prompts-to-production-building-civic-tech-ai-workflows-with-rice-craft.txt", "jsonld": "https://wpnews.pro/news/from-prompts-to-production-building-civic-tech-ai-workflows-with-rice-craft.jsonld"}}