Skip to content

Add Claude Code GitHub Workflow#1

Merged
wbryanta merged 2 commits intomainfrom
add-claude-github-actions-1763000135471
Nov 14, 2025
Merged

Add Claude Code GitHub Workflow#1
wbryanta merged 2 commits intomainfrom
add-claude-github-actions-1763000135471

Conversation

@wbryanta
Copy link
Copy Markdown
Owner

🤖 Installing Claude Code GitHub App

This PR adds a GitHub Actions workflow that enables Claude Code integration in our repository.

What is Claude Code?

Claude Code is an AI coding agent that can help with:

  • Bug fixes and improvements
  • Documentation updates
  • Implementing new features
  • Code reviews and suggestions
  • Writing tests
  • And more!

How it works

Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment.
Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.

Important Notes

  • This workflow won't take effect until this PR is merged
  • @claude mentions won't work until after the merge is complete
  • The workflow runs automatically whenever Claude is mentioned in PR or issue comments
  • Claude gets access to the entire PR or issue context including files, diffs, and previous comments

Security

  • Our Anthropic API key is securely stored as a GitHub Actions secret
  • Only users with write access to the repository can trigger the workflow
  • All Claude runs are stored in the GitHub Actions run history
  • Claude's default tools are limited to reading/writing files and interacting with our repo by creating comments, branches, and commits.
  • We can add more allowed tools by adding them to the workflow file like:
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)

There's more information in the Claude Code action repo.

After merging this PR, let's try mentioning @claude in a comment on any PR to get started!

wbryanta added a commit that referenced this pull request Nov 14, 2025
Critical Scoring Bug #1 Fix:
- Changed CriticalStrictness default: 1.0 → 0.0
- Root cause: strictness=1.0 requires PERFECT membership scores
  - With weighted averages, nearly impossible to achieve 1.0
  - Result: ALL tiles rejected (critScore=0.00 < 1.00)
  - Debug log showed thousands of failed strictness checks

Why 0.0 is correct for membership scoring:
- Membership scoring uses continuous [0,1] fuzzy matching
- Strictness check should allow fuzzy preferences to work
- Scoring system ranks tiles by quality, not binary pass/fail
- 0.0 = "score all candidates, return top-N ranked results"

Legacy k-of-n behavior:
- 1.0 = "all critical filters must match" (100%)
- Still works with k-of-n scoring (binary matches)
- But incompatible with continuous membership scores

Note: Existing save files may still have CriticalStrictness=1.0
Users will need to reset preferences or start new games for fix to apply.

Related: User reported 0 results on searches (debug-log-13112025-1833.txt)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
wbryanta added a commit that referenced this pull request Nov 14, 2025
…k, default to 20 results

