skills/skills/engineering/diagnosing-bugs/scripts/hitl-loop.template.sh
Matt Pocock 221ffca967 feat: Add new skills and templates for domain modeling, bug diagnosis, and architectural improvement
- Introduced a human-in-the-loop script for bug diagnosis to capture user feedback.
- Created ADR and CONTEXT formats to standardize architectural decision records and domain context documentation.
- Developed a domain modeling skill to refine terminology and maintain a shared language.
- Enhanced the improve-codebase-architecture skill to provide visual reports and deepening opportunities.
- Consolidated grilling and handoff skills for better user interaction and documentation.
- Updated existing skills to improve clarity and consistency in descriptions and functionality.
2026-06-12 09:25:19 +01:00

41 lines
1.1 KiB
Bash

#!/usr/bin/env bash
# Human-in-the-loop reproduction loop.
# Copy this file, edit the steps below, and run it.
# The agent runs the script; the user follows prompts in their terminal.
#
# Usage:
# bash hitl-loop.template.sh
#
# Two helpers:
# step "<instruction>" → show instruction, wait for Enter
# capture VAR "<question>" → show question, read response into VAR
#
# At the end, captured values are printed as KEY=VALUE for the agent to parse.
set -euo pipefail
step() {
printf '\n>>> %s\n' "$1"
read -r -p " [Enter when done] " _
}
capture() {
local var="$1" question="$2" answer
printf '\n>>> %s\n' "$question"
read -r -p " > " answer
printf -v "$var" '%s' "$answer"
}
# --- edit below ---------------------------------------------------------
step "Open the app at http://localhost:3000 and sign in."
capture ERRORED "Click the 'Export' button. Did it throw an error? (y/n)"
capture ERROR_MSG "Paste the error message (or 'none'):"
# --- edit above ---------------------------------------------------------
printf '\n--- Captured ---\n'
printf 'ERRORED=%s\n' "$ERRORED"
printf 'ERROR_MSG=%s\n' "$ERROR_MSG"