feat(projects): add in-flight PRs + branches to Current Projects cards (GLOOK-19)#52
Conversation
…ueries Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…mpt call Adds renderInflightBlock (module-private) that formats open PRs and bare branches into a plain-text IN-FLIGHT WORK section. Updates generateTeamProjects to extend the short-circuit check with the new in-flight fields, call renderInflightBlock, and pass IN_FLIGHT_BLOCK to loadPrompt. Updates tests: baseInput() includes in_flight_prs/in_flight_branches, short-circuit test includes the new required fields, and two new tests cover the inflight block (one expected-fail pending Task 3 template update). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…k, bump PROMPT_VERSION
- Add IN-FLIGHT WORK rule to prompt template describing how to mix open PRs/branches into clusters
- Add {{IN_FLIGHT_BLOCK}} placeholder at end of template for injected in-flight data
- Bump PROMPT_VERSION from v3-projects to v4-inflight to invalidate old cache
- Update prompts.test.ts to pass IN_FLIGHT_BLOCK parameter
- Update team-projects-generator tests to check for in-flight data block content instead of template rule
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…e, cache v2 Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Code Review — automated (claude-pr-review-local + review-loop)🟡 Worth discussing before mergePrompt injection via unescaped GitHub-sourced strings ( 🔵 SuggestionsSeparator spacing in
Trailing double blank line when Duplicated render logic ( No test for short-circuit with only in-flight data (
🟣 QuestionsRule vs data in different message roles (
|
…ion, short-circuit test, comments
Summary
How it works
Team page:
extractTeamProjectsDatanow fetches up to 30 open PRs + top 10 bare branches for the team. These are formatted as a compact pipe-delimitedIN-FLIGHT WORKblock and injected into the prompt via{{IN_FLIGHT_BLOCK}}. The LLM merges them into existing project clusters or creates new ones. Draft PRs are included.PROMPT_VERSIONbumped tov4-inflightto invalidate cached rows.Home page: Same data shape added inline to
project-insights/route.ts. Cache versioned with_v: 2— stale v1 rows regenerate automatically.Bug fixed
SUM(...) AS linesin the bare-branches SQL caused a MySQL reserved-word parse error (LINESis reserved). Renamed toAS total_lines.Test plan
🤖 Generated with Claude Code