From 7e89f5edcee4e28e17e95c5dc6d02d32ff645864 Mon Sep 17 00:00:00 2001 From: Brandon Schneider Date: Tue, 26 May 2026 22:27:41 -0500 Subject: [PATCH] =?UTF-8?q?chore(devin):=20UserPromptSubmit=20hook=20?= =?UTF-8?q?=E2=80=94=20programming=20choice=20flow=20reminder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds .devin/config.json with a UserPromptSubmit hook that fires on every user message and injects the programming choice flow + post-interaction checklist into the agent's context via add_context. .devin/hooks/programming-choice-reminder.sh: Emits a JSON add_context block with the 7-branch decision tree: 1. Admissibility/gating → Lean only 2. Receipt minting / top-level JSON → AVMIsa.Emit only 3. Alignment classification → Lean (RRC.Emit) 4. Raw input features → Python shim OK with constraints 5. Float in compute path → STOP, use Q16_16 6. Promotion in shim space → STOP, not_promoted until Lean gate passes 7. Pure I/O → Python fine, route receipts through AVMIsa.Emit Plus the 4-step post-interaction checklist (AGENTS.md / build / commit / status) Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .devin/config.json | 19 +++++++++++++++++++ .devin/hooks/programming-choice-reminder.sh | 9 +++++++++ 2 files changed, 28 insertions(+) create mode 100644 .devin/config.json create mode 100755 .devin/hooks/programming-choice-reminder.sh diff --git a/.devin/config.json b/.devin/config.json new file mode 100644 index 00000000..ac2a72dc --- /dev/null +++ b/.devin/config.json @@ -0,0 +1,19 @@ +{ + // Project config for Research Stack. + // Hooks fire on every user message to remind the agent of the programming + // choice flow and post-interaction workflow defined in AGENTS.md. + "hooks": { + "UserPromptSubmit": [ + { + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "cat '/home/allaun/Research Stack/.devin/hooks/programming-choice-reminder.sh' | bash", + "timeout": 5 + } + ] + } + ] + } +} diff --git a/.devin/hooks/programming-choice-reminder.sh b/.devin/hooks/programming-choice-reminder.sh new file mode 100755 index 00000000..0b57c3f0 --- /dev/null +++ b/.devin/hooks/programming-choice-reminder.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# Programming choice flow reminder — injected before every user message. +# Full contract lives in AGENTS.md §Post-Interaction Workflow §5. + +cat <<'EOF' +{ + "add_context": "PROGRAMMING CHOICE FLOW (check before writing any new code):\n\n1. Admissibility / gating / routing / alignment decision? → Lean only. No Python equivalent.\n2. Minting a receipt or emitting top-level JSON? → Semantics.AVMIsa.Emit ONLY (sole output boundary).\n3. Classifying rows / computing alignment scores? → Lean (Semantics.RRC.Emit or new Semantics.RRC.* module).\n4. Supplying raw input features (equation text, IDs, weak_axes)? → Python shim OK, but: (a) no admissibility logic, (b) regenerable from source, (c) TODO(lean-port) if portable.\n5. Float arithmetic in a compute path? → STOP. Use Q16_16.ofNat / Q16_16.ofRatio instead.\n6. Advancing promotion status in shim space? → STOP. Always not_promoted until a Lean gate passes.\n7. Pure I/O (read/write JSON, call subprocess, format output)? → Python shim fine; receipt output must route through AVMIsa.Emit.\n\nSummary rule: Lean owns all decisions. Python owns all I/O.\n\nPOST-INTERACTION CHECKLIST (before claiming session complete):\n1. Update nearest AGENTS.md for every touched subtree\n2. lake build Compiler (+ full lake build if Lean files touched)\n3. Commit with explicit file list — never git add .\n4. git status --branch --short --untracked-files=all" +} +EOF