You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/gepa/.before-optimize.md
+26-21Lines changed: 26 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,18 @@ Purpose
5
5
- Explains key docs, the /designs/ folder, agent responsibilities, and quick operational notes (how to run tests, what to update, and commit expectations).
6
6
7
7
Repo doc descriptions
8
-
-prompt_plan.md
8
+
-docs/PROMPT_PLAN.md
9
9
- The agent-driven plan that sequences work into small, testable prompts and steps.
10
10
- Contains per-step prompts, expected artifacts, tests, rollback/idempotency notes, and a TODO checklist using Markdown checkboxes.
11
11
- This is the canonical agent workflow driver — update it as you make progress (see Agent responsibility rules below).
12
12
13
-
-spec.md
13
+
-docs/DEV_SPEC.md
14
14
- The minimal functional & technical specification that defines APIs, data models, and acceptance criteria.
15
15
- Includes the concise Definition of Done that must be satisfied for each plan step before marking it complete.
16
16
17
17
- idea.md
18
18
- Free-form brainstorming, assumptions, notes, research links, and open questions.
19
-
- Useful for context but not authoritative — always follow spec.md and prompt_plan.md for implementation decisions.
19
+
- Useful for context but not authoritative — always follow docs/DEV_SPEC.md and docs/PROMPT_PLAN.md for implementation decisions.
20
20
21
21
- idea_one_pager.md
22
22
- A short summary / one‑pager capturing Problem, Audience, Platform, Core Flow, and MVP Features (and optional Non‑Goals).
@@ -29,10 +29,10 @@ What lives in /designs/
29
29
- Large source Figma files may live externally; include an export + a small README describing where the canonical design is stored and any viewing permissions required.
30
30
31
31
How agents should interact (summary)
32
-
- Treat prompt_plan.md as the authoritative workflow: follow the listed prompts in order and mark checklist items as you finish them.
32
+
- Treat docs/PROMPT_PLAN.md as the authoritative workflow: follow the listed prompts in order and mark checklist items as you finish them.
33
33
- Always follow TDD: write tests first, make the minimal change to pass tests, then refactor while keeping tests green.
34
-
- After any code/test change, update the matching TODO checkbox in prompt_plan.md using the same Markdown checkbox format ('- [x]') and commit the change alongside code and tests.
35
-
- Make the smallest change that passes tests and improves code. Do not introduce new public APIs without updating spec.md and tests.
34
+
- After any code/test change, update the matching TODO checkbox in docs/PROMPT_PLAN.md using the same Markdown checkbox format ('- [x]') and commit the change alongside code and tests.
35
+
- Make the smallest change that passes tests and improves code. Do not introduce new public APIs without updating docs/DEV_SPEC.md and tests.
36
36
- Don't duplicate templates/files to work around errors — fix the original.
37
37
- Suggest a clear manual test path for every change (even when tests cover it).
38
38
- If you cannot open a file or content is missing, say so explicitly and stop. Do not guess.
@@ -46,48 +46,53 @@ Quick operational commands (expect these to exist; if not, ask)
46
46
47
47
Commit & PR expectations
48
48
- Each prompt/plan step should result in a single, focused commit/PR with:
49
-
- Code + tests + prompt_plan.md checklist update.
50
-
- A short, copy-pasteable commit summary in the prompt_plan.md step completion entry.
- 'DEV_SPEC.md' - Minimal functional and technical specification consistent with prior docs, including a concise **Definition of Done**.
58
-
- 'PROMPT_PLAN.md' - Agent-Ready Planner with per-step prompts, expected artifacts, tests, rollback notes, idempotency notes, and a TODO checklist using Markdown checkboxes. This file drives the agent workflow.
57
+
- 'docs/DEV_SPEC.md' - Minimal functional and technical specification consistent with prior docs, including a concise **Definition of Done**.
58
+
- 'docs/PROMPT_PLAN.md' - Agent-Ready Planner with per-step prompts, expected artifacts, tests, rollback notes, idempotency notes, and a TODO checklist using Markdown checkboxes. This file drives the agent workflow.
59
59
- 'docs/STYLE.md' - Unified design system reference. Typography, layout, color tokens, component patterns. Inspired by Hatchet (structural layout, inset panels) and Outliner (clean hierarchy, whitespace). **All dashboard UI changes must follow this guide.**
60
60
- 'AGENTS.md' - This file.
61
61
62
62
### Agent responsibility
63
-
- After completing any coding, refactor, or test step, **immediately update the corresponding TODO checklist item in 'prompt_plan.md'**.
63
+
- After completing any coding, refactor, or test step, **immediately update the corresponding TODO checklist item in 'docs/PROMPT_PLAN.md'**.
64
64
- Use the same Markdown checkbox format ('- [x]') to mark completion.
65
-
- When creating new tasks or subtasks, add them directly under the appropriate section anchor in 'prompt_plan.md'.
66
-
- Always commit changes to 'prompt_plan.md' alongside the code and tests that fulfill them.
65
+
- When creating new tasks or subtasks, add them directly under the appropriate section anchor in 'docs/PROMPT_PLAN.md'.
66
+
- Always commit changes to 'docs/PROMPT_PLAN.md' alongside the code and tests that fulfill them.
67
67
- Do not consider work "done" until the matching checklist item is checked and all related tests are green.
68
68
- When a stage (plan step) is complete with green tests, update the README "Release notes" section with any user-facing impact (or explicitly state "No user-facing changes" if applicable).
69
69
- Even when automated coverage exists, always suggest a feasible manual test path so the human can exercise the feature end-to-end.
70
-
- After a plan step is finished, document its completion state with a short checklist. Include: step name & number, test results, 'prompt_plan.md' status, manual checks performed (mark as complete only after the human confirms they ran to their satisfaction), release notes status, and an inline commit summary string the human can copy & paste.
70
+
- After a plan step is finished, document its completion state with a short checklist. Include: step name & number, test results, 'docs/PROMPT_PLAN.md' status, manual checks performed (mark as complete only after the human confirms they ran to their satisfaction), release notes status, and an inline commit summary string the human can copy & paste.
71
71
72
72
#### Guardrails for agents
73
73
- Make the smallest change that passes tests and improves the code.
74
-
- Do not introduce new public APIs without updating 'spec.md' and relevant tests.
74
+
- Do not introduce new public APIs without updating 'docs/DEV_SPEC.md' and relevant tests.
75
75
- Do not duplicate templates or files to work around issues. Fix the original.
76
76
- If a file cannot be opened or content is missing, say so explicitly and stop. Do not guess.
77
77
- Respect privacy and logging policy: do not log secrets, prompts, completions, or PII.
78
78
79
79
#### Deferred-work notation
80
-
- When a task is intentionally paused, keep its checkbox unchecked and prepend '(Deferred)' to the TODO label in 'prompt_plan.md', followed by a short reason.
80
+
- When a task is intentionally paused, keep its checkbox unchecked and prepend '(Deferred)' to the TODO label in 'docs/PROMPT_PLAN.md', followed by a short reason.
81
81
- Apply the same '(Deferred)' tag to every downstream checklist item that depends on the paused work.
82
82
- Remove the tag only after the work resumes; this keeps the outstanding scope visible without implying completion.
83
83
84
84
85
85
86
86
#### When the prompt plan is fully satisfied
87
-
- Once every Definition of Done task in 'prompt_plan.md' is either checked off or explicitly marked '(Deferred)', the plan is considered **complete**.
88
-
- After that point, you no longer need to update prompt-plan TODOs or reference 'prompt_plan.md', 'spec.md', 'idea_one_pager.md', or other upstream docs to justify changes.
87
+
- Once every Definition of Done task in 'docs/PROMPT_PLAN.md' is either checked off or explicitly marked '(Deferred)', the plan is considered **complete**.
88
+
- After that point, you no longer need to update prompt-plan TODOs or reference 'docs/PROMPT_PLAN.md', 'docs/DEV_SPEC.md', 'idea_one_pager.md', or other upstream docs to justify changes.
89
89
- All other guardrails, testing requirements, and agent responsibilities in this file continue to apply unchanged.
90
90
91
+
#### On task completion — always suggest next actions
92
+
- When the current task (or set of tasks) is finished, **always** suggest 2-4 concrete next actions the human could take.
93
+
- Pull suggestions from: memory files, branch/git state, plan docs, deploy status, or known blockers.
94
+
- Prioritize by impact: ship-blocking items first, then quick wins, then nice-to-haves.
95
+
- If nothing obvious remains, suggest: commit/push, deploy, test manually, or review related areas.
91
96
92
97
---
93
98
@@ -138,17 +143,17 @@ Ask the human if any of the following is true:
138
143
(End of verbatim block)
139
144
140
145
Minimal examples for checklist updates (copy/pasteable)
141
-
- After completing a prompt step, add an entry under that step in prompt_plan.md similar to:
146
+
- After completing a prompt step, add an entry under that step in docs/PROMPT_PLAN.md similar to:
142
147
-[x] Step 5 — Implement POST /api/v1/query — tests green — manual checks: cURL example tested — README Release Notes updated — commit: "query: add /api/v1/query route, adapter integration, tests"
143
148
- If pausing work:
144
149
--[ ] (Deferred) Step 7.3 — Implement real Pinecone adapter — blocked on PINECONE_API_KEY (reason: waiting for dev key from infra)
145
150
146
151
If anything is missing
147
-
- If you cannot open prompt_plan.md, spec.md, idea.md, idea_one_pager.md, or any design file, stop and report exactly which file and why (permission/absent/parse error).
152
+
- If you cannot open docs/PROMPT_PLAN.md, docs/DEV_SPEC.md, idea.md, idea_one_pager.md, or any design file, stop and report exactly which file and why (permission/absent/parse error).
148
153
- Ask for required secrets or permissions rather than guessing. Use the "When to ask for human input" rules above.
149
154
150
155
Contact & escalation
151
-
- When blocked on infra/secrets/design files, create a short note in prompt_plan.md under the current step and ping the human with:
156
+
- When blocked on infra/secrets/design files, create a short note in docs/PROMPT_PLAN.md under the current step and ping the human with:
152
157
- What I need: (e.g., PINECONE_API_KEY, AWS dev creds)
0 commit comments