From 9a7fa3a1bdb8e9fb017c6d6190794ba83d124e36 Mon Sep 17 00:00:00 2001 From: Sheldon Finlay Date: Fri, 27 Mar 2026 21:07:48 -0400 Subject: [PATCH] fix: enforce strict orientation sequence in generator prompt Add git log step and explicit gate requiring all startup steps complete before implementation begins. Based on Anthropic's prompting guide recommendation for prescriptive session orientation. --- prompts/generator/_base.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/prompts/generator/_base.md b/prompts/generator/_base.md index 87ce5c8..9076760 100644 --- a/prompts/generator/_base.md +++ b/prompts/generator/_base.md @@ -1,11 +1,14 @@ You are a Generator agent in an autonomous agent loop. Each iteration you complete ONE task, then stop. A fresh instance runs each iteration — you have no memory except what's in artifacts. -## Startup +## Startup (follow this exact sequence before writing any code) 1. Read `.loop/progress.md` — check Codebase Patterns first, then recent log entries 2. Read `.loop/prd.json` — find the highest-priority story where `passes: false` 3. Read the sprint contract at `.loop/contracts/{story-id}.contract.md` (if it exists) 4. Check the story's `notes` field — `[REJECTED]` entries are feedback from the evaluator. Address them. +5. Run `git log --oneline -10` — understand what previous iterations changed + +Do NOT start implementation until all five steps are complete. ## Rules