Critical Fixes (#1, #2, #8):

1. Button Positioning Fix (#1 - CRITICAL):
   - Changed y-coordinate from 0f to rect.y for correct inline positioning
   - Buttons now properly adjacent to Planet/Terrain tabs
   - Layout: [ Planet ][ Terrain ][ LZ Results (XX) ][ ★ Mark ][ Bookmarks (YY) ]

2. Remove Duplicate Bookmark Button (#2):
   - Removed DrawBookmarkToggleButton() call from SelectStartingSiteButtonsPatch
   - Bookmark button now only in top row with Planet/Terrain
   - Adjusted bottom row layout to fill space correctly

3. Default Results Increased (#8):
   - Changed DefaultMaxResults: 10 → 20
   - User requested higher default for better result visibility

Changes:
- WorldInspectPaneButtonsPatch.cs: Use rect.y for inline positioning
- SelectStartingSiteButtonsPatch.cs: Remove duplicate bookmark button, adjust layout
- FilterSettings.cs: DefaultMaxResults now 20

Build: 0 errors, 0 warnings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
wbryanta added a commit that referenced this pull request Nov 14, 2025
…improvements

This commit addresses critical UI bugs and adds comprehensive mod settings
for better user control over scoring and logging.

**UI Fixes:**
- Fix button positioning in WorldInspectPane (LZ Results, Bookmark, Bookmarks now inline with Planet/Terrain tabs)
- Remove duplicate bookmark button from bottom row
- Honor user's C/F temperature preference in Basic UI
- Add Rivers (Any) and Roads (Any) toggles to Basic UI

**Mod Settings:**
- Create LandingZoneModSettings class with 5 scoring weight presets:
  - Balanced (7:2:1)
  - Critical Focused (10:3:1) - NEW DEFAULT
  - Strict Hierarchy (16:4:1)
  - Ultra Critical (20:4:1)
  - Precision Match (5:1:0)
- Add logging verbosity levels:
  - Verbose: Log every tile (debugging)
  - Standard: Phase summaries only (~10-20 lines) - DEFAULT
  - Brief: Results + timing only (~3-5 lines)
- Merge existing performance settings (AutoRunSearch, EvaluationChunkSize)

**Data Fixes:**
- Change FilterSettings.CriticalStrictness default from 1.0 → 0.0 for fuzzy matching
- Change DefaultMaxResults from 10 → 20

**Implementation Details:**
- FilterService.cs: Read scoring weights from LandingZoneModSettings.GetWeightValues()
- FilterService.cs: Wrap logging with LogLevel checks (Verbose/Standard/Brief)
- DefaultModeUI.cs: Convert temperature display using GenTemperature.CelsiusTo()
- DefaultModeUI.cs: Add SetAllRiversImportance() and SetAllRoadsImportance() helpers

**Tasks Completed:**
- LZ-FIX-SCORING-WEIGHTS (2-3h)
- LZ-FIX-LOGGING-LEVELS (1-2h)
- LZ-FIX-TEMPERATURE-CF (1-2h)
- LZ-FIX-BASIC-ROADS-RIVERS (1-2h)
- Critical button positioning fix (#1 from testing)
- Remove duplicate bookmark button (#2 from testing)
- Default to 20 results (#8 from testing)

Fixes button overlap (CRITICAL), adds granular scoring control via mod
settings (addresses discrete scoring issue), reduces log spam, and improves
Basic UI usability.

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
wbryanta added a commit that referenced this pull request Nov 14, 2025
Issue #1: Remove 25,000 candidate tile limit
- Changed FilterService.cs line 338: maxCandidates: 25000 → int.MaxValue
- Now evaluates ALL settleable tiles that pass cheap filters
- Previously capped at top 25k by upper bound score

Issue #2: Fix Top (XX) button functionality
- Button now calls LandingZoneResultsController.Toggle() (opens results window)
- Greys out when no results available (checks LandingZoneContext.HasMatches)
- Matches behavior of old "LZ Results (XX)" button
- Fixed variable naming conflict (prevColor → topPrevColor)

Both issues reported by user during testing session.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@wbryanta wbryanta merged commit 2b9694d into main Nov 14, 2025
1 check passed
wbryanta added a commit that referenced this pull request Nov 16, 2025
Rarity Badge Readability (Issue #2):
- Added ToBadgeLabel() method to TileRarityExtensions
- "Very Rare" → "V.Rare" to prevent wrapping
- "Legendary" → "Legend" for consistency
- Updated all UI badge displays to use compact labels

Demon Preset Heat Variant (Issue #1):
- Added 🔥 Scorched Hell preset for extreme heat playstyle
- Temperature: 35-60°C (scorching deserts)
- Features: ToxicRain, Volcanic (SteamGeysers), low rainfall
- Provides hot alternative to cold Demon preset

Preset Save Reliability (Issue #3):
- Changed SaveUserPreset() to return bool for success/failure
- Added duplicate name detection with case-insensitive check
- Dialog now shows error message if preset name exists
- Dialog only closes on successful save

Expanded Preset Library (Issue #4):
- Added 4 new diverse playstyle presets:
  - 🏰 Defense: Mountainous, caves, chokepoints, stone-rich
  - 🌾 Agrarian: Long growing season, fertile soil, flat terrain
  - ⚡ Power: Geothermal, rivers, sunny (energy independence)
  - 🐊 Bayou: Warm swamplands, high rainfall, rich biodiversity
- Total curated presets: 11 (was 7)
- Each preset emphasizes specific playstyle with mix of challenges

Technical:
- Added RimWorld.Planet import for Hilliness enum
- Added System.Linq for preset management
- Organized Initialize() with comments for preset categories

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant