aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/claude/phases.ts
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-03-04 21:36:32 -0800
committerbndw <ben@bdw.to>2026-03-04 21:36:32 -0800
commit73d2680b83ccbdbd8dfec2d319533e98b379b830 (patch)
tree193eaf5157edcf12d06dde85fb44efaf3aae2004 /src/main/claude/phases.ts
parentb6405dd6a4ba65fc5dc6746db7be7be7d0bb29f3 (diff)
feat: Thread optional `phase` param into `db/sessions.ts::cre… (+7 more)
- ✅ Thread optional `phase` param into `db/sessions.ts::createSession()` - ✅ Thread optional `phase` param into `ipc/handlers.ts` sessions:create handler - ✅ Thread optional `phase` param into `preload.ts` createSession API - ✅ Update Plan phase system prompt to gracefully handle missing research.md - ✅ Update Implement phase system prompt to gracefully handle missing plan.md - ✅ Create `renderer/src/components/NewSessionModal.tsx` - ✅ Update `App.tsx`: add modal state, split handler, add modal JSX - ✅ Add modal CSS to `globals.css`
Diffstat (limited to 'src/main/claude/phases.ts')
-rw-r--r--src/main/claude/phases.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/claude/phases.ts b/src/main/claude/phases.ts
index a1cbba1..e8c16df 100644
--- a/src/main/claude/phases.ts
+++ b/src/main/claude/phases.ts
@@ -87,11 +87,12 @@ CRITICAL RULES:
87 87
88CONTEXT: 88CONTEXT:
89- Read CLAUDE.md at project root for codebase overview 89- Read CLAUDE.md at project root for codebase overview
90- Read ${artifactDir}/research.md to understand the specific task 90- Read ${artifactDir}/research.md to understand the specific task.
91 If research.md does not exist, this session began at the planning phase — base your plan on the task description provided in the chat instead.
91 92
92WORKFLOW: 93WORKFLOW:
931. Read CLAUDE.md for codebase overview 941. Read CLAUDE.md for codebase overview
942. Read ${artifactDir}/research.md to understand the specific task 952. Read ${artifactDir}/research.md if it exists; otherwise use the task description from chat
953. Write a detailed plan to ${artifactDir}/plan.md 963. Write a detailed plan to ${artifactDir}/plan.md
964. Include specific code snippets showing proposed changes 974. Include specific code snippets showing proposed changes
975. Make the plan detailed enough that implementation is mechanical 985. Make the plan detailed enough that implementation is mechanical
@@ -141,14 +142,15 @@ Remember: Your output goes in ${artifactDir}/plan.md, not chat. Chat is for clar
141 systemPrompt: (artifactDir) => `You are in IMPLEMENTATION mode. Execute the approved plan. 142 systemPrompt: (artifactDir) => `You are in IMPLEMENTATION mode. Execute the approved plan.
142 143
143CRITICAL RULES: 144CRITICAL RULES:
1441. Read ${artifactDir}/plan.md and follow it exactly 1451. Read ${artifactDir}/plan.md if it exists and follow it exactly.
146 If plan.md does not exist, this session began at the implementation phase — implement based on the task description provided in the chat messages.
1452. Mark tasks complete in ${artifactDir}/plan.md as you finish them: - [ ] → - [x] 1472. Mark tasks complete in ${artifactDir}/plan.md as you finish them: - [ ] → - [x]
1463. DO NOT deviate from the plan without asking 1483. DO NOT deviate from the plan without asking
1474. Run tests/typecheck if available 1494. Run tests/typecheck if available
1485. Stop and ask if you encounter issues not covered by the plan 1505. Stop and ask if you encounter issues not covered by the plan
149 151
150WORKFLOW: 152WORKFLOW:
1511. Read ${artifactDir}/plan.md 1531. Read ${artifactDir}/plan.md (if it exists)
1522. Execute each task in order 1542. Execute each task in order
1533. Update ${artifactDir}/plan.md to mark tasks complete 1553. Update ${artifactDir}/plan.md to mark tasks complete
1544. Continue until all tasks are done 1564. Continue until all tasks are done